|
|
(self.webpackChunk=self.webpackChunk||[]).push([[7460],{89489:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},59477:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},40001:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},81953:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},49198:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},87169:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},73331:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},15277:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},52671:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},8657:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},10906:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M355.9 534.9L354 653.8c-.1 8.9 7.1 16.2 16 16.2h.4l118-2.9c2-.1 4-.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-415.8 415a8.3 8.3 0 00-2.3 5.6zm63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1.7-46.4z"}}]},name:"form",theme:"outlined"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},56082:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},33853:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},15075:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},43531:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},76618:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"}}]},name:"poweroff",theme:"outlined"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},61485:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},38819:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},47472:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},37036:function(){"use strict"},88010:function(_n,qt){"use strict";qt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},23257:function(_n,qt){"use strict";qt.Z={header:"header___HqHSe",checkboxs:"checkboxs___ObBnD",field:"field___w_sM6","oj-form-container":"oj-form-container____odYP","oj-left-panel":"oj-left-panel___emEB2","oj-form-info":"oj-form-info___m00Ag",footer:"footer___O4iSJ",collapse:"collapse___Ltfkj","test-case-name":"test-case-name___miZcb","btn-remove-case":"btn-remove-case___cHap2","icon-tag":"icon-tag___gmyTb",btn_back:"btn_back___tNmX3",testJi:"testJi___L3fHb",upBtn:"upBtn___RGH6X",djs:"djs____TS0n",time:"time___IAdHc"}},38476:function(){"use strict"},39775:function(_n,qt,Ee){"use strict";var Me=Ee(59301),me=Object.defineProperty,Be=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,Le=(xe,ge,le)=>ge in xe?me(xe,ge,{enumerable:!0,configurable:!0,writable:!0,value:le}):xe[ge]=le,he=(xe,ge)=>{for(var le in ge||(ge={}))ke.call(ge,le)&&Le(xe,le,ge[le]);if(Be)for(var le of Be(ge))Ce.call(ge,le)&&Le(xe,le,ge[le]);return xe};const ye=xe=>React.createElement("svg",he({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},xe),React.createElement("title",null,"\u5360\u7528\u5185\u5B58"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{fillOpacity:.01,fill:"#FFF",d:"M0 0h30v30H0z"}),React.createElement("path",{d:"M6.866 26.928h-1.28a2.561 2.561 0 0 1-2.562-2.561V5.585a2.561 2.561 0 0 1 2.561-2.56h1.28v4.268a2.561 2.561 0 0 0 2.562 2.56h3.842a2.561 2.561 0 0 0 2.56-2.56V3.024h2.915l8.184 8.184v13.159a2.561 2.561 0 0 1-2.561 2.561h-1.28v-5.976c0-.943-.765-1.707-1.708-1.707H8.573c-.943 0-1.707.764-1.707 1.707v5.976Z",fill:"#B6D0FC"}),React.createElement("path",{d:"M8.573 3.024h5.55v4.269a.854.854 0 0 1-.854.853H9.427a.854.854 0 0 1-.854-.853V3.024ZM8.573 26.928v-5.976H21.38v5.976z",fill:"#1890FF"})));qt.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBmaWxsLW9wYWNpdHk9Ii4wMSIgZmlsbD0iI0ZGRiIgZD0iTTAgMGgzMHYzMEgweiIvPjxwYXRoIGQ9Ik02Ljg2NiAyNi45MjhoLTEuMjhhMi41NjEgMi41NjEgMCAwIDEtMi41NjItMi41NjFWNS41ODVhMi41NjEgMi41NjEgMCAwIDEgMi41NjEtMi41NmgxLjI4djQuMjY4YTIuNTYxIDIuNTYxIDAgMCAwIDIuNTYyIDIuNTZoMy44NDJhMi41NjEgMi41NjEgMCAwIDAgMi41Ni0yLjU2VjMuMDI0aDIuOTE1bDguMTg0IDguMTg0djEzLjE1OWEyLjU2MSAyLjU2MSAwIDAgMS0yLjU2MSAyLjU2MWgtMS4yOHYtNS45NzZjMC0uOTQzLS43NjUtMS43MDctMS43MDgtMS43MDdIOC41NzNjLS45NDMgMC0xLjcwNy43NjQtMS43MDcgMS43MDd2NS45NzZaIiBmaWxsPSIjQjZEMEZDIi8+PHBhdGggZD0iTTguNTczIDMuMDI0aDUuNTV2NC4yNjlhLjg1NC44NTQgMCAwIDEtLjg1NC44NTNIOS40MjdhLjg1NC44NTQgMCAwIDEtLjg1NC0uODUzVjMuMDI0Wk04LjU3MyAyNi45Mjh2LTUuOTc2SDIxLjM4djUuOTc2eiIgZmlsbD0iIzE4OTBGRiIvPjwvZz48L3N2Zz4="},93450:function(_n,qt,Ee){"use strict";var Me=Ee(59301),me=Object.defineProperty,Be=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,Le=(xe,ge,le)=>ge in xe?me(xe,ge,{enumerable:!0,configurable:!0,writable:!0,value:le}):xe[ge]=le,he=(xe,ge)=>{for(var le in ge||(ge={}))ke.call(ge,le)&&Le(xe,le,ge[le]);if(Be)for(var le of Be(ge))Ce.call(ge,le)&&Le(xe,le,ge[le]);return xe};const ye=xe=>React.createElement("svg",he({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},xe),React.createElement("title",null,"\u8FD0\u884C\u65F6\u95F4"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M30 15c0 8.284-6.716 15-15 15-8.284 0-15-6.716-15-15C0 6.716 6.716 0 15 0c8.284 0 15 6.716 15 15Z",fill:"#BAFFF0"}),React.createElement("path",{d:"M25.5 15c0 5.8-4.7 10.5-10.5 10.5S4.5 20.8 4.5 15 9.2 4.5 15 4.5 25.5 9.2 25.5 15Z",fill:"#44D7B6"}),React.createElement("path",{d:"M13.5 9a1.5 1.5 0 0 1 1.5 1.5v4.379l3.56 3.56a1.5 1.5 0 0 1-2.12 2.122l-4-4A1.5 1.5 0 0 1 12 15.5v-5A1.5 1.5 0 0 1 13.5 9Z",fill:"#FFF"})));qt.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMzAgMTVjMCA4LjI4NC02LjcxNiAxNS0xNSAxNS04LjI4NCAwLTE1LTYuNzE2LTE1LTE1QzAgNi43MTYgNi43MTYgMCAxNSAwYzguMjg0IDAgMTUgNi43MTYgMTUgMTVaIiBmaWxsPSIjQkFGRkYwIi8+PHBhdGggZD0iTTI1LjUgMTVjMCA1LjgtNC43IDEwLjUtMTAuNSAxMC41UzQuNSAyMC44IDQuNSAxNSA5LjIgNC41IDE1IDQuNSAyNS41IDkuMiAyNS41IDE1WiIgZmlsbD0iIzQ0RDdCNiIvPjxwYXRoIGQ9Ik0xMy41IDlhMS41IDEuNSAwIDAgMSAxLjUgMS41djQuMzc5bDMuNTYgMy41NmExLjUgMS41IDAgMCAxLTIuMTIgMi4xMjJsLTQtNEExLjUgMS41IDAgMCAxIDEyIDE1LjV2LTVBMS41IDEuNSAwIDAgMSAxMy41IDlaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg=="},74413:function(){"use strict";function _n(ce,z,ee,oe){ee===void 0&&(ee=0),oe===void 0&&(oe=1/0),this._name=ce,this._defaultValue=z,this._minimum=ee,this._maximum=oe}Object.defineProperty(_n.prototype,"name",{get:function(){return this._name},set:function(ce){if(typeof ce!="string"||ce==="")throw new Error("Shape name must be a valid string.");this._name=ce}}),Object.defineProperty(_n.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(ce){if(typeof ce!="number"||isNaN(ce))throw new Error("The default value must be a real number, not: "+ce);this._defaultValue=ce}}),Object.defineProperty(_n.prototype,"minimum",{get:function(){return this._minimum},set:function(ce){if(typeof ce!="number"||isNaN(ce))throw new Error("Minimum must be a real number, not: "+ce);this._minimum=ce}}),Object.defineProperty(_n.prototype,"maximum",{get:function(){return this._maximum},set:function(ce){if(typeof ce!="number"||isNaN(ce))throw new Error("Maximum must be a real number, not: "+ce);this._maximum=ce}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(ce,z){var ee=go.Shape._FigureParameters[ce];return ee?ee[z]:null},go.Shape.setFigureParameter=function(ce,z,ee){if(!(ee instanceof _n))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 oe=go.Shape._FigureParameters[ce];oe||(oe=[],go.Shape._FigureParameters[ce]=oe),oe[z]=ee};var qt=[];function Ee(ce,z){var ee=qt.pop();return ee===void 0?new go.Point(ce,z):(ee.x=ce,ee.y=z,ee)}function Me(){var ce=qt.pop();return ce===void 0?new go.Point:ce}function me(ce){qt.push(ce)}function Be(ce,z,ee,oe,ie,se,ue,Se,we){we||(we=new go.Point);var Pe=ce-ee,Ae=ie-ue,De=NaN,ze=NaN;if(Pe===0)if(Ae===0)ce===ee&&(De=ce,ze=z);else{var Ze=(se-Se)/Ae,Xe=se-Ze*ie;De=ce,ze=Ze*De+Xe}else if(Ae===0){var Ge=(z-oe)/Pe,ft=z-Ge*ce;De=ie,ze=Ge*De+ft}else{var Ge=(z-oe)/Pe,Ze=(se-Se)/Ae,ft=z-Ge*ce,Xe=se-Ze*ie;De=(Xe-ft)/(Ge-Ze),ze=Ge*De+ft}return we.x=De,we.y=ze,we}function ke(ce,z,ee,oe,ie,se,ue,Se,we,Pe,Ae,De,ze,Ze){var Xe=1-we,Ge=we,ft=ce*Xe+ee*Ge,at=z*Xe+oe*Ge,Ct=ee*Xe+ie*Ge,et=oe*Xe+se*Ge,yt=ie*Xe+ue*Ge,st=se*Xe+Se*Ge,zt=ft*Xe+Ct*Ge,lt=at*Xe+et*Ge,tt=Ct*Xe+yt*Ge,ut=et*Xe+st*Ge,mt=zt*Xe+tt*Ge,Pt=lt*Xe+ut*Ge;Pe.x=ft,Pe.y=at,Ae.x=zt,Ae.y=lt,De.x=mt,De.y=Pt,ze.x=tt,ze.y=ut,Ze.x=yt,Ze.y=st}var Ce=new go.Spot(.156,.156),Le=new go.Spot(.844,.844),he=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new _n("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=5),oe=Math.min(oe,z/3),oe=Math.min(oe,ee/3);var ie=oe*he,se=new go.Geometry().add(new go.PathFigure(oe,0,!0).add(new go.PathSegment(go.PathSegment.Line,z-oe,0)).add(new go.PathSegment(go.PathSegment.Bezier,z,oe,z-ie,0,z,ie)).add(new go.PathSegment(go.PathSegment.Line,z,ee-oe)).add(new go.PathSegment(go.PathSegment.Bezier,z-oe,ee,z,ee-ie,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,oe,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee-oe,ie,ee,0,ee-ie)).add(new go.PathSegment(go.PathSegment.Line,0,oe)).add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,ie,ie,0).close()));return ie>1&&(se.spot1=new go.Spot(0,0,ie,ie),se.spot2=new go.Spot(1,1,-ie,-ie)),se}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(z,ee).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(z,ee).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(.5*z,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(ce,z,ee){var oe=new go.Geometry(go.Geometry.Line);return oe.startX=0,oe.startY=ee/2,oe.endX=z,oe.endY=ee/2,oe}),go.Shape.defineFigureGenerator("LineV",function(ce,z,ee){var oe=new go.Geometry(go.Geometry.Line);return oe.startX=z/2,oe.startY=0,oe.endX=z/2,oe.endY=ee,oe}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,ee/2,!1).add(new go.PathSegment(go.PathSegment.Line,z,ee/2)).add(new go.PathSegment(go.PathSegment.Move,z/2,0)).add(new go.PathSegment(go.PathSegment.Line,z/2,ee)))}),go.Shape.defineFigureGenerator("XLine",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)))}),go.Shape.defineFigureGenerator("LineRight",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(.25*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*z,ee)))}),go.Shape.defineFigureGenerator("LineDown",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,.25*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,.75*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)))}),go.Shape.defineFigureGenerator("LineLeft",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(.75*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*z,ee)))}),go.Shape.defineFigureGenerator("LineUp",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,.75*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(ce,z,ee){var oe=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(oe*z,(1-oe)*ee,!1).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*z,oe*ee)).add(new go.PathSegment(go.PathSegment.Move,oe*z,oe*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*z,(1-oe)*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee/2)).add(new go.PathSegment(go.PathSegment.Line,z,ee/2)).add(new go.PathSegment(go.PathSegment.Move,z/2,0)).add(new go.PathSegment(go.PathSegment.Line,z/2,ee)))}),go.Shape.defineFigureGenerator("CircleLine",function(ce,z,ee){var oe=z/2,ie=new go.Geometry().add(new go.PathFigure(z,z/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,oe,oe,oe,oe).close()));return ie.spot1=Ce,ie.spot2=Le,ie.defaultStretch=go.GraphObject.Uniform,ie}),go.Shape.defineFigureGenerator("Line1",function(ce,z,ee){var oe=new go.Geometry(go.Geometry.Line);return oe.startX=0,oe.startY=0,oe.endX=z,oe.endY=ee,oe}),go.Shape.defineFigureGenerator("Line2",function(ce,z,ee){var oe=new go.Geometry(go.Geometry.Line);return oe.startX=z,oe.startY=0,oe.endX=0,oe.endY=ee,oe}),go.Shape.defineFigureGenerator("Curve1",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,z,ee,he*z,0,z,(1-he)*ee)))}),go.Shape.defineFigureGenerator("Curve2",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,z,ee,0,he*ee,(1-he)*z,ee)))}),go.Shape.defineFigureGenerator("Curve3",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,z,he*ee,he*z,ee)))}),go.Shape.defineFigureGenerator("Curve4",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,(1-he)*z,0,0,(1-he)*ee)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(z,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new _n("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)?oe=.1:oe<-1?oe=-1:oe>1&&(oe=1);var ie=Math.abs(oe)*z;if(oe===0){var se=new go.Geometry(go.Geometry.Rectangle);return se.startX=0,se.startY=0,se.endX=z,se.endY=ee,se}else{var se=new go.Geometry;return oe>0?se.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):se.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,ee).close())),ie<z/2&&se.setSpots(ie/z,0,(z-ie)/z,1),se}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new _n("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)?oe=10:oe<-z?oe=-z:oe>z&&(oe=z);var ie=Math.abs(oe);if(oe===0){var se=new go.Geometry(go.Geometry.Rectangle);return se.startX=0,se.startY=0,se.endX=z,se.endY=ee,se}else{var se=new go.Geometry;return oe>0?se.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):se.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,ee).close())),ie<z/2&&se.setSpots(ie/z,0,(z-ie)/z,1),se}}),go.Shape.setFigureParameter("Trapezoid1",0,new _n("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)?oe=.2:oe<.5?oe=-.5:oe>.5&&(oe=.5);var ie=Math.abs(oe)*z;if(oe===0){var se=new go.Geometry(go.Geometry.Rectangle);return se.startX=0,se.startY=0,se.endX=z,se.endY=ee,se}else{var se=new go.Geometry;return oe>0?se.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):se.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,ee).close())),ie<z/2&&se.setSpots(ie/z,0,(z-ie)/z,1),se}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new _n("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)?oe=20:oe<-z?oe=-z/2:oe>z&&(oe=z/2);var ie=Math.abs(oe);if(oe===0){var se=new go.Geometry(go.Geometry.Rectangle);return se.startX=0,se.startY=0,se.endX=z,se.endY=ee,se}else{var se=new go.Geometry;return oe>0?se.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):se.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,ee).close())),ie<z/2&&se.setSpots(ie/z,0,(z-ie)/z,1),se}}),go.Shape.setFigureParameter("ManualOperation",0,new _n("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)?oe=10:oe<-z?oe=-z/2:oe>z&&(oe=z/2);var ie=Math.abs(oe);if(oe===0){var se=new go.Geometry(go.Geometry.Rectangle);return se.startX=0,se.startY=0,se.endX=z,se.endY=ee,se}else{var se=new go.Geometry;return oe>0?se.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,ee).close())):se.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())),ie<z/2&&se.setSpots(ie/z,0,(z-ie)/z,1),se}});var ye=[];function xe(){var ce=ye.pop();return ce===void 0?[]:ce}function ge(ce){ce.length=0,ye.push(ce)}function le(ce){for(var z=xe(),ee=.5,oe=.5,ie=Math.PI*1.5,se=0,ue=0;ue<ce;ue++)se=2*Math.PI/ce*ue+ie,z[ue]=new go.Point(oe+ee*Math.cos(se),oe+ee*Math.sin(se));return z.push(z[0]),z}function ve(ce){var z=de(ce),ee=xe();ee[0]=z[0];for(var oe=1,ie=1;oe<z.length;oe+=2,ie+=3)ee[ie]=z[oe],ee[ie+1]=z[oe],ee[ie+2]=z[oe+1];return ge(z),ee}function de(ce){for(var z=le(ce),ee=xe(),oe=Math.floor(z.length/2),ie=z.length-1,se=ce%2===0?2:1,ue=0;ue<ie;ue++){var Se=z[ue],we=z[ue+1],Pe=z[(oe+ue-1)%ie],Ae=z[(oe+ue+se)%ie];ee[ue*2]=Se,ee[ue*2+1]=Be(Se.x,Se.y,Pe.x,Pe.y,we.x,we.y,Ae.x,Ae.y,new go.Point)}return ee[ee.length]=ee[0],ge(z),ee}go.Shape.defineFigureGenerator("Pentagon",function(ce,z,ee){var oe=le(5),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<5;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.2,.22),ie.spot2=new go.Spot(.8,.9),ie}),go.Shape.defineFigureGenerator("Hexagon",function(ce,z,ee){var oe=le(6),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<6;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.07,.25),ie.spot2=new go.Spot(.93,.75),ie}),go.Shape.defineFigureGenerator("Heptagon",function(ce,z,ee){var oe=le(7),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<7;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.2,.15),ie.spot2=new go.Spot(.8,.85),ie}),go.Shape.defineFigureGenerator("Octagon",function(ce,z,ee){var oe=le(8),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<8;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.15,.15),ie.spot2=new go.Spot(.85,.85),ie}),go.Shape.defineFigureGenerator("Nonagon",function(ce,z,ee){var oe=le(9),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<9;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.17,.13),ie.spot2=new go.Spot(.82,.82),ie}),go.Shape.defineFigureGenerator("Decagon",function(ce,z,ee){var oe=le(10),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<10;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.16,.16),ie.spot2=new go.Spot(.84,.84),ie}),go.Shape.defineFigureGenerator("Dodecagon",function(ce,z,ee){var oe=le(12),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<12;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.16,.16),ie.spot2=new go.Spot(.84,.84),ie}),go.Shape.defineFigureGenerator("FivePointedStar",function(ce,z,ee){var oe=de(5),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<10;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.266,.333),ie.spot2=new go.Spot(.733,.733),ie}),go.Shape.defineFigureGenerator("SixPointedStar",function(ce,z,ee){var oe=de(6),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<12;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.17,.25),ie.spot2=new go.Spot(.83,.75),ie}),go.Shape.defineFigureGenerator("SevenPointedStar",function(ce,z,ee){var oe=de(7),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<14;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.666),ie}),go.Shape.defineFigureGenerator("EightPointedStar",function(ce,z,ee){var oe=de(8),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<16;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.25,.25),ie.spot2=new go.Spot(.75,.75),ie}),go.Shape.defineFigureGenerator("NinePointedStar",function(ce,z,ee){var oe=de(9),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<18;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.666),ie}),go.Shape.defineFigureGenerator("TenPointedStar",function(ce,z,ee){var oe=de(10),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<20;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.281,.261),ie.spot2=new go.Spot(.723,.748),ie}),go.Shape.defineFigureGenerator("FivePointedBurst",function(ce,z,ee){var oe=ve(5),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<oe.length;ue+=3)se.add(new go.PathSegment(go.PathSegment.Bezier,oe[ue+2].x*z,oe[ue+2].y*ee,oe[ue].x*z,oe[ue].y*ee,oe[ue+1].x*z,oe[ue+1].y*ee));return se.segments.last().close(),ge(oe),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("SixPointedBurst",function(ce,z,ee){var oe=ve(6),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<oe.length;ue+=3)se.add(new go.PathSegment(go.PathSegment.Bezier,oe[ue+2].x*z,oe[ue+2].y*ee,oe[ue].x*z,oe[ue].y*ee,oe[ue+1].x*z,oe[ue+1].y*ee));return se.segments.last().close(),ge(oe),ie.spot1=new go.Spot(.17,.222),ie.spot2=new go.Spot(.833,.777),ie}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(ce,z,ee){var oe=ve(7),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<oe.length;ue+=3)se.add(new go.PathSegment(go.PathSegment.Bezier,oe[ue+2].x*z,oe[ue+2].y*ee,oe[ue].x*z,oe[ue].y*ee,oe[ue+1].x*z,oe[ue+1].y*ee));return se.segments.last().close(),ge(oe),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("EightPointedBurst",function(ce,z,ee){var oe=ve(8),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<oe.length;ue+=3)se.add(new go.PathSegment(go.PathSegment.Bezier,oe[ue+2].x*z,oe[ue+2].y*ee,oe[ue].x*z,oe[ue].y*ee,oe[ue+1].x*z,oe[ue+1].y*ee));return se.segments.last().close(),ge(oe),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("NinePointedBurst",function(ce,z,ee){var oe=ve(9),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<oe.length;ue+=3)se.add(new go.PathSegment(go.PathSegment.Bezier,oe[ue+2].x*z,oe[ue+2].y*ee,oe[ue].x*z,oe[ue].y*ee,oe[ue+1].x*z,oe[ue+1].y*ee));return se.segments.last().close(),ge(oe),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("TenPointedBurst",function(ce,z,ee){var oe=ve(10),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<oe.length;ue+=3)se.add(new go.PathSegment(go.PathSegment.Bezier,oe[ue+2].x*z,oe[ue+2].y*ee,oe[ue].x*z,oe[ue].y*ee,oe[ue+1].x*z,oe[ue+1].y*ee));return se.segments.last().close(),ge(oe),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.setFigureParameter("FramedRectangle",0,new _n("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new _n("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(ce,z,ee){var oe=ce?ce.parameter1:NaN,ie=ce?ce.parameter2:NaN;isNaN(oe)&&(oe=8),isNaN(ie)&&(ie=8);var se=new go.Geometry,ue=new go.PathFigure(0,0,!0);return se.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe<z/2&&ie<ee/2&&(ue.add(new go.PathSegment(go.PathSegment.Move,oe,ie)),ue.add(new go.PathSegment(go.PathSegment.Line,oe,ee-ie)),ue.add(new go.PathSegment(go.PathSegment.Line,z-oe,ee-ie)),ue.add(new go.PathSegment(go.PathSegment.Line,z-oe,ie).close())),se.setSpots(0,0,1,1,oe,ie,-oe,-ie),se}),go.Shape.setFigureParameter("Ring",0,new _n("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=8);var ie=z/2,se=new go.Geometry,ue=new go.PathFigure(z,z/2,!0);se.add(ue),ue.add(new go.PathSegment(go.PathSegment.Arc,0,360,ie,ie,ie,ie).close());var Se=Math.max(ie-oe,0);return Se>0&&(ue.add(new go.PathSegment(go.PathSegment.Move,z/2+Se,z/2)),ue.add(new go.PathSegment(go.PathSegment.Arc,0,-360,ie,ie,Se,Se).close())),se.spot1=Ce,se.spot2=Le,se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("Cloud",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(.08034461*z,.1944299*ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*z,.05349299*ee,-.09239631*z,.07836421*ee,.1406031*z,-.0542823*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*z,.074219*ee,.2450511*z,-.00697547*ee,.3776197*z,-.01112067*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*z,.07004196*ee,.4539471*z,0,.6066018*z,-.02526587*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*z,.08370865*ee,.6914277*z,-.01904177*ee,.8921095*z,-.01220843*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*z,.3194596*ee,1.036446*z,.04105738*ee,1.020377*z,.3022052*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*z,.562044*ee,1.04448*z,.360238*ee,.992256*z,.5219009*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*z,.8217117*ee,1.032337*z,.5771781*ee,1.018411*z,.8120651*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*z,.9156953*ee,1.028411*z,.9571472*ee,.8556702*z,1.052487*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*z,.9310455*ee,.7431877*z,1.009325*ee,.5624123*z,1.021761*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*z,.9344623*ee,.4820677*z,1.031761*ee,.3030112*z,1.002796*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*z,.870098*ee,.2329994*z,1.01518*ee,.03213784*z,1.01518*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*z,.6545475*ee,-.02812061*z,.9032597*ee,-.01205169*z,.6835638*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*z,.4265613*ee,-.01812061*z,.6089503*ee,-.00606892*z,.4555777*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*z,.1944299*ee,-.01606892*z,.3892545*ee,-.01205169*z,.1944299*ee))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(ce,z,ee){var oe=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(oe*z,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,oe*ee)).add(new go.PathSegment(go.PathSegment.Line,z,(1-oe)*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*z,ee)).add(new go.PathSegment(go.PathSegment.Line,oe*z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,(1-oe)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,oe*ee).close())).setSpots(oe/2,oe/2,1-oe/2,1-oe/2)}),go.Shape.setFigureParameter("Pie",0,new _n("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new _n("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(ce,z,ee){var oe=ce?ce.parameter1:NaN,ie=ce?ce.parameter2:NaN;isNaN(oe)&&(oe=0),isNaN(ie)&&(ie=315);var se=oe%360;se<0&&(se+=360);var ue=ie%360,Se=Math.min(z,ee)/2;return new go.Geometry().add(new go.PathFigure(Se,Se).add(new go.PathSegment(go.PathSegment.Arc,se,ue,Se,Se,Se,Se).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(ce,z,ee){var oe=he/Math.SQRT2*.5,ie=Math.SQRT2/2,se=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(z,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,ie*z,se*ee,z,(1-oe)*ee,(ie+oe)*z,(se+oe)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()))}),go.Shape.setFigureParameter("ThickCross",0,new _n("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=30);var ie=Math.min(oe,z)/2,se=z/2,ue=ee/2;return new go.Geometry().add(new go.PathFigure(se-ie,0,!0).add(new go.PathSegment(go.PathSegment.Line,se+ie,0)).add(new go.PathSegment(go.PathSegment.Line,se+ie,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,se+ie,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,se+ie,ee)).add(new go.PathSegment(go.PathSegment.Line,se-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,se-ie,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,se-ie,ue-ie).close()))}),go.Shape.setFigureParameter("ThinCross",0,new _n("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=10);var ie=Math.min(oe,z)/2,se=z/2,ue=ee/2;return new go.Geometry().add(new go.PathFigure(se-ie,0,!0).add(new go.PathSegment(go.PathSegment.Line,se+ie,0)).add(new go.PathSegment(go.PathSegment.Line,se+ie,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,se+ie,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,se+ie,ee)).add(new go.PathSegment(go.PathSegment.Line,se-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,se-ie,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,se-ie,ue-ie).close()))}),go.Shape.setFigureParameter("ThickX",0,new _n("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;if((isNaN(oe)||oe<0)&&(oe=30),z===0||ee===0){var ie=new go.Geometry(go.Geometry.Rectangle);return ie.startX=0,ie.startY=0,ie.endX=z,ie.endY=ee,ie}else{var se=z/2,ue=ee/2,Se=Math.atan2(ee,z),we=oe-Math.min(Math.cos(Se)*oe/2,se),Pe=oe-Math.min(Math.sin(Se)*oe/2,ue),ie=new go.Geometry,Ae=new go.PathFigure(we,0,!0);return ie.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,se,.2*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,z-we,0)),Ae.add(new go.PathSegment(go.PathSegment.Line,z,Pe)),Ae.add(new go.PathSegment(go.PathSegment.Line,.8*z,ue)),Ae.add(new go.PathSegment(go.PathSegment.Line,z,ee-Pe)),Ae.add(new go.PathSegment(go.PathSegment.Line,z-we,ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,se,.8*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,we,ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,ee-Pe)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*z,ue)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,Pe).close()),ie}}),go.Shape.setFigureParameter("ThinX",0,new _n("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=10);var ie=new go.Geometry,se=new go.PathFigure(.1*z,0,!0);return ie.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),se.add(new go.PathSegment(go.PathSegment.Line,z,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*z,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*z,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee).close()),ie}),go.Shape.setFigureParameter("SquareIBeam",0,new _n("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=.2);var ie=new go.Geometry,se=new go.PathFigure(0,0,!0);return ie.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.add(new go.PathSegment(go.PathSegment.Line,z,oe*ee)),se.add(new go.PathSegment(go.PathSegment.Line,(.5+oe/2)*z,oe*ee)),se.add(new go.PathSegment(go.PathSegment.Line,(.5+oe/2)*z,(1-oe)*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,(1-oe)*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,(1-oe)*ee)),se.add(new go.PathSegment(go.PathSegment.Line,(.5-oe/2)*z,(1-oe)*ee)),se.add(new go.PathSegment(go.PathSegment.Line,(.5-oe/2)*z,oe*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,oe*ee).close()),ie}),go.Shape.setFigureParameter("RoundedIBeam",0,new _n("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=.5);var ie=new go.Geometry,se=new go.PathFigure(0,0,!0);return ie.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,z,ee,Math.abs(1-oe)*z,.25*ee,Math.abs(1-oe)*z,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,0,oe*z,.75*ee,oe*z,.25*ee).close()),ie}),go.Shape.defineFigureGenerator("HalfEllipse",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,he*z,0,z,(.5-he/2)*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,z,(.5+he/2)*ee,he*z,ee).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,z,0,z,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*z,.75*ee,.5*z,.25*ee).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(.5*z,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,.1*z,.8*ee,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,0,0,.45*z,0)).add(new go.PathSegment(go.PathSegment.Bezier,z,.3*ee,.55*z,0,z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,.5*ee,.9*z,.8*ee).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(.5*z,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*z,.01*ee)).add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,.6*z,.2*ee,z,.25*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.7*ee,z,.8*ee,.6*z,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.75*z,ee,.5*z,.75*ee,.55*z,.95*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*z,ee)).add(new go.PathSegment(go.PathSegment.Bezier,.45*z,.7*ee,.45*z,.95*ee,.5*z,.75*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.4*z,.8*ee,0,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.49*z,.01*ee,0,.25*ee,.4*z,.2*ee).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.4*z,.6*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.15*z,ee,.5*z,.75*ee,.45*z,.95*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.6*z,.6*ee,.55*z,.95*ee,.5*z,.75*ee));var se=.2,ue=.3,Se=0,we=se*he;return ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5+se+Se)*ee,(.5-se+ue)*z,(.5+we+Se)*ee,(.5-we+ue)*z,(.5+se+Se)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+ue)*z,(.5+Se)*ee,(.5+we+ue)*z,(.5+se+Se)*ee,(.5+se+ue)*z,(.5+we+Se)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-se+Se)*ee,(1-.5+se+ue)*z,(.5-we+Se)*ee,(.5+we+ue)*z,(.5-se+Se)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.65*z,.36771243*ee,(.5-we+ue)*z,(.5-se+Se)*ee,(.5-se+ue+.05)*z,(.5-we+Se-.02)*ee)),se=.2,ue=0,Se=-.3,we=se*he,ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+ue)*z,(.5+Se)*ee,(.5+we+ue)*z,(.5+se+Se)*ee,(.5+se+ue)*z,(.5+we+Se)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-se+Se)*ee,(1-.5+se+ue)*z,(.5-we+Se)*ee,(.5+we+ue)*z,(.5-se+Se)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+ue)*z,(.5+Se)*ee,(.5-we+ue)*z,(.5-se+Se)*ee,(.5-se+ue)*z,(.5-we+Se)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-we+ue)*z,(.5+se+Se)*ee,(.5-se+ue)*z,(.5+we+Se)*ee,(.5-we+ue)*z,(.5+se+Se)*ee)),se=.2,ue=-.3,Se=0,we=se*he,ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-se+Se)*ee,(1-.5+se+ue-.05)*z,(.5-we+Se-.02)*ee,(.5+we+ue)*z,(.5-se+Se)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+ue)*z,(.5+Se)*ee,(.5-we+ue)*z,(.5-se+Se)*ee,(.5-se+ue)*z,(.5-we+Se)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5+se+Se)*ee,(.5-se+ue)*z,(.5+we+Se)*ee,(.5-we+ue)*z,(.5+se+Se)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.6*ee,(.5+we+ue)*z,(.5+se+Se)*ee,(.5+se+ue)*z,(.5+we+Se)*ee).close()),oe.setSpots(.06,.33,.93,.68),oe}),go.Shape.defineFigureGenerator("YinYang",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*.5,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,z*.5,z*.5,z*.5,z*.5)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,-180,z*.5,z*.75,z*.25,z*.25)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,180,z*.5,z*.25,z*.25,z*.25));var se=.1,ue=.5,Se=.25;return ie.add(new go.PathSegment(go.PathSegment.Move,(ue+se)*z,Se*ee)),ie.add(new go.PathSegment(go.PathSegment.Arc,0,-360,z*ue,ee*Se,se*z,se*z).close()),ie=new go.PathFigure(z*.5,0,!1),oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,-180,z*.5,z*.5,z*.5,z*.5)),Se=.75,ie=new go.PathFigure((ue+se)*z,Se*ee,!0),oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,0,360,z*ue,ee*Se,se*z,se*z).close()),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("Peace",function(ce,z,ee){var oe=.8535533905932737,ie=.5*z,se=.5*ee;return new go.Geometry().add(new go.PathFigure(ie,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,ie,se,ie,se)).add(new go.PathSegment(go.PathSegment.Line,ie,ee)).add(new go.PathSegment(go.PathSegment.Move,ie,se)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*z,oe*ee)).add(new go.PathSegment(go.PathSegment.Move,ie,se)).add(new go.PathSegment(go.PathSegment.Line,oe*z,oe*ee)))}),go.Shape.defineFigureGenerator("NotAllowed",function(ce,z,ee){var oe=new go.Geometry,ie=he*.5,se=.5,ue=.5,Se=.5,we=new go.PathFigure(ue*z,(Se-se)*ee);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue-se)*z,Se*ee,(ue-ie)*z,(Se-se)*ee,(ue-se)*z,(Se-ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+se)*ee,(ue-se)*z,(Se+ie)*ee,(ue-ie)*z,(Se+se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,Se*ee,(ue+ie)*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se-se)*ee,(ue+se)*z,(Se-ie)*ee,(ue+ie)*z,(Se-se)*ee)),se=.4,ie=he*.4;var Pe=Me(),Ae=Me(),De=Me(),ze=Me();ke(ue,Se-se,ue+ie,Se-se,ue+se,Se-ie,ue+se,Se,.42,Pe,Ae,De,ze,ze);var Ze=Me(),Xe=Me(),Ge=Me();ke(ue,Se-se,ue+ie,Se-se,ue+se,Se-ie,ue+se,Se,.58,ze,ze,Ge,Ze,Xe);var ft=Me(),at=Me(),Ct=Me();ke(ue,Se+se,ue-ie,Se+se,ue-se,Se+ie,ue-se,Se,.42,ft,at,Ct,ze,ze);var et=Me(),yt=Me(),st=Me();return ke(ue,Se+se,ue-ie,Se+se,ue-se,Se+ie,ue-se,Se,.58,ze,ze,st,et,yt),we.add(new go.PathSegment(go.PathSegment.Move,st.x*z,st.y*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue-se)*z,Se*ee,et.x*z,et.y*ee,yt.x*z,yt.y*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se-se)*ee,(ue-se)*z,(Se-ie)*ee,(ue-ie)*z,(Se-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,De.x*z,De.y*ee,Pe.x*z,Pe.y*ee,Ae.x*z,Ae.y*ee)),we.add(new go.PathSegment(go.PathSegment.Line,st.x*z,st.y*ee).close()),we.add(new go.PathSegment(go.PathSegment.Move,Ct.x*z,Ct.y*ee)),we.add(new go.PathSegment(go.PathSegment.Line,Ge.x*z,Ge.y*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,Se*ee,Ze.x*z,Ze.y*ee,Xe.x*z,Xe.y*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee,(ue+ie)*z,(Se+se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,Ct.x*z,Ct.y*ee,ft.x*z,ft.y*ee,at.x*z,at.y*ee).close()),me(Pe),me(Ae),me(De),me(ze),me(Ze),me(Xe),me(Ge),me(ft),me(at),me(Ct),me(et),me(yt),me(st),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("Fragile",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*z,0)).add(new go.PathSegment(go.PathSegment.Line,.2*z,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.29*z,.33*ee)).add(new go.PathSegment(go.PathSegment.Line,.35*z,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.5*ee,z,.25*ee,.75*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.55*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.5*ee,0,.25*ee).close()))}),go.Shape.setFigureParameter("HourGlass",0,new _n("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=30),oe>z&&(oe=z);var ie=(z-oe)/2,se=ie+oe;return new go.Geometry().add(new go.PathFigure(se,.5*ee).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,z,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,.55*ee).add(new go.PathSegment(go.PathSegment.Line,.6*z,0)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.55*ee).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(ce,z,ee){var oe=new go.Geometry,ie=he*.4,se=.4,ue=.5,Se=.5,we=Me(),Pe=Me(),Ae=Me(),De=Me(),ze=new go.PathFigure((ue-se)*z,Se*ee,!1);oe.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se-se)*ee,(ue-se)*z,(Se-ie)*ee,(ue-ie)*z,(Se-se)*ee)),ke(ue,Se-se,ue+ie,Se-se,ue+se,Se-ie,ue+se,Se,.44,Ae,De,Pe,we,we),ze.add(new go.PathSegment(go.PathSegment.Bezier,Pe.x*z,Pe.y*ee,Ae.x*z,Ae.y*ee,De.x*z,De.y*ee));var Ze=Ee(Pe.x,Pe.y);ke(ue,Se-se,ue+ie,Se-se,ue+se,Se-ie,ue+se,Se,.56,we,we,Pe,Ae,De);var Xe=Ee(Pe.x,Pe.y);ze.add(new go.PathSegment(go.PathSegment.Line,(Ze.x*.1+.95*.9)*z,Ze.y*.1*ee)),ze.add(new go.PathSegment(go.PathSegment.Line,.85*z,Ze.y*.1*ee)),ze.add(new go.PathSegment(go.PathSegment.Line,.85*z,0)),ze.add(new go.PathSegment(go.PathSegment.Line,z,0)),ze.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),ze.add(new go.PathSegment(go.PathSegment.Line,(Xe.x*.1+.9)*z,.15*ee)),ze.add(new go.PathSegment(go.PathSegment.Line,(Xe.x*.1+.9)*z,(Xe.y*.1+.05*.9)*ee)),ze.add(new go.PathSegment(go.PathSegment.Line,Xe.x*z,Xe.y*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,Se*ee,Ae.x*z,Ae.y*ee,De.x*z,De.y*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee,(ue+ie)*z,(Se+se)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(ue-se)*z,Se*ee,(ue-ie)*z,(Se+se)*ee,(ue-se)*z,(Se+ie)*ee)),se=.35,ie=he*.35;var Ge=new go.PathFigure(ue*z,(Se-se)*ee,!1);oe.add(Ge),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(ue-se)*z,Se*ee,(ue-ie)*z,(Se-se)*ee,(ue-se)*z,(Se-ie)*ee)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+se)*ee,(ue-se)*z,(Se+ie)*ee,(ue-ie)*z,(Se+se)*ee)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,Se*ee,(ue+ie)*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se-se)*ee,(ue+se)*z,(Se-ie)*ee,(ue+ie)*z,(Se-se)*ee));var ft=new go.PathFigure((ue-se)*z,Se*ee,!1);return oe.add(ft),me(we),me(Pe),me(Ae),me(De),me(Ze),me(Xe),oe.spot1=new go.Spot(.202,.257),oe.spot2=new go.Spot(.792,.739),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("GenderFemale",function(ce,z,ee){var oe=new go.Geometry,ie=.375,se=0,ue=-.125,Se=ie*he,we=new go.PathFigure((.525+se)*z,(.5+ie+ue)*ee,!1);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+se)*z,(.5+ue)*ee,(.5+Se+se)*z,(.5+ie+ue)*ee,(.5+ie+se)*z,(.5+Se+ue)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5+se)*z,(.5-ie+ue)*ee,(1-.5+ie+se)*z,(.5-Se+ue)*ee,(.5+Se+se)*z,(.5-ie+ue)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+se)*z,(.5+ue)*ee,(.5-Se+se)*z,(.5-ie+ue)*ee,(.5-ie+se)*z,(.5-Se+ue)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.475+se)*z,(.5+ie+ue)*ee,(.5-ie+se)*z,(.5+Se+ue)*ee,(.5-Se+se)*z,(.5+ie+ue)*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.475*z,.85*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.425*z,.85*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.425*z,.9*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.475*z,.9*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.475*z,ee)),we.add(new go.PathSegment(go.PathSegment.Line,.525*z,ee)),we.add(new go.PathSegment(go.PathSegment.Line,.525*z,.9*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.575*z,.9*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.575*z,.85*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.525*z,.85*ee).close()),ie=.325,se=0,ue=-.125,Se=ie*he;var we=new go.PathFigure((1-.5+ie+se)*z,(.5+ue)*ee,!1);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5+se)*z,(.5+ie+ue)*ee,(.5+ie+se)*z,(.5+Se+ue)*ee,(.5+Se+se)*z,(.5+ie+ue)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+se)*z,(.5+ue)*ee,(.5-Se+se)*z,(.5+ie+ue)*ee,(.5-ie+se)*z,(.5+Se+ue)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5+se)*z,(.5-ie+ue)*ee,(.5-ie+se)*z,(.5-Se+ue)*ee,(.5-Se+se)*z,(.5-ie+ue)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+se)*z,(.5+ue)*ee,(.5+Se+se)*z,(.5-ie+ue)*ee,(1-.5+ie+se)*z,(.5-Se+ue)*ee));var we=new go.PathFigure((.525+se)*z,(.5+ie+ue)*ee,!1);return oe.add(we),oe.spot1=new go.Spot(.232,.136),oe.spot2=new go.Spot(.682,.611),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("LogicImplies",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;return isNaN(oe)&&(oe=.2),new go.Geometry().add(new go.PathFigure((1-oe)*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*z,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;return isNaN(oe)&&(oe=.2),new go.Geometry().add(new go.PathFigure((1-oe)*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*z,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,oe*z,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,oe*z,ee))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)))}),go.Shape.defineFigureGenerator("LogicAnd",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Line,z,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(ce,z,ee){var oe=new go.Geometry().add(new go.PathFigure(.5*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*z,.5*ee,.5*z,.5*ee)));return oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("LogicTruth",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,.5*z,0)).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Move,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)))}),go.Shape.defineFigureGenerator("LogicForAll",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,.25*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*ee))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee)).add(new go.PathSegment(go.PathSegment.Line,z,ee))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(ce,z,ee){var oe=.5;return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,0,oe*ee)).add(new go.PathSegment(go.PathSegment.Arc,180,180,oe*z,oe*ee,oe*z,oe*ee)).add(new go.PathSegment(go.PathSegment.Line,z,ee))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(ce,z,ee){var oe=.5;return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,oe*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,180,oe*z,oe*ee,oe*z,oe*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new _n("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new _n("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=ce?ce.parameter2:NaN;isNaN(ie)&&(ie=.3);var se=(1-oe)*z,ue=(.5-ie/2)*ee,Se=(.5+ie/2)*ee,we=new go.Geometry,Pe=new go.PathFigure(0,ue,!0);we.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,se,ue)),Pe.add(new go.PathSegment(go.PathSegment.Line,se,0)),Pe.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,se,ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,se,Se)),Pe.add(new go.PathSegment(go.PathSegment.Line,0,Se).close()),we.spot1=new go.Spot(0,ue/ee);var Ae=Be(0,Se/ee,1,Se/ee,se/z,1,1,.5,Me());return we.spot2=new go.Spot(Ae.x,Ae.y),me(Ae),we}),go.Shape.setFigureParameter("Arrow2",0,new _n("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new _n("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=30),oe>z&&(oe=z);var ie=ce?ce.parameter2:NaN;isNaN(ie)&&(ie=30),ie=Math.min(ie,ee/2);var se=z-oe,ue=(ee-ie)/2,Se=ue+ie,we=new go.Geometry,Pe=new go.PathFigure(0,ue,!0);we.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,se,ue)),Pe.add(new go.PathSegment(go.PathSegment.Line,se,0)),Pe.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,se,ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,se,Se)),Pe.add(new go.PathSegment(go.PathSegment.Line,0,Se).close()),we.spot1=new go.Spot(0,ue/ee);var Ae=Be(0,Se/ee,1,Se/ee,se/z,1,1,.5,Me());return we.spot2=new go.Spot(Ae.x,Ae.y),me(Ae),we}),go.Shape.defineFigureGenerator("Chevron",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee).close()),oe}),go.Shape.defineFigureGenerator("DoubleArrow",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.214*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,1*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.786*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,1*ee).close()),oe}),go.Shape.setFigureParameter("DoubleEndArrow",0,new _n("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=(.5-oe/2)*ee,se=(.5+oe/2)*ee,ue=new go.Geometry,Se=new go.PathFigure(z,.5*ee,!0);ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.3*z,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.3*z,ee)),Se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),Se.add(new go.PathSegment(go.PathSegment.Line,.3*z,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close());var we=Be(0,.5,.3,0,0,ie/ee,.1,ie/ee,Me());return ue.spot1=new go.Spot(we.x,we.y),we=Be(.7,1,1,.5,0,se/ee,1,se/ee,we),ue.spot2=new go.Spot(we.x,we.y),me(we),ue}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new _n("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new _n("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=40);var ie=ce?ce.parameter2:NaN;isNaN(ie)&&(ie=100);var se=(ee-oe)/2,ue=se+oe,Se=(ee-ie)/2,we=Se+ie;(oe>ee||ie>ee)&&(ie>oe?(oe=oe*ee/ie,se=(ee-oe)/2,ue=se+oe,Se=0,we=ee):(se=0,ue=ee,Se=0,we=ee));var Pe=new go.Geometry,Ae=new go.PathFigure(z,.5*ee,!0);Pe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*z,we)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*z,ue)),Ae.add(new go.PathSegment(go.PathSegment.Line,.3*z,ue)),Ae.add(new go.PathSegment(go.PathSegment.Line,.3*z,we)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.3*z,Se)),Ae.add(new go.PathSegment(go.PathSegment.Line,.3*z,se)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*z,se)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*z,Se).close());var De=Be(0,.5,.3,Se/ee,0,se/ee,1,se/ee,Me());return Pe.spot1=new go.Spot(De.x,De.y),De=Be(.7,we/ee,1,.5,0,ue/ee,1,ue/ee,De),Pe.spot2=new go.Spot(De.x,De.y),me(De),Pe}),go.Shape.setFigureParameter("IBeamArrow",0,new _n("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=(.5-oe/2)*ee,se=(.5+oe/2)*ee,ue=new go.Geometry,Se=new go.PathFigure(z,.5*ee,!0);ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.2*z,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.2*z,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,.2*z,0)),Se.add(new go.PathSegment(go.PathSegment.Line,.2*z,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ue.spot1=new go.Spot(0,ie/ee);var we=Be(.7,1,1,.5,0,se/ee,1,se/ee,Me());return ue.spot2=new go.Spot(we.x,we.y),me(we),ue}),go.Shape.setFigureParameter("IBeamArrow2",0,new _n("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new _n("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=40);var ie=ce?ce.parameter2:NaN;isNaN(ie)&&(ie=100);var se=(ee-oe)/2,ue=se+oe,Se=(ee-ie)/2,we=Se+ie;(oe>ee||ie>ee)&&(ie>oe?(oe=oe*ee/ie,se=(ee-oe)/2,ue=se+oe,Se=0,we=ee):(se=0,ue=ee,Se=0,we=ee));var Pe=new go.Geometry,Ae=new go.PathFigure(z,.5*ee,!0);Pe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*z,we)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*z,ue)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*z,ue)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*z,we)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,we)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,Se)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*z,Se)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*z,se)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*z,se)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*z,Se).close()),Pe.spot1=new go.Spot(0,se/ee);var De=Be(.7,we/ee,1,.5,0,ue/ee,1,ue/ee,Me());return Pe.spot2=new go.Spot(De.x,De.y),me(De),Pe}),go.Shape.setFigureParameter("Pointer",0,new _n("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=.1);var ie=new go.Geometry,se=new go.PathFigure(z,.5*ee,!0);ie.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,oe*z,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),ie.spot1=new go.Spot(oe,.35);var ue=Be(.2,.65,1,.65,0,1,1,.5,Me());return ie.spot2=new go.Spot(ue.x,ue.y),me(ue),ie}),go.Shape.setFigureParameter("RoundedPointer",0,new _n("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=new go.Geometry,se=new go.PathFigure(z,.5*ee,!0);ie.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,0,oe*z,.75*ee,oe*z,.25*ee).close()),ie.spot1=new go.Spot(oe,.35);var ue=Be(0,.65,1,.65,0,1,1,.5,Me());return ie.spot2=new go.Spot(ue.x,ue.y),me(ue),ie}),go.Shape.setFigureParameter("SplitEndArrow",0,new _n("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=.4);var ie=(.5-oe/2)*ee,se=(.5+oe/2)*ee,ue=new go.Geometry,Se=new go.PathFigure(z,.5*ee,!0);ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,se)),Se.add(new go.PathSegment(go.PathSegment.Line,0,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,0,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ue.spot1=new go.Spot(.2,.3);var we=Be(.7,1,1,.5,0,se/ee,1,se/ee,Me());return ue.spot2=new go.Spot(we.x,we.y),me(we),ue}),go.Shape.setFigureParameter("SplitEndArrow2",0,new _n("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=50);var ie=(ee-oe)/2,se=ie+oe;oe>ee&&(ie=0,se=ee);var ue=new go.Geometry,Se=new go.PathFigure(z,.5*ee,!0);ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,se)),Se.add(new go.PathSegment(go.PathSegment.Line,0,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,0,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ue.spot1=new go.Spot(.2,ie/ee);var we=Be(.7,1,1,.5,0,se/ee,1,se/ee,Me());return ue.spot2=new go.Spot(we.x,we.y),me(we),ue}),go.Shape.setFigureParameter("SquareArrow",0,new _n("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=.7);var ie=new go.Geometry,se=new go.PathFigure(z,.5*ee,!0);return ie.add(se),se.add(new go.PathSegment(go.PathSegment.Line,oe*z,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,oe*z,0).close()),ie.spot1=go.Spot.TopLeft,ie.spot2=new go.Spot(oe,1),ie}),go.Shape.defineFigureGenerator("Cone1",function(ce,z,ee){var oe=new go.Geometry,ie=he*.5,se=he*.1,ue=new go.PathFigure(0,.9*ee,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+se)*ee,(.5+ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-ie)*z,ee,0,(.9+se)*ee).close()),oe.spot1=new go.Spot(.25,.5),oe.spot2=new go.Spot(.75,.97),oe}),go.Shape.defineFigureGenerator("Cone2",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.9*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.9*ee,(1-.85/.9)*z,ee,.85/.9*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee).close());var se=new go.PathFigure(0,.9*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,z,.9*ee,(1-.85/.9)*z,.8*ee,.85/.9*z,.8*ee)),oe.spot1=new go.Spot(.25,.5),oe.spot2=new go.Spot(.75,.82),oe}),go.Shape.defineFigureGenerator("Cube1",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var se=new go.PathFigure(.5*z,ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*z,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),oe.spot1=new go.Spot(0,.3),oe.spot2=new go.Spot(.5,.85),oe}),go.Shape.defineFigureGenerator("Cube2",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.3*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,0).close());var se=new go.PathFigure(0,.3*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.7*z,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.add(new go.PathSegment(go.PathSegment.Move,.7*z,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),oe.spot1=new go.Spot(0,.3),oe.spot2=new go.Spot(.7,1),oe}),go.Shape.defineFigureGenerator("Cylinder1",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,ee/3);var ie=new go.Geometry,se=he*.5,ue=new go.PathFigure(0,oe,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,he*oe,(.5-se)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,1*z,oe,(.5+se)*z,0,1*z,he*oe)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-oe)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,1*ee,1*z,ee-he*oe,(.5+se)*z,1*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-oe,(.5-se)*z,1*ee,0,ee-he*oe)),ue.add(new go.PathSegment(go.PathSegment.Line,0,oe));var Se=new go.PathFigure(z,oe,!1);return ie.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,2*oe,1*z,2*oe-he*oe,(.5+se)*z,2*oe)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,oe,(.5-se)*z,2*oe,0,2*oe-he*oe)),ie.spot1=new go.Spot(0,0,0,2*oe),ie.spot2=new go.Spot(1,1),ie}),go.Shape.defineFigureGenerator("Cylinder2",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,ee/3);var ie=new go.Geometry,se=he*.5,ue=new go.PathFigure(0,ee-oe,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,0,oe)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,he*oe,(.5-se)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,oe,(.5+se)*z,0,z,he*oe)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-oe)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,ee-he*oe,(.5+se)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-oe,(.5-se)*z,ee,0,ee-he*oe));var Se=new go.PathFigure(0,ee-oe,!1);return ie.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee-2*oe,0,ee-oe-he*oe,(.5-se)*z,ee-2*oe)),Se.add(new go.PathSegment(go.PathSegment.Bezier,z,ee-oe,(.5+se)*z,ee-2*oe,z,ee-oe-he*oe)),ie.spot1=new go.Spot(0,0),ie.spot2=new go.Spot(1,1,0,-2*oe),ie}),go.Shape.defineFigureGenerator("Cylinder3",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,z/3);var ie=new go.Geometry,se=he*.5,ue=new go.PathFigure(oe,0,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z-oe,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,z-he*oe,0,z,(.5-se)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-oe,ee,z,(.5+se)*ee,z-he*oe,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,oe,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,he*oe,ee,0,(.5+se)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,(.5-se)*ee,he*oe,0));var Se=new go.PathFigure(oe,0,!1);return ie.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,2*oe,.5*ee,oe+he*oe,0,2*oe,(.5-se)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,oe,ee,2*oe,(.5+se)*ee,oe+he*oe,ee)),ie.spot1=new go.Spot(0,0,2*oe,0),ie.spot2=new go.Spot(1,1),ie}),go.Shape.defineFigureGenerator("Cylinder4",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,z/3);var ie=new go.Geometry,se=he*.5,ue=new go.PathFigure(z-oe,0,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,z-he*oe,0,z,(.5-se)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-oe,ee,z,(.5+se)*ee,z-he*oe,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,oe,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,he*oe,ee,0,(.5+se)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,(.5-se)*ee,he*oe,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z-oe,0));var Se=new go.PathFigure(z-oe,0,!1);return ie.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,z-2*oe,.5*ee,z-oe-he*oe,0,z-2*oe,(.5-se)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,z-oe,ee,z-2*oe,(.5+se)*ee,z-oe-he*oe,ee)),ie.spot1=new go.Spot(0,0),ie.spot2=new go.Spot(1,1,-2*oe,0),ie}),go.Shape.defineFigureGenerator("Prism1",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.25*z,.25*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var se=new go.PathFigure(.25*z,.25*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),oe.spot1=new go.Spot(.408,.172),oe.spot2=new go.Spot(.833,.662),oe}),go.Shape.defineFigureGenerator("Prism2",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.25*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var se=new go.PathFigure(0,ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*ee)),oe.spot1=new go.Spot(.25,.5),oe.spot2=new go.Spot(.75,.75),oe}),go.Shape.defineFigureGenerator("Pyramid1",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee).close());var se=new go.PathFigure(.5*z,0,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),oe.spot1=new go.Spot(.25,.367),oe.spot2=new go.Spot(.75,.875),oe}),go.Shape.defineFigureGenerator("Pyramid2",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var se=new go.PathFigure(.5*z,0,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),oe.spot1=new go.Spot(.25,.367),oe.spot2=new go.Spot(.75,.875),oe}),go.Shape.defineFigureGenerator("Actor",function(ce,z,ee){var oe=new go.Geometry,ie=.2,se=.1,ue=he*ie,Se=he*se,we=.5,Pe=.1,Ae=new go.PathFigure(we*z,(Pe+se)*ee,!0);oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(we-ie)*z,Pe*ee,(we-ue)*z,(Pe+se)*ee,(we-ie)*z,(Pe+Se)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Pe-se)*ee,(we-ie)*z,(Pe-Se)*ee,(we-ue)*z,(Pe-se)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(we+ie)*z,Pe*ee,(we+ue)*z,(Pe-se)*ee,(we+ie)*z,(Pe-Se)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Pe+se)*ee,(we+ie)*z,(Pe+Se)*ee,(we+ue)*z,(Pe+se)*ee));var De=.05,ze=he*De;we=.05,Pe=.25;var Ze=new go.PathFigure(.5*z,.2*ee,!0);return oe.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Line,.95*z,.2*ee)),we=.95,Pe=.25,Ze.add(new go.PathSegment(go.PathSegment.Bezier,(we+De)*z,Pe*ee,(we+ze)*z,(Pe-De)*ee,(we+De)*z,(Pe-ze)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,z,.6*ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,.85*z,.35*ee)),De=.025,ze=he*De,we=.825,Pe=.35,Ze.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Pe-De)*ee,(we+De)*z,(Pe-ze)*ee,(we+ze)*z,(Pe-De)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(we-De)*z,Pe*ee,(we-ze)*z,(Pe-De)*ee,(we-De)*z,(Pe-ze)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,.55*z,ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*ee)),De=.05,ze=he*De,we=.5,Pe=.7,Ze.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Pe-De)*ee,(we+De)*z,(Pe-ze)*ee,(we+ze)*z,(Pe-De)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(we-De)*z,Pe*ee,(we-ze)*z,(Pe-De)*ee,(we-De)*z,(Pe-ze)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,.45*z,ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,.2*z,.35*ee)),De=.025,ze=he*De,we=.175,Pe=.35,Ze.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Pe-De)*ee,(we+De)*z,(Pe-ze)*ee,(we+ze)*z,(Pe-De)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(we-De)*z,Pe*ee,(we-ze)*z,(Pe-De)*ee,(we-De)*z,(Pe-ze)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),De=.05,ze=he*De,we=.05,Pe=.25,Ze.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Pe-De)*ee,(we-De)*z,(Pe-ze)*ee,(we-ze)*z,(Pe-De)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,.5*z,.2*ee)),oe.spot1=new go.Spot(.2,.2),oe.spot2=new go.Spot(.8,.65),oe}),go.Shape.setFigureParameter("Card",0,new _n("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=.2);var ie=new go.Geometry,se=new go.PathFigure(z,0,!0);return ie.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,oe*ee)),se.add(new go.PathSegment(go.PathSegment.Line,oe*z,0).close()),ie.spot1=new go.Spot(0,oe),ie.spot2=go.Spot.BottomRight,ie}),go.Shape.defineFigureGenerator("Collate",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,.5*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee));var se=new go.PathFigure(.5*z,.5*ee,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),oe.spot1=new go.Spot(.25,0),oe.spot2=new go.Spot(.75,.25),oe}),go.Shape.defineFigureGenerator("CreateRequest",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN;isNaN(ie)&&(ie=.1);var se=new go.PathFigure(0,0,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.add(new go.PathSegment(go.PathSegment.Line,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure(0,ie*ee,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,ie*ee)),ue.add(new go.PathSegment(go.PathSegment.Move,0,(1-ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,(1-ie)*ee)),oe}),go.Shape.defineFigureGenerator("Database",function(ce,z,ee){var oe=new go.Geometry,ie=he*.5,se=he*.1,ue=new go.PathFigure(z,.1*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+se)*ee,(.5+ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-ie)*z,ee,0,(.9+se)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-se)*ee,(.5-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*ee,(.5+ie)*z,0,z,(.1-se)*ee));var Se=new go.PathFigure(z,.1*ee,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,z,(.1+se)*ee,(.5+ie)*z,.2*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-ie)*z,.2*ee,0,(.1+se)*ee)),Se.add(new go.PathSegment(go.PathSegment.Move,z,.2*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,z,(.2+se)*ee,(.5+ie)*z,.3*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-ie)*z,.3*ee,0,(.2+se)*ee)),Se.add(new go.PathSegment(go.PathSegment.Move,z,.3*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.4*ee,z,(.3+se)*ee,(.5+ie)*z,.4*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,(.5-ie)*z,.4*ee,0,(.3+se)*ee)),oe.spot1=new go.Spot(0,.4),oe.spot2=new go.Spot(1,.9),oe}),go.Shape.defineFigureGenerator("DataStorage",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,ee,z,0,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.9*ee,.25*z,.1*ee).close()),oe.spot1=new go.Spot(.226,0),oe.spot2=new go.Spot(.81,1),oe}),go.Shape.defineFigureGenerator("DiskStorage",function(ce,z,ee){var oe=new go.Geometry,ie=he*.5,se=he*.1,ue=new go.PathFigure(z,.1*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+se)*ee,(.5+ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-ie)*z,ee,0,(.9+se)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-se)*ee,(.5-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*ee,(.5+ie)*z,0,z,(.1-se)*ee));var Se=new go.PathFigure(z,.1*ee,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,z,(.1+se)*ee,(.5+ie)*z,.2*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-ie)*z,.2*ee,0,(.1+se)*ee)),Se.add(new go.PathSegment(go.PathSegment.Move,z,.2*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,z,(.2+se)*ee,(.5+ie)*z,.3*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-ie)*z,.3*ee,0,(.2+se)*ee)),oe.spot1=new go.Spot(0,.3),oe.spot2=new go.Spot(1,.9),oe}),go.Shape.defineFigureGenerator("Display",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.25*z,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,ee,z,0,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close()),oe.spot1=new go.Spot(.25,0),oe.spot2=new go.Spot(.75,1),oe}),go.Shape.defineFigureGenerator("DividedEvent",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN;isNaN(ie)?ie=.2:ie<.15&&(ie=.15);var se=he*.2,ue=new go.PathFigure(0,.2*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,0,(.2-se)*ee,(.2-se)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.2*ee,(.8+se)*z,0,z,(.2-se)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,ee,z,(.8+se)*ee,(.8+se)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*ee,(.2-se)*z,ee,0,(.8+se)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee));var Se=new go.PathFigure(0,ie*ee,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,z,ie*ee)),oe}),go.Shape.defineFigureGenerator("DividedProcess",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN;(isNaN(ie)||ie<.1)&&(ie=.1);var se=new go.PathFigure(0,0,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.add(new go.PathSegment(go.PathSegment.Line,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure(0,ie*ee,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,ie*ee)),oe}),go.Shape.defineFigureGenerator("Document",function(ce,z,ee){var oe=new go.Geometry;ee=ee/.8;var ie=new go.PathFigure(0,.7*ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*z,.4*ee,.5*z,ee).close()),oe.spot1=go.Spot.TopLeft,oe.spot2=new go.Spot(1,.6),oe}),go.Shape.defineFigureGenerator("ExternalOrganization",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN;(isNaN(ie)||ie<.2)&&(ie=.2);var se=new go.PathFigure(0,0,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.add(new go.PathSegment(go.PathSegment.Line,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure(ie*z,0,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,0,ie*ee)),ue.add(new go.PathSegment(go.PathSegment.Move,z,ie*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Move,0,(1-ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Move,(1-ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,(1-ie)*ee)),oe}),go.Shape.defineFigureGenerator("ExternalProcess",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var se=new go.PathFigure(.1*z,.4*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.1*z,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.9*z,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.6*z,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*z,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.4*z,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*z,.9*ee)),oe.spot1=new go.Spot(.25,.25),oe.spot2=new go.Spot(.75,.75),oe}),go.Shape.defineFigureGenerator("File",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var se=new go.PathFigure(.75*z,0,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*z,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),oe.spot1=new go.Spot(0,.25),oe.spot2=go.Spot.BottomRight,oe}),go.Shape.defineFigureGenerator("Interrupt",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z,.5*ee,!0);oe.add(ie),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,z,.5*ee));var se=new go.PathFigure(z,.5*ee,!1);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,ee));var ue=new go.PathFigure(z,.5*ee,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.5,.75),oe}),go.Shape.defineFigureGenerator("InternalStorage",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN,se=ce?ce.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(se)&&(se=.1);var ue=new go.PathFigure(0,0,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var Se=new go.PathFigure(ie*z,0,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),Se.add(new go.PathSegment(go.PathSegment.Move,0,se*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,z,se*ee)),oe}),go.Shape.defineFigureGenerator("Junction",function(ce,z,ee){var oe=new go.Geometry,ie=1/Math.SQRT2,se=(1-1/Math.SQRT2)/2,ue=he*.5,Se=.5,we=new go.PathFigure(z,Se*ee,!0);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,Se*z,ee,z,(Se+ue)*ee,(Se+ue)*z,ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,Se*ee,(Se-ue)*z,ee,0,(Se+ue)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,Se*z,0,0,(Se-ue)*ee,(Se-ue)*z,0)),we.add(new go.PathSegment(go.PathSegment.Bezier,z,Se*ee,(Se+ue)*z,0,z,(Se-ue)*ee));var Pe=new go.PathFigure((se+ie)*z,(se+ie)*ee,!1);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,se*z,se*ee)),Pe.add(new go.PathSegment(go.PathSegment.Move,se*z,(se+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,(se+ie)*z,se*ee)),oe}),go.Shape.defineFigureGenerator("LinedDocument",function(ce,z,ee){var oe=new go.Geometry;ee=ee/.8;var ie=new go.PathFigure(0,.7*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*z,.4*ee,.5*z,ee).close());var se=new go.PathFigure(.1*z,0,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.1*z,.75*ee)),oe.spot1=new go.Spot(.1,0),oe.spot2=new go.Spot(1,.6),oe}),go.Shape.defineFigureGenerator("LoopLimit",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee).close()),oe.spot1=new go.Spot(0,.25),oe.spot2=go.Spot.BottomRight,oe}),go.Shape.defineFigureGenerator("MagneticTape",function(ce,z,ee){var oe=new go.Geometry,ie=he*.5,se=.5,ue=new go.PathFigure(.5*z,ee,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,se*ee,(se-ie)*z,ee,0,(se+ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,se*z,0,0,(se-ie)*ee,(se-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,se*ee,(se+ie)*z,0,z,(se-ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,(se+.1)*z,.9*ee,z,(se+ie)*ee,(se+ie)*z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),oe.spot1=new go.Spot(.15,.15),oe.spot2=new go.Spot(.85,.8),oe}),go.Shape.defineFigureGenerator("ManualInput",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee).close()),oe.spot1=new go.Spot(0,.25),oe.spot2=go.Spot.BottomRight,oe}),go.Shape.defineFigureGenerator("MessageFromUser",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN;isNaN(ie)&&(ie=.7);var se=new go.PathFigure(0,0,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.add(new go.PathSegment(go.PathSegment.Line,ie*z,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe.spot1=go.Spot.TopLeft,oe}),go.Shape.defineFigureGenerator("MicroformProcessing",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN;isNaN(ie)&&(ie=.25);var se=new go.PathFigure(0,0,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,ie*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.add(new go.PathSegment(go.PathSegment.Line,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,(1-ie)*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe}),go.Shape.defineFigureGenerator("MicroformRecording",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(1,.75),oe}),go.Shape.defineFigureGenerator("MultiDocument",function(ce,z,ee){var oe=new go.Geometry;ee=ee/.8;var ie=new go.PathFigure(z,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.44*ee,.96*z,.47*ee,.93*z,.45*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.54*ee,.86*z,.57*ee,.83*z,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.4*z,.4*ee,.4*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,0).close());var se=new go.PathFigure(.1*z,.2*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.54*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*z,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*z,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*z,.44*ee)),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.8,.77),oe}),go.Shape.defineFigureGenerator("MultiProcess",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.1*z,.1*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*ee).close());var se=new go.PathFigure(.2*z,.1*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.9*z,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1*z,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.9*ee)),oe.spot1=new go.Spot(0,.2),oe.spot2=new go.Spot(.8,1),oe}),go.Shape.defineFigureGenerator("OfflineStorage",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN;isNaN(ie)&&(ie=.1);var se=1-ie,ue=new go.PathFigure(0,0,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee).close());var Se=new go.PathFigure(.5*ie*z,ie*ee,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,(1-.5*ie)*z,ie*ee)),oe}),go.Shape.defineFigureGenerator("OffPageConnector",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe.spot1=go.Spot.TopLeft,oe.spot2=new go.Spot(.75,1),oe}),go.Shape.defineFigureGenerator("Or",function(ce,z,ee){var oe=new go.Geometry,ie=he*.5,se=.5,ue=new go.PathFigure(z,se*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,se*z,ee,z,(se+ie)*ee,(se+ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,se*ee,(se-ie)*z,ee,0,(se+ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,se*z,0,0,(se-ie)*ee,(se-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,se*ee,(se+ie)*z,0,z,(se-ie)*ee));var Se=new go.PathFigure(z,.5*ee,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),Se.add(new go.PathSegment(go.PathSegment.Move,.5*z,ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),oe}),go.Shape.defineFigureGenerator("PaperTape",function(ce,z,ee){var oe=new go.Geometry;ee=ee/.8;var ie=new go.PathFigure(0,.7*ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.3*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.3*ee,.5*z,.6*ee,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*z,.4*ee,.5*z,ee).close()),oe.spot1=new go.Spot(0,.49),oe.spot2=new go.Spot(1,.75),oe}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN,se=ce?ce.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(se)&&(se=.3);var ue=new go.PathFigure(0,0,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN,se=ce?ce.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(se)&&(se=.3);var ue=new go.PathFigure(0,0,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe}),go.Shape.defineFigureGenerator("Procedure",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN;isNaN(ie)&&(ie=.1);var se=new go.PathFigure(0,0,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.add(new go.PathSegment(go.PathSegment.Line,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure((1-ie)*z,0,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Move,ie*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),oe}),go.Shape.defineFigureGenerator("Process",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN;isNaN(ie)&&(ie=.1);var se=new go.PathFigure(0,0,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.add(new go.PathSegment(go.PathSegment.Line,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure(ie*z,0,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),oe.spot2=go.Spot.BottomRight,oe}),go.Shape.defineFigureGenerator("Sort",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var se=new go.PathFigure(0,.5*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),oe.spot1=new go.Spot(.25,.25),oe.spot2=new go.Spot(.75,.5),oe}),go.Shape.defineFigureGenerator("Start",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN;isNaN(ie)&&(ie=.25);var se=new go.PathFigure(ie*z,0,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*z,.5*ee,.25*z,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*z,.5*ee,.25*z,.5*ee));var ue=new go.PathFigure(ie*z,0,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Move,(1-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,ee)),oe.spot1=new go.Spot(ie,0),oe.spot2=new go.Spot(1-ie,1),oe}),go.Shape.defineFigureGenerator("Terminator",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.25*z,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*z,.5*ee,.25*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*z,.5*ee,.25*z,.5*ee)),oe.spot1=new go.Spot(.23,0),oe.spot2=new go.Spot(.77,1),oe}),go.Shape.defineFigureGenerator("TransmittalTape",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN;isNaN(ie)&&(ie=.1);var se=new go.PathFigure(0,0,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.add(new go.PathSegment(go.PathSegment.Line,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*z,(1-ie)*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,(1-ie)*ee).close()),oe.spot1=go.Spot.TopLeft,oe}),go.Shape.defineFigureGenerator("AndGate",function(ce,z,ee){var oe=new go.Geometry,ie=he*.5,se=new go.PathFigure(0,0,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(.5+ie)*z,0,z,(.5-ie)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.5+ie)*ee,(.5+ie)*z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe.spot1=go.Spot.TopLeft,oe.spot2=new go.Spot(.55,1),oe}),go.Shape.defineFigureGenerator("Buffer",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.5,.75),oe}),go.Shape.defineFigureGenerator("Clock",function(ce,z,ee){var oe=new go.Geometry,ie=he*.5,se=.5,ue=new go.PathFigure(z,se*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,se*z,ee,z,(se+ie)*ee,(se+ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,se*ee,(se-ie)*z,ee,0,(se+ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,se*z,0,0,(se-ie)*ee,(se-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,se*ee,(se+ie)*z,0,z,(se-ie)*ee));var Se=new go.PathFigure(z,se*ee,!1);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,z,se*ee));var we=new go.PathFigure(.8*z,.75*ee,!1);return oe.add(we),we.add(new go.PathSegment(go.PathSegment.Line,.8*z,.25*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.6*z,.25*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.6*z,.75*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.4*z,.75*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.4*z,.25*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.2*z,.25*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.2*z,.75*ee)),oe}),go.Shape.defineFigureGenerator("Ground",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.3*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.4*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,ee)),oe}),go.Shape.defineFigureGenerator("Inverter",function(ce,z,ee){var oe=new go.Geometry,ie=he*.1,se=.1,ue=.9,Se=.5,we=new go.PathFigure(.8*z,.5*ee,!0);oe.add(we),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,.8*z,.5*ee));var Pe=new go.PathFigure((ue+se)*z,Se*ee,!0);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee,(ue+ie)*z,(Se+se)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-se)*z,Se*ee,(ue-ie)*z,(Se+se)*ee,(ue-se)*z,(Se+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se-se)*ee,(ue-se)*z,(Se-ie)*ee,(ue-ie)*z,(Se-se)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,Se*ee,(ue+ie)*z,(Se-se)*ee,(ue+se)*z,(Se-ie)*ee)),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.4,.75),oe}),go.Shape.defineFigureGenerator("NandGate",function(ce,z,ee){var oe=new go.Geometry,ie=he*.5,se=he*.4,ue=he*.1,Se=.1,we=.9,Pe=.5,Ae=new go.PathFigure(.8*z,.5*ee,!0);oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,ee,.8*z,(.5+se)*ee,(.4+ie)*z,ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ae.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(.4+ie)*z,0,.8*z,(.5-se)*ee));var De=new go.PathFigure((we+Se)*z,Pe*ee,!0);return oe.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Pe+Se)*ee,(we+Se)*z,(Pe+ue)*ee,(we+ue)*z,(Pe+Se)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,(we-Se)*z,Pe*ee,(we-ue)*z,(Pe+Se)*ee,(we-Se)*z,(Pe+ue)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Pe-Se)*ee,(we-Se)*z,(Pe-ue)*ee,(we-ue)*z,(Pe-Se)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,(we+Se)*z,Pe*ee,(we+ue)*z,(Pe-Se)*ee,(we+Se)*z,(Pe-ue)*ee)),oe.spot1=new go.Spot(0,.05),oe.spot2=new go.Spot(.55,.95),oe}),go.Shape.defineFigureGenerator("NorGate",function(ce,z,ee){var oe=new go.Geometry,ie=.5,se=he*ie,ue=0,Se=.5,we=new go.PathFigure(.8*z,.5*ee,!0);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.7*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.75*ee,.25*z,.25*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(ue+se)*z,(Se-ie)*ee,.7*z,(Se-se)*ee)),ie=.1,se=he*.1,ue=.9,Se=.5;var Pe=new go.PathFigure((ue-ie)*z,Se*ee,!0);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se-ie)*ee,(ue-ie)*z,(Se-se)*ee,(ue-se)*z,(Se-ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,Se*ee,(ue+se)*z,(Se-ie)*ee,(ue+ie)*z,(Se-se)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+ie)*ee,(ue+ie)*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,Se*ee,(ue-se)*z,(Se+ie)*ee,(ue-ie)*z,(Se+se)*ee)),oe.spot1=new go.Spot(.2,.25),oe.spot2=new go.Spot(.6,.75),oe}),go.Shape.defineFigureGenerator("OrGate",function(ce,z,ee){var oe=new go.Geometry,ie=.5,se=he*ie,ue=0,Se=.5,we=new go.PathFigure(0,0,!0);return oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(ue+se+se)*z,(Se-ie)*ee,.8*z,(Se-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.8*z,(Se+se)*ee,(ue+se+se)*z,(Se+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.75*ee,.25*z,.25*ee).close()),oe.spot1=new go.Spot(.2,.25),oe.spot2=new go.Spot(.75,.75),oe}),go.Shape.defineFigureGenerator("XnorGate",function(ce,z,ee){var oe=new go.Geometry,ie=.5,se=he*ie,ue=.2,Se=.5,we=new go.PathFigure(.1*z,0,!1);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,ee,.35*z,.25*ee,.35*z,.75*ee));var Pe=new go.PathFigure(.8*z,.5*ee,!0);oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,ee,.7*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*ee,.45*z,.25*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(ue+se)*z,(Se-ie)*ee,.7*z,(Se-se)*ee)),ie=.1,se=he*.1,ue=.9,Se=.5;var Ae=new go.PathFigure((ue-ie)*z,Se*ee,!0);return oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se-ie)*ee,(ue-ie)*z,(Se-se)*ee,(ue-se)*z,(Se-ie)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,Se*ee,(ue+se)*z,(Se-ie)*ee,(ue+ie)*z,(Se-se)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+ie)*ee,(ue+ie)*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,Se*ee,(ue-se)*z,(Se+ie)*ee,(ue-ie)*z,(Se+se)*ee)),oe.spot1=new go.Spot(.4,.25),oe.spot2=new go.Spot(.65,.75),oe}),go.Shape.defineFigureGenerator("XorGate",function(ce,z,ee){var oe=new go.Geometry,ie=.5,se=he*ie,ue=.2,Se=.5,we=new go.PathFigure(.1*z,0,!1);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,ee,.35*z,.25*ee,.35*z,.75*ee));var Pe=new go.PathFigure(.2*z,0,!0);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(ue+se)*z,(Se-ie)*ee,.9*z,(Se-se)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,ee,.9*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*ee,.45*z,.25*ee).close()),oe.spot1=new go.Spot(.4,.25),oe.spot2=new go.Spot(.8,.75),oe}),go.Shape.defineFigureGenerator("Capacitor",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),oe}),go.Shape.defineFigureGenerator("Resistor",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.5*ee)),oe}),go.Shape.defineFigureGenerator("Inductor",function(ce,z,ee){var oe=new go.Geometry,ie=he*.1,se=.1,ue=.1,Se=.5,we=new go.PathFigure((ue-ie*.5)*z,ee,!1);return oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,0,(ue-ie)*z,ee,(ue-se)*z,0)),ue=.3,we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,ee,(ue+se)*z,0,(ue+ie)*z,ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,0,(ue-ie)*z,ee,(ue-se)*z,0)),ue=.5,we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,ee,(ue+se)*z,0,(ue+ie)*z,ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,0,(ue-ie)*z,ee,(ue-se)*z,0)),ue=.7,we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,ee,(ue+se)*z,0,(ue+ie)*z,ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,0,(ue-ie)*z,ee,(ue-se)*z,0)),ue=.9,we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie*.5)*z,ee,(ue+se)*z,0,(ue+ie)*z,ee)),oe}),go.Shape.defineFigureGenerator("ACvoltageSource",function(ce,z,ee){var oe=new go.Geometry,ie=he*.5,se=.5,ue=.5,Se=.5,we=new go.PathFigure((ue-se)*z,Se*ee,!1);return oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se-se)*ee,(ue-se)*z,(Se-ie)*ee,(ue-ie)*z,(Se-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,Se*ee,(ue+ie)*z,(Se-se)*ee,(ue+se)*z,(Se-ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee,(ue+ie)*z,(Se+se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue-se)*z,Se*ee,(ue-ie)*z,(Se+se)*ee,(ue-se)*z,(Se+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Move,(ue-se+.1)*z,Se*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se-.1)*z,Se*ee,ue*z,(Se-se)*ee,ue*z,(Se+se)*ee)),oe}),go.Shape.defineFigureGenerator("DCvoltageSource",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.75*ee,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),oe}),go.Shape.defineFigureGenerator("Diode",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*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,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.5,.75),oe}),go.Shape.defineFigureGenerator("Wifi",function(ce,z,ee){var oe=new go.Geometry,ie=z,se=ee;z=z*.38,ee=ee*.6;var ue=he*.8,Se=.8,we=0,Pe=.5,Ae=(ie-z)/2,De=(se-ee)/2,ze=new go.PathFigure(we*z+Ae,(Pe+Se)*ee+De,!0);oe.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,(we-Se)*z+Ae,Pe*ee+De,(we-ue)*z+Ae,(Pe+Se)*ee+De,(we-Se)*z+Ae,(Pe+ue)*ee+De)),ze.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(Pe-Se)*ee+De,(we-Se)*z+Ae,(Pe-ue)*ee+De,(we-ue)*z+Ae,(Pe-Se)*ee+De)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(we-Se+ue*.5)*z+Ae,Pe*ee+De,we*z+Ae,(Pe-Se)*ee+De,(we-Se+ue*.5)*z+Ae,(Pe-ue)*ee+De)),ze.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(Pe+Se)*ee+De,(we-Se+ue*.5)*z+Ae,(Pe+ue)*ee+De,we*z+Ae,(Pe+Se)*ee+De).close()),ue=he*.4,Se=.4,we=.2,Pe=.5;var Ze=new go.PathFigure(we*z+Ae,(Pe+Se)*ee+De,!0);oe.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(we-Se)*z+Ae,Pe*ee+De,(we-ue)*z+Ae,(Pe+Se)*ee+De,(we-Se)*z+Ae,(Pe+ue)*ee+De)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(Pe-Se)*ee+De,(we-Se)*z+Ae,(Pe-ue)*ee+De,(we-ue)*z+Ae,(Pe-Se)*ee+De)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(we-Se+ue*.5)*z+Ae,Pe*ee+De,we*z+Ae,(Pe-Se)*ee+De,(we-Se+ue*.5)*z+Ae,(Pe-ue)*ee+De)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(Pe+Se)*ee+De,(we-Se+ue*.5)*z+Ae,(Pe+ue)*ee+De,we*z+Ae,(Pe+Se)*ee+De).close()),ue=he*.2,Se=.2,we=.5,Pe=.5;var Xe=new go.PathFigure((we-Se)*z+Ae,Pe*ee+De,!0);oe.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(Pe-Se)*ee+De,(we-Se)*z+Ae,(Pe-ue)*ee+De,(we-ue)*z+Ae,(Pe-Se)*ee+De)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(we+Se)*z+Ae,Pe*ee+De,(we+ue)*z+Ae,(Pe-Se)*ee+De,(we+Se)*z+Ae,(Pe-ue)*ee+De)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(Pe+Se)*ee+De,(we+Se)*z+Ae,(Pe+ue)*ee+De,(we+ue)*z+Ae,(Pe+Se)*ee+De)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(we-Se)*z+Ae,Pe*ee+De,(we-ue)*z+Ae,(Pe+Se)*ee+De,(we-Se)*z+Ae,(Pe+ue)*ee+De)),ue=he*.4,Se=.4,we=.8,Pe=.5;var Ge=new go.PathFigure(we*z+Ae,(Pe-Se)*ee+De,!0);oe.add(Ge),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(we+Se)*z+Ae,Pe*ee+De,(we+ue)*z+Ae,(Pe-Se)*ee+De,(we+Se)*z+Ae,(Pe-ue)*ee+De)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(Pe+Se)*ee+De,(we+Se)*z+Ae,(Pe+ue)*ee+De,(we+ue)*z+Ae,(Pe+Se)*ee+De)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(we+Se-ue*.5)*z+Ae,Pe*ee+De,we*z+Ae,(Pe+Se)*ee+De,(we+Se-ue*.5)*z+Ae,(Pe+ue)*ee+De)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(Pe-Se)*ee+De,(we+Se-ue*.5)*z+Ae,(Pe-ue)*ee+De,we*z+Ae,(Pe-Se)*ee+De).close()),ue=he*.8,Se=.8,we=1,Pe=.5;var ft=new go.PathFigure(we*z+Ae,(Pe-Se)*ee+De,!0);return oe.add(ft),ft.add(new go.PathSegment(go.PathSegment.Bezier,(we+Se)*z+Ae,Pe*ee+De,(we+ue)*z+Ae,(Pe-Se)*ee+De,(we+Se)*z+Ae,(Pe-ue)*ee+De)),ft.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(Pe+Se)*ee+De,(we+Se)*z+Ae,(Pe+ue)*ee+De,(we+ue)*z+Ae,(Pe+Se)*ee+De)),ft.add(new go.PathSegment(go.PathSegment.Bezier,(we+Se-ue*.5)*z+Ae,Pe*ee+De,we*z+Ae,(Pe+Se)*ee+De,(we+Se-ue*.5)*z+Ae,(Pe+ue)*ee+De)),ft.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(Pe-Se)*ee+De,(we+Se-ue*.5)*z+Ae,(Pe-ue)*ee+De,we*z+Ae,(Pe-Se)*ee+De).close()),oe}),go.Shape.defineFigureGenerator("Email",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var se=new go.PathFigure(0,0,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.add(new go.PathSegment(go.PathSegment.Move,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*z,.54*ee)),se.add(new go.PathSegment(go.PathSegment.Move,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.55*z,.54*ee)),oe}),go.Shape.defineFigureGenerator("Ethernet",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.35*z,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,0).close());var se=new go.PathFigure(.1*z,ee,!0,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*z,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*z,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*z,ee).close());var ue=new go.PathFigure(.6*z,ee,!0,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,.6*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.6*z,.6*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.6*z,ee).close());var Se=new go.PathFigure(0,.5*ee,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),Se.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*ee)),Se.add(new go.PathSegment(go.PathSegment.Move,.75*z,.5*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.75*z,.6*ee)),Se.add(new go.PathSegment(go.PathSegment.Move,.25*z,.5*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.25*z,.6*ee)),oe}),go.Shape.defineFigureGenerator("Power",function(ce,z,ee){var oe=new go.Geometry,ie=he*.4,se=.4,ue=.5,Se=.5,we=Me(),Pe=Me(),Ae=Me(),De=Me();ke(ue,Se-se,ue+ie,Se-se,ue+se,Se-ie,ue+se,Se,.5,we,we,Pe,Ae,De);var ze=Ee(Pe.x,Pe.y),Ze=new go.PathFigure(Pe.x*z,Pe.y*ee,!0);oe.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,Se*ee,Ae.x*z,Ae.y*ee,De.x*z,De.y*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee,(ue+ie)*z,(Se+se)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ue-se)*z,Se*ee,(ue-ie)*z,(Se+se)*ee,(ue-se)*z,(Se+ie)*ee)),ke(ue-se,Se,ue-se,Se-ie,ue-ie,Se-se,ue,Se-se,.5,Ae,De,Pe,we,we),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Pe.x*z,Pe.y*ee,Ae.x*z,Ae.y*ee,De.x*z,De.y*ee)),ie=he*.3,se=.3,ke(ue-se,Se,ue-se,Se-ie,ue-ie,Se-se,ue,Se-se,.5,Ae,De,Pe,we,we),Ze.add(new go.PathSegment(go.PathSegment.Line,Pe.x*z,Pe.y*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ue-se)*z,Se*ee,De.x*z,De.y*ee,Ae.x*z,Ae.y*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+se)*ee,(ue-se)*z,(Se+ie)*ee,(ue-ie)*z,(Se+se)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,Se*ee,(ue+ie)*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee)),ke(ue,Se-se,ue+ie,Se-se,ue+se,Se-ie,ue+se,Se,.5,we,we,Pe,Ae,De),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Pe.x*z,Pe.y*ee,De.x*z,De.y*ee,Ae.x*z,Ae.y*ee).close());var Ze=new go.PathFigure(.45*z,0,!0);return oe.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,.55*z,.5*ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,.55*z,0).close()),me(we),me(Pe),me(Ae),me(De),me(ze),oe.spot1=new go.Spot(.25,.45),oe.spot2=new go.Spot(.75,.8),oe}),go.Shape.defineFigureGenerator("Fallout",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee/2,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,180,360,z/2,ee/2,z/2,ee/2));function se(ue,Se,we){ue.add(new go.PathSegment(go.PathSegment.Move,(.3+Se)*z,(.8+we)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.5+Se)*z,(.5+we)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.1+Se)*z,(.5+we)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.3+Se)*z,(.8+we)*ee).close())}return se(ie,0,0),se(ie,.4,0),se(ie,.2,-.3),oe}),go.Shape.defineFigureGenerator("IrritationHazard",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.2*z,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.3*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close()),oe.spot1=new go.Spot(.3,.3),oe.spot2=new go.Spot(.7,.7),oe}),go.Shape.defineFigureGenerator("ElectricalHazard",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.37*z,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.11*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.77*z,.04*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,.49*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.37*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.63*z,.86*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.77*z,.91*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.34*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.34*z,.78*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.44*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,.56*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee).close()),oe}),go.Shape.defineFigureGenerator("FireHazard",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.1*z,ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.29*z,0,-.25*z,.63*ee,.45*z,.44*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.51*z,.42*ee,.48*z,.17*ee,.54*z,.35*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.59*z,.18*ee,.59*z,.29*ee,.58*z,.28*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,.6*ee,.8*z,.34*ee,.88*z,.43*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.88*z,.31*ee,.87*z,.48*ee,.88*z,.43*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,ee,1.17*z,.76*ee,.82*z,.8*ee).close()),oe.spot1=new go.Spot(.07,.445),oe.spot2=new go.Spot(.884,.958),oe}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(ce,z,ee){var oe=new go.Geometry,ie=.5,se=0,ue=0,Se=ie*he,we=.4*Math.SQRT2/2+.5,Pe=.5-.5*Math.SQRT2/2,Ae=1,De=.5,ze=.5,Ze=0,Xe=new go.PathFigure(we*z,(1-Pe)*ee,!1);return oe.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,De*ee,Ae*z,.7*ee,Ae*z,De*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(ze+se)*z,(Ze+se)*ee,(.5+ie+se)*z,(.5-Se+se)*ee,(.5+Se+se)*z,(.5-ie+se)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+se)*z,(.5+ue)*ee,(.5-Se+se)*z,(.5-ie+ue)*ee,(.5-ie+se)*z,(.5-Se+ue)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(.35+se)*z,.9*ee,(.5-ie+se)*z,(.5+Se+ue)*ee,(.5-Se+se)*z,.9*ee)),Xe.add(new go.PathSegment(go.PathSegment.Move,(.25+se)*z,.8*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,(.35+se)*z,.9*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,(.2+se)*z,.95*ee)),oe}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),oe}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),oe}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);oe.add(ie);var se=new go.PathFigure(z,ee,!1);oe.add(se);var ue=new go.PathFigure(0,.5*ee,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*ee,.2*z,.35*ee,.3*z,.35*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,.7*z,.65*ee,.8*z,.65*ee)),oe}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee).close()),oe}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.2*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee).close());var ie=new go.PathFigure(0,.2*ee,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),oe}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.7*z,ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,0,.6*z,.5*ee,0,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,ee,.4*z,.5*ee,z,.5*ee).close());var se=new go.PathFigure(.45*z,.73*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.7*z,.73*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.38*z,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.63*z,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.31*z,.27*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.56*z,.27*ee)),oe}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);oe.add(ie);var se=new go.PathFigure(.335*z,(1-.555)*ee,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.335*z,(1-.405)*ee)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.405)*ee)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.555)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,z,.68*ee,(1-.12)*z,.46*ee,(1-.02)*z,.54*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.335*z,(1-.555)*ee,.02*z,.54*ee,.12*z,.46*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.365*z,(1-.595)*ee));var ue=.5-.285,Se=.5,we=ue,Pe=Math.PI/4,Ae=4*(1-Math.cos(Pe))/(3*Math.sin(Pe)),De=Ae*.5,ze=ue,Ze=ue,Xe=Ae*ze,Ge=Ae*Ze;se.add(new go.PathSegment(go.PathSegment.Bezier,(Se-ze)*z,we*ee,(Se-(Xe+ze)/2)*z,(we+(Ze+Ge)/2)*ee,(Se-ze)*z,(we+Ge)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,Se*z,(we-Ze)*ee,(Se-ze)*z,(we-Ge)*ee,(Se-Xe)*z,(we-Ze)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(Se+ze)*z,we*ee,(Se+Xe)*z,(we-Ze)*ee,(Se+ze)*z,(we-Ge)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*z,(1-.595)*ee,(Se+ze)*z,(we+Ge)*ee,(Se+(Xe+ze)/2)*z,(we+(Ze+Ge)/2)*ee)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*z,(1-.595)*ee)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.555)*ee)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.405)*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.335*z,(1-.405)*ee));var ft=new go.PathFigure(.2*z,ee,!1);oe.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.2*z,.8*ee));var at=new go.PathFigure(.8*z,ee,!1);return oe.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.8*z,.8*ee)),oe}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.1*z,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,ee).close());var se=new go.PathFigure(.2*z,.2*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*z,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*z,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.8*ee)),oe}),go.Shape.defineFigureGenerator("BpmnEventError",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,.5*ee).close()),oe}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);oe.add(ie);var se=new go.PathFigure(z,ee,!1);oe.add(se);var ue=new go.PathFigure(.1*z,ee,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee).close()),oe}),go.Shape.defineFigureGenerator("Caution",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.05*z,ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,.8*ee,0,ee,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.1*ee,.5*z,0,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.95*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,ee,z,ee,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*z,ee));var se=.05;return ie.add(new go.PathSegment(go.PathSegment.Move,(.5-se)*z,.875*ee)),ie.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*z,.875*ee,se*z,se*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.325*ee,.575*z,.725*ee,.625*z,.375*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.75*ee,.375*z,.375*ee,.425*z,.725*ee)),oe}),go.Shape.defineFigureGenerator("Recycle",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.45*z,.95*ee,!1);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.95*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.185*z,.85*ee,.17*z,.95*ee,.15*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.235*z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.625*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.275*z,.45*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*z,.45*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*z,.575*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1875*z,.95*ee,0,.675*ee,0,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.45*z,.95*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.775*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.22*z,.775*ee));var se=new go.PathFigure(.475*z,.2*ee,!1);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.4*z,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.225*z,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.275*z,.175*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.325*z,.05*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.05*ee,.35*z,0,.375*z,0)),se.add(new go.PathSegment(go.PathSegment.Line,.575*z,.375*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.525*z,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*z,.475*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*z,.315*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.32*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*z,.05*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.575*z,0,.65*z,.05*ee,.625*z,0)),se.add(new go.PathSegment(go.PathSegment.Line,.38*z,.0105*ee));var ue=new go.PathFigure(.675*z,.575*ee,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.875*z,.525*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.85*z,.95*ee,z,.8*ee,z,.85*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,.95*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.85*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,.725*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.7*z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Move,.675*z,.575*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.775*z,.775*ee)),oe}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(ce,z,ee){var oe=new go.Geometry,ie=.5,se=he*.5,ue=new go.PathFigure(z,ie*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,ie*z,ee,z,(ie+se)*ee,(ie+se)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ie*ee,(ie-se)*z,ee,0,(ie+se)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ie*z,0,0,(ie-se)*ee,(ie-se)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,ie*ee,(ie+se)*z,0,z,(ie-se)*ee));var Se=new go.PathFigure(ie*z,0,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,ie*z,.15*ee)),Se.add(new go.PathSegment(go.PathSegment.Move,ie*z,ee)),Se.add(new go.PathSegment(go.PathSegment.Line,ie*z,.85*ee)),Se.add(new go.PathSegment(go.PathSegment.Move,0,ie*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.15*z,ie*ee)),Se.add(new go.PathSegment(go.PathSegment.Move,z,ie*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.85*z,ie*ee)),Se.add(new go.PathSegment(go.PathSegment.Move,ie*z,ie*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.58*z,.1*ee)),Se.add(new go.PathSegment(go.PathSegment.Move,ie*z,ie*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.78*z,.54*ee)),oe}),go.Shape.defineFigureGenerator("Package",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.15*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var se=new go.PathFigure(0,.15*ee,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),se.add(new go.PathSegment(go.PathSegment.Line,.65*z,.15*ee).close()),oe.spot1=new go.Spot(0,.1),oe.spot2=new go.Spot(1,1),oe}),go.Shape.defineFigureGenerator("Class",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var se=new go.PathFigure(0,.2*ee,!1);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee).close());var ue=new go.PathFigure(0,.5*ee,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee).close()),oe}),go.Shape.defineFigureGenerator("Component",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z,ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee).close());var se=new go.PathFigure(0,.2*ee,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.45*z,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*z,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close());var ue=new go.PathFigure(0,.6*ee,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.45*z,.6*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.45*z,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee).close()),oe}),go.Shape.defineFigureGenerator("Boat Shipment",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.15*z,.6*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*ee));var se=new go.PathFigure(.15*z,.6*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*ee)),oe}),go.Shape.defineFigureGenerator("Customer/Supplier",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z,ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee).close()),oe}),go.Shape.defineFigureGenerator("Workcell",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe}),go.Shape.defineFigureGenerator("Supermarket",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,z,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.66*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.66*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,z,.66*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),oe}),go.Shape.defineFigureGenerator("TruckShipment",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var se=new go.PathFigure(z,.8*ee,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*z,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*z,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee).close());var ue=.1,Se=he*.1,we=.2,Pe=.9,Ae=new go.PathFigure((we-ue)*z,Pe*ee,!0);oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Pe-ue)*ee,(we-ue)*z,(Pe-Se)*ee,(we-Se)*z,(Pe-ue)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(we+ue)*z,Pe*ee,(we+Se)*z,(Pe-ue)*ee,(we+ue)*z,(Pe-Se)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Pe+ue)*ee,(we+ue)*z,(Pe+Se)*ee,(we+Se)*z,(Pe+ue)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(we-ue)*z,Pe*ee,(we-Se)*z,(Pe+ue)*ee,(we-ue)*z,(Pe+Se)*ee).close()),ue=.1,Se=he*.1,we=.8,Pe=.9;var De=new go.PathFigure((we-ue)*z,Pe*ee,!0);return oe.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Pe-ue)*ee,(we-ue)*z,(Pe-Se)*ee,(we-Se)*z,(Pe-ue)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,(we+ue)*z,Pe*ee,(we+Se)*z,(Pe-ue)*ee,(we+ue)*z,(Pe-Se)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Pe+ue)*ee,(we+ue)*z,(Pe+Se)*ee,(we+Se)*z,(Pe+ue)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,(we-ue)*z,Pe*ee,(we-Se)*z,(Pe+ue)*ee,(we-ue)*z,(Pe+Se)*ee).close()),oe}),go.Shape.defineFigureGenerator("KanbanPost",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.2*z,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),oe}),go.Shape.defineFigureGenerator("Forklift",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0));var se=new go.PathFigure(0,.5*ee,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var ue=new go.PathFigure(.5*z,.8*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,.8*ee));var Se=new go.PathFigure(.5*z,.7*ee,!1);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee));var we=.1,Pe=he*.1,Ae=.1,De=.9,ze=new go.PathFigure((Ae-we)*z,De*ee,!0);oe.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(De-we)*ee,(Ae-we)*z,(De-Pe)*ee,(Ae-Pe)*z,(De-we)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+we)*z,De*ee,(Ae+Pe)*z,(De-we)*ee,(Ae+we)*z,(De-Pe)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(De+we)*ee,(Ae+we)*z,(De+Pe)*ee,(Ae+Pe)*z,(De+we)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ae-we)*z,De*ee,(Ae-Pe)*z,(De+we)*ee,(Ae-we)*z,(De+Pe)*ee)),we=.1,Pe=he*.1,Ae=.4,De=.9;var Ze=new go.PathFigure((Ae-we)*z,De*ee,!0);return oe.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(De-we)*ee,(Ae-we)*z,(De-Pe)*ee,(Ae-Pe)*z,(De-we)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+we)*z,De*ee,(Ae+Pe)*z,(De-we)*ee,(Ae+we)*z,(De-Pe)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(De+we)*ee,(Ae+we)*z,(De+Pe)*ee,(Ae+Pe)*z,(De+we)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ae-we)*z,De*ee,(Ae-Pe)*z,(De+we)*ee,(Ae-we)*z,(De+Pe)*ee)),oe}),go.Shape.defineFigureGenerator("RailShipment",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.1*z,.4*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.4*ee).close());var se=new go.PathFigure(.45*z,.7*ee,!1);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*ee));var ue=new go.PathFigure(.55*z,.4*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.4*ee).close());var Ae=.05,De=he*.05,ze=.175,Ze=.95,Se=new go.PathFigure((ze-Ae)*z,Ze*ee,!0);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,ze*z,(Ze-Ae)*ee,(ze-Ae)*z,(Ze-De)*ee,(ze-De)*z,(Ze-Ae)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(ze+Ae)*z,Ze*ee,(ze+De)*z,(Ze-Ae)*ee,(ze+Ae)*z,(Ze-De)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,ze*z,(Ze+Ae)*ee,(ze+Ae)*z,(Ze+De)*ee,(ze+De)*z,(Ze+Ae)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(ze-Ae)*z,Ze*ee,(ze-De)*z,(Ze+Ae)*ee,(ze-Ae)*z,(Ze+De)*ee));var Ae=.05,De=he*.05,ze=.375,Ze=.95,we=new go.PathFigure((ze-Ae)*z,Ze*ee,!0);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,ze*z,(Ze-Ae)*ee,(ze-Ae)*z,(Ze-De)*ee,(ze-De)*z,(Ze-Ae)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ze+Ae)*z,Ze*ee,(ze+De)*z,(Ze-Ae)*ee,(ze+Ae)*z,(Ze-De)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ze*z,(Ze+Ae)*ee,(ze+Ae)*z,(Ze+De)*ee,(ze+De)*z,(Ze+Ae)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ze-Ae)*z,Ze*ee,(ze-De)*z,(Ze+Ae)*ee,(ze-Ae)*z,(Ze+De)*ee));var Ae=.05,De=he*.05,ze=.625,Ze=.95,Pe=new go.PathFigure((ze-Ae)*z,Ze*ee,!0);oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ze*z,(Ze-Ae)*ee,(ze-Ae)*z,(Ze-De)*ee,(ze-De)*z,(Ze-Ae)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ze+Ae)*z,Ze*ee,(ze+De)*z,(Ze-Ae)*ee,(ze+Ae)*z,(Ze-De)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ze*z,(Ze+Ae)*ee,(ze+Ae)*z,(Ze+De)*ee,(ze+De)*z,(Ze+Ae)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ze-Ae)*z,Ze*ee,(ze-De)*z,(Ze+Ae)*ee,(ze-Ae)*z,(Ze+De)*ee));var Ae=.05,De=he*.05,ze=.825,Ze=.95,Xe=new go.PathFigure((ze-Ae)*z,Ze*ee,!0);oe.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Bezier,ze*z,(Ze-Ae)*ee,(ze-Ae)*z,(Ze-De)*ee,(ze-De)*z,(Ze-Ae)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(ze+Ae)*z,Ze*ee,(ze+De)*z,(Ze-Ae)*ee,(ze+Ae)*z,(Ze-De)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,ze*z,(Ze+Ae)*ee,(ze+Ae)*z,(Ze+De)*ee,(ze+De)*z,(Ze+Ae)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(ze-Ae)*z,Ze*ee,(ze-De)*z,(Ze+Ae)*ee,(ze-Ae)*z,(Ze+De)*ee).close());var Ge=new go.PathFigure(0,ee,!1);return oe.add(Ge),Ge.add(new go.PathSegment(go.PathSegment.Line,z,ee).close()),oe}),go.Shape.defineFigureGenerator("Warehouse",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var se=new go.PathFigure(0,.2*ee,!1);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee).close());var ue=new go.PathFigure(.15*z,ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.15*z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.4*z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.15*z,ee).close());var Se=.05,we=he*.05,Pe=.35,Ae=.775,De=new go.PathFigure((Pe-Se)*z,Ae*ee,!0);return oe.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(Ae-Se)*ee,(Pe-Se)*z,(Ae-we)*ee,(Pe-we)*z,(Ae-Se)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+Se)*z,Ae*ee,(Pe+we)*z,(Ae-Se)*ee,(Pe+Se)*z,(Ae-we)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(Ae+Se)*ee,(Pe+Se)*z,(Ae+we)*ee,(Pe+we)*z,(Ae+Se)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-Se)*z,Ae*ee,(Pe-we)*z,(Ae+Se)*ee,(Pe-Se)*z,(Ae+we)*ee).close()),oe}),go.Shape.defineFigureGenerator("ControlCenter",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.1*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee).close()),oe}),go.Shape.defineFigureGenerator("Bluetooth",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.75*ee,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),oe}),go.Shape.defineFigureGenerator("Bookmark",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*ee)),oe}),go.Shape.defineFigureGenerator("Bookmark",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*ee)),oe}),go.Shape.defineFigureGenerator("Globe",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,.75*z,0,z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,.75*ee,.75*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.25*z,ee,0,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,.25*ee,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,.15*z,.25*ee,.15*z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.85*z,.75*ee,.85*z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.1675*z,.15*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8325*z,.15*ee,.35*z,.3*ee,.65*z,.3*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.1675*z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8325*z,.85*ee,.35*z,.7*ee,.65*z,.7*ee)),oe}),go.Shape.defineFigureGenerator("Wave",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.25*ee,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.25*ee,.1*z,0,.2*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,.25*ee,.425*z,.5*ee,.575*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.25*ee,.8*z,0,.9*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.75*ee,.1*z,.5*ee,.2*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,.75*ee,.425*z,ee,.575*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.75*ee,.8*z,.5*ee,.9*z,.5*ee)),oe}),go.Shape.defineFigureGenerator("Operator",function(ce,z,ee){var oe=new go.Geometry,ie=.3,se=he*.3,ue=.5,Se=.7,we=new go.PathFigure((ue-ie)*z,Se*ee,!0);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se-ie)*ee,(ue-ie)*z,(Se-se)*ee,(ue-se)*z,(Se-ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,Se*ee,(ue+se)*z,(Se-ie)*ee,(ue+ie)*z,(Se-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+ie)*ee,(ue+ie)*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,Se*ee,(ue-se)*z,(Se+ie)*ee,(ue-ie)*z,(Se+se)*ee));var Pe=new go.PathFigure(0,.7*ee,!1);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,z,.7*ee,0,0,z,0)),oe}),go.Shape.defineFigureGenerator("TripleFanBlades",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*ee,.65*z,.3*ee,.65*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.35*z,.5*ee,.35*z,.3*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.3*z,.6*ee,.1*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*ee,.2*z,ee,.35*z,.95*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,ee,.7*z,.6*ee,.9*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*ee,.8*z,ee,.65*z,.95*ee)),oe}),go.Shape.defineFigureGenerator("CentrifugalPump",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,0,.075*ee,0,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,ee,0,ee,.4*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.4*ee,.8*z,ee,.85*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),oe}),go.Shape.defineFigureGenerator("Battery",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.4*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.1*ee));var se=new go.PathFigure(0,.6*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Move,0,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,.4*ee)),oe}),go.Shape.defineFigureGenerator("Delete",function(ce,z,ee){var oe=new go.Geometry,ie=.5,se=he*.5,ue=.5,Se=.5,we=new go.PathFigure((ue-ie)*z,Se*ee,!0);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se-ie)*ee,(ue-ie)*z,(Se-se)*ee,(ue-se)*z,(Se-ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,Se*ee,(ue+se)*z,(Se-ie)*ee,(ue+ie)*z,(Se-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+ie)*ee,(ue+ie)*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,Se*ee,(ue-se)*z,(Se+ie)*ee,(ue-ie)*z,(Se+se)*ee));var Pe=new go.PathFigure(.15*z,.5*ee,!1);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,.85*z,.5*ee)),oe}),go.Shape.defineFigureGenerator("Flag",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.1*ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.1*ee,.15*z,0,.35*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*ee,.65*z,.2*ee,.85*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*ee,.85*z,.6*ee,.65*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.35*z,.4*ee,.15*z,.4*ee).close()),oe}),go.Shape.defineFigureGenerator("Help",function(ce,z,ee){var oe=new go.Geometry,ie=.5,se=he*.5,ue=.5,Se=.5,we=new go.PathFigure((ue-ie)*z,Se*ee,!1);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se-ie)*ee,(ue-ie)*z,(Se-se)*ee,(ue-se)*z,(Se-ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,Se*ee,(ue+se)*z,(Se-ie)*ee,(ue+ie)*z,(Se-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+ie)*ee,(ue+ie)*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,Se*ee,(ue-se)*z,(Se+ie)*ee,(ue-ie)*z,(Se+se)*ee).close()),ie=.05,se=he*.05,ue=.5,Se=.8;var Pe=new go.PathFigure((ue-ie)*z,Se*ee,!1);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se-ie)*ee,(ue-ie)*z,(Se-se)*ee,(ue-se)*z,(Se-ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,Se*ee,(ue+se)*z,(Se-ie)*ee,(ue+ie)*z,(Se-se)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+ie)*ee,(ue+ie)*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,Se*ee,(ue-se)*z,(Se+ie)*ee,(ue-ie)*z,(Se+se)*ee).close()),Pe.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,.75*z,.475*ee,.75*z,.225*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.35*ee,.4*z,.2*ee,.3*z,.25*ee)),oe}),go.Shape.defineFigureGenerator("Location",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(.5*z,ee,!0).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.975*z,.025*ee,.5*z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*z,.5*ee,.5*z,0,.025*z,.025*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*z,.2*ee)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*z,.3*ee,.1*z,.1*ee).close()))}),go.Shape.defineFigureGenerator("Lock",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var se=new go.PathFigure(.2*z,.5*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Move,.2*z,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*z,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.3*ee,.25*z,0,.75*z,0)),se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.3*ee)),oe}),go.Shape.defineFigureGenerator("Unlocked",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var se=new go.PathFigure(.2*z,.5*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Move,.2*z,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*z,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.3*ee,.25*z,0,.75*z,0)),se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.35*ee)),oe}),go.Shape.defineFigureGenerator("Gear",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(.9375*z,.56246875*ee,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*z,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.80621875*z,.4375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.763*z,.3316875*ee,.79840625*z,.39915625*ee,.7834375*z,.3635*ee)).add(new go.PathSegment(go.PathSegment.Line,.8566875*z,.23796875*ee)).add(new go.PathSegment(go.PathSegment.Line,.76825*z,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.67596875*z,.24184375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*z,.19378125*ee,.64228125*z,.2188125*ee,.603875*z,.2021875*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*z,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*z,.19378125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*z,.239375*ee,.39759375*z,.20190625*ee,.36053125*z,.2176875*ee)).add(new go.PathSegment(go.PathSegment.Line,.2379375*z,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.14953125*z,.2379375*ee)).add(new go.PathSegment(go.PathSegment.Line,.23934375*z,.3278125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*z,.4375*ee,.21765625*z,.36059375*ee,.201875*z,.397625*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*z,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*z,.5625*ee)).add(new go.PathSegment(go.PathSegment.Line,.1938125*z,.5625*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*z,.67596875*ee,.20221875*z,.603875*ee,.21884375*z,.64228125*ee)).add(new go.PathSegment(go.PathSegment.Line,.1495625*z,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.238*z,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.3316875*z,.76296875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*z,.80621875*ee,.36353125*z,.78340625*ee,.3991875*z,.79840625*ee)).add(new go.PathSegment(go.PathSegment.Line,.43753125*z,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.80621875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*z,.760625*ee,.602375*z,.79809375*ee,.63946875*z,.78234375*ee)).add(new go.PathSegment(go.PathSegment.Line,.76828125*z,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.85671875*z,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.76065625*z,.67221875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*z,.56246875*ee,.78234375*z,.63940625*ee,.798125*z,.602375*ee)).add(new go.PathSegment(go.PathSegment.Line,.9375*z,.56246875*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*z,.6*ee)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*z,.5*ee,.1*z,.1*ee).close()))}),go.Shape.defineFigureGenerator("Hand",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,.3*ee,0,.375*ee,.05*z,.325*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.45*z,.075*ee,.3*z,.225*ee,.4*z,.175*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.525*z,.075*ee,.46*z,.05*ee,.525*z,.05*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.4*ee,.525*z,.275*ee,.475*z,.325*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.55*ee,z,.4*ee,z,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.425*z,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.6*z,.7*ee,.675*z,.55*ee,.675*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.575*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.575*z,.85*ee,.65*z,.7*ee,.65*z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.525*z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.535*z,ee,.61*z,.85*ee,.61*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,.435*z,ee,0,ee).close()),oe}),go.Shape.defineFigureGenerator("Map",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.2*ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ie.add(new go.PathSegment(go.PathSegment.Move,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.8*ee)),oe}),go.Shape.defineFigureGenerator("Eject",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee*.7)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*.7).close());var se=new go.PathFigure(0,ee*.6,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,0).close()),oe}),go.Shape.defineFigureGenerator("Pencil",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*ee).close()))}),go.Shape.defineFigureGenerator("Building",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*1,ee*1,!1);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*z,ee*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*z,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*z,ee*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,ee*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,ee*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee*.85).close());var se=new go.PathFigure(.126*z,.85*ee,!1);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.126*z,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.322*z,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.322*z,.85*ee).close());var ue=new go.PathFigure(.402*z,.85*ee,!1);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.402*z,.45*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.598*z,.45*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.598*z,.85*ee).close());var Se=new go.PathFigure(.678*z,.85*ee,!1);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,.678*z,.45*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.874*z,.45*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.874*z,.85*ee).close());var we=new go.PathFigure(.5*z,.1*ee,!1);return oe.add(we),we.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*z,.3*ee)),we.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*z,.3*ee).close()),oe}),go.Shape.defineFigureGenerator("Staircase",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee*1,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*.8)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.8)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.6)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.6)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.4)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*.4)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*.2)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.2)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.15)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.15)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*.95).close()),oe}),go.Shape.defineFigureGenerator("5Bars",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee*1,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.184,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.184,ee*(1-.184)).close());var se=new go.PathFigure(z*.204,ee,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z*.204,ee*(1-.184))),se.add(new go.PathSegment(go.PathSegment.Line,z*.388,ee*(1-.184*2))),se.add(new go.PathSegment(go.PathSegment.Line,z*.388,ee*1).close());var ue=new go.PathFigure(z*.408,ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.408,ee*(1-.184*2))),ue.add(new go.PathSegment(go.PathSegment.Line,z*.592,ee*(1-.184*3))),ue.add(new go.PathSegment(go.PathSegment.Line,z*.592,ee*1).close());var Se=new go.PathFigure(z*.612,ee,!0);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,z*.612,ee*(1-.184*3))),Se.add(new go.PathSegment(go.PathSegment.Line,z*.796,ee*(1-.184*4))),Se.add(new go.PathSegment(go.PathSegment.Line,z*.796,ee*1).close());var we=new go.PathFigure(z*.816,ee,!0);return oe.add(we),we.add(new go.PathSegment(go.PathSegment.Line,z*.816,ee*(1-.184*4))),we.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-.184*5))),we.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1).close()),oe}),go.Shape.defineFigureGenerator("PC",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,0).close());var se=new go.PathFigure(z*.055,.07*ee,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.07)),se.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.1)),se.add(new go.PathSegment(go.PathSegment.Line,z*.055,ee*.1).close());var ue=new go.PathFigure(z*.055,.13*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.13)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.16)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.055,ee*.16).close());var Se=new go.PathFigure(z*.055,.18*ee,!0);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.18)),Se.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.21)),Se.add(new go.PathSegment(go.PathSegment.Line,z*.055,ee*.21).close());var we=new go.PathFigure(z*1,0,!0);return oe.add(we),we.add(new go.PathSegment(go.PathSegment.Line,z*.4,0)),we.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.65)),we.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.65).close()),oe}),go.Shape.defineFigureGenerator("Plane",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.55*z,ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.475*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.35*z,.525*ee,0,.4*ee,.225*z,.45*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.475*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,.35*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.325*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.325*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.2*ee,.975*z,0,z,.08*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.45*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.95*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.55*z,ee).close()),oe}),go.Shape.defineFigureGenerator("Key",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*1,ee*.5,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.9,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.35*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,.35*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.35*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.7,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.85,.575*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.9,.6*ee).close()),ie.add(new go.PathSegment(go.PathSegment.Move,.17*z,.425*ee)),ie.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*z,.5*ee,.075*z,.075*ee).close()),oe}),go.Shape.defineFigureGenerator("FilmTape",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,z*0,z*.3,z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.08,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.08,ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*1),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*1),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*2),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*2),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*3),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*3),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*4),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*4),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*5),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*5),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*6),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*6),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*7),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*7),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*8),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*8),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*9),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*9),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*10),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*10),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*11),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*11),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*12),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*12),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*13),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*13),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*14),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*14),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*15),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*15),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1));var se=new go.PathFigure(0,0,!1);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*0)),se.add(new go.PathSegment(go.PathSegment.Arc,270,-180,z*1,z*.3,z*.055)),se.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1));var ue=new go.PathFigure(z*.11,ee*.1,!1);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),ee*.1)),ue.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),ee*.8)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.11,ee*.8).close());var Se=new go.PathFigure(z*(.11+.24133333*1+.028*1),ee*.1,!1);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),ee*.1)),Se.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),ee*.8)),Se.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*1),ee*.8).close());var we=new go.PathFigure(z*(.11+.24133333*2+.028*2),ee*.1,!1);return oe.add(we),we.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),ee*.1)),we.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),ee*.8)),we.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*2),ee*.8).close()),oe}),go.Shape.defineFigureGenerator("FloppyDisk",function(ce,z,ee){var oe=new go.Geometry,ie=8,se=ie*he,ue=new go.PathFigure(ie,0,!1);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.86,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.14)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-ie)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-ie,ee,z,ee-se,z-se,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,ie,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ie,se,ee,0,ee-se)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ie)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ie,0,0,se,se,0).close());var Se=new go.PathFigure(z*.83,0,!1);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,z*.83,ee*.3)),Se.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*.3)),Se.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*0).close());var we=new go.PathFigure(z*.83,ee*1,!1);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Line,z*.83,ee*.5)),we.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*.5)),we.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*1).close());var Pe=new go.PathFigure(z*.78,ee*.05,!1);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.05)),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.25)),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.78,ee*.25).close()),oe}),go.Shape.defineFigureGenerator("SpeechBubble",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=15),oe=Math.min(oe,z/3),oe=Math.min(oe,ee/3);var ie=oe*he,se=ee*.8,ue=new go.Geometry,Se=new go.PathFigure(oe,0,!0);return ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,z-oe,0)),Se.add(new go.PathSegment(go.PathSegment.Bezier,z,oe,z-ie,0,z,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,z,se-oe)),Se.add(new go.PathSegment(go.PathSegment.Bezier,z-oe,se,z,se-ie,z-ie,se)),Se.add(new go.PathSegment(go.PathSegment.Line,z*.7,se)),Se.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee)),Se.add(new go.PathSegment(go.PathSegment.Line,z*.55,se)),Se.add(new go.PathSegment(go.PathSegment.Line,oe,se)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,se-oe,ie,se,0,se-ie)),Se.add(new go.PathSegment(go.PathSegment.Line,0,oe)),Se.add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,ie,ie,0).close()),ie>1?(ue.spot1=new go.Spot(0,0,ie,ie),ue.spot2=new go.Spot(1,.8,-ie,-ie)):(ue.spot1=go.Spot.TopLeft,ue.spot2=new go.Spot(1,.8)),ue}),go.Shape.defineFigureGenerator("Repeat",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*0,ee*.45,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*.45).close());var se=new go.PathFigure(z*1,ee*.55,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*.1)),se.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.1)),se.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*.55).close()),oe}),go.Shape.defineFigureGenerator("Windows",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()).add(new go.PathSegment(go.PathSegment.Move,.4*z,.4*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*z,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.2*z,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,.2*z,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.1*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.1*z,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.1*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee).close()))}),go.Shape.defineFigureGenerator("Terminal",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*0,ee*.1,!1);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*.9).close());var se=new go.PathFigure(z*.1,ee*.2,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z*.1,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,z*.22,ee*.285)),se.add(new go.PathSegment(go.PathSegment.Line,z*.1,ee*.32)),se.add(new go.PathSegment(go.PathSegment.Line,z*.1,ee*.37)),se.add(new go.PathSegment(go.PathSegment.Line,z*.275,ee*.32)),se.add(new go.PathSegment(go.PathSegment.Line,z*.275,ee*.25).close());var ue=new go.PathFigure(z*.28,ee*.37,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.37)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.41)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.28,ee*.41).close()),oe}),go.Shape.defineFigureGenerator("Beaker",function(ce,z,ee){var oe=new go.Geometry,ie=15,se=ie*he,ue=new go.PathFigure(z*.62,ee*.475,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-ie)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-ie,ee,z,ee-se,z-se,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,ie,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ie,se,ee,0,ee-se)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.38,ee*.475)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.38,ee*.03)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*0)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*0)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.62,ee*.03).close()),se>1?(oe.spot1=new go.Spot(0,0,se,se),oe.spot2=new go.Spot(1,1,-se,-se)):(oe.spot1=go.Spot.TopLeft,oe.spot2=go.Spot.BottomRight),oe}),go.Shape.defineFigureGenerator("Download",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*0,ee*1,!0);oe.add(ie);var se=.1/.3;ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.755,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.93,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.61,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.39,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.07,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*(1-se)).close());var ue=new go.PathFigure(z*.4,ee*0,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.26,ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.66)),ue.add(new go.PathSegment(go.PathSegment.Line,z*(1-.26),ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*0).close()),oe}),go.Shape.defineFigureGenerator("Bin",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*0,ee*1,!0);oe.add(ie);var se=.1/.3;return ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.755,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.93,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.61,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.39,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.07,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*(1-se)).close()),oe}),go.Shape.defineFigureGenerator("Upload",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*0,ee*1,!0);oe.add(ie);var se=.1/.3;ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.755,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.93,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.61,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.39,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.07,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*(1-se)).close());var ue=new go.PathFigure(z*.5,ee*0,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.26,ee*.25)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.25)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.63)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.63)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.25)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.74,ee*.25).close()),oe}),go.Shape.defineFigureGenerator("EmptyDrink",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*.15,ee*0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.85,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*1).close()),oe}),go.Shape.defineFigureGenerator("Drink",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*.15,ee*0,!1);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.85,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*1).close());var se=new go.PathFigure(z*.235,ee*.28,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z*.765,ee*.28)),se.add(new go.PathSegment(go.PathSegment.Line,z*.655,ee*.97)),se.add(new go.PathSegment(go.PathSegment.Line,z*.345,ee*.97).close()),oe}),go.Shape.defineFigureGenerator("4Arrows",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*.5,ee*0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,ee*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.5)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.65)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.65)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*.5)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.25).close()),oe}),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 _n={},qt="5.0",Ee={},Me=null,me=!1,Be=!1,ke=null,Ce=!1,Le=null,he=null,ye=0;ye<arguments.length;ye++){var xe=arguments[ye];if(xe!==null)switch(typeof xe){case"number":qt=xe.toFixed(1);break;case"string":xe.match(new RegExp("^[0-9]\\.[0-9]+$"))?qt=xe:ke=xe;break;case"object":typeof xe.is3D!="undefined"?Me=xe:Ee=xe;break;case"boolean":me=xe,Be=!0;break}}Me===null&&(Me={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},Ee.material_id!==void 0&&!Be&&(me=!0)),ke!==null&&Ee.id===void 0&&(Ee.id=ke);var ge="",le="",ve=!1,de=null,ce=null,z=null,ee=!1,oe=null,ie=null,se=null,ue=null,Se=null;Ee.height!==void 0&&(Ee.height=Math.round(Ee.height)),Ee.width!==void 0&&(Ee.width=Math.round(Ee.width));var we=function(gt){return parseFloat(gt)>4?parseFloat(gt):5};_n.setHTML5Codebase=function(gt,Ft){he=gt,ut(gt,Ft)},_n.setJavaCodebase=_n.setJavaCodebaseVersion=_n.isCompiledInstalled=_n.setPreCompiledScriptPath=_n.setPreCompiledResourcePath=function(){},_n.setHTML5CodebaseVersion=function(gt,Ft){var Ht=parseFloat(gt);if(Ht!==NaN&&Ht<5){console.log("The GeoGebra HTML5 codebase version "+Ht+" is deprecated. Using version latest instead.");return}Le=gt,tt(gt,Ft)},_n.getHTML5CodebaseVersion=function(){return ce},_n.getParameters=function(){return Ee},_n.setFontsCSSURL=function(gt){ue=gt},_n.setGiacJSURL=function(gt){},_n.setJNLPFile=function(gt){ge=gt},_n.setJNLPBaseDir=function(gt){},_n.inject=function(){function gt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Ft="auto",Ht=Ee.id,hn,Jt=!1,bn=0;bn<arguments.length;bn++){var Wt=arguments[bn];typeof Wt=="string"?(Wt=Wt.toLowerCase(),Wt.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Ft=Wt:Ht=arguments[bn]):typeof Wt=="boolean"?Jt=Wt:Wt instanceof HTMLElement&&(hn=Wt)}Kt();function Kt(){if(!Ce){setTimeout(Kt,200);return}Ft=zt(Ft);var Xt=hn||document.getElementById(Ht);if(!Xt){console.log("possibly bug on ajax loading? ");return}if(_n.removeExistingApplet(Xt,!1),Ee.width===void 0&&Xt.clientWidth&&(Ee.width=Xt.clientWidth),Ee.height===void 0&&Xt.clientHeight&&(Ee.height=Xt.clientHeight),!(Ee.width&&Ee.height)&&Ft==="html5"&&(delete Ee.width,delete Ee.height),de=Ft,Ft==="screenshot")at(Xt,Ee);else{var $t=!1;Ee.hasOwnProperty("playButton")&&Ee.playButton||Ee.hasOwnProperty("clickToLoad")&&Ee.clickToLoad?$t=!0:Ee.hasOwnProperty("playButtonAutoDecide")&&Ee.playButtonAutoDecide&&($t=(!Pe()||gt())&&Ae()),$t?(de="screenshot",et(Xt,Ee,Jt,Ft)):ft(Xt,Ee,Jt)}}};function Pe(){try{return window.self!==window.top}catch(gt){return!0}}function Ae(){return Ee.hasOwnProperty("screenshotGenerator")&&Ee.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}_n.getViews=function(){return Me},_n.isJavaInstalled=function(){return!1};var De=function(gt){var Ft=function(bn){var Wt=JSON.parse(bn),Kt=function(kt){return kt.type=="G"||kt.type=="E"},Xt=Wt.elements?Wt.elements.filter(Kt)[0]:Wt;if(!Xt||!Xt.url){Ht();return}Ee.fileName=Xt.url,ze(Xt.settings||{}),Me.is3D=!0;var $t="https://www.geogebra.org/images/";_n.setPreviewImage(oe||Xt.previewUrl,$t+"GeoGebra_loading.png",$t+"applet_play.png"),gt()},Ht=function(){Ee.onError&&Ee.onError(),mt("Error: Fetching material (id "+Ee.material_id+") failed.",Ee)},hn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Jt="/materials/"+Ee.material_id+"?scope=basic";Ze("https://"+hn+"/api/proxy.php?path="+encodeURIComponent(Jt),Ft,Ht)};function ze(gt){var Ft=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Ht){gt[Ht]=!!gt[Ht]}),Ft.forEach(function(Ht){Ee[Ht]===void 0&>[Ht]!==void 0&&(Ee[Ht]=gt[Ht])}),Ee.showToolBarHelp===void 0&&(Ee.showToolBarHelp=Ee.showToolBar)}function Ze(gt,Ft,Ht){var hn=new XMLHttpRequest;hn.open("GET",gt),hn.onload=function(){Ft(hn.responseText)},hn.onerror=Ht,hn.send()}_n.isHTML5Installed=function(){return!0},_n.getLoadedAppletType=function(){return de},_n.setPreviewImage=function(gt,Ft,Ht){oe=gt,ie=Ft,se=Ht},_n.removeExistingApplet=function(gt,Ft){var Ht;typeof gt=="string"&&(gt=document.getElementById(gt)),de=null;var hn=null;for(Ht=0;Ht<gt.childNodes.length;Ht++){var Jt=gt.childNodes[Ht],bn=Jt.className;bn==="applet_screenshot"?Ft?(Jt.style.display="block",de="screenshot"):Jt.style.display="none":bn!=="applet_scaler prerender"&&(gt.removeChild(Jt),hn=bn&&bn.indexOf("appletParameters")!=-1?Jt.id:null,Ht--)}var Wt=Ee.id!==void 0?Ee.id:hn,Kt=window[Wt];Kt&&typeof Kt.getBase64=="function"&&(Kt.remove(),window[Wt]=null)},_n.refreshHitPoints=function(){if(we(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var gt=_n.getAppletObject();return gt&&typeof gt.recalculateEnvironments=="function"?(gt.recalculateEnvironments(),!0):!1},_n.startAnimation=function(){var gt=_n.getAppletObject();return gt&&typeof gt.startAnimation=="function"?(gt.startAnimation(),!0):!1},_n.stopAnimation=function(){var gt=_n.getAppletObject();return gt&&typeof gt.stopAnimation=="function"?(gt.stopAnimation(),!0):!1},_n.getAppletObject=function(){var gt=Ee.id!==void 0?Ee.id:"ggbApplet";return window[gt]},_n.resize=function(){};var Xe=function(gt,Ft,Ht){var hn=document.createElement("param");hn.setAttribute("name",Ft),hn.setAttribute("value",Ht),gt.appendChild(hn)},Ge=function(gt){return gt&>!=="false"},ft=function(gt,Ft,Ht){we(ce)<=4.2&&(Ht=!0);var hn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==ce||ggbHTML5LoadedCodebaseIsWebSimple&&!ee)&&(hn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Jt=document.createElement("div");Jt.classList.add("appletParameters","notranslate");var bn=Ft.width,Wt=Ft.height;if(Ft.disableAutoScale=Ft.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Ft.disableAutoScale,Ft.width!==void 0)if(we(ce)<=4.4)Ge(Ft.showToolBar)&&(Ft.height-=7),Ge(Ft.showAlgebraInput)&&(Ft.height-=37),Ft.width<605&&Ge(Ft.showToolBar)&&(Ft.width=605,bn=605);else{var Kt=100;(Ge(Ft.showToolBar)||Ge(Ft.showMenuBar))&&(Ft.hasOwnProperty("customToolBar")&&(Ft.customToolbar=Ft.customToolBar),Kt=Ge(Ft.showMenuBar)?245:155),bn<Kt&&(Ft.width=Kt,bn=Kt)}Jt.style.border="none",Jt.style.display="inline-block";for(var Xt in Ft)Ft.hasOwnProperty(Xt)&&Xt!=="appletOnLoad"&&Jt.setAttribute("data-param-"+Xt,Ft[Xt]);ue&&Jt.setAttribute("data-param-fontscssurl",ue),_n.resize=function(){GGBAppletUtils.responsiveResize(gt,Ft)},window.addEventListener("resize",function(Ne){_n.resize()});var $t=typeof Ft.appletOnLoad=="function"?Ft.appletOnLoad:function(){};if(!Ht&&Ft.width!==void 0){Ft.hasOwnProperty("showSplash")||Jt.setAttribute("data-param-showSplash","false");var kt=gt.querySelector(".applet_scaler.prerender"),pt=kt!==null;if(pt)var Bt=kt.querySelector(".ggb_preview");else{var Bt=st(bn,Wt,Ft.borderColor,!1);kt=document.createElement("div"),kt.className="applet_scaler",kt.style.position="relative",kt.style.display="block",kt.style.width=bn+"px",kt.style.height=Wt+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(kt,"66%"),we(ce)>=5?(Ft.appletOnLoad=function(Ne){var $e=gt.querySelector(".ggb_preview");$e&&$e.parentNode.removeChild($e),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(kt),window.GGBT_wsf_view&&$(window).trigger("resize"),$t(Ne)},pt||kt.appendChild(Bt)):Jt.appendChild(Bt),kt.appendChild(Jt),pt||gt.appendChild(kt),setTimeout(function(){_n.resize()},1)}else{var xt=document.createElement("div");xt.className="applet_scaler",xt.style.position="relative",xt.style.display="block",xt.appendChild(Jt),gt.appendChild(xt),Ft.appletOnLoad=function(Ne){_n.resize(),$t(Ne)}}function vt(Ne,$e){$e&&typeof $e.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Ne,$e.appletOnLoad):renderGGBElement(Ne),mt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",$e)}function nt(Ne,$e){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Ne,params:$e}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(dt){vt(dt.article,dt.params)}),html5AppletsToProcess=null)},we(ce)<5&&(Ne.className+=" geogebraweb")):vt(Ne,$e)}if(hn){scriptLoadStarted=!0;for(var He=0;He<Jt.childNodes.length;He++){var Ie=Jt.childNodes[He].tagName;Ie==="TABLE"&&(Jt.removeChild(Jt.childNodes[He]),He--)}if(ggbHTML5LoadedScript!==null){var We=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');We!=null&&We.parentNode.removeChild(We)}var Oe=document.createElement("script"),be=function(){nt(Jt,Ft)};Oe.src=le+z,ggbHTML5LoadedCodebaseIsWebSimple=ee,ggbHTML5LoadedCodebaseVersion=ce,ggbHTML5LoadedScript=Oe.src,mt("GeoGebra HTML5 codebase loaded: '"+le+"'.",Ft),!he&&(!Le||Le=="5.0")?(ee?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),be()):le.requirejs?__webpack_require__.e(4184).then(function(){var Ne=[__webpack_require__(74620)];be.apply(null,Ne)}.bind(this)).catch(__webpack_require__.oe):(Oe.onload=be,gt.appendChild(Oe))}else nt(Jt,Ft);Ft.height=Wt,Ft.width=bn},at=function(gt,Ft,Ht){var hn=st(Ft.width,Ft.height,Ft.borderColor,Ht),Jt=document.createElement("div");Jt.style.position="relative",Jt.style.display="block",Jt.style.width=Ft.width+"px",Jt.style.height=Ft.height+"px",Jt.className="applet_screenshot applet_scaler"+(Ht?" applet_screenshot_play":""),Jt.appendChild(hn);var bn=GGBAppletUtils.getScale(Ft,gt,Ht);Ht?(gt.appendChild(yt()),window.GGBT_wsf_view||(gt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Jt,"66%"),gt.appendChild(Jt),bn!==1&&!isNaN(bn)&&(GGBAppletUtils.scaleElement(Jt,bn),Jt.style.width=Ft.width+"px",Jt.style.height=Ft.height+"px",Jt.parentNode.style.width=Ft.width*bn+"px",Jt.parentNode.style.height=Ft.height*bn+"px"),_n.resize=function(){Ct(gt,hn,Jt,Ht)},window.addEventListener("resize",function(Wt){_n.resize()}),_n.resize()};function Ct(gt,Ft,Ht,hn){if(gt.contains(Ft)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(gt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(gt)}var Jt=GGBAppletUtils.getScale(Ee,gt,hn);Ht.parentNode!==null&&(!isNaN(Jt)&&Jt!==1?(GGBAppletUtils.scaleElement(Ht,Jt),Ht.parentNode.style.width=Ee.width*Jt+"px",Ht.parentNode.style.height=Ee.height*Jt+"px"):(GGBAppletUtils.scaleElement(Ht,1),Ht.parentNode.style.width=Ee.width+"px",Ht.parentNode.style.height=Ee.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(gt),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}_n.onExitFullscreen=function(gt,Ft){Ft.appendChild(gt)};var et=function(gt,Ft,Ht,hn){at(gt,Ft,!0);for(var Jt=function(){var Kt=[];for(Wt=0;Wt<gt.childNodes.length;Wt++)Kt.push(gt.childNodes[Wt]);if(window.GGBT_wsf_view){var Xt=window.GGBT_wsf_view.renderFullScreen(gt,Ft.id),$t=document.getElementById("fullscreencontainer"),kt=jQuery(gt).find(".fullscreencontent");kt.length>0?(Xt.remove(),kt.attr("id","fullscreencontent").show(),jQuery($t).append(kt),window.dispatchEvent(new Event("resize"))):ft(Xt,Ft,!1),window.GGBT_wsf_view.launchFullScreen($t)}else de=hn,ft(gt,Ft,!1);if(!window.GGBT_wsf_view)for(Wt=0;Wt<Kt.length;Wt++)gt.removeChild(Kt[Wt])},bn=gt.getElementsByClassName("ggb_preview_play"),Wt=0;Wt<bn.length;Wt++)bn[Wt].addEventListener("click",Jt,!1),bn[Wt].addEventListener("ontouchstart",Jt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(gt),Ae()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},yt=function(){var gt=document.createElement("div");if(gt.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Ft='.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");}',Ht=document.createElement("style");Ht.styleSheet?Ht.styleSheet.cssText=Ft:Ht.appendChild(document.createTextNode(Ft)),document.getElementsByTagName("head")[0].appendChild(Ht)}return gt},st=function(gt,Ft,Ht,hn){var Jt=document.createElement("div");Jt.className="ggb_preview",Jt.style.position="absolute",Jt.style.zIndex="90",Jt.style.width=gt-2+"px",Jt.style.height=Ft-2+"px",Jt.style.top="0px",Jt.style.left="0px",Jt.style.overflow="hidden",Jt.style.backgroundColor="white";var bn="lightgrey";Ht!==void 0&&(Ht==="none"?bn="transparent":bn=Ht),Jt.style.border="1px solid "+bn;var Wt=document.createElement("img");if(Wt.style.position="relative",Wt.style.zIndex="1000",Wt.style.top="-1px",Wt.style.left="-1px",oe!==null&&Wt.setAttribute("src",oe),Wt.style.opacity=.7,ie!==null){var Kt,Xt,$t;if(!hn){Kt=document.createElement("img"),Kt.style.position="absolute",Kt.style.zIndex="1001",Kt.style.opacity=1,Wt.style.opacity=.3,Xt=360,Xt>gt/4*3&&(Xt=gt/4*3),$t=Xt/5.8,Kt.setAttribute("src",ie),Kt.setAttribute("width",Xt),Kt.setAttribute("height",$t);var kt=(gt-Xt)/2,pt=(Ft-$t)/2;Kt.style.left=kt+"px",Kt.style.top=pt+"px",Jt.appendChild(Kt)}}return Jt.appendChild(Wt),Jt},zt=function(gt){return gt=gt.toLowerCase(),gt==="html5"||gt==="screenshot"?gt:"html5"},lt=["web","webSimple","web3d","tablet","tablet3d","phone"],tt=function(gt,Ft){if(ce=gt,Ft){ut(ce,!0);return}var Ht=!me;if(Ht){var hn=we(ce);!isNaN(hn)&&hn<4.4&&(Ht=!1)}var Jt,bn;window.location.protocol.substr(0,4)==="http"?Jt=window.location.protocol:Jt="http:";var Wt=ce.indexOf("//");Wt>0?bn=ce:Wt===0?bn=Jt+ce:bn="https://www.geogebra.org/apps/5.2.814.0/";for(var Kt in lt)if(ce.slice(lt[Kt].length*-1)===lt[Kt]||ce.slice((lt[Kt].length+1)*-1)===lt[Kt]+"/"){ut(bn,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Ht&&!Me.is3D&&!Me.AV&&!Me.SV&&!Me.CV&&!Me.EV2&&!Me.CP&&!Me.PC&&!Me.DA&&!Me.FI&&!Me.PV&&!Ge(Ee.showToolBar)&&!Ge(Ee.showMenuBar)&&!Ge(Ee.showAlgebraInput)&&!Ge(Ee.enableRightClick)&&(!Ee.appName||Ee.appName=="classic")?bn+="webSimple/":bn+="web3d/",ut(bn,!1)},ut=function(gt,Ft){if(gt.requirejs){le=gt;return}gt.slice(-1)!=="/"&&(gt+="/"),le=gt,Ft===null&&(Ft=gt.indexOf("http")===-1),ve=Ft,z="web.nocache.js",ee=!1;var Ht=le.split("/");Ht.length>1&&(!Ft&&Ht[Ht.length-2]==="webSimple"?(z="webSimple.nocache.js",ee=!0):lt.indexOf(Ht[Ht.length-2])>=0&&(z=Ht[Ht.length-2]+".nocache.js")),Ht=gt.split("/"),ce=Ht[Ht.length-3],ce.substr(0,4)==="test"?ce=ce.substr(4,1)+"."+ce.substr(5,1):(ce.substr(0,3)==="war"||ce.substr(0,4)==="beta")&&(ce="5.0");var hn=parseFloat(ce);hn!==NaN&&hn<5&>.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+hn+" is deprecated. Using version latest instead."),tt("5.0",Ft))},mt=function(gt,Ft){window.console&&window.console.log&&(!Ft||typeof Ft.showLogging=="undefined"||Ft.showLogging&&Ft.showLogging!=="false")&&console.log(gt)};Ee.material_id!==void 0?De(Pt):Pt();function Pt(){var gt=qt;Le!==null?gt=Le:parseFloat(gt)<5&&(gt="5.0"),tt(gt,!1),he!==null&&ut(he,ve),Ce=!0}return _n},GGBAppletUtils=function(){"use strict";function _n(){return window.GGBT_wsf_edit!==void 0}function qt(Ce,Le){Le!=1?(Ce.style.transformOrigin="0% 0% 0px",Ce.style.webkitTransformOrigin="0% 0% 0px",Ce.style.transform="scale("+Le+","+Le+")",Ce.style.webkitTransform="scale("+Le+","+Le+")",Ce.style.maxWidth="initial",Ce.querySelector(".ggb_preview")!==null&&(Ce.querySelector(".ggb_preview").style.maxWidth="initial"),Ce.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Ce.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Ce.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Ce.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Ce.style.transform="none",Ce.style.webkitTransform="none")}function Ee(Ce,Le,he,ye,xe,ge){var le=null;if(ge!=null&&ge!="")for(var ve=Ce.parentNode;ve!=null;)if((" "+ve.className+" ").indexOf(" "+ge+" ")>-1){le=ve;break}else ve=ve.parentNode;var de=0,ce=0,z=0,ee=0,oe=0,ie=0,se=0;if(le)de=le.offsetWidth,ce=Math.max(ye?le.offsetWidth:0,le.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(de=Math.min(window.innerWidth,document.documentElement.clientWidth),ce=Math.min(window.innerHeight,document.documentElement.clientHeight),z=de):(de=window.innerWidth,ce=window.innerHeight,z=window.innerWidth),Ce){var ue=Ce.getBoundingClientRect();ue.left>0&&ue.left<=de&&(xe===void 0||!xe)&&(document.dir==="rtl"?(oe=de-ue.width-ue.left,ie=z<=480?10:30):(ie=ue.left,oe=z<=480?10:30),ee=ie+oe)}if(Ce&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var Se=Ce.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ee=40,se=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ee=0,se=40)}}return Ce&&((he===void 0||!he)&&Le>0&&Le+ee<de?de=Le:de-=ee,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(he===void 0||!he)&&(ce-=se)),{width:de,height:ce}}function Me(Ce,Le,he,ye,xe){if(Ce.isScreenshoGenerator)return 1;var ge=ye!==void 0&&ye,le=Ce.noScaleMargin!=null&&Ce.noScaleMargin,ve=function(Se){return Se&&Se!=="false"},de=ve(Ce.autoHeight),ce=Ee(Le,Ce.width,he,de,ge&&window.GGBT_wsf_view||le,xe),z=parseInt(ce.width),ee=Ce.width,oe=Ce.height;if(ee===void 0){var ie=Le.querySelector(".appletParameters");ie&&(ee=ie.offsetWidth,oe=ie.offsetHeight)}var se=z/ee,ue=ge?1:ce.height/oe;return he!==void 0&&!he&&(se=Math.min(1,se),ue=Math.min(1,ue)),Math.min(se,ue)}function me(Ce,Le,he){var ye=1,xe,ge=!1;if(Ce.hasOwnProperty("allowUpscale")&&(ge=Ce.allowUpscale),Ce.hasOwnProperty("scale")&&(ye=parseFloat(Ce.scale),(isNaN(ye)||ye===null||ye===0)&&(ye=1),ye>1&&(ge=!0)),Le&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ge=!0),!(Ce.hasOwnProperty("disableAutoScale")&&Ce.disableAutoScale))xe=Me(Ce,Le,ge,he,Ce.scaleContainerClass);else return ye;return ge&&(!Ce.hasOwnProperty("scale")||ye===1)?xe:Math.min(ye,xe)}function Be(Ce){var Le=Math.min(window.innerWidth,document.documentElement.clientWidth),he=Math.min(window.innerHeight,document.documentElement.clientHeight),ye=Ce.getBoundingClientRect(),xe=(Le-ye.width)/2,ge=(he-ye.height)/2;ge<0&&(ge=0),Ce.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(xe<40?Ce.style.left="40px":Ce.style.left=xe+"px",Ce.style.top=ge+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ge<40?Ce.style.top="40px":Ce.style.top=ge+"px",Ce.style.left=xe+"px")}function ke(Ce,Le){var he=Ce.querySelector(".appletParameters");if(he){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Le.id!==he.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Ce)}if(he.parentElement&&/fullscreen/.test(he.parentElement.className))return;var ye=me(Le,Ce);_n()&&he.setAttribute("data-param-scale",ye);for(var xe=null,ge=0;ge<Ce.childNodes.length;ge++)if(Ce.childNodes[ge].className!==void 0&&Ce.childNodes[ge].className.match(/^applet_scaler/)){xe=Ce.childNodes[ge];break}if(xe!==null&&xe.querySelector(".noscale")!==null)return;var le=Le.id!==void 0?Le.id:"ggbApplet",ve=window[le];(ve==null||!ve.recalculateEnvironments)&&xe!==null&&!xe.className.match(/fullscreen/)&&(xe.parentNode.style.transform="",!isNaN(ye)&&ye!==1?(xe.parentNode.style.width=Le.width*ye+"px",xe.parentNode.style.height=Le.height*ye+"px",qt(xe,ye)):(qt(xe,1),xe.parentNode.style.width=Le.width+"px",xe.parentNode.style.height=Le.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Be(Ce),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(he).parents(".content-added-content"))}}return{responsiveResize:ke,isFlexibleWorksheetEditor:_n,positionCenter:Be,getScale:me,scaleElement:qt}}();__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 _n=n.location.search;return _n.indexOf(J)!=-1||_n.indexOf(K)!=-1}function q(_n,qt){}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(_n){var qt=s[L].bindings;s[L].bindings=function(){for(var Ee=qt?qt():{},Me=_n[webModule.__softPermutationId],me=O;me<Me.length;me++){var Be=Me[me];Ee[Be[O]]=Be[P]}return Ee}};var t;function u(){return v(),t}function v(){if(!t){var _n=o.createElement(Q);if(_n.id=L,_n.style.cssText=R+S,_n.tabIndex=-1,o.body.appendChild(_n),t=_n.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var qt=document.compatMode==U?V:W;t.write(qt+X),t.close()}}}function w(_n){function qt(Me){function me(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Be=me();if(Be){Me();return}function ke(){if(!Be){if(!me())return;Be=!0,Me(),o.removeEventListener&&o.removeEventListener(Z,ke,!1),Ce&&clearInterval(Ce)}}o.addEventListener&&o.addEventListener(Z,ke,!1);var Ce=setInterval(function(){ke()},$)}function Ee(Me){var me=u(),Be=me.body,ke=me.createElement(_);ke.language=ab,ke.crossOrigin=W,ke.src=Me,webModule.__errFn&&(ke.onerror=function(){webModule.__errFn(L,new Error(bb+Me))}),Be.appendChild(ke)}qt(function(){Ee(_n)})}webModule.__startLoadingFragment=function(_n){return C(_n)},webModule.__installRunAsyncCode=function(_n){var qt=u(),Ee=qt.body,Me=qt.createElement(_);Me.language=ab,Me.text=_n,Ee.appendChild(Me),Ee.removeChild(Me)};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(_n){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(_n){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(_n){var qt=c[_n];return qt==null?null:qt},r=d,webModule.__errFn=e}function B(){function _n(Ce){var Le=Ce.lastIndexOf(rb);Le==-1&&(Le=Ce.length);var he=Ce.indexOf(sb);he==-1&&(he=Ce.length);var ye=Ce.lastIndexOf(tb,Math.min(he,Le));return ye>=O?Ce.substring(O,ye+P):W}function qt(Ce){if(!Ce.match(/^\w+:\/\//)){var Le=o.createElement(ub);Le.src=Ce+vb,Ce=_n(Le.src)}return Ce}function Ee(){var Ce=__gwt_getMetaProperty(wb);return Ce!=null?Ce:W}function Me(){for(var Ce=o.getElementsByTagName(_),Le=O;Le<Ce.length;++Le)if(Ce[Le].src.indexOf(xb)!=-1)return _n(Ce[Le].src);return W}function me(){var Ce=o.getElementsByTagName(yb);return Ce.length>O?Ce[Ce.length-P].href:W}function Be(){var Ce=o.location;return Ce.href==Ce.protocol+zb+Ce.host+Ce.pathname+Ce.search+Ce.hash}var ke=Ee();return ke==W&&(ke=Me()),ke==W&&(ke=me()),ke==W&&Be()&&(ke=_n(o.location.href)),ke=qt(ke),ke}function C(_n){return _n.match(/^\//)||_n.match(/^[a-zA-Z]+:\/\//)?_n:webModule.__moduleBase+_n}function D(){var _n=[],qt=O,Ee=[],Me=[];function me(Ce){var Le=Me[Ce](),he=Ee[Ce];if(Le in he)return Le;var ye=[];for(var xe in he)ye[he[xe]]=xe;throw r&&r(Ce,ye,Le),null}if(__gwt_isKnownPropertyValue=function(Ce,Le){return Le in Ee[Ce]},webModule.__getPropMap=function(){var Ce={};for(var Le in Ee)Ee.hasOwnProperty(Le)&&(Ce[Le]=me(Le));return Ce},webModule.__computePropValue=me,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Be;try{Be=Cb;var ke=Be.indexOf(Db);ke!=-1&&(qt=parseInt(Be.substring(ke+P),$),Be=Be.substring(O,ke))}catch(Ce){}return webModule.__softPermutationId=qt,C(Be+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(_n,qt,Ee){"use strict";Ee.d(qt,{Ax:function(){return ke},Ds:function(){return Ce},KI:function(){return he},SI:function(){return Be},f1:function(){return me}});var Me=Ee(3294);function me(ye){let xe=!0;if(ye.length>0){for(let ge=0;ge<ye.length;ge++)if(ye[ge].compile_success==0||!ye[ge].compile_success){xe=!1;break}}else xe=!1;return xe}function Be(ye,xe=""){let ge=[];for(let le=0;le<ye.length;le++){let ve=ye[le],de=xe?`${xe}/${ve.name}`:`${ve.name}`;ge.push({title:ve.name,type:ve.type,isLeaf:ve.type!=="tree",key:de})}return ge}function ke(ye,xe,ge){for(let le=0;le<ye.length;le++){let ve=ye[le];if(ve.key===xe){ve.children=ge;break}ve.children&&ke(ve.children,xe,ge)}return ye}function Ce(ye,xe,ge){let le;return function(){let ve=this,de=arguments,ce=function(){le=null,ge||ye.apply(ve,de)},z=ge&&!le;clearTimeout(le),le=setTimeout(ce,xe),z&&ye.apply(ve,de)}}const Le=!0,he=Me.Z.API_SERVER},16406:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return We}});var Me=Ee(59301),me={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Be=Ee(92310),ke=Ee.n(Be),Ce=Ee(71418);var Le=function(Oe,be){return(Le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ne,$e){Ne.__proto__=$e}||function(Ne,$e){for(var dt in $e)Object.prototype.hasOwnProperty.call($e,dt)&&(Ne[dt]=$e[dt])})(Oe,be)};function he(Oe,be){function Ne(){this.constructor=Oe}Le(Oe,be),Oe.prototype=be===null?Object.create(be):(Ne.prototype=be.prototype,new Ne)}function ye(Oe,be,Ne,$e){return new(Ne||(Ne=Promise))(function(dt,Je){function At(ln){try{pn($e.next(ln))}catch(gn){Je(gn)}}function en(ln){try{pn($e.throw(ln))}catch(gn){Je(gn)}}function pn(ln){var gn;ln.done?dt(ln.value):(gn=ln.value,gn instanceof Ne?gn:new Ne(function(Un){Un(gn)})).then(At,en)}pn(($e=$e.apply(Oe,be||[])).next())})}function xe(Oe,be){var Ne,$e,dt,Je,At={label:0,sent:function(){if(1&dt[0])throw dt[1];return dt[1]},trys:[],ops:[]};return Je={next:en(0),throw:en(1),return:en(2)},typeof Symbol=="function"&&(Je[Symbol.iterator]=function(){return this}),Je;function en(pn){return function(ln){return function(gn){if(Ne)throw new TypeError("Generator is already executing.");for(;At;)try{if(Ne=1,$e&&(dt=2&gn[0]?$e.return:gn[0]?$e.throw||((dt=$e.return)&&dt.call($e),0):$e.next)&&!(dt=dt.call($e,gn[1])).done)return dt;switch($e=0,dt&&(gn=[2&gn[0],dt.value]),gn[0]){case 0:case 1:dt=gn;break;case 4:return At.label++,{value:gn[1],done:!1};case 5:At.label++,$e=gn[1],gn=[0];continue;case 7:gn=At.ops.pop(),At.trys.pop();continue;default:if(dt=At.trys,!((dt=dt.length>0&&dt[dt.length-1])||gn[0]!==6&&gn[0]!==2)){At=0;continue}if(gn[0]===3&&(!dt||gn[1]>dt[0]&&gn[1]<dt[3])){At.label=gn[1];break}if(gn[0]===6&&At.label<dt[1]){At.label=dt[1],dt=gn;break}if(dt&&At.label<dt[2]){At.label=dt[2],At.ops.push(gn);break}dt[2]&&At.ops.pop(),At.trys.pop();continue}gn=be.call(Oe,At)}catch(Un){gn=[6,Un],$e=0}finally{Ne=dt=0}if(5&gn[0])throw gn[1];return{value:gn[0]?gn[1]:void 0,done:!0}}([pn,ln])}}}function ge(){for(var Oe=0,be=0,Ne=arguments.length;be<Ne;be++)Oe+=arguments[be].length;var $e=Array(Oe),dt=0;for(be=0;be<Ne;be++)for(var Je=arguments[be],At=0,en=Je.length;At<en;At++,dt++)$e[dt]=Je[At];return $e}var le=function(){function Oe(){}return Oe.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Oe.setAttributes=function(be,Ne){for(var $e=0,dt=Ne;$e<dt.length;$e++){var Je=dt[$e],At=Je[0],en=Je[1];be.setAttribute(At,en)}},Oe.createRect=function(be,Ne,$e){var dt=document.createElementNS("http://www.w3.org/2000/svg","rect");return dt.setAttribute("width",be.toString()),dt.setAttribute("height",Ne.toString()),$e&&Oe.setAttributes(dt,$e),dt},Oe.createLine=function(be,Ne,$e,dt,Je){var At=document.createElementNS("http://www.w3.org/2000/svg","line");return At.setAttribute("x1",be.toString()),At.setAttribute("y1",Ne.toString()),At.setAttribute("x2",$e.toString()),At.setAttribute("y2",dt.toString()),Je&&Oe.setAttributes(At,Je),At},Oe.createPolygon=function(be,Ne){var $e=document.createElementNS("http://www.w3.org/2000/svg","polygon");return $e.setAttribute("points",be),Ne&&Oe.setAttributes($e,Ne),$e},Oe.createCircle=function(be,Ne){var $e=document.createElementNS("http://www.w3.org/2000/svg","circle");return $e.setAttribute("cx",(be/2).toString()),$e.setAttribute("cy",(be/2).toString()),$e.setAttribute("r",be.toString()),Ne&&Oe.setAttributes($e,Ne),$e},Oe.createEllipse=function(be,Ne,$e){var dt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return dt.setAttribute("cx",(be/2).toString()),dt.setAttribute("cy",(Ne/2).toString()),dt.setAttribute("rx",(be/2).toString()),dt.setAttribute("ry",(Ne/2).toString()),$e&&Oe.setAttributes(dt,$e),dt},Oe.createGroup=function(be){var Ne=document.createElementNS("http://www.w3.org/2000/svg","g");return be&&Oe.setAttributes(Ne,be),Ne},Oe.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Oe.createMarker=function(be,Ne,$e,dt,Je,At,en){var pn=document.createElementNS("http://www.w3.org/2000/svg","marker");return Oe.setAttributes(pn,[["id",be],["orient",Ne],["markerWidth",$e.toString()],["markerHeight",dt.toString()],["refX",Je.toString()],["refY",At.toString()]]),pn.appendChild(en),pn},Oe.createText=function(be){var Ne=document.createElementNS("http://www.w3.org/2000/svg","text");return Ne.setAttribute("x","0"),Ne.setAttribute("y","0"),be&&Oe.setAttributes(Ne,be),Ne},Oe.createTSpan=function(be,Ne){var $e=document.createElementNS("http://www.w3.org/2000/svg","tspan");return $e.textContent=be,Ne&&Oe.setAttributes($e,Ne),$e},Oe.createImage=function(be){var Ne=document.createElementNS("http://www.w3.org/2000/svg","image");return be&&Oe.setAttributes(Ne,be),Ne},Oe.createPoint=function(be,Ne){var $e=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return $e.x=be,$e.y=Ne,$e},Oe.createPath=function(be,Ne){var $e=document.createElementNS("http://www.w3.org/2000/svg","path");return $e.setAttribute("d",be),Ne&&Oe.setAttributes($e,Ne),$e},Oe}(),ve=function(){function Oe(){}return Oe.addKey=function(be){Oe.key=be},Object.defineProperty(Oe,"isLicensed",{get:function(){return!!Oe.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Oe.key)},enumerable:!1,configurable:!0}),Oe}(),de=function(){function Oe(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Oe.prototype.rasterize=function(be,Ne,$e){var dt=this;return new Promise(function(Je){var At=$e!==void 0?$e:document.createElement("canvas");be===null&&(dt.markersOnly=!0,dt.naturalSize=!1);var en=document.createElementNS("http://www.w3.org/2000/svg","svg");en.setAttribute("xmlns","http://www.w3.org/2000/svg"),en.setAttribute("width",Ne.width.baseVal.valueAsString),en.setAttribute("height",Ne.height.baseVal.valueAsString),en.setAttribute("viewBox","0 0 "+Ne.viewBox.baseVal.width.toString()+" "+Ne.viewBox.baseVal.height.toString()),en.innerHTML=Ne.innerHTML,dt.naturalSize===!0?(en.width.baseVal.value=be.naturalWidth,en.height.baseVal.value=be.naturalHeight):dt.width!==void 0&&dt.height!==void 0&&(en.width.baseVal.value=dt.width,en.height.baseVal.value=dt.height),At.width=en.width.baseVal.value,At.height=en.height.baseVal.value;var pn=en.outerHTML,ln=At.getContext("2d");dt.markersOnly!==!0&&ln.drawImage(be,0,0,At.width,At.height);var gn=window.URL,Un=new Image(At.width,At.height);Un.setAttribute("crossOrigin","anonymous");var An=new Blob([pn],{type:"image/svg+xml"}),ni=gn.createObjectURL(An);Un.onload=function(){ln.drawImage(Un,0,0),gn.revokeObjectURL(ni);var ai=At.toDataURL(dt.imageType,dt.imageQuality);Je(ai)},Un.src=ni})},Oe}(),ce=function(){},z=function(){function Oe(be){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+be+"_"}return Object.defineProperty(Oe.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.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(Oe.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Oe.prototype.addClass=function(be){return this.styleSheet===void 0&&this.addStyleSheet(),be.name=""+this.classNamePrefix+be.localName,this.classes.push(be),this.styleSheet.sheet.insertRule("."+be.name+" {"+be.style+"}",this.styleSheet.sheet.cssRules.length),be},Oe.prototype.addRule=function(be){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(be),this.styleSheet.sheet.insertRule(be.selector+" {"+be.style+"}",this.styleSheet.sheet.cssRules.length)},Oe.prototype.addStyleSheet=function(){var be;this.styleSheet=document.createElement("style"),((be=this.styleSheetRoot)!==null&&be!==void 0?be: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 oe("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new oe("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},Oe.prototype.removeStyleSheet=function(){var be;this.styleSheet&&(((be=this.styleSheetRoot)!==null&&be!==void 0?be:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Oe}(),ee=function(Oe,be){this.selector=Oe,this.style=be},oe=function(Oe,be){this.localName=Oe,this.style=be},ie=function(){function Oe(be,Ne,$e,dt,Je){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=be,this.displayMode=Ne,this.markerItems=$e,this.uiStyleSettings=dt,this.styles=Je,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Oe.prototype.show=function(be){var Ne=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=be,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var $e=document.createElement("div");$e.className=this.toolbarBlockStyleClass.name,$e.style.whiteSpace="nowrap",this.uiContainer.appendChild($e),this.addActionButton($e,'<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($e,'<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($e,'<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($e,'<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($e,'<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($e,'<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($e,'<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($e,'<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(Je){var At=document.createElement("div");At.className=""+Ne.toolbarButtonStyleClass.name,At.setAttribute("data-type-name",Je.typeName),At.innerHTML=Je.icon,At.addEventListener("click",function(){Ne.markerToolbarButtonClicked(At,Je)}),Ne.buttons.push(At),Ne.markerButtons.push(At)}),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 dt=document.createElement("div");dt.className=this.toolbarBlockStyleClass.name,dt.style.whiteSpace="nowrap",dt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(dt),this.addActionButton(dt,'<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(dt,'<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()},Oe.prototype.addButtonClickListener=function(be){this.buttonClickListeners.push(be)},Oe.prototype.removeButtonClickListener=function(be){this.buttonClickListeners.indexOf(be)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(be),1)},Oe.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Oe.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var be=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Ne=0;Ne<this.markerButtons.length;Ne++)Ne<be||Ne===be&&this.markerButtons.length-1===be?this.markerButtonBlock.appendChild(this.markerButtons[Ne]):(Ne===be&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Ne]))}},Oe.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")},Oe.prototype.resetButtonStyles=function(){var be=this;this.buttons.forEach(function(Ne){Ne.className=Ne.className.replace(be.uiStyleSettings.toolbarButtonStyleColorsClassName?be.uiStyleSettings.toolbarButtonStyleColorsClassName:be.toolbarButtonStyleColorsClass.name,"").trim(),Ne.className=Ne.className.replace(be.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?be.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:be.toolbarActiveButtonStyleColorsClass.name,"").trim(),Ne.className+=" "+(be.uiStyleSettings.toolbarButtonStyleColorsClassName?be.uiStyleSettings.toolbarButtonStyleColorsClassName:be.toolbarButtonStyleColorsClass.name)})},Oe.prototype.addActionButton=function(be,Ne,$e){var dt=this,Je=document.createElement("div");switch(Je.className=""+this.toolbarButtonStyleClass.name,Je.innerHTML=Ne,Je.setAttribute("data-action",$e),Je.addEventListener("click",function(){dt.actionToolbarButtonClicked(Je,$e)}),$e){case"select":Je.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Je.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Je.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Je.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Je.style.fill=this.uiStyleSettings.closeButtonColor}be.appendChild(Je),this.buttons.push(Je)},Oe.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new oe("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 oe("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new oe("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new oe("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 oe("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var be=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new oe("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*be)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*be)+`px;
|
|
|
padding: `+be+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new oe("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new oe("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+`
|
|
|
`))},Oe.prototype.markerToolbarButtonClicked=function(be,Ne){this.setActiveButton(be),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function($e){return $e("marker",Ne)}),this.markerButtonOverflowBlock.style.display="none"},Oe.prototype.actionToolbarButtonClicked=function(be,Ne){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function($e){return $e("action",Ne)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Oe.prototype.setActiveButton=function(be){this.resetButtonStyles(),be.className=be.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),be.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Oe.prototype.setActiveMarkerButton=function(be){var Ne=this.markerButtons.find(function($e){return $e.getAttribute("data-type-name")===be});Ne&&this.setActiveButton(Ne)},Oe.prototype.setCurrentMarker=function(be){var Ne=this;this.currentMarker=be,this.buttons.filter(function($e){return/delete|notes/.test($e.getAttribute("data-action"))}).forEach(function($e){Ne.currentMarker===void 0?($e.style.fillOpacity="0.4",$e.style.pointerEvents="none"):($e.style.fillOpacity="1",$e.style.pointerEvents="all")})},Oe}(),se=function(){function Oe(be,Ne,$e,dt){this.panels=[],this.panelButtons=[],this.markerjsContainer=be,this.displayMode=Ne,this.uiStyleSettings=$e,this.styles=dt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Oe.prototype.addStyles=function(){var be;this.toolboxStyleClass=this.styles.addClass(new oe("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 oe("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var Ne=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new oe("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new oe("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new oe("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 oe("toolbox-panel-row_colors",`
|
|
|
background-color: `+((be=this.uiStyleSettings.toolboxBackgroundColor)!==null&&be!==void 0?be:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new oe("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Ne)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Ne)+`px;
|
|
|
padding: `+Ne+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new oe("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new oe("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;
|
|
|
`))},Oe.prototype.show=function(be){var Ne;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=be,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Ne=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Ne!==void 0?Ne:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Oe.prototype.setPanelButtons=function(be){var Ne,$e,dt=this;this.panels=be,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Ne=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Ne!==void 0?Ne:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(($e=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&$e!==void 0?$e:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Je){var At;Je.uiStyleSettings=dt.uiStyleSettings;var en=document.createElement("div");en.className=dt.toolboxButtonStyleClass.name+" "+((At=dt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&At!==void 0?At:dt.toolboxButtonStyleColorsClass.name),en.innerHTML=Je.icon,en.title=Je.title,en.addEventListener("click",function(){dt.panelButtonClick(Je)}),dt.panelButtons.push(en),dt.buttonRow.appendChild(en)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Oe.prototype.panelButtonClick=function(be){var Ne=this,$e=-1;if(be!==this.activePanel){$e=this.panels.indexOf(be),this.panelRow.innerHTML="";var dt=be.getUi();dt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(dt),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=be}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Ne.displayMode==="inline"?Ne.panelRow.style.display="none":Ne.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Je,At){var en,pn;Je.className=Ne.toolboxButtonStyleClass.name+" "+(At===$e?""+((en=Ne.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&en!==void 0?en:Ne.toolboxActiveButtonStyleColorsClass.name):""+((pn=Ne.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&pn!==void 0?pn:Ne.toolboxButtonStyleColorsClass.name))})},Oe}(),ue=function(Oe,be){this.title=Oe,this.icon=be},Se=function(Oe){function be(Ne,$e,dt,Je){var At=Oe.call(this,Ne,Je||'<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 At.colors=[],At.addTransparent=!1,At.colorBoxes=[],At.colors=$e,At.currentColor=dt,At.setCurrentColor=At.setCurrentColor.bind(At),At.getColorBox=At.getColorBox.bind(At),At}return he(be,Oe),be.prototype.getUi=function(){var Ne=this,$e=document.createElement("div");return $e.style.overflow="hidden",$e.style.whiteSpace="nowrap",this.colors.forEach(function(dt){var Je=Ne.getColorBox(dt);$e.appendChild(Je),Ne.colorBoxes.push(Je)}),$e},be.prototype.getColorBox=function(Ne){var $e=this,dt=this.uiStyleSettings.toolbarHeight/4,Je=this.uiStyleSettings.toolbarHeight-dt,At=document.createElement("div");At.style.display="inline-block",At.style.boxSizing="content-box",At.style.width=Je-2+"px",At.style.height=Je-2+"px",At.style.padding="1px",At.style.marginRight="2px",At.style.marginBottom="2px",At.style.borderWidth="2px",At.style.borderStyle="solid",At.style.borderRadius=(Je+2)/2+"px",At.style.borderColor=Ne===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",At.addEventListener("click",function(){$e.setCurrentColor(Ne,At)});var en=document.createElement("div");return en.style.display="inline-block",en.style.width=Je-2+"px",en.style.height=Je-2+"px",en.style.backgroundColor=Ne,en.style.borderRadius=Je/2+"px",Ne==="transparent"&&(en.style.fill=this.uiStyleSettings.toolboxAccentColor,en.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>`),At.appendChild(en),At},be.prototype.setCurrentColor=function(Ne,$e){var dt=this;this.currentColor=Ne,this.colorBoxes.forEach(function(Je){Je.style.borderColor=Je===$e?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Ne)},be}(ue),we=function(){function Oe(be,Ne,$e){this._state="new",this._isSelected=!1,this._container=be,this._overlayContainer=Ne,this.globalSettings=$e,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Oe.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Oe.prototype.ownsTarget=function(be){return!1},Object.defineProperty(Oe.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Oe.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Oe.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Oe.prototype.pointerDown=function(be,Ne){},Oe.prototype.dblClick=function(be,Ne){},Oe.prototype.manipulate=function(be){},Oe.prototype.pointerUp=function(be){this.stateChanged()},Oe.prototype.dispose=function(){},Oe.prototype.addMarkerVisualToContainer=function(be){this.container.childNodes.length>0?this.container.insertBefore(be,this.container.childNodes[0]):this.container.appendChild(be)},Oe.prototype.getState=function(){return{typeName:Oe.typeName,state:this.state,notes:this.notes}},Oe.prototype.restoreState=function(be){this._state=be.state,this.notes=be.notes},Oe.prototype.scale=function(be,Ne){},Oe.prototype.colorChanged=function(be){this.onColorChanged&&this.onColorChanged(be),this.stateChanged()},Oe.prototype.fillColorChanged=function(be){this.onFillColorChanged&&this.onFillColorChanged(be),this.stateChanged()},Oe.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var be=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),be.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(be)&&this.onStateChanged(this)}},Oe.typeName="MarkerBase",Oe}(),Pe=function(){function Oe(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Oe.prototype.findGripByVisual=function(be){return this.topLeft.ownsTarget(be)?this.topLeft:this.topCenter.ownsTarget(be)?this.topCenter:this.topRight.ownsTarget(be)?this.topRight:this.centerLeft.ownsTarget(be)?this.centerLeft:this.centerRight.ownsTarget(be)?this.centerRight:this.bottomLeft.ownsTarget(be)?this.bottomLeft:this.bottomCenter.ownsTarget(be)?this.bottomCenter:this.bottomRight.ownsTarget(be)?this.bottomRight:void 0},Oe}(),Ae=function(){function Oe(){this.GRIP_SIZE=10,this.visual=le.createGroup(),this.visual.appendChild(le.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(le.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Oe.prototype.ownsTarget=function(be){return be===this.visual||be===this.visual.childNodes[0]||be===this.visual.childNodes[1]},Oe}(),De=function(){function Oe(){}return Oe.toITransformMatrix=function(be){return{a:be.a,b:be.b,c:be.c,d:be.d,e:be.e,f:be.f}},Oe.toSVGMatrix=function(be,Ne){return be.a=Ne.a,be.b=Ne.b,be.c=Ne.c,be.d=Ne.d,be.e=Ne.e,be.f=Ne.f,be},Oe}(),ze=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.left=0,Je.top=0,Je.width=0,Je.height=0,Je.defaultSize={x:50,y:20},Je.offsetX=0,Je.offsetY=0,Je.rotationAngle=0,Je.CB_DISTANCE=10,Je._suppressMarkerCreateEvent=!1,Je.container.transform.baseVal.appendItem(le.createTransform()),Je.setupControlBox(),Je}return he(be,Oe),Object.defineProperty(be.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"visual",{get:function(){return this._visual},set:function(Ne){this._visual=Ne;var $e=le.createTransform();this._visual.transform.baseVal.appendItem($e)},enumerable:!1,configurable:!0}),be.prototype.ownsTarget=function(Ne){return!!Oe.prototype.ownsTarget.call(this,Ne)||!!(this.controlGrips.findGripByVisual(Ne)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ne))},be.prototype.pointerDown=function(Ne,$e){Oe.prototype.pointerDown.call(this,Ne,$e),this.state==="new"&&(this.left=Ne.x,this.top=Ne.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var dt=this.unrotatePoint(Ne);if(this.manipulationStartX=dt.x,this.manipulationStartY=dt.y,this.offsetX=dt.x-this.left,this.offsetY=dt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual($e),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget($e)){this.activeGrip=this.rotatorGrip;var Je=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Je.x-this.width/2,this.top=Je.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var At=this.container.transform.baseVal.getItem(0);At.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(At,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},be.prototype.pointerUp=function(Ne){var $e=this.state;Oe.prototype.pointerUp.call(this,Ne),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Ne),this._state="select",$e==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},be.prototype.moveVisual=function(Ne){this.visual.style.transform="translate("+Ne.x+"px, "+Ne.y+"px)"},be.prototype.manipulate=function(Ne){var $e=this.unrotatePoint(Ne);this.state==="creating"?this.resize(Ne):this.state==="move"?(this.left=this.manipulationStartLeft+($e.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+($e.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize($e):this.state==="rotate"&&this.rotate(Ne)},be.prototype.resize=function(Ne){var $e=this.manipulationStartLeft,dt=this.manipulationStartWidth,Je=this.manipulationStartTop,At=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:$e=this.manipulationStartLeft+Ne.x-this.manipulationStartX,dt=this.manipulationStartWidth+this.manipulationStartLeft-$e;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:dt=this.manipulationStartWidth+Ne.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Je=this.manipulationStartTop+Ne.y-this.manipulationStartY,At=this.manipulationStartHeight+this.manipulationStartTop-Je;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:At=this.manipulationStartHeight+Ne.y-this.manipulationStartY}dt>=0?(this.left=$e,this.width=dt):(this.left=$e+dt,this.width=-dt),At>=0?(this.top=Je,this.height=At):(this.top=Je+At,this.height=-At),this.setSize()},be.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},be.prototype.rotate=function(Ne){if(Math.abs(Ne.x-this.centerX)>.1){var $e=Math.sign(Ne.x-this.centerX);this.rotationAngle=180*Math.atan((Ne.y-this.centerY)/(Ne.x-this.centerX))/Math.PI+90*$e,this.applyRotation()}},be.prototype.applyRotation=function(){var Ne=this.container.transform.baseVal.getItem(0);Ne.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ne,0)},be.prototype.rotatePoint=function(Ne){if(this.rotationAngle===0)return Ne;var $e=this.container.getCTM(),dt=le.createPoint(Ne.x,Ne.y);return{x:(dt=dt.matrixTransform($e)).x,y:dt.y}},be.prototype.unrotatePoint=function(Ne){if(this.rotationAngle===0)return Ne;var $e=this.container.getCTM();$e=$e.inverse();var dt=le.createPoint(Ne.x,Ne.y);return{x:(dt=dt.matrixTransform($e)).x,y:dt.y}},be.prototype.select=function(){Oe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},be.prototype.deselect=function(){Oe.prototype.deselect.call(this),this.controlBox.style.display="none"},be.prototype.setupControlBox=function(){this.controlBox=le.createGroup();var Ne=le.createTransform();Ne.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Ne),this.container.appendChild(this.controlBox),this.controlRect=le.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=le.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 Pe,this.addControlGrips(),this.controlBox.style.display="none"},be.prototype.adjustControlBox=function(){var Ne=this.controlBox.transform.baseVal.getItem(0);Ne.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Ne,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()},be.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()},be.prototype.createGrip=function(){var Ne=new Ae;return Ne.visual.transform.baseVal.appendItem(le.createTransform()),this.controlBox.appendChild(Ne.visual),Ne},be.prototype.positionGrips=function(){var Ne=this.controlGrips.topLeft.GRIP_SIZE,$e=-Ne/2,dt=$e,Je=(this.width+this.CB_DISTANCE)/2-Ne/2,At=(this.height+this.CB_DISTANCE)/2-Ne/2,en=this.height+this.CB_DISTANCE-Ne/2,pn=this.width+this.CB_DISTANCE-Ne/2;this.positionGrip(this.controlGrips.topLeft.visual,$e,dt),this.positionGrip(this.controlGrips.topCenter.visual,Je,dt),this.positionGrip(this.controlGrips.topRight.visual,pn,dt),this.positionGrip(this.controlGrips.centerLeft.visual,$e,At),this.positionGrip(this.controlGrips.centerRight.visual,pn,At),this.positionGrip(this.controlGrips.bottomLeft.visual,$e,en),this.positionGrip(this.controlGrips.bottomCenter.visual,Je,en),this.positionGrip(this.controlGrips.bottomRight.visual,pn,en),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Je,dt-3*this.CB_DISTANCE)},be.prototype.positionGrip=function(Ne,$e,dt){var Je=Ne.transform.baseVal.getItem(0);Je.setTranslate($e,dt),Ne.transform.baseVal.replaceItem(Je,0)},be.prototype.hideControlBox=function(){this.controlBox.style.display="none"},be.prototype.showControlBox=function(){this.controlBox.style.display=""},be.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:De.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:De.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Oe.prototype.getState.call(this))},be.prototype.restoreState=function(Ne){Oe.prototype.restoreState.call(this,Ne);var $e=Ne;this.left=$e.left,this.top=$e.top,this.width=$e.width,this.height=$e.height,this.rotationAngle=$e.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(De.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,$e.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(De.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,$e.containerTransformMatrix))},be.prototype.scale=function(Ne,$e){Oe.prototype.scale.call(this,Ne,$e);var dt=this.rotatePoint({x:this.left,y:this.top}),Je=this.unrotatePoint({x:dt.x*Ne,y:dt.y*$e});this.left=Je.x,this.top=Je.y,this.width=this.width*Ne,this.height=this.height*$e,this.adjustControlBox()},be}(we),Ze=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.fillColor="transparent",Je.strokeColor="transparent",Je.strokeWidth=0,Je.strokeDasharray="",Je.opacity=1,Je.setStrokeColor=Je.setStrokeColor.bind(Je),Je.setFillColor=Je.setFillColor.bind(Je),Je.setStrokeWidth=Je.setStrokeWidth.bind(Je),Je.setStrokeDasharray=Je.setStrokeDasharray.bind(Je),Je.createVisual=Je.createVisual.bind(Je),Je}return he(be,Oe),be.prototype.ownsTarget=function(Ne){return!(!Oe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual)},be.prototype.createVisual=function(){this.visual=le.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)},be.prototype.pointerDown=function(Ne,$e){Oe.prototype.pointerDown.call(this,Ne,$e),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},be.prototype.manipulate=function(Ne){Oe.prototype.manipulate.call(this,Ne)},be.prototype.resize=function(Ne){Oe.prototype.resize.call(this,Ne),this.setSize()},be.prototype.setSize=function(){Oe.prototype.setSize.call(this),le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},be.prototype.pointerUp=function(Ne){Oe.prototype.pointerUp.call(this,Ne),this.setSize()},be.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.visual&&le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ne),this.stateChanged()},be.prototype.setFillColor=function(Ne){this.fillColor=Ne,this.visual&&le.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},be.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.visual&&le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},be.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.visual&&le.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},be.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Oe.prototype.getState.call(this))},be.prototype.restoreState=function(Ne){var $e=Ne;this.fillColor=$e.fillColor,this.strokeColor=$e.strokeColor,this.strokeWidth=$e.strokeWidth,this.strokeDasharray=$e.strokeDasharray,this.opacity=$e.opacity,this.createVisual(),Oe.prototype.restoreState.call(this,Ne),this.setSize()},be.prototype.scale=function(Ne,$e){Oe.prototype.scale.call(this,Ne,$e),this.setSize()},be.title="Rectangle marker",be}(ze),Xe=function(Oe){function be(Ne,$e,dt,Je){var At=Oe.call(this,Ne,Je||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return At.widths=[],At.widthBoxes=[],At.widths=$e,At.currentWidth=dt,At.setCurrentWidth=At.setCurrentWidth.bind(At),At}return he(be,Oe),be.prototype.getUi=function(){var Ne=this,$e=document.createElement("div");return $e.style.display="flex",$e.style.overflow="hidden",$e.style.flexGrow="2",this.widths.forEach(function(dt){var Je=document.createElement("div");Je.style.display="flex",Je.style.flexGrow="2",Je.style.alignItems="center",Je.style.justifyContent="space-between",Je.style.padding="5px",Je.style.borderWidth="2px",Je.style.borderStyle="solid",Je.style.borderColor=dt===Ne.currentWidth?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Je.addEventListener("click",function(){Ne.setCurrentWidth(dt,Je)}),$e.appendChild(Je);var At=document.createElement("div");At.innerText=dt.toString(),At.style.marginRight="5px",Je.appendChild(At);var en=document.createElement("div");en.style.minHeight="20px",en.style.flexGrow="2",en.style.display="flex",en.style.alignItems="center";var pn=document.createElement("hr");pn.style.minWidth="20px",pn.style.border="0px",pn.style.borderTop=dt+"px solid "+Ne.uiStyleSettings.toolboxColor,pn.style.flexGrow="2",en.appendChild(pn),Je.appendChild(en),Ne.widthBoxes.push(Je)}),$e},be.prototype.setCurrentWidth=function(Ne,$e){var dt=this;this.currentWidth=Ne,this.widthBoxes.forEach(function(Je){Je.style.borderColor=Je===$e?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},be}(ue),Ge=function(Oe){function be(Ne,$e,dt,Je){var At=Oe.call(this,Ne,Je||'<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 At.styles=[],At.styleBoxes=[],At.styles=$e,At.currentStyle=dt,At.setCurrentStyle=At.setCurrentStyle.bind(At),At}return he(be,Oe),be.prototype.getUi=function(){var Ne=this,$e=document.createElement("div");return $e.style.display="flex",$e.style.overflow="hidden",$e.style.flexGrow="2",this.styles.forEach(function(dt){var Je=document.createElement("div");Je.style.display="flex",Je.style.alignItems="center",Je.style.justifyContent="space-between",Je.style.padding="5px",Je.style.borderWidth="2px",Je.style.borderStyle="solid",Je.style.overflow="hidden",Je.style.maxWidth=100/Ne.styles.length-5+"%",Je.style.borderColor=dt===Ne.currentStyle?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Je.addEventListener("click",function(){Ne.setCurrentStyle(dt,Je)}),$e.appendChild(Je);var At=document.createElement("div");At.style.minHeight="20px",At.style.flexGrow="2",At.style.overflow="hidden";var en=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Ne.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(dt!==""?'stroke-dasharray="'+dt+'"':"")+` />
|
|
|
</svg>`;At.innerHTML=en,Je.appendChild(At),Ne.styleBoxes.push(Je)}),$e},be.prototype.setCurrentStyle=function(Ne,$e){var dt=this;this.currentStyle=Ne,this.styleBoxes.forEach(function(Je){Je.style.borderColor=Je===$e?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},be}(ue),ft=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.strokeColor=dt.defaultColor,Je.strokeWidth=dt.defaultStrokeWidth,Je.strokeDasharray=dt.defaultStrokeDasharray,Je.strokePanel=new Se("Line color",dt.defaultColorSet,dt.defaultColor),Je.strokePanel.onColorChanged=Je.setStrokeColor,Je.strokeWidthPanel=new Xe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),Je.strokeWidthPanel.onWidthChanged=Je.setStrokeWidth,Je.strokeStylePanel=new Ge("Line style",dt.defaultStrokeDasharrays,dt.defaultStrokeDasharray),Je.strokeStylePanel.onStyleChanged=Je.setStrokeDasharray,Je}return he(be,Oe),Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ne=Oe.prototype.getState.call(this);return Ne.typeName=be.typeName,Ne},be.typeName="FrameMarker",be.title="Frame marker",be.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',be}(Ze),at=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"},Ct=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.x1=0,Je.y1=0,Je.x2=0,Je.y2=0,Je.defaultLength=50,Je.manipulationStartX=0,Je.manipulationStartY=0,Je.manipulationStartX1=0,Je.manipulationStartY1=0,Je.manipulationStartX2=0,Je.manipulationStartY2=0,Je.setupControlBox(),Je}return he(be,Oe),be.prototype.ownsTarget=function(Ne){return!!Oe.prototype.ownsTarget.call(this,Ne)||!(!this.grip1.ownsTarget(Ne)&&!this.grip2.ownsTarget(Ne))},be.prototype.pointerDown=function(Ne,$e){Oe.prototype.pointerDown.call(this,Ne,$e),this.manipulationStartX=Ne.x,this.manipulationStartY=Ne.y,this.state==="new"&&(this.x1=Ne.x,this.y1=Ne.y,this.x2=Ne.x,this.y2=Ne.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($e)?this.activeGrip=this.grip1:this.grip2.ownsTarget($e)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},be.prototype.pointerUp=function(Ne){var $e=this.state;Oe.prototype.pointerUp.call(this,Ne),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(Ne),this._state="select",$e==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},be.prototype.adjustVisual=function(){},be.prototype.manipulate=function(Ne){this.state==="creating"?this.resize(Ne):this.state==="move"?(this.x1=this.manipulationStartX1+Ne.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Ne.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Ne.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Ne.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Ne)},be.prototype.resize=function(Ne){switch(this.activeGrip){case this.grip1:this.x1=Ne.x,this.y1=Ne.y;break;case this.grip2:case void 0:this.x2=Ne.x,this.y2=Ne.y}this.adjustVisual(),this.adjustControlBox()},be.prototype.select=function(){Oe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},be.prototype.deselect=function(){Oe.prototype.deselect.call(this),this.controlBox.style.display="none"},be.prototype.setupControlBox=function(){this.controlBox=le.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},be.prototype.adjustControlBox=function(){this.positionGrips()},be.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},be.prototype.createGrip=function(){var Ne=new Ae;return Ne.visual.transform.baseVal.appendItem(le.createTransform()),this.controlBox.appendChild(Ne.visual),Ne},be.prototype.positionGrips=function(){var Ne=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Ne/2,this.y1-Ne/2),this.positionGrip(this.grip2.visual,this.x2-Ne/2,this.y2-Ne/2)},be.prototype.positionGrip=function(Ne,$e,dt){var Je=Ne.transform.baseVal.getItem(0);Je.setTranslate($e,dt),Ne.transform.baseVal.replaceItem(Je,0)},be.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Oe.prototype.getState.call(this))},be.prototype.restoreState=function(Ne){Oe.prototype.restoreState.call(this,Ne);var $e=Ne;this.x1=$e.x1,this.y1=$e.y1,this.x2=$e.x2,this.y2=$e.y2},be.prototype.scale=function(Ne,$e){Oe.prototype.scale.call(this,Ne,$e),this.x1=this.x1*Ne,this.y1=this.y1*$e,this.x2=this.x2*Ne,this.y2=this.y2*$e,this.adjustVisual(),this.adjustControlBox()},be}(we),et=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.strokeColor="transparent",Je.strokeWidth=0,Je.strokeDasharray="",Je.setStrokeColor=Je.setStrokeColor.bind(Je),Je.setStrokeWidth=Je.setStrokeWidth.bind(Je),Je.setStrokeDasharray=Je.setStrokeDasharray.bind(Je),Je.strokeColor=dt.defaultColor,Je.strokeWidth=dt.defaultStrokeWidth,Je.strokeDasharray=dt.defaultStrokeDasharray,Je.strokePanel=new Se("Line color",dt.defaultColorSet,dt.defaultColor),Je.strokePanel.onColorChanged=Je.setStrokeColor,Je.strokeWidthPanel=new Xe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),Je.strokeWidthPanel.onWidthChanged=Je.setStrokeWidth,Je.strokeStylePanel=new Ge("Line style",dt.defaultStrokeDasharrays,dt.defaultStrokeDasharray),Je.strokeStylePanel.onStyleChanged=Je.setStrokeDasharray,Je}return he(be,Oe),be.prototype.ownsTarget=function(Ne){return!(!Oe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.selectorLine&&Ne!==this.visibleLine)},be.prototype.createVisual=function(){this.visual=le.createGroup(),this.selectorLine=le.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=le.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)},be.prototype.pointerDown=function(Ne,$e){Oe.prototype.pointerDown.call(this,Ne,$e),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},be.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()),le.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),le.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),le.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},be.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.adjustVisual(),this.colorChanged(Ne)},be.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.adjustVisual()},be.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.adjustVisual(),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ne=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Oe.prototype.getState.call(this));return Ne.typeName=be.typeName,Ne},be.prototype.restoreState=function(Ne){Oe.prototype.restoreState.call(this,Ne);var $e=Ne;this.strokeColor=$e.strokeColor,this.strokeWidth=$e.strokeWidth,this.strokeDasharray=$e.strokeDasharray,this.createVisual(),this.adjustVisual()},be.typeName="LineMarker",be.title="Line marker",be.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',be}(Ct),yt=function(Oe){function be(Ne,$e,dt,Je){var At=Oe.call(this,Ne,Je||'<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 At.fonts=[],At.fontBoxes=[],At.fonts=$e,At.currentFont=dt,At.setCurrentFont=At.setCurrentFont.bind(At),At}return he(be,Oe),be.prototype.getUi=function(){var Ne=this,$e=document.createElement("div");return $e.style.overflow="hidden",$e.style.flexGrow="2",this.fonts.forEach(function(dt){var Je=document.createElement("div");Je.style.display="inline-block",Je.style.alignItems="center",Je.style.justifyContent="space-between",Je.style.padding="5px",Je.style.borderWidth="2px",Je.style.borderStyle="solid",Je.style.overflow="hidden",Je.style.maxWidth=100/Ne.fonts.length-5+"%",Je.style.borderColor=dt===Ne.currentFont?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Je.addEventListener("click",function(){Ne.setCurrentFont(dt,Je)}),$e.appendChild(Je);var At=document.createElement("div");At.style.display="flex",At.style.minHeight="20px",At.style.flexGrow="2",At.style.fontFamily=dt,At.style.overflow="hidden";var en=document.createElement("div");en.style.whiteSpace="nowrap",en.style.overflow="hidden",en.style.textOverflow="ellipsis",en.innerHTML="The quick brown fox jumps over the lazy dog",At.appendChild(en),Je.appendChild(At),Ne.fontBoxes.push(Je)}),$e},be.prototype.setCurrentFont=function(Ne,$e){var dt=this;this.currentFont=Ne,this.fontBoxes.forEach(function(Je){Je.style.borderColor=Je===$e?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},be}(ue),st=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.color="transparent",Je.padding=5,Je.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Je.text=Je.DEFAULT_TEXT,Je.isMoved=!1,Je.color=dt.defaultColor,Je.fontFamily=dt.defaultFontFamily,Je.defaultSize={x:100,y:30},Je.setColor=Je.setColor.bind(Je),Je.setFont=Je.setFont.bind(Je),Je.renderText=Je.renderText.bind(Je),Je.sizeText=Je.sizeText.bind(Je),Je.textEditDivClicked=Je.textEditDivClicked.bind(Je),Je.showTextEditor=Je.showTextEditor.bind(Je),Je.setSize=Je.setSize.bind(Je),Je.positionTextEditor=Je.positionTextEditor.bind(Je),Je.colorPanel=new Se("Color",dt.defaultColorSet,dt.defaultColor),Je.colorPanel.onColorChanged=Je.setColor,Je.fontFamilyPanel=new yt("Font",dt.defaultFontFamilies,dt.defaultFontFamily),Je.fontFamilyPanel.onFontChanged=Je.setFont,Je}return he(be,Oe),be.prototype.ownsTarget=function(Ne){if(Oe.prototype.ownsTarget.call(this,Ne)||Ne===this.visual||Ne===this.textElement||Ne===this.bgRectangle)return!0;var $e=!1;return this.textElement.childNodes.forEach(function(dt){dt===Ne&&($e=!0)}),$e},be.prototype.createVisual=function(){this.visual=le.createGroup(),this.bgRectangle=le.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=le.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(le.createTransform()),this.textElement.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},be.prototype.pointerDown=function(Ne,$e){Oe.prototype.pointerDown.call(this,Ne,$e),this.isMoved=!1,this.pointerDownPoint=Ne,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},be.prototype.renderText=function(){var Ne=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($e){Ne.textElement.appendChild(le.createTSpan($e.trim()===""?" ":$e.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},be.prototype.getTextScale=function(){var Ne=this.textElement.getBBox(),$e=1;if(Ne.width>0&&Ne.height>0){var dt=(1*this.width-this.width*this.padding*2/100)/Ne.width,Je=(1*this.height-this.height*this.padding*2/100)/Ne.height;$e=Math.min(dt,Je)}return $e},be.prototype.getTextPosition=function(Ne){var $e=this.textElement.getBBox(),dt=0,Je=0;return $e.width>0&&$e.height>0&&(dt=(this.width-$e.width*Ne)/2,Je=this.height/2-$e.height*Ne/2),{x:dt,y:Je}},be.prototype.sizeText=function(){var Ne=this.textElement.getBBox(),$e=this.getTextScale(),dt=this.getTextPosition($e);dt.y-=Ne.y*$e,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+dt.x+"px, "+dt.y+"px) scale("+$e+", "+$e+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(dt.x,dt.y),this.textElement.transform.baseVal.getItem(1).setScale($e,$e))},be.prototype.manipulate=function(Ne){Oe.prototype.manipulate.call(this,Ne),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Ne.x-this.pointerDownPoint.x)>5||Math.abs(Ne.y-this.pointerDownPoint.y)>5)},be.prototype.resize=function(Ne){Oe.prototype.resize.call(this,Ne),this.isMoved=!0,this.setSize(),this.sizeText()},be.prototype.setSize=function(){Oe.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},be.prototype.pointerUp=function(Ne){var $e=this.state;$e==="creating"&&(this._suppressMarkerCreateEvent=!0),Oe.prototype.pointerUp.call(this,Ne),this.setSize(),($e==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},be.prototype.showTextEditor=function(){var Ne=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($e){$e.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var $e=Number.parseFloat(Ne.textEditor.style.fontSize);Ne.textEditor.clientWidth>=Number.parseInt(Ne.textEditor.style.maxWidth)&&$e>.9;)$e-=.1,Ne.textEditor.style.fontSize=Math.max($e,.9)+"em"}),this.textEditor.addEventListener("keyup",function($e){$e.cancelBubble=!0}),this.textEditor.addEventListener("paste",function($e){if($e.clipboardData){var dt=$e.clipboardData.getData("text"),Je=window.getSelection();if(!Je.rangeCount)return!1;Je.deleteFromDocument(),Je.getRangeAt(0).insertNode(document.createTextNode(dt)),$e.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Ne.textEditDivClicked(Ne.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},be.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Ne=this.getTextScale(),$e=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),dt=this.textElement.getBBox(),Je={x:dt.width*Ne,y:dt.height*Ne};$e.x-=Je.x/2,$e.y-=Je.y/2,this.textEditor.style.top=$e.y+"px",this.textEditor.style.left=$e.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-$e.x+"px",this.textEditor.style.fontSize=Math.max(16*Ne,12)+"px",this.textElement.style.display="none"}},be.prototype.textEditDivClicked=function(Ne){this.text=Ne.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},be.prototype.select=function(){Oe.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},be.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Oe.prototype.deselect.call(this)},be.prototype.dblClick=function(Ne,$e){Oe.prototype.dblClick.call(this,Ne,$e),this.showTextEditor()},be.prototype.setColor=function(Ne){this.textElement&&le.setAttributes(this.textElement,[["fill",Ne]]),this.color=Ne,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Ne)},be.prototype.setFont=function(Ne){this.textElement&&le.setAttributes(this.textElement,[["font-family",Ne]]),this.fontFamily=Ne,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},be.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},be.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ne=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Oe.prototype.getState.call(this));return Ne.typeName=be.typeName,Ne},be.prototype.restoreState=function(Ne){var $e=Ne;this.color=$e.color,this.fontFamily=$e.fontFamily,this.padding=$e.padding,this.text=$e.text,this.createVisual(),Oe.prototype.restoreState.call(this,Ne),this.setSize()},be.prototype.scale=function(Ne,$e){Oe.prototype.scale.call(this,Ne,$e),this.setSize(),this.sizeText(),this.positionTextEditor()},be.typeName="TextMarker",be.title="Text marker",be.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>',be}(ze),zt=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.color="transparent",Je.lineWidth=3,Je.drawing=!1,Je.pixelRatio=1,Je.color=dt.defaultColor,Je.lineWidth=dt.defaultStrokeWidth,Je.pixelRatio=dt.freehandPixelRatio,Je.setColor=Je.setColor.bind(Je),Je.addCanvas=Je.addCanvas.bind(Je),Je.finishCreation=Je.finishCreation.bind(Je),Je.setLineWidth=Je.setLineWidth.bind(Je),Je.colorPanel=new Se("Color",dt.defaultColorSet,dt.defaultColor),Je.colorPanel.onColorChanged=Je.setColor,Je.lineWidthPanel=new Xe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),Je.lineWidthPanel.onWidthChanged=Je.setLineWidth,Je}return he(be,Oe),be.prototype.ownsTarget=function(Ne){return!(!Oe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.drawingImage)},be.prototype.createVisual=function(){this.visual=le.createGroup(),this.drawingImage=le.createImage(),this.visual.appendChild(this.drawingImage);var Ne=le.createTransform();this.visual.transform.baseVal.appendItem(Ne),this.addMarkerVisualToContainer(this.visual)},be.prototype.pointerDown=function(Ne,$e){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(Ne.x,Ne.y),this.drawing=!0):Oe.prototype.pointerDown.call(this,Ne,$e)},be.prototype.manipulate=function(Ne){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Ne.x,Ne.y),this.canvasContext.stroke()):Oe.prototype.manipulate.call(this,Ne)},be.prototype.resize=function(Ne){Oe.prototype.resize.call(this,Ne),le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},be.prototype.pointerUp=function(Ne){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Oe.prototype.pointerUp.call(this,Ne)},be.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)},be.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Oe.prototype.select.call(this)},be.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Oe.prototype.deselect.call(this)},be.prototype.finishCreation=function(){for(var Ne=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),$e=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],dt=$e[0],Je=$e[1],At=$e[2],en=$e[3],pn=!1,ln=0;ln<this.canvasElement.height;ln++)for(var gn=0;gn<this.canvasElement.width;gn++)Ne.data[ln*this.canvasElement.width*4+4*gn+3]>0&&(pn=!0,ln<Je&&(Je=ln),gn<dt&&(dt=gn),ln>en&&(en=ln),gn>At&&(At=gn));if(pn){this.left=dt/this.pixelRatio,this.top=Je/this.pixelRatio,this.width=(At-dt)/this.pixelRatio,this.height=(en-Je)/this.pixelRatio;var Un=document.createElement("canvas");Un.width=At-dt,Un.height=en-Je,Un.getContext("2d").putImageData(this.canvasContext.getImageData(dt,Je,At-dt,en-Je),0,0),this.drawingImgUrl=Un.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},be.prototype.setDrawingImage=function(){le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},be.prototype.setColor=function(Ne){this.color=Ne,this.colorChanged(Ne)},be.prototype.setLineWidth=function(Ne){this.lineWidth=Ne},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ne=Object.assign({drawingImgUrl:this.drawingImgUrl},Oe.prototype.getState.call(this));return Ne.typeName=be.typeName,Ne},be.prototype.restoreState=function(Ne){this.createVisual(),Oe.prototype.restoreState.call(this,Ne),this.drawingImgUrl=Ne.drawingImgUrl,this.setDrawingImage()},be.prototype.scale=function(Ne,$e){Oe.prototype.scale.call(this,Ne,$e),this.setDrawingImage()},be.typeName="FreehandMarker",be.title="Freehand marker",be.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>',be}(ze),lt=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,dt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Je.typeBoxes=[],Je.currentType=$e,Je.setCurrentType=Je.setCurrentType.bind(Je),Je}return he(be,Oe),be.prototype.getUi=function(){var Ne=this,$e=document.createElement("div");$e.style.display="flex",$e.style.overflow="hidden",$e.style.flexGrow="2";for(var dt=function(en){var pn="both";switch(en){case 0:pn="both";break;case 1:pn="start";break;case 2:pn="end";break;case 3:pn="none"}var ln=document.createElement("div");if(ln.style.display="flex",ln.style.flexGrow="2",ln.style.alignItems="center",ln.style.justifyContent="space-between",ln.style.padding="5px",ln.style.borderWidth="2px",ln.style.borderStyle="solid",ln.style.borderColor=pn===Je.currentType?Je.uiStyleSettings.toolboxAccentColor:"transparent",ln.addEventListener("click",function(){Ne.setCurrentType(pn,ln)}),$e.appendChild(ln),pn==="both"||pn==="start"){var gn=document.createElement("div");gn.style.display="flex",gn.style.alignItems="center",gn.style.minHeight="20px",gn.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="`+(Je.uiStyleSettings!==void 0?Je.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,gn.style.marginLeft="5px",ln.appendChild(gn)}var Un=document.createElement("div");Un.style.display="flex",Un.style.alignItems="center",Un.style.minHeight="20px",Un.style.flexGrow="2";var An=document.createElement("hr");if(An.style.minWidth="20px",An.style.border="0px",An.style.borderTop="3px solid "+(Je.uiStyleSettings!==void 0?Je.uiStyleSettings.toolboxColor:"#eeeeee"),An.style.flexGrow="2",Un.appendChild(An),ln.appendChild(Un),pn==="both"||pn==="end"){var ni=document.createElement("div");ni.style.display="flex",ni.style.alignItems="center",ni.style.minHeight="20px",ni.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="`+(Je.uiStyleSettings!==void 0?Je.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,ni.style.marginRight="5px",ln.appendChild(ni)}Je.typeBoxes.push(ln)},Je=this,At=0;At<4;At++)dt(At);return $e},be.prototype.setCurrentType=function(Ne,$e){var dt=this;this.currentType=Ne,this.typeBoxes.forEach(function(Je){Je.style.borderColor=Je===$e?dt.uiStyleSettings!==void 0?dt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},be}(ue),tt=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.arrowType="end",Je.arrowBaseHeight=10,Je.arrowBaseWidth=10,Je.getArrowPoints=Je.getArrowPoints.bind(Je),Je.setArrowType=Je.setArrowType.bind(Je),Je.arrowTypePanel=new lt("Arrow type","end"),Je.arrowTypePanel.onArrowTypeChanged=Je.setArrowType,Je}return he(be,Oe),be.prototype.ownsTarget=function(Ne){return!(!Oe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.arrow1&&Ne!==this.arrow2)},be.prototype.getArrowPoints=function(Ne,$e){var dt=this.arrowBaseWidth+2*this.strokeWidth,Je=this.arrowBaseHeight+2*this.strokeWidth;return Ne-dt/2+","+($e+Je/2)+" "+Ne+","+($e-Je/2)+" "+(Ne+dt/2)+","+($e+Je/2)},be.prototype.createTips=function(){this.arrow1=le.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=le.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.arrow2)},be.prototype.pointerDown=function(Ne,$e){Oe.prototype.pointerDown.call(this,Ne,$e),this.state==="creating"&&this.createTips()},be.prototype.adjustVisual=function(){if(Oe.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",le.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),le.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Ne=0;Math.abs(this.x1-this.x2)>.1&&(Ne=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var $e=this.arrow1.transform.baseVal.getItem(0);$e.setRotate(Ne,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem($e,0);var dt=this.arrow2.transform.baseVal.getItem(0);dt.setRotate(Ne+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(dt,0)}},be.prototype.setArrowType=function(Ne){this.arrowType=Ne,this.adjustVisual(),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ne=Object.assign({arrowType:this.arrowType},Oe.prototype.getState.call(this));return Ne.typeName=be.typeName,Ne},be.prototype.restoreState=function(Ne){Oe.prototype.restoreState.call(this,Ne);var $e=Ne;this.arrowType=$e.arrowType,this.createTips(),this.adjustVisual()},be.typeName="ArrowMarker",be.title="Arrow marker",be.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',be}(et),ut=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.fillColor=dt.defaultFillColor,Je.strokeWidth=0,Je.fillPanel=new Se("Color",dt.defaultColorSet,dt.defaultFillColor),Je.fillPanel.onColorChanged=Je.setFillColor,Je}return he(be,Oe),Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ne=Oe.prototype.getState.call(this);return Ne.typeName=be.typeName,Ne},be.typeName="CoverMarker",be.title="Cover marker",be.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',be}(Ze),mt=function(Oe){function be(Ne,$e,dt,Je){var At=Oe.call(this,Ne,Je||'<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 At.opacities=[],At.opacityBoxes=[],At.opacities=$e,At.currentOpacity=dt,At.setCurrentOpacity=At.setCurrentOpacity.bind(At),At}return he(be,Oe),be.prototype.getUi=function(){var Ne=this,$e=document.createElement("div");return $e.style.display="flex",$e.style.overflow="hidden",$e.style.flexGrow="2",$e.style.justifyContent="space-between",this.opacities.forEach(function(dt){var Je=document.createElement("div");Je.style.display="flex",Je.style.alignItems="center",Je.style.justifyContent="center",Je.style.padding="5px",Je.style.borderWidth="2px",Je.style.borderStyle="solid",Je.style.borderColor=dt===Ne.currentOpacity?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Je.addEventListener("click",function(){Ne.setCurrentOpacity(dt,Je)}),$e.appendChild(Je);var At=document.createElement("div");At.innerText=100*dt+"%",Je.appendChild(At),Ne.opacityBoxes.push(Je)}),$e},be.prototype.setCurrentOpacity=function(Ne,$e){var dt=this;this.currentOpacity=Ne,this.opacityBoxes.forEach(function(Je){Je.style.borderColor=Je===$e?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},be}(ue),Pt=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.setOpacity=Je.setOpacity.bind(Je),Je.fillColor=dt.defaultHighlightColor,Je.strokeWidth=0,Je.opacity=dt.defaultHighlightOpacity,Je.fillPanel=new Se("Color",dt.defaultColorSet,Je.fillColor),Je.fillPanel.onColorChanged=Je.setFillColor,Je.opacityPanel=new mt("Opacity",dt.defaultOpacitySteps,Je.opacity),Je.opacityPanel.onOpacityChanged=Je.setOpacity,Je}return he(be,Oe),be.prototype.setOpacity=function(Ne){this.opacity=Ne,this.visual&&le.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ne=Oe.prototype.getState.call(this);return Ne.typeName=be.typeName,Ne},be.typeName="HighlightMarker",be.title="Highlight marker",be.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>',be}(ut),gt='<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>',Ft='<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>',Ht=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.bgColor="transparent",Je.tipPosition={x:0,y:0},Je.tipBase1Position={x:0,y:0},Je.tipBase2Position={x:0,y:0},Je.tipMoving=!1,Je.color=dt.defaultStrokeColor,Je.bgColor=dt.defaultFillColor,Je.fontFamily=dt.defaultFontFamily,Je.defaultSize={x:100,y:30},Je.setBgColor=Je.setBgColor.bind(Je),Je.getTipPoints=Je.getTipPoints.bind(Je),Je.positionTip=Je.positionTip.bind(Je),Je.setTipPoints=Je.setTipPoints.bind(Je),Je.colorPanel=new Se("Text color",dt.defaultColorSet,Je.color,gt),Je.colorPanel.onColorChanged=Je.setColor,Je.bgColorPanel=new Se("Fill color",dt.defaultColorSet,Je.bgColor,Ft),Je.bgColorPanel.onColorChanged=Je.setBgColor,Je.fontFamilyPanel=new yt("Font",dt.defaultFontFamilies,dt.defaultFontFamily),Je.fontFamilyPanel.onFontChanged=Je.setFont,Je.tipGrip=new Ae,Je.tipGrip.visual.transform.baseVal.appendItem(le.createTransform()),Je.controlBox.appendChild(Je.tipGrip.visual),Je}return he(be,Oe),be.prototype.ownsTarget=function(Ne){return Oe.prototype.ownsTarget.call(this,Ne)||this.tipGrip.ownsTarget(Ne)||this.tip===Ne},be.prototype.createTip=function(){le.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=le.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},be.prototype.pointerDown=function(Ne,$e){this.state==="new"&&Oe.prototype.pointerDown.call(this,Ne,$e),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget($e)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Oe.prototype.pointerDown.call(this,Ne,$e)},be.prototype.pointerUp=function(Ne){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Oe.prototype.pointerUp.call(this,Ne);else{var $e=this.state==="creating";Oe.prototype.pointerUp.call(this,Ne),this.setTipPoints($e),this.positionTip()}},be.prototype.manipulate=function(Ne){if(this.tipMoving){var $e=this.unrotatePoint(Ne);this.tipPosition={x:$e.x-this.manipulationStartLeft,y:$e.y-this.manipulationStartTop},this.positionTip()}else Oe.prototype.manipulate.call(this,Ne)},be.prototype.setBgColor=function(Ne){this.bgRectangle&&this.tip&&(le.setAttributes(this.bgRectangle,[["fill",Ne]]),le.setAttributes(this.tip,[["fill",Ne]])),this.bgColor=Ne,this.fillColorChanged(Ne)},be.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},be.prototype.setTipPoints=function(Ne){Ne===void 0&&(Ne=!1);var $e=Math.min(this.height/2,15),dt=this.height/5;Ne&&(this.tipPosition={x:$e+dt/2,y:this.height+20});var Je=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Je<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(dt=this.width/5,$e=Math.min(this.width/2,15),this.tipBase1Position={x:$e,y:0},this.tipBase2Position={x:$e+dt,y:0}):(this.tipBase1Position={x:0,y:$e},this.tipBase2Position={x:0,y:$e+dt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Je<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(dt=this.width/5,$e=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-$e-dt,y:0},this.tipBase2Position={x:this.width-$e,y:0}):(this.tipBase1Position={x:this.width,y:$e},this.tipBase2Position={x:this.width,y:$e+dt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Je<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(dt=this.width/5,$e=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-$e-dt,y:this.height},this.tipBase2Position={x:this.width-$e,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-$e-dt},this.tipBase2Position={x:this.width,y:this.height-$e}):Je<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(dt=this.width/5,$e=Math.min(this.width/2,15),this.tipBase1Position={x:$e,y:this.height},this.tipBase2Position={x:$e+dt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-$e},this.tipBase2Position={x:0,y:this.height-$e-dt})},be.prototype.resize=function(Ne){Oe.prototype.resize.call(this,Ne),this.positionTip()},be.prototype.positionTip=function(){le.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Ne=this.tipGrip.visual.transform.baseVal.getItem(0);Ne.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Ne,0)},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),be.prototype.select=function(){this.positionTip(),Oe.prototype.select.call(this)},be.prototype.getState=function(){var Ne=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Oe.prototype.getState.call(this));return Ne.typeName=be.typeName,Ne},be.prototype.restoreState=function(Ne){var $e=Ne;this.bgColor=$e.bgColor,this.tipPosition=$e.tipPosition,Oe.prototype.restoreState.call(this,Ne),this.createTip(),this.setTipPoints()},be.prototype.scale=function(Ne,$e){Oe.prototype.scale.call(this,Ne,$e),this.tipPosition={x:this.tipPosition.x*Ne,y:this.tipPosition.y*$e},this.positionTip()},be.typeName="CalloutMarker",be.title="Callout marker",be.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>',be}(st),hn=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.fillColor="transparent",Je.strokeColor="transparent",Je.strokeWidth=0,Je.strokeDasharray="",Je.opacity=1,Je.strokeColor=dt.defaultColor,Je.strokeWidth=dt.defaultStrokeWidth,Je.strokeDasharray=dt.defaultStrokeDasharray,Je.fillColor=dt.defaultFillColor,Je.setStrokeColor=Je.setStrokeColor.bind(Je),Je.setFillColor=Je.setFillColor.bind(Je),Je.setStrokeWidth=Je.setStrokeWidth.bind(Je),Je.setStrokeDasharray=Je.setStrokeDasharray.bind(Je),Je.setOpacity=Je.setOpacity.bind(Je),Je.createVisual=Je.createVisual.bind(Je),Je.strokePanel=new Se("Line color",ge(dt.defaultColorSet,["transparent"]),dt.defaultColor),Je.strokePanel.onColorChanged=Je.setStrokeColor,Je.fillPanel=new Se("Fill color",ge(dt.defaultColorSet,["transparent"]),Je.fillColor,Ft),Je.fillPanel.onColorChanged=Je.setFillColor,Je.strokeWidthPanel=new Xe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),Je.strokeWidthPanel.onWidthChanged=Je.setStrokeWidth,Je.strokeStylePanel=new Ge("Line style",dt.defaultStrokeDasharrays,dt.defaultStrokeDasharray),Je.strokeStylePanel.onStyleChanged=Je.setStrokeDasharray,Je.opacityPanel=new mt("Opacity",dt.defaultOpacitySteps,Je.opacity),Je.opacityPanel.onOpacityChanged=Je.setOpacity,Je}return he(be,Oe),be.prototype.ownsTarget=function(Ne){return!(!Oe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual)},be.prototype.createVisual=function(){this.visual=le.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)},be.prototype.pointerDown=function(Ne,$e){Oe.prototype.pointerDown.call(this,Ne,$e),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},be.prototype.manipulate=function(Ne){Oe.prototype.manipulate.call(this,Ne)},be.prototype.resize=function(Ne){Oe.prototype.resize.call(this,Ne),this.setSize()},be.prototype.setSize=function(){Oe.prototype.setSize.call(this),le.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},be.prototype.pointerUp=function(Ne){Oe.prototype.pointerUp.call(this,Ne),this.setSize()},be.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.visual&&le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ne),this.stateChanged()},be.prototype.setFillColor=function(Ne){this.fillColor=Ne,this.visual&&le.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Ne),this.stateChanged()},be.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.visual&&le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},be.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.visual&&le.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},be.prototype.setOpacity=function(Ne){this.opacity=Ne,this.visual&&le.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ne=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Oe.prototype.getState.call(this));return Ne.typeName=be.typeName,Ne},be.prototype.restoreState=function(Ne){var $e=Ne;this.fillColor=$e.fillColor,this.strokeColor=$e.strokeColor,this.strokeWidth=$e.strokeWidth,this.strokeDasharray=$e.strokeDasharray,this.opacity=$e.opacity,this.createVisual(),Oe.prototype.restoreState.call(this,Ne),this.setSize()},be.prototype.scale=function(Ne,$e){Oe.prototype.scale.call(this,Ne,$e),this.setSize()},be.typeName="EllipseMarker",be.title="Ellipse marker",be.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>',be}(ze),Jt=function(Oe){function be(Ne,$e,dt){return Oe.call(this,Ne,$e,dt)||this}return he(be,Oe),Object.defineProperty(be.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),be.prototype.ownsTarget=function(Ne){return!(!Oe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.tip1&&Ne!==this.tip2)},be.prototype.createTips=function(){this.tip1=le.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(le.createTransform()),this.visual.appendChild(this.tip1),this.tip2=le.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(le.createTransform()),this.visual.appendChild(this.tip2)},be.prototype.pointerDown=function(Ne,$e){Oe.prototype.pointerDown.call(this,Ne,$e),this.state==="creating"&&this.createTips()},be.prototype.adjustVisual=function(){if(Oe.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(le.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()]]),le.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 Ne=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),$e=this.tip1.transform.baseVal.getItem(0);$e.setRotate(Ne,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem($e,0);var dt=this.tip2.transform.baseVal.getItem(0);dt.setRotate(Ne+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(dt,0)}},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ne=Oe.prototype.getState.call(this);return Ne.typeName=be.typeName,Ne},be.prototype.restoreState=function(Ne){Oe.prototype.restoreState.call(this,Ne),this.createTips(),this.adjustVisual()},be.typeName="MeasurementMarker",be.title="Measurement marker",be.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>',be}(et),bn=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.strokePanel.colors=dt.defaultColorSet,Je.fillColor="transparent",Je}return he(be,Oe),Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ne=Oe.prototype.getState.call(this);return Ne.typeName=be.typeName,Ne},be.typeName="EllipseFrameMarker",be.title="Ellipse frame marker",be.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>',be}(hn),Wt=function(){function Oe(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Oe.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Oe.prototype.addUndoStep=function(be){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(be)||(this.undoStack.push(be),JSON.stringify(this.lastRedoStep)!==JSON.stringify(be)&&this.redoStack.splice(0,this.redoStack.length))},Oe.prototype.replaceLastUndoStep=function(be){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=be)},Oe.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Oe.prototype.undo=function(){if(this.undoStack.length>1){var be=this.undoStack.pop();return be!==void 0&&this.redoStack.push(be),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Oe.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Oe}(),Kt=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.strokeColor="transparent",Je.strokeWidth=0,Je.strokeDasharray="",Je.curveX=0,Je.curveY=0,Je.manipulationStartCurveX=0,Je.manipulationStartCurveY=0,Je.setStrokeColor=Je.setStrokeColor.bind(Je),Je.setStrokeWidth=Je.setStrokeWidth.bind(Je),Je.setStrokeDasharray=Je.setStrokeDasharray.bind(Je),Je.positionGrips=Je.positionGrips.bind(Je),Je.addControlGrips=Je.addControlGrips.bind(Je),Je.adjustVisual=Je.adjustVisual.bind(Je),Je.setupControlBox=Je.setupControlBox.bind(Je),Je.resize=Je.resize.bind(Je),Je.strokeColor=dt.defaultColor,Je.strokeWidth=dt.defaultStrokeWidth,Je.strokeDasharray=dt.defaultStrokeDasharray,Je.strokePanel=new Se("Line color",dt.defaultColorSet,dt.defaultColor),Je.strokePanel.onColorChanged=Je.setStrokeColor,Je.strokeWidthPanel=new Xe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),Je.strokeWidthPanel.onWidthChanged=Je.setStrokeWidth,Je.strokeStylePanel=new Ge("Line style",dt.defaultStrokeDasharrays,dt.defaultStrokeDasharray),Je.strokeStylePanel.onStyleChanged=Je.setStrokeDasharray,Je}return he(be,Oe),be.prototype.ownsTarget=function(Ne){return!(!Oe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.selectorCurve&&Ne!==this.visibleCurve&&!this.curveGrip.ownsTarget(Ne))},be.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},be.prototype.createVisual=function(){this.visual=le.createGroup(),this.selectorCurve=le.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=le.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)},be.prototype.pointerDown=function(Ne,$e){Oe.prototype.pointerDown.call(this,Ne,$e),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Ne.x,this.curveY=Ne.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget($e)&&(this.activeGrip=this.curveGrip,this._state="resize")},be.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),le.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),le.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),le.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},be.prototype.setupControlBox=function(){Oe.prototype.setupControlBox.call(this),this.curveControlLine1=le.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=le.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)},be.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Oe.prototype.addControlGrips.call(this)},be.prototype.positionGrips=function(){Oe.prototype.positionGrips.call(this);var Ne=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Ne/2,this.curveY-Ne/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()))},be.prototype.manipulate=function(Ne){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Ne.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Ne.y-this.manipulationStartY),Oe.prototype.manipulate.call(this,Ne)},be.prototype.resize=function(Ne){this.activeGrip===this.curveGrip&&(this.curveX=Ne.x,this.curveY=Ne.y),Oe.prototype.resize.call(this,Ne),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},be.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.adjustVisual(),this.colorChanged(Ne)},be.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.adjustVisual()},be.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.adjustVisual()},be.prototype.scale=function(Ne,$e){this.curveX=this.curveX*Ne,this.curveY=this.curveY*$e,Oe.prototype.scale.call(this,Ne,$e)},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ne=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Oe.prototype.getState.call(this));return Ne.typeName=be.typeName,Ne},be.prototype.restoreState=function(Ne){Oe.prototype.restoreState.call(this,Ne);var $e=Ne;this.strokeColor=$e.strokeColor,this.strokeWidth=$e.strokeWidth,this.strokeDasharray=$e.strokeDasharray,this.curveX=$e.curveX,this.curveY=$e.curveY,this.createVisual(),this.adjustVisual()},be.typeName="CurveMarker",be.title="Curve marker",be.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>',be}(Ct),Xt=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.fillColor="transparent",Je.strokeColor="transparent",Je.strokeWidth=0,Je.strokeDasharray="",Je.textColor="transparent",Je.fontSize="1rem",Je.isMoved=!1,Je.captionText="Caption",Je.PADDING=5,Je.captionBoxWidth=0,Je.captionBoxHeight=0,Je.strokeColor=dt.defaultColor,Je.strokeWidth=dt.defaultStrokeWidth,Je.strokeDasharray=dt.defaultStrokeDasharray,Je.fillColor=dt.defaultFillColor,Je.textColor=dt.defaultStrokeColor,Je.fontFamily=dt.defaultFontFamily,Je.fontSize=dt.defaultCaptionFontSize,Je.captionText=dt.defaultCaptionText,Je.setStrokeColor=Je.setStrokeColor.bind(Je),Je.setFillColor=Je.setFillColor.bind(Je),Je.setStrokeWidth=Je.setStrokeWidth.bind(Je),Je.setStrokeDasharray=Je.setStrokeDasharray.bind(Je),Je.createVisual=Je.createVisual.bind(Je),Je.sizeCaption=Je.sizeCaption.bind(Je),Je.setCaptionText=Je.setCaptionText.bind(Je),Je.showTextEditor=Je.showTextEditor.bind(Je),Je.positionTextEditor=Je.positionTextEditor.bind(Je),Je.finishTextEditing=Je.finishTextEditing.bind(Je),Je.setFont=Je.setFont.bind(Je),Je.setTextColor=Je.setTextColor.bind(Je),Je.strokePanel=new Se("Line color",ge(dt.defaultColorSet,["transparent"]),Je.strokeColor),Je.strokePanel.onColorChanged=Je.setStrokeColor,Je.fillPanel=new Se("Fill color",ge(dt.defaultColorSet,["transparent"]),Je.fillColor,Ft),Je.fillPanel.onColorChanged=Je.setFillColor,Je.strokeWidthPanel=new Xe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),Je.strokeWidthPanel.onWidthChanged=Je.setStrokeWidth,Je.strokeStylePanel=new Ge("Line style",dt.defaultStrokeDasharrays,dt.defaultStrokeDasharray),Je.strokeStylePanel.onStyleChanged=Je.setStrokeDasharray,Je.fontFamilyPanel=new yt("Font",dt.defaultFontFamilies,dt.defaultFontFamily),Je.fontFamilyPanel.onFontChanged=Je.setFont,Je.textColorPanel=new Se("Text color",dt.defaultColorSet,Je.textColor,gt),Je.textColorPanel.onColorChanged=Je.setTextColor,Je}return he(be,Oe),be.prototype.ownsTarget=function(Ne){return!(!Oe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.frame&&Ne!==this.captionBg&&Ne!==this.captionElement)},be.prototype.createVisual=function(){this.visual=le.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=le.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=le.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=le.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()},be.prototype.setCaptionText=function(Ne){this.captionText=Ne,this.captionElement.textContent=this.captionText,this.sizeCaption()},be.prototype.pointerDown=function(Ne,$e){Oe.prototype.pointerDown.call(this,Ne,$e),this.isMoved=!1,this.pointerDownPoint=Ne,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},be.prototype.manipulate=function(Ne){Oe.prototype.manipulate.call(this,Ne),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Ne.x-this.pointerDownPoint.x)>5||Math.abs(Ne.y-this.pointerDownPoint.y)>5)},be.prototype.resize=function(Ne){Oe.prototype.resize.call(this,Ne),this.setSize()},be.prototype.sizeCaption=function(){var Ne=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Ne.width+2*this.PADDING,this.captionBoxHeight=Ne.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),le.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')"]]),le.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')"]])},be.prototype.showTextEditor=function(){var Ne=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($e){$e.stopPropagation()}),this.textEditBox.addEventListener("keypress",function($e){$e.key==="Enter"&&Ne.finishTextEditing(Ne.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function($e){$e.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Ne.finishTextEditing(Ne.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Ne.finishTextEditing(Ne.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},be.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"))},be.prototype.finishTextEditing=function(Ne){this.setCaptionText(Ne.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},be.prototype.setFont=function(Ne){this.captionElement&&le.setAttributes(this.captionElement,[["font-family",Ne]]),this.fontFamily=Ne,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},be.prototype.setTextColor=function(Ne){this.captionElement&&le.setAttributes(this.captionElement,[["fill",Ne]]),this.textColor=Ne,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},be.prototype.setSize=function(){Oe.prototype.setSize.call(this),le.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},be.prototype.pointerUp=function(Ne){Oe.prototype.pointerUp.call(this,Ne),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},be.prototype.dblClick=function(Ne,$e){Oe.prototype.dblClick.call(this,Ne,$e),this.showTextEditor()},be.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.frame&&le.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Ne),this.stateChanged()},be.prototype.setFillColor=function(Ne){this.fillColor=Ne,this.captionBg&&le.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Ne),this.stateChanged()},be.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.frame&&le.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},be.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.frame&&le.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ne=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},Oe.prototype.getState.call(this));return Ne.typeName=this.typeName,Ne},be.prototype.restoreState=function(Ne){var $e=Ne;this.fillColor=$e.fillColor,this.strokeColor=$e.strokeColor,this.strokeWidth=$e.strokeWidth,this.strokeDasharray=$e.strokeDasharray,this.textColor=$e.textColor,this.fontFamily=$e.fontFamily,this.captionText=$e.captionText,this.fontSize=$e.fontSize,this.createVisual(),Oe.prototype.restoreState.call(this,Ne),this.setSize()},be.prototype.scale=function(Ne,$e){Oe.prototype.scale.call(this,Ne,$e),this.setSize()},be.typeName="CaptionFrameMarker",be.title="Caption frame marker",be.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>',be}(ze),$t=function(){function Oe(be,Ne){Ne===void 0&&(Ne=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=be,this.cancelable=Ne}return Object.defineProperty(Oe.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Oe.prototype.preventDefault=function(){this._defaultPrevented=!0},Oe}(),kt=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,!1)||this;return Je.dataUrl=$e,Je.state=dt,Je}return he(be,Oe),be}($t),pt=function(Oe){function be(Ne,$e,dt){dt===void 0&&(dt=!1);var Je=Oe.call(this,Ne,dt)||this;return Je.marker=$e,Je}return he(be,Oe),be}($t),Bt=function(){function Oe(){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 Oe.prototype.addEventListener=function(be,Ne){this[be].push(Ne)},Oe.prototype.removeEventListener=function(be,Ne){var $e=this[be].indexOf(Ne);$e>-1&&this[be].splice($e,1)},Oe}(),xt=function(){function Oe(be){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new at,this._isOpen=!1,this.undoRedoManager=new Wt,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 Bt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Oe.instanceCounter++,this.styles=new z(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=be,this.targetRoot=document.body,this.width=be.clientWidth,this.height=be.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(Oe.prototype,"ALL_MARKER_TYPES",{get:function(){return[ft,zt,tt,st,bn,hn,Pt,Ht,Jt,ut,et,Kt,Xt]},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ft,zt,tt,st,hn,Pt,Ht]},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ft,zt,tt,st,Pt]},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(be){var Ne=this;this._availableMarkerTypes.splice(0),be.forEach(function($e){if(typeof $e=="string"){var dt=Ne.ALL_MARKER_TYPES.find(function(Je){return Je.typeName===$e});dt!==void 0&&Ne._availableMarkerTypes.push(dt)}else Ne._availableMarkerTypes.push($e)})},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(be){this._zoomLevel=be,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(Oe.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Oe.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ve.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Oe.prototype.show=function(){var be=this;this.styles.styleSheetRoot===void 0&&ce.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ce.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Ne){return Ne(new $t(be))})},Oe.prototype.render=function(){return ye(this,void 0,void 0,function(){var be;return xe(this,function(Ne){switch(Ne.label){case 0:return this.setCurrentMarker(),(be=new de).naturalSize=this.renderAtNaturalSize,be.imageType=this.renderImageType,be.imageQuality=this.renderImageQuality,be.markersOnly=this.renderMarkersOnly,be.width=this.renderWidth,be.height=this.renderHeight,[4,be.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Ne.sent(),[4,be.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Ne.sent()]}})})},Oe.prototype.close=function(be){var Ne=this;if(be===void 0&&(be=!1),this.isOpen){var $e=!1;be||this.eventListeners.beforeclose.forEach(function(dt){var Je=new $t(Ne,!0);dt(Je),Je.defaultPrevented&&($e=!0)}),$e||(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(dt){return dt(new $t(Ne))}),this.detachEvents(),this._isOpen=!1)}},Oe.prototype.addMarkersToToolbar=function(){for(var be,Ne=[],$e=0;$e<arguments.length;$e++)Ne[$e]=arguments[$e];(be=this._availableMarkerTypes).push.apply(be,Ne)},Oe.prototype.addRenderEventListener=function(be){this.addEventListener("render",function(Ne){be(Ne.dataUrl,Ne.state)})},Oe.prototype.removeRenderEventListener=function(be){},Oe.prototype.addCloseEventListener=function(be){this.addEventListener("close",function(){be()})},Oe.prototype.removeCloseEventListener=function(be){},Oe.prototype.setupResizeObserver=function(){var be=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){be.resize(be.target.clientWidth,be.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return be.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Oe.prototype.onPopupTargetResize=function(){var be=1*this.target.clientWidth/this.target.clientHeight,Ne=this.editorCanvas.clientWidth/be>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*be:this.editorCanvas.clientWidth,$e=Ne<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/be;this.resize(Ne,$e)},Oe.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Oe.prototype.resize=function(be,Ne){this._isResizing=!0;var $e=be/this.imageWidth,dt=Ne/this.imageHeight;this.imageWidth=Math.round(be),this.imageHeight=Math.round(Ne),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($e,dt),this._isResizing=!1},Oe.prototype.scaleMarkers=function(be,Ne){var $e,dt=this;this._currentMarker&&this._currentMarker instanceof st?this._currentMarker.scale(be,Ne):($e=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Je){Je!==dt._currentMarker&&Je.scale(be,Ne)}),$e!==void 0&&this.setCurrentMarker($e)},Oe.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"},Oe.prototype.setTopLeft=function(){var be=this.editingTarget.getBoundingClientRect(),Ne=this.editorCanvas.getBoundingClientRect();this.left=be.left-Ne.left,this.top=be.top-Ne.top},Oe.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)},Oe.prototype.addDefs=function(){for(var be,Ne=[],$e=0;$e<arguments.length;$e++)Ne[$e]=arguments[$e];this.defs=le.createDefs(),this.addDefsToImage(),(be=this.defs).append.apply(be,Ne)},Oe.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Oe.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)},Oe.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Oe.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Oe.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)},Oe.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Oe.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)},Oe.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 be=document.createElement("a");be.href="https://markerjs.com/",be.target="_blank",be.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>',be.title="Powered by marker.js",be.style.display="grid",be.style.alignItems="center",be.style.justifyItems="center",be.style.padding="3px",be.style.width="20px",be.style.height="20px",this.logoUI.appendChild(be),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Oe.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")},Oe.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"},Oe.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Oe.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 be=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=be+"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 ie(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 se(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Oe.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Oe.prototype.removeMarker=function(be){this.markerImage.removeChild(be.container),this.markers.indexOf(be)>-1&&this.markers.splice(this.markers.indexOf(be),1),be.dispose()},Oe.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())},Oe.prototype.toolbarButtonClicked=function(be,Ne){if(be==="marker"&&Ne!==void 0)this.createNewMarker(Ne);else if(be==="action")switch(Ne){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()}},Oe.prototype.deleteSelectedMarker=function(){var be=this;if(this._currentMarker!==void 0){var Ne=!1;if(this.eventListeners.markerbeforedelete.forEach(function(dt){var Je=new pt(be,be._currentMarker,!0);dt(Je),Je.defaultPrevented&&(Ne=!0)}),!Ne){var $e=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(dt){return dt(new pt(be,$e))})}}},Oe.prototype.clear=function(){var be=this,Ne=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(At){var en=new pt(be,void 0,!0);At(en),en.defaultPrevented&&(Ne=!0)}),!Ne)){this.setCurrentMarker();for(var $e=function(At){var en=dt.markers[At];dt.setCurrentMarker(dt.markers[At]),dt._currentMarker.dispose(),dt.markerImage.removeChild(dt._currentMarker.container),dt.markers.splice(dt.markers.indexOf(dt._currentMarker),1),dt.eventListeners.markerdelete.forEach(function(pn){return pn(new pt(be,en))})},dt=this,Je=this.markers.length-1;Je>=0;Je--)$e(Je);this.addUndoStep()}},Object.defineProperty(Oe.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Oe.prototype.showNotesEditor=function(){var be;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=(be=this._currentMarker.notes)!==null&&be!==void 0?be:"",this.overlayContainer.appendChild(this.notesArea))},Oe.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)},Oe.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Oe.prototype.addUndoStep=function(){var be=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Ne=this.getState(),$e=this.undoRedoManager.getLastUndoStep();if(!$e||$e.width===Ne.width&&$e.height===Ne.height){var dt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Ne),dt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Je){return Je(new $t(be))})}else this.undoRedoManager.replaceLastUndoStep(Ne),this.eventListeners.statechange.forEach(function(Je){return Je(new $t(be))})}},Oe.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Oe.prototype.undoStep=function(){var be=this,Ne=this.undoRedoManager.undo();Ne!==void 0&&(this.restoreState(Ne),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function($e){return $e(new $t(be))}))},Oe.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Oe.prototype.redoStep=function(){var be=this,Ne=this.undoRedoManager.redo();Ne!==void 0&&(this.restoreState(Ne),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function($e){return $e(new $t(be))}))},Oe.prototype.stepZoom=function(){var be=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=be<this.zoomSteps.length-1?this.zoomSteps[be+1]:this.zoomSteps[0]},Oe.prototype.panTo=function(be){this.contentDiv.scrollBy({left:this.prevPanPoint.x-be.x,top:this.prevPanPoint.y-be.y}),this.prevPanPoint=be},Oe.prototype.startRenderAndClose=function(){return ye(this,void 0,void 0,function(){var be,Ne,$e=this;return xe(this,function(dt){switch(dt.label){case 0:return[4,this.render()];case 1:return be=dt.sent(),Ne=this.getState(),this.eventListeners.render.forEach(function(Je){return Je(new kt($e,be,Ne))}),this.close(!0),[2]}})})},Oe.prototype.getState=function(be){be===!0&&this.setCurrentMarker();var Ne={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function($e){return Ne.markers.push($e.getState())}),Ne},Oe.prototype.restoreState=function(be){var Ne=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);be.markers.forEach(function($e){var dt=Ne._availableMarkerTypes.find(function(At){return At.typeName===$e.typeName});if(dt!==void 0){var Je=Ne.addNewMarker(dt);Je.restoreState($e),Ne.markers.push(Je)}}),be.width&&be.height&&(be.width!==this.imageWidth||be.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/be.width,this.imageHeight/be.height),this.eventListeners.restorestate.forEach(function($e){return $e(new $t(Ne))})},Oe.prototype.addNewMarker=function(be){var Ne=le.createGroup();return this.markerImage.appendChild(Ne),new be(Ne,this.overlayContainer,this.settings)},Oe.prototype.createNewMarker=function(be){var Ne,$e=this;(Ne=typeof be=="string"?this._availableMarkerTypes.find(function(dt){return dt.typeName===be}):be)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Ne),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(Ne.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(dt){return dt(new pt($e,$e._currentMarker))}))},Oe.prototype.markerCreated=function(be){var Ne=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(be),this.setCurrentMarker(be),be instanceof zt&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(zt):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function($e){return $e(new pt(Ne,Ne._currentMarker))})},Oe.prototype.colorChanged=function(be){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=be,this.settings.defaultStrokeColor=be)},Oe.prototype.fillColorChanged=function(be){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=be)},Oe.prototype.markerStateChanged=function(be){var Ne=this;this.eventListeners.markerchange.forEach(function($e){return $e(new pt(Ne,be))})},Oe.prototype.setCurrentMarker=function(be){var Ne=this;this._currentMarker!==be&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function($e){return $e(new pt(Ne,Ne._currentMarker))})),this._currentMarker=be,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($e){return $e(new pt(Ne,Ne._currentMarker))}))},Oe.prototype.onPointerDown=function(be){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||be.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Ne=this.markers.find(function($e){return $e.ownsTarget(be.target)});Ne!==void 0?(this.setCurrentMarker(Ne),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(be.clientX,be.clientY),be.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:be.clientX,y:be.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(be.clientX,be.clientY))},Oe.prototype.onDblClick=function(be){if(this._isFocused||this.focus(),this.mode==="select"){var Ne=this.markers.find(function($e){return $e.ownsTarget(be.target)});Ne!==void 0&&Ne!==this._currentMarker&&this.setCurrentMarker(Ne),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(be.clientX,be.clientY),be.target):this.setCurrentMarker()}},Oe.prototype.onPointerMove=function(be){this.touchPoints!==1&&be.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||be.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(be.clientX,be.clientY)):this.zoomLevel>1&&this.panTo({x:be.clientX,y:be.clientY}))},Oe.prototype.onPointerUp=function(be){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(be.clientX,be.clientY)),this.isDragging=!1,this.addUndoStep()},Oe.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Oe.prototype.onKeyUp=function(be){this._currentMarker===void 0||this.notesArea!==void 0||be.key!=="Delete"&&be.key!=="Backspace"||this.deleteSelectedMarker()},Oe.prototype.clientToLocalCoordinates=function(be,Ne){var $e=this.markerImage.getBoundingClientRect();return{x:(be-$e.left)/this.zoomLevel,y:(Ne-$e.top)/this.zoomLevel}},Oe.prototype.onWindowResize=function(){this.positionUI()},Oe.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var be=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=be+"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()},Oe.prototype.addLicenseKey=function(be){ve.addKey(be)},Oe.prototype.addEventListener=function(be,Ne){this.eventListeners.addEventListener(be,Ne)},Oe.prototype.removeEventListener=function(be,Ne){this.eventListeners.removeEventListener(be,Ne)},Oe.prototype.renderState=function(be){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(be),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Oe.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Oe.prototype.focus=function(){var be=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Ne){return Ne(new $t(be))}))},Oe.prototype.blur=function(){var be=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Ne){return Ne(new $t(be))}))},Oe.instanceCounter=0,Oe}(),vt=Ee(99064),nt=Ee(955),He=(Oe,be,Ne)=>new Promise(($e,dt)=>{var Je=pn=>{try{en(Ne.next(pn))}catch(ln){dt(ln)}},At=pn=>{try{en(Ne.throw(pn))}catch(ln){dt(ln)}},en=pn=>pn.done?$e(pn.value):Promise.resolve(pn.value).then(Je,At);en((Ne=Ne.apply(Oe,be)).next())}),We=({data:Oe,className:be,fullWidth:Ne,style:$e={},onClose:dt,onOk:Je,showFullTools:At,noAssociationId:en})=>{const pn=(0,Me.useRef)(null),ln=(0,Me.useRef)(null),gn=(0,Me.useRef)(null),Un=(0,Me.useRef)(null),[An,ni]=(0,Me.useState)(!1),[ai,ki]=(0,Me.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,Me.useEffect)(()=>(gn.current||(gn.current=document.createElement("style"),document.head.appendChild(gn.current)),Oe!=null&&Oe.visible?(document.body.setAttribute("data-custom","y-hidden"),gn.current.innerHTML=" html { overflow-y: hidden; }",Oe!=null&&Oe.src&&Ci()):(document.body.removeAttribute("data-custom"),gn.current&&(document.head.removeChild(gn.current),gn.current=null)),()=>{document.body.removeAttribute("data-custom"),gn.current&&(document.head.removeChild(gn.current),gn.current=null)}),[Oe==null?void 0:Oe.visible]);const Ci=()=>He(void 0,null,function*(){ni(!0),ki("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Ji=yield(0,nt.ZJ)(Oe==null?void 0:Oe.src);pn.current.src="",pn.current.src=Ji,pn.current.onload=function(){sr()},ni(!1),ki("")}),Ki=Ji=>He(void 0,null,function*(){ni(!0),ki("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Fr=yield(0,vt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Oe.title,file:Ji.dataUrl}});Fr!=null&&Fr.id&&!en?(yield(0,vt.ZP)(`/api/attachments/${Oe.id}/add_subitem.json`,{method:"post",body:{subitem_id:Fr==null?void 0:Fr.id,settings:JSON.stringify(Ji.state)}})).status===0&&Je():Fr!=null&&Fr.id&&Je(Fr),ni(!1),ki("")}),ir=()=>{const Ji=document.querySelector('a[href="https://markerjs.com/"]');Ji&&Ji.parentNode&&(Ji.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(Mr=>{const vi=document.querySelector(Mr.name);vi&&vi.setAttribute("title",Mr.title)})},sr=()=>{ln.current=new xt(pn.current),ln.current.targetRoot=Un.current,ln.current.addEventListener("render",Ki),ln.current.addEventListener("beforeclose",dt),At&&(ln.current.availableMarkerTypes=ln.current.ALL_MARKER_TYPES,ln.current.uiStyleSettings.redoButtonVisible=!0,ln.current.uiStyleSettings.notesButtonVisible=!0,ln.current.uiStyleSettings.zoomButtonVisible=!0,ln.current.uiStyleSettings.zoomOutButtonVisible=!0,ln.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=ln.current.uiStyleSettings,ln.current.show(),Oe!=null&&Oe.snapshotData&&ln.current.restoreState(Oe.snapshotData),setTimeout(()=>{window.scrollTo(0,0),ir()},300)};return Me.createElement(Me.Fragment,null,(Oe==null?void 0:Oe.visible)&&Me.createElement(Ce.Z,{spinning:An,tip:ai,style:{position:"absolute",width:"100vw"}},Me.createElement("div",{ref:Un,className:ke()(me.imageDimensions,be,Ne?me.fullWidth:""),style:$e},Me.createElement("img",{className:me.img,ref:pn}))))}},41588:function(_n,qt,Ee){"use strict";var Me=Ee(59301),me=Ee(95237),Be=Ee(43604),ke=Ee(99313),Ce=Ee(3113),Le=Ee(85149),he=Ee(88010),ye=Ee(48136),xe=Ee(59301);const ge=(0,Me.forwardRef)(({callback:le,showSaveButton:ve,value:de=""},ce)=>{const z=(0,Me.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 "}]}]}],oe=[{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}`}]}]}],ie=Se=>{z.current.setValue(z.current.getValue()+" "+Se.value+" ")},se=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:xe.createElement(me.Z,{className:he.Z.lists,gutter:[10,10]},ee.map((Se,we)=>xe.createElement(Be.Z,{flex:"110px",className:he.Z.item},xe.createElement("div",null,xe.createElement(Le.Z,{value:`$$${Se.value}$$`}),Se.name),xe.createElement("div",{className:he.Z.children},Se.children.map((Pe,Ae)=>xe.createElement("div",{key:Ae},xe.createElement("h1",null,Pe.name),xe.createElement(me.Z,{gutter:[10,10]},Pe.data.map((De,ze)=>xe.createElement(Be.Z,{key:ze,onClick:()=>ie(De),className:he.Z.diamond},xe.createElement(Le.Z,{value:"`$$"+De.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:xe.createElement(me.Z,{className:he.Z.lists,gutter:[10,10]},oe.map((Se,we)=>xe.createElement(Be.Z,{flex:"110px",className:he.Z.item},xe.createElement("div",null,xe.createElement(Le.Z,{value:"`$$"+Se.value+"$$`"}),Se.name),xe.createElement("div",{className:he.Z.children},Se.children.map((Pe,Ae)=>xe.createElement("div",{key:Ae},Pe.name&&xe.createElement("h1",null,Pe.name),xe.createElement(me.Z,{gutter:[10,10]},Pe.data.map((De,ze)=>xe.createElement(Be.Z,{key:ze,onClick:()=>ie(De),className:he.Z.diamond},xe.createElement(Le.Z,{value:"`$$"+De.value+"$$`"}))))))))))}],ue=()=>{var Se=document.createElement("div");Se.innerHTML=z.current.getValue();var we=Se.innerText;return le&&le(we),we};return(0,Me.useImperativeHandle)(ce,()=>({getData:ue})),xe.createElement("div",{className:he.Z.mathWrap},xe.createElement(ke.default,{defaultActiveKey:"1",items:se}),xe.createElement("math-field",{locale:"zh_cn",className:he.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:z,style:{width:800,marginTop:30,fontSize:18}},de||""),ve&&xe.createElement("div",{className:he.Z.button},xe.createElement(Ce.ZP,{size:"large",onClick:ue,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});qt.Z=ge},8797:function(_n,qt,Ee){"use strict";var Me=Ee(59301),me=Ee(93314),Be=Ee(3113),ke=Object.defineProperty,Ce=Object.defineProperties,Le=Object.getOwnPropertyDescriptors,he=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,ge=(ce,z,ee)=>z in ce?ke(ce,z,{enumerable:!0,configurable:!0,writable:!0,value:ee}):ce[z]=ee,le=(ce,z)=>{for(var ee in z||(z={}))ye.call(z,ee)&&ge(ce,ee,z[ee]);if(he)for(var ee of he(z))xe.call(z,ee)&&ge(ce,ee,z[ee]);return ce},ve=(ce,z)=>Ce(ce,Le(z));const de=({img:ce,buttonProps:z={},styles:ee={},customText:oe,ButtonText:ie,ButtonClick:se,Buttonclass:ue,ButtonTwo:Se,imgStyles:we,loading:Pe=!1,className:Ae=""})=>Me.createElement("section",{className:`tc animated fadeIn ${Ae}`,style:le({color:"#999",margin:"100px auto",visibility:Pe?"hidden":"visible"},ee)},Me.createElement("img",{src:ce||me,style:ve(le({},we),{pointerEvents:"none",userSelect:"none"})}),Me.createElement("p",{className:"mt20 font14"},oe||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),ie&&Me.createElement(Be.ZP,le({className:ue,onClick:se},z),ie),Se&&Se);qt.Z=de},23210:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ue}});var Me=Ee(59301),me={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Be=Ee(3113),ke=Ee(70557),Ce=Ee(23954),Le=Ee(6848),he=Ee(955),ye=Ee(94941),xe=Ee(8797),ge=Ee(3294),le=Ee(19381),ve=Ee(59301),de=Object.defineProperty,ce=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,oe=(Se,we,Pe)=>we in Se?de(Se,we,{enumerable:!0,configurable:!0,writable:!0,value:Pe}):Se[we]=Pe,ie=(Se,we)=>{for(var Pe in we||(we={}))z.call(we,Pe)&&oe(Se,Pe,we[Pe]);if(ce)for(var Pe of ce(we))ee.call(we,Pe)&&oe(Se,Pe,we[Pe]);return Se},se=(Se,we,Pe)=>new Promise((Ae,De)=>{var ze=Ge=>{try{Xe(Pe.next(Ge))}catch(ft){De(ft)}},Ze=Ge=>{try{Xe(Pe.throw(Ge))}catch(ft){De(ft)}},Xe=Ge=>Ge.done?Ae(Ge.value):Promise.resolve(Ge.value).then(ze,Ze);Xe((Pe=Pe.apply(Se,we)).next())}),ue=({editOffice:Se="view",data:we,theme:Pe,type:Ae,filename:De,monacoEditor:ze,className:Ze,style:Xe,close:Ge,onClose:ft,hasMask:at,disabledDownload:Ct,onImgDimensions:et,showNodata:yt,recordInfo:st})=>{const[zt,lt]=(0,Me.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[tt,ut]=(0,Me.useState)(""),[mt,Pt]=(0,Me.useState)(),gt=window.ENV==="build"?"/react/build":"",Ft=location.host.startsWith("localhost")?ge.Z.PROXY_SERVER:ge.Z.API_SERVER,hn=10*(1024*1024),Jt=(0,Me.useRef)();we!=null&&we.startsWith("/api")&&Ae!=="txt"&&(we=ge.Z.API_SERVER+we);const bn=$t=>$t.substring($t.lastIndexOf("/")+1).split(".").pop();De&&ze&&(ze.filename=De),(0,Me.useEffect)(()=>{var $t,kt;const pt=(kt=($t=document.cookie)==null?void 0:$t.replace(/\s/g,""))==null?void 0:kt.split(";");pt==null||pt.map(Bt=>{let xt=Bt.split("=");xt[0]==="_educoder_session"&&ut(xt[1])})},[]),(0,Me.useEffect)(()=>{Ae==="office"&&(we.indexOf("bigfilescdn.")>-1||we.indexOf("bigfiles1")>-1?Pt({url:we,fileType:bn(we),model:we.indexOf("model=edit")?"edit":"view"}):Wt())},[Ae,we]);const Wt=()=>se(void 0,null,function*(){console.log("data:",we);let $t=we;we.startsWith("http")||($t=location.origin+$t);let kt=new URL($t).pathname.split("/").pop();const pt=yield(0,ye.gJ)({attachment_id:kt});pt.url=Ft+pt.url,Pt(pt)}),Kt=()=>{if(we.startsWith("http")||we.startsWith("blob:")){Xt();return}(0,he.Sv)(De||"educoder",we,De)},Xt=()=>{st&&(0,le.fc)({id:st==null?void 0:st.id,watch_type:1,course_id:st==null?void 0:st.course_id}),(0,he.Nd)(De||"educoder",decodeURIComponent(we))};return ve.createElement("div",{style:ie({},Xe||{}),className:`${at&&me.bgBlack} ${Ae?me.wrp:"hide"}`},Ge&&ve.createElement("div",{className:me.close,ref:Jt},!!et&&ve.createElement(Le.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Jt.current},ve.createElement("span",{onClick:()=>{ft(),et()}},ve.createElement("i",{className:"icon-yulanpizhu"}))),!Ct&&ve.createElement(Le.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Jt.current},ve.createElement("span",{onClick:Xt},ve.createElement("i",{className:"icon-quxiaozhiding"}))),ve.createElement(Le.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Jt.current},ve.createElement("span",{className:"",onClick:ft},ve.createElement("i",{className:"icon-guanbi1"})))),ve.createElement("div",{className:`${me[Ze]} ${Ze} ${me.monaco} ${Ae==="txt"?"show":"hide"}`},Ae==="txt"&&ve.createElement(ve.Fragment,null,ve.createElement(Ce.ZP,ie({},ze)))),Ae==="audio"&&ve.createElement("audio",{src:`${(we==null?void 0:we.indexOf("http://"))>-1||(we==null?void 0:we.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${we}`,autoPlay:!0}),Ae==="video"&&ve.createElement(ve.Fragment,null,(we==null?void 0:we.indexOf("http"))>-1?ve.createElement("video",{controls:!0,src:`${we}`,autoPlay:!0}):ve.createElement("video",{controls:!0,src:`data:video/mp4;base64,${we}`,autoPlay:!0})),Ae==="office"&&mt&&ve.createElement("iframe",{src:`${gt}/office.html?key=${mt.key}&url=${btoa(mt.url)}&callbackUrl=${Ft+(mt.callbackUrl||"")}&fileType=${mt.fileType}&title=${mt.title||""}&model=${Se}&officeServer=${ge.Z.ONLYOFFICE}&disabledDownload=${!!Ct}`}),Ae==="html"&&ve.createElement("iframe",{src:we+"&disposition=inline"}),Ae==="pdf"&&ve.createElement("iframe",{src:`${gt}/js/pdfview/index.html?filename=${De||"educoder.pdf"}&url=${encodeURIComponent(we)}&disabledDownload=${!!Ct}`}),Ae==="image"&&ve.createElement("img",{src:`${(we==null?void 0:we.indexOf("http://"))>-1||(we==null?void 0:we.indexOf("https://"))>-1?"":"data:image/png;base64,"}${we}`}),(Ae==="other"||Ae==="download")&&ve.createElement(ve.Fragment,null,yt?ve.createElement(xe.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ve.createElement(Be.ZP,{icon:ve.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Kt,disabled:Ct},"\u4E0B\u8F7D")}):ve.createElement(Be.ZP,{type:"primary",size:"middle",onClick:Kt,disabled:Ct},ve.createElement(ke.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},85149:function(_n,qt,Ee){"use strict";Ee.d(qt,{z:function(){return Ae},Z:function(){return De}});var Me=Ee(59301),me=Ee(50304),Be=Ee(24768),ke=Ee(64018),Ce=Ee(65157),Le=Ee(3294),he=Ee(955),ye=Ee(15342),xe=Ee(1012),ge=Ee(23210),le=Ee(59301),de=({html:ze})=>{const Ze=(0,Me.useRef)(null),Xe=(0,Me.useRef)(null),Ge=`.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,Me.useEffect)(()=>{const ft=Ze.current.attachShadow({mode:"open"});Xe.current=document.createElement("div"),Xe.current.className="markdown-body",Xe.current.innerHTML=ze,ft.appendChild(Xe.current);const at=document.createElement("style");return at.textContent=Ge,ft.appendChild(at),()=>{ft.innerHTML=""}},[]),(0,Me.useEffect)(()=>{Xe.current&&(Xe.current.innerHTML=ze)},[ze]),le.createElement("div",{ref:Ze})},ce=Object.defineProperty,z=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable,ie=(ze,Ze,Xe)=>Ze in ze?ce(ze,Ze,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):ze[Ze]=Xe,se=(ze,Ze)=>{for(var Xe in Ze||(Ze={}))ee.call(Ze,Xe)&&ie(ze,Xe,Ze[Xe]);if(z)for(var Xe of z(Ze))oe.call(Ze,Xe)&&ie(ze,Xe,Ze[Xe]);return ze};const ue="@\u2581\u2581@",Se="@\u2581@",we=/<pre[^>]*>/g;function Pe(ze){let Ze=document.createElement("div");return Ze.innerHTML=ze,Ze.childNodes.length===0?"":Ze.childNodes[0].nodeValue}const Ae=(ze,Ze)=>{ze=ze||"";const Xe=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ge=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ft=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,at=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ze?ze.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Xe,(Ct,et,yt,st,zt,lt,tt)=>{const ut=et||st||lt,mt=yt||zt||tt||"?";return Le.Z.API_SERVER+"/api/attachments/"+ut+mt+"&t="+(0,he.Jn)(ut,Date.now())+(Ct.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(ze=ze.replace(at,(Ct,et,yt,st,zt,lt,tt)=>{const ut=et||st||lt,mt=yt||zt||tt||"?";return Le.Z.API_SERVER+"/attachments/download/"+ut+mt+"&t="+(0,he.Jn)(ut,Date.now())+(Ct.indexOf(")")>-1?")":"&")}).replace(Xe,(Ct,et,yt,st,zt,lt,tt)=>{const ut=et||st||lt,mt=yt||zt||tt||"?";return Le.Z.API_SERVER+"/api/attachments/"+ut+mt+"&t="+(0,he.Jn)(ut,Date.now())+(Ct.indexOf(")")>-1?")":"&")}).replace(Ge,(Ct,et,yt,st,zt)=>{const lt=et||st,tt=yt||zt||"";return'"'+Le.Z.API_SERVER+"/api/attachments/"+lt+tt+lt+tt+"&t="+(0,he.Jn)(lt,Date.now())}).replace(ft,(Ct,et,yt,st,zt)=>{const lt=et||st,tt=yt||zt||"";return"("+Le.Z.API_SERVER+"/files/uploads/"+lt+tt+lt+tt+"&t="+(0,he.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,`
|
|
|
`),ze)};var De=({value:ze="",className:Ze,showTextOnly:Xe,showLines:Ge,style:ft={},stylesPrev:at={},highlightKeywords:Ct,showProgramFill:et,isProgramFill:yt,disabledFill:st=!1,programFillValue:zt,onFillChange:lt=mt=>{},onFillBlur:tt=()=>{},onFillFocus:ut=()=>{}})=>{let mt=String(ze);const[Pt,gt]=(0,Me.useState)(""),[Ft,Ht]=(0,Me.useState)("office"),[hn,Jt]=(0,Me.useState)([]),bn=(0,Me.useRef)("a"+(0,xe.Z)()),Wt={},Kt=(Oe,be,Ne)=>{const $e=document.createElement(Oe===Se?"input":"textarea");$e.style.width="100%",$e.style.height=Oe===Se?"40px":"151px",$e.rows=5,$e.spellcheck=!1,$e.name="edu-program-fill",$e.placeholder="\u8BF7\u8F93\u5165",$e.dataset.id=be;const dt=Object.keys(Wt).length;return Wt[dt]=$e,`<span class="edu-program-fill-wrap ${Oe===Se?"":"show"}" style="width:${Oe===Se?"400px":"100%"}" title=${Ne||""}><span>${$e.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Xt(Oe){return Oe=Oe.replace(/!\[.*?\]\(.*?\)/g,""),Oe=Oe.replace(/\[.*?\]\(.*?\)/g,""),Oe=Oe.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Oe=Oe.replace(/<embed.*?>/g,""),Oe=Oe.replace(/<img.*?>/g,""),Oe=Oe.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Oe=Oe.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Oe=Oe.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Oe=Oe.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Oe}const $t=Oe=>Oe.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(be,Ne){let $e=Ne.replace(/(\n|\r)/g,"").split("}"),dt=[];return $e.map(Je=>{Je!=""&&dt.push(`.${bn.current} ${Je}`)}),`<style>${dt.join("}")}</style>`}),kt=(0,Me.useMemo)(()=>{try{const $e=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,dt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Je=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,At=/\(\/attachments\/download\//g;mt=mt.replace(At,"("+Le.Z.API_SERVER+"/attachments/download/").replace($e,"("+Le.Z.API_SERVER+"/api/attachments/").replace(dt,'"'+Le.Z.API_SERVER+"/api/attachments/").replace(Je,'"'+Le.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($e){}if(et){let $e=-1;return mt=mt.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(dt,Je,At){var en;return++$e,Kt(dt,$e,(en=zt==null?void 0:zt[$e])==null?void 0:en.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${$t(mt||"")}</pre>`}let Oe=$t(mt);Oe=(0,Be.ZP)(Oe);const be=(0,Be.ez)();mt.match(/\[TOC\]/)&&(Oe=Oe.replace("<p>[TOC]</p>",(0,Be.Qv)()),(0,Be.Iy)()),Oe=Oe.replace(/(__special_katext_id_\d+__)/g,($e,dt)=>{const{type:Je,expression:At}=be[dt];return(0,ye.renderToString)(Pe(At)||"",{displayMode:Je==="block",throwOnError:!1,output:"html"})}),Oe=Oe.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Be.AL)();const Ne=document.createElement("div");if(Ne.innerHTML=Oe,Xe)return Ne.innerText;if(Ct){const $e=Ct.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return vt(Ne,$e),Ne.innerHTML}return setTimeout(()=>Ie(),500),Ne.innerHTML},[mt,Ct]);(0,Me.useEffect)(()=>{nt.current&&nt.current.querySelectorAll(["input","textarea"]).forEach(be=>{be.oninput=pt,be.onblur=Bt,be.onfocus=xt})},[hn]),(0,Me.useEffect)(()=>{var Oe,be,Ne,$e,dt;if(zt!=null&&zt.length)try{const Je=nt.current.querySelectorAll(".edu-program-fill-score"),At=nt.current.querySelectorAll('[name="edu-program-fill"]');for(const[en,pn]of At.entries())pn.value=((Oe=zt==null?void 0:zt[en])==null?void 0:Oe.value)||"",((be=zt==null?void 0:zt[en])==null?void 0:be.type)==="warning"?pn.className="program-fill-warning":((Ne=zt==null?void 0:zt[en])==null?void 0:Ne.type)==="success"?pn.className="program-fill-success":pn.className="";for(const[en,pn]of Je.entries())pn.innerHTML=($e=zt==null?void 0:zt[en])!=null&&$e.score?`${(dt=zt==null?void 0:zt[en])==null?void 0:dt.score}\u5206`:"";Jt(zt)}catch(Je){console.log(Je,"error")}},[zt]);const pt=Oe=>{hn[Oe.target.dataset.id]=hn[Oe.target.dataset.id]||{},hn[Oe.target.dataset.id].value=Oe.target.value,Jt([...hn]),lt(hn,Oe.target.dataset.id)},Bt=Oe=>{hn[Oe.target.dataset.id]=hn[Oe.target.dataset.id]||{},hn[Oe.target.dataset.id].value=Oe.target.value,Jt([...hn]),tt(hn,Oe.target.dataset.id)},xt=Oe=>{hn[Oe.target.dataset.id]=hn[Oe.target.dataset.id]||{},hn[Oe.target.dataset.id].value=Oe.target.value,Jt([...hn]),ut(hn,Oe.target.dataset.id)};function vt(Oe,be){return Oe.childNodes.forEach(Ne=>{var $e;if(Ne.childNodes.length>0)vt(Ne,be);else if(Ne.nodeName!=="IMG")if(Ne.innerHTML)Ne.innerHTML=($e=Ne.innerHTML)==null?void 0:$e.replace(new RegExp(be,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const dt=document.createElement("span");dt.innerHTML=Ne.textContent.replace(new RegExp(be,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Ne.replaceWith(dt)}})}const nt=(0,Me.useRef)();Be.jb.WebkitLineClamp=Ge,Ge&&(ft=se(se({},ft),Be.jb));function He(Oe){let be=Oe.target;if(be.tagName.toUpperCase()==="A"){let Ne=be.getAttribute("href");if(Ne.indexOf("office")>-1)Oe.preventDefault(),gt(Ne),Ht("office");else if(Ne.indexOf("application/pdf")>-1)Oe.preventDefault(),gt(Ne),Ht("pdf");else if(Ne.indexOf("text/html")>-1)Oe.preventDefault(),gt(Ne),Ht("html");else if(Ne.startsWith("#")){Oe.preventDefault();let $e=document.getElementById(Ne.replace("#",""));$e&&$e.scrollIntoView(!0)}}}const Ie=()=>{var Oe;const be=(Oe=nt.current)==null?void 0:Oe.querySelectorAll("video");be==null||be.forEach(Ne=>{if(Ne.oncontextmenu=()=>!1,Ne.src.indexOf(".m3u8")>-1&&!Ne.canPlayType("application/vnd.apple.mpegurl")){if(Ce.ZP.isSupported()){var $e=new Ce.ZP;$e.loadSource(Ne.src),$e.attachMedia(Ne)}}})};(0,Me.useEffect)(()=>{if(nt.current&&kt&&kt.match(we)&&window.PR.prettyPrint(),nt.current)return nt.current.addEventListener("click",He),()=>{var Oe;(Oe=nt.current)==null||Oe.removeEventListener("click",He),(0,Be.AL)(),(0,Be.Iy)()}},[kt,nt.current,He]),(0,Me.useEffect)(()=>{var Oe;const be=Ne=>{Ne.preventDefault(),Ne.clipboardData.setData("text",window.getSelection().toString())};return(Oe=nt.current)==null||Oe.addEventListener("copy",be),()=>{var Ne;(Ne=nt.current)==null||Ne.removeEventListener("copy",be)}},[nt.current]);const We=Oe=>/<style[\s\S]*?>/i.test(Oe||"");return Me.createElement(Me.Fragment,null,Xe&&Me.createElement("div",{ref:nt},kt),!Xe&&!We(kt)&&Me.createElement("div",{ref:nt,style:se({},ft),className:`${Ze||""} ${st?"disabled-fill":""} markdown-body ${bn.current}`,dangerouslySetInnerHTML:{__html:kt}}),!Xe&&We(kt)&&Me.createElement(de,{html:kt}),Me.createElement(ge.Z,{close:!0,data:Pt,type:Pt!=null&&Pt.length?Ft:"",style:se({},at),onClose:()=>gt("")}))}},33538:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ke}});var Me=Ee(89070),me={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},Be=Ee(59301),ke=({message:Ce,className:Le,children:he,style:ye={}})=>Be.createElement("div",{className:`custom-spinner ${me.idsRingWrapper} ${Le}`},Be.createElement("div",{className:me.ldsRing},Be.createElement("div",null),Be.createElement("div",null),Be.createElement("div",null),Be.createElement("div",null)),Ce?Be.createElement("p",{style:ye},Ce):null,he,Be.createElement(Me.Outlet,null))},17064:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ke}});var Me=Ee(59301),me=Ee(34604),Be=Ee(59301),ke=({defaultX:Ce="40%",leftChild:Le,rightChild:he,className:ye,hideResize:xe=!1})=>{const[ge,le]=(0,Me.useState)(Ce),ve=(0,Me.useRef)();function de(){ve.current=!0}(0,Me.useEffect)(()=>{function ee(ie){ve.current&&(me.Z.publish("resize-move-bar",ie),le(ie.pageX))}function oe(){ve.current=!1}return window.addEventListener("mousemove",ee),window.addEventListener("mouseup",oe),()=>{window.removeEventListener("mousemove",ee),window.removeEventListener("mouseup",oe)}},[]);const ce=typeof ge=="number"&&ge!==.01?`${ge}px`:Ce,z=`calc(100% - ${xe?"0px":"4px"} - ${ce})`;return Be.createElement("div",{className:`split-panel-container ${ye}`},Be.createElement("section",{style:{width:ce,display:ge===.01?"none":""}},Le),Be.createElement("section",{className:"resize-x-bar",onMouseDown:de},Be.createElement("a",{className:"btn-resize"},Be.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},Be.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),Be.createElement("section",{style:{width:z}},he))}},13787:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Le}});var Me=Ee(59301),me={flex_box_center:"flex_box_center___Gc4dd",flex_space_between:"flex_space_between___K2f1v",flex_box_vertical_center:"flex_box_vertical_center___pupRp",flex_box_center_end:"flex_box_center_end___UDLRC",flex_box_column:"flex_box_column___a5uDo",result:"result___gu5zt",title:"title___xrnx2",left:"left___IAxp9",leftNode:"leftNode___HL8fG",right:"right___ZXYmw",rightNode:"rightNode___jYL5_"},Be=Ee(92310),ke=Ee.n(Be),Le=({className:he,style:ye={},leftNode:xe,leftTitle:ge="\u81EA\u6D4B\u8F93\u5165",rightNode:le,rightTitle:ve="\u8FD0\u884C\u7ED3\u679C"})=>Me.createElement("div",{className:ke()(me.result,he),style:ye},Me.createElement("div",{className:me.left},Me.createElement("div",{className:me.title},Me.createElement("i",{style:{color:"#08CF76"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),Me.createElement("span",null,ge)),Me.createElement("div",{className:me.leftNode},xe)),Me.createElement("div",{className:me.right},Me.createElement("div",{className:me.title},Me.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),Me.createElement("span",null,ve)),Me.createElement("div",{className:me.rightNode},le)))},19105:function(_n,qt,Ee){"use strict";var Me=Ee(59301);const me=ke=>String(ke).length===1?`0${ke}`:ke,Be=({className:ke="",onChange:Ce,defaultValue:Le=0})=>{const[he,ye]=(0,Me.useState)(Le);(0,Me.useEffect)(()=>{const ve=setTimeout(()=>{ye(he+1e3)},1e3);return Ce(he+1e3),()=>{clearInterval(ve)}},[he]);const xe=parseInt(he/(60*6e4))||"00",ge=parseInt(he%(60*6e4)/6e4)||"00",le=parseInt(he%6e4/1e3)||"00";return Me.createElement("div",{className:ke},me(xe),":",me(ge),":",me(le))};qt.Z=Be},71839:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return z}});var Me=Ee(59301),me=Ee(8591),Be=Ee(38854),ke=Ee(29382),Ce=Ee(65157),Le=Ee(24065),he=Ee(56102),ye=Ee(4901),xe={watermark:"watermark___hNYlv",videovideo:"videovideo___ovOkV",animate__loop:"animate__loop___mvL6s",upDown:"upDown___SlgHv",container:"container___g1WYG","video-container":"video-container___XPkWR","video-controls":"video-controls___to0Zq",hide:"hide___NA3DV","video-progress":"video-progress___gqHsd",seek:"seek___iZHBm","seek-tooltip":"seek-tooltip___uWyXx","bottom-controls":"bottom-controls___uoIBm","left-controls":"left-controls___mBEx4","right-controls":"right-controls___e9L6r",rateOverlay:"rateOverlay___HHBWe",controlText:"controlText___M_BWR","volume-controls":"volume-controls___fa3mE","fullscreen-button":"fullscreen-button___ur0es","fullscreen-button1":"fullscreen-button1___rfaXm","pip-button":"pip-button___GFO8W","playback-animation":"playback-animation___ndURq",volume:"volume___OTmpP",hidden:"hidden___o7GkT"},ge=(ee,oe,ie)=>new Promise((se,ue)=>{var Se=Ae=>{try{Pe(ie.next(Ae))}catch(De){ue(De)}},we=Ae=>{try{Pe(ie.throw(Ae))}catch(De){ue(De)}},Pe=Ae=>Ae.done?se(Ae.value):Promise.resolve(Ae.value).then(Se,we);Pe((ie=ie.apply(ee,oe)).next())});function le(ee){if(isNaN(ee))return{minutes:"00",seconds:"00"};const oe=new Date(ee*1e3).toISOString().substr(11,8);return{hour:oe.substr(0,2),minutes:oe.substr(3,2),seconds:oe.substr(6,2)}}Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2}});function ve(ee,oe){return ee-oe}function de(ee){ee.sort(ve);let oe=0;for(let ie=0;ie<ee.length-1;ie++){let se=Math.abs(ee[ie+1]-ee[ie]);se<21&&(oe+=se)}return oe}const ce=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;var z=(0,Me.forwardRef)(({allow_skip:ee,src:oe,toLog:ie,videoId:se,logWatchHistory:ue,courseId:Se=null,startTime:we,handlePause:Pe=()=>{},handlePlay:Ae=()=>{},handlePlayEnded:De=()=>{},autoPlay:ze=!1,onPlayEnded:Ze=()=>{},isShowWaterMark:Xe=!0},Ge)=>{var ft;oe=oe==null?void 0:oe.replace("http://","https://");const Ct=((ft=oe==null?void 0:oe.split("."))==null?void 0:ft.pop())==="flv",et=(0,Me.useRef)(),yt=(0,Me.useRef)(),st=(0,Me.useRef)(),zt=(0,Me.useRef)(),lt=(0,Me.useRef)(),tt=(0,Me.useRef)(),ut=(0,Me.useRef)(),mt=(0,Me.useRef)(),Pt=(0,Me.useRef)(),gt=(0,Me.useRef)(),Ft=(0,Me.useRef)(),Ht=(0,Me.useRef)(),hn=(0,Me.useRef)(),Jt=(0,Me.useRef)(),bn=navigator.userAgent.toLowerCase().match(ce),Wt=bn?bn[0]:"pc",Kt=(0,Me.useRef)(!1),Xt=(0,Le.eY)();let $t=0,kt=0,pt=0,Bt=null,xt=!1,vt=20,nt=1,He=!1,Ie=!1,We=[];(0,Me.useImperativeHandle)(Ge,()=>({getLastUpdatedTime:()=>et.current.currentTime,getDuration:()=>et.current.duration})),me.ZP.config({maxCount:1,getContainer:()=>st.current});const Oe=(0,Me.useCallback)((en,pn=!1)=>{let ln={point:et.current.currentTime};Bt?(ln.log_id=Bt,ln.watch_duration=de(We),ln.total_duration=kt):(Se?(ln.video_id=parseInt(se,10),ln.course_id=Se):ln.video_id=se,ln.duration=$t,ln.device=Wt),pn&&(ln.ed="1");function gn(){return ge(this,null,function*(){He=!0,Bt=yield ue==null?void 0:ue(ln),He=!1,en&&en()})}gn()},[se,Se]);(0,Me.useEffect)(()=>{et.current&&(zt.current.style.display="none",lt.current.style.display="block"),me.ZP.destroy();let en=null;return ke.Z.isSupported&&Ct&&oe&&(oe==null?void 0:oe.indexOf(".m3u8"))<0?(en=ke.Z.createPlayer({type:"flv",volume:.8,cors:!0,url:oe,muted:!1}),et.current&&(en.attachMediaElement(et.current),en.load())):et.current.setAttribute("src",oe),Ne(),()=>{en&&(en.unload(),en.pause(),en.destroy(),en=null)}},[et,Ct,oe]);function be(){et.current.paused?(zt.current.style.display="none",lt.current.style.display="block"):(zt.current.style.display="block",lt.current.style.display="none")}function Ne(){Ft.current.style.display="none",hn.current.style.display="none",Ht.current.style.display="none",et.current.muted||et.current.volume===0?Ft.current.style.display="block":et.current.volume>0&&et.current.volume<=.5?hn.current.style.display="block":Ht.current.style.display="block"}(0,Me.useEffect)(()=>{const en=document.getElementById("play"),pn=document.querySelectorAll(".playback-icons use");function ln(){Ae(),we&&!Kt.current&&(et.current.currentTime=we),Kt.current=!0,We.push(et.current.currentTime),xt||(xt=!0,ie&&Oe())}function gn(){return ge(this,null,function*(){be(),We.push(et.current.currentTime),ie&&Oe(()=>{Bt=null,pt=0,xt=!1,He=!1,Ie=!1,We=[],kt=0,nt=1},!0),Ze()})}function Un(){tt.current.value=Math.round(et.current.currentTime),ut.current.value=Math.round(et.current.currentTime)}function An(){const vi=le(Math.round(et.current.currentTime));Pt.current.innerText=`${vi.hour>0?vi.hour+":":""}${vi.minutes}:${vi.seconds}`,Pt.current.setAttribute("datetime",`${vi.hour>0?" "+vi.hour+" ":""}${vi.minutes}m ${vi.seconds}s`)}function ni(){var vi,wr,Tr,it,Rr,Or,Ur;const uo=Math.round((vi=et.current)==null?void 0:vi.duration);(Tr=(wr=tt.current)==null?void 0:wr.setAttribute)==null||Tr.call(wr,"max",uo),(Rr=(it=ut.current)==null?void 0:it.setAttribute)==null||Rr.call(it,"max",uo);const po=le(uo);mt.current&&(mt.current.innerText=`${po.hour>0?po.hour+":":""}${po.minutes}:${po.seconds}`,(Ur=(Or=mt.current).setAttribute)==null||Ur.call(Or,"datetime",`${po.hour>0?" "+po.hour+" ":""}${po.minutes}m ${po.seconds}s`))}function ai(){try{const vi=Math.round(et.current.duration);tt.current.setAttribute("max",vi),ut.current.setAttribute("max",vi);const wr=le(vi);mt.current.innerText=`${wr.hour>0?wr.hour+":":""}${wr.minutes}:${wr.seconds}`,mt.current.setAttribute("datetime",`${wr.hour>0?" "+wr.hour+" ":""}${wr.minutes}m ${wr.seconds}s`),Un(),An();const{width:Tr,height:it,x:Rr,y:Or}=yt.current.getBoundingClientRect();if(Rr<0||Or<0||!Tr)return;if(!Ie){let Ur=et.current.currentTime,uo=Ur-pt;Math.abs(uo)<10?(kt+=Math.abs(uo),pt=Ur,He||kt-nt*vt>=0&&(nt++,We.push(pt),ie&&Oe())):(pt=Ur,ie&&Oe())}}catch(vi){console.log(vi)}}function ki(){Ie=!0}function Ci(){et.current.playing&&We.push(et.current.currentTime,pt),pt=et.current.currentTime,Ie=!1}function Ki(){$t=et.current.duration,$t<=20&&(vt=$t/3),et.current.addEventListener("play",ln)}function ir(vi){vi.preventDefault(),(0,ye.vp)()?(et.current.style.width="100%",et.current.style.height="100%"):et.current.style.cssText=""}function sr(){Pe()}function Ji(vi){if(!ee){me.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");return}const wr=vi.target.dataset.seek?vi.target.dataset.seek:vi.target.value;et.current.currentTime=wr,ut.current.value=wr,tt.current.value=wr}function Fr(vi){const wr=Math.round(vi.offsetX/vi.target.clientWidth*parseInt(vi.target.getAttribute("max"),10));tt.current.setAttribute("data-seek",wr);const Tr=le(wr);gt.current.textContent=`${Tr.hour>0?Tr.hour+":":""}${Tr.minutes}:${Tr.seconds}`;const it=et.current.getBoundingClientRect();gt.current.style.left=`${vi.pageX-it.left}px`}function Mr(vi){switch(vi.code){case"Space":vi.preventDefault(),Je();break;case"ArrowRight":if(vi.preventDefault(),!ee){me.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(et.current.currentTime>=et.current.duration)break;et.current.currentTime=parseInt(et.current.currentTime)+5,Un();break;case"ArrowLeft":if(vi.preventDefault(),!ee){me.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(et.current.currentTime===0)break;et.current.currentTime=parseInt(et.current.currentTime)-5,Un();break;case"ArrowUp":vi.preventDefault(),et.current.volume<1&&(et.current.volume=(parseInt(et.current.volume*10)+1)/10);break;case"ArrowDown":vi.preventDefault(),et.current.volume>0&&(et.current.volume=(parseInt(et.current.volume*10)-1)/10);break}}return st.current.addEventListener((0,ye.gH)(),ir),et.current.addEventListener("canplay",Ki),et.current.addEventListener("ended",gn),et.current.addEventListener("seeking",ki),et.current.addEventListener("seeked",Ci),et.current.addEventListener("loadedmetadata",ni),tt.current.addEventListener("mousemove",Fr),tt.current.addEventListener("input",Ji),et.current.addEventListener("timeupdate",ai),et.current.addEventListener("pause",sr),et.current.addEventListener("volumechange",Ne),document.addEventListener("keydown",Mr),()=>{var vi,wr,Tr,it,Rr,Or,Ur,uo,po,io,Do,Xn;(vi=et.current)==null||vi.removeEventListener("canplay",Ki),(wr=et.current)==null||wr.removeEventListener("play",ln),(Tr=et.current)==null||Tr.removeEventListener("ended",gn),(it=et.current)==null||it.removeEventListener("seeking",ki),(Rr=et.current)==null||Rr.removeEventListener("seeked",Ci),(Or=tt.current)==null||Or.removeEventListener("mousemove",Fr),(Ur=tt.current)==null||Ur.removeEventListener("input",Ji),(uo=et.current)==null||uo.removeEventListener("timeupdate",ai),(po=et.current)==null||po.removeEventListener("pause",sr),(io=et.current)==null||io.removeEventListener("loadedmetadata",ni),(Do=et.current)==null||Do.removeEventListener("volumechange",Ne),document.removeEventListener("keydown",Mr),(Xn=et.current)!=null&&Xn.playing&&(We.push(pt,et.current.currentTime),ie&&Oe())}},[et,oe]),(0,Me.useEffect)(()=>{if(et.current.onended=()=>{De(et)},et.current.oncontextmenu=()=>!1,(oe==null?void 0:oe.indexOf(".m3u8"))>-1){if(et.current.canPlayType("application/vnd.apple.mpegurl"))et.current.src=oe;else if(Ce.ZP.isSupported()){var en=new Ce.ZP;en.loadSource(oe),en.attachMedia(et.current)}}},[oe]);const[$e,dt]=(0,Me.useState)(1),Je=()=>{et.current.paused||et.current.ended?et.current.play():et.current.pause(),be()};function At(){et.current.muted=!et.current.muted,et.current.muted?(Jt.current.setAttribute("data-volume",volume.value),Jt.current.value=0):Jt.current.value=Jt.current.dataset.volume}return Me.createElement("div",{style:{position:"relative"},ref:st},Me.createElement("div",{ref:yt,className:`${xe.watermark} animated_alternate animate__animated_10s animate__infinite animate__stepstart ${xe.animate__loop}`},Xe&&Xt?Xt.login:" "),Me.createElement("div",{className:xe.container},Me.createElement("div",{className:xe["video-container"],id:"video-container"},Me.createElement("div",{className:xe["playback-animation"],id:"playback-animation"},Me.createElement("svg",{className:xe["playback-icons"]},Me.createElement("use",{className:"hidden",href:"#play-icon"}),Me.createElement("use",{href:"#pause"}))),Me.createElement("video",{className:xe.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:et,autoPlay:ze}),Me.createElement("div",{className:`${xe["video-controls"]} `,id:"video-controls"},Me.createElement("div",{className:xe["bottom-controls"]},Me.createElement("div",{className:xe["left-controls"]},Me.createElement("button",{"data-title":"\u64AD\u653E/\u6682\u505C",id:"play",onClick:Je},Me.createElement("svg",{className:xe["playback-icons"]},Me.createElement("use",{ref:lt,href:"#play-icon"}),Me.createElement("use",{ref:zt,style:{display:"none"},href:"#pause"}))),Me.createElement("div",{className:xe.time},Me.createElement("time",{id:"time-elapsed",ref:Pt},"00:00"),Me.createElement("span",null," / "),Me.createElement("time",{id:"duration",ref:mt},"00:00"))),Me.createElement("div",{className:xe["right-controls"]},ee&&Me.createElement(Be.Z,{placement:"top",overlayClassName:xe.rateOverlay,getPopupContainer:en=>en.parentNode,menu:{items:[{key:"1",label:Me.createElement("span",{onClick:()=>{dt(1),et.current.playbackRate=1}},"1.0x")},{key:"2",label:Me.createElement("span",{onClick:()=>{dt(1.5),et.current.playbackRate=1.5}},"1.5x")},{key:"3",label:Me.createElement("span",{onClick:()=>{dt(2),et.current.playbackRate=2}},"2.0x")}]}},Me.createElement("div",{className:`${xe.controlText} mr5`},"\u500D\u901F")),Me.createElement(he.CopyToClipboard,{text:oe,onCopy:()=>me.ZP.success("\u590D\u5236\u6210\u529F")},Me.createElement("button",{"data-title":"\u590D\u5236\u94FE\u63A5"},Me.createElement("i",{className:"icon-lianjie2 iconfont",style:{fontSize:"12px",color:"white"}}))),Me.createElement("div",{className:xe["volume-controls"]},Me.createElement("button",{"data-title":"\u5F00\u542F/\u5173\u95ED\u58F0\u97F3",className:xe["volume-button"],id:"volume-button",onClick:At},Me.createElement("i",{ref:Ft,className:"icon-a-bianzu8 iconfont",style:{fontSize:"14px",color:"white"}}),Me.createElement("i",{ref:hn,className:"icon-shengyinkaibeifen iconfont",style:{fontSize:"14px",color:"white"}}),Me.createElement("i",{ref:Ht,className:"icon-shengyinkai iconfont",style:{fontSize:"14px",color:"white"}})),Me.createElement("input",{className:xe.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:Jt,style:{display:"none"},onClick:Ne})),Me.createElement("button",{"data-title":"\u5168\u5C4F/\u9000\u51FA\u5168\u5C4F",className:xe["fullscreen-button"],onClick:()=>{(0,ye.vp)()?(0,ye.BU)():(0,ye.Dj)(st.current)}},Me.createElement("i",{className:"icon-fangda1 iconfont",style:{fontSize:"12px",color:"white"}})))),Me.createElement("div",{className:xe["video-progress"]},Me.createElement("progress",{ref:ut,value:"0",min:"0"}),Me.createElement("input",{className:xe.seek,ref:tt,value:"0",min:"0",type:"range",step:"1"}),Me.createElement("div",{className:xe["seek-tooltip"],ref:gt,id:"seek-tooltip"},"00:00"))))),Me.createElement("svg",{style:{display:"none"}},Me.createElement("defs",null,Me.createElement("symbol",{id:"pause",viewBox:"0 0 24 24"},Me.createElement("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})),Me.createElement("symbol",{id:"play-icon",viewBox:"0 0 24 24"},Me.createElement("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})),Me.createElement("symbol",{id:"volume-high",viewBox:"0 0 24 24"},Me.createElement("path",{d:"M14.016 3.234q3.047 0.656 5.016 3.117t1.969 5.648-1.969 5.648-5.016 3.117v-2.063q2.203-0.656 3.586-2.484t1.383-4.219-1.383-4.219-3.586-2.484v-2.063zM16.5 12q0 2.813-2.484 4.031v-8.063q1.031 0.516 1.758 1.688t0.727 2.344zM3 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6z"})),Me.createElement("symbol",{id:"volume-low",viewBox:"0 0 24 24"},Me.createElement("path",{d:"M5.016 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6zM18.516 12q0 2.766-2.531 4.031v-8.063q1.031 0.516 1.781 1.711t0.75 2.32z"})),Me.createElement("symbol",{id:"volume-mute",viewBox:"0 0 24 24"},Me.createElement("path",{d:"M12 3.984v4.219l-2.109-2.109zM4.266 3l16.734 16.734-1.266 1.266-2.063-2.063q-1.547 1.313-3.656 1.828v-2.063q1.172-0.328 2.25-1.172l-4.266-4.266v6.75l-5.016-5.016h-3.984v-6h4.734l-4.734-4.734zM18.984 12q0-2.391-1.383-4.219t-3.586-2.484v-2.063q3.047 0.656 5.016 3.117t1.969 5.648q0 2.203-1.031 4.172l-1.5-1.547q0.516-1.266 0.516-2.625zM16.5 12q0 0.422-0.047 0.609l-2.438-2.438v-2.203q1.031 0.516 1.758 1.688t0.727 2.344z"})),Me.createElement("symbol",{id:"fullscreen",viewBox:"0 0 24 24"},Me.createElement("path",{d:"M14.016 5.016h4.969v4.969h-1.969v-3h-3v-1.969zM17.016 17.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 9.984v-4.969h4.969v1.969h-3v3h-1.969zM6.984 14.016v3h3v1.969h-4.969v-4.969h1.969z"})),Me.createElement("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24"},Me.createElement("path",{d:"M15.984 8.016h3v1.969h-4.969v-4.969h1.969v3zM14.016 18.984v-4.969h4.969v1.969h-3v3h-1.969zM8.016 8.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 15.984v-1.969h4.969v4.969h-1.969v-3h-3z"})),Me.createElement("symbol",{id:"pip",viewBox:"0 0 24 24"},Me.createElement("path",{d:"M21 19.031v-14.063h-18v14.063h18zM23.016 18.984q0 0.797-0.609 1.406t-1.406 0.609h-18q-0.797 0-1.406-0.609t-0.609-1.406v-14.016q0-0.797 0.609-1.383t1.406-0.586h18q0.797 0 1.406 0.586t0.609 1.383v14.016zM18.984 11.016v6h-7.969v-6h7.969z"})))))})},61398:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ke}});var Me=Ee(59301),me=Ee(34604),Be=Ee(11611),ke=()=>{const[Ce,Le]=(0,Me.useState)(""),[he,ye]=(0,Me.useState)(0);let[xe,ge]=(0,Me.useState)(),[le,ve]=(0,Me.useState)();const[de,ce]=(0,Me.useState)(!1),z=(0,Me.useRef)("");(0,Me.useEffect)(()=>me.Z.subscribe("preview-image",ze=>{Le(ze),console.log(Pe.current),document.body.style.overflow="hidden"}),[]),(0,Me.useEffect)(()=>(document.addEventListener("keydown",ee),()=>{document.removeEventListener("keydown",ee)}),[]),(0,Me.useEffect)(()=>{z.current=Ce},[Ce]);function ee(De){De.keyCode==27&&z.current&&oe()}function oe(){document.body.style.overflow="auto",ge(void 0),ve(void 0),ye(0),Le("")}function ie(){ye(he+90)}function se(){xe=Pe.current.width*1.1,le=Pe.current.height*1.1,ve(le),ge(xe)}function ue(){xe=Pe.current.width/1.1,le=Pe.current.height/1.1,ve(le),ge(xe)}const Se=(0,Me.useRef)(),we=(0,Me.useRef)(),Pe=(0,Me.useRef)(),Ae=De=>{(De.nativeEvent.target===Se.current||De.nativeEvent.target===we.current)&&oe()};return Me.createElement(Me.Fragment,null,Ce?Me.createElement("div",null,Me.createElement("div",{className:"preview-wrp-group",ref:we},Me.createElement(Be.Z,{className:"image-preview",src:Ce,style:{display:"none"},preview:{visible:!0,src:Ce,onVisibleChange:De=>{Le("")}},alt:"\u9884\u89C8\u5927\u56FE"}))):null)}},53932:function(_n,qt,Ee){"use strict";Ee.d(qt,{h:function(){return Se},Z:function(){return ue}});var Me=Ee(59301),me=Ee(57809),Be=Ee(78241),ke=Ee(3113),Ce=Ee(89780),Le=Ee.n(Ce),he=Ee(37036),ye=Object.defineProperty,xe=Object.defineProperties,ge=Object.getOwnPropertyDescriptors,le=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,ce=(we,Pe,Ae)=>Pe in we?ye(we,Pe,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):we[Pe]=Ae,z=(we,Pe)=>{for(var Ae in Pe||(Pe={}))ve.call(Pe,Ae)&&ce(we,Ae,Pe[Ae]);if(le)for(var Ae of le(Pe))de.call(Pe,Ae)&&ce(we,Ae,Pe[Ae]);return we},ee=(we,Pe)=>xe(we,ge(Pe));const oe=me.default.Option,ie={labelCol:{span:4},wrapperCol:{span:20}},se={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 ue=({callback:we,onCancel:Pe})=>{const[Ae,De]=(0,Me.useState)("python");function ze(Xe){De(se[Xe][1])}function Ze(Xe){we(Xe)}return Me.createElement(Be.default,ee(z({},ie),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ze,style:{width:500}}),Me.createElement(Be.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},Me.createElement(me.default,{getPopupContainer:Xe=>Xe.parentNode,onChange:ze},Object.keys(se).map(Xe=>Me.createElement(oe,{key:Xe,value:Xe},se[Xe][0])))),Me.createElement(Be.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},Me.createElement(Se,{mode:Ae})),Me.createElement("div",{className:"flex-container flex-end"},Me.createElement(ke.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Me.createElement(ke.ZP,{type:"ghost",onClick:Pe},"\u53D6\u6D88")))};function Se({value:we,onChange:Pe,mode:Ae,options:De={}}){const ze=(0,Me.useRef)(),[Ze,Xe]=(0,Me.useState)();return(0,Me.useEffect)(()=>{if(Ze){let Ge=function(ft){const at=ft.getValue();Pe&&Pe(at)};return Ze.on("change",Ge),()=>{Ze.off("change",Ge)}}},[Ze,Pe]),(0,Me.useEffect)(()=>{Ze&&Ze.setOption("mode",Ae)},[Ze,Ae]),(0,Me.useEffect)(()=>{Ze&&(we!==Ze.getValue()||we==="")&&setTimeout(()=>{Ze.setValue(we||"")},300)},[Ze,we]),(0,Me.useEffect)(()=>{if(ze.current&&!Ze){const Ge=Le().fromTextArea(ze.current,z({mode:Ae,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},De));Xe(Ge)}},[ze.current,Ze]),Me.createElement("div",{className:"my-codemirror-container"},Me.createElement("textarea",{ref:ze}))}},12290:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Xn}});var Me=Ee(59301),me=Ee(89780),Be=Ee.n(me),ke=Ee(76374),Ce=Ee(37036),Le=Ee(6313),he=Ee(25717),ye=Ee(99498),xe=Ee(25419),ge=Ee(67549),le=Ee(85149),ve=({value:Ke="",className:qe,showTextOnly:Ye,showLines:St,style:Ot={}})=>{const Tt=(0,Me.useMemo)(()=>"",[Ke]);return Me.createElement(Me.Fragment,null,Me.createElement("div",{dangerouslySetInnerHTML:{__html:Tt}}))},de=Ee(59301),ce=Object.defineProperty,z=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,ue=(Ke,qe,Ye)=>qe in Ke?ce(Ke,qe,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):Ke[qe]=Ye,Se=(Ke,qe)=>{for(var Ye in qe||(qe={}))ie.call(qe,Ye)&&ue(Ke,Ye,qe[Ye]);if(oe)for(var Ye of oe(qe))se.call(qe,Ye)&&ue(Ke,Ye,qe[Ye]);return Ke},we=(Ke,qe)=>z(Ke,ee(qe));let Pe=[{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 Ae({onActionCallback:Ke,title:qe,icon:Ye,actionName:St,className:Ot="",children:Tt}){function _t(){Ke(St)}return de.createElement("a",{title:qe,className:Ot,onClick:_t},de.createElement("i",{className:`${Ye}`}),Tt)}var De=({watch:Ke,showNullButton:qe,showNullProgramButton:Ye,onActionCallback:St,fullScreen:Ot,insertTemp:Tt,hidetoolBar:_t,extraUse:dn})=>{const Pn=[...Pe,{title:`${Ke?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Ke?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return de.createElement("ul",{className:"markdown-toolbar-container"},!_t&&Pn.map((mn,on)=>de.createElement("li",{key:on},mn.actionName?de.createElement(Ae,we(Se({},mn),{onActionCallback:St})):de.createElement("span",{className:"v-line"}))),qe?de.createElement("li",null,de.createElement(Ae,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:St},de.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ye?de.createElement(de.Fragment,null,de.createElement("li",null,de.createElement(Ae,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:St},de.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),de.createElement("li",null,de.createElement(Ae,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:St},de.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,Tt&&de.createElement("li",null,de.createElement(Ae,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Tt}`,onActionCallback:St},de.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),dn&&de.createElement("li",null,dn),de.createElement("li",{className:"btn-full-screen"},de.createElement(Ae,{icon:`${Ot?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Ot?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:St})))},ze=Ee(79346),Ze=Ee(78241),Xe=Ee(92832),Ge=Ee(3113),ft=Object.defineProperty,at=Object.defineProperties,Ct=Object.getOwnPropertyDescriptors,et=Object.getOwnPropertySymbols,yt=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable,zt=(Ke,qe,Ye)=>qe in Ke?ft(Ke,qe,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):Ke[qe]=Ye,lt=(Ke,qe)=>{for(var Ye in qe||(qe={}))yt.call(qe,Ye)&&zt(Ke,Ye,qe[Ye]);if(et)for(var Ye of et(qe))st.call(qe,Ye)&&zt(Ke,Ye,qe[Ye]);return Ke},tt=(Ke,qe)=>at(Ke,Ct(qe));const ut={labelCol:{span:4},wrapperCol:{span:20}};var mt=({callback:Ke,onCancel:qe})=>{function Ye(St){Ke(St)}return Me.createElement(Ze.default,tt(lt({},ut),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ye,style:{width:500}}),Me.createElement(Ze.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},Me.createElement(Xe.default,null)),Me.createElement(Ze.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},Me.createElement(Xe.default,null)),Me.createElement("div",{className:"flex-container flex-end"},Me.createElement(Ge.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Me.createElement(Ge.ZP,{type:"ghost",onClick:qe},"\u53D6\u6D88")))},Pt=Ee(53932),gt=Ee(28451),Ft=Ee(43418),Ht=Ee(95237),hn=Ee(16406),Jt=Ee(59301),bn=({callback:Ke,onCancel:qe})=>{const Ye=document.createElement("canvas"),St=Ye.getContext("2d");Ye.width=1e3,Ye.height=800,St.fillStyle="#ffffff",St.fillRect(0,0,Ye.width,Ye.height);const Ot=Ye.toDataURL("image/png");return Jt.createElement(Ft.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Jt.createElement(Ht.Z,{style:{height:"100vh"}},Jt.createElement(hn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Ot,visible:!0,title:String(Date.now())},onOk:Tt=>{Ke({src:Tt.url})},onClose:qe})))},Wt=Ee(12378);function Kt(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(Kt,go.CommandHandler),Kt.prototype.canAlignSelection=function(){var Ke=this.diagram;return!(Ke===null||Ke.isReadOnly||Ke.isModelReadOnly||Ke.selection.count<2)},Kt.prototype.alignLeft=function(){var Ke=this.diagram;Ke.startTransaction("aligning left");var qe=1/0;Ke.selection.each(function(Ye){Ye instanceof go.Link||(qe=Math.min(Ye.position.x,qe))}),Ke.selection.each(function(Ye){Ye instanceof go.Link||Ye.move(new go.Point(qe,Ye.position.y))}),Ke.commitTransaction("aligning left")},Kt.prototype.alignRight=function(){var Ke=this.diagram;Ke.startTransaction("aligning right");var qe=-1/0;Ke.selection.each(function(Ye){if(!(Ye instanceof go.Link)){var St=Ye.actualBounds.x+Ye.actualBounds.width;qe=Math.max(St,qe)}}),Ke.selection.each(function(Ye){Ye instanceof go.Link||Ye.move(new go.Point(qe-Ye.actualBounds.width,Ye.position.y))}),Ke.commitTransaction("aligning right")},Kt.prototype.alignTop=function(){var Ke=this.diagram;Ke.startTransaction("alignTop");var qe=1/0;Ke.selection.each(function(Ye){Ye instanceof go.Link||(qe=Math.min(Ye.position.y,qe))}),Ke.selection.each(function(Ye){Ye instanceof go.Link||Ye.move(new go.Point(Ye.position.x,qe))}),Ke.commitTransaction("alignTop")},Kt.prototype.alignBottom=function(){var Ke=this.diagram;Ke.startTransaction("aligning bottom");var qe=-1/0;Ke.selection.each(function(Ye){if(!(Ye instanceof go.Link)){var St=Ye.actualBounds.y+Ye.actualBounds.height;qe=Math.max(St,qe)}}),Ke.selection.each(function(Ye){Ye instanceof go.Link||Ye.move(new go.Point(Ye.actualBounds.x,qe-Ye.actualBounds.height))}),Ke.commitTransaction("aligning bottom")},Kt.prototype.alignCenterX=function(){var Ke=this.diagram,qe=Ke.selection.first();if(qe){Ke.startTransaction("aligning Center X");var Ye=qe.actualBounds.x+qe.actualBounds.width/2;Ke.selection.each(function(St){St instanceof go.Link||St.move(new go.Point(Ye-St.actualBounds.width/2,St.actualBounds.y))}),Ke.commitTransaction("aligning Center X")}},Kt.prototype.alignCenterY=function(){var Ke=this.diagram,qe=Ke.selection.first();if(qe){Ke.startTransaction("aligning Center Y");var Ye=qe.actualBounds.y+qe.actualBounds.height/2;Ke.selection.each(function(St){St instanceof go.Link||St.move(new go.Point(St.actualBounds.x,Ye-St.actualBounds.height/2))}),Ke.commitTransaction("aligning Center Y")}},Kt.prototype.alignColumn=function(Ke){var qe=this.diagram;qe.startTransaction("align Column"),Ke===void 0&&(Ke=0),Ke=parseFloat(Ke);var Ye=new Array;qe.selection.each(function(dn){dn instanceof go.Link||Ye.push(dn)});for(var St=0;St<Ye.length-1;St++){var Ot=Ye[St],Tt=Ot.actualBounds.y+Ot.actualBounds.height+Ke,_t=Ye[St+1];_t.move(new go.Point(Ot.actualBounds.x,Tt))}qe.commitTransaction("align Column")},Kt.prototype.alignRow=function(Ke){Ke===void 0&&(Ke=0),Ke=parseFloat(Ke);var qe=this.diagram;qe.startTransaction("align Row");var Ye=new Array;qe.selection.each(function(dn){dn instanceof go.Link||Ye.push(dn)});for(var St=0;St<Ye.length-1;St++){var Ot=Ye[St],Tt=Ot.actualBounds.x+Ot.actualBounds.width+Ke,_t=Ye[St+1];_t.move(new go.Point(Tt,Ot.actualBounds.y))}qe.commitTransaction("align Row")},Kt.prototype.canRotate=function(Ke){var qe=this.diagram;return!(qe===null||qe.isReadOnly||qe.isModelReadOnly||qe.selection.count<1)},Kt.prototype.rotate=function(Ke){Ke===void 0&&(Ke=90);var qe=this.diagram;qe.startTransaction("rotate "+Ke.toString());var qe=this.diagram;qe.selection.each(function(Ye){Ye instanceof go.Link||Ye instanceof go.Group||(Ye.angle+=Ke)}),qe.commitTransaction("rotate "+Ke.toString())},Kt.prototype.pullToFront=function(){var Ke=this.diagram;Ke.startTransaction("pullToFront");var qe=new go.Map;Ke.selection.each(function(Ye){qe.set(Ye.layer,0)}),qe.iteratorKeys.each(function(Ye){var St=0;Ye.parts.each(function(Ot){if(!Ot.isSelected){var Tt=Ot.zOrder;isNaN(Tt)?Ot.zOrder=0:St=Math.max(St,Tt)}}),qe.set(Ye,St)}),Ke.selection.each(function(Ye){Kt._assignZOrder(Ye,qe.get(Ye.layer)+1)}),Ke.commitTransaction("pullToFront")},Kt.prototype.pushToBack=function(){var Ke=this.diagram;Ke.startTransaction("pushToBack");var qe=new go.Map;Ke.selection.each(function(Ye){qe.set(Ye.layer,0)}),qe.iteratorKeys.each(function(Ye){var St=0;Ye.parts.each(function(Ot){if(!Ot.isSelected){var Tt=Ot.zOrder;isNaN(Tt)?Ot.zOrder=0:St=Math.min(St,Tt)}}),qe.set(Ye,St)}),Ke.selection.each(function(Ye){Kt._assignZOrder(Ye,qe.get(Ye.layer)-1-Kt._findGroupDepth(Ye))}),Ke.commitTransaction("pushToBack")},Kt._assignZOrder=function(Ke,qe,Ye){Ye===void 0&&(Ye=Ke),Ke.layer===Ye.layer&&(Ke.zOrder=qe),Ke instanceof go.Group&&Ke.memberParts.each(function(St){Kt._assignZOrder(St,qe+1,Ye)})},Kt._findGroupDepth=function(Ke){if(Ke instanceof go.Group){var qe=0;return Ke.memberParts.each(function(Ye){qe=Math.max(qe,Kt._findGroupDepth(Ye))}),qe+1}else return 0},Kt.prototype.doKeyDown=function(){var Ke=this.diagram;if(Ke!==null){var qe=Ke.lastInput;if(qe.key==="Up"||qe.key==="Down"||qe.key==="Left"||qe.key==="Right"){var Ye=this.arrowKeyBehavior;if(Ye==="none")return;if(Ye==="select"){this._arrowKeySelect();return}else if(Ye==="move"){this._arrowKeyMove();return}else if(Ye==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},Kt.prototype._getAllParts=function(){var Ke=new Array;return this.diagram.nodes.each(function(qe){Ke.push(qe)}),this.diagram.parts.each(function(qe){Ke.push(qe)}),Ke},Kt.prototype._arrowKeyMove=function(){var Ke=this.diagram,qe=Ke.lastInput,Ye=0,St=0;if(qe.control||qe.meta)Ye=1,St=1;else if(Ke.grid!==null){var Ot=Ke.grid.gridCellSize;St=Ot.width,Ye=Ot.height}Ke.startTransaction("arrowKeyMove"),Ke.selection.each(function(Tt){qe.key==="Up"?Tt.move(new go.Point(Tt.actualBounds.x,Tt.actualBounds.y-Ye)):qe.key==="Down"?Tt.move(new go.Point(Tt.actualBounds.x,Tt.actualBounds.y+Ye)):qe.key==="Left"?Tt.move(new go.Point(Tt.actualBounds.x-St,Tt.actualBounds.y)):qe.key==="Right"&&Tt.move(new go.Point(Tt.actualBounds.x+St,Tt.actualBounds.y))}),Ke.commitTransaction("arrowKeyMove")},Kt.prototype._arrowKeySelect=function(){var Ke=this.diagram,qe=Ke.lastInput,Ye=null;qe.key==="Up"?Ye=this._findNearestPartTowards(270):qe.key==="Down"?Ye=this._findNearestPartTowards(90):qe.key==="Left"?Ye=this._findNearestPartTowards(180):qe.key==="Right"&&(Ye=this._findNearestPartTowards(0)),Ye!==null&&(qe.shift?Ye.isSelected=!0:qe.control||qe.meta?Ye.isSelected=!Ye.isSelected:Ke.select(Ye))},Kt.prototype._findNearestPartTowards=function(Ke){var qe=this.diagram.selection.first();if(qe===null)return null;for(var Ye=qe.actualBounds.center,St=this._getAllParts(),Ot=1/0,Tt=qe,_t=0;_t<St.length;_t++){var dn=St[_t];if(dn!==qe&&dn.canSelect()){var Pn=dn.actualBounds.center,mn=Ye.directionPoint(Pn),on=this._angleCloseness(mn,Ke);if(on<=45){var Nt=Ye.distanceSquaredPoint(Pn);Nt*=1+Math.sin(on*Math.PI/180),Nt<Ot&&(Ot=Nt,Tt=dn)}}}return Tt},Kt.prototype._angleCloseness=function(Ke,qe){return Math.min(Math.abs(qe-Ke),Math.min(Math.abs(qe+360-Ke),Math.abs(qe-360-Ke)))},Kt.prototype._arrowKeyTree=function(){var Ke=this.diagram,qe=Ke.selection.first();if(qe instanceof go.Node){var Ye=Ke.lastInput;if(Ye.key==="Right"){if(!qe.isTreeLeaf)if(!qe.isTreeExpanded)Ke.commandHandler.canExpandTree(qe)&&Ke.commandHandler.expandTree(qe);else{var St=this._sortTreeChildrenByY(qe).first();St!==null&&Ke.select(St)}}else if(Ye.key==="Left")if(!qe.isTreeLeaf&&qe.isTreeExpanded)Ke.commandHandler.canCollapseTree(qe)&&Ke.commandHandler.collapseTree(qe);else{var Ot=qe.findTreeParentNode();Ot!==null&&Ke.select(Ot)}else if(Ye.key==="Up"){var Ot=qe.findTreeParentNode();if(Ot!==null){var Tt=this._sortTreeChildrenByY(Ot),_t=Tt.indexOf(qe);if(_t>0){for(var dn=Tt.elt(_t-1);dn!==null&&dn.isTreeExpanded&&!dn.isTreeLeaf;){var Pn=this._sortTreeChildrenByY(dn);dn=Pn.last()}dn!==null&&Ke.select(dn)}else Ke.select(Ot)}}else if(Ye.key==="Down")if(qe.isTreeExpanded&&!qe.isTreeLeaf){var St=this._sortTreeChildrenByY(qe).first();St!==null&&Ke.select(St)}else for(;qe!==null;){var Ot=qe.findTreeParentNode();if(Ot===null)break;var Tt=this._sortTreeChildrenByY(Ot),_t=Tt.indexOf(qe);if(_t<Tt.length-1){Ke.select(Tt.elt(_t+1));break}else qe=Ot}var mn=Ke.selection.first();mn!==null&&Ke.scrollToRect(mn.actualBounds)}},Kt.prototype._sortTreeChildrenByY=function(Ke){var qe=new go.List().addAll(Ke.findTreeChildrenNodes());return qe.sort(function(Ye,St){var Ot=Ye.location,Tt=St.location;return Ot.y<Tt.y?-1:Ot.y>Tt.y?1:Ot.x<Tt.x?-1:Ot.x>Tt.x?1:0}),qe},Kt.prototype.copyToClipboard=function(Ke){go.CommandHandler.prototype.copyToClipboard.call(this,Ke),this._lastPasteOffset.set(this.pasteOffset)},Kt.prototype.pasteFromClipboard=function(){var Ke=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(Ke,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),Ke},Object.defineProperty(Kt.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(Ke){if(Ke!=="move"&&Ke!=="select"&&Ke!=="scroll"&&Ke!=="tree"&&Ke!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+Ke);this._arrowKeyBehavior=Ke}}),Object.defineProperty(Kt.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(Ke){if(!(Ke instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+Ke);this._pasteOffset.set(Ke)}});var Xt=Kt,$t=Ee(74413),kt=Ee(43604),pt=Ee(99064),Bt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},xt=Ee(24065),vt=Ee(59301),nt=(Ke,qe,Ye)=>new Promise((St,Ot)=>{var Tt=Pn=>{try{dn(Ye.next(Pn))}catch(mn){Ot(mn)}},_t=Pn=>{try{dn(Ye.throw(Pn))}catch(mn){Ot(mn)}},dn=Pn=>Pn.done?St(Pn.value):Promise.resolve(Pn.value).then(Tt,_t);dn((Ye=Ye.apply(Ke,qe)).next())});function He({onCancel:Ke,callback:qe}){let Ye=(0,Me.useRef)(),St=(0,Me.useRef)(),Ot=(0,Me.useRef)(),Tt=(0,Me.useRef)(!1);const _t=(0,Me.useRef)(!1),[dn,Pn]=(0,Me.useState)(0);function mn(){const Nt=Wt.bx.make,un={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"};Ye.current=new Wt.S0(St.current,{padding:20,grid:Nt(Wt.s_,"Grid",Nt(Wt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Nt(Wt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Jn=>{var ui=Jn.diagram.commandHandler.addTopLevelParts(Jn.diagram.selection,!0);ui||Jn.diagram.currentTool.doCancel()},commandHandler:Nt(Xt),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Jn=>{var ui=Jn.subject;ui.location=ui.location.copy().snapToGridPoint(Jn.diagram.grid.gridOrigin,Jn.diagram.grid.gridCellSize),setTimeout(()=>{Jn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Jn=>{var ui=Jn.subject;setTimeout(()=>{Jn.diagram.commandHandler.editTextBlock()})},LinkRelinked:Jn=>{var ui=Jn.parameter.part;ui.invalidateConnectedLinks();var Si=Jn.subject;Jn.diagram.toolManager.linkingTool.isForwards?Si.toNode.invalidateConnectedLinks():Si.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Ye.current.nodeTemplate=Nt(Wt.NB,"Auto",{locationSpot:Wt.z6.Center,locationObjectName:"SHAPE",desiredSize:new Wt.$u(120,60),minSize:new Wt.$u(40,40),resizable:!0,resizeCellSize:new Wt.$u(10,10),rotatable:!0},new Wt.KX("location","loc",Wt.E9.parse).makeTwoWay(Wt.E9.stringify),new Wt.KX("desiredSize","size",Wt.$u.parse).makeTwoWay(Wt.$u.stringify),Nt(Wt.bn,{name:"SHAPE",fill:un.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Wt.z6.AllSides,toSpot:Wt.z6.AllSides},new Wt.KX("figure"),new Wt.KX("fill"),new Wt.KX("stroke","borderColor"),new Wt.KX("strokeWidth","thickness"),new Wt.KX("strokeDashArray","dash")),Nt(Wt.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Nt(Wt.al,{margin:1,textAlign:"center",overflow:Wt.al.OverflowEllipsis,editable:!0},new Wt.KX("text").makeTwoWay(),new Wt.KX("stroke","color"))),Ye.current.nodeTemplate.toolTip=Nt("ToolTip",Nt(Wt.s_,"Vertical",{maxSize:new Wt.$u(200,NaN)},Nt(Wt.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Wt.KX("text")),Nt(Wt.al,{font:"10pt sans-serif",textAlign:"center"},new Wt.KX("text","details"))));function Mn(Jn,ui){var Si=(di,Ei)=>{di.handled=!0,di.diagram.model.commit(qi=>{var Fi=Ei.part.adornedPart,zi=new Wt.E9().setRectSpot(Fi.actualBounds,Jn);zi.subtract(Fi.location),zi.scale(2,2),zi.x+=Math.sign(zi.x)*130,zi.y+=Math.sign(zi.y)*130,zi.add(Fi.location),zi.snapToGridPoint(di.diagram.grid.gridOrigin,di.diagram.grid.gridCellSize);var fr=qi.copyNodeData(Fi.data);qi.setGroupKeyForNodeData(fr,qi.getGroupKeyForNodeData(Fi.data)),qi.addNodeData(fr);var Bn={from:Fi.key,to:qi.getKeyForNodeData(fr)};qi.addLinkData(Bn);var Br=di.diagram.findNodeForData(fr);Br.location=zi,di.diagram.select(Br),setTimeout(()=>{di.diagram.commandHandler.editTextBlock()},20)})};return Nt(Wt.bn,{figure:ui,alignment:Jn,alignmentFocus:Jn.opposite(),width:Jn.equals(Wt.z6.Top)||Jn.equals(Wt.z6.Bottom)?25:18,height:Jn.equals(Wt.z6.Top)||Jn.equals(Wt.z6.Bottom)?18:25,fill:"orange",stroke:un.white,strokeWidth:4,mouseEnter:(di,Ei)=>Ei.fill="dodgerblue",mouseLeave:(di,Ei)=>Ei.fill="orange",isActionable:!0,click:Si,contextClick:Si})}function Dn(Jn){return Nt(Wt.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:(ui,Si)=>Si.fill="dodgerblue",mouseLeave:(ui,Si)=>Si.fill="orange",click:(ui,Si)=>{ui.diagram.commandHandler.showContextMenu(Si.part.adornedPart)}},Jn||{})}Ye.current.nodeTemplate.selectionAdornmentTemplate=Nt(Wt.uz,"Spot",Nt(Wt.Vm,{padding:10}),Mn(Wt.z6.Top,"TriangleUp"),Mn(Wt.z6.Left,"TriangleLeft"),Mn(Wt.z6.Right,"TriangleRight"),Mn(Wt.z6.Bottom,"TriangleDown"),Dn({alignment:new Wt.z6(.75,0)}));function nn(Jn,ui){return(Si,di)=>{Si.handled=!0,Si.diagram.model.commit(Ei=>{Ei.set(di.part.adornedPart.data,Jn,ui)})}}function sn(Jn,ui){return ui||(ui="color"),Nt(Wt.bn,{width:16,height:16,stroke:"lightgray",fill:Jn,margin:1,background:"transparent",mouseEnter:(Si,di)=>di.stroke="dodgerblue",mouseLeave:(Si,di)=>di.stroke="lightgray",click:nn(ui,Jn),contextClick:nn(ui,Jn)})}function Nn(){return[Nt("ContextMenuButton",Nt(Wt.s_,"Horizontal",sn(un.white,"fill"),sn(un.beige,"fill"),sn(un.extralightblue,"fill"),sn(un.extralightred,"fill"))),Nt("ContextMenuButton",Nt(Wt.s_,"Horizontal",sn(un.lightgray,"fill"),sn(un.lightgreen,"fill"),sn(un.lightblue,"fill"),sn(un.lightred,"fill")))]}function On(){return[Nt("ContextMenuButton",Nt(Wt.s_,"Horizontal",sn(un.black),sn(un.green),sn(un.blue),sn(un.red))),Nt("ContextMenuButton",Nt(Wt.s_,"Horizontal",sn(un.white),sn(un.magenta),sn(un.purple),sn(un.orange)))]}function qn(Jn,ui){return ui||(ui="thickness"),Nt(Wt.bn,"LineH",{width:16,height:16,strokeWidth:Jn,margin:1,background:"transparent",mouseEnter:(Si,di)=>di.background="dodgerblue",mouseLeave:(Si,di)=>di.background="transparent",click:nn(ui,Jn),contextClick:nn(ui,Jn)})}function Hn(Jn,ui){return ui||(ui="dash"),Nt(Wt.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Jn,margin:1,background:"transparent",mouseEnter:(Si,di)=>di.background="dodgerblue",mouseLeave:(Si,di)=>di.background="transparent",click:nn(ui,Jn),contextClick:nn(ui,Jn)})}function ei(){return[Nt("ContextMenuButton",Nt(Wt.s_,"Horizontal",qn(1),qn(2),qn(3),qn(4))),Nt("ContextMenuButton",Nt(Wt.s_,"Horizontal",Hn(null),Hn([2,4]),Hn([4,4])))]}function Fn(Jn,ui){return ui||(ui="figure"),Nt(Wt.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Jn,margin:1,background:"transparent",mouseEnter:(Si,di)=>di.fill="dodgerblue",mouseLeave:(Si,di)=>di.fill="lightgray",click:nn(ui,Jn),contextClick:nn(ui,Jn)})}Ye.current.nodeTemplate.contextMenu=Nt("ContextMenu",Nt("ContextMenuButton",Nt(Wt.s_,"Horizontal",Fn("Rectangle"),Fn("RoundedRectangle"),Fn("Ellipse"),Fn("Diamond"))),Nt("ContextMenuButton",Nt(Wt.s_,"Horizontal",Fn("Parallelogram2"),Fn("ManualOperation"),Fn("Procedure"),Fn("Cylinder1"))),Nt("ContextMenuButton",Nt(Wt.s_,"Horizontal",Fn("Terminator"),Fn("CreateRequest"),Fn("Document"),Fn("TriangleDown"))),Nn(),On(),ei()),Ye.current.groupTemplate=Nt(Wt.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Wt.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Jn,ui)=>{var Si=ui.addMembers(ui.diagram.selection,!0);Si||ui.diagram.currentTool.doCancel()},avoidable:!1},new Wt.KX("location","loc",Wt.E9.parse).makeTwoWay(Wt.E9.stringify),Nt(Wt.s_,"Auto",{name:"BODY"},Nt(Wt.bn,{parameter1:10,fill:un.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Wt.z6.AllSides,toSpot:Wt.z6.AllSides},new Wt.KX("fill"),new Wt.KX("stroke","color"),new Wt.KX("strokeWidth","thickness"),new Wt.KX("strokeDashArray","dash")),Nt(Wt.Vm,{background:"transparent",margin:20})),Nt(Wt.al,{alignment:Wt.z6.Top,alignmentFocus:Wt.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new Wt.KX("text"),new Wt.KX("stroke","color"))),Ye.current.groupTemplate.selectionAdornmentTemplate=Nt(Wt.uz,"Spot",Nt(Wt.s_,"Auto",Nt(Wt.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Nt(Wt.Vm,{margin:1.5})),Dn({alignment:Wt.z6.TopRight,alignmentFocus:Wt.z6.BottomRight})),Ye.current.groupTemplate.contextMenu=Nt("ContextMenu",Nn(),On(),ei()),Ye.current.linkTemplate=Nt(Wt.rU,{layerName:"Foreground",routing:Wt.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new Wt.KX("fromSpot","fromSpot",Wt.z6.parse),new Wt.KX("toSpot","toSpot",Wt.z6.parse),new Wt.KX("fromShortLength","dir",Jn=>Jn>=1?10:0),new Wt.KX("toShortLength","dir",Jn=>Jn>=1?10:0),new Wt.KX("points").makeTwoWay(),Nt(Wt.bn,{strokeWidth:2},new Wt.KX("stroke","color"),new Wt.KX("strokeWidth","thickness"),new Wt.KX("strokeDashArray","dash")),Nt(Wt.bn,{segmentIndex:0,segmentOffset:new Wt.E9(15,0),segmentOrientation:Wt.rU.OrientAlong,alignmentFocus:Wt.z6.Right,figure:"circle",width:10,strokeWidth:0},new Wt.KX("fill","color"),new Wt.KX("visible","dir",Jn=>Jn===1)),Nt(Wt.bn,{segmentIndex:-1,segmentOffset:new Wt.E9(-10,6),segmentOrientation:Wt.rU.OrientPlus90,alignmentFocus:Wt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Wt.KX("fill","color"),new Wt.KX("visible","dir",Jn=>Jn>=1),new Wt.KX("width","thickness",Jn=>7+3*Jn),new Wt.KX("height","thickness",Jn=>7+3*Jn),new Wt.KX("segmentOffset","thickness",Jn=>new Wt.E9(-15,4+1.5*Jn))),Nt(Wt.bn,{segmentIndex:0,segmentOffset:new Wt.E9(15,-6),segmentOrientation:Wt.rU.OrientMinus90,alignmentFocus:Wt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Wt.KX("fill","color"),new Wt.KX("visible","dir",Jn=>Jn===2),new Wt.KX("width","thickness",Jn=>7+3*Jn),new Wt.KX("height","thickness",Jn=>7+3*Jn),new Wt.KX("segmentOffset","thickness",Jn=>new Wt.E9(-15,4+1.5*Jn))),Nt(Wt.al,{alignmentFocus:new Wt.z6(0,1,-4,0),editable:!0},new Wt.KX("text").makeTwoWay(),new Wt.KX("stroke","color"))),Ye.current.linkTemplate.selectionAdornmentTemplate=Nt(Wt.uz,Nt(Wt.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:hi(2)},new Wt.KX("pathPattern","thickness",hi)),Dn({alignmentFocus:new Wt.z6(0,0,-6,-4)}));function hi(Jn){return Nt(Wt.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Jn+4).toString()+" H3"})}function Di(Jn){var ui="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Jn===0?ui="M0 0 M16 16 M0 8 L16 8":Jn===2&&(ui="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Nt(Wt.bn,{geometryString:ui,margin:2,background:"transparent",mouseEnter:(Si,di)=>di.background="dodgerblue",mouseLeave:(Si,di)=>di.background="transparent",click:nn("dir",Jn),contextClick:nn("dir",Jn)})}function Ri(Jn){var ui=(Si,di)=>{Si.handled=!0,Si.diagram.model.commit(Ei=>{var qi=di.part.adornedPart;Ei.set(qi.data,Jn?"toSpot":"fromSpot",Wt.z6.stringify(Wt.z6.AllSides)),(Jn?qi.toNode:qi.fromNode).invalidateConnectedLinks()})};return Nt(Wt.bn,{width:12,height:12,fill:"transparent",mouseEnter:(Si,di)=>di.background="dodgerblue",mouseLeave:(Si,di)=>di.background="transparent",click:ui,contextClick:ui})}function En(Jn,ui){var Si=0,di=Wt.z6.RightSide;Jn.equals(Wt.z6.Top)?(Si=270,di=Wt.z6.TopSide):Jn.equals(Wt.z6.Left)?(Si=180,di=Wt.z6.LeftSide):Jn.equals(Wt.z6.Bottom)&&(Si=90,di=Wt.z6.BottomSide),ui||(Si-=180);var Ei=(qi,Fi)=>{qi.handled=!0,qi.diagram.model.commit(zi=>{var fr=Fi.part.adornedPart;zi.set(fr.data,ui?"toSpot":"fromSpot",Wt.z6.stringify(di)),(ui?fr.toNode:fr.fromNode).invalidateConnectedLinks()})};return Nt(Wt.bn,{alignment:Jn,alignmentFocus:Jn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:Si,background:"transparent",mouseEnter:(qi,Fi)=>Fi.background="dodgerblue",mouseLeave:(qi,Fi)=>Fi.background="transparent",click:Ei,contextClick:Ei})}Ye.current.linkTemplate.contextMenu=Nt("ContextMenu",On(),ei(),Nt("ContextMenuButton",Nt(Wt.s_,"Horizontal",Di(0),Di(1),Di(2))),Nt("ContextMenuButton",Nt(Wt.s_,"Horizontal",Nt(Wt.s_,"Spot",Ri(!1),En(Wt.z6.Top,!1),En(Wt.z6.Left,!1),En(Wt.z6.Right,!1),En(Wt.z6.Bottom,!1)),Nt(Wt.s_,"Spot",{margin:new Wt.Zt(0,0,0,2)},Ri(!0),En(Wt.z6.Top,!0),En(Wt.z6.Left,!0),En(Wt.z6.Right,!0),En(Wt.z6.Bottom,!0)))));const $i=`{ "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 Cr=["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 mr(Jn){return console.log("shapeName:",Jn),Cr.indexOf(Jn)>=0}var Ln=new Wt.YI(Ot.current,{maxSelectionCount:1,linkTemplate:Nt(Wt.rU,{locationSpot:Wt.z6.Center,selectionAdornmentTemplate:Nt(Wt.uz,"Link",{locationSpot:Wt.z6.Center},Nt(Wt.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Nt(Wt.bn,{toArrow:"Standard",stroke:null}))},{routing:Wt.rU.AvoidsNodes,curve:Wt.rU.JumpOver,corner:5,toShortLength:4},new Wt.KX("points"),Nt(Wt.bn,{isPanelMain:!0,strokeWidth:2}),Nt(Wt.bn,{toArrow:"Standard",stroke:null})),model:new Wt.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...Wt.bn.getFigureGenerators().toArray().map(Jn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Jn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Ye.current.addDiagramListener("TextEdited",function(Jn){var ui;const Si=Jn.subject.part;var di=(ui=document.activeElement)==null?void 0:ui.value;typeof di=="string"&&di.trim()===""&&Ye.current.model.commit(function(Ei){Ei.set(Si.data,"text","\u672A\u547D\u540D"),Ye.current.commandHandler.stopCommand()},"increment")}),Ln.nodeTemplate=Nt(Wt.NB,"Auto",{locationSpot:Wt.z6.Center},new Wt.KX("location","location",Wt.E9.parse).makeTwoWay(Wt.E9.stringify),Nt(Wt.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 Wt.KX("stroke").makeTwoWay(),new Wt.KX("fill").makeTwoWay(),new Wt.KX("figure")),Nt(Wt.al,{margin:new Wt.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new Wt.$u(16,16),maxSize:new Wt.$u(10,NaN),textAlign:"center",editable:!0},new Wt.KX("key").makeTwoWay())),setTimeout(()=>{Ye.current.grid=Nt(Wt.s_,"Grid",Nt(Wt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Nt(Wt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Ye.current.grid.visible=!0,Ye.current.grid.gridCellStroke="darkgray",Ye.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Ye.current,Ye.current}const on=()=>nt(this,null,function*(){var Nt,un=Ye.current.makeImage();const Mn=yield(0,pt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:un.src,file_data:JSON.stringify({login:(Nt=(0,xt.eY)())==null?void 0:Nt.login,data:JSON.parse(Ye.current.model.toJson())})}});qe({src:Mn.url})});return(0,Me.useEffect)(()=>(setTimeout(()=>{mn()},500),Pn(dn+1),()=>{Ye.current=null}),[]),vt.createElement("div",{ref:_t,className:Tt.current?`${Bt.maxH60} body-overflow-initial`:"body-overflow-initial"},vt.createElement(Ft.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!dn,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:vt.createElement(Ht.Z,null,vt.createElement(kt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),vt.createElement(kt.Z,{onClick:()=>{var Nt,un,Mn=Ye.current.selection.first();if(Tt.current=!Tt.current,document.activeElement&&Mn){let Dn=(un=(Nt=document.activeElement)==null?void 0:Nt.value)==null?void 0:un.trim();typeof Dn=="string"&&Ye.current.model.commit(function(nn){nn.set(Mn.data,"text",Dn||"\u672A\u547D\u540D"),Ye.current.commandHandler.stopCommand()},"increment")}Pn(dn+1)}},vt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Ke},vt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:Bt.flowChartWrp},vt.createElement("div",{style:{display:"flex",height:"100%"}},vt.createElement("div",{style:{width:"300px",height:"100%"}},vt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),vt.createElement("div",{style:{height:"calc(100% - 50px)"},className:Bt.myPaletteDiv,ref:Ot})),vt.createElement("div",{style:{flex:1,position:"relative"}},vt.createElement("div",{ref:St,style:{height:"80vh"}}))),vt.createElement("div",{className:"tr"},vt.createElement(Ge.ZP,{size:"large",onClick:on,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Ie=He,We=Ee(5112),Oe=Ee(5871);const be=We.ZP.Group,Ne={margin:"0 8px"};var $e=({callback:Ke,onCancel:qe})=>{function Ye(St){Ke(St)}return Me.createElement(Ze.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ye},Me.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},Me.createElement("span",{style:Ne},"\u5355\u5143\u683C\u6570\uFF1A"),Me.createElement("span",{style:Ne},"\u884C\u6570"),Me.createElement(Ze.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},Me.createElement(Oe.Z,null)),Me.createElement("span",{style:Ne},"\u5217\u6570"),Me.createElement(Ze.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},Me.createElement(Oe.Z,null))),Me.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},Me.createElement("span",{style:Ne},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),Me.createElement(Ze.default.Item,{name:"align"},Me.createElement(be,null,Me.createElement(We.ZP,{value:"default"},Me.createElement("i",{className:"fa fa-align-justify"})),Me.createElement(We.ZP,{value:"left"},Me.createElement("i",{className:"fa fa-align-left"})),Me.createElement(We.ZP,{value:"center"},Me.createElement("i",{className:"fa fa-align-center"})),Me.createElement(We.ZP,{value:"right"},Me.createElement("i",{className:"fa fa-align-right"}))))),Me.createElement("div",{className:"flex-container flex-end"},Me.createElement(Ge.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Me.createElement(Ge.ZP,{type:"ghost",onClick:qe},"\u53D6\u6D88")))},dt=Ee(78673),Je=Ee(80727),At=Ee.n(Je),pn=(0,Me.forwardRef)(({use3d:Ke,width:qe,height:Ye,callback:St,showSaveButton:Ot},Tt)=>{const _t=(0,Me.useRef)(),dn=(0,Me.useRef)(),[Pn,mn]=(0,Me.useState)(!1),on=(0,Me.useRef)({id:_t,appName:"graphing",width:qe||1e3,height:Ye||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,Me.useEffect)(()=>{dn.current=new(At())(on.current,!0),window.onload=function(){dn.current.inject("applet_container")}},[]);const Nt=()=>{var un=window.ggbApplet.getPNGBase64(1,!0,72);return St&&St(un),un};return(0,Me.useEffect)(()=>{on.current.appName=Pn?"3D":"graphing",dn.current.inject("applet_container")},[Pn]),(0,Me.useEffect)(()=>{mn(Ke)},[Ke]),(0,Me.useImperativeHandle)(Tt,()=>({getImgData:Nt})),Me.createElement(Me.Fragment,null,Me.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:_t}),Me.createElement(Ht.Z,{align:"middle"},Me.createElement(kt.Z,{flex:1},Me.createElement(dt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Pn,onChange:un=>mn(un)})),Me.createElement(kt.Z,null,Me.createElement(Ge.ZP,{size:"large",onClick:Nt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),ln=Ee(41588),gn=Ee(8591);const Un="link",An="upload-image",ni="add-flowchart",ai="draw-image",ki="add-flowchart",Ci="code-block",Ki="add-table",ir="------------",sr={default:ir,left:`:${ir}`,center:`:${ir}:`,right:`${ir}:`};var Ji=Ee(58856);function Fr(){}let Mr=0;const vi=1e4,wr="\u2581",Tr="@\u2581\u2581@",it="@\u2581@",Rr=`
|
|
|
**\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`,Or=["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 Ur(Ke){return/^\d+$/.test(Ke)?`${Ke}px`:Ke}const po=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",io={[po+"-B"]:"bold",[po+"-I"]:"italic"},Do={[Un]:"\u6DFB\u52A0\u94FE\u63A5",[Ci]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[An]:"\u6DFB\u52A0\u56FE\u7247",[ai]:"\u6DFB\u52A0\u753B\u56FE",[ni]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Ki]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Xn=({defaultValue:Ke="",onChange:qe,width:Ye="100%",height:St=400,miniToolbar:Ot=!1,isFocus:Tt=!1,watch:_t,insertTemp:dn,mode:Pn="markdown",id:mn="markdown-editor-id",showResizeBar:on=!1,noStorage:Nt=!1,showNullButton:un=!1,showNullProgramButton:Mn=!1,hidetoolBar:Dn=!1,fullScreen:nn=!1,onBlur:sn,onCMBeforeChange:Nn,onFullScreen:On,className:qn="",disablePaste:Hn=!1,disabled:ei=!1,disabledFill:Fn=!1,placeholder:hi="",values:Di="",extraUse:Ri})=>{const[En,$i]=(0,Me.useState)(null),[Cr,mr]=(0,Me.useState)(Ke),[Ln,Jn]=(0,Me.useState)(_t),[ui,Si]=(0,Me.useState)(nn),[di,Ei]=(0,Me.useState)(""),[qi,Fi]=(0,Me.useState)(0),[zi,fr]=(0,Me.useState)(St),[Bn,Br]=(0,Me.useState)(!1),[In,pr]=(0,Me.useState)(0),[yo,Ir]=(0,Me.useState)(0),bo=(0,Me.useRef)(),co=(0,Me.useRef)(),Vi=(0,Me.useRef)(),Hi=(0,Me.useRef)();(0,Me.useEffect)(()=>{const rr=window.scrollY||window.pageYOffset;mr(Di),En==null||En.setValue(Di),window.scrollTo(0,rr)},[Di]),(0,Me.useEffect)(()=>{On==null||On(ui)},[ui]),(0,Me.useEffect)(()=>{if(bo.current){let rr=function(Qn,or){var to;if(Hn){or.preventDefault();return}const Ro=or.clipboardData;if(Ro){const Bo=Ro.types.toString(),Xo=Ro.items;if(Bo==="Files"||Ro.types.indexOf("Files")>-1){if(or.preventDefault(),Pn=="stex")return;try{let as=Xo[1];((to=Xo[0])==null?void 0:to.kind)==="file"&&(as=Xo[0]);const Ho=as.getAsFile(),ia=Ho.name.split(".").pop();(0,gt.I)(Ho,_s=>{var la,kn,Is;_s.id?((la=Ho==null?void 0:Ho.type)==null?void 0:la.indexOf("image"))>-1?Wi.replaceSelection(`<img width="100%" src="/api/attachments/${_s.id}?type=${_s.content_type})" alt="" />`):((kn=Ho==null?void 0:Ho.type)==null?void 0:kn.indexOf("video"))>-1?Wi.replaceSelection(`<video width="100%" controls src="/api/attachments/${_s.id}"></video>`):((Is=Ho==null?void 0:Ho.type)==null?void 0:Is.indexOf("pdf"))>-1?Wi.replaceSelection(`<a href="/api/attachments/${_s.id}?type=${Ho.type}&disposition=inline" target="_blank">${Ho.name}</a>`):Or.includes(ia)?Wi.replaceSelection(`<a href="/api/attachments/${_s.id}?type=office&disposition=inline" target="_blank">${Ho.name}</a>`):Wi.replaceSelection(`[${Ho.name}](/api/attachments/${_s.id}?type=${_s.content_type})`):(_s==null?void 0:_s.status)===401&&(document.location.href="/user/login")})}catch(as){gn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Wi=Be().fromTextArea(bo.current,{mode:Pn,lineNumbers:!Ot,lineWrapping:!0,value:Ke,autoCloseTags:!0,autoCloseBrackets:!0});return Wi.on("keyup",function(Qn,or){or.keyCode===8&&(Qn.getValue()==""?Wi.setOption("placeholder",hi):Wi.setOption("placeholder",null))}),Wi.on("keydown",function(Qn,or){if(or.keyCode===8){var to=Pr(Qn);to&&or.preventDefault()}}),Tt&&Wi.focus(),Wi.on("paste",rr),ei&&Wi.on("beforeChange",function(Qn,or){(or.origin==="paste"||or.origin==="+input")&&or.cancel()}),$i(Wi),()=>{Wi.off("paste",rr)}}},[]);const ur=(0,Me.useCallback)(()=>{if(co.current)try{}catch(rr){console.log(rr,"---- to set md editor body height")}},[zi,co,ui]);(0,Me.useEffect)(()=>{function rr(){let Wi=new ke.Z(Qn=>{for(let or of Qn)(or.target.offsetHeight>0||or.target.offsetWidth>0)&&(ur(),En.setSize("100%","100%"),En.refresh())});return Wi.observe(bo.current.parentElement),Wi}if(En){const Wi=rr();return()=>{var Qn,or;(Qn=bo.current)!=null&&Qn.parentElement&&Wi.unobserve((or=bo.current)==null?void 0:or.parentElement)}}},[En,ur]),(0,Me.useEffect)(()=>{if(En){let rr=[];for(const[Wi,Qn]of Object.entries(io)){let or={[Wi]:()=>{ci(Qn)}};rr.push(or),En.addKeyMap(or)}return()=>{for(let Wi of rr)En.removeKeyMap(Wi)}}},[En]),(0,Me.useEffect)(()=>{nn!==ui&&Si(nn)},[nn]),(0,Ji.Z)(()=>{if(!Nt&&qi>0){let rr=new Date().getTime(),Wi=window.sessionStorage.getItem(mn);rr>=qi+vi&&(!Wi||Wi!==Cr)&&(window.sessionStorage.setItem(mn,Cr),Br(!0))}},vi),(0,Me.useEffect)(()=>{Jn(_t)},[En,_t]),(0,Me.useEffect)(()=>{En&&Tt&&En.focus()},[En,Tt]),(0,Me.useEffect)(()=>{if(Ln&&En){let rr=function(Qn){let or=Qn.target;if(Hi.current){let to=or.scrollTop/or.scrollHeight;Hi.current.scrollTop=Hi.current.scrollHeight*to}};const Wi=En.getScrollerElement();return Wi.addEventListener("scroll",rr),()=>{Wi.removeEventListener("scroll",rr)}}},[En,Ln]),(0,Me.useEffect)(()=>{if(En&&Nn){let rr=function(Wi,Qn){Nn(Wi,Qn)};return En.on("beforeChange",rr),()=>{En.off("beforeChange",rr)}}},[En,Nn]),(0,Me.useEffect)(()=>{if(En&&sn){let rr=function(){sn(En.getValue())};return En.on("blur",rr),()=>{En.off("blur",rr)}}},[En,sn]);function Pr(rr,Wi){var Qn=rr.getDoc(),or=Qn.getCursor(),to=Qn.getLine(or.line),Ro=to.charAt(or.ch-1),Bo=to.lastIndexOf("@\u2581@",or.ch),Xo=to.lastIndexOf("@\u2581\u2581@",or.ch),as=Bo>Xo?Bo:Xo,Ho=Bo>Xo?3:4;if(Tr.indexOf(Ro)===-1)return null;if(console.log("change1:",Wi,rr,to,or,as,Bo,Xo,Ro),as>=0&&or.ch-as<5){var ia=as+Ho;return Qn.replaceRange("",{line:or.line,ch:as},{line:or.line,ch:ia}),{line:or.line,ch:ia}}return null}(0,Me.useEffect)(()=>{if(En){let rr=function(Wi,Qn){const or=Wi.getValue();mr(or),Fi(new Date().getTime()),Wi.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),qe&&(Mn?qe(or,cr(or)):qe(or))};return En.on("change",rr),()=>{En.off("change",rr)}}},[En,qe]),(0,Me.useEffect)(()=>{if(En)if(Ke==null)En.setValue(""),mr("");else{const rr=window.scrollY||window.pageYOffset;Ke!==En.getValue()&&(En.setValue(Ke),mr(Ke),En.setCursor(ei?1:En.lineCount(),0),window.scrollTo(0,rr))}},[En,Ke]);const ci=(0,Me.useCallback)(rr=>{const Wi=En.getCursor(),Qn=En.getSelection();let or=Qn.split(`
|
|
|
`);switch(rr){case"bold":return En.replaceSelection("**"+Qn+"**"),Qn===""&&En.setCursor(Wi.line,Wi.ch+2),En.focus();case"italic":return En.replaceSelection("*"+Qn+"*"),Qn===""&&En.setCursor(Wi.line,Wi.ch+1),En.focus();case"code":return En.replaceSelection("`"+Qn+"`"),Qn===""&&En.setCursor(Wi.line,Wi.ch+1),En.focus();case"inline-latex":return Ei("inline-latex"),En.focus();case"latex":return En.replaceSelection("```latex\n"+Qn+"\n```"),En.setCursor(Wi.line+1,Qn.length+1),En.focus();case"line-break":return En.replaceSelection(`<br/>
|
|
|
`),En.focus();case"list-ul":return Qn===""?En.replaceSelection("- "+Qn):En.replaceSelection(or.map(to=>to===""?"":`- ${to}`).join(`
|
|
|
`)),En.focus();case"list-ol":return Qn===""?En.replaceSelection("1. "+Qn):En.replaceSelection(or.map((to,Ro)=>to===""?"":`${Ro+1}. ${to}`).join(`
|
|
|
`)),En.focus();case"add-null-ch":return Qn===""&&En.setCursor(Wi.line,Wi.ch),En.replaceSelection(wr),En.focus();case"add-signal":return Qn===""&&En.setCursor(Wi.line,Wi.ch),En.replaceSelection(it),En.focus();case"add-multiple":return Qn===""&&En.setCursor(Wi.line,Wi.ch),En.replaceSelection(Tr),En.focus();case"inster-template-1":return Qn===""&&En.setCursor(Wi.line,Wi.ch),En.replaceSelection(Rr),En.focus();case"eraser":return En.setValue(""),En.focus();case"trigger-watch":return Jn(!Ln),En.focus();case"trigger-full-screen":return Si(!ui),En.focus();case Un:Ei(Un);return;case Ci:Ei(Ci);return;case An:Ei(An);return;case ai:Ei(ai);return;case"maths-latex":Ei("maths-latex");return;case ni:Ei(ni);return;case Ki:Ei(Ki);return;default:throw new Error}},[En,Ln,ui]),Mt=(0,Me.useCallback)((rr,Wi)=>{var Qn,or,to,Ro,Bo,Xo;switch(Ei(""),di){case Un:const{title:la,link:kn}=rr;return En.replaceSelection(`[${la}](${kn})`),En.focus();case Ci:const{language:Is,content:Pu}=rr;return En.replaceSelection(["```"+Is,Pu,"```"].join(`
|
|
|
`)),En.focus();case"maths-latex":for(var as=atob(rr),Ho=new Uint8Array(as.length),ia=0;ia<as.length;ia++)Ho[ia]=as.charCodeAt(ia);var _s=new Blob([Ho],{type:"image/png"});(0,gt.I)(_s,xr=>{xr.id?En.replaceSelection(``):(xr==null?void 0:xr.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":En.replaceSelection("`$$"+rr+"$$`");break;case An:case ai:case ki:const{src:Ua,alt:Sa}=rr,us=Wi,Ws=(to=(or=(Qn=us==null?void 0:us.name)==null?void 0:Qn.split("."))==null?void 0:or.pop)==null?void 0:to.call(or);return((Ro=us==null?void 0:us.type)==null?void 0:Ro.indexOf("image"))>-1||!(us!=null&&us.type)?us!=null&&us.align||us!=null&&us.width?En.replaceSelection(`<p style="text-align:${us.align||"initial"}"><img width="${us.width?us.width+"%":"initial"}" src="${Ua}" alt="${Sa||""}" /></p>`):En.replaceSelection(`<img width="100%" src="${Ua}" alt="${Sa||""}" />`):((Bo=us==null?void 0:us.type)==null?void 0:Bo.indexOf("video"))>-1?En.replaceSelection(`<video width="100%" controls src="${Ua}"></video>`):((Xo=us==null?void 0:us.type)==null?void 0:Xo.indexOf("pdf"))>-1?En.replaceSelection(`<a href="${Ua}?type=${us.type}&disposition=inline" target="_blank">${us.name}</a>`):Or.includes(Ws)?En.replaceSelection(`<a href="${Ua}?type=office&disposition=inline" target="_blank">${us.name}</a>`):En.replaceSelection(`[${us.name}](${Ua})`),En.focus();case Ki:const{row:Po,col:Ao,align:Eo}=rr;let ua=`
|
|
|
`;for(let xr=0;xr<Po;xr++){let lo=[],Yr=[];for(let Mi=0;Mi<Ao;Mi++)xr===1&&Yr.push(sr[Eo]),lo.push(" ");xr===1&&(ua+=`| ${Yr.join(" | ")} |
|
|
|
`),ua+=`| ${lo.join(Ao===1?"":" | ")} |
|
|
|
`}return En.replaceSelection(ua+`
|
|
|
`),En.focus();default:throw new Error}},[En,di]),Gr=(0,Me.useMemo)(()=>{switch(di){case Un:return Me.createElement(mt,{callback:Mt,onCancel:Hr});case Ci:return Me.createElement(Pt.Z,{callback:Mt,onCancel:Hr});case An:return Me.createElement(gt.Z,{callback:Mt,onCancel:Hr});case ni:return Me.createElement(Ie,{callback:Mt,onCancel:Hr});case Ki:return Me.createElement($e,{callback:Mt,onCancel:Hr});case"maths-latex":return Me.createElement(pn,{showSaveButton:!0,callback:Mt});case"inline-latex":return Me.createElement(ln.Z,{showSaveButton:!0,callback:Mt});default:return null}},[di]);function Hr(){Ei("")}(0,Me.useEffect)(()=>{if(Vi.current){let rr=function(Bo){to=!0,Ro=Bo.pageY},Wi=function(){to=!1},Qn=function(Bo){if(to){let Xo=Bo.pageY-Ro;Xo<0&&(Xo=0),Xo>300&&(Xo=300);let as=St+Xo+"px";fr(as)}},or=Vi.current,to=!1,Ro=0;return or.addEventListener("mousedown",rr),document.addEventListener("mousemove",Qn),document.addEventListener("mouseup",Wi),()=>{or.removeEventListener("mousedown",rr),document.removeEventListener("mousemove",Qn),document.removeEventListener("mouseup",Wi)}}},[En,Vi]),(0,Me.useEffect)(()=>{fr(St)},[St]);const ts=Ur(Ye),ko=Ur(zi),ss={width:ts,height:ko},_r=(0,Me.useMemo)(()=>{if(qi){let rr=new Date(qi),Wi=rr.getHours(),Qn=rr.getMinutes(),or=rr.getSeconds();return Wi=Wi<10?"0"+Wi:Wi,Qn=Qn<10?"0"+Qn:Qn,or=or<10?"0"+or:or,`${Wi}:${Qn}:${or}`}return 0},[qi]),cr=rr=>{const Wi=[];if(Mn){let Qn=-1;rr=rr.replace(/(@▁▁@|@▁@)/g,function(or,to,Ro){Wi.push({multiLine:or!==it})})}return Wi};function Vr(){window.sessionStorage.removeItem(mn),Br(!1),Fi(0)}function hr(){Br(!1),Fi(0),En.setValue(window.sessionStorage.getItem(mn))}(0,Me.useEffect)(()=>{Do[di]&&di!==ai&&di!==ni&&setTimeout(()=>{const rr=document.getElementsByClassName("markdown-popup-form")[0],Wi=window.innerWidth/2-rr.offsetWidth/2,Qn=window.innerHeight/2-rr.offsetHeight/2;pr(Wi),Ir(Qn)},0)},[di]);const eo=rr=>{rr.preventDefault();const Wi=rr.clientX-In,Qn=rr.clientY-yo;document.body.onmousemove=or=>{let to=or.clientX-Wi,Ro=or.clientY-Qn;const Bo=document.getElementsByClassName("markdown-popup-form")[0],Xo=window.innerWidth-Bo.offsetWidth,as=window.innerHeight-Bo.offsetHeight;to=Math.max(0,Math.min(to,Xo)),Ro=Math.max(0,Math.min(Ro,as)),Yo(or.clientX,or.clientY,Wi,Qn)&&(pr(to),Ir(Ro))},document.body.onmouseup=function(){document.body.onmousemove=null}},Yo=(rr,Wi,Qn,or)=>{const to=document.body.clientHeight,Ro=document.body.clientWidth;return rr<20&&Qn>rr||rr>Ro-20&&Qn<rr||Wi<20&&or>Wi||Wi>to-20&&or<Wi?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return Me.createElement(Me.Fragment,null,Me.createElement("div",{className:"markdown-editor-wrapper",ref:co},Me.createElement("div",{className:`markdown-editor-container ${qn} ${Ln?"on-preview":""} ${Ot?"mini":""} ${ui?"full-screen":""}`,style:ss},Me.createElement(De,{insertTemp:dn,watch:Ln,fullScreen:ui,showNullButton:un,showNullProgramButton:Mn,onActionCallback:ci,hidetoolBar:Dn,extraUse:Ri}),Me.createElement("div",{className:"markdown-editor-body"},Me.createElement("div",{className:"codemirror-container"},Me.createElement("textarea",{ref:bo,placeholder:hi})),Ln?Me.createElement("div",{ref:Hi,className:"preview-container"},Pn==="stex"&&Me.createElement(ve,{value:Cr}),Pn!=="stex"&&Me.createElement(le.Z,{disabledFill:Fn,showProgramFill:Mn,value:Cr})):null))),on?Me.createElement("a",{ref:Vi,className:"editor-resize"}):null,di===ai&&Me.createElement(bn,{callback:Mt,onCancel:Hr}),di===ni&&Me.createElement(Ie,{callback:Mt,onCancel:Hr}),Me.createElement(ze.Z,null,Do[di]&&di!==ai&&di!==ni?Me.createElement(Ft.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:In,top:yo},title:Me.createElement("div",{style:{cursor:"move"},onMouseDown:eo},Do[di]),open:!0,onCancel:Hr,footer:null,destroyOnClose:!0,width:di===ni?"1200px":null,height:di===ni?"80vh":null,className:"markdown-popup-form"},Gr):null))}},28451:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Pe},I:function(){return De}});var Me=Ee(78241),me=Ee(8591),Be=Ee(92832),ke=Ee(81327),Ce=Ee(5871),Le=Ee(5112),he=Ee(3113),ye=Ee(77903),xe=Ee(59301),ge=Ee(59301),le=Object.defineProperty,ve=Object.defineProperties,de=Object.getOwnPropertyDescriptors,ce=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,oe=(ze,Ze,Xe)=>Ze in ze?le(ze,Ze,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):ze[Ze]=Xe,ie=(ze,Ze)=>{for(var Xe in Ze||(Ze={}))z.call(Ze,Xe)&&oe(ze,Xe,Ze[Xe]);if(ce)for(var Xe of ce(Ze))ee.call(Ze,Xe)&&oe(ze,Xe,Ze[Xe]);return ze},se=(ze,Ze)=>ve(ze,de(Ze));const{useForm:ue}=Me.default,Se={width:280,marginRight:10},we={labelCol:{span:5},wrapperCol:{span:19}};var Pe=({callback:ze,onCancel:Ze})=>{const[Xe]=ue();let Ge=(0,xe.useRef)();function ft(et){Ge.current.width=Xe.getFieldValue("width"),Ge.current.align=Xe.getFieldValue("align"),ze(et,Ge.current)}function at(et,yt){if(et.status===-1){me.ZP.error(et.message);return}Xe.setFieldsValue({src:`/api/attachments/${et.id}`,type:yt.type})}function Ct(et){let yt=et.target.files[0];Ge.current=yt,De(yt,at)}return ge.createElement(Me.default,se(ie({form:Xe},we),{className:"upload-image-panel",onFinish:ft,style:{width:470,overflow:"hidden"}}),ge.createElement(Me.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},ge.createElement("div",{className:"flex-container"},ge.createElement(Me.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},ge.createElement(Be.default,{style:Se})),ge.createElement(Ae,{onFileChange:Ct}))),ge.createElement(Me.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},ge.createElement(Be.default,{style:{width:264}})),ge.createElement(Me.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},ge.createElement(ke.Z,null,ge.createElement(Me.default.Item,{name:"width",style:{margin:0}},ge.createElement(Ce.Z,{style:{width:264}})),ge.createElement("span",{className:"ml8"},"%"))),ge.createElement(Me.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},ge.createElement(Le.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"}]})),ge.createElement("aside",null,ge.createElement(Me.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},ge.createElement(he.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ge.createElement(he.ZP,{type:"default",onClick:Ze},"\u53D6\u6D88"))))};function Ae({onFileChange:ze}){return ge.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",ge.createElement("input",{type:"file",onChange:ze}))}function De(ze,Ze){if(!ze)throw new String("\u6CA1\u6709\u6587\u4EF6");let Xe=new FormData;Xe.append("editormd-image-file",ze),Xe.append("file_param_name","editormd-image-file"),Xe.append("byxhr","true");var Ge=new window.XMLHttpRequest;Ge.withCredentials=!0,Ge.addEventListener("load",function(ft){Ze(JSON.parse(ft.target.responseText),ze)},!1),Ge.addEventListener("error",function(ft){console.error(ft)},!1),Ge.open("POST",`${ye.KI}/api/attachments.json`),Ge.send(Xe)}},79346:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Be}});var Me=Ee(59301),me=Ee(4676);class Be extends Me.Component{constructor(Ce){super(Ce);const Le=window.document;this.node=Le.createElement("div"),Le.body.appendChild(this.node)}render(){const{children:Ce}=this.props;return(0,me.createPortal)(Ce,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},23954:function(_n,qt,Ee){"use strict";Ee.d(qt,{SV:function(){return nt},ZP:function(){return vt}});var Me=Ee(59301),me=Ee(76374);const Be={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"]},ke={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"]},Ce={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(`
|
|
|
`)}]},Le={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(`
|
|
|
`)}]},he={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 ye=Ee(53184),xe=Ee.n(ye),ge=Object.defineProperty,le=Object.defineProperties,ve=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,ce=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,ee=(He,Ie,We)=>Ie in He?ge(He,Ie,{enumerable:!0,configurable:!0,writable:!0,value:We}):He[Ie]=We,oe=(He,Ie)=>{for(var We in Ie||(Ie={}))ce.call(Ie,We)&&ee(He,We,Ie[We]);if(de)for(var We of de(Ie))z.call(Ie,We)&&ee(He,We,Ie[We]);return He},ie=(He,Ie)=>le(He,ve(Ie)),se=(He,Ie,We)=>new Promise((Oe,be)=>{var Ne=Je=>{try{dt(We.next(Je))}catch(At){be(At)}},$e=Je=>{try{dt(We.throw(Je))}catch(At){be(At)}},dt=Je=>Je.done?Oe(Je.value):Promise.resolve(Je.value).then(Ne,$e);dt((We=We.apply(He,Ie)).next())});const ue={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"]}},Se=(He,Ie)=>Ie.map(We=>({label:We,kind:He.languages.CompletionItemKind.Keyword,insertText:We})),we=He=>Object.keys(ue.tables).map(Ie=>({label:Ie,kind:He.languages.CompletionItemKind.Variable,insertText:Ie})),Pe=(He,Ie)=>{const We=ue.tables[He];return We?We.map(Oe=>({label:Oe,kind:Ie.languages.CompletionItemKind.Field,insertText:Oe})):[]};function Ae(He,Ie,We,Oe,be){let Ne=Ie.getWordUntilPosition(We),$e={startLineNumber:We.lineNumber,endLineNumber:We.lineNumber,startColumn:Ne.startColumn,endColumn:Ne.endColumn},dt=Oe.map(Je=>({label:Je,kind:He.languages.CompletionItemKind.Keyword,insertText:Je,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:$e}));return be.map(Je=>{dt.push(ie(oe({},Je),{range:$e}))}),dt}var De=He=>{ue.languages.map(be=>(He.languages.registerDocumentFormattingEditProvider(be,{provideDocumentFormattingEdits(Ne,$e,dt){return se(this,null,function*(){const Je=xe()(Ne.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:Ne.getFullModelRange(),text:Je}]})}}),be));const Ie=Ce.quickKey.map(be=>({label:be.label,kind:He.languages.CompletionItemKind.Method,insertText:be.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet})),We=Le.quickKey.map(be=>({label:be.label,kind:He.languages.CompletionItemKind.Method,insertText:be.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Oe=ke.quickKey.map(be=>({label:be.label,kind:He.languages.CompletionItemKind.Method,insertText:be.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet}));He.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(be,Ne){var $e=be.getWordUntilPosition(Ne),dt={startLineNumber:Ne.lineNumber,endLineNumber:Ne.lineNumber,startColumn:$e.startColumn,endColumn:$e.endColumn},Je=be.getLineContent(Ne.lineNumber).substring($e.startColumn-2,$e.endColumn);return{suggestions:[...Ce.keywords.map(At=>({label:At,kind:He.languages.CompletionItemKind.Function,documentation:At,insertText:At,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt})),...Ce.quickKey.map(At=>({label:At.label,kind:He.languages.CompletionItemKind.Function,documentation:At.content,insertText:Je.startsWith("#")?At.content.replace(/#/,""):At.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt}))]}}}),He.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(be,Ne){var $e=be.getWordUntilPosition(Ne),dt={startLineNumber:Ne.lineNumber,endLineNumber:Ne.lineNumber,startColumn:$e.startColumn,endColumn:$e.endColumn};return{suggestions:[...Be.keywords.map(Je=>({label:Je,kind:He.languages.CompletionItemKind.Function,documentation:Je,insertText:Je,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt}))]}}}),He.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(be,Ne){var $e=be.getWordUntilPosition(Ne),dt={startLineNumber:Ne.lineNumber,endLineNumber:Ne.lineNumber,startColumn:$e.startColumn,endColumn:$e.endColumn},Je=be.getLineContent(Ne.lineNumber).substring($e.startColumn-2,$e.endColumn);return{suggestions:[...ke.keywords.map(At=>({label:At,kind:He.languages.CompletionItemKind.Function,documentation:At,insertText:At,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt})),...ke.quickKey.map(At=>({label:At.label,kind:He.languages.CompletionItemKind.Function,documentation:At.content,insertText:Je.startsWith("#")?At.content.replace(/#/,""):At.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt}))]}}}),He.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(be,Ne){var $e=be.getWordUntilPosition(Ne),dt={startLineNumber:Ne.lineNumber,endLineNumber:Ne.lineNumber,startColumn:$e.startColumn,endColumn:$e.endColumn},Je=be.getLineContent(Ne.lineNumber).substring($e.startColumn-2,$e.endColumn);return{suggestions:[...he.keywords.map(At=>({label:At,kind:He.languages.CompletionItemKind.Function,documentation:At,insertText:At,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt})),...he.quickKey.map(At=>({label:At.label,kind:He.languages.CompletionItemKind.Function,documentation:At.content,insertText:Je.startsWith("#")?At.content.replace(/#/,""):At.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt}))]}}}),He.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(be,Ne){var $e=be.getWordUntilPosition(Ne),dt={startLineNumber:Ne.lineNumber,endLineNumber:Ne.lineNumber,startColumn:$e.startColumn,endColumn:$e.endColumn},Je=be.getLineContent(Ne.lineNumber).substring($e.startColumn-2,$e.endColumn);return{suggestions:[...Le.keywords.map(At=>({label:At,kind:He.languages.CompletionItemKind.Function,documentation:At,insertText:At,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt})),...Le.quickKey.map(At=>({label:At.label,kind:He.languages.CompletionItemKind.Function,documentation:At.content,insertText:Je.startsWith("#")?At.content.replace(/#/,""):At.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt}))]}}})};const ze="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Ze=Object.defineProperty,Xe=(He,Ie,We)=>Ie in He?Ze(He,Ie,{enumerable:!0,configurable:!0,writable:!0,value:We}):He[Ie]=We,Ge=(He,Ie,We)=>Xe(He,typeof Ie!="symbol"?Ie+"":Ie,We);const ft=class mx{constructor(Ie,We,Oe){this.placeholder=Ie,this.editor=We,this.monaco=Oe,We.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return mx.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)}};Ge(ft,"ID","editor.widget.placeholderHint");var Ct=ft,et=Ee(96236),yt=Ee(8591),st=Ee(6848),zt=Ee(89392),lt=Ee(34604),tt=Ee(56102),ut=Object.defineProperty,mt=Object.defineProperties,Pt=Object.getOwnPropertyDescriptors,gt=Object.getOwnPropertySymbols,Ft=Object.prototype.hasOwnProperty,Ht=Object.prototype.propertyIsEnumerable,hn=(He,Ie,We)=>Ie in He?ut(He,Ie,{enumerable:!0,configurable:!0,writable:!0,value:We}):He[Ie]=We,Jt=(He,Ie)=>{for(var We in Ie||(Ie={}))Ft.call(Ie,We)&&hn(He,We,Ie[We]);if(gt)for(var We of gt(Ie))Ht.call(Ie,We)&&hn(He,We,Ie[We]);return He},bn=(He,Ie)=>mt(He,Pt(Ie)),Wt=(He,Ie)=>{var We={};for(var Oe in He)Ft.call(He,Oe)&&Ie.indexOf(Oe)<0&&(We[Oe]=He[Oe]);if(He!=null&>)for(var Oe of gt(He))Ie.indexOf(Oe)<0&&Ht.call(He,Oe)&&(We[Oe]=He[Oe]);return We},Kt=(He,Ie,We)=>new Promise((Oe,be)=>{var Ne=Je=>{try{dt(We.next(Je))}catch(At){be(At)}},$e=Je=>{try{dt(We.throw(Je))}catch(At){be(At)}},dt=Je=>Je.done?Oe(Je.value):Promise.resolve(Je.value).then(Ne,$e);dt((We=We.apply(He,Ie)).next())});function Xt(He){return/^\d+$/.test(He)?`${He}px`:He}function $t(){}let kt=!1;const pt={"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 Bt(He=[]){let Ie=He;if(Array.isArray(He)){for(let We=0;We<He.length;We++){let Oe=pt[He[We]];if(Oe)return Oe}return Ie[0]}return pt[Ie]||Ie}let xt=null;var vt=He=>{var Ie=He,{width:We="100%",height:Oe="100%",value:be,language:Ne="javascript",style:$e={},options:dt={},overrideServices:Je={},theme:At="vs-dark",onEditBlur:en,isCopy:pn=!1,onSave:ln,autoHeight:gn=!1,forbidCopy:Un=!1,onChange:An=$t,editorDidMount:ni=$t,onFocus:ai=$t,onBreakPoint:ki=$t,breakPointValue:Ci=[],filename:Ki="educoder.txt",errorLine:ir,errorContent:sr="",highlightLine:Ji,openBreakPoint:Fr=!1,placeholder:Mr="",showMiniMap:vi=!0}=Ie,wr=Wt(Ie,["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 Tr=(0,Me.useRef)(),it=(0,Me.useRef)({}),Rr=(0,Me.useRef)(),Or=(0,Me.useRef)(),Ur=(0,Me.useRef)([]),uo=(0,Me.useRef)(!1),po=(0,Me.useRef)(),io=(0,Me.useRef)(),Do=(0,Me.useRef)(!1),[Xn,Ke]=(0,Me.useState)(!1);function qe(){let sn;return Tr.current&&(sn=new me.Z(Nn=>{for(let On of Nn)(On.target.offsetHeight>0||On.target.offsetWidth>0)&&it.current.instance.layout()}),sn.observe(Tr.current)),sn}function Ye(){yt.ZP.warning({content:decodeURIComponent(ze),key:"monaco-editor-tip"})}const St=()=>{let sn=it.current.instance;if(be!=null&&sn&&Xn){const Nn=sn.getModel();Nn&&be!==Nn.getValue()&&(kt=!0,Nn.setValue(be),sn.layout(),kt=!1)}};(0,Me.useEffect)(()=>{const sn=lt.Z.subscribe("formatDocument",Nn=>{var On;let qn=it.current.instance;(On=qn==null?void 0:qn.getAction)==null||On.call(qn,"editor.action.formatDocument").run()});return window.updateMonacoValue=Nn=>{An(Nn)},sn},[]),(0,Me.useEffect)(()=>{var sn;let Nn=it.current.instance;Or.current&&clearTimeout(Or.current),Or.current=setTimeout(()=>{St()},500),be&&(be!=null&&be.length)&&((sn=Nn==null?void 0:Nn.updateOptions)==null||sn.call(Nn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(be.split(/\r\n|\r|\n/g).length))+3,5)}))},[be,Xn,it.current]),(0,Me.useEffect)(()=>{if(ir&&it.current&&it.current.instance){let Nn=it.current.instance;Nn.changeViewZones(function(On){var qn=document.createElement("div");qn.style.padding="10px 20px",qn.style.width="calc(100% - 20px)",qn.className="my-error-line-wrp",qn.innerHTML=sr,On.addZone({afterLineNumber:ir||11,heightInLines:3,domNode:qn})});var sn={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}};Nn.addOverlayWidget(sn),Nn.revealPositionInCenter({lineNumber:20,column:1})}},[ir,it.current,Xn]);const Ot=(sn="",Nn)=>{if(!sn||sn.trim()==="")return!0;const qn=it.current.instance.getModel().getLineTokens(Nn);let Hn=!1;for(let ei=0;ei<2;ei++)qn.getStandardTokenType(ei)===1&&(Hn=!0);return Hn};(0,Me.useEffect)(()=>{var sn;const Nn=(sn=it.current)==null?void 0:sn.instance;if(Nn&&Xn&&Un){const On=Nn.onDidBlurEditorWidget(()=>{Do.current=!1}),qn=Nn.onDidFocusEditorText(()=>{Do.current=!0});return()=>{On.dispose(),qn.dispose()}}},[it.current,Xn,Un]),(0,Me.useEffect)(()=>{var sn;if((sn=it.current)!=null&&sn.instance&&Xn&&Fr){let Nn=it.current.instance,On=Nn.getModel();if(!On)return;(()=>{var Ln;let Jn=[],ui=[];const Si=On.getAllDecorations();for(let Ei of Si)Ei.options.className==="highlighted-line"&&(Jn.push((Ln=Ei==null?void 0:Ei.range)==null?void 0:Ln.startLineNumber),ui.push(Ei==null?void 0:Ei.id));if(Ji===Jn[0])return;On.deltaDecorations(ui,[]);const di=On.getLineCount();Ji&&Ji<=di&&(Nn.deltaDecorations([],[{range:new xt.Range(Ji,1,Ji,On.getLineMaxColumn(Ji)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Nn.revealLineInCenter(Ji))})();const Hn=(Ln=!1)=>{var Jn;let ui=[],Si=[];const di=On.getAllDecorations();for(let Ei of di)Ei.options.linesDecorationsClassName==="breakpoints-select"&&(ui.push((Jn=Ei==null?void 0:Ei.range)==null?void 0:Jn.startLineNumber),Si.push(Ei==null?void 0:Ei.id));if(Ln)return{lines:ui,ids:Si};ki(ui)},ei=Ln=>Kt(void 0,null,function*(){let Jn={range:new xt.Range(Ln,1,Ln,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield On.deltaDecorations([],[Jn]),Hn()}),Fn=Ln=>Kt(void 0,null,function*(){let Jn=[];const ui=Nn.getLineDecorations(Ln);for(let Si of ui)Si.options.linesDecorationsClassName==="breakpoints-select"&&Jn.push(Si.id);yield On.deltaDecorations(Jn,[]),Hn()}),hi=Ln=>{let Jn=Nn.getLineDecorations(Ln);for(let ui of Jn)if(ui.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,zt.isEqual)(Ci,Hn(!0).lines)){On.deltaDecorations(Hn(!0).ids,[]);const Ln=Ci.map(Jn=>({range:new xt.Range(Jn,1,Jn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));On.deltaDecorations([],Ln)}const Di=Nn.onDidChangeModelContent(Ln=>{let Jn=Nn.getPosition();if(Jn){let ui=Jn.lineNumber;clearTimeout(io.current),io.current=setTimeout(()=>{Ot(On.getLineContent(ui),ui)?Fn(ui):hi(ui)?(Fn(ui),ei(ui)):Hn()},100)}}),Ri=Nn.onMouseDown(Ln=>{var Jn,ui,Si;if(Ln.target.detail&&((Si=(ui=(Jn=Ln.target)==null?void 0:Jn.element)==null?void 0:ui.className)!=null&&Si.includes("line-numbers"))){let di=Ln.target.position.lineNumber;if(Ot(On.getLineContent(di),di))return;hi(di)?Fn(di):ei(di)}}),En=Ln=>{let Jn={range:new xt.Range(Ln,1,Ln,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Ur.current=Nn.deltaDecorations(Ur.current,[Jn])},$i=()=>{Ur.current=Nn.deltaDecorations(Ur.current,[])},Cr=Nn.onMouseMove(Ln=>{var Jn,ui,Si;if($i(),Ln.target.detail&&((Si=(ui=(Jn=Ln.target)==null?void 0:Jn.element)==null?void 0:ui.className)!=null&&Si.includes("line-numbers"))){let di=Ln.target.position.lineNumber;if(Ot(On.getLineContent(di),di))return;En(di)}}),mr=Nn.onMouseLeave(()=>{$i()});return()=>{Di.dispose(),Ri.dispose(),Cr.dispose(),mr.dispose()}}},[it.current,Xn,Ci,Ji,Fr,Ne]),(0,Me.useEffect)(()=>{var sn;(sn=it.current)!=null&&sn.instance&&Fr&&it.current.instance.setPosition({lineNumber:0,column:0})},[Ji]);function Tt(){let sn=it.current.instance;if(sn){const Nn=sn.getSelection(),On=it.current.pastePos||{},qn=new xt.Range(On.startLineNumber||Nn.endLineNumber,On.startColumn||Nn.endColumn,On.endLineNumber||Nn.endLineNumber,On.endColumn||Nn.endColumn);setTimeout(()=>{sn.executeEdits("",[{range:qn,text:""}])},300)}}function _t(sn){(window.navigator.platform.match("Mac")?sn.metaKey:sn.ctrlKey)&&sn.keyCode==83&&(sn.preventDefault(),ln())}const dn=()=>{if(gn&&it.current.instance){const sn=it.current.instance.getContentHeight();Dn(sn<Oe?Oe:sn)}else Dn(Oe)};function Pn(sn){var Nn=document.createEvent("MouseEvents");Nn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),sn.dispatchEvent(Nn)}const mn=sn=>{if(!Do.current)return;const{keyCode:Nn,ctrlKey:On,metaKey:qn,target:Hn,type:ei}=sn;return(ei==="paste"||(Nn===67||Nn===86)&&(qn||On))&&Hn.nodeName==="TEXTAREA"&&(Ye(),sn.preventDefault()),!1};function on(sn,Nn){var On=window.URL||window.webkitURL||window,qn=new Blob([Nn]),Hn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Hn.href=On.createObjectURL(qn),Hn.download=sn,Pn(Hn)}(0,Me.useEffect)(()=>{dn()},[dn]),(0,Me.useEffect)(()=>{Tr.current&&!Xn&&Promise.all([Ee.e(8909),Ee.e(3267)]).then(Ee.bind(Ee,71448)).then(sn=>{try{xt=sn,it.current.instance=xt.editor.create(Tr.current,{value:be,language:Bt(Ne),theme:At,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:vi||!1}},Je);const Nn=it.current.instance;let Hn=[...et.BH._menuItems].find(Di=>Di[0]._debugName=="EditorContext")[1],ei=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Fn=(Di,Ri)=>{var En,$i;let Cr=Di._first;do Ri.includes(($i=(En=Cr.element)==null?void 0:En.command)==null?void 0:$i.id)&&Di._remove(Cr);while(Cr=Cr.next)};if(ni(Nn,xt),setTimeout(()=>{dn(),it.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{on(Ki||"educoder.txt",Nn.getValue())}})},500),it.current.subscription=Nn.onDidChangeModelContent(Di=>{uo.current?clearTimeout(po.current):(dn(),An(Nn.getValue(),Di)),po.current=setTimeout(()=>{uo.current=!1},500)}),window.Monaco||De(xt,Bt(Ne)),Un&&(Fn(Hn,ei),Tr.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",mn),window.removeEventListener("paste",mn),window.addEventListener("keydown",mn),window.addEventListener("paste",mn)),window.Monaco=xt,en&&Nn.onDidBlurEditorWidget(()=>{en(Nn.getValue())}),ai&&Nn.onDidFocusEditorText(()=>{ai(Nn.getValue())}),Un)try{Nn.onDidPaste(Di=>{const Ri=Nn.getSelection(),En=it.current.pastePos||{},$i=new xt.Range(En.startLineNumber||Ri.endLineNumber,En.startColumn||Ri.endColumn,En.endLineNumber||Ri.endLineNumber,En.endColumn||Ri.endColumn);Nn.executeEdits("",[{range:Di.range,text:""}])})}catch(Di){}let hi=qe();return Mr&&typeof Mr=="string"&&new Ct(Mr,Nn,xt),Ke(!0),()=>{const Di=it.current.instance;Di.dispose();const Ri=Di.getModel();Ri&&Ri.dispose(),it.current.subscription&&it.current.subscription.dispose(),hi.unobserve(Tr.current)}}catch(Nn){}})},[]),(0,Me.useEffect)(()=>{if(it.current.instance&&Xn)return document.addEventListener("keydown",_t,!1),()=>{document.removeEventListener("keydown",_t)}},[ln,Xn]),(0,Me.useEffect)(()=>{let sn=it.current.instance;if(sn&&Xn){let Nn=Bt(Ne);xt.editor.setModelLanguage(sn.getModel(),Nn)}},[Ne,Xn]),(0,Me.useEffect)(()=>{it.current.instance&&Xn&&xt.editor.setTheme(At)},[At,Xn]),(0,Me.useEffect)(()=>{let sn=it.current.instance;Rr.current=dt,sn&&Xn&&(sn.updateOptions(Jt({},dt)),setTimeout(()=>{sn.getModel().updateOptions(Jt({},dt))},200))},[JSON.stringify(dt),Xn]),(0,Me.useEffect)(()=>{let sn=it.current.instance;sn&&Xn&&sn.layout()},[We,Oe,Xn]);const[Nt,un]=(0,Me.useState)(Xt(We)),[Mn,Dn]=(0,Me.useState)(Xt(Oe)),nn=bn(Jt({},$e),{width:Nt,height:Mn,position:"relative"});return Me.createElement("div",{className:"my-monaco-editor",ref:Tr,style:nn},pn&&Me.createElement(tt.CopyToClipboard,{text:be,onCopy:()=>yt.ZP.success("\u590D\u5236\u6210\u529F")},Me.createElement(st.Z,{title:"\u590D\u5236\u4EE3\u7801"},Me.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},Me.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function nt({width:He="100%",height:Ie="100%",original:We,modified:Oe,language:be,options:Ne={}}){const $e=(0,Me.useRef)(),[dt,Je]=(0,Me.useState)(null);function At(gn){let Un;return $e.current&&(Un=new me.Z(An=>{for(let ni of An)(ni.target.offsetHeight>0||ni.target.offsetWidth>0)&&gn.layout()}),Un.observe($e.current)),Un}(0,Me.useEffect)(()=>($e.current&&Promise.all([Ee.e(8909),Ee.e(9404)]).then(Ee.bind(Ee,2550)).then(gn=>{xt=gn;const Un=xt.editor.createDiffEditor($e.current,bn(Jt({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},Ne),{wordWrap:!0}));Je(Un);let An=At(Un);return()=>{Un.dispose();const ni=Un.getModel();ni&&ni.dispose(),An.unobserve($e.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,Me.useEffect)(()=>{dt&&dt.setModel({original:xt.editor.createModel(We,be),modified:xt.editor.createModel(Oe,be)})},[We,Oe,be,dt]);const en=Xt(He),pn=Xt(Ie),ln={width:en,height:pn};return Me.createElement("div",{className:"my-diff-editor",ref:$e,style:ln})}},16869:function(_n,qt,Ee){"use strict";var Me=Ee(38476),me=Ee(57809),Be=Ee(78673),ke=Ee(59301);const Ce=me.default.Option;qt.Z=({isTheoretical:Le,onFontSizeChange:he,cmFontSize:ye,cmCodeMode:xe,autoFormat:ge,onCodeModeChange:le,onTabToSpace:ve,onAutoFormat:de,formatDocument:ce,className:z="",tabToSpace:ee,children:oe,code_editor:ie,challenge:se})=>{const ue={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"};return ke.createElement("div",{className:`tpi-code-setting ${z}`},ke.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),ke.createElement("section",null,ke.createElement("div",{className:"file-item"},ke.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),ke.createElement(me.default,{bordered:!1,size:"small",value:xe,onChange:le},ke.createElement(Ce,{value:"vs"},"\u767D\u8272\u80CC\u666F"),ke.createElement(Ce,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),!Le&&ke.createElement(ke.Fragment,null,ke.createElement("div",{className:"file-item"},ke.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),ke.createElement(me.default,{bordered:!1,size:"small",value:ye,onChange:he},ke.createElement(Ce,{value:12},"12px"),ke.createElement(Ce,{value:14},"14px"),ke.createElement(Ce,{value:16},"16px"),ke.createElement(Ce,{value:18},"18px"),ke.createElement(Ce,{value:20},"20px"),ke.createElement(Ce,{value:22},"22px"))),ke.createElement("div",{className:"file-item"},ke.createElement("b",null,"Tab\u8F6C\u6362"),ke.createElement(Be.Z,{checked:ee,onChange:ve})),ke.createElement("div",{className:"file-item",onClick:ce},ke.createElement("b",{style:{cursor:"pointer"}},"\u683C\u5F0F\u5316\u4EE3\u7801")))),!Le&&ke.createElement(ke.Fragment,null,ke.createElement("h3",null,"\u5FEB\u6377\u952E"),ke.createElement("section",null,ke.createElement("div",{className:"file-item"},ke.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),ke.createElement("span",null,"Ctrl + S")),ke.createElement("div",{className:"file-item"},ke.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),ke.createElement("span",null,"F1 / Alt + F1")),ke.createElement("div",{className:"file-item"},ke.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),ke.createElement("span",null,"Ctrl + ]/[")),ke.createElement("div",{className:"file-item"},ke.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),ke.createElement("span",null,"Ctrl + Shift + \\")),ke.createElement("div",{className:"file-item"},ke.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),ke.createElement("span",null,"Home")),ke.createElement("div",{className:"file-item"},ke.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),ke.createElement("span",null,"End"))),oe),!Le&&ke.createElement(ke.Fragment,null,ke.createElement("h3",null,"\u5FEB\u6377\u952E"),ke.createElement("section",null,ke.createElement("div",{className:"file-item"},ke.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),ke.createElement("span",null,ue[se==null?void 0:se.difficulty])),ke.createElement("div",{className:"file-item"},ke.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),ke.createElement("span",null,ie==null?void 0:ie.name)),ke.createElement("div",{className:"file-item"},ke.createElement("b",null,"\u5B9E\u9A8C\u5BB9\u5668\u7F51\u7EDC"),ke.createElement("span",null,ie!=null&&ie.close_internet?"\u5173\u95ED\u5916\u7F51":"\u5F00\u542F\u5916\u7F51")))))}},58856:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return me}});var Me=Ee(59301);function me(Be,ke){const Ce=(0,Me.useRef)();(0,Me.useEffect)(()=>{Ce.current=Be}),(0,Me.useEffect)(()=>{function Le(){Ce.current()}if(ke!==null){let he=setInterval(Le,ke);return()=>clearInterval(he)}},[ke])}},25555:function(_n,qt,Ee){"use strict";Ee.d(qt,{Im:function(){return Ze},ZP:function(){return et},gZ:function(){return at}});var Me=Ee(59301),me=Ee(92832),Be=Ee(3113),ke=Ee(84105),Ce=Ee(87395),Le=Ee(35106),he=Ee(24334),ye=Ee(33538),xe=Ee(85149),ge=Ee(955),le=Ee(13787),ve=Ee(34376),de=Ee(92310),ce=Ee.n(de),z=Ee(59301),ee=Object.defineProperty,oe=Object.defineProperties,ie=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,we=(yt,st,zt)=>st in yt?ee(yt,st,{enumerable:!0,configurable:!0,writable:!0,value:zt}):yt[st]=zt,Pe=(yt,st)=>{for(var zt in st||(st={}))ue.call(st,zt)&&we(yt,zt,st[zt]);if(se)for(var zt of se(st))Se.call(st,zt)&&we(yt,zt,st[zt]);return yt},Ae=(yt,st)=>oe(yt,ie(st));const{TextArea:De}=me.default,ze={visible:!1,tabIndex:"0"},Ze={[Le.h.HIDE_COMPILE_STATUS]:"\u6682\u4E0D\u652F\u6301\u67E5\u770B",[Le.h.NOMATCH]:"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D",[Le.h.OK]:"\u8C03\u8BD5\u901A\u8FC7",2:"\u8C03\u8BD5\u8D85\u65F6",3:"\u8C03\u8BD5pod\u5931\u8D25",4:"\u7F16\u8BD1\u5931\u8D25",5:"\u6267\u884C\u5931\u8D25"};var Xe=(yt=>(yt[yt.SET_VISIBLE=0]="SET_VISIBLE",yt[yt.SET_TABINDEX=1]="SET_TABINDEX",yt))(Xe||{});function Ge(yt,st){switch(st.type){case 0:return Ae(Pe({},yt),{visible:st.payload});case 1:return Ae(Pe({},yt),{tabIndex:st.payload});default:throw new Error}}function ft({value:yt,className:st}){const[zt,lt]=(0,Me.useState)(!1),tt=(0,Me.useRef)(),ut=(0,Me.useRef)();return(0,Me.useEffect)(()=>{zt&&(ut.current.reset(),ut.current.write((0,ge.pp)(yt||"")))},[yt,zt]),(0,Me.useEffect)(()=>{var mt,Pt,gt,Ft;if(tt.current){ut.current=new ve.Terminal({fontSize:14,disableStdin:!0}),ut.current.open(tt.current);const Ht=tt.current.offsetWidth-14,hn=((Ft=(gt=(Pt=(mt=ut.current)==null?void 0:mt._core)==null?void 0:Pt._renderService)==null?void 0:gt.dimensions)==null?void 0:Ft.actualCellWidth)||9.5,Jt=Math.ceil(Ht/hn);ut.current.resize(Jt,8),lt(!0)}},[]),z.createElement("div",{ref:tt,className:ce()("XtermText-valueRef",st)})}function at(yt){const{status:st,error_msg:zt,output:lt,input:tt,expected_output:ut,is_file:mt,input_file_url:Pt,output_file_url:gt,expected_output_file_url:Ft}=yt;let Ht=null;const hn={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(st){case Le.h.NOMATCH:Ht=z.createElement(z.Fragment,null,z.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!mt&&z.createElement(ft,{className:"mb10",value:tt}),mt&&z.createElement("div",{style:hn},z.createElement("a",{onClick:()=>(0,ge.LR)(Pt,tt)},tt)),z.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!mt&&z.createElement(ft,{className:"mb10",value:lt&&he.Base64.decode(lt)||""}),mt&&z.createElement("div",{style:hn},z.createElement("a",{onClick:()=>(0,ge.LR)(gt,lt)},lt)),z.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!mt&&z.createElement(ft,{className:"mb10",value:ut&&he.Base64.decode(ut)||""}),mt&&z.createElement("div",{style:hn},z.createElement("a",{onClick:()=>(0,ge.LR)(Ft,ut)},ut)));break;case Le.h.EXECUTEFAILURE:Ht=z.createElement(z.Fragment,null,z.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!mt&&z.createElement(xe.Z,{value:tt,style:hn}),mt&&z.createElement("div",{style:hn},z.createElement("a",{onClick:()=>(0,ge.LR)(Pt,tt)},tt)),z.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),z.createElement("pre",{className:"error"},he.Base64.decode(zt)));break;case Le.h.COMPILEFAILURE:Ht=z.createElement(z.Fragment,null,z.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!mt&&z.createElement(xe.Z,{value:tt,style:hn}),mt&&z.createElement("div",{style:hn},z.createElement("a",{onClick:()=>(0,ge.LR)(Pt,tt)},tt)),z.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),z.createElement("pre",{className:"error"},he.Base64.decode(zt)));break;case Le.h.PODFAILURE:Ht=z.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case Le.h.TIMEOUT:Ht=z.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return z.createElement(z.Fragment,null," ",Ht," ")}function Ct(yt){const{status:st,error_msg:zt,execute_time:lt,output:tt,input:ut,expected_output:mt,is_file:Pt,input_file_url:gt,output_file_url:Ft,expected_output_file_url:Ht}=yt;let hn=null;switch(st){case Le.h.OK:hn=z.createElement(z.Fragment,null,z.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",lt,"\u79D2"),z.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),z.createElement("pre",null,he.Base64.decode(tt)));break;case Le.h.NOMATCH:hn=z.createElement(z.Fragment,null,z.createElement("p",null,"\u8F93\u5165\uFF1A",z.createElement("pre",null,ut)),z.createElement("p",null,"\u8F93\u51FA\uFF1A",tt&&he.Base64.decode(tt)),z.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",mt&&he.Base64.decode(mt)));break;case Le.h.EXECUTEFAILURE:hn=z.createElement(z.Fragment,null,z.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",z.createElement("pre",null,ut)),z.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),z.createElement("pre",{className:"error"},he.Base64.decode(zt)));break;case Le.h.COMPILEFAILURE:hn=z.createElement(z.Fragment,null,z.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",z.createElement("pre",null,ut)),z.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),z.createElement("pre",{className:"error"},he.Base64.decode(zt)));break;case Le.h.PODFAILURE:hn=z.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case Le.h.TIMEOUT:hn=z.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return z.createElement(z.Fragment,null," ",hn," ")}var et=({id:yt,is_file:st,input:zt,debuging:lt,submitting:tt,executingMessage:ut,debugResult:mt,onChangeInput:Pt,onDebugCode:gt,onSubmitCode:Ft})=>{const[Ht,hn]=(0,Me.useReducer)(Ge,ze),{visible:Jt,tabIndex:bn}=Ht;(0,Me.useEffect)(()=>{hn({type:0,payload:!1})},[yt]);function Wt(kt){let pt=kt.target.id;hn({type:1,payload:pt})}function Kt(){hn({type:0,payload:!Jt})}const Xt=(0,Me.useMemo)(()=>{if(mt){const{status:kt}=mt;return z.createElement(z.Fragment,null,Ct(mt))}return null},[mt]);function $t(){hn({type:0,payload:!0}),hn({type:1,payload:"1"}),gt()}return z.createElement("div",{className:"test-case-panel"},z.createElement("div",{className:`test-case-panel-body ${Jt?"active":""}`},z.createElement("ul",{className:"s-navs"},z.createElement("li",null,z.createElement("a",{className:"active"},"\u8C03\u8BD5\u4EE3\u7801\u7ED3\u679C"))),z.createElement(le.Z,{leftTitle:"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B",rightTitle:"\u4EE3\u7801\u6267\u884C\u7ED3\u679C",style:{height:240},leftNode:z.createElement(De,{placeholder:"\u8BF7\u8F93\u5165\u81EA\u6D4B\u7528\u4F8B\uFF08\u5982\u679C\u672A\u586B\u5199\uFF0C\u9996\u6B21\u81EA\u6D4B\u8FD0\u884C\u65F6\uFF0C\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u586B\u5145\u7B2C\u4E00\u4E2A\u975E\u9690\u85CF\u7684\u6587\u672C\u7C7B\u578B\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF09",value:st?"":zt,onChange:Pt}),rightNode:lt?z.createElement(ye.Z,{message:"\u4EE3\u7801\u6267\u884C\u4E2D..."}):mt?Xt:z.createElement("p",{style:{color:"#536879"}},"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D")})),z.createElement("a",{className:`btn-collapse ${Jt?"up":""}`,onClick:Kt},Jt?z.createElement(ke.Z,null):z.createElement(Ce.Z,null)),z.createElement("footer",{className:"footer"},z.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),z.createElement("div",{className:"flex-container"},z.createElement(Be.ZP,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),z.createElement(Be.ZP,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),z.createElement(Be.ZP,{className:"btn-green",type:"ghost",loading:lt,onClick:$t},"\u8C03\u8BD5\u4EE3\u7801"),z.createElement(Be.ZP,{type:"primary",className:"custom-ant-disabled",loading:tt,disabled:tt,onClick:()=>{hn({type:0,payload:!1}),Ft()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},31723:function(_n,qt,Ee){"use strict";Ee.r(qt),Ee.d(qt,{default:function(){return jt}});var Me=Ee(59301),me=Ee(10906),Be=Ee(76618),ke=Ee(89070),Ce=Ee(31797),Le=Ee(8591),he=Ee(43418),ye=Ee(71418),xe=Ee(57809),ge=Ee(49802),le=Ee(17064),ve=Ee(3294),de=Ee(87169),ce=Ee(43428),z=Ee(23954),ee=Ee(79346),oe=Ee(16479),ie=Ee(16869),se=Ee(59301),ue=Object.defineProperty,Se=Object.defineProperties,we=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,ze=(ht,bt,Et)=>bt in ht?ue(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,Ze=(ht,bt)=>{for(var Et in bt||(bt={}))Ae.call(bt,Et)&&ze(ht,Et,bt[Et]);if(Pe)for(var Et of Pe(bt))De.call(bt,Et)&&ze(ht,Et,bt[Et]);return ht},Xe=(ht,bt)=>Se(ht,we(bt));const Ge={theme:(0,oe.G)("cmCodeMode","vs-dark"),fontSize:(0,oe.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,oe.G)("cmTabToSpace",!0)};var ft=(ht=>(ht[ht.set_font_size=0]="set_font_size",ht[ht.set_theme=1]="set_theme",ht[ht.on_tab_to_space=2]="on_tab_to_space",ht[ht.set_show_editor_setting=3]="set_show_editor_setting",ht))(ft||{});function at(ht,bt){switch(bt.type){case 3:return Xe(Ze({},ht),{showEditorSetting:bt.payload});case 1:return Xe(Ze({},ht),{theme:bt.payload});case 0:return Xe(Ze({},ht),{fontSize:bt.payload});case 2:return Xe(Ze({},ht),{tabToSpace:bt.payload});default:throw new Error}}var Ct=({isLoading:ht,value:bt,onChange:Et,language:wn,onUpdateCode:fn,ActionBarRender:an=Sn=>se.createElement(et,{onShowCodeSetting:Sn})})=>{const[Sn,xn]=(0,Me.useReducer)(at,Ge),{theme:Cn,fontSize:zn,showEditorSetting:ii,tabToSpace:Zn}=Sn,wi=(0,Me.useRef)(),Kn=(0,Me.useRef)(),gi={onFontSizeChange:Ui=>{xn({type:0,payload:Ui}),(0,oe.t)("cmFontSize",Ui)},tabToSpace:Zn,cmFontSize:zn,className:"oj",cmCodeMode:Cn,onTabToSpace:Ui=>{xn({type:2,payload:Ui}),(0,oe.t)("cmTabToSpace",Ui)},onCodeModeChange:Ui=>{xn({type:1,payload:Ui}),(0,oe.t)("cmCodeMode",Ui)}};function si(){xn({type:3,payload:!1})}function Ii(){xn({type:3,payload:!0})}const Oi={value:bt,language:wn,theme:Cn,height:"calc(100% - 56px)",options:{fontSize:zn,insertSpaces:Zn},onChange:Ui=>{Et(Ui),Kn.current=Ui,clearTimeout(wi.current),wi.current=setTimeout(()=>{fn(Kn.current)},1e4)},onEditBlur:Ui=>{Kn.current&&fn(Kn.current)}};return se.createElement(Me.Fragment,null,se.createElement("div",{className:"code-panel-container"},an(Ii),!ht&&se.createElement(z.ZP,Ze({},Oi))),se.createElement(ee.Z,null,se.createElement(ce.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:ii,onClose:si},se.createElement(ie.Z,Ze({},gi)))))};function et({onShowCodeSetting:ht}){return se.createElement("div",{className:"action-bar"},se.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),se.createElement("a",{onClick:ht},se.createElement("i",{className:"iconfont icon-shezhi"})))}var yt=Ee(24334),st=Ee(23257),zt=Ee(25555),lt=Ee(92832),tt=Ee(78241),ut=Ee(3113);const{TextArea:mt}=lt.default,Pt=5e3;var gt=({callback:ht,onCancel:bt,notes:Et})=>{function wn(fn){ht(fn)}return Me.createElement(tt.default,{className:"note-form-panel",onFinish:wn,initialValues:{notes:Et}},Me.createElement(tt.default.Item,{name:"notes",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9"},{max:Pt,message:`\u7B14\u8BB0\u6700\u5927\u5B57\u6570\u4E3A${Pt}`}]},Me.createElement(mt,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),Me.createElement(tt.default.Item,{style:{textAlign:"right"}},Me.createElement(ut.ZP,{type:"ghost",onClick:bt,style:{marginRight:10}}," \u53D6\u6D88 "),Me.createElement(ut.ZP,{type:"primary",htmlType:"submit"}," \u63D0\u4EA4 ")))},Ft={"left-panel":"left-panel___fP6Y3","tab-panel-body":"tab-panel-body___aLOJQ",b1:"b1___ELpwD","oj-mr":"oj-mr___SIQSw","oj-width-input":"oj-width-input___tR_Si","s-navs":"s-navs___iVrSH","bg-white":"bg-white___S0kiU",active:"active___D332c"},Ht={pagination:"pagination___npPu7",info:"info___aRH6C"},hn=Ee(1710),Jt=Ee(58421),bn=Ee(58617),Wt=Ee(81953),Kt=Ee(35106),Xt=Ee(955),$t=Ee(61186),kt=Ee.n($t);const{Column:pt}=hn.default;var Bt=({submitResult:ht,submitting:bt,submitRecords:Et,page:wn,onPageChange:fn,topicId:an})=>{const{status:Sn,id:xn,input:Cn,output:zn,expected_output:ii,is_file:Zn,input_file_url:wi,output_file_url:Kn,expected_output_file_url:gi,error_msg:si}=ht||{},{records:Ii,records_count:Oi}=Et||{},Ui=(0,ke.useParams)();function Ai(){Zn?navigator.clipboard.writeText(yt.Base64.decode(si)).then(()=>{Le.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(yt.Base64.decode(zn)).then(()=>{Le.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return Me.createElement(ye.Z,{spinning:bt,tip:"\u8BC4\u6D4B\u4E2D...",indicator:Me.createElement(bn.Z,{style:{fontSize:24},spin:!0})},xn?Me.createElement(Me.Fragment,null,Me.createElement("ul",{className:Ht.info},Me.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",Me.createElement("span",{className:Sn===Kt.h.OK?"c-green":"c-red"},zt.Im[Sn])),Me.createElement("li",{className:Ht.error},Me.createElement("a",{onClick:Ai},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",Me.createElement(Wt.Z,null)," ")),Me.createElement("li",null,Me.createElement(ke.Link,{to:`/problems/${an}/record-detail/${xn}?backId=${Ui==null?void 0:Ui.save_identifier}`},"\u663E\u793A\u8BE6\u60C5 > "))),Sn!==Kt.h.OK?Me.createElement(Me.Fragment,null,Me.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),Me.createElement("pre",null,!Zn&&Cn,Zn&&Me.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,Xt.LR)(wi,Cn)},Cn)),Me.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),Me.createElement("pre",null,(Sn===4||Sn===5)&&yt.Base64.decode(si),Sn!=4&&Sn!=5&&(Zn?Me.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,Xt.LR)(Kn,zn)},zn):yt.Base64.decode(zn))),Me.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),Me.createElement("pre",null,!Zn&&yt.Base64.decode(ii),Zn&&Me.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,Xt.LR)(gi,ii)},ii))):null):null,(Ii==null?void 0:Ii.length)>0?Me.createElement(hn.default,{dataSource:Ii,rowKey:"id",pagination:!1},Me.createElement(pt,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:(Ni,ar)=>Me.createElement("span",null," ",kt()(Ni).format("YYYY-MM-DD HH:mm:ss"))}),Me.createElement(pt,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:(Ni,ar)=>{var ti;return Me.createElement(ke.Link,{className:Ni===0?"c-green":"c-red",to:`/problems/${an}/record-detail/${ar.id}?backId=${Ui==null?void 0:Ui.save_identifier}`},(ti=zt.Im[Ni])==null?void 0:ti.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),Me.createElement(pt,{title:"\u6267\u884C\u7528\u65F6 (S)",dataIndex:"execute_time",key:"execute_time"}),Me.createElement(pt,{title:"\u5185\u5B58\u6D88\u8017\uFF08MB\uFF09",dataIndex:"execute_memory",key:"execute_memory"}),Me.createElement(pt,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"})):null,Oi>15?Me.createElement(Jt.Z,{className:Ht.pagination,current:wn,pageSize:15,total:Oi,onChange:fn}):null)},xt=Ee(8797),vt=Ee(12563),nt=Ee(81327),He={desc:"desc___X8_hx",info:"info___C1DPv","commit-info":"commit-info____9yQm"},Ie=Ee(85149),We=Ee(59301);const Oe={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u9002\u4E2D",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}};var be=({hack:ht,onTriggerPraise:bt,toDiscuss:Et})=>{const{language:wn,difficulty:fn,time_limit:an,username:Sn,user_path:xn,user_praise:Cn,comments_count:zn,praises_count:ii,description:Zn,pass_count:wi,submit_count:Kn}=ht,gi=(0,ke.useLocation)();console.log(ht.language,"language");const si=Oe[fn];return We.createElement(We.Fragment,null,We.createElement("ul",{className:He.info},We.createElement("li",null,"\u96BE\u5EA6\uFF1A",We.createElement(vt.default,{color:si==null?void 0:si.color},si==null?void 0:si.name)),We.createElement("li",null,"\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",We.createElement("b",null,an,"\u79D2"))),We.createElement(Ie.Z,{value:Zn,className:He.desc}),We.createElement("ul",{className:He["commit-info"]},We.createElement("li",null,We.createElement(nt.Z,{size:4},We.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",We.createElement("b",null,wi))),We.createElement("li",null,We.createElement(nt.Z,{size:4},We.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",We.createElement("b",null,Kn))," "),We.createElement("li",{style:{flex:"1 0 0"}}),We.createElement("li",null,We.createElement(nt.Z,{size:4},We.createElement("i",{className:"iconfont icon-huifu1",onClick:Et})," ",We.createElement("b",null,zn))," ")))},Ne=Ee(34604),$e=Object.defineProperty,dt=Object.getOwnPropertySymbols,Je=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable,en=(ht,bt,Et)=>bt in ht?$e(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,pn=(ht,bt)=>{for(var Et in bt||(bt={}))Je.call(bt,Et)&&en(ht,Et,bt[Et]);if(dt)for(var Et of dt(bt))At.call(bt,Et)&&en(ht,Et,bt[Et]);return ht};const ln=ht=>React.createElement("svg",pn({width:40,height:40,xmlns:"http://www.w3.org/2000/svg"},ht),React.createElement("title",null,"\u5C55\u5F00\u9898\u76EE"),React.createElement("defs",null,React.createElement("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"100%",id:"show_svg__a"},React.createElement("stop",{stopColor:"#EEF7FF",offset:"0%"}),React.createElement("stop",{stopColor:"#C1E2FF",offset:"100%"}))),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"url(#show_svg__a)",width:40,height:40,rx:8}),React.createElement("g",{fillRule:"nonzero"},React.createElement("path",{d:"M16.057 20.784H8.238A1.22 1.22 0 0 0 7 21.974v6.811a1.22 1.22 0 0 0 1.238 1.19h7.819a1.213 1.213 0 0 0 1.238-1.19v-6.811a1.213 1.213 0 0 0-.376-.847 1.203 1.203 0 0 0-.862-.332v-.01Zm-1.25 6.769H9.423V23.12h5.384v4.433Z",fill:"#4CACFF"}),React.createElement("path",{d:"M16.057 10.005a1.22 1.22 0 0 1 1.238 1.189v6.812a1.213 1.213 0 0 1-.376.846c-.232.222-.542.34-.862.332H8.238A1.213 1.213 0 0 1 7 18.005v-6.811a1.22 1.22 0 0 1 1.238-1.19Zm-1.239 2.41H9.434v4.401h5.384v-4.4Z",fill:"#94CDFF"}),React.createElement("path",{d:"M20.418 12.632h11.189a1.213 1.213 0 0 0 1.238-1.179 1.224 1.224 0 0 0-.371-.857 1.214 1.214 0 0 0-.867-.343H20.418a1.203 1.203 0 0 0-.866.336c-.233.223-.367.53-.372.854.005.323.14.63.372.854.232.223.544.344.866.335ZM31.575 16.027h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557ZM31.575 21.595h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557ZM31.575 27.163h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557Z",fill:"#1890FF"}))));var gn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjEwMCUiIGlkPSJhIj48c3RvcCBzdG9wLWNvbG9yPSIjRUVGN0ZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0MxRTJGRiIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSJ1cmwoI2EpIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHJ4PSI4Ii8+PGcgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNMTYuMDU3IDIwLjc4NEg4LjIzOEExLjIyIDEuMjIgMCAwIDAgNyAyMS45NzR2Ni44MTFhMS4yMiAxLjIyIDAgMCAwIDEuMjM4IDEuMTloNy44MTlhMS4yMTMgMS4yMTMgMCAwIDAgMS4yMzgtMS4xOXYtNi44MTFhMS4yMTMgMS4yMTMgMCAwIDAtLjM3Ni0uODQ3IDEuMjAzIDEuMjAzIDAgMCAwLS44NjItLjMzMnYtLjAxWm0tMS4yNSA2Ljc2OUg5LjQyM1YyMy4xMmg1LjM4NHY0LjQzM1oiIGZpbGw9IiM0Q0FDRkYiLz48cGF0aCBkPSJNMTYuMDU3IDEwLjAwNWExLjIyIDEuMjIgMCAwIDEgMS4yMzggMS4xODl2Ni44MTJhMS4yMTMgMS4yMTMgMCAwIDEtLjM3Ni44NDZjLS4yMzIuMjIyLS41NDIuMzQtLjg2Mi4zMzJIOC4yMzhBMS4yMTMgMS4yMTMgMCAwIDEgNyAxOC4wMDV2LTYuODExYTEuMjIgMS4yMiAwIDAgMSAxLjIzOC0xLjE5Wm0tMS4yMzkgMi40MUg5LjQzNHY0LjQwMWg1LjM4NHYtNC40WiIgZmlsbD0iIzk0Q0RGRiIvPjxwYXRoIGQ9Ik0yMC40MTggMTIuNjMyaDExLjE4OWExLjIxMyAxLjIxMyAwIDAgMCAxLjIzOC0xLjE3OSAxLjIyNCAxLjIyNCAwIDAgMC0uMzcxLS44NTcgMS4yMTQgMS4yMTQgMCAwIDAtLjg2Ny0uMzQzSDIwLjQxOGExLjIwMyAxLjIwMyAwIDAgMC0uODY2LjMzNmMtLjIzMy4yMjMtLjM2Ny41My0uMzcyLjg1NC4wMDUuMzIzLjE0LjYzLjM3Mi44NTQuMjMyLjIyMy41NDQuMzQ0Ljg2Ni4zMzVaTTMxLjU3NSAxNi4wMjdoLTExLjE5YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTE5LjU1N2MtLjIzNy4zODQtLjIzNy44NyAwIDEuMjU0LjIzOC4zODQuNjcyLjYgMS4xMi41NTdoMTEuMTg5Yy40NDguMDQzLjg4Mi0uMTczIDEuMTE5LS41NTcuMjM3LS4zODQuMjM3LS44NyAwLTEuMjU0YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTItLjU1N1pNMzEuNTc1IDIxLjU5NWgtMTEuMTlhMS4xODMgMS4xODMgMCAwIDAtMS4xMTkuNTU3Yy0uMjM3LjM4NC0uMjM3Ljg3IDAgMS4yNTQuMjM4LjM4NC42NzIuNiAxLjEyLjU1N2gxMS4xODljLjQ0OC4wNDMuODgyLS4xNzMgMS4xMTktLjU1Ny4yMzctLjM4NC4yMzctLjg3IDAtMS4yNTRhMS4xODMgMS4xODMgMCAwIDAtMS4xMi0uNTU3Wk0zMS41NzUgMjcuMTYzaC0xMS4xOWExLjE4MyAxLjE4MyAwIDAgMC0xLjExOS41NTdjLS4yMzcuMzg0LS4yMzcuODcgMCAxLjI1NC4yMzguMzg0LjY3Mi42IDEuMTIuNTU3aDExLjE4OWMuNDQ4LjA0My44ODItLjE3MyAxLjExOS0uNTU3LjIzNy0uMzg0LjIzNy0uODcgMC0xLjI1NGExLjE4MyAxLjE4MyAwIDAgMC0xLjEyLS41NTdaIiBmaWxsPSIjMTg5MEZGIi8+PC9nPjwvZz48L3N2Zz4=",Un=Ee(99064);function An(ht){return(0,Un.U2)("comments.json",ht)}function ni(ht){return(0,Un.v_)(`/discusses/${ht}/plus.json`,{container_type:"Discuss",type:1})}function ai(ht){return(0,Un.v_)("comments/reply.json",ht)}function ki(ht){return(0,Un.v_)("comments.json",ht)}function Ci(ht){return(0,Un.v_)(`comments/${ht==null?void 0:ht.id}/hidden.json`,ht)}function Ki(ht){return(0,Un.IV)(`comments/${ht==null?void 0:ht.id}.json`)}var ir=Ee(34362),sr=Ee(24065);function Ji({author:ht}){return Me.createElement("a",{href:`/users/${ht.login}`,target:"_blank"},Me.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:`${ve.Z.IMG_SERVER}/images/${ht.image_url}`,width:"50"}))}function Fr({data:ht,index:bt,parentDiscussIndex:Et,user:wn,onSetActionType:fn}){const{author:an,can_delete:Sn,content:xn,id:Cn,time:zn}=ht;function ii(){fn({id:Cn,index:bt,type:"delete-discuss",parentDiscussIndex:Et,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}const Zn=wn.admin||Sn||an.user_id===wn.user_id;return Me.createElement("div",{className:"discuss-item-container second-discuss "},Me.createElement(Ji,{author:an}),Me.createElement("section",null,Me.createElement("div",{className:"discuss-info"},Me.createElement("a",{href:`/users/${an.login}`,target:"_blank"},an.name),Me.createElement("span",{className:"grey"},zn),Me.createElement("div",{className:"btn-group",style:{marginBottom:0}},Zn?Me.createElement("a",{onClick:ii,title:"\u5220\u9664"},Me.createElement("i",{className:"iconfont icon-shanchu"})):null)),Me.createElement(Ie.Z,{className:"discuss-content",value:xn})))}var Mr=({user:ht,data:bt,index:Et,onPlusDiscuss:wn,onSetActionType:fn,activeDiscussIndex:an,onReplyDiscuss:Sn,onSetActiveDiscussIndex:xn})=>{const{content:Cn,children:zn,hidden:ii,id:Zn,praise_count:wi,time:Kn,user_praise:gi,can_delete:si,author:Ii}=bt;console.log(si&&(!zn||zn.length==0),"children22");function Oi(){xn(Zn)}function Ui(){wn(Zn,!gi,Et)}function Ai(){fn({id:Zn,index:Et,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function Ni(){fn({id:Zn,index:Et,params:{hidden:ii?"0":"1"},type:"hidden-discuss",message:ii?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}const ar=ht.admin||ht.user_id===Ii.user_id;return Me.createElement("div",{className:"discuss-item-container",key:Zn},Me.createElement(Ji,{author:Ii}),Me.createElement("section",null,Me.createElement("div",{className:"discuss-info"},Me.createElement("a",{href:`/users/${Ii.login}`,target:"_blank"}," ",Ii.name," "),Me.createElement("span",{className:"grey"},Kn)),Me.createElement(Ie.Z,{className:"discuss-content",value:Cn}),zn&&zn.length>0?Me.createElement("div",{className:"reply-discuss-container"},zn.map((ti,ji)=>Me.createElement(Fr,{key:ti.id,data:ti,index:ji,user:ht,onSetActionType:fn,parentDiscussIndex:Et}))):null,Me.createElement("div",{className:"btn-group"},(0,sr.Ny)()?Me.createElement("a",{onClick:Ni,title:ii?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},Me.createElement("i",{className:ii?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,si&&(!zn||zn.length==0)?Me.createElement("a",{onClick:Ai,title:"\u5220\u9664"},Me.createElement("i",{className:"iconfont icon-shanchu"})):null,Me.createElement("a",{onClick:Oi,title:"\u56DE\u590D"}," ",Me.createElement("i",{className:"iconfont icon-huifu1"})," "),Me.createElement("a",{onClick:Ui,className:gi?"c-orange":""},Me.createElement("i",{className:gi?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),Me.createElement("span",null,wi||""))),Me.createElement(ir.Z,{id:Zn,activeDiscussIndex:an,onReplyDiscuss:Sn})))},vi=Ee(61398),wr=Ee(12290),Tr=(ht,bt,Et)=>new Promise((wn,fn)=>{var an=Cn=>{try{xn(Et.next(Cn))}catch(zn){fn(zn)}},Sn=Cn=>{try{xn(Et.throw(Cn))}catch(zn){fn(zn)}},xn=Cn=>Cn.done?wn(Cn.value):Promise.resolve(Cn.value).then(an,Sn);xn((Et=Et.apply(ht,bt)).next())}),it=({user_praise:ht,praise_count:bt,praisePlus:Et,onCreateDiscuss:wn,discuss_count:fn})=>{const[an,Sn]=(0,Me.useState)(!1),[xn,Cn]=(0,Me.useState)("");function zn(Kn){Cn(Kn)}function ii(){Sn(!0)}function Zn(){Sn(!1)}function wi(){return Tr(this,null,function*(){wn(xn),Cn(""),Sn(!1)})}return Me.createElement("div",{className:`dis-input-editor-container ${an?"active":""} `},Me.createElement("div",{className:an?"text-area hide":"text-area"},Me.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:ii}),Me.createElement("a",{style:{alignItems:"center"}}," ",Me.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",fn," "),Me.createElement("a",{className:"c-light-black",onClick:Et,style:{alignItems:"center"},title:ht?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},Me.createElement("i",{className:`mr3 ${ht?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"} `}),bt?Me.createElement("span",null,bt):"")),an?Me.createElement("div",{className:"input-mask",onClick:Zn}):null,Me.createElement("div",{className:an?"md-container":"md-container hide"},Me.createElement(wr.Z,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:xn,height:240,onChange:zn}),Me.createElement("div",{className:"tip-container",onClick:Zn},Me.createElement("a",{className:"btn-send",onClick:wi}," \u53D1\u9001 "))))},Rr=Object.defineProperty,Or=Object.defineProperties,Ur=Object.getOwnPropertyDescriptors,uo=Object.getOwnPropertySymbols,po=Object.prototype.hasOwnProperty,io=Object.prototype.propertyIsEnumerable,Do=(ht,bt,Et)=>bt in ht?Rr(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,Xn=(ht,bt)=>{for(var Et in bt||(bt={}))po.call(bt,Et)&&Do(ht,Et,bt[Et]);if(uo)for(var Et of uo(bt))io.call(bt,Et)&&Do(ht,Et,bt[Et]);return ht},Ke=(ht,bt)=>Or(ht,Ur(bt)),qe=(ht,bt,Et)=>new Promise((wn,fn)=>{var an=Cn=>{try{xn(Et.next(Cn))}catch(zn){fn(zn)}},Sn=Cn=>{try{xn(Et.throw(Cn))}catch(zn){fn(zn)}},xn=Cn=>Cn.done?wn(Cn.value):Promise.resolve(Cn.value).then(an,Sn);xn((Et=Et.apply(ht,bt)).next())});const Ye={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null};var St=(ht=>(ht[ht.GET_DISCUSSES=0]="GET_DISCUSSES",ht[ht.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",ht[ht.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",ht[ht.PLUS_DISCUSS=3]="PLUS_DISCUSS",ht[ht.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",ht[ht.SET_PAGE=5]="SET_PAGE",ht[ht.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING",ht))(St||{});function Ot(ht,bt){switch(bt.type){case 6:return Ke(Xn({},ht),{loading:!0});case 0:return Xn(Xn({},ht),bt.payload);case 1:return Xn(Xn({},ht),bt.payload);case 4:return Xn(Xn({},ht),bt.payload);case 3:return Xn(Xn({},ht),bt.payload);case 5:return Xn(Xn({},ht),bt.payload);case 2:return Xn(Xn({},ht),bt.payload);default:throw new Error}}var Tt=({user:ht,identifier:bt,hack:Et,onTriggerPraise:wn,setDiscussTotal:fn})=>{const[an,Sn]=(0,Me.useReducer)(Ot,Ye),{loading:xn,page:Cn,data:zn,count:ii,actionType:Zn,activeDiscussIndex:wi}=an;console.log("---",an);const Kn=(0,Me.useCallback)(()=>qe(void 0,null,function*(){Sn({type:6});const ti=yield An({container_type:"Practice",container_identifier:bt,limit:10,page:Cn}),{comments:ji,disscuss_count:Li}=ti;Sn({type:0,payload:{data:ji,count:Li,loading:!1}}),fn(Li)}),[Cn,bt]);(0,Me.useEffect)(()=>{Kn()},[bt,Cn]);function gi(ti){Sn({type:5,payload:{page:ti}})}function si(ti){Sn({type:4,payload:{actionType:ti}})}function Ii(ti){Sn(wi===ti?{type:2,payload:{activeDiscussIndex:null}}:{type:2,payload:{activeDiscussIndex:ti}})}function Oi(ti,ji,Li){return qe(this,null,function*(){try{const bi=yield ni(ti);zn[Li].user_praise=ji,zn[Li].praise_count=bi.praise_count,Sn({type:3,payload:{data:[...zn]}})}catch(bi){console.log(bi)}})}function Ui(){return qe(this,null,function*(){const{id:ti,params:ji,type:Li,index:bi,parentDiscussIndex:Yi}=Zn;Li==="hidden-discuss"&&(console.log(ji,"params"),yield Ci(Xn({id:ti,container_type:"Practice",container_identifier:bt},ji)),Yi?zn[Yi].children[bi].hidden=ji.hidden==1:zn[bi].hidden=ji.hidden==1,Sn({type:4,payload:{actionType:null,data:[...zn]}})),Li==="delete-discuss"&&(yield Ki({id:ti,container_type:"Practice",container_identifier:bt}),Sn({type:4,payload:{actionType:null}}),yield Kn())})}function Ai(){Sn({type:4,payload:{actionType:null}})}function Ni(ti,ji){return qe(this,null,function*(){try{yield ai({container_type:"Practice",container_identifier:bt,comments:{content:ji,parent_id:ti}}),Kn()}catch(Li){console.log(Li)}})}function ar(ti){return qe(this,null,function*(){Sn({type:6}),yield ki({comments:{content:ti},container_type:"Practice",container_identifier:bt}),Kn()})}return Me.createElement(Me.Fragment,null,Me.createElement("div",{className:"discuss-panel"},zn.length===0?Me.createElement(xt.Z,null):Me.createElement(ye.Z,{spinning:xn},zn.map((ti,ji)=>Me.createElement(Mr,{onReplyDiscuss:Ni,onPlusDiscuss:Oi,onSetActiveDiscussIndex:Ii,onSetActionType:si,data:ti,index:ji,user:ht,activeDiscussIndex:wi}))),ii>10?Me.createElement("div",{className:"pagination-container mt10 mb10"},Me.createElement(Jt.Z,{showQuickJumper:!0,onChange:gi,current:Cn,total:ii,showTotal:ti=>Me.createElement("span",{style:{color:"#656F87"}},"\u5171",Me.createElement("span",{className:"c-light-primary"},ti),"\u6761\u6570\u636E")})):null),Me.createElement(it,{user_praise:Et.user_praise,praise_count:Et.praises_count,praisePlus:wn,discuss_count:Et.comments_count,onCreateDiscuss:ar}),Me.createElement(ee.Z,null,Me.createElement(he.default,{centered:!0,title:"\u63D0\u793A",open:!!Zn,onOk:Ui,onCancel:Ai},Me.createElement("p",null,Zn?Zn.message:"")),Me.createElement(vi.Z,null)))},_t={flex_box_center:"flex_box_center___tosr6",flex_space_between:"flex_space_between___cQaTP",flex_box_vertical_center:"flex_box_vertical_center___uovxL",flex_box_center_end:"flex_box_center_end___b4gLY",flex_box_column:"flex_box_column___Umjm_",wrap:"wrap___sgoJE",head:"head___b9a9v",sort:"sort___L2Zw8",btn:"btn___khuE4",listWarp:"listWarp___zZj6C",pagination:"pagination___XlROP",fixedRight:"fixedRight___MuAXo","oj-width-input":"oj-width-input___RsZb6"},dn={flex_box_center:"flex_box_center___EahWI",flex_space_between:"flex_space_between___zopS4",flex_box_vertical_center:"flex_box_vertical_center___w03mz",flex_box_center_end:"flex_box_center_end___lr0Fp",flex_box_column:"flex_box_column___KFHVi",active:"active___BczOO",line:"line___VC_Ry",list:"list___n9ABd",left:"left___LVHqw",mask:"mask___fP13z",right:"right___iLe52",name:"name___Oz_7h",title:"title___2Sess",a:"a___t7rIW",b:"b___Kb_45",des:"des___CjMBM",tag:"tag___V0PVb"},Pn=Object.defineProperty,mn=Object.getOwnPropertySymbols,on=Object.prototype.hasOwnProperty,Nt=Object.prototype.propertyIsEnumerable,un=(ht,bt,Et)=>bt in ht?Pn(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,Mn=(ht,bt)=>{for(var Et in bt||(bt={}))on.call(bt,Et)&&un(ht,Et,bt[Et]);if(mn)for(var Et of mn(bt))Nt.call(bt,Et)&&un(ht,Et,bt[Et]);return ht};const Dn=ht=>React.createElement("svg",Mn({width:12,height:10,xmlns:"http://www.w3.org/2000/svg"},ht),React.createElement("title",null,"\u89C2\u770B"),React.createElement("path",{d:"M11 0a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h10ZM4.4 2.4a.4.4 0 0 0-.4.4v4.4a.4.4 0 0 0 .64.32l2.72-2.04a.6.6 0 0 0 0-.96L4.64 2.48a.4.4 0 0 0-.24-.08Z",fill:"#FFF",fillRule:"evenodd"}));var nn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExIDBhMSAxIDAgMCAxIDEgMXY4YTEgMSAwIDAgMS0xIDFIMWExIDEgMCAwIDEtMS0xVjFhMSAxIDAgMCAxIDEtMWgxMFpNNC40IDIuNGEuNC40IDAgMCAwLS40LjR2NC40YS40LjQgMCAwIDAgLjY0LjMybDIuNzItMi4wNGEuNi42IDAgMCAwIDAtLjk2TDQuNjQgMi40OGEuNC40IDAgMCAwLS4yNC0uMDhaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",sn=Object.defineProperty,Nn=Object.getOwnPropertySymbols,On=Object.prototype.hasOwnProperty,qn=Object.prototype.propertyIsEnumerable,Hn=(ht,bt,Et)=>bt in ht?sn(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,ei=(ht,bt)=>{for(var Et in bt||(bt={}))On.call(bt,Et)&&Hn(ht,Et,bt[Et]);if(Nn)for(var Et of Nn(bt))qn.call(bt,Et)&&Hn(ht,Et,bt[Et]);return ht};const Fn=ht=>React.createElement("svg",ei({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},ht),React.createElement("title",null,"\u70B9\u8D5E1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M2.593 13.356V5.694c0-.31-.231-.561-.516-.561H.976c-.532 0-.962.468-.962 1.047v6.69c0 .579.43 1.047.962 1.047h1.101c.285 0 .516-.251.516-.561Z",fill:"#999"}),React.createElement("path",{d:"M3.335 13.512V5.53c0-.184.136-.346.333-.391.695-.16 2.289-.735 2.967-2.694C7.048.73 7.495-.08 8.823.017c1.328.097 1.417 1.263 1.417 1.618v2.752s-.107.42.34.453c.45.033 3.947 0 3.947 0s1.919-.029 1.309 2.122c-.53 1.871-1.58 4.882-1.846 5.635a1.606 1.606 0 0 1-.235.438c-.257.338-.796.88-1.62.88H3.782c-.247.002-.447-.179-.447-.403Z",fill:"#CCC"})));var hi="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjOTk5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQ0NDIi8+PC9nPjwvc3ZnPg==",Di=Object.defineProperty,Ri=Object.getOwnPropertySymbols,En=Object.prototype.hasOwnProperty,$i=Object.prototype.propertyIsEnumerable,Cr=(ht,bt,Et)=>bt in ht?Di(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,mr=(ht,bt)=>{for(var Et in bt||(bt={}))En.call(bt,Et)&&Cr(ht,Et,bt[Et]);if(Ri)for(var Et of Ri(bt))$i.call(bt,Et)&&Cr(ht,Et,bt[Et]);return ht};const Ln=ht=>React.createElement("svg",mr({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},ht),React.createElement("title",null,"\u70B9\u8D5E2"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M2.593 13.356V5.694c0-.31-.231-.561-.516-.561H.976c-.532 0-.962.468-.962 1.047v6.69c0 .579.43 1.047.962 1.047h1.101c.285 0 .516-.251.516-.561Z",fill:"#0152d9"}),React.createElement("path",{d:"M3.335 13.512V5.53c0-.184.136-.346.333-.391.695-.16 2.289-.735 2.967-2.694C7.048.73 7.495-.08 8.823.017c1.328.097 1.417 1.263 1.417 1.618v2.752s-.107.42.34.453c.45.033 3.947 0 3.947 0s1.919-.029 1.309 2.122c-.53 1.871-1.58 4.882-1.846 5.635a1.606 1.606 0 0 1-.235.438c-.257.338-.796.88-1.62.88H3.782c-.247.002-.447-.179-.447-.403Z",fill:"#B6D0FC"})));var Jn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjMDE1MmQ5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQjZEMEZDIi8+PC9nPjwvc3ZnPg==",ui=Object.defineProperty,Si=Object.getOwnPropertySymbols,di=Object.prototype.hasOwnProperty,Ei=Object.prototype.propertyIsEnumerable,qi=(ht,bt,Et)=>bt in ht?ui(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,Fi=(ht,bt)=>{for(var Et in bt||(bt={}))di.call(bt,Et)&&qi(ht,Et,bt[Et]);if(Si)for(var Et of Si(bt))Ei.call(bt,Et)&&qi(ht,Et,bt[Et]);return ht};const zi=ht=>React.createElement("svg",Fi({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},ht),React.createElement("title",null,"\u8BC4\u8BBA1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M4.717.01h8.84c1.571 0 2.357.777 2.357 2.332v5.25c0 1.556-.786 2.334-2.357 2.334h-8.84c-1.572 0-2.357-.778-2.357-2.334v-5.25C2.36.787 3.145.01 4.717.01Z",fill:"#999"}),React.createElement("path",{d:"M2.36 2.342h8.84a2.37 2.37 0 0 1 1.666.684c.442.437.69 1.03.69 1.65v5.25c0 1.288-1.055 2.333-2.357 2.333H7.94l-1.16 1.153-1.167-1.153H2.36a2.37 2.37 0 0 1-1.667-.683 2.321 2.321 0 0 1-.69-1.65v-5.25c0-.62.248-1.213.69-1.65a2.37 2.37 0 0 1 1.667-.684Z",fill:"#B6D0FC"}),React.createElement("path",{d:"M2.36 2.926h8.84c1.301 0 2.357 1.044 2.357 2.333v5.25c0 .619-.249 1.212-.69 1.65a2.37 2.37 0 0 1-1.668.683H7.94l-1.16 1.154-1.167-1.154H2.36a2.37 2.37 0 0 1-1.667-.683 2.321 2.321 0 0 1-.69-1.65V5.26c0-.619.248-1.212.69-1.65a2.37 2.37 0 0 1 1.667-.683Z",fill:"#CCC"}),React.createElement("path",{d:"M3.538 5.842h6.483c.393 0 .589.195.589.584 0 .389-.196.583-.59.583H3.539c-.393 0-.59-.194-.59-.583 0-.39.197-.584.59-.584ZM3.538 8.76h4.715c.393 0 .59.194.59.582 0 .39-.197.584-.59.584H3.538c-.393 0-.59-.195-.59-.584 0-.388.197-.583.59-.583Z",fill:"#FFF"})));var fr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNC43MTcuMDFoOC44NGMxLjU3MSAwIDIuMzU3Ljc3NyAyLjM1NyAyLjMzMnY1LjI1YzAgMS41NTYtLjc4NiAyLjMzNC0yLjM1NyAyLjMzNGgtOC44NGMtMS41NzIgMC0yLjM1Ny0uNzc4LTIuMzU3LTIuMzM0di01LjI1QzIuMzYuNzg3IDMuMTQ1LjAxIDQuNzE3LjAxWiIgZmlsbD0iIzk5OSIvPjxwYXRoIGQ9Ik0yLjM2IDIuMzQyaDguODRhMi4zNyAyLjM3IDAgMCAxIDEuNjY2LjY4NGMuNDQyLjQzNy42OSAxLjAzLjY5IDEuNjV2NS4yNWMwIDEuMjg4LTEuMDU1IDIuMzMzLTIuMzU3IDIuMzMzSDcuOTRsLTEuMTYgMS4xNTMtMS4xNjctMS4xNTNIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NXYtNS4yNWMwLS42Mi4yNDgtMS4yMTMuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4NFoiIGZpbGw9IiNCNkQwRkMiLz48cGF0aCBkPSJNMi4zNiAyLjkyNmg4Ljg0YzEuMzAxIDAgMi4zNTcgMS4wNDQgMi4zNTcgMi4zMzN2NS4yNWMwIC42MTktLjI0OSAxLjIxMi0uNjkgMS42NWEyLjM3IDIuMzcgMCAwIDEtMS42NjguNjgzSDcuOTRsLTEuMTYgMS4xNTQtMS4xNjctMS4xNTRIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NVY1LjI2YzAtLjYxOS4yNDgtMS4yMTIuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4M1oiIGZpbGw9IiNDQ0MiLz48cGF0aCBkPSJNMy41MzggNS44NDJoNi40ODNjLjM5MyAwIC41ODkuMTk1LjU4OS41ODQgMCAuMzg5LS4xOTYuNTgzLS41OS41ODNIMy41MzljLS4zOTMgMC0uNTktLjE5NC0uNTktLjU4MyAwLS4zOS4xOTctLjU4NC41OS0uNTg0Wk0zLjUzOCA4Ljc2aDQuNzE1Yy4zOTMgMCAuNTkuMTk0LjU5LjU4MiAwIC4zOS0uMTk3LjU4NC0uNTkuNTg0SDMuNTM4Yy0uMzkzIDAtLjU5LS4xOTUtLjU5LS41ODQgMC0uMzg4LjE5Ny0uNTgzLjU5LS41ODNaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==",Bn=Object.defineProperty,Br=Object.getOwnPropertySymbols,In=Object.prototype.hasOwnProperty,pr=Object.prototype.propertyIsEnumerable,yo=(ht,bt,Et)=>bt in ht?Bn(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,Ir=(ht,bt)=>{for(var Et in bt||(bt={}))In.call(bt,Et)&&yo(ht,Et,bt[Et]);if(Br)for(var Et of Br(bt))pr.call(bt,Et)&&yo(ht,Et,bt[Et]);return ht};const bo=ht=>React.createElement("svg",Ir({width:16,height:12,xmlns:"http://www.w3.org/2000/svg"},ht),React.createElement("title",null,"\u67E5\u770B1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M7.965 11.961C2.593 11.961 0 6.926 0 5.981 0 5.035 2.623 0 7.965 0s7.965 4.984 7.965 5.98c0 .997-2.593 5.981-7.965 5.981Zm0-2.208c1.296 0 2.494-.72 3.142-1.886a3.902 3.902 0 0 0 0-3.773c-.648-1.167-1.846-1.886-3.142-1.886-2.004 0-3.629 1.69-3.629 3.773s1.625 3.772 3.629 3.772Z",fill:"#CCC"}),React.createElement("path",{d:"M7.965 8.28c-1.222 0-2.213-1.029-2.213-2.3 0-1.27.991-2.3 2.213-2.3s2.212 1.03 2.212 2.3c0 1.271-.99 2.3-2.212 2.3Z",fill:"#999"})));var co="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNy45NjUgMTEuOTYxQzIuNTkzIDExLjk2MSAwIDYuOTI2IDAgNS45ODEgMCA1LjAzNSAyLjYyMyAwIDcuOTY1IDBzNy45NjUgNC45ODQgNy45NjUgNS45OGMwIC45OTctMi41OTMgNS45ODEtNy45NjUgNS45ODFabTAtMi4yMDhjMS4yOTYgMCAyLjQ5NC0uNzIgMy4xNDItMS44ODZhMy45MDIgMy45MDIgMCAwIDAgMC0zLjc3M2MtLjY0OC0xLjE2Ny0xLjg0Ni0xLjg4Ni0zLjE0Mi0xLjg4Ni0yLjAwNCAwLTMuNjI5IDEuNjktMy42MjkgMy43NzNzMS42MjUgMy43NzIgMy42MjkgMy43NzJaIiBmaWxsPSIjQ0NDIi8+PHBhdGggZD0iTTcuOTY1IDguMjhjLTEuMjIyIDAtMi4yMTMtMS4wMjktMi4yMTMtMi4zIDAtMS4yNy45OTEtMi4zIDIuMjEzLTIuM3MyLjIxMiAxLjAzIDIuMjEyIDIuM2MwIDEuMjcxLS45OSAyLjMtMi4yMTIgMi4zWiIgZmlsbD0iIzk5OSIvPjwvZz48L3N2Zz4=",Hi=({style:ht={},onClick:bt,onAssist:Et,onHide:wn,data:fn,active:an,showLine:Sn})=>Me.createElement(Me.Fragment,null,Me.createElement("div",{className:an===(fn==null?void 0:fn.id)?`${dn.list} ${dn.active}`:dn.list,style:ht,onClick:()=>bt(fn)},(fn==null?void 0:fn.video)&&Me.createElement("div",{className:dn.left},Me.createElement("img",{src:fn==null?void 0:fn.video_cover}),Me.createElement("div",null,Me.createElement("img",{src:nn}),Me.createElement("span",null,fn==null?void 0:fn.video_duration)),Me.createElement("div",{className:dn.mask})),Me.createElement("div",{className:dn.right},Me.createElement("div",{className:dn.name},Me.createElement("img",{src:ve.Z.IMG_SERVER+"/images/"+(fn==null?void 0:fn.image_url),width:30,height:30}),Me.createElement("div",{title:fn==null?void 0:fn.name,className:dn.title},fn==null?void 0:fn.name),(fn==null?void 0:fn.is_authority)&&Me.createElement("div",{className:dn.b},"\u5B98\u65B9"),(fn==null?void 0:fn.is_excellent)&&Me.createElement("div",{className:dn.a},"\u7CBE\u9009")),Me.createElement("div",{className:dn.des},Me.createElement(Ie.Z,{showLines:2,showTextOnly:!0,value:(fn==null?void 0:fn.content)||"\u6682\u65E0\u5185\u5BB9"})),Me.createElement("div",{className:dn.tag},Me.createElement("span",{className:"current",onClick:xn=>{xn.stopPropagation(),Et(fn)}},Me.createElement("img",{src:fn!=null&&fn.user_liker?Jn:hi}),Me.createElement("span",{style:{color:fn!=null&&fn.user_liker?"#0152d9":"#656f87"}},fn==null?void 0:fn.praises_count)),Me.createElement("span",null,Me.createElement("img",{src:fr}),Me.createElement("span",null,fn==null?void 0:fn.discusses_count)),Me.createElement("span",null,Me.createElement("img",{src:co}),Me.createElement("span",null,fn==null?void 0:fn.viewed_count)),(0,sr.Ny)()&&Me.createElement("span",{className:"current",style:{color:"#0152d9",marginRight:0,userSelect:"none"},onClick:xn=>{xn.stopPropagation(),wn(fn)}},fn!=null&&fn.is_hidden?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")))),Sn&&Me.createElement("div",{className:dn.line})),ur={flex_box_center:"flex_box_center___C6sVF",flex_space_between:"flex_space_between___VEt8l",flex_box_vertical_center:"flex_box_vertical_center___qeD5F",flex_box_center_end:"flex_box_center_end___iYJd9",flex_box_column:"flex_box_column___iAKJf",listForm:"listForm___leDJL",scroll:"scroll___wtFaF",formWrap:"formWrap___p3W41",btns:"btns___Izl4q",main:"main___xTqlG",mainLoading:"mainLoading___QLa9s",tip:"tip___a0tbY",proWarp:"proWarp___BZhOt",pro:"pro___Yp1Rx",mainSucceed:"mainSucceed___HfaTf",del:"del___TXGhB"},Pr=Ee(6848),ci=Ee(70750),Mt=Object.defineProperty,Gr=Object.getOwnPropertySymbols,Hr=Object.prototype.hasOwnProperty,ts=Object.prototype.propertyIsEnumerable,ko=(ht,bt,Et)=>bt in ht?Mt(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,ss=(ht,bt)=>{for(var Et in bt||(bt={}))Hr.call(bt,Et)&&ko(ht,Et,bt[Et]);if(Gr)for(var Et of Gr(bt))ts.call(bt,Et)&&ko(ht,Et,bt[Et]);return ht};const _r=ht=>React.createElement("svg",ss({width:32,height:30,xmlns:"http://www.w3.org/2000/svg"},ht),React.createElement("title",null,"\u4E0A\u4F20\u89C6\u9891"),React.createElement("path",{d:"M1.6 0C1.175 0 .768.17.468.474A1.63 1.63 0 0 0 0 1.622v3.243h3.237L7.378 0H1.6Zm7.876 0L5.338 4.865h5.9L15.371 0H9.476Zm7.998 0-4.137 4.865h5.896L23.372 0h-5.898Zm8 0-4.138 4.865h6.66V1.622a1.629 1.629 0 0 0-.467-1.148A1.585 1.585 0 0 0 26.397 0h-.924ZM0 6.487v17.837c0 .43.167.844.468 1.148.3.305.707.475 1.132.474h18.61a6.515 6.515 0 0 1 1.652-6.218 6.31 6.31 0 0 1 6.134-1.675V6.487H0Zm11.998 5.675 6.4 4.056-6.4 4.055v-8.11Zm14.399 6.487c-3.092.002-5.597 2.544-5.595 5.678.001 3.134 2.508 5.674 5.6 5.673C29.494 30 32 27.458 32 24.324c0-1.506-.59-2.95-1.641-4.014a5.561 5.561 0 0 0-3.962-1.661Zm0 2.027c.22.003.428.1.574.266.663.6 1.327 1.352 1.99 2.002a.8.8 0 0 1 0 1.14.788.788 0 0 1-1.125 0l-.638-.646v3.724a.814.814 0 0 1-.392.724.79.79 0 0 1-.815 0 .814.814 0 0 1-.392-.724v-3.724l-.637.646a.79.79 0 0 1-.773.215.803.803 0 0 1-.567-.575.816.816 0 0 1 .212-.783c.651-.664 1.333-1.388 1.99-2.002a.778.778 0 0 1 .575-.266l-.002.003Z",fill:"#0152d9",fillRule:"nonzero"}));var cr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNiAwQzEuMTc1IDAgLjc2OC4xNy40NjguNDc0QTEuNjMgMS42MyAwIDAgMCAwIDEuNjIydjMuMjQzaDMuMjM3TDcuMzc4IDBIMS42Wm03Ljg3NiAwTDUuMzM4IDQuODY1aDUuOUwxNS4zNzEgMEg5LjQ3NlptNy45OTggMC00LjEzNyA0Ljg2NWg1Ljg5NkwyMy4zNzIgMGgtNS44OThabTggMC00LjEzOCA0Ljg2NWg2LjY2VjEuNjIyYTEuNjI5IDEuNjI5IDAgMCAwLS40NjctMS4xNDhBMS41ODUgMS41ODUgMCAwIDAgMjYuMzk3IDBoLS45MjRaTTAgNi40ODd2MTcuODM3YzAgLjQzLjE2Ny44NDQuNDY4IDEuMTQ4LjMuMzA1LjcwNy40NzUgMS4xMzIuNDc0aDE4LjYxYTYuNTE1IDYuNTE1IDAgMCAxIDEuNjUyLTYuMjE4IDYuMzEgNi4zMSAwIDAgMSA2LjEzNC0xLjY3NVY2LjQ4N0gwWm0xMS45OTggNS42NzUgNi40IDQuMDU2LTYuNCA0LjA1NXYtOC4xMVptMTQuMzk5IDYuNDg3Yy0zLjA5Mi4wMDItNS41OTcgMi41NDQtNS41OTUgNS42NzguMDAxIDMuMTM0IDIuNTA4IDUuNjc0IDUuNiA1LjY3M0MyOS40OTQgMzAgMzIgMjcuNDU4IDMyIDI0LjMyNGMwLTEuNTA2LS41OS0yLjk1LTEuNjQxLTQuMDE0YTUuNTYxIDUuNTYxIDAgMCAwLTMuOTYyLTEuNjYxWm0wIDIuMDI3Yy4yMi4wMDMuNDI4LjEuNTc0LjI2Ni42NjMuNiAxLjMyNyAxLjM1MiAxLjk5IDIuMDAyYS44LjggMCAwIDEgMCAxLjE0Ljc4OC43ODggMCAwIDEtMS4xMjUgMGwtLjYzOC0uNjQ2djMuNzI0YS44MTQuODE0IDAgMCAxLS4zOTIuNzI0Ljc5Ljc5IDAgMCAxLS44MTUgMCAuODE0LjgxNCAwIDAgMS0uMzkyLS43MjR2LTMuNzI0bC0uNjM3LjY0NmEuNzkuNzkgMCAwIDEtLjc3My4yMTUuODAzLjgwMyAwIDAgMS0uNTY3LS41NzUuODE2LjgxNiAwIDAgMSAuMjEyLS43ODNjLjY1MS0uNjY0IDEuMzMzLTEuMzg4IDEuOTktMi4wMDJhLjc3OC43NzggMCAwIDEgLjU3NS0uMjY2bC0uMDAyLjAwM1oiIGZpbGw9IiMwMTUyZDkiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",Vr=Object.defineProperty,hr=Object.getOwnPropertySymbols,eo=Object.prototype.hasOwnProperty,Yo=Object.prototype.propertyIsEnumerable,rr=(ht,bt,Et)=>bt in ht?Vr(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,Wi=(ht,bt)=>{for(var Et in bt||(bt={}))eo.call(bt,Et)&&rr(ht,Et,bt[Et]);if(hr)for(var Et of hr(bt))Yo.call(bt,Et)&&rr(ht,Et,bt[Et]);return ht};const Qn=ht=>React.createElement("svg",Wi({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},ht),React.createElement("title",null,"\u4E0A\u4F20\u6210\u529F"),React.createElement("path",{d:"M15 0c8.285 0 15 6.717 15 15 0 8.285-6.715 15-15 15-8.283 0-15-6.715-15-15C0 6.717 6.717 0 15 0Zm10.041 7.5v.01a47.934 47.934 0 0 0-11.232 9.386l-4.372-3.3v-.002L7.5 15.08l7.553 7.42A44.625 44.625 0 0 1 25.5 8.55l-.459-1.05Z",fill:"#44D7B6",fillRule:"nonzero"}));var or="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1IDBjOC4yODUgMCAxNSA2LjcxNyAxNSAxNSAwIDguMjg1LTYuNzE1IDE1LTE1IDE1LTguMjgzIDAtMTUtNi43MTUtMTUtMTVDMCA2LjcxNyA2LjcxNyAwIDE1IDBabTEwLjA0MSA3LjV2LjAxYTQ3LjkzNCA0Ny45MzQgMCAwIDAtMTEuMjMyIDkuMzg2bC00LjM3Mi0zLjN2LS4wMDJMNy41IDE1LjA4bDcuNTUzIDcuNDJBNDQuNjI1IDQ0LjYyNSAwIDAgMSAyNS41IDguNTVsLS40NTktMS4wNVoiIGZpbGw9IiM0NEQ3QjYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",to=Object.defineProperty,Ro=Object.getOwnPropertySymbols,Bo=Object.prototype.hasOwnProperty,Xo=Object.prototype.propertyIsEnumerable,as=(ht,bt,Et)=>bt in ht?to(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,Ho=(ht,bt)=>{for(var Et in bt||(bt={}))Bo.call(bt,Et)&&as(ht,Et,bt[Et]);if(Ro)for(var Et of Ro(bt))Xo.call(bt,Et)&&as(ht,Et,bt[Et]);return ht};const ia=ht=>React.createElement("svg",Ho({xmlns:"http://www.w3.org/2000/svg",width:20,height:20},ht),React.createElement("path",{fill:"#AFBACB",d:"M9.99.02C4.482.02.02 4.482.02 9.99c0 5.506 4.463 9.97 9.97 9.97 5.506 0 9.97-4.464 9.97-9.97 0-5.507-4.464-9.97-9.97-9.97Zm1.636 13.69c-.744 1.19-1.488 2.083-2.827 2.083-.893-.149-1.19-.744-1.042-1.488l1.637-5.506c0-.149 0-.298-.149-.298-.148 0-.446 0-.595.298l-1.042 1.19v-.744c.745-1.19 1.935-2.083 2.828-2.083.744.149 1.19.744 1.042 1.488L9.84 14.305c0 .149 0 .298.148.298.15 0 .447-.15.596-.298l1.041-1.34v.745Zm-.297-7.292c-.596 0-1.19-.446-1.19-1.19 0-.745.446-1.191 1.19-1.191.595 0 1.19.446 1.19 1.19 0 .745-.595 1.191-1.19 1.191Z"}));var _s="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZmlsbD0iI0FGQkFDQiIgZD0iTTkuOTkuMDJDNC40ODIuMDIuMDIgNC40ODIuMDIgOS45OWMwIDUuNTA2IDQuNDYzIDkuOTcgOS45NyA5Ljk3IDUuNTA2IDAgOS45Ny00LjQ2NCA5Ljk3LTkuOTcgMC01LjUwNy00LjQ2NC05Ljk3LTkuOTctOS45N1ptMS42MzYgMTMuNjljLS43NDQgMS4xOS0xLjQ4OCAyLjA4My0yLjgyNyAyLjA4My0uODkzLS4xNDktMS4xOS0uNzQ0LTEuMDQyLTEuNDg4bDEuNjM3LTUuNTA2YzAtLjE0OSAwLS4yOTgtLjE0OS0uMjk4LS4xNDggMC0uNDQ2IDAtLjU5NS4yOThsLTEuMDQyIDEuMTl2LS43NDRjLjc0NS0xLjE5IDEuOTM1LTIuMDgzIDIuODI4LTIuMDgzLjc0NC4xNDkgMS4xOS43NDQgMS4wNDIgMS40ODhMOS44NCAxNC4zMDVjMCAuMTQ5IDAgLjI5OC4xNDguMjk4LjE1IDAgLjQ0Ny0uMTUuNTk2LS4yOThsMS4wNDEtMS4zNHYuNzQ1Wm0tLjI5Ny03LjI5MmMtLjU5NiAwLTEuMTktLjQ0Ni0xLjE5LTEuMTkgMC0uNzQ1LjQ0Ni0xLjE5MSAxLjE5LTEuMTkxLjU5NSAwIDEuMTkuNDQ2IDEuMTkgMS4xOSAwIC43NDUtLjU5NSAxLjE5MS0xLjE5IDEuMTkxWiIvPjwvc3ZnPg==",la=Object.defineProperty,kn=Object.getOwnPropertySymbols,Is=Object.prototype.hasOwnProperty,Pu=Object.prototype.propertyIsEnumerable,Ua=(ht,bt,Et)=>bt in ht?la(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,Sa=(ht,bt)=>{for(var Et in bt||(bt={}))Is.call(bt,Et)&&Ua(ht,Et,bt[Et]);if(kn)for(var Et of kn(bt))Pu.call(bt,Et)&&Ua(ht,Et,bt[Et]);return ht},us=(ht,bt,Et)=>new Promise((wn,fn)=>{var an=Cn=>{try{xn(Et.next(Cn))}catch(zn){fn(zn)}},Sn=Cn=>{try{xn(Et.throw(Cn))}catch(zn){fn(zn)}},xn=Cn=>Cn.done?wn(Cn.value):Promise.resolve(Cn.value).then(an,Sn);xn((Et=Et.apply(ht,bt)).next())});const Ws=(ht,bt)=>{var Et,wn,fn;const{uploadInfo:an={}}=bt.payload;switch(bt.type){case"addVideo":return{videoList:[...ht.videoList,{name:an.file.name,size:an.file.size,type:an.file.type,fileHash:an.fileHash,state:an.state,video_id:an.videoId,attachment_id:"",article_id:-1,loaded:0,title:""}]};case"removeVideo":return{videoList:ht.videoList.filter(Sn=>Sn.name!==bt.payload.name)};case"replaceVideo":return{videoList:bt.payload};case"removeAll":return[];case"updateProgress":return{videoList:ht.videoList.map(Sn=>Sn.name===bt.payload.uploadInfo.file.name?Sa(Sa({},Sn),{loaded:bt.payload.progressPercent,video_id:an.videoId,fileHash:an.fileHash}):Sn)};case"updateTitle":return{videoList:(Et=ht.videoList)==null?void 0:Et.map(Sn=>Sn.name===bt.payload.item.name?Sa(Sa({},Sn),{title:bt.payload.title}):Sn)};case"updateImg":return{videoList:(wn=ht.videoList)==null?void 0:wn.map(Sn=>Sn.name===bt.payload.item.name?Sa(Sa({},Sn),{attachment_id:bt.payload.attachment_id}):Sn)};case"updateImg":return{videoList:(fn=ht.videoList)==null?void 0:fn.map(Sn=>Sn.name===bt.payload.item.name?Sa(Sa({},Sn),{attachment_id:bt.payload.attachment_id}):Sn)};default:return[]}};var Ao=({onClose:ht,onOk:bt,identifier:Et,active:wn})=>{var fn,an;const[Sn]=tt.default.useForm(),[xn,Cn]=(0,Me.useState)({}),[zn,ii]=(0,Me.useState)(!1),[Zn,wi]=(0,Me.useState)(!1),[Kn,gi]=(0,Me.useReducer)(Ws,{videoList:[]}),si=(0,sr.eY)(),Ii=(0,ke.useParams)(),Oi=(0,Me.useRef)();(0,Me.useEffect)(()=>{wn&&Ui()},[wn]);const Ui=()=>us(void 0,null,function*(){var Gi,vr,er,So,Co,is,so,kr,No,Nr;const Xr=yield(0,ge.M3)(Et,{active:wn});if((Xr==null?void 0:Xr.status)===0){const rs={name:(Gi=Xr==null?void 0:Xr.data)==null?void 0:Gi.name,content:(vr=Xr==null?void 0:Xr.data)==null?void 0:vr.content};Sn.setFieldsValue(rs),Cn(rs),(So=(er=Xr==null?void 0:Xr.data)==null?void 0:er.videos)!=null&&So[0]&&gi({type:"replaceVideo",payload:[{video_id:(so=(is=(Co=Xr==null?void 0:Xr.data)==null?void 0:Co.videos)==null?void 0:is[0])==null?void 0:so.video_id,name:(Nr=(No=(kr=Xr==null?void 0:Xr.data)==null?void 0:kr.videos)==null?void 0:No[0])==null?void 0:Nr.title,loaded:100}]})}}),Ai=(Gi,vr)=>{Cn(Sa({},vr))},Ni=Gi=>us(void 0,null,function*(){const vr={videos:Kn.videoList,articles:Gi};wi(!0);let er;wn?(vr.active=wn,er=yield(0,ge.gu)(Et,vr)):er=yield(0,ge.bx)(Et,vr),(er==null?void 0:er.status)===0&&(console.log(wn||(er==null?void 0:er.id),44),bt(wn||(er==null?void 0:er.id))),wi(!1)}),ar=()=>{const Gi=document.getElementById("fileUpload");Gi.value=""},ti=Gi=>{var vr='{"Vod":{}}';if(ii(!0),Oi.current){Oi.current.addFile(Gi,null,null,null,vr);return}(0,ci.o)(si==null?void 0:si.login,"",{create:!Oi,addFileSuccess:er=>{gi({type:"addVideo",payload:{uploadInfo:er}})},onUploadProgress:(er,So,Co)=>{const is=Math.ceil(Co*100);gi({type:"updateProgress",payload:{uploadInfo:er,progressPercent:is}}),ar()},onUploadFailed:er=>{Le.ZP.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:er=>{ii(!1)},onUploadSucceed:er=>{ii(!1)},onUploadError:er=>{ii(!1)},gotUploader:er=>{er.addFile(Gi,null,null,null,vr),Oi.current=er}})},ji=Gi=>{var vr;const So=Gi.target.files[0];if(!So){ar();return}let Co=So.name.toLowerCase();if(Co&&Co.indexOf(".avi")==-1&&Co.indexOf(".flv")==-1&&Co.indexOf(".f4v")==-1&&Co.indexOf(".m4v")==-1&&Co.indexOf(".mov")==-1&&Co.indexOf(".mp4")==-1&&Co.indexOf(".rmvb")==-1&&Co.indexOf(".swf")==-1&&Co.indexOf(".webm")==-1&&Co.indexOf(".wmv")==-1){Le.ZP.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),ar();return}if(So.size>1024*1024*1024){Le.ZP.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC71024M"),ar();return}if((vr=Kn.videoList)!=null&&vr.find(is=>is.name===So.name)){Le.ZP.info("\u4F60\u4E0D\u80FD\u4E0A\u4F20\u540C\u4E00\u4E2A\u89C6\u9891\u6587\u4EF6\u540D\u79F0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002"),ar();return}ti(So)},Li=(Gi,vr)=>{he.default.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:Me.createElement("div",{className:"tc"},"\u60A8\u786E\u8BA4\u8981",vr?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:()=>{ar(),gi({type:"removeVideo",payload:{name:Gi}})}})},bi=()=>Me.createElement("label",{htmlFor:"fileUpload",className:ur.main},Me.createElement("img",{src:cr,alt:""}),Me.createElement("span",null,"\u4E0A\u4F20\u89C6\u9891")),Yi=Gi=>Me.createElement("div",{className:ur.mainLoading},Me.createElement("div",{className:ur.proWarp},Me.createElement("div",{className:ur.pro},Me.createElement("div",{style:{width:Gi}})),Me.createElement("span",null,Gi||0,"%")),Me.createElement("aside",null,"\u4E0A\u4F20\u4E2D"),Me.createElement("div",{className:ur.tip},Me.createElement(Pr.Z,{getPopupContainer:vr=>vr.parentNode,title:Me.createElement("div",null,Me.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",Me.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),Me.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),Me.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},Me.createElement("img",{src:_s,alt:""})))),pi=Gi=>Me.createElement("div",{className:ur.mainSucceed},Me.createElement("img",{src:or,alt:""}),Me.createElement("span",null,"\u4E0A\u4F20\u6210\u529F"),Me.createElement("div",{className:ur.tip},Me.createElement(Pr.Z,{getPopupContainer:vr=>vr.parentNode,title:Me.createElement("div",null,Me.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",Me.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),Me.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),Me.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},Me.createElement("img",{src:_s,alt:""}))),Me.createElement("div",{className:ur.del,onClick:()=>Li(Gi.name,Gi.loaded==100)},Me.createElement("i",{className:"iconfont icon-shanchu7 mr5"}),"\u5220\u9664\u89C6\u9891")),lr=()=>{var Gi;return Me.createElement(Me.Fragment,null,(Gi=Kn.videoList)==null?void 0:Gi.map((vr,er)=>Me.createElement(Me.Fragment,{key:er},vr.loaded==100?pi(vr):Yi(vr.loaded))))},Xi=()=>{he.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:ht})},Pi=(fn=Kn.videoList)==null?void 0:fn.length;return Me.createElement("div",{className:ur.listForm},Me.createElement("header",null,wn?"\u7F16\u8F91":"\u53D1\u5E03","\u9898\u89E3"),Me.createElement("section",{className:ur.scroll,id:"sss"},Me.createElement("div",{className:ur.formWrap}," ",Me.createElement(tt.default,{form:Sn,scrollToFirstError:!0,layout:"vertical",onValuesChange:Ai,onFinish:Ni},Me.createElement(tt.default.Item,{name:"name",label:"\u6807\u9898:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0"},{max:60,message:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},Me.createElement(lt.default,{bordered:!1,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26",suffix:`${((an=xn.name)==null?void 0:an.length)||0}/60`})),Me.createElement(tt.default.Item,{name:"content",label:"\u5185\u5BB9:"},Me.createElement(wr.Z,{defaultValue:xn.content||"",watch:!0})))),Me.createElement("div",{className:ur.upload},Pi?lr():bi(),Me.createElement("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:ji,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"}))),Me.createElement("div",{className:ur.btns},Me.createElement(ut.ZP,{onClick:Xi,type:"primary",ghost:!0},"\u5173\u95ED"),Me.createElement(ut.ZP,{loading:Zn,disabled:zn,onClick:()=>Sn.submit(),type:"primary"},"\u53D1\u5E03\u9898\u89E3")))},Eo={flex_box_center:"flex_box_center___Udvu8",flex_space_between:"flex_space_between___WNLp1",flex_box_vertical_center:"flex_box_vertical_center___ecch5",flex_box_center_end:"flex_box_center_end___cu_DJ",flex_box_column:"flex_box_column___zF2CU",listDetails:"listDetails___HpDwH",head:"head___wipEz",name:"name___qdH8S",title:"title___B0yUa",a:"a___LB6ZS",b:"b___yvOON",tag:"tag___bRCso",btn:"btn___akBxg",scroll:"scroll___JKC_q",video:"video___nEr4F",html:"html___GDNSx",g:"g___LSOhO",btns:"btns___Ci727"},ua=Ee(61621),xr=Object.defineProperty,lo=Object.getOwnPropertySymbols,Yr=Object.prototype.hasOwnProperty,Mi=Object.prototype.propertyIsEnumerable,Es=(ht,bt,Et)=>bt in ht?xr(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,Ls=(ht,bt)=>{for(var Et in bt||(bt={}))Yr.call(bt,Et)&&Es(ht,Et,bt[Et]);if(lo)for(var Et of lo(bt))Mi.call(bt,Et)&&Es(ht,Et,bt[Et]);return ht};const xa=ht=>React.createElement("svg",Ls({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:15,height:16},ht),React.createElement("defs",null,React.createElement("path",{id:"jx_svg__a",d:"M6.385.257c.616-.343 1.616-.342 2.23 0l5.27 2.94C14.501 3.538 15 4.38 15 5.071v5.856c0 .692-.501 1.533-1.115 1.876l-5.27 2.939c-.616.343-1.616.342-2.23 0l-5.27-2.94C.499 12.462 0 11.622 0 10.929V5.072C0 4.38.501 3.54 1.115 3.196Zm1.423 3.817c-.169-.341-.446-.341-.615 0L6.38 5.717c-.169.341-.616.665-.994.72l-1.82.264c-.378.055-.464.317-.19.583l1.317 1.278c.273.266.444.79.38 1.165l-.31 1.806c-.066.376.158.538.496.36l1.628-.853c.338-.177.89-.177 1.23 0l1.627.853c.337.177.561.015.497-.36l-.31-1.806c-.065-.375.105-.899.379-1.165l1.316-1.278c.274-.266.188-.529-.19-.583l-1.819-.264c-.377-.054-.825-.378-.994-.72Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"jx_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#jx_svg__a"})),React.createElement("use",{fill:"#8DC9FF",fillRule:"nonzero",xlinkHref:"#jx_svg__a"}),React.createElement("circle",{cx:-1.5,cy:-3.5,r:16.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#jx_svg__b)"}),React.createElement("circle",{cx:-2.5,cy:-4.5,r:12.5,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#jx_svg__b)"})));var xl="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNNi4zODUuMjU3Yy42MTYtLjM0MyAxLjYxNi0uMzQyIDIuMjMgMGw1LjI3IDIuOTRDMTQuNTAxIDMuNTM4IDE1IDQuMzggMTUgNS4wNzF2NS44NTZjMCAuNjkyLS41MDEgMS41MzMtMS4xMTUgMS44NzZsLTUuMjcgMi45MzljLS42MTYuMzQzLTEuNjE2LjM0Mi0yLjIzIDBsLTUuMjctMi45NEMuNDk5IDEyLjQ2MiAwIDExLjYyMiAwIDEwLjkyOVY1LjA3MkMwIDQuMzguNTAxIDMuNTQgMS4xMTUgMy4xOTZabTEuNDIzIDMuODE3Yy0uMTY5LS4zNDEtLjQ0Ni0uMzQxLS42MTUgMEw2LjM4IDUuNzE3Yy0uMTY5LjM0MS0uNjE2LjY2NS0uOTk0LjcybC0xLjgyLjI2NGMtLjM3OC4wNTUtLjQ2NC4zMTctLjE5LjU4M2wxLjMxNyAxLjI3OGMuMjczLjI2Ni40NDQuNzkuMzggMS4xNjVsLS4zMSAxLjgwNmMtLjA2Ni4zNzYuMTU4LjUzOC40OTYuMzZsMS42MjgtLjg1M2MuMzM4LS4xNzcuODktLjE3NyAxLjIzIDBsMS42MjcuODUzYy4zMzcuMTc3LjU2MS4wMTUuNDk3LS4zNmwtLjMxLTEuODA2Yy0uMDY1LS4zNzUuMTA1LS44OTkuMzc5LTEuMTY1bDEuMzE2LTEuMjc4Yy4yNzQtLjI2Ni4xODgtLjUyOS0uMTktLjU4M2wtMS44MTktLjI2NGMtLjM3Ny0uMDU0LS44MjUtLjM3OC0uOTk0LS43MloiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48dXNlIGZpbGw9IiM4REM5RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI2EiLz48Y2lyY2xlIGN4PSItMS41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLTIuNSIgY3k9Ii00LjUiIHI9IjEyLjUiIGZpbGw9IiNFRUY3RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgbWFzaz0idXJsKCNiKSIvPjwvZz48L3N2Zz4=",Il=Object.defineProperty,yi=Object.getOwnPropertySymbols,ms=Object.prototype.hasOwnProperty,Xs=Object.prototype.propertyIsEnumerable,qa=(ht,bt,Et)=>bt in ht?Il(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,wl=(ht,bt)=>{for(var Et in bt||(bt={}))ms.call(bt,Et)&&qa(ht,Et,bt[Et]);if(yi)for(var Et of yi(bt))Xs.call(bt,Et)&&qa(ht,Et,bt[Et]);return ht};const Dl=ht=>React.createElement("svg",wl({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},ht),React.createElement("defs",null,React.createElement("path",{id:"gf_svg__a",d:"m8 0 1.857 1.073h2.146l1.071 1.854L14.931 4v2.144L16 8l-1.069 1.857V12l-1.858 1.072-1.071 1.856H9.857L8 16l-1.855-1.073H4l-1.072-1.856L1.072 12V9.857L0 8l1.072-1.856V4l1.857-1.073 1.072-1.854h2.145L8 0Zm2.91 6.385H4.796V12h1.246v-.451h4.026v.435h1.247V9.196H6.043v-.515h4.866V6.385Zm-.84 3.681v.613H6.042v-.613h4.026ZM9.705 7.24v.588H6.043v-.588h3.663ZM8.615 4l-1.48.137c.055.133.12.284.192.453l.076.175H4v1.426h1.195v-.483h5.61v.483H12V4.765H8.883c-.078-.23-.148-.43-.21-.602L8.616 4Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"gf_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#gf_svg__a"})),React.createElement("use",{fill:"#8DC9FF",fillRule:"nonzero",xlinkHref:"#gf_svg__a"}),React.createElement("circle",{cx:.5,cy:-3.5,r:16.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#gf_svg__b)"}),React.createElement("circle",{cx:-.5,cy:-4.5,r:12.5,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#gf_svg__b)"})));var jr="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJtOCAwIDEuODU3IDEuMDczaDIuMTQ2bDEuMDcxIDEuODU0TDE0LjkzMSA0djIuMTQ0TDE2IDhsLTEuMDY5IDEuODU3VjEybC0xLjg1OCAxLjA3Mi0xLjA3MSAxLjg1Nkg5Ljg1N0w4IDE2bC0xLjg1NS0xLjA3M0g0bC0xLjA3Mi0xLjg1NkwxLjA3MiAxMlY5Ljg1N0wwIDhsMS4wNzItMS44NTZWNGwxLjg1Ny0xLjA3MyAxLjA3Mi0xLjg1NGgyLjE0NUw4IDBabTIuOTEgNi4zODVINC43OTZWMTJoMS4yNDZ2LS40NTFoNC4wMjZ2LjQzNWgxLjI0N1Y5LjE5Nkg2LjA0M3YtLjUxNWg0Ljg2NlY2LjM4NVptLS44NCAzLjY4MXYuNjEzSDYuMDQydi0uNjEzaDQuMDI2Wk05LjcwNSA3LjI0di41ODhINi4wNDN2LS41ODhoMy42NjNaTTguNjE1IDRsLTEuNDguMTM3Yy4wNTUuMTMzLjEyLjI4NC4xOTIuNDUzbC4wNzYuMTc1SDR2MS40MjZoMS4xOTV2LS40ODNoNS42MXYuNDgzSDEyVjQuNzY1SDguODgzYy0uMDc4LS4yMy0uMTQ4LS40My0uMjEtLjYwMkw4LjYxNiA0WiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzhEQzlGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9Ii41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLS41IiBjeT0iLTQuNSIgcj0iMTIuNSIgZmlsbD0iI0VFRjdGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PC9nPjwvc3ZnPg==",nc=Object.defineProperty,Ia=Object.getOwnPropertySymbols,Ga=Object.prototype.hasOwnProperty,Na=Object.prototype.propertyIsEnumerable,$l=(ht,bt,Et)=>bt in ht?nc(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,_u=(ht,bt)=>{for(var Et in bt||(bt={}))Ga.call(bt,Et)&&$l(ht,Et,bt[Et]);if(Ia)for(var Et of Ia(bt))Na.call(bt,Et)&&$l(ht,Et,bt[Et]);return ht};const Wa=ht=>React.createElement("svg",_u({width:22,height:20,xmlns:"http://www.w3.org/2000/svg"},ht),React.createElement("title",null,"\u5927\u70B9\u8D5E"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M3.566 19.08V8.134c0-.443-.318-.802-.71-.802H1.34c-.73 0-1.322.67-1.322 1.496v9.558c0 .827.593 1.496 1.322 1.496h1.515c.392 0 .71-.36.71-.802Z",fill:"#A3D3FF"}),React.createElement("path",{d:"M4.585 19.303V7.9c0-.263.188-.495.459-.559.955-.229 3.147-1.049 4.08-3.848.567-2.451 1.182-3.607 3.008-3.469 1.826.139 1.948 1.804 1.948 2.312v3.93s-.148.602.468.649c.617.046 5.426 0 5.426 0s2.639-.042 1.8 3.031c-.73 2.673-2.173 6.974-2.537 8.05a2.324 2.324 0 0 1-.324.626c-.353.483-1.094 1.258-2.228 1.258H5.201c-.341.002-.616-.257-.616-.577Z",fill:"#FFF"})));var Za="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMy41NjYgMTkuMDhWOC4xMzRjMC0uNDQzLS4zMTgtLjgwMi0uNzEtLjgwMkgxLjM0Yy0uNzMgMC0xLjMyMi42Ny0xLjMyMiAxLjQ5NnY5LjU1OGMwIC44MjcuNTkzIDEuNDk2IDEuMzIyIDEuNDk2aDEuNTE1Yy4zOTIgMCAuNzEtLjM2LjcxLS44MDJaIiBmaWxsPSIjQTNEM0ZGIi8+PHBhdGggZD0iTTQuNTg1IDE5LjMwM1Y3LjljMC0uMjYzLjE4OC0uNDk1LjQ1OS0uNTU5Ljk1NS0uMjI5IDMuMTQ3LTEuMDQ5IDQuMDgtMy44NDguNTY3LTIuNDUxIDEuMTgyLTMuNjA3IDMuMDA4LTMuNDY5IDEuODI2LjEzOSAxLjk0OCAxLjgwNCAxLjk0OCAyLjMxMnYzLjkzcy0uMTQ4LjYwMi40NjguNjQ5Yy42MTcuMDQ2IDUuNDI2IDAgNS40MjYgMHMyLjYzOS0uMDQyIDEuOCAzLjAzMWMtLjczIDIuNjczLTIuMTczIDYuOTc0LTIuNTM3IDguMDVhMi4zMjQgMi4zMjQgMCAwIDEtLjMyNC42MjZjLS4zNTMuNDgzLTEuMDk0IDEuMjU4LTIuMjI4IDEuMjU4SDUuMjAxYy0uMzQxLjAwMi0uNjE2LS4yNTctLjYxNi0uNTc3WiIgZmlsbD0iI0ZGRiIvPjwvZz48L3N2Zz4=",Uu={flex_box_center:"flex_box_center___Fl60v",flex_space_between:"flex_space_between___bECvI",flex_box_vertical_center:"flex_box_vertical_center___NasnL",flex_box_center_end:"flex_box_center_end___llsAF",flex_box_column:"flex_box_column___KaTPF",discuss:"discuss___fk6PE",reply:"reply___pOmly",pagination:"pagination___qEsHX"},yc=Ee(95237),Eu=Ee(43604),Rl={flex_box_center:"flex_box_center___qGmgZ",flex_space_between:"flex_space_between___PeDhE",flex_box_vertical_center:"flex_box_vertical_center___avs2o",flex_box_center_end:"flex_box_center_end___bpXQB",flex_box_column:"flex_box_column___bc5wd",discussItem:"discussItem___zcesj",wrap:"wrap___ezVW4",list:"list___EEOWp",btns:"btns___Niwl7",secondLevelDiscuss:"secondLevelDiscuss___TXG1b",line:"line___ejh2a",thirdlyLevelDiscuss:"thirdlyLevelDiscuss___HRI5Q"},Sc=(ht,bt,Et)=>new Promise((wn,fn)=>{var an=Cn=>{try{xn(Et.next(Cn))}catch(zn){fn(zn)}},Sn=Cn=>{try{xn(Et.throw(Cn))}catch(zn){fn(zn)}},xn=Cn=>Cn.done?wn(Cn.value):Promise.resolve(Cn.value).then(an,Sn);xn((Et=Et.apply(ht,bt)).next())});const Gu=({id:ht,cb:bt})=>{const[Et,wn]=(0,Me.useState)("");return Me.createElement("aside",{className:"mt10"},Me.createElement(wr.Z,{defaultValue:Et,id:"writeForumsReviewId",onChange:fn=>{wn(fn)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),Me.createElement(yc.Z,null,Me.createElement(Eu.Z,{flex:"1"}),Me.createElement(Eu.Z,null,Me.createElement(ut.ZP,{type:"primary",size:"middle",onClick:()=>Sc(void 0,null,function*(){Et===""?Le.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):bt(ht,Et)})},"\u53D1\u9001"))))},Lu=({data:ht})=>{var bt;return Me.createElement("div",{className:Rl.thirdlyLevelDiscuss},Me.createElement("span",{className:"c-grey-333"},Me.createElement("span",{className:"font 14 c-light-primary"},(bt=ht==null?void 0:ht.author)==null?void 0:bt.name),"@",Me.createElement("span",{className:"font 14 c-light-primary"},ht==null?void 0:ht.parent_name),":"),Me.createElement(Ie.Z,{value:ht==null?void 0:ht.content}))},bl=({data:ht,onReplyDiscuss:bt,thirdlyReply:Et,setThirdlyReply:wn})=>{var fn,an,Sn,xn;const Cn=(0,sr.eY)();return console.log(Cn,"user"),Me.createElement("div",{className:Rl.list},Me.createElement("img",{src:ve.Z.IMG_SERVER+"/images/"+((fn=ht==null?void 0:ht.author)==null?void 0:fn.image_url)}),Me.createElement("div",{className:Rl.wrap},Me.createElement("div",{className:"font14",style:{marginBottom:6}},Me.createElement("span",{className:"c-grey-333"},(an=ht==null?void 0:ht.author)==null?void 0:an.name),(Cn==null?void 0:Cn.login)!==((Sn=ht==null?void 0:ht.author)==null?void 0:Sn.login)&&Me.createElement("span",{onClick:()=>wn(ht==null?void 0:ht.id),className:"c-grey-999 current",style:{float:"right"}},Me.createElement("i",{className:"iconfont icon-huifu3 mr3 font12"}),Me.createElement("span",null,"\u56DE\u590D"))),Me.createElement(Ie.Z,{value:ht==null?void 0:ht.content}),(xn=ht==null?void 0:ht.children)==null?void 0:xn.map(zn=>Me.createElement(Lu,{key:zn.id,data:zn})),Et===(ht==null?void 0:ht.id)&&Me.createElement("div",null,Me.createElement(Gu,{id:ht==null?void 0:ht.id,cb:bt}),Me.createElement("div",{style:{textAlign:"end",paddingTop:20},onClick:()=>wn(null),className:"c-light-primary current"},Me.createElement("i",{style:{transform:"scale(0.7)",display:"inline-block"},className:"iconfont icon-shouqi font12"}),"\u6536\u8D77\u56DE\u590D")),Me.createElement("div",{className:Rl.line})))};var xc=({data:ht,onReplyDiscuss:bt,secondReply:Et,setSecondReply:wn,thirdlyReply:fn,setThirdlyReply:an,onPlusDiscuss:Sn})=>{var xn,Cn,zn,ii;const[Zn,wi]=(0,Me.useState)(!1);return console.log(ht,"data"),Me.createElement("div",{className:Rl.discussItem},Me.createElement("div",{className:Rl.list},Me.createElement("img",{src:ve.Z.IMG_SERVER+"/images/"+((xn=ht==null?void 0:ht.author)==null?void 0:xn.image_url)}),Me.createElement("div",{className:Rl.wrap},Me.createElement("div",{className:"font14",style:{marginBottom:6}},Me.createElement("span",{className:"c-grey-333 mr30"},(Cn=ht==null?void 0:ht.author)==null?void 0:Cn.name),Me.createElement("span",{className:"c-grey-999"},ht==null?void 0:ht.time)),Me.createElement(Ie.Z,{value:ht==null?void 0:ht.content}),Me.createElement("div",{className:Rl.btns},Me.createElement("div",{onClick:()=>Sn(ht==null?void 0:ht.id),className:ht!=null&&ht.user_praise?"c-light-primary":"c-grey-999"},Me.createElement("i",{className:"iconfont icon-xiaodianzan2 mr3"}),Me.createElement("span",null,ht==null?void 0:ht.praise_count)),Me.createElement("div",{onClick:()=>{var Kn;((Kn=ht==null?void 0:ht.children)==null?void 0:Kn.length)!==0&&(wn(null),wi(!Zn))},style:{color:Zn?"#0152d9":"#999999"}},Me.createElement("i",{className:"iconfont icon-xiaopinglun2 mr3"}),Me.createElement("span",null,Zn?"\u6536\u8D77\u8BC4\u8BBA":(zn=ht==null?void 0:ht.children)==null?void 0:zn.length)),Me.createElement("div",{onClick:()=>{wi(!1),wn(Et===(ht==null?void 0:ht.id)?null:ht==null?void 0:ht.id)},style:{color:Et===(ht==null?void 0:ht.id)?"#0152d9":"#999999"}},Me.createElement("i",{className:"iconfont icon-huifu3 mr3"}),Me.createElement("span",null,Et===(ht==null?void 0:ht.id)?"\u6536\u8D77\u56DE\u590D":"\u56DE\u590D"))),Et===(ht==null?void 0:ht.id)&&Me.createElement(Gu,{id:ht==null?void 0:ht.id,cb:(Kn,gi)=>{bt(Kn,gi),wi(!0)}}),Zn&&Me.createElement("div",{className:Rl.secondLevelDiscuss},(ii=ht==null?void 0:ht.children)==null?void 0:ii.map(Kn=>Me.createElement(bl,{thirdlyReply:fn,setThirdlyReply:an,key:Kn.id,data:Kn,onReplyDiscuss:bt}))))))},lu=(ht,bt,Et)=>new Promise((wn,fn)=>{var an=Cn=>{try{xn(Et.next(Cn))}catch(zn){fn(zn)}},Sn=Cn=>{try{xn(Et.throw(Cn))}catch(zn){fn(zn)}},xn=Cn=>Cn.done?wn(Cn.value):Promise.resolve(Cn.value).then(an,Sn);xn((Et=Et.apply(ht,bt)).next())}),Uo=({identifier:ht,active:bt,onOk:Et})=>{const[wn,fn]=(0,Me.useState)(""),[an,Sn]=(0,Me.useState)(1),[xn,Cn]=(0,Me.useState)([]),[zn,ii]=(0,Me.useState)(0),[Zn,wi]=(0,Me.useState)(null),[Kn,gi]=(0,Me.useState)(null);(0,Me.useEffect)(()=>{si(1),Sn(1)},[bt]);const si=Ni=>lu(void 0,null,function*(){const ar=yield An({container_type:"QuestionSolutionArticle",container_identifier:bt,limit:5,page:Ni});ar!=null&&ar.comments&&(Cn((ar==null?void 0:ar.comments)||[]),Sn(Ni),ii(ar==null?void 0:ar.disscuss_count))}),Ii=()=>lu(void 0,null,function*(){if(wn===""){Le.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");return}const Ni=yield ki({comments:{content:wn},container_type:"QuestionSolutionArticle",container_identifier:bt});Ni!=null&&Ni.discuss&&(fn(""),si(an),Et())}),Oi=(Ni,ar,ti)=>lu(void 0,null,function*(){const ji=yield ai({container_type:"QuestionSolutionArticle",container_identifier:bt,comments:{content:ar,parent_id:Ni}});wi(null),gi(null),si(an)}),Ui=Ni=>lu(void 0,null,function*(){const ar=yield ni(Ni);si(an)}),Ai=Ni=>{Sn(Ni),si(Ni)};return Me.createElement("div",{className:Uu.discuss},Me.createElement("aside",{className:Uu.reply,style:{borderWidth:zn?1:0}},Me.createElement(wr.Z,{defaultValue:wn,id:"writeForumsReviewId",onChange:Ni=>{fn(Ni)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),Me.createElement(yc.Z,null,Me.createElement(Eu.Z,{flex:"1"}),Me.createElement(Eu.Z,null,Me.createElement(ut.ZP,{type:"primary",size:"middle",onClick:()=>Ii()},"\u53D1\u9001")))),xn==null?void 0:xn.map(Ni=>Me.createElement(xc,{secondReply:Zn,setSecondReply:wi,thirdlyReply:Kn,setThirdlyReply:gi,key:Ni.id,data:Ni,onReplyDiscuss:Oi,onPlusDiscuss:Ui})),Me.createElement(Jt.Z,{className:Uu.pagination,showTotal:Ni=>Me.createElement("span",{style:{color:"#656F87"}},"\u5171",Me.createElement("span",{className:"c-light-primary"},Ni),"\u6761\u6570\u636E"),current:an,onChange:Ai,total:zn,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5}))},ka=Ee(71839),ra=Object.defineProperty,Ds=Object.getOwnPropertySymbols,bs=Object.prototype.hasOwnProperty,ks=Object.prototype.propertyIsEnumerable,Zs=(ht,bt,Et)=>bt in ht?ra(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,Ks=(ht,bt)=>{for(var Et in bt||(bt={}))bs.call(bt,Et)&&Zs(ht,Et,bt[Et]);if(Ds)for(var Et of Ds(bt))ks.call(bt,Et)&&Zs(ht,Et,bt[Et]);return ht},Yl=(ht,bt,Et)=>new Promise((wn,fn)=>{var an=Cn=>{try{xn(Et.next(Cn))}catch(zn){fn(zn)}},Sn=Cn=>{try{xn(Et.throw(Cn))}catch(zn){fn(zn)}},xn=Cn=>Cn.done?wn(Cn.value):Promise.resolve(Cn.value).then(an,Sn);xn((Et=Et.apply(ht,bt)).next())}),Rs=({active:ht,identifier:bt,onAssist:Et,onEdit:wn,onArticlesSkip:fn,onClose:an,onOk:Sn,onDelete:xn,detailsIndex:Cn,btnShowStatus:zn})=>{var ii,Zn,wi,Kn,gi,si,Ii,Oi,Ui,Ai;const[Ni,ar]=(0,Me.useState)(!0),[ti,ji]=(0,Me.useState)({});(0,Me.useEffect)(()=>{ht&&Li()},[ht,Cn]);const Li=(Xi=!0)=>Yl(void 0,null,function*(){Xi&&ar(!0);const Pi=yield(0,ge.wO)(bt,{active:ht});(Pi==null?void 0:Pi.status)===0&&ji((Pi==null?void 0:Pi.data)||{}),ar(!1)}),bi=Xi=>Yl(void 0,null,function*(){const Pi=yield(0,ge.qe)(bt,Ks({active:ht},Xi));(Pi==null?void 0:Pi.status)===0&&(Li(!1),Sn())}),Yi=Xi=>Yl(void 0,null,function*(){(yield(0,ge.Rg)(bt,{active:Xi==null?void 0:Xi.id})).status===0&&(Li(!1),Sn())}),pi=Xi=>{he.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:null,className:"custom-modal-divider",content:"\u786E\u8BA4\u8981\u5220\u9664\u8BE5\u9898\u89E3\u5417?",onOk:()=>xn(Xi)})},lr=()=>{Li(!1),Sn()};return Me.createElement("div",{className:Eo.listDetails},Me.createElement(ua.Z,{className:"pt20 pl20 pr20",loading:Ni,active:!0,paragraph:{rows:5}},Me.createElement("div",{className:Eo.head},Me.createElement("div",{className:Eo.name},Me.createElement("div",{title:ti==null?void 0:ti.name,className:Eo.title},ti==null?void 0:ti.name),(ti==null?void 0:ti.is_authority)&&Me.createElement("div",{className:Eo.b},"\u5B98\u65B9"),(ti==null?void 0:ti.is_excellent)&&Me.createElement("div",{className:Eo.a},"\u7CBE\u9009")),Me.createElement("div",{className:Eo.tag},Me.createElement("img",{src:ve.Z.IMG_SERVER+"/images/"+(ti==null?void 0:ti.image_url)}),Me.createElement("div",{className:"c-grey-333 ml5 mr20 font14"},ti==null?void 0:ti.username),Me.createElement("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12"},"\u53D1\u5E03\u4E8E",kt()(ti==null?void 0:ti.created_at).format("YYYY-MM-DD")),Me.createElement("span",null,Me.createElement("img",{src:hi}),Me.createElement("span",null,ti==null?void 0:ti.praises_count)),Me.createElement("span",null,Me.createElement("img",{src:fr}),Me.createElement("span",null,ti==null?void 0:ti.discusses_count)),Me.createElement("span",null,Me.createElement("img",{src:co}),Me.createElement("span",null,ti==null?void 0:ti.viewed_count)),Me.createElement("div",{className:Eo.btn},((0,sr.Ny)()||(ti==null?void 0:ti.is_self))&&Me.createElement(Me.Fragment,null,Me.createElement(ut.ZP,{onClick:()=>pi(ti),type:"primary",ghost:!0},"\u5220\u9664"),Me.createElement(ut.ZP,{onClick:()=>wn(ti),type:"primary",ghost:!0},"\u7F16\u8F91")),(0,sr.Ny)()&&Me.createElement(ut.ZP,{onClick:()=>bi({is_authority:!(ti!=null&&ti.is_authority)}),type:"primary"},Me.createElement("img",{src:jr}),ti!=null&&ti.is_authority?"\u53D6\u6D88":"\u8BBE\u4E3A","\u5B98\u65B9"),(0,sr.Ny)()&&Me.createElement(ut.ZP,{onClick:()=>bi({is_excellent:!(ti!=null&&ti.is_excellent)}),type:"primary"},Me.createElement("img",{src:xl}),ti!=null&&ti.is_excellent?"\u53D6\u6D88":"\u8BBE\u4E3A","\u7CBE\u9009")))),Me.createElement("div",{className:Eo.scroll},((Zn=(ii=ti==null?void 0:ti.videos)==null?void 0:ii[0])==null?void 0:Zn.id)&&Me.createElement("div",{className:Eo.video},Me.createElement(ye.Z,{tip:"\u6B63\u5728\u8F6C\u7801\uFF0C\u8BF7\u7A0D\u7B49...",spinning:!((Kn=(wi=ti==null?void 0:ti.videos)==null?void 0:wi[0])!=null&&Kn.transcoded)},Me.createElement(ka.Z,{poster:(si=(gi=ti==null?void 0:ti.videos)==null?void 0:gi[0])==null?void 0:si.cover_url,src:((Oi=(Ii=ti==null?void 0:ti.videos)==null?void 0:Ii[0])==null?void 0:Oi.play_url)||"",videoId:(Ai=(Ui=ti==null?void 0:ti.videos)==null?void 0:Ui[0])==null?void 0:Ai.id,logWatchHistory:()=>{}}))),Me.createElement(Ie.Z,{className:Eo.html,value:(ti==null?void 0:ti.content)||""}),Me.createElement("div",{onClick:()=>Yi(ti),className:Eo.g},Me.createElement("img",{className:"mr10",src:(ti!=null&&ti.user_liker,Za)}),Me.createElement("span",null,ti==null?void 0:ti.praises_count)),Me.createElement(Uo,{onOk:lr,active:ht,identifier:bt})),Me.createElement("div",{className:Eo.btns},Me.createElement(ut.ZP,{onClick:()=>an(),type:"primary",ghost:!0},"\u5173\u95ED"),zn[0]&&Me.createElement(ut.ZP,{onClick:Xi=>fn(Xi,"prev"),style:{marginLeft:20},type:"primary"},"\u4E0A\u4E00\u9898\u89E3"),zn[1]&&Me.createElement(ut.ZP,{onClick:Xi=>fn(Xi,"next"),style:{marginLeft:20},type:"primary"},"\u4E0B\u4E00\u9898\u89E3"))))},xh=Object.defineProperty,nh=Object.getOwnPropertySymbols,wc=Object.prototype.hasOwnProperty,gr=Object.prototype.propertyIsEnumerable,bc=(ht,bt,Et)=>bt in ht?xh(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,rn=(ht,bt)=>{for(var Et in bt||(bt={}))wc.call(bt,Et)&&bc(ht,Et,bt[Et]);if(nh)for(var Et of nh(bt))gr.call(bt,Et)&&bc(ht,Et,bt[Et]);return ht};const Yn=ht=>React.createElement("svg",rn({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},ht),React.createElement("defs",null,React.createElement("path",{id:"a_svg__a",d:"M13.727 0C14.983 0 16 .895 16 2v12c0 1.105-1.017 2-2.273 2H2.273C1.017 16 0 15.105 0 14V2C0 .895 1.017 0 2.273 0h11.454ZM7.464 11H2.955c-.266 0-.513.19-.646.5s-.133.69 0 1c.133.31.38.5.646.5h4.509c.411 0 .745-.448.745-1s-.334-1-.745-1Zm4-3.5H2.955c-.411 0-.745.448-.745 1s.334 1 .745 1h8.509c.412 0 .746-.448.746-1s-.334-1-.746-1ZM3.71 2.75a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"a_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#a_svg__a"})),React.createElement("use",{fill:"#7DC1FF",fillRule:"nonzero",xlinkHref:"#a_svg__a"}),React.createElement("circle",{cx:1.5,cy:.5,r:16.5,fill:"#A3D3FF",fillRule:"nonzero",mask:"url(#a_svg__b)"}),React.createElement("ellipse",{cx:1.5,cy:-.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#a_svg__b)",rx:12.5,ry:12}),React.createElement("ellipse",{cx:-2.5,cy:-4,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#a_svg__b)",rx:12.5,ry:12})));var wh="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNMTMuNzI3IDBDMTQuOTgzIDAgMTYgLjg5NSAxNiAydjEyYzAgMS4xMDUtMS4wMTcgMi0yLjI3MyAySDIuMjczQzEuMDE3IDE2IDAgMTUuMTA1IDAgMTRWMkMwIC44OTUgMS4wMTcgMCAyLjI3MyAwaDExLjQ1NFpNNy40NjQgMTFIMi45NTVjLS4yNjYgMC0uNTEzLjE5LS42NDYuNXMtLjEzMy42OSAwIDFjLjEzMy4zMS4zOC41LjY0Ni41aDQuNTA5Yy40MTEgMCAuNzQ1LS40NDguNzQ1LTFzLS4zMzQtMS0uNzQ1LTFabTQtMy41SDIuOTU1Yy0uNDExIDAtLjc0NS40NDgtLjc0NSAxcy4zMzQgMSAuNzQ1IDFoOC41MDljLjQxMiAwIC43NDYtLjQ0OC43NDYtMXMtLjMzNC0xLS43NDYtMVpNMy43MSAyLjc1YTEuNSAxLjUgMCAxIDAgMCAzIDEuNSAxLjUgMCAwIDAgMC0zWiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzdEQzFGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9IjEuNSIgY3k9Ii41IiByPSIxNi41IiBmaWxsPSIjQTNEM0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiLz48ZWxsaXBzZSBjeD0iMS41IiBjeT0iLS41IiBmaWxsPSIjQzFFMkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48ZWxsaXBzZSBjeD0iLTIuNSIgY3k9Ii00IiBmaWxsPSIjRUVGN0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48L2c+PC9zdmc+",Qh=Ee(59477),Mu=Ee(89489),Tu=Object.defineProperty,Wu=Object.defineProperties,bh=Object.getOwnPropertyDescriptors,Cc=Object.getOwnPropertySymbols,Vs=Object.prototype.hasOwnProperty,$r=Object.prototype.propertyIsEnumerable,Da=(ht,bt,Et)=>bt in ht?Tu(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,$s=(ht,bt)=>{for(var Et in bt||(bt={}))Vs.call(bt,Et)&&Da(ht,Et,bt[Et]);if(Cc)for(var Et of Cc(bt))$r.call(bt,Et)&&Da(ht,Et,bt[Et]);return ht},Ms=(ht,bt)=>Wu(ht,bh(bt)),xo=(ht,bt,Et)=>new Promise((wn,fn)=>{var an=Cn=>{try{xn(Et.next(Cn))}catch(zn){fn(zn)}},Sn=Cn=>{try{xn(Et.throw(Cn))}catch(zn){fn(zn)}},xn=Cn=>Cn.done?wn(Cn.value):Promise.resolve(Cn.value).then(an,Sn);xn((Et=Et.apply(ht,bt)).next())}),dl=({identifier:ht,tabStatus:bt,setFilterListTotal:Et,setListStatus:wn})=>{const fn={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null};let[an,Sn]=(0,Me.useState)($s({},fn));const[xn,Cn]=(0,Me.useState)(!1),[zn,ii]=(0,Me.useState)(0),[Zn,wi]=(0,Me.useState)(1),[Kn,gi]=(0,Me.useState)(null),[si,Ii]=(0,Me.useState)([]),[Oi,Ui]=(0,Me.useState)([!0,!0]),[Ai,Ni]=(0,Me.useState)(0),ar=(0,Me.useRef)(null);(0,Me.useEffect)(()=>{Gi()},[bt]),(0,Me.useEffect)(()=>{ti()},[Kn]),(0,Me.useEffect)(()=>{Li($s({},fn)),Gi()},[ht]),(0,Me.useEffect)(()=>(window.addEventListener("resize",ji),wn(Ai),()=>{window.removeEventListener("resize",ji)}),[Ai]);const ti=()=>xo(void 0,null,function*(){if(!Kn){Ui([!0,!0]);return}const Nr=[!0,!0],Xr=si==null?void 0:si.findIndex(rs=>rs.id===Kn);Xr===0&&an.page===1&&(Nr[0]=!1),(an.page-1)*an.limit+(Xr+1)===an.total&&(Nr[1]=!1),Ui(Nr)}),ji=()=>{var Nr;if(Ai){const Xr=window.innerWidth-((Nr=ar.current)==null?void 0:Nr.clientWidth);ii(Xr)}},Li=Nr=>xo(void 0,null,function*(){var Xr,rs,Zr;Cn(!0);const Er=yield(0,ge.WH)(ht,Nr);return(Er==null?void 0:Er.status)===0&&(Ii(((Xr=Er==null?void 0:Er.data)==null?void 0:Xr.articles)||[]),Sn(Ms($s({},Nr),{total:(rs=Er==null?void 0:Er.data)==null?void 0:rs.articles_count})),Et((Zr=Er==null?void 0:Er.data)==null?void 0:Zr.articles_count)),Cn(!1),Er}),bi=()=>{(an==null?void 0:an.sort_direction)===null?an.sort_direction="asc":(an==null?void 0:an.sort_direction)==="asc"?an.sort_direction="desc":(an==null?void 0:an.sort_direction)==="desc"&&(an.sort_direction=null),an.page=1,Gi(),Sn($s({},an)),Li(an)},Yi=()=>{an.page=1,an.search=an==null?void 0:an.save_search,Gi(),Sn($s({},an)),Li(an)},pi=()=>{var Nr;const Xr=document.getElementsByClassName("btn-resize");Xr[0].style.visibility="hidden";const rs=window.innerWidth-((Nr=ar.current)==null?void 0:Nr.clientWidth);ii(rs)},lr=()=>{pi(),Ni(1)},Xi=Nr=>{pi(),gi(Nr==null?void 0:Nr.id),Ni(3)},Pi=Nr=>{pi(),gi(Nr==null?void 0:Nr.id),Ni(2)},Gi=()=>{const Nr=document.getElementsByClassName("btn-resize");Nr[0].style.visibility="visible",ii(0),Ni(0),gi(null)},vr=Nr=>{Ni(3),gi(Nr),an.page=1,Sn($s({},an)),Li(an)},er=Nr=>{Ni(3),gi(Nr),Sn($s({},an)),Li(an)},So=Nr=>{Sn($s({},an)),Li(an)},Co=Nr=>xo(void 0,null,function*(){(yield(0,ge.Rg)(ht,{active:Nr==null?void 0:Nr.id})).status===0&&(Li(an),wi(Zn+1))}),is=Nr=>xo(void 0,null,function*(){(yield(0,ge.rL)(ht,{active:Nr==null?void 0:Nr.id})).status===0&&(Li(an),wi(Zn+1))}),so=Nr=>xo(void 0,null,function*(){(yield(0,ge.de)(ht,{active:Nr==null?void 0:Nr.id})).status===0&&(Gi(),Li(an))}),kr=Nr=>{an.page=Nr,Sn($s({},an)),Li(an)},No=(Nr,Xr)=>xo(void 0,null,function*(){var rs,Zr,Er,Jr;const br=si==null?void 0:si.findIndex(ao=>ao.id===Kn);if(console.log(br,Xr,22),Xr==="prev"){if(br===void 0){Le.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(br===0){if(an.page===1){Le.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(an.page!==1){an.page=an.page-1,Sn($s({},an));const ao=yield Li(an);if((ao==null?void 0:ao.status)===0){const Lr=(Er=ao==null?void 0:ao.data)==null?void 0:Er.articles[((Zr=(rs=ao==null?void 0:ao.data)==null?void 0:rs.articles)==null?void 0:Zr.length)-1];gi(Lr==null?void 0:Lr.id),console.log(Nr.target,555)}}}else{const ao=si[br-1];gi(ao==null?void 0:ao.id)}}if(Xr==="next"){if(br===void 0){Le.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if((an.page-1)*an.limit+(br+1)===an.total){Le.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(br+1===an.limit){an.page=an.page+1,Sn($s({},an));const ao=yield Li(an);if((ao==null?void 0:ao.status)===0){const Lr=(Jr=ao==null?void 0:ao.data)==null?void 0:Jr.articles[0];gi(Lr==null?void 0:Lr.id)}}else{const ao=si[br+1];gi(ao==null?void 0:ao.id)}}});return Me.createElement("div",{className:_t.wrap,ref:ar},Me.createElement("div",{className:_t.head},Me.createElement("div",{className:_t.sort,onClick:bi},Me.createElement("span",null,"\u6700\u65B0"),Me.createElement("aside",null,Me.createElement(Qh.Z,{style:{color:(an==null?void 0:an.sort_direction)==="asc"?"#0152d9":"#bfbfbf"}}),Me.createElement(Mu.Z,{style:{color:(an==null?void 0:an.sort_direction)==="desc"?"#0152d9":"#bfbfbf"}}))),Me.createElement(lt.default.Search,{value:an.save_search,className:_t["oj-width-input"],placeholder:"\u641C\u7D22\u9898\u89E3",onChange:Nr=>{an.save_search=Nr.target.value,Sn($s({},an))},onSearch:Yi}),Me.createElement("div",{onClick:lr,className:_t.btn},Me.createElement("img",{src:wh}),"\u5199\u9898\u89E3")),Me.createElement("div",{className:_t.listWarp},Me.createElement(ye.Z,{spinning:xn,className:"mt20"},si==null?void 0:si.map((Nr,Xr)=>{let rs=!0;return Xr+1===si.length&&Xr!==0&&(rs=!1),Me.createElement(Hi,{active:Kn,key:Nr.id,data:Nr,showLine:rs,onClick:Xi,onAssist:Co,onHide:is})}),(si==null?void 0:si.length)===0&&Me.createElement(xt.Z,{customText:"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"}))),Me.createElement(Jt.Z,{className:_t.pagination,showTotal:Nr=>Me.createElement("span",{style:{color:"#656F87"}},"\u5171",Me.createElement("span",{className:"c-light-primary"},Nr),"\u6761\u6570\u636E"),total:an.total,showSizeChanger:!1,current:an==null?void 0:an.page,onChange:kr,hideOnSinglePage:!0,showQuickJumper:!0}),Ai>0&&Me.createElement("div",{className:_t.fixedRight,style:{width:zn}},Ai===1&&Me.createElement(Ao,{identifier:ht,onClose:Gi,onOk:vr}),Ai===2&&Me.createElement(Ao,{active:Kn,identifier:ht,onClose:Gi,onOk:er}),Ai===3&&Me.createElement(Rs,{btnShowStatus:Oi,onArticlesSkip:No,detailsIndex:Zn,active:Kn,identifier:ht,onClose:Gi,onOk:So,onEdit:Pi,onAssist:Co,onDelete:so})))},cs={flex_box_center:"flex_box_center___BbEkt",flex_space_between:"flex_space_between___v3cDl",flex_box_vertical_center:"flex_box_vertical_center___wUFLn",flex_box_center_end:"flex_box_center_end___Tdr08",flex_box_column:"flex_box_column___fYHlj",wrap:"wrap___UAZFM",head:"head___Nl6hk",title:"title___Ir573",content:"content___xUewa",list:"list___oi2ig",footer:"footer___V3bwQ"},Cl=Object.defineProperty,Ea=Object.defineProperties,Pc=Object.getOwnPropertyDescriptors,Go=Object.getOwnPropertySymbols,Ka=Object.prototype.hasOwnProperty,Vo=Object.prototype.propertyIsEnumerable,vs=(ht,bt,Et)=>bt in ht?Cl(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,ds=(ht,bt)=>{for(var Et in bt||(bt={}))Ka.call(bt,Et)&&vs(ht,Et,bt[Et]);if(Go)for(var Et of Go(bt))Vo.call(bt,Et)&&vs(ht,Et,bt[Et]);return ht},Bs=(ht,bt)=>Ea(ht,Pc(bt)),Fo=(ht,bt,Et)=>new Promise((wn,fn)=>{var an=Cn=>{try{xn(Et.next(Cn))}catch(zn){fn(zn)}},Sn=Cn=>{try{xn(Et.throw(Cn))}catch(zn){fn(zn)}},xn=Cn=>Cn.done?wn(Cn.value):Promise.resolve(Cn.value).then(an,Sn);xn((Et=Et.apply(ht,bt)).next())}),Wr=({visible:ht,onVisible:bt,value:Et,onChange:wn,setIndex:fn})=>{var an;const Sn={page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null};let[xn,Cn]=(0,Me.useState)(Sn);const[zn,ii]=(0,Me.useState)([]),[Zn,wi]=(0,Me.useState)([]),[Kn,gi]=(0,Me.useState)(!1),si=(0,Me.useRef)([]),Ii=(0,Me.useRef)(null),Oi=(0,ke.useParams)();(0,Me.useEffect)(()=>(Oi!=null&&Oi.id&&(Ii.current=setInterval(()=>{Ui(30)},3e4)),()=>{clearInterval(Ii.current)}),[]);const Ui=pi=>Fo(void 0,null,function*(){const lr=yield(0,ge.uc)(Oi==null?void 0:Oi.id,{practice_time:pi})});(0,Me.useEffect)(()=>{Li(xn),ti()},[]),(0,Me.useEffect)(()=>(window.addEventListener("click",Ni),()=>{window.removeEventListener("click",Ni)}),[Oi==null?void 0:Oi.save_identifier,ht]),(0,Me.useEffect)(()=>{const pi=si.current.findIndex(vr=>vr.identifier===(Oi==null?void 0:Oi.save_identifier)),lr=si.current[pi-1],Xi=si.current[pi+1],Pi=document.getElementById("oj-prev"),Gi=document.getElementById("oj-next");lr?Pi.style.display="block":Pi.style.display="none",Xi?Gi.style.display="block":Gi.style.display="none"},[Oi==null?void 0:Oi.save_identifier,si.current]);const Ai=(pi,lr)=>{if(pi.id===lr)return pi;for(let Xi=0,Pi=pi;Pi=Pi.parentNode;Xi++){if(Pi.id===lr)return Pi;if(Pi==document.documentElement)return!1}},Ni=pi=>Fo(void 0,null,function*(){!Ai(pi.target,"oj-drawer")&&ht&&bt(!1);const lr=si.current.findIndex(Gi=>Gi.identifier===(Oi==null?void 0:Oi.save_identifier)),Xi=si.current[lr-1],Pi=si.current[lr+1];if(pi.target.id==="oj-prev"){if(!Xi||lr===-1){Le.ZP.warning("\u4E0A\u4E00\u9898\u4E0D\u5B58\u5728");return}pi.target.style.pointerEvents="none",pi.target.style.cursor="not-allowed",yield bi(Xi==null?void 0:Xi.identifier),fn("0"),setTimeout(()=>{pi.target.style.pointerEvents="auto",pi.target.style.cursor="pointer"},400)}if(pi.target.id==="oj-next"||pi.target.id==="oj-modal-next"){if(!Pi||lr===-1){Le.ZP.warning("\u4E0B\u4E00\u9898\u4E0D\u5B58\u5728");return}pi.target.style.pointerEvents="none",pi.target.style.cursor="not-allowed",yield bi(Pi==null?void 0:Pi.identifier),fn("0"),setTimeout(()=>{pi.target.style.pointerEvents="auto",pi.target.style.cursor="pointer"},400)}});(0,Me.useEffect)(()=>{wn(Oi==null?void 0:Oi.save_identifier);const pi=Zn.findIndex(lr=>lr.some(Xi=>Xi.identifier===(Oi==null?void 0:Oi.save_identifier)));Cn(pi===-1?Bs(ds({},xn),{page:1}):Bs(ds({},xn),{page:pi+1}))},[Oi==null?void 0:Oi.save_identifier,Zn]);const ar=pi=>{xn.page=1,xn.tag_discipline_id=pi,Cn(ds({},xn)),Li(xn)},ti=()=>Fo(void 0,null,function*(){const pi=yield(0,Un.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});ii(pi.tag_disciplines||[])}),ji=pi=>{xn.page=1,xn.difficulty=typeof pi=="number"?pi:null,Cn(ds({},xn)),Li(xn)},Li=pi=>Fo(void 0,null,function*(){var lr,Xi;gi(!0);const Pi=yield(0,ge.KC)(pi);if(Pi!=null&&Pi.practices_list){for(var Gi=(lr=Pi==null?void 0:Pi.practices_list)==null?void 0:lr.length,vr=[],er=0;er<Gi;er+=xn==null?void 0:xn.per_page)vr.push((Xi=Pi==null?void 0:Pi.practices_list)==null?void 0:Xi.slice(er,er+(xn==null?void 0:xn.per_page)));Cn(Bs(ds({},xn),{total:Pi==null?void 0:Pi.practices_count})),si.current=(Pi==null?void 0:Pi.practices_list)||[],wi(vr)}gi(!1)}),bi=(pi,lr)=>Fo(void 0,null,function*(){const Xi=yield(0,Un.ZP)(`/api/practices/${pi}/start`,{method:"get"});(Xi==null?void 0:Xi.status)===0&&ke.history.push(`/problems/${Xi==null?void 0:Xi.identifier}/oj/${pi}`)}),Yi=pi=>{xn.page=pi,Cn(ds({},xn))};return Me.createElement("div",{className:cs.wrap,id:"oj-drawer",style:{left:ht?0:-700}},Me.createElement("div",{className:cs.head},Me.createElement("div",{className:cs.title},"\u9898\u76EE\u5217\u8868"),Me.createElement(lt.default.Search,{value:xn==null?void 0:xn.save_search,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22",style:{width:180,marginLeft:"auto",marginRight:10},onChange:pi=>{xn.save_search=pi.target.value,Cn(ds({},xn))},onSearch:()=>{xn.page=1,xn.search=xn.save_search,Cn(ds({},xn)),Li(xn)}}),Me.createElement(xe.default,{value:xn==null?void 0:xn.tag_discipline_id,style:{width:210},mode:"multiple",placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,showArrow:!0,getPopupContainer:pi=>pi.parentNode,maxTagTextLength:2,maxTagCount:2,onChange:ar},zn.map(pi=>Me.createElement(xe.default.Option,{key:pi.id,value:pi.id},pi.name))),Me.createElement(xe.default,{style:{width:70,marginLeft:10},allowClear:!0,placeholder:"\u96BE\u5EA6",getPopupContainer:pi=>pi.parentNode,value:xn==null?void 0:xn.difficulty,onChange:ji},Me.createElement(xe.default.Option,{value:1},"\u7B80\u5355"),Me.createElement(xe.default.Option,{value:2},"\u9002\u4E2D"),Me.createElement(xe.default.Option,{value:3},"\u56F0\u96BE"))),Me.createElement("div",{className:cs.content},Me.createElement(ye.Z,{spinning:Kn},(an=Zn==null?void 0:Zn[xn.page-1])==null?void 0:an.map(pi=>Me.createElement("div",{key:pi.identifier,className:cs.list,onClick:lr=>bi(pi.identifier,lr)},Me.createElement("i",{style:{visibility:Et===pi.identifier?"visible":"hidden"},className:"iconfont icon-wancheng1 c-green-29b"}),Me.createElement("span",{style:{fontWeight:Et===pi.identifier?"bold":400,color:Et===pi.identifier?"#ffffff":"#bac4cd"},title:pi==null?void 0:pi.name},pi.name),(pi==null?void 0:pi.difficulty)===1&&Me.createElement("b",{style:{color:"#2FA34F"}},"\u7B80\u5355"),(pi==null?void 0:pi.difficulty)===2&&Me.createElement("b",{style:{color:"#0152d9"}},"\u9002\u4E2D"),(pi==null?void 0:pi.difficulty)===3&&Me.createElement("b",{style:{color:"#FA6400"}},"\u56F0\u96BE"))))),Me.createElement("div",{className:cs.footer},Me.createElement(Jt.Z,{showTotal:pi=>Me.createElement("span",{style:{color:"#656F87"}},"\u5171",Me.createElement("span",{className:"c-light-primary"},pi),"\u6761\u6570\u636E"),total:xn.total,pageSize:xn==null?void 0:xn.per_page,current:xn==null?void 0:xn.page,showSizeChanger:!1,onChange:Yi,showQuickJumper:!0,hideOnSinglePage:!0})))},Ad=({hack:ht,onTriggerPraise:bt,topicId:Et,page:wn,onPageChange:fn,user:an,submitRecords:Sn,submitting:xn,submitResult:Cn})=>{const[zn]=(0,ke.useSearchParams)(),ii=(0,ke.useLocation)(),[Zn,wi]=(0,Me.useState)(zn.get("tab")||"0"),[Kn,gi]=(0,Me.useState)(0),[si,Ii]=(0,Me.useState)(0),[Oi,Ui]=(0,Me.useState)(0),[Ai,Ni]=(0,Me.useState)(),[ar,ti]=(0,Me.useState)(!1);function ji(bi){const Yi=bi.target.id;if(Zn==="3"&&Yi!==Zn&&(si===1||si===2)){he.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:()=>{wi(Yi)}});return}wi(Yi)}(0,Me.useEffect)(()=>Ne.Z.subscribe("to-commit-info",()=>{wi("1")}),[]);function Li(){wi("2")}return Me.createElement("div",{className:Ft["left-panel"]},Me.createElement("ul",{className:`${Ft["s-navs"]} ${Ft["bg-white"]} ${Ft.b1}`},Me.createElement("li",{className:"mr40 current"},Me.createElement("img",{onClick:()=>ti(!0),src:gn})),Me.createElement("li",{className:Ft["oj-mr"]},Me.createElement("a",{className:Zn==="0"?Ft.active:"",id:"0",onClick:ji},"\u4EFB\u52A1\u63CF\u8FF0")),Me.createElement("li",{className:Ft["oj-mr"]},Me.createElement("a",{className:Zn==="3"?Ft.active:"",id:"3",onClick:ji},"\u9898\u89E3",Oi?`(${Oi})`:"")),Me.createElement("li",{className:Ft["oj-mr"]},Me.createElement("a",{className:Zn==="2"?Ft.active:"",id:"2",onClick:ji},"\u8BC4\u8BBA",Kn?`(${Kn})`:"")),Me.createElement("li",null,Me.createElement("a",{className:Zn==="1"?Ft.active:"",id:"1",onClick:ji},"\u63D0\u4EA4\u8BB0\u5F55"))),Me.createElement("div",{className:`${Ft["tab-panel-body"]} ${Zn==="0"?"":"hide"}`,style:{padding:"0 0 0 16px"}},Me.createElement(be,{hack:ht,onTriggerPraise:bt,toDiscuss:Li})),Me.createElement("div",{className:`${Ft["tab-panel-body"]} ${Zn==="1"?"":"hide"}`},Sn!=null&&Sn.records_count?Me.createElement(Bt,{page:wn,onPageChange:fn,topicId:Et,submitting:xn,submitRecords:Sn,submitResult:Cn}):Me.createElement(xt.Z,null)),Me.createElement("div",{className:`${Ft["tab-panel-body"]} ${Zn==="2"?"":"hide"}`,style:{padding:0}},Me.createElement(Tt,{setDiscussTotal:gi,user:an,identifier:ht.identifier,hack:ht,onTriggerPraise:bt})),Me.createElement("div",{className:`${Ft["tab-panel-body"]} ${Zn==="3"?"":"hide"}`,style:{padding:0}},Me.createElement(dl,{setListStatus:Ii,setFilterListTotal:Ui,tabStatus:Zn,identifier:ht.identifier})),Me.createElement(Wr,{visible:ar,setIndex:wi,onVisible:bi=>ti(bi),value:Ai,onChange:bi=>Ni(bi)}))},Wo=Ee(19105),Nd=Ee(62522),ih=Ee(39775),rh=Ee(93450),Od=Ee(89392),Ch=Ee.n(Od),ic=Ee(56102),ro=Ee(59301),ns=Object.defineProperty,ku=Object.defineProperties,qh=Object.getOwnPropertyDescriptors,Au=Object.getOwnPropertySymbols,ed=Object.prototype.hasOwnProperty,uu=Object.prototype.propertyIsEnumerable,Fl=(ht,bt,Et)=>bt in ht?ns(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,ps=(ht,bt)=>{for(var Et in bt||(bt={}))ed.call(bt,Et)&&Fl(ht,Et,bt[Et]);if(Au)for(var Et of Au(bt))uu.call(bt,Et)&&Fl(ht,Et,bt[Et]);return ht},Fs=(ht,bt)=>ku(ht,qh(bt)),rc=(ht,bt)=>{var Et={};for(var wn in ht)ed.call(ht,wn)&&bt.indexOf(wn)<0&&(Et[wn]=ht[wn]);if(ht!=null&&Au)for(var wn of Au(ht))bt.indexOf(wn)<0&&uu.call(ht,wn)&&(Et[wn]=ht[wn]);return Et},el=(ht,bt,Et)=>new Promise((wn,fn)=>{var an=Cn=>{try{xn(Et.next(Cn))}catch(zn){fn(zn)}},Sn=Cn=>{try{xn(Et.throw(Cn))}catch(zn){fn(zn)}},xn=Cn=>Cn.done?wn(Cn.value):Promise.resolve(Cn.value).then(an,Sn);xn((Et=Et.apply(ht,bt)).next())});const{Countdown:Id}=Ce.default,td={Java:"java",C:"c",Python:"py","C++":"c"};var Dd=(ht=>(ht[ht.SET_LOADING=0]="SET_LOADING",ht[ht.GET_DATA=1]="GET_DATA",ht[ht.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",ht[ht.SET_DATA=3]="SET_DATA",ht[ht.SET_DEBUGING=4]="SET_DEBUGING",ht[ht.SET_SUBMITING=5]="SET_SUBMITING",ht[ht.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",ht[ht.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",ht[ht.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",ht[ht.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",ht[ht.SET_PAGE=10]="SET_PAGE",ht[ht.GET_LANGUAGE=11]="GET_LANGUAGE",ht[ht.GET_DRAWER=12]="GET_DRAWER",ht))(Dd||{});function Oa(){return new Date().getTime()}const oc={loading:!0,data:void 0,showNote:!1,debugResult:void 0,submitResult:void 0,debuging:!1,submitting:!1,submitRecords:void 0,submitRecordPage:1,executingMessage:"",languageValue:"",languageList:[],drawerData:[]};function gf(ht,bt){switch(bt.type){case 1:return ps(ps({},ht),bt.payload);case 3:return Fs(ps({},ht),{data:bt.payload});case 0:return Fs(ps({},ht),{loading:bt.payload});case 11:return Fs(ps({},ht),{languageList:bt.payload});case 12:return Fs(ps({},ht),{drawerData:bt.payload});case 9:return Fs(ps({},ht),{showNote:bt.payload});case 4:return Fs(ps({},ht),{debuging:bt.payload});case 5:return Fs(ps({},ht),{submitting:bt.payload});case 2:return Fs(ps({},ht),{submitRecords:bt.payload});case 10:return Fs(ps({},ht),{submitRecordPage:bt.payload});case 6:return Fs(ps({},ht),{executingMessage:bt.payload});case 7:return ps(ps({},ht),bt.payload);case 8:return ps(ps({},ht),bt.payload);default:throw new Error}}var jt=({children:ht})=>{var bt,Et,wn,fn;const[an,Sn]=(0,Me.useReducer)(gf,oc),{id:xn}=(0,ke.useParams)(),Cn=(0,ke.useLocation)(),[zn]=(0,ke.useSearchParams)(),{languageValue:ii,languageList:Zn,loading:wi,data:Kn,debugResult:gi,submitResult:si,submitRecords:Ii,submitRecordPage:Oi,showNote:Ui,debuging:Ai,submitting:Ni,executingMessage:ar}=an,[ti,ji]=(0,Me.useState)("#FFF"),[Li,bi]=(0,Me.useState)(null),[Yi,pi]=(0,Me.useState)({}),[lr,Xi]=(0,Me.useState)(!1),Pi=(0,Me.useRef)(null),Gi=(0,Me.useRef)(null),vr=Kn==null?void 0:Kn.user,er=Kn==null?void 0:Kn.hack;(0,Me.useEffect)(()=>((0,ke.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,ke.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,ke.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,ke.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,Me.useEffect)(()=>{setTimeout(()=>{document.title="\u5728\u7EBF\u5237\u9898"},400)}),(0,Me.useEffect)(()=>{var Qr;if(lr){const Io=document.getElementById("oj-next"),Cs=document.getElementById("oj-modal-next");((Qr=Io==null?void 0:Io.style)==null?void 0:Qr.display)==="none"?Cs.style.display="none":Cs.style.display="block"}},[lr]),(0,Me.useEffect)(()=>{function Qr(){return el(this,null,function*(){var Io,Cs,Lo;const Jo=yield(0,ge.fu)(xn);if(Jo.status===401)document.location.href="/user/login";else{Jo.hack=Jo.practice,Jo.hack.code=yt.Base64.decode((Io=Jo==null?void 0:Jo.hack)==null?void 0:Io.code);const Ss=`${vr==null?void 0:vr.login}-language`;localStorage.getItem(Ss)&&(Jo.hack.language=localStorage.getItem(Ss)),Gi.current=Ch().cloneDeep(Jo),Gi.current.language=(Cs=Jo==null?void 0:Jo.hack)==null?void 0:Cs.language,Sn({type:1,payload:{loading:!1,data:Jo}}),Sn({type:8,payload:{languageValue:(Lo=Jo==null?void 0:Jo.hack)==null?void 0:Lo.language}})}})}xn&&Qr()},[xn]),(0,Me.useEffect)(()=>{Sn({type:8,payload:{debugResult:void 0}}),is(),Xi(!1)},[xn]),(0,Me.useEffect)(()=>{clearTimeout(Pi.current)},[xn]),(0,Me.useEffect)(()=>{Co()},[xn,Oi]);const So=()=>{window.parent.postMessage("backExercise","*")};function Co(){return el(this,null,function*(){try{const Qr=yield(0,ge.zO)(xn,{limit:15,page:Oi});Sn({type:2,payload:Qr})}catch(Qr){console.log(Qr)}})}function is(){return el(this,null,function*(){try{const Qr=yield(0,ge.dd)(xn);Sn({type:11,payload:Qr==null?void 0:Qr.data})}catch(Qr){console.log(Qr)}})}function so(Qr){Sn({type:10,payload:Qr})}function kr(Qr){return el(this,null,function*(){var Io,Cs,Lo;const Jo=((Lo=(Cs=(Io=window==null?void 0:window.location)==null?void 0:Io.pathname)==null?void 0:Cs.split("/"))==null?void 0:Lo[2])||xn;return yield(0,ge.n4)(Jo,Qr||{code:yt.Base64.encode(er.code),language:ii})})}function No(){return el(this,null,function*(){var Qr;if(!er.code||((Qr=er.code)==null?void 0:Qr.trim())===""){Le.ZP.warning({key:"emptyContent",content:"\u4EE3\u7801\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7F16\u5199\u4EE3\u7801\u540E\uFF0C\u518D\u8FDB\u884C\u8BC4\u6D4B\uFF01"});return}if(!Ni){Sn({type:5,payload:!0});try{if(Ne.Z.publish("to-commit-info"),(yield kr()).status===0){let Pl=function(){return el(this,null,function*(){const{status:Qo,data:qo}=yield(0,ge.rX)(xn,"submit"),Ts=Oa()-Js>(Jo*Ss+3)*1e3;if(Qo!==0&&!Ts&&setTimeout(Pl,1e3),Ts){he.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),Sn({type:5,payload:!1});return}if(Qo===0){qo.status===2&&he.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"});const ma=yield(0,ge.zO)(xn,{limit:15,page:Oi});Sn({type:8,payload:Fs(ps({},an),{submitResult:qo,submitting:!1,submitRecords:ma})}),(qo==null?void 0:qo.status)===0&&Xi(!0)}})},Cs={};if((yield(0,ge.bM)(xn,Cs)).status===-1&&zn.get("exercisesId")){window.parent.location.href=`/classrooms/${zn.get("coursesId")}/exercise/${zn.get("exercisesId")}/detail`;return}const{time_limit:Jo,test_case_size:Ss}=er,Js=Oa();Pl()}}catch(Io){Sn({type:5,payload:!1})}}})}function Nr(){return el(this,null,function*(){var Qr;if(!er.code||((Qr=er.code)==null?void 0:Qr.trim())===""){Le.ZP.warning({key:"emptyContent",content:"\u4EE3\u7801\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7F16\u5199\u4EE3\u7801\u540E\uFF0C\u518D\u8FDB\u884C\u8BC4\u6D4B\uFF01"});return}an.debuging=!0,Sn({type:4,payload:!0});try{if((yield kr()).status===0){let Js=function(){return el(this,null,function*(){const{status:Pl,message:Qo,data:qo}=yield(0,ge.rX)(xn,"debug"),Ts=Oa()-Ss>(Cs+3)*1e3;if(Pl!==0&&!Ts&&(Sn({type:6,payload:Qo}),setTimeout(Js,1e3)),Ts){he.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Sn({type:4,payload:!1});return}Pl===0&&(Sn({type:4,payload:!1}),qo.status===2&&he.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Sn({type:7,payload:Fs(ps({},an),{debugResult:qo,debuging:!1})}))})};const{time_limit:Cs}=er;let Lo={input:encodeURIComponent(Kn.test_case.input)};if((yield(0,ge.MU)(xn,Lo)).status===-1&&zn.get("exercisesId")){window.parent.location.href=`/classrooms/${zn.get("coursesId")}/exercise/${zn.get("exercisesId")}/detail`;return}const Ss=Oa();Js()}else Sn({type:4,payload:!1})}catch(Io){console.log(Io)}finally{}})}function Xr(Qr){var Io;clearTimeout(Pi.current),Pi.current=setTimeout(()=>{var Cs;kr({code:yt.Base64.encode(Qr),language:(Cs=Gi==null?void 0:Gi.current)==null?void 0:Cs.language})},2e3),Sn({type:3,payload:Fs(ps({},Gi==null?void 0:Gi.current),{hack:Fs(ps({},(Io=Gi==null?void 0:Gi.current)==null?void 0:Io.hack),{code:Qr})})})}function rs(Qr){let Io=Qr.target.value;Sn({type:3,payload:Fs(ps({},Kn),{test_case:{input:Io}})})}const Zr=Qr=>el(void 0,null,function*(){var Io;if(Sn({type:0,payload:!0}),(yield kr()).status===0){Sn({type:8,payload:{languageValue:Qr}}),Gi.current.language=Qr;const Lo=`${vr==null?void 0:vr.login}-language`;localStorage.setItem(Lo,Qr);const Jo=yield(0,ge.dd)(xn);if(Jo.status===0){const Ss=(Io=Jo==null?void 0:Jo.data)==null?void 0:Io.find(Js=>Js.language===Qr);Xr(yt.Base64.decode(Ss.code))}}setTimeout(()=>{Sn({type:0,payload:!1})},300)});function Er(){return el(this,null,function*(){try{const Qr=yield(0,ge.H7)(xn,{language:ii});Qr.status===401?ke.history.replace("/login",{from:Cn.pathname}):(Xr(yt.Base64.decode(Qr.code)),is())}catch(Qr){console.log(Qr)}})}function Jr(){he.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:ro.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",ro.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk(){return el(this,null,function*(){const Qr=yield(0,ge.fi)(xn,{language:ii});Qr.status===401?ke.history.replace("/login",{from:Cn.pathname}):Xr(yt.Base64.decode(Qr.code))})}})}function br(){Sn({type:9,payload:!0})}function ao(){Sn({type:9,payload:!1})}function Lr(Qr){return el(this,null,function*(){yield(0,ge.MK)(xn,Qr),Sn({type:1,payload:{showNote:!1,data:Fs(ps({},Kn),{hack:Fs(ps({},er),{notes:Qr.notes})})}})})}const ho={input:(bt=Kn==null?void 0:Kn.test_case)==null?void 0:bt.input,is_file:(Et=Kn==null?void 0:Kn.test_case)==null?void 0:Et.is_file,language:((wn=Gi.current)==null?void 0:wn.language)||(er==null?void 0:er.language),code:er==null?void 0:er.code,title:"main."+td[er==null?void 0:er.language],modify_code:er==null?void 0:er.modify_code,notes:er==null?void 0:er.notes,debugResult:gi,debuging:Ai,submitting:Ni,executingMessage:ar,id:xn,languageValue:ii,languageList:Zn,onChangeLanguage:Zr,onCancelNote:ao,onAddNote:Lr,showNote:Ui,onShowNote:br,onSubmitCode:No,onChangeCode:Xr,onChangeInput:rs,onDebugCode:Nr,onResetCode:Er,onSyncCode:Jr,onUpdateCode:kr};function Zo(){return el(this,null,function*(){const{praise_count:Qr}=yield(0,ge.vl)(er.id,{container_type:"Hack",type:1});let Io=Fs(ps({},Kn),{hack:Fs(ps({},er),{praises_count:Qr,user_praise:!er.user_praise})});Sn({type:3,payload:Io})})}const Ko={topicId:xn,submitResult:si,submitRecords:Ii,submitting:Ni,page:Oi,onPageChange:so,hack:er,user:Kn==null?void 0:Kn.user,onTriggerPraise:Zo};return console.log(Kn,Gi==null?void 0:Gi.current,"data--------"),ro.createElement(ro.Fragment,null,ro.createElement(ye.Z,{className:"oj-custom-large-spin",size:"large",spinning:wi},Kn?ro.createElement("div",{className:"oj-custom-warp"},ro.createElement("header",{className:st.Z.header,style:{minWidth:1200}},ro.createElement("div",null,ro.createElement("img",{src:`${ve.Z.IMG_SERVER}/images/${vr.image_url}`,alt:"user",width:30}),ro.createElement("span",null,vr.name)),ro.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},ro.createElement("div",null,er.name),ro.createElement(Wo.Z,{onChange:Qr=>{},className:"font12 c-grey-999"})),ro.createElement(ic.CopyToClipboard,{text:`${(fn=window.location)==null?void 0:fn.origin}/problems/${er.identifier}/share`,onCopy:()=>Le.ZP.success("\u590D\u5236\u9898\u76EE\u94FE\u63A5\u6210\u529F")},ro.createElement("span",{className:st.Z.btn_back,style:{marginRight:10,cursor:"pointer"}}," ",ro.createElement("i",{className:"iconfont icon-fenxiang1 font14 mr5"}),"\u5206\u4EAB\u9898\u76EE")),er.edit_privilege?ro.createElement(ke.Link,{className:st.Z.btn_back,to:`/problems/${er.identifier}/ojedit`,style:{marginRight:10}}," ",ro.createElement(me.Z,null)," \u7F16\u8F91"):null,ro.createElement(ke.Link,{className:st.Z.btn_back,onClick:()=>{},to:"/problems"}," ",ro.createElement(Be.Z,null),"\u9000\u51FA")),ro.createElement(le.Z,{hideResize:!0,className:"my-problems oj-problems",leftChild:ro.createElement(Ad,ps({},Ko)),rightChild:ro.createElement(cn,ps({},ho))})):null),ro.createElement(he.default,{centered:!0,closable:!1,width:680,footer:null,open:lr,className:"oj-modal"},ro.createElement("section",{className:"oj-modal-content"},ro.createElement("div",{className:"oj-modal-head"},ro.createElement("img",{src:Nd,alt:""}),ro.createElement("i",{onClick:()=>Xi(!1),className:"iconfont icon-guanbi1"})),ro.createElement("aside",null,ro.createElement("img",{className:"mr30",src:rh.Z}),"\u8FD0\u884C\u65F6\u95F4:\xA0",ro.createElement("span",{style:{color:"#75d6ba",marginRight:100}},si==null?void 0:si.execute_time,"s"),"\u4F18\u4E8E",ro.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(si==null?void 0:si.time_better_than)||100,"%"),"\u7684\u7528\u6237"),ro.createElement("aside",{className:"mb50"},ro.createElement("img",{src:ih.Z,className:"mr30"}),ro.createElement("span",{className:"oj-modal-tt"},ro.createElement("span",null,ro.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),ro.createElement("span",{className:"c-light-primary"},si==null?void 0:si.execute_memory,"mb")),ro.createElement("span",null,ro.createElement("span",null))),"\u4F18\u4E8E",ro.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(si==null?void 0:si.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),ro.createElement("div",{id:"oj-modal-next",className:"oj-modal-btn"},"\u8FDB\u5165\u4E0B\u4E00\u9898"))))};function Ut({languageValue:ht,languageList:bt,onChangeLanguage:Et,title:wn,modify_code:fn,onSyncCode:an,onShowCodeSetting:Sn,onResetCode:xn}){const Cn=(0,ke.useLocation)(),zn=()=>{he.default.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:ro.createElement(de.Z,null),content:"\u4F60\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:xn})};return ro.createElement("div",{className:"action-bar"},ro.createElement(xe.default,{className:"oj-select",value:ht,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:Et},bt==null?void 0:bt.map(ii=>ro.createElement(xe.default.Option,{key:ii.language,value:ii.language},ii.language))),ro.createElement("span",null),ro.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:zn},ro.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),ro.createElement("a",{onClick:Sn},ro.createElement("i",{className:"iconfont icon-shezhi"})))}function cn(ht){var bt=ht,{id:Et,input:wn,is_file:fn,showNote:an,onShowNote:Sn,notes:xn,onCancelNote:Cn,onAddNote:zn,debugResult:ii,language:Zn,debuging:wi,submitting:Kn,executingMessage:gi,code:si,onSubmitCode:Ii,onDebugCode:Oi,onChangeCode:Ui,onChangeInput:Ai,onUpdateCode:Ni}=bt,ar=rc(bt,["id","input","is_file","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]);function ti(Li){return ro.createElement(Ut,Fs(ps({},ar),{onShowCodeSetting:Li}))}const ji={id:Et,input:wn,debugResult:ii,debuging:wi,is_file:fn,submitting:Kn,executingMessage:gi,onDebugCode:Oi,onChangeCode:Ui,onSubmitCode:Ii,onChangeInput:Ai};return ro.createElement("div",{className:"right-panel"},ro.createElement(Ct,{onUpdateCode:()=>{},language:Zn,value:si,onChange:Ui,ActionBarRender:ti}),ro.createElement("div",{className:`note-form-area ${an?"active":""}`},ro.createElement(gt,{onCancel:Cn,notes:xn,callback:zn})),ro.createElement(zt.ZP,ps({},ji)))}},35106:function(_n,qt,Ee){"use strict";Ee.d(qt,{h:function(){return Me}});var Me=(me=>(me[me.NOMATCH=-1]="NOMATCH",me[me.OK=0]="OK",me[me.TIMEOUT=2]="TIMEOUT",me[me.PODFAILURE=3]="PODFAILURE",me[me.COMPILEFAILURE=4]="COMPILEFAILURE",me[me.EXECUTEFAILURE=5]="EXECUTEFAILURE",me[me.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",me))(Me||{})},49802:function(_n,qt,Ee){"use strict";Ee.d(qt,{H7:function(){return xe},KC:function(){return ce},M3:function(){return ie},MK:function(){return ye},MU:function(){return ke},Rg:function(){return Se},WH:function(){return z},X6:function(){return Le},bM:function(){return Be},bx:function(){return ee},dd:function(){return ve},de:function(){return Pe},fi:function(){return ge},fu:function(){return me},gu:function(){return oe},n4:function(){return le},qe:function(){return ue},rL:function(){return we},rX:function(){return he},uc:function(){return Ae},vl:function(){return de},wO:function(){return se},zO:function(){return Ce}});var Me=Ee(99064);function me(De){return(0,Me.U2)(`mypractices/${De}.json`,{hidePopLogin:!0})}function Be(De,ze){return(0,Me.v_)(`mypractices/${De}/code_submit.json`,ze)}function ke(De,ze){return(0,Me.v_)(`mypractices/${De}/code_debug.json`,ze)}function Ce(De,ze){return ze.language&&(ze.language=encodeURIComponent(ze.language)),(0,Me.U2)(`mypractices/${De}/submit_records.json`,ze)}function Le(De){return(0,Me.U2)("mypractices/record_detail.json",{id:De})}function he(De,ze){return(0,Me.U2)(`mypractices/${De}/result.json`,{mode:ze})}function ye(De,ze){return(0,Me.v_)(`mypractices/${De}/add_notes.json`,ze)}function xe(De,ze){return(0,Me.v_)(`mypractices/${De}/restore_initial_code.json`,ze)}function ge(De,ze){return(0,Me.v_)(`mypractices/${De}/sync_code.json`,ze)}function le(De,ze){return(0,Me.v_)(`mypractices/${De}/update_code.json`,ze)}function ve(De){return(0,Me.v_)(`mypractices/${De}/initial_codes.json`)}function de(De,ze){return(0,Me.v_)(`discusses/${De}/plus.json`,ze)}function ce(De){return(0,Me.U2)("practices/practices_list.json",De)}function z(De,ze){return(0,Me.U2)(`practices/${De}/question_solution_articles`,ze)}function ee(De,ze){return(0,Me.v_)(`practices/${De}/question_solution_articles`,ze)}function oe(De,ze){return(0,Me.gz)(`practices/${De}/question_solution_articles/${ze==null?void 0:ze.active}`,ze)}function ie(De,ze){return(0,Me.U2)(`practices/${De}/question_solution_articles/${ze==null?void 0:ze.active}/edit`,ze)}function se(De,ze){return(0,Me.U2)(`practices/${De}/question_solution_articles/${ze==null?void 0:ze.active}`,ze)}function ue(De,ze){return(0,Me.v_)(`practices/${De}/question_solution_articles/${ze==null?void 0:ze.active}/set_authority_or_excellent`,ze)}function Se(De,ze){return(0,Me.v_)(`practices/${De}/question_solution_articles/${ze==null?void 0:ze.active}/praise_or_treads`,ze)}function we(De,ze){return(0,Me.v_)(`practices/${De}/question_solution_articles/${ze==null?void 0:ze.active}/hide`)}function Pe(De,ze){return(0,Me.IV)(`practices/${De}/question_solution_articles/${ze==null?void 0:ze.active}`,ze)}function Ae(De,ze){return(0,Me.v_)(`mypractices/${De}/update_practice_time_sum`,ze)}},34362:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return de}});var Me=Ee(59301),me=Ee(8591),Be=Ee(6848),ke=Ee(71418),Ce=Ee(95237),Le=Ee(43604),he=Ee(58421),ye=Ee(3113),xe=Ee(12290),ge=Ee(99064),le=Ee(85149),ve=(z,ee,oe)=>new Promise((ie,se)=>{var ue=Pe=>{try{we(oe.next(Pe))}catch(Ae){se(Ae)}},Se=Pe=>{try{we(oe.throw(Pe))}catch(Ae){se(Ae)}},we=Pe=>Pe.done?ie(Pe.value):Promise.resolve(Pe.value).then(ue,Se);we((oe=oe.apply(z,ee)).next())}),de=({id:z,activeDiscussIndex:ee,onReplyDiscuss:oe,adminOrOperator:ie})=>{const[se,ue]=(0,Me.useState)(""),[Se,we]=(0,Me.useState)(!1);function Pe(De){ue(De)}function Ae(){if(!se){me.ZP.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}oe(z,se),ue("")}return(0,Me.useEffect)(()=>{ee!=z&&we(!1)},[ee]),Me.createElement("div",{key:z,className:"discuss-item-editor",style:{display:ee===z?"block":"none",width:"100%"}},Me.createElement(xe.Z,{miniToolbar:!0,startInit:ee===z,defaultValue:se,id:z,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:Pe,extraUse:ie&&Me.createElement(Be.Z,{color:"#fff",open:Se,destroyTooltipOnHide:!0,title:ce({id:z,isOpen:Se,activeDiscussIndex:ee,onChange:Pe,setIsOpen:we}),overlayStyle:{maxWidth:600}},Me.createElement("a",{title:Se?"\u5173\u95ED\u63A8\u8350":"\u6253\u5F00\u63A8\u8350",onClick:()=>we(!Se)},Me.createElement("i",{className:"iconfont icon-dianzan11"})))}),Me.createElement("a",{onClick:Ae,className:"btn-send"},"\u53D1\u9001"))};const ce=z=>{const[ee,oe]=(0,Me.useState)(!1),[ie,se]=(0,Me.useState)([]),[ue,Se]=(0,Me.useState)(1);(0,Me.useEffect)(()=>{z!=null&&z.isOpen?we():(Se(1),se([]))},[z==null?void 0:z.isOpen]);const we=()=>ve(void 0,null,function*(){oe(!0);const Pe=yield(0,ge.ZP)(`/api/discusses/${z==null?void 0:z.id}/recommend_answer.json`,{method:"get"});(Pe==null?void 0:Pe.status)==0&&se(Pe==null?void 0:Pe.answer),oe(!1)});return Me.createElement(ke.Z,{spinning:ee},Me.createElement("div",{style:{color:"#000"}},Me.createElement(le.Z,{className:"font14",style:{maxHeight:500,overflow:"auto"},value:(ie==null?void 0:ie[ue-1])||""}),Me.createElement(Ce.Z,{justify:"end",align:"middle"},Me.createElement(Le.Z,null,Me.createElement(he.Z,{simple:!0,current:ue,pageSize:1,total:(ie==null?void 0:ie.length)||0,onChange:Pe=>{Se(Pe)}})),Me.createElement(Le.Z,null,Me.createElement(ye.ZP,{onClick:()=>ve(void 0,null,function*(){z==null||z.onChange(ie==null?void 0:ie[ue-1]),z==null||z.setIsOpen(!1)})},"\u586B\u5165\u6587\u672C\u6846")))))}},70750:function(_n,qt,Ee){"use strict";Ee.d(qt,{o:function(){return xe}});var Me=Ee(99064),me=Ee(93125),Be=Ee.n(me);let ke="",Ce,Le="";function he(ge){ye(ge)}function ye(ge){Ce=new(Be()).Vod({timeout:6e4,partSize:1048576,parallel:5,retryCount:3,retryDuration:2,region:"ap-southeast-1",userId:0x6803cbd867207,enableUploadProgress:!1,addFileSuccess:function(le){console.log("addFileSuccess: "+le.file.name),ge.addFileSuccess&&ge.addFileSuccess(le),Ce.startUpload()},onUploadstarted:function(le){const ve=le.file.name;if(le.videoId){var ce=`/api/users/${ke}/video_auths.json`;(0,Me.ZP)(ce,{method:"put",body:{video_id:le.videoId,title:ve,file_name:ve,virtual_classroom_id:Le}}).then(z=>{if(z.status==-1){ge.onUploadError&&ge.onUploadError(le);return}const ee=z.data;var oe=ee.UploadAuth,ie=ee.UploadAddress,se=ee.VideoId;Ce.setUploadAuthAndAddress(le,oe,ie)}).catch(z=>{Ce.deleteFile(Ce._curIndex),Ce.nextUpload(),console.log(z)})}else{var de=`/api/users/${ke}/video_auths.json`;const z="";(0,Me.ZP)(de,{method:"Post",body:{title:z+ve,file_name:z+ve,virtual_classroom_id:Le}}).then(ee=>{if(ee){const ue=ee.data;var oe=ue.UploadAuth,ie=ue.UploadAddress,se=ue.VideoId;Ce.setUploadAuthAndAddress(le,oe,ie,se)}}).catch(ee=>{Ce.deleteFile(Ce._curIndex),Ce.nextUpload(),console.log(ee)}),console.log("\u6587\u4EF6\u5F00\u59CB\u4E0A\u4F20...")}},onUploadSucceed:function(le){ge.onUploadSucceed&&ge.onUploadSucceed(le),console.log("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F!")},onUploadFailed:function(le,ve,de){ge.onUploadFailed&&ge.onUploadFailed(le),console.log("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25!")},onUploadCanceled:function(le,ve,de){console.log("\u6587\u4EF6\u4E0A\u4F20\u5DF2\u6682\u505C!")},onUploadProgress:function(le,ve,de){ge.onUploadProgress&&ge.onUploadProgress(le,ve,de);var ce=Math.ceil(de*100);console.log("\u6587\u4EF6\u4E0A\u4F20\u4E2D...")},onUploadTokenExpired:function(le){console.log("\u6587\u4EF6\u4E0A\u4F20\u8D85\u65F6!");var ve=`/api/users/${ke}/video_auths.json`;(0,Me.ZP)(ve,{method:"put",body:{video_id:le.videoId}}).then(de=>{var z=de.data.UploadAuth;Ce.resumeUploadWithAuth(z)}).catch(de=>{console.log(de)})},onUploadEnd:function(le){ge.onUploadEnd&&ge.onUploadEnd(le),console.log("onUploadEnd: uploaded all the files")}}),ge.gotUploader&&ge.gotUploader(Ce)}function xe(ge,le,ve){ge&&(ke=ge),le&&(Le=le),he(ve)}},4901:function(_n,qt,Ee){"use strict";Ee.d(qt,{BU:function(){return me},Dj:function(){return Me},gH:function(){return Be},vp:function(){return ke}});function Me(Ce){try{Ce.mozRequestFullScreen?Ce.mozRequestFullScreen():Ce.webkitRequestFullScreen&&Ce.webkitRequestFullScreen()}catch(Le){console.log(Le,":e")}}function me(){window.top.document.webkitExitFullscreen?window.top.document.webkitExitFullscreen():document.exitFullscreen?window.top.document.exitFullscreen():document.msExitFullscreen?window.top.document.msExitFullscreen():document.mozCancelFullScreen&&window.top.document.mozCancelFullScreen()}const Be=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function ke(){var Ce=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,Le=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",Ce),window.isFullScreen?window.isFullScreen:Ce!=null}},24768:function(_n,qt,Ee){"use strict";Ee.d(qt,{AL:function(){return Se},Iy:function(){return le},Qv:function(){return ce},ez:function(){return ue},jb:function(){return ve}});var Me=Ee(32834),me=Ee.n(Me),Be=Ee(11690),ke=Ee.n(Be);let Ce=1;function Le(ze,Ze){const Xe=ze.match(/^(\s+)(?:```)/);if(Xe===null)return Ze;const Ge=Xe[1];return Ze.split(`
|
|
|
`).map(ft=>{const at=ft.match(/^\s+/);if(at===null)return ft;const[Ct]=at;return Ct.length>=Ge.length?ft.slice(Ge.length):ft}).join(`
|
|
|
`)}let he=[],ye=["<ul>"];const xe=new(me()).Renderer,ge=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function le(){he.length=0,ye=["<ul>"]}const ve={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function de(ze,Ze,Xe,Ge){if(Ze>=ze.length||ze[Ze].level<=Xe)return Ze;var ft=ze[Ze];Ge.push("<li><a href='#"+Ce+ft.anchor+"'>"+ft.text+"</a>"),Ze++;var at=[];return Ze=de(ze,Ze,ft.level,at),at.length>0&&(Ge.push("<ul>"),at.forEach(function(Ct){Ge.push(Ct)}),Ge.push("</ul>")),Ge.push("</li>"),Ze=de(ze,Ze,Xe,Ge),Ze}function ce(){return de(he,0,0,ye),ye.push("</ul>"),ye.join("")}const z={heading(ze){const Ze=ge.exec(ze);if(Ce+=1,Ze)return{type:"heading",raw:Ze[0],depth:Ze[1].length,text:Ze[2]}},fences(ze){const Ze=this.rules.block.fences.exec(ze);if(Ze){const Xe=Ze[0];let Ge=Le(Xe,Ze[3]||"");const ft=Ze[2]?Ze[2].trim():Ze[2];if(["latex","katex","math"].indexOf(ft)>=0){const at=ie(),Ct=Ge;Ge=at,se[at]={type:"block",expression:Ct}}return{type:"code",raw:Xe,lang:ft,text:Ge}}}},ee=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let oe=0;const ie=()=>`__special_katext_id_${oe++}__`;let se={};function ue(){return se}function Se(){oe=0,se={}}function we(ze){return ze=ze.replace(ee,(Ze,Xe)=>{const Ge=ie();return se[Ge]={type:"inline",expression:Xe},Ge}),ze}const Pe=xe.listitem;xe.listitem=function(ze){return Pe(we(ze))};const Ae=xe.paragraph;xe.paragraph=function(ze){return Ae(we(ze))};const De=xe.tablecell;xe.tablecell=function(ze,Ze){return De(we(ze),Ze)},xe.code=function(ze,Ze,Xe){const Ge=(Ze||"").match(/\S*/)[0];return Ge?["latex","katex","math"].indexOf(Ge)>=0?`<p class='editormd-tex'>${ze}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ze}">${Xe?ze:(0,Be.escape)(ze,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(Xe?ze:(0,Be.escape)(ze,!0))+"</code></pre>"},xe.heading=function(ze,Ze,Xe){let Ge=this.options.headerPrefix+Xe.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return he.push({anchor:Ge,level:Ze,text:ze}),"<h"+Ze+' id="'+Ce+Ge+'">'+ze+"</h"+Ze+">"},me().setOptions({silent:!0,gfm:!0,pedantic:!1}),me().use({tokenizer:z,renderer:xe}),qt.ZP=me()},16479:function(_n,qt,Ee){"use strict";Ee.d(qt,{G:function(){return Ce},t:function(){return ke}});var Me=Ee(7062),me=Ee.n(Me);const Be=null;function ke(Le,he){let ye=me().get("__ec");ye||(ye={}),ye[Le]=he,me().set("__ec",ye)}function Ce(Le,he){let ye=me().get("__ec");return ye?ye[Le]===void 0?he:ye[Le]:he}},29382:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Do}});class Me{static install(){Object.setPrototypeOf=Object.setPrototypeOf||function(Ke,qe){return Ke.__proto__=qe,Ke},Object.assign=Object.assign||function(Ke){if(Ke==null)throw new TypeError("Cannot convert undefined or null to object");let qe=Object(Ke);for(let Ye=1;Ye<arguments.length;Ye++){let St=arguments[Ye];if(St!=null)for(let Ot in St)St.hasOwnProperty(Ot)&&(qe[Ot]=St[Ot])}return qe},typeof self.Promise!="function"&&Ee(3867).polyfill()}}Me.install();var me=Me,Be=Ee(86204),ke=Ee.n(Be);class Ce{static e(Ke,qe){(!Ke||Ce.FORCE_GLOBAL_TAG)&&(Ke=Ce.GLOBAL_TAG);let Ye=`[${Ke}] > ${qe}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","error",Ye),Ce.ENABLE_ERROR&&(console.error?console.error(Ye):console.warn?console.warn(Ye):console.log(Ye))}static i(Ke,qe){(!Ke||Ce.FORCE_GLOBAL_TAG)&&(Ke=Ce.GLOBAL_TAG);let Ye=`[${Ke}] > ${qe}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","info",Ye),Ce.ENABLE_INFO&&(console.info?console.info(Ye):console.log(Ye))}static w(Ke,qe){(!Ke||Ce.FORCE_GLOBAL_TAG)&&(Ke=Ce.GLOBAL_TAG);let Ye=`[${Ke}] > ${qe}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","warn",Ye),Ce.ENABLE_WARN&&(console.warn?console.warn(Ye):console.log(Ye))}static d(Ke,qe){(!Ke||Ce.FORCE_GLOBAL_TAG)&&(Ke=Ce.GLOBAL_TAG);let Ye=`[${Ke}] > ${qe}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","debug",Ye),Ce.ENABLE_DEBUG&&(console.debug?console.debug(Ye):console.log(Ye))}static v(Ke,qe){(!Ke||Ce.FORCE_GLOBAL_TAG)&&(Ke=Ce.GLOBAL_TAG);let Ye=`[${Ke}] > ${qe}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","verbose",Ye),Ce.ENABLE_VERBOSE&&console.log(Ye)}}Ce.GLOBAL_TAG="flv.js",Ce.FORCE_GLOBAL_TAG=!1,Ce.ENABLE_ERROR=!0,Ce.ENABLE_INFO=!0,Ce.ENABLE_WARN=!0,Ce.ENABLE_DEBUG=!0,Ce.ENABLE_VERBOSE=!0,Ce.ENABLE_CALLBACK=!1,Ce.emitter=new(ke());var Le=Ce;class he{constructor(){this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}reset(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}addBytes(Ke){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=Ke,this._totalBytes+=Ke):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=Ke,this._totalBytes+=Ke):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=Ke,this._totalBytes+=Ke,this._lastCheckpoint=this._now())}get currentKBps(){this.addBytes(0);let Ke=(this._now()-this._lastCheckpoint)/1e3;return Ke==0&&(Ke=1),this._intervalBytes/Ke/1024}get lastSecondKBps(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}get averageKBps(){let Ke=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/Ke/1024}}var ye=he;class xe{constructor(Ke){this._message=Ke}get name(){return"RuntimeException"}get message(){return this._message}toString(){return this.name+": "+this.message}}class ge extends xe{constructor(Ke){super(Ke)}get name(){return"IllegalStateException"}}class le extends xe{constructor(Ke){super(Ke)}get name(){return"InvalidArgumentException"}}class ve extends xe{constructor(Ke){super(Ke)}get name(){return"NotImplementedException"}}const de={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},ce={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"};class z{constructor(Ke){this._type=Ke||"undefined",this._status=de.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}destroy(){this._status=de.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}isWorking(){return this._status===de.kConnecting||this._status===de.kBuffering}get type(){return this._type}get status(){return this._status}get needStashBuffer(){return this._needStash}get onContentLengthKnown(){return this._onContentLengthKnown}set onContentLengthKnown(Ke){this._onContentLengthKnown=Ke}get onURLRedirect(){return this._onURLRedirect}set onURLRedirect(Ke){this._onURLRedirect=Ke}get onDataArrival(){return this._onDataArrival}set onDataArrival(Ke){this._onDataArrival=Ke}get onError(){return this._onError}set onError(Ke){this._onError=Ke}get onComplete(){return this._onComplete}set onComplete(Ke){this._onComplete=Ke}open(Ke,qe){throw new ve("Unimplemented abstract function!")}abort(){throw new ve("Unimplemented abstract function!")}}let ee={};function oe(){let Xn=self.navigator.userAgent.toLowerCase(),Ke=/(edge)\/([\w.]+)/.exec(Xn)||/(opr)[\/]([\w.]+)/.exec(Xn)||/(chrome)[ \/]([\w.]+)/.exec(Xn)||/(iemobile)[\/]([\w.]+)/.exec(Xn)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Xn)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Xn)||/(webkit)[ \/]([\w.]+)/.exec(Xn)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(Xn)||/(msie) ([\w.]+)/.exec(Xn)||Xn.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(Xn)||Xn.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(Xn)||[],qe=/(ipad)/.exec(Xn)||/(ipod)/.exec(Xn)||/(windows phone)/.exec(Xn)||/(iphone)/.exec(Xn)||/(kindle)/.exec(Xn)||/(android)/.exec(Xn)||/(windows)/.exec(Xn)||/(mac)/.exec(Xn)||/(linux)/.exec(Xn)||/(cros)/.exec(Xn)||[],Ye={browser:Ke[5]||Ke[3]||Ke[1]||"",version:Ke[2]||Ke[4]||"0",majorVersion:Ke[4]||Ke[2]||"0",platform:qe[0]||""},St={};if(Ye.browser){St[Ye.browser]=!0;let Ot=Ye.majorVersion.split(".");St.version={major:parseInt(Ye.majorVersion,10),string:Ye.version},Ot.length>1&&(St.version.minor=parseInt(Ot[1],10)),Ot.length>2&&(St.version.build=parseInt(Ot[2],10))}if(Ye.platform&&(St[Ye.platform]=!0),(St.chrome||St.opr||St.safari)&&(St.webkit=!0),St.rv||St.iemobile){St.rv&&delete St.rv;let Ot="msie";Ye.browser=Ot,St[Ot]=!0}if(St.edge){delete St.edge;let Ot="msedge";Ye.browser=Ot,St[Ot]=!0}if(St.opr){let Ot="opera";Ye.browser=Ot,St[Ot]=!0}if(St.safari&&St.android){let Ot="android";Ye.browser=Ot,St[Ot]=!0}St.name=Ye.browser,St.platform=Ye.platform;for(let Ot in ee)ee.hasOwnProperty(Ot)&&delete ee[Ot];Object.assign(ee,St)}oe();var ie=ee;class se extends z{static isSupported(){try{let Ke=ie.msedge&&ie.version.minor>=15048,qe=ie.msedge?Ke:!0;return self.fetch&&self.ReadableStream&&qe}catch(Ke){return!1}}constructor(Ke,qe){super("fetch-stream-loader"),this.TAG="FetchStreamLoader",this._seekHandler=Ke,this._config=qe,this._needStash=!0,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),super.destroy()}open(Ke,qe){this._dataSource=Ke,this._range=qe;let Ye=Ke.url;this._config.reuseRedirectedURL&&Ke.redirectedURL!=null&&(Ye=Ke.redirectedURL);let St=this._seekHandler.getConfig(Ye,qe),Ot=new self.Headers;if(typeof St.headers=="object"){let _t=St.headers;for(let dn in _t)_t.hasOwnProperty(dn)&&Ot.append(dn,_t[dn])}let Tt={method:"GET",headers:Ot,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(let _t in this._config.headers)Ot.append(_t,this._config.headers[_t]);Ke.cors===!1&&(Tt.mode="same-origin"),Ke.withCredentials&&(Tt.credentials="include"),Ke.referrerPolicy&&(Tt.referrerPolicy=Ke.referrerPolicy),this._status=de.kConnecting,self.fetch(St.url,Tt).then(_t=>{if(this._requestAbort){this._requestAbort=!1,this._status=de.kIdle;return}if(_t.ok&&_t.status>=200&&_t.status<=299){if(_t.url!==St.url&&this._onURLRedirect){let Pn=this._seekHandler.removeURLParameters(_t.url);this._onURLRedirect(Pn)}let dn=_t.headers.get("Content-Length");return dn!=null&&(this._contentLength=parseInt(dn),this._contentLength!==0&&this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)),this._pump.call(this,_t.body.getReader())}else if(this._status=de.kError,this._onError)this._onError(ce.HTTP_STATUS_CODE_INVALID,{code:_t.status,msg:_t.statusText});else throw new xe("FetchStreamLoader: Http code invalid, "+_t.status+" "+_t.statusText)}).catch(_t=>{if(this._status=de.kError,this._onError)this._onError(ce.EXCEPTION,{code:-1,msg:_t.message});else throw _t})}abort(){this._requestAbort=!0}_pump(Ke){return Ke.read().then(qe=>{if(qe.done)if(this._contentLength!==null&&this._receivedLength<this._contentLength){this._status=de.kError;let Ye=ce.EARLY_EOF,St={code:-1,msg:"Fetch stream meet Early-EOF"};if(this._onError)this._onError(Ye,St);else throw new xe(St.msg)}else this._status=de.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1);else{if(this._requestAbort===!0)return this._requestAbort=!1,this._status=de.kComplete,Ke.cancel();this._status=de.kBuffering;let Ye=qe.value.buffer,St=this._range.from+this._receivedLength;this._receivedLength+=Ye.byteLength,this._onDataArrival&&this._onDataArrival(Ye,St,this._receivedLength),this._pump(Ke)}}).catch(qe=>{if(qe.code===11&&ie.msedge)return;this._status=de.kError;let Ye=0,St=null;if((qe.code===19||qe.message==="network error")&&(this._contentLength===null||this._contentLength!==null&&this._receivedLength<this._contentLength)?(Ye=ce.EARLY_EOF,St={code:qe.code,msg:"Fetch stream meet Early-EOF"}):(Ye=ce.EXCEPTION,St={code:qe.code,msg:qe.message}),this._onError)this._onError(Ye,St);else throw new xe(St.msg)})}}var ue=se;class Se extends z{static isSupported(){try{let Ke=new XMLHttpRequest;return Ke.open("GET","https://example.com",!0),Ke.responseType="moz-chunked-arraybuffer",Ke.responseType==="moz-chunked-arraybuffer"}catch(Ke){return Le.w("MozChunkedLoader",Ke.message),!1}}constructor(Ke,qe){super("xhr-moz-chunked-loader"),this.TAG="MozChunkedLoader",this._seekHandler=Ke,this._config=qe,this._needStash=!0,this._xhr=null,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),super.destroy()}open(Ke,qe){this._dataSource=Ke,this._range=qe;let Ye=Ke.url;this._config.reuseRedirectedURL&&Ke.redirectedURL!=null&&(Ye=Ke.redirectedURL);let St=this._seekHandler.getConfig(Ye,qe);this._requestURL=St.url;let Ot=this._xhr=new XMLHttpRequest;if(Ot.open("GET",St.url,!0),Ot.responseType="moz-chunked-arraybuffer",Ot.onreadystatechange=this._onReadyStateChange.bind(this),Ot.onprogress=this._onProgress.bind(this),Ot.onloadend=this._onLoadEnd.bind(this),Ot.onerror=this._onXhrError.bind(this),Ke.withCredentials&&(Ot.withCredentials=!0),typeof St.headers=="object"){let Tt=St.headers;for(let _t in Tt)Tt.hasOwnProperty(_t)&&Ot.setRequestHeader(_t,Tt[_t])}if(typeof this._config.headers=="object"){let Tt=this._config.headers;for(let _t in Tt)Tt.hasOwnProperty(_t)&&Ot.setRequestHeader(_t,Tt[_t])}this._status=de.kConnecting,Ot.send()}abort(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=de.kComplete}_onReadyStateChange(Ke){let qe=Ke.target;if(qe.readyState===2){if(qe.responseURL!=null&&qe.responseURL!==this._requestURL&&this._onURLRedirect){let Ye=this._seekHandler.removeURLParameters(qe.responseURL);this._onURLRedirect(Ye)}if(qe.status!==0&&(qe.status<200||qe.status>299))if(this._status=de.kError,this._onError)this._onError(ce.HTTP_STATUS_CODE_INVALID,{code:qe.status,msg:qe.statusText});else throw new xe("MozChunkedLoader: Http code invalid, "+qe.status+" "+qe.statusText);else this._status=de.kBuffering}}_onProgress(Ke){if(this._status===de.kError)return;this._contentLength===null&&Ke.total!==null&&Ke.total!==0&&(this._contentLength=Ke.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));let qe=Ke.target.response,Ye=this._range.from+this._receivedLength;this._receivedLength+=qe.byteLength,this._onDataArrival&&this._onDataArrival(qe,Ye,this._receivedLength)}_onLoadEnd(Ke){if(this._requestAbort===!0){this._requestAbort=!1;return}else if(this._status===de.kError)return;this._status=de.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)}_onXhrError(Ke){this._status=de.kError;let qe=0,Ye=null;if(this._contentLength&&Ke.loaded<this._contentLength?(qe=ce.EARLY_EOF,Ye={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(qe=ce.EXCEPTION,Ye={code:-1,msg:Ke.constructor.name+" "+Ke.type}),this._onError)this._onError(qe,Ye);else throw new xe(Ye.msg)}}var we=Se;class Pe extends null{static isSupported(){try{if(typeof self.MSStream=="undefined"||typeof self.MSStreamReader=="undefined")return!1;let Ke=new XMLHttpRequest;return Ke.open("GET","https://example.com",!0),Ke.responseType="ms-stream",Ke.responseType==="ms-stream"}catch(Ke){return Log.w("MSStreamLoader",Ke.message),!1}}constructor(Ke,qe){super("xhr-msstream-loader"),this.TAG="MSStreamLoader",this._seekHandler=Ke,this._config=qe,this._needStash=!0,this._xhr=null,this._reader=null,this._totalRange=null,this._currentRange=null,this._currentRequestURL=null,this._currentRedirectedURL=null,this._contentLength=null,this._receivedLength=0,this._bufferLimit=16*1024*1024,this._lastTimeBufferSize=0,this._isReconnecting=!1}destroy(){this.isWorking()&&this.abort(),this._reader&&(this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr=null),super.destroy()}open(Ke,qe){this._internalOpen(Ke,qe,!1)}_internalOpen(Ke,qe,Ye){this._dataSource=Ke,Ye?this._currentRange=qe:this._totalRange=qe;let St=Ke.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?St=this._currentRedirectedURL:Ke.redirectedURL!=null&&(St=Ke.redirectedURL));let Ot=this._seekHandler.getConfig(St,qe);this._currentRequestURL=Ot.url;let Tt=this._reader=new self.MSStreamReader;Tt.onprogress=this._msrOnProgress.bind(this),Tt.onload=this._msrOnLoad.bind(this),Tt.onerror=this._msrOnError.bind(this);let _t=this._xhr=new XMLHttpRequest;if(_t.open("GET",Ot.url,!0),_t.responseType="ms-stream",_t.onreadystatechange=this._xhrOnReadyStateChange.bind(this),_t.onerror=this._xhrOnError.bind(this),Ke.withCredentials&&(_t.withCredentials=!0),typeof Ot.headers=="object"){let dn=Ot.headers;for(let Pn in dn)dn.hasOwnProperty(Pn)&&_t.setRequestHeader(Pn,dn[Pn])}if(typeof this._config.headers=="object"){let dn=this._config.headers;for(let Pn in dn)dn.hasOwnProperty(Pn)&&_t.setRequestHeader(Pn,dn[Pn])}this._isReconnecting?this._isReconnecting=!1:this._status=LoaderStatus.kConnecting,_t.send()}abort(){this._internalAbort(),this._status=LoaderStatus.kComplete}_internalAbort(){this._reader&&(this._reader.readyState===1&&this._reader.abort(),this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.abort(),this._xhr.onreadystatechange=null,this._xhr=null)}_xhrOnReadyStateChange(Ke){let qe=Ke.target;if(qe.readyState===2)if(qe.status>=200&&qe.status<=299){if(this._status=LoaderStatus.kBuffering,qe.responseURL!=null){let St=this._seekHandler.removeURLParameters(qe.responseURL);qe.responseURL!==this._currentRequestURL&&St!==this._currentRedirectedURL&&(this._currentRedirectedURL=St,this._onURLRedirect&&this._onURLRedirect(St))}let Ye=qe.getResponseHeader("Content-Length");if(Ye!=null&&this._contentLength==null){let St=parseInt(Ye);St>0&&(this._contentLength=St,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=LoaderStatus.kError,this._onError)this._onError(LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:qe.status,msg:qe.statusText});else throw new RuntimeException("MSStreamLoader: Http code invalid, "+qe.status+" "+qe.statusText);else if(qe.readyState===3&&qe.status>=200&&qe.status<=299){this._status=LoaderStatus.kBuffering;let Ye=qe.response;this._reader.readAsArrayBuffer(Ye)}}_xhrOnError(Ke){this._status=LoaderStatus.kError;let qe=LoaderErrors.EXCEPTION,Ye={code:-1,msg:Ke.constructor.name+" "+Ke.type};if(this._onError)this._onError(qe,Ye);else throw new RuntimeException(Ye.msg)}_msrOnProgress(Ke){let Ye=Ke.target.result;if(Ye==null){this._doReconnectIfNeeded();return}let St=Ye.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=Ye.byteLength;let Ot=this._totalRange.from+this._receivedLength;this._receivedLength+=St.byteLength,this._onDataArrival&&this._onDataArrival(St,Ot,this._receivedLength),Ye.byteLength>=this._bufferLimit&&(Log.v(this.TAG,`MSStream buffer exceeded max size near ${Ot+St.byteLength}, reconnecting...`),this._doReconnectIfNeeded())}_doReconnectIfNeeded(){if(this._contentLength==null||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();let Ke={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,Ke,!0)}}_msrOnLoad(Ke){this._status=LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}_msrOnError(Ke){this._status=LoaderStatus.kError;let qe=0,Ye=null;if(this._contentLength&&this._receivedLength<this._contentLength?(qe=LoaderErrors.EARLY_EOF,Ye={code:-1,msg:"MSStream meet Early-Eof"}):(qe=LoaderErrors.EARLY_EOF,Ye={code:-1,msg:Ke.constructor.name+" "+Ke.type}),this._onError)this._onError(qe,Ye);else throw new RuntimeException(Ye.msg)}}var Ae=null;class De extends z{static isSupported(){try{let Ke=new XMLHttpRequest;return Ke.open("GET","https://example.com",!0),Ke.responseType="arraybuffer",Ke.responseType==="arraybuffer"}catch(Ke){return Le.w("RangeLoader",Ke.message),!1}}constructor(Ke,qe){super("xhr-range-loader"),this.TAG="RangeLoader",this._seekHandler=Ke,this._config=qe,this._needStash=!1,this._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],this._currentChunkSizeKB=384,this._currentSpeedNormalized=0,this._zeroSpeedChunkCount=0,this._xhr=null,this._speedSampler=new ye,this._requestAbort=!1,this._waitForTotalLength=!1,this._totalLengthReceived=!1,this._currentRequestURL=null,this._currentRedirectedURL=null,this._currentRequestRange=null,this._totalLength=null,this._contentLength=null,this._receivedLength=0,this._lastTimeLoaded=0}destroy(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),super.destroy()}get currentSpeed(){return this._speedSampler.lastSecondKBps}open(Ke,qe){this._dataSource=Ke,this._range=qe,this._status=de.kConnecting;let Ye=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(Ye=!0,this._totalLength=this._dataSource.filesize),!this._totalLengthReceived&&!Ye?(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1})):this._openSubRange()}_openSubRange(){let Ke=this._currentChunkSizeKB*1024,qe=this._range.from+this._receivedLength,Ye=qe+Ke;this._contentLength!=null&&Ye-this._range.from>=this._contentLength&&(Ye=this._range.from+this._contentLength-1),this._currentRequestRange={from:qe,to:Ye},this._internalOpen(this._dataSource,this._currentRequestRange)}_internalOpen(Ke,qe){this._lastTimeLoaded=0;let Ye=Ke.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?Ye=this._currentRedirectedURL:Ke.redirectedURL!=null&&(Ye=Ke.redirectedURL));let St=this._seekHandler.getConfig(Ye,qe);this._currentRequestURL=St.url;let Ot=this._xhr=new XMLHttpRequest;if(Ot.open("GET",St.url,!0),Ot.responseType="arraybuffer",Ot.onreadystatechange=this._onReadyStateChange.bind(this),Ot.onprogress=this._onProgress.bind(this),Ot.onload=this._onLoad.bind(this),Ot.onerror=this._onXhrError.bind(this),Ke.withCredentials&&(Ot.withCredentials=!0),typeof St.headers=="object"){let Tt=St.headers;for(let _t in Tt)Tt.hasOwnProperty(_t)&&Ot.setRequestHeader(_t,Tt[_t])}if(typeof this._config.headers=="object"){let Tt=this._config.headers;for(let _t in Tt)Tt.hasOwnProperty(_t)&&Ot.setRequestHeader(_t,Tt[_t])}Ot.send()}abort(){this._requestAbort=!0,this._internalAbort(),this._status=de.kComplete}_internalAbort(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}_onReadyStateChange(Ke){let qe=Ke.target;if(qe.readyState===2){if(qe.responseURL!=null){let Ye=this._seekHandler.removeURLParameters(qe.responseURL);qe.responseURL!==this._currentRequestURL&&Ye!==this._currentRedirectedURL&&(this._currentRedirectedURL=Ye,this._onURLRedirect&&this._onURLRedirect(Ye))}if(qe.status>=200&&qe.status<=299){if(this._waitForTotalLength)return;this._status=de.kBuffering}else if(this._status=de.kError,this._onError)this._onError(ce.HTTP_STATUS_CODE_INVALID,{code:qe.status,msg:qe.statusText});else throw new xe("RangeLoader: Http code invalid, "+qe.status+" "+qe.statusText)}}_onProgress(Ke){if(this._status===de.kError)return;if(this._contentLength===null){let Ye=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,Ye=!0;let St=Ke.total;this._internalAbort(),St!=null&St!==0&&(this._totalLength=St)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,Ye){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}let qe=Ke.loaded-this._lastTimeLoaded;this._lastTimeLoaded=Ke.loaded,this._speedSampler.addBytes(qe)}_normalizeSpeed(Ke){let qe=this._chunkSizeKBList,Ye=qe.length-1,St=0,Ot=0,Tt=Ye;if(Ke<qe[0])return qe[0];for(;Ot<=Tt;){if(St=Ot+Math.floor((Tt-Ot)/2),St===Ye||Ke>=qe[St]&&Ke<qe[St+1])return qe[St];qe[St]<Ke?Ot=St+1:Tt=St-1}}_onLoad(Ke){if(this._status===de.kError)return;if(this._waitForTotalLength){this._waitForTotalLength=!1;return}this._lastTimeLoaded=0;let qe=this._speedSampler.lastSecondKBps;if(qe===0&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(qe=this._speedSampler.currentKBps)),qe!==0){let Tt=this._normalizeSpeed(qe);this._currentSpeedNormalized!==Tt&&(this._currentSpeedNormalized=Tt,this._currentChunkSizeKB=Tt)}let Ye=Ke.target.response,St=this._range.from+this._receivedLength;this._receivedLength+=Ye.byteLength;let Ot=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():Ot=!0,this._onDataArrival&&this._onDataArrival(Ye,St,this._receivedLength),Ot&&(this._status=de.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}_onXhrError(Ke){this._status=de.kError;let qe=0,Ye=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(qe=ce.EARLY_EOF,Ye={code:-1,msg:"RangeLoader meet Early-Eof"}):(qe=ce.EXCEPTION,Ye={code:-1,msg:Ke.constructor.name+" "+Ke.type}),this._onError)this._onError(qe,Ye);else throw new xe(Ye.msg)}}var ze=De;class Ze extends z{static isSupported(){try{return typeof self.WebSocket!="undefined"}catch(Ke){return!1}}constructor(){super("websocket-loader"),this.TAG="WebSocketLoader",this._needStash=!0,this._ws=null,this._requestAbort=!1,this._receivedLength=0}destroy(){this._ws&&this.abort(),super.destroy()}open(Ke){try{let qe=this._ws=new self.WebSocket(Ke.url);qe.binaryType="arraybuffer",qe.onopen=this._onWebSocketOpen.bind(this),qe.onclose=this._onWebSocketClose.bind(this),qe.onmessage=this._onWebSocketMessage.bind(this),qe.onerror=this._onWebSocketError.bind(this),this._status=de.kConnecting}catch(qe){this._status=de.kError;let Ye={code:qe.code,msg:qe.message};if(this._onError)this._onError(ce.EXCEPTION,Ye);else throw new xe(Ye.msg)}}abort(){let Ke=this._ws;Ke&&(Ke.readyState===0||Ke.readyState===1)&&(this._requestAbort=!0,Ke.close()),this._ws=null,this._status=de.kComplete}_onWebSocketOpen(Ke){this._status=de.kBuffering}_onWebSocketClose(Ke){if(this._requestAbort===!0){this._requestAbort=!1;return}this._status=de.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)}_onWebSocketMessage(Ke){if(Ke.data instanceof ArrayBuffer)this._dispatchArrayBuffer(Ke.data);else if(Ke.data instanceof Blob){let qe=new FileReader;qe.onload=()=>{this._dispatchArrayBuffer(qe.result)},qe.readAsArrayBuffer(Ke.data)}else{this._status=de.kError;let qe={code:-1,msg:"Unsupported WebSocket message type: "+Ke.data.constructor.name};if(this._onError)this._onError(ce.EXCEPTION,qe);else throw new xe(qe.msg)}}_dispatchArrayBuffer(Ke){let qe=Ke,Ye=this._receivedLength;this._receivedLength+=qe.byteLength,this._onDataArrival&&this._onDataArrival(qe,Ye,this._receivedLength)}_onWebSocketError(Ke){this._status=de.kError;let qe={code:Ke.code,msg:Ke.message};if(this._onError)this._onError(ce.EXCEPTION,qe);else throw new xe(qe.msg)}}var Xe=Ze;class Ge{constructor(Ke){this._zeroStart=Ke||!1}getConfig(Ke,qe){let Ye={};if(qe.from!==0||qe.to!==-1){let St;qe.to!==-1?St=`bytes=${qe.from.toString()}-${qe.to.toString()}`:St=`bytes=${qe.from.toString()}-`,Ye.Range=St}else this._zeroStart&&(Ye.Range="bytes=0-");return{url:Ke,headers:Ye}}removeURLParameters(Ke){return Ke}}var ft=Ge;class at{constructor(Ke,qe){this._startName=Ke,this._endName=qe}getConfig(Ke,qe){let Ye=Ke;if(qe.from!==0||qe.to!==-1){let St=!0;Ye.indexOf("?")===-1&&(Ye+="?",St=!1),St&&(Ye+="&"),Ye+=`${this._startName}=${qe.from.toString()}`,qe.to!==-1&&(Ye+=`&${this._endName}=${qe.to.toString()}`)}return{url:Ye,headers:{}}}removeURLParameters(Ke){let qe=Ke.split("?")[0],Ye,St=Ke.indexOf("?");St!==-1&&(Ye=Ke.substring(St+1));let Ot="";if(Ye!=null&&Ye.length>0){let Tt=Ye.split("&");for(let _t=0;_t<Tt.length;_t++){let dn=Tt[_t].split("="),Pn=_t>0;dn[0]!==this._startName&&dn[0]!==this._endName&&(Pn&&(Ot+="&"),Ot+=Tt[_t])}}return Ot.length===0?qe:qe+"?"+Ot}}var Ct=at;class et{constructor(Ke,qe,Ye){this.TAG="IOController",this._config=qe,this._extraData=Ye,this._stashInitialSize=1024*384,qe.stashInitialSize!=null&&qe.stashInitialSize>0&&(this._stashInitialSize=qe.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=1024*1024*3,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,qe.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=Ke,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(Ke.url),this._refTotalLength=Ke.filesize?Ke.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new ye,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}destroy(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}isWorking(){return this._loader&&this._loader.isWorking()&&!this._paused}isPaused(){return this._paused}get status(){return this._loader.status}get extraData(){return this._extraData}set extraData(Ke){this._extraData=Ke}get onDataArrival(){return this._onDataArrival}set onDataArrival(Ke){this._onDataArrival=Ke}get onSeeked(){return this._onSeeked}set onSeeked(Ke){this._onSeeked=Ke}get onError(){return this._onError}set onError(Ke){this._onError=Ke}get onComplete(){return this._onComplete}set onComplete(Ke){this._onComplete=Ke}get onRedirect(){return this._onRedirect}set onRedirect(Ke){this._onRedirect=Ke}get onRecoveredEarlyEof(){return this._onRecoveredEarlyEof}set onRecoveredEarlyEof(Ke){this._onRecoveredEarlyEof=Ke}get currentURL(){return this._dataSource.url}get hasRedirect(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null}get currentRedirectedURL(){return this._redirectedURL||this._dataSource.redirectedURL}get currentSpeed(){return this._loaderClass===ze?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}get loaderType(){return this._loader.type}_selectSeekHandler(){let Ke=this._config;if(Ke.seekType==="range")this._seekHandler=new ft(this._config.rangeLoadZeroStart);else if(Ke.seekType==="param"){let qe=Ke.seekParamStart||"bstart",Ye=Ke.seekParamEnd||"bend";this._seekHandler=new Ct(qe,Ye)}else if(Ke.seekType==="custom"){if(typeof Ke.customSeekHandler!="function")throw new le("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new Ke.customSeekHandler}else throw new le(`Invalid seekType in config: ${Ke.seekType}`)}_selectLoader(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=Xe;else if(ue.isSupported())this._loaderClass=ue;else if(we.isSupported())this._loaderClass=we;else if(ze.isSupported())this._loaderClass=ze;else throw new xe("Your browser doesn't support xhr with arraybuffer responseType!")}_createLoader(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}open(Ke){this._currentRange={from:0,to:-1},Ke&&(this._currentRange.from=Ke),this._speedSampler.reset(),Ke||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}abort(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}pause(){this.isWorking()&&(this._loader.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}resume(){if(this._paused){this._paused=!1;let Ke=this._resumeFrom;this._resumeFrom=0,this._internalSeek(Ke,!0)}}seek(Ke){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(Ke,!0)}_internalSeek(Ke,qe){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(qe),this._loader.destroy(),this._loader=null;let Ye={from:Ke,to:-1};this._currentRange={from:Ye.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,Ye),this._onSeeked&&this._onSeeked()}updateUrl(Ke){if(!Ke||typeof Ke!="string"||Ke.length===0)throw new le("Url must be a non-empty string!");this._dataSource.url=Ke}_expandBuffer(Ke){let qe=this._stashSize;for(;qe+1024*1024*1<Ke;)qe*=2;if(qe+=1024*1024*1,qe===this._bufferSize)return;let Ye=new ArrayBuffer(qe);if(this._stashUsed>0){let St=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(Ye,0,qe).set(St,0)}this._stashBuffer=Ye,this._bufferSize=qe}_normalizeSpeed(Ke){let qe=this._speedNormalizeList,Ye=qe.length-1,St=0,Ot=0,Tt=Ye;if(Ke<qe[0])return qe[0];for(;Ot<=Tt;){if(St=Ot+Math.floor((Tt-Ot)/2),St===Ye||Ke>=qe[St]&&Ke<qe[St+1])return qe[St];qe[St]<Ke?Ot=St+1:Tt=St-1}}_adjustStashSize(Ke){let qe=0;this._config.isLive||Ke<512?qe=Ke:Ke>=512&&Ke<=1024?qe=Math.floor(Ke*1.5):qe=Ke*2,qe>8192&&(qe=8192);let Ye=qe*1024+1024*1024*1;this._bufferSize<Ye&&this._expandBuffer(Ye),this._stashSize=qe*1024}_dispatchChunks(Ke,qe){return this._currentRange.to=qe+Ke.byteLength-1,this._onDataArrival(Ke,qe)}_onURLRedirect(Ke){this._redirectedURL=Ke,this._onRedirect&&this._onRedirect(Ke)}_onContentLengthKnown(Ke){Ke&&this._fullRequestFlag&&(this._totalLength=Ke,this._fullRequestFlag=!1)}_onLoaderChunkArrival(Ke,qe,Ye){if(!this._onDataArrival)throw new ge("IOController: No existing consumer (onDataArrival) callback!");if(this._paused)return;this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(Ke.byteLength);let St=this._speedSampler.lastSecondKBps;if(St!==0){let Ot=this._normalizeSpeed(St);this._speedNormalized!==Ot&&(this._speedNormalized=Ot,this._adjustStashSize(Ot))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=qe),this._stashUsed+Ke.byteLength<=this._stashSize)new Uint8Array(this._stashBuffer,0,this._stashSize).set(new Uint8Array(Ke),this._stashUsed),this._stashUsed+=Ke.byteLength;else{let Ot=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){let Tt=this._stashBuffer.slice(0,this._stashUsed),_t=this._dispatchChunks(Tt,this._stashByteStart);if(_t<Tt.byteLength){if(_t>0){let dn=new Uint8Array(Tt,_t);Ot.set(dn,0),this._stashUsed=dn.byteLength,this._stashByteStart+=_t}}else this._stashUsed=0,this._stashByteStart+=_t;this._stashUsed+Ke.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+Ke.byteLength),Ot=new Uint8Array(this._stashBuffer,0,this._bufferSize)),Ot.set(new Uint8Array(Ke),this._stashUsed),this._stashUsed+=Ke.byteLength}else{let Tt=this._dispatchChunks(Ke,qe);if(Tt<Ke.byteLength){let _t=Ke.byteLength-Tt;_t>this._bufferSize&&(this._expandBuffer(_t),Ot=new Uint8Array(this._stashBuffer,0,this._bufferSize)),Ot.set(new Uint8Array(Ke,Tt),0),this._stashUsed+=_t,this._stashByteStart=qe+Tt}}}else if(this._stashUsed===0){let Ot=this._dispatchChunks(Ke,qe);if(Ot<Ke.byteLength){let Tt=Ke.byteLength-Ot;Tt>this._bufferSize&&this._expandBuffer(Tt),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(Ke,Ot),0),this._stashUsed+=Tt,this._stashByteStart=qe+Ot}}else{this._stashUsed+Ke.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+Ke.byteLength);let Ot=new Uint8Array(this._stashBuffer,0,this._bufferSize);Ot.set(new Uint8Array(Ke),this._stashUsed),this._stashUsed+=Ke.byteLength;let Tt=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(Tt<this._stashUsed&&Tt>0){let _t=new Uint8Array(this._stashBuffer,Tt);Ot.set(_t,0)}this._stashUsed-=Tt,this._stashByteStart+=Tt}}_flushStashBuffer(Ke){if(this._stashUsed>0){let qe=this._stashBuffer.slice(0,this._stashUsed),Ye=this._dispatchChunks(qe,this._stashByteStart),St=qe.byteLength-Ye;if(Ye<qe.byteLength)if(Ke)Le.w(this.TAG,`${St} bytes unconsumed data remain when flush buffer, dropped`);else{if(Ye>0){let Ot=new Uint8Array(this._stashBuffer,0,this._bufferSize),Tt=new Uint8Array(qe,Ye);Ot.set(Tt,0),this._stashUsed=Tt.byteLength,this._stashByteStart+=Ye}return 0}return this._stashUsed=0,this._stashByteStart=0,St}return 0}_onLoaderComplete(Ke,qe){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}_onLoaderError(Ke,qe){switch(Le.e(this.TAG,`Loader error, code = ${qe.code}, msg = ${qe.msg}`),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,Ke=ce.UNRECOVERABLE_EARLY_EOF),Ke){case ce.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){let Ye=this._currentRange.to+1;Ye<this._totalLength&&(Le.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(Ye,!1));return}Ke=ce.UNRECOVERABLE_EARLY_EOF;break}case ce.UNRECOVERABLE_EARLY_EOF:case ce.CONNECTING_TIMEOUT:case ce.HTTP_STATUS_CODE_INVALID:case ce.EXCEPTION:break}if(this._onError)this._onError(Ke,qe);else throw new xe("IOException: "+qe.msg)}}var yt=et;const st={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:3*60,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:3*60,autoCleanupMinBackwardDuration:2*60,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0};function zt(){return Object.assign({},st)}class lt{static supportMSEH264Playback(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}static supportNetworkStreamIO(){let Ke=new yt({},zt()),qe=Ke.loaderType;return Ke.destroy(),qe=="fetch-stream-loader"||qe=="xhr-moz-chunked-loader"}static getNetworkLoaderTypeName(){let Ke=new yt({},zt()),qe=Ke.loaderType;return Ke.destroy(),qe}static supportNativeMediaPlayback(Ke){lt.videoElement==null&&(lt.videoElement=window.document.createElement("video"));let qe=lt.videoElement.canPlayType(Ke);return qe==="probably"||qe=="maybe"}static getFeatureList(){let Ke={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return Ke.mseFlvPlayback=lt.supportMSEH264Playback(),Ke.networkStreamIO=lt.supportNetworkStreamIO(),Ke.networkLoaderName=lt.getNetworkLoaderTypeName(),Ke.mseLiveFlvPlayback=Ke.mseFlvPlayback&&Ke.networkStreamIO,Ke.nativeMP4H264Playback=lt.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),Ke.nativeWebmVP8Playback=lt.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),Ke.nativeWebmVP9Playback=lt.supportNativeMediaPlayback('video/webm; codecs="vp9"'),Ke}}var tt=lt,mt={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"};class Pt{static get forceGlobalTag(){return Le.FORCE_GLOBAL_TAG}static set forceGlobalTag(Ke){Le.FORCE_GLOBAL_TAG=Ke,Pt._notifyChange()}static get globalTag(){return Le.GLOBAL_TAG}static set globalTag(Ke){Le.GLOBAL_TAG=Ke,Pt._notifyChange()}static get enableAll(){return Le.ENABLE_VERBOSE&&Le.ENABLE_DEBUG&&Le.ENABLE_INFO&&Le.ENABLE_WARN&&Le.ENABLE_ERROR}static set enableAll(Ke){Le.ENABLE_VERBOSE=Ke,Le.ENABLE_DEBUG=Ke,Le.ENABLE_INFO=Ke,Le.ENABLE_WARN=Ke,Le.ENABLE_ERROR=Ke,Pt._notifyChange()}static get enableDebug(){return Le.ENABLE_DEBUG}static set enableDebug(Ke){Le.ENABLE_DEBUG=Ke,Pt._notifyChange()}static get enableVerbose(){return Le.ENABLE_VERBOSE}static set enableVerbose(Ke){Le.ENABLE_VERBOSE=Ke,Pt._notifyChange()}static get enableInfo(){return Le.ENABLE_INFO}static set enableInfo(Ke){Le.ENABLE_INFO=Ke,Pt._notifyChange()}static get enableWarn(){return Le.ENABLE_WARN}static set enableWarn(Ke){Le.ENABLE_WARN=Ke,Pt._notifyChange()}static get enableError(){return Le.ENABLE_ERROR}static set enableError(Ke){Le.ENABLE_ERROR=Ke,Pt._notifyChange()}static getConfig(){return{globalTag:Le.GLOBAL_TAG,forceGlobalTag:Le.FORCE_GLOBAL_TAG,enableVerbose:Le.ENABLE_VERBOSE,enableDebug:Le.ENABLE_DEBUG,enableInfo:Le.ENABLE_INFO,enableWarn:Le.ENABLE_WARN,enableError:Le.ENABLE_ERROR,enableCallback:Le.ENABLE_CALLBACK}}static applyConfig(Ke){Le.GLOBAL_TAG=Ke.globalTag,Le.FORCE_GLOBAL_TAG=Ke.forceGlobalTag,Le.ENABLE_VERBOSE=Ke.enableVerbose,Le.ENABLE_DEBUG=Ke.enableDebug,Le.ENABLE_INFO=Ke.enableInfo,Le.ENABLE_WARN=Ke.enableWarn,Le.ENABLE_ERROR=Ke.enableError,Le.ENABLE_CALLBACK=Ke.enableCallback}static _notifyChange(){let Ke=Pt.emitter;if(Ke.listenerCount("change")>0){let qe=Pt.getConfig();Ke.emit("change",qe)}}static registerListener(Ke){Pt.emitter.addListener("change",Ke)}static removeListener(Ke){Pt.emitter.removeListener("change",Ke)}static addLogListener(Ke){Le.emitter.addListener("log",Ke),Le.emitter.listenerCount("log")>0&&(Le.ENABLE_CALLBACK=!0,Pt._notifyChange())}static removeLogListener(Ke){Le.emitter.removeListener("log",Ke),Le.emitter.listenerCount("log")===0&&(Le.ENABLE_CALLBACK=!1,Pt._notifyChange())}}Pt.emitter=new(ke());var gt=Pt;class Ft{constructor(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}isComplete(){let Ke=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,qe=this.hasVideo===!1||this.hasVideo===!0&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen!=null;return this.mimeType!=null&&this.duration!=null&&this.metadata!=null&&this.hasKeyframesIndex!=null&&Ke&&qe}isSeekable(){return this.hasKeyframesIndex===!0}getNearestKeyframe(Ke){if(this.keyframesIndex==null)return null;let qe=this.keyframesIndex,Ye=this._search(qe.times,Ke);return{index:Ye,milliseconds:qe.times[Ye],fileposition:qe.filepositions[Ye]}}_search(Ke,qe){let Ye=0,St=Ke.length-1,Ot=0,Tt=0,_t=St;for(qe<Ke[0]&&(Ye=0,Tt=_t+1);Tt<=_t;)if(Ot=Tt+Math.floor((_t-Tt)/2),Ot===St||qe>=Ke[Ot]&&qe<Ke[Ot+1]){Ye=Ot;break}else Ke[Ot]<qe?Tt=Ot+1:_t=Ot-1;return Ye}}var Ht=Ft;function hn(Xn,Ke,qe){let Ye=Xn;if(Ke+qe<Ye.length){for(;qe--;)if((Ye[++Ke]&192)!==128)return!1;return!0}else return!1}function Jt(Xn){let Ke=[],qe=Xn,Ye=0,St=Xn.length;for(;Ye<St;){if(qe[Ye]<128){Ke.push(String.fromCharCode(qe[Ye])),++Ye;continue}else if(!(qe[Ye]<192)){if(qe[Ye]<224){if(hn(qe,Ye,1)){let Ot=(qe[Ye]&31)<<6|qe[Ye+1]&63;if(Ot>=128){Ke.push(String.fromCharCode(Ot&65535)),Ye+=2;continue}}}else if(qe[Ye]<240){if(hn(qe,Ye,2)){let Ot=(qe[Ye]&15)<<12|(qe[Ye+1]&63)<<6|qe[Ye+2]&63;if(Ot>=2048&&(Ot&63488)!==55296){Ke.push(String.fromCharCode(Ot&65535)),Ye+=3;continue}}}else if(qe[Ye]<248&&hn(qe,Ye,3)){let Ot=(qe[Ye]&7)<<18|(qe[Ye+1]&63)<<12|(qe[Ye+2]&63)<<6|qe[Ye+3]&63;if(Ot>65536&&Ot<1114112){Ot-=65536,Ke.push(String.fromCharCode(Ot>>>10|55296)),Ke.push(String.fromCharCode(Ot&1023|56320)),Ye+=4;continue}}}Ke.push("\uFFFD"),++Ye}return Ke.join("")}var bn=Jt;let Wt=function(){let Xn=new ArrayBuffer(2);return new DataView(Xn).setInt16(0,256,!0),new Int16Array(Xn)[0]===256}();class Kt{static parseScriptData(Ke,qe,Ye){let St={};try{let Ot=Kt.parseValue(Ke,qe,Ye),Tt=Kt.parseValue(Ke,qe+Ot.size,Ye-Ot.size);St[Ot.data]=Tt.data}catch(Ot){Le.e("AMF",Ot.toString())}return St}static parseObject(Ke,qe,Ye){if(Ye<3)throw new ge("Data not enough when parse ScriptDataObject");let St=Kt.parseString(Ke,qe,Ye),Ot=Kt.parseValue(Ke,qe+St.size,Ye-St.size),Tt=Ot.objectEnd;return{data:{name:St.data,value:Ot.data},size:St.size+Ot.size,objectEnd:Tt}}static parseVariable(Ke,qe,Ye){return Kt.parseObject(Ke,qe,Ye)}static parseString(Ke,qe,Ye){if(Ye<2)throw new ge("Data not enough when parse String");let Ot=new DataView(Ke,qe,Ye).getUint16(0,!Wt),Tt;return Ot>0?Tt=bn(new Uint8Array(Ke,qe+2,Ot)):Tt="",{data:Tt,size:2+Ot}}static parseLongString(Ke,qe,Ye){if(Ye<4)throw new ge("Data not enough when parse LongString");let Ot=new DataView(Ke,qe,Ye).getUint32(0,!Wt),Tt;return Ot>0?Tt=bn(new Uint8Array(Ke,qe+4,Ot)):Tt="",{data:Tt,size:4+Ot}}static parseDate(Ke,qe,Ye){if(Ye<10)throw new ge("Data size invalid when parse Date");let St=new DataView(Ke,qe,Ye),Ot=St.getFloat64(0,!Wt),Tt=St.getInt16(8,!Wt);return Ot+=Tt*60*1e3,{data:new Date(Ot),size:10}}static parseValue(Ke,qe,Ye){if(Ye<1)throw new ge("Data not enough when parse Value");let St=new DataView(Ke,qe,Ye),Ot=1,Tt=St.getUint8(0),_t,dn=!1;try{switch(Tt){case 0:_t=St.getFloat64(1,!Wt),Ot+=8;break;case 1:{_t=!!St.getUint8(1),Ot+=1;break}case 2:{let Pn=Kt.parseString(Ke,qe+1,Ye-1);_t=Pn.data,Ot+=Pn.size;break}case 3:{_t={};let Pn=0;for((St.getUint32(Ye-4,!Wt)&16777215)===9&&(Pn=3);Ot<Ye-4;){let mn=Kt.parseObject(Ke,qe+Ot,Ye-Ot-Pn);if(mn.objectEnd)break;_t[mn.data.name]=mn.data.value,Ot+=mn.size}Ot<=Ye-3&&(St.getUint32(Ot-1,!Wt)&16777215)===9&&(Ot+=3);break}case 8:{_t={},Ot+=4;let Pn=0;for((St.getUint32(Ye-4,!Wt)&16777215)===9&&(Pn=3);Ot<Ye-8;){let mn=Kt.parseVariable(Ke,qe+Ot,Ye-Ot-Pn);if(mn.objectEnd)break;_t[mn.data.name]=mn.data.value,Ot+=mn.size}Ot<=Ye-3&&(St.getUint32(Ot-1,!Wt)&16777215)===9&&(Ot+=3);break}case 9:_t=void 0,Ot=1,dn=!0;break;case 10:{_t=[];let Pn=St.getUint32(1,!Wt);Ot+=4;for(let mn=0;mn<Pn;mn++){let on=Kt.parseValue(Ke,qe+Ot,Ye-Ot);_t.push(on.data),Ot+=on.size}break}case 11:{let Pn=Kt.parseDate(Ke,qe+1,Ye-1);_t=Pn.data,Ot+=Pn.size;break}case 12:{let Pn=Kt.parseString(Ke,qe+1,Ye-1);_t=Pn.data,Ot+=Pn.size;break}default:Ot=Ye,Le.w("AMF","Unsupported AMF value type "+Tt)}}catch(Pn){Le.e("AMF",Pn.toString())}return{data:_t,size:Ot,objectEnd:dn}}}var Xt=Kt;class $t{constructor(Ke){this.TAG="ExpGolomb",this._buffer=Ke,this._buffer_index=0,this._total_bytes=Ke.byteLength,this._total_bits=Ke.byteLength*8,this._current_word=0,this._current_word_bits_left=0}destroy(){this._buffer=null}_fillCurrentWord(){let Ke=this._total_bytes-this._buffer_index;if(Ke<=0)throw new ge("ExpGolomb: _fillCurrentWord() but no bytes available");let qe=Math.min(4,Ke),Ye=new Uint8Array(4);Ye.set(this._buffer.subarray(this._buffer_index,this._buffer_index+qe)),this._current_word=new DataView(Ye.buffer).getUint32(0,!1),this._buffer_index+=qe,this._current_word_bits_left=qe*8}readBits(Ke){if(Ke>32)throw new le("ExpGolomb: readBits() bits exceeded max 32bits!");if(Ke<=this._current_word_bits_left){let Tt=this._current_word>>>32-Ke;return this._current_word<<=Ke,this._current_word_bits_left-=Ke,Tt}let qe=this._current_word_bits_left?this._current_word:0;qe=qe>>>32-this._current_word_bits_left;let Ye=Ke-this._current_word_bits_left;this._fillCurrentWord();let St=Math.min(Ye,this._current_word_bits_left),Ot=this._current_word>>>32-St;return this._current_word<<=St,this._current_word_bits_left-=St,qe=qe<<St|Ot,qe}readBool(){return this.readBits(1)===1}readByte(){return this.readBits(8)}_skipLeadingZero(){let Ke;for(Ke=0;Ke<this._current_word_bits_left;Ke++)if(this._current_word&2147483648>>>Ke)return this._current_word<<=Ke,this._current_word_bits_left-=Ke,Ke;return this._fillCurrentWord(),Ke+this._skipLeadingZero()}readUEG(){let Ke=this._skipLeadingZero();return this.readBits(Ke+1)-1}readSEG(){let Ke=this.readUEG();return Ke&1?Ke+1>>>1:-1*(Ke>>>1)}}var kt=$t;class pt{static _ebsp2rbsp(Ke){let qe=Ke,Ye=qe.byteLength,St=new Uint8Array(Ye),Ot=0;for(let Tt=0;Tt<Ye;Tt++)Tt>=2&&qe[Tt]===3&&qe[Tt-1]===0&&qe[Tt-2]===0||(St[Ot]=qe[Tt],Ot++);return new Uint8Array(St.buffer,0,Ot)}static parseSPS(Ke){let qe=pt._ebsp2rbsp(Ke),Ye=new kt(qe);Ye.readByte();let St=Ye.readByte();Ye.readByte();let Ot=Ye.readByte();Ye.readUEG();let Tt=pt.getProfileString(St),_t=pt.getLevelString(Ot),dn=1,Pn=420,mn=[0,420,422,444],on=8;if((St===100||St===110||St===122||St===244||St===44||St===83||St===86||St===118||St===128||St===138||St===144)&&(dn=Ye.readUEG(),dn===3&&Ye.readBits(1),dn<=3&&(Pn=mn[dn]),on=Ye.readUEG()+8,Ye.readUEG(),Ye.readBits(1),Ye.readBool())){let di=dn!==3?8:12;for(let Ei=0;Ei<di;Ei++)Ye.readBool()&&(Ei<6?pt._skipScalingList(Ye,16):pt._skipScalingList(Ye,64))}Ye.readUEG();let Nt=Ye.readUEG();if(Nt===0)Ye.readUEG();else if(Nt===1){Ye.readBits(1),Ye.readSEG(),Ye.readSEG();let di=Ye.readUEG();for(let Ei=0;Ei<di;Ei++)Ye.readSEG()}let un=Ye.readUEG();Ye.readBits(1);let Mn=Ye.readUEG(),Dn=Ye.readUEG(),nn=Ye.readBits(1);nn===0&&Ye.readBits(1),Ye.readBits(1);let sn=0,Nn=0,On=0,qn=0;Ye.readBool()&&(sn=Ye.readUEG(),Nn=Ye.readUEG(),On=Ye.readUEG(),qn=Ye.readUEG());let ei=1,Fn=1,hi=0,Di=!0,Ri=0,En=0;if(Ye.readBool()){if(Ye.readBool()){let di=Ye.readByte(),Ei=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],qi=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];di>0&&di<16?(ei=Ei[di-1],Fn=qi[di-1]):di===255&&(ei=Ye.readByte()<<8|Ye.readByte(),Fn=Ye.readByte()<<8|Ye.readByte())}if(Ye.readBool()&&Ye.readBool(),Ye.readBool()&&(Ye.readBits(4),Ye.readBool()&&Ye.readBits(24)),Ye.readBool()&&(Ye.readUEG(),Ye.readUEG()),Ye.readBool()){let di=Ye.readBits(32),Ei=Ye.readBits(32);Di=Ye.readBool(),Ri=Ei,En=di*2,hi=Ri/En}}let Cr=1;(ei!==1||Fn!==1)&&(Cr=ei/Fn);let mr=0,Ln=0;if(dn===0)mr=1,Ln=2-nn;else{let di=dn===3?1:2,Ei=dn===1?2:1;mr=di,Ln=Ei*(2-nn)}let Jn=(Mn+1)*16,ui=(2-nn)*((Dn+1)*16);Jn-=(sn+Nn)*mr,ui-=(On+qn)*Ln;let Si=Math.ceil(Jn*Cr);return Ye.destroy(),Ye=null,{profile_string:Tt,level_string:_t,bit_depth:on,ref_frames:un,chroma_format:Pn,chroma_format_string:pt.getChromaFormatString(Pn),frame_rate:{fixed:Di,fps:hi,fps_den:En,fps_num:Ri},sar_ratio:{width:ei,height:Fn},codec_size:{width:Jn,height:ui},present_size:{width:Si,height:ui}}}static _skipScalingList(Ke,qe){let Ye=8,St=8,Ot=0;for(let Tt=0;Tt<qe;Tt++)St!==0&&(Ot=Ke.readSEG(),St=(Ye+Ot+256)%256),Ye=St===0?Ye:St}static getProfileString(Ke){switch(Ke){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}static getLevelString(Ke){return(Ke/10).toFixed(1)}static getChromaFormatString(Ke){switch(Ke){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}var Bt=pt,vt={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};function nt(Xn){return Xn>>>8&255|(Xn&255)<<8}function He(Xn){return(Xn&4278190080)>>>24|(Xn&16711680)>>>8|(Xn&65280)<<8|(Xn&255)<<24}function Ie(Xn,Ke){return Xn[Ke]<<24|Xn[Ke+1]<<16|Xn[Ke+2]<<8|Xn[Ke+3]}class We{constructor(Ke,qe){this.TAG="FLVDemuxer",this._config=qe,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=Ke.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=Ke.hasAudioTrack,this._hasVideo=Ke.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new Ht,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){let Ye=new ArrayBuffer(2);return new DataView(Ye).setInt16(0,256,!0),new Int16Array(Ye)[0]===256}()}destroy(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null}static probe(Ke){let qe=new Uint8Array(Ke),Ye={match:!1};if(qe[0]!==70||qe[1]!==76||qe[2]!==86||qe[3]!==1)return Ye;let St=(qe[4]&4)>>>2!==0,Ot=(qe[4]&1)!==0,Tt=Ie(qe,5);return Tt<9?Ye:{match:!0,consumed:Tt,dataOffset:Tt,hasAudioTrack:St,hasVideoTrack:Ot}}bindDataSource(Ke){return Ke.onDataArrival=this.parseChunks.bind(this),this}get onTrackMetadata(){return this._onTrackMetadata}set onTrackMetadata(Ke){this._onTrackMetadata=Ke}get onMediaInfo(){return this._onMediaInfo}set onMediaInfo(Ke){this._onMediaInfo=Ke}get onMetaDataArrived(){return this._onMetaDataArrived}set onMetaDataArrived(Ke){this._onMetaDataArrived=Ke}get onScriptDataArrived(){return this._onScriptDataArrived}set onScriptDataArrived(Ke){this._onScriptDataArrived=Ke}get onError(){return this._onError}set onError(Ke){this._onError=Ke}get onDataAvailable(){return this._onDataAvailable}set onDataAvailable(Ke){this._onDataAvailable=Ke}get timestampBase(){return this._timestampBase}set timestampBase(Ke){this._timestampBase=Ke}get overridedDuration(){return this._duration}set overridedDuration(Ke){this._durationOverrided=!0,this._duration=Ke,this._mediaInfo.duration=Ke}set overridedHasAudio(Ke){this._hasAudioFlagOverrided=!0,this._hasAudio=Ke,this._mediaInfo.hasAudio=Ke}set overridedHasVideo(Ke){this._hasVideoFlagOverrided=!0,this._hasVideo=Ke,this._mediaInfo.hasVideo=Ke}resetMediaInfo(){this._mediaInfo=new Ht}_isInitialMetadataDispatched(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}parseChunks(Ke,qe){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new ge("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");let Ye=0,St=this._littleEndian;if(qe===0)if(Ke.byteLength>13)Ye=We.probe(Ke).dataOffset;else return 0;for(this._firstParse&&(this._firstParse=!1,qe+Ye!==this._dataOffset&&Le.w(this.TAG,"First time parsing but chunk byteStart invalid!"),new DataView(Ke,Ye).getUint32(0,!St)!==0&&Le.w(this.TAG,"PrevTagSize0 !== 0 !!!"),Ye+=4);Ye<Ke.byteLength;){this._dispatch=!0;let Ot=new DataView(Ke,Ye);if(Ye+11+4>Ke.byteLength)break;let Tt=Ot.getUint8(0),_t=Ot.getUint32(0,!St)&16777215;if(Ye+11+_t+4>Ke.byteLength)break;if(Tt!==8&&Tt!==9&&Tt!==18){Le.w(this.TAG,`Unsupported tag type ${Tt}, skipped`),Ye+=11+_t+4;continue}let dn=Ot.getUint8(4),Pn=Ot.getUint8(5),mn=Ot.getUint8(6),on=Ot.getUint8(7),Nt=mn|Pn<<8|dn<<16|on<<24;(Ot.getUint32(7,!St)&16777215)!==0&&Le.w(this.TAG,"Meet tag which has StreamID != 0!");let Mn=Ye+11;switch(Tt){case 8:this._parseAudioData(Ke,Mn,_t,Nt);break;case 9:this._parseVideoData(Ke,Mn,_t,Nt,qe+Ye);break;case 18:this._parseScriptData(Ke,Mn,_t);break}let Dn=Ot.getUint32(11+_t,!St);Dn!==11+_t&&Le.w(this.TAG,`Invalid PrevTagSize ${Dn}`),Ye+=11+_t+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),Ye}_parseScriptData(Ke,qe,Ye){let St=Xt.parseScriptData(Ke,qe,Ye);if(St.hasOwnProperty("onMetaData")){if(St.onMetaData==null||typeof St.onMetaData!="object"){Le.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&Le.w(this.TAG,"Found another onMetaData tag!"),this._metadata=St;let Ot=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},Ot)),typeof Ot.hasAudio=="boolean"&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=Ot.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),typeof Ot.hasVideo=="boolean"&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=Ot.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),typeof Ot.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=Ot.audiodatarate),typeof Ot.videodatarate=="number"&&(this._mediaInfo.videoDataRate=Ot.videodatarate),typeof Ot.width=="number"&&(this._mediaInfo.width=Ot.width),typeof Ot.height=="number"&&(this._mediaInfo.height=Ot.height),typeof Ot.duration=="number"){if(!this._durationOverrided){let Tt=Math.floor(Ot.duration*this._timescale);this._duration=Tt,this._mediaInfo.duration=Tt}}else this._mediaInfo.duration=0;if(typeof Ot.framerate=="number"){let Tt=Math.floor(Ot.framerate*1e3);if(Tt>0){let _t=Tt/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=_t,this._referenceFrameRate.fps_num=Tt,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=_t}}if(typeof Ot.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;let Tt=Ot.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(Tt),Ot.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=Ot,Le.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(St).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},St))}_parseKeyframesIndex(Ke){let qe=[],Ye=[];for(let St=1;St<Ke.times.length;St++){let Ot=this._timestampBase+Math.floor(Ke.times[St]*1e3);qe.push(Ot),Ye.push(Ke.filepositions[St])}return{times:qe,filepositions:Ye}}_parseAudioData(Ke,qe,Ye,St){if(Ye<=1){Le.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");return}if(this._hasAudioFlagOverrided===!0&&this._hasAudio===!1)return;let Ot=this._littleEndian,_t=new DataView(Ke,qe,Ye).getUint8(0),dn=_t>>>4;if(dn!==2&&dn!==10){this._onError(vt.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+dn);return}let Pn=0,mn=(_t&12)>>>2;if(mn>=0&&mn<=4)Pn=this._flvSoundRateTable[mn];else{this._onError(vt.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+mn);return}let on=(_t&2)>>>1,Nt=_t&1,un=this._audioMetadata,Mn=this._audioTrack;if(un||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),un=this._audioMetadata={},un.type="audio",un.id=Mn.id,un.timescale=this._timescale,un.duration=this._duration,un.audioSampleRate=Pn,un.channelCount=Nt===0?1:2),dn===10){let Dn=this._parseAACAudioData(Ke,qe+1,Ye-1);if(Dn==null)return;if(Dn.packetType===0){un.config&&Le.w(this.TAG,"Found another AudioSpecificConfig!");let nn=Dn.data;un.audioSampleRate=nn.samplingRate,un.channelCount=nn.channelCount,un.codec=nn.codec,un.originalCodec=nn.originalCodec,un.config=nn.config,un.refSampleDuration=1024/un.audioSampleRate*un.timescale,Le.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",un);let sn=this._mediaInfo;sn.audioCodec=un.originalCodec,sn.audioSampleRate=un.audioSampleRate,sn.audioChannelCount=un.channelCount,sn.hasVideo?sn.videoCodec!=null&&(sn.mimeType='video/x-flv; codecs="'+sn.videoCodec+","+sn.audioCodec+'"'):sn.mimeType='video/x-flv; codecs="'+sn.audioCodec+'"',sn.isComplete()&&this._onMediaInfo(sn)}else if(Dn.packetType===1){let nn=this._timestampBase+St,sn={unit:Dn.data,length:Dn.data.byteLength,dts:nn,pts:nn};Mn.samples.push(sn),Mn.length+=Dn.data.length}else Le.e(this.TAG,`Flv: Unsupported AAC data type ${Dn.packetType}`)}else if(dn===2){if(!un.codec){let Nn=this._parseMP3AudioData(Ke,qe+1,Ye-1,!0);if(Nn==null)return;un.audioSampleRate=Nn.samplingRate,un.channelCount=Nn.channelCount,un.codec=Nn.codec,un.originalCodec=Nn.originalCodec,un.refSampleDuration=1152/un.audioSampleRate*un.timescale,Le.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",un);let On=this._mediaInfo;On.audioCodec=un.codec,On.audioSampleRate=un.audioSampleRate,On.audioChannelCount=un.channelCount,On.audioDataRate=Nn.bitRate,On.hasVideo?On.videoCodec!=null&&(On.mimeType='video/x-flv; codecs="'+On.videoCodec+","+On.audioCodec+'"'):On.mimeType='video/x-flv; codecs="'+On.audioCodec+'"',On.isComplete()&&this._onMediaInfo(On)}let Dn=this._parseMP3AudioData(Ke,qe+1,Ye-1,!1);if(Dn==null)return;let nn=this._timestampBase+St,sn={unit:Dn,length:Dn.byteLength,dts:nn,pts:nn};Mn.samples.push(sn),Mn.length+=Dn.length}}_parseAACAudioData(Ke,qe,Ye){if(Ye<=1){Le.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}let St={},Ot=new Uint8Array(Ke,qe,Ye);return St.packetType=Ot[0],Ot[0]===0?St.data=this._parseAACAudioSpecificConfig(Ke,qe+1,Ye-1):St.data=Ot.subarray(1),St}_parseAACAudioSpecificConfig(Ke,qe,Ye){let St=new Uint8Array(Ke,qe,Ye),Ot=null,Tt=0,_t=0,dn=null,Pn=0,mn=null;if(Tt=_t=St[0]>>>3,Pn=(St[0]&7)<<1|St[1]>>>7,Pn<0||Pn>=this._mpegSamplingRates.length){this._onError(vt.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}let on=this._mpegSamplingRates[Pn],Nt=(St[1]&120)>>>3;if(Nt<0||Nt>=8){this._onError(vt.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}Tt===5&&(mn=(St[1]&7)<<1|St[2]>>>7,dn=(St[2]&124)>>>2);let un=self.navigator.userAgent.toLowerCase();return un.indexOf("firefox")!==-1?Pn>=6?(Tt=5,Ot=new Array(4),mn=Pn-3):(Tt=2,Ot=new Array(2),mn=Pn):un.indexOf("android")!==-1?(Tt=2,Ot=new Array(2),mn=Pn):(Tt=5,mn=Pn,Ot=new Array(4),Pn>=6?mn=Pn-3:Nt===1&&(Tt=2,Ot=new Array(2),mn=Pn)),Ot[0]=Tt<<3,Ot[0]|=(Pn&15)>>>1,Ot[1]=(Pn&15)<<7,Ot[1]|=(Nt&15)<<3,Tt===5&&(Ot[1]|=(mn&15)>>>1,Ot[2]=(mn&1)<<7,Ot[2]|=8,Ot[3]=0),{config:Ot,samplingRate:on,channelCount:Nt,codec:"mp4a.40."+Tt,originalCodec:"mp4a.40."+_t}}_parseMP3AudioData(Ke,qe,Ye,St){if(Ye<4){Le.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}let Ot=this._littleEndian,Tt=new Uint8Array(Ke,qe,Ye),_t=null;if(St){if(Tt[0]!==255)return;let dn=Tt[1]>>>3&3,Pn=(Tt[1]&6)>>1,mn=(Tt[2]&240)>>>4,on=(Tt[2]&12)>>>2,un=(Tt[3]>>>6&3)!==3?2:1,Mn=0,Dn=0,nn=34,sn="mp3";switch(dn){case 0:Mn=this._mpegAudioV25SampleRateTable[on];break;case 2:Mn=this._mpegAudioV20SampleRateTable[on];break;case 3:Mn=this._mpegAudioV10SampleRateTable[on];break}switch(Pn){case 1:nn=34,mn<this._mpegAudioL3BitRateTable.length&&(Dn=this._mpegAudioL3BitRateTable[mn]);break;case 2:nn=33,mn<this._mpegAudioL2BitRateTable.length&&(Dn=this._mpegAudioL2BitRateTable[mn]);break;case 3:nn=32,mn<this._mpegAudioL1BitRateTable.length&&(Dn=this._mpegAudioL1BitRateTable[mn]);break}_t={bitRate:Dn,samplingRate:Mn,channelCount:un,codec:sn,originalCodec:sn}}else _t=Tt;return _t}_parseVideoData(Ke,qe,Ye,St,Ot){if(Ye<=1){Le.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");return}if(this._hasVideoFlagOverrided===!0&&this._hasVideo===!1)return;let Tt=new Uint8Array(Ke,qe,Ye)[0],_t=(Tt&240)>>>4,dn=Tt&15;if(dn!==7){this._onError(vt.CODEC_UNSUPPORTED,`Flv: Unsupported codec in video frame: ${dn}`);return}this._parseAVCVideoPacket(Ke,qe+1,Ye-1,St,Ot,_t)}_parseAVCVideoPacket(Ke,qe,Ye,St,Ot,Tt){if(Ye<4){Le.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}let _t=this._littleEndian,dn=new DataView(Ke,qe,Ye),Pn=dn.getUint8(0),on=(dn.getUint32(0,!_t)&16777215)<<8>>8;if(Pn===0)this._parseAVCDecoderConfigurationRecord(Ke,qe+4,Ye-4);else if(Pn===1)this._parseAVCVideoData(Ke,qe+4,Ye-4,St,Ot,Tt,on);else if(Pn!==2){this._onError(vt.FORMAT_ERROR,`Flv: Invalid video packet type ${Pn}`);return}}_parseAVCDecoderConfigurationRecord(Ke,qe,Ye){if(Ye<7){Le.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}let St=this._videoMetadata,Ot=this._videoTrack,Tt=this._littleEndian,_t=new DataView(Ke,qe,Ye);St?typeof St.avcc!="undefined"&&Le.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),St=this._videoMetadata={},St.type="video",St.id=Ot.id,St.timescale=this._timescale,St.duration=this._duration);let dn=_t.getUint8(0),Pn=_t.getUint8(1),mn=_t.getUint8(2),on=_t.getUint8(3);if(dn!==1||Pn===0){this._onError(vt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(_t.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(vt.FORMAT_ERROR,`Flv: Strange NaluLengthSizeMinusOne: ${this._naluLengthSize-1}`);return}let Nt=_t.getUint8(5)&31;if(Nt===0){this._onError(vt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else Nt>1&&Le.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ${Nt}`);let un=6;for(let Dn=0;Dn<Nt;Dn++){let nn=_t.getUint16(un,!Tt);if(un+=2,nn===0)continue;let sn=new Uint8Array(Ke,qe+un,nn);un+=nn;let Nn=Bt.parseSPS(sn);if(Dn!==0)continue;St.codecWidth=Nn.codec_size.width,St.codecHeight=Nn.codec_size.height,St.presentWidth=Nn.present_size.width,St.presentHeight=Nn.present_size.height,St.profile=Nn.profile_string,St.level=Nn.level_string,St.bitDepth=Nn.bit_depth,St.chromaFormat=Nn.chroma_format,St.sarRatio=Nn.sar_ratio,St.frameRate=Nn.frame_rate,(Nn.frame_rate.fixed===!1||Nn.frame_rate.fps_num===0||Nn.frame_rate.fps_den===0)&&(St.frameRate=this._referenceFrameRate);let On=St.frameRate.fps_den,qn=St.frameRate.fps_num;St.refSampleDuration=St.timescale*(On/qn);let Hn=sn.subarray(1,4),ei="avc1.";for(let hi=0;hi<3;hi++){let Di=Hn[hi].toString(16);Di.length<2&&(Di="0"+Di),ei+=Di}St.codec=ei;let Fn=this._mediaInfo;Fn.width=St.codecWidth,Fn.height=St.codecHeight,Fn.fps=St.frameRate.fps,Fn.profile=St.profile,Fn.level=St.level,Fn.refFrames=Nn.ref_frames,Fn.chromaFormat=Nn.chroma_format_string,Fn.sarNum=St.sarRatio.width,Fn.sarDen=St.sarRatio.height,Fn.videoCodec=ei,Fn.hasAudio?Fn.audioCodec!=null&&(Fn.mimeType='video/x-flv; codecs="'+Fn.videoCodec+","+Fn.audioCodec+'"'):Fn.mimeType='video/x-flv; codecs="'+Fn.videoCodec+'"',Fn.isComplete()&&this._onMediaInfo(Fn)}let Mn=_t.getUint8(un);if(Mn===0){this._onError(vt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");return}else Mn>1&&Le.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ${Mn}`);un++;for(let Dn=0;Dn<Mn;Dn++){let nn=_t.getUint16(un,!Tt);un+=2,nn!==0&&(un+=nn)}St.avcc=new Uint8Array(Ye),St.avcc.set(new Uint8Array(Ke,qe,Ye),0),Le.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",St)}_parseAVCVideoData(Ke,qe,Ye,St,Ot,Tt,_t){let dn=this._littleEndian,Pn=new DataView(Ke,qe,Ye),mn=[],on=0,Nt=0;const un=this._naluLengthSize;let Mn=this._timestampBase+St,Dn=Tt===1;for(;Nt<Ye;){if(Nt+4>=Ye){Le.w(this.TAG,`Malformed Nalu near timestamp ${Mn}, offset = ${Nt}, dataSize = ${Ye}`);break}let nn=Pn.getUint32(Nt,!dn);if(un===3&&(nn>>>=8),nn>Ye-un){Le.w(this.TAG,`Malformed Nalus near timestamp ${Mn}, NaluSize > DataSize!`);return}let sn=Pn.getUint8(Nt+un)&31;sn===5&&(Dn=!0);let Nn=new Uint8Array(Ke,qe+Nt,un+nn),On={type:sn,data:Nn};mn.push(On),on+=Nn.byteLength,Nt+=un+nn}if(mn.length){let nn=this._videoTrack,sn={units:mn,length:on,isKeyframe:Dn,dts:Mn,cts:_t,pts:Mn+_t};Dn&&(sn.fileposition=Ot),nn.samples.push(sn),nn.length+=on}}}var Oe=We;class be{static init(){be.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(let qe in be.types)be.types.hasOwnProperty(qe)&&(be.types[qe]=[qe.charCodeAt(0),qe.charCodeAt(1),qe.charCodeAt(2),qe.charCodeAt(3)]);let Ke=be.constants={};Ke.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),Ke.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),Ke.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),Ke.STSC=Ke.STCO=Ke.STTS,Ke.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Ke.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),Ke.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),Ke.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Ke.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),Ke.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box(Ke){let qe=8,Ye=null,St=Array.prototype.slice.call(arguments,1),Ot=St.length;for(let _t=0;_t<Ot;_t++)qe+=St[_t].byteLength;Ye=new Uint8Array(qe),Ye[0]=qe>>>24&255,Ye[1]=qe>>>16&255,Ye[2]=qe>>>8&255,Ye[3]=qe&255,Ye.set(Ke,4);let Tt=8;for(let _t=0;_t<Ot;_t++)Ye.set(St[_t],Tt),Tt+=St[_t].byteLength;return Ye}static generateInitSegment(Ke){let qe=be.box(be.types.ftyp,be.constants.FTYP),Ye=be.moov(Ke),St=new Uint8Array(qe.byteLength+Ye.byteLength);return St.set(qe,0),St.set(Ye,qe.byteLength),St}static moov(Ke){let qe=be.mvhd(Ke.timescale,Ke.duration),Ye=be.trak(Ke),St=be.mvex(Ke);return be.box(be.types.moov,qe,Ye,St)}static mvhd(Ke,qe){return be.box(be.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,Ke>>>24&255,Ke>>>16&255,Ke>>>8&255,Ke&255,qe>>>24&255,qe>>>16&255,qe>>>8&255,qe&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}static trak(Ke){return be.box(be.types.trak,be.tkhd(Ke),be.mdia(Ke))}static tkhd(Ke){let qe=Ke.id,Ye=Ke.duration,St=Ke.presentWidth,Ot=Ke.presentHeight;return be.box(be.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,qe>>>24&255,qe>>>16&255,qe>>>8&255,qe&255,0,0,0,0,Ye>>>24&255,Ye>>>16&255,Ye>>>8&255,Ye&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,St>>>8&255,St&255,0,0,Ot>>>8&255,Ot&255,0,0]))}static mdia(Ke){return be.box(be.types.mdia,be.mdhd(Ke),be.hdlr(Ke),be.minf(Ke))}static mdhd(Ke){let qe=Ke.timescale,Ye=Ke.duration;return be.box(be.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,qe>>>24&255,qe>>>16&255,qe>>>8&255,qe&255,Ye>>>24&255,Ye>>>16&255,Ye>>>8&255,Ye&255,85,196,0,0]))}static hdlr(Ke){let qe=null;return Ke.type==="audio"?qe=be.constants.HDLR_AUDIO:qe=be.constants.HDLR_VIDEO,be.box(be.types.hdlr,qe)}static minf(Ke){let qe=null;return Ke.type==="audio"?qe=be.box(be.types.smhd,be.constants.SMHD):qe=be.box(be.types.vmhd,be.constants.VMHD),be.box(be.types.minf,qe,be.dinf(),be.stbl(Ke))}static dinf(){return be.box(be.types.dinf,be.box(be.types.dref,be.constants.DREF))}static stbl(Ke){return be.box(be.types.stbl,be.stsd(Ke),be.box(be.types.stts,be.constants.STTS),be.box(be.types.stsc,be.constants.STSC),be.box(be.types.stsz,be.constants.STSZ),be.box(be.types.stco,be.constants.STCO))}static stsd(Ke){return Ke.type==="audio"?Ke.codec==="mp3"?be.box(be.types.stsd,be.constants.STSD_PREFIX,be.mp3(Ke)):be.box(be.types.stsd,be.constants.STSD_PREFIX,be.mp4a(Ke)):be.box(be.types.stsd,be.constants.STSD_PREFIX,be.avc1(Ke))}static mp3(Ke){let qe=Ke.channelCount,Ye=Ke.audioSampleRate,St=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,qe,0,16,0,0,0,0,Ye>>>8&255,Ye&255,0,0]);return be.box(be.types[".mp3"],St)}static mp4a(Ke){let qe=Ke.channelCount,Ye=Ke.audioSampleRate,St=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,qe,0,16,0,0,0,0,Ye>>>8&255,Ye&255,0,0]);return be.box(be.types.mp4a,St,be.esds(Ke))}static esds(Ke){let qe=Ke.config||[],Ye=qe.length,St=new Uint8Array([0,0,0,0,3,23+Ye,0,1,0,4,15+Ye,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([Ye]).concat(qe).concat([6,1,2]));return be.box(be.types.esds,St)}static avc1(Ke){let qe=Ke.avcc,Ye=Ke.codecWidth,St=Ke.codecHeight,Ot=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,Ye>>>8&255,Ye&255,St>>>8&255,St&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return be.box(be.types.avc1,Ot,be.box(be.types.avcC,qe))}static mvex(Ke){return be.box(be.types.mvex,be.trex(Ke))}static trex(Ke){let qe=Ke.id,Ye=new Uint8Array([0,0,0,0,qe>>>24&255,qe>>>16&255,qe>>>8&255,qe&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return be.box(be.types.trex,Ye)}static moof(Ke,qe){return be.box(be.types.moof,be.mfhd(Ke.sequenceNumber),be.traf(Ke,qe))}static mfhd(Ke){let qe=new Uint8Array([0,0,0,0,Ke>>>24&255,Ke>>>16&255,Ke>>>8&255,Ke&255]);return be.box(be.types.mfhd,qe)}static traf(Ke,qe){let Ye=Ke.id,St=be.box(be.types.tfhd,new Uint8Array([0,0,0,0,Ye>>>24&255,Ye>>>16&255,Ye>>>8&255,Ye&255])),Ot=be.box(be.types.tfdt,new Uint8Array([0,0,0,0,qe>>>24&255,qe>>>16&255,qe>>>8&255,qe&255])),Tt=be.sdtp(Ke),_t=be.trun(Ke,Tt.byteLength+16+16+8+16+8+8);return be.box(be.types.traf,St,Ot,_t,Tt)}static sdtp(Ke){let qe=Ke.samples||[],Ye=qe.length,St=new Uint8Array(4+Ye);for(let Ot=0;Ot<Ye;Ot++){let Tt=qe[Ot].flags;St[Ot+4]=Tt.isLeading<<6|Tt.dependsOn<<4|Tt.isDependedOn<<2|Tt.hasRedundancy}return be.box(be.types.sdtp,St)}static trun(Ke,qe){let Ye=Ke.samples||[],St=Ye.length,Ot=12+16*St,Tt=new Uint8Array(Ot);qe+=8+Ot,Tt.set([0,0,15,1,St>>>24&255,St>>>16&255,St>>>8&255,St&255,qe>>>24&255,qe>>>16&255,qe>>>8&255,qe&255],0);for(let _t=0;_t<St;_t++){let dn=Ye[_t].duration,Pn=Ye[_t].size,mn=Ye[_t].flags,on=Ye[_t].cts;Tt.set([dn>>>24&255,dn>>>16&255,dn>>>8&255,dn&255,Pn>>>24&255,Pn>>>16&255,Pn>>>8&255,Pn&255,mn.isLeading<<2|mn.dependsOn,mn.isDependedOn<<6|mn.hasRedundancy<<4|mn.isNonSync,0,0,on>>>24&255,on>>>16&255,on>>>8&255,on&255],12+16*_t)}return be.box(be.types.trun,Tt)}static mdat(Ke){return be.box(be.types.mdat,Ke)}}be.init();var Ne=be;class $e{static getSilentFrame(Ke,qe){if(Ke==="mp4a.40.2"){if(qe===1)return new Uint8Array([0,200,0,128,35,128]);if(qe===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(qe===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(qe===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(qe===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(qe===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(qe===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(qe===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(qe===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}var dt=$e;class Je{constructor(Ke,qe,Ye,St,Ot){this.dts=Ke,this.pts=qe,this.duration=Ye,this.originalDts=St,this.isSyncPoint=Ot,this.fileposition=null}}class At{constructor(){this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}appendSyncPoint(Ke){Ke.isSyncPoint=!0,this.syncPoints.push(Ke)}}class en{constructor(){this._list=[]}clear(){this._list=[]}appendArray(Ke){let qe=this._list;Ke.length!==0&&(qe.length>0&&Ke[0].originalDts<qe[qe.length-1].originalDts&&this.clear(),Array.prototype.push.apply(qe,Ke))}getLastSyncPointBeforeDts(Ke){if(this._list.length==0)return null;let qe=this._list,Ye=0,St=qe.length-1,Ot=0,Tt=0,_t=St;for(Ke<qe[0].dts&&(Ye=0,Tt=_t+1);Tt<=_t;)if(Ot=Tt+Math.floor((_t-Tt)/2),Ot===St||Ke>=qe[Ot].dts&&Ke<qe[Ot+1].dts){Ye=Ot;break}else qe[Ot].dts<Ke?Tt=Ot+1:_t=Ot-1;return this._list[Ye]}}class pn{constructor(Ke){this._type=Ke,this._list=[],this._lastAppendLocation=-1}get type(){return this._type}get length(){return this._list.length}isEmpty(){return this._list.length===0}clear(){this._list=[],this._lastAppendLocation=-1}_searchNearestSegmentBefore(Ke){let qe=this._list;if(qe.length===0)return-2;let Ye=qe.length-1,St=0,Ot=0,Tt=Ye,_t=0;if(Ke<qe[0].originalBeginDts)return _t=-1,_t;for(;Ot<=Tt;)if(St=Ot+Math.floor((Tt-Ot)/2),St===Ye||Ke>qe[St].lastSample.originalDts&&Ke<qe[St+1].originalBeginDts){_t=St;break}else qe[St].originalBeginDts<Ke?Ot=St+1:Tt=St-1;return _t}_searchNearestSegmentAfter(Ke){return this._searchNearestSegmentBefore(Ke)+1}append(Ke){let qe=this._list,Ye=Ke,St=this._lastAppendLocation,Ot=0;St!==-1&&St<qe.length&&Ye.originalBeginDts>=qe[St].lastSample.originalDts&&(St===qe.length-1||St<qe.length-1&&Ye.originalBeginDts<qe[St+1].originalBeginDts)?Ot=St+1:qe.length>0&&(Ot=this._searchNearestSegmentBefore(Ye.originalBeginDts)+1),this._lastAppendLocation=Ot,this._list.splice(Ot,0,Ye)}getLastSegmentBefore(Ke){let qe=this._searchNearestSegmentBefore(Ke);return qe>=0?this._list[qe]:null}getLastSampleBefore(Ke){let qe=this.getLastSegmentBefore(Ke);return qe!=null?qe.lastSample:null}getLastSyncPointBefore(Ke){let qe=this._searchNearestSegmentBefore(Ke),Ye=this._list[qe].syncPoints;for(;Ye.length===0&&qe>0;)qe--,Ye=this._list[qe].syncPoints;return Ye.length>0?Ye[Ye.length-1]:null}}class ln{constructor(Ke){this.TAG="MP4Remuxer",this._config=Ke,this._isLive=Ke.isLive===!0,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new pn("audio"),this._videoSegmentInfoList=new pn("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(ie.chrome&&(ie.version.major<50||ie.version.major===50&&ie.version.build<2661)),this._fillSilentAfterSeek=ie.msedge||ie.msie,this._mp3UseMpegAudio=!ie.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}destroy(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}bindDataSource(Ke){return Ke.onDataAvailable=this.remux.bind(this),Ke.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}get onInitSegment(){return this._onInitSegment}set onInitSegment(Ke){this._onInitSegment=Ke}get onMediaSegment(){return this._onMediaSegment}set onMediaSegment(Ke){this._onMediaSegment=Ke}insertDiscontinuity(){this._audioNextDts=this._videoNextDts=void 0}seek(Ke){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}remux(Ke,qe){if(!this._onMediaSegment)throw new ge("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(Ke,qe),this._remuxVideo(qe),this._remuxAudio(Ke)}_onTrackMetadataReceived(Ke,qe){let Ye=null,St="mp4",Ot=qe.codec;if(Ke==="audio")this._audioMeta=qe,qe.codec==="mp3"&&this._mp3UseMpegAudio?(St="mpeg",Ot="",Ye=new Uint8Array):Ye=Ne.generateInitSegment(qe);else if(Ke==="video")this._videoMeta=qe,Ye=Ne.generateInitSegment(qe);else return;if(!this._onInitSegment)throw new ge("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(Ke,{type:Ke,data:Ye.buffer,codec:Ot,container:`${Ke}/${St}`,mediaDuration:qe.duration})}_calculateDtsBase(Ke,qe){this._dtsBaseInited||(Ke.samples&&Ke.samples.length&&(this._audioDtsBase=Ke.samples[0].dts),qe.samples&&qe.samples.length&&(this._videoDtsBase=qe.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}flushStashedSamples(){let Ke=this._videoStashedLastSample,qe=this._audioStashedLastSample,Ye={type:"video",id:1,sequenceNumber:0,samples:[],length:0};Ke!=null&&(Ye.samples.push(Ke),Ye.length=Ke.length);let St={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};qe!=null&&(St.samples.push(qe),St.length=qe.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(Ye,!0),this._remuxAudio(St,!0)}_remuxAudio(Ke,qe){if(this._audioMeta==null)return;let Ye=Ke,St=Ye.samples,Ot,Tt=-1,_t=-1,dn=-1,Pn=this._audioMeta.refSampleDuration,mn=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,on=this._dtsBaseInited&&this._audioNextDts===void 0,Nt=!1;if(!St||St.length===0||St.length===1&&!qe)return;let un=0,Mn=null,Dn=0;mn?(un=0,Dn=Ye.length):(un=8,Dn=8+Ye.length);let nn=null;if(St.length>1&&(nn=St.pop(),Dn-=nn.length),this._audioStashedLastSample!=null){let Fn=this._audioStashedLastSample;this._audioStashedLastSample=null,St.unshift(Fn),Dn+=Fn.length}nn!=null&&(this._audioStashedLastSample=nn);let sn=St[0].dts-this._dtsBase;if(this._audioNextDts)Ot=sn-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())Ot=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(Nt=!0);else{let Fn=this._audioSegmentInfoList.getLastSampleBefore(sn);if(Fn!=null){let hi=sn-(Fn.originalDts+Fn.duration);hi<=3&&(hi=0);let Di=Fn.dts+Fn.duration+hi;Ot=sn-Di}else Ot=0}if(Nt){let Fn=sn-Ot,hi=this._videoSegmentInfoList.getLastSegmentBefore(sn);if(hi!=null&&hi.beginDts<Fn){let Di=dt.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(Di){let Ri=hi.beginDts,En=Fn-hi.beginDts;Le.v(this.TAG,`InsertPrefixSilentAudio: dts: ${Ri}, duration: ${En}`),St.unshift({unit:Di,dts:Ri,pts:Ri}),Dn+=Di.byteLength}}else Nt=!1}let Nn=[];for(let Fn=0;Fn<St.length;Fn++){let hi=St[Fn],Di=hi.unit,Ri=hi.dts-this._dtsBase,En=Ri-Ot;Tt===-1&&(Tt=En);let $i=0;Fn!==St.length-1?$i=St[Fn+1].dts-this._dtsBase-Ot-En:nn!=null?$i=nn.dts-this._dtsBase-Ot-En:Nn.length>=1?$i=Nn[Nn.length-1].duration:$i=Math.floor(Pn);let Cr=!1,mr=null;if($i>Pn*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!ie.safari){Cr=!0;let Ln=Math.abs($i-Pn),Jn=Math.ceil(Ln/Pn),ui=En+Pn;Le.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
|
|
|
dts: ${En+$i} ms, expected: ${En+Math.round(Pn)} ms, delta: ${Math.round(Ln)} ms, generate: ${Jn} frames`);let Si=dt.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);Si==null&&(Le.w(this.TAG,`Unable to generate silent frame for ${this._audioMeta.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`),Si=Di),mr=[];for(let Ei=0;Ei<Jn;Ei++){let qi=Math.round(ui);if(mr.length>0){let zi=mr[mr.length-1];zi.duration=qi-zi.dts}let Fi={dts:qi,pts:qi,cts:0,unit:Si,size:Si.byteLength,duration:0,originalDts:Ri,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};mr.push(Fi),Dn+=Fi.size,ui+=Pn}let di=mr[mr.length-1];di.duration=En+$i-di.dts,$i=Math.round(Pn)}Nn.push({dts:En,pts:En,cts:0,unit:hi.unit,size:hi.unit.byteLength,duration:$i,originalDts:Ri,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),Cr&&Nn.push.apply(Nn,mr)}mn?Mn=new Uint8Array(Dn):(Mn=new Uint8Array(Dn),Mn[0]=Dn>>>24&255,Mn[1]=Dn>>>16&255,Mn[2]=Dn>>>8&255,Mn[3]=Dn&255,Mn.set(Ne.types.mdat,4));for(let Fn=0;Fn<Nn.length;Fn++){let hi=Nn[Fn].unit;Mn.set(hi,un),un+=hi.byteLength}let On=Nn[Nn.length-1];_t=On.dts+On.duration,this._audioNextDts=_t;let qn=new At;qn.beginDts=Tt,qn.endDts=_t,qn.beginPts=Tt,qn.endPts=_t,qn.originalBeginDts=Nn[0].originalDts,qn.originalEndDts=On.originalDts+On.duration,qn.firstSample=new Je(Nn[0].dts,Nn[0].pts,Nn[0].duration,Nn[0].originalDts,!1),qn.lastSample=new Je(On.dts,On.pts,On.duration,On.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(qn),Ye.samples=Nn,Ye.sequenceNumber++;let Hn=null;mn?Hn=new Uint8Array:Hn=Ne.moof(Ye,Tt),Ye.samples=[],Ye.length=0;let ei={type:"audio",data:this._mergeBoxes(Hn,Mn).buffer,sampleCount:Nn.length,info:qn};mn&&on&&(ei.timestampOffset=Tt),this._onMediaSegment("audio",ei)}_remuxVideo(Ke,qe){if(this._videoMeta==null)return;let Ye=Ke,St=Ye.samples,Ot,Tt=-1,_t=-1,dn=-1,Pn=-1;if(!St||St.length===0||St.length===1&&!qe)return;let mn=8,on=null,Nt=8+Ke.length,un=null;if(St.length>1&&(un=St.pop(),Nt-=un.length),this._videoStashedLastSample!=null){let On=this._videoStashedLastSample;this._videoStashedLastSample=null,St.unshift(On),Nt+=On.length}un!=null&&(this._videoStashedLastSample=un);let Mn=St[0].dts-this._dtsBase;if(this._videoNextDts)Ot=Mn-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())Ot=0;else{let On=this._videoSegmentInfoList.getLastSampleBefore(Mn);if(On!=null){let qn=Mn-(On.originalDts+On.duration);qn<=3&&(qn=0);let Hn=On.dts+On.duration+qn;Ot=Mn-Hn}else Ot=0}let Dn=new At,nn=[];for(let On=0;On<St.length;On++){let qn=St[On],Hn=qn.dts-this._dtsBase,ei=qn.isKeyframe,Fn=Hn-Ot,hi=qn.cts,Di=Fn+hi;Tt===-1&&(Tt=Fn,dn=Di);let Ri=0;if(On!==St.length-1?Ri=St[On+1].dts-this._dtsBase-Ot-Fn:un!=null?Ri=un.dts-this._dtsBase-Ot-Fn:nn.length>=1?Ri=nn[nn.length-1].duration:Ri=Math.floor(this._videoMeta.refSampleDuration),ei){let En=new Je(Fn,Di,Ri,qn.dts,!0);En.fileposition=qn.fileposition,Dn.appendSyncPoint(En)}nn.push({dts:Fn,pts:Di,cts:hi,units:qn.units,size:qn.length,isKeyframe:ei,duration:Ri,originalDts:Hn,flags:{isLeading:0,dependsOn:ei?2:1,isDependedOn:ei?1:0,hasRedundancy:0,isNonSync:ei?0:1}})}on=new Uint8Array(Nt),on[0]=Nt>>>24&255,on[1]=Nt>>>16&255,on[2]=Nt>>>8&255,on[3]=Nt&255,on.set(Ne.types.mdat,4);for(let On=0;On<nn.length;On++){let qn=nn[On].units;for(;qn.length;){let ei=qn.shift().data;on.set(ei,mn),mn+=ei.byteLength}}let sn=nn[nn.length-1];if(_t=sn.dts+sn.duration,Pn=sn.pts+sn.duration,this._videoNextDts=_t,Dn.beginDts=Tt,Dn.endDts=_t,Dn.beginPts=dn,Dn.endPts=Pn,Dn.originalBeginDts=nn[0].originalDts,Dn.originalEndDts=sn.originalDts+sn.duration,Dn.firstSample=new Je(nn[0].dts,nn[0].pts,nn[0].duration,nn[0].originalDts,nn[0].isKeyframe),Dn.lastSample=new Je(sn.dts,sn.pts,sn.duration,sn.originalDts,sn.isKeyframe),this._isLive||this._videoSegmentInfoList.append(Dn),Ye.samples=nn,Ye.sequenceNumber++,this._forceFirstIDR){let On=nn[0].flags;On.dependsOn=2,On.isNonSync=0}let Nn=Ne.moof(Ye,Tt);Ye.samples=[],Ye.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(Nn,on).buffer,sampleCount:nn.length,info:Dn})}_mergeBoxes(Ke,qe){let Ye=new Uint8Array(Ke.byteLength+qe.byteLength);return Ye.set(Ke,0),Ye.set(qe,Ke.byteLength),Ye}}var gn=ln,An={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"};class ni{constructor(Ke,qe){this.TAG="TransmuxingController",this._emitter=new(ke()),this._config=qe,Ke.segments||(Ke.segments=[{duration:Ke.duration,filesize:Ke.filesize,url:Ke.url}]),typeof Ke.cors!="boolean"&&(Ke.cors=!0),typeof Ke.withCredentials!="boolean"&&(Ke.withCredentials=!1),this._mediaDataSource=Ke,this._currentSegmentIndex=0;let Ye=0;this._mediaDataSource.segments.forEach(St=>{St.timestampBase=Ye,Ye+=St.duration,St.cors=Ke.cors,St.withCredentials=Ke.withCredentials,qe.referrerPolicy&&(St.referrerPolicy=qe.referrerPolicy)}),!isNaN(Ye)&&this._mediaDataSource.duration!==Ye&&(this._mediaDataSource.duration=Ye),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}destroy(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null}on(Ke,qe){this._emitter.addListener(Ke,qe)}off(Ke,qe){this._emitter.removeListener(Ke,qe)}start(){this._loadSegment(0),this._enableStatisticsReporter()}_loadSegment(Ke,qe){this._currentSegmentIndex=Ke;let Ye=this._mediaDataSource.segments[Ke],St=this._ioctl=new yt(Ye,this._config,Ke);St.onError=this._onIOException.bind(this),St.onSeeked=this._onIOSeeked.bind(this),St.onComplete=this._onIOComplete.bind(this),St.onRedirect=this._onIORedirect.bind(this),St.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),qe?this._demuxer.bindDataSource(this._ioctl):St.onDataArrival=this._onInitChunkArrival.bind(this),St.open(qe)}stop(){this._internalAbort(),this._disableStatisticsReporter()}_internalAbort(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)}pause(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())}resume(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())}seek(Ke){if(this._mediaInfo==null||!this._mediaInfo.isSeekable())return;let qe=this._searchSegmentIndexContains(Ke);if(qe===this._currentSegmentIndex){let Ye=this._mediaInfo.segments[qe];if(Ye==null)this._pendingSeekTime=Ke;else{let St=Ye.getNearestKeyframe(Ke);this._remuxer.seek(St.milliseconds),this._ioctl.seek(St.fileposition),this._pendingResolveSeekPoint=St.milliseconds}}else{let Ye=this._mediaInfo.segments[qe];if(Ye==null)this._pendingSeekTime=Ke,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(qe);else{let St=Ye.getNearestKeyframe(Ke);this._internalAbort(),this._remuxer.seek(Ke),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[qe].timestampBase,this._loadSegment(qe,St.fileposition),this._pendingResolveSeekPoint=St.milliseconds,this._reportSegmentMediaInfo(qe)}}this._enableStatisticsReporter()}_searchSegmentIndexContains(Ke){let qe=this._mediaDataSource.segments,Ye=qe.length-1;for(let St=0;St<qe.length;St++)if(Ke<qe[St].timestampBase){Ye=St-1;break}return Ye}_onInitChunkArrival(Ke,qe){let Ye=null,St=0;if(qe>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,St=this._demuxer.parseChunks(Ke,qe);else if((Ye=Oe.probe(Ke)).match){this._demuxer=new Oe(Ye,this._config),this._remuxer||(this._remuxer=new gn(this._config));let Ot=this._mediaDataSource;Ot.duration!=null&&!isNaN(Ot.duration)&&(this._demuxer.overridedDuration=Ot.duration),typeof Ot.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=Ot.hasAudio),typeof Ot.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=Ot.hasVideo),this._demuxer.timestampBase=Ot.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),St=this._demuxer.parseChunks(Ke,qe)}else Ye=null,Le.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(()=>{this._internalAbort()}),this._emitter.emit(An.DEMUX_ERROR,vt.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),St=0;return St}_onMediaInfo(Ke){this._mediaInfo==null&&(this._mediaInfo=Object.assign({},Ke),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,Ht.prototype));let qe=Object.assign({},Ke);Object.setPrototypeOf(qe,Ht.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=qe,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(()=>{let Ye=this._pendingSeekTime;this._pendingSeekTime=null,this.seek(Ye)})}_onMetaDataArrived(Ke){this._emitter.emit(An.METADATA_ARRIVED,Ke)}_onScriptDataArrived(Ke){this._emitter.emit(An.SCRIPTDATA_ARRIVED,Ke)}_onIOSeeked(){this._remuxer.insertDiscontinuity()}_onIOComplete(Ke){let Ye=Ke+1;Ye<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(Ye)):(this._remuxer.flushStashedSamples(),this._emitter.emit(An.LOADING_COMPLETE),this._disableStatisticsReporter())}_onIORedirect(Ke){let qe=this._ioctl.extraData;this._mediaDataSource.segments[qe].redirectedURL=Ke}_onIORecoveredEarlyEof(){this._emitter.emit(An.RECOVERED_EARLY_EOF)}_onIOException(Ke,qe){Le.e(this.TAG,`IOException: type = ${Ke}, code = ${qe.code}, msg = ${qe.msg}`),this._emitter.emit(An.IO_ERROR,Ke,qe),this._disableStatisticsReporter()}_onDemuxException(Ke,qe){Le.e(this.TAG,`DemuxException: type = ${Ke}, info = ${qe}`),this._emitter.emit(An.DEMUX_ERROR,Ke,qe)}_onRemuxerInitSegmentArrival(Ke,qe){this._emitter.emit(An.INIT_SEGMENT,Ke,qe)}_onRemuxerMediaSegmentArrival(Ke,qe){if(this._pendingSeekTime==null&&(this._emitter.emit(An.MEDIA_SEGMENT,Ke,qe),this._pendingResolveSeekPoint!=null&&Ke==="video")){let Ye=qe.info.syncPoints,St=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,ie.safari&&Ye.length>0&&Ye[0].originalDts===St&&(St=Ye[0].pts),this._emitter.emit(An.RECOMMEND_SEEKPOINT,St)}}_enableStatisticsReporter(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}_disableStatisticsReporter(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}_reportSegmentMediaInfo(Ke){let qe=this._mediaInfo.segments[Ke],Ye=Object.assign({},qe);Ye.duration=this._mediaInfo.duration,Ye.segmentCount=this._mediaInfo.segmentCount,delete Ye.segments,delete Ye.keyframesIndex,this._emitter.emit(An.MEDIA_INFO,Ye)}_reportStatisticsInfo(){let Ke={};Ke.url=this._ioctl.currentURL,Ke.hasRedirect=this._ioctl.hasRedirect,Ke.hasRedirect&&(Ke.redirectedURL=this._ioctl.currentRedirectedURL),Ke.speed=this._ioctl.currentSpeed,Ke.loaderType=this._ioctl.loaderType,Ke.currentSegmentIndex=this._currentSegmentIndex,Ke.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(An.STATISTICS_INFO,Ke)}}var ai=ni,Ci=function(Xn){let Ke="TransmuxingWorker",qe=null,Ye=Dn.bind(this);me.install(),Xn.addEventListener("message",function(nn){switch(nn.data.cmd){case"init":qe=new ai(nn.data.param[0],nn.data.param[1]),qe.on(An.IO_ERROR,Nt.bind(this)),qe.on(An.DEMUX_ERROR,un.bind(this)),qe.on(An.INIT_SEGMENT,St.bind(this)),qe.on(An.MEDIA_SEGMENT,Ot.bind(this)),qe.on(An.LOADING_COMPLETE,Tt.bind(this)),qe.on(An.RECOVERED_EARLY_EOF,_t.bind(this)),qe.on(An.MEDIA_INFO,dn.bind(this)),qe.on(An.METADATA_ARRIVED,Pn.bind(this)),qe.on(An.SCRIPTDATA_ARRIVED,mn.bind(this)),qe.on(An.STATISTICS_INFO,on.bind(this)),qe.on(An.RECOMMEND_SEEKPOINT,Mn.bind(this));break;case"destroy":qe&&(qe.destroy(),qe=null),Xn.postMessage({msg:"destroyed"});break;case"start":qe.start();break;case"stop":qe.stop();break;case"seek":qe.seek(nn.data.param);break;case"pause":qe.pause();break;case"resume":qe.resume();break;case"logging_config":{let sn=nn.data.param;gt.applyConfig(sn),sn.enableCallback===!0?gt.addLogListener(Ye):gt.removeLogListener(Ye);break}}});function St(nn,sn){let Nn={msg:An.INIT_SEGMENT,data:{type:nn,data:sn}};Xn.postMessage(Nn,[sn.data])}function Ot(nn,sn){let Nn={msg:An.MEDIA_SEGMENT,data:{type:nn,data:sn}};Xn.postMessage(Nn,[sn.data])}function Tt(){let nn={msg:An.LOADING_COMPLETE};Xn.postMessage(nn)}function _t(){let nn={msg:An.RECOVERED_EARLY_EOF};Xn.postMessage(nn)}function dn(nn){let sn={msg:An.MEDIA_INFO,data:nn};Xn.postMessage(sn)}function Pn(nn){let sn={msg:An.METADATA_ARRIVED,data:nn};Xn.postMessage(sn)}function mn(nn){let sn={msg:An.SCRIPTDATA_ARRIVED,data:nn};Xn.postMessage(sn)}function on(nn){let sn={msg:An.STATISTICS_INFO,data:nn};Xn.postMessage(sn)}function Nt(nn,sn){Xn.postMessage({msg:An.IO_ERROR,data:{type:nn,info:sn}})}function un(nn,sn){Xn.postMessage({msg:An.DEMUX_ERROR,data:{type:nn,info:sn}})}function Mn(nn){Xn.postMessage({msg:An.RECOMMEND_SEEKPOINT,data:nn})}function Dn(nn,sn){Xn.postMessage({msg:"logcat_callback",data:{type:nn,logcat:sn}})}};class Ki{constructor(Ke,qe){if(this.TAG="Transmuxer",this._emitter=new(ke()),qe.enableWorker&&typeof Worker!="undefined")try{let Ye=Ee(82059);this._worker=Ye(Ci),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[Ke,qe]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},gt.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:gt.getConfig()})}catch(Ye){Le.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new ai(Ke,qe)}else this._controller=new ai(Ke,qe);if(this._controller){let Ye=this._controller;Ye.on(An.IO_ERROR,this._onIOError.bind(this)),Ye.on(An.DEMUX_ERROR,this._onDemuxError.bind(this)),Ye.on(An.INIT_SEGMENT,this._onInitSegment.bind(this)),Ye.on(An.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),Ye.on(An.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),Ye.on(An.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),Ye.on(An.MEDIA_INFO,this._onMediaInfo.bind(this)),Ye.on(An.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),Ye.on(An.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),Ye.on(An.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),Ye.on(An.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}destroy(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),gt.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}on(Ke,qe){this._emitter.addListener(Ke,qe)}off(Ke,qe){this._emitter.removeListener(Ke,qe)}hasWorker(){return this._worker!=null}open(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}close(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}seek(Ke){this._worker?this._worker.postMessage({cmd:"seek",param:Ke}):this._controller.seek(Ke)}pause(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}resume(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}_onInitSegment(Ke,qe){Promise.resolve().then(()=>{this._emitter.emit(An.INIT_SEGMENT,Ke,qe)})}_onMediaSegment(Ke,qe){Promise.resolve().then(()=>{this._emitter.emit(An.MEDIA_SEGMENT,Ke,qe)})}_onLoadingComplete(){Promise.resolve().then(()=>{this._emitter.emit(An.LOADING_COMPLETE)})}_onRecoveredEarlyEof(){Promise.resolve().then(()=>{this._emitter.emit(An.RECOVERED_EARLY_EOF)})}_onMediaInfo(Ke){Promise.resolve().then(()=>{this._emitter.emit(An.MEDIA_INFO,Ke)})}_onMetaDataArrived(Ke){Promise.resolve().then(()=>{this._emitter.emit(An.METADATA_ARRIVED,Ke)})}_onScriptDataArrived(Ke){Promise.resolve().then(()=>{this._emitter.emit(An.SCRIPTDATA_ARRIVED,Ke)})}_onStatisticsInfo(Ke){Promise.resolve().then(()=>{this._emitter.emit(An.STATISTICS_INFO,Ke)})}_onIOError(Ke,qe){Promise.resolve().then(()=>{this._emitter.emit(An.IO_ERROR,Ke,qe)})}_onDemuxError(Ke,qe){Promise.resolve().then(()=>{this._emitter.emit(An.DEMUX_ERROR,Ke,qe)})}_onRecommendSeekpoint(Ke){Promise.resolve().then(()=>{this._emitter.emit(An.RECOMMEND_SEEKPOINT,Ke)})}_onLoggingConfigChanged(Ke){this._worker&&this._worker.postMessage({cmd:"logging_config",param:Ke})}_onWorkerMessage(Ke){let qe=Ke.data,Ye=qe.data;if(qe.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(qe.msg){case An.INIT_SEGMENT:case An.MEDIA_SEGMENT:this._emitter.emit(qe.msg,Ye.type,Ye.data);break;case An.LOADING_COMPLETE:case An.RECOVERED_EARLY_EOF:this._emitter.emit(qe.msg);break;case An.MEDIA_INFO:Object.setPrototypeOf(Ye,Ht.prototype),this._emitter.emit(qe.msg,Ye);break;case An.METADATA_ARRIVED:case An.SCRIPTDATA_ARRIVED:case An.STATISTICS_INFO:this._emitter.emit(qe.msg,Ye);break;case An.IO_ERROR:case An.DEMUX_ERROR:this._emitter.emit(qe.msg,Ye.type,Ye.info);break;case An.RECOMMEND_SEEKPOINT:this._emitter.emit(qe.msg,Ye);break;case"logcat_callback":Le.emitter.emit("log",Ye.type,Ye.logcat);break;default:break}}}var ir=Ki,Ji={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};class Fr{constructor(Ke){this.TAG="MSEController",this._config=Ke,this._emitter=new(ke()),this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new en}destroy(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}on(Ke,qe){this._emitter.addListener(Ke,qe)}off(Ke,qe){this._emitter.removeListener(Ke,qe)}attachMediaElement(Ke){if(this._mediaSource)throw new ge("MediaSource has been attached to an HTMLMediaElement!");let qe=this._mediaSource=new window.MediaSource;qe.addEventListener("sourceopen",this.e.onSourceOpen),qe.addEventListener("sourceended",this.e.onSourceEnded),qe.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=Ke,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),Ke.src=this._mediaSourceObjectURL}detachMediaElement(){if(this._mediaSource){let Ke=this._mediaSource;for(let qe in this._sourceBuffers){let Ye=this._pendingSegments[qe];Ye.splice(0,Ye.length),this._pendingSegments[qe]=null,this._pendingRemoveRanges[qe]=null,this._lastInitSegments[qe]=null;let St=this._sourceBuffers[qe];if(St){if(Ke.readyState!=="closed"){try{Ke.removeSourceBuffer(St)}catch(Ot){Le.e(this.TAG,Ot.message)}St.removeEventListener("error",this.e.onSourceBufferError),St.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[qe]=null,this._sourceBuffers[qe]=null}}if(Ke.readyState==="open")try{Ke.endOfStream()}catch(qe){Le.e(this.TAG,qe.message)}Ke.removeEventListener("sourceopen",this.e.onSourceOpen),Ke.removeEventListener("sourceended",this.e.onSourceEnded),Ke.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}appendInitSegment(Ke,qe){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(Ke),this._pendingSegments[Ke.type].push(Ke);return}let Ye=Ke,St=`${Ye.container}`;Ye.codec&&Ye.codec.length>0&&(St+=`;codecs=${Ye.codec}`);let Ot=!1;if(Le.v(this.TAG,"Received Initialization Segment, mimeType: "+St),this._lastInitSegments[Ye.type]=Ye,St!==this._mimeTypes[Ye.type]){if(this._mimeTypes[Ye.type])Le.v(this.TAG,`Notice: ${Ye.type} mimeType changed, origin: ${this._mimeTypes[Ye.type]}, target: ${St}`);else{Ot=!0;try{let Tt=this._sourceBuffers[Ye.type]=this._mediaSource.addSourceBuffer(St);Tt.addEventListener("error",this.e.onSourceBufferError),Tt.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(Tt){Le.e(this.TAG,Tt.message),this._emitter.emit(Ji.ERROR,{code:Tt.code,msg:Tt.message});return}}this._mimeTypes[Ye.type]=St}qe||this._pendingSegments[Ye.type].push(Ye),Ot||this._sourceBuffers[Ye.type]&&!this._sourceBuffers[Ye.type].updating&&this._doAppendSegments(),ie.safari&&Ye.container==="audio/mpeg"&&Ye.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=Ye.mediaDuration/1e3,this._updateMediaSourceDuration())}appendMediaSegment(Ke){let qe=Ke;this._pendingSegments[qe.type].push(qe),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();let Ye=this._sourceBuffers[qe.type];Ye&&!Ye.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}seek(Ke){for(let qe in this._sourceBuffers){if(!this._sourceBuffers[qe])continue;let Ye=this._sourceBuffers[qe];if(this._mediaSource.readyState==="open")try{Ye.abort()}catch(Ot){Le.e(this.TAG,Ot.message)}this._idrList.clear();let St=this._pendingSegments[qe];if(St.splice(0,St.length),this._mediaSource.readyState!=="closed"){for(let Ot=0;Ot<Ye.buffered.length;Ot++){let Tt=Ye.buffered.start(Ot),_t=Ye.buffered.end(Ot);this._pendingRemoveRanges[qe].push({start:Tt,end:_t})}if(Ye.updating||this._doRemoveRanges(),ie.safari){let Ot=this._lastInitSegments[qe];Ot&&(this._pendingSegments[qe].push(Ot),Ye.updating||this._doAppendSegments())}}}}endOfStream(){let Ke=this._mediaSource,qe=this._sourceBuffers;if(!Ke||Ke.readyState!=="open"){Ke&&Ke.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0);return}qe.video&&qe.video.updating||qe.audio&&qe.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,Ke.endOfStream())}getNearestKeyframe(Ke){return this._idrList.getLastSyncPointBeforeDts(Ke)}_needCleanupSourceBuffer(){if(!this._config.autoCleanupSourceBuffer)return!1;let Ke=this._mediaElement.currentTime;for(let qe in this._sourceBuffers){let Ye=this._sourceBuffers[qe];if(Ye){let St=Ye.buffered;if(St.length>=1&&Ke-St.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}_doCleanupSourceBuffer(){let Ke=this._mediaElement.currentTime;for(let qe in this._sourceBuffers){let Ye=this._sourceBuffers[qe];if(Ye){let St=Ye.buffered,Ot=!1;for(let Tt=0;Tt<St.length;Tt++){let _t=St.start(Tt),dn=St.end(Tt);if(_t<=Ke&&Ke<dn+3){if(Ke-_t>=this._config.autoCleanupMaxBackwardDuration){Ot=!0;let Pn=Ke-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[qe].push({start:_t,end:Pn})}}else dn<Ke&&(Ot=!0,this._pendingRemoveRanges[qe].push({start:_t,end:dn}))}Ot&&!Ye.updating&&this._doRemoveRanges()}}}_updateMediaSourceDuration(){let Ke=this._sourceBuffers;if(this._mediaElement.readyState===0||this._mediaSource.readyState!=="open"||Ke.video&&Ke.video.updating||Ke.audio&&Ke.audio.updating)return;let qe=this._mediaSource.duration,Ye=this._pendingMediaDuration;Ye>0&&(isNaN(qe)||Ye>qe)&&(Le.v(this.TAG,`Update MediaSource duration from ${qe} to ${Ye}`),this._mediaSource.duration=Ye),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}_doRemoveRanges(){for(let Ke in this._pendingRemoveRanges){if(!this._sourceBuffers[Ke]||this._sourceBuffers[Ke].updating)continue;let qe=this._sourceBuffers[Ke],Ye=this._pendingRemoveRanges[Ke];for(;Ye.length&&!qe.updating;){let St=Ye.shift();qe.remove(St.start,St.end)}}}_doAppendSegments(){let Ke=this._pendingSegments;for(let qe in Ke)if(!(!this._sourceBuffers[qe]||this._sourceBuffers[qe].updating)&&Ke[qe].length>0){let Ye=Ke[qe].shift();if(Ye.timestampOffset){let St=this._sourceBuffers[qe].timestampOffset,Ot=Ye.timestampOffset/1e3;Math.abs(St-Ot)>.1&&(Le.v(this.TAG,`Update MPEG audio timestampOffset from ${St} to ${Ot}`),this._sourceBuffers[qe].timestampOffset=Ot),delete Ye.timestampOffset}if(!Ye.data||Ye.data.byteLength===0)continue;try{this._sourceBuffers[qe].appendBuffer(Ye.data),this._isBufferFull=!1,qe==="video"&&Ye.hasOwnProperty("info")&&this._idrList.appendArray(Ye.info.syncPoints)}catch(St){this._pendingSegments[qe].unshift(Ye),St.code===22?(this._isBufferFull||this._emitter.emit(Ji.BUFFER_FULL),this._isBufferFull=!0):(Le.e(this.TAG,St.message),this._emitter.emit(Ji.ERROR,{code:St.code,msg:St.message}))}}}_onSourceOpen(){if(Le.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0){let Ke=this._pendingSourceBufferInit;for(;Ke.length;){let qe=Ke.shift();this.appendInitSegment(qe,!0)}}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(Ji.SOURCE_OPEN)}_onSourceEnded(){Le.v(this.TAG,"MediaSource onSourceEnded")}_onSourceClose(){Le.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}_hasPendingSegments(){let Ke=this._pendingSegments;return Ke.video.length>0||Ke.audio.length>0}_hasPendingRemoveRanges(){let Ke=this._pendingRemoveRanges;return Ke.video.length>0||Ke.audio.length>0}_onSourceBufferUpdateEnd(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(Ji.UPDATE_END)}_onSourceBufferError(Ke){Le.e(this.TAG,`SourceBuffer Error: ${Ke}`)}}var Mr=Fr;const vi={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},wr={NETWORK_EXCEPTION:ce.EXCEPTION,NETWORK_STATUS_CODE_INVALID:ce.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:ce.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:ce.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:vt.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:vt.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:vt.CODEC_UNSUPPORTED};class Tr{constructor(Ke,qe){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(ke()),this._config=zt(),typeof qe=="object"&&Object.assign(this._config,qe),Ke.type.toLowerCase()!=="flv")throw new le("FlvPlayer requires an flv MediaDataSource input!");Ke.isLive===!0&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=Ke,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;let Ye=ie.chrome&&(ie.version.major<50||ie.version.major===50&&ie.version.build<2661);this._alwaysSeekKeyframe=!!(Ye||ie.msedge||ie.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}destroy(){this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on(Ke,qe){Ke===mt.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(mt.MEDIA_INFO,this.mediaInfo)}):Ke===mt.STATISTICS_INFO&&this._statisticsInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(mt.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(Ke,qe)}off(Ke,qe){this._emitter.removeListener(Ke,qe)}attachMediaElement(Ke){if(this._mediaElement=Ke,Ke.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),Ke.addEventListener("seeking",this.e.onvSeeking),Ke.addEventListener("canplay",this.e.onvCanPlay),Ke.addEventListener("stalled",this.e.onvStalled),Ke.addEventListener("progress",this.e.onvProgress),this._msectl=new Mr(this._config),this._msectl.on(Ji.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(Ji.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(Ji.SOURCE_OPEN,()=>{this._mseSourceOpened=!0,this._hasPendingLoad&&(this._hasPendingLoad=!1,this.load())}),this._msectl.on(Ji.ERROR,qe=>{this._emitter.emit(mt.ERROR,vi.MEDIA_ERROR,wr.MEDIA_MSE_ERROR,qe)}),this._msectl.attachMediaElement(Ke),this._pendingSeekTime!=null)try{Ke.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(qe){}}detachMediaElement(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}load(){if(!this._mediaElement)throw new ge("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new ge("FlvPlayer.load() has been called, please call unload() first!");if(!this._hasPendingLoad){if(this._config.deferLoadAfterSourceOpen&&this._mseSourceOpened===!1){this._hasPendingLoad=!0;return}this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new ir(this._mediaDataSource,this._config),this._transmuxer.on(An.INIT_SEGMENT,(Ke,qe)=>{this._msectl.appendInitSegment(qe)}),this._transmuxer.on(An.MEDIA_SEGMENT,(Ke,qe)=>{if(this._msectl.appendMediaSegment(qe),this._config.lazyLoad&&!this._config.isLive){let Ye=this._mediaElement.currentTime;qe.info.endDts>=(Ye+this._config.lazyLoadMaxDuration)*1e3&&this._progressChecker==null&&(Le.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}),this._transmuxer.on(An.LOADING_COMPLETE,()=>{this._msectl.endOfStream(),this._emitter.emit(mt.LOADING_COMPLETE)}),this._transmuxer.on(An.RECOVERED_EARLY_EOF,()=>{this._emitter.emit(mt.RECOVERED_EARLY_EOF)}),this._transmuxer.on(An.IO_ERROR,(Ke,qe)=>{this._emitter.emit(mt.ERROR,vi.NETWORK_ERROR,Ke,qe)}),this._transmuxer.on(An.DEMUX_ERROR,(Ke,qe)=>{this._emitter.emit(mt.ERROR,vi.MEDIA_ERROR,Ke,{code:-1,msg:qe})}),this._transmuxer.on(An.MEDIA_INFO,Ke=>{this._mediaInfo=Ke,this._emitter.emit(mt.MEDIA_INFO,Object.assign({},Ke))}),this._transmuxer.on(An.METADATA_ARRIVED,Ke=>{this._emitter.emit(mt.METADATA_ARRIVED,Ke)}),this._transmuxer.on(An.SCRIPTDATA_ARRIVED,Ke=>{this._emitter.emit(mt.SCRIPTDATA_ARRIVED,Ke)}),this._transmuxer.on(An.STATISTICS_INFO,Ke=>{this._statisticsInfo=this._fillStatisticsInfo(Ke),this._emitter.emit(mt.STATISTICS_INFO,Object.assign({},this._statisticsInfo))}),this._transmuxer.on(An.RECOMMEND_SEEKPOINT,Ke=>{this._mediaElement&&!this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=Ke/1e3)}),this._transmuxer.open()}}unload(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}play(){return this._mediaElement.play()}pause(){this._mediaElement.pause()}get type(){return this._type}get buffered(){return this._mediaElement.buffered}get duration(){return this._mediaElement.duration}get volume(){return this._mediaElement.volume}set volume(Ke){this._mediaElement.volume=Ke}get muted(){return this._mediaElement.muted}set muted(Ke){this._mediaElement.muted=Ke}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(Ke){this._mediaElement?this._internalSeek(Ke):this._pendingSeekTime=Ke}get mediaInfo(){return Object.assign({},this._mediaInfo)}get statisticsInfo(){return this._statisticsInfo==null&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}_fillStatisticsInfo(Ke){if(Ke.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return Ke;let qe=!0,Ye=0,St=0;if(this._mediaElement.getVideoPlaybackQuality){let Ot=this._mediaElement.getVideoPlaybackQuality();Ye=Ot.totalVideoFrames,St=Ot.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(Ye=this._mediaElement.webkitDecodedFrameCount,St=this._mediaElement.webkitDroppedFrameCount):qe=!1;return qe&&(Ke.decodedFrames=Ye,Ke.droppedFrames=St),Ke}_onmseUpdateEnd(){if(!this._config.lazyLoad||this._config.isLive)return;let Ke=this._mediaElement.buffered,qe=this._mediaElement.currentTime,Ye=0,St=0;for(let Ot=0;Ot<Ke.length;Ot++){let Tt=Ke.start(Ot),_t=Ke.end(Ot);if(Tt<=qe&&qe<_t){Ye=Tt,St=_t;break}}St>=qe+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(Le.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}_onmseBufferFull(){Le.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._progressChecker==null&&this._suspendTransmuxer()}_suspendTransmuxer(){this._transmuxer&&(this._transmuxer.pause(),this._progressChecker==null&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}_checkProgressAndResume(){let Ke=this._mediaElement.currentTime,qe=this._mediaElement.buffered,Ye=!1;for(let St=0;St<qe.length;St++){let Ot=qe.start(St),Tt=qe.end(St);if(Ke>=Ot&&Ke<Tt){Ke>=Tt-this._config.lazyLoadRecoverDuration&&(Ye=!0);break}}Ye&&(window.clearInterval(this._progressChecker),this._progressChecker=null,Ye&&(Le.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}_isTimepointBuffered(Ke){let qe=this._mediaElement.buffered;for(let Ye=0;Ye<qe.length;Ye++){let St=qe.start(Ye),Ot=qe.end(Ye);if(Ke>=St&&Ke<Ot)return!0}return!1}_internalSeek(Ke){let qe=this._isTimepointBuffered(Ke),Ye=!1,St=0;if(Ke<1&&this._mediaElement.buffered.length>0){let Ot=this._mediaElement.buffered.start(0);(Ot<1&&Ke<Ot||ie.safari)&&(Ye=!0,St=ie.safari?.1:Ot)}if(Ye)this._requestSetTime=!0,this._mediaElement.currentTime=St;else if(qe){if(!this._alwaysSeekKeyframe)this._requestSetTime=!0,this._mediaElement.currentTime=Ke;else{let Ot=this._msectl.getNearestKeyframe(Math.floor(Ke*1e3));this._requestSetTime=!0,Ot!=null?this._mediaElement.currentTime=Ot.dts/1e3:this._mediaElement.currentTime=Ke}this._progressChecker!=null&&this._checkProgressAndResume()}else this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(Ke),this._transmuxer.seek(Math.floor(Ke*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=Ke)}_checkAndApplyUnbufferedSeekpoint(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){let Ke=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(Ke)||(this._progressChecker!=null&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(Ke),this._transmuxer.seek(Math.floor(Ke*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=Ke))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_checkAndResumeStuckPlayback(Ke){let qe=this._mediaElement;if(Ke||!this._receivedCanPlay||qe.readyState<2){let Ye=qe.buffered;Ye.length>0&&qe.currentTime<Ye.start(0)&&(Le.w(this.TAG,`Playback seems stuck at ${qe.currentTime}, seek to ${Ye.start(0)}`),this._requestSetTime=!0,this._mediaElement.currentTime=Ye.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}_onvLoadedMetadata(Ke){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}_onvSeeking(Ke){let qe=this._mediaElement.currentTime,Ye=this._mediaElement.buffered;if(this._requestSetTime){this._requestSetTime=!1;return}if(qe<1&&Ye.length>0){let St=Ye.start(0);if(St<1&&qe<St||ie.safari){this._requestSetTime=!0,this._mediaElement.currentTime=ie.safari?.1:St;return}}if(this._isTimepointBuffered(qe)){if(this._alwaysSeekKeyframe){let St=this._msectl.getNearestKeyframe(Math.floor(qe*1e3));St!=null&&(this._requestSetTime=!0,this._mediaElement.currentTime=St.dts/1e3)}this._progressChecker!=null&&this._checkProgressAndResume();return}this._seekpointRecord={seekPoint:qe,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_onvCanPlay(Ke){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}_onvStalled(Ke){this._checkAndResumeStuckPlayback(!0)}_onvProgress(Ke){this._checkAndResumeStuckPlayback()}}var it=Tr;class Rr{constructor(Ke,qe){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new(ke()),this._config=zt(),typeof qe=="object"&&Object.assign(this._config,qe),Ke.type.toLowerCase()==="flv")throw new le("NativePlayer does't support flv MediaDataSource input!");if(Ke.hasOwnProperty("segments"))throw new le(`NativePlayer(${Ke.type}) doesn't support multipart playback!`);this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=Ke,this._mediaElement=null}destroy(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on(Ke,qe){Ke===mt.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(mt.MEDIA_INFO,this.mediaInfo)}):Ke===mt.STATISTICS_INFO&&this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(mt.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(Ke,qe)}off(Ke,qe){this._emitter.removeListener(Ke,qe)}attachMediaElement(Ke){if(this._mediaElement=Ke,Ke.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{Ke.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(qe){}}detachMediaElement(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}load(){if(!this._mediaElement)throw new ge("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}unload(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}play(){return this._mediaElement.play()}pause(){this._mediaElement.pause()}get type(){return this._type}get buffered(){return this._mediaElement.buffered}get duration(){return this._mediaElement.duration}get volume(){return this._mediaElement.volume}set volume(Ke){this._mediaElement.volume=Ke}get muted(){return this._mediaElement.muted}set muted(Ke){this._mediaElement.muted=Ke}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(Ke){this._mediaElement?this._mediaElement.currentTime=Ke:this._pendingSeekTime=Ke}get mediaInfo(){let qe={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(qe.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(qe.width=this._mediaElement.videoWidth,qe.height=this._mediaElement.videoHeight)),qe}get statisticsInfo(){let Ke={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return Ke;let qe=!0,Ye=0,St=0;if(this._mediaElement.getVideoPlaybackQuality){let Ot=this._mediaElement.getVideoPlaybackQuality();Ye=Ot.totalVideoFrames,St=Ot.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(Ye=this._mediaElement.webkitDecodedFrameCount,St=this._mediaElement.webkitDroppedFrameCount):qe=!1;return qe&&(Ke.decodedFrames=Ye,Ke.droppedFrames=St),Ke}_onvLoadedMetadata(Ke){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(mt.MEDIA_INFO,this.mediaInfo)}_reportStatisticsInfo(){this._emitter.emit(mt.STATISTICS_INFO,this.statisticsInfo)}}var Or=Rr;me.install();function Ur(Xn,Ke){let qe=Xn;if(qe==null||typeof qe!="object")throw new le("MediaDataSource must be an javascript object!");if(!qe.hasOwnProperty("type"))throw new le("MediaDataSource must has type field to indicate video file type!");switch(qe.type){case"flv":return new it(qe,Ke);default:return new Or(qe,Ke)}}function uo(){return tt.supportMSEH264Playback()}function po(){return tt.getFeatureList()}let io={};io.createPlayer=Ur,io.isSupported=uo,io.getFeatureList=po,io.BaseLoader=z,io.LoaderStatus=de,io.LoaderErrors=ce,io.Events=mt,io.ErrorTypes=vi,io.ErrorDetails=wr,io.FlvPlayer=it,io.NativePlayer=Or,io.LoggingControl=gt,Object.defineProperty(io,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var Do=io},93125:function(_n,qt,Ee){(function(Me){if(1)window.OSS=Me(),_n.exports=Me();else var me})(function(){var Me;return function(){function me(Be,ke,Ce){function Le(xe,ge){if(!ke[xe]){if(!Be[xe]){var le=void 0;if(!ge&&le)return require(xe,!0);if(he)return he(xe,!0);var ve=new Error("Cannot find module '"+xe+"'");throw ve.code="MODULE_NOT_FOUND",ve}var de=ke[xe]={exports:{}};Be[xe][0].call(de.exports,function(ce){return Le(Be[xe][1][ce]||ce)},de,de.exports,me,Be,ke,Ce)}return ke[xe].exports}for(var he=void 0,ye=0;ye<Ce.length;ye++)Le(Ce[ye]);return Le}return me}()({1:[function(me,Be,ke){"use strict";var Ce=me("./browser/client");Ce.Buffer=me("buffer").Buffer,Ce.co=me("co"),Ce.urllib=me("../shims/xhr"),Ce.version=me("./browser/version").version,Be.exports=Ce},{"../shims/xhr":244,"./browser/client":2,"./browser/version":5,buffer:38,co:41}],2:[function(me,Be,ke){(function(Ce,Le){"use strict";function he(tt){return tt&&tt.__esModule?tt:{default:tt}}function ye(tt,ut){return tt[ut]||tt[ut.toLowerCase()]}function xe(tt,ut){var mt=ze.parse(tt);if(!mt.protocol){var Pt=ut?"https://":"http://";mt=ze.parse(Pt+tt)}if(mt.protocol!=="http:"&&mt.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return mt}function ge(tt,ut,mt){var Pt=mt?"https://":"http://",gt=ut?"-internal.aliyuncs.com":".aliyuncs.com";return tt.substr(0,14)==="vpc100-oss-cn-"&&(gt=".aliyuncs.com"),ze.parse(Pt+tt+gt)}function le(){return document&&document.location&&document.location.protocol==="https:"}function ve(tt,ut){if(!(this instanceof ve))return new ve(tt,ut);tt&&tt.inited?this.options=tt:this.options=ve.initOptions(tt),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=ft,this.agent=this.options.agent||zt),this.ctx=ut,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}var de=me("babel-runtime/regenerator"),ce=he(de),z=me("babel-runtime/core-js/object/keys"),ee=he(z),oe=me("debug")("ali-oss"),ie=me("./../../shims/crypto/crypto.js"),se=me("path"),ue=me("copy-to"),Se=me("mime"),we=me("xml2js"),Pe=me("humanize-ms"),Ae=me("agentkeepalive"),De=me("merge-descriptors"),ze=me("url"),Ze=me("is-type-of"),Xe=me("platform"),Ge=me("utility"),ft=me("urllib"),at=me("./version"),Ct=me("dateformat"),et=me("bowser"),yt=me("../common/signUtils"),st=me("../common/utils"),zt=new Ae;Be.exports=ve,ve.initOptions=function(tt){if(!tt||!tt.accessKeyId||!tt.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");var ut=le(),mt={region:"oss-cn-hangzhou",internal:!1,secure:ut,bucket:null,endpoint:null,cname:!1};if((0,ee.default)(tt).forEach(function(Pt){tt[Pt]!==void 0&&(mt[Pt]=tt[Pt])}),mt.accessKeyId=mt.accessKeyId.trim(),mt.accessKeySecret=mt.accessKeySecret.trim(),mt.timeout&&(mt.timeout=Pe(mt.timeout)),mt.endpoint)mt.endpoint=xe(mt.endpoint,mt.secure);else{if(!mt.region)throw new Error("require options.endpoint or options.region");mt.endpoint=ge(mt.region,mt.internal,mt.secure)}return mt.inited=!0,mt};var lt=ve.prototype;De(lt,me("./object")),De(lt,me("./managed_upload")),De(lt,me("../common/multipart")),De(lt,me("../common/thunkpool.js")),ve.Wrapper=me("./wrapper"),lt.signature=function(tt){return oe("authorization stringToSign: %s",tt),yt.computeSignature(this.options.accessKeySecret,tt)},lt.authorization=function(tt,ut,mt,Pt){var gt=yt.buildCanonicalString(tt.toUpperCase(),ut,{headers:Pt,parameters:mt});return yt.authorization(this.options.accessKeyId,this.options.accessKeySecret,gt)},lt.createRequest=function(tt){var ut={"x-oss-date":Ct(+new Date+this.options.amendTimeSkewed,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.options.stsToken&&(ut["x-oss-security-token"]=this.options.stsToken),ue(tt.headers).to(ut),ye(ut,"Content-Type")||(tt.mime===Se.default_type&&(tt.mime=""),tt.mime&&tt.mime.indexOf("/")>0?ut["Content-Type"]=tt.mime:ut["Content-Type"]=Se.getType(tt.mime||se.extname(tt.object||""))||"application/octet-stream"),tt.content&&(ut["Content-Md5"]=ie.createHash("md5").update(new Le(tt.content,"utf8")).digest("base64"),ut["Content-Length"]||(ut["Content-Length"]=tt.content.length));var mt=this._getResource(tt);ut.authorization=this.authorization(tt.method,mt,tt.subres,ut);var Pt=this._getReqUrl(tt);oe("request %s %s, with headers %j, !!stream: %s",tt.method,Pt,ut,!!tt.stream);var gt=tt.timeout||this.options.timeout;return{url:Pt,params:{agent:this.agent,method:tt.method,content:tt.content,stream:tt.stream,headers:ut,timeout:gt,writeStream:tt.writeStream,customResponse:tt.customResponse,ctx:tt.ctx||this.ctx}}},lt.request=ce.default.mark(function tt(ut){var mt,Pt,gt,Ft;return ce.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return mt=this.createRequest(ut),Pt=void 0,gt=void 0,Ht.prev=3,Ht.next=6,this.urllib.request(mt.url,mt.params);case 6:Pt=Ht.sent,oe("response %s %s, got %s, headers: %j",ut.method,mt.url,Pt.status,Pt.headers),Ht.next=13;break;case 10:Ht.prev=10,Ht.t0=Ht.catch(3),gt=Ht.t0;case 13:if(Ft=void 0,!Pt||!ut.successStatuses||ut.successStatuses.indexOf(Pt.status)!==-1){Ht.next=26;break}return Ht.next=17,this.requestError(Pt);case 17:if(Ft=Ht.sent,Ft.code!=="RequestTimeTooSkewed"){Ht.next=23;break}return this.options.amendTimeSkewed=+new Date(Ft.serverTime)-new Date,Ht.next=22,this.request(ut);case 22:return Ht.abrupt("return",Ht.sent);case 23:Ft.params=ut,Ht.next=30;break;case 26:if(!gt){Ht.next=30;break}return Ht.next=29,this.requestError(gt);case 29:Ft=Ht.sent;case 30:if(!Ft){Ht.next=32;break}throw Ft;case 32:if(!ut.xmlResponse){Ht.next=36;break}return Ht.next=35,this.parseXML(Pt.data);case 35:Pt.data=Ht.sent;case 36:return Ht.abrupt("return",Pt);case 37:case"end":return Ht.stop()}},tt,this,[[3,10]])}),lt._getResource=function(tt){var ut="/";return tt.bucket&&(ut+=tt.bucket+"/"),tt.object&&(ut+=tt.object),ut},lt._isIP=function(tt){return st._isIP(tt)},lt._escape=function(tt){return Ge.encodeURIComponent(tt).replace(/%2F/g,"/")},lt._getReqUrl=function(tt){var ut={};ue(this.options.endpoint).to(ut);var mt=this._isIP(ut.hostname),Pt=this.options.cname;!tt.bucket||Pt||mt||(ut.host=tt.bucket+"."+ut.host);var gt="/";tt.bucket&&mt&&(gt+=tt.bucket+"/"),tt.object&&(gt+=this._escape(tt.object).replace(/\+/g,"%2B")),ut.pathname=gt;var Ft={};if(tt.query&&De(Ft,tt.query),tt.subres){var Ht={};Ze.string(tt.subres)?Ht[tt.subres]="":Ze.array(tt.subres)?tt.subres.forEach(function(hn){Ht[hn]=""}):Ht=tt.subres,De(Ft,Ht)}return ut.query=Ft,ze.format(ut)},lt._getUserAgent=function(){var tt=Ce&&Ce.browser?"js":"nodejs",ut="aliyun-sdk-"+tt+"/"+at.version,mt=Xe.description;return!mt&&Ce&&(mt="Node.js "+Ce.version.slice(1)+" on "+Ce.platform+" "+Ce.arch),this._checkUserAgent(ut+" "+mt)},lt._checkUserAgent=function(tt){return tt.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},lt.checkBrowserAndVersion=function(tt,ut){return et.name===tt&&et.version.split(".")[0]===ut},lt.parseXML=function(tt){return function(ut){Le.isBuffer(tt)&&(tt=tt.toString()),we.parseString(tt,{explicitRoot:!1,explicitArray:!1},ut)}},lt.requestError=ce.default.mark(function tt(ut){var mt,Pt,gt,Ft;return ce.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(mt=null,ut.data&&ut.data.length){Ht.next=5;break}ut.status===-1||ut.status===-2?(mt=new Error(ut.message),mt.name=ut.name,mt.status=ut.status,mt.code=ut.name):(ut.status===404?(mt=new Error("Object not exists"),mt.name="NoSuchKeyError",mt.status=404,mt.code="NoSuchKey"):ut.status===412?(mt=new Error("Pre condition failed"),mt.name="PreconditionFailedError",mt.status=412,mt.code="PreconditionFailed"):(mt=new Error("Unknow error, status: "+ut.status),mt.name="UnknowError",mt.status=ut.status),mt.requestId=ut.headers["x-oss-request-id"],mt.host=""),Ht.next=30;break;case 5:return Pt=String(ut.data),oe("request response error data: %s",Pt),gt=void 0,Ht.prev=8,Ht.next=11,this.parseXML(Pt)||{};case 11:gt=Ht.sent,Ht.next=21;break;case 14:return Ht.prev=14,Ht.t0=Ht.catch(8),oe(Pt),Ht.t0.message+=`
|
|
|
raw xml: `+Pt,Ht.t0.status=ut.status,Ht.t0.requestId=ut.headers["x-oss-request-id"],Ht.abrupt("return",Ht.t0);case 21:Ft=gt.Message||"unknow request error, status: "+ut.status,gt.Condition&&(Ft+=" (condition: "+gt.Condition+")"),mt=new Error(Ft),mt.name=gt.Code?gt.Code+"Error":"UnknowError",mt.status=ut.status,mt.code=gt.Code,mt.requestId=gt.RequestId,mt.hostId=gt.HostId,mt.serverTime=gt.ServerTime;case 30:return oe("generate error %j",mt),Ht.abrupt("return",mt);case 32:case"end":return Ht.stop()}},tt,this,[[8,14]])})}).call(this,me("_process"),me("buffer").Buffer)},{"../common/multipart":8,"../common/signUtils":9,"../common/thunkpool.js":10,"../common/utils":11,"./../../shims/crypto/crypto.js":237,"./managed_upload":3,"./object":4,"./version":5,"./wrapper":6,_process:173,agentkeepalive:12,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,bowser:35,buffer:38,"copy-to":43,dateformat:154,debug:155,"humanize-ms":160,"is-type-of":165,"merge-descriptors":168,mime:242,path:170,platform:171,url:203,urllib:244,utility:243,xml2js:213}],3:[function(me,Be,ke){(function(Ce){"use strict";function Le(ue){return ue&&ue.__esModule?ue:{default:ue}}function he(ue,Se){if(!(this instanceof he))return new he(ue,Se);se.call(this,Se),this.file=ue,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}var ye=me("babel-runtime/core-js/array/from"),xe=Le(ye),ge=me("babel-runtime/regenerator"),le=Le(ge),ve=me("is-type-of"),de=me("util"),ce=me("path"),z=me("mime"),ee=me("copy-to"),oe=ke;oe.multipartUpload=le.default.mark(function ue(Se,we,Pe){var Ae,De,ze,Ze,Xe,Ge,ft,at,Ct;return le.default.wrap(function(et){for(;;)switch(et.prev=et.next){case 0:if(this.resetCancelFlag(),Pe=Pe||{},!Pe.checkpoint||!Pe.checkpoint.uploadId){et.next=6;break}return et.next=5,this._resumeMultipart(Pe.checkpoint,Pe);case 5:return et.abrupt("return",et.sent);case 6:return Ae=102400,Pe.mime||(ve.file(we)?Pe.mime=z.getType(ce.extname(we.name)):ve.blob(we)?Pe.mime=we.type:Pe.mime=z.getType(ce.extname(we))),Pe.headers=Pe.headers||{},this._convertMetaToHeaders(Pe.meta,Pe.headers),et.next=12,this._getFileSize(we);case 12:if(!((De=et.sent)<Ae)){et.next=25;break}return ze=this._createStream(we,0,De),Pe.contentLength=De,et.next=18,this.putStream(Se,ze,Pe);case 18:if(Ze=et.sent,!Pe||!Pe.progress){et.next=22;break}return et.next=22,Pe.progress(1);case 22:return Xe={res:Ze.res,bucket:this.options.bucket,name:Se,etag:Ze.res.headers.etag},(Pe.headers&&Pe.headers["x-oss-callback"]||Pe.callback)&&(Xe.data=Ze.data),et.abrupt("return",Xe);case 25:if(!(Pe.partSize&&Pe.partSize<Ae)){et.next=27;break}throw new Error("partSize must not be smaller than "+Ae);case 27:return et.next=29,this.initMultipartUpload(Se,Pe);case 29:if(Ge=et.sent,ft=Ge.uploadId,at=this._getPartSize(De,Pe.partSize),Ct={file:we,name:Se,fileSize:De,partSize:at,uploadId:ft,doneParts:[]},!Pe||!Pe.progress){et.next=36;break}return et.next=36,Pe.progress(0,Ct,Ge.res);case 36:return et.next=38,this._resumeMultipart(Ct,Pe);case 38:return et.abrupt("return",et.sent);case 39:case"end":return et.stop()}},ue,this)}),oe._resumeMultipart=le.default.mark(function ue(Se,we){var Pe,Ae,De,ze,Ze,Xe,Ge,ft,at,Ct,et,yt,st,zt,lt,tt,ut,mt,Pt,gt,Ft;return le.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(!this.isCancel()){Ht.next=2;break}throw this._makeCancelEvent();case 2:if(Pe=Se.file,Ae=Se.fileSize,De=Se.partSize,ze=Se.uploadId,Ze=Se.doneParts,Xe=Se.name,Ge=[],Ze.length>0&&ee(Ze).to(Ge),ft=this._divideParts(Ae,De),at=ft.length,Ct=!1,et=le.default.mark(function hn(Jt,bn){var Wt,Kt,Xt;return le.default.wrap(function($t){for(;;)switch($t.prev=$t.next){case 0:if(Jt.isCancel()){$t.next=21;break}return $t.prev=1,Wt=ft[bn-1],Kt={stream:Jt._createStream(Pe,Wt.start,Wt.end),size:Wt.end-Wt.start},$t.next=6,Jt._uploadPart(Xe,ze,bn,Kt);case 6:if(Xt=$t.sent,Jt.isCancel()||Ct){$t.next=13;break}if(Se.doneParts.push({number:bn,etag:Xt.res.headers.etag}),Ge.push({number:bn,etag:Xt.res.headers.etag}),!we||!we.progress){$t.next=13;break}return $t.next=13,we.progress(Ze.length/at,Se,Xt.res);case 13:$t.next=21;break;case 15:if($t.prev=15,$t.t0=$t.catch(1),Jt.isCancel()){$t.next=21;break}throw Jt.cancel(),$t.t0.partNum=bn,$t.t0;case 21:case"end":return $t.stop()}},hn,this,[[1,15]])}),yt=(0,xe.default)(new Array(at),function(hn,Jt){return Jt+1}),st=Ge.map(function(hn){return hn.number}),zt=yt.filter(function(hn){return st.indexOf(hn)<0}),lt=5,tt=we.parallel||lt,!this.checkBrowserAndVersion("Internet Explorer","10")&&tt!==1){Ht.next=26;break}ut=0;case 16:if(!(ut<zt.length)){Ht.next=24;break}if(!this.isCancel()){Ht.next=19;break}throw this._makeCancelEvent();case 19:return Ht.next=21,et(this,zt[ut]);case 21:ut++,Ht.next=16;break;case 24:Ht.next=40;break;case 26:for(mt=[],Pt=0;Pt<zt.length;Pt++)mt.push(et(this,zt[Pt]));return Ht.next=30,this._thunkPool(mt,tt);case 30:if(gt=Ht.sent,Ct=!0,!(gt&>.length>0)){Ht.next=37;break}throw this.resetCancelFlag(),Ft=gt[0],Ft.message="Failed to upload some parts with error: "+Ft.toString()+" part_num: "+Ft.partNum,Ft;case 37:if(!this.isCancel()){Ht.next=40;break}throw mt=null,this._makeCancelEvent();case 40:return Ht.next=42,this.completeMultipartUpload(Xe,ze,Ge,we);case 42:return Ht.abrupt("return",Ht.sent);case 43:case"end":return Ht.stop()}},ue,this)}),ve.file=function(ue){return typeof File!="undefined"&&ue instanceof File},ve.blob=function(ue){return typeof Blob!="undefined"&&ue instanceof Blob},oe._getFileSize=le.default.mark(function ue(Se){var we;return le.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:if(!ve.buffer(Se)){Pe.next=4;break}return Pe.abrupt("return",Se.length);case 4:if(!ve.blob(Se)&&!ve.file(Se)){Pe.next=6;break}return Pe.abrupt("return",Se.size);case 6:if(!ve.string(Se)){Pe.next=11;break}return Pe.next=9,this._statFile(Se);case 9:return we=Pe.sent,Pe.abrupt("return",we.size);case 11:throw new Error("_getFileSize requires Buffer/File/String.");case 12:case"end":return Pe.stop()}},ue,this)});var ie=me("stream"),se=ie.Readable;de.inherits(he,se),he.prototype.readFileAndPush=function(ue){if(this.fileBuffer)for(var Se=!0;Se&&this.fileBuffer&&this.start<this.fileBuffer.length;){var we=this.start,Pe=we+ue;Pe=Pe>this.fileBuffer.length?this.fileBuffer.length:Pe,this.start=Pe,Se=this.push(this.fileBuffer.slice(we,Pe))}},he.prototype._read=function(ue){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file)return this.finish||(this.fileBuffer=null,this.finish=!0),void this.push(null);ue=ue||16384;var Se=this;this.reader.onload=function(we){Se.fileBuffer=new Ce(new Uint8Array(we.target.result)),Se.file=null,Se.readFileAndPush(ue)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(ue)},oe._createStream=function(ue,Se,we){if(ve.blob(ue)||ve.file(ue))return new he(ue.slice(Se,we));throw new Error("_createStream requires File/String.")},oe._getPartSize=function(ue,Se){return Se?Math.max(Math.ceil(ue/1e4),Se):1048576},oe._divideParts=function(ue,Se){for(var we=Math.ceil(ue/Se),Pe=[],Ae=0;Ae<we;Ae++){var De=Se*Ae,ze=Math.min(De+Se,ue);Pe.push({start:De,end:ze})}return Pe},oe._makeCancelEvent=function(){return{status:0,name:"cancel"}}}).call(this,me("buffer").Buffer)},{"babel-runtime/core-js/array/from":16,"babel-runtime/regenerator":33,buffer:38,"copy-to":43,"is-type-of":165,mime:242,path:170,stream:195,util:207}],4:[function(me,Be,ke){"use strict";function Ce(Se){return Se&&Se.__esModule?Se:{default:Se}}var Le=me("babel-runtime/core-js/object/keys"),he=Ce(Le),ye=me("babel-runtime/regenerator"),xe=Ce(ye),ge=me("debug")("ali-oss:object"),le=me("utility"),ve=me("fs"),de=me("is-type-of"),ce=me("url"),z=me("copy-to"),ee=me("path"),oe=me("mime"),ie=me("../common/callback"),se=me("../common/signUtils"),ue=ke;ue.append=xe.default.mark(function Se(we,Pe,Ae){var De;return xe.default.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return Ae=Ae||{},Ae.position===void 0&&(Ae.position="0"),Ae.subres={append:"",position:Ae.position},Ae.method="POST",ze.next=6,this.put(we,Pe,Ae);case 6:return De=ze.sent,De.nextAppendPosition=De.res.headers["x-oss-next-append-position"],ze.abrupt("return",De);case 9:case"end":return ze.stop()}},Se,this)}),ue.put=xe.default.mark(function Se(we,Pe,Ae){var De,ze,Ze,Xe,Ge,ft;return xe.default.wrap(function(at){for(;;)switch(at.prev=at.next){case 0:if(De=void 0,Ae=Ae||{},!de.buffer(Pe)){at.next=6;break}De=Pe,at.next=18;break;case 6:if(!de.blob(Pe)&&!de.file(Pe)){at.next=17;break}return Ae.mime||(de.file(Pe)?Ae.mime=oe.getType(ee.extname(Pe.name)):Ae.mime=Pe.type),ze=this._createStream(Pe,0,Pe.size),at.next=11,this._getFileSize(Pe);case 11:return Ae.contentLength=at.sent,at.next=14,this.putStream(we,ze,Ae);case 14:return at.abrupt("return",at.sent);case 17:throw new TypeError("Must provide Buffer/Blob for put.");case 18:return Ae.headers=Ae.headers||{},this._convertMetaToHeaders(Ae.meta,Ae.headers),Ze=Ae.method||"PUT",Xe=this._objectRequestParams(Ze,we,Ae),ie.encodeCallback(Xe,Ae),Xe.mime=Ae.mime,Xe.content=De,Xe.successStatuses=[200],at.next=28,this.request(Xe);case 28:return Ge=at.sent,ft={name:we,url:this._objectUrl(we),res:Ge.res},Xe.headers&&Xe.headers["x-oss-callback"]&&(ft.data=JSON.parse(Ge.data.toString())),at.abrupt("return",ft);case 32:case"end":return at.stop()}},Se,this)}),ue.putStream=xe.default.mark(function Se(we,Pe,Ae){var De,ze,Ze,Xe;return xe.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:return Ae=Ae||{},Ae.headers=Ae.headers||{},Ae.contentLength?Ae.headers["Content-Length"]=Ae.contentLength:Ae.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(Ae.meta,Ae.headers),De=Ae.method||"PUT",ze=this._objectRequestParams(De,we,Ae),ie.encodeCallback(ze,Ae),ze.mime=Ae.mime,ze.stream=Pe,ze.successStatuses=[200],Ge.next=12,this.request(ze);case 12:return Ze=Ge.sent,Xe={name:we,url:this._objectUrl(we),res:Ze.res},ze.headers&&ze.headers["x-oss-callback"]&&(Xe.data=JSON.parse(Ze.data.toString())),Ge.abrupt("return",Xe);case 16:case"end":return Ge.stop()}},Se,this)}),ue.head=xe.default.mark(function Se(we,Pe){var Ae,De,ze;return xe.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:return Ae=this._objectRequestParams("HEAD",we,Pe),Ae.successStatuses=[200,304],Ze.next=4,this.request(Ae);case 4:return De=Ze.sent,ze={meta:null,res:De.res,status:De.status},De.status===200&&(0,he.default)(De.headers).forEach(function(Xe){Xe.indexOf("x-oss-meta-")===0&&(ze.meta||(ze.meta={}),ze.meta[Xe.substring(11)]=De.headers[Xe])}),Ze.abrupt("return",ze);case 8:case"end":return Ze.stop()}},Se,this)}),ue.get=xe.default.mark(function Se(we,Pe,Ae){var De,ze,Ze,Xe;return xe.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:return De=null,ze=!1,de.writableStream(Pe)?De=Pe:de.string(Pe)?(De=ve.createWriteStream(Pe),ze=!0):Ae=Pe,Ae=Ae||{},Ae.process&&(Ae.subres=Ae.subres||{},Ae.subres["x-oss-process"]=Ae.process),Ze=void 0,Ge.prev=6,Xe=this._objectRequestParams("GET",we,Ae),Xe.writeStream=De,Xe.successStatuses=[200,206,304],Ge.next=12,this.request(Xe);case 12:Ze=Ge.sent,ze&&De.destroy(),Ge.next=24;break;case 16:if(Ge.prev=16,Ge.t0=Ge.catch(6),!ze){Ge.next=23;break}return De.destroy(),ge("get error: %s, delete the exists file %s",Ge.t0,Pe),Ge.next=23,this._deleteFileSafe(Pe);case 23:throw Ge.t0;case 24:return Ge.abrupt("return",{res:Ze.res,content:Ze.data});case 25:case"end":return Ge.stop()}},Se,this,[[6,16]])}),ue.getStream=xe.default.mark(function Se(we,Pe){var Ae,De;return xe.default.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return Pe=Pe||{},Ae=this._objectRequestParams("GET",we,Pe),Ae.customResponse=!0,Ae.successStatuses=[200,206,304],ze.next=6,this.request(Ae);case 6:return De=ze.sent,ze.abrupt("return",{stream:De.res,res:{status:De.status,headers:De.headers}});case 8:case"end":return ze.stop()}},Se,this)}),ue.delete=xe.default.mark(function Se(we,Pe){var Ae,De;return xe.default.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return Ae=this._objectRequestParams("DELETE",we,Pe),Ae.successStatuses=[204],ze.next=4,this.request(Ae);case 4:return De=ze.sent,ze.abrupt("return",{res:De.res});case 6:case"end":return ze.stop()}},Se,this)}),ue.deleteMulti=xe.default.mark(function Se(we,Pe){var Ae,De,ze,Ze,Xe,Ge;return xe.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:for(Pe=Pe||{},Ae=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<Delete>
|
|
|
`,Pe.quiet?Ae+=` <Quiet>true</Quiet>
|
|
|
`:Ae+=` <Quiet>false</Quiet>
|
|
|
`,De=0;De<we.length;De++)Ae+=" <Object><Key>"+le.escape(this._objectName(we[De]))+`</Key></Object>
|
|
|
`;return Ae+="</Delete>",ge("delete multi objects: %s",Ae),Pe.subres="delete",ze=this._objectRequestParams("POST","",Pe),ze.mime="xml",ze.content=Ae,ze.xmlResponse=!0,ze.successStatuses=[200],ft.next=14,this.request(ze);case 14:return Ze=ft.sent,Xe=Ze.data,Ge=Xe&&Xe.Deleted||null,Ge&&(Array.isArray(Ge)||(Ge=[Ge]),Ge=Ge.map(function(at){return at.Key})),ft.abrupt("return",{res:Ze.res,deleted:Ge});case 19:case"end":return ft.stop()}},Se,this)}),ue.copy=xe.default.mark(function Se(we,Pe,Ae){var De,ze,Ze;return xe.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return Ae=Ae||{},Ae.headers=Ae.headers||{},(0,he.default)(Ae.headers).forEach(function(Ge){Ae.headers["x-oss-copy-source-"+Ge.toLowerCase()]=Ae.headers[Ge]}),Ae.meta&&(Ae.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(Ae.meta,Ae.headers),Pe=Pe[0]!=="/"?"/"+this.options.bucket+"/"+encodeURIComponent(Pe):"/"+encodeURIComponent(Pe.slice(1)),Ae.headers["x-oss-copy-source"]=Pe,De=this._objectRequestParams("PUT",we,Ae),De.xmlResponse=!0,De.successStatuses=[200,304],Xe.next=12,this.request(De);case 12:return ze=Xe.sent,Ze=ze.data,Ze&&(Ze={etag:Ze.ETag,lastModified:Ze.LastModified}),Xe.abrupt("return",{data:Ze,res:ze.res});case 16:case"end":return Xe.stop()}},Se,this)}),ue.putMeta=xe.default.mark(function Se(we,Pe,Ae){return xe.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return De.next=2,this.copy(we,we,{meta:Pe||{},timeout:Ae&&Ae.timeout,ctx:Ae&&Ae.ctx});case 2:return De.abrupt("return",De.sent);case 3:case"end":return De.stop()}},Se,this)}),ue.list=xe.default.mark(function Se(we,Pe){var Ae,De,ze,Ze,Xe;return xe.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:return Ae=this._objectRequestParams("GET","",Pe),Ae.query=we,Ae.xmlResponse=!0,Ae.successStatuses=[200],Ge.next=6,this.request(Ae);case 6:return De=Ge.sent,ze=De.data.Contents,Ze=this,ze&&(Array.isArray(ze)||(ze=[ze]),ze=ze.map(function(ft){return{name:ft.Key,url:Ze._objectUrl(ft.Key),lastModified:ft.LastModified,etag:ft.ETag,type:ft.Type,size:Number(ft.Size),storageClass:ft.StorageClass,owner:{id:ft.Owner.ID,displayName:ft.Owner.DisplayName}}})),Xe=De.data.CommonPrefixes||null,Xe&&(Array.isArray(Xe)||(Xe=[Xe]),Xe=Xe.map(function(ft){return ft.Prefix})),Ge.abrupt("return",{res:De.res,objects:ze,prefixes:Xe,nextMarker:De.data.NextMarker||null,isTruncated:De.data.IsTruncated==="true"});case 13:case"end":return Ge.stop()}},Se,this)}),ue.putACL=xe.default.mark(function Se(we,Pe,Ae){var De,ze;return xe.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:return Ae=Ae||{},Ae.subres="acl",Ae.headers=Ae.headers||{},Ae.headers["x-oss-object-acl"]=Pe,we=this._objectName(we),De=this._objectRequestParams("PUT",we,Ae),De.successStatuses=[200],Ze.next=9,this.request(De);case 9:return ze=Ze.sent,Ze.abrupt("return",{res:ze.res});case 11:case"end":return Ze.stop()}},Se,this)}),ue.getACL=xe.default.mark(function Se(we,Pe){var Ae,De;return xe.default.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return Pe=Pe||{},Pe.subres="acl",we=this._objectName(we),Ae=this._objectRequestParams("GET",we,Pe),Ae.successStatuses=[200],Ae.xmlResponse=!0,ze.next=8,this.request(Ae);case 8:return De=ze.sent,ze.abrupt("return",{acl:De.data.AccessControlList.Grant,owner:{id:De.data.Owner.ID,displayName:De.data.Owner.DisplayName},res:De.res});case 10:case"end":return ze.stop()}},Se,this)}),ue.restore=xe.default.mark(function Se(we,Pe){var Ae,De;return xe.default.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return Pe=Pe||{},Pe.subres="restore",Ae=this._objectRequestParams("POST",we,Pe),Ae.successStatuses=[202],ze.next=6,this.request(Ae);case 6:return De=ze.sent,ze.abrupt("return",{res:De.res});case 8:case"end":return ze.stop()}},Se,this)}),ue.signatureUrl=function(Se,we){we=we||{},Se=this._objectName(Se),we.method=we.method||"GET";var Pe=le.timestamp()+(we.expires||1800),Ae={bucket:this.options.bucket,object:Se},De=this._getResource(Ae);this.options.stsToken&&(we["security-token"]=this.options.stsToken);var ze=se._signatureForURL(this.options.accessKeySecret,we,De,Pe),Ze=ce.parse(this._getReqUrl(Ae));return Ze.query={OSSAccessKeyId:this.options.accessKeyId,Expires:Pe,Signature:ze.Signature},z(ze.subResource).to(Ze.query),Ze.format()},ue.getObjectUrl=function(Se,we){return we?we[we.length-1]!=="/"&&(we+="/"):we=this.options.endpoint.format(),we+this._escape(this._objectName(Se))},ue._objectUrl=function(Se){return this._getReqUrl({bucket:this.options.bucket,object:Se})},ue.generateObjectUrl=function(Se,we){if(we)we[we.length-1]!=="/"&&(we+="/");else{we=this.options.endpoint.format();var Pe=ce.parse(we),Ae=this.options.bucket;Pe.hostname=Ae+"."+Pe.hostname,Pe.host=Ae+"."+Pe.host,we=Pe.format()}return we+this._escape(this._objectName(Se))},ue._objectRequestParams=function(Se,we,Pe){if(!this.options.bucket)throw new Error("Please create a bucket first");Pe=Pe||{},we=this._objectName(we);var Ae={object:we,bucket:this.options.bucket,method:Se,subres:Pe&&Pe.subres,timeout:Pe&&Pe.timeout,ctx:Pe&&Pe.ctx};return Pe.headers&&(Ae.headers={},z(Pe.headers).to(Ae.headers)),Ae},ue._objectName=function(Se){return Se.replace(/^\/+/,"")},ue._statFile=function(Se){return function(we){ve.stat(Se,we)}},ue._convertMetaToHeaders=function(Se,we){Se&&(0,he.default)(Se).forEach(function(Pe){we["x-oss-meta-"+Pe]=Se[Pe]})},ue._deleteFileSafe=function(Se){return function(we){ve.exists(Se,function(Pe){Pe?ve.unlink(Se,function(Ae){Ae&&ge("unlink %j error: %s",Se,Ae),we()}):we()})}}},{"../common/callback":7,"../common/signUtils":9,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,"copy-to":43,debug:155,fs:36,"is-type-of":165,mime:242,path:170,url:203,utility:243}],5:[function(me,Be,ke){"use strict";ke.version="5.3.1"},{}],6:[function(me,Be,ke){"use strict";function Ce(ee){return ee&&ee.__esModule?ee:{default:ee}}function Le(ee){return ee&&typeof ee.next=="function"&&typeof ee.throw=="function"}function he(ee){if(!ee)return!1;var oe=ee.constructor;return!!oe&&(oe.name==="GeneratorFunction"||oe.displayName==="GeneratorFunction"||Le(oe.prototype)||Le(ee.prototype))}function ye(ee,oe){var ie=new ee(oe),se=(0,de.default)(ie),ue=(0,de.default)((0,le.default)(ie));se.concat(ue).forEach(function(Se){he(ie[Se])?this[Se]=ce.wrap(ie[Se]).bind(ie):this[Se]=ie[Se]},this)}function xe(ee){if(!(this instanceof xe))return new xe(ee);ye.call(this,z,ee)}var ge=me("babel-runtime/core-js/object/get-prototype-of"),le=Ce(ge),ve=me("babel-runtime/core-js/object/keys"),de=Ce(ve),ce=me("co"),z=me("./client");Be.exports=xe,xe.STS=function ee(oe){if(!(this instanceof ee))return new ee(oe);ye.call(this,z.STS,oe)}},{"./client":2,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/core-js/object/keys":23,co:41}],7:[function(me,Be,ke){(function(Ce){"use strict";function Le(le){return le&&le.__esModule?le:{default:le}}var he=me("babel-runtime/core-js/object/keys"),ye=Le(he),xe=me("babel-runtime/core-js/json/stringify"),ge=Le(xe);ke.encodeCallback=function(le,ve){if(le.headers=le.headers||{},!Object.prototype.hasOwnProperty.call(le.headers,"x-oss-callback")&&ve.callback){var de={callbackUrl:encodeURI(ve.callback.url),callbackBody:ve.callback.body};ve.callback.host&&(de.callbackHost=ve.callback.host),ve.callback.contentType&&(de.callbackBodyType=ve.callback.contentType);var ce=new Ce((0,ge.default)(de)).toString("base64");if(le.headers["x-oss-callback"]=ce,ve.callback.customValue){var z={};(0,ye.default)(ve.callback.customValue).forEach(function(ee){z["x:"+ee]=ve.callback.customValue[ee]}),le.headers["x-oss-callback-var"]=new Ce((0,ge.default)(z)).toString("base64")}}}}).call(this,me("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38}],8:[function(me,Be,ke){"use strict";var Ce=me("babel-runtime/regenerator"),Le=function(ge){return ge&&ge.__esModule?ge:{default:ge}}(Ce),he=me("copy-to"),ye=me("./callback"),xe=ke;xe.listUploads=Le.default.mark(function ge(le,ve){var de,ce,z,ee;return Le.default.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return ve=ve||{},de={},he(ve).to(de),de.subres="uploads",ce=this._objectRequestParams("GET","",de),ce.query=le,ce.xmlResponse=!0,ce.successStatuses=[200],oe.next=10,this.request(ce);case 10:return z=oe.sent,ee=z.data.Upload||[],Array.isArray(ee)||(ee=[ee]),ee=ee.map(function(ie){return{name:ie.Key,uploadId:ie.UploadId,initiated:ie.Initiated}}),oe.abrupt("return",{res:z.res,uploads:ee,bucket:z.data.Bucket,nextKeyMarker:z.data.NextKeyMarker,nextUploadIdMarker:z.data.NextUploadIdMarker,isTruncated:z.data.IsTruncated==="true"});case 15:case"end":return oe.stop()}},ge,this)}),xe.listParts=Le.default.mark(function ge(le,ve,de,ce){var z,ee,oe;return Le.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return ce=ce||{},z={},he(ce).to(z),z.subres={uploadId:ve},ee=this._objectRequestParams("GET",le,z),ee.query=de,ee.xmlResponse=!0,ee.successStatuses=[200],ie.next=10,this.request(ee);case 10:return oe=ie.sent,ie.abrupt("return",{res:oe.res,uploadId:oe.data.UploadId,bucket:oe.data.Bucket,name:oe.data.Key,partNumberMarker:oe.data.PartNumberMarker,nextPartNumberMarker:oe.data.NextPartNumberMarker,maxParts:oe.data.MaxParts,isTruncated:oe.data.IsTruncated,parts:oe.data.Part||[]});case 12:case"end":return ie.stop()}},ge,this)}),xe.abortMultipartUpload=Le.default.mark(function ge(le,ve,de){var ce,z,ee;return Le.default.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return this.cancel(),de=de||{},ce={},he(de).to(ce),ce.subres={uploadId:ve},z=this._objectRequestParams("DELETE",le,ce),z.successStatuses=[204],oe.next=9,this.request(z);case 9:return ee=oe.sent,oe.abrupt("return",{res:ee.res});case 11:case"end":return oe.stop()}},ge,this)}),xe.initMultipartUpload=Le.default.mark(function ge(le,ve){var de,ce,z;return Le.default.wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:return ve=ve||{},de={},he(ve).to(de),de.headers=de.headers||{},this._convertMetaToHeaders(ve.meta,de.headers),de.subres="uploads",ce=this._objectRequestParams("POST",le,de),ce.mime=ve.mime,ce.xmlResponse=!0,ce.successStatuses=[200],ee.next=12,this.request(ce);case 12:return z=ee.sent,ee.abrupt("return",{res:z.res,bucket:z.data.Bucket,name:z.data.Key,uploadId:z.data.UploadId});case 14:case"end":return ee.stop()}},ge,this)}),xe.uploadPart=Le.default.mark(function ge(le,ve,de,ce,z,ee,oe){var ie;return Le.default.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return ie={stream:this._createStream(ce,z,ee),size:ee-z},se.next=3,this._uploadPart(le,ve,de,ie,oe);case 3:return se.abrupt("return",se.sent);case 4:case"end":return se.stop()}},ge,this)}),xe.completeMultipartUpload=Le.default.mark(function ge(le,ve,de,ce){var z,ee,oe,ie,se,ue,Se,we;return Le.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:for(z=de.concat().sort(function(Ae,De){return Ae.number-De.number}).filter(function(Ae,De,ze){return!De||Ae.number!==ze[De-1].number}),ee=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<CompleteMultipartUpload>
|
|
|
`,oe=0;oe<z.length;oe++)ie=z[oe],ee+=`<Part>
|
|
|
`,ee+="<PartNumber>"+ie.number+`</PartNumber>
|
|
|
`,ee+="<ETag>"+ie.etag+`</ETag>
|
|
|
`,ee+=`</Part>
|
|
|
`;return ee+="</CompleteMultipartUpload>",ce=ce||{},se={},he(ce).to(se),se.subres={uploadId:ve},ue=this._objectRequestParams("POST",le,se),ye.encodeCallback(ue,se),ue.mime="xml",ue.content=ee,ue.headers&&ue.headers["x-oss-callback"]||(ue.xmlResponse=!0),ue.successStatuses=[200],Pe.next=16,this.request(ue);case 16:return Se=Pe.sent,we={res:Se.res,bucket:ue.bucket,name:le,etag:Se.res.headers.etag},ue.headers&&ue.headers["x-oss-callback"]&&(we.data=JSON.parse(Se.data.toString())),Pe.abrupt("return",we);case 20:case"end":return Pe.stop()}},ge,this)}),xe._uploadPart=Le.default.mark(function ge(le,ve,de,ce,z){var ee,oe,ie;return Le.default.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return z=z||{},ee={},he(z).to(ee),ee.headers={"Content-Length":ce.size},ee.subres={partNumber:de,uploadId:ve},oe=this._objectRequestParams("PUT",le,ee),oe.mime=ee.mime,oe.stream=ce.stream,oe.successStatuses=[200],se.next=11,this.request(oe);case 11:return ie=se.sent,ce.stream=null,oe.stream=null,se.abrupt("return",{name:le,etag:ie.res.headers.etag,res:ie.res});case 15:case"end":return se.stop()}},ge,this)})},{"./callback":7,"babel-runtime/regenerator":33,"copy-to":43}],9:[function(me,Be,ke){(function(Ce){"use strict";function Le(de){return de&&de.__esModule?de:{default:de}}var he=me("babel-runtime/core-js/json/stringify"),ye=Le(he),xe=me("babel-runtime/core-js/object/keys"),ge=Le(xe),le=me("./../../shims/crypto/crypto.js"),ve=me("is-type-of");ke.buildCanonicalizedResource=function(de,ce){var z=""+de,ee="?";if(ve.string(ce)&&ce.trim()!=="")z+=ee+ce;else if(ve.array(ce))ce.sort(),z+=ee+ce.join("&");else if(ce){var oe=function(se,ue){return se[0]>ue[0]?1:se[0]<ue[0]?-1:0},ie=function(se){z+=ee+se,ce[se]&&(z+="="+ce[se]),ee="&"};(0,ge.default)(ce).sort(oe).forEach(ie)}return z},ke.buildCanonicalString=function(de,ce,z,ee){z=z||{};var oe=z.headers||{},ie=[],se={},ue=[de.toUpperCase(),oe["Content-Md5"]||"",oe["Content-Type"]||oe["Content-Type".toLowerCase()],ee||oe["x-oss-date"]];return(0,ge.default)(oe).forEach(function(Se){var we=Se.toLowerCase();we.indexOf("x-oss-")===0&&(se[we]=String(oe[Se]).trim())}),(0,ge.default)(se).sort().forEach(function(Se){ie.push(Se+":"+se[Se])}),ue=ue.concat(ie),ue.push(this.buildCanonicalizedResource(ce,z.parameters)),ue.join(`
|
|
|
`)},ke.computeSignature=function(de,ce){return le.createHmac("sha1",de).update(new Ce(ce,"utf8")).digest("base64")},ke.authorization=function(de,ce,z){return"OSS "+de+":"+this.computeSignature(ce,z)},ke._signatureForURL=function(de,ce,z,ee){var oe={},ie={};if(ce.process&&(ie["x-oss-process"]=ce.process),ce.response&&(0,ge.default)(ce.response).forEach(function(we){var Pe="response-"+we.toLowerCase();ie[Pe]=ce.response[we]}),(0,ge.default)(ce).forEach(function(we){var Pe=we.toLowerCase(),Ae=ce[we];Pe.indexOf("x-oss-")===0?oe[Pe]=Ae:Pe.indexOf("content-md5")===0||Pe.indexOf("content-type")===0?oe[we]=Ae:Pe!=="expires"&&Pe!=="response"&&Pe!=="process"&&Pe!=="method"&&(ie[Pe]=Ae)}),Object.prototype.hasOwnProperty.call(ce,"security-token")&&(ie["security-token"]=ce["security-token"]),Object.prototype.hasOwnProperty.call(ce,"callback")){var se={callbackUrl:encodeURI(ce.callback.url),callbackBody:ce.callback.body};if(ce.callback.host&&(se.callbackHost=ce.callback.host),ce.callback.contentType&&(se.callbackBodyType=ce.callback.contentType),ie.callback=new Ce((0,ye.default)(se)).toString("base64"),ce.callback.customValue){var ue={};(0,ge.default)(ce.callback.customValue).forEach(function(we){ue["x:"+we]=ce.callback.customValue[we]}),ie["callback-var"]=new Ce((0,ye.default)(ue)).toString("base64")}}var Se=this.buildCanonicalString(ce.method,z,{headers:oe,parameters:ie},ee.toString());return{Signature:this.computeSignature(de,Se),subResource:ie}}}).call(this,me("buffer").Buffer)},{"./../../shims/crypto/crypto.js":237,"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38,"is-type-of":165}],10:[function(me,Be,ke){"use strict";var Ce=me("babel-runtime/regenerator"),Le=function(le){return le&&le.__esModule?le:{default:le}}(Ce),he=me("co"),ye=me("co-priority-queue"),xe=me("any-promise"),ge=ke;ge._thunkPool=function(le,ve){function de(ie,se){++ee===ie.length&&se(oe)}function ce(ie,se){function ue(){var ze;return Le.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:ze=void 0;case 1:if(z.isCancel()){Ze.next=9;break}return Ze.next=4,Pe.next();case 4:return ze=Ze.sent,Ze.next=7,ze();case 7:Ze.next=1;break;case 9:Ae+=1,Ae===ie&&(Pe.fns=[],Pe.buffer=[],se(oe));case 11:case"end":return Ze.stop()}},we,this)}function Se(ze){console.error(ze.stack)}for(var we=Le.default.mark(ue),Pe=new ye,Ae=0,De=0;De<ie;De++)he(ue).catch(Se);return function(ze,Ze){return function(Xe){Pe.push(Le.default.mark(function Ge(){return Le.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:return ft.prev=0,ft.t0=Xe,ft.next=4,ze;case 4:ft.t1=ft.sent,(0,ft.t0)(null,ft.t1),ft.next=11;break;case 8:ft.prev=8,ft.t2=ft.catch(0),Xe(ft.t2);case 11:case"end":return ft.stop()}},Ge,this,[[0,8]])}),Ze)}}}var z=this,ee=0,oe=[];return new xe(function(ie){function se(Ae){return Le.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return De.next=2,we(le[Ae]);case 2:de(le,ie);case 3:case"end":return De.stop()}},Se,this)}function ue(Ae){oe.push(Ae),de(le,ie)}for(var Se=Le.default.mark(se),we=new ce(ve,ie),Pe=0;Pe<le.length;Pe++)he(se(Pe)).catch(ue)})},ge.cancel=function(){this.options.cancelFlag=!0},ge.isCancel=function(){return this.options.cancelFlag},ge.resetCancelFlag=function(){this.options.cancelFlag=!1}},{"any-promise":13,"babel-runtime/regenerator":33,co:41,"co-priority-queue":40}],11:[function(me,Be,ke){"use strict";ke._isIP=function(Ce){var Le=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,he=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return Le.test(Ce)||he.test(Ce)}},{}],12:[function(me,Be,ke){function Ce(){}Be.exports=Ce,Be.exports.HttpsAgent=Ce},{}],13:[function(me,Be,ke){Be.exports=me("./register")().Promise},{"./register":15}],14:[function(me,Be,ke){"use strict";var Ce=null;Be.exports=function(Le,he){return function(ye,xe){ye=ye||null,xe=xe||{};var ge=xe.global!==!1;if(Ce===null&&ge&&(Ce=Le["@@any-promise/REGISTRATION"]||null),Ce!==null&&ye!==null&&Ce.implementation!==ye)throw new Error('any-promise already defined as "'+Ce.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return Ce===null&&(Ce=ye!==null&&xe.Promise!==void 0?{Promise:xe.Promise,implementation:ye}:he(ye),ge&&(Le["@@any-promise/REGISTRATION"]=Ce)),Ce}}},{}],15:[function(me,Be,ke){"use strict";function Ce(){if(window.Promise===void 0)throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}}Be.exports=me("./loader")(window,Ce)},{"./loader":14}],16:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":44}],17:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":45}],18:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":46}],19:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":47}],20:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":48}],21:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":49}],22:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":50}],23:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":51}],24:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":52}],25:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":53}],26:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":54}],27:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":56}],28:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":55}],29:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":57}],30:[function(me,Be,ke){"use strict";ke.__esModule=!0,ke.default=function(Ce,Le){if(!(Ce instanceof Le))throw new TypeError("Cannot call a class as a function")}},{}],31:[function(me,Be,ke){"use strict";ke.__esModule=!0;var Ce=me("../core-js/object/define-property"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Ce);ke.default=function(){function he(ye,xe){for(var ge=0;ge<xe.length;ge++){var le=xe[ge];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),(0,Le.default)(ye,le.key,le)}}return function(ye,xe,ge){return xe&&he(ye.prototype,xe),ge&&he(ye,ge),ye}}()},{"../core-js/object/define-property":20}],32:[function(me,Be,ke){"use strict";function Ce(le){return le&&le.__esModule?le:{default:le}}ke.__esModule=!0;var Le=me("../core-js/symbol/iterator"),he=Ce(Le),ye=me("../core-js/symbol"),xe=Ce(ye),ge=typeof xe.default=="function"&&typeof he.default=="symbol"?function(le){return typeof le}:function(le){return le&&typeof xe.default=="function"&&le.constructor===xe.default&&le!==xe.default.prototype?"symbol":typeof le};ke.default=typeof xe.default=="function"&&ge(he.default)==="symbol"?function(le){return le===void 0?"undefined":ge(le)}:function(le){return le&&typeof xe.default=="function"&&le.constructor===xe.default&&le!==xe.default.prototype?"symbol":le===void 0?"undefined":ge(le)}},{"../core-js/symbol":27,"../core-js/symbol/iterator":29}],33:[function(me,Be,ke){Be.exports=me("regenerator-runtime")},{"regenerator-runtime":191}],34:[function(me,Be,ke){"use strict";function Ce(ie){var se=ie.length;if(se%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var ue=ie.indexOf("=");return ue===-1&&(ue=se),[ue,ue===se?0:4-ue%4]}function Le(ie){var se=Ce(ie),ue=se[0],Se=se[1];return 3*(ue+Se)/4-Se}function he(ie,se,ue){return 3*(se+ue)/4-ue}function ye(ie){for(var se,ue=Ce(ie),Se=ue[0],we=ue[1],Pe=new ce(he(ie,Se,we)),Ae=0,De=we>0?Se-4:Se,ze=0;ze<De;ze+=4)se=de[ie.charCodeAt(ze)]<<18|de[ie.charCodeAt(ze+1)]<<12|de[ie.charCodeAt(ze+2)]<<6|de[ie.charCodeAt(ze+3)],Pe[Ae++]=se>>16&255,Pe[Ae++]=se>>8&255,Pe[Ae++]=255&se;return we===2&&(se=de[ie.charCodeAt(ze)]<<2|de[ie.charCodeAt(ze+1)]>>4,Pe[Ae++]=255&se),we===1&&(se=de[ie.charCodeAt(ze)]<<10|de[ie.charCodeAt(ze+1)]<<4|de[ie.charCodeAt(ze+2)]>>2,Pe[Ae++]=se>>8&255,Pe[Ae++]=255&se),Pe}function xe(ie){return ve[ie>>18&63]+ve[ie>>12&63]+ve[ie>>6&63]+ve[63&ie]}function ge(ie,se,ue){for(var Se,we=[],Pe=se;Pe<ue;Pe+=3)Se=(ie[Pe]<<16&16711680)+(ie[Pe+1]<<8&65280)+(255&ie[Pe+2]),we.push(xe(Se));return we.join("")}function le(ie){for(var se,ue=ie.length,Se=ue%3,we=[],Pe=0,Ae=ue-Se;Pe<Ae;Pe+=16383)we.push(ge(ie,Pe,Pe+16383>Ae?Ae:Pe+16383));return Se===1?(se=ie[ue-1],we.push(ve[se>>2]+ve[se<<4&63]+"==")):Se===2&&(se=(ie[ue-2]<<8)+ie[ue-1],we.push(ve[se>>10]+ve[se>>4&63]+ve[se<<2&63]+"=")),we.join("")}ke.byteLength=Le,ke.toByteArray=ye,ke.fromByteArray=le;for(var ve=[],de=[],ce=typeof Uint8Array!="undefined"?Uint8Array:Array,z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ee=0,oe=z.length;ee<oe;++ee)ve[ee]=z[ee],de[z.charCodeAt(ee)]=ee;de[45]=62,de[95]=63},{}],35:[function(me,Be,ke){(function(Ce,Le,he){Be!==void 0&&Be.exports?Be.exports=he():typeof Me=="function"&&Me.amd?Me("bowser",he):Ce.bowser=he()})(this,0,function(){function Ce(de){function ce(tt){var ut=de.match(tt);return ut&&ut.length>1&&ut[1]||""}function z(tt){var ut=de.match(tt);return ut&&ut.length>1&&ut[2]||""}var ee,oe=ce(/(ipod|iphone|ipad)/i).toLowerCase(),ie=/like android/i.test(de),se=!ie&&/android/i.test(de),ue=/nexus\s*[0-6]\s*/i.test(de),Se=!ue&&/nexus\s*[0-9]+/i.test(de),we=/CrOS/.test(de),Pe=/silk/i.test(de),Ae=/sailfish/i.test(de),De=/tizen/i.test(de),ze=/(web|hpw)os/i.test(de),Ze=/windows phone/i.test(de),Xe=(/SamsungBrowser/i.test(de),!Ze&&/windows/i.test(de)),Ge=!oe&&!Pe&&/macintosh/i.test(de),ft=!se&&!Ae&&!De&&!ze&&/linux/i.test(de),at=z(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),Ct=ce(/version\/(\d+(\.\d+)?)/i),et=/tablet/i.test(de)&&!/tablet pc/i.test(de),yt=!et&&/[^-]mobi/i.test(de),st=/xbox/i.test(de);/opera/i.test(de)?ee={name:"Opera",opera:le,version:Ct||ce(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(de)?ee={name:"Opera",opera:le,version:ce(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||Ct}:/SamsungBrowser/i.test(de)?ee={name:"Samsung Internet for Android",samsungBrowser:le,version:Ct||ce(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(de)?ee={name:"Opera Coast",coast:le,version:Ct||ce(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(de)?ee={name:"Yandex Browser",yandexbrowser:le,version:Ct||ce(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(de)?ee={name:"UC Browser",ucbrowser:le,version:ce(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(de)?ee={name:"Maxthon",maxthon:le,version:ce(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(de)?ee={name:"Epiphany",epiphany:le,version:ce(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(de)?ee={name:"Puffin",puffin:le,version:ce(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(de)?ee={name:"Sleipnir",sleipnir:le,version:ce(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(de)?ee={name:"K-Meleon",kMeleon:le,version:ce(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:Ze?(ee={name:"Windows Phone",osname:"Windows Phone",windowsphone:le},at?(ee.msedge=le,ee.version=at):(ee.msie=le,ee.version=ce(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(de)?ee={name:"Internet Explorer",msie:le,version:ce(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:we?ee={name:"Chrome",osname:"Chrome OS",chromeos:le,chromeBook:le,chrome:le,version:ce(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(de)?ee={name:"Microsoft Edge",msedge:le,version:at}:/vivaldi/i.test(de)?ee={name:"Vivaldi",vivaldi:le,version:ce(/vivaldi\/(\d+(\.\d+)?)/i)||Ct}:Ae?ee={name:"Sailfish",osname:"Sailfish OS",sailfish:le,version:ce(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(de)?ee={name:"SeaMonkey",seamonkey:le,version:ce(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(de)?(ee={name:"Firefox",firefox:le,version:ce(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(de)&&(ee.firefoxos=le,ee.osname="Firefox OS")):Pe?ee={name:"Amazon Silk",silk:le,version:ce(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(de)?ee={name:"PhantomJS",phantom:le,version:ce(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(de)?ee={name:"SlimerJS",slimer:le,version:ce(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(de)||/rim\stablet/i.test(de)?ee={name:"BlackBerry",osname:"BlackBerry OS",blackberry:le,version:Ct||ce(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:ze?(ee={name:"WebOS",osname:"WebOS",webos:le,version:Ct||ce(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(de)&&(ee.touchpad=le)):/bada/i.test(de)?ee={name:"Bada",osname:"Bada",bada:le,version:ce(/dolfin\/(\d+(\.\d+)?)/i)}:De?ee={name:"Tizen",osname:"Tizen",tizen:le,version:ce(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||Ct}:/qupzilla/i.test(de)?ee={name:"QupZilla",qupzilla:le,version:ce(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||Ct}:/chromium/i.test(de)?ee={name:"Chromium",chromium:le,version:ce(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||Ct}:/chrome|crios|crmo/i.test(de)?ee={name:"Chrome",chrome:le,version:ce(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:se?ee={name:"Android",version:Ct}:/safari|applewebkit/i.test(de)?(ee={name:"Safari",safari:le},Ct&&(ee.version=Ct)):oe?(ee={name:oe=="iphone"?"iPhone":oe=="ipad"?"iPad":"iPod"},Ct&&(ee.version=Ct)):ee=/googlebot/i.test(de)?{name:"Googlebot",googlebot:le,version:ce(/googlebot\/(\d+(\.\d+))/i)||Ct}:{name:ce(/^(.*)\/(.*) /),version:z(/^(.*)\/(.*) /)},!ee.msedge&&/(apple)?webkit/i.test(de)?(/(apple)?webkit\/537\.36/i.test(de)?(ee.name=ee.name||"Blink",ee.blink=le):(ee.name=ee.name||"Webkit",ee.webkit=le),!ee.version&&Ct&&(ee.version=Ct)):!ee.opera&&/gecko\//i.test(de)&&(ee.name=ee.name||"Gecko",ee.gecko=le,ee.version=ee.version||ce(/gecko\/(\d+(\.\d+)?)/i)),ee.windowsphone||!se&&!ee.silk?!ee.windowsphone&&oe?(ee[oe]=le,ee.ios=le,ee.osname="iOS"):Ge?(ee.mac=le,ee.osname="macOS"):st?(ee.xbox=le,ee.osname="Xbox"):Xe?(ee.windows=le,ee.osname="Windows"):ft&&(ee.linux=le,ee.osname="Linux"):(ee.android=le,ee.osname="Android");var zt="";ee.windows?zt=function(tt){switch(tt){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}(ce(/Windows ((NT|XP)( \d\d?.\d)?)/i)):ee.windowsphone?zt=ce(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):ee.mac?(zt=ce(/Mac OS X (\d+([_\.\s]\d+)*)/i),zt=zt.replace(/[_\s]/g,".")):oe?(zt=ce(/os (\d+([_\s]\d+)*) like mac os x/i),zt=zt.replace(/[_\s]/g,".")):se?zt=ce(/android[ \/-](\d+(\.\d+)*)/i):ee.webos?zt=ce(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):ee.blackberry?zt=ce(/rim\stablet\sos\s(\d+(\.\d+)*)/i):ee.bada?zt=ce(/bada\/(\d+(\.\d+)*)/i):ee.tizen&&(zt=ce(/tizen[\/\s](\d+(\.\d+)*)/i)),zt&&(ee.osversion=zt);var lt=!ee.windows&&zt.split(".")[0];return et||Se||oe=="ipad"||se&&(lt==3||lt>=4&&!yt)||ee.silk?ee.tablet=le:(yt||oe=="iphone"||oe=="ipod"||se||ue||ee.blackberry||ee.webos||ee.bada)&&(ee.mobile=le),ee.msedge||ee.msie&&ee.version>=10||ee.yandexbrowser&&ee.version>=15||ee.vivaldi&&ee.version>=1||ee.chrome&&ee.version>=20||ee.samsungBrowser&&ee.version>=4||ee.firefox&&ee.version>=20||ee.safari&&ee.version>=6||ee.opera&&ee.version>=10||ee.ios&&ee.osversion&&ee.osversion.split(".")[0]>=6||ee.blackberry&&ee.version>=10.1||ee.chromium&&ee.version>=20?ee.a=le:ee.msie&&ee.version<10||ee.chrome&&ee.version<20||ee.firefox&&ee.version<20||ee.safari&&ee.version<6||ee.opera&&ee.version<10||ee.ios&&ee.osversion&&ee.osversion.split(".")[0]<6||ee.chromium&&ee.version<20?ee.c=le:ee.x=le,ee}function Le(de){return de.split(".").length}function he(de,ce){var z,ee=[];if(Array.prototype.map)return Array.prototype.map.call(de,ce);for(z=0;z<de.length;z++)ee.push(ce(de[z]));return ee}function ye(de){for(var ce=Math.max(Le(de[0]),Le(de[1])),z=he(de,function(ee){var oe=ce-Le(ee);return ee+=new Array(oe+1).join(".0"),he(ee.split("."),function(ie){return new Array(20-ie.length).join("0")+ie}).reverse()});--ce>=0;){if(z[0][ce]>z[1][ce])return 1;if(z[0][ce]!==z[1][ce])return-1;if(ce===0)return 0}}function xe(de,ce,z){var ee=ve;typeof ce=="string"&&(z=ce,ce=void 0),ce===void 0&&(ce=!1),z&&(ee=Ce(z));var oe=""+ee.version;for(var ie in de)if(de.hasOwnProperty(ie)&&ee[ie]){if(typeof de[ie]!="string")throw new Error("Browser version in the minVersion map should be a string: "+ie+": "+String(de));return ye([oe,de[ie]])<0}return ce}function ge(de,ce,z){return!xe(de,ce,z)}var le=!0,ve=Ce(typeof navigator!="undefined"&&navigator.userAgent||"");return ve.test=function(de){for(var ce=0;ce<de.length;++ce){var z=de[ce];if(typeof z=="string"&&z in ve)return!0}return!1},ve.isUnsupportedBrowser=xe,ve.compareVersions=ye,ve.check=ge,ve._detect=Ce,ve.detect=Ce,ve})},{}],36:[function(me,Be,ke){},{}],37:[function(me,Be,ke){function Ce(ve){if(ve&&!ge(ve))throw new Error("Unknown encoding: "+ve)}function Le(ve){return ve.toString(this.encoding)}function he(ve){this.charReceived=ve.length%2,this.charLength=this.charReceived?2:0}function ye(ve){this.charReceived=ve.length%3,this.charLength=this.charReceived?3:0}var xe=me("buffer").Buffer,ge=xe.isEncoding||function(ve){switch(ve&&ve.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},le=ke.StringDecoder=function(ve){switch(this.encoding=(ve||"utf8").toLowerCase().replace(/[-_]/,""),Ce(ve),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=he;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=ye;break;default:return void(this.write=Le)}this.charBuffer=new xe(6),this.charReceived=0,this.charLength=0};le.prototype.write=function(ve){for(var de="";this.charLength;){var ce=ve.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:ve.length;if(ve.copy(this.charBuffer,this.charReceived,0,ce),this.charReceived+=ce,this.charReceived<this.charLength)return"";ve=ve.slice(ce,ve.length),de=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var ee=de.charCodeAt(de.length-1);if(!(ee>=55296&&ee<=56319)){if(this.charReceived=this.charLength=0,ve.length===0)return de;break}this.charLength+=this.surrogateSize,de=""}this.detectIncompleteChar(ve);var z=ve.length;this.charLength&&(ve.copy(this.charBuffer,0,ve.length-this.charReceived,z),z-=this.charReceived),de+=ve.toString(this.encoding,0,z);var z=de.length-1,ee=de.charCodeAt(z);if(ee>=55296&&ee<=56319){var oe=this.surrogateSize;return this.charLength+=oe,this.charReceived+=oe,this.charBuffer.copy(this.charBuffer,oe,0,oe),ve.copy(this.charBuffer,0,0,oe),de.substring(0,z)}return de},le.prototype.detectIncompleteChar=function(ve){for(var de=ve.length>=3?3:ve.length;de>0;de--){var ce=ve[ve.length-de];if(de==1&&ce>>5==6){this.charLength=2;break}if(de<=2&&ce>>4==14){this.charLength=3;break}if(de<=3&&ce>>3==30){this.charLength=4;break}}this.charReceived=de},le.prototype.end=function(ve){var de="";if(ve&&ve.length&&(de=this.write(ve)),this.charReceived){var ce=this.charReceived,z=this.charBuffer,ee=this.encoding;de+=z.slice(0,ce).toString(ee)}return de}},{buffer:38}],38:[function(me,Be,ke){(function(Ce){"use strict";function Le(){return ye.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function he(He,Ie){if(Le()<Ie)throw new RangeError("Invalid typed array length");return ye.TYPED_ARRAY_SUPPORT?(He=new Uint8Array(Ie),He.__proto__=ye.prototype):(He===null&&(He=new ye(Ie)),He.length=Ie),He}function ye(He,Ie,We){if(!(ye.TYPED_ARRAY_SUPPORT||this instanceof ye))return new ye(He,Ie,We);if(typeof He=="number"){if(typeof Ie=="string")throw new Error("If encoding is specified then the first argument must be a string");return ve(this,He)}return xe(this,He,Ie,We)}function xe(He,Ie,We,Oe){if(typeof Ie=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&Ie instanceof ArrayBuffer?z(He,Ie,We,Oe):typeof Ie=="string"?de(He,Ie,We):ee(He,Ie)}function ge(He){if(typeof He!="number")throw new TypeError('"size" argument must be a number');if(He<0)throw new RangeError('"size" argument must not be negative')}function le(He,Ie,We,Oe){return ge(Ie),Ie<=0?he(He,Ie):We!==void 0?typeof Oe=="string"?he(He,Ie).fill(We,Oe):he(He,Ie).fill(We):he(He,Ie)}function ve(He,Ie){if(ge(Ie),He=he(He,Ie<0?0:0|oe(Ie)),!ye.TYPED_ARRAY_SUPPORT)for(var We=0;We<Ie;++We)He[We]=0;return He}function de(He,Ie,We){if(typeof We=="string"&&We!==""||(We="utf8"),!ye.isEncoding(We))throw new TypeError('"encoding" must be a valid string encoding');var Oe=0|se(Ie,We);He=he(He,Oe);var be=He.write(Ie,We);return be!==Oe&&(He=He.slice(0,be)),He}function ce(He,Ie){var We=Ie.length<0?0:0|oe(Ie.length);He=he(He,We);for(var Oe=0;Oe<We;Oe+=1)He[Oe]=255&Ie[Oe];return He}function z(He,Ie,We,Oe){if(Ie.byteLength,We<0||Ie.byteLength<We)throw new RangeError("'offset' is out of bounds");if(Ie.byteLength<We+(Oe||0))throw new RangeError("'length' is out of bounds");return Ie=We===void 0&&Oe===void 0?new Uint8Array(Ie):Oe===void 0?new Uint8Array(Ie,We):new Uint8Array(Ie,We,Oe),ye.TYPED_ARRAY_SUPPORT?(He=Ie,He.__proto__=ye.prototype):He=ce(He,Ie),He}function ee(He,Ie){if(ye.isBuffer(Ie)){var We=0|oe(Ie.length);return He=he(He,We),He.length===0||Ie.copy(He,0,0,We),He}if(Ie){if(typeof ArrayBuffer!="undefined"&&Ie.buffer instanceof ArrayBuffer||"length"in Ie)return typeof Ie.length!="number"||kt(Ie.length)?he(He,0):ce(He,Ie);if(Ie.type==="Buffer"&&xt(Ie.data))return ce(He,Ie.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function oe(He){if(He>=Le())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Le().toString(16)+" bytes");return 0|He}function ie(He){return+He!=He&&(He=0),ye.alloc(+He)}function se(He,Ie){if(ye.isBuffer(He))return He.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(He)||He instanceof ArrayBuffer))return He.byteLength;typeof He!="string"&&(He=""+He);var We=He.length;if(We===0)return 0;for(var Oe=!1;;)switch(Ie){case"ascii":case"latin1":case"binary":return We;case"utf8":case"utf-8":case void 0:return bn(He).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*We;case"hex":return We>>>1;case"base64":return Xt(He).length;default:if(Oe)return bn(He).length;Ie=(""+Ie).toLowerCase(),Oe=!0}}function ue(He,Ie,We){var Oe=!1;if((Ie===void 0||Ie<0)&&(Ie=0),Ie>this.length||((We===void 0||We>this.length)&&(We=this.length),We<=0)||(We>>>=0,Ie>>>=0,We<=Ie))return"";for(He||(He="utf8");;)switch(He){case"hex":return st(this,Ie,We);case"utf8":case"utf-8":return at(this,Ie,We);case"ascii":return et(this,Ie,We);case"latin1":case"binary":return yt(this,Ie,We);case"base64":return ft(this,Ie,We);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return zt(this,Ie,We);default:if(Oe)throw new TypeError("Unknown encoding: "+He);He=(He+"").toLowerCase(),Oe=!0}}function Se(He,Ie,We){var Oe=He[Ie];He[Ie]=He[We],He[We]=Oe}function we(He,Ie,We,Oe,be){if(He.length===0)return-1;if(typeof We=="string"?(Oe=We,We=0):We>2147483647?We=2147483647:We<-2147483648&&(We=-2147483648),We=+We,isNaN(We)&&(We=be?0:He.length-1),We<0&&(We=He.length+We),We>=He.length){if(be)return-1;We=He.length-1}else if(We<0){if(!be)return-1;We=0}if(typeof Ie=="string"&&(Ie=ye.from(Ie,Oe)),ye.isBuffer(Ie))return Ie.length===0?-1:Pe(He,Ie,We,Oe,be);if(typeof Ie=="number")return Ie&=255,ye.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?be?Uint8Array.prototype.indexOf.call(He,Ie,We):Uint8Array.prototype.lastIndexOf.call(He,Ie,We):Pe(He,[Ie],We,Oe,be);throw new TypeError("val must be string, number or Buffer")}function Pe(He,Ie,We,Oe,be){function Ne(gn,Un){return $e===1?gn[Un]:gn.readUInt16BE(Un*$e)}var $e=1,dt=He.length,Je=Ie.length;if(Oe!==void 0&&((Oe=String(Oe).toLowerCase())==="ucs2"||Oe==="ucs-2"||Oe==="utf16le"||Oe==="utf-16le")){if(He.length<2||Ie.length<2)return-1;$e=2,dt/=2,Je/=2,We/=2}var At;if(be){var en=-1;for(At=We;At<dt;At++)if(Ne(He,At)===Ne(Ie,en===-1?0:At-en)){if(en===-1&&(en=At),At-en+1===Je)return en*$e}else en!==-1&&(At-=At-en),en=-1}else for(We+Je>dt&&(We=dt-Je),At=We;At>=0;At--){for(var pn=!0,ln=0;ln<Je;ln++)if(Ne(He,At+ln)!==Ne(Ie,ln)){pn=!1;break}if(pn)return At}return-1}function Ae(He,Ie,We,Oe){We=Number(We)||0;var be=He.length-We;Oe?(Oe=Number(Oe))>be&&(Oe=be):Oe=be;var Ne=Ie.length;if(Ne%2!=0)throw new TypeError("Invalid hex string");Oe>Ne/2&&(Oe=Ne/2);for(var $e=0;$e<Oe;++$e){var dt=parseInt(Ie.substr(2*$e,2),16);if(isNaN(dt))return $e;He[We+$e]=dt}return $e}function De(He,Ie,We,Oe){return $t(bn(Ie,He.length-We),He,We,Oe)}function ze(He,Ie,We,Oe){return $t(Wt(Ie),He,We,Oe)}function Ze(He,Ie,We,Oe){return ze(He,Ie,We,Oe)}function Xe(He,Ie,We,Oe){return $t(Xt(Ie),He,We,Oe)}function Ge(He,Ie,We,Oe){return $t(Kt(Ie,He.length-We),He,We,Oe)}function ft(He,Ie,We){return Ie===0&&We===He.length?pt.fromByteArray(He):pt.fromByteArray(He.slice(Ie,We))}function at(He,Ie,We){We=Math.min(He.length,We);for(var Oe=[],be=Ie;be<We;){var Ne=He[be],$e=null,dt=Ne>239?4:Ne>223?3:Ne>191?2:1;if(be+dt<=We){var Je,At,en,pn;switch(dt){case 1:Ne<128&&($e=Ne);break;case 2:Je=He[be+1],(192&Je)==128&&(pn=(31&Ne)<<6|63&Je)>127&&($e=pn);break;case 3:Je=He[be+1],At=He[be+2],(192&Je)==128&&(192&At)==128&&(pn=(15&Ne)<<12|(63&Je)<<6|63&At)>2047&&(pn<55296||pn>57343)&&($e=pn);break;case 4:Je=He[be+1],At=He[be+2],en=He[be+3],(192&Je)==128&&(192&At)==128&&(192&en)==128&&(pn=(15&Ne)<<18|(63&Je)<<12|(63&At)<<6|63&en)>65535&&pn<1114112&&($e=pn)}}$e===null?($e=65533,dt=1):$e>65535&&($e-=65536,Oe.push($e>>>10&1023|55296),$e=56320|1023&$e),Oe.push($e),be+=dt}return Ct(Oe)}function Ct(He){var Ie=He.length;if(Ie<=vt)return String.fromCharCode.apply(String,He);for(var We="",Oe=0;Oe<Ie;)We+=String.fromCharCode.apply(String,He.slice(Oe,Oe+=vt));return We}function et(He,Ie,We){var Oe="";We=Math.min(He.length,We);for(var be=Ie;be<We;++be)Oe+=String.fromCharCode(127&He[be]);return Oe}function yt(He,Ie,We){var Oe="";We=Math.min(He.length,We);for(var be=Ie;be<We;++be)Oe+=String.fromCharCode(He[be]);return Oe}function st(He,Ie,We){var Oe=He.length;(!Ie||Ie<0)&&(Ie=0),(!We||We<0||We>Oe)&&(We=Oe);for(var be="",Ne=Ie;Ne<We;++Ne)be+=Jt(He[Ne]);return be}function zt(He,Ie,We){for(var Oe=He.slice(Ie,We),be="",Ne=0;Ne<Oe.length;Ne+=2)be+=String.fromCharCode(Oe[Ne]+256*Oe[Ne+1]);return be}function lt(He,Ie,We){if(He%1!=0||He<0)throw new RangeError("offset is not uint");if(He+Ie>We)throw new RangeError("Trying to access beyond buffer length")}function tt(He,Ie,We,Oe,be,Ne){if(!ye.isBuffer(He))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ie>be||Ie<Ne)throw new RangeError('"value" argument is out of bounds');if(We+Oe>He.length)throw new RangeError("Index out of range")}function ut(He,Ie,We,Oe){Ie<0&&(Ie=65535+Ie+1);for(var be=0,Ne=Math.min(He.length-We,2);be<Ne;++be)He[We+be]=(Ie&255<<8*(Oe?be:1-be))>>>8*(Oe?be:1-be)}function mt(He,Ie,We,Oe){Ie<0&&(Ie=4294967295+Ie+1);for(var be=0,Ne=Math.min(He.length-We,4);be<Ne;++be)He[We+be]=Ie>>>8*(Oe?be:3-be)&255}function Pt(He,Ie,We,Oe,be,Ne){if(We+Oe>He.length)throw new RangeError("Index out of range");if(We<0)throw new RangeError("Index out of range")}function gt(He,Ie,We,Oe,be){return be||Pt(He,Ie,We,4,34028234663852886e22,-34028234663852886e22),Bt.write(He,Ie,We,Oe,23,4),We+4}function Ft(He,Ie,We,Oe,be){return be||Pt(He,Ie,We,8,17976931348623157e292,-17976931348623157e292),Bt.write(He,Ie,We,Oe,52,8),We+8}function Ht(He){if(He=hn(He).replace(nt,""),He.length<2)return"";for(;He.length%4!=0;)He+="=";return He}function hn(He){return He.trim?He.trim():He.replace(/^\s+|\s+$/g,"")}function Jt(He){return He<16?"0"+He.toString(16):He.toString(16)}function bn(He,Ie){Ie=Ie||1/0;for(var We,Oe=He.length,be=null,Ne=[],$e=0;$e<Oe;++$e){if((We=He.charCodeAt($e))>55295&&We<57344){if(!be){if(We>56319){(Ie-=3)>-1&&Ne.push(239,191,189);continue}if($e+1===Oe){(Ie-=3)>-1&&Ne.push(239,191,189);continue}be=We;continue}if(We<56320){(Ie-=3)>-1&&Ne.push(239,191,189),be=We;continue}We=65536+(be-55296<<10|We-56320)}else be&&(Ie-=3)>-1&&Ne.push(239,191,189);if(be=null,We<128){if((Ie-=1)<0)break;Ne.push(We)}else if(We<2048){if((Ie-=2)<0)break;Ne.push(We>>6|192,63&We|128)}else if(We<65536){if((Ie-=3)<0)break;Ne.push(We>>12|224,We>>6&63|128,63&We|128)}else{if(!(We<1114112))throw new Error("Invalid code point");if((Ie-=4)<0)break;Ne.push(We>>18|240,We>>12&63|128,We>>6&63|128,63&We|128)}}return Ne}function Wt(He){for(var Ie=[],We=0;We<He.length;++We)Ie.push(255&He.charCodeAt(We));return Ie}function Kt(He,Ie){for(var We,Oe,be,Ne=[],$e=0;$e<He.length&&!((Ie-=2)<0);++$e)We=He.charCodeAt($e),Oe=We>>8,be=We%256,Ne.push(be),Ne.push(Oe);return Ne}function Xt(He){return pt.toByteArray(Ht(He))}function $t(He,Ie,We,Oe){for(var be=0;be<Oe&&!(be+We>=Ie.length||be>=He.length);++be)Ie[be+We]=He[be];return be}function kt(He){return He!==He}var pt=me("base64-js"),Bt=me("ieee754"),xt=me("isarray");ke.Buffer=ye,ke.SlowBuffer=ie,ke.INSPECT_MAX_BYTES=50,ye.TYPED_ARRAY_SUPPORT=Ce.TYPED_ARRAY_SUPPORT!==void 0?Ce.TYPED_ARRAY_SUPPORT:function(){try{var He=new Uint8Array(1);return He.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},He.foo()===42&&typeof He.subarray=="function"&&He.subarray(1,1).byteLength===0}catch(Ie){return!1}}(),ke.kMaxLength=Le(),ye.poolSize=8192,ye._augment=function(He){return He.__proto__=ye.prototype,He},ye.from=function(He,Ie,We){return xe(null,He,Ie,We)},ye.TYPED_ARRAY_SUPPORT&&(ye.prototype.__proto__=Uint8Array.prototype,ye.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&ye[Symbol.species]===ye&&Object.defineProperty(ye,Symbol.species,{value:null,configurable:!0})),ye.alloc=function(He,Ie,We){return le(null,He,Ie,We)},ye.allocUnsafe=function(He){return ve(null,He)},ye.allocUnsafeSlow=function(He){return ve(null,He)},ye.isBuffer=function(He){return!(He==null||!He._isBuffer)},ye.compare=function(He,Ie){if(!ye.isBuffer(He)||!ye.isBuffer(Ie))throw new TypeError("Arguments must be Buffers");if(He===Ie)return 0;for(var We=He.length,Oe=Ie.length,be=0,Ne=Math.min(We,Oe);be<Ne;++be)if(He[be]!==Ie[be]){We=He[be],Oe=Ie[be];break}return We<Oe?-1:Oe<We?1:0},ye.isEncoding=function(He){switch(String(He).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},ye.concat=function(He,Ie){if(!xt(He))throw new TypeError('"list" argument must be an Array of Buffers');if(He.length===0)return ye.alloc(0);var We;if(Ie===void 0)for(Ie=0,We=0;We<He.length;++We)Ie+=He[We].length;var Oe=ye.allocUnsafe(Ie),be=0;for(We=0;We<He.length;++We){var Ne=He[We];if(!ye.isBuffer(Ne))throw new TypeError('"list" argument must be an Array of Buffers');Ne.copy(Oe,be),be+=Ne.length}return Oe},ye.byteLength=se,ye.prototype._isBuffer=!0,ye.prototype.swap16=function(){var He=this.length;if(He%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Ie=0;Ie<He;Ie+=2)Se(this,Ie,Ie+1);return this},ye.prototype.swap32=function(){var He=this.length;if(He%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Ie=0;Ie<He;Ie+=4)Se(this,Ie,Ie+3),Se(this,Ie+1,Ie+2);return this},ye.prototype.swap64=function(){var He=this.length;if(He%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Ie=0;Ie<He;Ie+=8)Se(this,Ie,Ie+7),Se(this,Ie+1,Ie+6),Se(this,Ie+2,Ie+5),Se(this,Ie+3,Ie+4);return this},ye.prototype.toString=function(){var He=0|this.length;return He===0?"":arguments.length===0?at(this,0,He):ue.apply(this,arguments)},ye.prototype.equals=function(He){if(!ye.isBuffer(He))throw new TypeError("Argument must be a Buffer");return this===He||ye.compare(this,He)===0},ye.prototype.inspect=function(){var He="",Ie=ke.INSPECT_MAX_BYTES;return this.length>0&&(He=this.toString("hex",0,Ie).match(/.{2}/g).join(" "),this.length>Ie&&(He+=" ... ")),"<Buffer "+He+">"},ye.prototype.compare=function(He,Ie,We,Oe,be){if(!ye.isBuffer(He))throw new TypeError("Argument must be a Buffer");if(Ie===void 0&&(Ie=0),We===void 0&&(We=He?He.length:0),Oe===void 0&&(Oe=0),be===void 0&&(be=this.length),Ie<0||We>He.length||Oe<0||be>this.length)throw new RangeError("out of range index");if(Oe>=be&&Ie>=We)return 0;if(Oe>=be)return-1;if(Ie>=We)return 1;if(Ie>>>=0,We>>>=0,Oe>>>=0,be>>>=0,this===He)return 0;for(var Ne=be-Oe,$e=We-Ie,dt=Math.min(Ne,$e),Je=this.slice(Oe,be),At=He.slice(Ie,We),en=0;en<dt;++en)if(Je[en]!==At[en]){Ne=Je[en],$e=At[en];break}return Ne<$e?-1:$e<Ne?1:0},ye.prototype.includes=function(He,Ie,We){return this.indexOf(He,Ie,We)!==-1},ye.prototype.indexOf=function(He,Ie,We){return we(this,He,Ie,We,!0)},ye.prototype.lastIndexOf=function(He,Ie,We){return we(this,He,Ie,We,!1)},ye.prototype.write=function(He,Ie,We,Oe){if(Ie===void 0)Oe="utf8",We=this.length,Ie=0;else if(We===void 0&&typeof Ie=="string")Oe=Ie,We=this.length,Ie=0;else{if(!isFinite(Ie))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");Ie|=0,isFinite(We)?(We|=0,Oe===void 0&&(Oe="utf8")):(Oe=We,We=void 0)}var be=this.length-Ie;if((We===void 0||We>be)&&(We=be),He.length>0&&(We<0||Ie<0)||Ie>this.length)throw new RangeError("Attempt to write outside buffer bounds");Oe||(Oe="utf8");for(var Ne=!1;;)switch(Oe){case"hex":return Ae(this,He,Ie,We);case"utf8":case"utf-8":return De(this,He,Ie,We);case"ascii":return ze(this,He,Ie,We);case"latin1":case"binary":return Ze(this,He,Ie,We);case"base64":return Xe(this,He,Ie,We);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ge(this,He,Ie,We);default:if(Ne)throw new TypeError("Unknown encoding: "+Oe);Oe=(""+Oe).toLowerCase(),Ne=!0}},ye.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var vt=4096;ye.prototype.slice=function(He,Ie){var We=this.length;He=~~He,Ie=Ie===void 0?We:~~Ie,He<0?(He+=We)<0&&(He=0):He>We&&(He=We),Ie<0?(Ie+=We)<0&&(Ie=0):Ie>We&&(Ie=We),Ie<He&&(Ie=He);var Oe;if(ye.TYPED_ARRAY_SUPPORT)Oe=this.subarray(He,Ie),Oe.__proto__=ye.prototype;else{var be=Ie-He;Oe=new ye(be,void 0);for(var Ne=0;Ne<be;++Ne)Oe[Ne]=this[Ne+He]}return Oe},ye.prototype.readUIntLE=function(He,Ie,We){He|=0,Ie|=0,We||lt(He,Ie,this.length);for(var Oe=this[He],be=1,Ne=0;++Ne<Ie&&(be*=256);)Oe+=this[He+Ne]*be;return Oe},ye.prototype.readUIntBE=function(He,Ie,We){He|=0,Ie|=0,We||lt(He,Ie,this.length);for(var Oe=this[He+--Ie],be=1;Ie>0&&(be*=256);)Oe+=this[He+--Ie]*be;return Oe},ye.prototype.readUInt8=function(He,Ie){return Ie||lt(He,1,this.length),this[He]},ye.prototype.readUInt16LE=function(He,Ie){return Ie||lt(He,2,this.length),this[He]|this[He+1]<<8},ye.prototype.readUInt16BE=function(He,Ie){return Ie||lt(He,2,this.length),this[He]<<8|this[He+1]},ye.prototype.readUInt32LE=function(He,Ie){return Ie||lt(He,4,this.length),(this[He]|this[He+1]<<8|this[He+2]<<16)+16777216*this[He+3]},ye.prototype.readUInt32BE=function(He,Ie){return Ie||lt(He,4,this.length),16777216*this[He]+(this[He+1]<<16|this[He+2]<<8|this[He+3])},ye.prototype.readIntLE=function(He,Ie,We){He|=0,Ie|=0,We||lt(He,Ie,this.length);for(var Oe=this[He],be=1,Ne=0;++Ne<Ie&&(be*=256);)Oe+=this[He+Ne]*be;return be*=128,Oe>=be&&(Oe-=Math.pow(2,8*Ie)),Oe},ye.prototype.readIntBE=function(He,Ie,We){He|=0,Ie|=0,We||lt(He,Ie,this.length);for(var Oe=Ie,be=1,Ne=this[He+--Oe];Oe>0&&(be*=256);)Ne+=this[He+--Oe]*be;return be*=128,Ne>=be&&(Ne-=Math.pow(2,8*Ie)),Ne},ye.prototype.readInt8=function(He,Ie){return Ie||lt(He,1,this.length),128&this[He]?-1*(255-this[He]+1):this[He]},ye.prototype.readInt16LE=function(He,Ie){Ie||lt(He,2,this.length);var We=this[He]|this[He+1]<<8;return 32768&We?4294901760|We:We},ye.prototype.readInt16BE=function(He,Ie){Ie||lt(He,2,this.length);var We=this[He+1]|this[He]<<8;return 32768&We?4294901760|We:We},ye.prototype.readInt32LE=function(He,Ie){return Ie||lt(He,4,this.length),this[He]|this[He+1]<<8|this[He+2]<<16|this[He+3]<<24},ye.prototype.readInt32BE=function(He,Ie){return Ie||lt(He,4,this.length),this[He]<<24|this[He+1]<<16|this[He+2]<<8|this[He+3]},ye.prototype.readFloatLE=function(He,Ie){return Ie||lt(He,4,this.length),Bt.read(this,He,!0,23,4)},ye.prototype.readFloatBE=function(He,Ie){return Ie||lt(He,4,this.length),Bt.read(this,He,!1,23,4)},ye.prototype.readDoubleLE=function(He,Ie){return Ie||lt(He,8,this.length),Bt.read(this,He,!0,52,8)},ye.prototype.readDoubleBE=function(He,Ie){return Ie||lt(He,8,this.length),Bt.read(this,He,!1,52,8)},ye.prototype.writeUIntLE=function(He,Ie,We,Oe){He=+He,Ie|=0,We|=0,!Oe&&tt(this,He,Ie,We,Math.pow(2,8*We)-1,0);var be=1,Ne=0;for(this[Ie]=255&He;++Ne<We&&(be*=256);)this[Ie+Ne]=He/be&255;return Ie+We},ye.prototype.writeUIntBE=function(He,Ie,We,Oe){He=+He,Ie|=0,We|=0,!Oe&&tt(this,He,Ie,We,Math.pow(2,8*We)-1,0);var be=We-1,Ne=1;for(this[Ie+be]=255&He;--be>=0&&(Ne*=256);)this[Ie+be]=He/Ne&255;return Ie+We},ye.prototype.writeUInt8=function(He,Ie,We){return He=+He,Ie|=0,We||tt(this,He,Ie,1,255,0),ye.TYPED_ARRAY_SUPPORT||(He=Math.floor(He)),this[Ie]=255&He,Ie+1},ye.prototype.writeUInt16LE=function(He,Ie,We){return He=+He,Ie|=0,We||tt(this,He,Ie,2,65535,0),ye.TYPED_ARRAY_SUPPORT?(this[Ie]=255&He,this[Ie+1]=He>>>8):ut(this,He,Ie,!0),Ie+2},ye.prototype.writeUInt16BE=function(He,Ie,We){return He=+He,Ie|=0,We||tt(this,He,Ie,2,65535,0),ye.TYPED_ARRAY_SUPPORT?(this[Ie]=He>>>8,this[Ie+1]=255&He):ut(this,He,Ie,!1),Ie+2},ye.prototype.writeUInt32LE=function(He,Ie,We){return He=+He,Ie|=0,We||tt(this,He,Ie,4,4294967295,0),ye.TYPED_ARRAY_SUPPORT?(this[Ie+3]=He>>>24,this[Ie+2]=He>>>16,this[Ie+1]=He>>>8,this[Ie]=255&He):mt(this,He,Ie,!0),Ie+4},ye.prototype.writeUInt32BE=function(He,Ie,We){return He=+He,Ie|=0,We||tt(this,He,Ie,4,4294967295,0),ye.TYPED_ARRAY_SUPPORT?(this[Ie]=He>>>24,this[Ie+1]=He>>>16,this[Ie+2]=He>>>8,this[Ie+3]=255&He):mt(this,He,Ie,!1),Ie+4},ye.prototype.writeIntLE=function(He,Ie,We,Oe){if(He=+He,Ie|=0,!Oe){var be=Math.pow(2,8*We-1);tt(this,He,Ie,We,be-1,-be)}var Ne=0,$e=1,dt=0;for(this[Ie]=255&He;++Ne<We&&($e*=256);)He<0&&dt===0&&this[Ie+Ne-1]!==0&&(dt=1),this[Ie+Ne]=(He/$e>>0)-dt&255;return Ie+We},ye.prototype.writeIntBE=function(He,Ie,We,Oe){if(He=+He,Ie|=0,!Oe){var be=Math.pow(2,8*We-1);tt(this,He,Ie,We,be-1,-be)}var Ne=We-1,$e=1,dt=0;for(this[Ie+Ne]=255&He;--Ne>=0&&($e*=256);)He<0&&dt===0&&this[Ie+Ne+1]!==0&&(dt=1),this[Ie+Ne]=(He/$e>>0)-dt&255;return Ie+We},ye.prototype.writeInt8=function(He,Ie,We){return He=+He,Ie|=0,We||tt(this,He,Ie,1,127,-128),ye.TYPED_ARRAY_SUPPORT||(He=Math.floor(He)),He<0&&(He=255+He+1),this[Ie]=255&He,Ie+1},ye.prototype.writeInt16LE=function(He,Ie,We){return He=+He,Ie|=0,We||tt(this,He,Ie,2,32767,-32768),ye.TYPED_ARRAY_SUPPORT?(this[Ie]=255&He,this[Ie+1]=He>>>8):ut(this,He,Ie,!0),Ie+2},ye.prototype.writeInt16BE=function(He,Ie,We){return He=+He,Ie|=0,We||tt(this,He,Ie,2,32767,-32768),ye.TYPED_ARRAY_SUPPORT?(this[Ie]=He>>>8,this[Ie+1]=255&He):ut(this,He,Ie,!1),Ie+2},ye.prototype.writeInt32LE=function(He,Ie,We){return He=+He,Ie|=0,We||tt(this,He,Ie,4,2147483647,-2147483648),ye.TYPED_ARRAY_SUPPORT?(this[Ie]=255&He,this[Ie+1]=He>>>8,this[Ie+2]=He>>>16,this[Ie+3]=He>>>24):mt(this,He,Ie,!0),Ie+4},ye.prototype.writeInt32BE=function(He,Ie,We){return He=+He,Ie|=0,We||tt(this,He,Ie,4,2147483647,-2147483648),He<0&&(He=4294967295+He+1),ye.TYPED_ARRAY_SUPPORT?(this[Ie]=He>>>24,this[Ie+1]=He>>>16,this[Ie+2]=He>>>8,this[Ie+3]=255&He):mt(this,He,Ie,!1),Ie+4},ye.prototype.writeFloatLE=function(He,Ie,We){return gt(this,He,Ie,!0,We)},ye.prototype.writeFloatBE=function(He,Ie,We){return gt(this,He,Ie,!1,We)},ye.prototype.writeDoubleLE=function(He,Ie,We){return Ft(this,He,Ie,!0,We)},ye.prototype.writeDoubleBE=function(He,Ie,We){return Ft(this,He,Ie,!1,We)},ye.prototype.copy=function(He,Ie,We,Oe){if(We||(We=0),Oe||Oe===0||(Oe=this.length),Ie>=He.length&&(Ie=He.length),Ie||(Ie=0),Oe>0&&Oe<We&&(Oe=We),Oe===We||He.length===0||this.length===0)return 0;if(Ie<0)throw new RangeError("targetStart out of bounds");if(We<0||We>=this.length)throw new RangeError("sourceStart out of bounds");if(Oe<0)throw new RangeError("sourceEnd out of bounds");Oe>this.length&&(Oe=this.length),He.length-Ie<Oe-We&&(Oe=He.length-Ie+We);var be,Ne=Oe-We;if(this===He&&We<Ie&&Ie<Oe)for(be=Ne-1;be>=0;--be)He[be+Ie]=this[be+We];else if(Ne<1e3||!ye.TYPED_ARRAY_SUPPORT)for(be=0;be<Ne;++be)He[be+Ie]=this[be+We];else Uint8Array.prototype.set.call(He,this.subarray(We,We+Ne),Ie);return Ne},ye.prototype.fill=function(He,Ie,We,Oe){if(typeof He=="string"){if(typeof Ie=="string"?(Oe=Ie,Ie=0,We=this.length):typeof We=="string"&&(Oe=We,We=this.length),He.length===1){var be=He.charCodeAt(0);be<256&&(He=be)}if(Oe!==void 0&&typeof Oe!="string")throw new TypeError("encoding must be a string");if(typeof Oe=="string"&&!ye.isEncoding(Oe))throw new TypeError("Unknown encoding: "+Oe)}else typeof He=="number"&&(He&=255);if(Ie<0||this.length<Ie||this.length<We)throw new RangeError("Out of range index");if(We<=Ie)return this;Ie>>>=0,We=We===void 0?this.length:We>>>0,He||(He=0);var Ne;if(typeof He=="number")for(Ne=Ie;Ne<We;++Ne)this[Ne]=He;else{var $e=ye.isBuffer(He)?He:bn(new ye(He,Oe).toString()),dt=$e.length;for(Ne=0;Ne<We-Ie;++Ne)this[Ne+Ie]=$e[Ne%dt]}return this};var nt=/[^+\/0-9A-Za-z-_]/g}).call(this,typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"base64-js":34,ieee754:161,isarray:166}],39:[function(me,Be,ke){Be.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],40:[function(me,Be,ke){"use strict";var Ce=function(){this.buffer=[],this.fns=[]};Ce.prototype.push=function(he,ye){if(this.fns.length)return this.fns.shift()(null,he);var xe={data:he,priority:ye},ge=Le(this.buffer,xe,function(le){return le.priority});this.buffer.splice(ge,0,xe)},Ce.prototype.next=function(){var he=this;return function(ye){if(he.buffer.length)return ye(null,he.buffer.pop().data);he.fns.push(ye)}};var Le=function(he,ye,xe){ye=xe(ye);for(var ge=0,le=he?he.length:ge;ge<le;){var ve=ge+le>>>1;xe(he[ve])<ye?ge=ve+1:le=ve}return ge};Be.exports=Ce},{}],41:[function(me,Be,ke){function Ce(z){var ee=this,oe=ce.call(arguments,1);return new Promise(function(ie,se){function ue(Pe){var Ae;try{Ae=z.next(Pe)}catch(De){return se(De)}we(Ae)}function Se(Pe){var Ae;try{Ae=z.throw(Pe)}catch(De){return se(De)}we(Ae)}function we(Pe){if(Pe.done)return ie(Pe.value);var Ae=Le.call(ee,Pe.value);return Ae&&ge(Ae)?Ae.then(ue,Se):Se(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(Pe.value)+'"'))}if(typeof z=="function"&&(z=z.apply(ee,oe)),!z||typeof z.next!="function")return ie(z);ue()})}function Le(z){return z&&(ge(z)?z:ve(z)||le(z)?Ce.call(this,z):typeof z=="function"?he.call(this,z):Array.isArray(z)?ye.call(this,z):de(z)?xe.call(this,z):z)}function he(z){var ee=this;return new Promise(function(oe,ie){z.call(ee,function(se,ue){if(se)return ie(se);arguments.length>2&&(ue=ce.call(arguments,1)),oe(ue)})})}function ye(z){return Promise.all(z.map(Le,this))}function xe(z){for(var ee=new z.constructor,oe=Object.keys(z),ie=[],se=0;se<oe.length;se++){var ue=oe[se],Se=Le.call(this,z[ue]);Se&&ge(Se)?function(we,Pe){ee[Pe]=void 0,ie.push(we.then(function(Ae){ee[Pe]=Ae}))}(Se,ue):ee[ue]=z[ue]}return Promise.all(ie).then(function(){return ee})}function ge(z){return typeof z.then=="function"}function le(z){return typeof z.next=="function"&&typeof z.throw=="function"}function ve(z){var ee=z.constructor;return!!ee&&(ee.name==="GeneratorFunction"||ee.displayName==="GeneratorFunction"||le(ee.prototype))}function de(z){return Object==z.constructor}var ce=Array.prototype.slice;Be.exports=Ce.default=Ce.co=Ce,Ce.wrap=function(z){function ee(){return Ce.call(this,z.apply(this,arguments))}return ee.__generatorFunction__=z,ee}},{}],42:[function(me,Be,ke){Be.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],43:[function(me,Be,ke){"use strict";function Ce(ye,xe){if(!(this instanceof Ce))return new Ce(ye,xe);this.src=ye,this._withAccess=xe}function Le(ye,xe){return ye[xe]===void 0&&ye.__lookupGetter__(xe)===void 0&&ye.__lookupSetter__(xe)===void 0}var he=Array.prototype.slice;Be.exports=Ce,Ce.prototype.withAccess=function(ye){return this._withAccess=ye!==!1,this},Ce.prototype.pick=function(ye){return Array.isArray(ye)||(ye=he.call(arguments)),ye.length&&(this.keys=ye),this},Ce.prototype.to=function(ye){if(ye=ye||{},!this.src)return ye;var xe=this.keys||Object.keys(this.src);if(!this._withAccess){for(var ge=0;ge<xe.length;ge++)le=xe[ge],ye[le]===void 0&&(ye[le]=this.src[le]);return ye}for(var ge=0;ge<xe.length;ge++){var le=xe[ge];if(Le(ye,le)){var ve=this.src.__lookupGetter__(le),de=this.src.__lookupSetter__(le);ve&&ye.__defineGetter__(le,ve),de&&ye.__defineSetter__(le,de),ve||de||(ye[le]=this.src[le])}}return ye},Ce.prototype.toCover=function(ye){for(var xe=this.keys||Object.keys(this.src),ge=0;ge<xe.length;ge++){var le=xe[ge];delete ye[le];var ve=this.src.__lookupGetter__(le),de=this.src.__lookupSetter__(le);ve&&ye.__defineGetter__(le,ve),de&&ye.__defineSetter__(le,de),ve||de||(ye[le]=this.src[le])}},Ce.prototype.override=Ce.prototype.toCover,Ce.prototype.and=function(ye){var xe={};return this.to(xe),this.src=ye,this.to(xe),this.src=xe,this}},{}],44:[function(me,Be,ke){me("../../modules/es6.string.iterator"),me("../../modules/es6.array.from"),Be.exports=me("../../modules/_core").Array.from},{"../../modules/_core":65,"../../modules/es6.array.from":133,"../../modules/es6.string.iterator":145}],45:[function(me,Be,ke){var Ce=me("../../modules/_core"),Le=Ce.JSON||(Ce.JSON={stringify:JSON.stringify});Be.exports=function(he){return Le.stringify.apply(Le,arguments)}},{"../../modules/_core":65}],46:[function(me,Be,ke){me("../../modules/es6.object.assign"),Be.exports=me("../../modules/_core").Object.assign},{"../../modules/_core":65,"../../modules/es6.object.assign":136}],47:[function(me,Be,ke){me("../../modules/es6.object.create");var Ce=me("../../modules/_core").Object;Be.exports=function(Le,he){return Ce.create(Le,he)}},{"../../modules/_core":65,"../../modules/es6.object.create":137}],48:[function(me,Be,ke){me("../../modules/es6.object.define-property");var Ce=me("../../modules/_core").Object;Be.exports=function(Le,he,ye){return Ce.defineProperty(Le,he,ye)}},{"../../modules/_core":65,"../../modules/es6.object.define-property":138}],49:[function(me,Be,ke){me("../../modules/es6.object.get-own-property-names");var Ce=me("../../modules/_core").Object;Be.exports=function(Le){return Ce.getOwnPropertyNames(Le)}},{"../../modules/_core":65,"../../modules/es6.object.get-own-property-names":139}],50:[function(me,Be,ke){me("../../modules/es6.object.get-prototype-of"),Be.exports=me("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":65,"../../modules/es6.object.get-prototype-of":140}],51:[function(me,Be,ke){me("../../modules/es6.object.keys"),Be.exports=me("../../modules/_core").Object.keys},{"../../modules/_core":65,"../../modules/es6.object.keys":141}],52:[function(me,Be,ke){me("../modules/es6.object.to-string"),me("../modules/es6.string.iterator"),me("../modules/web.dom.iterable"),me("../modules/es6.promise"),me("../modules/es7.promise.finally"),me("../modules/es7.promise.try"),Be.exports=me("../modules/_core").Promise},{"../modules/_core":65,"../modules/es6.object.to-string":142,"../modules/es6.promise":143,"../modules/es6.string.iterator":145,"../modules/es7.promise.finally":147,"../modules/es7.promise.try":148,"../modules/web.dom.iterable":151}],53:[function(me,Be,ke){me("../modules/web.immediate"),Be.exports=me("../modules/_core").setImmediate},{"../modules/_core":65,"../modules/web.immediate":152}],54:[function(me,Be,ke){me("../../modules/es6.string.from-code-point"),Be.exports=me("../../modules/_core").String.fromCodePoint},{"../../modules/_core":65,"../../modules/es6.string.from-code-point":144}],55:[function(me,Be,ke){me("../../modules/es6.function.has-instance"),Be.exports=me("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":130,"../../modules/es6.function.has-instance":135}],56:[function(me,Be,ke){me("../../modules/es6.symbol"),me("../../modules/es6.object.to-string"),me("../../modules/es7.symbol.async-iterator"),me("../../modules/es7.symbol.observable"),Be.exports=me("../../modules/_core").Symbol},{"../../modules/_core":65,"../../modules/es6.object.to-string":142,"../../modules/es6.symbol":146,"../../modules/es7.symbol.async-iterator":149,"../../modules/es7.symbol.observable":150}],57:[function(me,Be,ke){me("../../modules/es6.string.iterator"),me("../../modules/web.dom.iterable"),Be.exports=me("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":130,"../../modules/es6.string.iterator":145,"../../modules/web.dom.iterable":151}],58:[function(me,Be,ke){Be.exports=function(Ce){if(typeof Ce!="function")throw TypeError(Ce+" is not a function!");return Ce}},{}],59:[function(me,Be,ke){Be.exports=function(){}},{}],60:[function(me,Be,ke){Be.exports=function(Ce,Le,he,ye){if(!(Ce instanceof Le)||ye!==void 0&&ye in Ce)throw TypeError(he+": incorrect invocation!");return Ce}},{}],61:[function(me,Be,ke){var Ce=me("./_is-object");Be.exports=function(Le){if(!Ce(Le))throw TypeError(Le+" is not an object!");return Le}},{"./_is-object":85}],62:[function(me,Be,ke){var Ce=me("./_to-iobject"),Le=me("./_to-length"),he=me("./_to-absolute-index");Be.exports=function(ye){return function(xe,ge,le){var ve,de=Ce(xe),ce=Le(de.length),z=he(le,ce);if(ye&&ge!=ge){for(;ce>z;)if((ve=de[z++])!=ve)return!0}else for(;ce>z;z++)if((ye||z in de)&&de[z]===ge)return ye||z||0;return!ye&&-1}}},{"./_to-absolute-index":121,"./_to-iobject":123,"./_to-length":124}],63:[function(me,Be,ke){var Ce=me("./_cof"),Le=me("./_wks")("toStringTag"),he=Ce(function(){return arguments}())=="Arguments",ye=function(xe,ge){try{return xe[ge]}catch(le){}};Be.exports=function(xe){var ge,le,ve;return xe===void 0?"Undefined":xe===null?"Null":typeof(le=ye(ge=Object(xe),Le))=="string"?le:he?Ce(ge):(ve=Ce(ge))=="Object"&&typeof ge.callee=="function"?"Arguments":ve}},{"./_cof":64,"./_wks":131}],64:[function(me,Be,ke){var Ce={}.toString;Be.exports=function(Le){return Ce.call(Le).slice(8,-1)}},{}],65:[function(me,Be,ke){var Ce=Be.exports={version:"2.5.7"};typeof __e=="number"&&(__e=Ce)},{}],66:[function(me,Be,ke){"use strict";var Ce=me("./_object-dp"),Le=me("./_property-desc");Be.exports=function(he,ye,xe){ye in he?Ce.f(he,ye,Le(0,xe)):he[ye]=xe}},{"./_object-dp":98,"./_property-desc":111}],67:[function(me,Be,ke){var Ce=me("./_a-function");Be.exports=function(Le,he,ye){if(Ce(Le),he===void 0)return Le;switch(ye){case 1:return function(xe){return Le.call(he,xe)};case 2:return function(xe,ge){return Le.call(he,xe,ge)};case 3:return function(xe,ge,le){return Le.call(he,xe,ge,le)}}return function(){return Le.apply(he,arguments)}}},{"./_a-function":58}],68:[function(me,Be,ke){Be.exports=function(Ce){if(Ce==null)throw TypeError("Can't call method on "+Ce);return Ce}},{}],69:[function(me,Be,ke){Be.exports=!me("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":74}],70:[function(me,Be,ke){var Ce=me("./_is-object"),Le=me("./_global").document,he=Ce(Le)&&Ce(Le.createElement);Be.exports=function(ye){return he?Le.createElement(ye):{}}},{"./_global":76,"./_is-object":85}],71:[function(me,Be,ke){Be.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],72:[function(me,Be,ke){var Ce=me("./_object-keys"),Le=me("./_object-gops"),he=me("./_object-pie");Be.exports=function(ye){var xe=Ce(ye),ge=Le.f;if(ge)for(var le,ve=ge(ye),de=he.f,ce=0;ve.length>ce;)de.call(ye,le=ve[ce++])&&xe.push(le);return xe}},{"./_object-gops":103,"./_object-keys":106,"./_object-pie":107}],73:[function(me,Be,ke){var Ce=me("./_global"),Le=me("./_core"),he=me("./_ctx"),ye=me("./_hide"),xe=me("./_has"),ge=function(le,ve,de){var ce,z,ee,oe=le&ge.F,ie=le&ge.G,se=le&ge.S,ue=le&ge.P,Se=le&ge.B,we=le&ge.W,Pe=ie?Le:Le[ve]||(Le[ve]={}),Ae=Pe.prototype,De=ie?Ce:se?Ce[ve]:(Ce[ve]||{}).prototype;ie&&(de=ve);for(ce in de)(z=!oe&&De&&De[ce]!==void 0)&&xe(Pe,ce)||(ee=z?De[ce]:de[ce],Pe[ce]=ie&&typeof De[ce]!="function"?de[ce]:Se&&z?he(ee,Ce):we&&De[ce]==ee?function(ze){var Ze=function(Xe,Ge,ft){if(this instanceof ze){switch(arguments.length){case 0:return new ze;case 1:return new ze(Xe);case 2:return new ze(Xe,Ge)}return new ze(Xe,Ge,ft)}return ze.apply(this,arguments)};return Ze.prototype=ze.prototype,Ze}(ee):ue&&typeof ee=="function"?he(Function.call,ee):ee,ue&&((Pe.virtual||(Pe.virtual={}))[ce]=ee,le&ge.R&&Ae&&!Ae[ce]&&ye(Ae,ce,ee)))};ge.F=1,ge.G=2,ge.S=4,ge.P=8,ge.B=16,ge.W=32,ge.U=64,ge.R=128,Be.exports=ge},{"./_core":65,"./_ctx":67,"./_global":76,"./_has":77,"./_hide":78}],74:[function(me,Be,ke){Be.exports=function(Ce){try{return!!Ce()}catch(Le){return!0}}},{}],75:[function(me,Be,de){var Ce=me("./_ctx"),Le=me("./_iter-call"),he=me("./_is-array-iter"),ye=me("./_an-object"),xe=me("./_to-length"),ge=me("./core.get-iterator-method"),le={},ve={},de=Be.exports=function(ce,z,ee,oe,ie){var se,ue,Se,we,Pe=ie?function(){return ce}:ge(ce),Ae=Ce(ee,oe,z?2:1),De=0;if(typeof Pe!="function")throw TypeError(ce+" is not iterable!");if(he(Pe)){for(se=xe(ce.length);se>De;De++)if((we=z?Ae(ye(ue=ce[De])[0],ue[1]):Ae(ce[De]))===le||we===ve)return we}else for(Se=Pe.call(ce);!(ue=Se.next()).done;)if((we=Le(Se,Ae,ue.value,z))===le||we===ve)return we};de.BREAK=le,de.RETURN=ve},{"./_an-object":61,"./_ctx":67,"./_is-array-iter":83,"./_iter-call":86,"./_to-length":124,"./core.get-iterator-method":132}],76:[function(me,Be,ke){var Ce=Be.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=Ce)},{}],77:[function(me,Be,ke){var Ce={}.hasOwnProperty;Be.exports=function(Le,he){return Ce.call(Le,he)}},{}],78:[function(me,Be,ke){var Ce=me("./_object-dp"),Le=me("./_property-desc");Be.exports=me("./_descriptors")?function(he,ye,xe){return Ce.f(he,ye,Le(1,xe))}:function(he,ye,xe){return he[ye]=xe,he}},{"./_descriptors":69,"./_object-dp":98,"./_property-desc":111}],79:[function(me,Be,ke){var Ce=me("./_global").document;Be.exports=Ce&&Ce.documentElement},{"./_global":76}],80:[function(me,Be,ke){Be.exports=!me("./_descriptors")&&!me("./_fails")(function(){return Object.defineProperty(me("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":69,"./_dom-create":70,"./_fails":74}],81:[function(me,Be,ke){Be.exports=function(Ce,Le,he){var ye=he===void 0;switch(Le.length){case 0:return ye?Ce():Ce.call(he);case 1:return ye?Ce(Le[0]):Ce.call(he,Le[0]);case 2:return ye?Ce(Le[0],Le[1]):Ce.call(he,Le[0],Le[1]);case 3:return ye?Ce(Le[0],Le[1],Le[2]):Ce.call(he,Le[0],Le[1],Le[2]);case 4:return ye?Ce(Le[0],Le[1],Le[2],Le[3]):Ce.call(he,Le[0],Le[1],Le[2],Le[3])}return Ce.apply(he,Le)}},{}],82:[function(me,Be,ke){var Ce=me("./_cof");Be.exports=Object("z").propertyIsEnumerable(0)?Object:function(Le){return Ce(Le)=="String"?Le.split(""):Object(Le)}},{"./_cof":64}],83:[function(me,Be,ke){var Ce=me("./_iterators"),Le=me("./_wks")("iterator"),he=Array.prototype;Be.exports=function(ye){return ye!==void 0&&(Ce.Array===ye||he[Le]===ye)}},{"./_iterators":91,"./_wks":131}],84:[function(me,Be,ke){var Ce=me("./_cof");Be.exports=Array.isArray||function(Le){return Ce(Le)=="Array"}},{"./_cof":64}],85:[function(me,Be,ke){Be.exports=function(Ce){return typeof Ce=="object"?Ce!==null:typeof Ce=="function"}},{}],86:[function(me,Be,ke){var Ce=me("./_an-object");Be.exports=function(Le,he,ye,xe){try{return xe?he(Ce(ye)[0],ye[1]):he(ye)}catch(le){var ge=Le.return;throw ge!==void 0&&Ce(ge.call(Le)),le}}},{"./_an-object":61}],87:[function(me,Be,ke){"use strict";var Ce=me("./_object-create"),Le=me("./_property-desc"),he=me("./_set-to-string-tag"),ye={};me("./_hide")(ye,me("./_wks")("iterator"),function(){return this}),Be.exports=function(xe,ge,le){xe.prototype=Ce(ye,{next:Le(1,le)}),he(xe,ge+" Iterator")}},{"./_hide":78,"./_object-create":97,"./_property-desc":111,"./_set-to-string-tag":115,"./_wks":131}],88:[function(me,Be,ke){"use strict";var Ce=me("./_library"),Le=me("./_export"),he=me("./_redefine"),ye=me("./_hide"),xe=me("./_iterators"),ge=me("./_iter-create"),le=me("./_set-to-string-tag"),ve=me("./_object-gpo"),de=me("./_wks")("iterator"),ce=!([].keys&&"next"in[].keys()),z=function(){return this};Be.exports=function(ee,oe,ie,se,ue,Se,we){ge(ie,oe,se);var Pe,Ae,De,ze=function(st){if(!ce&&st in ft)return ft[st];switch(st){case"keys":case"values":return function(){return new ie(this,st)}}return function(){return new ie(this,st)}},Ze=oe+" Iterator",Xe=ue=="values",Ge=!1,ft=ee.prototype,at=ft[de]||ft["@@iterator"]||ue&&ft[ue],Ct=at||ze(ue),et=ue?Xe?ze("entries"):Ct:void 0,yt=oe=="Array"&&ft.entries||at;if(yt&&(De=ve(yt.call(new ee)))!==Object.prototype&&De.next&&(le(De,Ze,!0),Ce||typeof De[de]=="function"||ye(De,de,z)),Xe&&at&&at.name!=="values"&&(Ge=!0,Ct=function(){return at.call(this)}),Ce&&!we||!ce&&!Ge&&ft[de]||ye(ft,de,Ct),xe[oe]=Ct,xe[Ze]=z,ue)if(Pe={values:Xe?Ct:ze("values"),keys:Se?Ct:ze("keys"),entries:et},we)for(Ae in Pe)Ae in ft||he(ft,Ae,Pe[Ae]);else Le(Le.P+Le.F*(ce||Ge),oe,Pe);return Pe}},{"./_export":73,"./_hide":78,"./_iter-create":87,"./_iterators":91,"./_library":92,"./_object-gpo":104,"./_redefine":113,"./_set-to-string-tag":115,"./_wks":131}],89:[function(me,Be,ke){var Ce=me("./_wks")("iterator"),Le=!1;try{var he=[7][Ce]();he.return=function(){Le=!0},Array.from(he,function(){throw 2})}catch(ye){}Be.exports=function(ye,xe){if(!xe&&!Le)return!1;var ge=!1;try{var le=[7],ve=le[Ce]();ve.next=function(){return{done:ge=!0}},le[Ce]=function(){return ve},ye(le)}catch(de){}return ge}},{"./_wks":131}],90:[function(me,Be,ke){Be.exports=function(Ce,Le){return{value:Le,done:!!Ce}}},{}],91:[function(me,Be,ke){Be.exports={}},{}],92:[function(me,Be,ke){Be.exports=!0},{}],93:[function(me,Be,ke){var Ce=me("./_uid")("meta"),Le=me("./_is-object"),he=me("./_has"),ye=me("./_object-dp").f,xe=0,ge=Object.isExtensible||function(){return!0},le=!me("./_fails")(function(){return ge(Object.preventExtensions({}))}),ve=function(oe){ye(oe,Ce,{value:{i:"O"+ ++xe,w:{}}})},de=function(oe,ie){if(!Le(oe))return typeof oe=="symbol"?oe:(typeof oe=="string"?"S":"P")+oe;if(!he(oe,Ce)){if(!ge(oe))return"F";if(!ie)return"E";ve(oe)}return oe[Ce].i},ce=function(oe,ie){if(!he(oe,Ce)){if(!ge(oe))return!0;if(!ie)return!1;ve(oe)}return oe[Ce].w},z=function(oe){return le&&ee.NEED&&ge(oe)&&!he(oe,Ce)&&ve(oe),oe},ee=Be.exports={KEY:Ce,NEED:!1,fastKey:de,getWeak:ce,onFreeze:z}},{"./_fails":74,"./_has":77,"./_is-object":85,"./_object-dp":98,"./_uid":127}],94:[function(me,Be,ke){var Ce=me("./_global"),Le=me("./_task").set,he=Ce.MutationObserver||Ce.WebKitMutationObserver,ye=Ce.process,xe=Ce.Promise,ge=me("./_cof")(ye)=="process";Be.exports=function(){var le,ve,de,ce=function(){var ie,se;for(ge&&(ie=ye.domain)&&ie.exit();le;){se=le.fn,le=le.next;try{se()}catch(ue){throw le?de():ve=void 0,ue}}ve=void 0,ie&&ie.enter()};if(ge)de=function(){ye.nextTick(ce)};else if(!he||Ce.navigator&&Ce.navigator.standalone)if(xe&&xe.resolve){var z=xe.resolve(void 0);de=function(){z.then(ce)}}else de=function(){Le.call(Ce,ce)};else{var ee=!0,oe=document.createTextNode("");new he(ce).observe(oe,{characterData:!0}),de=function(){oe.data=ee=!ee}}return function(ie){var se={fn:ie,next:void 0};ve&&(ve.next=se),le||(le=se,de()),ve=se}}},{"./_cof":64,"./_global":76,"./_task":120}],95:[function(me,Be,ke){"use strict";function Ce(he){var ye,xe;this.promise=new he(function(ge,le){if(ye!==void 0||xe!==void 0)throw TypeError("Bad Promise constructor");ye=ge,xe=le}),this.resolve=Le(ye),this.reject=Le(xe)}var Le=me("./_a-function");Be.exports.f=function(he){return new Ce(he)}},{"./_a-function":58}],96:[function(me,Be,ke){"use strict";var Ce=me("./_object-keys"),Le=me("./_object-gops"),he=me("./_object-pie"),ye=me("./_to-object"),xe=me("./_iobject"),ge=Object.assign;Be.exports=!ge||me("./_fails")(function(){var le={},ve={},de=Symbol(),ce="abcdefghijklmnopqrst";return le[de]=7,ce.split("").forEach(function(z){ve[z]=z}),ge({},le)[de]!=7||Object.keys(ge({},ve)).join("")!=ce})?function(le,ve){for(var de=ye(le),ce=arguments.length,z=1,ee=Le.f,oe=he.f;ce>z;)for(var ie,se=xe(arguments[z++]),ue=ee?Ce(se).concat(ee(se)):Ce(se),Se=ue.length,we=0;Se>we;)oe.call(se,ie=ue[we++])&&(de[ie]=se[ie]);return de}:ge},{"./_fails":74,"./_iobject":82,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_to-object":125}],97:[function(me,Be,ke){var Ce=me("./_an-object"),Le=me("./_object-dps"),he=me("./_enum-bug-keys"),ye=me("./_shared-key")("IE_PROTO"),xe=function(){},ge=function(){var le,ve=me("./_dom-create")("iframe"),de=he.length;for(ve.style.display="none",me("./_html").appendChild(ve),ve.src="javascript:",le=ve.contentWindow.document,le.open(),le.write("<script>document.F=Object<\/script>"),le.close(),ge=le.F;de--;)delete ge.prototype[he[de]];return ge()};Be.exports=Object.create||function(le,ve){var de;return le!==null?(xe.prototype=Ce(le),de=new xe,xe.prototype=null,de[ye]=le):de=ge(),ve===void 0?de:Le(de,ve)}},{"./_an-object":61,"./_dom-create":70,"./_enum-bug-keys":71,"./_html":79,"./_object-dps":99,"./_shared-key":116}],98:[function(me,Be,ke){var Ce=me("./_an-object"),Le=me("./_ie8-dom-define"),he=me("./_to-primitive"),ye=Object.defineProperty;ke.f=me("./_descriptors")?Object.defineProperty:function(xe,ge,le){if(Ce(xe),ge=he(ge,!0),Ce(le),Le)try{return ye(xe,ge,le)}catch(ve){}if("get"in le||"set"in le)throw TypeError("Accessors not supported!");return"value"in le&&(xe[ge]=le.value),xe}},{"./_an-object":61,"./_descriptors":69,"./_ie8-dom-define":80,"./_to-primitive":126}],99:[function(me,Be,ke){var Ce=me("./_object-dp"),Le=me("./_an-object"),he=me("./_object-keys");Be.exports=me("./_descriptors")?Object.defineProperties:function(ye,xe){Le(ye);for(var ge,le=he(xe),ve=le.length,de=0;ve>de;)Ce.f(ye,ge=le[de++],xe[ge]);return ye}},{"./_an-object":61,"./_descriptors":69,"./_object-dp":98,"./_object-keys":106}],100:[function(me,Be,ke){var Ce=me("./_object-pie"),Le=me("./_property-desc"),he=me("./_to-iobject"),ye=me("./_to-primitive"),xe=me("./_has"),ge=me("./_ie8-dom-define"),le=Object.getOwnPropertyDescriptor;ke.f=me("./_descriptors")?le:function(ve,de){if(ve=he(ve),de=ye(de,!0),ge)try{return le(ve,de)}catch(ce){}if(xe(ve,de))return Le(!Ce.f.call(ve,de),ve[de])}},{"./_descriptors":69,"./_has":77,"./_ie8-dom-define":80,"./_object-pie":107,"./_property-desc":111,"./_to-iobject":123,"./_to-primitive":126}],101:[function(me,Be,ke){var Ce=me("./_to-iobject"),Le=me("./_object-gopn").f,he={}.toString,ye=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],xe=function(ge){try{return Le(ge)}catch(le){return ye.slice()}};Be.exports.f=function(ge){return ye&&he.call(ge)=="[object Window]"?xe(ge):Le(Ce(ge))}},{"./_object-gopn":102,"./_to-iobject":123}],102:[function(me,Be,ke){var Ce=me("./_object-keys-internal"),Le=me("./_enum-bug-keys").concat("length","prototype");ke.f=Object.getOwnPropertyNames||function(he){return Ce(he,Le)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],103:[function(me,Be,ke){ke.f=Object.getOwnPropertySymbols},{}],104:[function(me,Be,ke){var Ce=me("./_has"),Le=me("./_to-object"),he=me("./_shared-key")("IE_PROTO"),ye=Object.prototype;Be.exports=Object.getPrototypeOf||function(xe){return xe=Le(xe),Ce(xe,he)?xe[he]:typeof xe.constructor=="function"&&xe instanceof xe.constructor?xe.constructor.prototype:xe instanceof Object?ye:null}},{"./_has":77,"./_shared-key":116,"./_to-object":125}],105:[function(me,Be,ke){var Ce=me("./_has"),Le=me("./_to-iobject"),he=me("./_array-includes")(!1),ye=me("./_shared-key")("IE_PROTO");Be.exports=function(xe,ge){var le,ve=Le(xe),de=0,ce=[];for(le in ve)le!=ye&&Ce(ve,le)&&ce.push(le);for(;ge.length>de;)Ce(ve,le=ge[de++])&&(~he(ce,le)||ce.push(le));return ce}},{"./_array-includes":62,"./_has":77,"./_shared-key":116,"./_to-iobject":123}],106:[function(me,Be,ke){var Ce=me("./_object-keys-internal"),Le=me("./_enum-bug-keys");Be.exports=Object.keys||function(he){return Ce(he,Le)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],107:[function(me,Be,ke){ke.f={}.propertyIsEnumerable},{}],108:[function(me,Be,ke){var Ce=me("./_export"),Le=me("./_core"),he=me("./_fails");Be.exports=function(ye,xe){var ge=(Le.Object||{})[ye]||Object[ye],le={};le[ye]=xe(ge),Ce(Ce.S+Ce.F*he(function(){ge(1)}),"Object",le)}},{"./_core":65,"./_export":73,"./_fails":74}],109:[function(me,Be,ke){Be.exports=function(Ce){try{return{e:!1,v:Ce()}}catch(Le){return{e:!0,v:Le}}}},{}],110:[function(me,Be,ke){var Ce=me("./_an-object"),Le=me("./_is-object"),he=me("./_new-promise-capability");Be.exports=function(ye,xe){if(Ce(ye),Le(xe)&&xe.constructor===ye)return xe;var ge=he.f(ye);return(0,ge.resolve)(xe),ge.promise}},{"./_an-object":61,"./_is-object":85,"./_new-promise-capability":95}],111:[function(me,Be,ke){Be.exports=function(Ce,Le){return{enumerable:!(1&Ce),configurable:!(2&Ce),writable:!(4&Ce),value:Le}}},{}],112:[function(me,Be,ke){var Ce=me("./_hide");Be.exports=function(Le,he,ye){for(var xe in he)ye&&Le[xe]?Le[xe]=he[xe]:Ce(Le,xe,he[xe]);return Le}},{"./_hide":78}],113:[function(me,Be,ke){Be.exports=me("./_hide")},{"./_hide":78}],114:[function(me,Be,ke){"use strict";var Ce=me("./_global"),Le=me("./_core"),he=me("./_object-dp"),ye=me("./_descriptors"),xe=me("./_wks")("species");Be.exports=function(ge){var le=typeof Le[ge]=="function"?Le[ge]:Ce[ge];ye&&le&&!le[xe]&&he.f(le,xe,{configurable:!0,get:function(){return this}})}},{"./_core":65,"./_descriptors":69,"./_global":76,"./_object-dp":98,"./_wks":131}],115:[function(me,Be,ke){var Ce=me("./_object-dp").f,Le=me("./_has"),he=me("./_wks")("toStringTag");Be.exports=function(ye,xe,ge){ye&&!Le(ye=ge?ye:ye.prototype,he)&&Ce(ye,he,{configurable:!0,value:xe})}},{"./_has":77,"./_object-dp":98,"./_wks":131}],116:[function(me,Be,ke){var Ce=me("./_shared")("keys"),Le=me("./_uid");Be.exports=function(he){return Ce[he]||(Ce[he]=Le(he))}},{"./_shared":117,"./_uid":127}],117:[function(me,Be,ke){var Ce=me("./_core"),Le=me("./_global"),he=Le["__core-js_shared__"]||(Le["__core-js_shared__"]={});(Be.exports=function(ye,xe){return he[ye]||(he[ye]=xe!==void 0?xe:{})})("versions",[]).push({version:Ce.version,mode:me("./_library")?"pure":"global",copyright:"\u6F0F 2018 Denis Pushkarev (zloirock.ru)"})},{"./_core":65,"./_global":76,"./_library":92}],118:[function(me,Be,ke){var Ce=me("./_an-object"),Le=me("./_a-function"),he=me("./_wks")("species");Be.exports=function(ye,xe){var ge,le=Ce(ye).constructor;return le===void 0||(ge=Ce(le)[he])==null?xe:Le(ge)}},{"./_a-function":58,"./_an-object":61,"./_wks":131}],119:[function(me,Be,ke){var Ce=me("./_to-integer"),Le=me("./_defined");Be.exports=function(he){return function(ye,xe){var ge,le,ve=String(Le(ye)),de=Ce(xe),ce=ve.length;return de<0||de>=ce?he?"":void 0:(ge=ve.charCodeAt(de),ge<55296||ge>56319||de+1===ce||(le=ve.charCodeAt(de+1))<56320||le>57343?he?ve.charAt(de):ge:he?ve.slice(de,de+2):le-56320+(ge-55296<<10)+65536)}}},{"./_defined":68,"./_to-integer":122}],120:[function(me,Be,ke){var Ce,Le,he,ye=me("./_ctx"),xe=me("./_invoke"),ge=me("./_html"),le=me("./_dom-create"),ve=me("./_global"),de=ve.process,ce=ve.setImmediate,z=ve.clearImmediate,ee=ve.MessageChannel,oe=ve.Dispatch,ie=0,se={},ue=function(){var we=+this;if(se.hasOwnProperty(we)){var Pe=se[we];delete se[we],Pe()}},Se=function(we){ue.call(we.data)};ce&&z||(ce=function(we){for(var Pe=[],Ae=1;arguments.length>Ae;)Pe.push(arguments[Ae++]);return se[++ie]=function(){xe(typeof we=="function"?we:Function(we),Pe)},Ce(ie),ie},z=function(we){delete se[we]},me("./_cof")(de)=="process"?Ce=function(we){de.nextTick(ye(ue,we,1))}:oe&&oe.now?Ce=function(we){oe.now(ye(ue,we,1))}:ee?(Le=new ee,he=Le.port2,Le.port1.onmessage=Se,Ce=ye(he.postMessage,he,1)):ve.addEventListener&&typeof postMessage=="function"&&!ve.importScripts?(Ce=function(we){ve.postMessage(we+"","*")},ve.addEventListener("message",Se,!1)):Ce="onreadystatechange"in le("script")?function(we){ge.appendChild(le("script")).onreadystatechange=function(){ge.removeChild(this),ue.call(we)}}:function(we){setTimeout(ye(ue,we,1),0)}),Be.exports={set:ce,clear:z}},{"./_cof":64,"./_ctx":67,"./_dom-create":70,"./_global":76,"./_html":79,"./_invoke":81}],121:[function(me,Be,ke){var Ce=me("./_to-integer"),Le=Math.max,he=Math.min;Be.exports=function(ye,xe){return ye=Ce(ye),ye<0?Le(ye+xe,0):he(ye,xe)}},{"./_to-integer":122}],122:[function(me,Be,ke){var Ce=Math.ceil,Le=Math.floor;Be.exports=function(he){return isNaN(he=+he)?0:(he>0?Le:Ce)(he)}},{}],123:[function(me,Be,ke){var Ce=me("./_iobject"),Le=me("./_defined");Be.exports=function(he){return Ce(Le(he))}},{"./_defined":68,"./_iobject":82}],124:[function(me,Be,ke){var Ce=me("./_to-integer"),Le=Math.min;Be.exports=function(he){return he>0?Le(Ce(he),9007199254740991):0}},{"./_to-integer":122}],125:[function(me,Be,ke){var Ce=me("./_defined");Be.exports=function(Le){return Object(Ce(Le))}},{"./_defined":68}],126:[function(me,Be,ke){var Ce=me("./_is-object");Be.exports=function(Le,he){if(!Ce(Le))return Le;var ye,xe;if(he&&typeof(ye=Le.toString)=="function"&&!Ce(xe=ye.call(Le))||typeof(ye=Le.valueOf)=="function"&&!Ce(xe=ye.call(Le))||!he&&typeof(ye=Le.toString)=="function"&&!Ce(xe=ye.call(Le)))return xe;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":85}],127:[function(me,Be,ke){var Ce=0,Le=Math.random();Be.exports=function(he){return"Symbol(".concat(he===void 0?"":he,")_",(++Ce+Le).toString(36))}},{}],128:[function(me,Be,ke){var Ce=me("./_global"),Le=Ce.navigator;Be.exports=Le&&Le.userAgent||""},{"./_global":76}],129:[function(me,Be,ke){var Ce=me("./_global"),Le=me("./_core"),he=me("./_library"),ye=me("./_wks-ext"),xe=me("./_object-dp").f;Be.exports=function(ge){var le=Le.Symbol||(Le.Symbol=he?{}:Ce.Symbol||{});ge.charAt(0)=="_"||ge in le||xe(le,ge,{value:ye.f(ge)})}},{"./_core":65,"./_global":76,"./_library":92,"./_object-dp":98,"./_wks-ext":130}],130:[function(me,Be,ke){ke.f=me("./_wks")},{"./_wks":131}],131:[function(me,Be,ke){var Ce=me("./_shared")("wks"),Le=me("./_uid"),he=me("./_global").Symbol,ye=typeof he=="function";(Be.exports=function(xe){return Ce[xe]||(Ce[xe]=ye&&he[xe]||(ye?he:Le)("Symbol."+xe))}).store=Ce},{"./_global":76,"./_shared":117,"./_uid":127}],132:[function(me,Be,ke){var Ce=me("./_classof"),Le=me("./_wks")("iterator"),he=me("./_iterators");Be.exports=me("./_core").getIteratorMethod=function(ye){if(ye!=null)return ye[Le]||ye["@@iterator"]||he[Ce(ye)]}},{"./_classof":63,"./_core":65,"./_iterators":91,"./_wks":131}],133:[function(me,Be,ke){"use strict";var Ce=me("./_ctx"),Le=me("./_export"),he=me("./_to-object"),ye=me("./_iter-call"),xe=me("./_is-array-iter"),ge=me("./_to-length"),le=me("./_create-property"),ve=me("./core.get-iterator-method");Le(Le.S+Le.F*!me("./_iter-detect")(function(de){Array.from(de)}),"Array",{from:function(de){var ce,z,ee,oe,ie=he(de),se=typeof this=="function"?this:Array,ue=arguments.length,Se=ue>1?arguments[1]:void 0,we=Se!==void 0,Pe=0,Ae=ve(ie);if(we&&(Se=Ce(Se,ue>2?arguments[2]:void 0,2)),Ae==null||se==Array&&xe(Ae))for(ce=ge(ie.length),z=new se(ce);ce>Pe;Pe++)le(z,Pe,we?Se(ie[Pe],Pe):ie[Pe]);else for(oe=Ae.call(ie),z=new se;!(ee=oe.next()).done;Pe++)le(z,Pe,we?ye(oe,Se,[ee.value,Pe],!0):ee.value);return z.length=Pe,z}})},{"./_create-property":66,"./_ctx":67,"./_export":73,"./_is-array-iter":83,"./_iter-call":86,"./_iter-detect":89,"./_to-length":124,"./_to-object":125,"./core.get-iterator-method":132}],134:[function(me,Be,ke){"use strict";var Ce=me("./_add-to-unscopables"),Le=me("./_iter-step"),he=me("./_iterators"),ye=me("./_to-iobject");Be.exports=me("./_iter-define")(Array,"Array",function(xe,ge){this._t=ye(xe),this._i=0,this._k=ge},function(){var xe=this._t,ge=this._k,le=this._i++;return!xe||le>=xe.length?(this._t=void 0,Le(1)):ge=="keys"?Le(0,le):ge=="values"?Le(0,xe[le]):Le(0,[le,xe[le]])},"values"),he.Arguments=he.Array,Ce("keys"),Ce("values"),Ce("entries")},{"./_add-to-unscopables":59,"./_iter-define":88,"./_iter-step":90,"./_iterators":91,"./_to-iobject":123}],135:[function(me,Be,ke){"use strict";var Ce=me("./_is-object"),Le=me("./_object-gpo"),he=me("./_wks")("hasInstance"),ye=Function.prototype;he in ye||me("./_object-dp").f(ye,he,{value:function(xe){if(typeof this!="function"||!Ce(xe))return!1;if(!Ce(this.prototype))return xe instanceof this;for(;xe=Le(xe);)if(this.prototype===xe)return!0;return!1}})},{"./_is-object":85,"./_object-dp":98,"./_object-gpo":104,"./_wks":131}],136:[function(me,Be,ke){var Ce=me("./_export");Ce(Ce.S+Ce.F,"Object",{assign:me("./_object-assign")})},{"./_export":73,"./_object-assign":96}],137:[function(me,Be,ke){var Ce=me("./_export");Ce(Ce.S,"Object",{create:me("./_object-create")})},{"./_export":73,"./_object-create":97}],138:[function(me,Be,ke){var Ce=me("./_export");Ce(Ce.S+Ce.F*!me("./_descriptors"),"Object",{defineProperty:me("./_object-dp").f})},{"./_descriptors":69,"./_export":73,"./_object-dp":98}],139:[function(me,Be,ke){me("./_object-sap")("getOwnPropertyNames",function(){return me("./_object-gopn-ext").f})},{"./_object-gopn-ext":101,"./_object-sap":108}],140:[function(me,Be,ke){var Ce=me("./_to-object"),Le=me("./_object-gpo");me("./_object-sap")("getPrototypeOf",function(){return function(he){return Le(Ce(he))}})},{"./_object-gpo":104,"./_object-sap":108,"./_to-object":125}],141:[function(me,Be,ke){var Ce=me("./_to-object"),Le=me("./_object-keys");me("./_object-sap")("keys",function(){return function(he){return Le(Ce(he))}})},{"./_object-keys":106,"./_object-sap":108,"./_to-object":125}],142:[function(me,Be,ke){arguments[4][36][0].apply(ke,arguments)},{dup:36}],143:[function(me,Be,ke){"use strict";var Ce,Le,he,ye,xe=me("./_library"),ge=me("./_global"),le=me("./_ctx"),ve=me("./_classof"),de=me("./_export"),ce=me("./_is-object"),z=me("./_a-function"),ee=me("./_an-instance"),oe=me("./_for-of"),ie=me("./_species-constructor"),se=me("./_task").set,ue=me("./_microtask")(),Se=me("./_new-promise-capability"),we=me("./_perform"),Pe=me("./_user-agent"),Ae=me("./_promise-resolve"),De=ge.TypeError,ze=ge.process,Ze=ze&&ze.versions,Xe=Ze&&Ze.v8||"",Ge=ge.Promise,ft=ve(ze)=="process",at=function(){},Ct=Le=Se.f,et=!!function(){try{var Pt=Ge.resolve(1),gt=(Pt.constructor={})[me("./_wks")("species")]=function(Ft){Ft(at,at)};return(ft||typeof PromiseRejectionEvent=="function")&&Pt.then(at)instanceof gt&&Xe.indexOf("6.6")!==0&&Pe.indexOf("Chrome/66")===-1}catch(Ft){}}(),yt=function(Pt){var gt;return!(!ce(Pt)||typeof(gt=Pt.then)!="function")&>},st=function(Pt,gt){if(!Pt._n){Pt._n=!0;var Ft=Pt._c;ue(function(){for(var Ht=Pt._v,hn=Pt._s==1,Jt=0;Ft.length>Jt;)(function(bn){var Wt,Kt,Xt,$t=hn?bn.ok:bn.fail,kt=bn.resolve,pt=bn.reject,Bt=bn.domain;try{$t?(hn||(Pt._h==2&&tt(Pt),Pt._h=1),$t===!0?Wt=Ht:(Bt&&Bt.enter(),Wt=$t(Ht),Bt&&(Bt.exit(),Xt=!0)),Wt===bn.promise?pt(De("Promise-chain cycle")):(Kt=yt(Wt))?Kt.call(Wt,kt,pt):kt(Wt)):pt(Ht)}catch(xt){Bt&&!Xt&&Bt.exit(),pt(xt)}})(Ft[Jt++]);Pt._c=[],Pt._n=!1,gt&&!Pt._h&&zt(Pt)})}},zt=function(Pt){se.call(ge,function(){var gt,Ft,Ht,hn=Pt._v,Jt=lt(Pt);if(Jt&&(gt=we(function(){ft?ze.emit("unhandledRejection",hn,Pt):(Ft=ge.onunhandledrejection)?Ft({promise:Pt,reason:hn}):(Ht=ge.console)&&Ht.error&&Ht.error("Unhandled promise rejection",hn)}),Pt._h=ft||lt(Pt)?2:1),Pt._a=void 0,Jt&>.e)throw gt.v})},lt=function(Pt){return Pt._h!==1&&(Pt._a||Pt._c).length===0},tt=function(Pt){se.call(ge,function(){var gt;ft?ze.emit("rejectionHandled",Pt):(gt=ge.onrejectionhandled)&>({promise:Pt,reason:Pt._v})})},ut=function(Pt){var gt=this;gt._d||(gt._d=!0,gt=gt._w||gt,gt._v=Pt,gt._s=2,gt._a||(gt._a=gt._c.slice()),st(gt,!0))},mt=function(Pt){var gt,Ft=this;if(!Ft._d){Ft._d=!0,Ft=Ft._w||Ft;try{if(Ft===Pt)throw De("Promise can't be resolved itself");(gt=yt(Pt))?ue(function(){var Ht={_w:Ft,_d:!1};try{gt.call(Pt,le(mt,Ht,1),le(ut,Ht,1))}catch(hn){ut.call(Ht,hn)}}):(Ft._v=Pt,Ft._s=1,st(Ft,!1))}catch(Ht){ut.call({_w:Ft,_d:!1},Ht)}}};et||(Ge=function(Pt){ee(this,Ge,"Promise","_h"),z(Pt),Ce.call(this);try{Pt(le(mt,this,1),le(ut,this,1))}catch(gt){ut.call(this,gt)}},Ce=function(Pt){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},Ce.prototype=me("./_redefine-all")(Ge.prototype,{then:function(Pt,gt){var Ft=Ct(ie(this,Ge));return Ft.ok=typeof Pt!="function"||Pt,Ft.fail=typeof gt=="function"&>,Ft.domain=ft?ze.domain:void 0,this._c.push(Ft),this._a&&this._a.push(Ft),this._s&&st(this,!1),Ft.promise},catch:function(Pt){return this.then(void 0,Pt)}}),he=function(){var Pt=new Ce;this.promise=Pt,this.resolve=le(mt,Pt,1),this.reject=le(ut,Pt,1)},Se.f=Ct=function(Pt){return Pt===Ge||Pt===ye?new he(Pt):Le(Pt)}),de(de.G+de.W+de.F*!et,{Promise:Ge}),me("./_set-to-string-tag")(Ge,"Promise"),me("./_set-species")("Promise"),ye=me("./_core").Promise,de(de.S+de.F*!et,"Promise",{reject:function(Pt){var gt=Ct(this);return(0,gt.reject)(Pt),gt.promise}}),de(de.S+de.F*(xe||!et),"Promise",{resolve:function(Pt){return Ae(xe&&this===ye?Ge:this,Pt)}}),de(de.S+de.F*!(et&&me("./_iter-detect")(function(Pt){Ge.all(Pt).catch(at)})),"Promise",{all:function(Pt){var gt=this,Ft=Ct(gt),Ht=Ft.resolve,hn=Ft.reject,Jt=we(function(){var bn=[],Wt=0,Kt=1;oe(Pt,!1,function(Xt){var $t=Wt++,kt=!1;bn.push(void 0),Kt++,gt.resolve(Xt).then(function(pt){kt||(kt=!0,bn[$t]=pt,--Kt||Ht(bn))},hn)}),--Kt||Ht(bn)});return Jt.e&&hn(Jt.v),Ft.promise},race:function(Pt){var gt=this,Ft=Ct(gt),Ht=Ft.reject,hn=we(function(){oe(Pt,!1,function(Jt){gt.resolve(Jt).then(Ft.resolve,Ht)})});return hn.e&&Ht(hn.v),Ft.promise}})},{"./_a-function":58,"./_an-instance":60,"./_classof":63,"./_core":65,"./_ctx":67,"./_export":73,"./_for-of":75,"./_global":76,"./_is-object":85,"./_iter-detect":89,"./_library":92,"./_microtask":94,"./_new-promise-capability":95,"./_perform":109,"./_promise-resolve":110,"./_redefine-all":112,"./_set-species":114,"./_set-to-string-tag":115,"./_species-constructor":118,"./_task":120,"./_user-agent":128,"./_wks":131}],144:[function(me,Be,ke){var Ce=me("./_export"),Le=me("./_to-absolute-index"),he=String.fromCharCode,ye=String.fromCodePoint;Ce(Ce.S+Ce.F*(!!ye&&ye.length!=1),"String",{fromCodePoint:function(xe){for(var ge,le=[],ve=arguments.length,de=0;ve>de;){if(ge=+arguments[de++],Le(ge,1114111)!==ge)throw RangeError(ge+" is not a valid code point");le.push(ge<65536?he(ge):he(55296+((ge-=65536)>>10),ge%1024+56320))}return le.join("")}})},{"./_export":73,"./_to-absolute-index":121}],145:[function(me,Be,ke){"use strict";var Ce=me("./_string-at")(!0);me("./_iter-define")(String,"String",function(Le){this._t=String(Le),this._i=0},function(){var Le,he=this._t,ye=this._i;return ye>=he.length?{value:void 0,done:!0}:(Le=Ce(he,ye),this._i+=Le.length,{value:Le,done:!1})})},{"./_iter-define":88,"./_string-at":119}],146:[function(me,Be,ke){"use strict";var Ce=me("./_global"),Le=me("./_has"),he=me("./_descriptors"),ye=me("./_export"),xe=me("./_redefine"),ge=me("./_meta").KEY,le=me("./_fails"),ve=me("./_shared"),de=me("./_set-to-string-tag"),ce=me("./_uid"),z=me("./_wks"),ee=me("./_wks-ext"),oe=me("./_wks-define"),ie=me("./_enum-keys"),se=me("./_is-array"),ue=me("./_an-object"),Se=me("./_is-object"),we=me("./_to-iobject"),Pe=me("./_to-primitive"),Ae=me("./_property-desc"),De=me("./_object-create"),ze=me("./_object-gopn-ext"),Ze=me("./_object-gopd"),Xe=me("./_object-dp"),Ge=me("./_object-keys"),ft=Ze.f,at=Xe.f,Ct=ze.f,et=Ce.Symbol,yt=Ce.JSON,st=yt&&yt.stringify,zt=z("_hidden"),lt=z("toPrimitive"),tt={}.propertyIsEnumerable,ut=ve("symbol-registry"),mt=ve("symbols"),Pt=ve("op-symbols"),gt=Object.prototype,Ft=typeof et=="function",Ht=Ce.QObject,hn=!Ht||!Ht.prototype||!Ht.prototype.findChild,Jt=he&&le(function(){return De(at({},"a",{get:function(){return at(this,"a",{value:7}).a}})).a!=7})?function(We,Oe,be){var Ne=ft(gt,Oe);Ne&&delete gt[Oe],at(We,Oe,be),Ne&&We!==gt&&at(gt,Oe,Ne)}:at,bn=function(We){var Oe=mt[We]=De(et.prototype);return Oe._k=We,Oe},Wt=Ft&&typeof et.iterator=="symbol"?function(We){return typeof We=="symbol"}:function(We){return We instanceof et},Kt=function(We,Oe,be){return We===gt&&Kt(Pt,Oe,be),ue(We),Oe=Pe(Oe,!0),ue(be),Le(mt,Oe)?(be.enumerable?(Le(We,zt)&&We[zt][Oe]&&(We[zt][Oe]=!1),be=De(be,{enumerable:Ae(0,!1)})):(Le(We,zt)||at(We,zt,Ae(1,{})),We[zt][Oe]=!0),Jt(We,Oe,be)):at(We,Oe,be)},Xt=function(We,Oe){ue(We);for(var be,Ne=ie(Oe=we(Oe)),$e=0,dt=Ne.length;dt>$e;)Kt(We,be=Ne[$e++],Oe[be]);return We},$t=function(We,Oe){return Oe===void 0?De(We):Xt(De(We),Oe)},kt=function(We){var Oe=tt.call(this,We=Pe(We,!0));return!(this===gt&&Le(mt,We)&&!Le(Pt,We))&&(!(Oe||!Le(this,We)||!Le(mt,We)||Le(this,zt)&&this[zt][We])||Oe)},pt=function(We,Oe){if(We=we(We),Oe=Pe(Oe,!0),We!==gt||!Le(mt,Oe)||Le(Pt,Oe)){var be=ft(We,Oe);return!be||!Le(mt,Oe)||Le(We,zt)&&We[zt][Oe]||(be.enumerable=!0),be}},Bt=function(We){for(var Oe,be=Ct(we(We)),Ne=[],$e=0;be.length>$e;)Le(mt,Oe=be[$e++])||Oe==zt||Oe==ge||Ne.push(Oe);return Ne},xt=function(We){for(var Oe,be=We===gt,Ne=Ct(be?Pt:we(We)),$e=[],dt=0;Ne.length>dt;)!Le(mt,Oe=Ne[dt++])||be&&!Le(gt,Oe)||$e.push(mt[Oe]);return $e};Ft||(et=function(){if(this instanceof et)throw TypeError("Symbol is not a constructor!");var We=ce(arguments.length>0?arguments[0]:void 0),Oe=function(be){this===gt&&Oe.call(Pt,be),Le(this,zt)&&Le(this[zt],We)&&(this[zt][We]=!1),Jt(this,We,Ae(1,be))};return he&&hn&&Jt(gt,We,{configurable:!0,set:Oe}),bn(We)},xe(et.prototype,"toString",function(){return this._k}),Ze.f=pt,Xe.f=Kt,me("./_object-gopn").f=ze.f=Bt,me("./_object-pie").f=kt,me("./_object-gops").f=xt,he&&!me("./_library")&&xe(gt,"propertyIsEnumerable",kt,!0),ee.f=function(We){return bn(z(We))}),ye(ye.G+ye.W+ye.F*!Ft,{Symbol:et});for(var vt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;vt.length>nt;)z(vt[nt++]);for(var He=Ge(z.store),Ie=0;He.length>Ie;)oe(He[Ie++]);ye(ye.S+ye.F*!Ft,"Symbol",{for:function(We){return Le(ut,We+="")?ut[We]:ut[We]=et(We)},keyFor:function(We){if(!Wt(We))throw TypeError(We+" is not a symbol!");for(var Oe in ut)if(ut[Oe]===We)return Oe},useSetter:function(){hn=!0},useSimple:function(){hn=!1}}),ye(ye.S+ye.F*!Ft,"Object",{create:$t,defineProperty:Kt,defineProperties:Xt,getOwnPropertyDescriptor:pt,getOwnPropertyNames:Bt,getOwnPropertySymbols:xt}),yt&&ye(ye.S+ye.F*(!Ft||le(function(){var We=et();return st([We])!="[null]"||st({a:We})!="{}"||st(Object(We))!="{}"})),"JSON",{stringify:function(We){for(var Oe,be,Ne=[We],$e=1;arguments.length>$e;)Ne.push(arguments[$e++]);if(be=Oe=Ne[1],(Se(Oe)||We!==void 0)&&!Wt(We))return se(Oe)||(Oe=function(dt,Je){if(typeof be=="function"&&(Je=be.call(this,dt,Je)),!Wt(Je))return Je}),Ne[1]=Oe,st.apply(yt,Ne)}}),et.prototype[lt]||me("./_hide")(et.prototype,lt,et.prototype.valueOf),de(et,"Symbol"),de(Math,"Math",!0),de(Ce.JSON,"JSON",!0)},{"./_an-object":61,"./_descriptors":69,"./_enum-keys":72,"./_export":73,"./_fails":74,"./_global":76,"./_has":77,"./_hide":78,"./_is-array":84,"./_is-object":85,"./_library":92,"./_meta":93,"./_object-create":97,"./_object-dp":98,"./_object-gopd":100,"./_object-gopn":102,"./_object-gopn-ext":101,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_property-desc":111,"./_redefine":113,"./_set-to-string-tag":115,"./_shared":117,"./_to-iobject":123,"./_to-primitive":126,"./_uid":127,"./_wks":131,"./_wks-define":129,"./_wks-ext":130}],147:[function(me,Be,ke){"use strict";var Ce=me("./_export"),Le=me("./_core"),he=me("./_global"),ye=me("./_species-constructor"),xe=me("./_promise-resolve");Ce(Ce.P+Ce.R,"Promise",{finally:function(ge){var le=ye(this,Le.Promise||he.Promise),ve=typeof ge=="function";return this.then(ve?function(de){return xe(le,ge()).then(function(){return de})}:ge,ve?function(de){return xe(le,ge()).then(function(){throw de})}:ge)}})},{"./_core":65,"./_export":73,"./_global":76,"./_promise-resolve":110,"./_species-constructor":118}],148:[function(me,Be,ke){"use strict";var Ce=me("./_export"),Le=me("./_new-promise-capability"),he=me("./_perform");Ce(Ce.S,"Promise",{try:function(ye){var xe=Le.f(this),ge=he(ye);return(ge.e?xe.reject:xe.resolve)(ge.v),xe.promise}})},{"./_export":73,"./_new-promise-capability":95,"./_perform":109}],149:[function(me,Be,ke){me("./_wks-define")("asyncIterator")},{"./_wks-define":129}],150:[function(me,Be,ke){me("./_wks-define")("observable")},{"./_wks-define":129}],151:[function(me,Be,ke){me("./es6.array.iterator");for(var Ce=me("./_global"),Le=me("./_hide"),he=me("./_iterators"),ye=me("./_wks")("toStringTag"),xe="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),ge=0;ge<xe.length;ge++){var le=xe[ge],ve=Ce[le],de=ve&&ve.prototype;de&&!de[ye]&&Le(de,ye,le),he[le]=he.Array}},{"./_global":76,"./_hide":78,"./_iterators":91,"./_wks":131,"./es6.array.iterator":134}],152:[function(me,Be,ke){var Ce=me("./_export"),Le=me("./_task");Ce(Ce.G+Ce.B,{setImmediate:Le.set,clearImmediate:Le.clear})},{"./_export":73,"./_task":120}],153:[function(me,Be,ke){(function(Ce){"use strict";function Le(Pe){return Array.isArray?Array.isArray(Pe):ue(Pe)==="[object Array]"}function he(Pe){return typeof Pe=="boolean"}function ye(Pe){return Pe===null}function xe(Pe){return Pe==null}function ge(Pe){return typeof Pe=="number"}function le(Pe){return typeof Pe=="string"}function ve(Pe){return(Pe===void 0?"undefined":(0,we.default)(Pe))==="symbol"}function de(Pe){return Pe===void 0}function ce(Pe){return ue(Pe)==="[object RegExp]"}function z(Pe){return(Pe===void 0?"undefined":(0,we.default)(Pe))==="object"&&Pe!==null}function ee(Pe){return ue(Pe)==="[object Date]"}function oe(Pe){return ue(Pe)==="[object Error]"||Pe instanceof Error}function ie(Pe){return typeof Pe=="function"}function se(Pe){return Pe===null||typeof Pe=="boolean"||typeof Pe=="number"||typeof Pe=="string"||(Pe===void 0?"undefined":(0,we.default)(Pe))==="symbol"||Pe===void 0}function ue(Pe){return Object.prototype.toString.call(Pe)}var Se=me("babel-runtime/helpers/typeof"),we=function(Pe){return Pe&&Pe.__esModule?Pe:{default:Pe}}(Se);ke.isArray=Le,ke.isBoolean=he,ke.isNull=ye,ke.isNullOrUndefined=xe,ke.isNumber=ge,ke.isString=le,ke.isSymbol=ve,ke.isUndefined=de,ke.isRegExp=ce,ke.isObject=z,ke.isDate=ee,ke.isError=oe,ke.isFunction=ie,ke.isPrimitive=se,ke.isBuffer=Ce.isBuffer}).call(this,{isBuffer:me("../../is-buffer/index.js")})},{"../../is-buffer/index.js":163,"babel-runtime/helpers/typeof":32}],154:[function(me,Be,ke){"use strict";var Ce=me("babel-runtime/helpers/typeof"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Ce);(function(he){function ye(de,ce){for(de=String(de),ce=ce||2;de.length<ce;)de="0"+de;return de}function xe(de){var ce=new Date(de.getFullYear(),de.getMonth(),de.getDate());ce.setDate(ce.getDate()-(ce.getDay()+6)%7+3);var z=new Date(ce.getFullYear(),0,4);z.setDate(z.getDate()-(z.getDay()+6)%7+3);var ee=ce.getTimezoneOffset()-z.getTimezoneOffset();ce.setHours(ce.getHours()-ee);var oe=(ce-z)/6048e5;return 1+Math.floor(oe)}function ge(de){var ce=de.getDay();return ce===0&&(ce=7),ce}function le(de){return de===null?"null":de===void 0?"undefined":(de===void 0?"undefined":(0,Le.default)(de))!=="object"?de===void 0?"undefined":(0,Le.default)(de):Array.isArray(de)?"array":{}.toString.call(de).slice(8,-1).toLowerCase()}var ve=function(){var de=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,ce=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,z=/[^-+\dA-Z]/g;return function(ee,oe,ie,se){if(arguments.length!==1||le(ee)!=="string"||/\d/.test(ee)||(oe=ee,ee=void 0),ee=ee||new Date,ee instanceof Date||(ee=new Date(ee)),isNaN(ee))throw TypeError("Invalid date");oe=String(ve.masks[oe]||oe||ve.masks.default);var ue=oe.slice(0,4);ue!=="UTC:"&&ue!=="GMT:"||(oe=oe.slice(4),ie=!0,ue==="GMT:"&&(se=!0));var Se=ie?"getUTC":"get",we=ee[Se+"Date"](),Pe=ee[Se+"Day"](),Ae=ee[Se+"Month"](),De=ee[Se+"FullYear"](),ze=ee[Se+"Hours"](),Ze=ee[Se+"Minutes"](),Xe=ee[Se+"Seconds"](),Ge=ee[Se+"Milliseconds"](),ft=ie?0:ee.getTimezoneOffset(),at=xe(ee),Ct=ge(ee),et={d:we,dd:ye(we),ddd:ve.i18n.dayNames[Pe],dddd:ve.i18n.dayNames[Pe+7],m:Ae+1,mm:ye(Ae+1),mmm:ve.i18n.monthNames[Ae],mmmm:ve.i18n.monthNames[Ae+12],yy:String(De).slice(2),yyyy:De,h:ze%12||12,hh:ye(ze%12||12),H:ze,HH:ye(ze),M:Ze,MM:ye(Ze),s:Xe,ss:ye(Xe),l:ye(Ge,3),L:ye(Math.round(Ge/10)),t:ze<12?"a":"p",tt:ze<12?"am":"pm",T:ze<12?"A":"P",TT:ze<12?"AM":"PM",Z:se?"GMT":ie?"UTC":(String(ee).match(ce)||[""]).pop().replace(z,""),o:(ft>0?"-":"+")+ye(100*Math.floor(Math.abs(ft)/60)+Math.abs(ft)%60,4),S:["th","st","nd","rd"][we%10>3?0:(we%100-we%10!=10)*we%10],W:at,N:Ct};return oe.replace(de,function(yt){return yt in et?et[yt]:yt.slice(1,yt.length-1)})}}();ve.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},ve.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]},typeof Me=="function"&&Me.amd?Me(function(){return ve}):(ke===void 0?"undefined":(0,Le.default)(ke))==="object"?Be.exports=ve:he.dateFormat=ve})(void 0)},{"babel-runtime/helpers/typeof":32}],155:[function(me,Be,ke){(function(Ce){function Le(){return!(typeof window=="undefined"||!window.process||window.process.type!=="renderer")||typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function he(le){var ve=this.useColors;if(le[0]=(ve?"%c":"")+this.namespace+(ve?" %c":" ")+le[0]+(ve?"%c ":" ")+"+"+ke.humanize(this.diff),ve){var de="color: "+this.color;le.splice(1,0,de,"color: inherit");var ce=0,z=0;le[0].replace(/%[a-zA-Z%]/g,function(ee){ee!=="%%"&&(ce++,ee==="%c"&&(z=ce))}),le.splice(z,0,de)}}function ye(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function xe(le){try{le==null?ke.storage.removeItem("debug"):ke.storage.debug=le}catch(ve){}}function ge(){var le;try{le=ke.storage.debug}catch(ve){}return!le&&Ce!==void 0&&"env"in Ce&&(le=Ce.env.DEBUG),le}ke=Be.exports=me("./debug"),ke.log=ye,ke.formatArgs=he,ke.save=xe,ke.load=ge,ke.useColors=Le,ke.storage=typeof chrome!="undefined"&&chrome.storage!==void 0?chrome.storage.local:function(){try{return window.localStorage}catch(le){}}(),ke.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],ke.formatters.j=function(le){try{return JSON.stringify(le)}catch(ve){return"[UnexpectedJSONParseError]: "+ve.message}},ke.enable(ge())}).call(this,me("_process"))},{"./debug":156,_process:173}],156:[function(me,Be,ke){function Ce(ve){var de,ce=0;for(de in ve)ce=(ce<<5)-ce+ve.charCodeAt(de),ce|=0;return ke.colors[Math.abs(ce)%ke.colors.length]}function Le(ve){function de(){if(de.enabled){var ce=de,z=+new Date,ee=z-(le||z);ce.diff=ee,ce.prev=le,ce.curr=z,le=z;for(var oe=new Array(arguments.length),ie=0;ie<oe.length;ie++)oe[ie]=arguments[ie];oe[0]=ke.coerce(oe[0]),typeof oe[0]!="string"&&oe.unshift("%O");var se=0;oe[0]=oe[0].replace(/%([a-zA-Z%])/g,function(ue,Se){if(ue==="%%")return ue;se++;var we=ke.formatters[Se];if(typeof we=="function"){var Pe=oe[se];ue=we.call(ce,Pe),oe.splice(se,1),se--}return ue}),ke.formatArgs.call(ce,oe),(de.log||ke.log||console.log.bind(console)).apply(ce,oe)}}return de.namespace=ve,de.enabled=ke.enabled(ve),de.useColors=ke.useColors(),de.color=Ce(ve),typeof ke.init=="function"&&ke.init(de),de}function he(ve){ke.save(ve),ke.names=[],ke.skips=[];for(var de=(typeof ve=="string"?ve:"").split(/[\s,]+/),ce=de.length,z=0;z<ce;z++)de[z]&&(ve=de[z].replace(/\*/g,".*?"),ve[0]==="-"?ke.skips.push(new RegExp("^"+ve.substr(1)+"$")):ke.names.push(new RegExp("^"+ve+"$")))}function ye(){ke.enable("")}function xe(ve){var de,ce;for(de=0,ce=ke.skips.length;de<ce;de++)if(ke.skips[de].test(ve))return!1;for(de=0,ce=ke.names.length;de<ce;de++)if(ke.names[de].test(ve))return!0;return!1}function ge(ve){return ve instanceof Error?ve.stack||ve.message:ve}ke=Be.exports=Le.debug=Le.default=Le,ke.coerce=ge,ke.disable=ye,ke.enable=he,ke.enabled=xe,ke.humanize=me("ms"),ke.names=[],ke.skips=[],ke.formatters={};var le},{ms:169}],157:[function(me,Be,ke){"use strict";function Ce(he){var ye=""+he,xe=Le.exec(ye);if(!xe)return ye;var ge,le="",ve=0,de=0;for(ve=xe.index;ve<ye.length;ve++){switch(ye.charCodeAt(ve)){case 34:ge=""";break;case 38:ge="&";break;case 39:ge="'";break;case 60:ge="<";break;case 62:ge=">";break;default:continue}de!==ve&&(le+=ye.substring(de,ve)),de=ve+1,le+=ge}return de!==ve?le+ye.substring(de,ve):le}var Le=/["'&<>]/;Be.exports=Ce},{}],158:[function(me,Be,ke){function Ce(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function Le(ge){return typeof ge=="function"}function he(ge){return typeof ge=="number"}function ye(ge){return typeof ge=="object"&&ge!==null}function xe(ge){return ge===void 0}Be.exports=Ce,Ce.EventEmitter=Ce,Ce.prototype._events=void 0,Ce.prototype._maxListeners=void 0,Ce.defaultMaxListeners=10,Ce.prototype.setMaxListeners=function(ge){if(!he(ge)||ge<0||isNaN(ge))throw TypeError("n must be a positive number");return this._maxListeners=ge,this},Ce.prototype.emit=function(ge){var le,ve,de,ce,z,ee;if(this._events||(this._events={}),ge==="error"&&(!this._events.error||ye(this._events.error)&&!this._events.error.length)){if((le=arguments[1])instanceof Error)throw le;var oe=new Error('Uncaught, unspecified "error" event. ('+le+")");throw oe.context=le,oe}if(ve=this._events[ge],xe(ve))return!1;if(Le(ve))switch(arguments.length){case 1:ve.call(this);break;case 2:ve.call(this,arguments[1]);break;case 3:ve.call(this,arguments[1],arguments[2]);break;default:ce=Array.prototype.slice.call(arguments,1),ve.apply(this,ce)}else if(ye(ve))for(ce=Array.prototype.slice.call(arguments,1),ee=ve.slice(),de=ee.length,z=0;z<de;z++)ee[z].apply(this,ce);return!0},Ce.prototype.addListener=function(ge,le){var ve;if(!Le(le))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",ge,Le(le.listener)?le.listener:le),this._events[ge]?ye(this._events[ge])?this._events[ge].push(le):this._events[ge]=[this._events[ge],le]:this._events[ge]=le,ye(this._events[ge])&&!this._events[ge].warned&&(ve=xe(this._maxListeners)?Ce.defaultMaxListeners:this._maxListeners)&&ve>0&&this._events[ge].length>ve&&(this._events[ge].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[ge].length),typeof console.trace=="function"&&console.trace()),this},Ce.prototype.on=Ce.prototype.addListener,Ce.prototype.once=function(ge,le){function ve(){this.removeListener(ge,ve),de||(de=!0,le.apply(this,arguments))}if(!Le(le))throw TypeError("listener must be a function");var de=!1;return ve.listener=le,this.on(ge,ve),this},Ce.prototype.removeListener=function(ge,le){var ve,de,ce,z;if(!Le(le))throw TypeError("listener must be a function");if(!this._events||!this._events[ge])return this;if(ve=this._events[ge],ce=ve.length,de=-1,ve===le||Le(ve.listener)&&ve.listener===le)delete this._events[ge],this._events.removeListener&&this.emit("removeListener",ge,le);else if(ye(ve)){for(z=ce;z-- >0;)if(ve[z]===le||ve[z].listener&&ve[z].listener===le){de=z;break}if(de<0)return this;ve.length===1?(ve.length=0,delete this._events[ge]):ve.splice(de,1),this._events.removeListener&&this.emit("removeListener",ge,le)}return this},Ce.prototype.removeAllListeners=function(ge){var le,ve;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[ge]&&delete this._events[ge],this;if(arguments.length===0){for(le in this._events)le!=="removeListener"&&this.removeAllListeners(le);return this.removeAllListeners("removeListener"),this._events={},this}if(ve=this._events[ge],Le(ve))this.removeListener(ge,ve);else if(ve)for(;ve.length;)this.removeListener(ge,ve[ve.length-1]);return delete this._events[ge],this},Ce.prototype.listeners=function(ge){return this._events&&this._events[ge]?Le(this._events[ge])?[this._events[ge]]:this._events[ge].slice():[]},Ce.prototype.listenerCount=function(ge){if(this._events){var le=this._events[ge];if(Le(le))return 1;if(le)return le.length}return 0},Ce.listenerCount=function(ge,le){return ge.listenerCount(le)}},{}],159:[function(me,Be,ke){var Ce=me("http"),Le=Be.exports;for(var he in Ce)Ce.hasOwnProperty(he)&&(Le[he]=Ce[he]);Le.request=function(ye,xe){return ye||(ye={}),ye.scheme="https",ye.protocol="https:",Ce.request.call(this,ye,xe)}},{http:196}],160:[function(me,Be,ke){"use strict";var Ce=me("util"),Le=me("ms");Be.exports=function(he){if(typeof he=="number")return he;var ye=Le(he);if(ye===void 0){var xe=new Error(Ce.format("humanize-ms(%j) result undefined",he));console.warn(xe.stack)}return ye}},{ms:169,util:207}],161:[function(me,Be,ke){ke.read=function(Ce,Le,he,ye,xe){var ge,le,ve=8*xe-ye-1,de=(1<<ve)-1,ce=de>>1,z=-7,ee=he?xe-1:0,oe=he?-1:1,ie=Ce[Le+ee];for(ee+=oe,ge=ie&(1<<-z)-1,ie>>=-z,z+=ve;z>0;ge=256*ge+Ce[Le+ee],ee+=oe,z-=8);for(le=ge&(1<<-z)-1,ge>>=-z,z+=ye;z>0;le=256*le+Ce[Le+ee],ee+=oe,z-=8);if(ge===0)ge=1-ce;else{if(ge===de)return le?NaN:1/0*(ie?-1:1);le+=Math.pow(2,ye),ge-=ce}return(ie?-1:1)*le*Math.pow(2,ge-ye)},ke.write=function(Ce,Le,he,ye,xe,ge){var le,ve,de,ce=8*ge-xe-1,z=(1<<ce)-1,ee=z>>1,oe=xe===23?Math.pow(2,-24)-Math.pow(2,-77):0,ie=ye?0:ge-1,se=ye?1:-1,ue=Le<0||Le===0&&1/Le<0?1:0;for(Le=Math.abs(Le),isNaN(Le)||Le===1/0?(ve=isNaN(Le)?1:0,le=z):(le=Math.floor(Math.log(Le)/Math.LN2),Le*(de=Math.pow(2,-le))<1&&(le--,de*=2),Le+=le+ee>=1?oe/de:oe*Math.pow(2,1-ee),Le*de>=2&&(le++,de/=2),le+ee>=z?(ve=0,le=z):le+ee>=1?(ve=(Le*de-1)*Math.pow(2,xe),le+=ee):(ve=Le*Math.pow(2,ee-1)*Math.pow(2,xe),le=0));xe>=8;Ce[he+ie]=255&ve,ie+=se,ve/=256,xe-=8);for(le=le<<xe|ve,ce+=xe;ce>0;Ce[he+ie]=255&le,ie+=se,le/=256,ce-=8);Ce[he+ie-se]|=128*ue}},{}],162:[function(me,Be,ke){typeof Object.create=="function"?Be.exports=function(Ce,Le){Ce.super_=Le,Ce.prototype=Object.create(Le.prototype,{constructor:{value:Ce,enumerable:!1,writable:!0,configurable:!0}})}:Be.exports=function(Ce,Le){Ce.super_=Le;var he=function(){};he.prototype=Le.prototype,Ce.prototype=new he,Ce.prototype.constructor=Ce}},{}],163:[function(me,Be,ke){function Ce(he){return!!he.constructor&&typeof he.constructor.isBuffer=="function"&&he.constructor.isBuffer(he)}function Le(he){return typeof he.readFloatLE=="function"&&typeof he.slice=="function"&&Ce(he.slice(0,0))}Be.exports=function(he){return he!=null&&(Ce(he)||Le(he)||!!he._isBuffer)}},{}],164:[function(me,Be,ke){(function(Ce){function Le(xe){return ye.call(xe).replace(/^[^{]*{\s*/,"").replace(/\s*}[^}]*$/,"")}function he(xe){return typeof xe=="function"&&(/^class(\s|\{\}$)/.test(ye.call(xe))||/^.*classCallCheck\(/.test(Le(xe)))}var ye=Function.prototype.toString;ke!==void 0?(Be!==void 0&&Be.exports&&(ke=Be.exports=he),ke.isClass=he):typeof Me=="function"&&Me.amd?Me([],function(){return he}):Ce.isClass=he})(this)},{}],165:[function(me,Be,ke){"use strict";function Ce(ge){var le=ge.slice(2);return le=le[0].toLowerCase()+le.slice(1)}var Le=me("core-util-is"),he=me("isstream"),ye=me("is-class");Object.keys(Le).map(function(ge){ke[Ce(ge)]=Le[ge]}),ke.stream=he,ke.readableStream=he.isReadable,ke.writableStream=he.isWritable,ke.duplexStream=he.isDuplex,ke.class=ye,ke.finite=function(ge){return Number.isFinite(ge)},ke.NaN=function(ge){return Number.isNaN(ge)},ke.generator=function(ge){return ge&&typeof ge.next=="function"&&typeof ge.throw=="function"},ke.generatorFunction=function(ge){return ge&&ge.constructor&&ge.constructor.name==="GeneratorFunction"},ke.asyncFunction=function(ge){return ge&&ge.constructor&&ge.constructor.name==="AsyncFunction"},ke.promise=function(ge){return ge&&typeof ge.then=="function"};var xe=Math.pow(2,31);ke.int=function(ge){return Le.isNumber(ge)&&ge%1==0},ke.int32=function(ge){return ke.int(ge)&&ge<xe&&ge>=-xe},ke.long=function(ge){return ke.int(ge)&&(ge>=xe||ge<-xe)},ke.Long=function(ge){return ke.object(ge)&&ke.number(ge.high)&&ke.number(ge.low)},ke.double=function(ge){return Le.isNumber(ge)&&!isNaN(ge)&&ge%1!=0},ke.date=function(ge){return ge instanceof Date},ke.regExp=function(ge){return ge instanceof RegExp},ke.regexp=ke.regExp,ke.error=function(ge){return ge instanceof Error},ke.array=function(ge){return Array.isArray(ge)}},{"core-util-is":153,"is-class":164,isstream:167}],166:[function(me,Be,ke){var Ce={}.toString;Be.exports=Array.isArray||function(Le){return Ce.call(Le)=="[object Array]"}},{}],167:[function(me,Be,ke){function Ce(ge){return ge instanceof xe.Stream}function Le(ge){return Ce(ge)&&typeof ge._read=="function"&&typeof ge._readableState=="object"}function he(ge){return Ce(ge)&&typeof ge._write=="function"&&typeof ge._writableState=="object"}function ye(ge){return Le(ge)&&he(ge)}var xe=me("stream");Be.exports=Ce,Be.exports.isReadable=Le,Be.exports.isWritable=he,Be.exports.isDuplex=ye},{stream:195}],168:[function(me,Be,ke){"use strict";function Ce(he,ye,xe){if(!he)throw new TypeError("argument dest is required");if(!ye)throw new TypeError("argument src is required");return xe===void 0&&(xe=!0),Object.getOwnPropertyNames(ye).forEach(function(ge){if(xe||!Le.call(he,ge)){var le=Object.getOwnPropertyDescriptor(ye,ge);Object.defineProperty(he,ge,le)}}),he}Be.exports=Ce;var Le=Object.prototype.hasOwnProperty},{}],169:[function(me,Be,ke){function Ce(ce){if(ce=String(ce),!(ce.length>100)){var z=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(ce);if(z){var ee=parseFloat(z[1]);switch((z[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return ee*de;case"days":case"day":case"d":return ee*ve;case"hours":case"hour":case"hrs":case"hr":case"h":return ee*le;case"minutes":case"minute":case"mins":case"min":case"m":return ee*ge;case"seconds":case"second":case"secs":case"sec":case"s":return ee*xe;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return ee;default:return}}}}function Le(ce){return ce>=ve?Math.round(ce/ve)+"d":ce>=le?Math.round(ce/le)+"h":ce>=ge?Math.round(ce/ge)+"m":ce>=xe?Math.round(ce/xe)+"s":ce+"ms"}function he(ce){return ye(ce,ve,"day")||ye(ce,le,"hour")||ye(ce,ge,"minute")||ye(ce,xe,"second")||ce+" ms"}function ye(ce,z,ee){if(!(ce<z))return ce<1.5*z?Math.floor(ce/z)+" "+ee:Math.ceil(ce/z)+" "+ee+"s"}var xe=1e3,ge=60*xe,le=60*ge,ve=24*le,de=365.25*ve;Be.exports=function(ce,z){z=z||{};var ee=typeof ce;if(ee==="string"&&ce.length>0)return Ce(ce);if(ee==="number"&&isNaN(ce)===!1)return z.long?he(ce):Le(ce);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(ce))}},{}],170:[function(me,Be,ke){(function(Ce){function Le(ge,le){for(var ve=0,de=ge.length-1;de>=0;de--){var ce=ge[de];ce==="."?ge.splice(de,1):ce===".."?(ge.splice(de,1),ve++):ve&&(ge.splice(de,1),ve--)}if(le)for(;ve--;ve)ge.unshift("..");return ge}function he(ge){typeof ge!="string"&&(ge+="");var le,ve=0,de=-1,ce=!0;for(le=ge.length-1;le>=0;--le)if(ge.charCodeAt(le)===47){if(!ce){ve=le+1;break}}else de===-1&&(ce=!1,de=le+1);return de===-1?"":ge.slice(ve,de)}function ye(ge,le){if(ge.filter)return ge.filter(le);for(var ve=[],de=0;de<ge.length;de++)le(ge[de],de,ge)&&ve.push(ge[de]);return ve}ke.resolve=function(){for(var ge="",le=!1,ve=arguments.length-1;ve>=-1&&!le;ve--){var de=ve>=0?arguments[ve]:Ce.cwd();if(typeof de!="string")throw new TypeError("Arguments to path.resolve must be strings");de&&(ge=de+"/"+ge,le=de.charAt(0)==="/")}return ge=Le(ye(ge.split("/"),function(ce){return!!ce}),!le).join("/"),(le?"/":"")+ge||"."},ke.normalize=function(ge){var le=ke.isAbsolute(ge),ve=xe(ge,-1)==="/";return ge=Le(ye(ge.split("/"),function(de){return!!de}),!le).join("/"),ge||le||(ge="."),ge&&ve&&(ge+="/"),(le?"/":"")+ge},ke.isAbsolute=function(ge){return ge.charAt(0)==="/"},ke.join=function(){var ge=Array.prototype.slice.call(arguments,0);return ke.normalize(ye(ge,function(le,ve){if(typeof le!="string")throw new TypeError("Arguments to path.join must be strings");return le}).join("/"))},ke.relative=function(ge,le){function ve(se){for(var ue=0;ue<se.length&&se[ue]==="";ue++);for(var Se=se.length-1;Se>=0&&se[Se]==="";Se--);return ue>Se?[]:se.slice(ue,Se-ue+1)}ge=ke.resolve(ge).substr(1),le=ke.resolve(le).substr(1);for(var de=ve(ge.split("/")),ce=ve(le.split("/")),z=Math.min(de.length,ce.length),ee=z,oe=0;oe<z;oe++)if(de[oe]!==ce[oe]){ee=oe;break}for(var ie=[],oe=ee;oe<de.length;oe++)ie.push("..");return ie=ie.concat(ce.slice(ee)),ie.join("/")},ke.sep="/",ke.delimiter=":",ke.dirname=function(ge){if(typeof ge!="string"&&(ge+=""),ge.length===0)return".";for(var le=ge.charCodeAt(0),ve=le===47,de=-1,ce=!0,z=ge.length-1;z>=1;--z)if((le=ge.charCodeAt(z))===47){if(!ce){de=z;break}}else ce=!1;return de===-1?ve?"/":".":ve&&de===1?"/":ge.slice(0,de)},ke.basename=function(ge,le){var ve=he(ge);return le&&ve.substr(-1*le.length)===le&&(ve=ve.substr(0,ve.length-le.length)),ve},ke.extname=function(ge){typeof ge!="string"&&(ge+="");for(var le=-1,ve=0,de=-1,ce=!0,z=0,ee=ge.length-1;ee>=0;--ee){var oe=ge.charCodeAt(ee);if(oe!==47)de===-1&&(ce=!1,de=ee+1),oe===46?le===-1?le=ee:z!==1&&(z=1):le!==-1&&(z=-1);else if(!ce){ve=ee+1;break}}return le===-1||de===-1||z===0||z===1&&le===de-1&&le===ve+1?"":ge.slice(le,de)};var xe=function(ge,le,ve){return ge.substr(le,ve)}}).call(this,me("_process"))},{_process:173}],171:[function(me,Be,ke){(function(Ce){(function(){"use strict";function Le(Xe){return Xe=String(Xe),Xe.charAt(0).toUpperCase()+Xe.slice(1)}function he(Xe,Ge,ft){var at={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return Ge&&ft&&/^Win/i.test(Xe)&&!/^Windows Phone /i.test(Xe)&&(at=at[/[\d.]+$/.exec(Xe)])&&(Xe="Windows "+at),Xe=String(Xe),Ge&&ft&&(Xe=Xe.replace(RegExp(Ge,"i"),ft)),Xe=xe(Xe.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}function ye(Xe,Ge){var ft=-1,at=Xe?Xe.length:0;if(typeof at=="number"&&at>-1&&at<=we)for(;++ft<at;)Ge(Xe[ft],ft,Xe);else ge(Xe,Ge)}function xe(Xe){return Xe=z(Xe),/^(?:webOS|i(?:OS|P))/.test(Xe)?Xe:Le(Xe)}function ge(Xe,Ge){for(var ft in Xe)De.call(Xe,ft)&&Ge(Xe[ft],ft,Xe)}function le(Xe){return Xe==null?Le(Xe):ze.call(Xe).slice(8,-1)}function ve(Xe,Ge){var ft=Xe!=null?typeof Xe[Ge]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(ft)||ft=="object"&&!Xe[Ge])}function de(Xe){return String(Xe).replace(/([ -])(?!$)/g,"$1?")}function ce(Xe,Ge){var ft=null;return ye(Xe,function(at,Ct){ft=Ge(ft,at,Ct,Xe)}),ft}function z(Xe){return String(Xe).replace(/^ +| +$/g,"")}function ee(Xe){function Ge(We){return ce(We,function(Oe,be){var Ne=be.pattern||de(be);return!Oe&&(Oe=RegExp("\\b"+Ne+" *\\d+[.\\w_]*","i").exec(Xe)||RegExp("\\b"+Ne+" *\\w+-[\\w]*","i").exec(Xe)||RegExp("\\b"+Ne+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(Xe))&&((Oe=String(be.label&&!RegExp(Ne,"i").test(be.label)?be.label:Oe).split("/"))[1]&&!/[\d.]+/.test(Oe[0])&&(Oe[0]+=" "+Oe[1]),be=be.label||be,Oe=xe(Oe[0].replace(RegExp(Ne,"i"),be).replace(RegExp("; *(?:"+be+"[_-])?","i")," ").replace(RegExp("("+be+")[-_.]?(\\w)","i"),"$1 $2"))),Oe})}function ft(){return this.description||""}var at=ie,Ct=Xe&&typeof Xe=="object"&&le(Xe)!="String";Ct&&(at=Xe,Xe=null);var et=at.navigator||{},yt=et.userAgent||"";Xe||(Xe=yt);var st,zt,lt=Ct?!!et.likeChrome:/\bChrome\b/.test(Xe)&&!/internal|\n/i.test(ze.toString()),tt=Ct?"Object":"ScriptBridgingProxyObject",ut=Ct?"Object":"Environment",mt=Ct&&at.java?"JavaPackage":le(at.java),Pt=Ct?"Object":"RuntimeObject",gt=/\bJava/.test(mt)&&at.java,Ft=gt&&le(at.environment)==ut,Ht=gt?"a":"\u4F2A",hn=gt?"b":"\u5C3E",Jt=at.document||{},bn=at.operamini||at.opera,Wt=Pe.test(Wt=Ct&&bn?bn["[[Class]]"]:le(bn))?Wt:bn=null,Kt=Xe,Xt=[],$t=null,kt=Xe==yt,pt=kt&&bn&&typeof bn.version=="function"&&bn.version(),Bt=function(We){return ce(We,function(Oe,be){return Oe||RegExp("\\b"+(be.pattern||de(be))+"\\b","i").exec(Xe)&&(be.label||be)})}([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),xt=function(We){return ce(We,function(Oe,be){return Oe||RegExp("\\b"+(be.pattern||de(be))+"\\b","i").exec(Xe)&&(be.label||be)})}(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),vt=Ge([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),nt=function(We){return ce(We,function(Oe,be,Ne){return Oe||(be[vt]||be[/^[a-z]+(?: +[a-z]+\b)*/i.exec(vt)]||RegExp("\\b"+de(Ne)+"(?:\\b|\\w*\\d)","i").exec(Xe))&&Ne})}({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),He=function(We){return ce(We,function(Oe,be){var Ne=be.pattern||de(be);return!Oe&&(Oe=RegExp("\\b"+Ne+"(?:/[\\d.]+|[ \\w.]*)","i").exec(Xe))&&(Oe=he(Oe,Ne,be.label||be)),Oe})}(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);if(Bt&&(Bt=[Bt]),nt&&!vt&&(vt=Ge([nt])),(st=/\bGoogle TV\b/.exec(vt))&&(vt=st[0]),/\bSimulator\b/i.test(Xe)&&(vt=(vt?vt+" ":"")+"Simulator"),xt=="Opera Mini"&&/\bOPiOS\b/.test(Xe)&&Xt.push("running in Turbo/Uncompressed mode"),xt=="IE"&&/\blike iPhone OS\b/.test(Xe)?(st=ee(Xe.replace(/like iPhone OS/,"")),nt=st.manufacturer,vt=st.product):/^iP/.test(vt)?(xt||(xt="Safari"),He="iOS"+((st=/ OS ([\d_]+)/i.exec(Xe))?" "+st[1].replace(/_/g,"."):"")):xt!="Konqueror"||/buntu/i.test(He)?nt&&nt!="Google"&&(/Chrome/.test(xt)&&!/\bMobile Safari\b/i.test(Xe)||/\bVita\b/.test(vt))||/\bAndroid\b/.test(He)&&/^Chrome/.test(xt)&&/\bVersion\//i.test(Xe)?(xt="Android Browser",He=/\bAndroid\b/.test(He)?He:"Android"):xt=="Silk"?(/\bMobi/i.test(Xe)||(He="Android",Xt.unshift("desktop mode")),/Accelerated *= *true/i.test(Xe)&&Xt.unshift("accelerated")):xt=="PaleMoon"&&(st=/\bFirefox\/([\d.]+)\b/.exec(Xe))?Xt.push("identifying as Firefox "+st[1]):xt=="Firefox"&&(st=/\b(Mobile|Tablet|TV)\b/i.exec(Xe))?(He||(He="Firefox OS"),vt||(vt=st[1])):!xt||(st=!/\bMinefield\b/i.test(Xe)&&/\b(?:Firefox|Safari)\b/.exec(xt))?(xt&&!vt&&/[\/,]|^[^(]+?\)/.test(Xe.slice(Xe.indexOf(st+"/")+8))&&(xt=null),(st=vt||nt||He)&&(vt||nt||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(He))&&(xt=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(He)?He:st)+" Browser")):xt=="Electron"&&(st=(/\bChrome\/([\d.]+)\b/.exec(Xe)||0)[1])&&Xt.push("Chromium "+st):He="Kubuntu",pt||(pt=function(We){return ce(We,function(Oe,be){return Oe||(RegExp(be+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(Xe)||0)[1]||null})}(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",de(xt),"(?:Firefox|Minefield|NetFront)"])),(st=Bt=="iCab"&&parseFloat(pt)>3&&"WebKit"||/\bOpera\b/.test(xt)&&(/\bOPR\b/.test(Xe)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(Xe)&&!/^(?:Trident|EdgeHTML)$/.test(Bt)&&"WebKit"||!Bt&&/\bMSIE\b/i.test(Xe)&&(He=="Mac OS"?"Tasman":"Trident")||Bt=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(xt)&&"NetFront")&&(Bt=[st]),xt=="IE"&&(st=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(Xe)||0)[1])?(xt+=" Mobile",He="Windows Phone "+(/\+$/.test(st)?st:st+".x"),Xt.unshift("desktop mode")):/\bWPDesktop\b/i.test(Xe)?(xt="IE Mobile",He="Windows Phone 8.x",Xt.unshift("desktop mode"),pt||(pt=(/\brv:([\d.]+)/.exec(Xe)||0)[1])):xt!="IE"&&Bt=="Trident"&&(st=/\brv:([\d.]+)/.exec(Xe))&&(xt&&Xt.push("identifying as "+xt+(pt?" "+pt:"")),xt="IE",pt=st[1]),kt){if(ve(at,"global"))if(gt&&(st=gt.lang.System,Kt=st.getProperty("os.arch"),He=He||st.getProperty("os.name")+" "+st.getProperty("os.version")),Ft){try{pt=at.require("ringo/engine").version.join("."),xt="RingoJS"}catch(We){(st=at.system)&&st.global.system==at.system&&(xt="Narwhal",He||(He=st[0].os||null))}xt||(xt="Rhino")}else typeof at.process=="object"&&!at.process.browser&&(st=at.process)&&(typeof st.versions=="object"&&(typeof st.versions.electron=="string"?(Xt.push("Node "+st.versions.node),xt="Electron",pt=st.versions.electron):typeof st.versions.nw=="string"&&(Xt.push("Chromium "+pt,"Node "+st.versions.node),xt="NW.js",pt=st.versions.nw)),xt||(xt="Node.js",Kt=st.arch,He=st.platform,pt=/[\d.]+/.exec(st.version),pt=pt?pt[0]:null));else le(st=at.runtime)==tt?(xt="Adobe AIR",He=st.flash.system.Capabilities.os):le(st=at.phantom)==Pt?(xt="PhantomJS",pt=(st=st.version||null)&&st.major+"."+st.minor+"."+st.patch):typeof Jt.documentMode=="number"&&(st=/\bTrident\/(\d+)/i.exec(Xe))?(pt=[pt,Jt.documentMode],(st=+st[1]+4)!=pt[1]&&(Xt.push("IE "+pt[1]+" mode"),Bt&&(Bt[1]=""),pt[1]=st),pt=xt=="IE"?String(pt[1].toFixed(1)):pt[0]):typeof Jt.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(xt)&&(Xt.push("masking as "+xt+" "+pt),xt="IE",pt="11.0",Bt=["Trident"],He="Windows");He=He&&xe(He)}if(pt&&(st=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(pt)||/(?:alpha|beta)(?: ?\d)?/i.exec(Xe+";"+(kt&&et.appMinorVersion))||/\bMinefield\b/i.test(Xe)&&"a")&&($t=/b/i.test(st)?"beta":"alpha",pt=pt.replace(RegExp(st+"\\+?$"),"")+($t=="beta"?hn:Ht)+(/\d+\+?/.exec(st)||"")),xt=="Fennec"||xt=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(He))xt="Firefox Mobile";else if(xt=="Maxthon"&&pt)pt=pt.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(vt))vt=="Xbox 360"&&(He=null),vt=="Xbox 360"&&/\bIEMobile\b/.test(Xe)&&Xt.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(xt)&&(!xt||vt||/Browser|Mobi/.test(xt))||He!="Windows CE"&&!/Mobi/i.test(Xe))if(xt=="IE"&&kt)try{at.external===null&&Xt.unshift("platform preview")}catch(We){Xt.unshift("embedded")}else(/\bBlackBerry\b/.test(vt)||/\bBB10\b/.test(Xe))&&(st=(RegExp(vt.replace(/ +/g," *")+"/([.\\d]+)","i").exec(Xe)||0)[1]||pt)?(st=[st,/BB10/.test(Xe)],He=(st[1]?(vt=null,nt="BlackBerry"):"Device Software")+" "+st[0],pt=null):this!=ge&&vt!="Wii"&&(kt&&bn||/Opera/.test(xt)&&/\b(?:MSIE|Firefox)\b/i.test(Xe)||xt=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(He)||xt=="IE"&&(He&&!/^Win/.test(He)&&pt>5.5||/\bWindows XP\b/.test(He)&&pt>8||pt==8&&!/\bTrident\b/.test(Xe)))&&!Pe.test(st=ee.call(ge,Xe.replace(Pe,"")+";"))&&st.name&&(st="ing as "+st.name+((st=st.version)?" "+st:""),Pe.test(xt)?(/\bIE\b/.test(st)&&He=="Mac OS"&&(He=null),st="identify"+st):(st="mask"+st,xt=Wt?xe(Wt.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(st)&&(He=null),kt||(pt=null)),Bt=["Presto"],Xt.push(st));else xt+=" Mobile";(st=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(Xe)||0)[1])&&(st=[parseFloat(st.replace(/\.(\d)$/,".0$1")),st],xt=="Safari"&&st[1].slice(-1)=="+"?(xt="WebKit Nightly",$t="alpha",pt=st[1].slice(0,-1)):pt!=st[1]&&pt!=(st[2]=(/\bSafari\/([\d.]+\+?)/i.exec(Xe)||0)[1])||(pt=null),st[1]=(/\bChrome\/([\d.]+)/i.exec(Xe)||0)[1],st[0]==537.36&&st[2]==537.36&&parseFloat(st[1])>=28&&Bt=="WebKit"&&(Bt=["Blink"]),kt&&(lt||st[1])?(Bt&&(Bt[1]="like Chrome"),st=st[1]||(st=st[0],st<530?1:st<532?2:st<532.05?3:st<533?4:st<534.03?5:st<534.07?6:st<534.1?7:st<534.13?8:st<534.16?9:st<534.24?10:st<534.3?11:st<535.01?12:st<535.02?"13+":st<535.07?15:st<535.11?16:st<535.19?17:st<536.05?18:st<536.1?19:st<537.01?20:st<537.11?"21+":st<537.13?23:st<537.18?24:st<537.24?25:st<537.36?26:Bt!="Blink"?"27":"28")):(Bt&&(Bt[1]="like Safari"),st=st[0],st=st<400?1:st<500?2:st<526?3:st<533?4:st<534?"4+":st<535?5:st<537?6:st<538?7:st<601?8:"8"),Bt&&(Bt[1]+=" "+(st+=typeof st=="number"?".x":/[.+]/.test(st)?"":"+")),xt=="Safari"&&(!pt||parseInt(pt)>45)&&(pt=st)),xt=="Opera"&&(st=/\bzbov|zvav$/.exec(He))?(xt+=" ",Xt.unshift("desktop mode"),st=="zvav"?(xt+="Mini",pt=null):xt+="Mobile",He=He.replace(RegExp(" *"+st+"$"),"")):xt=="Safari"&&/\bChrome\b/.exec(Bt&&Bt[1])&&(Xt.unshift("desktop mode"),xt="Chrome Mobile",pt=null,/\bOS X\b/.test(He)?(nt="Apple",He="iOS 4.3+"):He=null),pt&&pt.indexOf(st=/[\d.]+$/.exec(He))==0&&Xe.indexOf("/"+st+"-")>-1&&(He=z(He.replace(st,""))),Bt&&!/\b(?:Avant|Nook)\b/.test(xt)&&(/Browser|Lunascape|Maxthon/.test(xt)||xt!="Safari"&&/^iOS/.test(He)&&/\bSafari\b/.test(Bt[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(xt)&&Bt[1])&&(st=Bt[Bt.length-1])&&Xt.push(st),Xt.length&&(Xt=["("+Xt.join("; ")+")"]),nt&&vt&&vt.indexOf(nt)<0&&Xt.push("on "+nt),vt&&Xt.push((/^on /.test(Xt[Xt.length-1])?"":"on ")+vt),He&&(st=/ ([\d.+]+)$/.exec(He),zt=st&&He.charAt(He.length-st[0].length-1)=="/",He={architecture:32,family:st&&!zt?He.replace(st[0],""):He,version:st?st[1]:null,toString:function(){var We=this.version;return this.family+(We&&!zt?" "+We:"")+(this.architecture==64?" 64-bit":"")}}),(st=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Kt))&&!/\bi686\b/i.test(Kt)?(He&&(He.architecture=64,He.family=He.family.replace(RegExp(" *"+st),"")),xt&&(/\bWOW64\b/i.test(Xe)||kt&&/\w(?:86|32)$/.test(et.cpuClass||et.platform)&&!/\bWin64; x64\b/i.test(Xe))&&Xt.unshift("32-bit")):He&&/^OS X/.test(He.family)&&xt=="Chrome"&&parseFloat(pt)>=39&&(He.architecture=64),Xe||(Xe=null);var Ie={};return Ie.description=Xe,Ie.layout=Bt&&Bt[0],Ie.manufacturer=nt,Ie.name=xt,Ie.prerelease=$t,Ie.product=vt,Ie.ua=Xe,Ie.version=xt&&pt,Ie.os=He||{architecture:null,family:null,version:null,toString:function(){return"null"}},Ie.parse=ee,Ie.toString=ft,Ie.version&&Xt.unshift(pt),Ie.name&&Xt.unshift(xt),He&&xt&&(He!=String(He).split(" ")[0]||He!=xt.split(" ")[0]&&!vt)&&Xt.push(vt?"("+He+")":"on "+He),Xt.length&&(Ie.description=Xt.join(" ")),Ie}var oe={function:!0,object:!0},ie=oe[typeof window]&&window||this,se=oe[typeof ke]&&ke,ue=oe[typeof Be]&&Be&&!Be.nodeType&&Be,Se=se&&ue&&typeof Ce=="object"&&Ce;!Se||Se.global!==Se&&Se.window!==Se&&Se.self!==Se||(ie=Se);var we=Math.pow(2,53)-1,Pe=/\bOpera/,Ae=Object.prototype,De=Ae.hasOwnProperty,ze=Ae.toString,Ze=ee();typeof Me=="function"&&typeof Me.amd=="object"&&Me.amd?(ie.platform=Ze,Me(function(){return Ze})):se&&ue?ge(Ze,function(Xe,Ge){se[Ge]=Xe}):ie.platform=Ze}).call(this)}).call(this,typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],172:[function(me,Be,ke){(function(Ce){"use strict";function Le(he,ye,xe,ge){if(typeof he!="function")throw new TypeError('"callback" argument must be a function');var le,ve,de=arguments.length;switch(de){case 0:case 1:return Ce.nextTick(he);case 2:return Ce.nextTick(function(){he.call(null,ye)});case 3:return Ce.nextTick(function(){he.call(null,ye,xe)});case 4:return Ce.nextTick(function(){he.call(null,ye,xe,ge)});default:for(le=new Array(de-1),ve=0;ve<le.length;)le[ve++]=arguments[ve];return Ce.nextTick(function(){he.apply(null,le)})}}!Ce.version||Ce.version.indexOf("v0.")===0||Ce.version.indexOf("v1.")===0&&Ce.version.indexOf("v1.8.")!==0?Be.exports={nextTick:Le}:Be.exports=Ce}).call(this,me("_process"))},{_process:173}],173:[function(me,Be,ke){function Ce(){throw new Error("setTimeout has not been defined")}function Le(){throw new Error("clearTimeout has not been defined")}function he(ue){if(de===setTimeout)return setTimeout(ue,0);if((de===Ce||!de)&&setTimeout)return de=setTimeout,setTimeout(ue,0);try{return de(ue,0)}catch(Se){try{return de.call(null,ue,0)}catch(we){return de.call(this,ue,0)}}}function ye(ue){if(ce===clearTimeout)return clearTimeout(ue);if((ce===Le||!ce)&&clearTimeout)return ce=clearTimeout,clearTimeout(ue);try{return ce(ue)}catch(Se){try{return ce.call(null,ue)}catch(we){return ce.call(this,ue)}}}function xe(){ie&&ee&&(ie=!1,ee.length?oe=ee.concat(oe):se=-1,oe.length&&ge())}function ge(){if(!ie){var ue=he(xe);ie=!0;for(var Se=oe.length;Se;){for(ee=oe,oe=[];++se<Se;)ee&&ee[se].run();se=-1,Se=oe.length}ee=null,ie=!1,ye(ue)}}function le(ue,Se){this.fun=ue,this.array=Se}function ve(){}var de,ce,z=Be.exports={};(function(){try{de=typeof setTimeout=="function"?setTimeout:Ce}catch(ue){de=Ce}try{ce=typeof clearTimeout=="function"?clearTimeout:Le}catch(ue){ce=Le}})();var ee,oe=[],ie=!1,se=-1;z.nextTick=function(ue){var Se=new Array(arguments.length-1);if(arguments.length>1)for(var we=1;we<arguments.length;we++)Se[we-1]=arguments[we];oe.push(new le(ue,Se)),oe.length!==1||ie||he(ge)},le.prototype.run=function(){this.fun.apply(null,this.array)},z.title="browser",z.browser=!0,z.env={},z.argv=[],z.version="",z.versions={},z.on=ve,z.addListener=ve,z.once=ve,z.off=ve,z.removeListener=ve,z.removeAllListeners=ve,z.emit=ve,z.prependListener=ve,z.prependOnceListener=ve,z.listeners=function(ue){return[]},z.binding=function(ue){throw new Error("process.binding is not supported")},z.cwd=function(){return"/"},z.chdir=function(ue){throw new Error("process.chdir is not supported")},z.umask=function(){return 0}},{}],174:[function(me,Be,ke){(function(Ce){(function(Le){function he(mt){throw new RangeError(zt[mt])}function ye(mt,Pt){for(var gt=mt.length,Ft=[];gt--;)Ft[gt]=Pt(mt[gt]);return Ft}function xe(mt,Pt){var gt=mt.split("@"),Ft="";return gt.length>1&&(Ft=gt[0]+"@",mt=gt[1]),mt=mt.replace(st,"."),Ft+ye(mt.split("."),Pt).join(".")}function ge(mt){for(var Pt,gt,Ft=[],Ht=0,hn=mt.length;Ht<hn;)Pt=mt.charCodeAt(Ht++),Pt>=55296&&Pt<=56319&&Ht<hn?(gt=mt.charCodeAt(Ht++),(64512>)==56320?Ft.push(((1023&Pt)<<10)+(1023>)+65536):(Ft.push(Pt),Ht--)):Ft.push(Pt);return Ft}function le(mt){return ye(mt,function(Pt){var gt="";return Pt>65535&&(Pt-=65536,gt+=ut(Pt>>>10&1023|55296),Pt=56320|1023&Pt),gt+=ut(Pt)}).join("")}function ve(mt){return mt-48<10?mt-22:mt-65<26?mt-65:mt-97<26?mt-97:De}function de(mt,Pt){return mt+22+75*(mt<26)-((Pt!=0)<<5)}function ce(mt,Pt,gt){var Ft=0;for(mt=gt?tt(mt/Ge):mt>>1,mt+=tt(mt/Pt);mt>lt*Ze>>1;Ft+=De)mt=tt(mt/lt);return tt(Ft+(lt+1)*mt/(mt+Xe))}function z(mt){var Pt,gt,Ft,Ht,hn,Jt,bn,Wt,Kt,Xt,$t=[],kt=mt.length,pt=0,Bt=at,xt=ft;for(gt=mt.lastIndexOf(Ct),gt<0&&(gt=0),Ft=0;Ft<gt;++Ft)mt.charCodeAt(Ft)>=128&&he("not-basic"),$t.push(mt.charCodeAt(Ft));for(Ht=gt>0?gt+1:0;Ht<kt;){for(hn=pt,Jt=1,bn=De;Ht>=kt&&he("invalid-input"),Wt=ve(mt.charCodeAt(Ht++)),(Wt>=De||Wt>tt((Ae-pt)/Jt))&&he("overflow"),pt+=Wt*Jt,Kt=bn<=xt?ze:bn>=xt+Ze?Ze:bn-xt,!(Wt<Kt);bn+=De)Xt=De-Kt,Jt>tt(Ae/Xt)&&he("overflow"),Jt*=Xt;Pt=$t.length+1,xt=ce(pt-hn,Pt,hn==0),tt(pt/Pt)>Ae-Bt&&he("overflow"),Bt+=tt(pt/Pt),pt%=Pt,$t.splice(pt++,0,Bt)}return le($t)}function ee(mt){var Pt,gt,Ft,Ht,hn,Jt,bn,Wt,Kt,Xt,$t,kt,pt,Bt,xt,vt=[];for(mt=ge(mt),kt=mt.length,Pt=at,gt=0,hn=ft,Jt=0;Jt<kt;++Jt)($t=mt[Jt])<128&&vt.push(ut($t));for(Ft=Ht=vt.length,Ht&&vt.push(Ct);Ft<kt;){for(bn=Ae,Jt=0;Jt<kt;++Jt)($t=mt[Jt])>=Pt&&$t<bn&&(bn=$t);for(pt=Ft+1,bn-Pt>tt((Ae-gt)/pt)&&he("overflow"),gt+=(bn-Pt)*pt,Pt=bn,Jt=0;Jt<kt;++Jt)if($t=mt[Jt],$t<Pt&&++gt>Ae&&he("overflow"),$t==Pt){for(Wt=gt,Kt=De;Xt=Kt<=hn?ze:Kt>=hn+Ze?Ze:Kt-hn,!(Wt<Xt);Kt+=De)xt=Wt-Xt,Bt=De-Xt,vt.push(ut(de(Xt+xt%Bt,0))),Wt=tt(xt/Bt);vt.push(ut(de(Wt,0))),hn=ce(gt,pt,Ft==Ht),gt=0,++Ft}++gt,++Pt}return vt.join("")}function oe(mt){return xe(mt,function(Pt){return et.test(Pt)?z(Pt.slice(4).toLowerCase()):Pt})}function ie(mt){return xe(mt,function(Pt){return yt.test(Pt)?"xn--"+ee(Pt):Pt})}var se=typeof ke=="object"&&ke&&!ke.nodeType&&ke,ue=typeof Be=="object"&&Be&&!Be.nodeType&&Be,Se=typeof Ce=="object"&&Ce;Se.global!==Se&&Se.window!==Se&&Se.self!==Se||(Le=Se);var we,Pe,Ae=2147483647,De=36,ze=1,Ze=26,Xe=38,Ge=700,ft=72,at=128,Ct="-",et=/^xn--/,yt=/[^\x20-\x7E]/,st=/[\x2E\u3002\uFF0E\uFF61]/g,zt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},lt=De-ze,tt=Math.floor,ut=String.fromCharCode;if(we={version:"1.4.1",ucs2:{decode:ge,encode:le},decode:z,encode:ee,toASCII:ie,toUnicode:oe},typeof Me=="function"&&typeof Me.amd=="object"&&Me.amd)Me("punycode",function(){return we});else if(se&&ue)if(Be.exports==se)ue.exports=we;else for(Pe in we)we.hasOwnProperty(Pe)&&(se[Pe]=we[Pe]);else Le.punycode=we})(this)}).call(this,typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],175:[function(me,Be,ke){"use strict";function Ce(he,ye){return Object.prototype.hasOwnProperty.call(he,ye)}Be.exports=function(he,ye,xe,ge){ye=ye||"&",xe=xe||"=";var le={};if(typeof he!="string"||he.length===0)return le;var ve=/\+/g;he=he.split(ye);var de=1e3;ge&&typeof ge.maxKeys=="number"&&(de=ge.maxKeys);var ce=he.length;de>0&&ce>de&&(ce=de);for(var z=0;z<ce;++z){var ee,oe,ie,se,ue=he[z].replace(ve,"%20"),Se=ue.indexOf(xe);Se>=0?(ee=ue.substr(0,Se),oe=ue.substr(Se+1)):(ee=ue,oe=""),ie=decodeURIComponent(ee),se=decodeURIComponent(oe),Ce(le,ie)?Le(le[ie])?le[ie].push(se):le[ie]=[le[ie],se]:le[ie]=se}return le};var Le=Array.isArray||function(he){return Object.prototype.toString.call(he)==="[object Array]"}},{}],176:[function(me,Be,ke){"use strict";function Ce(xe,ge){if(xe.map)return xe.map(ge);for(var le=[],ve=0;ve<xe.length;ve++)le.push(ge(xe[ve],ve));return le}var Le=function(xe){switch(typeof xe){case"string":return xe;case"boolean":return xe?"true":"false";case"number":return isFinite(xe)?xe:"";default:return""}};Be.exports=function(xe,ge,le,ve){return ge=ge||"&",le=le||"=",xe===null&&(xe=void 0),typeof xe=="object"?Ce(ye(xe),function(de){var ce=encodeURIComponent(Le(de))+le;return he(xe[de])?Ce(xe[de],function(z){return ce+encodeURIComponent(Le(z))}).join(ge):ce+encodeURIComponent(Le(xe[de]))}).join(ge):ve?encodeURIComponent(Le(ve))+le+encodeURIComponent(Le(xe)):""};var he=Array.isArray||function(xe){return Object.prototype.toString.call(xe)==="[object Array]"},ye=Object.keys||function(xe){var ge=[];for(var le in xe)Object.prototype.hasOwnProperty.call(xe,le)&&ge.push(le);return ge}},{}],177:[function(me,Be,ke){"use strict";ke.decode=ke.parse=me("./decode"),ke.encode=ke.stringify=me("./encode")},{"./decode":175,"./encode":176}],178:[function(me,Be,ke){Be.exports=me("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":179}],179:[function(me,Be,ke){"use strict";function Ce(ie){if(!(this instanceof Ce))return new Ce(ie);de.call(this,ie),ce.call(this,ie),ie&&ie.readable===!1&&(this.readable=!1),ie&&ie.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,ie&&ie.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",Le)}function Le(){this.allowHalfOpen||this._writableState.ended||ge.nextTick(he,this)}function he(ie){ie.end()}var ye=me("babel-runtime/core-js/object/keys"),xe=function(ie){return ie&&ie.__esModule?ie:{default:ie}}(ye),ge=me("process-nextick-args"),le=xe.default||function(ie){var se=[];for(var ue in ie)se.push(ue);return se};Be.exports=Ce;var ve=me("core-util-is");ve.inherits=me("inherits");var de=me("./_stream_readable"),ce=me("./_stream_writable");ve.inherits(Ce,de);for(var z=le(ce.prototype),ee=0;ee<z.length;ee++){var oe=z[ee];Ce.prototype[oe]||(Ce.prototype[oe]=ce.prototype[oe])}Object.defineProperty(Ce.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(Ce.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(ie){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=ie,this._writableState.destroyed=ie)}}),Ce.prototype._destroy=function(ie,se){this.push(null),this.end(),ge.nextTick(se,ie)}},{"./_stream_readable":181,"./_stream_writable":183,"babel-runtime/core-js/object/keys":23,"core-util-is":153,inherits:162,"process-nextick-args":172}],180:[function(me,Be,ke){"use strict";function Ce(ye){if(!(this instanceof Ce))return new Ce(ye);Le.call(this,ye)}Be.exports=Ce;var Le=me("./_stream_transform"),he=me("core-util-is");he.inherits=me("inherits"),he.inherits(Ce,Le),Ce.prototype._transform=function(ye,xe,ge){ge(null,ye)}},{"./_stream_transform":182,"core-util-is":153,inherits:162}],181:[function(me,Be,ke){(function(Ce,Le){"use strict";function he(kt){return gt.from(kt)}function ye(kt){return gt.isBuffer(kt)||kt instanceof Ft}function xe(kt,pt,Bt){if(typeof kt.prependListener=="function")return kt.prependListener(pt,Bt);kt._events&&kt._events[pt]?ut(kt._events[pt])?kt._events[pt].unshift(Bt):kt._events[pt]=[Bt,kt._events[pt]]:kt.on(pt,Bt)}function ge(kt,pt){tt=tt||me("./_stream_duplex"),kt=kt||{};var Bt=pt instanceof tt;this.objectMode=!!kt.objectMode,Bt&&(this.objectMode=this.objectMode||!!kt.readableObjectMode);var xt=kt.highWaterMark,vt=kt.readableHighWaterMark,nt=this.objectMode?16:16384;this.highWaterMark=xt||xt===0?xt:Bt&&(vt||vt===0)?vt:nt,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new Wt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=kt.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,kt.encoding&&(bn||(bn=me("string_decoder/").StringDecoder),this.decoder=new bn(kt.encoding),this.encoding=kt.encoding)}function le(kt){if(tt=tt||me("./_stream_duplex"),!(this instanceof le))return new le(kt);this._readableState=new ge(kt,this),this.readable=!0,kt&&(typeof kt.read=="function"&&(this._read=kt.read),typeof kt.destroy=="function"&&(this._destroy=kt.destroy)),Pt.call(this)}function ve(kt,pt,Bt,xt,vt){var nt=kt._readableState;if(pt===null)nt.reading=!1,ie(kt,nt);else{var He;vt||(He=ce(nt,pt)),He?kt.emit("error",He):nt.objectMode||pt&&pt.length>0?(typeof pt=="string"||nt.objectMode||(0,zt.default)(pt)===gt.prototype||(pt=he(pt)),xt?nt.endEmitted?kt.emit("error",new Error("stream.unshift() after end event")):de(kt,nt,pt,!0):nt.ended?kt.emit("error",new Error("stream.push() after EOF")):(nt.reading=!1,nt.decoder&&!Bt?(pt=nt.decoder.write(pt),nt.objectMode||pt.length!==0?de(kt,nt,pt,!1):Se(kt,nt)):de(kt,nt,pt,!1))):xt||(nt.reading=!1)}return z(nt)}function de(kt,pt,Bt,xt){pt.flowing&&pt.length===0&&!pt.sync?(kt.emit("data",Bt),kt.read(0)):(pt.length+=pt.objectMode?1:Bt.length,xt?pt.buffer.unshift(Bt):pt.buffer.push(Bt),pt.needReadable&&se(kt)),Se(kt,pt)}function ce(kt,pt){var Bt;return ye(pt)||typeof pt=="string"||pt===void 0||kt.objectMode||(Bt=new TypeError("Invalid non-string/buffer chunk")),Bt}function z(kt){return!kt.ended&&(kt.needReadable||kt.length<kt.highWaterMark||kt.length===0)}function ee(kt){return kt>=$t?kt=$t:(kt--,kt|=kt>>>1,kt|=kt>>>2,kt|=kt>>>4,kt|=kt>>>8,kt|=kt>>>16,kt++),kt}function oe(kt,pt){return kt<=0||pt.length===0&&pt.ended?0:pt.objectMode?1:kt!==kt?pt.flowing&&pt.length?pt.buffer.head.data.length:pt.length:(kt>pt.highWaterMark&&(pt.highWaterMark=ee(kt)),kt<=pt.length?kt:pt.ended?pt.length:(pt.needReadable=!0,0))}function ie(kt,pt){if(!pt.ended){if(pt.decoder){var Bt=pt.decoder.end();Bt&&Bt.length&&(pt.buffer.push(Bt),pt.length+=pt.objectMode?1:Bt.length)}pt.ended=!0,se(kt)}}function se(kt){var pt=kt._readableState;pt.needReadable=!1,pt.emittedReadable||(Jt("emitReadable",pt.flowing),pt.emittedReadable=!0,pt.sync?lt.nextTick(ue,kt):ue(kt))}function ue(kt){Jt("emit readable"),kt.emit("readable"),Ze(kt)}function Se(kt,pt){pt.readingMore||(pt.readingMore=!0,lt.nextTick(we,kt,pt))}function we(kt,pt){for(var Bt=pt.length;!pt.reading&&!pt.flowing&&!pt.ended&&pt.length<pt.highWaterMark&&(Jt("maybeReadMore read 0"),kt.read(0),Bt!==pt.length);)Bt=pt.length;pt.readingMore=!1}function Pe(kt){return function(){var pt=kt._readableState;Jt("pipeOnDrain",pt.awaitDrain),pt.awaitDrain&&pt.awaitDrain--,pt.awaitDrain===0&&mt(kt,"data")&&(pt.flowing=!0,Ze(kt))}}function Ae(kt){Jt("readable nexttick read 0"),kt.read(0)}function De(kt,pt){pt.resumeScheduled||(pt.resumeScheduled=!0,lt.nextTick(ze,kt,pt))}function ze(kt,pt){pt.reading||(Jt("resume read 0"),kt.read(0)),pt.resumeScheduled=!1,pt.awaitDrain=0,kt.emit("resume"),Ze(kt),pt.flowing&&!pt.reading&&kt.read(0)}function Ze(kt){var pt=kt._readableState;for(Jt("flow",pt.flowing);pt.flowing&&kt.read()!==null;);}function Xe(kt,pt){if(pt.length===0)return null;var Bt;return pt.objectMode?Bt=pt.buffer.shift():!kt||kt>=pt.length?(Bt=pt.decoder?pt.buffer.join(""):pt.buffer.length===1?pt.buffer.head.data:pt.buffer.concat(pt.length),pt.buffer.clear()):Bt=Ge(kt,pt.buffer,pt.decoder),Bt}function Ge(kt,pt,Bt){var xt;return kt<pt.head.data.length?(xt=pt.head.data.slice(0,kt),pt.head.data=pt.head.data.slice(kt)):xt=kt===pt.head.data.length?pt.shift():Bt?ft(kt,pt):at(kt,pt),xt}function ft(kt,pt){var Bt=pt.head,xt=1,vt=Bt.data;for(kt-=vt.length;Bt=Bt.next;){var nt=Bt.data,He=kt>nt.length?nt.length:kt;if(He===nt.length?vt+=nt:vt+=nt.slice(0,kt),(kt-=He)===0){He===nt.length?(++xt,Bt.next?pt.head=Bt.next:pt.head=pt.tail=null):(pt.head=Bt,Bt.data=nt.slice(He));break}++xt}return pt.length-=xt,vt}function at(kt,pt){var Bt=gt.allocUnsafe(kt),xt=pt.head,vt=1;for(xt.data.copy(Bt),kt-=xt.data.length;xt=xt.next;){var nt=xt.data,He=kt>nt.length?nt.length:kt;if(nt.copy(Bt,Bt.length-kt,0,He),(kt-=He)===0){He===nt.length?(++vt,xt.next?pt.head=xt.next:pt.head=pt.tail=null):(pt.head=xt,xt.data=nt.slice(He));break}++vt}return pt.length-=vt,Bt}function Ct(kt){var pt=kt._readableState;if(pt.length>0)throw new Error('"endReadable()" called on non-empty stream');pt.endEmitted||(pt.ended=!0,lt.nextTick(et,pt,kt))}function et(kt,pt){kt.endEmitted||kt.length!==0||(kt.endEmitted=!0,pt.readable=!1,pt.emit("end"))}function yt(kt,pt){for(var Bt=0,xt=kt.length;Bt<xt;Bt++)if(kt[Bt]===pt)return Bt;return-1}var st=me("babel-runtime/core-js/object/get-prototype-of"),zt=function(kt){return kt&&kt.__esModule?kt:{default:kt}}(st),lt=me("process-nextick-args");Be.exports=le;var tt,ut=me("isarray");le.ReadableState=ge;var mt=(me("events").EventEmitter,function(kt,pt){return kt.listeners(pt).length}),Pt=me("./internal/streams/stream"),gt=me("safe-buffer").Buffer,Ft=Le.Uint8Array||function(){},Ht=me("core-util-is");Ht.inherits=me("inherits");var hn=me("util"),Jt=void 0;Jt=hn&&hn.debuglog?hn.debuglog("stream"):function(){};var bn,Wt=me("./internal/streams/BufferList"),Kt=me("./internal/streams/destroy");Ht.inherits(le,Pt);var Xt=["error","close","destroy","pause","resume"];Object.defineProperty(le.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(kt){this._readableState&&(this._readableState.destroyed=kt)}}),le.prototype.destroy=Kt.destroy,le.prototype._undestroy=Kt.undestroy,le.prototype._destroy=function(kt,pt){this.push(null),pt(kt)},le.prototype.push=function(kt,pt){var Bt,xt=this._readableState;return xt.objectMode?Bt=!0:typeof kt=="string"&&(pt=pt||xt.defaultEncoding,pt!==xt.encoding&&(kt=gt.from(kt,pt),pt=""),Bt=!0),ve(this,kt,pt,!1,Bt)},le.prototype.unshift=function(kt){return ve(this,kt,null,!0,!1)},le.prototype.isPaused=function(){return this._readableState.flowing===!1},le.prototype.setEncoding=function(kt){return bn||(bn=me("string_decoder/").StringDecoder),this._readableState.decoder=new bn(kt),this._readableState.encoding=kt,this};var $t=8388608;le.prototype.read=function(kt){Jt("read",kt),kt=parseInt(kt,10);var pt=this._readableState,Bt=kt;if(kt!==0&&(pt.emittedReadable=!1),kt===0&&pt.needReadable&&(pt.length>=pt.highWaterMark||pt.ended))return Jt("read: emitReadable",pt.length,pt.ended),pt.length===0&&pt.ended?Ct(this):se(this),null;if((kt=oe(kt,pt))===0&&pt.ended)return pt.length===0&&Ct(this),null;var xt=pt.needReadable;Jt("need readable",xt),(pt.length===0||pt.length-kt<pt.highWaterMark)&&(xt=!0,Jt("length less than watermark",xt)),pt.ended||pt.reading?(xt=!1,Jt("reading or ended",xt)):xt&&(Jt("do read"),pt.reading=!0,pt.sync=!0,pt.length===0&&(pt.needReadable=!0),this._read(pt.highWaterMark),pt.sync=!1,pt.reading||(kt=oe(Bt,pt)));var vt;return vt=kt>0?Xe(kt,pt):null,vt===null?(pt.needReadable=!0,kt=0):pt.length-=kt,pt.length===0&&(pt.ended||(pt.needReadable=!0),Bt!==kt&&pt.ended&&Ct(this)),vt!==null&&this.emit("data",vt),vt},le.prototype._read=function(kt){this.emit("error",new Error("_read() is not implemented"))},le.prototype.pipe=function(kt,pt){function Bt(pn,ln){Jt("onunpipe"),pn===be&&ln&&ln.hasUnpiped===!1&&(ln.hasUnpiped=!0,vt())}function xt(){Jt("onend"),kt.end()}function vt(){Jt("cleanup"),kt.removeListener("close",Ie),kt.removeListener("finish",We),kt.removeListener("drain",Je),kt.removeListener("error",He),kt.removeListener("unpipe",Bt),be.removeListener("end",xt),be.removeListener("end",Oe),be.removeListener("data",nt),At=!0,!Ne.awaitDrain||kt._writableState&&!kt._writableState.needDrain||Je()}function nt(pn){Jt("ondata"),en=!1,kt.write(pn)!==!1||en||((Ne.pipesCount===1&&Ne.pipes===kt||Ne.pipesCount>1&&yt(Ne.pipes,kt)!==-1)&&!At&&(Jt("false write response, pause",be._readableState.awaitDrain),be._readableState.awaitDrain++,en=!0),be.pause())}function He(pn){Jt("onerror",pn),Oe(),kt.removeListener("error",He),mt(kt,"error")===0&&kt.emit("error",pn)}function Ie(){kt.removeListener("finish",We),Oe()}function We(){Jt("onfinish"),kt.removeListener("close",Ie),Oe()}function Oe(){Jt("unpipe"),be.unpipe(kt)}var be=this,Ne=this._readableState;switch(Ne.pipesCount){case 0:Ne.pipes=kt;break;case 1:Ne.pipes=[Ne.pipes,kt];break;default:Ne.pipes.push(kt)}Ne.pipesCount+=1,Jt("pipe count=%d opts=%j",Ne.pipesCount,pt);var $e=(!pt||pt.end!==!1)&&kt!==Ce.stdout&&kt!==Ce.stderr,dt=$e?xt:Oe;Ne.endEmitted?lt.nextTick(dt):be.once("end",dt),kt.on("unpipe",Bt);var Je=Pe(be);kt.on("drain",Je);var At=!1,en=!1;return be.on("data",nt),xe(kt,"error",He),kt.once("close",Ie),kt.once("finish",We),kt.emit("pipe",be),Ne.flowing||(Jt("pipe resume"),be.resume()),kt},le.prototype.unpipe=function(kt){var pt=this._readableState,Bt={hasUnpiped:!1};if(pt.pipesCount===0)return this;if(pt.pipesCount===1)return kt&&kt!==pt.pipes?this:(kt||(kt=pt.pipes),pt.pipes=null,pt.pipesCount=0,pt.flowing=!1,kt&&kt.emit("unpipe",this,Bt),this);if(!kt){var xt=pt.pipes,vt=pt.pipesCount;pt.pipes=null,pt.pipesCount=0,pt.flowing=!1;for(var nt=0;nt<vt;nt++)xt[nt].emit("unpipe",this,Bt);return this}var He=yt(pt.pipes,kt);return He===-1?this:(pt.pipes.splice(He,1),pt.pipesCount-=1,pt.pipesCount===1&&(pt.pipes=pt.pipes[0]),kt.emit("unpipe",this,Bt),this)},le.prototype.on=function(kt,pt){var Bt=Pt.prototype.on.call(this,kt,pt);if(kt==="data")this._readableState.flowing!==!1&&this.resume();else if(kt==="readable"){var xt=this._readableState;xt.endEmitted||xt.readableListening||(xt.readableListening=xt.needReadable=!0,xt.emittedReadable=!1,xt.reading?xt.length&&se(this):lt.nextTick(Ae,this))}return Bt},le.prototype.addListener=le.prototype.on,le.prototype.resume=function(){var kt=this._readableState;return kt.flowing||(Jt("resume"),kt.flowing=!0,De(this,kt)),this},le.prototype.pause=function(){return Jt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Jt("pause"),this._readableState.flowing=!1,this.emit("pause")),this},le.prototype.wrap=function(kt){var pt=this,Bt=this._readableState,xt=!1;kt.on("end",function(){if(Jt("wrapped end"),Bt.decoder&&!Bt.ended){var He=Bt.decoder.end();He&&He.length&&pt.push(He)}pt.push(null)}),kt.on("data",function(He){Jt("wrapped data"),Bt.decoder&&(He=Bt.decoder.write(He)),(!Bt.objectMode||He!=null)&&(Bt.objectMode||He&&He.length)&&(pt.push(He)||(xt=!0,kt.pause()))});for(var vt in kt)this[vt]===void 0&&typeof kt[vt]=="function"&&(this[vt]=function(He){return function(){return kt[He].apply(kt,arguments)}}(vt));for(var nt=0;nt<Xt.length;nt++)kt.on(Xt[nt],this.emit.bind(this,Xt[nt]));return this._read=function(He){Jt("wrapped _read",He),xt&&(xt=!1,kt.resume())},this},Object.defineProperty(le.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),le._fromList=Xe}).call(this,me("_process"),typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":179,"./internal/streams/BufferList":184,"./internal/streams/destroy":185,"./internal/streams/stream":186,_process:173,"babel-runtime/core-js/object/get-prototype-of":22,"core-util-is":153,events:158,inherits:162,isarray:166,"process-nextick-args":172,"safe-buffer":193,"string_decoder/":200,util:36}],182:[function(me,Be,ke){"use strict";function Ce(le,ve){var de=this._transformState;de.transforming=!1;var ce=de.writecb;if(!ce)return this.emit("error",new Error("write callback called multiple times"));de.writechunk=null,de.writecb=null,ve!=null&&this.push(ve),ce(le);var z=this._readableState;z.reading=!1,(z.needReadable||z.length<z.highWaterMark)&&this._read(z.highWaterMark)}function Le(le){if(!(this instanceof Le))return new Le(le);xe.call(this,le),this._transformState={afterTransform:Ce.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,le&&(typeof le.transform=="function"&&(this._transform=le.transform),typeof le.flush=="function"&&(this._flush=le.flush)),this.on("prefinish",he)}function he(){var le=this;typeof this._flush=="function"?this._flush(function(ve,de){ye(le,ve,de)}):ye(this,null,null)}function ye(le,ve,de){if(ve)return le.emit("error",ve);if(de!=null&&le.push(de),le._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(le._transformState.transforming)throw new Error("Calling transform done when still transforming");return le.push(null)}Be.exports=Le;var xe=me("./_stream_duplex"),ge=me("core-util-is");ge.inherits=me("inherits"),ge.inherits(Le,xe),Le.prototype.push=function(le,ve){return this._transformState.needTransform=!1,xe.prototype.push.call(this,le,ve)},Le.prototype._transform=function(le,ve,de){throw new Error("_transform() is not implemented")},Le.prototype._write=function(le,ve,de){var ce=this._transformState;if(ce.writecb=de,ce.writechunk=le,ce.writeencoding=ve,!ce.transforming){var z=this._readableState;(ce.needTransform||z.needReadable||z.length<z.highWaterMark)&&this._read(z.highWaterMark)}},Le.prototype._read=function(le){var ve=this._transformState;ve.writechunk!==null&&ve.writecb&&!ve.transforming?(ve.transforming=!0,this._transform(ve.writechunk,ve.writeencoding,ve.afterTransform)):ve.needTransform=!0},Le.prototype._destroy=function(le,ve){var de=this;xe.prototype._destroy.call(this,le,function(ce){ve(ce),de.emit("close")})}},{"./_stream_duplex":179,"core-util-is":153,inherits:162}],183:[function(me,Be,ke){(function(Ce,Le){"use strict";function he(Kt){return Kt&&Kt.__esModule?Kt:{default:Kt}}function ye(Kt){var Xt=this;this.next=null,this.entry=null,this.finish=function(){ft(Xt,Kt)}}function xe(Kt){return hn.from(Kt)}function ge(Kt){return hn.isBuffer(Kt)||Kt instanceof Jt}function le(){}function ve(Kt,Xt){mt=mt||me("./_stream_duplex"),Kt=Kt||{};var $t=Xt instanceof mt;this.objectMode=!!Kt.objectMode,$t&&(this.objectMode=this.objectMode||!!Kt.writableObjectMode);var kt=Kt.highWaterMark,pt=Kt.writableHighWaterMark,Bt=this.objectMode?16:16384;this.highWaterMark=kt||kt===0?kt:$t&&(pt||pt===0)?pt:Bt,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var xt=Kt.decodeStrings===!1;this.decodeStrings=!xt,this.defaultEncoding=Kt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(vt){Se(Xt,vt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new ye(this)}function de(Kt){if(mt=mt||me("./_stream_duplex"),!(Wt.call(de,this)||this instanceof mt))return new de(Kt);this._writableState=new ve(Kt,this),this.writable=!0,Kt&&(typeof Kt.write=="function"&&(this._write=Kt.write),typeof Kt.writev=="function"&&(this._writev=Kt.writev),typeof Kt.destroy=="function"&&(this._destroy=Kt.destroy),typeof Kt.final=="function"&&(this._final=Kt.final)),Ht.call(this)}function ce(Kt,Xt){var $t=new Error("write after end");Kt.emit("error",$t),ut.nextTick(Xt,$t)}function z(Kt,Xt,$t,kt){var pt=!0,Bt=!1;return $t===null?Bt=new TypeError("May not write null values to stream"):typeof $t=="string"||$t===void 0||Xt.objectMode||(Bt=new TypeError("Invalid non-string/buffer chunk")),Bt&&(Kt.emit("error",Bt),ut.nextTick(kt,Bt),pt=!1),pt}function ee(Kt,Xt,$t){return Kt.objectMode||Kt.decodeStrings===!1||typeof Xt!="string"||(Xt=hn.from(Xt,$t)),Xt}function oe(Kt,Xt,$t,kt,pt,Bt){if(!$t){var xt=ee(Xt,kt,pt);kt!==xt&&($t=!0,pt="buffer",kt=xt)}var vt=Xt.objectMode?1:kt.length;Xt.length+=vt;var nt=Xt.length<Xt.highWaterMark;if(nt||(Xt.needDrain=!0),Xt.writing||Xt.corked){var He=Xt.lastBufferedRequest;Xt.lastBufferedRequest={chunk:kt,encoding:pt,isBuf:$t,callback:Bt,next:null},He?He.next=Xt.lastBufferedRequest:Xt.bufferedRequest=Xt.lastBufferedRequest,Xt.bufferedRequestCount+=1}else ie(Kt,Xt,!1,vt,kt,pt,Bt);return nt}function ie(Kt,Xt,$t,kt,pt,Bt,xt){Xt.writelen=kt,Xt.writecb=xt,Xt.writing=!0,Xt.sync=!0,$t?Kt._writev(pt,Xt.onwrite):Kt._write(pt,Bt,Xt.onwrite),Xt.sync=!1}function se(Kt,Xt,$t,kt,pt){--Xt.pendingcb,$t?(ut.nextTick(pt,kt),ut.nextTick(Xe,Kt,Xt),Kt._writableState.errorEmitted=!0,Kt.emit("error",kt)):(pt(kt),Kt._writableState.errorEmitted=!0,Kt.emit("error",kt),Xe(Kt,Xt))}function ue(Kt){Kt.writing=!1,Kt.writecb=null,Kt.length-=Kt.writelen,Kt.writelen=0}function Se(Kt,Xt){var $t=Kt._writableState,kt=$t.sync,pt=$t.writecb;if(ue($t),Xt)se(Kt,$t,kt,Xt,pt);else{var Bt=De($t);Bt||$t.corked||$t.bufferProcessing||!$t.bufferedRequest||Ae(Kt,$t),kt?Pt(we,Kt,$t,Bt,pt):we(Kt,$t,Bt,pt)}}function we(Kt,Xt,$t,kt){$t||Pe(Kt,Xt),Xt.pendingcb--,kt(),Xe(Kt,Xt)}function Pe(Kt,Xt){Xt.length===0&&Xt.needDrain&&(Xt.needDrain=!1,Kt.emit("drain"))}function Ae(Kt,Xt){Xt.bufferProcessing=!0;var $t=Xt.bufferedRequest;if(Kt._writev&&$t&&$t.next){var kt=Xt.bufferedRequestCount,pt=new Array(kt),Bt=Xt.corkedRequestsFree;Bt.entry=$t;for(var xt=0,vt=!0;$t;)pt[xt]=$t,$t.isBuf||(vt=!1),$t=$t.next,xt+=1;pt.allBuffers=vt,ie(Kt,Xt,!0,Xt.length,pt,"",Bt.finish),Xt.pendingcb++,Xt.lastBufferedRequest=null,Bt.next?(Xt.corkedRequestsFree=Bt.next,Bt.next=null):Xt.corkedRequestsFree=new ye(Xt),Xt.bufferedRequestCount=0}else{for(;$t;){var nt=$t.chunk,He=$t.encoding,Ie=$t.callback;if(ie(Kt,Xt,!1,Xt.objectMode?1:nt.length,nt,He,Ie),$t=$t.next,Xt.bufferedRequestCount--,Xt.writing)break}$t===null&&(Xt.lastBufferedRequest=null)}Xt.bufferedRequest=$t,Xt.bufferProcessing=!1}function De(Kt){return Kt.ending&&Kt.length===0&&Kt.bufferedRequest===null&&!Kt.finished&&!Kt.writing}function ze(Kt,Xt){Kt._final(function($t){Xt.pendingcb--,$t&&Kt.emit("error",$t),Xt.prefinished=!0,Kt.emit("prefinish"),Xe(Kt,Xt)})}function Ze(Kt,Xt){Xt.prefinished||Xt.finalCalled||(typeof Kt._final=="function"?(Xt.pendingcb++,Xt.finalCalled=!0,ut.nextTick(ze,Kt,Xt)):(Xt.prefinished=!0,Kt.emit("prefinish")))}function Xe(Kt,Xt){var $t=De(Xt);return $t&&(Ze(Kt,Xt),Xt.pendingcb===0&&(Xt.finished=!0,Kt.emit("finish"))),$t}function Ge(Kt,Xt,$t){Xt.ending=!0,Xe(Kt,Xt),$t&&(Xt.finished?ut.nextTick($t):Kt.once("finish",$t)),Xt.ended=!0,Kt.writable=!1}function ft(Kt,Xt,$t){var kt=Kt.entry;for(Kt.entry=null;kt;){var pt=kt.callback;Xt.pendingcb--,pt($t),kt=kt.next}Xt.corkedRequestsFree?Xt.corkedRequestsFree.next=Kt:Xt.corkedRequestsFree=Kt}var at=me("babel-runtime/core-js/object/define-property"),Ct=he(at),et=me("babel-runtime/core-js/symbol/has-instance"),yt=he(et),st=me("babel-runtime/core-js/symbol"),zt=he(st),lt=me("babel-runtime/core-js/set-immediate"),tt=he(lt),ut=me("process-nextick-args");Be.exports=de;var mt,Pt=!Ce.browser&&["v0.10","v0.9."].indexOf(Ce.version.slice(0,5))>-1?tt.default:ut.nextTick;de.WritableState=ve;var gt=me("core-util-is");gt.inherits=me("inherits");var Ft={deprecate:me("util-deprecate")},Ht=me("./internal/streams/stream"),hn=me("safe-buffer").Buffer,Jt=Le.Uint8Array||function(){},bn=me("./internal/streams/destroy");gt.inherits(de,Ht),ve.prototype.getBuffer=function(){for(var Kt=this.bufferedRequest,Xt=[];Kt;)Xt.push(Kt),Kt=Kt.next;return Xt},function(){try{Object.defineProperty(ve.prototype,"buffer",{get:Ft.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(Kt){}}();var Wt;typeof zt.default=="function"&&yt.default&&typeof Function.prototype[yt.default]=="function"?(Wt=Function.prototype[yt.default],(0,Ct.default)(de,yt.default,{value:function(Kt){return!!Wt.call(this,Kt)||this===de&&Kt&&Kt._writableState instanceof ve}})):Wt=function(Kt){return Kt instanceof this},de.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},de.prototype.write=function(Kt,Xt,$t){var kt=this._writableState,pt=!1,Bt=!kt.objectMode&&ge(Kt);return Bt&&!hn.isBuffer(Kt)&&(Kt=xe(Kt)),typeof Xt=="function"&&($t=Xt,Xt=null),Bt?Xt="buffer":Xt||(Xt=kt.defaultEncoding),typeof $t!="function"&&($t=le),kt.ended?ce(this,$t):(Bt||z(this,kt,Kt,$t))&&(kt.pendingcb++,pt=oe(this,kt,Bt,Kt,Xt,$t)),pt},de.prototype.cork=function(){this._writableState.corked++},de.prototype.uncork=function(){var Kt=this._writableState;Kt.corked&&(Kt.corked--,Kt.writing||Kt.corked||Kt.finished||Kt.bufferProcessing||!Kt.bufferedRequest||Ae(this,Kt))},de.prototype.setDefaultEncoding=function(Kt){if(typeof Kt=="string"&&(Kt=Kt.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Kt+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+Kt);return this._writableState.defaultEncoding=Kt,this},Object.defineProperty(de.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),de.prototype._write=function(Kt,Xt,$t){$t(new Error("_write() is not implemented"))},de.prototype._writev=null,de.prototype.end=function(Kt,Xt,$t){var kt=this._writableState;typeof Kt=="function"?($t=Kt,Kt=null,Xt=null):typeof Xt=="function"&&($t=Xt,Xt=null),Kt!=null&&this.write(Kt,Xt),kt.corked&&(kt.corked=1,this.uncork()),kt.ending||kt.finished||Ge(this,kt,$t)},Object.defineProperty(de.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(Kt){this._writableState&&(this._writableState.destroyed=Kt)}}),de.prototype.destroy=bn.destroy,de.prototype._undestroy=bn.undestroy,de.prototype._destroy=function(Kt,Xt){this.end(),Xt(Kt)}}).call(this,me("_process"),typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":179,"./internal/streams/destroy":185,"./internal/streams/stream":186,_process:173,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/set-immediate":25,"babel-runtime/core-js/symbol":27,"babel-runtime/core-js/symbol/has-instance":28,"core-util-is":153,inherits:162,"process-nextick-args":172,"safe-buffer":193,"util-deprecate":205}],184:[function(me,Be,ke){"use strict";function Ce(xe,ge){if(!(xe instanceof ge))throw new TypeError("Cannot call a class as a function")}function Le(xe,ge,le){xe.copy(ge,le)}var he=me("safe-buffer").Buffer,ye=me("util");Be.exports=function(){function xe(){Ce(this,xe),this.head=null,this.tail=null,this.length=0}return xe.prototype.push=function(ge){var le={data:ge,next:null};this.length>0?this.tail.next=le:this.head=le,this.tail=le,++this.length},xe.prototype.unshift=function(ge){var le={data:ge,next:this.head};this.length===0&&(this.tail=le),this.head=le,++this.length},xe.prototype.shift=function(){if(this.length!==0){var ge=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,ge}},xe.prototype.clear=function(){this.head=this.tail=null,this.length=0},xe.prototype.join=function(ge){if(this.length===0)return"";for(var le=this.head,ve=""+le.data;le=le.next;)ve+=ge+le.data;return ve},xe.prototype.concat=function(ge){if(this.length===0)return he.alloc(0);if(this.length===1)return this.head.data;for(var le=he.allocUnsafe(ge>>>0),ve=this.head,de=0;ve;)Le(ve.data,le,de),de+=ve.data.length,ve=ve.next;return le},xe}(),ye&&ye.inspect&&ye.inspect.custom&&(Be.exports.prototype[ye.inspect.custom]=function(){var xe=ye.inspect({length:this.length});return this.constructor.name+" "+xe})},{"safe-buffer":193,util:36}],185:[function(me,Be,ke){"use strict";function Ce(xe,ge){var le=this,ve=this._readableState&&this._readableState.destroyed,de=this._writableState&&this._writableState.destroyed;return ve||de?(ge?ge(xe):!xe||this._writableState&&this._writableState.errorEmitted||ye.nextTick(he,this,xe),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(xe||null,function(ce){!ge&&ce?(ye.nextTick(he,le,ce),le._writableState&&(le._writableState.errorEmitted=!0)):ge&&ge(ce)}),this)}function Le(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function he(xe,ge){xe.emit("error",ge)}var ye=me("process-nextick-args");Be.exports={destroy:Ce,undestroy:Le}},{"process-nextick-args":172}],186:[function(me,Be,ke){"use strict";Be.exports=me("events").EventEmitter},{events:158}],187:[function(me,Be,ke){Be.exports=me("./readable").PassThrough},{"./readable":188}],188:[function(me,Be,ke){ke=Be.exports=me("./lib/_stream_readable.js"),ke.Stream=ke,ke.Readable=ke,ke.Writable=me("./lib/_stream_writable.js"),ke.Duplex=me("./lib/_stream_duplex.js"),ke.Transform=me("./lib/_stream_transform.js"),ke.PassThrough=me("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":179,"./lib/_stream_passthrough.js":180,"./lib/_stream_readable.js":181,"./lib/_stream_transform.js":182,"./lib/_stream_writable.js":183}],189:[function(me,Be,ke){Be.exports=me("./readable").Transform},{"./readable":188}],190:[function(me,Be,ke){Be.exports=me("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":183}],191:[function(me,Be,ke){var Ce=function(){return this}()||Function("return this")(),Le=Ce.regeneratorRuntime&&Object.getOwnPropertyNames(Ce).indexOf("regeneratorRuntime")>=0,he=Le&&Ce.regeneratorRuntime;if(Ce.regeneratorRuntime=void 0,Be.exports=me("./runtime"),Le)Ce.regeneratorRuntime=he;else try{delete Ce.regeneratorRuntime}catch(ye){Ce.regeneratorRuntime=void 0}},{"./runtime":192}],192:[function(me,Be,ke){(function(Ce){"use strict";function Le(tt,ut,mt,Pt){var gt=ut&&ut.prototype instanceof ye?ut:ye,Ft=Object.create(gt.prototype),Ht=new oe(Pt||[]);return Ft._invoke=de(tt,mt,Ht),Ft}function he(tt,ut,mt){try{return{type:"normal",arg:tt.call(ut,mt)}}catch(Pt){return{type:"throw",arg:Pt}}}function ye(){}function xe(){}function ge(){}function le(tt){["next","throw","return"].forEach(function(ut){tt[ut]=function(mt){return this._invoke(ut,mt)}})}function ve(tt){function ut(gt,Ft,Ht,hn){var Jt=he(tt[gt],tt,Ft);if(Jt.type!=="throw"){var bn=Jt.arg,Wt=bn.value;return Wt&&typeof Wt=="object"&&we.call(Wt,"__await")?Promise.resolve(Wt.__await).then(function(Kt){ut("next",Kt,Ht,hn)},function(Kt){ut("throw",Kt,Ht,hn)}):Promise.resolve(Wt).then(function(Kt){bn.value=Kt,Ht(bn)},hn)}hn(Jt.arg)}function mt(gt,Ft){function Ht(){return new Promise(function(hn,Jt){ut(gt,Ft,hn,Jt)})}return Pt=Pt?Pt.then(Ht,Ht):Ht()}var Pt;this._invoke=mt}function de(tt,ut,mt){var Pt=Ge;return function(gt,Ft){if(Pt===at)throw new Error("Generator is already running");if(Pt===Ct){if(gt==="throw")throw Ft;return se()}for(mt.method=gt,mt.arg=Ft;;){var Ht=mt.delegate;if(Ht){var hn=ce(Ht,mt);if(hn){if(hn===et)continue;return hn}}if(mt.method==="next")mt.sent=mt._sent=mt.arg;else if(mt.method==="throw"){if(Pt===Ge)throw Pt=Ct,mt.arg;mt.dispatchException(mt.arg)}else mt.method==="return"&&mt.abrupt("return",mt.arg);Pt=at;var Jt=he(tt,ut,mt);if(Jt.type==="normal"){if(Pt=mt.done?Ct:ft,Jt.arg===et)continue;return{value:Jt.arg,done:mt.done}}Jt.type==="throw"&&(Pt=Ct,mt.method="throw",mt.arg=Jt.arg)}}}function ce(tt,ut){var mt=tt.iterator[ut.method];if(mt===ue){if(ut.delegate=null,ut.method==="throw"){if(tt.iterator.return&&(ut.method="return",ut.arg=ue,ce(tt,ut),ut.method==="throw"))return et;ut.method="throw",ut.arg=new TypeError("The iterator does not provide a 'throw' method")}return et}var Pt=he(mt,tt.iterator,ut.arg);if(Pt.type==="throw")return ut.method="throw",ut.arg=Pt.arg,ut.delegate=null,et;var gt=Pt.arg;return gt?gt.done?(ut[tt.resultName]=gt.value,ut.next=tt.nextLoc,ut.method!=="return"&&(ut.method="next",ut.arg=ue),ut.delegate=null,et):gt:(ut.method="throw",ut.arg=new TypeError("iterator result is not an object"),ut.delegate=null,et)}function z(tt){var ut={tryLoc:tt[0]};1 in tt&&(ut.catchLoc=tt[1]),2 in tt&&(ut.finallyLoc=tt[2],ut.afterLoc=tt[3]),this.tryEntries.push(ut)}function ee(tt){var ut=tt.completion||{};ut.type="normal",delete ut.arg,tt.completion=ut}function oe(tt){this.tryEntries=[{tryLoc:"root"}],tt.forEach(z,this),this.reset(!0)}function ie(tt){if(tt){var ut=tt[Ae];if(ut)return ut.call(tt);if(typeof tt.next=="function")return tt;if(!isNaN(tt.length)){var mt=-1,Pt=function gt(){for(;++mt<tt.length;)if(we.call(tt,mt))return gt.value=tt[mt],gt.done=!1,gt;return gt.value=ue,gt.done=!0,gt};return Pt.next=Pt}}return{next:se}}function se(){return{value:ue,done:!0}}var ue,Se=Object.prototype,we=Se.hasOwnProperty,Pe=typeof Symbol=="function"?Symbol:{},Ae=Pe.iterator||"@@iterator",De=Pe.asyncIterator||"@@asyncIterator",ze=Pe.toStringTag||"@@toStringTag",Ze=typeof Be=="object",Xe=Ce.regeneratorRuntime;if(Xe)return void(Ze&&(Be.exports=Xe));Xe=Ce.regeneratorRuntime=Ze?Be.exports:{},Xe.wrap=Le;var Ge="suspendedStart",ft="suspendedYield",at="executing",Ct="completed",et={},yt={};yt[Ae]=function(){return this};var st=Object.getPrototypeOf,zt=st&&st(st(ie([])));zt&&zt!==Se&&we.call(zt,Ae)&&(yt=zt);var lt=ge.prototype=ye.prototype=Object.create(yt);xe.prototype=lt.constructor=ge,ge.constructor=xe,ge[ze]=xe.displayName="GeneratorFunction",Xe.isGeneratorFunction=function(tt){var ut=typeof tt=="function"&&tt.constructor;return!!ut&&(ut===xe||(ut.displayName||ut.name)==="GeneratorFunction")},Xe.mark=function(tt){return Object.setPrototypeOf?Object.setPrototypeOf(tt,ge):(tt.__proto__=ge,ze in tt||(tt[ze]="GeneratorFunction")),tt.prototype=Object.create(lt),tt},Xe.awrap=function(tt){return{__await:tt}},le(ve.prototype),ve.prototype[De]=function(){return this},Xe.AsyncIterator=ve,Xe.async=function(tt,ut,mt,Pt){var gt=new ve(Le(tt,ut,mt,Pt));return Xe.isGeneratorFunction(ut)?gt:gt.next().then(function(Ft){return Ft.done?Ft.value:gt.next()})},le(lt),lt[ze]="Generator",lt[Ae]=function(){return this},lt.toString=function(){return"[object Generator]"},Xe.keys=function(tt){var ut=[];for(var mt in tt)ut.push(mt);return ut.reverse(),function Pt(){for(;ut.length;){var gt=ut.pop();if(gt in tt)return Pt.value=gt,Pt.done=!1,Pt}return Pt.done=!0,Pt}},Xe.values=ie,oe.prototype={constructor:oe,reset:function(tt){if(this.prev=0,this.next=0,this.sent=this._sent=ue,this.done=!1,this.delegate=null,this.method="next",this.arg=ue,this.tryEntries.forEach(ee),!tt)for(var ut in this)ut.charAt(0)==="t"&&we.call(this,ut)&&!isNaN(+ut.slice(1))&&(this[ut]=ue)},stop:function(){this.done=!0;var tt=this.tryEntries[0],ut=tt.completion;if(ut.type==="throw")throw ut.arg;return this.rval},dispatchException:function(tt){function ut(Jt,bn){return Ft.type="throw",Ft.arg=tt,mt.next=Jt,bn&&(mt.method="next",mt.arg=ue),!!bn}if(this.done)throw tt;for(var mt=this,Pt=this.tryEntries.length-1;Pt>=0;--Pt){var gt=this.tryEntries[Pt],Ft=gt.completion;if(gt.tryLoc==="root")return ut("end");if(gt.tryLoc<=this.prev){var Ht=we.call(gt,"catchLoc"),hn=we.call(gt,"finallyLoc");if(Ht&&hn){if(this.prev<gt.catchLoc)return ut(gt.catchLoc,!0);if(this.prev<gt.finallyLoc)return ut(gt.finallyLoc)}else if(Ht){if(this.prev<gt.catchLoc)return ut(gt.catchLoc,!0)}else{if(!hn)throw new Error("try statement without catch or finally");if(this.prev<gt.finallyLoc)return ut(gt.finallyLoc)}}}},abrupt:function(tt,ut){for(var mt=this.tryEntries.length-1;mt>=0;--mt){var Pt=this.tryEntries[mt];if(Pt.tryLoc<=this.prev&&we.call(Pt,"finallyLoc")&&this.prev<Pt.finallyLoc){var gt=Pt;break}}gt&&(tt==="break"||tt==="continue")&>.tryLoc<=ut&&ut<=gt.finallyLoc&&(gt=null);var Ft=gt?gt.completion:{};return Ft.type=tt,Ft.arg=ut,gt?(this.method="next",this.next=gt.finallyLoc,et):this.complete(Ft)},complete:function(tt,ut){if(tt.type==="throw")throw tt.arg;return tt.type==="break"||tt.type==="continue"?this.next=tt.arg:tt.type==="return"?(this.rval=this.arg=tt.arg,this.method="return",this.next="end"):tt.type==="normal"&&ut&&(this.next=ut),et},finish:function(tt){for(var ut=this.tryEntries.length-1;ut>=0;--ut){var mt=this.tryEntries[ut];if(mt.finallyLoc===tt)return this.complete(mt.completion,mt.afterLoc),ee(mt),et}},catch:function(tt){for(var ut=this.tryEntries.length-1;ut>=0;--ut){var mt=this.tryEntries[ut];if(mt.tryLoc===tt){var Pt=mt.completion;if(Pt.type==="throw"){var gt=Pt.arg;ee(mt)}return gt}}throw new Error("illegal catch attempt")},delegateYield:function(tt,ut,mt){return this.delegate={iterator:ie(tt),resultName:ut,nextLoc:mt},this.method==="next"&&(this.arg=ue),et}}})(function(){return this}()||Function("return this")())},{}],193:[function(me,Be,ke){function Ce(xe,ge){for(var le in xe)ge[le]=xe[le]}function Le(xe,ge,le){return ye(xe,ge,le)}var he=me("buffer"),ye=he.Buffer;ye.from&&ye.alloc&&ye.allocUnsafe&&ye.allocUnsafeSlow?Be.exports=he:(Ce(he,ke),ke.Buffer=Le),Ce(ye,Le),Le.from=function(xe,ge,le){if(typeof xe=="number")throw new TypeError("Argument must not be a number");return ye(xe,ge,le)},Le.alloc=function(xe,ge,le){if(typeof xe!="number")throw new TypeError("Argument must be a number");var ve=ye(xe);return ge!==void 0?typeof le=="string"?ve.fill(ge,le):ve.fill(ge):ve.fill(0),ve},Le.allocUnsafe=function(xe){if(typeof xe!="number")throw new TypeError("Argument must be a number");return ye(xe)},Le.allocUnsafeSlow=function(xe){if(typeof xe!="number")throw new TypeError("Argument must be a number");return he.SlowBuffer(xe)}},{buffer:38}],194:[function(me,Be,ke){(function(Ce){"use strict";function Le(se){return se&&se.__esModule?se:{default:se}}var he=me("babel-runtime/core-js/string/from-code-point"),ye=Le(he),xe=me("babel-runtime/core-js/json/stringify"),ge=Le(xe),le=me("babel-runtime/helpers/typeof"),ve=Le(le),de=me("babel-runtime/core-js/object/define-property"),ce=Le(de),z=me("babel-runtime/core-js/object/keys"),ee=Le(z),oe=me("babel-runtime/core-js/object/create"),ie=Le(oe);(function(se){function ue(Oe,be){if(!(this instanceof ue))return new ue(Oe,be);var Ne=this;we(Ne),Ne.q=Ne.c="",Ne.bufferCheckPosition=se.MAX_BUFFER_LENGTH,Ne.opt=be||{},Ne.opt.lowercase=Ne.opt.lowercase||Ne.opt.lowercasetags,Ne.looseCase=Ne.opt.lowercase?"toLowerCase":"toUpperCase",Ne.tags=[],Ne.closed=Ne.closedRoot=Ne.sawRoot=!1,Ne.tag=Ne.error=null,Ne.strict=!!Oe,Ne.noscript=!(!Oe&&!Ne.opt.noscript),Ne.state=Ie.BEGIN,Ne.strictEntities=Ne.opt.strictEntities,Ne.ENTITIES=Ne.strictEntities?(0,ie.default)(se.XML_ENTITIES):(0,ie.default)(se.ENTITIES),Ne.attribList=[],Ne.opt.xmlns&&(Ne.ns=(0,ie.default)(Bt)),Ne.trackPosition=Ne.opt.position!==!1,Ne.trackPosition&&(Ne.position=Ne.line=Ne.column=0),at(Ne,"onready")}function Se(Oe){for(var be=Math.max(se.MAX_BUFFER_LENGTH,10),Ne=0,$e=0,dt=bn.length;$e<dt;$e++){var Je=Oe[bn[$e]].length;if(Je>be)switch(bn[$e]){case"textNode":et(Oe);break;case"cdata":Ct(Oe,"oncdata",Oe.cdata),Oe.cdata="";break;case"script":Ct(Oe,"onscript",Oe.script),Oe.script="";break;default:st(Oe,"Max buffer length exceeded: "+bn[$e])}Ne=Math.max(Ne,Je)}var At=se.MAX_BUFFER_LENGTH-Ne;Oe.bufferCheckPosition=At+Oe.position}function we(Oe){for(var be=0,Ne=bn.length;be<Ne;be++)Oe[bn[be]]=""}function Pe(Oe){et(Oe),Oe.cdata!==""&&(Ct(Oe,"oncdata",Oe.cdata),Oe.cdata=""),Oe.script!==""&&(Ct(Oe,"onscript",Oe.script),Oe.script="")}function Ae(Oe,be){return new De(Oe,be)}function De(Oe,be){if(!(this instanceof De))return new De(Oe,be);Wt.apply(this),this._parser=new ue(Oe,be),this.writable=!0,this.readable=!0;var Ne=this;this._parser.onend=function(){Ne.emit("end")},this._parser.onerror=function($e){Ne.emit("error",$e),Ne._parser.error=null},this._decoder=null,Kt.forEach(function($e){(0,ce.default)(Ne,"on"+$e,{get:function(){return Ne._parser["on"+$e]},set:function(dt){if(!dt)return Ne.removeAllListeners($e),Ne._parser["on"+$e]=dt,dt;Ne.on($e,dt)},enumerable:!0,configurable:!1})})}function ze(Oe){return Oe===" "||Oe===`
|
|
|
`||Oe==="\r"||Oe===" "}function Ze(Oe){return Oe==='"'||Oe==="'"}function Xe(Oe){return Oe===">"||ze(Oe)}function Ge(Oe,be){return Oe.test(be)}function ft(Oe,be){return!Ge(Oe,be)}function at(Oe,be,Ne){Oe[be]&&Oe[be](Ne)}function Ct(Oe,be,Ne){Oe.textNode&&et(Oe),at(Oe,be,Ne)}function et(Oe){Oe.textNode=yt(Oe.opt,Oe.textNode),Oe.textNode&&at(Oe,"ontext",Oe.textNode),Oe.textNode=""}function yt(Oe,be){return Oe.trim&&(be=be.trim()),Oe.normalize&&(be=be.replace(/\s+/g," ")),be}function st(Oe,be){return et(Oe),Oe.trackPosition&&(be+=`
|
|
|
Line: `+Oe.line+`
|
|
|
Column: `+Oe.column+`
|
|
|
Char: `+Oe.c),be=new Error(be),Oe.error=be,at(Oe,"onerror",be),Oe}function zt(Oe){return Oe.sawRoot&&!Oe.closedRoot&<(Oe,"Unclosed root tag"),Oe.state!==Ie.BEGIN&&Oe.state!==Ie.BEGIN_WHITESPACE&&Oe.state!==Ie.TEXT&&st(Oe,"Unexpected end"),et(Oe),Oe.c="",Oe.closed=!0,at(Oe,"onend"),ue.call(Oe,Oe.strict,Oe.opt),Oe}function lt(Oe,be){if((Oe===void 0?"undefined":(0,ve.default)(Oe))!=="object"||!(Oe instanceof ue))throw new Error("bad call to strictFail");Oe.strict&&st(Oe,be)}function tt(Oe){Oe.strict||(Oe.tagName=Oe.tagName[Oe.looseCase]());var be=Oe.tags[Oe.tags.length-1]||Oe,Ne=Oe.tag={name:Oe.tagName,attributes:{}};Oe.opt.xmlns&&(Ne.ns=be.ns),Oe.attribList.length=0,Ct(Oe,"onopentagstart",Ne)}function ut(Oe,be){var Ne=Oe.indexOf(":"),$e=Ne<0?["",Oe]:Oe.split(":"),dt=$e[0],Je=$e[1];return be&&Oe==="xmlns"&&(dt="xmlns",Je=""),{prefix:dt,local:Je}}function mt(Oe){if(Oe.strict||(Oe.attribName=Oe.attribName[Oe.looseCase]()),Oe.attribList.indexOf(Oe.attribName)!==-1||Oe.tag.attributes.hasOwnProperty(Oe.attribName))return void(Oe.attribName=Oe.attribValue="");if(Oe.opt.xmlns){var be=ut(Oe.attribName,!0),Ne=be.prefix,$e=be.local;if(Ne==="xmlns")if($e==="xml"&&Oe.attribValue!==kt)lt(Oe,"xml: prefix must be bound to "+kt+`
|
|
|
Actual: `+Oe.attribValue);else if($e==="xmlns"&&Oe.attribValue!==pt)lt(Oe,"xmlns: prefix must be bound to "+pt+`
|
|
|
Actual: `+Oe.attribValue);else{var dt=Oe.tag,Je=Oe.tags[Oe.tags.length-1]||Oe;dt.ns===Je.ns&&(dt.ns=(0,ie.default)(Je.ns)),dt.ns[$e]=Oe.attribValue}Oe.attribList.push([Oe.attribName,Oe.attribValue])}else Oe.tag.attributes[Oe.attribName]=Oe.attribValue,Ct(Oe,"onattribute",{name:Oe.attribName,value:Oe.attribValue});Oe.attribName=Oe.attribValue=""}function Pt(Oe,be){if(Oe.opt.xmlns){var Ne=Oe.tag,$e=ut(Oe.tagName);Ne.prefix=$e.prefix,Ne.local=$e.local,Ne.uri=Ne.ns[$e.prefix]||"",Ne.prefix&&!Ne.uri&&(lt(Oe,"Unbound namespace prefix: "+(0,ge.default)(Oe.tagName)),Ne.uri=$e.prefix);var dt=Oe.tags[Oe.tags.length-1]||Oe;Ne.ns&&dt.ns!==Ne.ns&&(0,ee.default)(Ne.ns).forEach(function(ki){Ct(Oe,"onopennamespace",{prefix:ki,uri:Ne.ns[ki]})});for(var Je=0,At=Oe.attribList.length;Je<At;Je++){var en=Oe.attribList[Je],pn=en[0],ln=en[1],gn=ut(pn,!0),Un=gn.prefix,An=gn.local,ni=Un===""?"":Ne.ns[Un]||"",ai={name:pn,value:ln,prefix:Un,local:An,uri:ni};Un&&Un!=="xmlns"&&!ni&&(lt(Oe,"Unbound namespace prefix: "+(0,ge.default)(Un)),ai.uri=Un),Oe.tag.attributes[pn]=ai,Ct(Oe,"onattribute",ai)}Oe.attribList.length=0}Oe.tag.isSelfClosing=!!be,Oe.sawRoot=!0,Oe.tags.push(Oe.tag),Ct(Oe,"onopentag",Oe.tag),be||(Oe.noscript||Oe.tagName.toLowerCase()!=="script"?Oe.state=Ie.TEXT:Oe.state=Ie.SCRIPT,Oe.tag=null,Oe.tagName=""),Oe.attribName=Oe.attribValue="",Oe.attribList.length=0}function gt(Oe){if(!Oe.tagName)return lt(Oe,"Weird empty close tag."),Oe.textNode+="</>",void(Oe.state=Ie.TEXT);if(Oe.script){if(Oe.tagName!=="script")return Oe.script+="</"+Oe.tagName+">",Oe.tagName="",void(Oe.state=Ie.SCRIPT);Ct(Oe,"onscript",Oe.script),Oe.script=""}var be=Oe.tags.length,Ne=Oe.tagName;Oe.strict||(Ne=Ne[Oe.looseCase]());for(var $e=Ne;be--&&Oe.tags[be].name!==$e;)lt(Oe,"Unexpected close tag");if(be<0)return lt(Oe,"Unmatched closing tag: "+Oe.tagName),Oe.textNode+="</"+Oe.tagName+">",void(Oe.state=Ie.TEXT);Oe.tagName=Ne;for(var dt=Oe.tags.length;dt-- >be;){var Je=Oe.tag=Oe.tags.pop();Oe.tagName=Oe.tag.name,Ct(Oe,"onclosetag",Oe.tagName);var At={};for(var en in Je.ns)At[en]=Je.ns[en];var pn=Oe.tags[Oe.tags.length-1]||Oe;Oe.opt.xmlns&&Je.ns!==pn.ns&&(0,ee.default)(Je.ns).forEach(function(ln){var gn=Je.ns[ln];Ct(Oe,"onclosenamespace",{prefix:ln,uri:gn})})}be===0&&(Oe.closedRoot=!0),Oe.tagName=Oe.attribValue=Oe.attribName="",Oe.attribList.length=0,Oe.state=Ie.TEXT}function Ft(Oe){var be,Ne=Oe.entity,$e=Ne.toLowerCase(),dt="";return Oe.ENTITIES[Ne]?Oe.ENTITIES[Ne]:Oe.ENTITIES[$e]?Oe.ENTITIES[$e]:(Ne=$e,Ne.charAt(0)==="#"&&(Ne.charAt(1)==="x"?(Ne=Ne.slice(2),be=parseInt(Ne,16),dt=be.toString(16)):(Ne=Ne.slice(1),be=parseInt(Ne,10),dt=be.toString(10))),Ne=Ne.replace(/^0+/,""),isNaN(be)||dt.toLowerCase()!==Ne?(lt(Oe,"Invalid character entity"),"&"+Oe.entity+";"):(0,ye.default)(be))}function Ht(Oe,be){be==="<"?(Oe.state=Ie.OPEN_WAKA,Oe.startTagPosition=Oe.position):ze(be)||(lt(Oe,"Non-whitespace before first tag."),Oe.textNode=be,Oe.state=Ie.TEXT)}function hn(Oe,be){var Ne="";return be<Oe.length&&(Ne=Oe.charAt(be)),Ne}function Jt(Oe){var be=this;if(this.error)throw this.error;if(be.closed)return st(be,"Cannot write after close. Assign an onready handler.");if(Oe===null)return zt(be);(Oe===void 0?"undefined":(0,ve.default)(Oe))==="object"&&(Oe=Oe.toString());for(var Ne=0,$e="";$e=hn(Oe,Ne++),be.c=$e,!!$e;)switch(be.trackPosition&&(be.position++,$e===`
|
|
|
`?(be.line++,be.column=0):be.column++),be.state){case Ie.BEGIN:if(be.state=Ie.BEGIN_WHITESPACE,$e==="\uFEFF")continue;Ht(be,$e);continue;case Ie.BEGIN_WHITESPACE:Ht(be,$e);continue;case Ie.TEXT:if(be.sawRoot&&!be.closedRoot){for(var dt=Ne-1;$e&&$e!=="<"&&$e!=="&";)($e=hn(Oe,Ne++))&&be.trackPosition&&(be.position++,$e===`
|
|
|
`?(be.line++,be.column=0):be.column++);be.textNode+=Oe.substring(dt,Ne-1)}$e!=="<"||be.sawRoot&&be.closedRoot&&!be.strict?(ze($e)||be.sawRoot&&!be.closedRoot||lt(be,"Text data outside of root node."),$e==="&"?be.state=Ie.TEXT_ENTITY:be.textNode+=$e):(be.state=Ie.OPEN_WAKA,be.startTagPosition=be.position);continue;case Ie.SCRIPT:$e==="<"?be.state=Ie.SCRIPT_ENDING:be.script+=$e;continue;case Ie.SCRIPT_ENDING:$e==="/"?be.state=Ie.CLOSE_TAG:(be.script+="<"+$e,be.state=Ie.SCRIPT);continue;case Ie.OPEN_WAKA:if($e==="!")be.state=Ie.SGML_DECL,be.sgmlDecl="";else if(!ze($e))if(Ge(xt,$e))be.state=Ie.OPEN_TAG,be.tagName=$e;else if($e==="/")be.state=Ie.CLOSE_TAG,be.tagName="";else if($e==="?")be.state=Ie.PROC_INST,be.procInstName=be.procInstBody="";else{if(lt(be,"Unencoded <"),be.startTagPosition+1<be.position){var Je=be.position-be.startTagPosition;$e=new Array(Je).join(" ")+$e}be.textNode+="<"+$e,be.state=Ie.TEXT}continue;case Ie.SGML_DECL:(be.sgmlDecl+$e).toUpperCase()===Xt?(Ct(be,"onopencdata"),be.state=Ie.CDATA,be.sgmlDecl="",be.cdata=""):be.sgmlDecl+$e==="--"?(be.state=Ie.COMMENT,be.comment="",be.sgmlDecl=""):(be.sgmlDecl+$e).toUpperCase()===$t?(be.state=Ie.DOCTYPE,(be.doctype||be.sawRoot)&<(be,"Inappropriately located doctype declaration"),be.doctype="",be.sgmlDecl=""):$e===">"?(Ct(be,"onsgmldeclaration",be.sgmlDecl),be.sgmlDecl="",be.state=Ie.TEXT):(Ze($e)&&(be.state=Ie.SGML_DECL_QUOTED),be.sgmlDecl+=$e);continue;case Ie.SGML_DECL_QUOTED:$e===be.q&&(be.state=Ie.SGML_DECL,be.q=""),be.sgmlDecl+=$e;continue;case Ie.DOCTYPE:$e===">"?(be.state=Ie.TEXT,Ct(be,"ondoctype",be.doctype),be.doctype=!0):(be.doctype+=$e,$e==="["?be.state=Ie.DOCTYPE_DTD:Ze($e)&&(be.state=Ie.DOCTYPE_QUOTED,be.q=$e));continue;case Ie.DOCTYPE_QUOTED:be.doctype+=$e,$e===be.q&&(be.q="",be.state=Ie.DOCTYPE);continue;case Ie.DOCTYPE_DTD:be.doctype+=$e,$e==="]"?be.state=Ie.DOCTYPE:Ze($e)&&(be.state=Ie.DOCTYPE_DTD_QUOTED,be.q=$e);continue;case Ie.DOCTYPE_DTD_QUOTED:be.doctype+=$e,$e===be.q&&(be.state=Ie.DOCTYPE_DTD,be.q="");continue;case Ie.COMMENT:$e==="-"?be.state=Ie.COMMENT_ENDING:be.comment+=$e;continue;case Ie.COMMENT_ENDING:$e==="-"?(be.state=Ie.COMMENT_ENDED,be.comment=yt(be.opt,be.comment),be.comment&&Ct(be,"oncomment",be.comment),be.comment=""):(be.comment+="-"+$e,be.state=Ie.COMMENT);continue;case Ie.COMMENT_ENDED:$e!==">"?(lt(be,"Malformed comment"),be.comment+="--"+$e,be.state=Ie.COMMENT):be.state=Ie.TEXT;continue;case Ie.CDATA:$e==="]"?be.state=Ie.CDATA_ENDING:be.cdata+=$e;continue;case Ie.CDATA_ENDING:$e==="]"?be.state=Ie.CDATA_ENDING_2:(be.cdata+="]"+$e,be.state=Ie.CDATA);continue;case Ie.CDATA_ENDING_2:$e===">"?(be.cdata&&Ct(be,"oncdata",be.cdata),Ct(be,"onclosecdata"),be.cdata="",be.state=Ie.TEXT):$e==="]"?be.cdata+="]":(be.cdata+="]]"+$e,be.state=Ie.CDATA);continue;case Ie.PROC_INST:$e==="?"?be.state=Ie.PROC_INST_ENDING:ze($e)?be.state=Ie.PROC_INST_BODY:be.procInstName+=$e;continue;case Ie.PROC_INST_BODY:if(!be.procInstBody&&ze($e))continue;$e==="?"?be.state=Ie.PROC_INST_ENDING:be.procInstBody+=$e;continue;case Ie.PROC_INST_ENDING:$e===">"?(Ct(be,"onprocessinginstruction",{name:be.procInstName,body:be.procInstBody}),be.procInstName=be.procInstBody="",be.state=Ie.TEXT):(be.procInstBody+="?"+$e,be.state=Ie.PROC_INST_BODY);continue;case Ie.OPEN_TAG:Ge(vt,$e)?be.tagName+=$e:(tt(be),$e===">"?Pt(be):$e==="/"?be.state=Ie.OPEN_TAG_SLASH:(ze($e)||lt(be,"Invalid character in tag name"),be.state=Ie.ATTRIB));continue;case Ie.OPEN_TAG_SLASH:$e===">"?(Pt(be,!0),gt(be)):(lt(be,"Forward-slash in opening tag not followed by >"),be.state=Ie.ATTRIB);continue;case Ie.ATTRIB:if(ze($e))continue;$e===">"?Pt(be):$e==="/"?be.state=Ie.OPEN_TAG_SLASH:Ge(xt,$e)?(be.attribName=$e,be.attribValue="",be.state=Ie.ATTRIB_NAME):lt(be,"Invalid attribute name");continue;case Ie.ATTRIB_NAME:$e==="="?be.state=Ie.ATTRIB_VALUE:$e===">"?(lt(be,"Attribute without value"),be.attribValue=be.attribName,mt(be),Pt(be)):ze($e)?be.state=Ie.ATTRIB_NAME_SAW_WHITE:Ge(vt,$e)?be.attribName+=$e:lt(be,"Invalid attribute name");continue;case Ie.ATTRIB_NAME_SAW_WHITE:if($e==="=")be.state=Ie.ATTRIB_VALUE;else{if(ze($e))continue;lt(be,"Attribute without value"),be.tag.attributes[be.attribName]="",be.attribValue="",Ct(be,"onattribute",{name:be.attribName,value:""}),be.attribName="",$e===">"?Pt(be):Ge(xt,$e)?(be.attribName=$e,be.state=Ie.ATTRIB_NAME):(lt(be,"Invalid attribute name"),be.state=Ie.ATTRIB)}continue;case Ie.ATTRIB_VALUE:if(ze($e))continue;Ze($e)?(be.q=$e,be.state=Ie.ATTRIB_VALUE_QUOTED):(lt(be,"Unquoted attribute value"),be.state=Ie.ATTRIB_VALUE_UNQUOTED,be.attribValue=$e);continue;case Ie.ATTRIB_VALUE_QUOTED:if($e!==be.q){$e==="&"?be.state=Ie.ATTRIB_VALUE_ENTITY_Q:be.attribValue+=$e;continue}mt(be),be.q="",be.state=Ie.ATTRIB_VALUE_CLOSED;continue;case Ie.ATTRIB_VALUE_CLOSED:ze($e)?be.state=Ie.ATTRIB:$e===">"?Pt(be):$e==="/"?be.state=Ie.OPEN_TAG_SLASH:Ge(xt,$e)?(lt(be,"No whitespace between attributes"),be.attribName=$e,be.attribValue="",be.state=Ie.ATTRIB_NAME):lt(be,"Invalid attribute name");continue;case Ie.ATTRIB_VALUE_UNQUOTED:if(!Xe($e)){$e==="&"?be.state=Ie.ATTRIB_VALUE_ENTITY_U:be.attribValue+=$e;continue}mt(be),$e===">"?Pt(be):be.state=Ie.ATTRIB;continue;case Ie.CLOSE_TAG:if(be.tagName)$e===">"?gt(be):Ge(vt,$e)?be.tagName+=$e:be.script?(be.script+="</"+be.tagName,be.tagName="",be.state=Ie.SCRIPT):(ze($e)||lt(be,"Invalid tagname in closing tag"),be.state=Ie.CLOSE_TAG_SAW_WHITE);else{if(ze($e))continue;ft(xt,$e)?be.script?(be.script+="</"+$e,be.state=Ie.SCRIPT):lt(be,"Invalid tagname in closing tag."):be.tagName=$e}continue;case Ie.CLOSE_TAG_SAW_WHITE:if(ze($e))continue;$e===">"?gt(be):lt(be,"Invalid characters in closing tag");continue;case Ie.TEXT_ENTITY:case Ie.ATTRIB_VALUE_ENTITY_Q:case Ie.ATTRIB_VALUE_ENTITY_U:var At,en;switch(be.state){case Ie.TEXT_ENTITY:At=Ie.TEXT,en="textNode";break;case Ie.ATTRIB_VALUE_ENTITY_Q:At=Ie.ATTRIB_VALUE_QUOTED,en="attribValue";break;case Ie.ATTRIB_VALUE_ENTITY_U:At=Ie.ATTRIB_VALUE_UNQUOTED,en="attribValue"}$e===";"?(be[en]+=Ft(be),be.entity="",be.state=At):Ge(be.entity.length?He:nt,$e)?be.entity+=$e:(lt(be,"Invalid character in entity name"),be[en]+="&"+be.entity+$e,be.entity="",be.state=At);continue;default:throw new Error(be,"Unknown state: "+be.state)}return be.position>=be.bufferCheckPosition&&Se(be),be}se.parser=function(Oe,be){return new ue(Oe,be)},se.SAXParser=ue,se.SAXStream=De,se.createStream=Ae,se.MAX_BUFFER_LENGTH=65536;var bn=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];se.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],ie.default||(Object.create=function(Oe){function be(){}return be.prototype=Oe,new be}),ee.default||(Object.keys=function(Oe){var be=[];for(var Ne in Oe)Oe.hasOwnProperty(Ne)&&be.push(Ne);return be}),ue.prototype={end:function(){zt(this)},write:Jt,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){Pe(this)}};var Wt;try{Wt=me("stream").Stream}catch(Oe){Wt=function(){}}var Kt=se.EVENTS.filter(function(Oe){return Oe!=="error"&&Oe!=="end"});De.prototype=(0,ie.default)(Wt.prototype,{constructor:{value:De}}),De.prototype.write=function(Oe){if(typeof Ce=="function"&&typeof Ce.isBuffer=="function"&&Ce.isBuffer(Oe)){if(!this._decoder){var be=me("string_decoder").StringDecoder;this._decoder=new be("utf8")}Oe=this._decoder.write(Oe)}return this._parser.write(Oe.toString()),this.emit("data",Oe),!0},De.prototype.end=function(Oe){return Oe&&Oe.length&&this.write(Oe),this._parser.end(),!0},De.prototype.on=function(Oe,be){var Ne=this;return Ne._parser["on"+Oe]||Kt.indexOf(Oe)===-1||(Ne._parser["on"+Oe]=function(){var $e=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);$e.splice(0,0,Oe),Ne.emit.apply(Ne,$e)}),Wt.prototype.on.call(Ne,Oe,be)};var Xt="[CDATA[",$t="DOCTYPE",kt="http://www.w3.org/XML/1998/namespace",pt="http://www.w3.org/2000/xmlns/",Bt={xml:kt,xmlns:pt},xt=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,vt=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,nt=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,He=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,Ie=0;se.STATE={BEGIN:Ie++,BEGIN_WHITESPACE:Ie++,TEXT:Ie++,TEXT_ENTITY:Ie++,OPEN_WAKA:Ie++,SGML_DECL:Ie++,SGML_DECL_QUOTED:Ie++,DOCTYPE:Ie++,DOCTYPE_QUOTED:Ie++,DOCTYPE_DTD:Ie++,DOCTYPE_DTD_QUOTED:Ie++,COMMENT_STARTING:Ie++,COMMENT:Ie++,COMMENT_ENDING:Ie++,COMMENT_ENDED:Ie++,CDATA:Ie++,CDATA_ENDING:Ie++,CDATA_ENDING_2:Ie++,PROC_INST:Ie++,PROC_INST_BODY:Ie++,PROC_INST_ENDING:Ie++,OPEN_TAG:Ie++,OPEN_TAG_SLASH:Ie++,ATTRIB:Ie++,ATTRIB_NAME:Ie++,ATTRIB_NAME_SAW_WHITE:Ie++,ATTRIB_VALUE:Ie++,ATTRIB_VALUE_QUOTED:Ie++,ATTRIB_VALUE_CLOSED:Ie++,ATTRIB_VALUE_UNQUOTED:Ie++,ATTRIB_VALUE_ENTITY_Q:Ie++,ATTRIB_VALUE_ENTITY_U:Ie++,CLOSE_TAG:Ie++,CLOSE_TAG_SAW_WHITE:Ie++,SCRIPT:Ie++,SCRIPT_ENDING:Ie++},se.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},se.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},(0,ee.default)(se.ENTITIES).forEach(function(Oe){var be=se.ENTITIES[Oe],Ne=typeof be=="number"?String.fromCharCode(be):be;se.ENTITIES[Oe]=Ne});for(var We in se.STATE)se.STATE[se.STATE[We]]=We;Ie=se.STATE,ye.default||function(){var Oe=String.fromCharCode,be=Math.floor,Ne=function(){var $e,dt,Je=[],At=-1,en=arguments.length;if(!en)return"";for(var pn="";++At<en;){var ln=Number(arguments[At]);if(!isFinite(ln)||ln<0||ln>1114111||be(ln)!==ln)throw RangeError("Invalid code point: "+ln);ln<=65535?Je.push(ln):(ln-=65536,$e=55296+(ln>>10),dt=ln%1024+56320,Je.push($e,dt)),(At+1===en||Je.length>16384)&&(pn+=Oe.apply(null,Je),Je.length=0)}return pn};ce.default?Object.defineProperty(String,"fromCodePoint",{value:Ne,configurable:!0,writable:!0}):String.fromCodePoint=Ne}()})(ke===void 0?(void 0).sax={}:ke)}).call(this,me("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/create":19,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/object/keys":23,"babel-runtime/core-js/string/from-code-point":26,"babel-runtime/helpers/typeof":32,buffer:38,stream:195,string_decoder:37}],195:[function(me,Be,ke){function Ce(){Le.call(this)}Be.exports=Ce;var Le=me("events").EventEmitter;me("inherits")(Ce,Le),Ce.Readable=me("readable-stream/readable.js"),Ce.Writable=me("readable-stream/writable.js"),Ce.Duplex=me("readable-stream/duplex.js"),Ce.Transform=me("readable-stream/transform.js"),Ce.PassThrough=me("readable-stream/passthrough.js"),Ce.Stream=Ce,Ce.prototype.pipe=function(he,ye){function xe(oe){he.writable&&he.write(oe)===!1&&z.pause&&z.pause()}function ge(){z.readable&&z.resume&&z.resume()}function le(){ee||(ee=!0,he.end())}function ve(){ee||(ee=!0,typeof he.destroy=="function"&&he.destroy())}function de(oe){if(ce(),Le.listenerCount(this,"error")===0)throw oe}function ce(){z.removeListener("data",xe),he.removeListener("drain",ge),z.removeListener("end",le),z.removeListener("close",ve),z.removeListener("error",de),he.removeListener("error",de),z.removeListener("end",ce),z.removeListener("close",ce),he.removeListener("close",ce)}var z=this;z.on("data",xe),he.on("drain",ge),he._isStdio||ye&&ye.end===!1||(z.on("end",le),z.on("close",ve));var ee=!1;return z.on("error",de),he.on("error",de),z.on("end",ce),z.on("close",ce),he.on("close",ce),he.emit("pipe",z),he}},{events:158,inherits:162,"readable-stream/duplex.js":178,"readable-stream/passthrough.js":187,"readable-stream/readable.js":188,"readable-stream/transform.js":189,"readable-stream/writable.js":190}],196:[function(me,Be,ke){(function(Ce){var Le=me("./lib/request"),he=me("./lib/response"),ye=me("xtend"),xe=me("builtin-status-codes"),ge=me("url"),le=ke;le.request=function(ve,de){ve=typeof ve=="string"?ge.parse(ve):ye(ve);var ce=Ce.location.protocol.search(/^https?:$/)===-1?"http:":"",z=ve.protocol||ce,ee=ve.hostname||ve.host,oe=ve.port,ie=ve.path||"/";ee&&ee.indexOf(":")!==-1&&(ee="["+ee+"]"),ve.url=(ee?z+"//"+ee:"")+(oe?":"+oe:"")+ie,ve.method=(ve.method||"GET").toUpperCase(),ve.headers=ve.headers||{};var se=new Le(ve);return de&&se.on("response",de),se},le.get=function(ve,de){var ce=le.request(ve,de);return ce.end(),ce},le.ClientRequest=Le,le.IncomingMessage=he.IncomingMessage,le.Agent=function(){},le.Agent.defaultMaxSockets=4,le.globalAgent=new le.Agent,le.STATUS_CODES=xe,le.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":198,"./lib/response":199,"builtin-status-codes":39,url:203,xtend:236}],197:[function(me,Be,ke){(function(Ce){"use strict";function Le(){if(xe!==void 0)return xe;if(Ce.XMLHttpRequest){xe=new Ce.XMLHttpRequest;try{xe.open("GET",Ce.XDomainRequest?"/":"https://example.com")}catch(ve){xe=null}}else xe=null;return xe}function he(ve){var de=Le();if(!de)return!1;try{return de.responseType=ve,de.responseType===ve}catch(ce){}return!1}function ye(ve){return typeof ve=="function"}ke.fetch=ye(Ce.fetch)&&ye(Ce.ReadableStream),ke.writableStream=ye(Ce.WritableStream),ke.abortController=ye(Ce.AbortController),ke.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),ke.blobConstructor=!0}catch(ve){}var xe,ge=Ce.ArrayBuffer!==void 0,le=ge&&ye(Ce.ArrayBuffer.prototype.slice);ke.arraybuffer=ke.fetch||ge&&he("arraybuffer"),ke.msstream=!ke.fetch&&le&&he("ms-stream"),ke.mozchunkedarraybuffer=!ke.fetch&&ge&&he("moz-chunked-arraybuffer"),ke.overrideMimeType=ke.fetch||!!Le()&&ye(Le().overrideMimeType),ke.vbArray=ye(Ce.VBArray),xe=null}).call(this,typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],198:[function(me,Be,ke){(function(Ce,Le,he){"use strict";function ye(Se,we){return ve.fetch&&we?"fetch":ve.mozchunkedarraybuffer?"moz-chunked-arraybuffer":ve.msstream?"ms-stream":ve.arraybuffer&&Se?"arraybuffer":ve.vbArray&&Se?"text:vbarray":"text"}function xe(Se){try{var we=Se.status;return we!==null&&we!==0}catch(Pe){return!1}}var ge=me("babel-runtime/core-js/object/keys"),le=function(Se){return Se&&Se.__esModule?Se:{default:Se}}(ge),ve=me("./capability"),de=me("inherits"),ce=me("./response"),z=me("readable-stream"),ee=me("to-arraybuffer"),oe=ce.IncomingMessage,ie=ce.readyStates,se=Be.exports=function(Se){var we=this;z.Writable.call(we),we._opts=Se,we._body=[],we._headers={},Se.auth&&we.setHeader("Authorization","Basic "+new he(Se.auth).toString("base64")),(0,le.default)(Se.headers).forEach(function(De){we.setHeader(De,Se.headers[De])});var Pe,Ae=!0;if(Se.mode==="disable-fetch"||"requestTimeout"in Se&&!ve.abortController)Ae=!1,Pe=!0;else if(Se.mode==="prefer-streaming")Pe=!1;else if(Se.mode==="allow-wrong-content-type")Pe=!ve.overrideMimeType;else{if(Se.mode&&Se.mode!=="default"&&Se.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");Pe=!0}we._mode=ye(Pe,Ae),we._fetchTimer=null,we.on("finish",function(){we._onFinish()})};de(se,z.Writable),se.prototype.setHeader=function(Se,we){var Pe=this,Ae=Se.toLowerCase();ue.indexOf(Ae)===-1&&(Pe._headers[Ae]={name:Se,value:we})},se.prototype.getHeader=function(Se){var we=this._headers[Se.toLowerCase()];return we?we.value:null},se.prototype.removeHeader=function(Se){delete this._headers[Se.toLowerCase()]},se.prototype._onFinish=function(){var Se=this;if(!Se._destroyed){var we=Se._opts,Pe=Se._headers,Ae=null;we.method!=="GET"&&we.method!=="HEAD"&&(Ae=ve.arraybuffer?ee(he.concat(Se._body)):ve.blobConstructor?new Le.Blob(Se._body.map(function(Ge){return ee(Ge)}),{type:(Pe["content-type"]||{}).value||""}):he.concat(Se._body).toString());var De=[];if((0,le.default)(Pe).forEach(function(Ge){var ft=Pe[Ge].name,at=Pe[Ge].value;Array.isArray(at)?at.forEach(function(Ct){De.push([ft,Ct])}):De.push([ft,at])}),Se._mode==="fetch"){var ze=null;if(ve.abortController){var Ze=new AbortController;ze=Ze.signal,Se._fetchAbortController=Ze,"requestTimeout"in we&&we.requestTimeout!==0&&(Se._fetchTimer=Le.setTimeout(function(){Se.emit("requestTimeout"),Se._fetchAbortController&&Se._fetchAbortController.abort()},we.requestTimeout))}Le.fetch(Se._opts.url,{method:Se._opts.method,headers:De,body:Ae||void 0,mode:"cors",credentials:we.withCredentials?"include":"same-origin",signal:ze}).then(function(Ge){Se._fetchResponse=Ge,Se._connect()},function(Ge){Le.clearTimeout(Se._fetchTimer),Se._destroyed||Se.emit("error",Ge)})}else{var Xe=Se._xhr=new Le.XMLHttpRequest;try{Xe.open(Se._opts.method,Se._opts.url,!0)}catch(Ge){return void Ce.nextTick(function(){Se.emit("error",Ge)})}"responseType"in Xe&&(Xe.responseType=Se._mode.split(":")[0]),"withCredentials"in Xe&&(Xe.withCredentials=!!we.withCredentials),Se._mode==="text"&&"overrideMimeType"in Xe&&Xe.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in we&&(Xe.timeout=we.requestTimeout,Xe.ontimeout=function(){Se.emit("requestTimeout")}),De.forEach(function(Ge){Xe.setRequestHeader(Ge[0],Ge[1])}),Se._response=null,Xe.onreadystatechange=function(){switch(Xe.readyState){case ie.LOADING:case ie.DONE:Se._onXHRProgress()}},Se._mode==="moz-chunked-arraybuffer"&&(Xe.onprogress=function(){Se._onXHRProgress()}),Xe.onerror=function(){Se._destroyed||Se.emit("error",new Error("XHR error"))};try{Xe.send(Ae)}catch(Ge){return void Ce.nextTick(function(){Se.emit("error",Ge)})}}}},se.prototype._onXHRProgress=function(){var Se=this;xe(Se._xhr)&&!Se._destroyed&&(Se._response||Se._connect(),Se._response._onXHRProgress())},se.prototype._connect=function(){var Se=this;Se._destroyed||(Se._response=new oe(Se._xhr,Se._fetchResponse,Se._mode,Se._fetchTimer),Se._response.on("error",function(we){Se.emit("error",we)}),Se.emit("response",Se._response))},se.prototype._write=function(Se,we,Pe){this._body.push(Se),Pe()},se.prototype.abort=se.prototype.destroy=function(){var Se=this;Se._destroyed=!0,Le.clearTimeout(Se._fetchTimer),Se._response&&(Se._response._destroyed=!0),Se._xhr?Se._xhr.abort():Se._fetchAbortController&&Se._fetchAbortController.abort()},se.prototype.end=function(Se,we,Pe){var Ae=this;typeof Se=="function"&&(Pe=Se,Se=void 0),z.Writable.prototype.end.call(Ae,Se,we,Pe)},se.prototype.flushHeaders=function(){},se.prototype.setTimeout=function(){},se.prototype.setNoDelay=function(){},se.prototype.setSocketKeepAlive=function(){};var ue=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,me("_process"),typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{},me("buffer").Buffer)},{"./capability":197,"./response":199,_process:173,"babel-runtime/core-js/object/keys":23,buffer:38,inherits:162,"readable-stream":188,"to-arraybuffer":202}],199:[function(me,Be,ke){(function(Ce,Le,he){"use strict";var ye=me("babel-runtime/core-js/promise"),xe=function(z){return z&&z.__esModule?z:{default:z}}(ye),ge=me("./capability"),le=me("inherits"),ve=me("readable-stream"),de=ke.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},ce=ke.IncomingMessage=function(z,ee,oe,ie){var se=this;if(ve.Readable.call(se),se._mode=oe,se.headers={},se.rawHeaders=[],se.trailers={},se.rawTrailers=[],se.on("end",function(){Ce.nextTick(function(){se.emit("close")})}),oe==="fetch"){if(se._fetchResponse=ee,se.url=ee.url,se.statusCode=ee.status,se.statusMessage=ee.statusText,ee.headers.forEach(function(Ae,De){se.headers[De.toLowerCase()]=Ae,se.rawHeaders.push(De,Ae)}),ge.writableStream){var ue=new WritableStream({write:function(Ae){return new xe.default(function(De,ze){se._destroyed?ze():se.push(new he(Ae))?De():se._resumeFetch=De})},close:function(){Le.clearTimeout(ie),se._destroyed||se.push(null)},abort:function(Ae){se._destroyed||se.emit("error",Ae)}});try{return void ee.body.pipeTo(ue).catch(function(Ae){Le.clearTimeout(ie),se._destroyed||se.emit("error",Ae)})}catch(Ae){}}var Se=ee.body.getReader();(function Ae(){Se.read().then(function(De){if(!se._destroyed){if(De.done)return Le.clearTimeout(ie),void se.push(null);se.push(new he(De.value)),Ae()}}).catch(function(De){Le.clearTimeout(ie),se._destroyed||se.emit("error",De)})})()}else if(se._xhr=z,se._pos=0,se.url=z.responseURL,se.statusCode=z.status,se.statusMessage=z.statusText,z.getAllResponseHeaders().split(/\r?\n/).forEach(function(Ae){var De=Ae.match(/^([^:]+):\s*(.*)/);if(De){var ze=De[1].toLowerCase();ze==="set-cookie"?(se.headers[ze]===void 0&&(se.headers[ze]=[]),se.headers[ze].push(De[2])):se.headers[ze]!==void 0?se.headers[ze]+=", "+De[2]:se.headers[ze]=De[2],se.rawHeaders.push(De[1],De[2])}}),se._charset="x-user-defined",!ge.overrideMimeType){var we=se.rawHeaders["mime-type"];if(we){var Pe=we.match(/;\s*charset=([^;])(;|$)/);Pe&&(se._charset=Pe[1].toLowerCase())}se._charset||(se._charset="utf-8")}};le(ce,ve.Readable),ce.prototype._read=function(){var z=this,ee=z._resumeFetch;ee&&(z._resumeFetch=null,ee())},ce.prototype._onXHRProgress=function(){var z=this,ee=z._xhr,oe=null;switch(z._mode){case"text:vbarray":if(ee.readyState!==de.DONE)break;try{oe=new Le.VBArray(ee.responseBody).toArray()}catch(we){}if(oe!==null){z.push(new he(oe));break}case"text":try{oe=ee.responseText}catch(we){z._mode="text:vbarray";break}if(oe.length>z._pos){var ie=oe.substr(z._pos);if(z._charset==="x-user-defined"){for(var se=new he(ie.length),ue=0;ue<ie.length;ue++)se[ue]=255&ie.charCodeAt(ue);z.push(se)}else z.push(ie,z._charset);z._pos=oe.length}break;case"arraybuffer":if(ee.readyState!==de.DONE||!ee.response)break;oe=ee.response,z.push(new he(new Uint8Array(oe)));break;case"moz-chunked-arraybuffer":if(oe=ee.response,ee.readyState!==de.LOADING||!oe)break;z.push(new he(new Uint8Array(oe)));break;case"ms-stream":if(oe=ee.response,ee.readyState!==de.LOADING)break;var Se=new Le.MSStreamReader;Se.onprogress=function(){Se.result.byteLength>z._pos&&(z.push(new he(new Uint8Array(Se.result.slice(z._pos)))),z._pos=Se.result.byteLength)},Se.onload=function(){z.push(null)},Se.readAsArrayBuffer(oe)}z._xhr.readyState===de.DONE&&z._mode!=="ms-stream"&&z.push(null)}}).call(this,me("_process"),typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{},me("buffer").Buffer)},{"./capability":197,_process:173,"babel-runtime/core-js/promise":24,buffer:38,inherits:162,"readable-stream":188}],200:[function(me,Be,ke){"use strict";function Ce(we){if(!we)return"utf8";for(var Pe;;)switch(we){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return we;default:if(Pe)return;we=(""+we).toLowerCase(),Pe=!0}}function Le(we){var Pe=Ce(we);if(typeof Pe!="string"&&(ue.isEncoding===Se||!Se(we)))throw new Error("Unknown encoding: "+we);return Pe||we}function he(we){this.encoding=Le(we);var Pe;switch(this.encoding){case"utf16le":this.text=ce,this.end=z,Pe=4;break;case"utf8":this.fillLast=le,Pe=4;break;case"base64":this.text=ee,this.end=oe,Pe=3;break;default:return this.write=ie,void(this.end=se)}this.lastNeed=0,this.lastTotal=0,this.lastChar=ue.allocUnsafe(Pe)}function ye(we){return we<=127?0:we>>5==6?2:we>>4==14?3:we>>3==30?4:we>>6==2?-1:-2}function xe(we,Pe,Ae){var De=Pe.length-1;if(De<Ae)return 0;var ze=ye(Pe[De]);return ze>=0?(ze>0&&(we.lastNeed=ze-1),ze):--De<Ae||ze===-2?0:(ze=ye(Pe[De]))>=0?(ze>0&&(we.lastNeed=ze-2),ze):--De<Ae||ze===-2?0:(ze=ye(Pe[De]),ze>=0?(ze>0&&(ze===2?ze=0:we.lastNeed=ze-3),ze):0)}function ge(we,Pe,Ae){if((192&Pe[0])!=128)return we.lastNeed=0,"\u951F\uFFFD";if(we.lastNeed>1&&Pe.length>1){if((192&Pe[1])!=128)return we.lastNeed=1,"\u951F\uFFFD";if(we.lastNeed>2&&Pe.length>2&&(192&Pe[2])!=128)return we.lastNeed=2,"\u951F\uFFFD"}}function le(we){var Pe=this.lastTotal-this.lastNeed,Ae=ge(this,we,Pe);return Ae!==void 0?Ae:this.lastNeed<=we.length?(we.copy(this.lastChar,Pe,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(we.copy(this.lastChar,Pe,0,we.length),void(this.lastNeed-=we.length))}function ve(we,Pe){var Ae=xe(this,we,Pe);if(!this.lastNeed)return we.toString("utf8",Pe);this.lastTotal=Ae;var De=we.length-(Ae-this.lastNeed);return we.copy(this.lastChar,0,De),we.toString("utf8",Pe,De)}function de(we){var Pe=we&&we.length?this.write(we):"";return this.lastNeed?Pe+"\u951F\uFFFD":Pe}function ce(we,Pe){if((we.length-Pe)%2==0){var Ae=we.toString("utf16le",Pe);if(Ae){var De=Ae.charCodeAt(Ae.length-1);if(De>=55296&&De<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=we[we.length-2],this.lastChar[1]=we[we.length-1],Ae.slice(0,-1)}return Ae}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=we[we.length-1],we.toString("utf16le",Pe,we.length-1)}function z(we){var Pe=we&&we.length?this.write(we):"";if(this.lastNeed){var Ae=this.lastTotal-this.lastNeed;return Pe+this.lastChar.toString("utf16le",0,Ae)}return Pe}function ee(we,Pe){var Ae=(we.length-Pe)%3;return Ae===0?we.toString("base64",Pe):(this.lastNeed=3-Ae,this.lastTotal=3,Ae===1?this.lastChar[0]=we[we.length-1]:(this.lastChar[0]=we[we.length-2],this.lastChar[1]=we[we.length-1]),we.toString("base64",Pe,we.length-Ae))}function oe(we){var Pe=we&&we.length?this.write(we):"";return this.lastNeed?Pe+this.lastChar.toString("base64",0,3-this.lastNeed):Pe}function ie(we){return we.toString(this.encoding)}function se(we){return we&&we.length?this.write(we):""}var ue=me("safe-buffer").Buffer,Se=ue.isEncoding||function(we){switch((we=""+we)&&we.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};ke.StringDecoder=he,he.prototype.write=function(we){if(we.length===0)return"";var Pe,Ae;if(this.lastNeed){if((Pe=this.fillLast(we))===void 0)return"";Ae=this.lastNeed,this.lastNeed=0}else Ae=0;return Ae<we.length?Pe?Pe+this.text(we,Ae):this.text(we,Ae):Pe||""},he.prototype.end=de,he.prototype.text=ve,he.prototype.fillLast=function(we){if(this.lastNeed<=we.length)return we.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);we.copy(this.lastChar,this.lastTotal-this.lastNeed,0,we.length),this.lastNeed-=we.length}},{"safe-buffer":193}],201:[function(me,Be,ke){(function(Ce,Le){function he(de,ce){this._id=de,this._clearFn=ce}var ye=me("process/browser.js").nextTick,xe=Function.prototype.apply,ge=Array.prototype.slice,le={},ve=0;ke.setTimeout=function(){return new he(xe.call(setTimeout,window,arguments),clearTimeout)},ke.setInterval=function(){return new he(xe.call(setInterval,window,arguments),clearInterval)},ke.clearTimeout=ke.clearInterval=function(de){de.close()},he.prototype.unref=he.prototype.ref=function(){},he.prototype.close=function(){this._clearFn.call(window,this._id)},ke.enroll=function(de,ce){clearTimeout(de._idleTimeoutId),de._idleTimeout=ce},ke.unenroll=function(de){clearTimeout(de._idleTimeoutId),de._idleTimeout=-1},ke._unrefActive=ke.active=function(de){clearTimeout(de._idleTimeoutId);var ce=de._idleTimeout;ce>=0&&(de._idleTimeoutId=setTimeout(function(){de._onTimeout&&de._onTimeout()},ce))},ke.setImmediate=typeof Ce=="function"?Ce:function(de){var ce=ve++,z=!(arguments.length<2)&&ge.call(arguments,1);return le[ce]=!0,ye(function(){le[ce]&&(z?de.apply(null,z):de.call(null),ke.clearImmediate(ce))}),ce},ke.clearImmediate=typeof Le=="function"?Le:function(de){delete le[de]}}).call(this,me("timers").setImmediate,me("timers").clearImmediate)},{"process/browser.js":173,timers:201}],202:[function(me,Be,ke){var Ce=me("buffer").Buffer;Be.exports=function(Le){if(Le instanceof Uint8Array){if(Le.byteOffset===0&&Le.byteLength===Le.buffer.byteLength)return Le.buffer;if(typeof Le.buffer.slice=="function")return Le.buffer.slice(Le.byteOffset,Le.byteOffset+Le.byteLength)}if(Ce.isBuffer(Le)){for(var he=new Uint8Array(Le.length),ye=Le.length,xe=0;xe<ye;xe++)he[xe]=Le[xe];return he.buffer}throw new Error("Argument must be a Buffer")}},{buffer:38}],203:[function(me,Be,ke){"use strict";function Ce(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function Le(ze,Ze,Xe){if(ze&&le.isObject(ze)&&ze instanceof Ce)return ze;var Ge=new Ce;return Ge.parse(ze,Ze,Xe),Ge}function he(ze){return le.isString(ze)&&(ze=Le(ze)),ze instanceof Ce?ze.format():Ce.prototype.format.call(ze)}function ye(ze,Ze){return Le(ze,!1,!0).resolve(Ze)}function xe(ze,Ze){return ze?Le(ze,!1,!0).resolveObject(Ze):Ze}var ge=me("punycode"),le=me("./util");ke.parse=Le,ke.resolve=ye,ke.resolveObject=xe,ke.format=he,ke.Url=Ce;var ve=/^([a-z0-9.+-]+:)/i,de=/:[0-9]*$/,ce=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,z=["<",">",'"',"`"," ","\r",`
|
|
|
`," "],ee=["{","}","|","\\","^","`"].concat(z),oe=["'"].concat(ee),ie=["%","/","?",";","#"].concat(oe),se=["/","?","#"],ue=/^[+a-z0-9A-Z_-]{0,63}$/,Se=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,we={javascript:!0,"javascript:":!0},Pe={javascript:!0,"javascript:":!0},Ae={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},De=me("querystring");Ce.prototype.parse=function(ze,Ze,Xe){if(!le.isString(ze))throw new TypeError("Parameter 'url' must be a string, not "+typeof ze);var Ge=ze.indexOf("?"),ft=Ge!==-1&&Ge<ze.indexOf("#")?"?":"#",at=ze.split(ft),Ct=/\\/g;at[0]=at[0].replace(Ct,"/"),ze=at.join(ft);var et=ze;if(et=et.trim(),!Xe&&ze.split("#").length===1){var yt=ce.exec(et);if(yt)return this.path=et,this.href=et,this.pathname=yt[1],yt[2]?(this.search=yt[2],this.query=Ze?De.parse(this.search.substr(1)):this.search.substr(1)):Ze&&(this.search="",this.query={}),this}var st=ve.exec(et);if(st){st=st[0];var zt=st.toLowerCase();this.protocol=zt,et=et.substr(st.length)}if(Xe||st||et.match(/^\/\/[^@\/]+@[^@\/]+/)){var lt=et.substr(0,2)==="//";!lt||st&&Pe[st]||(et=et.substr(2),this.slashes=!0)}if(!Pe[st]&&(lt||st&&!Ae[st])){for(var tt=-1,ut=0;ut<se.length;ut++){var mt=et.indexOf(se[ut]);mt!==-1&&(tt===-1||mt<tt)&&(tt=mt)}var Pt,gt;gt=tt===-1?et.lastIndexOf("@"):et.lastIndexOf("@",tt),gt!==-1&&(Pt=et.slice(0,gt),et=et.slice(gt+1),this.auth=decodeURIComponent(Pt)),tt=-1;for(var ut=0;ut<ie.length;ut++){var mt=et.indexOf(ie[ut]);mt!==-1&&(tt===-1||mt<tt)&&(tt=mt)}tt===-1&&(tt=et.length),this.host=et.slice(0,tt),et=et.slice(tt),this.parseHost(),this.hostname=this.hostname||"";var Ft=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Ft)for(var Ht=this.hostname.split(/\./),ut=0,hn=Ht.length;ut<hn;ut++){var Jt=Ht[ut];if(Jt&&!Jt.match(ue)){for(var bn="",Wt=0,Kt=Jt.length;Wt<Kt;Wt++)Jt.charCodeAt(Wt)>127?bn+="x":bn+=Jt[Wt];if(!bn.match(ue)){var Xt=Ht.slice(0,ut),$t=Ht.slice(ut+1),kt=Jt.match(Se);kt&&(Xt.push(kt[1]),$t.unshift(kt[2])),$t.length&&(et="/"+$t.join(".")+et),this.hostname=Xt.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),Ft||(this.hostname=ge.toASCII(this.hostname));var pt=this.port?":"+this.port:"",Bt=this.hostname||"";this.host=Bt+pt,this.href+=this.host,Ft&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),et[0]!=="/"&&(et="/"+et))}if(!we[zt])for(var ut=0,hn=oe.length;ut<hn;ut++){var xt=oe[ut];if(et.indexOf(xt)!==-1){var vt=encodeURIComponent(xt);vt===xt&&(vt=escape(xt)),et=et.split(xt).join(vt)}}var nt=et.indexOf("#");nt!==-1&&(this.hash=et.substr(nt),et=et.slice(0,nt));var He=et.indexOf("?");if(He!==-1?(this.search=et.substr(He),this.query=et.substr(He+1),Ze&&(this.query=De.parse(this.query)),et=et.slice(0,He)):Ze&&(this.search="",this.query={}),et&&(this.pathname=et),Ae[zt]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var pt=this.pathname||"",Ie=this.search||"";this.path=pt+Ie}return this.href=this.format(),this},Ce.prototype.format=function(){var ze=this.auth||"";ze&&(ze=encodeURIComponent(ze),ze=ze.replace(/%3A/i,":"),ze+="@");var Ze=this.protocol||"",Xe=this.pathname||"",Ge=this.hash||"",ft=!1,at="";this.host?ft=ze+this.host:this.hostname&&(ft=ze+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(ft+=":"+this.port)),this.query&&le.isObject(this.query)&&Object.keys(this.query).length&&(at=De.stringify(this.query));var Ct=this.search||at&&"?"+at||"";return Ze&&Ze.substr(-1)!==":"&&(Ze+=":"),this.slashes||(!Ze||Ae[Ze])&&ft!==!1?(ft="//"+(ft||""),Xe&&Xe.charAt(0)!=="/"&&(Xe="/"+Xe)):ft||(ft=""),Ge&&Ge.charAt(0)!=="#"&&(Ge="#"+Ge),Ct&&Ct.charAt(0)!=="?"&&(Ct="?"+Ct),Xe=Xe.replace(/[?#]/g,function(et){return encodeURIComponent(et)}),Ct=Ct.replace("#","%23"),Ze+ft+Xe+Ct+Ge},Ce.prototype.resolve=function(ze){return this.resolveObject(Le(ze,!1,!0)).format()},Ce.prototype.resolveObject=function(ze){if(le.isString(ze)){var Ze=new Ce;Ze.parse(ze,!1,!0),ze=Ze}for(var Xe=new Ce,Ge=Object.keys(this),ft=0;ft<Ge.length;ft++){var at=Ge[ft];Xe[at]=this[at]}if(Xe.hash=ze.hash,ze.href==="")return Xe.href=Xe.format(),Xe;if(ze.slashes&&!ze.protocol){for(var Ct=Object.keys(ze),et=0;et<Ct.length;et++){var yt=Ct[et];yt!=="protocol"&&(Xe[yt]=ze[yt])}return Ae[Xe.protocol]&&Xe.hostname&&!Xe.pathname&&(Xe.path=Xe.pathname="/"),Xe.href=Xe.format(),Xe}if(ze.protocol&&ze.protocol!==Xe.protocol){if(!Ae[ze.protocol]){for(var st=Object.keys(ze),zt=0;zt<st.length;zt++){var lt=st[zt];Xe[lt]=ze[lt]}return Xe.href=Xe.format(),Xe}if(Xe.protocol=ze.protocol,ze.host||Pe[ze.protocol])Xe.pathname=ze.pathname;else{for(var hn=(ze.pathname||"").split("/");hn.length&&!(ze.host=hn.shift()););ze.host||(ze.host=""),ze.hostname||(ze.hostname=""),hn[0]!==""&&hn.unshift(""),hn.length<2&&hn.unshift(""),Xe.pathname=hn.join("/")}if(Xe.search=ze.search,Xe.query=ze.query,Xe.host=ze.host||"",Xe.auth=ze.auth,Xe.hostname=ze.hostname||ze.host,Xe.port=ze.port,Xe.pathname||Xe.search){var tt=Xe.pathname||"",ut=Xe.search||"";Xe.path=tt+ut}return Xe.slashes=Xe.slashes||ze.slashes,Xe.href=Xe.format(),Xe}var mt=Xe.pathname&&Xe.pathname.charAt(0)==="/",Pt=ze.host||ze.pathname&&ze.pathname.charAt(0)==="/",gt=Pt||mt||Xe.host&&ze.pathname,Ft=gt,Ht=Xe.pathname&&Xe.pathname.split("/")||[],hn=ze.pathname&&ze.pathname.split("/")||[],Jt=Xe.protocol&&!Ae[Xe.protocol];if(Jt&&(Xe.hostname="",Xe.port=null,Xe.host&&(Ht[0]===""?Ht[0]=Xe.host:Ht.unshift(Xe.host)),Xe.host="",ze.protocol&&(ze.hostname=null,ze.port=null,ze.host&&(hn[0]===""?hn[0]=ze.host:hn.unshift(ze.host)),ze.host=null),gt=gt&&(hn[0]===""||Ht[0]==="")),Pt)Xe.host=ze.host||ze.host===""?ze.host:Xe.host,Xe.hostname=ze.hostname||ze.hostname===""?ze.hostname:Xe.hostname,Xe.search=ze.search,Xe.query=ze.query,Ht=hn;else if(hn.length)Ht||(Ht=[]),Ht.pop(),Ht=Ht.concat(hn),Xe.search=ze.search,Xe.query=ze.query;else if(!le.isNullOrUndefined(ze.search)){if(Jt){Xe.hostname=Xe.host=Ht.shift();var bn=!!(Xe.host&&Xe.host.indexOf("@")>0)&&Xe.host.split("@");bn&&(Xe.auth=bn.shift(),Xe.host=Xe.hostname=bn.shift())}return Xe.search=ze.search,Xe.query=ze.query,le.isNull(Xe.pathname)&&le.isNull(Xe.search)||(Xe.path=(Xe.pathname?Xe.pathname:"")+(Xe.search?Xe.search:"")),Xe.href=Xe.format(),Xe}if(!Ht.length)return Xe.pathname=null,Xe.search?Xe.path="/"+Xe.search:Xe.path=null,Xe.href=Xe.format(),Xe;for(var Wt=Ht.slice(-1)[0],Kt=(Xe.host||ze.host||Ht.length>1)&&(Wt==="."||Wt==="..")||Wt==="",Xt=0,$t=Ht.length;$t>=0;$t--)Wt=Ht[$t],Wt==="."?Ht.splice($t,1):Wt===".."?(Ht.splice($t,1),Xt++):Xt&&(Ht.splice($t,1),Xt--);if(!gt&&!Ft)for(;Xt--;Xt)Ht.unshift("..");!gt||Ht[0]===""||Ht[0]&&Ht[0].charAt(0)==="/"||Ht.unshift(""),Kt&&Ht.join("/").substr(-1)!=="/"&&Ht.push("");var kt=Ht[0]===""||Ht[0]&&Ht[0].charAt(0)==="/";if(Jt){Xe.hostname=Xe.host=kt?"":Ht.length?Ht.shift():"";var bn=!!(Xe.host&&Xe.host.indexOf("@")>0)&&Xe.host.split("@");bn&&(Xe.auth=bn.shift(),Xe.host=Xe.hostname=bn.shift())}return gt=gt||Xe.host&&Ht.length,gt&&!kt&&Ht.unshift(""),Ht.length?Xe.pathname=Ht.join("/"):(Xe.pathname=null,Xe.path=null),le.isNull(Xe.pathname)&&le.isNull(Xe.search)||(Xe.path=(Xe.pathname?Xe.pathname:"")+(Xe.search?Xe.search:"")),Xe.auth=ze.auth||Xe.auth,Xe.slashes=Xe.slashes||ze.slashes,Xe.href=Xe.format(),Xe},Ce.prototype.parseHost=function(){var ze=this.host,Ze=de.exec(ze);Ze&&(Ze=Ze[0],Ze!==":"&&(this.port=Ze.substr(1)),ze=ze.substr(0,ze.length-Ze.length)),ze&&(this.hostname=ze)}},{"./util":204,punycode:174,querystring:177}],204:[function(me,Be,ke){"use strict";Be.exports={isString:function(Ce){return typeof Ce=="string"},isObject:function(Ce){return typeof Ce=="object"&&Ce!==null},isNull:function(Ce){return Ce===null},isNullOrUndefined:function(Ce){return Ce==null}}},{}],205:[function(me,Be,ke){(function(Ce){function Le(ye,xe){function ge(){if(!le){if(he("throwDeprecation"))throw new Error(xe);he("traceDeprecation")?console.trace(xe):console.warn(xe),le=!0}return ye.apply(this,arguments)}if(he("noDeprecation"))return ye;var le=!1;return ge}function he(ye){try{if(!Ce.localStorage)return!1}catch(ge){return!1}var xe=Ce.localStorage[ye];return xe!=null&&String(xe).toLowerCase()==="true"}Be.exports=Le}).call(this,typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],206:[function(me,Be,ke){Be.exports=function(Ce){return Ce&&typeof Ce=="object"&&typeof Ce.copy=="function"&&typeof Ce.fill=="function"&&typeof Ce.readUInt8=="function"}},{}],207:[function(me,Be,ke){(function(Ce,Le){function he(ut,mt){var Pt={seen:[],stylize:xe};return arguments.length>=3&&(Pt.depth=arguments[2]),arguments.length>=4&&(Pt.colors=arguments[3]),ie(mt)?Pt.showHidden=mt:mt&&ke._extend(Pt,mt),Ae(Pt.showHidden)&&(Pt.showHidden=!1),Ae(Pt.depth)&&(Pt.depth=2),Ae(Pt.colors)&&(Pt.colors=!1),Ae(Pt.customInspect)&&(Pt.customInspect=!0),Pt.colors&&(Pt.stylize=ye),le(Pt,ut,Pt.depth)}function ye(ut,mt){var Pt=he.styles[mt];return Pt?"\x1B["+he.colors[Pt][0]+"m"+ut+"\x1B["+he.colors[Pt][1]+"m":ut}function xe(ut,mt){return ut}function ge(ut){var mt={};return ut.forEach(function(Pt,gt){mt[Pt]=!0}),mt}function le(ut,mt,Pt){if(ut.customInspect&&mt&&Ge(mt.inspect)&&mt.inspect!==ke.inspect&&(!mt.constructor||mt.constructor.prototype!==mt)){var gt=mt.inspect(Pt,ut);return we(gt)||(gt=le(ut,gt,Pt)),gt}var Ft=ve(ut,mt);if(Ft)return Ft;var Ht=Object.keys(mt),hn=ge(Ht);if(ut.showHidden&&(Ht=Object.getOwnPropertyNames(mt)),Xe(mt)&&(Ht.indexOf("message")>=0||Ht.indexOf("description")>=0))return de(mt);if(Ht.length===0){if(Ge(mt)){var Jt=mt.name?": "+mt.name:"";return ut.stylize("[Function"+Jt+"]","special")}if(De(mt))return ut.stylize(RegExp.prototype.toString.call(mt),"regexp");if(Ze(mt))return ut.stylize(Date.prototype.toString.call(mt),"date");if(Xe(mt))return de(mt)}var bn="",Wt=!1,Kt=["{","}"];if(oe(mt)&&(Wt=!0,Kt=["[","]"]),Ge(mt)&&(bn=" [Function"+(mt.name?": "+mt.name:"")+"]"),De(mt)&&(bn=" "+RegExp.prototype.toString.call(mt)),Ze(mt)&&(bn=" "+Date.prototype.toUTCString.call(mt)),Xe(mt)&&(bn=" "+de(mt)),Ht.length===0&&(!Wt||mt.length==0))return Kt[0]+bn+Kt[1];if(Pt<0)return De(mt)?ut.stylize(RegExp.prototype.toString.call(mt),"regexp"):ut.stylize("[Object]","special");ut.seen.push(mt);var Xt;return Xt=Wt?ce(ut,mt,Pt,hn,Ht):Ht.map(function($t){return z(ut,mt,Pt,hn,$t,Wt)}),ut.seen.pop(),ee(Xt,bn,Kt)}function ve(ut,mt){if(Ae(mt))return ut.stylize("undefined","undefined");if(we(mt)){var Pt="'"+JSON.stringify(mt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ut.stylize(Pt,"string")}return Se(mt)?ut.stylize(""+mt,"number"):ie(mt)?ut.stylize(""+mt,"boolean"):se(mt)?ut.stylize("null","null"):void 0}function de(ut){return"["+Error.prototype.toString.call(ut)+"]"}function ce(ut,mt,Pt,gt,Ft){for(var Ht=[],hn=0,Jt=mt.length;hn<Jt;++hn)yt(mt,String(hn))?Ht.push(z(ut,mt,Pt,gt,String(hn),!0)):Ht.push("");return Ft.forEach(function(bn){bn.match(/^\d+$/)||Ht.push(z(ut,mt,Pt,gt,bn,!0))}),Ht}function z(ut,mt,Pt,gt,Ft,Ht){var hn,Jt,bn;if(bn=Object.getOwnPropertyDescriptor(mt,Ft)||{value:mt[Ft]},bn.get?Jt=bn.set?ut.stylize("[Getter/Setter]","special"):ut.stylize("[Getter]","special"):bn.set&&(Jt=ut.stylize("[Setter]","special")),yt(gt,Ft)||(hn="["+Ft+"]"),Jt||(ut.seen.indexOf(bn.value)<0?(Jt=se(Pt)?le(ut,bn.value,null):le(ut,bn.value,Pt-1),Jt.indexOf(`
|
|
|
`)>-1&&(Jt=Ht?Jt.split(`
|
|
|
`).map(function(Wt){return" "+Wt}).join(`
|
|
|
`).substr(2):`
|
|
|
`+Jt.split(`
|
|
|
`).map(function(Wt){return" "+Wt}).join(`
|
|
|
`))):Jt=ut.stylize("[Circular]","special")),Ae(hn)){if(Ht&&Ft.match(/^\d+$/))return Jt;hn=JSON.stringify(""+Ft),hn.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(hn=hn.substr(1,hn.length-2),hn=ut.stylize(hn,"name")):(hn=hn.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),hn=ut.stylize(hn,"string"))}return hn+": "+Jt}function ee(ut,mt,Pt){var gt=0;return ut.reduce(function(Ft,Ht){return gt++,Ht.indexOf(`
|
|
|
`)>=0&>++,Ft+Ht.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?Pt[0]+(mt===""?"":mt+`
|
|
|
`)+" "+ut.join(`,
|
|
|
`)+" "+Pt[1]:Pt[0]+mt+" "+ut.join(", ")+" "+Pt[1]}function oe(ut){return Array.isArray(ut)}function ie(ut){return typeof ut=="boolean"}function se(ut){return ut===null}function ue(ut){return ut==null}function Se(ut){return typeof ut=="number"}function we(ut){return typeof ut=="string"}function Pe(ut){return typeof ut=="symbol"}function Ae(ut){return ut===void 0}function De(ut){return ze(ut)&&at(ut)==="[object RegExp]"}function ze(ut){return typeof ut=="object"&&ut!==null}function Ze(ut){return ze(ut)&&at(ut)==="[object Date]"}function Xe(ut){return ze(ut)&&(at(ut)==="[object Error]"||ut instanceof Error)}function Ge(ut){return typeof ut=="function"}function ft(ut){return ut===null||typeof ut=="boolean"||typeof ut=="number"||typeof ut=="string"||typeof ut=="symbol"||ut===void 0}function at(ut){return Object.prototype.toString.call(ut)}function Ct(ut){return ut<10?"0"+ut.toString(10):ut.toString(10)}function et(){var ut=new Date,mt=[Ct(ut.getHours()),Ct(ut.getMinutes()),Ct(ut.getSeconds())].join(":");return[ut.getDate(),tt[ut.getMonth()],mt].join(" ")}function yt(ut,mt){return Object.prototype.hasOwnProperty.call(ut,mt)}var st=/%[sdj%]/g;ke.format=function(ut){if(!we(ut)){for(var mt=[],Pt=0;Pt<arguments.length;Pt++)mt.push(he(arguments[Pt]));return mt.join(" ")}for(var Pt=1,gt=arguments,Ft=gt.length,Ht=String(ut).replace(st,function(bn){if(bn==="%%")return"%";if(Pt>=Ft)return bn;switch(bn){case"%s":return String(gt[Pt++]);case"%d":return Number(gt[Pt++]);case"%j":try{return JSON.stringify(gt[Pt++])}catch(Wt){return"[Circular]"}default:return bn}}),hn=gt[Pt];Pt<Ft;hn=gt[++Pt])se(hn)||!ze(hn)?Ht+=" "+hn:Ht+=" "+he(hn);return Ht},ke.deprecate=function(ut,mt){function Pt(){if(!gt){if(Ce.throwDeprecation)throw new Error(mt);Ce.traceDeprecation?console.trace(mt):console.error(mt),gt=!0}return ut.apply(this,arguments)}if(Ae(Le.process))return function(){return ke.deprecate(ut,mt).apply(this,arguments)};if(Ce.noDeprecation===!0)return ut;var gt=!1;return Pt};var zt,lt={};ke.debuglog=function(ut){if(Ae(zt)&&(zt=Ce.env.NODE_DEBUG||""),ut=ut.toUpperCase(),!lt[ut])if(new RegExp("\\b"+ut+"\\b","i").test(zt)){var mt=Ce.pid;lt[ut]=function(){var Pt=ke.format.apply(ke,arguments);console.error("%s %d: %s",ut,mt,Pt)}}else lt[ut]=function(){};return lt[ut]},ke.inspect=he,he.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},he.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},ke.isArray=oe,ke.isBoolean=ie,ke.isNull=se,ke.isNullOrUndefined=ue,ke.isNumber=Se,ke.isString=we,ke.isSymbol=Pe,ke.isUndefined=Ae,ke.isRegExp=De,ke.isObject=ze,ke.isDate=Ze,ke.isError=Xe,ke.isFunction=Ge,ke.isPrimitive=ft,ke.isBuffer=me("./support/isBuffer");var tt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];ke.log=function(){console.log("%s - %s",et(),ke.format.apply(ke,arguments))},ke.inherits=me("inherits"),ke._extend=function(ut,mt){if(!mt||!ze(mt))return ut;for(var Pt=Object.keys(mt),gt=Pt.length;gt--;)ut[Pt[gt]]=mt[Pt[gt]];return ut}}).call(this,me("_process"),typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":206,_process:173,inherits:162}],208:[function(me,Be,ke){"use strict";(function(){ke.stripBOM=function(Ce){return Ce[0]==="\uFEFF"?Ce.substring(1):Ce}}).call(void 0)},{}],209:[function(me,Be,ke){"use strict";function Ce(ge){return ge&&ge.__esModule?ge:{default:ge}}var Le=me("babel-runtime/helpers/typeof"),he=Ce(Le),ye=me("babel-runtime/core-js/object/keys"),xe=Ce(ye);(function(){var ge,le,ve,de,ce,z={}.hasOwnProperty;ge=me("xmlbuilder"),le=me("./defaults").defaults,de=function(ee){return typeof ee=="string"&&(ee.indexOf("&")>=0||ee.indexOf(">")>=0||ee.indexOf("<")>=0)},ce=function(ee){return"<![CDATA["+ve(ee)+"]]>"},ve=function(ee){return ee.replace("]]>","]]]]><![CDATA[>")},ke.Builder=function(){function ee(oe){var ie,se,ue;this.options={},se=le[.2];for(ie in se)z.call(se,ie)&&(ue=se[ie],this.options[ie]=ue);for(ie in oe)z.call(oe,ie)&&(ue=oe[ie],this.options[ie]=ue)}return ee.prototype.buildObject=function(oe){var ie,se,ue,Se,we;return ie=this.options.attrkey,se=this.options.charkey,(0,xe.default)(oe).length===1&&this.options.rootName===le[.2].rootName?(we=(0,xe.default)(oe)[0],oe=oe[we]):we=this.options.rootName,ue=function(Pe){return function(Ae,De){var ze,Ze,Xe,Ge,ft,at;if((De===void 0?"undefined":(0,he.default)(De))!=="object")Pe.options.cdata&&de(De)?Ae.raw(ce(De)):Ae.txt(De);else if(Array.isArray(De)){for(Ge in De)if(z.call(De,Ge)){Ze=De[Ge];for(ft in Ze)Xe=Ze[ft],Ae=ue(Ae.ele(ft),Xe).up()}}else for(ft in De)if(z.call(De,ft))if(Ze=De[ft],ft===ie){if((Ze===void 0?"undefined":(0,he.default)(Ze))==="object")for(ze in Ze)at=Ze[ze],Ae=Ae.att(ze,at)}else if(ft===se)Ae=Pe.options.cdata&&de(Ze)?Ae.raw(ce(Ze)):Ae.txt(Ze);else if(Array.isArray(Ze))for(Ge in Ze)z.call(Ze,Ge)&&(Xe=Ze[Ge],Ae=typeof Xe=="string"?Pe.options.cdata&&de(Xe)?Ae.ele(ft).raw(ce(Xe)).up():Ae.ele(ft,Xe).up():ue(Ae.ele(ft),Xe).up());else(Ze===void 0?"undefined":(0,he.default)(Ze))==="object"?Ae=ue(Ae.ele(ft),Ze).up():typeof Ze=="string"&&Pe.options.cdata&&de(Ze)?Ae=Ae.ele(ft).raw(ce(Ze)).up():(Ze==null&&(Ze=""),Ae=Ae.ele(ft,Ze.toString()).up());return Ae}}(this),Se=ge.create(we,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),ue(Se,oe).end(this.options.renderOpts)},ee}()}).call(void 0)},{"./defaults":210,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,xmlbuilder:235}],210:[function(me,Be,ke){"use strict";(function(){ke.defaults={.1:{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
|
|
|
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],211:[function(me,Be,ke){"use strict";function Ce(ve){return ve&&ve.__esModule?ve:{default:ve}}var Le=me("babel-runtime/core-js/object/get-own-property-names"),he=Ce(Le),ye=me("babel-runtime/core-js/object/keys"),xe=Ce(ye),ge=me("babel-runtime/helpers/typeof"),le=Ce(ge);(function(){var ve,de,ce,z,ee,oe,ie,se,ue=function(Pe,Ae){return function(){return Pe.apply(Ae,arguments)}},Se=function(Pe,Ae){function De(){this.constructor=Pe}for(var ze in Ae)we.call(Ae,ze)&&(Pe[ze]=Ae[ze]);return De.prototype=Ae.prototype,Pe.prototype=new De,Pe.__super__=Ae.prototype,Pe},we={}.hasOwnProperty;ie=me("sax"),ce=me("events"),ve=me("./bom"),oe=me("./processors"),se=me("timers").setImmediate,de=me("./defaults").defaults,z=function(Pe){return(Pe===void 0?"undefined":(0,le.default)(Pe))==="object"&&Pe!=null&&(0,xe.default)(Pe).length===0},ee=function(Pe,Ae,De){var ze,Ze,Xe;for(ze=0,Ze=Pe.length;ze<Ze;ze++)Xe=Pe[ze],Ae=Xe(Ae,De);return Ae},ke.Parser=function(Pe){function Ae(De){this.parseString=ue(this.parseString,this),this.reset=ue(this.reset,this),this.assignOrPush=ue(this.assignOrPush,this),this.processAsync=ue(this.processAsync,this);var ze,Ze,Xe;if(!(this instanceof ke.Parser))return new ke.Parser(De);this.options={},Ze=de[.2];for(ze in Ze)we.call(Ze,ze)&&(Xe=Ze[ze],this.options[ze]=Xe);for(ze in De)we.call(De,ze)&&(Xe=De[ze],this.options[ze]=Xe);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(oe.normalize)),this.reset()}return Se(Ae,Pe),Ae.prototype.processAsync=function(){var De,ze;try{return this.remaining.length<=this.options.chunkSize?(De=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(De),this.saxParser.close()):(De=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(De),se(this.processAsync))}catch(Ze){if(ze=Ze,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(ze)}},Ae.prototype.assignOrPush=function(De,ze,Ze){return ze in De?(De[ze]instanceof Array||(De[ze]=[De[ze]]),De[ze].push(Ze)):this.options.explicitArray?De[ze]=[Ze]:De[ze]=Ze},Ae.prototype.reset=function(){var De,ze,Ze,Xe;return this.removeAllListeners(),this.saxParser=ie.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(Ge){return function(ft){if(Ge.saxParser.resume(),!Ge.saxParser.errThrown)return Ge.saxParser.errThrown=!0,Ge.emit("error",ft)}}(this),this.saxParser.onend=function(Ge){return function(){if(!Ge.saxParser.ended)return Ge.saxParser.ended=!0,Ge.emit("end",Ge.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,Xe=[],De=this.options.attrkey,ze=this.options.charkey,this.saxParser.onopentag=function(Ge){return function(ft){var at,Ct,et,yt,st;if(et={},et[ze]="",!Ge.options.ignoreAttrs){st=ft.attributes;for(at in st)we.call(st,at)&&(De in et||Ge.options.mergeAttrs||(et[De]={}),Ct=Ge.options.attrValueProcessors?ee(Ge.options.attrValueProcessors,ft.attributes[at],at):ft.attributes[at],yt=Ge.options.attrNameProcessors?ee(Ge.options.attrNameProcessors,at):at,Ge.options.mergeAttrs?Ge.assignOrPush(et,yt,Ct):et[De][yt]=Ct)}return et["#name"]=Ge.options.tagNameProcessors?ee(Ge.options.tagNameProcessors,ft.name):ft.name,Ge.options.xmlns&&(et[Ge.options.xmlnskey]={uri:ft.uri,local:ft.local}),Xe.push(et)}}(this),this.saxParser.onclosetag=function(Ge){return function(){var ft,at,Ct,et,yt,st,zt,lt,tt,ut;if(st=Xe.pop(),yt=st["#name"],Ge.options.explicitChildren&&Ge.options.preserveChildrenOrder||delete st["#name"],st.cdata===!0&&(ft=st.cdata,delete st.cdata),tt=Xe[Xe.length-1],st[ze].match(/^\s*$/)&&!ft?(at=st[ze],delete st[ze]):(Ge.options.trim&&(st[ze]=st[ze].trim()),Ge.options.normalize&&(st[ze]=st[ze].replace(/\s{2,}/g," ").trim()),st[ze]=Ge.options.valueProcessors?ee(Ge.options.valueProcessors,st[ze],yt):st[ze],(0,xe.default)(st).length===1&&ze in st&&!Ge.EXPLICIT_CHARKEY&&(st=st[ze])),z(st)&&(st=Ge.options.emptyTag!==""?Ge.options.emptyTag:at),Ge.options.validator!=null&&(ut="/"+function(){var mt,Pt,gt;for(gt=[],mt=0,Pt=Xe.length;mt<Pt;mt++)et=Xe[mt],gt.push(et["#name"]);return gt}().concat(yt).join("/"),function(){var mt;try{st=Ge.options.validator(ut,tt&&tt[yt],st)}catch(Pt){return mt=Pt,Ge.emit("error",mt)}}()),Ge.options.explicitChildren&&!Ge.options.mergeAttrs&&(st===void 0?"undefined":(0,le.default)(st))==="object")if(Ge.options.preserveChildrenOrder){if(tt){tt[Ge.options.childkey]=tt[Ge.options.childkey]||[],zt={};for(Ct in st)we.call(st,Ct)&&(zt[Ct]=st[Ct]);tt[Ge.options.childkey].push(zt),delete st["#name"],(0,xe.default)(st).length===1&&ze in st&&!Ge.EXPLICIT_CHARKEY&&(st=st[ze])}}else et={},Ge.options.attrkey in st&&(et[Ge.options.attrkey]=st[Ge.options.attrkey],delete st[Ge.options.attrkey]),!Ge.options.charsAsChildren&&Ge.options.charkey in st&&(et[Ge.options.charkey]=st[Ge.options.charkey],delete st[Ge.options.charkey]),(0,he.default)(st).length>0&&(et[Ge.options.childkey]=st),st=et;return Xe.length>0?Ge.assignOrPush(tt,yt,st):(Ge.options.explicitRoot&&(lt=st,st={},st[yt]=lt),Ge.resultObject=st,Ge.saxParser.ended=!0,Ge.emit("end",Ge.resultObject))}}(this),Ze=function(Ge){return function(ft){var at,Ct;if(Ct=Xe[Xe.length-1])return Ct[ze]+=ft,Ge.options.explicitChildren&&Ge.options.preserveChildrenOrder&&Ge.options.charsAsChildren&&(Ge.options.includeWhiteChars||ft.replace(/\\n/g,"").trim()!=="")&&(Ct[Ge.options.childkey]=Ct[Ge.options.childkey]||[],at={"#name":"__text__"},at[ze]=ft,Ge.options.normalize&&(at[ze]=at[ze].replace(/\s{2,}/g," ").trim()),Ct[Ge.options.childkey].push(at)),Ct}}(this),this.saxParser.ontext=Ze,this.saxParser.oncdata=function(Ge){return function(ft){var at;if(at=Ze(ft))return at.cdata=!0}}()},Ae.prototype.parseString=function(De,ze){var Ze;ze!=null&&typeof ze=="function"&&(this.on("end",function(Xe){return this.reset(),ze(null,Xe)}),this.on("error",function(Xe){return this.reset(),ze(Xe)}));try{return De=De.toString(),De.trim()===""?(this.emit("end",null),!0):(De=ve.stripBOM(De),this.options.async?(this.remaining=De,se(this.processAsync),this.saxParser):this.saxParser.write(De).close())}catch(Xe){if(Ze=Xe,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",Ze),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw Ze}},Ae}(ce.EventEmitter),ke.parseString=function(Pe,Ae,De){var ze,Ze,Xe;return De!=null?(typeof De=="function"&&(ze=De),(Ae===void 0?"undefined":(0,le.default)(Ae))==="object"&&(Ze=Ae)):(typeof Ae=="function"&&(ze=Ae),Ze={}),Xe=new ke.Parser(Ze),Xe.parseString(Pe,ze)}}).call(void 0)},{"./bom":208,"./defaults":210,"./processors":212,"babel-runtime/core-js/object/get-own-property-names":21,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,events:158,sax:194,timers:201}],212:[function(me,Be,ke){"use strict";(function(){var Ce;Ce=new RegExp(/(?!xmlns)^.*:/),ke.normalize=function(Le){return Le.toLowerCase()},ke.firstCharLowerCase=function(Le){return Le.charAt(0).toLowerCase()+Le.slice(1)},ke.stripPrefix=function(Le){return Le.replace(Ce,"")},ke.parseNumbers=function(Le){return isNaN(Le)||(Le=Le%1==0?parseInt(Le,10):parseFloat(Le)),Le},ke.parseBooleans=function(Le){return/^(?:true|false)$/i.test(Le)&&(Le=Le.toLowerCase()==="true"),Le}}).call(void 0)},{}],213:[function(me,Be,ke){"use strict";(function(){var Ce,Le,he,ye,xe=function(le,ve){function de(){this.constructor=le}for(var ce in ve)ge.call(ve,ce)&&(le[ce]=ve[ce]);return de.prototype=ve.prototype,le.prototype=new de,le.__super__=ve.prototype,le},ge={}.hasOwnProperty;Le=me("./defaults"),Ce=me("./builder"),he=me("./parser"),ye=me("./processors"),ke.defaults=Le.defaults,ke.processors=ye,ke.ValidationError=function(le){function ve(de){this.message=de}return xe(ve,le),ve}(Error),ke.Builder=Ce.Builder,ke.Parser=he.Parser,ke.parseString=he.parseString}).call(void 0)},{"./builder":209,"./defaults":210,"./parser":211,"./processors":212}],214:[function(me,Be,ke){"use strict";function Ce(ve){return ve&&ve.__esModule?ve:{default:ve}}var Le=me("babel-runtime/core-js/object/get-prototype-of"),he=Ce(Le),ye=me("babel-runtime/helpers/typeof"),xe=Ce(ye),ge=me("babel-runtime/core-js/object/assign"),le=Ce(ge);(function(){var ve,de,ce,z,ee,oe,ie=[].slice,se={}.hasOwnProperty;ve=function(){var ue,Se,we,Pe,Ae,De;if(De=arguments[0],Ae=2<=arguments.length?ie.call(arguments,1):[],z(le.default))le.default.apply(null,arguments);else for(ue=0,we=Ae.length;ue<we;ue++)if((Pe=Ae[ue])!=null)for(Se in Pe)se.call(Pe,Se)&&(De[Se]=Pe[Se]);return De},z=function(ue){return!!ue&&Object.prototype.toString.call(ue)==="[object Function]"},ee=function(ue){var Se;return!!ue&&((Se=ue===void 0?"undefined":(0,xe.default)(ue))==="function"||Se==="object")},de=function(ue){return z(Array.isArray)?Array.isArray(ue):Object.prototype.toString.call(ue)==="[object Array]"},ce=function(ue){var Se;if(de(ue))return!ue.length;for(Se in ue)if(se.call(ue,Se))return!1;return!0},oe=function(ue){var Se,we;return ee(ue)&&(we=(0,he.default)(ue))&&(Se=we.constructor)&&typeof Se=="function"&&Se instanceof Se&&Function.prototype.toString.call(Se)===Function.prototype.toString.call(Object)},Be.exports.assign=ve,Be.exports.isFunction=z,Be.exports.isObject=ee,Be.exports.isArray=de,Be.exports.isEmpty=ce,Be.exports.isPlainObject=oe}).call(void 0)},{"babel-runtime/core-js/object/assign":18,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/helpers/typeof":32}],215:[function(me,Be,ke){"use strict";var Ce=me("babel-runtime/core-js/object/create"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Ce);(function(){Be.exports=function(){function he(ye,xe,ge){if(this.options=ye.options,this.stringify=ye.stringify,xe==null)throw new Error("Missing attribute name of element "+ye.name);if(ge==null)throw new Error("Missing attribute value for attribute "+xe+" of element "+ye.name);this.name=this.stringify.attName(xe),this.value=this.stringify.attValue(ge)}return he.prototype.clone=function(){return(0,Le.default)(this)},he.prototype.toString=function(ye){return this.options.writer.set(ye).attribute(this)},he}()}).call(void 0)},{"babel-runtime/core-js/object/create":19}],216:[function(me,Be,ke){"use strict";var Ce=me("babel-runtime/core-js/object/create"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Ce);(function(){var he,ye=function(ge,le){function ve(){this.constructor=ge}for(var de in le)xe.call(le,de)&&(ge[de]=le[de]);return ve.prototype=le.prototype,ge.prototype=new ve,ge.__super__=le.prototype,ge},xe={}.hasOwnProperty;he=me("./XMLNode"),Be.exports=function(ge){function le(ve,de){if(le.__super__.constructor.call(this,ve),de==null)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(de)}return ye(le,ge),le.prototype.clone=function(){return(0,Le.default)(this)},le.prototype.toString=function(ve){return this.options.writer.set(ve).cdata(this)},le}(he)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],217:[function(me,Be,ke){"use strict";var Ce=me("babel-runtime/core-js/object/create"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Ce);(function(){var he,ye=function(ge,le){function ve(){this.constructor=ge}for(var de in le)xe.call(le,de)&&(ge[de]=le[de]);return ve.prototype=le.prototype,ge.prototype=new ve,ge.__super__=le.prototype,ge},xe={}.hasOwnProperty;he=me("./XMLNode"),Be.exports=function(ge){function le(ve,de){if(le.__super__.constructor.call(this,ve),de==null)throw new Error("Missing comment text");this.text=this.stringify.comment(de)}return ye(le,ge),le.prototype.clone=function(){return(0,Le.default)(this)},le.prototype.toString=function(ve){return this.options.writer.set(ve).comment(this)},le}(he)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],218:[function(me,Be,ke){"use strict";(function(){var Ce,Le=function(ye,xe){function ge(){this.constructor=ye}for(var le in xe)he.call(xe,le)&&(ye[le]=xe[le]);return ge.prototype=xe.prototype,ye.prototype=new ge,ye.__super__=xe.prototype,ye},he={}.hasOwnProperty;Ce=me("./XMLNode"),Be.exports=function(ye){function xe(ge,le,ve,de,ce,z){if(xe.__super__.constructor.call(this,ge),le==null)throw new Error("Missing DTD element name");if(ve==null)throw new Error("Missing DTD attribute name");if(!de)throw new Error("Missing DTD attribute type");if(!ce)throw new Error("Missing DTD attribute default");if(ce.indexOf("#")!==0&&(ce="#"+ce),!ce.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");if(z&&!ce.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT");this.elementName=this.stringify.eleName(le),this.attributeName=this.stringify.attName(ve),this.attributeType=this.stringify.dtdAttType(de),this.defaultValue=this.stringify.dtdAttDefault(z),this.defaultValueType=ce}return Le(xe,ye),xe.prototype.toString=function(ge){return this.options.writer.set(ge).dtdAttList(this)},xe}(Ce)}).call(void 0)},{"./XMLNode":227}],219:[function(me,Be,ke){"use strict";(function(){var Ce,Le=function(ye,xe){function ge(){this.constructor=ye}for(var le in xe)he.call(xe,le)&&(ye[le]=xe[le]);return ge.prototype=xe.prototype,ye.prototype=new ge,ye.__super__=xe.prototype,ye},he={}.hasOwnProperty;Ce=me("./XMLNode"),Be.exports=function(ye){function xe(ge,le,ve){if(xe.__super__.constructor.call(this,ge),le==null)throw new Error("Missing DTD element name");ve||(ve="(#PCDATA)"),Array.isArray(ve)&&(ve="("+ve.join(",")+")"),this.name=this.stringify.eleName(le),this.value=this.stringify.dtdElementValue(ve)}return Le(xe,ye),xe.prototype.toString=function(ge){return this.options.writer.set(ge).dtdElement(this)},xe}(Ce)}).call(void 0)},{"./XMLNode":227}],220:[function(me,Be,ke){"use strict";(function(){var Ce,Le,he=function(xe,ge){function le(){this.constructor=xe}for(var ve in ge)ye.call(ge,ve)&&(xe[ve]=ge[ve]);return le.prototype=ge.prototype,xe.prototype=new le,xe.__super__=ge.prototype,xe},ye={}.hasOwnProperty;Le=me("./Utility").isObject,Ce=me("./XMLNode"),Be.exports=function(xe){function ge(le,ve,de,ce){if(ge.__super__.constructor.call(this,le),de==null)throw new Error("Missing entity name");if(ce==null)throw new Error("Missing entity value");if(this.pe=!!ve,this.name=this.stringify.eleName(de),Le(ce)){if(!ce.pubID&&!ce.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(ce.pubID&&!ce.sysID)throw new Error("System identifier is required for a public external entity");if(ce.pubID!=null&&(this.pubID=this.stringify.dtdPubID(ce.pubID)),ce.sysID!=null&&(this.sysID=this.stringify.dtdSysID(ce.sysID)),ce.nData!=null&&(this.nData=this.stringify.dtdNData(ce.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}else this.value=this.stringify.dtdEntityValue(ce)}return he(ge,xe),ge.prototype.toString=function(le){return this.options.writer.set(le).dtdEntity(this)},ge}(Ce)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],221:[function(me,Be,ke){"use strict";(function(){var Ce,Le=function(ye,xe){function ge(){this.constructor=ye}for(var le in xe)he.call(xe,le)&&(ye[le]=xe[le]);return ge.prototype=xe.prototype,ye.prototype=new ge,ye.__super__=xe.prototype,ye},he={}.hasOwnProperty;Ce=me("./XMLNode"),Be.exports=function(ye){function xe(ge,le,ve){if(xe.__super__.constructor.call(this,ge),le==null)throw new Error("Missing notation name");if(!ve.pubID&&!ve.sysID)throw new Error("Public or system identifiers are required for an external entity");this.name=this.stringify.eleName(le),ve.pubID!=null&&(this.pubID=this.stringify.dtdPubID(ve.pubID)),ve.sysID!=null&&(this.sysID=this.stringify.dtdSysID(ve.sysID))}return Le(xe,ye),xe.prototype.toString=function(ge){return this.options.writer.set(ge).dtdNotation(this)},xe}(Ce)}).call(void 0)},{"./XMLNode":227}],222:[function(me,Be,ke){"use strict";(function(){var Ce,Le,he=function(xe,ge){function le(){this.constructor=xe}for(var ve in ge)ye.call(ge,ve)&&(xe[ve]=ge[ve]);return le.prototype=ge.prototype,xe.prototype=new le,xe.__super__=ge.prototype,xe},ye={}.hasOwnProperty;Le=me("./Utility").isObject,Ce=me("./XMLNode"),Be.exports=function(xe){function ge(le,ve,de,ce){var z;ge.__super__.constructor.call(this,le),Le(ve)&&(z=ve,ve=z.version,de=z.encoding,ce=z.standalone),ve||(ve="1.0"),this.version=this.stringify.xmlVersion(ve),de!=null&&(this.encoding=this.stringify.xmlEncoding(de)),ce!=null&&(this.standalone=this.stringify.xmlStandalone(ce))}return he(ge,xe),ge.prototype.toString=function(le){return this.options.writer.set(le).declaration(this)},ge}(Ce)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],223:[function(me,Be,ke){"use strict";(function(){var Ce,Le,he,ye,xe,ge,le=function(de,ce){function z(){this.constructor=de}for(var ee in ce)ve.call(ce,ee)&&(de[ee]=ce[ee]);return z.prototype=ce.prototype,de.prototype=new z,de.__super__=ce.prototype,de},ve={}.hasOwnProperty;ge=me("./Utility").isObject,xe=me("./XMLNode"),Ce=me("./XMLDTDAttList"),he=me("./XMLDTDEntity"),Le=me("./XMLDTDElement"),ye=me("./XMLDTDNotation"),Be.exports=function(de){function ce(z,ee,oe){var ie,se;ce.__super__.constructor.call(this,z),this.documentObject=z,ge(ee)&&(ie=ee,ee=ie.pubID,oe=ie.sysID),oe==null&&(se=[ee,oe],oe=se[0],ee=se[1]),ee!=null&&(this.pubID=this.stringify.dtdPubID(ee)),oe!=null&&(this.sysID=this.stringify.dtdSysID(oe))}return le(ce,de),ce.prototype.element=function(z,ee){var oe;return oe=new Le(this,z,ee),this.children.push(oe),this},ce.prototype.attList=function(z,ee,oe,ie,se){var ue;return ue=new Ce(this,z,ee,oe,ie,se),this.children.push(ue),this},ce.prototype.entity=function(z,ee){var oe;return oe=new he(this,!1,z,ee),this.children.push(oe),this},ce.prototype.pEntity=function(z,ee){var oe;return oe=new he(this,!0,z,ee),this.children.push(oe),this},ce.prototype.notation=function(z,ee){var oe;return oe=new ye(this,z,ee),this.children.push(oe),this},ce.prototype.toString=function(z){return this.options.writer.set(z).docType(this)},ce.prototype.ele=function(z,ee){return this.element(z,ee)},ce.prototype.att=function(z,ee,oe,ie,se){return this.attList(z,ee,oe,ie,se)},ce.prototype.ent=function(z,ee){return this.entity(z,ee)},ce.prototype.pent=function(z,ee){return this.pEntity(z,ee)},ce.prototype.not=function(z,ee){return this.notation(z,ee)},ce.prototype.up=function(){return this.root()||this.documentObject},ce}(xe)}).call(void 0)},{"./Utility":214,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLNode":227}],224:[function(me,Be,ke){"use strict";(function(){var Ce,Le,he,ye,xe=function(le,ve){function de(){this.constructor=le}for(var ce in ve)ge.call(ve,ce)&&(le[ce]=ve[ce]);return de.prototype=ve.prototype,le.prototype=new de,le.__super__=ve.prototype,le},ge={}.hasOwnProperty;ye=me("./Utility").isPlainObject,Ce=me("./XMLNode"),he=me("./XMLStringifier"),Le=me("./XMLStringWriter"),Be.exports=function(le){function ve(de){ve.__super__.constructor.call(this,null),de||(de={}),de.writer||(de.writer=new Le),this.options=de,this.stringify=new he(de),this.isDocument=!0}return xe(ve,le),ve.prototype.end=function(de){var ce;return de?ye(de)&&(ce=de,de=this.options.writer.set(ce)):de=this.options.writer,de.document(this)},ve.prototype.toString=function(de){return this.options.writer.set(de).document(this)},ve}(Ce)}).call(void 0)},{"./Utility":214,"./XMLNode":227,"./XMLStringWriter":231,"./XMLStringifier":232}],225:[function(me,Be,ke){"use strict";(function(){var Ce,Le,he,ye,xe,ge,le,ve,de,ce,z,ee,oe,ie,se,ue,Se,we,Pe,Ae={}.hasOwnProperty;Pe=me("./Utility"),Se=Pe.isObject,ue=Pe.isFunction,we=Pe.isPlainObject,ce=me("./XMLElement"),Le=me("./XMLCData"),he=me("./XMLComment"),ee=me("./XMLRaw"),se=me("./XMLText"),z=me("./XMLProcessingInstruction"),ve=me("./XMLDeclaration"),de=me("./XMLDocType"),ye=me("./XMLDTDAttList"),ge=me("./XMLDTDEntity"),xe=me("./XMLDTDElement"),le=me("./XMLDTDNotation"),Ce=me("./XMLAttribute"),ie=me("./XMLStringifier"),oe=me("./XMLStringWriter"),Be.exports=function(){function De(ze,Ze,Xe){var Ge;ze||(ze={}),ze.writer?we(ze.writer)&&(Ge=ze.writer,ze.writer=new oe(Ge)):ze.writer=new oe(ze),this.options=ze,this.writer=ze.writer,this.stringify=new ie(ze),this.onDataCallback=Ze||function(){},this.onEndCallback=Xe||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return De.prototype.node=function(ze,Ze,Xe){var Ge;if(ze==null)throw new Error("Missing node name");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node");return this.openCurrent(),ze=ze.valueOf(),Ze==null&&(Ze={}),Ze=Ze.valueOf(),Se(Ze)||(Ge=[Ze,Xe],Xe=Ge[0],Ze=Ge[1]),this.currentNode=new ce(this,ze,Ze),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,Xe!=null&&this.text(Xe),this},De.prototype.element=function(ze,Ze,Xe){return this.currentNode&&this.currentNode instanceof de?this.dtdElement.apply(this,arguments):this.node(ze,Ze,Xe)},De.prototype.attribute=function(ze,Ze){var Xe,Ge;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode");if(ze!=null&&(ze=ze.valueOf()),Se(ze))for(Xe in ze)Ae.call(ze,Xe)&&(Ge=ze[Xe],this.attribute(Xe,Ge));else ue(Ze)&&(Ze=Ze.apply()),this.options.skipNullAttributes&&Ze==null||(this.currentNode.attributes[ze]=new Ce(this,ze,Ze));return this},De.prototype.text=function(ze){var Ze;return this.openCurrent(),Ze=new se(this,ze),this.onData(this.writer.text(Ze,this.currentLevel+1)),this},De.prototype.cdata=function(ze){var Ze;return this.openCurrent(),Ze=new Le(this,ze),this.onData(this.writer.cdata(Ze,this.currentLevel+1)),this},De.prototype.comment=function(ze){var Ze;return this.openCurrent(),Ze=new he(this,ze),this.onData(this.writer.comment(Ze,this.currentLevel+1)),this},De.prototype.raw=function(ze){var Ze;return this.openCurrent(),Ze=new ee(this,ze),this.onData(this.writer.raw(Ze,this.currentLevel+1)),this},De.prototype.instruction=function(ze,Ze){var Xe,Ge,ft,at,Ct;if(this.openCurrent(),ze!=null&&(ze=ze.valueOf()),Ze!=null&&(Ze=Ze.valueOf()),Array.isArray(ze))for(Xe=0,at=ze.length;Xe<at;Xe++)Ge=ze[Xe],this.instruction(Ge);else if(Se(ze))for(Ge in ze)Ae.call(ze,Ge)&&(ft=ze[Ge],this.instruction(Ge,ft));else ue(Ze)&&(Ze=Ze.apply()),Ct=new z(this,ze,Ze),this.onData(this.writer.processingInstruction(Ct,this.currentLevel+1));return this},De.prototype.declaration=function(ze,Ze,Xe){var Ge;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node");return Ge=new ve(this,ze,Ze,Xe),this.onData(this.writer.declaration(Ge,this.currentLevel+1)),this},De.prototype.doctype=function(ze,Ze,Xe){if(this.openCurrent(),ze==null)throw new Error("Missing root node name");if(this.root)throw new Error("dtd() must come before the root node");return this.currentNode=new de(this,Ze,Xe),this.currentNode.rootNodeName=ze,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},De.prototype.dtdElement=function(ze,Ze){var Xe;return this.openCurrent(),Xe=new xe(this,ze,Ze),this.onData(this.writer.dtdElement(Xe,this.currentLevel+1)),this},De.prototype.attList=function(ze,Ze,Xe,Ge,ft){var at;return this.openCurrent(),at=new ye(this,ze,Ze,Xe,Ge,ft),this.onData(this.writer.dtdAttList(at,this.currentLevel+1)),this},De.prototype.entity=function(ze,Ze){var Xe;return this.openCurrent(),Xe=new ge(this,!1,ze,Ze),this.onData(this.writer.dtdEntity(Xe,this.currentLevel+1)),this},De.prototype.pEntity=function(ze,Ze){var Xe;return this.openCurrent(),Xe=new ge(this,!0,ze,Ze),this.onData(this.writer.dtdEntity(Xe,this.currentLevel+1)),this},De.prototype.notation=function(ze,Ze){var Xe;return this.openCurrent(),Xe=new le(this,ze,Ze),this.onData(this.writer.dtdNotation(Xe,this.currentLevel+1)),this},De.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},De.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},De.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},De.prototype.openNode=function(ze){if(!ze.isOpen)return!this.root&&this.currentLevel===0&&ze instanceof ce&&(this.root=ze),this.onData(this.writer.openNode(ze,this.currentLevel)),ze.isOpen=!0},De.prototype.closeNode=function(ze){if(!ze.isClosed)return this.onData(this.writer.closeNode(ze,this.currentLevel)),ze.isClosed=!0},De.prototype.onData=function(ze){return this.documentStarted=!0,this.onDataCallback(ze)},De.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},De.prototype.ele=function(){return this.element.apply(this,arguments)},De.prototype.nod=function(ze,Ze,Xe){return this.node(ze,Ze,Xe)},De.prototype.txt=function(ze){return this.text(ze)},De.prototype.dat=function(ze){return this.cdata(ze)},De.prototype.com=function(ze){return this.comment(ze)},De.prototype.ins=function(ze,Ze){return this.instruction(ze,Ze)},De.prototype.dec=function(ze,Ze,Xe){return this.declaration(ze,Ze,Xe)},De.prototype.dtd=function(ze,Ze,Xe){return this.doctype(ze,Ze,Xe)},De.prototype.e=function(ze,Ze,Xe){return this.element(ze,Ze,Xe)},De.prototype.n=function(ze,Ze,Xe){return this.node(ze,Ze,Xe)},De.prototype.t=function(ze){return this.text(ze)},De.prototype.d=function(ze){return this.cdata(ze)},De.prototype.c=function(ze){return this.comment(ze)},De.prototype.r=function(ze){return this.raw(ze)},De.prototype.i=function(ze,Ze){return this.instruction(ze,Ze)},De.prototype.att=function(){return this.currentNode&&this.currentNode instanceof de?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},De.prototype.a=function(){return this.currentNode&&this.currentNode instanceof de?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},De.prototype.ent=function(ze,Ze){return this.entity(ze,Ze)},De.prototype.pent=function(ze,Ze){return this.pEntity(ze,Ze)},De.prototype.not=function(ze,Ze){return this.notation(ze,Ze)},De}()}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLStringWriter":231,"./XMLStringifier":232,"./XMLText":233}],226:[function(me,Be,ke){"use strict";var Ce=me("babel-runtime/core-js/object/create"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Ce);(function(){var he,ye,xe,ge,le,ve=function(ce,z){function ee(){this.constructor=ce}for(var oe in z)de.call(z,oe)&&(ce[oe]=z[oe]);return ee.prototype=z.prototype,ce.prototype=new ee,ce.__super__=z.prototype,ce},de={}.hasOwnProperty;le=me("./Utility"),ge=le.isObject,xe=le.isFunction,ye=me("./XMLNode"),he=me("./XMLAttribute"),Be.exports=function(ce){function z(ee,oe,ie){if(z.__super__.constructor.call(this,ee),oe==null)throw new Error("Missing element name");this.name=this.stringify.eleName(oe),this.attributes={},ie!=null&&this.attribute(ie),ee.isDocument&&(this.isRoot=!0,this.documentObject=ee,ee.rootObject=this)}return ve(z,ce),z.prototype.clone=function(){var ee,oe,ie,se;ie=(0,Le.default)(this),ie.isRoot&&(ie.documentObject=null),ie.attributes={},se=this.attributes;for(oe in se)de.call(se,oe)&&(ee=se[oe],ie.attributes[oe]=ee.clone());return ie.children=[],this.children.forEach(function(ue){var Se;return Se=ue.clone(),Se.parent=ie,ie.children.push(Se)}),ie},z.prototype.attribute=function(ee,oe){var ie,se;if(ee!=null&&(ee=ee.valueOf()),ge(ee))for(ie in ee)de.call(ee,ie)&&(se=ee[ie],this.attribute(ie,se));else xe(oe)&&(oe=oe.apply()),this.options.skipNullAttributes&&oe==null||(this.attributes[ee]=new he(this,ee,oe));return this},z.prototype.removeAttribute=function(ee){var oe,ie,se;if(ee==null)throw new Error("Missing attribute name");if(ee=ee.valueOf(),Array.isArray(ee))for(ie=0,se=ee.length;ie<se;ie++)oe=ee[ie],delete this.attributes[oe];else delete this.attributes[ee];return this},z.prototype.toString=function(ee){return this.options.writer.set(ee).element(this)},z.prototype.att=function(ee,oe){return this.attribute(ee,oe)},z.prototype.a=function(ee,oe){return this.attribute(ee,oe)},z}(ye)}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLNode":227,"babel-runtime/core-js/object/create":19}],227:[function(me,Be,ke){"use strict";(function(){var Ce,Le,he,ye,xe,ge,le,ve,de,ce,z,ee,oe={}.hasOwnProperty;ee=me("./Utility"),z=ee.isObject,ce=ee.isFunction,de=ee.isEmpty,xe=null,Ce=null,Le=null,he=null,ye=null,le=null,ve=null,ge=null,Be.exports=function(){function ie(se){this.parent=se,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.children=[],xe||(xe=me("./XMLElement"),Ce=me("./XMLCData"),Le=me("./XMLComment"),he=me("./XMLDeclaration"),ye=me("./XMLDocType"),le=me("./XMLRaw"),ve=me("./XMLText"),ge=me("./XMLProcessingInstruction"))}return ie.prototype.element=function(se,ue,Se){var we,Pe,Ae,De,ze,Ze,Xe,Ge,ft,at;if(Ze=null,ue==null&&(ue={}),ue=ue.valueOf(),z(ue)||(ft=[ue,Se],Se=ft[0],ue=ft[1]),se!=null&&(se=se.valueOf()),Array.isArray(se))for(Ae=0,Xe=se.length;Ae<Xe;Ae++)Pe=se[Ae],Ze=this.element(Pe);else if(ce(se))Ze=this.element(se.apply());else if(z(se)){for(ze in se)if(oe.call(se,ze))if(at=se[ze],ce(at)&&(at=at.apply()),z(at)&&de(at)&&(at=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&ze.indexOf(this.stringify.convertAttKey)===0)Ze=this.attribute(ze.substr(this.stringify.convertAttKey.length),at);else if(!this.options.separateArrayItems&&Array.isArray(at))for(De=0,Ge=at.length;De<Ge;De++)Pe=at[De],we={},we[ze]=Pe,Ze=this.element(we);else z(at)?(Ze=this.element(ze),Ze.element(at)):Ze=this.element(ze,at)}else Ze=!this.options.ignoreDecorators&&this.stringify.convertTextKey&&se.indexOf(this.stringify.convertTextKey)===0?this.text(Se):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&se.indexOf(this.stringify.convertCDataKey)===0?this.cdata(Se):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&se.indexOf(this.stringify.convertCommentKey)===0?this.comment(Se):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&se.indexOf(this.stringify.convertRawKey)===0?this.raw(Se):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&se.indexOf(this.stringify.convertPIKey)===0?this.instruction(se.substr(this.stringify.convertPIKey.length),Se):this.node(se,ue,Se);if(Ze==null)throw new Error("Could not create any elements with: "+se);return Ze},ie.prototype.insertBefore=function(se,ue,Se){var we,Pe,Ae;if(this.isRoot)throw new Error("Cannot insert elements at root level");return Pe=this.parent.children.indexOf(this),Ae=this.parent.children.splice(Pe),we=this.parent.element(se,ue,Se),Array.prototype.push.apply(this.parent.children,Ae),we},ie.prototype.insertAfter=function(se,ue,Se){var we,Pe,Ae;if(this.isRoot)throw new Error("Cannot insert elements at root level");return Pe=this.parent.children.indexOf(this),Ae=this.parent.children.splice(Pe+1),we=this.parent.element(se,ue,Se),Array.prototype.push.apply(this.parent.children,Ae),we},ie.prototype.remove=function(){var se;if(this.isRoot)throw new Error("Cannot remove the root element");return se=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[se,se-se+1].concat([])),this.parent},ie.prototype.node=function(se,ue,Se){var we,Pe;return se!=null&&(se=se.valueOf()),ue||(ue={}),ue=ue.valueOf(),z(ue)||(Pe=[ue,Se],Se=Pe[0],ue=Pe[1]),we=new xe(this,se,ue),Se!=null&&we.text(Se),this.children.push(we),we},ie.prototype.text=function(se){var ue;return ue=new ve(this,se),this.children.push(ue),this},ie.prototype.cdata=function(se){var ue;return ue=new Ce(this,se),this.children.push(ue),this},ie.prototype.comment=function(se){var ue;return ue=new Le(this,se),this.children.push(ue),this},ie.prototype.commentBefore=function(se){var ue,Se;return ue=this.parent.children.indexOf(this),Se=this.parent.children.splice(ue),this.parent.comment(se),Array.prototype.push.apply(this.parent.children,Se),this},ie.prototype.commentAfter=function(se){var ue,Se;return ue=this.parent.children.indexOf(this),Se=this.parent.children.splice(ue+1),this.parent.comment(se),Array.prototype.push.apply(this.parent.children,Se),this},ie.prototype.raw=function(se){var ue;return ue=new le(this,se),this.children.push(ue),this},ie.prototype.instruction=function(se,ue){var Se,we,Pe,Ae,De;if(se!=null&&(se=se.valueOf()),ue!=null&&(ue=ue.valueOf()),Array.isArray(se))for(Ae=0,De=se.length;Ae<De;Ae++)Se=se[Ae],this.instruction(Se);else if(z(se))for(Se in se)oe.call(se,Se)&&(we=se[Se],this.instruction(Se,we));else ce(ue)&&(ue=ue.apply()),Pe=new ge(this,se,ue),this.children.push(Pe);return this},ie.prototype.instructionBefore=function(se,ue){var Se,we;return Se=this.parent.children.indexOf(this),we=this.parent.children.splice(Se),this.parent.instruction(se,ue),Array.prototype.push.apply(this.parent.children,we),this},ie.prototype.instructionAfter=function(se,ue){var Se,we;return Se=this.parent.children.indexOf(this),we=this.parent.children.splice(Se+1),this.parent.instruction(se,ue),Array.prototype.push.apply(this.parent.children,we),this},ie.prototype.declaration=function(se,ue,Se){var we,Pe;return we=this.document(),Pe=new he(we,se,ue,Se),we.children[0]instanceof he?we.children[0]=Pe:we.children.unshift(Pe),we.root()||we},ie.prototype.doctype=function(se,ue){var Se,we,Pe,Ae,De,ze,Ze,Xe,Ge,ft;for(we=this.document(),Pe=new ye(we,se,ue),Ge=we.children,Ae=De=0,Ze=Ge.length;De<Ze;Ae=++De)if((Se=Ge[Ae])instanceof ye)return we.children[Ae]=Pe,Pe;for(ft=we.children,Ae=ze=0,Xe=ft.length;ze<Xe;Ae=++ze)if(Se=ft[Ae],Se.isRoot)return we.children.splice(Ae,0,Pe),Pe;return we.children.push(Pe),Pe},ie.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},ie.prototype.root=function(){var se;for(se=this;se;){if(se.isDocument)return se.rootObject;if(se.isRoot)return se;se=se.parent}},ie.prototype.document=function(){var se;for(se=this;se;){if(se.isDocument)return se;se=se.parent}},ie.prototype.end=function(se){return this.document().end(se)},ie.prototype.prev=function(){var se;if((se=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node");return this.parent.children[se-1]},ie.prototype.next=function(){var se;if((se=this.parent.children.indexOf(this))===-1||se===this.parent.children.length-1)throw new Error("Already at the last node");return this.parent.children[se+1]},ie.prototype.importDocument=function(se){var ue;return ue=se.root().clone(),ue.parent=this,ue.isRoot=!1,this.children.push(ue),this},ie.prototype.ele=function(se,ue,Se){return this.element(se,ue,Se)},ie.prototype.nod=function(se,ue,Se){return this.node(se,ue,Se)},ie.prototype.txt=function(se){return this.text(se)},ie.prototype.dat=function(se){return this.cdata(se)},ie.prototype.com=function(se){return this.comment(se)},ie.prototype.ins=function(se,ue){return this.instruction(se,ue)},ie.prototype.doc=function(){return this.document()},ie.prototype.dec=function(se,ue,Se){return this.declaration(se,ue,Se)},ie.prototype.dtd=function(se,ue){return this.doctype(se,ue)},ie.prototype.e=function(se,ue,Se){return this.element(se,ue,Se)},ie.prototype.n=function(se,ue,Se){return this.node(se,ue,Se)},ie.prototype.t=function(se){return this.text(se)},ie.prototype.d=function(se){return this.cdata(se)},ie.prototype.c=function(se){return this.comment(se)},ie.prototype.r=function(se){return this.raw(se)},ie.prototype.i=function(se,ue){return this.instruction(se,ue)},ie.prototype.u=function(){return this.up()},ie.prototype.importXMLBuilder=function(se){return this.importDocument(se)},ie}()}).call(void 0)},{"./Utility":214,"./XMLCData":216,"./XMLComment":217,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233}],228:[function(me,Be,ke){"use strict";var Ce=me("babel-runtime/core-js/object/create"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Ce);(function(){var he,ye=function(ge,le){function ve(){this.constructor=ge}for(var de in le)xe.call(le,de)&&(ge[de]=le[de]);return ve.prototype=le.prototype,ge.prototype=new ve,ge.__super__=le.prototype,ge},xe={}.hasOwnProperty;he=me("./XMLNode"),Be.exports=function(ge){function le(ve,de,ce){if(le.__super__.constructor.call(this,ve),de==null)throw new Error("Missing instruction target");this.target=this.stringify.insTarget(de),ce&&(this.value=this.stringify.insValue(ce))}return ye(le,ge),le.prototype.clone=function(){return(0,Le.default)(this)},le.prototype.toString=function(ve){return this.options.writer.set(ve).processingInstruction(this)},le}(he)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],229:[function(me,Be,ke){"use strict";var Ce=me("babel-runtime/core-js/object/create"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Ce);(function(){var he,ye=function(ge,le){function ve(){this.constructor=ge}for(var de in le)xe.call(le,de)&&(ge[de]=le[de]);return ve.prototype=le.prototype,ge.prototype=new ve,ge.__super__=le.prototype,ge},xe={}.hasOwnProperty;he=me("./XMLNode"),Be.exports=function(ge){function le(ve,de){if(le.__super__.constructor.call(this,ve),de==null)throw new Error("Missing raw text");this.value=this.stringify.raw(de)}return ye(le,ge),le.prototype.clone=function(){return(0,Le.default)(this)},le.prototype.toString=function(ve){return this.options.writer.set(ve).raw(this)},le}(he)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],230:[function(me,Be,ke){"use strict";(function(){var Ce,Le,he,ye,xe,ge,le,ve,de,ce,z,ee,oe,ie=function(ue,Se){function we(){this.constructor=ue}for(var Pe in Se)se.call(Se,Pe)&&(ue[Pe]=Se[Pe]);return we.prototype=Se.prototype,ue.prototype=new we,ue.__super__=Se.prototype,ue},se={}.hasOwnProperty;le=me("./XMLDeclaration"),ve=me("./XMLDocType"),Ce=me("./XMLCData"),Le=me("./XMLComment"),de=me("./XMLElement"),z=me("./XMLRaw"),ee=me("./XMLText"),ce=me("./XMLProcessingInstruction"),he=me("./XMLDTDAttList"),ye=me("./XMLDTDElement"),xe=me("./XMLDTDEntity"),ge=me("./XMLDTDNotation"),oe=me("./XMLWriterBase"),Be.exports=function(ue){function Se(we,Pe){Se.__super__.constructor.call(this,Pe),this.stream=we}return ie(Se,ue),Se.prototype.document=function(we){var Pe,Ae,De,ze,Ze,Xe,Ge,ft;for(Xe=we.children,Ae=0,ze=Xe.length;Ae<ze;Ae++)Pe=Xe[Ae],Pe.isLastRootNode=!1;for(we.children[we.children.length-1].isLastRootNode=!0,Ge=we.children,ft=[],De=0,Ze=Ge.length;De<Ze;De++)switch(Pe=Ge[De],!1){case!(Pe instanceof le):ft.push(this.declaration(Pe));break;case!(Pe instanceof ve):ft.push(this.docType(Pe));break;case!(Pe instanceof Le):ft.push(this.comment(Pe));break;case!(Pe instanceof ce):ft.push(this.processingInstruction(Pe));break;default:ft.push(this.element(Pe))}return ft},Se.prototype.attribute=function(we){return this.stream.write(" "+we.name+'="'+we.value+'"')},Se.prototype.cdata=function(we,Pe){return this.stream.write(this.space(Pe)+"<![CDATA["+we.text+"]]>"+this.endline(we))},Se.prototype.comment=function(we,Pe){return this.stream.write(this.space(Pe)+"<!-- "+we.text+" -->"+this.endline(we))},Se.prototype.declaration=function(we,Pe){return this.stream.write(this.space(Pe)),this.stream.write('<?xml version="'+we.version+'"'),we.encoding!=null&&this.stream.write(' encoding="'+we.encoding+'"'),we.standalone!=null&&this.stream.write(' standalone="'+we.standalone+'"'),this.stream.write(this.spacebeforeslash+"?>"),this.stream.write(this.endline(we))},Se.prototype.docType=function(we,Pe){var Ae,De,ze,Ze;if(Pe||(Pe=0),this.stream.write(this.space(Pe)),this.stream.write("<!DOCTYPE "+we.root().name),we.pubID&&we.sysID?this.stream.write(' PUBLIC "'+we.pubID+'" "'+we.sysID+'"'):we.sysID&&this.stream.write(' SYSTEM "'+we.sysID+'"'),we.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(we)),Ze=we.children,De=0,ze=Ze.length;De<ze;De++)switch(Ae=Ze[De],!1){case!(Ae instanceof he):this.dtdAttList(Ae,Pe+1);break;case!(Ae instanceof ye):this.dtdElement(Ae,Pe+1);break;case!(Ae instanceof xe):this.dtdEntity(Ae,Pe+1);break;case!(Ae instanceof ge):this.dtdNotation(Ae,Pe+1);break;case!(Ae instanceof Ce):this.cdata(Ae,Pe+1);break;case!(Ae instanceof Le):this.comment(Ae,Pe+1);break;case!(Ae instanceof ce):this.processingInstruction(Ae,Pe+1);break;default:throw new Error("Unknown DTD node type: "+Ae.constructor.name)}this.stream.write("]")}return this.stream.write(this.spacebeforeslash+">"),this.stream.write(this.endline(we))},Se.prototype.element=function(we,Pe){var Ae,De,ze,Ze,Xe,Ge,ft,at;Pe||(Pe=0),at=this.space(Pe),this.stream.write(at+"<"+we.name),Ge=we.attributes;for(Xe in Ge)se.call(Ge,Xe)&&(Ae=Ge[Xe],this.attribute(Ae));if(we.children.length===0||we.children.every(function(Ct){return Ct.value===""}))this.allowEmpty?this.stream.write("></"+we.name+">"):this.stream.write(this.spacebeforeslash+"/>");else if(this.pretty&&we.children.length===1&&we.children[0].value!=null)this.stream.write(">"),this.stream.write(we.children[0].value),this.stream.write("</"+we.name+">");else{for(this.stream.write(">"+this.newline),ft=we.children,ze=0,Ze=ft.length;ze<Ze;ze++)switch(De=ft[ze],!1){case!(De instanceof Ce):this.cdata(De,Pe+1);break;case!(De instanceof Le):this.comment(De,Pe+1);break;case!(De instanceof de):this.element(De,Pe+1);break;case!(De instanceof z):this.raw(De,Pe+1);break;case!(De instanceof ee):this.text(De,Pe+1);break;case!(De instanceof ce):this.processingInstruction(De,Pe+1);break;default:throw new Error("Unknown XML node type: "+De.constructor.name)}this.stream.write(at+"</"+we.name+">")}return this.stream.write(this.endline(we))},Se.prototype.processingInstruction=function(we,Pe){return this.stream.write(this.space(Pe)+"<?"+we.target),we.value&&this.stream.write(" "+we.value),this.stream.write(this.spacebeforeslash+"?>"+this.endline(we))},Se.prototype.raw=function(we,Pe){return this.stream.write(this.space(Pe)+we.value+this.endline(we))},Se.prototype.text=function(we,Pe){return this.stream.write(this.space(Pe)+we.value+this.endline(we))},Se.prototype.dtdAttList=function(we,Pe){return this.stream.write(this.space(Pe)+"<!ATTLIST "+we.elementName+" "+we.attributeName+" "+we.attributeType),we.defaultValueType!=="#DEFAULT"&&this.stream.write(" "+we.defaultValueType),we.defaultValue&&this.stream.write(' "'+we.defaultValue+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(we))},Se.prototype.dtdElement=function(we,Pe){return this.stream.write(this.space(Pe)+"<!ELEMENT "+we.name+" "+we.value),this.stream.write(this.spacebeforeslash+">"+this.endline(we))},Se.prototype.dtdEntity=function(we,Pe){return this.stream.write(this.space(Pe)+"<!ENTITY"),we.pe&&this.stream.write(" %"),this.stream.write(" "+we.name),we.value?this.stream.write(' "'+we.value+'"'):(we.pubID&&we.sysID?this.stream.write(' PUBLIC "'+we.pubID+'" "'+we.sysID+'"'):we.sysID&&this.stream.write(' SYSTEM "'+we.sysID+'"'),we.nData&&this.stream.write(" NDATA "+we.nData)),this.stream.write(this.spacebeforeslash+">"+this.endline(we))},Se.prototype.dtdNotation=function(we,Pe){return this.stream.write(this.space(Pe)+"<!NOTATION "+we.name),we.pubID&&we.sysID?this.stream.write(' PUBLIC "'+we.pubID+'" "'+we.sysID+'"'):we.pubID?this.stream.write(' PUBLIC "'+we.pubID+'"'):we.sysID&&this.stream.write(' SYSTEM "'+we.sysID+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(we))},Se.prototype.endline=function(we){return we.isLastRootNode?"":this.newline},Se}(oe)}).call(void 0)},{"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233,"./XMLWriterBase":234}],231:[function(me,Be,ke){"use strict";(function(){var Ce,Le,he,ye,xe,ge,le,ve,de,ce,z,ee,oe,ie=function(ue,Se){function we(){this.constructor=ue}for(var Pe in Se)se.call(Se,Pe)&&(ue[Pe]=Se[Pe]);return we.prototype=Se.prototype,ue.prototype=new we,ue.__super__=Se.prototype,ue},se={}.hasOwnProperty;le=me("./XMLDeclaration"),ve=me("./XMLDocType"),Ce=me("./XMLCData"),Le=me("./XMLComment"),de=me("./XMLElement"),z=me("./XMLRaw"),ee=me("./XMLText"),ce=me("./XMLProcessingInstruction"),he=me("./XMLDTDAttList"),ye=me("./XMLDTDElement"),xe=me("./XMLDTDEntity"),ge=me("./XMLDTDNotation"),oe=me("./XMLWriterBase"),Be.exports=function(ue){function Se(we){Se.__super__.constructor.call(this,we)}return ie(Se,ue),Se.prototype.document=function(we){var Pe,Ae,De,ze,Ze;for(this.textispresent=!1,ze="",Ze=we.children,Ae=0,De=Ze.length;Ae<De;Ae++)Pe=Ze[Ae],ze+=function(){switch(!1){case!(Pe instanceof le):return this.declaration(Pe);case!(Pe instanceof ve):return this.docType(Pe);case!(Pe instanceof Le):return this.comment(Pe);case!(Pe instanceof ce):return this.processingInstruction(Pe);default:return this.element(Pe,0)}}.call(this);return this.pretty&&ze.slice(-this.newline.length)===this.newline&&(ze=ze.slice(0,-this.newline.length)),ze},Se.prototype.attribute=function(we){return" "+we.name+'="'+we.value+'"'},Se.prototype.cdata=function(we,Pe){return this.space(Pe)+"<![CDATA["+we.text+"]]>"+this.newline},Se.prototype.comment=function(we,Pe){return this.space(Pe)+"<!-- "+we.text+" -->"+this.newline},Se.prototype.declaration=function(we,Pe){var Ae;return Ae=this.space(Pe),Ae+='<?xml version="'+we.version+'"',we.encoding!=null&&(Ae+=' encoding="'+we.encoding+'"'),we.standalone!=null&&(Ae+=' standalone="'+we.standalone+'"'),Ae+=this.spacebeforeslash+"?>",Ae+=this.newline},Se.prototype.docType=function(we,Pe){var Ae,De,ze,Ze,Xe;if(Pe||(Pe=0),Ze=this.space(Pe),Ze+="<!DOCTYPE "+we.root().name,we.pubID&&we.sysID?Ze+=' PUBLIC "'+we.pubID+'" "'+we.sysID+'"':we.sysID&&(Ze+=' SYSTEM "'+we.sysID+'"'),we.children.length>0){for(Ze+=" [",Ze+=this.newline,Xe=we.children,De=0,ze=Xe.length;De<ze;De++)Ae=Xe[De],Ze+=function(){switch(!1){case!(Ae instanceof he):return this.dtdAttList(Ae,Pe+1);case!(Ae instanceof ye):return this.dtdElement(Ae,Pe+1);case!(Ae instanceof xe):return this.dtdEntity(Ae,Pe+1);case!(Ae instanceof ge):return this.dtdNotation(Ae,Pe+1);case!(Ae instanceof Ce):return this.cdata(Ae,Pe+1);case!(Ae instanceof Le):return this.comment(Ae,Pe+1);case!(Ae instanceof ce):return this.processingInstruction(Ae,Pe+1);default:throw new Error("Unknown DTD node type: "+Ae.constructor.name)}}.call(this);Ze+="]"}return Ze+=this.spacebeforeslash+">",Ze+=this.newline},Se.prototype.element=function(we,Pe){var Ae,De,ze,Ze,Xe,Ge,ft,at,Ct,et,yt,st,zt;Pe||(Pe=0),zt=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),st=this.space(Pe),at="",at+=st+"<"+we.name,Ct=we.attributes;for(ft in Ct)se.call(Ct,ft)&&(Ae=Ct[ft],at+=this.attribute(Ae));if(we.children.length===0||we.children.every(function(lt){return lt.value===""}))this.allowEmpty?at+="></"+we.name+">"+this.newline:at+=this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&we.children.length===1&&we.children[0].value!=null)at+=">",at+=we.children[0].value,at+="</"+we.name+">"+this.newline;else{if(this.dontprettytextnodes){for(et=we.children,ze=0,Xe=et.length;ze<Xe;ze++)if(De=et[ze],De.value!=null){this.textispresent++,zt=!0;break}}for(this.textispresent&&(this.newline="",this.pretty=!1,st=this.space(Pe)),at+=">"+this.newline,yt=we.children,Ze=0,Ge=yt.length;Ze<Ge;Ze++)De=yt[Ze],at+=function(){switch(!1){case!(De instanceof Ce):return this.cdata(De,Pe+1);case!(De instanceof Le):return this.comment(De,Pe+1);case!(De instanceof de):return this.element(De,Pe+1);case!(De instanceof z):return this.raw(De,Pe+1);case!(De instanceof ee):return this.text(De,Pe+1);case!(De instanceof ce):return this.processingInstruction(De,Pe+1);default:throw new Error("Unknown XML node type: "+De.constructor.name)}}.call(this);zt&&this.textispresent--,this.textispresent||(this.newline=this.newlinedefault,this.pretty=this.prettydefault),at+=st+"</"+we.name+">"+this.newline}return at},Se.prototype.processingInstruction=function(we,Pe){var Ae;return Ae=this.space(Pe)+"<?"+we.target,we.value&&(Ae+=" "+we.value),Ae+=this.spacebeforeslash+"?>"+this.newline},Se.prototype.raw=function(we,Pe){return this.space(Pe)+we.value+this.newline},Se.prototype.text=function(we,Pe){return this.space(Pe)+we.value+this.newline},Se.prototype.dtdAttList=function(we,Pe){var Ae;return Ae=this.space(Pe)+"<!ATTLIST "+we.elementName+" "+we.attributeName+" "+we.attributeType,we.defaultValueType!=="#DEFAULT"&&(Ae+=" "+we.defaultValueType),we.defaultValue&&(Ae+=' "'+we.defaultValue+'"'),Ae+=this.spacebeforeslash+">"+this.newline},Se.prototype.dtdElement=function(we,Pe){return this.space(Pe)+"<!ELEMENT "+we.name+" "+we.value+this.spacebeforeslash+">"+this.newline},Se.prototype.dtdEntity=function(we,Pe){var Ae;return Ae=this.space(Pe)+"<!ENTITY",we.pe&&(Ae+=" %"),Ae+=" "+we.name,we.value?Ae+=' "'+we.value+'"':(we.pubID&&we.sysID?Ae+=' PUBLIC "'+we.pubID+'" "'+we.sysID+'"':we.sysID&&(Ae+=' SYSTEM "'+we.sysID+'"'),we.nData&&(Ae+=" NDATA "+we.nData)),Ae+=this.spacebeforeslash+">"+this.newline},Se.prototype.dtdNotation=function(we,Pe){var Ae;return Ae=this.space(Pe)+"<!NOTATION "+we.name,we.pubID&&we.sysID?Ae+=' PUBLIC "'+we.pubID+'" "'+we.sysID+'"':we.pubID?Ae+=' PUBLIC "'+we.pubID+'"':we.sysID&&(Ae+=' SYSTEM "'+we.sysID+'"'),Ae+=this.spacebeforeslash+">"+this.newline},Se.prototype.openNode=function(we,Pe){var Ae,De,ze,Ze;if(Pe||(Pe=0),we instanceof de){ze=this.space(Pe)+"<"+we.name,Ze=we.attributes;for(De in Ze)se.call(Ze,De)&&(Ae=Ze[De],ze+=this.attribute(Ae));return ze+=(we.children?">":"/>")+this.newline}return ze=this.space(Pe)+"<!DOCTYPE "+we.rootNodeName,we.pubID&&we.sysID?ze+=' PUBLIC "'+we.pubID+'" "'+we.sysID+'"':we.sysID&&(ze+=' SYSTEM "'+we.sysID+'"'),ze+=(we.children?" [":">")+this.newline},Se.prototype.closeNode=function(we,Pe){switch(Pe||(Pe=0),!1){case!(we instanceof de):return this.space(Pe)+"</"+we.name+">"+this.newline;case!(we instanceof ve):return this.space(Pe)+"]>"+this.newline}},Se}(oe)}).call(void 0)},{"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233,"./XMLWriterBase":234}],232:[function(me,Be,ke){"use strict";(function(){var Ce=function(he,ye){return function(){return he.apply(ye,arguments)}},Le={}.hasOwnProperty;Be.exports=function(){function he(ye){this.assertLegalChar=Ce(this.assertLegalChar,this);var xe,ge,le;ye||(ye={}),this.noDoubleEncoding=ye.noDoubleEncoding,ge=ye.stringify||{};for(xe in ge)Le.call(ge,xe)&&(le=ge[xe],this[xe]=le)}return he.prototype.eleName=function(ye){return ye=""+ye||"",this.assertLegalChar(ye)},he.prototype.eleText=function(ye){return ye=""+ye||"",this.assertLegalChar(this.elEscape(ye))},he.prototype.cdata=function(ye){return ye=""+ye||"",ye=ye.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(ye)},he.prototype.comment=function(ye){if(ye=""+ye||"",ye.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+ye);return this.assertLegalChar(ye)},he.prototype.raw=function(ye){return""+ye||""},he.prototype.attName=function(ye){return ye=""+ye||""},he.prototype.attValue=function(ye){return ye=""+ye||"",this.attEscape(ye)},he.prototype.insTarget=function(ye){return""+ye||""},he.prototype.insValue=function(ye){if(ye=""+ye||"",ye.match(/\?>/))throw new Error("Invalid processing instruction value: "+ye);return ye},he.prototype.xmlVersion=function(ye){if(ye=""+ye||"",!ye.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+ye);return ye},he.prototype.xmlEncoding=function(ye){if(ye=""+ye||"",!ye.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+ye);return ye},he.prototype.xmlStandalone=function(ye){return ye?"yes":"no"},he.prototype.dtdPubID=function(ye){return""+ye||""},he.prototype.dtdSysID=function(ye){return""+ye||""},he.prototype.dtdElementValue=function(ye){return""+ye||""},he.prototype.dtdAttType=function(ye){return""+ye||""},he.prototype.dtdAttDefault=function(ye){return ye!=null?""+ye||"":ye},he.prototype.dtdEntityValue=function(ye){return""+ye||""},he.prototype.dtdNData=function(ye){return""+ye||""},he.prototype.convertAttKey="@",he.prototype.convertPIKey="?",he.prototype.convertTextKey="#text",he.prototype.convertCDataKey="#cdata",he.prototype.convertCommentKey="#comment",he.prototype.convertRawKey="#raw",he.prototype.assertLegalChar=function(ye){var xe;if(xe=ye.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+ye+" at index "+xe.index);return ye},he.prototype.elEscape=function(ye){var xe;return xe=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,ye.replace(xe,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
")},he.prototype.attEscape=function(ye){var xe;return xe=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,ye.replace(xe,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
")},he}()}).call(void 0)},{}],233:[function(me,Be,ke){"use strict";var Ce=me("babel-runtime/core-js/object/create"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Ce);(function(){var he,ye=function(ge,le){function ve(){this.constructor=ge}for(var de in le)xe.call(le,de)&&(ge[de]=le[de]);return ve.prototype=le.prototype,ge.prototype=new ve,ge.__super__=le.prototype,ge},xe={}.hasOwnProperty;he=me("./XMLNode"),Be.exports=function(ge){function le(ve,de){if(le.__super__.constructor.call(this,ve),de==null)throw new Error("Missing element text");this.value=this.stringify.eleText(de)}return ye(le,ge),le.prototype.clone=function(){return(0,Le.default)(this)},le.prototype.toString=function(ve){return this.options.writer.set(ve).text(this)},le}(he)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],234:[function(me,Be,ke){"use strict";(function(){var Ce={}.hasOwnProperty;Be.exports=function(){function Le(he){var ye,xe,ge,le,ve,de,ce,z,ee;he||(he={}),this.pretty=he.pretty||!1,this.allowEmpty=(xe=he.allowEmpty)!=null&&xe,this.pretty?(this.indent=(ge=he.indent)!=null?ge:" ",this.newline=(le=he.newline)!=null?le:`
|
|
|
`,this.offset=(ve=he.offset)!=null?ve:0,this.dontprettytextnodes=(de=he.dontprettytextnodes)!=null?de:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash=(ce=he.spacebeforeslash)!=null?ce:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,z=he.writer||{};for(ye in z)Ce.call(z,ye)&&(ee=z[ye],this[ye]=ee)}return Le.prototype.set=function(he){var ye,xe,ge;he||(he={}),"pretty"in he&&(this.pretty=he.pretty),"allowEmpty"in he&&(this.allowEmpty=he.allowEmpty),this.pretty?(this.indent="indent"in he?he.indent:" ",this.newline="newline"in he?he.newline:`
|
|
|
`,this.offset="offset"in he?he.offset:0,this.dontprettytextnodes="dontprettytextnodes"in he?he.dontprettytextnodes:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash="spacebeforeslash"in he?he.spacebeforeslash:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,xe=he.writer||{};for(ye in xe)Ce.call(xe,ye)&&(ge=xe[ye],this[ye]=ge);return this},Le.prototype.space=function(he){var ye;return this.pretty?(ye=(he||0)+this.offset+1,ye>0?new Array(ye).join(this.indent):""):""},Le}()}).call(void 0)},{}],235:[function(me,Be,ke){"use strict";(function(){var Ce,Le,he,ye,xe,ge,le;le=me("./Utility"),xe=le.assign,ge=le.isFunction,Ce=me("./XMLDocument"),Le=me("./XMLDocumentCB"),ye=me("./XMLStringWriter"),he=me("./XMLStreamWriter"),Be.exports.create=function(ve,de,ce,z){var ee,oe;if(ve==null)throw new Error("Root element needs a name");return z=xe({},de,ce,z),ee=new Ce(z),oe=ee.element(ve),z.headless||(ee.declaration(z),z.pubID==null&&z.sysID==null||ee.doctype(z)),oe},Be.exports.begin=function(ve,de,ce){var z;return ge(ve)&&(z=[ve,de],de=z[0],ce=z[1],ve={}),de?new Le(ve,de,ce):new Ce(ve)},Be.exports.stringWriter=function(ve){return new ye(ve)},Be.exports.streamWriter=function(ve,de){return new he(ve,de)}}).call(void 0)},{"./Utility":214,"./XMLDocument":224,"./XMLDocumentCB":225,"./XMLStreamWriter":230,"./XMLStringWriter":231}],236:[function(me,Be,ke){function Ce(){for(var he={},ye=0;ye<arguments.length;ye++){var xe=arguments[ye];for(var ge in xe)Le.call(xe,ge)&&(he[ge]=xe[ge])}return he}Be.exports=Ce;var Le=Object.prototype.hasOwnProperty},{}],237:[function(me,Be,ke){"use strict";function Ce(z,ee,oe){ye.isBuffer(ee)||(ee=new ye(ee)),ye.isBuffer(oe)||(oe=new ye(oe)),ee.length>de?ee=z(ee):ee.length<de&&(ee=ye.concat([ee,ce],de));for(var ie=new ye(de),se=new ye(de),ue=0;ue<de;ue++)ie[ue]=54^ee[ue],se[ue]=92^ee[ue];var Se=z(ye.concat([ie,oe]));return z(ye.concat([se,Se]))}function Le(z,ee){z=z||"sha1";var oe=ve[z],ie=[],se=0;return oe||he("algorithm:",z,"is not yet supported"),{update:function(ue){return ye.isBuffer(ue)||(ue=new ye(ue)),ie.push(ue),se+=ue.length,this},digest:function(ue){var Se=ye.concat(ie),we=ee?Ce(oe,ee,Se):oe(Se);return ie=null,ue?we.toString(ue):we}}}function he(){var z=[].slice.call(arguments).join(" ");throw new Error([z,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
|
`))}var ye=me("buffer").Buffer,xe=me("./sha"),ge=me("./sha256"),le=me("./md5"),ve={sha1:xe,sha256:ge,md5:le},de=64,ce=new ye(de);ce.fill(0),ke.createHash=function(z){return Le(z)},ke.createHmac=function(z,ee){return Le(z,ee)},function(z,ee){for(var oe in z)ee(z[oe],oe)}(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(z){ke[z]=function(){he("sorry,",z,"is not implemented yet")}})},{"./md5":239,"./sha":240,"./sha256":241,buffer:38}],238:[function(me,Be,ke){"use strict";function Ce(ve,de){if(ve.length%xe!=0){var ce=ve.length+(xe-ve.length%xe);ve=ye.concat([ve,ge],ce)}for(var z=[],ee=de?ve.readInt32BE:ve.readInt32LE,oe=0;oe<ve.length;oe+=xe)z.push(ee.call(ve,oe));return z}function Le(ve,de,ce){for(var z=new ye(de),ee=ce?z.writeInt32BE:z.writeInt32LE,oe=0;oe<ve.length;oe++)ee.call(z,ve[oe],4*oe,!0);return z}function he(ve,de,ce,z){return ye.isBuffer(ve)||(ve=new ye(ve)),Le(de(Ce(ve,z),ve.length*le),ce,z)}var ye=me("buffer").Buffer,xe=4,ge=new ye(xe);ge.fill(0);var le=8;Be.exports={hash:he}},{buffer:38}],239:[function(me,Be,ke){"use strict";function Ce(ce,z){ce[z>>5]|=128<<z%32,ce[14+(z+64>>>9<<4)]=z;for(var ee=1732584193,oe=-271733879,ie=-1732584194,se=271733878,ue=0;ue<ce.length;ue+=16){var Se=ee,we=oe,Pe=ie,Ae=se;ee=he(ee,oe,ie,se,ce[ue+0],7,-680876936),se=he(se,ee,oe,ie,ce[ue+1],12,-389564586),ie=he(ie,se,ee,oe,ce[ue+2],17,606105819),oe=he(oe,ie,se,ee,ce[ue+3],22,-1044525330),ee=he(ee,oe,ie,se,ce[ue+4],7,-176418897),se=he(se,ee,oe,ie,ce[ue+5],12,1200080426),ie=he(ie,se,ee,oe,ce[ue+6],17,-1473231341),oe=he(oe,ie,se,ee,ce[ue+7],22,-45705983),ee=he(ee,oe,ie,se,ce[ue+8],7,1770035416),se=he(se,ee,oe,ie,ce[ue+9],12,-1958414417),ie=he(ie,se,ee,oe,ce[ue+10],17,-42063),oe=he(oe,ie,se,ee,ce[ue+11],22,-1990404162),ee=he(ee,oe,ie,se,ce[ue+12],7,1804603682),se=he(se,ee,oe,ie,ce[ue+13],12,-40341101),ie=he(ie,se,ee,oe,ce[ue+14],17,-1502002290),oe=he(oe,ie,se,ee,ce[ue+15],22,1236535329),ee=ye(ee,oe,ie,se,ce[ue+1],5,-165796510),se=ye(se,ee,oe,ie,ce[ue+6],9,-1069501632),ie=ye(ie,se,ee,oe,ce[ue+11],14,643717713),oe=ye(oe,ie,se,ee,ce[ue+0],20,-373897302),ee=ye(ee,oe,ie,se,ce[ue+5],5,-701558691),se=ye(se,ee,oe,ie,ce[ue+10],9,38016083),ie=ye(ie,se,ee,oe,ce[ue+15],14,-660478335),oe=ye(oe,ie,se,ee,ce[ue+4],20,-405537848),ee=ye(ee,oe,ie,se,ce[ue+9],5,568446438),se=ye(se,ee,oe,ie,ce[ue+14],9,-1019803690),ie=ye(ie,se,ee,oe,ce[ue+3],14,-187363961),oe=ye(oe,ie,se,ee,ce[ue+8],20,1163531501),ee=ye(ee,oe,ie,se,ce[ue+13],5,-1444681467),se=ye(se,ee,oe,ie,ce[ue+2],9,-51403784),ie=ye(ie,se,ee,oe,ce[ue+7],14,1735328473),oe=ye(oe,ie,se,ee,ce[ue+12],20,-1926607734),ee=xe(ee,oe,ie,se,ce[ue+5],4,-378558),se=xe(se,ee,oe,ie,ce[ue+8],11,-2022574463),ie=xe(ie,se,ee,oe,ce[ue+11],16,1839030562),oe=xe(oe,ie,se,ee,ce[ue+14],23,-35309556),ee=xe(ee,oe,ie,se,ce[ue+1],4,-1530992060),se=xe(se,ee,oe,ie,ce[ue+4],11,1272893353),ie=xe(ie,se,ee,oe,ce[ue+7],16,-155497632),oe=xe(oe,ie,se,ee,ce[ue+10],23,-1094730640),ee=xe(ee,oe,ie,se,ce[ue+13],4,681279174),se=xe(se,ee,oe,ie,ce[ue+0],11,-358537222),ie=xe(ie,se,ee,oe,ce[ue+3],16,-722521979),oe=xe(oe,ie,se,ee,ce[ue+6],23,76029189),ee=xe(ee,oe,ie,se,ce[ue+9],4,-640364487),se=xe(se,ee,oe,ie,ce[ue+12],11,-421815835),ie=xe(ie,se,ee,oe,ce[ue+15],16,530742520),oe=xe(oe,ie,se,ee,ce[ue+2],23,-995338651),ee=ge(ee,oe,ie,se,ce[ue+0],6,-198630844),se=ge(se,ee,oe,ie,ce[ue+7],10,1126891415),ie=ge(ie,se,ee,oe,ce[ue+14],15,-1416354905),oe=ge(oe,ie,se,ee,ce[ue+5],21,-57434055),ee=ge(ee,oe,ie,se,ce[ue+12],6,1700485571),se=ge(se,ee,oe,ie,ce[ue+3],10,-1894986606),ie=ge(ie,se,ee,oe,ce[ue+10],15,-1051523),oe=ge(oe,ie,se,ee,ce[ue+1],21,-2054922799),ee=ge(ee,oe,ie,se,ce[ue+8],6,1873313359),se=ge(se,ee,oe,ie,ce[ue+15],10,-30611744),ie=ge(ie,se,ee,oe,ce[ue+6],15,-1560198380),oe=ge(oe,ie,se,ee,ce[ue+13],21,1309151649),ee=ge(ee,oe,ie,se,ce[ue+4],6,-145523070),se=ge(se,ee,oe,ie,ce[ue+11],10,-1120210379),ie=ge(ie,se,ee,oe,ce[ue+2],15,718787259),oe=ge(oe,ie,se,ee,ce[ue+9],21,-343485551),ee=le(ee,Se),oe=le(oe,we),ie=le(ie,Pe),se=le(se,Ae)}return Array(ee,oe,ie,se)}function Le(ce,z,ee,oe,ie,se){return le(ve(le(le(z,ce),le(oe,se)),ie),ee)}function he(ce,z,ee,oe,ie,se,ue){return Le(z&ee|~z&oe,ce,z,ie,se,ue)}function ye(ce,z,ee,oe,ie,se,ue){return Le(z&oe|ee&~oe,ce,z,ie,se,ue)}function xe(ce,z,ee,oe,ie,se,ue){return Le(z^ee^oe,ce,z,ie,se,ue)}function ge(ce,z,ee,oe,ie,se,ue){return Le(ee^(z|~oe),ce,z,ie,se,ue)}function le(ce,z){var ee=(65535&ce)+(65535&z);return(ce>>16)+(z>>16)+(ee>>16)<<16|65535&ee}function ve(ce,z){return ce<<z|ce>>>32-z}var de=me("./helpers");Be.exports=function(ce){return de.hash(ce,Ce,16)}},{"./helpers":238}],240:[function(me,Be,ke){"use strict";function Ce(le,ve){le[ve>>5]|=128<<24-ve%32,le[15+(ve+64>>9<<4)]=ve;for(var de=Array(80),ce=1732584193,z=-271733879,ee=-1732584194,oe=271733878,ie=-1009589776,se=0;se<le.length;se+=16){for(var ue=ce,Se=z,we=ee,Pe=oe,Ae=ie,De=0;De<80;De++){de[De]=De<16?le[se+De]:xe(de[De-3]^de[De-8]^de[De-14]^de[De-16],1);var ze=ye(ye(xe(ce,5),Le(De,z,ee,oe)),ye(ye(ie,de[De]),he(De)));ie=oe,oe=ee,ee=xe(z,30),z=ce,ce=ze}ce=ye(ce,ue),z=ye(z,Se),ee=ye(ee,we),oe=ye(oe,Pe),ie=ye(ie,Ae)}return Array(ce,z,ee,oe,ie)}function Le(le,ve,de,ce){return le<20?ve&de|~ve&ce:le<40?ve^de^ce:le<60?ve&de|ve&ce|de&ce:ve^de^ce}function he(le){return le<20?1518500249:le<40?1859775393:le<60?-1894007588:-899497514}function ye(le,ve){var de=(65535&le)+(65535&ve);return(le>>16)+(ve>>16)+(de>>16)<<16|65535&de}function xe(le,ve){return le<<ve|le>>>32-ve}var ge=me("./helpers");Be.exports=function(le){return ge.hash(le,Ce,20,!0)}},{"./helpers":238}],241:[function(me,Be,ke){"use strict";var Ce=me("./helpers"),Le=function(ee,oe){var ie=(65535&ee)+(65535&oe);return(ee>>16)+(oe>>16)+(ie>>16)<<16|65535&ie},he=function(ee,oe){return ee>>>oe|ee<<32-oe},ye=function(ee,oe){return ee>>>oe},xe=function(ee,oe,ie){return ee&oe^~ee&ie},ge=function(ee,oe,ie){return ee&oe^ee&ie^oe&ie},le=function(ee){return he(ee,2)^he(ee,13)^he(ee,22)},ve=function(ee){return he(ee,6)^he(ee,11)^he(ee,25)},de=function(ee){return he(ee,7)^he(ee,18)^ye(ee,3)},ce=function(ee){return he(ee,17)^he(ee,19)^ye(ee,10)},z=function(ee,oe){var ie,se,ue,Se,we,Pe,Ae,De,ze,Ze,Xe,Ge,ft=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),at=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),Ct=new Array(64);ee[oe>>5]|=128<<24-oe%32,ee[15+(oe+64>>9<<4)]=oe;for(var ze=0;ze<ee.length;ze+=16){ie=at[0],se=at[1],ue=at[2],Se=at[3],we=at[4],Pe=at[5],Ae=at[6],De=at[7];for(var Ze=0;Ze<64;Ze++)Ct[Ze]=Ze<16?ee[Ze+ze]:Le(Le(Le(ce(Ct[Ze-2]),Ct[Ze-7]),de(Ct[Ze-15])),Ct[Ze-16]),Xe=Le(Le(Le(Le(De,ve(we)),xe(we,Pe,Ae)),ft[Ze]),Ct[Ze]),Ge=Le(le(ie),ge(ie,se,ue)),De=Ae,Ae=Pe,Pe=we,we=Le(Se,Xe),Se=ue,ue=se,se=ie,ie=Le(Xe,Ge);at[0]=Le(ie,at[0]),at[1]=Le(se,at[1]),at[2]=Le(ue,at[2]),at[3]=Le(Se,at[3]),at[4]=Le(we,at[4]),at[5]=Le(Pe,at[5]),at[6]=Le(Ae,at[6]),at[7]=Le(De,at[7])}return at};Be.exports=function(ee){return Ce.hash(ee,z,32,!0)}},{"./helpers":238}],242:[function(me,Be,ke){(function(Ce){"use strict";function Le(z){return z&&z.__esModule?z:{default:z}}var he=me("babel-runtime/core-js/object/create"),ye=Le(he),xe=me("babel-runtime/helpers/classCallCheck"),ge=Le(xe),le=me("babel-runtime/helpers/createClass"),ve=Le(le),de=me("babel-runtime/helpers/typeof"),ce=Le(de);(function(z){if((ke===void 0?"undefined":(0,ce.default)(ke))==="object"&&Be!==void 0)Be.exports=z();else if(typeof Me=="function"&&Me.amd)Me([],z);else{var ee;ee=typeof window!="undefined"?window:Ce!==void 0?Ce:typeof self!="undefined"?self:this,ee.mime=z()}})(function(){return function z(ee,oe,ie){function se(we,Pe){if(!oe[we]){if(!ee[we]){var Ae=typeof me=="function"&&me;if(!Pe&&Ae)return Ae(we,!0);if(ue)return ue(we,!0);var De=new Error("Cannot find module '"+we+"'");throw De.code="MODULE_NOT_FOUND",De}var ze=oe[we]={exports:{}};ee[we][0].call(ze.exports,function(Ze){var Xe=ee[we][1][Ze];return se(Xe||Ze)},ze,ze.exports,z,ee,oe,ie)}return oe[we].exports}for(var ue=typeof me=="function"&&me,Se=0;Se<ie.length;Se++)se(ie[Se]);return se}({1:[function(z,ee,oe){var ie=function(){function se(){(0,ge.default)(this,se),this._types=(0,ye.default)(null),this._extensions=(0,ye.default)(null);for(var ue=0;ue<arguments.length;ue++)this.define(arguments[ue])}return(0,ve.default)(se,[{key:"define",value:function(ue,Se){for(var we in ue){for(var Pe=ue[we],Ae=0;Ae<Pe.length;Ae++){var De=Pe[Ae];if(!Se&&De in this._types)throw new Error('Attempt to change mapping for "'+De+'" extension from "'+this._types[De]+'" to "'+we+'". Pass `force=true` to allow this, otherwise remove "'+De+'" from the list of extensions for "'+we+'".');this._types[De]=we}!Se&&this._extensions[we]||(this._extensions[we]=Pe[0])}}},{key:"getType",value:function(ue){ue=String(ue);var Se=ue.replace(/^.*[\/\\]/,"").toLowerCase(),we=Se.replace(/^.*\./,"").toLowerCase(),Pe=Se.length<ue.length;return(we.length<Se.length-1||!Pe)&&this._types[we]||null}},{key:"getExtension",value:function(ue){return(ue=/^\s*([^;\s]*)/.test(ue)&&RegExp.$1)&&this._extensions[ue.toLowerCase()]||null}}]),se}();ee.exports=ie},{}],2:[function(z,ee,oe){var ie=z("./Mime");ee.exports=new ie(z("./types/standard"),z("./types/other"))},{"./Mime":1,"./types/other":3,"./types/standard":4}],3:[function(z,ee,oe){ee.exports={"application/prs.cww":["cww"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":[],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":[],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-otf":[],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-ttf":["ttf","ttc"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":[],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":[],"application/x-msdownload":["com","bat"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":[],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":[],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":[],"audio/x-wav":[],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":[],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":[],"image/x-pcx":["pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":[],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}},{}],4:[function(z,ee,oe){ee.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/bdoc":["bdoc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":["woff"],"application/font-woff2":["woff2"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/pskc+xml":["pskcxml"],"application/rdf+xml":["rdf"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/voicexml+xml":["vxml"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-diff+xml":["xdf"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":[],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp3":[],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":[],"audio/webm":["weba"],"audio/xm":["xm"],"font/otf":["otf"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jpeg":["jpeg","jpg","jpe"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/tiff":["tiff","tif"],"image/webp":["webp"],"message/rfc822":["eml","mime"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["x3db","x3dbz"],"model/x3d+vrml":["x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/hjson":["hjson"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":[],"text/sgml":["sgml","sgm"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":[],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}]},{},[2])(2)})}).call(this,typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"babel-runtime/core-js/object/create":19,"babel-runtime/helpers/classCallCheck":30,"babel-runtime/helpers/createClass":31,"babel-runtime/helpers/typeof":32}],243:[function(me,Be,ke){"use strict";ke.encodeURIComponent=function(Ce){try{return encodeURIComponent(Ce)}catch(Le){return Ce}},ke.escape=me("escape-html"),ke.timestamp=function(Ce){if(Ce){var Le=Ce;return typeof Le=="string"&&(Le=Number(Le)),String(Ce).length===10&&(Le*=1e3),new Date(Le)}return Math.round(Date.now()/1e3)}},{"escape-html":157}],244:[function(me,Be,ke){(function(Ce,Le){"use strict";function he(De){return De&&De.__esModule?De:{default:De}}function ye(De,ze){return De===void 0?ze:De}function xe(De,ze){return function(Ze,Xe,Ge){if(Ze)return ze(Ze);De({data:Xe,status:Ge.statusCode,headers:Ge.headers,res:Ge})}}var ge,le=me("babel-runtime/core-js/json/stringify"),ve=he(le),de=me("babel-runtime/helpers/typeof"),ce=he(de),z=me("util"),ee=me("url"),oe=me("http"),ie=me("https"),se=me("debug")("urllib"),ue=me("humanize-ms"),Se=0,we=Math.pow(2,31)-10,Pe=/^https?:\/\//i;ke.TIMEOUTS=[ue("300s"),ue("300s")];var Ae=["json","text"];ke.request=function(De,ze,Ze){return arguments.length===2&&typeof ze=="function"&&(Ze=ze,ze=null),typeof Ze=="function"?ke.requestWithCallback(De,ze,Ze):(ge||(ge=me("any-promise")),new ge(function(Xe,Ge){ke.requestWithCallback(De,ze,xe(Xe,Ge))}))},ke.requestWithCallback=function(De,ze,Ze){function Xe(){vt&&(clearTimeout(vt),vt=null)}function Ge(){nt&&(clearTimeout(nt),nt=null)}function ft(gn,Un,An){if(Ge(),!Ze)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),lt,Ce.pid,Jt.method,De),void(gn&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),lt,Ce.pid,gn.name,gn.message,gn.stack));var ni=Ze;Ze=null;var ai={};if(An&&(be=An.statusCode,ai=An.headers),be===401&&ai["www-authenticate"]&&(!ze.headers||!ze.headers.Authorization)&&ze.digestAuth){var ki=ai["www-authenticate"];if(ki.indexOf("Digest ")>=0)return se("Request#%d %s: got digest auth header WWW-Authenticate: %s",lt,De,ki),ze.headers=ze.headers||{},ze.headers.Authorization=digestAuthHeader(Jt.method,Jt.path,ki,ze.digestAuth),se("Request#%d %s: auth with digest header: %s",lt,De,ze.headers.Authorization),An.headers["set-cookie"]&&(ze.headers.Cookie=An.headers["set-cookie"].join(";")),ke.requestWithCallback(De,ze,ni)}var Ci=Date.now()-mt;Je&&(Je.contentDownload=Ci),se("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Ci,Oe,be,Jt.method,Jt.host,Jt.path,We,Je);var Ki={status:be,statusCode:be,headers:ai,size:Oe,aborted:Ne,rt:Ci,keepAliveSocket:We,data:Un,requestUrls:ze.requestUrls,timing:Je,remoteAddress:$e,remotePort:dt};if(gn){var ir="";Ht&&typeof Ht.getCurrentStatus=="function"&&(ir=", agent status: "+(0,ve.default)(Ht.getCurrentStatus())),gn.message+=", "+Jt.method+" "+De+" "+be+" (connected: "+Ie+", keepalive socket: "+We+ir+`)
|
|
|
headers: `+(0,ve.default)(ai),gn.data=Un,gn.path=Jt.path,gn.status=be,gn.headers=ai,gn.res=Ki}ni(gn,Un,ze.streaming?An:Ki),ze.emitter&&(tt.url=De,tt.socket=ln&&ln.connection,tt.options=Jt,tt.size=Bt,ze.emitter.emit("response",{requestId:lt,error:gn,ctx:ze.ctx,req:tt,res:Ki}))}function at(gn){var Un=null;if(ze.followRedirect&&statuses.redirect[gn.statusCode]){ze._followRedirectCount=(ze._followRedirectCount||0)+1;var An=gn.headers.location;if(An){if(!(ze._followRedirectCount>ze.maxRedirects)){var ni=ze.formatRedirectUrl?ze.formatRedirectUrl(De,An):ee.resolve(De,An);se("Request#%d %s: `redirected` from %s to %s",lt,Jt.path,De,ni),Ge(),ze.headers&&ze.headers.Host&&Pe.test(An)&&(ze.headers.Host=null);var ai=Ze;return Ze=null,ke.requestWithCallback(ni,ze,ai),{redirect:!0,error:null}}Un=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+De),Un.name="MaxRedirectError"}else Un=new Error("Got statusCode "+gn.statusCode+" but cannot resolve next location from headers"),Un.name="FollowRedirectError"}return{redirect:!1,error:Un}}function Ct(gn,Un,An){return An(null,Un,gn.headers["content-encoding"])}function et(gn){if(Je&&(Je.waiting=Date.now()-mt),se("Request#%d %s `req response` event emit: status %d, headers: %j",lt,De,gn.statusCode,gn.headers),ze.streaming){var Un=at(gn);return Un.redirect?void gn.resume():Un.error?(gn.resume(),ft(Un.error,null,gn)):ft(null,null,gn)}if(gn.on("close",function(){se("Request#%d %s: `res close` event emit, total size %d",lt,De,Oe)}),gn.on("error",function(){se("Request#%d %s: `res error` event emit, total size %d",lt,De,Oe)}),gn.on("aborted",function(){Ne=!0,se("Request#%d %s: `res aborted` event emit, total size %d",lt,De,Oe)}),At){var Un=at(gn);return Un.redirect?void gn.resume():Un.error?(gn.resume(),At.end(),ft(Un.error,null,gn)):(ze.consumeWriteStream===!1?gn.on("end",ft.bind(null,null,null,gn)):isNode010||isNode012?first([[At,"close"],[gn,"aborted"]],function(ai,ki,Ci){se("Request#%d %s: writeStream or res %s event emitted",lt,De,Ci),ft(He||null,null,gn)}):At.on("close",function(){se("Request#%d %s: writeStream close event emitted",lt,De),ft(He||null,null,gn)}),gn.pipe(At))}var An=[];gn.on("data",function(ni){se("Request#%d %s: `res data` event emit, size %d",lt,De,ni.length),Oe+=ni.length,An.push(ni)}),gn.on("end",function(){var ni=Le.concat(An,Oe);if(se("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",lt,De,Oe,gn._dumped),He)return ft(He,ni,gn);var ai=at(gn);if(ai.error)return ft(ai.error,ni,gn);ai.redirect||Ct(gn,ni,function(ki,Ci,Ki){if(ki)return ft(ki,ni,gn);if(!Ki&&Ae.indexOf(ze.dataType)>=0){try{Ci=decodeBodyByCharset(Ci,gn)}catch(sr){return se("decodeBodyByCharset error: %s",sr),ft(null,Ci,gn)}if(ze.dataType==="json")if(Oe===0)Ci=null;else{var ir=parseJSON(Ci,hn);ir.error?ki=ir.error:Ci=ir.data}}Ne&&se("Request#%d %s: Remote socket was terminated before `response.end()` was called",lt,De),ft(ki,Ci,gn)})})}function yt(){se("Response timer ticking, timeout: %d",pn),nt=setTimeout(function(){nt=null;var gn="Response timeout for "+pn+"ms";He=new Error(gn),He.name="ResponseTimeoutError",He.requestId=lt,se("ResponseTimeout: Request#%d %s %s: %s, connected: %s",lt,De,He.name,gn,Ie),st()},pn)}function st(){se("Request#%d %s abort, connected: %s",lt,De,Ie),ln.socket||(He.noSocket=!0,ft(He)),ln.abort()}if(!De||typeof De!="string"&&(De===void 0?"undefined":(0,ce.default)(De))!=="object"){var zt=z.format("expect request url to be a string or a http request options, but got %j",De);throw new Error(zt)}arguments.length===2&&typeof ze=="function"&&(Ze=ze,ze=null),ze=ze||{},Se>=we&&(Se=0);var lt=++Se;ze.requestUrls=ze.requestUrls||[];var tt={requestId:lt,url:De,args:ze,ctx:ze.ctx};ze.emitter&&ze.emitter.emit("request",tt),ze.timeout=ze.timeout||ke.TIMEOUTS,ze.maxRedirects=ze.maxRedirects||10,ze.streaming=ze.streaming||ze.customResponse;var ut,mt=Date.now();typeof De=="string"?(Pe.test(De)||(De="http://"+De),ut=ee.parse(De)):ut=De;var Pt=(ze.type||ze.method||ut.method||"GET").toUpperCase(),gt=ut.port||80,Ft=oe,Ht=ye(ze.agent,ke.agent),hn=ze.fixJSONCtlChars;ut.protocol==="https:"&&(Ft=ie,Ht=ye(ze.httpsAgent,ke.httpsAgent),ut.port||(gt=443));var Jt={host:ut.hostname||ut.host||"localhost",path:ut.path||"/",method:Pt,port:gt,agent:Ht,headers:ze.headers||{},lookup:ze.lookup};Array.isArray(ze.timeout)?Jt.requestTimeout=ze.timeout[ze.timeout.length-1]:ze.timeout!==void 0&&(Jt.requestTimeout=ze.timeout);for(var bn=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],Wt=0;Wt<bn.length;Wt++){var Kt=bn[Wt];ze.hasOwnProperty(Kt)&&(Jt[Kt]=ze[Kt])}Jt.rejectUnauthorized!==!1||Jt.hasOwnProperty("secureOptions")||(Jt.secureOptions=me("constants").SSL_OP_NO_TLSv1_2);var Xt=ze.auth||ut.auth;Xt&&(Jt.auth=Xt);var $t=ze.content||ze.data,kt=Pt==="GET"||Pt==="HEAD"||ze.dataAsQueryString;if(!ze.content&&$t&&typeof $t!="string"&&!Le.isBuffer($t))if(kt)$t=ze.nestedQuerystring?qs.stringify($t):querystring.stringify($t);else{var pt=Jt.headers["Content-Type"]||Jt.headers["content-type"];pt||(pt=ze.contentType==="json"?"application/json":"application/x-www-form-urlencoded",Jt.headers["Content-Type"]=pt),$t=parseContentType(pt).type==="application/json"?(0,ve.default)($t):ze.nestedQuerystring?qs.stringify($t):querystring.stringify($t)}kt&&$t&&(Jt.path+=(ut.query?"&":"?")+$t,$t=null);var Bt=0;if($t){var xt=$t.length;Le.isBuffer($t)||(xt=Le.byteLength($t)),Bt=Jt.headers["Content-Length"]=xt}ze.dataType==="json"&&(Jt.headers.Accept="application/json"),typeof ze.beforeRequest=="function"&&ze.beforeRequest(Jt);var vt=null,nt=null,He=null,Ie=!1,We=!1,Oe=0,be=-1,Ne=!1,$e="",dt="",Je=null;ze.timing&&(Je={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),Jt.headers["User-Agent"]||Jt.headers["user-agent"]||(Jt.headers["User-Agent"]=navigator.userAgent),ze.gzip&&(Jt.headers["Accept-Encoding"]||Jt.headers["accept-encoding"]||(Jt.headers["Accept-Encoding"]="gzip"));var At=ze.writeStream;se("Request#%d %s %s with headers %j, options.path: %s",lt,Pt,De,Jt.headers,Jt.path),ze.requestUrls.push(De);var en,pn;Array.isArray(ze.timeout)?(en=ue(ze.timeout[0]),pn=ue(ze.timeout[1])):en=pn=ue(ze.timeout),se("ConnectTimeout: %d, ResponseTimeout: %d",en,pn);var ln;try{ln=Ft.request(Jt,et)}catch(gn){return ft(gn)}return typeof window=="undefined"?function(){se("Connect timer ticking, timeout: %d",en),vt=setTimeout(function(){vt=null,be===-1&&(be=-2);var gn="Connect timeout for "+en+"ms",Un="ConnectionTimeoutError";ln.socket||(Un="SocketAssignTimeoutError",gn+=", working sockets is full"),He=new Error(gn),He.name=Un,He.requestId=lt,se("ConnectTimeout: Request#%d %s %s: %s, connected: %s",lt,De,He.name,gn,Ie),st()},en)}():ln.on("requestTimeout",function(){be===-1&&(be=-2);var gn="Connect timeout for "+en+"ms";He=new Error(gn),He.name="ConnectionTimeoutError",He.requestId=lt,st()}),Je&&ln.on("finish",function(){Je.requestSent=Date.now()-mt}),ln.once("socket",function(gn){Je&&(Je.queuing=Date.now()-mt),isNode010&&gn.socket&&(gn=gn.socket);var Un=gn.readyState;if(Un==="opening")return gn.once("lookup",function(An,ni,ai){se("Request#%d %s lookup: %s, %s, %s",lt,De,An,ni,ai),Je&&(Je.dnslookup=Date.now()-mt),ni&&($e=ni)}),void gn.once("connect",function(){Je&&(Je.connected=Date.now()-mt),Xe(),yt(),se("Request#%d %s new socket connected",lt,De),Ie=!0,$e||($e=gn.remoteAddress),dt=gn.remotePort});se("Request#%d %s reuse socket connected, readyState: %s",lt,De,Un),Ie=!0,We=!0,$e||($e=gn.remoteAddress),dt=gn.remotePort,Xe(),yt()}),ln.on("error",function(gn){gn.name!=="Error"&&gn.name!=="TypeError"||(gn.name=Ie?"ResponseError":"RequestError"),gn.message+=' (req "error")',se("Request#%d %s `req error` event emit, %s: %s",lt,De,gn.name,gn.message),ft(He||gn)}),At&&At.once("error",function(gn){gn.message+=' (writeStream "error")',He=gn,se("Request#%d %s `writeStream error` event emit, %s: %s",lt,De,gn.name,gn.message),st()}),ze.stream?(ze.stream.pipe(ln),ze.stream.once("error",function(gn){gn.message+=' (stream "error")',He=gn,se("Request#%d %s `readStream error` event emit, %s: %s",lt,De,gn.name,gn.message),st()})):ln.end($t),ln.requestId=lt,ln}}).call(this,me("_process"),me("buffer").Buffer)},{_process:173,"any-promise":13,"babel-runtime/core-js/json/stringify":17,"babel-runtime/helpers/typeof":32,buffer:38,constants:42,debug:155,http:196,https:159,"humanize-ms":160,url:203,util:207}]},{},[1])(1)}),function(Me){function me(ke){if(Be[ke])return Be[ke].exports;var Ce=Be[ke]={i:ke,l:!1,exports:{}};return Me[ke].call(Ce.exports,Ce,Ce.exports,me),Ce.l=!0,Ce.exports}var Be={};me.m=Me,me.c=Be,me.d=function(ke,Ce,Le){me.o(ke,Ce)||Object.defineProperty(ke,Ce,{configurable:!1,enumerable:!0,get:Le})},me.n=function(ke){var Ce=ke&&ke.__esModule?function(){return ke.default}:function(){return ke};return me.d(Ce,"a",Ce),Ce},me.o=function(ke,Ce){return Object.prototype.hasOwnProperty.call(ke,Ce)},me.p="",me(me.s=12)}([function(Me,me,Be){(function(ke,Ce){Me.exports=me=Ce()})(0,function(){var ke=ke||function(Ce,Le){var he=Object.create||function(){function ie(){}return function(se){var ue;return ie.prototype=se,ue=new ie,ie.prototype=null,ue}}(),ye={},xe=ye.lib={},ge=xe.Base=function(){return{extend:function(ie){var se=he(this);return ie&&se.mixIn(ie),se.hasOwnProperty("init")&&this.init!==se.init||(se.init=function(){se.$super.init.apply(this,arguments)}),se.init.prototype=se,se.$super=this,se},create:function(){var ie=this.extend();return ie.init.apply(ie,arguments),ie},init:function(){},mixIn:function(ie){for(var se in ie)ie.hasOwnProperty(se)&&(this[se]=ie[se]);ie.hasOwnProperty("toString")&&(this.toString=ie.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),le=xe.WordArray=ge.extend({init:function(ie,se){ie=this.words=ie||[],this.sigBytes=se!=null?se:4*ie.length},toString:function(ie){return(ie||de).stringify(this)},concat:function(ie){var se=this.words,ue=ie.words,Se=this.sigBytes,we=ie.sigBytes;if(this.clamp(),Se%4)for(var Pe=0;Pe<we;Pe++){var Ae=ue[Pe>>>2]>>>24-Pe%4*8&255;se[Se+Pe>>>2]|=Ae<<24-(Se+Pe)%4*8}else for(var Pe=0;Pe<we;Pe+=4)se[Se+Pe>>>2]=ue[Pe>>>2];return this.sigBytes+=we,this},clamp:function(){var ie=this.words,se=this.sigBytes;ie[se>>>2]&=4294967295<<32-se%4*8,ie.length=Ce.ceil(se/4)},clone:function(){var ie=ge.clone.call(this);return ie.words=this.words.slice(0),ie},random:function(ie){for(var se,ue=[],Se=0;Se<ie;Se+=4){var we=function(Ae){var Ae=Ae,De=987654321,ze=4294967295;return function(){De=36969*(65535&De)+(De>>16)&ze,Ae=18e3*(65535&Ae)+(Ae>>16)&ze;var Ze=(De<<16)+Ae&ze;return Ze/=4294967296,(Ze+=.5)*(Ce.random()>.5?1:-1)}}(4294967296*(se||Ce.random()));se=987654071*we(),ue.push(4294967296*we()|0)}return new le.init(ue,ie)}}),ve=ye.enc={},de=ve.Hex={stringify:function(ie){for(var se=ie.words,ue=ie.sigBytes,Se=[],we=0;we<ue;we++){var Pe=se[we>>>2]>>>24-we%4*8&255;Se.push((Pe>>>4).toString(16)),Se.push((15&Pe).toString(16))}return Se.join("")},parse:function(ie){for(var se=ie.length,ue=[],Se=0;Se<se;Se+=2)ue[Se>>>3]|=parseInt(ie.substr(Se,2),16)<<24-Se%8*4;return new le.init(ue,se/2)}},ce=ve.Latin1={stringify:function(ie){for(var se=ie.words,ue=ie.sigBytes,Se=[],we=0;we<ue;we++){var Pe=se[we>>>2]>>>24-we%4*8&255;Se.push(String.fromCharCode(Pe))}return Se.join("")},parse:function(ie){for(var se=ie.length,ue=[],Se=0;Se<se;Se++)ue[Se>>>2]|=(255&ie.charCodeAt(Se))<<24-Se%4*8;return new le.init(ue,se)}},z=ve.Utf8={stringify:function(ie){try{return decodeURIComponent(escape(ce.stringify(ie)))}catch(se){throw new Error("Malformed UTF-8 data")}},parse:function(ie){return ce.parse(unescape(encodeURIComponent(ie)))}},ee=xe.BufferedBlockAlgorithm=ge.extend({reset:function(){this._data=new le.init,this._nDataBytes=0},_append:function(ie){typeof ie=="string"&&(ie=z.parse(ie)),this._data.concat(ie),this._nDataBytes+=ie.sigBytes},_process:function(ie){var se=this._data,ue=se.words,Se=se.sigBytes,we=this.blockSize,Pe=4*we,Ae=Se/Pe;Ae=ie?Ce.ceil(Ae):Ce.max((0|Ae)-this._minBufferSize,0);var De=Ae*we,ze=Ce.min(4*De,Se);if(De){for(var Ze=0;Ze<De;Ze+=we)this._doProcessBlock(ue,Ze);var Xe=ue.splice(0,De);se.sigBytes-=ze}return new le.init(Xe,ze)},clone:function(){var ie=ge.clone.call(this);return ie._data=this._data.clone(),ie},_minBufferSize:0}),oe=(xe.Hasher=ee.extend({cfg:ge.extend(),init:function(ie){this.cfg=this.cfg.extend(ie),this.reset()},reset:function(){ee.reset.call(this),this._doReset()},update:function(ie){return this._append(ie),this._process(),this},finalize:function(ie){return ie&&this._append(ie),this._doFinalize()},blockSize:16,_createHelper:function(ie){return function(se,ue){return new ie.init(ue).finalize(se)}},_createHmacHelper:function(ie){return function(se,ue){return new oe.HMAC.init(ie,ue).finalize(se)}}}),ye.algo={});return ye}(Math);return ke})},function(Me,me,Be){"use strict";function ke(he,ye){if(!(he instanceof ye))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Ce=function(){function he(ye,xe){for(var ge=0;ge<xe.length;ge++){var le=xe[ge];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(ye,le.key,le)}}return function(ye,xe,ge){return xe&&he(ye.prototype,xe),ge&&he(ye,ge),ye}}(),Le=function(){function he(){ke(this,he)}return Ce(he,null,[{key:"detectIEVersion",value:function(){for(var ye=4,xe=document.createElement("div"),ge=xe.getElementsByTagName("i");xe.innerHTML="<!--[if gt IE "+ye+"]><i></i><![endif]-->",ge[0];)ye++;return ye>4&&ye}},{key:"extend",value:function(ye,xe){for(var ge in xe)Object.prototype.hasOwnProperty.call(xe,ge)&&xe[ge]&&(ye[ge]=xe[ge])}},{key:"isArray",value:function(ye){return Object.prototype.toString.call(arg)==="[object Array]"}},{key:"getFileType",value:function(ye){return ye=ye.toLowerCase(),/.mp4|.flv|.m3u8|.avi|.rm|.rmvb|.mpeg|.mpg|.mov|.wmv|.3gp|.asf|.dat|.dv|.f4v|.gif|.m2t|.m4v|.mj2|.mjpeg|.mpe|.mts|.ogg|.qt|.swf|.ts|.vob|.wmv|.webm/.test(ye)?"video":/.mp3|.wav|.ape|.cda|.au|.midi|.mac|.aac|.ac3|.acm|.amr|.caf|.flac|.m4a|.ra|.wma/.test(ye)?"audio":/.bmp|.jpg|.jpeg|.png/.test(ye)?"img":"other"}},{key:"isImage",value:function(ye){return ye=ye.toLowerCase(),!!/.jpg|.jpeg|.png/.test(ye)}},{key:"ISODateString",value:function(ye){function xe(ge){return ge<10?"0"+ge:ge}return ye.getUTCFullYear()+"-"+xe(ye.getUTCMonth()+1)+"-"+xe(ye.getUTCDate())+"T"+xe(ye.getUTCHours())+":"+xe(ye.getUTCMinutes())+":"+xe(ye.getUTCSeconds())+"Z"}},{key:"isIntNum",value:function(ye){return!!/^\d+$/.test(ye)}}]),he}();me.default=Le},function(Me,me,Be){(function(ke,Ce){Me.exports=me=Ce(Be(0))})(0,function(ke){return function(Ce){function Le(oe,ie,se,ue,Se,we,Pe){var Ae=oe+(ie&se|~ie&ue)+Se+Pe;return(Ae<<we|Ae>>>32-we)+ie}function he(oe,ie,se,ue,Se,we,Pe){var Ae=oe+(ie&ue|se&~ue)+Se+Pe;return(Ae<<we|Ae>>>32-we)+ie}function ye(oe,ie,se,ue,Se,we,Pe){var Ae=oe+(ie^se^ue)+Se+Pe;return(Ae<<we|Ae>>>32-we)+ie}function xe(oe,ie,se,ue,Se,we,Pe){var Ae=oe+(se^(ie|~ue))+Se+Pe;return(Ae<<we|Ae>>>32-we)+ie}var ge=ke,le=ge.lib,ve=le.WordArray,de=le.Hasher,ce=ge.algo,z=[];(function(){for(var oe=0;oe<64;oe++)z[oe]=4294967296*Ce.abs(Ce.sin(oe+1))|0})();var ee=ce.MD5=de.extend({_doReset:function(){this._hash=new ve.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(oe,ie){for(var se=0;se<16;se++){var ue=ie+se,Se=oe[ue];oe[ue]=16711935&(Se<<8|Se>>>24)|4278255360&(Se<<24|Se>>>8)}var we=this._hash.words,Pe=oe[ie+0],Ae=oe[ie+1],De=oe[ie+2],ze=oe[ie+3],Ze=oe[ie+4],Xe=oe[ie+5],Ge=oe[ie+6],ft=oe[ie+7],at=oe[ie+8],Ct=oe[ie+9],et=oe[ie+10],yt=oe[ie+11],st=oe[ie+12],zt=oe[ie+13],lt=oe[ie+14],tt=oe[ie+15],ut=we[0],mt=we[1],Pt=we[2],gt=we[3];ut=Le(ut,mt,Pt,gt,Pe,7,z[0]),gt=Le(gt,ut,mt,Pt,Ae,12,z[1]),Pt=Le(Pt,gt,ut,mt,De,17,z[2]),mt=Le(mt,Pt,gt,ut,ze,22,z[3]),ut=Le(ut,mt,Pt,gt,Ze,7,z[4]),gt=Le(gt,ut,mt,Pt,Xe,12,z[5]),Pt=Le(Pt,gt,ut,mt,Ge,17,z[6]),mt=Le(mt,Pt,gt,ut,ft,22,z[7]),ut=Le(ut,mt,Pt,gt,at,7,z[8]),gt=Le(gt,ut,mt,Pt,Ct,12,z[9]),Pt=Le(Pt,gt,ut,mt,et,17,z[10]),mt=Le(mt,Pt,gt,ut,yt,22,z[11]),ut=Le(ut,mt,Pt,gt,st,7,z[12]),gt=Le(gt,ut,mt,Pt,zt,12,z[13]),Pt=Le(Pt,gt,ut,mt,lt,17,z[14]),mt=Le(mt,Pt,gt,ut,tt,22,z[15]),ut=he(ut,mt,Pt,gt,Ae,5,z[16]),gt=he(gt,ut,mt,Pt,Ge,9,z[17]),Pt=he(Pt,gt,ut,mt,yt,14,z[18]),mt=he(mt,Pt,gt,ut,Pe,20,z[19]),ut=he(ut,mt,Pt,gt,Xe,5,z[20]),gt=he(gt,ut,mt,Pt,et,9,z[21]),Pt=he(Pt,gt,ut,mt,tt,14,z[22]),mt=he(mt,Pt,gt,ut,Ze,20,z[23]),ut=he(ut,mt,Pt,gt,Ct,5,z[24]),gt=he(gt,ut,mt,Pt,lt,9,z[25]),Pt=he(Pt,gt,ut,mt,ze,14,z[26]),mt=he(mt,Pt,gt,ut,at,20,z[27]),ut=he(ut,mt,Pt,gt,zt,5,z[28]),gt=he(gt,ut,mt,Pt,De,9,z[29]),Pt=he(Pt,gt,ut,mt,ft,14,z[30]),mt=he(mt,Pt,gt,ut,st,20,z[31]),ut=ye(ut,mt,Pt,gt,Xe,4,z[32]),gt=ye(gt,ut,mt,Pt,at,11,z[33]),Pt=ye(Pt,gt,ut,mt,yt,16,z[34]),mt=ye(mt,Pt,gt,ut,lt,23,z[35]),ut=ye(ut,mt,Pt,gt,Ae,4,z[36]),gt=ye(gt,ut,mt,Pt,Ze,11,z[37]),Pt=ye(Pt,gt,ut,mt,ft,16,z[38]),mt=ye(mt,Pt,gt,ut,et,23,z[39]),ut=ye(ut,mt,Pt,gt,zt,4,z[40]),gt=ye(gt,ut,mt,Pt,Pe,11,z[41]),Pt=ye(Pt,gt,ut,mt,ze,16,z[42]),mt=ye(mt,Pt,gt,ut,Ge,23,z[43]),ut=ye(ut,mt,Pt,gt,Ct,4,z[44]),gt=ye(gt,ut,mt,Pt,st,11,z[45]),Pt=ye(Pt,gt,ut,mt,tt,16,z[46]),mt=ye(mt,Pt,gt,ut,De,23,z[47]),ut=xe(ut,mt,Pt,gt,Pe,6,z[48]),gt=xe(gt,ut,mt,Pt,ft,10,z[49]),Pt=xe(Pt,gt,ut,mt,lt,15,z[50]),mt=xe(mt,Pt,gt,ut,Xe,21,z[51]),ut=xe(ut,mt,Pt,gt,st,6,z[52]),gt=xe(gt,ut,mt,Pt,ze,10,z[53]),Pt=xe(Pt,gt,ut,mt,et,15,z[54]),mt=xe(mt,Pt,gt,ut,Ae,21,z[55]),ut=xe(ut,mt,Pt,gt,at,6,z[56]),gt=xe(gt,ut,mt,Pt,tt,10,z[57]),Pt=xe(Pt,gt,ut,mt,Ge,15,z[58]),mt=xe(mt,Pt,gt,ut,zt,21,z[59]),ut=xe(ut,mt,Pt,gt,Ze,6,z[60]),gt=xe(gt,ut,mt,Pt,yt,10,z[61]),Pt=xe(Pt,gt,ut,mt,De,15,z[62]),mt=xe(mt,Pt,gt,ut,Ct,21,z[63]),we[0]=we[0]+ut|0,we[1]=we[1]+mt|0,we[2]=we[2]+Pt|0,we[3]=we[3]+gt|0},_doFinalize:function(){var oe=this._data,ie=oe.words,se=8*this._nDataBytes,ue=8*oe.sigBytes;ie[ue>>>5]|=128<<24-ue%32;var Se=Ce.floor(se/4294967296),we=se;ie[15+(ue+64>>>9<<4)]=16711935&(Se<<8|Se>>>24)|4278255360&(Se<<24|Se>>>8),ie[14+(ue+64>>>9<<4)]=16711935&(we<<8|we>>>24)|4278255360&(we<<24|we>>>8),oe.sigBytes=4*(ie.length+1),this._process();for(var Pe=this._hash,Ae=Pe.words,De=0;De<4;De++){var ze=Ae[De];Ae[De]=16711935&(ze<<8|ze>>>24)|4278255360&(ze<<24|ze>>>8)}return Pe},clone:function(){var oe=de.clone.call(this);return oe._hash=this._hash.clone(),oe}});ge.MD5=de._createHelper(ee),ge.HmacMD5=de._createHmacHelper(ee)}(Math),ke.MD5})},function(Me,me,Be){"use strict";Object.defineProperty(me,"__esModule",{value:!0}),me.UPLOADSTATE={INIT:"init",UPLOADING:"uploading",COMPLETE:"complete",INTERRUPT:"interrupt"},me.UPLOADSTEP={INIT:"init",PART:"part",COMPLETE:"complete"},me.UPLOADDEFAULT={PARALLEL:5,PARTSIZE:1048576}},function(Me,me,Be){"use strict";function ke(ee){return ee&&ee.__esModule?ee:{default:ee}}function Ce(ee,oe){if(!(ee instanceof oe))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Le=function(){function ee(oe,ie){for(var se=0;se<ie.length;se++){var ue=ie[se];ue.enumerable=ue.enumerable||!1,ue.configurable=!0,"value"in ue&&(ue.writable=!0),Object.defineProperty(oe,ue.key,ue)}}return function(oe,ie,se){return ie&&ee(oe.prototype,ie),se&&ee(oe,se),oe}}(),he=Be(5),ye=ke(he),xe=Be(25),ge=ke(xe),le=Be(6),ve=ke(le),de=Be(7),ce=ke(de),z=function(){function ee(oe){Ce(this,ee);var ie=ce.default.os.name,se=ce.default.os.version||"",ue=ce.default.browser.name,Se=ce.default.browser.version||"",we=window.location.href,Pe="";we&&(Pe=ce.default.getHost(we));var Ae="pc";ce.default.os.ipad?Ae="pad":(ce.default.os.iphone||ce.default.os.android)&&(Ae="phone"),this._ri=ye.default.create(),this.initParam={APIVersion:"0.6.0",lv:"1",av:ve.default.version,pd:"upload",sm:"upload",md:"uploader",uuid:ee.getUuid(),os:ie,ov:se,et:ue,ev:Se,uat:navigator.userAgent,app_n:Pe,tt:Ae,dm:"h5",ut:""}}return Le(ee,[{key:"log",value:function(oe,ie){ie&&ie.ri?(this._ri=ie.ri,delete ie.ri):this._ri=ye.default.create(),ie&&ie.ut&&(this.initParam.ut=ie.ut,delete ie.ut),this.initParam.t=new Date().getTime(),this.initParam.ll=oe=="20006"?"error":"info",this.initParam.ri=this._ri,this.initParam.e=oe;var se=[];if(ie)for(var ue in ie)se.push(ue+"="+ie[ue]);var Se=se.join("&");this.initParam.args=encodeURIComponent(Se==""?"0":Se);var we=[];for(var ue in this.initParam)we.push(ue+"="+this.initParam[ue]);var Pe=we.join("&");AliyunUpload&&AliyunUpload.__logTestCallback__?AliyunUpload.__logTestCallback__(Pe):new Image(0,0).src="https://videocloud.cn-hangzhou.log.aliyuncs.com/logstores/upload/track?"+Pe}}],[{key:"getUuid",value:function(){var oe=ge.default.get("p_h5_upload_u");return oe||(oe=ye.default.create(),ge.default.set("p_h5_upload_u",oe,730)),oe}},{key:"getClientId",value:function(){return ge.default.get("p_h5_upload_clientId")}},{key:"setClientId",value:function(oe){return oe||(oe=ye.default.create()),ge.default.set("p_h5_upload_clientId",oe,730),oe}}]),ee}();me.default=z},function(Me,me,Be){"use strict";function ke(he,ye){if(!(he instanceof ye))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Ce=function(){function he(ye,xe){for(var ge=0;ge<xe.length;ge++){var le=xe[ge];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(ye,le.key,le)}}return function(ye,xe,ge){return xe&&he(ye.prototype,xe),ge&&he(ye,ge),ye}}(),Le=function(){function he(){ke(this,he)}return Ce(he,null,[{key:"create",value:function(ye,xe){var ge,le="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),ve=[];if(xe=xe||le.length,ye)for(ge=0;ge<ye;ge++)ve[ge]=le[0|Math.random()*xe];else{var de;for(ve[8]=ve[13]=ve[18]=ve[23]="-",ve[14]="4",ge=0;ge<36;ge++)ve[ge]||(de=0|16*Math.random(),ve[ge]=le[ge==19?3&de|8:de])}return ve.join("")}}]),he}();me.default=Le},function(Me,me,Be){"use strict";Object.defineProperty(me,"__esModule",{value:!0});var ke={version:"1.5.0"};me.default=ke},function(Me,me,Be){"use strict";function ke(le,ve){if(!(le instanceof ve))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Ce=function(){function le(ve,de){for(var ce=0;ce<de.length;ce++){var z=de[ce];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(ve,z.key,z)}}return function(ve,de,ce){return de&&le(ve.prototype,de),ce&&le(ve,ce),ve}}(),Le=function(le){var ve=navigator.userAgent,de="other";if(le.ios)return"iOS";if(le.android)return"android";if(ve.indexOf("Baiduspider")>-1)return"Baiduspider";if(ve.indexOf("PlayStation")>-1)return"PS4";var ce=navigator.platform=="Win32"||navigator.platform=="Windows"||ve.indexOf("Windows")>-1,z=navigator.platform=="Mac68K"||navigator.platform=="MacPPC"||navigator.platform=="Macintosh"||navigator.platform=="MacIntel";return z&&(de="macOS"),navigator.platform=="X11"&&!ce&&!z&&(de="Unix"),String(navigator.platform).indexOf("Linux")>-1&&(de="Linux"),ce?"windows":de},he=function(){var le=navigator.userAgent,ve="";return(le.indexOf("Windows NT 5.0")>-1||le.indexOf("Windows 2000")>-1)&&(ve="2000"),(le.indexOf("Windows NT 5.1")>-1||le.indexOf("Windows XP")>-1)&&(ve="XP"),(le.indexOf("Windows NT 5.2")>-1||le.indexOf("Windows 2003")>-1)&&(ve="2003"),(le.indexOf("Windows NT 6.0")>-1||le.indexOf("Windows Vista")>-1)&&(ve="Vista"),(le.indexOf("Windows NT 6.1")>-1||le.indexOf("Windows 7")>-1)&&(ve="7"),(le.indexOf("Windows NT 6.2")>-1||le.indexOf("Windows 8")>-1)&&(ve="8"),(le.indexOf("Windows NT 6.3")>-1||le.indexOf("Windows 8.1")>-1)&&(ve="8.1"),(le.indexOf("Windows NT 10")>-1||le.indexOf("Windows 10")>-1)&&(ve="10"),ve},ye=function(le){var ve=navigator.userAgent.toLowerCase();return le.chrome?"Chrome":le.firefox?"Firefox":le.safari?"Safari":le.webview?"webview":le.ie?/edge/.test(ve)?"Edge":"IE":/baiduspider/.test(ve)?"Baiduspider":/ucweb/.test(ve)||/UCBrowser/.test(ve)?"UC":/opera/.test(ve)?"Opera":/ucweb/.test(ve)?"UC":/360se/.test(ve)?"360\u6D4F\u89C8\u5668":/bidubrowser/.test(ve)?"\u767E\u5EA6\u6D4F\u89C8\u5668":/metasr/.test(ve)?"\u641C\u72D7\u6D4F\u89C8\u5668":/lbbrowser/.test(ve)?"\u730E\u8C79\u6D4F\u89C8\u5668":/micromessenger/.test(ve)?"\u5FAE\u4FE1\u5185\u7F6E\u6D4F\u89C8\u5668":/qqbrowser/.test(ve)?"QQ\u6D4F\u89C8\u5668":/playstation/.test(ve)?"PS4\u6D4F\u89C8\u5668":void 0},xe=function(){var le={},ve={},de=navigator.userAgent,ce=navigator.platform,z=de.match(/Web[kK]it[\/]{0,1}([\d.]+)/),ee=de.match(/(Android);?[\s\/]+([\d.]+)?/),oe=!!de.match(/\(Macintosh\; Intel /),ie=de.match(/(iPad).*OS\s([\d_]+)/),se=de.match(/(iPod)(.*OS\s([\d_]+))?/),ue=!ie&&de.match(/(iPhone\sOS)\s([\d_]+)/),Se=de.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),we=/Win\d{2}|Windows/.test(ce),Pe=de.match(/Windows Phone ([\d.]+)/),Ae=Se&&de.match(/TouchPad/),De=de.match(/Kindle\/([\d.]+)/),ze=de.match(/Silk\/([\d._]+)/),Ze=de.match(/(BlackBerry).*Version\/([\d.]+)/),Xe=de.match(/(BB10).*Version\/([\d.]+)/),Ge=de.match(/(RIM\sTablet\sOS)\s([\d.]+)/),ft=de.match(/PlayBook/),at=de.match(/Chrome\/([\d.]+)/)||de.match(/CriOS\/([\d.]+)/),Ct=de.match(/Firefox\/([\d.]+)/),et=de.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),yt=de.match(/MSIE\s([\d.]+)/)||de.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),st=!at&&de.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),zt=st||de.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/);if((ve.webkit=!!z)&&(ve.version=z[1]),ee&&(le.android=!0,le.version=ee[2]),ue&&!se&&(le.ios=le.iphone=!0,le.version=ue[2].replace(/_/g,".")),ie&&(le.ios=le.ipad=!0,le.version=ie[2].replace(/_/g,".")),se&&(le.ios=le.ipod=!0,le.version=se[3]?se[3].replace(/_/g,"."):null),Pe&&(le.wp=!0,le.version=Pe[1]),Se&&(le.webos=!0,le.version=Se[2]),Ae&&(le.touchpad=!0),Ze&&(le.blackberry=!0,le.version=Ze[2]),Xe&&(le.bb10=!0,le.version=Xe[2]),Ge&&(le.rimtabletos=!0,le.version=Ge[2]),ft&&(ve.playbook=!0),De&&(le.kindle=!0,le.version=De[1]),ze&&(ve.silk=!0,ve.version=ze[1]),!ze&&le.android&&de.match(/Kindle Fire/)&&(ve.silk=!0),at&&(ve.chrome=!0,ve.version=at[1]),Ct&&(ve.firefox=!0,ve.version=Ct[1]),et&&(le.firefoxos=!0,le.version=et[1]),yt&&(ve.ie=!0,ve.version=yt[1]),zt&&(oe||le.ios||we||ee)&&(ve.safari=!0,le.ios||(ve.version=zt[1])),st&&(ve.webview=!0),oe){var lt=de.match(/[\d]*_[\d]*_[\d]*/);lt&<.length>0&<[0]&&(le.version=lt[0].replace(/_/g,"."))}return le.tablet=!!(ie||ft||ee&&!de.match(/Mobile/)||Ct&&de.match(/Tablet/)||yt&&!de.match(/Phone/)&&de.match(/Touch/)),le.phone=!(le.tablet||le.ipod||!(ee||ue||Se||Ze||Xe||at&&de.match(/Android/)||at&&de.match(/CriOS\/([\d.]+)/)||Ct&&de.match(/Mobile/)||yt&&de.match(/Touch/))),le.pc=!le.tablet&&!le.phone,oe?le.name="macOS":we?(le.name="windows",le.version=he()):le.name=Le(le),ve.name=ye(ve),{os:le,browser:ve}}(),ge=function(){function le(){ke(this,le)}return Ce(le,null,[{key:"getHost",value:function(ve){var z="";if(ve===void 0||ve==null||ve=="")return"";var de=ve.indexOf("//"),ce=ve;de>-1&&(ce=ve.substring(de+2));var z=ce,ee=ce.split("/");return ee&&ee.length>0&&(z=ee[0]),ee=z.split(":"),ee&&ee.length>0&&(z=ee[0]),z}},{key:"os",get:function(){return xe.os}},{key:"browser",get:function(){var ve=xe.browser;return ve.name||(ve.name=ye()),ve}}]),le}();me.default=ge},function(Me,me,Be){"use strict";function ke(he,ye){if(!(he instanceof ye))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Ce=function(){function he(ye,xe){for(var ge=0;ge<xe.length;ge++){var le=xe[ge];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(ye,le.key,le)}}return function(ye,xe,ge){return xe&&he(ye.prototype,xe),ge&&he(ye,ge),ye}}(),Le=function(){function he(){ke(this,he)}return Ce(he,null,[{key:"get",value:function(ye,xe,ge,le,ve){var de;ge=ge||function(){},typeof XMLHttpRequest=="undefined"&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(ce){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(ce){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(ce){}throw new Error("This browser does not support XMLHttpRequest.")}),de=new XMLHttpRequest,de.onreadystatechange=function(){de.readyState===4&&(de.status===200?xe(de.responseText):ge(de.responseText))};try{le===void 0&&(le=!0),de.open("GET",ye,le),ve&&(de.withCredentials=!0)}catch(ce){return void ge(ce)}try{de.send()}catch(ce){ge(ce)}}}]),he}();me.default=Le},function(Me,me,Be){"use strict";function ke(xe,ge){if(!(xe instanceof ge))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Ce=function(){function xe(ge,le){for(var ve=0;ve<le.length;ve++){var de=le[ve];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),Object.defineProperty(ge,de.key,de)}}return function(ge,le,ve){return le&&xe(ge.prototype,le),ve&&xe(ge,ve),ge}}(),Le=Be(27),he=Be(30),ye=(Be(10),function(){function xe(){ke(this,xe)}return Ce(xe,null,[{key:"randomUUID",value:function(){for(var ge=[],le="0123456789abcdef",ve=0;ve<36;ve++)ge[ve]=le.substr(Math.floor(16*Math.random()),1);return ge[14]="4",ge[19]=le.substr(3&ge[19]|8,1),ge[8]=ge[13]=ge[18]=ge[23]="-",ge.join("")}},{key:"aliyunEncodeURI",value:function(ge){var le=encodeURIComponent(ge);return le=le.replace(/\+/g,"%20").replace(/\*/g,"%2A").replace(/%7E/g,"~").replace(/!/g,"%21").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27")}},{key:"makeUTF8sort",value:function(ge,le,ve){if(!ge)throw new Error("PrismPlayer Error: vid should not be null!");var de=[];for(var ce in ge)de.push(ce);for(var z=de.sort(),ee="",oe=z.length,ce=0;ce<oe;ce++){var ie=xe.aliyunEncodeURI(z[ce]),se=xe.aliyunEncodeURI(ge[z[ce]]);ee==""?ee=ie+le+se:ee+=ve+ie+le+se}return ee}},{key:"makeChangeSiga",value:function(ge,le){if(!ge)throw new Error("PrismPlayer Error: vid should not be null!");return he.stringify(Le("GET&"+xe.aliyunEncodeURI("/")+"&"+xe.aliyunEncodeURI(xe.makeUTF8sort(ge,"=","&")),le+"&"))}}]),xe}());me.default=ye},function(Me,me,Be){(function(ke,Ce){Me.exports=me=Ce(Be(0))})(0,function(ke){return ke.enc.Utf8})},function(Me,me,Be){(function(ke,Ce){Me.exports=me=Ce(Be(0))})(0,function(ke){return ke.enc.Hex})},function(Me,me,Be){Me.exports=Be(13)},function(Me,me,Be){"use strict";var ke,Ce,Le=Be(14),he=function(xe){return xe&&xe.__esModule?xe:{default:xe}}(Le),ye={Vod:he.default};ke=[],(Ce=function(){return ye}.apply(me,ke))!==void 0&&(Me.exports=Ce),window.AliyunUpload=ye,_n.exports=AliyunUpload},function(Me,me,Be){"use strict";function ke(Xe){return Xe&&Xe.__esModule?Xe:{default:Xe}}function Ce(Xe,Ge){if(!(Xe instanceof Ge))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Le=function(){function Xe(Ge,ft){for(var at=0;at<ft.length;at++){var Ct=ft[at];Ct.enumerable=Ct.enumerable||!1,Ct.configurable=!0,"value"in Ct&&(Ct.writable=!0),Object.defineProperty(Ge,Ct.key,Ct)}}return function(Ge,ft,at){return ft&&Xe(Ge.prototype,ft),at&&Xe(Ge,at),Ge}}(),he=Be(15),ye=Be(3),xe=Be(16),ge=ke(xe),le=Be(18),ve=ke(le),de=Be(24),ce=ke(de),z=Be(4),ee=ke(z),oe=Be(1),ie=ke(oe),se=Be(5),ue=ke(se),Se=Be(26),we=ke(Se),Pe=Be(31),Ae=ke(Pe),De=Be(32),ze=ke(De),Ze=(Be(2),function(){function Xe(Ge){Ce(this,Xe),this.options=Ge,this.options.partSize=this.options.partSize||ye.UPLOADDEFAULT.PARTSIZE,this.options.parallel=this.options.parallel||ye.UPLOADDEFAULT.PARALLEL,this.options.region=this.options.region||"cn-shanghai",this.options.cname=this.options.cname||!1,this.options.localCheckpoint=this.options.localCheckpoint||!1,this.options.enableUploadProgress===void 0&&(this.options.enableUploadProgress=!0),this._ossCreditor=new Object,this._state=he.VODSTATE.INIT,this._uploadList=[],this._curIndex=-1,this._ossUpload=null,this._log=new ee.default,this._retryCount=0,this._retryTotal=this.options.retryCount||3,this._retryDuration=this.options.retryDuration||2,this._state=he.VODSTATE.INIT,this._uploadWay="vod",this._onbeforeunload=!1,this._invalidUserId=!1,this._initEvent()}return Le(Xe,[{key:"init",value:function(Ge,ft,at,Ct){return this._retryCount=0,!(at&&!Ct||!at&&Ct)&&!(Ge&&!ft||!Ge&&ft)&&(this._ossCreditor.accessKeyId=Ge,this._ossCreditor.accessKeySecret=ft,this._ossCreditor.securityToken=at,this._ossCreditor.expireTime=Ct,!0)}},{key:"addFile",value:function(Ge,ft,at,Ct,et,yt){if(!Ge)return!1;if(Ge.size==0)try{this.options.onUploadFailed({file:Ge},"EmptyFile","\u6587\u4EF6\u5927\u5C0F\u4E3A0\uFF0C\u4E0D\u80FD\u4E0A\u4F20")}catch(tt){console.log(tt)}for(var st=(this.options,0);st<this._uploadList.length;st++)if(this._uploadList[st].file==Ge)return!1;var zt=new Object;if(zt.file=Ge,zt._endpoint=ft,zt._bucket=at,zt._object=Ct,zt.state=he.UPLOADSTATE.INIT,zt.isImage=ie.default.isImage(Ge.name),!zt.isImage&&this.options.enableUploadProgress){var lt=this;ze.default.getMd5(Ge,function(tt){zt.fileHash=tt;var ut=lt._getCheckoutpoint(zt);lt.options.localCheckpoint||ut||lt._getCheckoutpointFromCloud(zt,function(mt){if(mt.UploadPoint){var Pt=JSON.parse(mt.UploadPoint);Pt.loaded!=1&&(zt.checkpoint=Pt.checkpoint,zt.loaded=Pt.loaded,zt.videoId=mt.VideoId,lt._saveCheckoutpoint(zt,Pt.checkpoint))}},function(mt){try{if((mt=JSON.parse(mt))&&mt.Code=="InvalidParameter"&&mt.Message.indexOf("UserId")>0){lt._invalidUserId=!0;var Pt=mt.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(Pt)}}catch(gt){console.log(gt)}})})}et&&(zt.videoInfo=et?JSON.parse(et).Vod:{},zt.userData=ve.default.encode(et)),zt.ri=ue.default.create(),this._uploadList.push(zt),this._reportLog("20001",zt,{ql:this._uploadList.length});try{this.options.addFileSuccess&&this.options.addFileSuccess(zt)}catch(tt){console.log(tt)}return!0}},{key:"deleteFile",value:function(Ge){return!!this.cancelFile(Ge)&&(this._uploadList.splice(Ge,1),!0)}},{key:"cleanList",value:function(){this.stopUpload(),this._uploadList.length=0,this._curIndex=-1}},{key:"cancelFile",value:function(Ge){if(this.options,Ge<0||Ge>=this._uploadList.length)return!1;var ft=this._uploadList[Ge];if(Ge==this._curIndex&&ft.state==he.UPLOADSTATE.UPLOADING){ft.state=he.UPLOADSTATE.CANCELED;var at=this._getCheckoutpoint(ft);at&&at.checkpoint&&(at=at.checkpoint),at&&this._ossUpload.abort(ft),this._removeCheckoutpoint(ft),this.nextUpload()}else ft.state!=he.UPLOADSTATE.SUCCESS&&(ft.state=he.UPLOADSTATE.CANCELED);return this._reportLog("20008",ft),!0}},{key:"resumeFile",value:function(Ge){if(this.options,Ge<0||Ge>=this._uploadList.length)return!1;var ft=this._uploadList[Ge];return ft.state==he.UPLOADSTATE.CANCELED&&(ft.state=he.UPLOADSTATE.INIT,!0)}},{key:"listFiles",value:function(){return this._uploadList}},{key:"getCheckpoint",value:function(Ge){return this._getCheckoutpoint({file:Ge})}},{key:"startUpload",value:function(Ge){if(this._retryCount=0,this.options,this._state==he.VODSTATE.START||this._state==he.VODSTATE.EXPIRE)return void console.log("already started or expired");if(this._initState(),this._curIndex=this._findUploadIndex(),this._curIndex==-1)return void(this._state=he.VODSTATE.END);var ft=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(ft),this._state=he.VODSTATE.START}},{key:"nextUpload",value:function(){var Ge=this.options;if(this._state==he.VODSTATE.START)if(this._curIndex=this._findUploadIndex(),this._curIndex!=-1){var ft=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(ft)}else{this._state=he.VODSTATE.END;try{Ge.onUploadEnd&&Ge.onUploadEnd(ft)}catch(at){console.log(at)}}}},{key:"clear",value:function(Ge){for(var ft=this.options,at=0,Ct=0;Ct<this._uploadList.length;Ct++)ft.uploadList[Ct].state==he.UPLOADSTATE.SUCCESS&&at++,this._uploadList[Ct].state==Ge&&(ft.uploadList.splice(Ct,1),Ct--);ft.onClear&&ft.onClear(ft.uploadList.length,at)}},{key:"stopUpload",value:function(){if((this._state==he.VODSTATE.START||this._state==he.VODSTATE.FAILURE||this._curIndex==-1)&&this._curIndex!=-1){var Ge=this._uploadList[this._curIndex];this._state=he.VODSTATE.STOP,Ge.state=he.UPLOADSTATE.STOPED,this._changeState(Ge,he.UPLOADSTATE.STOPED),this._ossUpload.cancel()}}},{key:"resumeUploadWithAuth",value:function(Ge){var ft=this;if(!Ge)return!1;var at=JSON.parse(ve.default.decode(Ge));return!!(at.AccessKeyId&&at.AccessKeySecret&&at.SecurityToken&&at.Expiration)&&ft.resumeUploadWithToken(at.AccessKeyId,at.AccessKeySecret,at.SecurityToken,at.Expiration)}},{key:"resumeUploadWithToken",value:function(Ge,ft,at,Ct){if(this.options,!(Ge&&ft&&at&&Ct)||this._state!=he.VODSTATE.EXPIRE||this._curIndex==-1)return!1;var et="";return this._uploadList.length>this._curIndex&&(et=this._uploadList[this._curIndex]),et&&(this.init(Ge,ft,at,Ct),this._state=he.VODSTATE.START,this._ossUpload=null,this._uploadCore(et,et.retry),et.retry=!1),!0}},{key:"resumeUploadWithSTSToken",value:function(Ge,ft,at){if(this._curIndex==-1||this._state!=he.VODSTATE.EXPIRE)return!1;if(this._uploadList.length>this._curIndex){var Ct=this._uploadList[this._curIndex];Ct.object?this._refreshSTSTokenUpload(Ct,Ge,ft,at):this.setSTSToken(Ct,Ge,ft,at)}}},{key:"setSTSTokenDirectlyUpload",value:function(Ge,ft,at,Ct,et){if(!(ft&&at&&Ct&&et))return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken and expiration should not be empty."),!1;this._ut="oss";var yt=Ge;this.init(ft,at,Ct,et),yt.endpoint=yt._endpoint,yt.bucket=yt._bucket,yt.object=yt._object,this._ossUpload=null,this._uploadCore(yt,Ge.retry),Ge.retry=!1}},{key:"setSTSToken",value:function(Ge,ft,at,Ct){if(!ft||!at||!Ct)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;this._ut="vod",this._uploadWay="sts";var et=Ge.videoInfo,yt={accessKeyId:ft,securityToken:Ct,accessKeySecret:at,fileName:Ge.file.name,title:et.Title,requestId:Ge.ri,region:this.options.region};et.ImageType&&(yt.imageType=et.ImageType),et.ImageExt&&(yt.imageExt=et.ImageExt),et.FileSize&&(yt.fileSize=et.FileSize),et.Description&&(yt.description=et.Description),et.CateId&&(yt.cateId=et.CateId),et.Tags&&(yt.tags=et.Tags),et.TemplateGroupId&&(yt.templateGroupId=et.TemplateGroupId),et.StorageLocation&&(yt.storageLocation=et.StorageLocation),et.CoverURL&&(yt.coverUrl=et.CoverURL),et.TransCodeMode&&(yt.transCodeMode=et.TransCodeMode),et.UserData&&(yt.userData=et.UserData);var st=this,zt="getUploadAuth";Ge.videoId?(yt.videoId=Ge.videoId,zt="refreshUploadAuth"):Ge.isImage&&(zt="getImageUploadAuth"),we.default[zt](yt,function(lt){Ge.videoId=lt.VideoId?lt.VideoId:Ge.videoId,st.setUploadAuthAndAddress(Ge,lt.UploadAuth,lt.UploadAddress),st._state=he.VODSTATE.START},function(lt){st._error(Ge,{name:lt.Code,code:lt.Code,message:lt.Message,requestId:lt.RequestId})})}},{key:"setUploadAuthAndAddress",value:function(Ge,ft,at,Ct){if(!Ge||!ft||!at)return!1;var et=JSON.parse(ve.default.decode(ft));if(!(et.AccessKeyId&&et.AccessKeySecret&&et.SecurityToken&&et.Expiration))return console.error("uploadauth is invalid"),!1;var yt={},st=Ge;if(at){if(yt=JSON.parse(ve.default.decode(at)),!yt.Endpoint||!yt.Bucket||!yt.FileName)return console.error("uploadAddress is invalid"),!1}else yt.Endpoint=st.endpoint,yt.Bucket=st.bucket,yt.FileName=st.object;this._ut="vod",this._uploadWay="vod",this.options.region=et.Region||this.options.region,this.init(et.AccessKeyId,et.AccessKeySecret,et.SecurityToken,et.Expiration),st.endpoint=st._endpoint?st._endpoint:yt.Endpoint,st.bucket=st._bucket?st._bucket:yt.Bucket,st.object=st._object?st._object:yt.FileName,st.region=this.options.region,Ct&&(st.videoId=Ct),this._ossUpload=null,this._uploadCore(st,Ge.retry),Ge.retry=!1}},{key:"_refreshSTSTokenUpload",value:function(Ge,ft,at,Ct){if(!ft||!at||!Ct)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;var et={accessKeyId:ft,securityToken:Ct,accessKeySecret:at,videoId:Ge.object,requestId:Ge.ri,region:this.options.region},yt=this,st="refreshUploadAuth";Ge.isImage&&(st="getImageUploadAuth"),we.default[st](et,function(zt){yt.setUploadAuthAndAddress(Ge,zt.UploadAuth,UploadAddress),yt._state=he.VODSTATE.START},function(zt){yt._error(Ge,{name:zt.Code,code:zt.Code,message:zt.Message,requestId:zt.RequestId})})}},{key:"_upload",value:function(Ge){var ft=arguments.length>1&&arguments[1]!==void 0&&arguments[1],at=this.options;if(Ge.retry=ft,at.onUploadstarted&&!ft)try{var Ct=this._getCheckoutpoint(Ge);Ct&&Ct.state!=he.UPLOADSTATE.UPLOADING&&(Ge.checkpoint=Ct,Ge.videoId=Ct.videoId),at.onUploadstarted(Ge)}catch(et){console.log(et)}}},{key:"_uploadCore",value:function(Ge){if(arguments.length>1&&arguments[1]!==void 0&&arguments[1],!this._ossCreditor.accessKeyId||!this._ossCreditor.accessKeySecret||!this._ossCreditor.securityToken)throw new Error("AccessKeyId\u3001AccessKeySecret\u3001securityToken should not be null");if(Ge.state=he.UPLOADSTATE.UPLOADING,!this._ossUpload){Ge.endpoint=Ge.endpoint||"http://oss-cn-hangzhou.aliyuncs.com";var ft=this;this._ossUpload=new ge.default({bucket:Ge.bucket,endpoint:Ge.endpoint,AccessKeyId:this._ossCreditor.accessKeyId,AccessKeySecret:this._ossCreditor.accessKeySecret,SecurityToken:this._ossCreditor.securityToken,timeout:this.options.timeout,cname:this.options.cname},{onerror:function(lt,tt){ft._error.call(ft,lt,tt)},oncomplete:function(lt,tt){ft._complete.call(ft,lt,tt)},onprogress:function(lt,tt,ut){ft._progress.call(ft,lt,tt,ut)}})}var at=ie.default.getFileType(Ge.file.name),Ct=this._getCheckoutpoint(Ge),et="",yt="";Ct&&Ct.checkpoint&&(yt=Ct.state,et=Ct.videoId,Ct=Ct.checkpoint),Ct&&et==Ge.videoId&&yt!=he.UPLOADSTATE.UPLOADING&&(Ct.file=Ge.file,Ge.checkpoint=Ct,Ct.uploadId);var st=this._adjustPartSize(Ge);this._reportLog("20002",Ge,{ft:at,fs:Ge.file.size,bu:Ge.bucket,ok:Ge.object,vid:Ge.videoId||"",fn:Ge.file.name,fw:null,fh:null,ps:st});var zt={headers:{"x-oss-notification":Ge.userData?Ge.userData:""},partSize:st,parallel:this.options.parallel};this._ossUpload.upload(Ge,zt)}},{key:"_findUploadIndex",value:function(){for(var Ge=-1,ft=0;ft<this._uploadList.length;ft++)if(this._uploadList[ft].state==he.UPLOADSTATE.INIT){Ge=ft;break}return Ge}},{key:"_error",value:function(Ge,ft){if(ft.name=="cancel")try{this.options.onUploadCanceled(Ge,ft)}catch(Ct){console.log(Ct)}else{if(ft.message.indexOf("InvalidAccessKeyIdError")>0||ft.name=="SignatureDoesNotMatchError"||ft.code=="SecurityTokenExpired"||ft.code=="InvalidSecurityToken.Expired"||ft.code=="InvalidAccessKeyId"&&this._ossCreditor.securityToken){if(this.options.onUploadTokenExpired){this._state=he.VODSTATE.EXPIRE,Ge.state=he.UPLOADSTATE.FAIlURE;try{this.options.onUploadTokenExpired(Ge,ft)}catch(Ct){console.log(Ct)}}return}if((ft.name=="RequestTimeoutError"||ft.name=="ConnectionTimeout"||ft.name=="ConnectionTimeoutError")&&this._retryTotal>this._retryCount){var at=this;return setTimeout(function(){at._uploadCore(Ge,!0)},1e3*at._retryDuration),void this._retryCount++}ft.name=="NoSuchUploadError"&&this._removeCheckoutpoint(Ge),this._handleError(Ge,ft)}}},{key:"_handleError",value:function(Ge,ft){var at=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],Ct=he.UPLOADSTATE.FAIlURE;if(Ge.state!=he.UPLOADSTATE.CANCELED&&(Ge.state=he.UPLOADSTATE.FAIlURE,this._state=he.VODSTATE.FAILURE,this.options.onUploadFailed&&ft&&ft.code&&ft.message))try{this.options.onUploadFailed(Ge,ft.code,ft.message)}catch(yt){console.log(yt)}if(at&&this._changeState(Ge,Ct),this._reportLog("20006",Ge,{code:ft.name,message:ft.message,requestId:ft.requestId,fs:Ge.file.size,bu:Ge.bucket,ok:Ge.object,fn:Ge.file.name}),this._reportLog("20004",Ge,{requestId:ft.requestId,fs:Ge.file.size,bu:Ge.bucket,ok:Ge.object,fn:Ge.file.name}),Ge.ri=ue.default.create(),this._findUploadIndex()!=-1){var et=this;this._state=he.VODSTATE.START,setTimeout(function(){et.nextUpload()},100)}}},{key:"_complete",value:function(Ge,ft){if(Ge.state=he.UPLOADSTATE.SUCCESS,this.options.onUploadSucceed)try{this.options.onUploadSucceed(Ge)}catch(et){console.log(et)}var at=0;ft&&ft.res&&ft.res.headers&&(at=ft.res.headers["x-oss-request-id"]),this._removeCheckoutpoint(Ge);var Ct=this;setTimeout(function(){Ct.nextUpload()},100),this._retryCount=0,this._reportLog("20003",Ge,{requestId:at})}},{key:"_progress",value:function(Ge,ft,at){if(this.options.onUploadProgress)try{Ge.loaded=ft.loaded,this.options.onUploadProgress(Ge,ft.total,ft.loaded)}catch(tt){console.log(tt)}var Ct=ft.checkpoint,et=0;Ct&&(Ge.checkpoint=Ct,this._saveCheckoutpoint(Ge,Ct,he.UPLOADSTATE.UPLOADING),et=Ct.uploadId),this._retryCount=0;var yt=this._getPortNumber(Ct),st=0;if(at&&at.headers&&(st=at.headers["x-oss-request-id"]),ft.loaded!=0&&this._reportLog("20007",Ge,{pn:yt,requestId:st}),ft.loaded!=1&&this._reportLog("20005",Ge,{UploadId:et,pn:yt+1,pr:Ge.retry?1:0,fs:Ge.file.size,bu:Ge.bucket,ok:Ge.object,fn:Ge.file.name}),!this._invalidUserId&&!Ge.isImage&&this._ut=="vod"&&this.options.enableUploadProgress){var zt={file:Ge.file,checkpoint:ft,userId:this.options.userId,videoId:Ge.videoId,region:this.options.region,fileHash:Ge.fileHash};try{var lt=this;Ae.default.upload(zt,function(){},function(tt){if((tt=JSON.parse(tt))&&tt.Code=="InvalidParameter"&&tt.Message.indexOf("UserId")>0){lt._invalidUserId=!0;var ut=tt.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(ut)}})}catch(tt){console.log(tt)}}}},{key:"_getPortNumber",value:function(Ge){if(Ge){var ft=Ge.doneParts;if(ft&&ft.length>0)return ft[ft.length-1].number}return 0}},{key:"_removeCheckoutpoint",value:function(Ge){var ft=this._getCheckoutpointKey(Ge);ce.default.remove(ft)}},{key:"_getCheckoutpoint",value:function(Ge){var ft=this._getCheckoutpointKey(Ge),at=ce.default.get(ft);if(at)try{return JSON.parse(at)}catch(Ct){}return""}},{key:"_saveCheckoutpoint",value:function(Ge,ft,at){if(ft){var Ct=this._getCheckoutpointKey(Ge),et=Ge.file,yt={fileName:et.name,lastModified:et.lastModified,size:et.size,object:Ge.object,videoId:Ge.videoId,bucket:Ge.bucket,endpoint:Ge.endpoint,checkpoint:ft,loaded:Ge.loaded,state:at};ce.default.set(Ct,JSON.stringify(yt))}}},{key:"_changeState",value:function(Ge,ft){var at=this._getCheckoutpoint(Ge);at&&((this._onbeforeunload=!0)&&(ft=he.UPLOADSTATE.STOPED),this._saveCheckoutpoint(Ge,at.checkpoint,ft))}},{key:"_getCheckoutpointKey",value:function(Ge){return"upload_"+Ge.file.lastModified+"_"+Ge.file.name+"_"+Ge.file.size}},{key:"_getCheckoutpointFromCloud",value:function(Ge,ft,at){var Ct={userId:this.options.userId,uploadInfoList:[{FileName:Ge.file.name,FileSize:Ge.file.size,FileCreateTime:Ge.file.lastModified,FileHash:Ge.fileHash}],region:this.options.region};Ae.default.get(Ct,function(et){ft(et)},at)}},{key:"_reportLog",value:function(Ge,ft,at){at||(at={}),at.ri=ft.ri,this._ut&&(at.ut=this._ut),this._log.log(Ge,at)}},{key:"_initEvent",value:function(){var Ge=this;window&&(window.onbeforeunload=function(ft){if(Ge._onbeforeunload=!0,Ge._curIndex!=-1&&Ge._uploadList.length>Ge._curIndex){var at=Ge._uploadList[Ge._curIndex];Ge._changeState(at,he.UPLOADSTATE.STOPED)}})}},{key:"_initState",value:function(){for(var Ge=0;Ge<this._uploadList.length;Ge++){var ft=this._uploadList[Ge];ft.state!=he.UPLOADSTATE.FAIlURE&&ft.state!=he.UPLOADSTATE.STOPED||(ft.state=he.UPLOADSTATE.INIT)}this._state=he.VODSTATE.INIT}},{key:"_adjustPartSize",value:function(Ge){return Ge.file.size/this.options.partSize>1e4?Ge.file.size/9999:this.options.partSize}}]),Xe}());me.default=Ze},function(Me,me,Be){"use strict";Object.defineProperty(me,"__esModule",{value:!0}),me.UPLOADSTATE={INIT:"Ready",UPLOADING:"Uploading",SUCCESS:"Success",FAIlURE:"Failure",CANCELED:"Canceled",STOPED:"Stoped"},me.VODSTATE={INIT:"Init",START:"Start",STOP:"Stop",FAILURE:"Failure",EXPIRE:"Expire",END:"End"}},function(Me,me,Be){"use strict";function ke(le){return le&&le.__esModule?le:{default:le}}function Ce(le,ve){if(!(le instanceof ve))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Le=function(){function le(ve,de){for(var ce=0;ce<de.length;ce++){var z=de[ce];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(ve,z.key,z)}}return function(ve,de,ce){return de&&le(ve.prototype,de),ce&&le(ve,ce),ve}}(),he=Be(3),ye=Be(17),xe=(ke(ye),Be(1)),ge=(ke(xe),function(){function le(ve,de){if(Ce(this,le),ve){this._config=ve,this.create(this._config),this._uploadInfo=null,this._callback={};var ce=function(){};this._callback.onerror=de.onerror||ce,this._callback.oncomplete=de.oncomplete||ce,this._callback.onprogress=de.onprogress||ce}}return Le(le,[{key:"create",value:function(ve){if(ve.endpoint=ve.endpoint||this._config.endpoint,ve.bucket=ve.bucket||this._config.bucket,!(ve.AccessKeyId&&ve.AccessKeySecret&&ve.endpoint&&ve.SecurityToken))throw new Error("AccessKeyId\u3001AccessKeySecret\u3001endpoint should not be null");var de={accessKeyId:ve.AccessKeyId,accessKeySecret:ve.AccessKeySecret,stsToken:ve.SecurityToken,endpoint:ve.endpoint||this._config.endpoint,bucket:ve.bucket||this._config.bucket,secure:!0,cname:ve.cname};ve.timeout&&(de.timeout=ve.timeout),this.oss=new OSS.Wrapper(de)}},{key:"abort",value:function(ve){if(ve.checkpoint){var de=ve.checkpoint.uploadId;this.oss.abortMultipartUpload(ve.object,de)}}},{key:"getVersion",value:function(){}},{key:"cancel",value:function(){this.oss.cancel&&this.oss.cancel()}},{key:"upload",value:function(ve,de){this._uploadInfo=ve;var ce=this,z=function(oe,ie,se){return function(ue){ce._progress(oe,ie,se),ue()}},ee={parallel:de.parallel||this._config.parallel||he.UPLOADDEFAULT.PARALLEL,partSize:de.partSize||this._config.partSize||he.UPLOADDEFAULT.PARTSIZE,progress:z};de.headers&&(ee.headers=de.headers),ve.checkpoint&&(ee.checkpoint=ve.checkpoint),ve.bucket||(this.oss.options.bucket=ve.bucket),ve.endpoint||(this.oss.options.endpoint=ve.endpoint),this.oss.multipartUpload(ve.object,ve.file,ee).then(function(oe,ie){ce._complete(oe)}).catch(function(oe){ce.oss.cancel&&(ce.oss&&ce.oss.isCancel()?console.log("oss is cancel as error"):ce.oss.cancel()),ce._error(oe)})}},{key:"header",value:function(ve,de,ce){this.oss.get(ve.object).then(function(z){de(z)}).catch(function(z){ce(z)})}},{key:"_progress",value:function(ve,de,ce){this._callback.onprogress(this._uploadInfo,{loaded:ve,total:this._uploadInfo.file.size,checkpoint:de},ce)}},{key:"_error",value:function(ve){this._callback.onerror(this._uploadInfo,ve)}},{key:"_complete",value:function(ve){this._callback.oncomplete(this._uploadInfo,ve)}}]),le}());me.default=ge},function(Me,me,Be){"use strict";function ke(he,ye){if(!(he instanceof ye))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Ce=function(){function he(ye,xe){for(var ge=0;ge<xe.length;ge++){var le=xe[ge];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(ye,le.key,le)}}return function(ye,xe,ge){return xe&&he(ye.prototype,xe),ge&&he(ye,ge),ye}}(),Le=function(){function he(){ke(this,he)}return Ce(he,null,[{key:"format",value:function(ye){if(arguments.length<2)return null;for(var xe=arguments[1],ge=1;ge<arguments.length;ge++){var le=new RegExp("\\{"+(ge-1)+"\\}","gm");xe=xe.replace(le,arguments[ge+1])}return{code:ye,message:xe}}},{key:"CODE",get:function(){return{SUCCESS:"Successful",EmptyValue:"InvalidParameter.EmptyValue",STSInvalid:"InvalidParameter.TokenInvalid",ReadFileError:"ReadFileError",FILEDUPLICATION:"FileDuplication",UploadALEADRYSTARTED:"UploadAlearyStarted"}}},{key:"MESSAGE",get:function(){return{SUCCESS:"Successful",EmptyValue:"\u53C2\u6570 {0} \u4E0D\u80FD\u4E3A\u7A7A\u3002",STSInvalid:"STS\u53C2\u6570\u975E\u6CD5\uFF0C accessKeyId\u3001accessKeySecret\u3001secretToken\u3001expireTime\u90FD\u4E0D\u80FD\u4E3A\u7A7A\u3002",ReadFileError:"\u8BFB\u53D6\u6587\u4EF6{0}{1}\u5931\u8D25.",FILEDUPLICATION:"\u6587\u4EF6\u91CD\u590D\u6DFB\u52A0 {0}",UploadALEADRYSTARTED:"\u91CD\u590D\u5F00\u59CB."}}}]),he}();me.default=Le},function(Me,me,Be){"use strict";(function(ke){function Ce(ye,xe){if(!(ye instanceof xe))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Le=function(){function ye(xe,ge){for(var le=0;le<ge.length;le++){var ve=ge[le];ve.enumerable=ve.enumerable||!1,ve.configurable=!0,"value"in ve&&(ve.writable=!0),Object.defineProperty(xe,ve.key,ve)}}return function(xe,ge,le){return ge&&ye(xe.prototype,ge),le&&ye(xe,le),xe}}(),he=function(){function ye(){Ce(this,ye)}return Le(ye,null,[{key:"encode",value:function(xe){return new ke(xe).toString("base64")}},{key:"decode",value:function(xe){return new ke(xe,"base64").toString()}}]),ye}();me.default=he}).call(me,Be(19).Buffer)},function(Me,me,Be){"use strict";(function(ke){function Ce(){return he.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Le(nt,He){if(Ce()<He)throw new RangeError("Invalid typed array length");return he.TYPED_ARRAY_SUPPORT?(nt=new Uint8Array(He),nt.__proto__=he.prototype):(nt===null&&(nt=new he(He)),nt.length=He),nt}function he(nt,He,Ie){if(!(he.TYPED_ARRAY_SUPPORT||this instanceof he))return new he(nt,He,Ie);if(typeof nt=="number"){if(typeof He=="string")throw new Error("If encoding is specified then the first argument must be a string");return le(this,nt)}return ye(this,nt,He,Ie)}function ye(nt,He,Ie,We){if(typeof He=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&He instanceof ArrayBuffer?ce(nt,He,Ie,We):typeof He=="string"?ve(nt,He,Ie):z(nt,He)}function xe(nt){if(typeof nt!="number")throw new TypeError('"size" argument must be a number');if(nt<0)throw new RangeError('"size" argument must not be negative')}function ge(nt,He,Ie,We){return xe(He),He<=0?Le(nt,He):Ie!==void 0?typeof We=="string"?Le(nt,He).fill(Ie,We):Le(nt,He).fill(Ie):Le(nt,He)}function le(nt,He){if(xe(He),nt=Le(nt,He<0?0:0|ee(He)),!he.TYPED_ARRAY_SUPPORT)for(var Ie=0;Ie<He;++Ie)nt[Ie]=0;return nt}function ve(nt,He,Ie){if(typeof Ie=="string"&&Ie!==""||(Ie="utf8"),!he.isEncoding(Ie))throw new TypeError('"encoding" must be a valid string encoding');var We=0|ie(He,Ie);nt=Le(nt,We);var Oe=nt.write(He,Ie);return Oe!==We&&(nt=nt.slice(0,Oe)),nt}function de(nt,He){var Ie=He.length<0?0:0|ee(He.length);nt=Le(nt,Ie);for(var We=0;We<Ie;We+=1)nt[We]=255&He[We];return nt}function ce(nt,He,Ie,We){if(He.byteLength,Ie<0||He.byteLength<Ie)throw new RangeError("'offset' is out of bounds");if(He.byteLength<Ie+(We||0))throw new RangeError("'length' is out of bounds");return He=Ie===void 0&&We===void 0?new Uint8Array(He):We===void 0?new Uint8Array(He,Ie):new Uint8Array(He,Ie,We),he.TYPED_ARRAY_SUPPORT?(nt=He,nt.__proto__=he.prototype):nt=de(nt,He),nt}function z(nt,He){if(he.isBuffer(He)){var Ie=0|ee(He.length);return nt=Le(nt,Ie),nt.length===0||He.copy(nt,0,0,Ie),nt}if(He){if(typeof ArrayBuffer!="undefined"&&He.buffer instanceof ArrayBuffer||"length"in He)return typeof He.length!="number"||$t(He.length)?Le(nt,0):de(nt,He);if(He.type==="Buffer"&&Bt(He.data))return de(nt,He.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function ee(nt){if(nt>=Ce())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ce().toString(16)+" bytes");return 0|nt}function oe(nt){return+nt!=nt&&(nt=0),he.alloc(+nt)}function ie(nt,He){if(he.isBuffer(nt))return nt.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(nt)||nt instanceof ArrayBuffer))return nt.byteLength;typeof nt!="string"&&(nt=""+nt);var Ie=nt.length;if(Ie===0)return 0;for(var We=!1;;)switch(He){case"ascii":case"latin1":case"binary":return Ie;case"utf8":case"utf-8":case void 0:return Jt(nt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Ie;case"hex":return Ie>>>1;case"base64":return Kt(nt).length;default:if(We)return Jt(nt).length;He=(""+He).toLowerCase(),We=!0}}function se(nt,He,Ie){var We=!1;if((He===void 0||He<0)&&(He=0),He>this.length||((Ie===void 0||Ie>this.length)&&(Ie=this.length),Ie<=0)||(Ie>>>=0,He>>>=0,Ie<=He))return"";for(nt||(nt="utf8");;)switch(nt){case"hex":return yt(this,He,Ie);case"utf8":case"utf-8":return ft(this,He,Ie);case"ascii":return Ct(this,He,Ie);case"latin1":case"binary":return et(this,He,Ie);case"base64":return Ge(this,He,Ie);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return st(this,He,Ie);default:if(We)throw new TypeError("Unknown encoding: "+nt);nt=(nt+"").toLowerCase(),We=!0}}function ue(nt,He,Ie){var We=nt[He];nt[He]=nt[Ie],nt[Ie]=We}function Se(nt,He,Ie,We,Oe){if(nt.length===0)return-1;if(typeof Ie=="string"?(We=Ie,Ie=0):Ie>2147483647?Ie=2147483647:Ie<-2147483648&&(Ie=-2147483648),Ie=+Ie,isNaN(Ie)&&(Ie=Oe?0:nt.length-1),Ie<0&&(Ie=nt.length+Ie),Ie>=nt.length){if(Oe)return-1;Ie=nt.length-1}else if(Ie<0){if(!Oe)return-1;Ie=0}if(typeof He=="string"&&(He=he.from(He,We)),he.isBuffer(He))return He.length===0?-1:we(nt,He,Ie,We,Oe);if(typeof He=="number")return He&=255,he.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Oe?Uint8Array.prototype.indexOf.call(nt,He,Ie):Uint8Array.prototype.lastIndexOf.call(nt,He,Ie):we(nt,[He],Ie,We,Oe);throw new TypeError("val must be string, number or Buffer")}function we(nt,He,Ie,We,Oe){function be(ln,gn){return Ne===1?ln[gn]:ln.readUInt16BE(gn*Ne)}var Ne=1,$e=nt.length,dt=He.length;if(We!==void 0&&((We=String(We).toLowerCase())==="ucs2"||We==="ucs-2"||We==="utf16le"||We==="utf-16le")){if(nt.length<2||He.length<2)return-1;Ne=2,$e/=2,dt/=2,Ie/=2}var Je;if(Oe){var At=-1;for(Je=Ie;Je<$e;Je++)if(be(nt,Je)===be(He,At===-1?0:Je-At)){if(At===-1&&(At=Je),Je-At+1===dt)return At*Ne}else At!==-1&&(Je-=Je-At),At=-1}else for(Ie+dt>$e&&(Ie=$e-dt),Je=Ie;Je>=0;Je--){for(var en=!0,pn=0;pn<dt;pn++)if(be(nt,Je+pn)!==be(He,pn)){en=!1;break}if(en)return Je}return-1}function Pe(nt,He,Ie,We){Ie=Number(Ie)||0;var Oe=nt.length-Ie;We?(We=Number(We))>Oe&&(We=Oe):We=Oe;var be=He.length;if(be%2!=0)throw new TypeError("Invalid hex string");We>be/2&&(We=be/2);for(var Ne=0;Ne<We;++Ne){var $e=parseInt(He.substr(2*Ne,2),16);if(isNaN($e))return Ne;nt[Ie+Ne]=$e}return Ne}function Ae(nt,He,Ie,We){return Xt(Jt(He,nt.length-Ie),nt,Ie,We)}function De(nt,He,Ie,We){return Xt(bn(He),nt,Ie,We)}function ze(nt,He,Ie,We){return De(nt,He,Ie,We)}function Ze(nt,He,Ie,We){return Xt(Kt(He),nt,Ie,We)}function Xe(nt,He,Ie,We){return Xt(Wt(He,nt.length-Ie),nt,Ie,We)}function Ge(nt,He,Ie){return He===0&&Ie===nt.length?kt.fromByteArray(nt):kt.fromByteArray(nt.slice(He,Ie))}function ft(nt,He,Ie){Ie=Math.min(nt.length,Ie);for(var We=[],Oe=He;Oe<Ie;){var be=nt[Oe],Ne=null,$e=be>239?4:be>223?3:be>191?2:1;if(Oe+$e<=Ie){var dt,Je,At,en;switch($e){case 1:be<128&&(Ne=be);break;case 2:dt=nt[Oe+1],(192&dt)==128&&(en=(31&be)<<6|63&dt)>127&&(Ne=en);break;case 3:dt=nt[Oe+1],Je=nt[Oe+2],(192&dt)==128&&(192&Je)==128&&(en=(15&be)<<12|(63&dt)<<6|63&Je)>2047&&(en<55296||en>57343)&&(Ne=en);break;case 4:dt=nt[Oe+1],Je=nt[Oe+2],At=nt[Oe+3],(192&dt)==128&&(192&Je)==128&&(192&At)==128&&(en=(15&be)<<18|(63&dt)<<12|(63&Je)<<6|63&At)>65535&&en<1114112&&(Ne=en)}}Ne===null?(Ne=65533,$e=1):Ne>65535&&(Ne-=65536,We.push(Ne>>>10&1023|55296),Ne=56320|1023&Ne),We.push(Ne),Oe+=$e}return at(We)}function at(nt){var He=nt.length;if(He<=xt)return String.fromCharCode.apply(String,nt);for(var Ie="",We=0;We<He;)Ie+=String.fromCharCode.apply(String,nt.slice(We,We+=xt));return Ie}function Ct(nt,He,Ie){var We="";Ie=Math.min(nt.length,Ie);for(var Oe=He;Oe<Ie;++Oe)We+=String.fromCharCode(127&nt[Oe]);return We}function et(nt,He,Ie){var We="";Ie=Math.min(nt.length,Ie);for(var Oe=He;Oe<Ie;++Oe)We+=String.fromCharCode(nt[Oe]);return We}function yt(nt,He,Ie){var We=nt.length;(!He||He<0)&&(He=0),(!Ie||Ie<0||Ie>We)&&(Ie=We);for(var Oe="",be=He;be<Ie;++be)Oe+=hn(nt[be]);return Oe}function st(nt,He,Ie){for(var We=nt.slice(He,Ie),Oe="",be=0;be<We.length;be+=2)Oe+=String.fromCharCode(We[be]+256*We[be+1]);return Oe}function zt(nt,He,Ie){if(nt%1!=0||nt<0)throw new RangeError("offset is not uint");if(nt+He>Ie)throw new RangeError("Trying to access beyond buffer length")}function lt(nt,He,Ie,We,Oe,be){if(!he.isBuffer(nt))throw new TypeError('"buffer" argument must be a Buffer instance');if(He>Oe||He<be)throw new RangeError('"value" argument is out of bounds');if(Ie+We>nt.length)throw new RangeError("Index out of range")}function tt(nt,He,Ie,We){He<0&&(He=65535+He+1);for(var Oe=0,be=Math.min(nt.length-Ie,2);Oe<be;++Oe)nt[Ie+Oe]=(He&255<<8*(We?Oe:1-Oe))>>>8*(We?Oe:1-Oe)}function ut(nt,He,Ie,We){He<0&&(He=4294967295+He+1);for(var Oe=0,be=Math.min(nt.length-Ie,4);Oe<be;++Oe)nt[Ie+Oe]=He>>>8*(We?Oe:3-Oe)&255}function mt(nt,He,Ie,We,Oe,be){if(Ie+We>nt.length)throw new RangeError("Index out of range");if(Ie<0)throw new RangeError("Index out of range")}function Pt(nt,He,Ie,We,Oe){return Oe||mt(nt,He,Ie,4,34028234663852886e22,-34028234663852886e22),pt.write(nt,He,Ie,We,23,4),Ie+4}function gt(nt,He,Ie,We,Oe){return Oe||mt(nt,He,Ie,8,17976931348623157e292,-17976931348623157e292),pt.write(nt,He,Ie,We,52,8),Ie+8}function Ft(nt){if(nt=Ht(nt).replace(vt,""),nt.length<2)return"";for(;nt.length%4!=0;)nt+="=";return nt}function Ht(nt){return nt.trim?nt.trim():nt.replace(/^\s+|\s+$/g,"")}function hn(nt){return nt<16?"0"+nt.toString(16):nt.toString(16)}function Jt(nt,He){He=He||1/0;for(var Ie,We=nt.length,Oe=null,be=[],Ne=0;Ne<We;++Ne){if((Ie=nt.charCodeAt(Ne))>55295&&Ie<57344){if(!Oe){if(Ie>56319){(He-=3)>-1&&be.push(239,191,189);continue}if(Ne+1===We){(He-=3)>-1&&be.push(239,191,189);continue}Oe=Ie;continue}if(Ie<56320){(He-=3)>-1&&be.push(239,191,189),Oe=Ie;continue}Ie=65536+(Oe-55296<<10|Ie-56320)}else Oe&&(He-=3)>-1&&be.push(239,191,189);if(Oe=null,Ie<128){if((He-=1)<0)break;be.push(Ie)}else if(Ie<2048){if((He-=2)<0)break;be.push(Ie>>6|192,63&Ie|128)}else if(Ie<65536){if((He-=3)<0)break;be.push(Ie>>12|224,Ie>>6&63|128,63&Ie|128)}else{if(!(Ie<1114112))throw new Error("Invalid code point");if((He-=4)<0)break;be.push(Ie>>18|240,Ie>>12&63|128,Ie>>6&63|128,63&Ie|128)}}return be}function bn(nt){for(var He=[],Ie=0;Ie<nt.length;++Ie)He.push(255&nt.charCodeAt(Ie));return He}function Wt(nt,He){for(var Ie,We,Oe,be=[],Ne=0;Ne<nt.length&&!((He-=2)<0);++Ne)Ie=nt.charCodeAt(Ne),We=Ie>>8,Oe=Ie%256,be.push(Oe),be.push(We);return be}function Kt(nt){return kt.toByteArray(Ft(nt))}function Xt(nt,He,Ie,We){for(var Oe=0;Oe<We&&!(Oe+Ie>=He.length||Oe>=nt.length);++Oe)He[Oe+Ie]=nt[Oe];return Oe}function $t(nt){return nt!==nt}var kt=Be(21),pt=Be(22),Bt=Be(23);me.Buffer=he,me.SlowBuffer=oe,me.INSPECT_MAX_BYTES=50,he.TYPED_ARRAY_SUPPORT=ke.TYPED_ARRAY_SUPPORT!==void 0?ke.TYPED_ARRAY_SUPPORT:function(){try{var nt=new Uint8Array(1);return nt.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},nt.foo()===42&&typeof nt.subarray=="function"&&nt.subarray(1,1).byteLength===0}catch(He){return!1}}(),me.kMaxLength=Ce(),he.poolSize=8192,he._augment=function(nt){return nt.__proto__=he.prototype,nt},he.from=function(nt,He,Ie){return ye(null,nt,He,Ie)},he.TYPED_ARRAY_SUPPORT&&(he.prototype.__proto__=Uint8Array.prototype,he.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&he[Symbol.species]===he&&Object.defineProperty(he,Symbol.species,{value:null,configurable:!0})),he.alloc=function(nt,He,Ie){return ge(null,nt,He,Ie)},he.allocUnsafe=function(nt){return le(null,nt)},he.allocUnsafeSlow=function(nt){return le(null,nt)},he.isBuffer=function(nt){return!(nt==null||!nt._isBuffer)},he.compare=function(nt,He){if(!he.isBuffer(nt)||!he.isBuffer(He))throw new TypeError("Arguments must be Buffers");if(nt===He)return 0;for(var Ie=nt.length,We=He.length,Oe=0,be=Math.min(Ie,We);Oe<be;++Oe)if(nt[Oe]!==He[Oe]){Ie=nt[Oe],We=He[Oe];break}return Ie<We?-1:We<Ie?1:0},he.isEncoding=function(nt){switch(String(nt).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},he.concat=function(nt,He){if(!Bt(nt))throw new TypeError('"list" argument must be an Array of Buffers');if(nt.length===0)return he.alloc(0);var Ie;if(He===void 0)for(He=0,Ie=0;Ie<nt.length;++Ie)He+=nt[Ie].length;var We=he.allocUnsafe(He),Oe=0;for(Ie=0;Ie<nt.length;++Ie){var be=nt[Ie];if(!he.isBuffer(be))throw new TypeError('"list" argument must be an Array of Buffers');be.copy(We,Oe),Oe+=be.length}return We},he.byteLength=ie,he.prototype._isBuffer=!0,he.prototype.swap16=function(){var nt=this.length;if(nt%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var He=0;He<nt;He+=2)ue(this,He,He+1);return this},he.prototype.swap32=function(){var nt=this.length;if(nt%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var He=0;He<nt;He+=4)ue(this,He,He+3),ue(this,He+1,He+2);return this},he.prototype.swap64=function(){var nt=this.length;if(nt%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var He=0;He<nt;He+=8)ue(this,He,He+7),ue(this,He+1,He+6),ue(this,He+2,He+5),ue(this,He+3,He+4);return this},he.prototype.toString=function(){var nt=0|this.length;return nt===0?"":arguments.length===0?ft(this,0,nt):se.apply(this,arguments)},he.prototype.equals=function(nt){if(!he.isBuffer(nt))throw new TypeError("Argument must be a Buffer");return this===nt||he.compare(this,nt)===0},he.prototype.inspect=function(){var nt="",He=me.INSPECT_MAX_BYTES;return this.length>0&&(nt=this.toString("hex",0,He).match(/.{2}/g).join(" "),this.length>He&&(nt+=" ... ")),"<Buffer "+nt+">"},he.prototype.compare=function(nt,He,Ie,We,Oe){if(!he.isBuffer(nt))throw new TypeError("Argument must be a Buffer");if(He===void 0&&(He=0),Ie===void 0&&(Ie=nt?nt.length:0),We===void 0&&(We=0),Oe===void 0&&(Oe=this.length),He<0||Ie>nt.length||We<0||Oe>this.length)throw new RangeError("out of range index");if(We>=Oe&&He>=Ie)return 0;if(We>=Oe)return-1;if(He>=Ie)return 1;if(He>>>=0,Ie>>>=0,We>>>=0,Oe>>>=0,this===nt)return 0;for(var be=Oe-We,Ne=Ie-He,$e=Math.min(be,Ne),dt=this.slice(We,Oe),Je=nt.slice(He,Ie),At=0;At<$e;++At)if(dt[At]!==Je[At]){be=dt[At],Ne=Je[At];break}return be<Ne?-1:Ne<be?1:0},he.prototype.includes=function(nt,He,Ie){return this.indexOf(nt,He,Ie)!==-1},he.prototype.indexOf=function(nt,He,Ie){return Se(this,nt,He,Ie,!0)},he.prototype.lastIndexOf=function(nt,He,Ie){return Se(this,nt,He,Ie,!1)},he.prototype.write=function(nt,He,Ie,We){if(He===void 0)We="utf8",Ie=this.length,He=0;else if(Ie===void 0&&typeof He=="string")We=He,Ie=this.length,He=0;else{if(!isFinite(He))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");He|=0,isFinite(Ie)?(Ie|=0,We===void 0&&(We="utf8")):(We=Ie,Ie=void 0)}var Oe=this.length-He;if((Ie===void 0||Ie>Oe)&&(Ie=Oe),nt.length>0&&(Ie<0||He<0)||He>this.length)throw new RangeError("Attempt to write outside buffer bounds");We||(We="utf8");for(var be=!1;;)switch(We){case"hex":return Pe(this,nt,He,Ie);case"utf8":case"utf-8":return Ae(this,nt,He,Ie);case"ascii":return De(this,nt,He,Ie);case"latin1":case"binary":return ze(this,nt,He,Ie);case"base64":return Ze(this,nt,He,Ie);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Xe(this,nt,He,Ie);default:if(be)throw new TypeError("Unknown encoding: "+We);We=(""+We).toLowerCase(),be=!0}},he.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var xt=4096;he.prototype.slice=function(nt,He){var Ie=this.length;nt=~~nt,He=He===void 0?Ie:~~He,nt<0?(nt+=Ie)<0&&(nt=0):nt>Ie&&(nt=Ie),He<0?(He+=Ie)<0&&(He=0):He>Ie&&(He=Ie),He<nt&&(He=nt);var We;if(he.TYPED_ARRAY_SUPPORT)We=this.subarray(nt,He),We.__proto__=he.prototype;else{var Oe=He-nt;We=new he(Oe,void 0);for(var be=0;be<Oe;++be)We[be]=this[be+nt]}return We},he.prototype.readUIntLE=function(nt,He,Ie){nt|=0,He|=0,Ie||zt(nt,He,this.length);for(var We=this[nt],Oe=1,be=0;++be<He&&(Oe*=256);)We+=this[nt+be]*Oe;return We},he.prototype.readUIntBE=function(nt,He,Ie){nt|=0,He|=0,Ie||zt(nt,He,this.length);for(var We=this[nt+--He],Oe=1;He>0&&(Oe*=256);)We+=this[nt+--He]*Oe;return We},he.prototype.readUInt8=function(nt,He){return He||zt(nt,1,this.length),this[nt]},he.prototype.readUInt16LE=function(nt,He){return He||zt(nt,2,this.length),this[nt]|this[nt+1]<<8},he.prototype.readUInt16BE=function(nt,He){return He||zt(nt,2,this.length),this[nt]<<8|this[nt+1]},he.prototype.readUInt32LE=function(nt,He){return He||zt(nt,4,this.length),(this[nt]|this[nt+1]<<8|this[nt+2]<<16)+16777216*this[nt+3]},he.prototype.readUInt32BE=function(nt,He){return He||zt(nt,4,this.length),16777216*this[nt]+(this[nt+1]<<16|this[nt+2]<<8|this[nt+3])},he.prototype.readIntLE=function(nt,He,Ie){nt|=0,He|=0,Ie||zt(nt,He,this.length);for(var We=this[nt],Oe=1,be=0;++be<He&&(Oe*=256);)We+=this[nt+be]*Oe;return Oe*=128,We>=Oe&&(We-=Math.pow(2,8*He)),We},he.prototype.readIntBE=function(nt,He,Ie){nt|=0,He|=0,Ie||zt(nt,He,this.length);for(var We=He,Oe=1,be=this[nt+--We];We>0&&(Oe*=256);)be+=this[nt+--We]*Oe;return Oe*=128,be>=Oe&&(be-=Math.pow(2,8*He)),be},he.prototype.readInt8=function(nt,He){return He||zt(nt,1,this.length),128&this[nt]?-1*(255-this[nt]+1):this[nt]},he.prototype.readInt16LE=function(nt,He){He||zt(nt,2,this.length);var Ie=this[nt]|this[nt+1]<<8;return 32768&Ie?4294901760|Ie:Ie},he.prototype.readInt16BE=function(nt,He){He||zt(nt,2,this.length);var Ie=this[nt+1]|this[nt]<<8;return 32768&Ie?4294901760|Ie:Ie},he.prototype.readInt32LE=function(nt,He){return He||zt(nt,4,this.length),this[nt]|this[nt+1]<<8|this[nt+2]<<16|this[nt+3]<<24},he.prototype.readInt32BE=function(nt,He){return He||zt(nt,4,this.length),this[nt]<<24|this[nt+1]<<16|this[nt+2]<<8|this[nt+3]},he.prototype.readFloatLE=function(nt,He){return He||zt(nt,4,this.length),pt.read(this,nt,!0,23,4)},he.prototype.readFloatBE=function(nt,He){return He||zt(nt,4,this.length),pt.read(this,nt,!1,23,4)},he.prototype.readDoubleLE=function(nt,He){return He||zt(nt,8,this.length),pt.read(this,nt,!0,52,8)},he.prototype.readDoubleBE=function(nt,He){return He||zt(nt,8,this.length),pt.read(this,nt,!1,52,8)},he.prototype.writeUIntLE=function(nt,He,Ie,We){nt=+nt,He|=0,Ie|=0,!We&<(this,nt,He,Ie,Math.pow(2,8*Ie)-1,0);var Oe=1,be=0;for(this[He]=255&nt;++be<Ie&&(Oe*=256);)this[He+be]=nt/Oe&255;return He+Ie},he.prototype.writeUIntBE=function(nt,He,Ie,We){nt=+nt,He|=0,Ie|=0,!We&<(this,nt,He,Ie,Math.pow(2,8*Ie)-1,0);var Oe=Ie-1,be=1;for(this[He+Oe]=255&nt;--Oe>=0&&(be*=256);)this[He+Oe]=nt/be&255;return He+Ie},he.prototype.writeUInt8=function(nt,He,Ie){return nt=+nt,He|=0,Ie||lt(this,nt,He,1,255,0),he.TYPED_ARRAY_SUPPORT||(nt=Math.floor(nt)),this[He]=255&nt,He+1},he.prototype.writeUInt16LE=function(nt,He,Ie){return nt=+nt,He|=0,Ie||lt(this,nt,He,2,65535,0),he.TYPED_ARRAY_SUPPORT?(this[He]=255&nt,this[He+1]=nt>>>8):tt(this,nt,He,!0),He+2},he.prototype.writeUInt16BE=function(nt,He,Ie){return nt=+nt,He|=0,Ie||lt(this,nt,He,2,65535,0),he.TYPED_ARRAY_SUPPORT?(this[He]=nt>>>8,this[He+1]=255&nt):tt(this,nt,He,!1),He+2},he.prototype.writeUInt32LE=function(nt,He,Ie){return nt=+nt,He|=0,Ie||lt(this,nt,He,4,4294967295,0),he.TYPED_ARRAY_SUPPORT?(this[He+3]=nt>>>24,this[He+2]=nt>>>16,this[He+1]=nt>>>8,this[He]=255&nt):ut(this,nt,He,!0),He+4},he.prototype.writeUInt32BE=function(nt,He,Ie){return nt=+nt,He|=0,Ie||lt(this,nt,He,4,4294967295,0),he.TYPED_ARRAY_SUPPORT?(this[He]=nt>>>24,this[He+1]=nt>>>16,this[He+2]=nt>>>8,this[He+3]=255&nt):ut(this,nt,He,!1),He+4},he.prototype.writeIntLE=function(nt,He,Ie,We){if(nt=+nt,He|=0,!We){var Oe=Math.pow(2,8*Ie-1);lt(this,nt,He,Ie,Oe-1,-Oe)}var be=0,Ne=1,$e=0;for(this[He]=255&nt;++be<Ie&&(Ne*=256);)nt<0&&$e===0&&this[He+be-1]!==0&&($e=1),this[He+be]=(nt/Ne>>0)-$e&255;return He+Ie},he.prototype.writeIntBE=function(nt,He,Ie,We){if(nt=+nt,He|=0,!We){var Oe=Math.pow(2,8*Ie-1);lt(this,nt,He,Ie,Oe-1,-Oe)}var be=Ie-1,Ne=1,$e=0;for(this[He+be]=255&nt;--be>=0&&(Ne*=256);)nt<0&&$e===0&&this[He+be+1]!==0&&($e=1),this[He+be]=(nt/Ne>>0)-$e&255;return He+Ie},he.prototype.writeInt8=function(nt,He,Ie){return nt=+nt,He|=0,Ie||lt(this,nt,He,1,127,-128),he.TYPED_ARRAY_SUPPORT||(nt=Math.floor(nt)),nt<0&&(nt=255+nt+1),this[He]=255&nt,He+1},he.prototype.writeInt16LE=function(nt,He,Ie){return nt=+nt,He|=0,Ie||lt(this,nt,He,2,32767,-32768),he.TYPED_ARRAY_SUPPORT?(this[He]=255&nt,this[He+1]=nt>>>8):tt(this,nt,He,!0),He+2},he.prototype.writeInt16BE=function(nt,He,Ie){return nt=+nt,He|=0,Ie||lt(this,nt,He,2,32767,-32768),he.TYPED_ARRAY_SUPPORT?(this[He]=nt>>>8,this[He+1]=255&nt):tt(this,nt,He,!1),He+2},he.prototype.writeInt32LE=function(nt,He,Ie){return nt=+nt,He|=0,Ie||lt(this,nt,He,4,2147483647,-2147483648),he.TYPED_ARRAY_SUPPORT?(this[He]=255&nt,this[He+1]=nt>>>8,this[He+2]=nt>>>16,this[He+3]=nt>>>24):ut(this,nt,He,!0),He+4},he.prototype.writeInt32BE=function(nt,He,Ie){return nt=+nt,He|=0,Ie||lt(this,nt,He,4,2147483647,-2147483648),nt<0&&(nt=4294967295+nt+1),he.TYPED_ARRAY_SUPPORT?(this[He]=nt>>>24,this[He+1]=nt>>>16,this[He+2]=nt>>>8,this[He+3]=255&nt):ut(this,nt,He,!1),He+4},he.prototype.writeFloatLE=function(nt,He,Ie){return Pt(this,nt,He,!0,Ie)},he.prototype.writeFloatBE=function(nt,He,Ie){return Pt(this,nt,He,!1,Ie)},he.prototype.writeDoubleLE=function(nt,He,Ie){return gt(this,nt,He,!0,Ie)},he.prototype.writeDoubleBE=function(nt,He,Ie){return gt(this,nt,He,!1,Ie)},he.prototype.copy=function(nt,He,Ie,We){if(Ie||(Ie=0),We||We===0||(We=this.length),He>=nt.length&&(He=nt.length),He||(He=0),We>0&&We<Ie&&(We=Ie),We===Ie||nt.length===0||this.length===0)return 0;if(He<0)throw new RangeError("targetStart out of bounds");if(Ie<0||Ie>=this.length)throw new RangeError("sourceStart out of bounds");if(We<0)throw new RangeError("sourceEnd out of bounds");We>this.length&&(We=this.length),nt.length-He<We-Ie&&(We=nt.length-He+Ie);var Oe,be=We-Ie;if(this===nt&&Ie<He&&He<We)for(Oe=be-1;Oe>=0;--Oe)nt[Oe+He]=this[Oe+Ie];else if(be<1e3||!he.TYPED_ARRAY_SUPPORT)for(Oe=0;Oe<be;++Oe)nt[Oe+He]=this[Oe+Ie];else Uint8Array.prototype.set.call(nt,this.subarray(Ie,Ie+be),He);return be},he.prototype.fill=function(nt,He,Ie,We){if(typeof nt=="string"){if(typeof He=="string"?(We=He,He=0,Ie=this.length):typeof Ie=="string"&&(We=Ie,Ie=this.length),nt.length===1){var Oe=nt.charCodeAt(0);Oe<256&&(nt=Oe)}if(We!==void 0&&typeof We!="string")throw new TypeError("encoding must be a string");if(typeof We=="string"&&!he.isEncoding(We))throw new TypeError("Unknown encoding: "+We)}else typeof nt=="number"&&(nt&=255);if(He<0||this.length<He||this.length<Ie)throw new RangeError("Out of range index");if(Ie<=He)return this;He>>>=0,Ie=Ie===void 0?this.length:Ie>>>0,nt||(nt=0);var be;if(typeof nt=="number")for(be=He;be<Ie;++be)this[be]=nt;else{var Ne=he.isBuffer(nt)?nt:Jt(new he(nt,We).toString()),$e=Ne.length;for(be=0;be<Ie-He;++be)this[be+He]=Ne[be%$e]}return this};var vt=/[^+\/0-9A-Za-z-_]/g}).call(me,Be(20))},function(Me,me){var Be;Be=function(){return this}();try{Be=Be||Function("return this")()||(0,eval)("this")}catch(ke){typeof window=="object"&&(Be=window)}Me.exports=Be},function(Me,me,Be){"use strict";function ke(ee){var oe=ee.length;if(oe%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return ee[oe-2]==="="?2:ee[oe-1]==="="?1:0}function Ce(ee){return 3*ee.length/4-ke(ee)}function Le(ee){var oe,ie,se,ue,Se,we=ee.length;ue=ke(ee),Se=new ve(3*we/4-ue),ie=ue>0?we-4:we;var Pe=0;for(oe=0;oe<ie;oe+=4)se=le[ee.charCodeAt(oe)]<<18|le[ee.charCodeAt(oe+1)]<<12|le[ee.charCodeAt(oe+2)]<<6|le[ee.charCodeAt(oe+3)],Se[Pe++]=se>>16&255,Se[Pe++]=se>>8&255,Se[Pe++]=255&se;return ue===2?(se=le[ee.charCodeAt(oe)]<<2|le[ee.charCodeAt(oe+1)]>>4,Se[Pe++]=255&se):ue===1&&(se=le[ee.charCodeAt(oe)]<<10|le[ee.charCodeAt(oe+1)]<<4|le[ee.charCodeAt(oe+2)]>>2,Se[Pe++]=se>>8&255,Se[Pe++]=255&se),Se}function he(ee){return ge[ee>>18&63]+ge[ee>>12&63]+ge[ee>>6&63]+ge[63&ee]}function ye(ee,oe,ie){for(var se,ue=[],Se=oe;Se<ie;Se+=3)se=(ee[Se]<<16)+(ee[Se+1]<<8)+ee[Se+2],ue.push(he(se));return ue.join("")}function xe(ee){for(var oe,ie=ee.length,se=ie%3,ue="",Se=[],we=0,Pe=ie-se;we<Pe;we+=16383)Se.push(ye(ee,we,we+16383>Pe?Pe:we+16383));return se===1?(oe=ee[ie-1],ue+=ge[oe>>2],ue+=ge[oe<<4&63],ue+="=="):se===2&&(oe=(ee[ie-2]<<8)+ee[ie-1],ue+=ge[oe>>10],ue+=ge[oe>>4&63],ue+=ge[oe<<2&63],ue+="="),Se.push(ue),Se.join("")}me.byteLength=Ce,me.toByteArray=Le,me.fromByteArray=xe;for(var ge=[],le=[],ve=typeof Uint8Array!="undefined"?Uint8Array:Array,de="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ce=0,z=de.length;ce<z;++ce)ge[ce]=de[ce],le[de.charCodeAt(ce)]=ce;le[45]=62,le[95]=63},function(Me,me){me.read=function(Be,ke,Ce,Le,he){var ye,xe,ge=8*he-Le-1,le=(1<<ge)-1,ve=le>>1,de=-7,ce=Ce?he-1:0,z=Ce?-1:1,ee=Be[ke+ce];for(ce+=z,ye=ee&(1<<-de)-1,ee>>=-de,de+=ge;de>0;ye=256*ye+Be[ke+ce],ce+=z,de-=8);for(xe=ye&(1<<-de)-1,ye>>=-de,de+=Le;de>0;xe=256*xe+Be[ke+ce],ce+=z,de-=8);if(ye===0)ye=1-ve;else{if(ye===le)return xe?NaN:1/0*(ee?-1:1);xe+=Math.pow(2,Le),ye-=ve}return(ee?-1:1)*xe*Math.pow(2,ye-Le)},me.write=function(Be,ke,Ce,Le,he,ye){var xe,ge,le,ve=8*ye-he-1,de=(1<<ve)-1,ce=de>>1,z=he===23?Math.pow(2,-24)-Math.pow(2,-77):0,ee=Le?0:ye-1,oe=Le?1:-1,ie=ke<0||ke===0&&1/ke<0?1:0;for(ke=Math.abs(ke),isNaN(ke)||ke===1/0?(ge=isNaN(ke)?1:0,xe=de):(xe=Math.floor(Math.log(ke)/Math.LN2),ke*(le=Math.pow(2,-xe))<1&&(xe--,le*=2),ke+=xe+ce>=1?z/le:z*Math.pow(2,1-ce),ke*le>=2&&(xe++,le/=2),xe+ce>=de?(ge=0,xe=de):xe+ce>=1?(ge=(ke*le-1)*Math.pow(2,he),xe+=ce):(ge=ke*Math.pow(2,ce-1)*Math.pow(2,he),xe=0));he>=8;Be[Ce+ee]=255&ge,ee+=oe,ge/=256,he-=8);for(xe=xe<<he|ge,ve+=he;ve>0;Be[Ce+ee]=255&xe,ee+=oe,xe/=256,ve-=8);Be[Ce+ee-oe]|=128*ie}},function(Me,me){var Be={}.toString;Me.exports=Array.isArray||function(ke){return Be.call(ke)=="[object Array]"}},function(Me,me,Be){"use strict";function ke(he,ye){if(!(he instanceof ye))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Ce=function(){function he(ye,xe){for(var ge=0;ge<xe.length;ge++){var le=xe[ge];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(ye,le.key,le)}}return function(ye,xe,ge){return xe&&he(ye.prototype,xe),ge&&he(ye,ge),ye}}(),Le=function(){function he(){ke(this,he)}return Ce(he,null,[{key:"set",value:function(ye,xe){try{window.localStorage&&localStorage.setItem(ye,xe)}catch(ge){window[ye+"_localStorage"]=xe}}},{key:"get",value:function(ye){try{if(window.localStorage)return localStorage.getItem(ye)}catch(xe){return window[ye+"_localStorage"]}return""}},{key:"remove",value:function(ye){try{window.localStorage&&localStorage.removeItem(ye)}catch(xe){delete window[ye+"_localStorage"]}}}]),he}();me.default=Le},function(Me,me,Be){"use strict";function ke(he,ye){if(!(he instanceof ye))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Ce=function(){function he(ye,xe){for(var ge=0;ge<xe.length;ge++){var le=xe[ge];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(ye,le.key,le)}}return function(ye,xe,ge){return xe&&he(ye.prototype,xe),ge&&he(ye,ge),ye}}(),Le=function(){function he(){ke(this,he)}return Ce(he,null,[{key:"get",value:function(ye){for(var xe=ye+"",ge=document.cookie.split(";"),le=0;le<ge.length;le++){var ve=ge[le].trim();if(ve.indexOf(xe)==0)return unescape(ve.substring(xe.length+1,ve.length))}return""}},{key:"set",value:function(ye,xe,ge){var le=new Date;le.setTime(le.getTime()+24*ge*60*60*1e3);var ve="expires="+le.toGMTString();document.cookie=ye+"="+escape(xe)+"; "+ve}}]),he}();me.default=Le},function(Me,me,Be){"use strict";function ke(ve){return ve&&ve.__esModule?ve:{default:ve}}function Ce(ve,de){if(!(ve instanceof de))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Le=function(){function ve(de,ce){for(var z=0;z<ce.length;z++){var ee=ce[z];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(de,ee.key,ee)}}return function(de,ce,z){return ce&&ve(de.prototype,ce),z&&ve(de,z),de}}(),he=Be(8),ye=ke(he),xe=Be(9),ge=ke(xe),le=function(){function ve(){Ce(this,ve)}return Le(ve,null,[{key:"refreshUploadAuth",value:function(de,ce,z){var ee=(ge.default.randomUUID(),ge.default.randomUUID()),oe={AccessKeyId:de.accessKeyId,SecurityToken:de.securityToken,Action:"RefreshUploadVideo",VideoId:de.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:ee,RequestId:de.requestId},ie=ge.default.makeUTF8sort(oe,"=","&")+"&Signature="+ge.default.aliyunEncodeURI(ge.default.makeChangeSiga(oe,de.accessKeySecret)),se="https://vod."+de.region+".aliyuncs.com/?"+ie;ye.default.get(se,function(Se){var Se=JSON.parse(Se);ce&&ce(Se)},function(ue){if(z){var Se=JSON.parse(ue);z(Se)}})}},{key:"getUploadAuth",value:function(de,ce,z){var ee=(ge.default.randomUUID(),ge.default.randomUUID()),oe={AccessKeyId:de.accessKeyId,SecurityToken:de.securityToken,Action:"CreateUploadVideo",Title:de.title,FileName:de.fileName,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:ee,RequestId:de.requestId};de.fileSize&&(oe.FileSize=de.fileSize),de.description&&(oe.Description=de.description),de.cateId&&(oe.CateId=de.cateId),de.tags&&(oe.Tags=de.tags),de.templateGroupId&&(oe.TemplateGroupId=de.templateGroupId),de.storageLocation&&(oe.StorageLocation=de.storageLocation),de.coverUrl&&(oe.CoverURL=de.coverUrl),de.transCodeMode&&(oe.TransCodeMode=de.transCodeMode),de.userData&&(oe.UserData=JSON.stringify(de.userData));var ie=ge.default.makeUTF8sort(oe,"=","&")+"&Signature="+ge.default.aliyunEncodeURI(ge.default.makeChangeSiga(oe,de.accessKeySecret)),se="https://vod."+de.region+".aliyuncs.com/?"+ie;ye.default.get(se,function(ue){try{ue=JSON.parse(ue)}catch(Se){if(z)return void z({Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"})}ce&&ce(ue)},function(ue){if(z){var Se={Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"};try{Se=JSON.parse(ue)}catch(we){}z(Se)}})}},{key:"getImageUploadAuth",value:function(de,ce,z){var ee=(ge.default.randomUUID(),ge.default.randomUUID()),oe={AccessKeyId:de.accessKeyId,SecurityToken:de.securityToken,Action:"CreateUploadImage",ImageType:de.imageType?de.imageType:"default",Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:ee,RequestId:de.requestId};de.title&&(oe.Title=de.title),de.imageExt&&(oe.ImageExt=de.imageExt),de.tags&&(oe.Tags=de.tags),de.storageLocation&&(oe.StorageLocation=de.storageLocation);var ie=ge.default.makeUTF8sort(oe,"=","&")+"&Signature="+ge.default.aliyunEncodeURI(ge.default.makeChangeSiga(oe,de.accessKeySecret)),se="https://vod."+de.region+".aliyuncs.com/?"+ie;ye.default.get(se,function(ue){ue=JSON.parse(ue),ce&&ce(ue)},function(ue){if(z){var Se=JSON.parse(ue);z(Se)}})}}]),ve}();me.default=le},function(Me,me,Be){(function(ke,Ce,Le){Me.exports=me=Ce(Be(0),Be(28),Be(29))})(0,function(ke){return ke.HmacSHA1})},function(Me,me,Be){(function(ke,Ce){Me.exports=me=Ce(Be(0))})(0,function(ke){return function(){var Ce=ke,Le=Ce.lib,he=Le.WordArray,ye=Le.Hasher,xe=Ce.algo,ge=[],le=xe.SHA1=ye.extend({_doReset:function(){this._hash=new he.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(ve,de){for(var ce=this._hash.words,z=ce[0],ee=ce[1],oe=ce[2],ie=ce[3],se=ce[4],ue=0;ue<80;ue++){if(ue<16)ge[ue]=0|ve[de+ue];else{var Se=ge[ue-3]^ge[ue-8]^ge[ue-14]^ge[ue-16];ge[ue]=Se<<1|Se>>>31}var we=(z<<5|z>>>27)+se+ge[ue];we+=ue<20?1518500249+(ee&oe|~ee&ie):ue<40?1859775393+(ee^oe^ie):ue<60?(ee&oe|ee&ie|oe&ie)-1894007588:(ee^oe^ie)-899497514,se=ie,ie=oe,oe=ee<<30|ee>>>2,ee=z,z=we}ce[0]=ce[0]+z|0,ce[1]=ce[1]+ee|0,ce[2]=ce[2]+oe|0,ce[3]=ce[3]+ie|0,ce[4]=ce[4]+se|0},_doFinalize:function(){var ve=this._data,de=ve.words,ce=8*this._nDataBytes,z=8*ve.sigBytes;return de[z>>>5]|=128<<24-z%32,de[14+(z+64>>>9<<4)]=Math.floor(ce/4294967296),de[15+(z+64>>>9<<4)]=ce,ve.sigBytes=4*de.length,this._process(),this._hash},clone:function(){var ve=ye.clone.call(this);return ve._hash=this._hash.clone(),ve}});Ce.SHA1=ye._createHelper(le),Ce.HmacSHA1=ye._createHmacHelper(le)}(),ke.SHA1})},function(Me,me,Be){(function(ke,Ce){Me.exports=me=Ce(Be(0))})(0,function(ke){(function(){var Ce=ke,Le=Ce.lib,he=Le.Base,ye=Ce.enc,xe=ye.Utf8,ge=Ce.algo;ge.HMAC=he.extend({init:function(le,ve){le=this._hasher=new le.init,typeof ve=="string"&&(ve=xe.parse(ve));var de=le.blockSize,ce=4*de;ve.sigBytes>ce&&(ve=le.finalize(ve)),ve.clamp();for(var z=this._oKey=ve.clone(),ee=this._iKey=ve.clone(),oe=z.words,ie=ee.words,se=0;se<de;se++)oe[se]^=1549556828,ie[se]^=909522486;z.sigBytes=ee.sigBytes=ce,this.reset()},reset:function(){var le=this._hasher;le.reset(),le.update(this._iKey)},update:function(le){return this._hasher.update(le),this},finalize:function(le){var ve=this._hasher,de=ve.finalize(le);return ve.reset(),ve.finalize(this._oKey.clone().concat(de))}})})()})},function(Me,me,Be){(function(ke,Ce){Me.exports=me=Ce(Be(0))})(0,function(ke){return function(){function Ce(ge,le,ve){for(var de=[],ce=0,z=0;z<le;z++)if(z%4){var ee=ve[ge.charCodeAt(z-1)]<<z%4*2,oe=ve[ge.charCodeAt(z)]>>>6-z%4*2;de[ce>>>2]|=(ee|oe)<<24-ce%4*8,ce++}return ye.create(de,ce)}var Le=ke,he=Le.lib,ye=he.WordArray,xe=Le.enc;xe.Base64={stringify:function(ge){var le=ge.words,ve=ge.sigBytes,de=this._map;ge.clamp();for(var ce=[],z=0;z<ve;z+=3)for(var ee=le[z>>>2]>>>24-z%4*8&255,oe=le[z+1>>>2]>>>24-(z+1)%4*8&255,ie=le[z+2>>>2]>>>24-(z+2)%4*8&255,se=ee<<16|oe<<8|ie,ue=0;ue<4&&z+.75*ue<ve;ue++)ce.push(de.charAt(se>>>6*(3-ue)&63));var Se=de.charAt(64);if(Se)for(;ce.length%4;)ce.push(Se);return ce.join("")},parse:function(ge){var le=ge.length,ve=this._map,de=this._reverseMap;if(!de){de=this._reverseMap=[];for(var ce=0;ce<ve.length;ce++)de[ve.charCodeAt(ce)]=ce}var z=ve.charAt(64);if(z){var ee=ge.indexOf(z);ee!==-1&&(le=ee)}return Ce(ge,le,de)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),ke.enc.Base64})},function(Me,me,Be){"use strict";function ke(Pe){return Pe&&Pe.__esModule?Pe:{default:Pe}}function Ce(Pe,Ae){if(!(Pe instanceof Ae))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Le=function(){function Pe(Ae,De){for(var ze=0;ze<De.length;ze++){var Ze=De[ze];Ze.enumerable=Ze.enumerable||!1,Ze.configurable=!0,"value"in Ze&&(Ze.writable=!0),Object.defineProperty(Ae,Ze.key,Ze)}}return function(Ae,De,ze){return De&&Pe(Ae.prototype,De),ze&&Pe(Ae,ze),Ae}}(),he=Be(8),ye=ke(he),xe=Be(7),ge=ke(xe),le=Be(4),ve=ke(le),de=Be(6),ce=ke(de),z=Be(1),ee=ke(z),oe=Be(9),ie=ke(oe),se=Be(2),ue=Be(11),Se=Be(10),we=function(){function Pe(){Ce(this,Pe)}return Le(Pe,null,[{key:"getAuthInfo",value:function(Ae,De,ze){var Ze=Ae+"|f#Ylm&^1TppeRhLg|"+ze;return De&&(Ze=Ae+"|"+De+"|f#Ylm&^1TppeRhLg|"+ze),se(Se.parse(Ze)).toString(ue)}},{key:"upload",value:function(Ae,De,ze){var Ze=ee.default.ISODateString(new Date),Xe=Math.floor(new Date().valueOf()/1e3),Ge=ve.default.getClientId();Ge=ve.default.setClientId(Ge);var ft=Pe.getAuthInfo(Ae.userId,Ge,Xe),at=ie.default.randomUUID(),Ct={Source:"WebSDK",BusinessType:"UploadVideo",Action:"ReportUploadProgress",TerminalType:"H5",DeviceModel:ge.default.browser.name+(ge.default.browser.version||""),AppVersion:ce.default.version,AuthTimestamp:Xe,Timestamp:Ze,AuthInfo:ft,FileName:Ae.file.name,FileSize:Ae.file.size,FileCreateTime:Ae.file.lastModified,FileHash:Ae.fileHash,UploadId:Ae.checkpoint.checkpoint.uploadId,PartSize:Ae.checkpoint.checkpoint.partSize,DonePartsCount:Ae.checkpoint.checkpoint.doneParts.length,UploadPoint:JSON.stringify(Ae.checkpoint),UploadRatio:Ae.checkpoint.loaded,UserId:Ae.userId,VideoId:Ae.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:at};Ge&&(Ct.ClientId=Ge);var et=ie.default.makeUTF8sort(Ct,"=","&")+"&Signature="+ie.default.aliyunEncodeURI(ie.default.makeChangeSiga(Ct,Ae.accessKeySecret)),yt="https://vod."+Ae.region+".aliyuncs.com/?"+et;ye.default.get(yt,function(st){De&&De()},function(st){st&&(ze(st),console.log(st))})}},{key:"get",value:function(Ae,De,ze){var Ze=ee.default.ISODateString(new Date),Xe=Math.floor(new Date().valueOf()/1e3),Ge=ve.default.getClientId(),ft=Pe.getAuthInfo(Ae.userId,Ge,Xe),at=ie.default.randomUUID(),Ct={Source:"WebSDK",BusinessType:"UploadVideo",Action:"GetUploadProgress",TerminalType:"H5",DeviceModel:ge.default.browser.name+(ge.default.browser.version||""),AppVersion:ce.default.version,AuthTimestamp:Xe,Timestamp:Ze,AuthInfo:ft,UserId:Ae.userId,UploadInfoList:JSON.stringify(Ae.uploadInfoList),Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:at};Ge&&(Ct.ClientId=Ge);var et=ie.default.makeUTF8sort(Ct,"=","&")+"&Signature="+ie.default.aliyunEncodeURI(ie.default.makeChangeSiga(Ct,Ae.accessKeySecret)),yt="https://vod."+Ae.region+".aliyuncs.com/?"+et;ye.default.get(yt,function(st){var zt={},lt=Ge;st=st?JSON.parse(st):{},st.UploadProgress&&st.UploadProgress.UploadProgressList&&st.UploadProgress.UploadProgressList.length>0&&(zt=st.UploadProgress.UploadProgressList[0],lt=zt.ClientId),ve.default.setClientId(lt),De&&De(zt)},function(st){st&&(ze(st),console.log(st))})}}]),Pe}();me.default=we},function(Me,me,Be){"use strict";function ke(xe,ge){if(!(xe instanceof ge))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Ce=function(){function xe(ge,le){for(var ve=0;ve<le.length;ve++){var de=le[ve];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),Object.defineProperty(ge,de.key,de)}}return function(ge,le,ve){return le&&xe(ge.prototype,le),ve&&xe(ge,ve),ge}}(),Le=Be(2),he=Be(33),ye=(Be(11),function(){function xe(){ke(this,xe)}return Ce(xe,null,[{key:"getMd5",value:function(ge,le,ve){var de=new FileReader;de.onload=function(ee){try{if(ee&&ee.target){var oe=Le(he.parse(ee.target.result)),ie=oe.toString();le(ie)}}catch(se){console.log(se)}},de.onerror=function(ee){console.log(ee),errorCallback(ee)};var ce=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,z=ce.call(ge,0,1024);de.readAsBinaryString(z)}}]),xe}());me.default=ye},function(Me,me,Be){(function(ke,Ce){Me.exports=me=Ce(Be(0))})(0,function(ke){return ke.enc.Latin1})}])},50371:function(_n,qt){"use strict";function Ee(){const Me=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let me=1;me<arguments.length;me++){const Be=me<0||arguments.length<=me?void 0:arguments[me];Be&&Object.keys(Be).forEach(ke=>{const Ce=Be[ke];Ce!==void 0&&(Me[ke]=Ce)})}return Me}qt.Z=Ee},13845:function(_n,qt,Ee){"use strict";Ee.d(qt,{F:function(){return Me},Z:function(){return me}});function Me(Be){return Be!=null&&Be===Be.window}function me(Be,ke){var Ce,Le;if(typeof window=="undefined")return 0;const he=ke?"scrollTop":"scrollLeft";let ye=0;return Me(Be)?ye=Be[ke?"pageYOffset":"pageXOffset"]:Be instanceof Document?ye=Be.documentElement[he]:(Be instanceof HTMLElement||Be)&&(ye=Be[he]),Be&&!Me(Be)&&typeof ye!="number"&&(ye=(Le=((Ce=Be.ownerDocument)!==null&&Ce!==void 0?Ce:Be).documentElement)===null||Le===void 0?void 0:Le[he]),ye}},56762:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return me}});var Me=Ee(59301);function me(){const[,Be]=Me.useReducer(ke=>ke+1,0);return Be}},68031:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ke}});var Me=Ee(16089);function me(Ce,Le,he,ye){const xe=he-Le;return Ce/=ye/2,Ce<1?xe/2*Ce*Ce*Ce+Le:xe/2*((Ce-=2)*Ce*Ce+2)+Le}var Be=Ee(13845);function ke(Ce){let Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:he=()=>window,callback:ye,duration:xe=450}=Le,ge=he(),le=(0,Be.Z)(ge,!0),ve=Date.now(),de=()=>{const z=Date.now()-ve,ee=me(z>xe?xe:z,le,Ce,xe);(0,Be.F)(ge)?ge.scrollTo(window.pageXOffset,ee):ge instanceof Document||ge.constructor.name==="HTMLDocument"?ge.documentElement.scrollTop=ee:ge.scrollTop=ee,z<xe?(0,Me.Z)(de):typeof ye=="function"&&ye()};(0,Me.Z)(de)}},24905:function(_n,qt,Ee){"use strict";Ee.d(qt,{default:function(){return Ae}});var Me=Ee(92310),me=Ee.n(Me),Be=Ee(5630),ke=Ee(59301),Ce=Ee(36355),Le=Ee(1684),he=Ee(32441),xe=ke.createContext(null),ge=Ee(98447),le=Ee(14088),ve=Ee(4572),de=function(De,ze){var Ze={};for(var Xe in De)Object.prototype.hasOwnProperty.call(De,Xe)&&ze.indexOf(Xe)<0&&(Ze[Xe]=De[Xe]);if(De!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ge=0,Xe=Object.getOwnPropertySymbols(De);Ge<Xe.length;Ge++)ze.indexOf(Xe[Ge])<0&&Object.prototype.propertyIsEnumerable.call(De,Xe[Ge])&&(Ze[Xe[Ge]]=De[Xe[Ge]]);return Ze};const ce=(De,ze)=>{var Ze;const{prefixCls:Xe,className:Ge,rootClassName:ft,children:at,indeterminate:Ct=!1,style:et,onMouseEnter:yt,onMouseLeave:st,skipGroup:zt=!1,disabled:lt}=De,tt=de(De,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:ut,direction:mt,checkbox:Pt}=ke.useContext(Ce.E_),gt=ke.useContext(xe),{isFormItemInput:Ft}=ke.useContext(he.aM),Ht=ke.useContext(Le.Z),hn=(Ze=(gt==null?void 0:gt.disabled)||lt)!==null&&Ze!==void 0?Ze:Ht,Jt=ke.useRef(tt.value);ke.useEffect(()=>{gt==null||gt.registerValue(tt.value)},[]),ke.useEffect(()=>{if(!zt)return tt.value!==Jt.current&&(gt==null||gt.cancelValue(Jt.current),gt==null||gt.registerValue(tt.value),Jt.current=tt.value),()=>gt==null?void 0:gt.cancelValue(tt.value)},[tt.value]);const bn=ut("checkbox",Xe),[Wt,Kt]=(0,ge.ZP)(bn),Xt=Object.assign({},tt);gt&&!zt&&(Xt.onChange=function(){tt.onChange&&tt.onChange.apply(tt,arguments),gt.toggleOption&>.toggleOption({label:at,value:tt.value})},Xt.name=gt.name,Xt.checked=gt.value.includes(tt.value));const $t=me()(`${bn}-wrapper`,{[`${bn}-rtl`]:mt==="rtl",[`${bn}-wrapper-checked`]:Xt.checked,[`${bn}-wrapper-disabled`]:hn,[`${bn}-wrapper-in-form-item`]:Ft},Pt==null?void 0:Pt.className,Ge,ft,Kt),kt=me()({[`${bn}-indeterminate`]:Ct},ve.A,Kt),pt=Ct?"mixed":void 0;return Wt(ke.createElement(le.Z,{component:"Checkbox",disabled:hn},ke.createElement("label",{className:$t,style:Object.assign(Object.assign({},Pt==null?void 0:Pt.style),et),onMouseEnter:yt,onMouseLeave:st},ke.createElement(Be.Z,Object.assign({"aria-checked":pt},Xt,{prefixCls:bn,className:kt,disabled:hn,ref:ze})),at!==void 0&&ke.createElement("span",null,at))))};var ee=ke.forwardRef(ce),oe=Ee(80702),ie=Ee(2738),se=function(De,ze){var Ze={};for(var Xe in De)Object.prototype.hasOwnProperty.call(De,Xe)&&ze.indexOf(Xe)<0&&(Ze[Xe]=De[Xe]);if(De!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ge=0,Xe=Object.getOwnPropertySymbols(De);Ge<Xe.length;Ge++)ze.indexOf(Xe[Ge])<0&&Object.prototype.propertyIsEnumerable.call(De,Xe[Ge])&&(Ze[Xe[Ge]]=De[Xe[Ge]]);return Ze};const ue=(De,ze)=>{const{defaultValue:Ze,children:Xe,options:Ge=[],prefixCls:ft,className:at,rootClassName:Ct,style:et,onChange:yt}=De,st=se(De,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:zt,direction:lt}=ke.useContext(Ce.E_),[tt,ut]=ke.useState(st.value||Ze||[]),[mt,Pt]=ke.useState([]);ke.useEffect(()=>{"value"in st&&ut(st.value||[])},[st.value]);const gt=ke.useMemo(()=>Ge.map(Bt=>typeof Bt=="string"||typeof Bt=="number"?{label:Bt,value:Bt}:Bt),[Ge]),Ft=Bt=>{Pt(xt=>xt.filter(vt=>vt!==Bt))},Ht=Bt=>{Pt(xt=>[].concat((0,oe.Z)(xt),[Bt]))},hn=Bt=>{const xt=tt.indexOf(Bt.value),vt=(0,oe.Z)(tt);xt===-1?vt.push(Bt.value):vt.splice(xt,1),"value"in st||ut(vt),yt==null||yt(vt.filter(nt=>mt.includes(nt)).sort((nt,He)=>{const Ie=gt.findIndex(Oe=>Oe.value===nt),We=gt.findIndex(Oe=>Oe.value===He);return Ie-We}))},Jt=zt("checkbox",ft),bn=`${Jt}-group`,[Wt,Kt]=(0,ge.ZP)(Jt),Xt=(0,ie.Z)(st,["value","disabled"]),$t=Ge.length?gt.map(Bt=>ke.createElement(ee,{prefixCls:Jt,key:Bt.value.toString(),disabled:"disabled"in Bt?Bt.disabled:st.disabled,value:Bt.value,checked:tt.includes(Bt.value),onChange:Bt.onChange,className:`${bn}-item`,style:Bt.style,title:Bt.title},Bt.label)):Xe,kt={toggleOption:hn,value:tt,disabled:st.disabled,name:st.name,registerValue:Ht,cancelValue:Ft},pt=me()(bn,{[`${bn}-rtl`]:lt==="rtl"},at,Ct,Kt);return Wt(ke.createElement("div",Object.assign({className:pt,style:et},Xt,{ref:ze}),ke.createElement(xe.Provider,{value:kt},$t)))},Se=ke.forwardRef(ue);var we=ke.memo(Se);const Pe=ee;Pe.Group=we,Pe.__ANT_CHECKBOX=!0;var Ae=Pe},98447:function(_n,qt,Ee){"use strict";Ee.d(qt,{C2:function(){return Ce}});var Me=Ee(17313),me=Ee(37613),Be=Ee(83116);const ke=Le=>{const{checkboxCls:he}=Le,ye=`${he}-wrapper`;return[{[`${he}-group`]:Object.assign(Object.assign({},(0,Me.Wf)(Le)),{display:"inline-flex",flexWrap:"wrap",columnGap:Le.marginXS,[`> ${Le.antCls}-row`]:{flex:1}}),[ye]:Object.assign(Object.assign({},(0,Me.Wf)(Le)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${ye}`]:{marginInlineStart:0},[`&${ye}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[he]:Object.assign(Object.assign({},(0,Me.Wf)(Le)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:Le.borderRadiusSM,alignSelf:"center",[`${he}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${he}-inner`]:Object.assign({},(0,Me.oN)(Le))},[`${he}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:Le.checkboxSize,height:Le.checkboxSize,direction:"ltr",backgroundColor:Le.colorBgContainer,border:`${Le.lineWidth}px ${Le.lineType} ${Le.colorBorder}`,borderRadius:Le.borderRadiusSM,borderCollapse:"separate",transition:`all ${Le.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:Le.checkboxSize/14*5,height:Le.checkboxSize/14*8,border:`${Le.lineWidthBold}px solid ${Le.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${Le.motionDurationFast} ${Le.motionEaseInBack}, opacity ${Le.motionDurationFast}`}},"& + span":{paddingInlineStart:Le.paddingXS,paddingInlineEnd:Le.paddingXS}})},{[`
|
|
|
${ye}:not(${ye}-disabled),
|
|
|
${he}:not(${he}-disabled)
|
|
|
`]:{[`&:hover ${he}-inner`]:{borderColor:Le.colorPrimary}},[`${ye}:not(${ye}-disabled)`]:{[`&:hover ${he}-checked:not(${he}-disabled) ${he}-inner`]:{backgroundColor:Le.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${he}-checked:not(${he}-disabled):after`]:{borderColor:Le.colorPrimaryHover}}},{[`${he}-checked`]:{[`${he}-inner`]:{backgroundColor:Le.colorPrimary,borderColor:Le.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${Le.motionDurationMid} ${Le.motionEaseOutBack} ${Le.motionDurationFast}`}}},[`
|
|
|
${ye}-checked:not(${ye}-disabled),
|
|
|
${he}-checked:not(${he}-disabled)
|
|
|
`]:{[`&:hover ${he}-inner`]:{backgroundColor:Le.colorPrimaryHover,borderColor:"transparent"}}},{[he]:{"&-indeterminate":{[`${he}-inner`]:{backgroundColor:Le.colorBgContainer,borderColor:Le.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:Le.fontSizeLG/2,height:Le.fontSizeLG/2,backgroundColor:Le.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${ye}-disabled`]:{cursor:"not-allowed"},[`${he}-disabled`]:{[`&, ${he}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${he}-inner`]:{background:Le.colorBgContainerDisabled,borderColor:Le.colorBorder,"&:after":{borderColor:Le.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:Le.colorTextDisabled},[`&${he}-indeterminate ${he}-inner::after`]:{background:Le.colorTextDisabled}}}]};function Ce(Le,he){const ye=(0,me.TS)(he,{checkboxCls:`.${Le}`,checkboxSize:he.controlInteractiveSize});return[ke(ye)]}qt.ZP=(0,Be.Z)("Checkbox",(Le,he)=>{let{prefixCls:ye}=he;return[Ce(ye,Le)]})},93891:function(_n,qt,Ee){"use strict";var Me=Ee(59301),me=Ee(36355),Be=Ee(64165);const ke=Ce=>{const{componentName:Le}=Ce,{getPrefixCls:he}=(0,Me.useContext)(me.E_),ye=he("empty");switch(Le){case"Table":case"List":return Me.createElement(Be.Z,{image:Be.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return Me.createElement(Be.Z,{image:Be.Z.PRESENTED_IMAGE_SIMPLE,className:`${ye}-small`});default:return Me.createElement(Be.Z,null)}};qt.Z=ke},43428:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Wt}});var Me=Ee(92310),me=Ee.n(Me),Be=Ee(77321),ke=Ee(52487),Ce=Ee(43403),Le=Ee(34280),he=Ee(59301),ye=he.createContext(null),xe=he.createContext({}),ge=ye,le=Ee(49618),ve=Ee(72308),de=Ee(77900),ce=Ee(10228),z=Ee(26112),ee=Ee(70425),oe=function(Xt){var $t=Xt.prefixCls,kt=Xt.className,pt=Xt.style,Bt=Xt.children,xt=Xt.containerRef,vt=Xt.id,nt=Xt.onMouseEnter,He=Xt.onMouseOver,Ie=Xt.onMouseLeave,We=Xt.onClick,Oe=Xt.onKeyDown,be=Xt.onKeyUp,Ne={onMouseEnter:nt,onMouseOver:He,onMouseLeave:Ie,onClick:We,onKeyDown:Oe,onKeyUp:be},$e=he.useContext(xe),dt=$e.panel,Je=(0,ee.useComposeRef)(dt,xt);return he.createElement(he.Fragment,null,he.createElement("div",(0,ve.Z)({id:vt,className:me()("".concat($t,"-content"),kt),style:(0,Be.Z)({},pt),"aria-modal":"true",role:"dialog",ref:Je},Ne),Bt))},ie=oe,se=Ee(48736);function ue(Kt){return typeof Kt=="string"&&String(Number(Kt))===Kt?((0,se.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Kt)):Kt}function Se(Kt){warning(!("wrapperClassName"in Kt),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Kt.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var we={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Pe(Kt,Xt){var $t,kt,pt,Bt,xt=Kt.prefixCls,vt=Kt.open,nt=Kt.placement,He=Kt.inline,Ie=Kt.push,We=Kt.forceRender,Oe=Kt.autoFocus,be=Kt.keyboard,Ne=Kt.rootClassName,$e=Kt.rootStyle,dt=Kt.zIndex,Je=Kt.className,At=Kt.id,en=Kt.style,pn=Kt.motion,ln=Kt.width,gn=Kt.height,Un=Kt.children,An=Kt.contentWrapperStyle,ni=Kt.mask,ai=Kt.maskClosable,ki=Kt.maskMotion,Ci=Kt.maskClassName,Ki=Kt.maskStyle,ir=Kt.afterOpenChange,sr=Kt.onClose,Ji=Kt.onMouseEnter,Fr=Kt.onMouseOver,Mr=Kt.onMouseLeave,vi=Kt.onClick,wr=Kt.onKeyDown,Tr=Kt.onKeyUp,it=he.useRef(),Rr=he.useRef(),Or=he.useRef();he.useImperativeHandle(Xt,function(){return it.current});var Ur=function(on){var Nt=on.keyCode,un=on.shiftKey;switch(Nt){case ce.Z.TAB:{if(Nt===ce.Z.TAB){if(!un&&document.activeElement===Or.current){var Mn;(Mn=Rr.current)===null||Mn===void 0||Mn.focus({preventScroll:!0})}else if(un&&document.activeElement===Rr.current){var Dn;(Dn=Or.current)===null||Dn===void 0||Dn.focus({preventScroll:!0})}}break}case ce.Z.ESC:{sr&&be&&(on.stopPropagation(),sr(on));break}}};he.useEffect(function(){if(vt&&Oe){var mn;(mn=it.current)===null||mn===void 0||mn.focus({preventScroll:!0})}},[vt]);var uo=he.useState(!1),po=(0,ke.Z)(uo,2),io=po[0],Do=po[1],Xn=he.useContext(ge),Ke;Ie===!1?Ke={distance:0}:Ie===!0?Ke={}:Ke=Ie||{};var qe=($t=(kt=(pt=Ke)===null||pt===void 0?void 0:pt.distance)!==null&&kt!==void 0?kt:Xn==null?void 0:Xn.pushDistance)!==null&&$t!==void 0?$t:180,Ye=he.useMemo(function(){return{pushDistance:qe,push:function(){Do(!0)},pull:function(){Do(!1)}}},[qe]);he.useEffect(function(){if(vt){var mn;Xn==null||(mn=Xn.push)===null||mn===void 0||mn.call(Xn)}else{var on;Xn==null||(on=Xn.pull)===null||on===void 0||on.call(Xn)}},[vt]),he.useEffect(function(){return function(){var mn;Xn==null||(mn=Xn.pull)===null||mn===void 0||mn.call(Xn)}},[]);var St=ni&&he.createElement(de.default,(0,ve.Z)({key:"mask"},ki,{visible:vt}),function(mn,on){var Nt=mn.className,un=mn.style;return he.createElement("div",{className:me()("".concat(xt,"-mask"),Nt,Ci),style:(0,Be.Z)((0,Be.Z)({},un),Ki),onClick:ai&&vt?sr:void 0,ref:on})}),Ot=typeof pn=="function"?pn(nt):pn,Tt={};if(io&&qe)switch(nt){case"top":Tt.transform="translateY(".concat(qe,"px)");break;case"bottom":Tt.transform="translateY(".concat(-qe,"px)");break;case"left":Tt.transform="translateX(".concat(qe,"px)");break;default:Tt.transform="translateX(".concat(-qe,"px)");break}nt==="left"||nt==="right"?Tt.width=ue(ln):Tt.height=ue(gn);var _t={onMouseEnter:Ji,onMouseOver:Fr,onMouseLeave:Mr,onClick:vi,onKeyDown:wr,onKeyUp:Tr},dn=he.createElement(de.default,(0,ve.Z)({key:"panel"},Ot,{visible:vt,forceRender:We,onVisibleChanged:function(on){ir==null||ir(on)},removeOnLeave:!1,leavedClassName:"".concat(xt,"-content-wrapper-hidden")}),function(mn,on){var Nt=mn.className,un=mn.style;return he.createElement("div",(0,ve.Z)({className:me()("".concat(xt,"-content-wrapper"),Nt),style:(0,Be.Z)((0,Be.Z)((0,Be.Z)({},Tt),un),An)},(0,z.Z)(Kt,{data:!0})),he.createElement(ie,(0,ve.Z)({id:At,containerRef:on,prefixCls:xt,className:Je,style:en},_t),Un))}),Pn=(0,Be.Z)({},$e);return dt&&(Pn.zIndex=dt),he.createElement(ge.Provider,{value:Ye},he.createElement("div",{className:me()(xt,"".concat(xt,"-").concat(nt),Ne,(Bt={},(0,le.Z)(Bt,"".concat(xt,"-open"),vt),(0,le.Z)(Bt,"".concat(xt,"-inline"),He),Bt)),style:Pn,tabIndex:-1,ref:it,onKeyDown:Ur},St,he.createElement("div",{tabIndex:0,ref:Rr,style:we,"aria-hidden":"true","data-sentinel":"start"}),dn,he.createElement("div",{tabIndex:0,ref:Or,style:we,"aria-hidden":"true","data-sentinel":"end"})))}var Ae=he.forwardRef(Pe),De=Ae,ze=function(Xt){var $t=Xt.open,kt=$t===void 0?!1:$t,pt=Xt.prefixCls,Bt=pt===void 0?"rc-drawer":pt,xt=Xt.placement,vt=xt===void 0?"right":xt,nt=Xt.autoFocus,He=nt===void 0?!0:nt,Ie=Xt.keyboard,We=Ie===void 0?!0:Ie,Oe=Xt.width,be=Oe===void 0?378:Oe,Ne=Xt.mask,$e=Ne===void 0?!0:Ne,dt=Xt.maskClosable,Je=dt===void 0?!0:dt,At=Xt.getContainer,en=Xt.forceRender,pn=Xt.afterOpenChange,ln=Xt.destroyOnClose,gn=Xt.onMouseEnter,Un=Xt.onMouseOver,An=Xt.onMouseLeave,ni=Xt.onClick,ai=Xt.onKeyDown,ki=Xt.onKeyUp,Ci=Xt.panelRef,Ki=he.useState(!1),ir=(0,ke.Z)(Ki,2),sr=ir[0],Ji=ir[1],Fr=he.useState(!1),Mr=(0,ke.Z)(Fr,2),vi=Mr[0],wr=Mr[1];(0,Le.Z)(function(){wr(!0)},[]);var Tr=vi?kt:!1,it=he.useRef(),Rr=he.useRef();(0,Le.Z)(function(){Tr&&(Rr.current=document.activeElement)},[Tr]);var Or=function(Do){var Xn;if(Ji(Do),pn==null||pn(Do),!Do&&Rr.current&&!((Xn=it.current)!==null&&Xn!==void 0&&Xn.contains(Rr.current))){var Ke;(Ke=Rr.current)===null||Ke===void 0||Ke.focus({preventScroll:!0})}},Ur=he.useMemo(function(){return{panel:Ci}},[Ci]);if(!en&&!sr&&!Tr&&ln)return null;var uo={onMouseEnter:gn,onMouseOver:Un,onMouseLeave:An,onClick:ni,onKeyDown:ai,onKeyUp:ki},po=(0,Be.Z)((0,Be.Z)({},Xt),{},{open:Tr,prefixCls:Bt,placement:vt,autoFocus:He,keyboard:We,width:be,mask:$e,maskClosable:Je,inline:At===!1,afterOpenChange:Or,ref:it},uo);return he.createElement(xe.Provider,{value:Ur},he.createElement(Ce.Z,{open:Tr||en||sr,autoDestroy:!1,getContainer:At,autoLock:$e&&(Tr||sr)},he.createElement(De,po)))},Ze=ze,Xe=Ze,Ge=Ee(62892),ft=Ee(36355),at=Ee(32441),Ct=Ee(47729),yt=Kt=>{const{prefixCls:Xt,title:$t,footer:kt,extra:pt,closeIcon:Bt,closable:xt,onClose:vt,headerStyle:nt,drawerStyle:He,bodyStyle:Ie,footerStyle:We,children:Oe}=Kt,be=he.useCallback(At=>he.createElement("button",{type:"button",onClick:vt,"aria-label":"Close",className:`${Xt}-close`},At),[vt]),[Ne,$e]=(0,Ct.Z)(xt,Bt,be,void 0,!0),dt=he.useMemo(()=>!$t&&!Ne?null:he.createElement("div",{style:nt,className:me()(`${Xt}-header`,{[`${Xt}-header-close-only`]:Ne&&!$t&&!pt})},he.createElement("div",{className:`${Xt}-header-title`},$e,$t&&he.createElement("div",{className:`${Xt}-title`},$t)),pt&&he.createElement("div",{className:`${Xt}-extra`},pt)),[Ne,$e,pt,nt,Xt,$t]),Je=he.useMemo(()=>{if(!kt)return null;const At=`${Xt}-footer`;return he.createElement("div",{className:At,style:We},kt)},[kt,We,Xt]);return he.createElement("div",{className:`${Xt}-wrapper-body`,style:He},dt,he.createElement("div",{className:`${Xt}-body`,style:Ie},Oe),Je)},st=Ee(33234),zt=Ee(83116),lt=Ee(37613),ut=Kt=>{const{componentCls:Xt,motionDurationSlow:$t}=Kt,kt={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${$t}`}}};return{[Xt]:{[`${Xt}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${$t}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${Xt}-panel-motion`]:{"&-left":[kt,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[kt,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[kt,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[kt,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}};const mt=Kt=>{const{componentCls:Xt,zIndexPopup:$t,colorBgMask:kt,colorBgElevated:pt,motionDurationSlow:Bt,motionDurationMid:xt,padding:vt,paddingLG:nt,fontSizeLG:He,lineHeightLG:Ie,lineWidth:We,lineType:Oe,colorSplit:be,marginSM:Ne,colorIcon:$e,colorIconHover:dt,colorText:Je,fontWeightStrong:At,footerPaddingBlock:en,footerPaddingInline:pn}=Kt,ln=`${Xt}-content-wrapper`;return{[Xt]:{position:"fixed",inset:0,zIndex:$t,pointerEvents:"none","&-pure":{position:"relative",background:pt,[`&${Xt}-left`]:{boxShadow:Kt.boxShadowDrawerLeft},[`&${Xt}-right`]:{boxShadow:Kt.boxShadowDrawerRight},[`&${Xt}-top`]:{boxShadow:Kt.boxShadowDrawerUp},[`&${Xt}-bottom`]:{boxShadow:Kt.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${Xt}-mask`]:{position:"absolute",inset:0,zIndex:$t,background:kt,pointerEvents:"auto"},[ln]:{position:"absolute",zIndex:$t,maxWidth:"100vw",transition:`all ${Bt}`,"&-hidden":{display:"none"}},[`&-left > ${ln}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:Kt.boxShadowDrawerLeft},[`&-right > ${ln}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:Kt.boxShadowDrawerRight},[`&-top > ${ln}`]:{top:0,insetInline:0,boxShadow:Kt.boxShadowDrawerUp},[`&-bottom > ${ln}`]:{bottom:0,insetInline:0,boxShadow:Kt.boxShadowDrawerDown},[`${Xt}-content`]:{width:"100%",height:"100%",overflow:"auto",background:pt,pointerEvents:"auto"},[`${Xt}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${Xt}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${vt}px ${nt}px`,fontSize:He,lineHeight:Ie,borderBottom:`${We}px ${Oe} ${be}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${Xt}-extra`]:{flex:"none"},[`${Xt}-close`]:{display:"inline-block",marginInlineEnd:Ne,color:$e,fontWeight:At,fontSize:He,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${xt}`,textRendering:"auto","&:focus, &:hover":{color:dt,textDecoration:"none"}},[`${Xt}-title`]:{flex:1,margin:0,color:Je,fontWeight:Kt.fontWeightStrong,fontSize:He,lineHeight:Ie},[`${Xt}-body`]:{flex:1,minWidth:0,minHeight:0,padding:nt,overflow:"auto"},[`${Xt}-footer`]:{flexShrink:0,padding:`${en}px ${pn}px`,borderTop:`${We}px ${Oe} ${be}`},"&-rtl":{direction:"rtl"}}}};var Pt=(0,zt.Z)("Drawer",Kt=>{const Xt=(0,lt.TS)(Kt,{});return[mt(Xt),ut(Xt)]},Kt=>({zIndexPopup:Kt.zIndexPopupBase,footerPaddingBlock:Kt.paddingXS,footerPaddingInline:Kt.padding})),gt=Ee(11575),Ft=function(Kt,Xt){var $t={};for(var kt in Kt)Object.prototype.hasOwnProperty.call(Kt,kt)&&Xt.indexOf(kt)<0&&($t[kt]=Kt[kt]);if(Kt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pt=0,kt=Object.getOwnPropertySymbols(Kt);pt<kt.length;pt++)Xt.indexOf(kt[pt])<0&&Object.prototype.propertyIsEnumerable.call(Kt,kt[pt])&&($t[kt[pt]]=Kt[kt[pt]]);return $t};const Ht=null,hn={distance:180},Jt=Kt=>{var Xt;const{rootClassName:$t,width:kt,height:pt,size:Bt="default",mask:xt=!0,push:vt=hn,open:nt,afterOpenChange:He,onClose:Ie,prefixCls:We,getContainer:Oe,style:be,className:Ne,visible:$e,afterVisibleChange:dt}=Kt,Je=Ft(Kt,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange"]),{getPopupContainer:At,getPrefixCls:en,direction:pn,drawer:ln}=he.useContext(ft.E_),gn=en("drawer",We),[Un,An]=Pt(gn),ni=Oe===void 0&&At?()=>At(document.body):Oe,ai=me()({"no-mask":!xt,[`${gn}-rtl`]:pn==="rtl"},$t,An),ki=he.useMemo(()=>kt!=null?kt:Bt==="large"?736:378,[kt,Bt]),Ci=he.useMemo(()=>pt!=null?pt:Bt==="large"?736:378,[pt,Bt]),Ki={motionName:(0,Ge.m)(gn,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},ir=Ji=>({motionName:(0,Ge.m)(gn,`panel-motion-${Ji}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),sr=(0,gt.H)();return Un(he.createElement(st.BR,null,he.createElement(at.Ux,{status:!0,override:!0},he.createElement(Xe,Object.assign({prefixCls:gn,onClose:Ie,maskMotion:Ki,motion:ir},Je,{open:nt!=null?nt:$e,mask:xt,push:vt,width:ki,height:Ci,style:Object.assign(Object.assign({},ln==null?void 0:ln.style),be),className:me()(ln==null?void 0:ln.className,Ne),rootClassName:ai,getContainer:ni,afterOpenChange:He!=null?He:dt,panelRef:sr}),he.createElement(yt,Object.assign({prefixCls:gn},Je,{onClose:Ie}))))))},bn=Kt=>{const{prefixCls:Xt,style:$t,className:kt,placement:pt="right"}=Kt,Bt=Ft(Kt,["prefixCls","style","className","placement"]),{getPrefixCls:xt}=he.useContext(ft.E_),vt=xt("drawer",Xt),[nt,He]=Pt(vt),Ie=me()(vt,`${vt}-pure`,`${vt}-${pt}`,He,kt);return nt(he.createElement("div",{className:Ie,style:$t},he.createElement(yt,Object.assign({prefixCls:vt},Bt))))};Jt._InternalPanelDoNotUseOrYouWillBeFired=bn;var Wt=Jt},91857:function(_n,qt,Ee){"use strict";var Me=Ee(59301),me=Ee(38819),Be=Ee(92310),ke=Ee.n(Be),Ce=Ee(31561),Le=Ee(70425),he=Ee(18929),ye=Ee(2738),xe=Ee(79676),ge=Ee(53487),le=Ee(92343),ve=Ee(36355),de=Ee(20834),ce=Ee(40875),z=Ee(88088),ee=Ee(47211);const oe=null,ie=we=>{const{menu:Pe,arrow:Ae,prefixCls:De,children:ze,trigger:Ze,disabled:Xe,dropdownRender:Ge,getPopupContainer:ft,overlayClassName:at,rootClassName:Ct,open:et,onOpenChange:yt,visible:st,onVisibleChange:zt,mouseEnterDelay:lt=.15,mouseLeaveDelay:tt=.1,autoAdjustOverflow:ut=!0,placement:mt="",overlay:Pt,transitionName:gt}=we,{getPopupContainer:Ft,getPrefixCls:Ht,direction:hn}=Me.useContext(ve.E_),Jt=Me.useMemo(()=>{const Ne=Ht();return gt!==void 0?gt:mt.includes("top")?`${Ne}-slide-down`:`${Ne}-slide-up`},[Ht,mt,gt]),bn=Me.useMemo(()=>mt?mt.includes("Center")?mt.slice(0,mt.indexOf("Center")):mt:hn==="rtl"?"bottomRight":"bottomLeft",[mt,hn]),Wt=Ht("dropdown",De),[Kt,Xt]=(0,ee.Z)(Wt),[,$t]=(0,z.Z)(),kt=Me.Children.only(ze),pt=(0,le.Tm)(kt,{className:ke()(`${Wt}-trigger`,{[`${Wt}-rtl`]:hn==="rtl"},kt.props.className),disabled:Xe}),Bt=Xe?[]:Ze;let xt;Bt&&Bt.includes("contextMenu")&&(xt=!0);const[vt,nt]=(0,he.Z)(!1,{value:et!=null?et:st}),He=(0,Le.useEvent)(Ne=>{yt==null||yt(Ne),zt==null||zt(Ne),nt(Ne)}),Ie=ke()(at,Ct,Xt,{[`${Wt}-rtl`]:hn==="rtl"}),We=(0,xe.Z)({arrowPointAtCenter:typeof Ae=="object"&&Ae.pointAtCenter,autoAdjustOverflow:ut,offset:$t.marginXXS,arrowWidth:Ae?$t.sizePopupArrow:0,borderRadius:$t.borderRadius}),Oe=Me.useCallback(()=>{nt(!1)},[]),be=()=>{let Ne;return Pe!=null&&Pe.items?Ne=Me.createElement(de.default,Object.assign({},Pe)):typeof Pt=="function"?Ne=Pt():Ne=Pt,Ge&&(Ne=Ge(Ne)),Ne=Me.Children.only(typeof Ne=="string"?Me.createElement("span",null,Ne):Ne),Me.createElement(ce.J,{prefixCls:`${Wt}-menu`,expandIcon:Me.createElement("span",{className:`${Wt}-menu-submenu-arrow`},Me.createElement(me.Z,{className:`${Wt}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Oe,validator:$e=>{let{mode:dt}=$e}},Ne)};return Kt(Me.createElement(Ce.Z,Object.assign({alignPoint:xt},(0,ye.Z)(we,["rootClassName"]),{mouseEnterDelay:lt,mouseLeaveDelay:tt,visible:vt,builtinPlacements:We,arrow:!!Ae,overlayClassName:Ie,prefixCls:Wt,getPopupContainer:ft||Ft,transitionName:Jt,trigger:Bt,overlay:be,placement:bn,onVisibleChange:He}),pt))};function se(we){return Object.assign(Object.assign({},we),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const ue=(0,ge.Z)(ie,"dropdown",we=>we,se),Se=we=>Me.createElement(ue,Object.assign({},we),Me.createElement("span",null));ie._InternalPanelDoNotUseOrYouWillBeFired=Se,qt.Z=ie},38854:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return z}});var Me=Ee(91857),me=Ee(92310),Be=Ee.n(me),ke=Ee(59301),Ce=Ee(18785),Le=Ee(3113),he=Ee(36355),ye=Ee(81327),xe=Ee(33234),ge=Ee(47211),le=function(ee,oe){var ie={};for(var se in ee)Object.prototype.hasOwnProperty.call(ee,se)&&oe.indexOf(se)<0&&(ie[se]=ee[se]);if(ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ue=0,se=Object.getOwnPropertySymbols(ee);ue<se.length;ue++)oe.indexOf(se[ue])<0&&Object.prototype.propertyIsEnumerable.call(ee,se[ue])&&(ie[se[ue]]=ee[se[ue]]);return ie};const ve=ee=>{const{getPopupContainer:oe,getPrefixCls:ie,direction:se}=ke.useContext(he.E_),{prefixCls:ue,type:Se="default",danger:we,disabled:Pe,loading:Ae,onClick:De,htmlType:ze,children:Ze,className:Xe,menu:Ge,arrow:ft,autoFocus:at,overlay:Ct,trigger:et,align:yt,open:st,onOpenChange:zt,placement:lt,getPopupContainer:tt,href:ut,icon:mt=ke.createElement(Ce.Z,null),title:Pt,buttonsRender:gt=be=>be,mouseEnterDelay:Ft,mouseLeaveDelay:Ht,overlayClassName:hn,overlayStyle:Jt,destroyPopupOnHide:bn,dropdownRender:Wt}=ee,Kt=le(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"]),Xt=ie("dropdown",ue),$t=`${Xt}-button`,[kt,pt]=(0,ge.Z)(Xt),Bt={menu:Ge,arrow:ft,autoFocus:at,align:yt,disabled:Pe,trigger:Pe?[]:et,onOpenChange:zt,getPopupContainer:tt||oe,mouseEnterDelay:Ft,mouseLeaveDelay:Ht,overlayClassName:hn,overlayStyle:Jt,destroyPopupOnHide:bn,dropdownRender:Wt},{compactSize:xt,compactItemClassnames:vt}=(0,xe.ri)(Xt,se),nt=Be()($t,vt,Xe,pt);"overlay"in ee&&(Bt.overlay=Ct),"open"in ee&&(Bt.open=st),"placement"in ee?Bt.placement=lt:Bt.placement=se==="rtl"?"bottomLeft":"bottomRight";const He=ke.createElement(Le.ZP,{type:Se,danger:we,disabled:Pe,loading:Ae,onClick:De,htmlType:ze,href:ut,title:Pt},Ze),Ie=ke.createElement(Le.ZP,{type:Se,danger:we,icon:mt}),[We,Oe]=gt([He,Ie]);return kt(ke.createElement(ye.Z.Compact,Object.assign({className:nt,size:xt,block:!0},Kt),We,ke.createElement(Me.Z,Object.assign({},Bt),Oe)))};ve.__ANT_BUTTON=!0;var de=ve;const ce=Me.Z;ce.Button=de;var z=ce},47211:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return le}});var Me=Ee(17313),me=Ee(13826),Be=Ee(92899),ke=Ee(29878),Ce=Ee(19447),Le=Ee(83116),he=Ee(37613),xe=ve=>{const{componentCls:de,menuCls:ce,colorError:z,colorTextLightSolid:ee}=ve,oe=`${ce}-item`;return{[`${de}, ${de}-menu-submenu`]:{[`${ce} ${oe}`]:{[`&${oe}-danger:not(${oe}-disabled)`]:{color:z,"&:hover":{color:ee,backgroundColor:z}}}}}};const ge=ve=>{const{componentCls:de,menuCls:ce,zIndexPopup:z,dropdownArrowDistance:ee,sizePopupArrow:oe,antCls:ie,iconCls:se,motionDurationMid:ue,dropdownPaddingVertical:Se,fontSize:we,dropdownEdgeChildPadding:Pe,colorTextDisabled:Ae,fontSizeIcon:De,controlPaddingHorizontal:ze,colorBgElevated:Ze}=ve;return[{[de]:Object.assign(Object.assign({},(0,Me.Wf)(ve)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:z,display:"block","&::before":{position:"absolute",insetBlock:-ee+oe/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${ie}-btn`]:{[`& > ${se}-down, & > ${ie}-btn-icon > ${se}-down`]:{fontSize:De}},[`${de}-wrap`]:{position:"relative",[`${ie}-btn > ${se}-down`]:{fontSize:De},[`${se}-down::before`]:{transition:`transform ${ue}`}},[`${de}-wrap-open`]:{[`${se}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${ie}-slide-down-enter${ie}-slide-down-enter-active${de}-placement-bottomLeft,
|
|
|
&${ie}-slide-down-appear${ie}-slide-down-appear-active${de}-placement-bottomLeft,
|
|
|
&${ie}-slide-down-enter${ie}-slide-down-enter-active${de}-placement-bottom,
|
|
|
&${ie}-slide-down-appear${ie}-slide-down-appear-active${de}-placement-bottom,
|
|
|
&${ie}-slide-down-enter${ie}-slide-down-enter-active${de}-placement-bottomRight,
|
|
|
&${ie}-slide-down-appear${ie}-slide-down-appear-active${de}-placement-bottomRight`]:{animationName:me.fJ},[`&${ie}-slide-up-enter${ie}-slide-up-enter-active${de}-placement-topLeft,
|
|
|
&${ie}-slide-up-appear${ie}-slide-up-appear-active${de}-placement-topLeft,
|
|
|
&${ie}-slide-up-enter${ie}-slide-up-enter-active${de}-placement-top,
|
|
|
&${ie}-slide-up-appear${ie}-slide-up-appear-active${de}-placement-top,
|
|
|
&${ie}-slide-up-enter${ie}-slide-up-enter-active${de}-placement-topRight,
|
|
|
&${ie}-slide-up-appear${ie}-slide-up-appear-active${de}-placement-topRight`]:{animationName:me.Qt},[`&${ie}-slide-down-leave${ie}-slide-down-leave-active${de}-placement-bottomLeft,
|
|
|
&${ie}-slide-down-leave${ie}-slide-down-leave-active${de}-placement-bottom,
|
|
|
&${ie}-slide-down-leave${ie}-slide-down-leave-active${de}-placement-bottomRight`]:{animationName:me.Uw},[`&${ie}-slide-up-leave${ie}-slide-up-leave-active${de}-placement-topLeft,
|
|
|
&${ie}-slide-up-leave${ie}-slide-up-leave-active${de}-placement-top,
|
|
|
&${ie}-slide-up-leave${ie}-slide-up-leave-active${de}-placement-topRight`]:{animationName:me.ly}})},(0,Ce.ZP)(ve,{colorBg:Ze,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${de} ${ce}`]:{position:"relative",margin:0},[`${ce}-submenu-popup`]:{position:"absolute",zIndex:z,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${de}, ${de}-menu-submenu`]:{[ce]:Object.assign(Object.assign({padding:Pe,listStyleType:"none",backgroundColor:Ze,backgroundClip:"padding-box",borderRadius:ve.borderRadiusLG,outline:"none",boxShadow:ve.boxShadowSecondary},(0,Me.Qy)(ve)),{[`${ce}-item-group-title`]:{padding:`${Se}px ${ze}px`,color:ve.colorTextDescription,transition:`all ${ue}`},[`${ce}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${ce}-item-icon`]:{minWidth:we,marginInlineEnd:ve.marginXS,fontSize:ve.fontSizeSM},[`${ce}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${ue}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${ce}-item, ${ce}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${Se}px ${ze}px`,color:ve.colorText,fontWeight:"normal",fontSize:we,lineHeight:ve.lineHeight,cursor:"pointer",transition:`all ${ue}`,borderRadius:ve.borderRadiusSM,"&:hover, &-active":{backgroundColor:ve.controlItemBgHover}},(0,Me.Qy)(ve)),{"&-selected":{color:ve.colorPrimary,backgroundColor:ve.controlItemBgActive,"&:hover, &-active":{backgroundColor:ve.controlItemBgActiveHover}},"&-disabled":{color:Ae,cursor:"not-allowed","&:hover":{color:Ae,backgroundColor:Ze,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${ve.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:ve.colorSplit},[`${de}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:ve.paddingXS,[`${de}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:ve.colorTextDescription,fontSize:De,fontStyle:"normal"}}}),[`${ce}-item-group-list`]:{margin:`0 ${ve.marginXS}px`,padding:0,listStyle:"none"},[`${ce}-submenu-title`]:{paddingInlineEnd:ze+ve.fontSizeSM},[`${ce}-submenu-vertical`]:{position:"relative"},[`${ce}-submenu${ce}-submenu-disabled ${de}-menu-submenu-title`]:{[`&, ${de}-menu-submenu-arrow-icon`]:{color:Ae,backgroundColor:Ze,cursor:"not-allowed"}},[`${ce}-submenu-selected ${de}-menu-submenu-title`]:{color:ve.colorPrimary}})}},[(0,me.oN)(ve,"slide-up"),(0,me.oN)(ve,"slide-down"),(0,Be.Fm)(ve,"move-up"),(0,Be.Fm)(ve,"move-down"),(0,ke._y)(ve,"zoom-big")]]};var le=(0,Le.Z)("Dropdown",(ve,de)=>{let{rootPrefixCls:ce}=de;const{marginXXS:z,sizePopupArrow:ee,controlHeight:oe,fontSize:ie,lineHeight:se,paddingXXS:ue,componentCls:Se,borderRadiusLG:we}=ve,Pe=(oe-ie*se)/2,{dropdownArrowOffset:Ae}=(0,Ce.fS)({contentRadius:we}),De=(0,he.TS)(ve,{menuCls:`${Se}-menu`,rootPrefixCls:ce,dropdownArrowDistance:ee/2+z,dropdownArrowOffset:Ae,dropdownPaddingVertical:Pe,dropdownEdgeChildPadding:ue});return[ge(De),xe(De)]},ve=>({zIndexPopup:ve.zIndexPopupBase+50}))},64165:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ue}});var Me=Ee(92310),me=Ee.n(Me),Be=Ee(59301),ke=Ee(36355),Ce=Ee(9763),Le=Ee(64993),he=Ee(88088),xe=()=>{const[,Se]=(0,he.Z)(),Pe=new Le.C(Se.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return Be.createElement("svg",{style:Pe,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},Be.createElement("g",{fill:"none",fillRule:"evenodd"},Be.createElement("g",{transform:"translate(24 31.67)"},Be.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),Be.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"}),Be.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)"}),Be.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"}),Be.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"})),Be.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"}),Be.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},Be.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),Be.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},le=()=>{const[,Se]=(0,he.Z)(),{colorFill:we,colorFillTertiary:Pe,colorFillQuaternary:Ae,colorBgContainer:De}=Se,{borderColor:ze,shadowColor:Ze,contentColor:Xe}=(0,Be.useMemo)(()=>({borderColor:new Le.C(we).onBackground(De).toHexShortString(),shadowColor:new Le.C(Pe).onBackground(De).toHexShortString(),contentColor:new Le.C(Ae).onBackground(De).toHexShortString()}),[we,Pe,Ae,De]);return Be.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},Be.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},Be.createElement("ellipse",{fill:Ze,cx:"32",cy:"33",rx:"32",ry:"7"}),Be.createElement("g",{fillRule:"nonzero",stroke:ze},Be.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"}),Be.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:Xe}))))},ve=Ee(83116),de=Ee(37613);const ce=Se=>{const{componentCls:we,margin:Pe,marginXS:Ae,marginXL:De,fontSize:ze,lineHeight:Ze}=Se;return{[we]:{marginInline:Ae,fontSize:ze,lineHeight:Ze,textAlign:"center",[`${we}-image`]:{height:Se.emptyImgHeight,marginBottom:Ae,opacity:Se.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${we}-description`]:{color:Se.colorText},[`${we}-footer`]:{marginTop:Pe},"&-normal":{marginBlock:De,color:Se.colorTextDisabled,[`${we}-description`]:{color:Se.colorTextDisabled},[`${we}-image`]:{height:Se.emptyImgHeightMD}},"&-small":{marginBlock:Ae,color:Se.colorTextDisabled,[`${we}-image`]:{height:Se.emptyImgHeightSM}}}}};var z=(0,ve.Z)("Empty",Se=>{const{componentCls:we,controlHeightLG:Pe}=Se,Ae=(0,de.TS)(Se,{emptyImgCls:`${we}-img`,emptyImgHeight:Pe*2.5,emptyImgHeightMD:Pe,emptyImgHeightSM:Pe*.875});return[ce(Ae)]}),ee=function(Se,we){var Pe={};for(var Ae in Se)Object.prototype.hasOwnProperty.call(Se,Ae)&&we.indexOf(Ae)<0&&(Pe[Ae]=Se[Ae]);if(Se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var De=0,Ae=Object.getOwnPropertySymbols(Se);De<Ae.length;De++)we.indexOf(Ae[De])<0&&Object.prototype.propertyIsEnumerable.call(Se,Ae[De])&&(Pe[Ae[De]]=Se[Ae[De]]);return Pe};const oe=Be.createElement(xe,null),ie=Be.createElement(le,null),se=Se=>{var{className:we,rootClassName:Pe,prefixCls:Ae,image:De=oe,description:ze,children:Ze,imageStyle:Xe,style:Ge}=Se,ft=ee(Se,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:at,direction:Ct,empty:et}=Be.useContext(ke.E_),yt=at("empty",Ae),[st,zt]=z(yt),[lt]=(0,Ce.Z)("Empty"),tt=typeof ze!="undefined"?ze:lt==null?void 0:lt.description,ut=typeof tt=="string"?tt:"empty";let mt=null;return typeof De=="string"?mt=Be.createElement("img",{alt:ut,src:De}):mt=De,st(Be.createElement("div",Object.assign({className:me()(zt,yt,et==null?void 0:et.className,{[`${yt}-normal`]:De===ie,[`${yt}-rtl`]:Ct==="rtl"},we,Pe),style:Object.assign(Object.assign({},et==null?void 0:et.style),Ge)},ft),Be.createElement("div",{className:`${yt}-image`,style:Xe},mt),tt&&Be.createElement("div",{className:`${yt}-description`},tt),Ze&&Be.createElement("div",{className:`${yt}-footer`},Ze)))};se.PRESENTED_IMAGE_DEFAULT=oe,se.PRESENTED_IMAGE_SIMPLE=ie;var ue=se},78241:function(_n,qt,Ee){"use strict";Ee.d(qt,{default:function(){return qe}});var Me=Ee(80702),me=Ee(92310),Be=Ee.n(me),ke=Ee(77900),Ce=Ee(59301),Le=Ee(62892),he=Ee(32441);function ye(Ye){const[St,Ot]=Ce.useState(Ye);return Ce.useEffect(()=>{const Tt=setTimeout(()=>{Ot(Ye)},Ye.length?0:10);return()=>{clearTimeout(Tt)}},[Ye]),St}var xe=Ee(17313),ge=Ee(29878),le=Ee(8378),ve=Ee(37613),de=Ee(83116),z=Ye=>{const{componentCls:St}=Ye,Ot=`${St}-show-help`,Tt=`${St}-show-help-item`;return{[Ot]:{transition:`opacity ${Ye.motionDurationSlow} ${Ye.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Tt]:{overflow:"hidden",transition:`height ${Ye.motionDurationSlow} ${Ye.motionEaseInOut},
|
|
|
opacity ${Ye.motionDurationSlow} ${Ye.motionEaseInOut},
|
|
|
transform ${Ye.motionDurationSlow} ${Ye.motionEaseInOut} !important`,[`&${Tt}-appear, &${Tt}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Tt}-leave-active`]:{transform:"translateY(-5px)"}}}}};const ee=Ye=>({legend:{display:"block",width:"100%",marginBottom:Ye.marginLG,padding:0,color:Ye.colorTextDescription,fontSize:Ye.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${Ye.lineWidth}px ${Ye.lineType} ${Ye.colorBorder}`},label:{fontSize:Ye.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 ${Ye.controlOutlineWidth}px ${Ye.controlOutline}`},output:{display:"block",paddingTop:15,color:Ye.colorText,fontSize:Ye.fontSize,lineHeight:Ye.lineHeight}}),oe=(Ye,St)=>{const{formItemCls:Ot}=Ye;return{[Ot]:{[`${Ot}-label > label`]:{height:St},[`${Ot}-control-input`]:{minHeight:St}}}},ie=Ye=>{const{componentCls:St}=Ye;return{[Ye.componentCls]:Object.assign(Object.assign(Object.assign({},(0,xe.Wf)(Ye)),ee(Ye)),{[`${St}-text`]:{display:"inline-block",paddingInlineEnd:Ye.paddingSM},"&-small":Object.assign({},oe(Ye,Ye.controlHeightSM)),"&-large":Object.assign({},oe(Ye,Ye.controlHeightLG))})}},se=Ye=>{const{formItemCls:St,iconCls:Ot,componentCls:Tt,rootPrefixCls:_t,labelRequiredMarkColor:dn,labelColor:Pn,labelFontSize:mn,labelHeight:on,labelColonMarginInlineStart:Nt,labelColonMarginInlineEnd:un,itemMarginBottom:Mn}=Ye;return{[St]:Object.assign(Object.assign({},(0,xe.Wf)(Ye)),{marginBottom:Mn,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${_t}-row`]:{display:"none"},"&-has-warning":{[`${St}-split`]:{color:Ye.colorError}},"&-has-error":{[`${St}-split`]:{color:Ye.colorWarning}},[`${St}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${Ye.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:on,color:Pn,fontSize:mn,[`> ${Ot}`]:{fontSize:Ye.fontSize,verticalAlign:"top"},[`&${St}-required:not(${St}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:Ye.marginXXS,color:dn,fontSize:Ye.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${Tt}-hide-required-mark &`]:{display:"none"}},[`${St}-optional`]:{display:"inline-block",marginInlineStart:Ye.marginXXS,color:Ye.colorTextDescription,[`${Tt}-hide-required-mark &`]:{display:"none"}},[`${St}-tooltip`]:{color:Ye.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Ye.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Nt,marginInlineEnd:un},[`&${St}-no-colon::after`]:{content:'"\\a0"'}}},[`${St}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${_t}-col-'"]):not([class*="' ${_t}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Ye.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[St]:{"&-explain, &-extra":{clear:"both",color:Ye.colorTextDescription,fontSize:Ye.fontSize,lineHeight:Ye.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Ye.controlHeightSM,transition:`color ${Ye.motionDurationMid} ${Ye.motionEaseOut}`},"&-explain":{"&-error":{color:Ye.colorError},"&-warning":{color:Ye.colorWarning}}},[`&-with-help ${St}-explain`]:{height:"auto",opacity:1},[`${St}-feedback-icon`]:{fontSize:Ye.fontSize,textAlign:"center",visibility:"visible",animationName:ge.kr,animationDuration:Ye.motionDurationMid,animationTimingFunction:Ye.motionEaseOutBack,pointerEvents:"none","&-success":{color:Ye.colorSuccess},"&-error":{color:Ye.colorError},"&-warning":{color:Ye.colorWarning},"&-validating":{color:Ye.colorPrimary}}})}},ue=Ye=>{const{componentCls:St,formItemCls:Ot}=Ye;return{[`${St}-horizontal`]:{[`${Ot}-label`]:{flexGrow:0},[`${Ot}-control`]:{flex:"1 1 0",minWidth:0},[`${Ot}-label[class$='-24'], ${Ot}-label[class*='-24 ']`]:{[`& + ${Ot}-control`]:{minWidth:"unset"}}}}},Se=Ye=>{const{componentCls:St,formItemCls:Ot}=Ye;return{[`${St}-inline`]:{display:"flex",flexWrap:"wrap",[Ot]:{flex:"none",marginInlineEnd:Ye.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${Ot}-label,
|
|
|
> ${Ot}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${Ot}-label`]:{flex:"none"},[`${St}-text`]:{display:"inline-block"},[`${Ot}-has-feedback`]:{display:"inline-block"}}}}},we=Ye=>({padding:Ye.verticalLabelPadding,margin:Ye.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Pe=Ye=>{const{componentCls:St,formItemCls:Ot,rootPrefixCls:Tt}=Ye;return{[`${Ot} ${Ot}-label`]:we(Ye),[St]:{[Ot]:{flexWrap:"wrap",[`${Ot}-label, ${Ot}-control`]:{[`&:not([class*=" ${Tt}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Ae=Ye=>{const{componentCls:St,formItemCls:Ot,rootPrefixCls:Tt}=Ye;return{[`${St}-vertical`]:{[Ot]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${St}-item-control`]:{width:"100%"}}},[`${St}-vertical ${Ot}-label,
|
|
|
.${Tt}-col-24${Ot}-label,
|
|
|
.${Tt}-col-xl-24${Ot}-label`]:we(Ye),[`@media (max-width: ${Ye.screenXSMax}px)`]:[Pe(Ye),{[St]:{[`.${Tt}-col-xs-24${Ot}-label`]:we(Ye)}}],[`@media (max-width: ${Ye.screenSMMax}px)`]:{[St]:{[`.${Tt}-col-sm-24${Ot}-label`]:we(Ye)}},[`@media (max-width: ${Ye.screenMDMax}px)`]:{[St]:{[`.${Tt}-col-md-24${Ot}-label`]:we(Ye)}},[`@media (max-width: ${Ye.screenLGMax}px)`]:{[St]:{[`.${Tt}-col-lg-24${Ot}-label`]:we(Ye)}}}},De=(Ye,St)=>(0,ve.TS)(Ye,{formItemCls:`${Ye.componentCls}-item`,rootPrefixCls:St});var ze=(0,de.Z)("Form",(Ye,St)=>{let{rootPrefixCls:Ot}=St;const Tt=De(Ye,Ot);return[ie(Tt),se(Tt),z(Tt),ue(Tt),Se(Tt),Ae(Tt),(0,le.Z)(Tt),ge.kr]},Ye=>({labelRequiredMarkColor:Ye.colorError,labelColor:Ye.colorTextHeading,labelFontSize:Ye.fontSize,labelHeight:Ye.controlHeight,labelColonMarginInlineStart:Ye.marginXXS/2,labelColonMarginInlineEnd:Ye.marginXS,itemMarginBottom:Ye.marginLG,verticalLabelPadding:`0 0 ${Ye.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const Ze=[];function Xe(Ye,St,Ot){let Tt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Ye=="string"?Ye:`${St}-${Tt}`,error:Ye,errorStatus:Ot}}var ft=Ye=>{let{help:St,helpStatus:Ot,errors:Tt=Ze,warnings:_t=Ze,className:dn,fieldId:Pn,onVisibleChanged:mn}=Ye;const{prefixCls:on}=Ce.useContext(he.Rk),Nt=`${on}-item-explain`,[,un]=ze(on),Mn=(0,Ce.useMemo)(()=>(0,Le.Z)(on),[on]),Dn=ye(Tt),nn=ye(_t),sn=Ce.useMemo(()=>St!=null?[Xe(St,"help",Ot)]:[].concat((0,Me.Z)(Dn.map((On,qn)=>Xe(On,"error","error",qn))),(0,Me.Z)(nn.map((On,qn)=>Xe(On,"warning","warning",qn)))),[St,Ot,Dn,nn]),Nn={};return Pn&&(Nn.id=`${Pn}_help`),Ce.createElement(ke.default,{motionDeadline:Mn.motionDeadline,motionName:`${on}-show-help`,visible:!!sn.length,onVisibleChanged:mn},On=>{const{className:qn,style:Hn}=On;return Ce.createElement("div",Object.assign({},Nn,{className:Be()(Nt,qn,dn,un),style:Hn,role:"alert"}),Ce.createElement(ke.CSSMotionList,Object.assign({keys:sn},(0,Le.Z)(on),{motionName:`${on}-show-help-item`,component:!1}),ei=>{const{key:Fn,error:hi,errorStatus:Di,className:Ri,style:En}=ei;return Ce.createElement("div",{key:Fn,className:Be()(Ri,{[`${Nt}-${Di}`]:Di}),style:En},hi)}))})},at=Ee(95013),Ct=Ee(36355),et=Ee(1684),yt=Ee(52946),st=Ee(19716),zt=Ee(16722);const lt=["parentNode"],tt="form_item";function ut(Ye){return Ye===void 0||Ye===!1?[]:Array.isArray(Ye)?Ye:[Ye]}function mt(Ye,St){if(!Ye.length)return;const Ot=Ye.join("_");return St?`${St}_${Ot}`:lt.includes(Ot)?`${tt}_${Ot}`:Ot}function Pt(Ye,St,Ot,Tt,_t,dn){let Pn=Tt;return dn!==void 0?Pn=dn:Ot.validating?Pn="validating":Ye.length?Pn="error":St.length?Pn="warning":(Ot.touched||_t&&Ot.validated)&&(Pn="success"),Pn}function gt(Ye){return ut(Ye).join("_")}function Ft(Ye){const[St]=(0,at.useForm)(),Ot=Ce.useRef({}),Tt=Ce.useMemo(()=>Ye!=null?Ye:Object.assign(Object.assign({},St),{__INTERNAL__:{itemRef:_t=>dn=>{const Pn=gt(_t);dn?Ot.current[Pn]=dn:delete Ot.current[Pn]}},scrollToField:function(_t){let dn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const Pn=ut(_t),mn=mt(Pn,Tt.__INTERNAL__.name),on=mn?document.getElementById(mn):null;on&&(0,zt.Z)(on,Object.assign({scrollMode:"if-needed",block:"nearest"},dn))},getFieldInstance:_t=>{const dn=gt(_t);return Ot.current[dn]}}),[Ye,St]);return[Tt]}var Ht=Ee(28726),hn=function(Ye,St){var Ot={};for(var Tt in Ye)Object.prototype.hasOwnProperty.call(Ye,Tt)&&St.indexOf(Tt)<0&&(Ot[Tt]=Ye[Tt]);if(Ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _t=0,Tt=Object.getOwnPropertySymbols(Ye);_t<Tt.length;_t++)St.indexOf(Tt[_t])<0&&Object.prototype.propertyIsEnumerable.call(Ye,Tt[_t])&&(Ot[Tt[_t]]=Ye[Tt[_t]]);return Ot};const Jt=(Ye,St)=>{const Ot=Ce.useContext(et.Z),{getPrefixCls:Tt,direction:_t,form:dn}=Ce.useContext(Ct.E_),{prefixCls:Pn,className:mn,rootClassName:on,size:Nt,disabled:un=Ot,form:Mn,colon:Dn,labelAlign:nn,labelWrap:sn,labelCol:Nn,wrapperCol:On,hideRequiredMark:qn,layout:Hn="horizontal",scrollToFirstError:ei,requiredMark:Fn,onFinishFailed:hi,name:Di,style:Ri,feedbackIcons:En}=Ye,$i=hn(Ye,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Cr=(0,st.Z)(Nt),mr=Ce.useContext(Ht.Z),Ln=(0,Ce.useMemo)(()=>Fn!==void 0?Fn:dn&&dn.requiredMark!==void 0?dn.requiredMark:!qn,[qn,Fn,dn]),Jn=Dn!=null?Dn:dn==null?void 0:dn.colon,ui=Tt("form",Pn),[Si,di]=ze(ui),Ei=Be()(ui,`${ui}-${Hn}`,{[`${ui}-hide-required-mark`]:Ln===!1,[`${ui}-rtl`]:_t==="rtl",[`${ui}-${Cr}`]:Cr},di,dn==null?void 0:dn.className,mn,on),[qi]=Ft(Mn),{__INTERNAL__:Fi}=qi;Fi.name=Di;const zi=(0,Ce.useMemo)(()=>({name:Di,labelAlign:nn,labelCol:Nn,labelWrap:sn,wrapperCol:On,vertical:Hn==="vertical",colon:Jn,requiredMark:Ln,itemRef:Fi.itemRef,form:qi,feedbackIcons:En}),[Di,nn,Nn,On,Hn,Jn,Ln,qi,En]);Ce.useImperativeHandle(St,()=>qi);const fr=(Br,In)=>{if(Br){let pr={block:"nearest"};typeof Br=="object"&&(pr=Br),qi.scrollToField(In,pr)}},Bn=Br=>{if(hi==null||hi(Br),Br.errorFields.length){const In=Br.errorFields[0].name;if(ei!==void 0){fr(ei,In);return}dn&&dn.scrollToFirstError!==void 0&&fr(dn.scrollToFirstError,In)}};return Si(Ce.createElement(et.n,{disabled:un},Ce.createElement(yt.q,{size:Cr},Ce.createElement(he.RV,Object.assign({},{validateMessages:mr}),Ce.createElement(he.q3.Provider,{value:zi},Ce.createElement(at.default,Object.assign({id:Di},$i,{name:Di,onFinishFailed:Bn,form:qi,style:Object.assign(Object.assign({},dn==null?void 0:dn.style),Ri),className:Ei})))))))};var Wt=Ce.forwardRef(Jt),Kt=Ee(41799),Xt=Ee(8654),$t=Ee(92343),kt=Ee(11592);function pt(Ye){if(typeof Ye=="function")return Ye;const St=(0,kt.Z)(Ye);return St.length<=1?St[0]:St}const Bt=()=>{const{status:Ye,errors:St=[],warnings:Ot=[]}=(0,Ce.useContext)(he.aM);return{status:Ye,errors:St,warnings:Ot}};Bt.Context=he.aM;var xt=Bt,vt=Ee(16089);function nt(Ye){const[St,Ot]=Ce.useState(Ye),Tt=(0,Ce.useRef)(null),_t=(0,Ce.useRef)([]),dn=(0,Ce.useRef)(!1);Ce.useEffect(()=>(dn.current=!1,()=>{dn.current=!0,vt.Z.cancel(Tt.current),Tt.current=null}),[]);function Pn(mn){dn.current||(Tt.current===null&&(_t.current=[],Tt.current=(0,vt.Z)(()=>{Tt.current=null,Ot(on=>{let Nt=on;return _t.current.forEach(un=>{Nt=un(Nt)}),Nt})})),_t.current.push(mn))}return[St,Pn]}function He(){const{itemRef:Ye}=Ce.useContext(he.q3),St=Ce.useRef({});function Ot(Tt,_t){const dn=_t&&typeof _t=="object"&&_t.ref,Pn=Tt.join("_");return(St.current.name!==Pn||St.current.originRef!==dn)&&(St.current.name=Pn,St.current.originRef=dn,St.current.ref=(0,Xt.sQ)(Ye(Tt),dn)),St.current.ref}return Ot}var Ie=Ee(29194),We=Ee(34280),Oe=Ee(2738),be=Ee(27382),Ne=Ee(37028);const $e=Ye=>{const{formItemCls:St}=Ye;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${St}-control`]:{display:"flex"}}}};var dt=(0,de.b)(["Form","item-item"],(Ye,St)=>{let{rootPrefixCls:Ot}=St;const Tt=De(Ye,Ot);return[$e(Tt)]}),At=Ye=>{const{prefixCls:St,status:Ot,wrapperCol:Tt,children:_t,errors:dn,warnings:Pn,_internalItemRender:mn,extra:on,help:Nt,fieldId:un,marginBottom:Mn,onErrorVisibleChanged:Dn}=Ye,nn=`${St}-item`,sn=Ce.useContext(he.q3),Nn=Tt||sn.wrapperCol||{},On=Be()(`${nn}-control`,Nn.className),qn=Ce.useMemo(()=>Object.assign({},sn),[sn]);delete qn.labelCol,delete qn.wrapperCol;const Hn=Ce.createElement("div",{className:`${nn}-control-input`},Ce.createElement("div",{className:`${nn}-control-input-content`},_t)),ei=Ce.useMemo(()=>({prefixCls:St,status:Ot}),[St,Ot]),Fn=Mn!==null||dn.length||Pn.length?Ce.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},Ce.createElement(he.Rk.Provider,{value:ei},Ce.createElement(ft,{fieldId:un,errors:dn,warnings:Pn,help:Nt,helpStatus:Ot,className:`${nn}-explain-connected`,onVisibleChanged:Dn})),!!Mn&&Ce.createElement("div",{style:{width:0,height:Mn}})):null,hi={};un&&(hi.id=`${un}_extra`);const Di=on?Ce.createElement("div",Object.assign({},hi,{className:`${nn}-extra`}),on):null,Ri=mn&&mn.mark==="pro_table_render"&&mn.render?mn.render(Ye,{input:Hn,errorList:Fn,extra:Di}):Ce.createElement(Ce.Fragment,null,Hn,Fn,Di);return Ce.createElement(he.q3.Provider,{value:qn},Ce.createElement(Ne.Z,Object.assign({},Nn,{className:On}),Ri),Ce.createElement(dt,{prefixCls:St}))},en=Ee(61485),pn=Ee(31724),ln=Ee(9763),gn=Ee(6848),Un=function(Ye,St){var Ot={};for(var Tt in Ye)Object.prototype.hasOwnProperty.call(Ye,Tt)&&St.indexOf(Tt)<0&&(Ot[Tt]=Ye[Tt]);if(Ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _t=0,Tt=Object.getOwnPropertySymbols(Ye);_t<Tt.length;_t++)St.indexOf(Tt[_t])<0&&Object.prototype.propertyIsEnumerable.call(Ye,Tt[_t])&&(Ot[Tt[_t]]=Ye[Tt[_t]]);return Ot};function An(Ye){return Ye?typeof Ye=="object"&&!Ce.isValidElement(Ye)?Ye:{title:Ye}:null}var ai=Ye=>{let{prefixCls:St,label:Ot,htmlFor:Tt,labelCol:_t,labelAlign:dn,colon:Pn,required:mn,requiredMark:on,tooltip:Nt}=Ye;var un;const[Mn]=(0,ln.Z)("Form"),{vertical:Dn,labelAlign:nn,labelCol:sn,labelWrap:Nn,colon:On}=Ce.useContext(he.q3);if(!Ot)return null;const qn=_t||sn||{},Hn=dn||nn,ei=`${St}-item-label`,Fn=Be()(ei,Hn==="left"&&`${ei}-left`,qn.className,{[`${ei}-wrap`]:!!Nn});let hi=Ot;const Di=Pn===!0||On!==!1&&Pn!==!1;Di&&!Dn&&typeof Ot=="string"&&Ot.trim()!==""&&(hi=Ot.replace(/[:|:]\s*$/,""));const En=An(Nt);if(En){const{icon:Ln=Ce.createElement(en.Z,null)}=En,Jn=Un(En,["icon"]),ui=Ce.createElement(gn.Z,Object.assign({},Jn),Ce.cloneElement(Ln,{className:`${St}-item-tooltip`,title:""}));hi=Ce.createElement(Ce.Fragment,null,hi,ui)}const $i=on==="optional",Cr=typeof on=="function";Cr?hi=on(hi,{required:!!mn}):$i&&!mn&&(hi=Ce.createElement(Ce.Fragment,null,hi,Ce.createElement("span",{className:`${St}-item-optional`,title:""},(Mn==null?void 0:Mn.optional)||((un=pn.Z.Form)===null||un===void 0?void 0:un.optional))));const mr=Be()({[`${St}-item-required`]:mn,[`${St}-item-required-mark-optional`]:$i||Cr,[`${St}-item-no-colon`]:!Di});return Ce.createElement(Ne.Z,Object.assign({},qn,{className:Fn}),Ce.createElement("label",{htmlFor:Tt,className:mr,title:typeof Ot=="string"?Ot:""},hi))},ki=Ee(29679),Ci=Ee(19248),Ki=Ee(96512),ir=Ee(58617);const sr={success:ki.Z,warning:Ki.Z,error:Ci.Z,validating:ir.Z};function Ji(Ye){let{children:St,errors:Ot,warnings:Tt,hasFeedback:_t,validateStatus:dn,prefixCls:Pn,meta:mn,noStyle:on}=Ye;const Nt=`${Pn}-item`,{feedbackIcons:un}=Ce.useContext(he.q3),Mn=Pt(Ot,Tt,mn,null,!!_t,dn),{isFormItemInput:Dn,status:nn}=Ce.useContext(he.aM),sn=Ce.useMemo(()=>{var Nn;let On;if(_t){const ei=_t!==!0&&_t.icons||un,Fn=Mn&&((Nn=ei==null?void 0:ei({status:Mn,errors:Ot,warnings:Tt}))===null||Nn===void 0?void 0:Nn[Mn]),hi=Mn&&sr[Mn];On=Fn!==!1&&hi?Ce.createElement("span",{className:Be()(`${Nt}-feedback-icon`,`${Nt}-feedback-icon-${Mn}`)},Fn||Ce.createElement(hi,null)):null}let qn=!0,Hn=Mn||"";return on&&(qn=Dn,Hn=(Mn!=null?Mn:nn)||""),{status:Hn,errors:Ot,warnings:Tt,hasFeedback:!!_t,feedbackIcon:On,isFormItemInput:qn}},[Mn,_t,on,Dn,nn]);return Ce.createElement(he.aM.Provider,{value:sn},St)}var Fr=function(Ye,St){var Ot={};for(var Tt in Ye)Object.prototype.hasOwnProperty.call(Ye,Tt)&&St.indexOf(Tt)<0&&(Ot[Tt]=Ye[Tt]);if(Ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _t=0,Tt=Object.getOwnPropertySymbols(Ye);_t<Tt.length;_t++)St.indexOf(Tt[_t])<0&&Object.prototype.propertyIsEnumerable.call(Ye,Tt[_t])&&(Ot[Tt[_t]]=Ye[Tt[_t]]);return Ot};function Mr(Ye){const{prefixCls:St,className:Ot,rootClassName:Tt,style:_t,help:dn,errors:Pn,warnings:mn,validateStatus:on,meta:Nt,hasFeedback:un,hidden:Mn,children:Dn,fieldId:nn,required:sn,isRequired:Nn,onSubItemMetaChange:On}=Ye,qn=Fr(Ye,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Hn=`${St}-item`,{requiredMark:ei}=Ce.useContext(he.q3),Fn=Ce.useRef(null),hi=ye(Pn),Di=ye(mn),Ri=dn!=null,En=!!(Ri||Pn.length||mn.length),$i=!!Fn.current&&(0,Ie.Z)(Fn.current),[Cr,mr]=Ce.useState(null);(0,We.Z)(()=>{if(En&&Fn.current){const di=getComputedStyle(Fn.current);mr(parseInt(di.marginBottom,10))}},[En,$i]);const Ln=di=>{di||mr(null)},ui=function(){let di=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Ei=di?hi:Nt.errors,qi=di?Di:Nt.warnings;return Pt(Ei,qi,Nt,"",!!un,on)}(),Si=Be()(Hn,Ot,Tt,{[`${Hn}-with-help`]:Ri||hi.length||Di.length,[`${Hn}-has-feedback`]:ui&&un,[`${Hn}-has-success`]:ui==="success",[`${Hn}-has-warning`]:ui==="warning",[`${Hn}-has-error`]:ui==="error",[`${Hn}-is-validating`]:ui==="validating",[`${Hn}-hidden`]:Mn});return Ce.createElement("div",{className:Si,style:_t,ref:Fn},Ce.createElement(be.Z,Object.assign({className:`${Hn}-row`},(0,Oe.Z)(qn,["_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"])),Ce.createElement(ai,Object.assign({htmlFor:nn},Ye,{requiredMark:ei,required:sn!=null?sn:Nn,prefixCls:St})),Ce.createElement(At,Object.assign({},Ye,Nt,{errors:hi,warnings:Di,prefixCls:St,status:ui,help:dn,marginBottom:Cr,onErrorVisibleChanged:Ln}),Ce.createElement(he.qI.Provider,{value:On},Ce.createElement(Ji,{prefixCls:St,meta:Nt,errors:Nt.errors,warnings:Nt.warnings,hasFeedback:un,validateStatus:ui},Dn)))),!!Cr&&Ce.createElement("div",{className:`${Hn}-margin-offset`,style:{marginBottom:-Cr}}))}const vi="__SPLIT__",wr=null,Tr=Ce.memo(Ye=>{let{children:St}=Ye;return St},(Ye,St)=>Ye.value===St.value&&Ye.update===St.update&&Ye.childProps.length===St.childProps.length&&Ye.childProps.every((Ot,Tt)=>Ot===St.childProps[Tt]));function it(Ye){return Ye!=null}function Rr(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Or(Ye){const{name:St,noStyle:Ot,className:Tt,dependencies:_t,prefixCls:dn,shouldUpdate:Pn,rules:mn,children:on,required:Nt,label:un,messageVariables:Mn,trigger:Dn="onChange",validateTrigger:nn,hidden:sn,help:Nn}=Ye,{getPrefixCls:On}=Ce.useContext(Ct.E_),{name:qn}=Ce.useContext(he.q3),Hn=pt(on),ei=typeof Hn=="function",Fn=Ce.useContext(he.qI),{validateTrigger:hi}=Ce.useContext(at.FieldContext),Di=nn!==void 0?nn:hi,Ri=it(St),En=On("form",dn),[$i,Cr]=ze(En),mr=Ce.useContext(at.ListContext),Ln=Ce.useRef(),[Jn,ui]=nt({}),[Si,di]=(0,Kt.Z)(()=>Rr()),Ei=In=>{const pr=mr==null?void 0:mr.getKey(In.name);if(di(In.destroy?Rr():In,!0),Ot&&Nn!==!1&&Fn){let yo=In.name;if(In.destroy)yo=Ln.current||yo;else if(pr!==void 0){const[Ir,bo]=pr;yo=[Ir].concat((0,Me.Z)(bo)),Ln.current=yo}Fn(In,yo)}},qi=(In,pr)=>{ui(yo=>{const Ir=Object.assign({},yo),co=[].concat((0,Me.Z)(In.name.slice(0,-1)),(0,Me.Z)(pr)).join(vi);return In.destroy?delete Ir[co]:Ir[co]=In,Ir})},[Fi,zi]=Ce.useMemo(()=>{const In=(0,Me.Z)(Si.errors),pr=(0,Me.Z)(Si.warnings);return Object.values(Jn).forEach(yo=>{In.push.apply(In,(0,Me.Z)(yo.errors||[])),pr.push.apply(pr,(0,Me.Z)(yo.warnings||[]))}),[In,pr]},[Jn,Si.errors,Si.warnings]),fr=He();function Bn(In,pr,yo){return Ot&&!sn?Ce.createElement(Ji,{prefixCls:En,hasFeedback:Ye.hasFeedback,validateStatus:Ye.validateStatus,meta:Si,errors:Fi,warnings:zi,noStyle:!0},In):Ce.createElement(Mr,Object.assign({key:"row"},Ye,{className:Be()(Tt,Cr),prefixCls:En,fieldId:pr,isRequired:yo,errors:Fi,warnings:zi,meta:Si,onSubItemMetaChange:qi}),In)}if(!Ri&&!ei&&!_t)return $i(Bn(Hn));let Br={};return typeof un=="string"?Br.label=un:St&&(Br.label=String(St)),Mn&&(Br=Object.assign(Object.assign({},Br),Mn)),$i(Ce.createElement(at.Field,Object.assign({},Ye,{messageVariables:Br,trigger:Dn,validateTrigger:Di,onMetaChange:Ei}),(In,pr,yo)=>{const Ir=ut(St).length&&pr?pr.name:[],bo=mt(Ir,qn),co=Nt!==void 0?Nt:!!(mn&&mn.some(ur=>{if(ur&&typeof ur=="object"&&ur.required&&!ur.warningOnly)return!0;if(typeof ur=="function"){const Pr=ur(yo);return Pr&&Pr.required&&!Pr.warningOnly}return!1})),Vi=Object.assign({},In);let Hi=null;if(Array.isArray(Hn)&&Ri)Hi=Hn;else if(!(ei&&(!(Pn||_t)||Ri))){if(!(_t&&!ei&&!Ri))if((0,$t.l$)(Hn)){const ur=Object.assign(Object.assign({},Hn.props),Vi);if(ur.id||(ur.id=bo),Nn||Fi.length>0||zi.length>0||Ye.extra){const Mt=[];(Nn||Fi.length>0)&&Mt.push(`${bo}_help`),Ye.extra&&Mt.push(`${bo}_extra`),ur["aria-describedby"]=Mt.join(" ")}Fi.length>0&&(ur["aria-invalid"]="true"),co&&(ur["aria-required"]="true"),(0,Xt.Yr)(Hn)&&(ur.ref=fr(Ir,Hn)),new Set([].concat((0,Me.Z)(ut(Dn)),(0,Me.Z)(ut(Di)))).forEach(Mt=>{ur[Mt]=function(){for(var Gr,Hr,ts,ko,ss,_r=arguments.length,cr=new Array(_r),Vr=0;Vr<_r;Vr++)cr[Vr]=arguments[Vr];(ts=Vi[Mt])===null||ts===void 0||(Gr=ts).call.apply(Gr,[Vi].concat(cr)),(ss=(ko=Hn.props)[Mt])===null||ss===void 0||(Hr=ss).call.apply(Hr,[ko].concat(cr))}});const ci=[ur["aria-required"],ur["aria-invalid"],ur["aria-describedby"]];Hi=Ce.createElement(Tr,{value:Vi[Ye.valuePropName||"value"],update:Hn,childProps:ci},(0,$t.Tm)(Hn,ur))}else ei&&(Pn||_t)&&!Ri?Hi=Hn(yo):Hi=Hn}return Bn(Hi,bo,co)}))}const Ur=Or;Ur.useStatus=xt;var uo=Ur,po=function(Ye,St){var Ot={};for(var Tt in Ye)Object.prototype.hasOwnProperty.call(Ye,Tt)&&St.indexOf(Tt)<0&&(Ot[Tt]=Ye[Tt]);if(Ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _t=0,Tt=Object.getOwnPropertySymbols(Ye);_t<Tt.length;_t++)St.indexOf(Tt[_t])<0&&Object.prototype.propertyIsEnumerable.call(Ye,Tt[_t])&&(Ot[Tt[_t]]=Ye[Tt[_t]]);return Ot},Do=Ye=>{var{prefixCls:St,children:Ot}=Ye,Tt=po(Ye,["prefixCls","children"]);const{getPrefixCls:_t}=Ce.useContext(Ct.E_),dn=_t("form",St),Pn=Ce.useMemo(()=>({prefixCls:dn,status:"error"}),[dn]);return Ce.createElement(at.List,Object.assign({},Tt),(mn,on,Nt)=>Ce.createElement(he.Rk.Provider,{value:Pn},Ot(mn.map(un=>Object.assign(Object.assign({},un),{fieldKey:un.key})),on,{errors:Nt.errors,warnings:Nt.warnings})))};function Xn(){const{form:Ye}=(0,Ce.useContext)(he.q3);return Ye}const Ke=Wt;Ke.Item=uo,Ke.List=Do,Ke.ErrorList=ft,Ke.useForm=Ft,Ke.useFormInstance=Xn,Ke.useWatch=at.useWatch,Ke.Provider=he.RV,Ke.create=()=>{};var qe=Ke},8628:function(_n,qt,Ee){"use strict";var Me=Ee(59301),me=Ee(34280),Be=Ee(56762),ke=Ee(69507);function Ce(){let Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const he=(0,Me.useRef)({}),ye=(0,Be.Z)(),xe=(0,ke.ZP)();return(0,me.Z)(()=>{const ge=xe.subscribe(le=>{he.current=le,Le&&ye()});return()=>xe.unsubscribe(ge)},[]),he.current}qt.Z=Ce},11611:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Pn}});var Me=Ee(59301),me=Ee(15277),Be=Ee(92310),ke=Ee.n(Be),Ce=Ee(72308),Le=Ee(77321),he=Ee(49618),ye=Ee(52487),xe=Ee(62853),ge=Ee(74416),le=Ee(55468),ve=Ee(18929),de=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"],ce=Me.createContext(null),z=0;function ee(mn,on){var Nt=Me.useState(function(){return z+=1,String(z)}),un=(0,ye.Z)(Nt,1),Mn=un[0],Dn=Me.useContext(ce),nn={data:on,canPreview:mn};return Me.useEffect(function(){if(Dn)return Dn.register(Mn,nn)},[]),Me.useEffect(function(){Dn&&Dn.register(Mn,nn)},[mn,on]),Mn}function oe(mn){return new Promise(function(on){var Nt=document.createElement("img");Nt.onerror=function(){return on(!1)},Nt.onload=function(){return on(!0)},Nt.src=mn})}function ie(mn){var on=mn.src,Nt=mn.isCustomPlaceholder,un=mn.fallback,Mn=(0,Me.useState)(Nt?"loading":"normal"),Dn=(0,ye.Z)(Mn,2),nn=Dn[0],sn=Dn[1],Nn=(0,Me.useRef)(!1),On=nn==="error";(0,Me.useEffect)(function(){oe(on).then(function(Fn){Fn||sn("error")})},[on]),(0,Me.useEffect)(function(){Nt&&!Nn.current?sn("loading"):On&&sn("normal")},[on]);var qn=function(){sn("normal")},Hn=function(hi){Nn.current=!1,nn==="loading"&&hi!=null&&hi.complete&&(hi.naturalWidth||hi.naturalHeight)&&(Nn.current=!0,qn())},ei=On&&un?{src:un}:{onLoad:qn,src:on};return[Hn,ei,nn]}var se=Ee(86923),ue=Ee(8224),Se=Ee(10228),we=Ee(48736);function Pe(mn,on,Nt,un){var Mn=on+Nt,Dn=(Nt-un)/2;if(Nt>un){if(on>0)return(0,he.Z)({},mn,Dn);if(on<0&&Mn<un)return(0,he.Z)({},mn,-Dn)}else if(on<0||Mn>un)return(0,he.Z)({},mn,on<0?Dn:-Dn);return{}}function Ae(mn,on,Nt,un){var Mn=(0,le.g1)(),Dn=Mn.width,nn=Mn.height,sn=null;return mn<=Dn&&on<=nn?sn={x:0,y:0}:(mn>Dn||on>nn)&&(sn=(0,Le.Z)((0,Le.Z)({},Pe("x",Nt,mn,Dn)),Pe("y",un,on,nn))),sn}var De=Ee(13697),ze=Ee(16089),Ze={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function Xe(mn,on,Nt,un){var Mn=(0,Me.useRef)(null),Dn=(0,Me.useRef)([]),nn=(0,Me.useState)(Ze),sn=(0,ye.Z)(nn,2),Nn=sn[0],On=sn[1],qn=function(hi){On(Ze),un&&!(0,De.Z)(Ze,Nn)&&un({transform:Ze,action:hi})},Hn=function(hi,Di){Mn.current===null&&(Dn.current=[],Mn.current=(0,ze.Z)(function(){On(function(Ri){var En=Ri;return Dn.current.forEach(function($i){En=(0,Le.Z)((0,Le.Z)({},En),$i)}),Mn.current=null,un==null||un({transform:En,action:Di}),En})})),Dn.current.push((0,Le.Z)((0,Le.Z)({},Nn),hi))},ei=function(hi,Di,Ri,En){var $i=mn.current,Cr=$i.width,mr=$i.height,Ln=$i.offsetWidth,Jn=$i.offsetHeight,ui=$i.offsetLeft,Si=$i.offsetTop,di=hi,Ei=Nn.scale*hi;Ei>Nt?(di=Nt/Nn.scale,Ei=Nt):Ei<on&&(di=on/Nn.scale,Ei=on);var qi=Ri!=null?Ri:innerWidth/2,Fi=En!=null?En:innerHeight/2,zi=di-1,fr=zi*Cr*.5,Bn=zi*mr*.5,Br=zi*(qi-Nn.x-ui),In=zi*(Fi-Nn.y-Si),pr=Nn.x-(Br-fr),yo=Nn.y-(In-Bn);if(hi<1&&Ei===1){var Ir=Ln*Ei,bo=Jn*Ei,co=(0,le.g1)(),Vi=co.width,Hi=co.height;Ir<=Vi&&bo<=Hi&&(pr=0,yo=0)}Hn({x:pr,y:yo,scale:Ei},Di)};return{transform:Nn,resetTransform:qn,updateTransform:Hn,dispatchZoomChange:ei}}var Ge=Ee(43403),ft=Ee(77900),at=function(on){var Nt=on.visible,un=on.maskTransitionName,Mn=on.getContainer,Dn=on.prefixCls,nn=on.rootClassName,sn=on.icons,Nn=on.countRender,On=on.showSwitch,qn=on.showProgress,Hn=on.current,ei=on.transform,Fn=on.count,hi=on.scale,Di=on.minScale,Ri=on.maxScale,En=on.closeIcon,$i=on.onSwitchLeft,Cr=on.onSwitchRight,mr=on.onClose,Ln=on.onZoomIn,Jn=on.onZoomOut,ui=on.onRotateRight,Si=on.onRotateLeft,di=on.onFlipX,Ei=on.onFlipY,qi=on.toolbarRender,Fi=(0,Me.useContext)(ce),zi=sn.rotateLeft,fr=sn.rotateRight,Bn=sn.zoomIn,Br=sn.zoomOut,In=sn.close,pr=sn.left,yo=sn.right,Ir=sn.flipX,bo=sn.flipY,co="".concat(Dn,"-operations-operation");Me.useEffect(function(){var Pr=function(Mt){Mt.keyCode===Se.Z.ESC&&mr()};return Nt&&window.addEventListener("keydown",Pr),function(){window.removeEventListener("keydown",Pr)}},[Nt]);var Vi=[{icon:bo,onClick:Ei,type:"flipY"},{icon:Ir,onClick:di,type:"flipX"},{icon:zi,onClick:Si,type:"rotateLeft"},{icon:fr,onClick:ui,type:"rotateRight"},{icon:Br,onClick:Jn,type:"zoomOut",disabled:hi===Di},{icon:Bn,onClick:Ln,type:"zoomIn",disabled:hi===Ri}],Hi=Vi.map(function(Pr){var ci,Mt=Pr.icon,Gr=Pr.onClick,Hr=Pr.type,ts=Pr.disabled;return Me.createElement("div",{className:ke()(co,(ci={},(0,he.Z)(ci,"".concat(Dn,"-operations-operation-").concat(Hr),!0),(0,he.Z)(ci,"".concat(Dn,"-operations-operation-disabled"),!!ts),ci)),onClick:Gr,key:Hr},Mt)}),ur=Me.createElement("div",{className:"".concat(Dn,"-operations")},Hi);return Me.createElement(ft.default,{visible:Nt,motionName:un},function(Pr){var ci=Pr.className,Mt=Pr.style;return Me.createElement(Ge.Z,{open:!0,getContainer:Mn!=null?Mn:document.body},Me.createElement("div",{className:ke()("".concat(Dn,"-operations-wrapper"),ci,nn),style:Mt},En===null?null:Me.createElement("button",{className:"".concat(Dn,"-close"),onClick:mr},En||In),On&&Me.createElement(Me.Fragment,null,Me.createElement("div",{className:ke()("".concat(Dn,"-switch-left"),(0,he.Z)({},"".concat(Dn,"-switch-left-disabled"),Hn===0)),onClick:$i},pr),Me.createElement("div",{className:ke()("".concat(Dn,"-switch-right"),(0,he.Z)({},"".concat(Dn,"-switch-right-disabled"),Hn===Fn-1)),onClick:Cr},yo)),Me.createElement("div",{className:"".concat(Dn,"-footer")},qn&&Me.createElement("div",{className:"".concat(Dn,"-progress")},Nn?Nn(Hn+1,Fn):"".concat(Hn+1," / ").concat(Fn)),qi?qi(ur,(0,Le.Z)({icons:{flipYIcon:Hi[0],flipXIcon:Hi[1],rotateLeftIcon:Hi[2],rotateRightIcon:Hi[3],zoomOutIcon:Hi[4],zoomInIcon:Hi[5]},actions:{onFlipY:Ei,onFlipX:di,onRotateLeft:Si,onRotateRight:ui,onZoomOut:Jn,onZoomIn:Ln},transform:ei},Fi?{current:Hn,total:Fn}:{})):ur)))})},Ct=at,et=1,yt=1,st=["fallback","src","imgRef"],zt=["prefixCls","src","alt","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"],lt=function(on){var Nt=on.fallback,un=on.src,Mn=on.imgRef,Dn=(0,ge.Z)(on,st),nn=ie({src:un,fallback:Nt}),sn=(0,ye.Z)(nn,2),Nn=sn[0],On=sn[1];return Me.createElement("img",(0,Ce.Z)({ref:function(Hn){Mn.current=Hn,Nn(Hn)}},Dn,On))},tt=function(on){var Nt=on.prefixCls,un=on.src,Mn=on.alt,Dn=on.fallback,nn=on.movable,sn=nn===void 0?!0:nn,Nn=on.onClose,On=on.visible,qn=on.icons,Hn=qn===void 0?{}:qn,ei=on.rootClassName,Fn=on.closeIcon,hi=on.getContainer,Di=on.current,Ri=Di===void 0?0:Di,En=on.count,$i=En===void 0?1:En,Cr=on.countRender,mr=on.scaleStep,Ln=mr===void 0?.5:mr,Jn=on.minScale,ui=Jn===void 0?1:Jn,Si=on.maxScale,di=Si===void 0?50:Si,Ei=on.transitionName,qi=Ei===void 0?"zoom":Ei,Fi=on.maskTransitionName,zi=Fi===void 0?"fade":Fi,fr=on.imageRender,Bn=on.imgCommonProps,Br=on.toolbarRender,In=on.onTransform,pr=on.onChange,yo=(0,ge.Z)(on,zt),Ir=(0,Me.useRef)(),bo=(0,Me.useRef)({deltaX:0,deltaY:0,transformX:0,transformY:0}),co=(0,Me.useState)(!1),Vi=(0,ye.Z)(co,2),Hi=Vi[0],ur=Vi[1],Pr=(0,Me.useContext)(ce),ci=Pr&&$i>1,Mt=Pr&&$i>=1,Gr=Xe(Ir,ui,di,In),Hr=Gr.transform,ts=Gr.resetTransform,ko=Gr.updateTransform,ss=Gr.dispatchZoomChange,_r=(0,Me.useState)(!0),cr=(0,ye.Z)(_r,2),Vr=cr[0],hr=cr[1],eo=Hr.rotate,Yo=Hr.scale,rr=Hr.x,Wi=Hr.y,Qn=ke()((0,he.Z)({},"".concat(Nt,"-moving"),Hi));(0,Me.useEffect)(function(){Vr||hr(!0)},[Vr]);var or=function(){ts("close")},to=function(){ss(et+Ln,"zoomIn")},Ro=function(){ss(et/(et+Ln),"zoomOut")},Bo=function(){ko({rotate:eo+90},"rotateRight")},Xo=function(){ko({rotate:eo-90},"rotateLeft")},as=function(){ko({flipX:!Hr.flipX},"flipX")},Ho=function(){ko({flipY:!Hr.flipY},"flipY")},ia=function(Po){Po==null||Po.preventDefault(),Po==null||Po.stopPropagation(),Ri>0&&(hr(!1),ts("prev"),pr==null||pr(Ri-1,Ri))},_s=function(Po){Po==null||Po.preventDefault(),Po==null||Po.stopPropagation(),Ri<$i-1&&(hr(!1),ts("next"),pr==null||pr(Ri+1,Ri))},la=function(){if(On&&Hi){ur(!1);var Po=bo.current,Ao=Po.transformX,Eo=Po.transformY,ua=rr!==Ao&&Wi!==Eo;if(!ua)return;var xr=Ir.current.offsetWidth*Yo,lo=Ir.current.offsetHeight*Yo,Yr=Ir.current.getBoundingClientRect(),Mi=Yr.left,Es=Yr.top,Ls=eo%180!==0,xa=Ae(Ls?lo:xr,Ls?xr:lo,Mi,Es);xa&&ko((0,Le.Z)({},xa),"dragRebound")}},kn=function(Po){!sn||Po.button!==0||(Po.preventDefault(),Po.stopPropagation(),bo.current={deltaX:Po.pageX-Hr.x,deltaY:Po.pageY-Hr.y,transformX:Hr.x,transformY:Hr.y},ur(!0))},Is=function(Po){On&&Hi&&ko({x:Po.pageX-bo.current.deltaX,y:Po.pageY-bo.current.deltaY},"move")},Pu=function(Po){if(!(!On||Po.deltaY==0)){var Ao=Math.abs(Po.deltaY/100),Eo=Math.min(Ao,yt),ua=et+Eo*Ln;Po.deltaY>0&&(ua=et/ua),ss(ua,"wheel",Po.clientX,Po.clientY)}},Ua=function(Po){!On||!ci||(Po.keyCode===Se.Z.LEFT?ia():Po.keyCode===Se.Z.RIGHT&&_s())},Sa=function(Po){On&&(Yo!==1?ko({x:0,y:0,scale:1},"doubleClick"):ss(et+Ln,"doubleClick",Po.clientX,Po.clientY))};(0,Me.useEffect)(function(){var Ws,Po,Ao,Eo;if(sn){Ao=(0,ue.Z)(window,"mouseup",la,!1),Eo=(0,ue.Z)(window,"mousemove",Is,!1);try{window.top!==window.self&&(Ws=(0,ue.Z)(window.top,"mouseup",la,!1),Po=(0,ue.Z)(window.top,"mousemove",Is,!1))}catch(ua){(0,we.Kp)(!1,"[rc-image] ".concat(ua))}}return function(){var ua,xr,lo,Yr;(ua=Ao)===null||ua===void 0||ua.remove(),(xr=Eo)===null||xr===void 0||xr.remove(),(lo=Ws)===null||lo===void 0||lo.remove(),(Yr=Po)===null||Yr===void 0||Yr.remove()}},[On,Hi,rr,Wi,eo,sn]),(0,Me.useEffect)(function(){var Ws=(0,ue.Z)(window,"keydown",Ua,!1);return function(){Ws.remove()}},[On,ci,Ri]);var us=Me.createElement(lt,(0,Ce.Z)({},Bn,{width:on.width,height:on.height,imgRef:Ir,className:"".concat(Nt,"-img"),alt:Mn,style:{transform:"translate3d(".concat(Hr.x,"px, ").concat(Hr.y,"px, 0) scale3d(").concat(Hr.flipX?"-":"").concat(Yo,", ").concat(Hr.flipY?"-":"").concat(Yo,", 1) rotate(").concat(eo,"deg)"),transitionDuration:!Vr&&"0s"},fallback:Dn,src:un,onWheel:Pu,onMouseDown:kn,onDoubleClick:Sa}));return Me.createElement(Me.Fragment,null,Me.createElement(se.Z,(0,Ce.Z)({transitionName:qi,maskTransitionName:zi,closable:!1,keyboard:!0,prefixCls:Nt,onClose:Nn,visible:On,wrapClassName:Qn,rootClassName:ei,getContainer:hi},yo,{afterClose:or}),Me.createElement("div",{className:"".concat(Nt,"-img-wrapper")},fr?fr(us,(0,Le.Z)({transform:Hr},Pr?{current:Ri}:{})):us)),Me.createElement(Ct,{visible:On,transform:Hr,maskTransitionName:zi,closeIcon:Fn,getContainer:hi,prefixCls:Nt,rootClassName:ei,icons:Hn,countRender:Cr,showSwitch:ci,showProgress:Mt,current:Ri,count:$i,scale:Yo,minScale:ui,maxScale:di,toolbarRender:Br,onSwitchLeft:ia,onSwitchRight:_s,onZoomIn:to,onZoomOut:Ro,onRotateRight:Bo,onRotateLeft:Xo,onFlipX:as,onFlipY:Ho,onClose:Nn}))},ut=tt,mt=Ee(80702);function Pt(mn){var on=Me.useState({}),Nt=(0,ye.Z)(on,2),un=Nt[0],Mn=Nt[1],Dn=Me.useCallback(function(sn,Nn){return Mn(function(On){return(0,Le.Z)((0,Le.Z)({},On),{},(0,he.Z)({},sn,Nn))}),function(){Mn(function(On){var qn=(0,Le.Z)({},On);return delete qn[sn],qn})}},[]),nn=Me.useMemo(function(){return mn?mn.map(function(sn){if(typeof sn=="string")return{data:{src:sn}};var Nn={};return Object.keys(sn).forEach(function(On){["src"].concat((0,mt.Z)(de)).includes(On)&&(Nn[On]=sn[On])}),{data:Nn}}):Object.keys(un).reduce(function(sn,Nn){var On=un[Nn],qn=On.canPreview,Hn=On.data;return qn&&sn.push({data:Hn,id:Nn}),sn},[])},[mn,un]);return[nn,Dn]}var gt=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],Ft=["src"],Ht=function(on){var Nt,un=on.previewPrefixCls,Mn=un===void 0?"rc-image-preview":un,Dn=on.children,nn=on.icons,sn=nn===void 0?{}:nn,Nn=on.items,On=on.preview,qn=on.fallback,Hn=(0,xe.Z)(On)==="object"?On:{},ei=Hn.visible,Fn=Hn.onVisibleChange,hi=Hn.getContainer,Di=Hn.current,Ri=Hn.movable,En=Hn.minScale,$i=Hn.maxScale,Cr=Hn.countRender,mr=Hn.closeIcon,Ln=Hn.onChange,Jn=Hn.onTransform,ui=Hn.toolbarRender,Si=Hn.imageRender,di=(0,ge.Z)(Hn,gt),Ei=Pt(Nn),qi=(0,ye.Z)(Ei,2),Fi=qi[0],zi=qi[1],fr=(0,ve.Z)(0,{value:Di}),Bn=(0,ye.Z)(fr,2),Br=Bn[0],In=Bn[1],pr=(0,Me.useState)(!1),yo=(0,ye.Z)(pr,2),Ir=yo[0],bo=yo[1],co=((Nt=Fi[Br])===null||Nt===void 0?void 0:Nt.data)||{},Vi=co.src,Hi=(0,ge.Z)(co,Ft),ur=(0,ve.Z)(!!ei,{value:ei,onChange:function(eo,Yo){Fn==null||Fn(eo,Yo,Br)}}),Pr=(0,ye.Z)(ur,2),ci=Pr[0],Mt=Pr[1],Gr=(0,Me.useState)(null),Hr=(0,ye.Z)(Gr,2),ts=Hr[0],ko=Hr[1],ss=Me.useCallback(function(hr,eo,Yo){var rr=Fi.findIndex(function(Wi){return Wi.id===hr});Mt(!0),ko({x:eo,y:Yo}),In(rr<0?0:rr),bo(!0)},[Fi]);Me.useEffect(function(){ci?Ir||In(0):bo(!1)},[ci]);var _r=function(eo,Yo){In(eo),Ln==null||Ln(eo,Yo)},cr=function(){Mt(!1),ko(null)},Vr=Me.useMemo(function(){return{register:zi,onPreview:ss}},[zi,ss]);return Me.createElement(ce.Provider,{value:Vr},Dn,Me.createElement(ut,(0,Ce.Z)({"aria-hidden":!ci,movable:Ri,visible:ci,prefixCls:Mn,closeIcon:mr,onClose:cr,mousePosition:ts,imgCommonProps:Hi,src:Vi,fallback:qn,icons:sn,minScale:En,maxScale:$i,getContainer:hi,current:Br,count:Fi.length,countRender:Cr,onTransform:Jn,toolbarRender:ui,imageRender:Si,onChange:_r},di)))},hn=Ht,Jt=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],bn=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],Wt=function(on){var Nt=on.src,un=on.alt,Mn=on.onPreviewClose,Dn=on.prefixCls,nn=Dn===void 0?"rc-image":Dn,sn=on.previewPrefixCls,Nn=sn===void 0?"".concat(nn,"-preview"):sn,On=on.placeholder,qn=on.fallback,Hn=on.width,ei=on.height,Fn=on.style,hi=on.preview,Di=hi===void 0?!0:hi,Ri=on.className,En=on.onClick,$i=on.onError,Cr=on.wrapperClassName,mr=on.wrapperStyle,Ln=on.rootClassName,Jn=(0,ge.Z)(on,Jt),ui=On&&On!==!0,Si=(0,xe.Z)(Di)==="object"?Di:{},di=Si.src,Ei=Si.visible,qi=Ei===void 0?void 0:Ei,Fi=Si.onVisibleChange,zi=Fi===void 0?Mn:Fi,fr=Si.getContainer,Bn=fr===void 0?void 0:fr,Br=Si.mask,In=Si.maskClassName,pr=Si.movable,yo=Si.icons,Ir=Si.scaleStep,bo=Si.minScale,co=Si.maxScale,Vi=Si.imageRender,Hi=Si.toolbarRender,ur=(0,ge.Z)(Si,bn),Pr=di!=null?di:Nt,ci=(0,ve.Z)(!!qi,{value:qi,onChange:zi}),Mt=(0,ye.Z)(ci,2),Gr=Mt[0],Hr=Mt[1],ts=ie({src:Nt,isCustomPlaceholder:ui,fallback:qn}),ko=(0,ye.Z)(ts,3),ss=ko[0],_r=ko[1],cr=ko[2],Vr=(0,Me.useState)(null),hr=(0,ye.Z)(Vr,2),eo=hr[0],Yo=hr[1],rr=(0,Me.useContext)(ce),Wi=!!Di,Qn=function(){Hr(!1),Yo(null)},or=ke()(nn,Cr,Ln,(0,he.Z)({},"".concat(nn,"-error"),cr==="error")),to=(0,Me.useMemo)(function(){var as={};return de.forEach(function(Ho){on[Ho]!==void 0&&(as[Ho]=on[Ho])}),as},de.map(function(as){return on[as]})),Ro=(0,Me.useMemo)(function(){return(0,Le.Z)((0,Le.Z)({},to),{},{src:Pr})},[Pr,to]),Bo=ee(Wi,Ro),Xo=function(Ho){var ia=(0,le.os)(Ho.target),_s=ia.left,la=ia.top;rr?rr.onPreview(Bo,_s,la):(Yo({x:_s,y:la}),Hr(!0)),En==null||En(Ho)};return Me.createElement(Me.Fragment,null,Me.createElement("div",(0,Ce.Z)({},Jn,{className:or,onClick:Wi?Xo:En,style:(0,Le.Z)({width:Hn,height:ei},mr)}),Me.createElement("img",(0,Ce.Z)({},to,{className:ke()("".concat(nn,"-img"),(0,he.Z)({},"".concat(nn,"-img-placeholder"),On===!0),Ri),style:(0,Le.Z)({height:ei},Fn),ref:ss},_r,{width:Hn,height:ei,onError:$i})),cr==="loading"&&Me.createElement("div",{"aria-hidden":"true",className:"".concat(nn,"-placeholder")},On),Br&&Wi&&Me.createElement("div",{className:ke()("".concat(nn,"-mask"),In),style:{display:(Fn==null?void 0:Fn.display)==="none"?"none":void 0}},Br)),!rr&&Wi&&Me.createElement(ut,(0,Ce.Z)({"aria-hidden":!Gr,visible:Gr,prefixCls:Nn,onClose:Qn,mousePosition:eo,src:Pr,alt:un,fallback:qn,getContainer:Bn,icons:yo,movable:pr,scaleStep:Ir,minScale:bo,maxScale:co,rootClassName:Ln,imageRender:Vi,imgCommonProps:to,toolbarRender:Hi},ur)))};Wt.PreviewGroup=hn,Wt.displayName="Image";var Kt=Wt,Xt=Kt,$t=Ee(62892),kt=Ee(36355),pt=Ee(31724),Bt=Ee(99267),xt=Ee(33853),vt=Ee(38819),nt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"},He=nt,Ie=Ee(7657),We=function(on,Nt){return Me.createElement(Ie.Z,(0,Ce.Z)({},on,{ref:Nt,icon:He}))},Oe=Me.forwardRef(We),be=Oe,Ne={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z"}},{tag:"path",attrs:{d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z"}}]},name:"rotate-right",theme:"outlined"},$e=Ne,dt=function(on,Nt){return Me.createElement(Ie.Z,(0,Ce.Z)({},on,{ref:Nt,icon:$e}))},Je=Me.forwardRef(dt),At=Je,en={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"},pn=en,ln=function(on,Nt){return Me.createElement(Ie.Z,(0,Ce.Z)({},on,{ref:Nt,icon:pn}))},gn=Me.forwardRef(ln),Un=gn,An={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"},ni=An,ai=function(on,Nt){return Me.createElement(Ie.Z,(0,Ce.Z)({},on,{ref:Nt,icon:ni}))},ki=Me.forwardRef(ai),Ci=ki,Ki={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-out",theme:"outlined"},ir=Ki,sr=function(on,Nt){return Me.createElement(Ie.Z,(0,Ce.Z)({},on,{ref:Nt,icon:ir}))},Ji=Me.forwardRef(sr),Fr=Ji,Mr=Ee(64993),vi=Ee(73819),wr=Ee(17313),Tr=Ee(29878),it=Ee(1950),Rr=Ee(83116),Or=Ee(37613);const Ur=mn=>({position:mn||"absolute",inset:0}),uo=mn=>{const{iconCls:on,motionDurationSlow:Nt,paddingXXS:un,marginXXS:Mn,prefixCls:Dn,colorTextLightSolid:nn}=mn;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:nn,background:new Mr.C("#000").setAlpha(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${Nt}`,[`.${Dn}-mask-info`]:Object.assign(Object.assign({},wr.vS),{padding:`0 ${un}px`,[on]:{marginInlineEnd:Mn,svg:{verticalAlign:"baseline"}}})}},po=mn=>{const{previewCls:on,modalMaskBg:Nt,paddingSM:un,marginXL:Mn,margin:Dn,paddingLG:nn,previewOperationColorDisabled:sn,previewOperationHoverColor:Nn,motionDurationSlow:On,iconCls:qn,colorTextLightSolid:Hn}=mn,ei=new Mr.C(Nt).setAlpha(.1),Fn=ei.clone().setAlpha(.2);return{[`${on}-footer`]:{position:"fixed",bottom:Mn,left:{_skip_check_:!0,value:0},width:"100%",display:"flex",flexDirection:"column",alignItems:"center",color:mn.previewOperationColor},[`${on}-progress`]:{marginBottom:Dn},[`${on}-close`]:{position:"fixed",top:Mn,right:{_skip_check_:!0,value:Mn},display:"flex",color:Hn,backgroundColor:ei.toRgbString(),borderRadius:"50%",padding:un,outline:0,border:0,cursor:"pointer",transition:`all ${On}`,"&:hover":{backgroundColor:Fn.toRgbString()},[`& > ${qn}`]:{fontSize:mn.previewOperationSize}},[`${on}-operations`]:{display:"flex",alignItems:"center",padding:`0 ${nn}px`,backgroundColor:ei.toRgbString(),borderRadius:100,"&-operation":{marginInlineStart:un,padding:un,cursor:"pointer",transition:`all ${On}`,userSelect:"none",[`&:not(${on}-operations-operation-disabled):hover > ${qn}`]:{color:Nn},"&-disabled":{color:sn,cursor:"not-allowed"},"&:first-of-type":{marginInlineStart:0},[`& > ${qn}`]:{fontSize:mn.previewOperationSize}}}}},io=mn=>{const{modalMaskBg:on,iconCls:Nt,previewOperationColorDisabled:un,previewCls:Mn,zIndexPopup:Dn,motionDurationSlow:nn}=mn,sn=new Mr.C(on).setAlpha(.1),Nn=sn.clone().setAlpha(.2);return{[`${Mn}-switch-left, ${Mn}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:Dn+1,display:"flex",alignItems:"center",justifyContent:"center",width:mn.imagePreviewSwitchSize,height:mn.imagePreviewSwitchSize,marginTop:-mn.imagePreviewSwitchSize/2,color:mn.previewOperationColor,background:sn.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${nn}`,userSelect:"none","&:hover":{background:Nn.toRgbString()},"&-disabled":{"&, &:hover":{color:un,background:"transparent",cursor:"not-allowed",[`> ${Nt}`]:{cursor:"not-allowed"}}},[`> ${Nt}`]:{fontSize:mn.previewOperationSize}},[`${Mn}-switch-left`]:{insetInlineStart:mn.marginSM},[`${Mn}-switch-right`]:{insetInlineEnd:mn.marginSM}}},Do=mn=>{const{motionEaseOut:on,previewCls:Nt,motionDurationSlow:un,componentCls:Mn}=mn;return[{[`${Mn}-preview-root`]:{[Nt]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${Nt}-body`]:Object.assign(Object.assign({},Ur()),{overflow:"hidden"}),[`${Nt}-img`]:{maxWidth:"100%",maxHeight:"70%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${un} ${on} 0s`,userSelect:"none","&-wrapper":Object.assign(Object.assign({},Ur()),{transition:`transform ${un} ${on} 0s`,display:"flex",justifyContent:"center",alignItems:"center","& > *":{pointerEvents:"auto"},"&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${Nt}-moving`]:{[`${Nt}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${Mn}-preview-root`]:{[`${Nt}-wrap`]:{zIndex:mn.zIndexPopup}}},{[`${Mn}-preview-operations-wrapper`]:{position:"fixed",zIndex:mn.zIndexPopup+1},"&":[po(mn),io(mn)]}]},Xn=mn=>{const{componentCls:on}=mn;return{[on]:{position:"relative",display:"inline-block",[`${on}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${on}-img-placeholder`]:{backgroundColor:mn.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${on}-mask`]:Object.assign({},uo(mn)),[`${on}-mask:hover`]:{opacity:1},[`${on}-placeholder`]:Object.assign({},Ur())}}},Ke=mn=>{const{previewCls:on}=mn;return{[`${on}-root`]:(0,Tr._y)(mn,"zoom"),"&":(0,it.J$)(mn,!0)}};var qe=(0,Rr.Z)("Image",mn=>{const on=`${mn.componentCls}-preview`,Nt=(0,Or.TS)(mn,{previewCls:on,modalMaskBg:new Mr.C("#000").setAlpha(.45).toRgbString(),imagePreviewSwitchSize:mn.controlHeightLG});return[Xn(Nt),Do(Nt),(0,vi.QA)((0,Or.TS)(Nt,{componentCls:on})),Ke(Nt)]},mn=>({zIndexPopup:mn.zIndexPopupBase+80,previewOperationColor:new Mr.C(mn.colorTextLightSolid).setAlpha(.65).toRgbString(),previewOperationHoverColor:new Mr.C(mn.colorTextLightSolid).setAlpha(.85).toRgbString(),previewOperationColorDisabled:new Mr.C(mn.colorTextLightSolid).setAlpha(.25).toRgbString(),previewOperationSize:mn.fontSizeIcon*1.5})),Ye=function(mn,on){var Nt={};for(var un in mn)Object.prototype.hasOwnProperty.call(mn,un)&&on.indexOf(un)<0&&(Nt[un]=mn[un]);if(mn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Mn=0,un=Object.getOwnPropertySymbols(mn);Mn<un.length;Mn++)on.indexOf(un[Mn])<0&&Object.prototype.propertyIsEnumerable.call(mn,un[Mn])&&(Nt[un[Mn]]=mn[un[Mn]]);return Nt};const St={rotateLeft:Me.createElement(be,null),rotateRight:Me.createElement(At,null),zoomIn:Me.createElement(Ci,null),zoomOut:Me.createElement(Fr,null),close:Me.createElement(Bt.Z,null),left:Me.createElement(xt.Z,null),right:Me.createElement(vt.Z,null),flipX:Me.createElement(Un,null),flipY:Me.createElement(Un,{rotate:90})};var Tt=mn=>{var{previewPrefixCls:on,preview:Nt}=mn,un=Ye(mn,["previewPrefixCls","preview"]);const{getPrefixCls:Mn}=Me.useContext(kt.E_),Dn=Mn("image",on),nn=`${Dn}-preview`,sn=Mn(),[Nn,On]=qe(Dn),qn=Me.useMemo(()=>{var Hn;if(Nt===!1)return Nt;const ei=typeof Nt=="object"?Nt:{},Fn=ke()(On,(Hn=ei.rootClassName)!==null&&Hn!==void 0?Hn:"");return Object.assign(Object.assign({},ei),{transitionName:(0,$t.m)(sn,"zoom",ei.transitionName),maskTransitionName:(0,$t.m)(sn,"fade",ei.maskTransitionName),rootClassName:Fn})},[Nt]);return Nn(Me.createElement(Xt.PreviewGroup,Object.assign({preview:qn,previewPrefixCls:nn,icons:St},un)))},_t=function(mn,on){var Nt={};for(var un in mn)Object.prototype.hasOwnProperty.call(mn,un)&&on.indexOf(un)<0&&(Nt[un]=mn[un]);if(mn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Mn=0,un=Object.getOwnPropertySymbols(mn);Mn<un.length;Mn++)on.indexOf(un[Mn])<0&&Object.prototype.propertyIsEnumerable.call(mn,un[Mn])&&(Nt[un[Mn]]=mn[un[Mn]]);return Nt};const dn=mn=>{const{prefixCls:on,preview:Nt,className:un,rootClassName:Mn,style:Dn}=mn,nn=_t(mn,["prefixCls","preview","className","rootClassName","style"]),{getPrefixCls:sn,locale:Nn=pt.Z,getPopupContainer:On,image:qn}=Me.useContext(kt.E_),Hn=sn("image",on),ei=sn(),Fn=Nn.Image||pt.Z.Image,[hi,Di]=qe(Hn),Ri=ke()(Mn,Di),En=ke()(un,Di,qn==null?void 0:qn.className),$i=Me.useMemo(()=>{if(Nt===!1)return Nt;const mr=typeof Nt=="object"?Nt:{},{getContainer:Ln}=mr,Jn=_t(mr,["getContainer"]);return Object.assign(Object.assign({mask:Me.createElement("div",{className:`${Hn}-mask-info`},Me.createElement(me.Z,null),Fn==null?void 0:Fn.preview),icons:St},Jn),{getContainer:Ln||On,transitionName:(0,$t.m)(ei,"zoom",mr.transitionName),maskTransitionName:(0,$t.m)(ei,"fade",mr.maskTransitionName)})},[Nt,Fn]),Cr=Object.assign(Object.assign({},qn==null?void 0:qn.style),Dn);return hi(Me.createElement(Xt,Object.assign({prefixCls:Hn,preview:$i,rootClassName:Ri,className:En,style:Cr},nn)))};dn.PreviewGroup=Tt;var Pn=dn},9432:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return se},n:function(){return oe}});var Me=Ee(19248),me=Ee(92310),Be=Ee.n(me),ke=Ee(93681),Ce=Ee(8654),Le=Ee(59301),he=Ee(19080),ye=Ee(36355),xe=Ee(1684),ge=Ee(19716),le=Ee(32441),ve=Ee(33234),de=Ee(59412),ce=Ee(9937);function z(ue){return!!(ue.prefix||ue.suffix||ue.allowClear)}var ee=function(ue,Se){var we={};for(var Pe in ue)Object.prototype.hasOwnProperty.call(ue,Pe)&&Se.indexOf(Pe)<0&&(we[Pe]=ue[Pe]);if(ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ae=0,Pe=Object.getOwnPropertySymbols(ue);Ae<Pe.length;Ae++)Se.indexOf(Pe[Ae])<0&&Object.prototype.propertyIsEnumerable.call(ue,Pe[Ae])&&(we[Pe[Ae]]=ue[Pe[Ae]]);return we};function oe(ue,Se){if(!ue)return;ue.focus(Se);const{cursor:we}=Se||{};if(we){const Pe=ue.value.length;switch(we){case"start":ue.setSelectionRange(0,0);break;case"end":ue.setSelectionRange(Pe,Pe);break;default:ue.setSelectionRange(0,Pe);break}}}var se=(0,Le.forwardRef)((ue,Se)=>{var we;const{prefixCls:Pe,bordered:Ae=!0,status:De,size:ze,disabled:Ze,onBlur:Xe,onFocus:Ge,suffix:ft,allowClear:at,addonAfter:Ct,addonBefore:et,className:yt,style:st,styles:zt,rootClassName:lt,onChange:tt,classNames:ut}=ue,mt=ee(ue,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Pt,direction:gt,input:Ft}=Le.useContext(ye.E_),Ht=Pt("input",Pe),hn=(0,Le.useRef)(null),[Jt,bn]=(0,ce.ZP)(Ht),{compactSize:Wt,compactItemClassnames:Kt}=(0,ve.ri)(Ht,gt),Xt=(0,ge.Z)(dt=>{var Je;return(Je=ze!=null?ze:Wt)!==null&&Je!==void 0?Je:dt}),$t=Le.useContext(xe.Z),kt=Ze!=null?Ze:$t,{status:pt,hasFeedback:Bt,feedbackIcon:xt}=(0,Le.useContext)(le.aM),vt=(0,he.F)(pt,De),nt=z(ue)||!!Bt,He=(0,Le.useRef)(nt);(0,Le.useEffect)(()=>{var dt;nt&&He.current,He.current=nt},[nt]);const Ie=(0,de.Z)(hn,!0),We=dt=>{Ie(),Xe==null||Xe(dt)},Oe=dt=>{Ie(),Ge==null||Ge(dt)},be=dt=>{Ie(),tt==null||tt(dt)},Ne=(Bt||ft)&&Le.createElement(Le.Fragment,null,ft,Bt&&xt);let $e;return typeof at=="object"&&(at!=null&&at.clearIcon)?$e=at:at&&($e={clearIcon:Le.createElement(Me.Z,null)}),Jt(Le.createElement(ke.default,Object.assign({ref:(0,Ce.sQ)(Se,hn),prefixCls:Ht,autoComplete:Ft==null?void 0:Ft.autoComplete},mt,{disabled:kt,onBlur:We,onFocus:Oe,style:Object.assign(Object.assign({},Ft==null?void 0:Ft.style),st),styles:Object.assign(Object.assign({},Ft==null?void 0:Ft.styles),zt),suffix:Ne,allowClear:$e,className:Be()(yt,lt,Kt,Ft==null?void 0:Ft.className),onChange:be,addonAfter:Ct&&Le.createElement(ve.BR,null,Le.createElement(le.Ux,{override:!0,status:!0},Ct)),addonBefore:et&&Le.createElement(ve.BR,null,Le.createElement(le.Ux,{override:!0,status:!0},et)),classNames:Object.assign(Object.assign(Object.assign({},ut),Ft==null?void 0:Ft.classNames),{input:Be()({[`${Ht}-sm`]:Xt==="small",[`${Ht}-lg`]:Xt==="large",[`${Ht}-rtl`]:gt==="rtl",[`${Ht}-borderless`]:!Ae},!nt&&(0,he.Z)(Ht,vt),ut==null?void 0:ut.input,(we=Ft==null?void 0:Ft.classNames)===null||we===void 0?void 0:we.input,bn)}),classes:{affixWrapper:Be()({[`${Ht}-affix-wrapper-sm`]:Xt==="small",[`${Ht}-affix-wrapper-lg`]:Xt==="large",[`${Ht}-affix-wrapper-rtl`]:gt==="rtl",[`${Ht}-affix-wrapper-borderless`]:!Ae},(0,he.Z)(`${Ht}-affix-wrapper`,vt,Bt),bn),wrapper:Be()({[`${Ht}-group-rtl`]:gt==="rtl"},bn),group:Be()({[`${Ht}-group-wrapper-sm`]:Xt==="small",[`${Ht}-group-wrapper-lg`]:Xt==="large",[`${Ht}-group-wrapper-rtl`]:gt==="rtl",[`${Ht}-group-wrapper-disabled`]:kt},(0,he.Z)(`${Ht}-group-wrapper`,vt,Bt),bn)}})))})},1643:function(_n,qt,Ee){"use strict";var Me=Ee(19248),me=Ee(92310),Be=Ee.n(me),ke=Ee(9296),Ce=Ee(59301),Le=Ee(19080),he=Ee(36355),ye=Ee(1684),xe=Ee(19716),ge=Ee(32441),le=Ee(9432),ve=Ee(9937),de=function(z,ee){var oe={};for(var ie in z)Object.prototype.hasOwnProperty.call(z,ie)&&ee.indexOf(ie)<0&&(oe[ie]=z[ie]);if(z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var se=0,ie=Object.getOwnPropertySymbols(z);se<ie.length;se++)ee.indexOf(ie[se])<0&&Object.prototype.propertyIsEnumerable.call(z,ie[se])&&(oe[ie[se]]=z[ie[se]]);return oe};const ce=(0,Ce.forwardRef)((z,ee)=>{const{prefixCls:oe,bordered:ie=!0,size:se,disabled:ue,status:Se,allowClear:we,showCount:Pe,classNames:Ae,rootClassName:De,className:ze}=z,Ze=de(z,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:Xe,direction:Ge}=Ce.useContext(he.E_),ft=(0,xe.Z)(se),at=Ce.useContext(ye.Z),Ct=ue!=null?ue:at,{status:et,hasFeedback:yt,feedbackIcon:st}=Ce.useContext(ge.aM),zt=(0,Le.F)(et,Se),lt=Ce.useRef(null);Ce.useImperativeHandle(ee,()=>{var gt;return{resizableTextArea:(gt=lt.current)===null||gt===void 0?void 0:gt.resizableTextArea,focus:Ft=>{var Ht,hn;(0,le.n)((hn=(Ht=lt.current)===null||Ht===void 0?void 0:Ht.resizableTextArea)===null||hn===void 0?void 0:hn.textArea,Ft)},blur:()=>{var Ft;return(Ft=lt.current)===null||Ft===void 0?void 0:Ft.blur()}}});const tt=Xe("input",oe);let ut;typeof we=="object"&&(we!=null&&we.clearIcon)?ut=we:we&&(ut={clearIcon:Ce.createElement(Me.Z,null)});const[mt,Pt]=(0,ve.ZP)(tt);return mt(Ce.createElement(ke.default,Object.assign({},Ze,{disabled:Ct,allowClear:ut,className:Be()(ze,De),classes:{affixWrapper:Be()(`${tt}-textarea-affix-wrapper`,{[`${tt}-affix-wrapper-rtl`]:Ge==="rtl",[`${tt}-affix-wrapper-borderless`]:!ie,[`${tt}-affix-wrapper-sm`]:ft==="small",[`${tt}-affix-wrapper-lg`]:ft==="large",[`${tt}-textarea-show-count`]:Pe},(0,Le.Z)(`${tt}-affix-wrapper`,zt),Pt)},classNames:Object.assign(Object.assign({},Ae),{textarea:Be()({[`${tt}-borderless`]:!ie,[`${tt}-sm`]:ft==="small",[`${tt}-lg`]:ft==="large"},(0,Le.Z)(tt,zt),Pt,Ae==null?void 0:Ae.textarea)}),prefixCls:tt,suffix:yt&&Ce.createElement("span",{className:`${tt}-textarea-suffix`},st),showCount:Pe,ref:lt})))});qt.Z=ce},59412:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return me}});var Me=Ee(59301);function me(Be,ke){const Ce=(0,Me.useRef)([]),Le=()=>{Ce.current.push(setTimeout(()=>{var he,ye,xe,ge;!((he=Be.current)===null||he===void 0)&&he.input&&((ye=Be.current)===null||ye===void 0?void 0:ye.input.getAttribute("type"))==="password"&&(!((xe=Be.current)===null||xe===void 0)&&xe.input.hasAttribute("value"))&&((ge=Be.current)===null||ge===void 0||ge.input.removeAttribute("value"))}))};return(0,Me.useEffect)(()=>(ke&&Le(),()=>Ce.current.forEach(he=>{he&&clearTimeout(he)})),[]),Le}},92832:function(_n,qt,Ee){"use strict";Ee.d(qt,{default:function(){return ft}});var Me=Ee(92310),me=Ee.n(Me),Be=Ee(59301),ke=Ee(36355),Ce=Ee(32441),Le=Ee(9937),ye=at=>{const{getPrefixCls:Ct,direction:et}=(0,Be.useContext)(ke.E_),{prefixCls:yt,className:st}=at,zt=Ct("input-group",yt),lt=Ct("input"),[tt,ut]=(0,Le.ZP)(lt),mt=me()(zt,{[`${zt}-lg`]:at.size==="large",[`${zt}-sm`]:at.size==="small",[`${zt}-compact`]:at.compact,[`${zt}-rtl`]:et==="rtl"},ut,st),Pt=(0,Be.useContext)(Ce.aM),gt=(0,Be.useMemo)(()=>Object.assign(Object.assign({},Pt),{isFormItemInput:!1}),[Pt]);return tt(Be.createElement("span",{className:mt,style:at.style,onMouseEnter:at.onMouseEnter,onMouseLeave:at.onMouseLeave,onFocus:at.onFocus,onBlur:at.onBlur},Be.createElement(Ce.aM.Provider,{value:gt},at.children)))},xe=Ee(9432),ge=Ee(73331),le=Ee(15277),ve=Ee(2738),de=Ee(8654),ce=Ee(59412),z=function(at,Ct){var et={};for(var yt in at)Object.prototype.hasOwnProperty.call(at,yt)&&Ct.indexOf(yt)<0&&(et[yt]=at[yt]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var st=0,yt=Object.getOwnPropertySymbols(at);st<yt.length;st++)Ct.indexOf(yt[st])<0&&Object.prototype.propertyIsEnumerable.call(at,yt[st])&&(et[yt[st]]=at[yt[st]]);return et};const ee=at=>at?Be.createElement(le.Z,null):Be.createElement(ge.Z,null),oe={click:"onClick",hover:"onMouseOver"};var se=Be.forwardRef((at,Ct)=>{const{visibilityToggle:et=!0}=at,yt=typeof et=="object"&&et.visible!==void 0,[st,zt]=(0,Be.useState)(()=>yt?et.visible:!1),lt=(0,Be.useRef)(null);Be.useEffect(()=>{yt&&zt(et.visible)},[yt,et]);const tt=(0,ce.Z)(lt),ut=()=>{const{disabled:kt}=at;kt||(st&&tt(),zt(pt=>{var Bt;const xt=!pt;return typeof et=="object"&&((Bt=et.onVisibleChange)===null||Bt===void 0||Bt.call(et,xt)),xt}))},mt=kt=>{const{action:pt="click",iconRender:Bt=ee}=at,xt=oe[pt]||"",vt=Bt(st),nt={[xt]:ut,className:`${kt}-icon`,key:"passwordIcon",onMouseDown:He=>{He.preventDefault()},onMouseUp:He=>{He.preventDefault()}};return Be.cloneElement(Be.isValidElement(vt)?vt:Be.createElement("span",null,vt),nt)},{className:Pt,prefixCls:gt,inputPrefixCls:Ft,size:Ht}=at,hn=z(at,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Jt}=Be.useContext(ke.E_),bn=Jt("input",Ft),Wt=Jt("input-password",gt),Kt=et&&mt(Wt),Xt=me()(Wt,Pt,{[`${Wt}-${Ht}`]:!!Ht}),$t=Object.assign(Object.assign({},(0,ve.Z)(hn,["suffix","iconRender","visibilityToggle"])),{type:st?"text":"password",className:Xt,prefixCls:bn,suffix:Kt});return Ht&&($t.size=Ht),Be.createElement(xe.Z,Object.assign({ref:(0,de.sQ)(Ct,lt)},$t))}),ue=Ee(47472),Se=Ee(92343),we=Ee(3113),Pe=Ee(19716),Ae=Ee(33234),De=function(at,Ct){var et={};for(var yt in at)Object.prototype.hasOwnProperty.call(at,yt)&&Ct.indexOf(yt)<0&&(et[yt]=at[yt]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var st=0,yt=Object.getOwnPropertySymbols(at);st<yt.length;st++)Ct.indexOf(yt[st])<0&&Object.prototype.propertyIsEnumerable.call(at,yt[st])&&(et[yt[st]]=at[yt[st]]);return et},Ze=Be.forwardRef((at,Ct)=>{const{prefixCls:et,inputPrefixCls:yt,className:st,size:zt,suffix:lt,enterButton:tt=!1,addonAfter:ut,loading:mt,disabled:Pt,onSearch:gt,onChange:Ft,onCompositionStart:Ht,onCompositionEnd:hn}=at,Jt=De(at,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:bn,direction:Wt}=Be.useContext(ke.E_),Kt=Be.useRef(!1),Xt=bn("input-search",et),$t=bn("input",yt),{compactSize:kt}=(0,Ae.ri)(Xt,Wt),pt=(0,Pe.Z)(At=>{var en;return(en=zt!=null?zt:kt)!==null&&en!==void 0?en:At}),Bt=Be.useRef(null),xt=At=>{At&&At.target&&At.type==="click"&>&>(At.target.value,At,{source:"clear"}),Ft&&Ft(At)},vt=At=>{var en;document.activeElement===((en=Bt.current)===null||en===void 0?void 0:en.input)&&At.preventDefault()},nt=At=>{var en,pn;gt&>((pn=(en=Bt.current)===null||en===void 0?void 0:en.input)===null||pn===void 0?void 0:pn.value,At,{source:"input"})},He=At=>{Kt.current||mt||nt(At)},Ie=typeof tt=="boolean"?Be.createElement(ue.Z,null):null,We=`${Xt}-button`;let Oe;const be=tt||{},Ne=be.type&&be.type.__ANT_BUTTON===!0;Ne||be.type==="button"?Oe=(0,Se.Tm)(be,Object.assign({onMouseDown:vt,onClick:At=>{var en,pn;(pn=(en=be==null?void 0:be.props)===null||en===void 0?void 0:en.onClick)===null||pn===void 0||pn.call(en,At),nt(At)},key:"enterButton"},Ne?{className:We,size:pt}:{})):Oe=Be.createElement(we.ZP,{className:We,type:tt?"primary":void 0,size:pt,disabled:Pt,key:"enterButton",onMouseDown:vt,onClick:nt,loading:mt,icon:Ie},tt),ut&&(Oe=[Oe,(0,Se.Tm)(ut,{key:"addonAfter"})]);const $e=me()(Xt,{[`${Xt}-rtl`]:Wt==="rtl",[`${Xt}-${pt}`]:!!pt,[`${Xt}-with-button`]:!!tt},st),dt=At=>{Kt.current=!0,Ht==null||Ht(At)},Je=At=>{Kt.current=!1,hn==null||hn(At)};return Be.createElement(xe.Z,Object.assign({ref:(0,de.sQ)(Bt,Ct),onPressEnter:He},Jt,{size:pt,onCompositionStart:dt,onCompositionEnd:Je,prefixCls:$t,addonAfter:Oe,suffix:lt,onChange:xt,className:$e,disabled:Pt}))}),Xe=Ee(1643);const Ge=xe.Z;Ge.Group=ye,Ge.Search=Ze,Ge.TextArea=Xe.Z,Ge.Password=se;var ft=Ge},45818:function(_n,qt,Ee){"use strict";Ee.d(qt,{D:function(){return ue},Z:function(){return Pe}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(De,ze){return me.createElement(Ce.Z,(0,Me.Z)({},De,{ref:ze,icon:ke}))},he=me.forwardRef(Le),ye=he,xe=Ee(33853),ge=Ee(38819),le=Ee(92310),ve=Ee.n(le),de=Ee(2738),z=Ae=>!isNaN(parseFloat(Ae))&&isFinite(Ae),ee=Ee(36355),oe=Ee(84966),ie=function(Ae,De){var ze={};for(var Ze in Ae)Object.prototype.hasOwnProperty.call(Ae,Ze)&&De.indexOf(Ze)<0&&(ze[Ze]=Ae[Ze]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,Ze=Object.getOwnPropertySymbols(Ae);Xe<Ze.length;Xe++)De.indexOf(Ze[Xe])<0&&Object.prototype.propertyIsEnumerable.call(Ae,Ze[Xe])&&(ze[Ze[Xe]]=Ae[Ze[Xe]]);return ze};const se={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},ue=me.createContext({}),Se=(()=>{let Ae=0;return function(){let De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return Ae+=1,`${De}${Ae}`}})();var Pe=me.forwardRef((Ae,De)=>{const{prefixCls:ze,className:Ze,trigger:Xe,children:Ge,defaultCollapsed:ft=!1,theme:at="dark",style:Ct={},collapsible:et=!1,reverseArrow:yt=!1,width:st=200,collapsedWidth:zt=80,zeroWidthTriggerStyle:lt,breakpoint:tt,onCollapse:ut,onBreakpoint:mt}=Ae,Pt=ie(Ae,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:gt}=(0,me.useContext)(oe.Gs),[Ft,Ht]=(0,me.useState)("collapsed"in Ae?Ae.collapsed:ft),[hn,Jt]=(0,me.useState)(!1);(0,me.useEffect)(()=>{"collapsed"in Ae&&Ht(Ae.collapsed)},[Ae.collapsed]);const bn=(pt,Bt)=>{"collapsed"in Ae||Ht(pt),ut==null||ut(pt,Bt)},Wt=(0,me.useRef)();Wt.current=pt=>{Jt(pt.matches),mt==null||mt(pt.matches),Ft!==pt.matches&&bn(pt.matches,"responsive")},(0,me.useEffect)(()=>{function pt(xt){return Wt.current(xt)}let Bt;if(typeof window!="undefined"){const{matchMedia:xt}=window;if(xt&&tt&&tt in se){Bt=xt(`(max-width: ${se[tt]})`);try{Bt.addEventListener("change",pt)}catch(vt){Bt.addListener(pt)}pt(Bt)}}return()=>{try{Bt==null||Bt.removeEventListener("change",pt)}catch(xt){Bt==null||Bt.removeListener(pt)}}},[tt]),(0,me.useEffect)(()=>{const pt=Se("ant-sider-");return gt.addSider(pt),()=>gt.removeSider(pt)},[]);const Kt=()=>{bn(!Ft,"clickTrigger")},{getPrefixCls:Xt}=(0,me.useContext)(ee.E_),$t=()=>{const pt=Xt("layout-sider",ze),Bt=(0,de.Z)(Pt,["collapsed"]),xt=Ft?zt:st,vt=z(xt)?`${xt}px`:String(xt),nt=parseFloat(String(zt||0))===0?me.createElement("span",{onClick:Kt,className:ve()(`${pt}-zero-width-trigger`,`${pt}-zero-width-trigger-${yt?"right":"left"}`),style:lt},Xe||me.createElement(ye,null)):null,We={expanded:yt?me.createElement(ge.Z,null):me.createElement(xe.Z,null),collapsed:yt?me.createElement(xe.Z,null):me.createElement(ge.Z,null)}[Ft?"collapsed":"expanded"],Oe=Xe!==null?nt||me.createElement("div",{className:`${pt}-trigger`,onClick:Kt,style:{width:vt}},Xe||We):null,be=Object.assign(Object.assign({},Ct),{flex:`0 0 ${vt}`,maxWidth:vt,minWidth:vt,width:vt}),Ne=ve()(pt,`${pt}-${at}`,{[`${pt}-collapsed`]:!!Ft,[`${pt}-has-trigger`]:et&&Xe!==null&&!nt,[`${pt}-below`]:!!hn,[`${pt}-zero-width`]:parseFloat(vt)===0},Ze);return me.createElement("aside",Object.assign({className:Ne},Bt,{style:be,ref:De}),me.createElement("div",{className:`${pt}-children`},Ge),et||hn&&nt?Oe:null)},kt=me.useMemo(()=>({siderCollapsed:Ft}),[Ft]);return me.createElement(ue.Provider,{value:kt},$t())})},84966:function(_n,qt,Ee){"use strict";Ee.d(qt,{VY:function(){return ue},$_:function(){return se},h4:function(){return ie},Gs:function(){return de},ZP:function(){return Se}});var Me=Ee(80702),me=Ee(92310),Be=Ee.n(me),ke=Ee(2738),Ce=Ee(59301),Le=Ee(36355),he=Ee(83116),xe=we=>{const{componentCls:Pe,bodyBg:Ae,lightSiderBg:De,lightTriggerBg:ze,lightTriggerColor:Ze}=we;return{[`${Pe}-sider-light`]:{background:De,[`${Pe}-sider-trigger`]:{color:Ze,background:ze},[`${Pe}-sider-zero-width-trigger`]:{color:Ze,background:ze,border:`1px solid ${Ae}`,borderInlineStart:0}}}};const ge=we=>{const{antCls:Pe,componentCls:Ae,colorText:De,triggerColor:ze,footerBg:Ze,triggerBg:Xe,headerHeight:Ge,headerPadding:ft,headerColor:at,footerPadding:Ct,triggerHeight:et,zeroTriggerHeight:yt,zeroTriggerWidth:st,motionDurationMid:zt,motionDurationSlow:lt,fontSize:tt,borderRadius:ut,bodyBg:mt,headerBg:Pt,siderBg:gt}=we;return{[Ae]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:mt,"&, *":{boxSizing:"border-box"},[`&${Ae}-has-sider`]:{flexDirection:"row",[`> ${Ae}, > ${Ae}-content`]:{width:0}},[`${Ae}-header, &${Ae}-footer`]:{flex:"0 0 auto"},[`${Ae}-sider`]:{position:"relative",minWidth:0,background:gt,transition:`all ${zt}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${Pe}-menu${Pe}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:et},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:et,color:ze,lineHeight:`${et}px`,textAlign:"center",background:Xe,cursor:"pointer",transition:`all ${zt}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:Ge,insetInlineEnd:-st,zIndex:1,width:st,height:yt,color:ze,fontSize:we.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:gt,borderStartStartRadius:0,borderStartEndRadius:ut,borderEndEndRadius:ut,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:-st,borderStartStartRadius:ut,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:ut}}}}},xe(we)),{"&-rtl":{direction:"rtl"}}),[`${Ae}-header`]:{height:Ge,padding:ft,color:at,lineHeight:`${Ge}px`,background:Pt,[`${Pe}-menu`]:{lineHeight:"inherit"}},[`${Ae}-footer`]:{padding:Ct,color:De,fontSize:tt,background:Ze},[`${Ae}-content`]:{flex:"auto",minHeight:0}}};var le=(0,he.Z)("Layout",we=>[ge(we)],we=>{const{colorBgLayout:Pe,controlHeight:Ae,controlHeightLG:De,colorText:ze,controlHeightSM:Ze,marginXXS:Xe,colorTextLightSolid:Ge,colorBgContainer:ft}=we,at=De*1.25;return{colorBgHeader:"#001529",colorBgBody:Pe,colorBgTrigger:"#002140",bodyBg:Pe,headerBg:"#001529",headerHeight:Ae*2,headerPadding:`0 ${at}px`,headerColor:ze,footerPadding:`${Ze}px ${at}px`,footerBg:Pe,siderBg:"#001529",triggerHeight:De+Xe*2,triggerBg:"#002140",triggerColor:Ge,zeroTriggerWidth:De,zeroTriggerHeight:De,lightSiderBg:ft,lightTriggerBg:ft,lightTriggerColor:ze}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),ve=function(we,Pe){var Ae={};for(var De in we)Object.prototype.hasOwnProperty.call(we,De)&&Pe.indexOf(De)<0&&(Ae[De]=we[De]);if(we!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ze=0,De=Object.getOwnPropertySymbols(we);ze<De.length;ze++)Pe.indexOf(De[ze])<0&&Object.prototype.propertyIsEnumerable.call(we,De[ze])&&(Ae[De[ze]]=we[De[ze]]);return Ae};const de=Ce.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function ce(we){let{suffixCls:Pe,tagName:Ae,displayName:De}=we;return ze=>Ce.forwardRef((Xe,Ge)=>Ce.createElement(ze,Object.assign({ref:Ge,suffixCls:Pe,tagName:Ae},Xe)))}const z=Ce.forwardRef((we,Pe)=>{const{prefixCls:Ae,suffixCls:De,className:ze,tagName:Ze}=we,Xe=ve(we,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:Ge}=Ce.useContext(Le.E_),ft=Ge("layout",Ae),[at,Ct]=le(ft),et=De?`${ft}-${De}`:ft;return at(Ce.createElement(Ze,Object.assign({className:Be()(Ae||et,ze,Ct),ref:Pe},Xe)))}),ee=Ce.forwardRef((we,Pe)=>{const{direction:Ae}=Ce.useContext(Le.E_),[De,ze]=Ce.useState([]),{prefixCls:Ze,className:Xe,rootClassName:Ge,children:ft,hasSider:at,tagName:Ct,style:et}=we,yt=ve(we,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),st=(0,ke.Z)(yt,["suffixCls"]),{getPrefixCls:zt,layout:lt}=Ce.useContext(Le.E_),tt=zt("layout",Ze),[ut,mt]=le(tt),Pt=Be()(tt,{[`${tt}-has-sider`]:typeof at=="boolean"?at:De.length>0,[`${tt}-rtl`]:Ae==="rtl"},lt==null?void 0:lt.className,Xe,Ge,mt),gt=Ce.useMemo(()=>({siderHook:{addSider:Ft=>{ze(Ht=>[].concat((0,Me.Z)(Ht),[Ft]))},removeSider:Ft=>{ze(Ht=>Ht.filter(hn=>hn!==Ft))}}}),[]);return ut(Ce.createElement(de.Provider,{value:gt},Ce.createElement(Ct,Object.assign({ref:Pe,className:Pt,style:Object.assign(Object.assign({},lt==null?void 0:lt.style),et)},st),ft)))}),oe=ce({tagName:"div",displayName:"Layout"})(ee),ie=ce({suffixCls:"header",tagName:"header",displayName:"Header"})(z),se=ce({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(z),ue=ce({suffixCls:"content",tagName:"main",displayName:"Content"})(z);var Se=oe},40875:function(_n,qt,Ee){"use strict";Ee.d(qt,{J:function(){return Le}});var Me=Ee(59301),me=Ee(33234),Be=Ee(70425),ke=function(he,ye){var xe={};for(var ge in he)Object.prototype.hasOwnProperty.call(he,ge)&&ye.indexOf(ge)<0&&(xe[ge]=he[ge]);if(he!=null&&typeof Object.getOwnPropertySymbols=="function")for(var le=0,ge=Object.getOwnPropertySymbols(he);le<ge.length;le++)ye.indexOf(ge[le])<0&&Object.prototype.propertyIsEnumerable.call(he,ge[le])&&(xe[ge[le]]=he[ge[le]]);return xe};const Ce=Me.createContext(null),Le=Me.forwardRef((he,ye)=>{const{children:xe}=he,ge=ke(he,["children"]),le=Me.useContext(Ce),ve=Me.useMemo(()=>Object.assign(Object.assign({},le),ge),[le,ge.prefixCls,ge.mode,ge.selectable]);return Me.createElement(Ce.Provider,{value:ve},Me.createElement(me.BR,null,(0,Be.supportNodeRef)(xe)?Me.cloneElement(xe,{ref:ye}):xe))});qt.Z=Ce},20834:function(_n,qt,Ee){"use strict";Ee.d(qt,{default:function(){return kt}});var Me=Ee(15285),me=Ee(59301),Be=Ee(45818),ke=Ee(92310),Ce=Ee.n(ke),Le=Ee(36355),he=function(pt,Bt){var xt={};for(var vt in pt)Object.prototype.hasOwnProperty.call(pt,vt)&&Bt.indexOf(vt)<0&&(xt[vt]=pt[vt]);if(pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,vt=Object.getOwnPropertySymbols(pt);nt<vt.length;nt++)Bt.indexOf(vt[nt])<0&&Object.prototype.propertyIsEnumerable.call(pt,vt[nt])&&(xt[vt[nt]]=pt[vt[nt]]);return xt},xe=pt=>{const{prefixCls:Bt,className:xt,dashed:vt}=pt,nt=he(pt,["prefixCls","className","dashed"]),{getPrefixCls:He}=me.useContext(Le.E_),Ie=He("menu",Bt),We=Ce()({[`${Ie}-item-divider-dashed`]:!!vt},xt);return me.createElement(Me.iz,Object.assign({className:We},nt))},ge=Ee(11592),le=Ee(2738),ve=Ee(6848),de=Ee(92343),z=(0,me.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),oe=pt=>{var Bt;const{className:xt,children:vt,icon:nt,title:He,danger:Ie}=pt,{prefixCls:We,firstLevel:Oe,direction:be,disableMenuItemTitleTooltip:Ne,inlineCollapsed:$e}=me.useContext(z),dt=gn=>{const Un=me.createElement("span",{className:`${We}-title-content`},vt);return(!nt||(0,de.l$)(vt)&&vt.type==="span")&&vt&&gn&&Oe&&typeof vt=="string"?me.createElement("div",{className:`${We}-inline-collapsed-noicon`},vt.charAt(0)):Un},{siderCollapsed:Je}=me.useContext(Be.D);let At=He;typeof He=="undefined"?At=Oe?vt:"":He===!1&&(At="");const en={title:At};!Je&&!$e&&(en.title=null,en.open=!1);const pn=(0,ge.Z)(vt).length;let ln=me.createElement(Me.ck,Object.assign({},(0,le.Z)(pt,["title","icon","danger"]),{className:Ce()({[`${We}-item-danger`]:Ie,[`${We}-item-only-child`]:(nt?pn+1:pn)===1},xt),title:typeof He=="string"?He:void 0}),(0,de.Tm)(nt,{className:Ce()((0,de.l$)(nt)?(Bt=nt.props)===null||Bt===void 0?void 0:Bt.className:"",`${We}-item-icon`)}),dt($e));return Ne||(ln=me.createElement(ve.Z,Object.assign({},en,{placement:be==="rtl"?"left":"right",overlayClassName:`${We}-inline-collapsed-tooltip`}),ln)),ln},se=pt=>{var Bt;const{popupClassName:xt,icon:vt,title:nt,theme:He}=pt,Ie=me.useContext(z),{prefixCls:We,inlineCollapsed:Oe,theme:be}=Ie,Ne=(0,Me.Xl)();let $e;if(!vt)$e=Oe&&!Ne.length&&nt&&typeof nt=="string"?me.createElement("div",{className:`${We}-inline-collapsed-noicon`},nt.charAt(0)):me.createElement("span",{className:`${We}-title-content`},nt);else{const Je=(0,de.l$)(nt)&&nt.type==="span";$e=me.createElement(me.Fragment,null,(0,de.Tm)(vt,{className:Ce()((0,de.l$)(vt)?(Bt=vt.props)===null||Bt===void 0?void 0:Bt.className:"",`${We}-item-icon`)}),Je?nt:me.createElement("span",{className:`${We}-title-content`},nt))}const dt=me.useMemo(()=>Object.assign(Object.assign({},Ie),{firstLevel:!1}),[Ie]);return me.createElement(z.Provider,{value:dt},me.createElement(Me.Wd,Object.assign({},(0,le.Z)(pt,["icon"]),{title:$e,popupClassName:Ce()(We,xt,`${We}-${He||be}`)})))},ue=Ee(18785),Se=Ee(70425),we=Ee(62892),Pe=Ee(40875),Ae=function(pt,Bt){var xt={};for(var vt in pt)Object.prototype.hasOwnProperty.call(pt,vt)&&Bt.indexOf(vt)<0&&(xt[vt]=pt[vt]);if(pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,vt=Object.getOwnPropertySymbols(pt);nt<vt.length;nt++)Bt.indexOf(vt[nt])<0&&Object.prototype.propertyIsEnumerable.call(pt,vt[nt])&&(xt[vt[nt]]=pt[vt[nt]]);return xt};function De(pt){return(pt||[]).map((Bt,xt)=>{if(Bt&&typeof Bt=="object"){const vt=Bt,{label:nt,children:He,key:Ie,type:We}=vt,Oe=Ae(vt,["label","children","key","type"]),be=Ie!=null?Ie:`tmp-${xt}`;return He||We==="group"?We==="group"?me.createElement(Me.BW,Object.assign({key:be},Oe,{title:nt}),De(He)):me.createElement(se,Object.assign({key:be},Oe,{title:nt}),De(He)):We==="divider"?me.createElement(xe,Object.assign({key:be},Oe)):me.createElement(oe,Object.assign({key:be},Oe),nt)}return null}).filter(Bt=>Bt)}function ze(pt){return me.useMemo(()=>pt&&De(pt),[pt])}var Ze=Ee(64993),Xe=Ee(17313),Ge=Ee(8378),ft=Ee(13826),at=Ee(29878),Ct=Ee(83116),et=Ee(37613),st=pt=>{const{componentCls:Bt,motionDurationSlow:xt,horizontalLineHeight:vt,colorSplit:nt,lineWidth:He,lineType:Ie,itemPaddingInline:We}=pt;return{[`${Bt}-horizontal`]:{lineHeight:vt,border:0,borderBottom:`${He}px ${Ie} ${nt}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Bt}-item, ${Bt}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:We},[`> ${Bt}-item:hover,
|
|
|
> ${Bt}-item-active,
|
|
|
> ${Bt}-submenu ${Bt}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Bt}-item, ${Bt}-submenu-title`]:{transition:[`border-color ${xt}`,`background ${xt}`].join(",")},[`${Bt}-submenu-arrow`]:{display:"none"}}}},lt=pt=>{let{componentCls:Bt,menuArrowOffset:xt}=pt;return{[`${Bt}-rtl`]:{direction:"rtl"},[`${Bt}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Bt}-rtl${Bt}-vertical,
|
|
|
${Bt}-submenu-rtl ${Bt}-vertical`]:{[`${Bt}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${xt})`},"&::after":{transform:`rotate(45deg) translateY(${xt})`}}}}};const tt=pt=>Object.assign({},(0,Xe.oN)(pt));var mt=(pt,Bt)=>{const{componentCls:xt,itemColor:vt,itemSelectedColor:nt,groupTitleColor:He,itemBg:Ie,subMenuItemBg:We,itemSelectedBg:Oe,activeBarHeight:be,activeBarWidth:Ne,activeBarBorderWidth:$e,motionDurationSlow:dt,motionEaseInOut:Je,motionEaseOut:At,itemPaddingInline:en,motionDurationMid:pn,itemHoverColor:ln,lineType:gn,colorSplit:Un,itemDisabledColor:An,dangerItemColor:ni,dangerItemHoverColor:ai,dangerItemSelectedColor:ki,dangerItemActiveBg:Ci,dangerItemSelectedBg:Ki,itemHoverBg:ir,itemActiveBg:sr,menuSubMenuBg:Ji,horizontalItemSelectedColor:Fr,horizontalItemSelectedBg:Mr,horizontalItemBorderRadius:vi,horizontalItemHoverBg:wr,popupBg:Tr}=pt;return{[`${xt}-${Bt}, ${xt}-${Bt} > ${xt}`]:{color:vt,background:Ie,[`&${xt}-root:focus-visible`]:Object.assign({},tt(pt)),[`${xt}-item-group-title`]:{color:He},[`${xt}-submenu-selected`]:{[`> ${xt}-submenu-title`]:{color:nt}},[`${xt}-item-disabled, ${xt}-submenu-disabled`]:{color:`${An} !important`},[`${xt}-item:not(${xt}-item-selected):not(${xt}-submenu-selected)`]:{[`&:hover, > ${xt}-submenu-title:hover`]:{color:ln}},[`&:not(${xt}-horizontal)`]:{[`${xt}-item:not(${xt}-item-selected)`]:{"&:hover":{backgroundColor:ir},"&:active":{backgroundColor:sr}},[`${xt}-submenu-title`]:{"&:hover":{backgroundColor:ir},"&:active":{backgroundColor:sr}}},[`${xt}-item-danger`]:{color:ni,[`&${xt}-item:hover`]:{[`&:not(${xt}-item-selected):not(${xt}-submenu-selected)`]:{color:ai}},[`&${xt}-item:active`]:{background:Ci}},[`${xt}-item a`]:{"&, &:hover":{color:"inherit"}},[`${xt}-item-selected`]:{color:nt,[`&${xt}-item-danger`]:{color:ki},"a, a:hover":{color:"inherit"}},[`& ${xt}-item-selected`]:{backgroundColor:Oe,[`&${xt}-item-danger`]:{backgroundColor:Ki}},[`${xt}-item, ${xt}-submenu-title`]:{[`&:not(${xt}-item-disabled):focus-visible`]:Object.assign({},tt(pt))},[`&${xt}-submenu > ${xt}`]:{backgroundColor:Ji},[`&${xt}-popup > ${xt}`]:{backgroundColor:Tr},[`&${xt}-horizontal`]:Object.assign(Object.assign({},Bt==="dark"?{borderBottom:0}:{}),{[`> ${xt}-item, > ${xt}-submenu`]:{top:$e,marginTop:-$e,marginBottom:0,borderRadius:vi,"&::after":{position:"absolute",insetInline:en,bottom:0,borderBottom:`${be}px solid transparent`,transition:`border-color ${dt} ${Je}`,content:'""'},"&:hover, &-active, &-open":{background:wr,"&::after":{borderBottomWidth:be,borderBottomColor:Fr}},"&-selected":{color:Fr,backgroundColor:Mr,"&:hover":{backgroundColor:Mr},"&::after":{borderBottomWidth:be,borderBottomColor:Fr}}}}),[`&${xt}-root`]:{[`&${xt}-inline, &${xt}-vertical`]:{borderInlineEnd:`${$e}px ${gn} ${Un}`}},[`&${xt}-inline`]:{[`${xt}-sub${xt}-inline`]:{background:We},[`${xt}-item, ${xt}-submenu-title`]:$e&&Ne?{width:`calc(100% + ${$e}px)`}:{},[`${xt}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${Ne}px solid ${nt}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${pn} ${At}`,`opacity ${pn} ${At}`].join(","),content:'""'},[`&${xt}-item-danger`]:{"&::after":{borderInlineEndColor:ki}}},[`${xt}-selected, ${xt}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${pn} ${Je}`,`opacity ${pn} ${Je}`].join(",")}}}}}};const Pt=pt=>{const{componentCls:Bt,itemHeight:xt,itemMarginInline:vt,padding:nt,menuArrowSize:He,marginXS:Ie,itemMarginBlock:We}=pt,Oe=nt+He+Ie;return{[`${Bt}-item`]:{position:"relative",overflow:"hidden"},[`${Bt}-item, ${Bt}-submenu-title`]:{height:xt,lineHeight:`${xt}px`,paddingInline:nt,overflow:"hidden",textOverflow:"ellipsis",marginInline:vt,marginBlock:We,width:`calc(100% - ${vt*2}px)`},[`> ${Bt}-item,
|
|
|
> ${Bt}-submenu > ${Bt}-submenu-title`]:{height:xt,lineHeight:`${xt}px`},[`${Bt}-item-group-list ${Bt}-submenu-title,
|
|
|
${Bt}-submenu-title`]:{paddingInlineEnd:Oe}}};var Ft=pt=>{const{componentCls:Bt,iconCls:xt,itemHeight:vt,colorTextLightSolid:nt,dropdownWidth:He,controlHeightLG:Ie,motionDurationMid:We,motionEaseOut:Oe,paddingXL:be,itemMarginInline:Ne,fontSizeLG:$e,motionDurationSlow:dt,paddingXS:Je,boxShadowSecondary:At,collapsedWidth:en,collapsedIconSize:pn}=pt,ln={height:vt,lineHeight:`${vt}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[Bt]:{"&-inline, &-vertical":Object.assign({[`&${Bt}-root`]:{boxShadow:"none"}},Pt(pt))},[`${Bt}-submenu-popup`]:{[`${Bt}-vertical`]:Object.assign(Object.assign({},Pt(pt)),{boxShadow:At})}},{[`${Bt}-submenu-popup ${Bt}-vertical${Bt}-sub`]:{minWidth:He,maxHeight:`calc(100vh - ${Ie*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Bt}-inline`]:{width:"100%",[`&${Bt}-root`]:{[`${Bt}-item, ${Bt}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${dt}`,`background ${dt}`,`padding ${We} ${Oe}`].join(","),[`> ${Bt}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Bt}-sub${Bt}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Bt}-submenu > ${Bt}-submenu-title`]:ln,[`& ${Bt}-item-group-title`]:{paddingInlineStart:be}},[`${Bt}-item`]:ln}},{[`${Bt}-inline-collapsed`]:{width:en,[`&${Bt}-root`]:{[`${Bt}-item, ${Bt}-submenu ${Bt}-submenu-title`]:{[`> ${Bt}-inline-collapsed-noicon`]:{fontSize:$e,textAlign:"center"}}},[`> ${Bt}-item,
|
|
|
> ${Bt}-item-group > ${Bt}-item-group-list > ${Bt}-item,
|
|
|
> ${Bt}-item-group > ${Bt}-item-group-list > ${Bt}-submenu > ${Bt}-submenu-title,
|
|
|
> ${Bt}-submenu > ${Bt}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${$e/2}px - ${Ne}px)`,textOverflow:"clip",[`
|
|
|
${Bt}-submenu-arrow,
|
|
|
${Bt}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${Bt}-item-icon, ${xt}`]:{margin:0,fontSize:pn,lineHeight:`${vt}px`,"+ span":{display:"inline-block",opacity:0}}},[`${Bt}-item-icon, ${xt}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Bt}-item-icon, ${xt}`]:{display:"none"},"a, a:hover":{color:nt}},[`${Bt}-item-group-title`]:Object.assign(Object.assign({},Xe.vS),{paddingInline:Je})}}]};const Ht=pt=>{const{componentCls:Bt,motionDurationSlow:xt,motionDurationMid:vt,motionEaseInOut:nt,motionEaseOut:He,iconCls:Ie,iconSize:We,iconMarginInlineEnd:Oe}=pt;return{[`${Bt}-item, ${Bt}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${xt}`,`background ${xt}`,`padding ${xt} ${nt}`].join(","),[`${Bt}-item-icon, ${Ie}`]:{minWidth:We,fontSize:We,transition:[`font-size ${vt} ${He}`,`margin ${xt} ${nt}`,`color ${xt}`].join(","),"+ span":{marginInlineStart:Oe,opacity:1,transition:[`opacity ${xt} ${nt}`,`margin ${xt}`,`color ${xt}`].join(",")}},[`${Bt}-item-icon`]:Object.assign({},(0,Xe.Ro)()),[`&${Bt}-item-only-child`]:{[`> ${Ie}, > ${Bt}-item-icon`]:{marginInlineEnd:0}}},[`${Bt}-item-disabled, ${Bt}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${Bt}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},hn=pt=>{const{componentCls:Bt,motionDurationSlow:xt,motionEaseInOut:vt,borderRadius:nt,menuArrowSize:He,menuArrowOffset:Ie}=pt;return{[`${Bt}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:pt.margin,width:He,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${xt} ${vt}, opacity ${xt}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:He*.6,height:He*.15,backgroundColor:"currentcolor",borderRadius:nt,transition:[`background ${xt} ${vt}`,`transform ${xt} ${vt}`,`top ${xt} ${vt}`,`color ${xt} ${vt}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${Ie})`},"&::after":{transform:`rotate(-45deg) translateY(${Ie})`}}}}},Jt=pt=>{const{antCls:Bt,componentCls:xt,fontSize:vt,motionDurationSlow:nt,motionDurationMid:He,motionEaseInOut:Ie,paddingXS:We,padding:Oe,colorSplit:be,lineWidth:Ne,zIndexPopup:$e,borderRadiusLG:dt,subMenuItemBorderRadius:Je,menuArrowSize:At,menuArrowOffset:en,lineType:pn,menuPanelMaskInset:ln,groupTitleLineHeight:gn,groupTitleFontSize:Un}=pt;return[{"":{[`${xt}`]:Object.assign(Object.assign({},(0,Xe.dF)()),{"&-hidden":{display:"none"}})},[`${xt}-submenu-hidden`]:{display:"none"}},{[xt]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Xe.Wf)(pt)),(0,Xe.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:vt,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${nt} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${xt}-item`]:{flex:"none"}},[`${xt}-item, ${xt}-submenu, ${xt}-submenu-title`]:{borderRadius:pt.itemBorderRadius},[`${xt}-item-group-title`]:{padding:`${We}px ${Oe}px`,fontSize:Un,lineHeight:gn,transition:`all ${nt}`},[`&-horizontal ${xt}-submenu`]:{transition:[`border-color ${nt} ${Ie}`,`background ${nt} ${Ie}`].join(",")},[`${xt}-submenu, ${xt}-submenu-inline`]:{transition:[`border-color ${nt} ${Ie}`,`background ${nt} ${Ie}`,`padding ${He} ${Ie}`].join(",")},[`${xt}-submenu ${xt}-sub`]:{cursor:"initial",transition:[`background ${nt} ${Ie}`,`padding ${nt} ${Ie}`].join(",")},[`${xt}-title-content`]:{transition:`color ${nt}`},[`${xt}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${xt}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:be,borderStyle:pn,borderWidth:0,borderTopWidth:Ne,marginBlock:Ne,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Ht(pt)),{[`${xt}-item-group`]:{[`${xt}-item-group-list`]:{margin:0,padding:0,[`${xt}-item, ${xt}-submenu-title`]:{paddingInline:`${vt*2}px ${Oe}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:$e,borderRadius:dt,boxShadow:"none",transformOrigin:"0 0",[`&${xt}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${ln}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:ln},"\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:pt.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:pt.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:pt.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:pt.paddingXS},[`> ${xt}`]:Object.assign(Object.assign(Object.assign({borderRadius:dt},Ht(pt)),hn(pt)),{[`${xt}-item, ${xt}-submenu > ${xt}-submenu-title`]:{borderRadius:Je},[`${xt}-submenu-title::after`]:{transition:`transform ${nt} ${Ie}`}})}}),hn(pt)),{[`&-inline-collapsed ${xt}-submenu-arrow,
|
|
|
&-inline ${xt}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${en})`},"&::after":{transform:`rotate(45deg) translateX(-${en})`}},[`${xt}-submenu-open${xt}-submenu-inline > ${xt}-submenu-title > ${xt}-submenu-arrow`]:{transform:`translateY(-${At*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${en})`},"&::before":{transform:`rotate(45deg) translateX(${en})`}}})},{[`${Bt}-layout-header`]:{[xt]:{lineHeight:"inherit"}}}]};var bn=(pt,Bt)=>(0,Ct.Z)("Menu",vt=>{if(Bt===!1)return[];const{colorBgElevated:nt,colorPrimary:He,colorTextLightSolid:Ie,controlHeightLG:We,fontSize:Oe,darkItemColor:be,darkDangerItemColor:Ne,darkItemBg:$e,darkSubMenuItemBg:dt,darkItemSelectedColor:Je,darkItemSelectedBg:At,darkDangerItemSelectedBg:en,darkItemHoverBg:pn,darkGroupTitleColor:ln,darkItemHoverColor:gn,darkItemDisabledColor:Un,darkDangerItemHoverColor:An,darkDangerItemSelectedColor:ni,darkDangerItemActiveBg:ai}=vt,ki=Oe/7*5,Ci=(0,et.TS)(vt,{menuArrowSize:ki,menuHorizontalHeight:We*1.15,menuArrowOffset:`${ki*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:nt}),Ki=(0,et.TS)(Ci,{itemColor:be,itemHoverColor:gn,groupTitleColor:ln,itemSelectedColor:Je,itemBg:$e,popupBg:$e,subMenuItemBg:dt,itemActiveBg:"transparent",itemSelectedBg:At,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:pn,itemDisabledColor:Un,dangerItemColor:Ne,dangerItemHoverColor:An,dangerItemSelectedColor:ni,dangerItemActiveBg:ai,dangerItemSelectedBg:en,menuSubMenuBg:dt,horizontalItemSelectedColor:Ie,horizontalItemSelectedBg:He});return[Jt(Ci),st(Ci),Ft(Ci),mt(Ci,"light"),mt(Ki,"dark"),lt(Ci),(0,Ge.Z)(Ci),(0,ft.oN)(Ci,"slide-up"),(0,ft.oN)(Ci,"slide-down"),(0,at._y)(Ci,"zoom-big")]},vt=>{const{colorPrimary:nt,colorError:He,colorTextDisabled:Ie,colorErrorBg:We,colorText:Oe,colorTextDescription:be,colorBgContainer:Ne,colorFillAlter:$e,colorFillContent:dt,lineWidth:Je,lineWidthBold:At,controlItemBgActive:en,colorBgTextHover:pn,controlHeightLG:ln,lineHeight:gn,colorBgElevated:Un,marginXXS:An,padding:ni,fontSize:ai,controlHeightSM:ki,fontSizeLG:Ci,colorTextLightSolid:Ki,colorErrorHover:ir}=vt,sr=new Ze.C(Ki).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:vt.zIndexPopupBase+50,radiusItem:vt.borderRadiusLG,itemBorderRadius:vt.borderRadiusLG,radiusSubMenuItem:vt.borderRadiusSM,subMenuItemBorderRadius:vt.borderRadiusSM,colorItemText:Oe,itemColor:Oe,colorItemTextHover:Oe,itemHoverColor:Oe,colorItemTextHoverHorizontal:nt,horizontalItemHoverColor:nt,colorGroupTitle:be,groupTitleColor:be,colorItemTextSelected:nt,itemSelectedColor:nt,colorItemTextSelectedHorizontal:nt,horizontalItemSelectedColor:nt,colorItemBg:Ne,itemBg:Ne,colorItemBgHover:pn,itemHoverBg:pn,colorItemBgActive:dt,itemActiveBg:en,colorSubItemBg:$e,subMenuItemBg:$e,colorItemBgSelected:en,itemSelectedBg:en,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:At,activeBarHeight:At,colorActiveBarBorderSize:Je,activeBarBorderWidth:Je,colorItemTextDisabled:Ie,itemDisabledColor:Ie,colorDangerItemText:He,dangerItemColor:He,colorDangerItemTextHover:He,dangerItemHoverColor:He,colorDangerItemTextSelected:He,dangerItemSelectedColor:He,colorDangerItemBgActive:We,dangerItemActiveBg:We,colorDangerItemBgSelected:We,dangerItemSelectedBg:We,itemMarginInline:vt.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:ln,groupTitleLineHeight:gn,collapsedWidth:ln*2,popupBg:Un,itemMarginBlock:An,itemPaddingInline:ni,horizontalLineHeight:`${ln*1.15}px`,iconSize:ai,iconMarginInlineEnd:ki-ai,collapsedIconSize:Ci,groupTitleFontSize:ai,darkItemDisabledColor:new Ze.C(Ki).setAlpha(.25).toRgbString(),darkItemColor:sr,darkDangerItemColor:He,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:Ki,darkItemSelectedBg:nt,darkDangerItemSelectedBg:He,darkItemHoverBg:"transparent",darkGroupTitleColor:sr,darkItemHoverColor:Ki,darkDangerItemHoverColor:ir,darkDangerItemSelectedColor:Ki,darkDangerItemActiveBg:He}},{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"]]})(pt),Wt=function(pt,Bt){var xt={};for(var vt in pt)Object.prototype.hasOwnProperty.call(pt,vt)&&Bt.indexOf(vt)<0&&(xt[vt]=pt[vt]);if(pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,vt=Object.getOwnPropertySymbols(pt);nt<vt.length;nt++)Bt.indexOf(vt[nt])<0&&Object.prototype.propertyIsEnumerable.call(pt,vt[nt])&&(xt[vt[nt]]=pt[vt[nt]]);return xt},Xt=(0,me.forwardRef)((pt,Bt)=>{var xt,vt;const nt=me.useContext(Pe.Z),He=nt||{},{getPrefixCls:Ie,getPopupContainer:We,direction:Oe,menu:be}=me.useContext(Le.E_),Ne=Ie(),{prefixCls:$e,className:dt,style:Je,theme:At="light",expandIcon:en,_internalDisableMenuItemTitleTooltip:pn,inlineCollapsed:ln,siderCollapsed:gn,items:Un,children:An,rootClassName:ni,mode:ai,selectable:ki,onClick:Ci,overflowedIndicatorPopupClassName:Ki}=pt,ir=Wt(pt,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),sr=(0,le.Z)(ir,["collapsedWidth"]),Ji=ze(Un)||An;(xt=He.validator)===null||xt===void 0||xt.call(He,{mode:ai});const Fr=(0,Se.useEvent)(function(){var io;Ci==null||Ci.apply(void 0,arguments),(io=He.onClick)===null||io===void 0||io.call(He)}),Mr=He.mode||ai,vi=ki!=null?ki:He.selectable,wr=me.useMemo(()=>gn!==void 0?gn:ln,[ln,gn]),Tr={horizontal:{motionName:`${Ne}-slide-up`},inline:(0,we.Z)(Ne),other:{motionName:`${Ne}-zoom-big`}},it=Ie("menu",$e||He.prefixCls),[Rr,Or]=bn(it,!nt),Ur=Ce()(`${it}-${At}`,be==null?void 0:be.className,dt);let uo;if(typeof en=="function")uo=en;else if(en===null||en===!1)uo=null;else if(He.expandIcon===null||He.expandIcon===!1)uo=null;else{const io=en!=null?en:He.expandIcon;uo=(0,de.Tm)(io,{className:Ce()(`${it}-submenu-expand-icon`,(0,de.l$)(io)?(vt=io.props)===null||vt===void 0?void 0:vt.className:"")})}const po=me.useMemo(()=>({prefixCls:it,inlineCollapsed:wr||!1,direction:Oe,firstLevel:!0,theme:At,mode:Mr,disableMenuItemTitleTooltip:pn}),[it,wr,Oe,pn,At]);return Rr(me.createElement(Pe.Z.Provider,{value:null},me.createElement(z.Provider,{value:po},me.createElement(Me.ZP,Object.assign({getPopupContainer:We,overflowedIndicator:me.createElement(ue.Z,null),overflowedIndicatorPopupClassName:Ce()(it,`${it}-${At}`,Ki),mode:Mr,selectable:vi,onClick:Fr},sr,{inlineCollapsed:wr,style:Object.assign(Object.assign({},be==null?void 0:be.style),Je),className:Ur,prefixCls:it,direction:Oe,defaultMotions:Tr,expandIcon:uo,ref:Bt,rootClassName:Ce()(ni,Or)}),Ji))))});const $t=(0,me.forwardRef)((pt,Bt)=>{const xt=(0,me.useRef)(null),vt=me.useContext(Be.D);return(0,me.useImperativeHandle)(Bt,()=>({menu:xt.current,focus:nt=>{var He;(He=xt.current)===null||He===void 0||He.focus(nt)}})),me.createElement(Xt,Object.assign({ref:xt},pt,vt))});$t.Item=oe,$t.SubMenu=se,$t.Divider=xe,$t.ItemGroup=Me.BW;var kt=$t},58421:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return He}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(We,Oe){return me.createElement(Ce.Z,(0,Me.Z)({},We,{ref:Oe,icon:ke}))},he=me.forwardRef(Le),ye=he,xe=Ee(49198),ge=Ee(33853),le=Ee(38819),ve=Ee(92310),de=Ee.n(ve),ce=Ee(49618),z=Ee(77321),ee=Ee(96949),oe=Ee(55090),ie=Ee(77205),se=Ee(38793),ue=Ee(26112),Se={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},we=Se,Pe=Ee(91735),Ae=function(Ie){(0,ie.Z)(Oe,Ie);var We=(0,se.Z)(Oe);function Oe(){var be;(0,ee.Z)(this,Oe);for(var Ne=arguments.length,$e=new Array(Ne),dt=0;dt<Ne;dt++)$e[dt]=arguments[dt];return be=We.call.apply(We,[this].concat($e)),be.state={goInputText:""},be.getValidValue=function(){var Je=be.state.goInputText;return!Je||Number.isNaN(Je)?void 0:Number(Je)},be.buildOptionText=function(Je){return"".concat(Je," ").concat(be.props.locale.items_per_page)},be.changeSize=function(Je){be.props.changeSize(Number(Je))},be.handleChange=function(Je){be.setState({goInputText:Je.target.value})},be.handleBlur=function(Je){var At=be.props,en=At.goButton,pn=At.quickGo,ln=At.rootPrefixCls,gn=be.state.goInputText;en||gn===""||(be.setState({goInputText:""}),!(Je.relatedTarget&&(Je.relatedTarget.className.indexOf("".concat(ln,"-item-link"))>=0||Je.relatedTarget.className.indexOf("".concat(ln,"-item"))>=0))&&pn(be.getValidValue()))},be.go=function(Je){var At=be.state.goInputText;At!==""&&(Je.keyCode===we.ENTER||Je.type==="click")&&(be.setState({goInputText:""}),be.props.quickGo(be.getValidValue()))},be}return(0,oe.Z)(Oe,[{key:"getPageSizeOptions",value:function(){var Ne=this.props,$e=Ne.pageSize,dt=Ne.pageSizeOptions;return dt.some(function(Je){return Je.toString()===$e.toString()})?dt:dt.concat([$e.toString()]).sort(function(Je,At){var en=Number.isNaN(Number(Je))?0:Number(Je),pn=Number.isNaN(Number(At))?0:Number(At);return en-pn})}},{key:"render",value:function(){var Ne=this,$e=this.props,dt=$e.pageSize,Je=$e.locale,At=$e.rootPrefixCls,en=$e.changeSize,pn=$e.quickGo,ln=$e.goButton,gn=$e.selectComponentClass,Un=$e.buildOptionText,An=$e.selectPrefixCls,ni=$e.disabled,ai=this.state.goInputText,ki="".concat(At,"-options"),Ci=gn,Ki=null,ir=null,sr=null;if(!en&&!pn)return null;var Ji=this.getPageSizeOptions();if(en&&Ci){var Fr=Ji.map(function(Mr,vi){return me.createElement(Ci.Option,{key:vi,value:Mr.toString()},(Un||Ne.buildOptionText)(Mr))});Ki=me.createElement(Ci,{disabled:ni,prefixCls:An,showSearch:!1,className:"".concat(ki,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(dt||Ji[0]).toString(),onChange:this.changeSize,getPopupContainer:function(vi){return vi.parentNode},"aria-label":Je.page_size,defaultOpen:!1},Fr)}return pn&&(ln&&(sr=typeof ln=="boolean"?me.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:ni,className:"".concat(ki,"-quick-jumper-button")},Je.jump_to_confirm):me.createElement("span",{onClick:this.go,onKeyUp:this.go},ln)),ir=me.createElement("div",{className:"".concat(ki,"-quick-jumper")},Je.jump_to,me.createElement("input",{disabled:ni,type:"text",value:ai,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":Je.page}),Je.page,sr)),me.createElement("li",{className:"".concat(ki)},Ki,ir)}}]),Oe}(me.Component);Ae.defaultProps={pageSizeOptions:["10","20","50","100"]};var De=Ae,ze=function(We){var Oe,be=We.rootPrefixCls,Ne=We.page,$e=We.active,dt=We.className,Je=We.showTitle,At=We.onClick,en=We.onKeyPress,pn=We.itemRender,ln="".concat(be,"-item"),gn=de()(ln,"".concat(ln,"-").concat(Ne),(Oe={},(0,ce.Z)(Oe,"".concat(ln,"-active"),$e),(0,ce.Z)(Oe,"".concat(ln,"-disabled"),!Ne),(0,ce.Z)(Oe,We.className,dt),Oe)),Un=function(){At(Ne)},An=function(ki){en(ki,At,Ne)},ni=pn(Ne,"page",me.createElement("a",{rel:"nofollow"},Ne));return ni?me.createElement("li",{title:Je?Ne.toString():null,className:gn,onClick:Un,onKeyPress:An,tabIndex:0},ni):null},Ze=ze;function Xe(){}function Ge(Ie){var We=Number(Ie);return typeof We=="number"&&!Number.isNaN(We)&&isFinite(We)&&Math.floor(We)===We}var ft=function(We,Oe,be){return be};function at(Ie,We,Oe){var be=typeof Ie=="undefined"?We.pageSize:Ie;return Math.floor((Oe.total-1)/be)+1}var Ct=function(Ie){(0,ie.Z)(Oe,Ie);var We=(0,se.Z)(Oe);function Oe(be){var Ne;(0,ee.Z)(this,Oe),Ne=We.call(this,be),Ne.paginationNode=me.createRef(),Ne.getJumpPrevPage=function(){return Math.max(1,Ne.state.current-(Ne.props.showLessItems?3:5))},Ne.getJumpNextPage=function(){return Math.min(at(void 0,Ne.state,Ne.props),Ne.state.current+(Ne.props.showLessItems?3:5))},Ne.getItemIcon=function(en,pn){var ln=Ne.props.prefixCls,gn=en||me.createElement("button",{type:"button","aria-label":pn,className:"".concat(ln,"-item-link")});return typeof en=="function"&&(gn=me.createElement(en,(0,z.Z)({},Ne.props))),gn},Ne.isValid=function(en){var pn=Ne.props.total;return Ge(en)&&en!==Ne.state.current&&Ge(pn)&&pn>0},Ne.shouldDisplayQuickJumper=function(){var en=Ne.props,pn=en.showQuickJumper,ln=en.total,gn=Ne.state.pageSize;return ln<=gn?!1:pn},Ne.handleKeyDown=function(en){(en.keyCode===we.ARROW_UP||en.keyCode===we.ARROW_DOWN)&&en.preventDefault()},Ne.handleKeyUp=function(en){var pn=Ne.getValidValue(en),ln=Ne.state.currentInputValue;pn!==ln&&Ne.setState({currentInputValue:pn}),en.keyCode===we.ENTER?Ne.handleChange(pn):en.keyCode===we.ARROW_UP?Ne.handleChange(pn-1):en.keyCode===we.ARROW_DOWN&&Ne.handleChange(pn+1)},Ne.handleBlur=function(en){var pn=Ne.getValidValue(en);Ne.handleChange(pn)},Ne.changePageSize=function(en){var pn=Ne.state.current,ln=at(en,Ne.state,Ne.props);pn=pn>ln?ln:pn,ln===0&&(pn=Ne.state.current),typeof en=="number"&&("pageSize"in Ne.props||Ne.setState({pageSize:en}),"current"in Ne.props||Ne.setState({current:pn,currentInputValue:pn})),Ne.props.onShowSizeChange(pn,en),"onChange"in Ne.props&&Ne.props.onChange&&Ne.props.onChange(pn,en)},Ne.handleChange=function(en){var pn=Ne.props,ln=pn.disabled,gn=pn.onChange,Un=Ne.state,An=Un.pageSize,ni=Un.current,ai=Un.currentInputValue;if(Ne.isValid(en)&&!ln){var ki=at(void 0,Ne.state,Ne.props),Ci=en;return en>ki?Ci=ki:en<1&&(Ci=1),"current"in Ne.props||Ne.setState({current:Ci}),Ci!==ai&&Ne.setState({currentInputValue:Ci}),gn(Ci,An),Ci}return ni},Ne.prev=function(){Ne.hasPrev()&&Ne.handleChange(Ne.state.current-1)},Ne.next=function(){Ne.hasNext()&&Ne.handleChange(Ne.state.current+1)},Ne.jumpPrev=function(){Ne.handleChange(Ne.getJumpPrevPage())},Ne.jumpNext=function(){Ne.handleChange(Ne.getJumpNextPage())},Ne.hasPrev=function(){return Ne.state.current>1},Ne.hasNext=function(){return Ne.state.current<at(void 0,Ne.state,Ne.props)},Ne.runIfEnter=function(en,pn){if(en.key==="Enter"||en.charCode===13){for(var ln=arguments.length,gn=new Array(ln>2?ln-2:0),Un=2;Un<ln;Un++)gn[Un-2]=arguments[Un];pn.apply(void 0,gn)}},Ne.runIfEnterPrev=function(en){Ne.runIfEnter(en,Ne.prev)},Ne.runIfEnterNext=function(en){Ne.runIfEnter(en,Ne.next)},Ne.runIfEnterJumpPrev=function(en){Ne.runIfEnter(en,Ne.jumpPrev)},Ne.runIfEnterJumpNext=function(en){Ne.runIfEnter(en,Ne.jumpNext)},Ne.handleGoTO=function(en){(en.keyCode===we.ENTER||en.type==="click")&&Ne.handleChange(Ne.state.currentInputValue)},Ne.renderPrev=function(en){var pn=Ne.props,ln=pn.prevIcon,gn=pn.itemRender,Un=gn(en,"prev",Ne.getItemIcon(ln,"prev page")),An=!Ne.hasPrev();return(0,me.isValidElement)(Un)?(0,me.cloneElement)(Un,{disabled:An}):Un},Ne.renderNext=function(en){var pn=Ne.props,ln=pn.nextIcon,gn=pn.itemRender,Un=gn(en,"next",Ne.getItemIcon(ln,"next page")),An=!Ne.hasNext();return(0,me.isValidElement)(Un)?(0,me.cloneElement)(Un,{disabled:An}):Un};var $e=be.onChange!==Xe,dt="current"in be;dt&&!$e&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var Je=be.defaultCurrent;"current"in be&&(Je=be.current);var At=be.defaultPageSize;return"pageSize"in be&&(At=be.pageSize),Je=Math.min(Je,at(At,void 0,be)),Ne.state={current:Je,currentInputValue:Je,pageSize:At},Ne}return(0,oe.Z)(Oe,[{key:"componentDidUpdate",value:function(Ne,$e){var dt=this.props.prefixCls;if($e.current!==this.state.current&&this.paginationNode.current){var Je=this.paginationNode.current.querySelector(".".concat(dt,"-item-").concat($e.current));if(Je&&document.activeElement===Je){var At;Je==null||(At=Je.blur)===null||At===void 0||At.call(Je)}}}},{key:"getValidValue",value:function(Ne){var $e=Ne.target.value,dt=at(void 0,this.state,this.props),Je=this.state.currentInputValue,At;return $e===""?At=$e:Number.isNaN(Number($e))?At=Je:$e>=dt?At=dt:At=Number($e),At}},{key:"getShowSizeChanger",value:function(){var Ne=this.props,$e=Ne.showSizeChanger,dt=Ne.total,Je=Ne.totalBoundaryShowSizeChanger;return typeof $e!="undefined"?$e:dt>Je}},{key:"render",value:function(){var Ne=this.props,$e=Ne.prefixCls,dt=Ne.className,Je=Ne.style,At=Ne.disabled,en=Ne.hideOnSinglePage,pn=Ne.total,ln=Ne.locale,gn=Ne.showQuickJumper,Un=Ne.showLessItems,An=Ne.showTitle,ni=Ne.showTotal,ai=Ne.simple,ki=Ne.itemRender,Ci=Ne.showPrevNextJumpers,Ki=Ne.jumpPrevIcon,ir=Ne.jumpNextIcon,sr=Ne.selectComponentClass,Ji=Ne.selectPrefixCls,Fr=Ne.pageSizeOptions,Mr=this.state,vi=Mr.current,wr=Mr.pageSize,Tr=Mr.currentInputValue;if(en===!0&&pn<=wr)return null;var it=at(void 0,this.state,this.props),Rr=[],Or=null,Ur=null,uo=null,po=null,io=null,Do=gn&&gn.goButton,Xn=Un?1:2,Ke=vi-1>0?vi-1:0,qe=vi+1<it?vi+1:it,Ye=(0,ue.Z)(this.props,{aria:!0,data:!0}),St=ni&&me.createElement("li",{className:"".concat($e,"-total-text")},ni(pn,[pn===0?0:(vi-1)*wr+1,vi*wr>pn?pn:vi*wr]));if(ai){Do&&(typeof Do=="boolean"?io=me.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ln.jump_to_confirm):io=me.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Do),io=me.createElement("li",{title:An?"".concat(ln.jump_to).concat(vi,"/").concat(it):null,className:"".concat($e,"-simple-pager")},io));var Ot=this.renderPrev(Ke);return me.createElement("ul",(0,Me.Z)({className:de()($e,"".concat($e,"-simple"),(0,ce.Z)({},"".concat($e,"-disabled"),At),dt),style:Je,ref:this.paginationNode},Ye),St,Ot?me.createElement("li",{title:An?ln.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:de()("".concat($e,"-prev"),(0,ce.Z)({},"".concat($e,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},Ot):null,me.createElement("li",{title:An?"".concat(vi,"/").concat(it):null,className:"".concat($e,"-simple-pager")},me.createElement("input",{type:"text",value:Tr,disabled:At,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),me.createElement("span",{className:"".concat($e,"-slash")},"/"),it),me.createElement("li",{title:An?ln.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:de()("".concat($e,"-next"),(0,ce.Z)({},"".concat($e,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(qe)),io)}if(it<=3+Xn*2){var Tt={locale:ln,rootPrefixCls:$e,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:An,itemRender:ki};it||Rr.push(me.createElement(Ze,(0,Me.Z)({},Tt,{key:"noPager",page:1,className:"".concat($e,"-item-disabled")})));for(var _t=1;_t<=it;_t+=1){var dn=vi===_t;Rr.push(me.createElement(Ze,(0,Me.Z)({},Tt,{key:_t,page:_t,active:dn})))}}else{var Pn=Un?ln.prev_3:ln.prev_5,mn=Un?ln.next_3:ln.next_5,on=ki(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Ki,"prev page")),Nt=ki(this.getJumpNextPage(),"jump-next",this.getItemIcon(ir,"next page"));Ci&&(Or=on?me.createElement("li",{title:An?Pn:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:de()("".concat($e,"-jump-prev"),(0,ce.Z)({},"".concat($e,"-jump-prev-custom-icon"),!!Ki))},on):null,Ur=Nt?me.createElement("li",{title:An?mn:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:de()("".concat($e,"-jump-next"),(0,ce.Z)({},"".concat($e,"-jump-next-custom-icon"),!!ir))},Nt):null),po=me.createElement(Ze,{locale:ln,last:!0,rootPrefixCls:$e,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:it,page:it,active:!1,showTitle:An,itemRender:ki}),uo=me.createElement(Ze,{locale:ln,rootPrefixCls:$e,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:An,itemRender:ki});var un=Math.max(1,vi-Xn),Mn=Math.min(vi+Xn,it);vi-1<=Xn&&(Mn=1+Xn*2),it-vi<=Xn&&(un=it-Xn*2);for(var Dn=un;Dn<=Mn;Dn+=1){var nn=vi===Dn;Rr.push(me.createElement(Ze,{locale:ln,rootPrefixCls:$e,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Dn,page:Dn,active:nn,showTitle:An,itemRender:ki}))}vi-1>=Xn*2&&vi!==3&&(Rr[0]=(0,me.cloneElement)(Rr[0],{className:"".concat($e,"-item-after-jump-prev")}),Rr.unshift(Or)),it-vi>=Xn*2&&vi!==it-2&&(Rr[Rr.length-1]=(0,me.cloneElement)(Rr[Rr.length-1],{className:"".concat($e,"-item-before-jump-next")}),Rr.push(Ur)),un!==1&&Rr.unshift(uo),Mn!==it&&Rr.push(po)}var sn=!this.hasPrev()||!it,Nn=!this.hasNext()||!it,On=this.renderPrev(Ke),qn=this.renderNext(qe);return me.createElement("ul",(0,Me.Z)({className:de()($e,dt,(0,ce.Z)({},"".concat($e,"-disabled"),At)),style:Je,ref:this.paginationNode},Ye),St,On?me.createElement("li",{title:An?ln.prev_page:null,onClick:this.prev,tabIndex:sn?null:0,onKeyPress:this.runIfEnterPrev,className:de()("".concat($e,"-prev"),(0,ce.Z)({},"".concat($e,"-disabled"),sn)),"aria-disabled":sn},On):null,Rr,qn?me.createElement("li",{title:An?ln.next_page:null,onClick:this.next,tabIndex:Nn?null:0,onKeyPress:this.runIfEnterNext,className:de()("".concat($e,"-next"),(0,ce.Z)({},"".concat($e,"-disabled"),Nn)),"aria-disabled":Nn},qn):null,me.createElement(De,{disabled:At,locale:ln,rootPrefixCls:$e,selectComponentClass:sr,selectPrefixCls:Ji,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:vi,pageSize:wr,pageSizeOptions:Fr,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Do}))}}],[{key:"getDerivedStateFromProps",value:function(Ne,$e){var dt={};if("current"in Ne&&(dt.current=Ne.current,Ne.current!==$e.current&&(dt.currentInputValue=dt.current)),"pageSize"in Ne&&Ne.pageSize!==$e.pageSize){var Je=$e.current,At=at(Ne.pageSize,$e,Ne);Je=Je>At?At:Je,"current"in Ne||(dt.current=Je,dt.currentInputValue=Je),dt.pageSize=Ne.pageSize}return dt}}]),Oe}(me.Component);Ct.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:Xe,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:Xe,locale:Pe.Z,style:{},itemRender:ft,totalBoundaryShowSizeChanger:50};var et=Ct,yt=Ee(22075),st=Ee(36355),zt=Ee(19716),lt=Ee(8628),tt=Ee(9763),ut=Ee(57809);const mt=Ie=>me.createElement(ut.default,Object.assign({},Ie,{showSearch:!0,size:"small"})),Pt=Ie=>me.createElement(ut.default,Object.assign({},Ie,{showSearch:!0,size:"middle"}));mt.Option=ut.default.Option,Pt.Option=ut.default.Option;var gt=Ee(9937),Ft=Ee(17313),Ht=Ee(83116),hn=Ee(37613);const Jt=Ie=>{const{componentCls:We}=Ie;return{[`${We}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${We}-item-link`]:{color:Ie.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${We}-item-link`]:{color:Ie.colorTextDisabled,cursor:"not-allowed"}}},[`&${We}-disabled`]:{cursor:"not-allowed",[`${We}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:Ie.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:Ie.colorBorder,backgroundColor:Ie.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:Ie.itemActiveBgDisabled},a:{color:Ie.itemActiveColorDisabled}}},[`${We}-item-link`]:{color:Ie.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${We}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${We}-simple-pager`]:{color:Ie.colorTextDisabled},[`${We}-jump-prev, ${We}-jump-next`]:{[`${We}-item-link-icon`]:{opacity:0},[`${We}-item-ellipsis`]:{opacity:1}}},[`&${We}-simple`]:{[`${We}-prev, ${We}-next`]:{[`&${We}-disabled ${We}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},bn=Ie=>{const{componentCls:We}=Ie;return{[`&${We}-mini ${We}-total-text, &${We}-mini ${We}-simple-pager`]:{height:Ie.itemSizeSM,lineHeight:`${Ie.itemSizeSM}px`},[`&${We}-mini ${We}-item`]:{minWidth:Ie.itemSizeSM,height:Ie.itemSizeSM,margin:0,lineHeight:`${Ie.itemSizeSM-2}px`},[`&${We}-mini:not(${We}-disabled) ${We}-item:not(${We}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:Ie.colorBgTextHover},"&:active":{backgroundColor:Ie.colorBgTextActive}},[`&${We}-mini ${We}-prev, &${We}-mini ${We}-next`]:{minWidth:Ie.itemSizeSM,height:Ie.itemSizeSM,margin:0,lineHeight:`${Ie.itemSizeSM}px`},[`&${We}-mini:not(${We}-disabled)`]:{[`${We}-prev, ${We}-next`]:{[`&:hover ${We}-item-link`]:{backgroundColor:Ie.colorBgTextHover},[`&:active ${We}-item-link`]:{backgroundColor:Ie.colorBgTextActive},[`&${We}-disabled:hover ${We}-item-link`]:{backgroundColor:"transparent"}}},[`
|
|
|
&${We}-mini ${We}-prev ${We}-item-link,
|
|
|
&${We}-mini ${We}-next ${We}-item-link
|
|
|
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:Ie.itemSizeSM,lineHeight:`${Ie.itemSizeSM}px`}},[`&${We}-mini ${We}-jump-prev, &${We}-mini ${We}-jump-next`]:{height:Ie.itemSizeSM,marginInlineEnd:0,lineHeight:`${Ie.itemSizeSM}px`},[`&${We}-mini ${We}-options`]:{marginInlineStart:Ie.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:Ie.miniOptionsSizeChangerTop},"&-quick-jumper":{height:Ie.itemSizeSM,lineHeight:`${Ie.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,gt.x0)(Ie)),{width:Ie.paginationMiniQuickJumperInputWidth,height:Ie.controlHeightSM})}}}},Wt=Ie=>{const{componentCls:We}=Ie;return{[`
|
|
|
&${We}-simple ${We}-prev,
|
|
|
&${We}-simple ${We}-next
|
|
|
`]:{height:Ie.itemSizeSM,lineHeight:`${Ie.itemSizeSM}px`,verticalAlign:"top",[`${We}-item-link`]:{height:Ie.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:Ie.colorBgTextHover},"&:active":{backgroundColor:Ie.colorBgTextActive},"&::after":{height:Ie.itemSizeSM,lineHeight:`${Ie.itemSizeSM}px`}}},[`&${We}-simple ${We}-simple-pager`]:{display:"inline-block",height:Ie.itemSizeSM,marginInlineEnd:Ie.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:Ie.marginXS,padding:`0 ${Ie.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:Ie.itemInputBg,border:`${Ie.lineWidth}px ${Ie.lineType} ${Ie.colorBorder}`,borderRadius:Ie.borderRadius,outline:"none",transition:`border-color ${Ie.motionDurationMid}`,color:"inherit","&:hover":{borderColor:Ie.colorPrimary},"&:focus":{borderColor:Ie.colorPrimaryHover,boxShadow:`${Ie.inputOutlineOffset}px 0 ${Ie.controlOutlineWidth}px ${Ie.controlOutline}`},"&[disabled]":{color:Ie.colorTextDisabled,backgroundColor:Ie.colorBgContainerDisabled,borderColor:Ie.colorBorder,cursor:"not-allowed"}}}}},Kt=Ie=>{const{componentCls:We}=Ie;return{[`${We}-jump-prev, ${We}-jump-next`]:{outline:0,[`${We}-item-container`]:{position:"relative",[`${We}-item-link-icon`]:{color:Ie.colorPrimary,fontSize:Ie.fontSizeSM,opacity:0,transition:`all ${Ie.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${We}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:Ie.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:Ie.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:Ie.paginationEllipsisTextIndent,opacity:1,transition:`all ${Ie.motionDurationMid}`}},"&:hover":{[`${We}-item-link-icon`]:{opacity:1},[`${We}-item-ellipsis`]:{opacity:0}}},[`
|
|
|
${We}-prev,
|
|
|
${We}-jump-prev,
|
|
|
${We}-jump-next
|
|
|
`]:{marginInlineEnd:Ie.marginXS},[`
|
|
|
${We}-prev,
|
|
|
${We}-next,
|
|
|
${We}-jump-prev,
|
|
|
${We}-jump-next
|
|
|
`]:{display:"inline-block",minWidth:Ie.itemSize,height:Ie.itemSize,color:Ie.colorText,fontFamily:Ie.fontFamily,lineHeight:`${Ie.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:Ie.borderRadius,cursor:"pointer",transition:`all ${Ie.motionDurationMid}`},[`${We}-prev, ${We}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:Ie.colorText,cursor:"pointer",userSelect:"none"},[`${We}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:Ie.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${Ie.lineWidth}px ${Ie.lineType} transparent`,borderRadius:Ie.borderRadius,outline:"none",transition:`all ${Ie.motionDurationMid}`},[`&:hover ${We}-item-link`]:{backgroundColor:Ie.colorBgTextHover},[`&:active ${We}-item-link`]:{backgroundColor:Ie.colorBgTextActive},[`&${We}-disabled:hover`]:{[`${We}-item-link`]:{backgroundColor:"transparent"}}},[`${We}-slash`]:{marginInlineEnd:Ie.paginationSlashMarginInlineEnd,marginInlineStart:Ie.paginationSlashMarginInlineStart},[`${We}-options`]:{display:"inline-block",marginInlineStart:Ie.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:Ie.controlHeight,marginInlineStart:Ie.marginXS,lineHeight:`${Ie.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,gt.ik)(Ie)),{width:Ie.controlHeightLG*1.25,height:Ie.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:Ie.marginXS,marginInlineEnd:Ie.marginXS})}}}},Xt=Ie=>{const{componentCls:We}=Ie;return{[`${We}-item`]:{display:"inline-block",minWidth:Ie.itemSize,height:Ie.itemSize,marginInlineEnd:Ie.marginXS,fontFamily:Ie.fontFamily,lineHeight:`${Ie.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${Ie.lineWidth}px ${Ie.lineType} transparent`,borderRadius:Ie.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${Ie.paginationItemPaddingInline}px`,color:Ie.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${We}-item-active)`]:{"&:hover":{transition:`all ${Ie.motionDurationMid}`,backgroundColor:Ie.colorBgTextHover},"&:active":{backgroundColor:Ie.colorBgTextActive}},"&-active":{fontWeight:Ie.fontWeightStrong,backgroundColor:Ie.itemActiveBg,borderColor:Ie.colorPrimary,a:{color:Ie.colorPrimary},"&:hover":{borderColor:Ie.colorPrimaryHover},"&:hover a":{color:Ie.colorPrimaryHover}}}}},$t=Ie=>{const{componentCls:We}=Ie;return{[We]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Ft.Wf)(Ie)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${We}-total-text`]:{display:"inline-block",height:Ie.itemSize,marginInlineEnd:Ie.marginXS,lineHeight:`${Ie.itemSize-2}px`,verticalAlign:"middle"}}),Xt(Ie)),Kt(Ie)),Wt(Ie)),bn(Ie)),Jt(Ie)),{[`@media only screen and (max-width: ${Ie.screenLG}px)`]:{[`${We}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${Ie.screenSM}px)`]:{[`${We}-options`]:{display:"none"}}}),[`&${Ie.componentCls}-rtl`]:{direction:"rtl"}}},kt=Ie=>{const{componentCls:We}=Ie;return{[`${We}${We}-disabled:not(${We}-mini)`]:{"&, &:hover":{[`${We}-item-link`]:{borderColor:Ie.colorBorder}},"&:focus-visible":{[`${We}-item-link`]:{borderColor:Ie.colorBorder}},[`${We}-item, ${We}-item-link`]:{backgroundColor:Ie.colorBgContainerDisabled,borderColor:Ie.colorBorder,[`&:hover:not(${We}-item-active)`]:{backgroundColor:Ie.colorBgContainerDisabled,borderColor:Ie.colorBorder,a:{color:Ie.colorTextDisabled}},[`&${We}-item-active`]:{backgroundColor:Ie.itemActiveBgDisabled}},[`${We}-prev, ${We}-next`]:{"&:hover button":{backgroundColor:Ie.colorBgContainerDisabled,borderColor:Ie.colorBorder,color:Ie.colorTextDisabled},[`${We}-item-link`]:{backgroundColor:Ie.colorBgContainerDisabled,borderColor:Ie.colorBorder}}},[`${We}:not(${We}-mini)`]:{[`${We}-prev, ${We}-next`]:{"&:hover button":{borderColor:Ie.colorPrimaryHover,backgroundColor:Ie.itemBg},[`${We}-item-link`]:{backgroundColor:Ie.itemLinkBg,borderColor:Ie.colorBorder},[`&:hover ${We}-item-link`]:{borderColor:Ie.colorPrimary,backgroundColor:Ie.itemBg,color:Ie.colorPrimary},[`&${We}-disabled`]:{[`${We}-item-link`]:{borderColor:Ie.colorBorder,color:Ie.colorTextDisabled}}},[`${We}-item`]:{backgroundColor:Ie.itemBg,border:`${Ie.lineWidth}px ${Ie.lineType} ${Ie.colorBorder}`,[`&:hover:not(${We}-item-active)`]:{borderColor:Ie.colorPrimary,backgroundColor:Ie.itemBg,a:{color:Ie.colorPrimary}},"&-active":{borderColor:Ie.colorPrimary}}}}},pt=Ie=>{const{componentCls:We}=Ie;return{[`${We}:not(${We}-disabled)`]:{[`${We}-item`]:Object.assign({},(0,Ft.Qy)(Ie)),[`${We}-jump-prev, ${We}-jump-next`]:{"&:focus-visible":Object.assign({[`${We}-item-link-icon`]:{opacity:1},[`${We}-item-ellipsis`]:{opacity:0}},(0,Ft.oN)(Ie))},[`${We}-prev, ${We}-next`]:{[`&:focus-visible ${We}-item-link`]:Object.assign({},(0,Ft.oN)(Ie))}}}};var Bt=(0,Ht.Z)("Pagination",Ie=>{const We=(0,hn.TS)(Ie,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:Ie.marginXXS/2,paginationMiniQuickJumperInputWidth:Ie.controlHeightLG*1.1,paginationItemPaddingInline:Ie.marginXXS*1.5,paginationEllipsisLetterSpacing:Ie.marginXXS/2,paginationSlashMarginInlineStart:Ie.marginXXS,paginationSlashMarginInlineEnd:Ie.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,gt.e5)(Ie),(0,gt.TM)(Ie));return[$t(We),pt(We),Ie.wireframe&&kt(We)]},Ie=>({itemBg:Ie.colorBgContainer,itemSize:Ie.controlHeight,itemSizeSM:Ie.controlHeightSM,itemActiveBg:Ie.colorBgContainer,itemLinkBg:Ie.colorBgContainer,itemActiveColorDisabled:Ie.colorTextDisabled,itemActiveBgDisabled:Ie.controlItemBgActiveDisabled,itemInputBg:Ie.colorBgContainer,miniOptionsSizeChangerTop:0})),xt=function(Ie,We){var Oe={};for(var be in Ie)Object.prototype.hasOwnProperty.call(Ie,be)&&We.indexOf(be)<0&&(Oe[be]=Ie[be]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ne=0,be=Object.getOwnPropertySymbols(Ie);Ne<be.length;Ne++)We.indexOf(be[Ne])<0&&Object.prototype.propertyIsEnumerable.call(Ie,be[Ne])&&(Oe[be[Ne]]=Ie[be[Ne]]);return Oe},nt=Ie=>{const{prefixCls:We,selectPrefixCls:Oe,className:be,rootClassName:Ne,style:$e,size:dt,locale:Je,selectComponentClass:At,responsive:en,showSizeChanger:pn}=Ie,ln=xt(Ie,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:gn}=(0,lt.Z)(en),{getPrefixCls:Un,direction:An,pagination:ni={}}=me.useContext(st.E_),ai=Un("pagination",We),[ki,Ci]=Bt(ai),Ki=pn!=null?pn:ni.showSizeChanger,ir=me.useMemo(()=>{const it=me.createElement("span",{className:`${ai}-item-ellipsis`},"\u2022\u2022\u2022"),Rr=me.createElement("button",{className:`${ai}-item-link`,type:"button",tabIndex:-1},An==="rtl"?me.createElement(le.Z,null):me.createElement(ge.Z,null)),Or=me.createElement("button",{className:`${ai}-item-link`,type:"button",tabIndex:-1},An==="rtl"?me.createElement(ge.Z,null):me.createElement(le.Z,null)),Ur=me.createElement("a",{className:`${ai}-item-link`},me.createElement("div",{className:`${ai}-item-container`},An==="rtl"?me.createElement(xe.Z,{className:`${ai}-item-link-icon`}):me.createElement(ye,{className:`${ai}-item-link-icon`}),it)),uo=me.createElement("a",{className:`${ai}-item-link`},me.createElement("div",{className:`${ai}-item-container`},An==="rtl"?me.createElement(ye,{className:`${ai}-item-link-icon`}):me.createElement(xe.Z,{className:`${ai}-item-link-icon`}),it));return{prevIcon:Rr,nextIcon:Or,jumpPrevIcon:Ur,jumpNextIcon:uo}},[An,ai]),[sr]=(0,tt.Z)("Pagination",yt.Z),Ji=Object.assign(Object.assign({},sr),Je),Fr=(0,zt.Z)(dt),Mr=Fr==="small"||!!(gn&&!Fr&&en),vi=Un("select",Oe),wr=de()({[`${ai}-mini`]:Mr,[`${ai}-rtl`]:An==="rtl"},ni==null?void 0:ni.className,be,Ne,Ci),Tr=Object.assign(Object.assign({},ni==null?void 0:ni.style),$e);return ki(me.createElement(et,Object.assign({},ir,ln,{style:Tr,prefixCls:ai,selectPrefixCls:vi,className:wr,selectComponentClass:At||(Mr?mt:Pt),locale:Ji,showSizeChanger:Ki})))},He=nt},57809:function(_n,qt,Ee){"use strict";var Me=Ee(92310),me=Ee.n(Me),Be=Ee(77861),ke=Ee(2738),Ce=Ee(59301),Le=Ee(53487),he=Ee(62892),ye=Ee(19080),xe=Ee(36355),ge=Ee(1684),le=Ee(93891),ve=Ee(19716),de=Ee(32441),ce=Ee(33234),z=Ee(14154),ee=Ee(58582),oe=Ee(84443),ie=Ee(66339),se=function(Ae,De){var ze={};for(var Ze in Ae)Object.prototype.hasOwnProperty.call(Ae,Ze)&&De.indexOf(Ze)<0&&(ze[Ze]=Ae[Ze]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,Ze=Object.getOwnPropertySymbols(Ae);Xe<Ze.length;Xe++)De.indexOf(Ze[Xe])<0&&Object.prototype.propertyIsEnumerable.call(Ae,Ze[Xe])&&(ze[Ze[Xe]]=Ae[Ze[Xe]]);return ze};const ue="SECRET_COMBOBOX_MODE_DO_NOT_USE",Se=(Ae,De)=>{var ze,{prefixCls:Ze,bordered:Xe=!0,className:Ge,rootClassName:ft,getPopupContainer:at,popupClassName:Ct,dropdownClassName:et,listHeight:yt=256,placement:st,listItemHeight:zt=24,size:lt,disabled:tt,notFoundContent:ut,status:mt,builtinPlacements:Pt,dropdownMatchSelectWidth:gt,popupMatchSelectWidth:Ft,direction:Ht,style:hn,allowClear:Jt}=Ae,bn=se(Ae,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:Wt,getPrefixCls:Kt,renderEmpty:Xt,direction:$t,virtual:kt,popupMatchSelectWidth:pt,popupOverflow:Bt,select:xt}=Ce.useContext(xe.E_),vt=Kt("select",Ze),nt=Kt(),He=Ht!=null?Ht:$t,{compactSize:Ie,compactItemClassnames:We}=(0,ce.ri)(vt,He),[Oe,be]=(0,z.Z)(vt),Ne=Ce.useMemo(()=>{const{mode:Tr}=bn;if(Tr!=="combobox")return Tr===ue?"combobox":Tr},[bn.mode]),$e=Ne==="multiple"||Ne==="tags",dt=(0,oe.Z)(bn.suffixIcon,bn.showArrow),Je=(ze=Ft!=null?Ft:gt)!==null&&ze!==void 0?ze:pt,{status:At,hasFeedback:en,isFormItemInput:pn,feedbackIcon:ln}=Ce.useContext(de.aM),gn=(0,ye.F)(At,mt);let Un;ut!==void 0?Un=ut:Ne==="combobox"?Un=null:Un=(Xt==null?void 0:Xt("Select"))||Ce.createElement(le.Z,{componentName:"Select"});const{suffixIcon:An,itemIcon:ni,removeIcon:ai,clearIcon:ki}=(0,ie.Z)(Object.assign(Object.assign({},bn),{multiple:$e,hasFeedback:en,feedbackIcon:ln,showSuffixIcon:dt,prefixCls:vt,showArrow:bn.showArrow,componentName:"Select"})),Ci=Jt===!0?{clearIcon:ki}:Jt,Ki=(0,ke.Z)(bn,["suffixIcon","itemIcon"]),ir=me()(Ct||et,{[`${vt}-dropdown-${He}`]:He==="rtl"},ft,be),sr=(0,ve.Z)(Tr=>{var it;return(it=lt!=null?lt:Ie)!==null&&it!==void 0?it:Tr}),Ji=Ce.useContext(ge.Z),Fr=tt!=null?tt:Ji,Mr=me()({[`${vt}-lg`]:sr==="large",[`${vt}-sm`]:sr==="small",[`${vt}-rtl`]:He==="rtl",[`${vt}-borderless`]:!Xe,[`${vt}-in-form-item`]:pn},(0,ye.Z)(vt,gn,en),We,xt==null?void 0:xt.className,Ge,ft,be),vi=Ce.useMemo(()=>st!==void 0?st:He==="rtl"?"bottomRight":"bottomLeft",[st,He]),wr=(0,ee.Z)(Pt,Bt);return Oe(Ce.createElement(Be.ZP,Object.assign({ref:De,virtual:kt,showSearch:xt==null?void 0:xt.showSearch},Ki,{style:Object.assign(Object.assign({},xt==null?void 0:xt.style),hn),dropdownMatchSelectWidth:Je,builtinPlacements:wr,transitionName:(0,he.m)(nt,"slide-up",bn.transitionName),listHeight:yt,listItemHeight:zt,mode:Ne,prefixCls:vt,placement:vi,direction:He,suffixIcon:An,menuItemSelectedIcon:ni,removeIcon:ai,allowClear:Ci,notFoundContent:Un,className:Mr,getPopupContainer:at||Wt,dropdownClassName:ir,disabled:Fr})))},we=Ce.forwardRef(Se),Pe=(0,Le.Z)(we);we.SECRET_COMBOBOX_MODE_DO_NOT_USE=ue,we.Option=Be.Wx,we.OptGroup=Be.Xo,we._InternalPanelDoNotUseOrYouWillBeFired=Pe,qt.default=we},14154:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return we}});var Me=Ee(17313),me=Ee(74207),Be=Ee(37613),ke=Ee(83116),Ce=Ee(13826),Le=Ee(92899);const he=Pe=>{const{optionHeight:Ae,optionFontSize:De,optionLineHeight:ze,optionPadding:Ze}=Pe;return{position:"relative",display:"block",minHeight:Ae,padding:Ze,color:Pe.colorText,fontWeight:"normal",fontSize:De,lineHeight:ze,boxSizing:"border-box"}};var xe=Pe=>{const{antCls:Ae,componentCls:De}=Pe,ze=`${De}-item`,Ze=`&${Ae}-slide-up-enter${Ae}-slide-up-enter-active`,Xe=`&${Ae}-slide-up-appear${Ae}-slide-up-appear-active`,Ge=`&${Ae}-slide-up-leave${Ae}-slide-up-leave-active`,ft=`${De}-dropdown-placement-`;return[{[`${De}-dropdown`]:Object.assign(Object.assign({},(0,Me.Wf)(Pe)),{position:"absolute",top:-9999,zIndex:Pe.zIndexPopup,boxSizing:"border-box",padding:Pe.paddingXXS,overflow:"hidden",fontSize:Pe.fontSize,fontVariant:"initial",backgroundColor:Pe.colorBgElevated,borderRadius:Pe.borderRadiusLG,outline:"none",boxShadow:Pe.boxShadowSecondary,[`
|
|
|
${Ze}${ft}bottomLeft,
|
|
|
${Xe}${ft}bottomLeft
|
|
|
`]:{animationName:Ce.fJ},[`
|
|
|
${Ze}${ft}topLeft,
|
|
|
${Xe}${ft}topLeft,
|
|
|
${Ze}${ft}topRight,
|
|
|
${Xe}${ft}topRight
|
|
|
`]:{animationName:Ce.Qt},[`${Ge}${ft}bottomLeft`]:{animationName:Ce.Uw},[`
|
|
|
${Ge}${ft}topLeft,
|
|
|
${Ge}${ft}topRight
|
|
|
`]:{animationName:Ce.ly},"&-hidden":{display:"none"},[`${ze}`]:Object.assign(Object.assign({},he(Pe)),{cursor:"pointer",transition:`background ${Pe.motionDurationSlow} ease`,borderRadius:Pe.borderRadiusSM,"&-group":{color:Pe.colorTextDescription,fontSize:Pe.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},Me.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${ze}-option-disabled)`]:{backgroundColor:Pe.optionActiveBg},[`&-selected:not(${ze}-option-disabled)`]:{color:Pe.optionSelectedColor,fontWeight:Pe.optionSelectedFontWeight,backgroundColor:Pe.optionSelectedBg,[`${ze}-option-state`]:{color:Pe.colorPrimary}},"&-disabled":{[`&${ze}-option-selected`]:{backgroundColor:Pe.colorBgContainerDisabled},color:Pe.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:Pe.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,Ce.oN)(Pe,"slide-up"),(0,Ce.oN)(Pe,"slide-down"),(0,Le.Fm)(Pe,"move-up"),(0,Le.Fm)(Pe,"move-down")]};const ge=2,le=Pe=>{let{controlHeightSM:Ae,controlHeight:De,lineWidth:ze}=Pe;const Ze=(De-Ae)/2-ze,Xe=Math.ceil(Ze/2);return[Ze,Xe]};function ve(Pe,Ae){const{componentCls:De,iconCls:ze}=Pe,Ze=`${De}-selection-overflow`,Xe=Pe.multipleSelectItemHeight,[Ge]=le(Pe),ft=Ae?`${De}-${Ae}`:"";return{[`${De}-multiple${ft}`]:{fontSize:Pe.fontSize,[Ze]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${De}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${Ge-ge}px ${ge*2}px`,borderRadius:Pe.borderRadius,[`${De}-show-search&`]:{cursor:"text"},[`${De}-disabled&`]:{background:Pe.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${ge}px 0`,lineHeight:`${Xe}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${De}-show-arrow ${De}-selector,
|
|
|
&${De}-allow-clear ${De}-selector
|
|
|
`]:{paddingInlineEnd:Pe.fontSizeIcon+Pe.controlPaddingHorizontal},[`${De}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:Xe,marginTop:ge,marginBottom:ge,lineHeight:`${Xe-Pe.lineWidth*2}px`,background:Pe.multipleItemBg,border:`${Pe.lineWidth}px ${Pe.lineType} ${Pe.multipleItemBorderColor}`,borderRadius:Pe.borderRadiusSM,cursor:"default",transition:`font-size ${Pe.motionDurationSlow}, line-height ${Pe.motionDurationSlow}, height ${Pe.motionDurationSlow}`,userSelect:"none",marginInlineEnd:ge*2,paddingInlineStart:Pe.paddingXS,paddingInlineEnd:Pe.paddingXS/2,[`${De}-disabled&`]:{color:Pe.multipleItemColorDisabled,borderColor:Pe.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:Pe.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,Me.Ro)()),{display:"inline-flex",alignItems:"center",color:Pe.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${ze}`]:{verticalAlign:"-0.2em"},"&:hover":{color:Pe.colorIconHover}})},[`${Ze}-item + ${Ze}-item`]:{[`${De}-selection-search`]:{marginInlineStart:0}},[`${De}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:Pe.inputPaddingHorizontalBase-Ge,"\n &-input,\n &-mirror\n ":{height:Xe,fontFamily:Pe.fontFamily,lineHeight:`${Xe}px`,transition:`all ${Pe.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${De}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:Pe.inputPaddingHorizontalBase,insetInlineEnd:Pe.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${Pe.motionDurationSlow}`}}}}var ce=Pe=>{const{componentCls:Ae}=Pe,De=(0,Be.TS)(Pe,{controlHeight:Pe.controlHeightSM,multipleSelectItemHeight:Pe.controlHeightXS,borderRadius:Pe.borderRadiusSM,borderRadiusSM:Pe.borderRadiusXS}),ze=(0,Be.TS)(Pe,{fontSize:Pe.fontSizeLG,controlHeight:Pe.controlHeightLG,multipleSelectItemHeight:Pe.multipleItemHeightLG,borderRadius:Pe.borderRadiusLG,borderRadiusSM:Pe.borderRadius}),[,Ze]=le(Pe);return[ve(Pe),ve(De,"sm"),{[`${Ae}-multiple${Ae}-sm`]:{[`${Ae}-selection-placeholder`]:{insetInline:Pe.controlPaddingHorizontalSM-Pe.lineWidth},[`${Ae}-selection-search`]:{marginInlineStart:Ze}}},ve(ze,"lg")]};function z(Pe,Ae){const{componentCls:De,inputPaddingHorizontalBase:ze,borderRadius:Ze}=Pe,Xe=Pe.controlHeight-Pe.lineWidth*2,Ge=Math.ceil(Pe.fontSize*1.25),ft=Ae?`${De}-${Ae}`:"";return{[`${De}-single${ft}`]:{fontSize:Pe.fontSize,[`${De}-selector`]:Object.assign(Object.assign({},(0,Me.Wf)(Pe)),{display:"flex",borderRadius:Ze,[`${De}-selection-search`]:{position:"absolute",top:0,insetInlineStart:ze,insetInlineEnd:ze,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${De}-selection-item,
|
|
|
${De}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${Xe}px`,transition:`all ${Pe.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${Xe}px`}},[`${De}-selection-item`]:{position:"relative",userSelect:"none"},[`${De}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${De}-selection-item:after`,`${De}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${De}-show-arrow ${De}-selection-item,
|
|
|
&${De}-show-arrow ${De}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Ge},[`&${De}-open ${De}-selection-item`]:{color:Pe.colorTextPlaceholder},[`&:not(${De}-customize-input)`]:{[`${De}-selector`]:{width:"100%",height:Pe.controlHeight,padding:`0 ${ze}px`,[`${De}-selection-search-input`]:{height:Xe},"&:after":{lineHeight:`${Xe}px`}}},[`&${De}-customize-input`]:{[`${De}-selector`]:{"&:after":{display:"none"},[`${De}-selection-search`]:{position:"static",width:"100%"},[`${De}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${ze}px`,"&:after":{display:"none"}}}}}}}function ee(Pe){const{componentCls:Ae}=Pe,De=Pe.controlPaddingHorizontalSM-Pe.lineWidth;return[z(Pe),z((0,Be.TS)(Pe,{controlHeight:Pe.controlHeightSM,borderRadius:Pe.borderRadiusSM}),"sm"),{[`${Ae}-single${Ae}-sm`]:{[`&:not(${Ae}-customize-input)`]:{[`${Ae}-selection-search`]:{insetInlineStart:De,insetInlineEnd:De},[`${Ae}-selector`]:{padding:`0 ${De}px`},[`&${Ae}-show-arrow ${Ae}-selection-search`]:{insetInlineEnd:De+Pe.fontSize*1.5},[`
|
|
|
&${Ae}-show-arrow ${Ae}-selection-item,
|
|
|
&${Ae}-show-arrow ${Ae}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Pe.fontSize*1.5}}}},z((0,Be.TS)(Pe,{controlHeight:Pe.singleItemHeightLG,fontSize:Pe.fontSizeLG,borderRadius:Pe.borderRadiusLG}),"lg")]}const oe=Pe=>{const{componentCls:Ae,selectorBg:De}=Pe;return{position:"relative",backgroundColor:De,border:`${Pe.lineWidth}px ${Pe.lineType} ${Pe.colorBorder}`,transition:`all ${Pe.motionDurationMid} ${Pe.motionEaseInOut}`,input:{cursor:"pointer"},[`${Ae}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${Ae}-disabled&`]:{color:Pe.colorTextDisabled,background:Pe.colorBgContainerDisabled,cursor:"not-allowed",[`${Ae}-multiple&`]:{background:Pe.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},ie=function(Pe,Ae){let De=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:ze,borderHoverColor:Ze,outlineColor:Xe,antCls:Ge}=Ae,ft=De?{[`${ze}-selector`]:{borderColor:Ze}}:{};return{[Pe]:{[`&:not(${ze}-disabled):not(${ze}-customize-input):not(${Ge}-pagination-size-changer)`]:Object.assign(Object.assign({},ft),{[`${ze}-focused& ${ze}-selector`]:{borderColor:Ze,boxShadow:`0 0 0 ${Ae.controlOutlineWidth}px ${Xe}`,outline:0},[`&:hover ${ze}-selector`]:{borderColor:Ze}})}}},se=Pe=>{const{componentCls:Ae}=Pe;return{[`${Ae}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},ue=Pe=>{const{componentCls:Ae,inputPaddingHorizontalBase:De,iconCls:ze}=Pe;return{[Ae]:Object.assign(Object.assign({},(0,Me.Wf)(Pe)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${Ae}-customize-input) ${Ae}-selector`]:Object.assign(Object.assign({},oe(Pe)),se(Pe)),[`${Ae}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},Me.vS),[`${Ae}-selection-placeholder`]:Object.assign(Object.assign({},Me.vS),{flex:1,color:Pe.colorTextPlaceholder,pointerEvents:"none"}),[`${Ae}-arrow`]:Object.assign(Object.assign({},(0,Me.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:De,height:Pe.fontSizeIcon,marginTop:-Pe.fontSizeIcon/2,color:Pe.colorTextQuaternary,fontSize:Pe.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[ze]:{verticalAlign:"top",transition:`transform ${Pe.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${Ae}-suffix)`]:{pointerEvents:"auto"}},[`${Ae}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${Ae}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:De,zIndex:1,display:"inline-block",width:Pe.fontSizeIcon,height:Pe.fontSizeIcon,marginTop:-Pe.fontSizeIcon/2,color:Pe.colorTextQuaternary,fontSize:Pe.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:Pe.clearBg,cursor:"pointer",opacity:0,transition:`color ${Pe.motionDurationMid} ease, opacity ${Pe.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:Pe.colorTextTertiary}},"&:hover":{[`${Ae}-clear`]:{opacity:1}}}),[`${Ae}-has-feedback`]:{[`${Ae}-clear`]:{insetInlineEnd:De+Pe.fontSize+Pe.paddingXS}}}},Se=Pe=>{const{componentCls:Ae}=Pe;return[{[Ae]:{[`&-borderless ${Ae}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${Ae}-in-form-item`]:{width:"100%"}}},ue(Pe),ee(Pe),ce(Pe),xe(Pe),{[`${Ae}-rtl`]:{direction:"rtl"}},ie(Ae,(0,Be.TS)(Pe,{borderHoverColor:Pe.colorPrimaryHover,outlineColor:Pe.controlOutline})),ie(`${Ae}-status-error`,(0,Be.TS)(Pe,{borderHoverColor:Pe.colorErrorHover,outlineColor:Pe.colorErrorOutline}),!0),ie(`${Ae}-status-warning`,(0,Be.TS)(Pe,{borderHoverColor:Pe.colorWarningHover,outlineColor:Pe.colorWarningOutline}),!0),(0,me.c)(Pe,{borderElCls:`${Ae}-selector`,focusElCls:`${Ae}-focused`})]};var we=(0,ke.Z)("Select",(Pe,Ae)=>{let{rootPrefixCls:De}=Ae;const ze=(0,Be.TS)(Pe,{rootPrefixCls:De,inputPaddingHorizontalBase:Pe.paddingSM-1,multipleSelectItemHeight:Pe.multipleItemHeight});return[Se(ze)]},Pe=>{const{fontSize:Ae,lineHeight:De,controlHeight:ze,controlPaddingHorizontal:Ze,zIndexPopupBase:Xe,colorText:Ge,fontWeightStrong:ft,controlItemBgActive:at,controlItemBgHover:Ct,colorBgContainer:et,colorFillSecondary:yt,controlHeightLG:st,controlHeightSM:zt,colorBgContainerDisabled:lt,colorTextDisabled:tt}=Pe;return{zIndexPopup:Xe+50,optionSelectedColor:Ge,optionSelectedFontWeight:ft,optionSelectedBg:at,optionActiveBg:Ct,optionPadding:`${(ze-Ae*De)/2}px ${Ze}px`,optionFontSize:Ae,optionLineHeight:De,optionHeight:ze,selectorBg:et,clearBg:et,singleItemHeightLG:st,multipleItemBg:yt,multipleItemBorderColor:"transparent",multipleItemHeight:zt,multipleItemHeightLG:ze,multipleSelectorBgDisabled:lt,multipleItemColorDisabled:tt,multipleItemBorderColorDisabled:"transparent"}})},58582:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return me}});const Me=Be=>{const Ce={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:Be==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},Ce),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},Ce),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},Ce),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},Ce),{points:["br","tr"],offset:[0,-4]})}};function me(Be,ke){return Be||Me(ke)}},84443:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Me}});function Me(me,Be){return Be!==void 0?Be:me!==null}},66339:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ye}});var Me=Ee(40001),me=Ee(19248),Be=Ee(99267),ke=Ee(84105),Ce=Ee(58617),Le=Ee(47472),he=Ee(59301);function ye(xe){let{suffixIcon:ge,clearIcon:le,menuItemSelectedIcon:ve,removeIcon:de,loading:ce,multiple:z,hasFeedback:ee,prefixCls:oe,showSuffixIcon:ie,feedbackIcon:se,showArrow:ue,componentName:Se}=xe;const we=le!=null?le:he.createElement(me.Z,null),Pe=Ze=>ge===null&&!ee&&!ue?null:he.createElement(he.Fragment,null,ie!==!1&&Ze,ee&&se);let Ae=null;if(ge!==void 0)Ae=Pe(ge);else if(ce)Ae=Pe(he.createElement(Ce.Z,{spin:!0}));else{const Ze=`${oe}-suffix`;Ae=Xe=>{let{open:Ge,showSearch:ft}=Xe;return Pe(Ge&&ft?he.createElement(Le.Z,{className:Ze}):he.createElement(ke.Z,{className:Ze}))}}let De=null;ve!==void 0?De=ve:z?De=he.createElement(Me.Z,null):De=null;let ze=null;return de!==void 0?ze=de:ze=he.createElement(Be.Z,null),{clearIcon:we,suffixIcon:Ae,itemIcon:De,removeIcon:ze}}},61621:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Bt}});var Me=Ee(92310),me=Ee.n(Me),Be=Ee(59301),ke=Ee(36355),Ce=Ee(2738),he=xt=>{const{prefixCls:vt,className:nt,style:He,size:Ie,shape:We}=xt,Oe=me()({[`${vt}-lg`]:Ie==="large",[`${vt}-sm`]:Ie==="small"}),be=me()({[`${vt}-circle`]:We==="circle",[`${vt}-square`]:We==="square",[`${vt}-round`]:We==="round"}),Ne=Be.useMemo(()=>typeof Ie=="number"?{width:Ie,height:Ie,lineHeight:`${Ie}px`}:{},[Ie]);return Be.createElement("span",{className:me()(vt,Oe,be,nt),style:Object.assign(Object.assign({},Ne),He)})},ye=Ee(93083),xe=Ee(83116),ge=Ee(37613);const le=new ye.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),ve=xt=>({height:xt,lineHeight:`${xt}px`}),de=xt=>Object.assign({width:xt},ve(xt)),ce=xt=>({background:xt.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:le,animationDuration:xt.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),z=xt=>Object.assign({width:xt*5,minWidth:xt*5},ve(xt)),ee=xt=>{const{skeletonAvatarCls:vt,gradientFromColor:nt,controlHeight:He,controlHeightLG:Ie,controlHeightSM:We}=xt;return{[`${vt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:nt},de(He)),[`${vt}${vt}-circle`]:{borderRadius:"50%"},[`${vt}${vt}-lg`]:Object.assign({},de(Ie)),[`${vt}${vt}-sm`]:Object.assign({},de(We))}},oe=xt=>{const{controlHeight:vt,borderRadiusSM:nt,skeletonInputCls:He,controlHeightLG:Ie,controlHeightSM:We,gradientFromColor:Oe}=xt;return{[`${He}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Oe,borderRadius:nt},z(vt)),[`${He}-lg`]:Object.assign({},z(Ie)),[`${He}-sm`]:Object.assign({},z(We))}},ie=xt=>Object.assign({width:xt},ve(xt)),se=xt=>{const{skeletonImageCls:vt,imageSizeBase:nt,gradientFromColor:He,borderRadiusSM:Ie}=xt;return{[`${vt}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:He,borderRadius:Ie},ie(nt*2)),{[`${vt}-path`]:{fill:"#bfbfbf"},[`${vt}-svg`]:Object.assign(Object.assign({},ie(nt)),{maxWidth:nt*4,maxHeight:nt*4}),[`${vt}-svg${vt}-svg-circle`]:{borderRadius:"50%"}}),[`${vt}${vt}-circle`]:{borderRadius:"50%"}}},ue=(xt,vt,nt)=>{const{skeletonButtonCls:He}=xt;return{[`${nt}${He}-circle`]:{width:vt,minWidth:vt,borderRadius:"50%"},[`${nt}${He}-round`]:{borderRadius:vt}}},Se=xt=>Object.assign({width:xt*2,minWidth:xt*2},ve(xt)),we=xt=>{const{borderRadiusSM:vt,skeletonButtonCls:nt,controlHeight:He,controlHeightLG:Ie,controlHeightSM:We,gradientFromColor:Oe}=xt;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${nt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Oe,borderRadius:vt,width:He*2,minWidth:He*2},Se(He))},ue(xt,He,nt)),{[`${nt}-lg`]:Object.assign({},Se(Ie))}),ue(xt,Ie,`${nt}-lg`)),{[`${nt}-sm`]:Object.assign({},Se(We))}),ue(xt,We,`${nt}-sm`))},Pe=xt=>{const{componentCls:vt,skeletonAvatarCls:nt,skeletonTitleCls:He,skeletonParagraphCls:Ie,skeletonButtonCls:We,skeletonInputCls:Oe,skeletonImageCls:be,controlHeight:Ne,controlHeightLG:$e,controlHeightSM:dt,gradientFromColor:Je,padding:At,marginSM:en,borderRadius:pn,titleHeight:ln,blockRadius:gn,paragraphLiHeight:Un,controlHeightXS:An,paragraphMarginTop:ni}=xt;return{[`${vt}`]:{display:"table",width:"100%",[`${vt}-header`]:{display:"table-cell",paddingInlineEnd:At,verticalAlign:"top",[`${nt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Je},de(Ne)),[`${nt}-circle`]:{borderRadius:"50%"},[`${nt}-lg`]:Object.assign({},de($e)),[`${nt}-sm`]:Object.assign({},de(dt))},[`${vt}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${He}`]:{width:"100%",height:ln,background:Je,borderRadius:gn,[`+ ${Ie}`]:{marginBlockStart:dt}},[`${Ie}`]:{padding:0,"> li":{width:"100%",height:Un,listStyle:"none",background:Je,borderRadius:gn,"+ li":{marginBlockStart:An}}},[`${Ie}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${vt}-content`]:{[`${He}, ${Ie} > li`]:{borderRadius:pn}}},[`${vt}-with-avatar ${vt}-content`]:{[`${He}`]:{marginBlockStart:en,[`+ ${Ie}`]:{marginBlockStart:ni}}},[`${vt}${vt}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},we(xt)),ee(xt)),oe(xt)),se(xt)),[`${vt}${vt}-block`]:{width:"100%",[`${We}`]:{width:"100%"},[`${Oe}`]:{width:"100%"}},[`${vt}${vt}-active`]:{[`
|
|
|
${He},
|
|
|
${Ie} > li,
|
|
|
${nt},
|
|
|
${We},
|
|
|
${Oe},
|
|
|
${be}
|
|
|
`]:Object.assign({},ce(xt))}}};var Ae=(0,xe.Z)("Skeleton",xt=>{const{componentCls:vt}=xt,nt=(0,ge.TS)(xt,{skeletonAvatarCls:`${vt}-avatar`,skeletonTitleCls:`${vt}-title`,skeletonParagraphCls:`${vt}-paragraph`,skeletonButtonCls:`${vt}-button`,skeletonInputCls:`${vt}-input`,skeletonImageCls:`${vt}-image`,imageSizeBase:xt.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${xt.gradientFromColor} 25%, ${xt.gradientToColor} 37%, ${xt.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[Pe(nt)]},xt=>{const{colorFillContent:vt,colorFill:nt}=xt,He=vt,Ie=nt;return{color:He,colorGradientEnd:Ie,gradientFromColor:He,gradientToColor:Ie,titleHeight:xt.controlHeight/2,blockRadius:xt.borderRadiusSM,paragraphMarginTop:xt.marginLG+xt.marginXXS,paragraphLiHeight:xt.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),ze=xt=>{const{prefixCls:vt,className:nt,rootClassName:He,active:Ie,shape:We="circle",size:Oe="default"}=xt,{getPrefixCls:be}=Be.useContext(ke.E_),Ne=be("skeleton",vt),[$e,dt]=Ae(Ne),Je=(0,Ce.Z)(xt,["prefixCls","className"]),At=me()(Ne,`${Ne}-element`,{[`${Ne}-active`]:Ie},nt,He,dt);return $e(Be.createElement("div",{className:At},Be.createElement(he,Object.assign({prefixCls:`${Ne}-avatar`,shape:We,size:Oe},Je))))},Xe=xt=>{const{prefixCls:vt,className:nt,rootClassName:He,active:Ie,block:We=!1,size:Oe="default"}=xt,{getPrefixCls:be}=Be.useContext(ke.E_),Ne=be("skeleton",vt),[$e,dt]=Ae(Ne),Je=(0,Ce.Z)(xt,["prefixCls"]),At=me()(Ne,`${Ne}-element`,{[`${Ne}-active`]:Ie,[`${Ne}-block`]:We},nt,He,dt);return $e(Be.createElement("div",{className:At},Be.createElement(he,Object.assign({prefixCls:`${Ne}-button`,size:Oe},Je))))};const Ge="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 at=xt=>{const{prefixCls:vt,className:nt,rootClassName:He,style:Ie,active:We}=xt,{getPrefixCls:Oe}=Be.useContext(ke.E_),be=Oe("skeleton",vt),[Ne,$e]=Ae(be),dt=me()(be,`${be}-element`,{[`${be}-active`]:We},nt,He,$e);return Ne(Be.createElement("div",{className:dt},Be.createElement("div",{className:me()(`${be}-image`,nt),style:Ie},Be.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${be}-image-svg`},Be.createElement("path",{d:Ge,className:`${be}-image-path`})))))},et=xt=>{const{prefixCls:vt,className:nt,rootClassName:He,active:Ie,block:We,size:Oe="default"}=xt,{getPrefixCls:be}=Be.useContext(ke.E_),Ne=be("skeleton",vt),[$e,dt]=Ae(Ne),Je=(0,Ce.Z)(xt,["prefixCls"]),At=me()(Ne,`${Ne}-element`,{[`${Ne}-active`]:Ie,[`${Ne}-block`]:We},nt,He,dt);return $e(Be.createElement("div",{className:At},Be.createElement(he,Object.assign({prefixCls:`${Ne}-input`,size:Oe},Je))))},yt=Ee(72308),st={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"},zt=st,lt=Ee(7657),tt=function(vt,nt){return Be.createElement(lt.Z,(0,yt.Z)({},vt,{ref:nt,icon:zt}))},ut=Be.forwardRef(tt),mt=ut,gt=xt=>{const{prefixCls:vt,className:nt,rootClassName:He,style:Ie,active:We,children:Oe}=xt,{getPrefixCls:be}=Be.useContext(ke.E_),Ne=be("skeleton",vt),[$e,dt]=Ae(Ne),Je=me()(Ne,`${Ne}-element`,{[`${Ne}-active`]:We},dt,nt,He),At=Oe!=null?Oe:Be.createElement(mt,null);return $e(Be.createElement("div",{className:Je},Be.createElement("div",{className:me()(`${Ne}-image`,nt),style:Ie},At)))},Ft=Ee(80702),hn=xt=>{const vt=be=>{const{width:Ne,rows:$e=2}=xt;if(Array.isArray(Ne))return Ne[be];if($e-1===be)return Ne},{prefixCls:nt,className:He,style:Ie,rows:We}=xt,Oe=(0,Ft.Z)(Array(We)).map((be,Ne)=>Be.createElement("li",{key:Ne,style:{width:vt(Ne)}}));return Be.createElement("ul",{className:me()(nt,He),style:Ie},Oe)},bn=xt=>{let{prefixCls:vt,className:nt,width:He,style:Ie}=xt;return Be.createElement("h3",{className:me()(vt,nt),style:Object.assign({width:He},Ie)})};function Wt(xt){return xt&&typeof xt=="object"?xt:{}}function Kt(xt,vt){return xt&&!vt?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function Xt(xt,vt){return!xt&&vt?{width:"38%"}:xt&&vt?{width:"50%"}:{}}function $t(xt,vt){const nt={};return(!xt||!vt)&&(nt.width="61%"),!xt&&vt?nt.rows=3:nt.rows=2,nt}const kt=xt=>{const{prefixCls:vt,loading:nt,className:He,rootClassName:Ie,style:We,children:Oe,avatar:be=!1,title:Ne=!0,paragraph:$e=!0,active:dt,round:Je}=xt,{getPrefixCls:At,direction:en,skeleton:pn}=Be.useContext(ke.E_),ln=At("skeleton",vt),[gn,Un]=Ae(ln);if(nt||!("loading"in xt)){const An=!!be,ni=!!Ne,ai=!!$e;let ki;if(An){const ir=Object.assign(Object.assign({prefixCls:`${ln}-avatar`},Kt(ni,ai)),Wt(be));ki=Be.createElement("div",{className:`${ln}-header`},Be.createElement(he,Object.assign({},ir)))}let Ci;if(ni||ai){let ir;if(ni){const Ji=Object.assign(Object.assign({prefixCls:`${ln}-title`},Xt(An,ai)),Wt(Ne));ir=Be.createElement(bn,Object.assign({},Ji))}let sr;if(ai){const Ji=Object.assign(Object.assign({prefixCls:`${ln}-paragraph`},$t(An,ni)),Wt($e));sr=Be.createElement(hn,Object.assign({},Ji))}Ci=Be.createElement("div",{className:`${ln}-content`},ir,sr)}const Ki=me()(ln,{[`${ln}-with-avatar`]:An,[`${ln}-active`]:dt,[`${ln}-rtl`]:en==="rtl",[`${ln}-round`]:Je},pn==null?void 0:pn.className,He,Ie,Un);return gn(Be.createElement("div",{className:Ki,style:Object.assign(Object.assign({},pn==null?void 0:pn.style),We)},ki,Ci))}return typeof Oe!="undefined"?Oe:null};kt.Button=Xe,kt.Avatar=ze,kt.Input=et,kt.Image=at,kt.Node=gt;var pt=kt,Bt=pt},81327:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return oe}});var Me=Ee(59301),me=Ee(92310),Be=Ee.n(me),ke=Ee(11592),Ce=Ee(36355),Le=Ee(33234);const he=Me.createContext({latestIndex:0}),ye=he.Provider;var ge=ie=>{let{className:se,index:ue,children:Se,split:we,style:Pe}=ie;const{latestIndex:Ae}=Me.useContext(he);return Se==null?null:Me.createElement(Me.Fragment,null,Me.createElement("div",{className:se,style:Pe},Se),ue<Ae&&we&&Me.createElement("span",{className:`${se}-split`},we))},le=Ee(2856);function ve(ie){return["small","middle","large"].includes(ie)}function de(ie){return ie?typeof ie=="number"&&!Number.isNaN(ie):!1}var ce=function(ie,se){var ue={};for(var Se in ie)Object.prototype.hasOwnProperty.call(ie,Se)&&se.indexOf(Se)<0&&(ue[Se]=ie[Se]);if(ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,Se=Object.getOwnPropertySymbols(ie);we<Se.length;we++)se.indexOf(Se[we])<0&&Object.prototype.propertyIsEnumerable.call(ie,Se[we])&&(ue[Se[we]]=ie[Se[we]]);return ue};const ee=Me.forwardRef((ie,se)=>{var ue,Se;const{getPrefixCls:we,space:Pe,direction:Ae}=Me.useContext(Ce.E_),{size:De=(Pe==null?void 0:Pe.size)||"small",align:ze,className:Ze,rootClassName:Xe,children:Ge,direction:ft="horizontal",prefixCls:at,split:Ct,style:et,wrap:yt=!1,classNames:st,styles:zt}=ie,lt=ce(ie,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[tt,ut]=Array.isArray(De)?De:[De,De],mt=ve(ut),Pt=ve(tt),gt=de(ut),Ft=de(tt),Ht=(0,ke.Z)(Ge,{keepEmpty:!0}),hn=ze===void 0&&ft==="horizontal"?"center":ze,Jt=we("space",at),[bn,Wt]=(0,le.Z)(Jt),Kt=Be()(Jt,Pe==null?void 0:Pe.className,Wt,`${Jt}-${ft}`,{[`${Jt}-rtl`]:Ae==="rtl",[`${Jt}-align-${hn}`]:hn,[`${Jt}-gap-row-${ut}`]:mt,[`${Jt}-gap-col-${tt}`]:Pt},Ze,Xe),Xt=Be()(`${Jt}-item`,(ue=st==null?void 0:st.item)!==null&&ue!==void 0?ue:(Se=Pe==null?void 0:Pe.classNames)===null||Se===void 0?void 0:Se.item);let $t=0;const kt=Ht.map((xt,vt)=>{var nt,He;xt!=null&&($t=vt);const Ie=xt&&xt.key||`${Xt}-${vt}`;return Me.createElement(ge,{className:Xt,key:Ie,index:vt,split:Ct,style:(nt=zt==null?void 0:zt.item)!==null&&nt!==void 0?nt:(He=Pe==null?void 0:Pe.styles)===null||He===void 0?void 0:He.item},xt)}),pt=Me.useMemo(()=>({latestIndex:$t}),[$t]);if(Ht.length===0)return null;const Bt={};return yt&&(Bt.flexWrap="wrap"),!Pt&&Ft&&(Bt.columnGap=tt),!mt&>&&(Bt.rowGap=ut),bn(Me.createElement("div",Object.assign({ref:se,className:Kt,style:Object.assign(Object.assign(Object.assign({},Bt),Pe==null?void 0:Pe.style),et)},lt),Me.createElement(ye,{value:pt},kt)))});ee.Compact=Le.ZP;var oe=ee},31797:function(_n,qt,Ee){"use strict";Ee.d(qt,{default:function(){return Ae}});var Me=Ee(59301),me=Ee(56762),Be=Ee(92343),ke=Ee(92310),Ce=Ee.n(ke),Le=Ee(36355),he=Ee(61621),xe=De=>{const{value:ze,formatter:Ze,precision:Xe,decimalSeparator:Ge,groupSeparator:ft="",prefixCls:at}=De;let Ct;if(typeof Ze=="function")Ct=Ze(ze);else{const et=String(ze),yt=et.match(/^(-?)(\d*)(\.(\d+))?$/);if(!yt||et==="-")Ct=et;else{const st=yt[1];let zt=yt[2]||"0",lt=yt[4]||"";zt=zt.replace(/\B(?=(\d{3})+(?!\d))/g,ft),typeof Xe=="number"&&(lt=lt.padEnd(Xe,"0").slice(0,Xe>0?Xe:0)),lt&&(lt=`${Ge}${lt}`),Ct=[Me.createElement("span",{key:"int",className:`${at}-content-value-int`},st,zt),lt&&Me.createElement("span",{key:"decimal",className:`${at}-content-value-decimal`},lt)]}}return Me.createElement("span",{className:`${at}-content-value`},Ct)},ge=Ee(17313),le=Ee(83116),ve=Ee(37613);const de=De=>{const{componentCls:ze,marginXXS:Ze,padding:Xe,colorTextDescription:Ge,titleFontSize:ft,colorTextHeading:at,contentFontSize:Ct,fontFamily:et}=De;return{[`${ze}`]:Object.assign(Object.assign({},(0,ge.Wf)(De)),{[`${ze}-title`]:{marginBottom:Ze,color:Ge,fontSize:ft},[`${ze}-skeleton`]:{paddingTop:Xe},[`${ze}-content`]:{color:at,fontSize:Ct,fontFamily:et,[`${ze}-content-value`]:{display:"inline-block",direction:"ltr"},[`${ze}-content-prefix, ${ze}-content-suffix`]:{display:"inline-block"},[`${ze}-content-prefix`]:{marginInlineEnd:Ze},[`${ze}-content-suffix`]:{marginInlineStart:Ze}}})}};var ce=(0,le.Z)("Statistic",De=>{const ze=(0,ve.TS)(De,{});return[de(ze)]},De=>{const{fontSizeHeading3:ze,fontSize:Ze}=De;return{titleFontSize:Ze,contentFontSize:ze}}),ee=De=>{const{prefixCls:ze,className:Ze,rootClassName:Xe,style:Ge,valueStyle:ft,value:at=0,title:Ct,valueRender:et,prefix:yt,suffix:st,loading:zt=!1,onMouseEnter:lt,onMouseLeave:tt,decimalSeparator:ut=".",groupSeparator:mt=","}=De,{getPrefixCls:Pt,direction:gt,statistic:Ft}=Me.useContext(Le.E_),Ht=Pt("statistic",ze),[hn,Jt]=ce(Ht),bn=Me.createElement(xe,Object.assign({decimalSeparator:ut,groupSeparator:mt,prefixCls:Ht},De,{value:at})),Wt=Ce()(Ht,{[`${Ht}-rtl`]:gt==="rtl"},Ft==null?void 0:Ft.className,Ze,Xe,Jt);return hn(Me.createElement("div",{className:Wt,style:Object.assign(Object.assign({},Ft==null?void 0:Ft.style),Ge),onMouseEnter:lt,onMouseLeave:tt},Ct&&Me.createElement("div",{className:`${Ht}-title`},Ct),Me.createElement(he.Z,{paragraph:!1,loading:zt,className:`${Ht}-skeleton`},Me.createElement("div",{style:ft,className:`${Ht}-content`},yt&&Me.createElement("span",{className:`${Ht}-content-prefix`},yt),et?et(bn):bn,st&&Me.createElement("span",{className:`${Ht}-content-suffix`},st)))))};const oe=[["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 ie(De,ze){let Ze=De;const Xe=/\[[^\]]*]/g,Ge=(ze.match(Xe)||[]).map(et=>et.slice(1,-1)),ft=ze.replace(Xe,"[]"),at=oe.reduce((et,yt)=>{let[st,zt]=yt;if(et.includes(st)){const lt=Math.floor(Ze/zt);return Ze-=lt*zt,et.replace(new RegExp(`${st}+`,"g"),tt=>{const ut=tt.length;return lt.toString().padStart(ut,"0")})}return et},ft);let Ct=0;return at.replace(Xe,()=>{const et=Ge[Ct];return Ct+=1,et})}function se(De,ze){const{format:Ze=""}=ze,Xe=new Date(De).getTime(),Ge=Date.now(),ft=Math.max(Xe-Ge,0);return ie(ft,Ze)}const ue=1e3/30;function Se(De){return new Date(De).getTime()}const we=De=>{const{value:ze,format:Ze="HH:mm:ss",onChange:Xe,onFinish:Ge}=De,ft=(0,me.Z)(),at=Me.useRef(null),Ct=()=>{Ge==null||Ge(),at.current&&(clearInterval(at.current),at.current=null)},et=()=>{const zt=Se(ze);zt>=Date.now()&&(at.current=setInterval(()=>{ft(),Xe==null||Xe(zt-Date.now()),zt<Date.now()&&Ct()},ue))};Me.useEffect(()=>(et(),()=>{at.current&&(clearInterval(at.current),at.current=null)}),[ze]);const yt=(zt,lt)=>se(zt,Object.assign(Object.assign({},lt),{format:Ze})),st=zt=>(0,Be.Tm)(zt,{title:void 0});return Me.createElement(ee,Object.assign({},De,{valueRender:st,formatter:yt}))};var Pe=Me.memo(we);ee.Countdown=Pe;var Ae=ee},15969:function(_n,qt,Ee){"use strict";Ee.d(qt,{N:function(){return Me}});const Me=me=>({color:me.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${me.motionDurationSlow}`,"&:focus, &:hover":{color:me.colorLinkHover},"&:active":{color:me.colorLinkActive}})},78673:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ft}});var Me=Ee(58617),me=Ee(92310),Be=Ee.n(me),ke=Ee(72308),Ce=Ee(49618),Le=Ee(52487),he=Ee(74416),ye=Ee(59301),xe=Ee(18929),ge=Ee(10228),le=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],ve=ye.forwardRef(function(at,Ct){var et,yt=at.prefixCls,st=yt===void 0?"rc-switch":yt,zt=at.className,lt=at.checked,tt=at.defaultChecked,ut=at.disabled,mt=at.loadingIcon,Pt=at.checkedChildren,gt=at.unCheckedChildren,Ft=at.onClick,Ht=at.onChange,hn=at.onKeyDown,Jt=(0,he.Z)(at,le),bn=(0,xe.Z)(!1,{value:lt,defaultValue:tt}),Wt=(0,Le.Z)(bn,2),Kt=Wt[0],Xt=Wt[1];function $t(xt,vt){var nt=Kt;return ut||(nt=xt,Xt(nt),Ht==null||Ht(nt,vt)),nt}function kt(xt){xt.which===ge.Z.LEFT?$t(!1,xt):xt.which===ge.Z.RIGHT&&$t(!0,xt),hn==null||hn(xt)}function pt(xt){var vt=$t(!Kt,xt);Ft==null||Ft(vt,xt)}var Bt=Be()(st,zt,(et={},(0,Ce.Z)(et,"".concat(st,"-checked"),Kt),(0,Ce.Z)(et,"".concat(st,"-disabled"),ut),et));return ye.createElement("button",(0,ke.Z)({},Jt,{type:"button",role:"switch","aria-checked":Kt,disabled:ut,className:Bt,ref:Ct,onKeyDown:kt,onClick:pt}),mt,ye.createElement("span",{className:"".concat(st,"-inner")},ye.createElement("span",{className:"".concat(st,"-inner-checked")},Pt),ye.createElement("span",{className:"".concat(st,"-inner-unchecked")},gt)))});ve.displayName="Switch";var de=ve,ce=Ee(14088),z=Ee(36355),ee=Ee(1684),oe=Ee(19716),ie=Ee(64993),se=Ee(17313),ue=Ee(83116),Se=Ee(37613);const we=at=>{const{componentCls:Ct,trackHeightSM:et,trackPadding:yt,trackMinWidthSM:st,innerMinMarginSM:zt,innerMaxMarginSM:lt,handleSizeSM:tt}=at,ut=`${Ct}-inner`;return{[Ct]:{[`&${Ct}-small`]:{minWidth:st,height:et,lineHeight:`${et}px`,[`${Ct}-inner`]:{paddingInlineStart:lt,paddingInlineEnd:zt,[`${ut}-checked`]:{marginInlineStart:`calc(-100% + ${tt+yt*2}px - ${lt*2}px)`,marginInlineEnd:`calc(100% - ${tt+yt*2}px + ${lt*2}px)`},[`${ut}-unchecked`]:{marginTop:-et,marginInlineStart:0,marginInlineEnd:0}},[`${Ct}-handle`]:{width:tt,height:tt},[`${Ct}-loading-icon`]:{top:(tt-at.switchLoadingIconSize)/2,fontSize:at.switchLoadingIconSize},[`&${Ct}-checked`]:{[`${Ct}-inner`]:{paddingInlineStart:zt,paddingInlineEnd:lt,[`${ut}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${ut}-unchecked`]:{marginInlineStart:`calc(100% - ${tt+yt*2}px + ${lt*2}px)`,marginInlineEnd:`calc(-100% + ${tt+yt*2}px - ${lt*2}px)`}},[`${Ct}-handle`]:{insetInlineStart:`calc(100% - ${tt+yt}px)`}},[`&:not(${Ct}-disabled):active`]:{[`&:not(${Ct}-checked) ${ut}`]:{[`${ut}-unchecked`]:{marginInlineStart:at.marginXXS/2,marginInlineEnd:-at.marginXXS/2}},[`&${Ct}-checked ${ut}`]:{[`${ut}-checked`]:{marginInlineStart:-at.marginXXS/2,marginInlineEnd:at.marginXXS/2}}}}}}},Pe=at=>{const{componentCls:Ct,handleSize:et}=at;return{[Ct]:{[`${Ct}-loading-icon${at.iconCls}`]:{position:"relative",top:(et-at.fontSize)/2,color:at.switchLoadingIconColor,verticalAlign:"top"},[`&${Ct}-checked ${Ct}-loading-icon`]:{color:at.switchColor}}}},Ae=at=>{const{componentCls:Ct,motion:et,trackPadding:yt,handleBg:st,handleShadow:zt,handleSize:lt}=at,tt=`${Ct}-handle`;return{[Ct]:{[tt]:{position:"absolute",top:yt,insetInlineStart:yt,width:lt,height:lt,transition:`all ${at.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:st,borderRadius:lt/2,boxShadow:zt,transition:`all ${at.switchDuration} ease-in-out`,content:'""'}},[`&${Ct}-checked ${tt}`]:{insetInlineStart:`calc(100% - ${lt+yt}px)`},[`&:not(${Ct}-disabled):active`]:et?{[`${tt}::before`]:{insetInlineEnd:at.switchHandleActiveInset,insetInlineStart:0},[`&${Ct}-checked ${tt}::before`]:{insetInlineEnd:0,insetInlineStart:at.switchHandleActiveInset}}:{}}}},De=at=>{const{componentCls:Ct,trackHeight:et,trackPadding:yt,innerMinMargin:st,innerMaxMargin:zt,handleSize:lt}=at,tt=`${Ct}-inner`;return{[Ct]:{[tt]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:zt,paddingInlineEnd:st,transition:`padding-inline-start ${at.switchDuration} ease-in-out, padding-inline-end ${at.switchDuration} ease-in-out`,[`${tt}-checked, ${tt}-unchecked`]:{display:"block",color:at.colorTextLightSolid,fontSize:at.fontSizeSM,transition:`margin-inline-start ${at.switchDuration} ease-in-out, margin-inline-end ${at.switchDuration} ease-in-out`,pointerEvents:"none"},[`${tt}-checked`]:{marginInlineStart:`calc(-100% + ${lt+yt*2}px - ${zt*2}px)`,marginInlineEnd:`calc(100% - ${lt+yt*2}px + ${zt*2}px)`},[`${tt}-unchecked`]:{marginTop:-et,marginInlineStart:0,marginInlineEnd:0}},[`&${Ct}-checked ${tt}`]:{paddingInlineStart:st,paddingInlineEnd:zt,[`${tt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${tt}-unchecked`]:{marginInlineStart:`calc(100% - ${lt+yt*2}px + ${zt*2}px)`,marginInlineEnd:`calc(-100% + ${lt+yt*2}px - ${zt*2}px)`}},[`&:not(${Ct}-disabled):active`]:{[`&:not(${Ct}-checked) ${tt}`]:{[`${tt}-unchecked`]:{marginInlineStart:yt*2,marginInlineEnd:-yt*2}},[`&${Ct}-checked ${tt}`]:{[`${tt}-checked`]:{marginInlineStart:-yt*2,marginInlineEnd:yt*2}}}}}},ze=at=>{const{componentCls:Ct,trackHeight:et,trackMinWidth:yt}=at;return{[Ct]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,se.Wf)(at)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:yt,height:et,lineHeight:`${et}px`,verticalAlign:"middle",background:at.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${at.motionDurationMid}`,userSelect:"none",[`&:hover:not(${Ct}-disabled)`]:{background:at.colorTextTertiary}}),(0,se.Qy)(at)),{[`&${Ct}-checked`]:{background:at.switchColor,[`&:hover:not(${Ct}-disabled)`]:{background:at.colorPrimaryHover}},[`&${Ct}-loading, &${Ct}-disabled`]:{cursor:"not-allowed",opacity:at.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${Ct}-rtl`]:{direction:"rtl"}})}};var Ze=(0,ue.Z)("Switch",at=>{const Ct=(0,Se.TS)(at,{switchDuration:at.motionDurationMid,switchColor:at.colorPrimary,switchDisabledOpacity:at.opacityLoading,switchLoadingIconSize:at.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${at.opacityLoading})`,switchHandleActiveInset:"-30%"});return[ze(Ct),De(Ct),Ae(Ct),Pe(Ct),we(Ct)]},at=>{const{fontSize:Ct,lineHeight:et,controlHeight:yt,colorWhite:st}=at,zt=Ct*et,lt=yt/2,tt=2,ut=zt-tt*2,mt=lt-tt*2;return{trackHeight:zt,trackHeightSM:lt,trackMinWidth:ut*2+tt*4,trackMinWidthSM:mt*2+tt*2,trackPadding:tt,handleBg:st,handleSize:ut,handleSizeSM:mt,handleShadow:`0 2px 4px 0 ${new ie.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:ut/2,innerMaxMargin:ut+tt+tt*2,innerMinMarginSM:mt/2,innerMaxMarginSM:mt+tt+tt*2}}),Xe=function(at,Ct){var et={};for(var yt in at)Object.prototype.hasOwnProperty.call(at,yt)&&Ct.indexOf(yt)<0&&(et[yt]=at[yt]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var st=0,yt=Object.getOwnPropertySymbols(at);st<yt.length;st++)Ct.indexOf(yt[st])<0&&Object.prototype.propertyIsEnumerable.call(at,yt[st])&&(et[yt[st]]=at[yt[st]]);return et};const Ge=ye.forwardRef((at,Ct)=>{const{prefixCls:et,size:yt,disabled:st,loading:zt,className:lt,rootClassName:tt,style:ut}=at,mt=Xe(at,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:Pt,direction:gt,switch:Ft}=ye.useContext(z.E_),Ht=ye.useContext(ee.Z),hn=(st!=null?st:Ht)||zt,Jt=Pt("switch",et),bn=ye.createElement("div",{className:`${Jt}-handle`},zt&&ye.createElement(Me.Z,{className:`${Jt}-loading-icon`})),[Wt,Kt]=Ze(Jt),Xt=(0,oe.Z)(yt),$t=Be()(Ft==null?void 0:Ft.className,{[`${Jt}-small`]:Xt==="small",[`${Jt}-loading`]:zt,[`${Jt}-rtl`]:gt==="rtl"},lt,tt,Kt),kt=Object.assign(Object.assign({},Ft==null?void 0:Ft.style),ut);return Wt(ye.createElement(ce.Z,{component:"Switch"},ye.createElement(de,Object.assign({},mt,{prefixCls:Jt,className:$t,style:kt,disabled:hn,ref:Ct,loadingIcon:bn}))))});Ge.__ANT_SWITCH=!0;var ft=Ge},1710:function(_n,qt,Ee){"use strict";Ee.d(qt,{default:function(){return gf}});var Me={},me="rc-table-internal-hook",Be=Ee(52487),ke=Ee(6089),Ce=Ee(34280),Le=Ee(13697),he=Ee(59301),ye=Ee(4676);function xe(jt){var Ut=he.createContext(void 0),cn=function(bt){var Et=bt.value,wn=bt.children,fn=he.useRef(Et);fn.current=Et;var an=he.useState(function(){return{getValue:function(){return fn.current},listeners:new Set}}),Sn=(0,Be.Z)(an,1),xn=Sn[0];return(0,Ce.Z)(function(){(0,ye.unstable_batchedUpdates)(function(){xn.listeners.forEach(function(Cn){Cn(Et)})})},[Et]),he.createElement(Ut.Provider,{value:xn},wn)};return{Context:Ut,Provider:cn,defaultValue:jt}}function ge(jt,Ut){var cn=(0,ke.Z)(typeof Ut=="function"?Ut:function(Cn){if(Ut===void 0)return Cn;if(!Array.isArray(Ut))return Cn[Ut];var zn={};return Ut.forEach(function(ii){zn[ii]=Cn[ii]}),zn}),ht=he.useContext(jt==null?void 0:jt.Context),bt=ht||{},Et=bt.listeners,wn=bt.getValue,fn=he.useRef();fn.current=cn(ht?wn():jt==null?void 0:jt.defaultValue);var an=he.useState({}),Sn=(0,Be.Z)(an,2),xn=Sn[1];return(0,Ce.Z)(function(){if(!ht)return;function Cn(zn){var ii=cn(zn);(0,Le.Z)(fn.current,ii,!0)||xn({})}return Et.add(Cn),function(){Et.delete(Cn)}},[ht]),fn.current}var le=Ee(72308),ve=Ee(8654);function de(){var jt=he.createContext(null);function Ut(){return he.useContext(jt)}function cn(bt,Et){var wn=(0,ve.Yr)(bt),fn=function(Sn,xn){var Cn=wn?{ref:xn}:{},zn=he.useRef(0),ii=he.useRef(Sn),Zn=Ut();return Zn!==null?he.createElement(bt,(0,le.Z)({},Sn,Cn)):((!Et||Et(ii.current,Sn))&&(zn.current+=1),ii.current=Sn,he.createElement(jt.Provider,{value:zn.current},he.createElement(bt,(0,le.Z)({},Sn,Cn))))};return wn?he.forwardRef(fn):fn}function ht(bt,Et){var wn=(0,ve.Yr)(bt),fn=function(Sn,xn){var Cn=wn?{ref:xn}:{};return Ut(),he.createElement(bt,(0,le.Z)({},Sn,Cn))};return wn?he.memo(he.forwardRef(fn),Et):he.memo(fn,Et)}return{makeImmutable:cn,responseImmutable:ht,useImmutableMark:Ut}}var ce=de(),z=ce.makeImmutable,ee=ce.responseImmutable,oe=ce.useImmutableMark,ie=de(),se=ie.makeImmutable,ue=ie.responseImmutable,Se=ie.useImmutableMark,we=xe(),Pe=we;function Ae(jt,Ut){var cn=he.useRef(0);cn.current+=1;var ht=he.useRef(jt),bt=[];Object.keys(jt||{}).map(function(wn){var fn;(jt==null?void 0:jt[wn])!==((fn=ht.current)===null||fn===void 0?void 0:fn[wn])&&bt.push(wn)}),ht.current=jt;var Et=he.useRef([]);return bt.length&&(Et.current=bt),he.useDebugValue(cn.current),he.useDebugValue(Et.current.join(", ")),Ut&&console.log("".concat(Ut,":"),cn.current,Et.current),cn.current}var De=null,ze=he.memo(function(){var jt=Ae();return he.createElement("h1",null,"Render Times: ",jt)});ze.displayName="RenderBlock";var Ze=Ee(62853),Xe=Ee(77321),Ge=Ee(49618),ft=Ee(92310),at=Ee.n(ft),Ct=Ee(80547),et=Ee(97938),yt=Ee(48736),st=he.createContext({renderWithProps:!1}),zt=st,lt="RC_TABLE_KEY";function tt(jt){return jt==null?[]:Array.isArray(jt)?jt:[jt]}function ut(jt){var Ut=[],cn={};return jt.forEach(function(ht){for(var bt=ht||{},Et=bt.key,wn=bt.dataIndex,fn=Et||tt(wn).join("-")||lt;cn[fn];)fn="".concat(fn,"_next");cn[fn]=!0,Ut.push(fn)}),Ut}function mt(jt){return jt!=null}function Pt(jt){return jt&&(0,Ze.Z)(jt)==="object"&&!Array.isArray(jt)&&!he.isValidElement(jt)}function gt(jt,Ut,cn,ht,bt,Et){var wn=he.useContext(zt),fn=Se(),an=(0,Ct.Z)(function(){if(mt(ht))return[ht];var Sn=Ut==null||Ut===""?[]:Array.isArray(Ut)?Ut:[Ut],xn=(0,et.Z)(jt,Sn),Cn=xn,zn=void 0;if(bt){var ii=bt(xn,jt,cn);Pt(ii)?(Cn=ii.children,zn=ii.props,wn.renderWithProps=!0):Cn=ii}return[Cn,zn]},[fn,jt,ht,Ut,bt,cn],function(Sn,xn){if(Et){var Cn=(0,Be.Z)(Sn,2),zn=Cn[1],ii=(0,Be.Z)(xn,2),Zn=ii[1];return Et(Zn,zn)}return wn.renderWithProps?!0:!(0,Le.Z)(Sn,xn,!0)});return an}function Ft(jt,Ut,cn,ht){var bt=jt+Ut-1;return jt<=ht&&bt>=cn}function Ht(jt,Ut){return ge(Pe,function(cn){var ht=Ft(jt,Ut||1,cn.hoverStartRow,cn.hoverEndRow);return[ht,cn.onHover]})}var hn=function(Ut){var cn=Ut.ellipsis,ht=Ut.rowType,bt=Ut.children,Et,wn=cn===!0?{showTitle:!0}:cn;return wn&&(wn.showTitle||ht==="header")&&(typeof bt=="string"||typeof bt=="number"?Et=bt.toString():he.isValidElement(bt)&&typeof bt.props.children=="string"&&(Et=bt.props.children)),Et};function Jt(jt){var Ut,cn,ht,bt,Et,wn,fn,an,Sn=jt.component,xn=jt.children,Cn=jt.ellipsis,zn=jt.scope,ii=jt.prefixCls,Zn=jt.className,wi=jt.align,Kn=jt.record,gi=jt.render,si=jt.dataIndex,Ii=jt.renderIndex,Oi=jt.shouldCellUpdate,Ui=jt.index,Ai=jt.rowType,Ni=jt.colSpan,ar=jt.rowSpan,ti=jt.fixLeft,ji=jt.fixRight,Li=jt.firstFixLeft,bi=jt.lastFixLeft,Yi=jt.firstFixRight,pi=jt.lastFixRight,lr=jt.appendNode,Xi=jt.additionalProps,Pi=Xi===void 0?{}:Xi,Gi=jt.isSticky,vr="".concat(ii,"-cell"),er=ge(Pe,["supportSticky","allColumnsFixedLeft"]),So=er.supportSticky,Co=er.allColumnsFixedLeft,is=gt(Kn,si,Ii,xn,gi,Oi),so=(0,Be.Z)(is,2),kr=so[0],No=so[1],Nr={},Xr=typeof ti=="number"&&So,rs=typeof ji=="number"&&So;Xr&&(Nr.position="sticky",Nr.left=ti),rs&&(Nr.position="sticky",Nr.right=ji);var Zr=(Ut=(cn=(ht=No==null?void 0:No.colSpan)!==null&&ht!==void 0?ht:Pi.colSpan)!==null&&cn!==void 0?cn:Ni)!==null&&Ut!==void 0?Ut:1,Er=(bt=(Et=(wn=No==null?void 0:No.rowSpan)!==null&&wn!==void 0?wn:Pi.rowSpan)!==null&&Et!==void 0?Et:ar)!==null&&bt!==void 0?bt:1,Jr=Ht(Ui,Er),br=(0,Be.Z)(Jr,2),ao=br[0],Lr=br[1],ho=function(Ss){var Js;Kn&&Lr(Ui,Ui+Er-1),Pi==null||(Js=Pi.onMouseEnter)===null||Js===void 0||Js.call(Pi,Ss)},Zo=function(Ss){var Js;Kn&&Lr(-1,-1),Pi==null||(Js=Pi.onMouseLeave)===null||Js===void 0||Js.call(Pi,Ss)};if(Zr===0||Er===0)return null;var Ko=(fn=Pi.title)!==null&&fn!==void 0?fn:hn({rowType:Ai,ellipsis:Cn,children:kr}),Qr=at()(vr,Zn,(an={},(0,Ge.Z)(an,"".concat(vr,"-fix-left"),Xr&&So),(0,Ge.Z)(an,"".concat(vr,"-fix-left-first"),Li&&So),(0,Ge.Z)(an,"".concat(vr,"-fix-left-last"),bi&&So),(0,Ge.Z)(an,"".concat(vr,"-fix-left-all"),bi&&Co&&So),(0,Ge.Z)(an,"".concat(vr,"-fix-right"),rs&&So),(0,Ge.Z)(an,"".concat(vr,"-fix-right-first"),Yi&&So),(0,Ge.Z)(an,"".concat(vr,"-fix-right-last"),pi&&So),(0,Ge.Z)(an,"".concat(vr,"-ellipsis"),Cn),(0,Ge.Z)(an,"".concat(vr,"-with-append"),lr),(0,Ge.Z)(an,"".concat(vr,"-fix-sticky"),(Xr||rs)&&Gi&&So),(0,Ge.Z)(an,"".concat(vr,"-row-hover"),!No&&ao),an),Pi.className,No==null?void 0:No.className),Io={};wi&&(Io.textAlign=wi);var Cs=(0,Xe.Z)((0,Xe.Z)((0,Xe.Z)((0,Xe.Z)({},Nr),Pi.style),Io),No==null?void 0:No.style),Lo=kr;return(0,Ze.Z)(Lo)==="object"&&!Array.isArray(Lo)&&!he.isValidElement(Lo)&&(Lo=null),Cn&&(bi||Yi)&&(Lo=he.createElement("span",{className:"".concat(vr,"-content")},Lo)),he.createElement(Sn,(0,le.Z)({},No,Pi,{className:Qr,style:Cs,title:Ko,scope:zn,onMouseEnter:ho,onMouseLeave:Zo,colSpan:Zr!==1?Zr:null,rowSpan:Er!==1?Er:null}),lr,Lo)}var bn=he.memo(Jt);function Wt(jt,Ut,cn,ht,bt,Et){var wn=cn[jt]||{},fn=cn[Ut]||{},an,Sn;wn.fixed==="left"?an=ht.left[bt==="rtl"?Ut:jt]:fn.fixed==="right"&&(Sn=ht.right[bt==="rtl"?jt:Ut]);var xn=!1,Cn=!1,zn=!1,ii=!1,Zn=cn[Ut+1],wi=cn[jt-1],Kn=!(Et!=null&&Et.children);if(bt==="rtl"){if(an!==void 0){var gi=wi&&wi.fixed==="left";ii=!gi&&Kn}else if(Sn!==void 0){var si=Zn&&Zn.fixed==="right";zn=!si&&Kn}}else if(an!==void 0){var Ii=Zn&&Zn.fixed==="left";xn=!Ii&&Kn}else if(Sn!==void 0){var Oi=wi&&wi.fixed==="right";Cn=!Oi&&Kn}return{fixLeft:an,fixRight:Sn,lastFixLeft:xn,firstFixRight:Cn,lastFixRight:zn,firstFixLeft:ii,isSticky:ht.isSticky}}var Kt=he.createContext({}),Xt=Kt;function $t(jt){var Ut=jt.className,cn=jt.index,ht=jt.children,bt=jt.colSpan,Et=bt===void 0?1:bt,wn=jt.rowSpan,fn=jt.align,an=ge(Pe,["prefixCls","direction"]),Sn=an.prefixCls,xn=an.direction,Cn=he.useContext(Xt),zn=Cn.scrollColumnIndex,ii=Cn.stickyOffsets,Zn=Cn.flattenColumns,wi=Cn.columns,Kn=cn+Et-1,gi=Kn+1===zn?Et+1:Et,si=Wt(cn,cn+gi-1,Zn,ii,xn,wi==null?void 0:wi[cn]);return he.createElement(bn,(0,le.Z)({className:Ut,index:cn,component:"td",prefixCls:Sn,record:null,dataIndex:null,align:fn,colSpan:gi,rowSpan:wn,render:function(){return ht}},si))}var kt=Ee(74416),pt=["children"];function Bt(jt){var Ut=jt.children,cn=(0,kt.Z)(jt,pt);return he.createElement("tr",cn,Ut)}function xt(jt){var Ut=jt.children;return Ut}xt.Row=Bt,xt.Cell=$t;var vt=xt;function nt(jt){var Ut=jt.children,cn=jt.stickyOffsets,ht=jt.flattenColumns,bt=jt.columns,Et=ge(Pe,"prefixCls"),wn=ht.length-1,fn=ht[wn],an=he.useMemo(function(){return{stickyOffsets:cn,flattenColumns:ht,scrollColumnIndex:fn!=null&&fn.scrollbar?wn:null,columns:bt}},[fn,ht,wn,cn,bt]);return he.createElement(Xt.Provider,{value:an},he.createElement("tfoot",{className:"".concat(Et,"-summary")},Ut))}var He=ue(nt),Ie=vt,We=Ee(70425),Oe=Ee(29301),be=Ee(29194),Ne=Ee(24514),$e=Ee(75152),dt=Ee(26112);function Je(jt,Ut,cn,ht,bt,Et,wn){jt.push({record:Ut,indent:cn,index:wn});var fn=Et(Ut),an=bt==null?void 0:bt.has(fn);if(Ut&&Array.isArray(Ut[ht])&&an)for(var Sn=0;Sn<Ut[ht].length;Sn+=1)Je(jt,Ut[ht][Sn],cn+1,ht,bt,Et,Sn)}function At(jt,Ut,cn,ht){var bt=he.useMemo(function(){if(cn!=null&&cn.size){for(var Et=[],wn=0;wn<(jt==null?void 0:jt.length);wn+=1){var fn=jt[wn];Je(Et,fn,0,Ut,cn,ht,wn)}return Et}return jt==null?void 0:jt.map(function(an,Sn){return{record:an,indent:0,index:Sn}})},[jt,Ut,cn,ht]);return bt}function en(jt){var Ut=jt.prefixCls,cn=jt.children,ht=jt.component,bt=jt.cellComponent,Et=jt.className,wn=jt.expanded,fn=jt.colSpan,an=jt.isEmpty,Sn=ge(Pe,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),xn=Sn.scrollbarSize,Cn=Sn.fixHeader,zn=Sn.fixColumn,ii=Sn.componentWidth,Zn=Sn.horizonScroll,wi=cn;return(an?Zn&&ii:zn)&&(wi=he.createElement("div",{style:{width:ii-(Cn?xn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ut,"-expanded-row-fixed")},wi)),he.createElement(ht,{className:Et,style:{display:wn?null:"none"}},he.createElement(bn,{component:bt,prefixCls:Ut,colSpan:fn},wi))}var pn=en;function ln(jt,Ut,cn,ht){var bt=ge(Pe,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Et=bt.flattenColumns,wn=bt.expandableType,fn=bt.expandedKeys,an=bt.childrenColumnName,Sn=bt.onTriggerExpand,xn=bt.rowExpandable,Cn=bt.onRow,zn=bt.expandRowByClick,ii=bt.rowClassName,Zn=wn==="nest",wi=wn==="row"&&(!xn||xn(jt)),Kn=wi||Zn,gi=fn&&fn.has(Ut),si=an&&jt&&jt[an],Ii=(0,We.useEvent)(Sn),Oi=Cn==null?void 0:Cn(jt,cn),Ui=Oi==null?void 0:Oi.onClick,Ai=function(ji){zn&&Kn&&Sn(jt,ji);for(var Li=arguments.length,bi=new Array(Li>1?Li-1:0),Yi=1;Yi<Li;Yi++)bi[Yi-1]=arguments[Yi];Ui==null||Ui.apply(void 0,[ji].concat(bi))},Ni;typeof ii=="string"?Ni=ii:typeof ii=="function"&&(Ni=ii(jt,cn,ht));var ar=ut(Et);return(0,Xe.Z)((0,Xe.Z)({},bt),{},{columnsKey:ar,nestExpandable:Zn,expanded:gi,hasNestChildren:si,record:jt,onTriggerExpand:Ii,rowSupportExpand:wi,expandable:Kn,rowProps:(0,Xe.Z)((0,Xe.Z)({},Oi),{},{className:at()(Ni,Oi==null?void 0:Oi.className),onClick:Ai})})}function gn(jt,Ut,cn,ht,bt){var Et=jt.record,wn=jt.prefixCls,fn=jt.columnsKey,an=jt.fixedInfoList,Sn=jt.expandIconColumnIndex,xn=jt.nestExpandable,Cn=jt.indentSize,zn=jt.expandIcon,ii=jt.expanded,Zn=jt.hasNestChildren,wi=jt.onTriggerExpand,Kn=fn[cn],gi=an[cn],si;cn===(Sn||0)&&xn&&(si=he.createElement(he.Fragment,null,he.createElement("span",{style:{paddingLeft:"".concat(Cn*ht,"px")},className:"".concat(wn,"-row-indent indent-level-").concat(ht)}),zn({prefixCls:wn,expanded:ii,expandable:Zn,record:Et,onExpand:wi})));var Ii;return Ut.onCell&&(Ii=Ut.onCell(Et,bt)),{key:Kn,fixedInfo:gi,appendCellNode:si,additionalCellProps:Ii||{}}}function Un(jt){var Ut=jt.className,cn=jt.style,ht=jt.record,bt=jt.index,Et=jt.renderIndex,wn=jt.rowKey,fn=jt.indent,an=fn===void 0?0:fn,Sn=jt.rowComponent,xn=jt.cellComponent,Cn=jt.scopeCellComponent,zn=ln(ht,wn,bt,an),ii=zn.prefixCls,Zn=zn.flattenColumns,wi=zn.expandedRowClassName,Kn=zn.expandedRowRender,gi=zn.rowProps,si=zn.expanded,Ii=zn.rowSupportExpand,Oi=he.useState(!1),Ui=(0,Be.Z)(Oi,2),Ai=Ui[0],Ni=Ui[1];he.useEffect(function(){si&&Ni(!0)},[si]);var ar=he.createElement(Sn,(0,le.Z)({},gi,{"data-row-key":wn,className:at()(Ut,"".concat(ii,"-row"),"".concat(ii,"-row-level-").concat(an),gi==null?void 0:gi.className),style:(0,Xe.Z)((0,Xe.Z)({},cn),gi==null?void 0:gi.style)}),Zn.map(function(bi,Yi){var pi=bi.render,lr=bi.dataIndex,Xi=bi.className,Pi=gn(zn,bi,Yi,an,bt),Gi=Pi.key,vr=Pi.fixedInfo,er=Pi.appendCellNode,So=Pi.additionalCellProps;return he.createElement(bn,(0,le.Z)({className:Xi,ellipsis:bi.ellipsis,align:bi.align,scope:bi.rowScope,component:bi.rowScope?Cn:xn,prefixCls:ii,key:Gi,record:ht,index:bt,renderIndex:Et,dataIndex:lr,render:pi,shouldCellUpdate:bi.shouldCellUpdate},vr,{appendNode:er,additionalProps:So}))})),ti;if(Ii&&(Ai||si)){var ji=Kn(ht,bt,an+1,si),Li=wi&&wi(ht,bt,an);ti=he.createElement(pn,{expanded:si,className:at()("".concat(ii,"-expanded-row"),"".concat(ii,"-expanded-row-level-").concat(an+1),Li),prefixCls:ii,component:Sn,cellComponent:xn,colSpan:Zn.length,isEmpty:!1},ji)}return he.createElement(he.Fragment,null,ar,ti)}Un.displayName="BodyRow";var An=ue(Un);function ni(jt){var Ut=jt.columnKey,cn=jt.onColumnResize,ht=he.useRef();return he.useEffect(function(){ht.current&&cn(Ut,ht.current.offsetWidth)},[]),he.createElement(Oe.Z,{data:Ut},he.createElement("td",{ref:ht,style:{padding:0,border:0,height:0}},he.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function ai(jt){var Ut=jt.prefixCls,cn=jt.columnsKey,ht=jt.onColumnResize;return he.createElement("tr",{"aria-hidden":"true",className:"".concat(Ut,"-measure-row"),style:{height:0,fontSize:0}},he.createElement(Oe.Z.Collection,{onBatchResize:function(Et){Et.forEach(function(wn){var fn=wn.data,an=wn.size;ht(fn,an.offsetWidth)})}},cn.map(function(bt){return he.createElement(ni,{key:bt,columnKey:bt,onColumnResize:ht})})))}function ki(jt){var Ut=jt.data,cn=jt.measureColumnWidth,ht=ge(Pe,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),bt=ht.prefixCls,Et=ht.getComponent,wn=ht.onColumnResize,fn=ht.flattenColumns,an=ht.getRowKey,Sn=ht.expandedKeys,xn=ht.childrenColumnName,Cn=ht.emptyNode,zn=At(Ut,xn,Sn,an),ii=he.useRef({renderWithProps:!1}),Zn=Et(["body","wrapper"],"tbody"),wi=Et(["body","row"],"tr"),Kn=Et(["body","cell"],"td"),gi=Et(["body","cell"],"th"),si;Ut.length?si=zn.map(function(Oi,Ui){var Ai=Oi.record,Ni=Oi.indent,ar=Oi.index,ti=an(Ai,Ui);return he.createElement(An,{key:ti,rowKey:ti,record:Ai,index:Ui,renderIndex:ar,rowComponent:wi,cellComponent:Kn,scopeCellComponent:gi,getRowKey:an,indent:Ni})}):si=he.createElement(pn,{expanded:!0,className:"".concat(bt,"-placeholder"),prefixCls:bt,component:wi,cellComponent:Kn,colSpan:fn.length,isEmpty:!0},Cn);var Ii=ut(fn);return he.createElement(zt.Provider,{value:ii.current},he.createElement(Zn,{className:"".concat(bt,"-tbody")},cn&&he.createElement(ai,{prefixCls:bt,columnsKey:Ii,onColumnResize:wn}),si))}ki.displayName="Body";var Ci=ue(ki),Ki=["expandable"],ir="RC_TABLE_INTERNAL_COL_DEFINE";function sr(jt){var Ut=jt.expandable,cn=(0,kt.Z)(jt,Ki),ht;return"expandable"in jt?ht=(0,Xe.Z)((0,Xe.Z)({},cn),Ut):ht=cn,ht.showExpandColumn===!1&&(ht.expandIconColumnIndex=-1),ht}var Ji=["columnType"];function Fr(jt){for(var Ut=jt.colWidths,cn=jt.columns,ht=jt.columCount,bt=[],Et=ht||cn.length,wn=!1,fn=Et-1;fn>=0;fn-=1){var an=Ut[fn],Sn=cn&&cn[fn],xn=Sn&&Sn[ir];if(an||xn||wn){var Cn=xn||{},zn=Cn.columnType,ii=(0,kt.Z)(Cn,Ji);bt.unshift(he.createElement("col",(0,le.Z)({key:fn,style:{width:an}},ii))),wn=!0}}return he.createElement("colgroup",null,bt)}var Mr=Fr,vi=Ee(80702),wr=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Tr(jt,Ut){return(0,he.useMemo)(function(){for(var cn=[],ht=0;ht<Ut;ht+=1){var bt=jt[ht];if(bt!==void 0)cn[ht]=bt;else return null}return cn},[jt.join("_"),Ut])}var it=he.forwardRef(function(jt,Ut){var cn=jt.className,ht=jt.noData,bt=jt.columns,Et=jt.flattenColumns,wn=jt.colWidths,fn=jt.columCount,an=jt.stickyOffsets,Sn=jt.direction,xn=jt.fixHeader,Cn=jt.stickyTopOffset,zn=jt.stickyBottomOffset,ii=jt.stickyClassName,Zn=jt.onScroll,wi=jt.maxContentScroll,Kn=jt.children,gi=(0,kt.Z)(jt,wr),si=ge(Pe,["prefixCls","scrollbarSize","isSticky"]),Ii=si.prefixCls,Oi=si.scrollbarSize,Ui=si.isSticky,Ai=Ui&&!xn?0:Oi,Ni=he.useRef(null),ar=he.useCallback(function(Xi){(0,ve.mH)(Ut,Xi),(0,ve.mH)(Ni,Xi)},[]);he.useEffect(function(){var Xi;function Pi(Gi){var vr=Gi,er=vr.currentTarget,So=vr.deltaX;So&&(Zn({currentTarget:er,scrollLeft:er.scrollLeft+So}),Gi.preventDefault())}return(Xi=Ni.current)===null||Xi===void 0||Xi.addEventListener("wheel",Pi),function(){var Gi;(Gi=Ni.current)===null||Gi===void 0||Gi.removeEventListener("wheel",Pi)}},[]);var ti=he.useMemo(function(){return Et.every(function(Xi){return Xi.width})},[Et]),ji=Et[Et.length-1],Li={fixed:ji?ji.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Ii,"-cell-scrollbar")}}},bi=(0,he.useMemo)(function(){return Ai?[].concat((0,vi.Z)(bt),[Li]):bt},[Ai,bt]),Yi=(0,he.useMemo)(function(){return Ai?[].concat((0,vi.Z)(Et),[Li]):Et},[Ai,Et]),pi=(0,he.useMemo)(function(){var Xi=an.right,Pi=an.left;return(0,Xe.Z)((0,Xe.Z)({},an),{},{left:Sn==="rtl"?[].concat((0,vi.Z)(Pi.map(function(Gi){return Gi+Ai})),[0]):Pi,right:Sn==="rtl"?Xi:[].concat((0,vi.Z)(Xi.map(function(Gi){return Gi+Ai})),[0]),isSticky:Ui})},[Ai,an,Ui]),lr=Tr(wn,fn);return he.createElement("div",{style:(0,Xe.Z)({overflow:"hidden"},Ui?{top:Cn,bottom:zn}:{}),ref:ar,className:at()(cn,(0,Ge.Z)({},ii,!!ii))},he.createElement("table",{style:{tableLayout:"fixed",visibility:ht||lr?null:"hidden"}},(!ht||!wi||ti)&&he.createElement(Mr,{colWidths:lr?[].concat((0,vi.Z)(lr),[Ai]):[],columCount:fn+1,columns:Yi}),Kn((0,Xe.Z)((0,Xe.Z)({},gi),{},{stickyOffsets:pi,columns:bi,flattenColumns:Yi}))))});it.displayName="FixedHolder";var Rr=he.memo(it);function Or(jt){var Ut=jt.cells,cn=jt.stickyOffsets,ht=jt.flattenColumns,bt=jt.rowComponent,Et=jt.cellComponent,wn=jt.tdCellComponent,fn=jt.onHeaderRow,an=jt.index,Sn=ge(Pe,["prefixCls","direction"]),xn=Sn.prefixCls,Cn=Sn.direction,zn;fn&&(zn=fn(Ut.map(function(Zn){return Zn.column}),an));var ii=ut(Ut.map(function(Zn){return Zn.column}));return he.createElement(bt,zn,Ut.map(function(Zn,wi){var Kn=Zn.column,gi=Wt(Zn.colStart,Zn.colEnd,ht,cn,Cn,Kn),si;return Kn&&Kn.onHeaderCell&&(si=Zn.column.onHeaderCell(Kn)),he.createElement(bn,(0,le.Z)({},Zn,{scope:Kn.title?Zn.colSpan>1?"colgroup":"col":null,ellipsis:Kn.ellipsis,align:Kn.align,component:Kn.title?Et:wn,prefixCls:xn,key:ii[wi]},gi,{additionalProps:si,rowType:"header"}))}))}Or.displayName="HeaderRow";var Ur=Or;function uo(jt){var Ut=[];function cn(wn,fn){var an=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ut[an]=Ut[an]||[];var Sn=fn,xn=wn.filter(Boolean).map(function(Cn){var zn={key:Cn.key,className:Cn.className||"",children:Cn.title,column:Cn,colStart:Sn},ii=1,Zn=Cn.children;return Zn&&Zn.length>0&&(ii=cn(Zn,Sn,an+1).reduce(function(wi,Kn){return wi+Kn},0),zn.hasSubColumns=!0),"colSpan"in Cn&&(ii=Cn.colSpan),"rowSpan"in Cn&&(zn.rowSpan=Cn.rowSpan),zn.colSpan=ii,zn.colEnd=zn.colStart+ii-1,Ut[an].push(zn),Sn+=ii,ii});return xn}cn(jt,0);for(var ht=Ut.length,bt=function(fn){Ut[fn].forEach(function(an){!("rowSpan"in an)&&!an.hasSubColumns&&(an.rowSpan=ht-fn)})},Et=0;Et<ht;Et+=1)bt(Et);return Ut}function po(jt){var Ut=jt.stickyOffsets,cn=jt.columns,ht=jt.flattenColumns,bt=jt.onHeaderRow,Et=ge(Pe,["prefixCls","getComponent"]),wn=Et.prefixCls,fn=Et.getComponent,an=he.useMemo(function(){return uo(cn)},[cn]),Sn=fn(["header","wrapper"],"thead"),xn=fn(["header","row"],"tr"),Cn=fn(["header","cell"],"th"),zn=fn(["header","cell"],"td");return he.createElement(Sn,{className:"".concat(wn,"-thead")},an.map(function(ii,Zn){var wi=he.createElement(Ur,{key:Zn,flattenColumns:ht,cells:ii,stickyOffsets:Ut,rowComponent:xn,cellComponent:Cn,tdCellComponent:zn,onHeaderRow:bt,index:Zn});return wi}))}var io=ue(po),Do=Ee(11592);function Xn(jt){var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof Ut=="number"?Ut:Ut.endsWith("%")?jt*parseFloat(Ut)/100:null}function Ke(jt,Ut){return he.useMemo(function(){if(Ut&&Ut>0){var cn=0,ht=0;jt.forEach(function(Sn){var xn=Xn(Ut,Sn.width);xn?cn+=xn:ht+=1});var bt=Ut-cn,Et=ht,wn=bt/ht,fn=0,an=jt.map(function(Sn){var xn=(0,Xe.Z)({},Sn),Cn=Xn(Ut,xn.width);if(Cn)xn.width=Cn;else{var zn=Math.floor(wn);xn.width=Et===1?bt:zn,bt-=zn,Et-=1}return fn+=xn.width,xn});return[an,fn]}return[jt,Ut]},[jt,Ut])}var qe=["children"],Ye=["fixed"];function St(jt){return(0,Do.Z)(jt).filter(function(Ut){return he.isValidElement(Ut)}).map(function(Ut){var cn=Ut.key,ht=Ut.props,bt=ht.children,Et=(0,kt.Z)(ht,qe),wn=(0,Xe.Z)({key:cn},Et);return bt&&(wn.children=St(bt)),wn})}function Ot(jt){var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return jt.filter(function(cn){return cn&&(0,Ze.Z)(cn)==="object"}).reduce(function(cn,ht,bt){var Et=ht.fixed,wn=Et===!0?"left":Et,fn="".concat(Ut,"-").concat(bt),an=ht.children;return an&&an.length>0?[].concat((0,vi.Z)(cn),(0,vi.Z)(Ot(an,fn).map(function(Sn){return(0,Xe.Z)({fixed:wn},Sn)}))):[].concat((0,vi.Z)(cn),[(0,Xe.Z)((0,Xe.Z)({key:fn},ht),{},{fixed:wn})])},[])}function Tt(jt){for(var Ut=!0,cn=0;cn<jt.length;cn+=1){var ht=jt[cn];if(Ut&&ht.fixed!=="left")Ut=!1;else if(!Ut&&ht.fixed==="left"){warning(!1,"Index ".concat(cn-1," of `columns` missing `fixed='left'` prop."));break}}for(var bt=!0,Et=jt.length-1;Et>=0;Et-=1){var wn=jt[Et];if(bt&&wn.fixed!=="right")bt=!1;else if(!bt&&wn.fixed==="right"){warning(!1,"Index ".concat(Et+1," of `columns` missing `fixed='right'` prop."));break}}}function _t(jt){return jt.map(function(Ut){var cn=Ut.fixed,ht=(0,kt.Z)(Ut,Ye),bt=cn;return cn==="left"?bt="right":cn==="right"&&(bt="left"),(0,Xe.Z)({fixed:bt},ht)})}function dn(jt,Ut){var cn=jt.prefixCls,ht=jt.columns,bt=jt.children,Et=jt.expandable,wn=jt.expandedKeys,fn=jt.columnTitle,an=jt.getRowKey,Sn=jt.onTriggerExpand,xn=jt.expandIcon,Cn=jt.rowExpandable,zn=jt.expandIconColumnIndex,ii=jt.direction,Zn=jt.expandRowByClick,wi=jt.columnWidth,Kn=jt.fixed,gi=jt.scrollWidth,si=he.useMemo(function(){return ht||St(bt)},[ht,bt]),Ii=he.useMemo(function(){if(Et){var ji,Li=si.slice();if(!Li.includes(Me)){var bi=zn||0;bi>=0&&Li.splice(bi,0,Me)}var Yi=Li.indexOf(Me);Li=Li.filter(function(Pi,Gi){return Pi!==Me||Gi===Yi});var pi=si[Yi],lr;(Kn==="left"||Kn)&&!zn?lr="left":(Kn==="right"||Kn)&&zn===si.length?lr="right":lr=pi?pi.fixed:null;var Xi=(ji={},(0,Ge.Z)(ji,ir,{className:"".concat(cn,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,Ge.Z)(ji,"title",fn),(0,Ge.Z)(ji,"fixed",lr),(0,Ge.Z)(ji,"className","".concat(cn,"-row-expand-icon-cell")),(0,Ge.Z)(ji,"width",wi),(0,Ge.Z)(ji,"render",function(Gi,vr,er){var So=an(vr,er),Co=wn.has(So),is=Cn?Cn(vr):!0,so=xn({prefixCls:cn,expanded:Co,expandable:is,record:vr,onExpand:Sn});return Zn?he.createElement("span",{onClick:function(No){return No.stopPropagation()}},so):so}),ji);return Li.map(function(Pi){return Pi===Me?Xi:Pi})}return si.filter(function(Pi){return Pi!==Me})},[Et,si,an,wn,xn,ii]),Oi=he.useMemo(function(){var ji=Ii;return Ut&&(ji=Ut(ji)),ji.length||(ji=[{render:function(){return null}}]),ji},[Ut,Ii,ii]),Ui=he.useMemo(function(){return ii==="rtl"?_t(Ot(Oi)):Ot(Oi)},[Oi,ii,gi]),Ai=Ke(Ui,gi),Ni=(0,Be.Z)(Ai,2),ar=Ni[0],ti=Ni[1];return[Oi,ar,ti]}var Pn=dn;function mn(jt){var Ut,cn=jt.prefixCls,ht=jt.record,bt=jt.onExpand,Et=jt.expanded,wn=jt.expandable,fn="".concat(cn,"-row-expand-icon");if(!wn)return he.createElement("span",{className:at()(fn,"".concat(cn,"-row-spaced"))});var an=function(xn){bt(ht,xn),xn.stopPropagation()};return he.createElement("span",{className:at()(fn,(Ut={},(0,Ge.Z)(Ut,"".concat(cn,"-row-expanded"),Et),(0,Ge.Z)(Ut,"".concat(cn,"-row-collapsed"),!Et),Ut)),onClick:an})}function on(jt,Ut,cn){var ht=[];function bt(Et){(Et||[]).forEach(function(wn,fn){ht.push(Ut(wn,fn)),bt(wn[cn])})}return bt(jt),ht}function Nt(jt,Ut,cn){var ht=sr(jt),bt=ht.expandIcon,Et=ht.expandedRowKeys,wn=ht.defaultExpandedRowKeys,fn=ht.defaultExpandAllRows,an=ht.expandedRowRender,Sn=ht.onExpand,xn=ht.onExpandedRowsChange,Cn=ht.childrenColumnName,zn=bt||mn,ii=Cn||"children",Zn=he.useMemo(function(){return an?"row":jt.expandable&&jt.internalHooks===me&&jt.expandable.__PARENT_RENDER_ICON__||Ut.some(function(Ui){return Ui&&(0,Ze.Z)(Ui)==="object"&&Ui[ii]})?"nest":!1},[!!an,Ut]),wi=he.useState(function(){return wn||(fn?on(Ut,cn,ii):[])}),Kn=(0,Be.Z)(wi,2),gi=Kn[0],si=Kn[1],Ii=he.useMemo(function(){return new Set(Et||gi||[])},[Et,gi]),Oi=he.useCallback(function(Ui){var Ai=cn(Ui,Ut.indexOf(Ui)),Ni,ar=Ii.has(Ai);ar?(Ii.delete(Ai),Ni=(0,vi.Z)(Ii)):Ni=[].concat((0,vi.Z)(Ii),[Ai]),si(Ni),Sn&&Sn(!ar,Ui),xn&&xn(Ni)},[cn,Ii,Ut,Sn,xn]);return[ht,Zn,Ii,zn,ii,Oi]}function un(jt,Ut,cn,ht){var bt=jt.map(function(Et,wn){return Wt(wn,wn,jt,Ut,cn,ht==null?void 0:ht[wn])});return(0,Ct.Z)(function(){return bt},[bt],function(Et,wn){return!(0,Le.Z)(Et,wn)})}function Mn(jt){var Ut=(0,he.useRef)(jt),cn=(0,he.useState)({}),ht=(0,Be.Z)(cn,2),bt=ht[1],Et=(0,he.useRef)(null),wn=(0,he.useRef)([]);function fn(an){wn.current.push(an);var Sn=Promise.resolve();Et.current=Sn,Sn.then(function(){if(Et.current===Sn){var xn=wn.current,Cn=Ut.current;wn.current=[],xn.forEach(function(zn){Ut.current=zn(Ut.current)}),Et.current=null,Cn!==Ut.current&&bt({})}})}return(0,he.useEffect)(function(){return function(){Et.current=null}},[]),[Ut.current,fn]}function Dn(jt){var Ut=(0,he.useRef)(jt||null),cn=(0,he.useRef)();function ht(){window.clearTimeout(cn.current)}function bt(wn){Ut.current=wn,ht(),cn.current=window.setTimeout(function(){Ut.current=null,cn.current=void 0},100)}function Et(){return Ut.current}return(0,he.useEffect)(function(){return ht},[]),[bt,Et]}function nn(){var jt=he.useState(-1),Ut=(0,Be.Z)(jt,2),cn=Ut[0],ht=Ut[1],bt=he.useState(-1),Et=(0,Be.Z)(bt,2),wn=Et[0],fn=Et[1],an=he.useCallback(function(Sn,xn){ht(Sn),fn(xn)},[]);return[cn,wn,an]}var sn=Ee(47273),Nn=(0,sn.Z)()?window:null;function On(jt,Ut){var cn=(0,Ze.Z)(jt)==="object"?jt:{},ht=cn.offsetHeader,bt=ht===void 0?0:ht,Et=cn.offsetSummary,wn=Et===void 0?0:Et,fn=cn.offsetScroll,an=fn===void 0?0:fn,Sn=cn.getContainer,xn=Sn===void 0?function(){return Nn}:Sn,Cn=xn()||Nn;return he.useMemo(function(){var zn=!!jt;return{isSticky:zn,stickyClassName:zn?"".concat(Ut,"-sticky-holder"):"",offsetHeader:bt,offsetSummary:wn,offsetScroll:an,container:Cn}},[an,bt,wn,Ut,Cn])}function qn(jt,Ut,cn){var ht=(0,he.useMemo)(function(){for(var bt=[],Et=[],wn=0,fn=0,an=0;an<Ut;an+=1)if(cn==="rtl"){Et[an]=fn,fn+=jt[an]||0;var Sn=Ut-an-1;bt[Sn]=wn,wn+=jt[Sn]||0}else{bt[an]=wn,wn+=jt[an]||0;var xn=Ut-an-1;Et[xn]=fn,fn+=jt[xn]||0}return{left:bt,right:Et}},[jt,Ut,cn]);return ht}var Hn=qn;function ei(jt){var Ut=jt.className,cn=jt.children;return he.createElement("div",{className:Ut},cn)}var Fn=ei,hi=Ee(8224),Di=Ee(55468),Ri=function(Ut,cn){var ht,bt,Et=Ut.scrollBodyRef,wn=Ut.onScroll,fn=Ut.offsetScroll,an=Ut.container,Sn=ge(Pe,"prefixCls"),xn=((ht=Et.current)===null||ht===void 0?void 0:ht.scrollWidth)||0,Cn=((bt=Et.current)===null||bt===void 0?void 0:bt.clientWidth)||0,zn=xn&&Cn*(Cn/xn),ii=he.useRef(),Zn=Mn({scrollLeft:0,isHiddenScrollBar:!1}),wi=(0,Be.Z)(Zn,2),Kn=wi[0],gi=wi[1],si=he.useRef({delta:0,x:0}),Ii=he.useState(!1),Oi=(0,Be.Z)(Ii,2),Ui=Oi[0],Ai=Oi[1],Ni=function(){Ai(!1)},ar=function(Yi){Yi.persist(),si.current.delta=Yi.pageX-Kn.scrollLeft,si.current.x=0,Ai(!0),Yi.preventDefault()},ti=function(Yi){var pi,lr=Yi||((pi=window)===null||pi===void 0?void 0:pi.event),Xi=lr.buttons;if(!Ui||Xi===0){Ui&&Ai(!1);return}var Pi=si.current.x+Yi.pageX-si.current.x-si.current.delta;Pi<=0&&(Pi=0),Pi+zn>=Cn&&(Pi=Cn-zn),wn({scrollLeft:Pi/Cn*(xn+2)}),si.current.x=Yi.pageX},ji=function(){if(Et.current){var Yi=(0,Di.os)(Et.current).top,pi=Yi+Et.current.offsetHeight,lr=an===window?document.documentElement.scrollTop+window.innerHeight:(0,Di.os)(an).top+an.clientHeight;pi-(0,$e.Z)()<=lr||Yi>=lr-fn?gi(function(Xi){return(0,Xe.Z)((0,Xe.Z)({},Xi),{},{isHiddenScrollBar:!0})}):gi(function(Xi){return(0,Xe.Z)((0,Xe.Z)({},Xi),{},{isHiddenScrollBar:!1})})}},Li=function(Yi){gi(function(pi){return(0,Xe.Z)((0,Xe.Z)({},pi),{},{scrollLeft:Yi/xn*Cn||0})})};return he.useImperativeHandle(cn,function(){return{setScrollLeft:Li}}),he.useEffect(function(){var bi=(0,hi.Z)(document.body,"mouseup",Ni,!1),Yi=(0,hi.Z)(document.body,"mousemove",ti,!1);return ji(),function(){bi.remove(),Yi.remove()}},[zn,Ui]),he.useEffect(function(){var bi=(0,hi.Z)(an,"scroll",ji,!1),Yi=(0,hi.Z)(window,"resize",ji,!1);return function(){bi.remove(),Yi.remove()}},[an]),he.useEffect(function(){Kn.isHiddenScrollBar||gi(function(bi){var Yi=Et.current;return Yi?(0,Xe.Z)((0,Xe.Z)({},bi),{},{scrollLeft:Yi.scrollLeft/Yi.scrollWidth*Yi.clientWidth}):bi})},[Kn.isHiddenScrollBar]),xn<=Cn||!zn||Kn.isHiddenScrollBar?null:he.createElement("div",{style:{height:(0,$e.Z)(),width:Cn,bottom:fn},className:"".concat(Sn,"-sticky-scroll")},he.createElement("div",{onMouseDown:ar,ref:ii,className:at()("".concat(Sn,"-sticky-scroll-bar"),(0,Ge.Z)({},"".concat(Sn,"-sticky-scroll-bar-active"),Ui)),style:{width:"".concat(zn,"px"),transform:"translate3d(".concat(Kn.scrollLeft,"px, 0, 0)")}}))},En=he.forwardRef(Ri);function $i(jt){return null}var Cr=$i;function mr(jt){return null}var Ln=mr,Jn="rc-table",ui=[],Si={};function di(){return"No Data"}function Ei(jt){var Ut,cn=(0,Xe.Z)({rowKey:"key",prefixCls:Jn,emptyText:di},jt),ht=cn.prefixCls,bt=cn.className,Et=cn.rowClassName,wn=cn.style,fn=cn.data,an=cn.rowKey,Sn=cn.scroll,xn=cn.tableLayout,Cn=cn.direction,zn=cn.title,ii=cn.footer,Zn=cn.summary,wi=cn.caption,Kn=cn.id,gi=cn.showHeader,si=cn.components,Ii=cn.emptyText,Oi=cn.onRow,Ui=cn.onHeaderRow,Ai=cn.internalHooks,Ni=cn.transformColumns,ar=cn.internalRefs,ti=cn.tailor,ji=cn.sticky,Li=fn||ui,bi=!!Li.length,Yi=Ai===me,pi=he.useCallback(function(fs,Ys){return(0,et.Z)(si,fs)||Ys},[si]),lr=he.useMemo(function(){return typeof an=="function"?an:function(fs){var Ys=fs&&fs[an];return Ys}},[an]),Xi=pi(["body"]),Pi=nn(),Gi=(0,Be.Z)(Pi,3),vr=Gi[0],er=Gi[1],So=Gi[2],Co=Nt(cn,Li,lr),is=(0,Be.Z)(Co,6),so=is[0],kr=is[1],No=is[2],Nr=is[3],Xr=is[4],rs=is[5],Zr=Sn==null?void 0:Sn.x,Er=he.useState(0),Jr=(0,Be.Z)(Er,2),br=Jr[0],ao=Jr[1],Lr=Pn((0,Xe.Z)((0,Xe.Z)((0,Xe.Z)({},cn),so),{},{expandable:!!so.expandedRowRender,columnTitle:so.columnTitle,expandedKeys:No,getRowKey:lr,onTriggerExpand:rs,expandIcon:Nr,expandIconColumnIndex:so.expandIconColumnIndex,direction:Cn,scrollWidth:Yi&&ti&&typeof Zr=="number"?Zr:null}),Yi?Ni:null),ho=(0,Be.Z)(Lr,3),Zo=ho[0],Ko=ho[1],Qr=ho[2],Io=Qr!=null?Qr:Zr,Cs=he.useMemo(function(){return{columns:Zo,flattenColumns:Ko}},[Zo,Ko]),Lo=he.useRef(),Jo=he.useRef(),Ss=he.useRef(),Js=he.useRef(),Pl=he.useRef(),Qo=he.useState(!1),qo=(0,Be.Z)(Qo,2),xs=qo[0],Ts=qo[1],ma=he.useState(!1),jo=(0,Be.Z)(ma,2),As=jo[0],La=jo[1],_l=Mn(new Map),Xl=(0,Be.Z)(_l,2),jl=Xl[0],cu=Xl[1],hu=ut(Ko),Jl=hu.map(function(fs){return jl.get(fs)}),gs=he.useMemo(function(){return Jl},[Jl.join("_")]),Ra=Hn(gs,Ko.length,Cn),oa=Sn&&mt(Sn.y),Ns=Sn&&mt(Io)||!!so.fixed,Ql=Ns&&Ko.some(function(fs){var Ys=fs.fixed;return Ys}),_c=he.useRef(),du=On(ji,ht),Zu=du.isSticky,sc=du.offsetHeader,zl=du.offsetSummary,ls=du.offsetScroll,js=du.stickyClassName,wa=du.container,zs=he.useMemo(function(){return Zn==null?void 0:Zn(Li)},[Zn,Li]),os=(oa||Zu)&&he.isValidElement(zs)&&zs.type===vt&&zs.props.fixed,Ma,El,Nu;oa&&(El={overflowY:"scroll",maxHeight:Sn.y}),Ns&&(Ma={overflowX:"auto"},oa||(El={overflowY:"hidden"}),Nu={width:Io===!0?"auto":Io,minWidth:"100%"});var mf=he.useCallback(function(fs,Ys){(0,be.Z)(Lo.current)&&cu(function(Va){if(Va.get(fs)!==Ys){var fu=new Map(Va);return fu.set(fs,Ys),fu}return Va})},[]),vn=Dn(null),Bc=(0,Be.Z)(vn,2),ac=Bc[0],vf=Bc[1];function Ph(fs,Ys){Ys&&(typeof Ys=="function"?Ys(fs):Ys.scrollLeft!==fs&&(Ys.scrollLeft=fs,Ys.scrollLeft!==fs&&setTimeout(function(){Ys.scrollLeft=fs},0)))}var oh=(0,ke.Z)(function(fs){var Ys=fs.currentTarget,Va=fs.scrollLeft,fu=Cn==="rtl",pu=typeof Va=="number"?Va:Ys.scrollLeft,Wd=Ys||Si;if(!vf()||vf()===Wd){var zc;ac(Wd),Ph(pu,Jo.current),Ph(pu,Ss.current),Ph(pu,Pl.current),Ph(pu,(zc=_c.current)===null||zc===void 0?void 0:zc.setScrollLeft)}var rd=Ys||Jo.current;if(rd){var Ou=rd.scrollWidth,Ec=rd.clientWidth;if(Ou===Ec){Ts(!1),La(!1);return}fu?(Ts(-pu<Ou-Ec),La(-pu>0)):(Ts(pu>0),La(pu<Ou-Ec))}}),Rd=function(){Ns&&Ss.current?oh({currentTarget:Ss.current}):(Ts(!1),La(!1))},Kp=function(Ys){var Va=Ys.width;Va!==br&&(Rd(),ao(Lo.current?Lo.current.offsetWidth:Va))},Ba=he.useRef(!1);he.useEffect(function(){Ba.current&&Rd()},[Ns,fn,Zo.length]),he.useEffect(function(){Ba.current=!0},[]);var nd=he.useState(0),Bd=(0,Be.Z)(nd,2),id=Bd[0],yf=Bd[1],Yf=he.useState(!0),Sf=(0,Be.Z)(Yf,2),Fd=Sf[0],ql=Sf[1];he.useEffect(function(){(!ti||!Yi)&&(Ss.current instanceof Element?yf((0,$e.o)(Ss.current).width):yf((0,$e.o)(Js.current).width)),ql((0,Ne.G)("position","sticky"))},[]),he.useEffect(function(){Yi&&ar&&(ar.body.current=Ss.current)});var _h=he.useCallback(function(fs){return he.createElement(he.Fragment,null,he.createElement(io,fs),os==="top"&&he.createElement(He,fs,zs))},[os,zs]),xf=he.useCallback(function(fs){return he.createElement(He,fs,zs)},[zs]),Ku=pi(["table"],"table"),Fc=he.useMemo(function(){return xn||(Ql?Io==="max-content"?"auto":"fixed":oa||Zu||Ko.some(function(fs){var Ys=fs.ellipsis;return Ys})?"fixed":"auto")},[oa,Ql,Ko,xn,Zu]),Eh,sh={colWidths:gs,columCount:Ko.length,stickyOffsets:Ra,onHeaderRow:Ui,fixHeader:oa,scroll:Sn},Ll=he.useMemo(function(){return bi?null:typeof Ii=="function"?Ii():Ii},[bi,Ii]),jd=he.createElement(Ci,{data:Li,measureColumnWidth:oa||Ns||Zu}),zd=he.createElement(Mr,{colWidths:Ko.map(function(fs){var Ys=fs.width;return Ys}),columns:Ko}),eu=wi!=null?he.createElement("caption",{className:"".concat(ht,"-caption")},wi):void 0,Lh=(0,dt.Z)(cn,{data:!0}),Hd=(0,dt.Z)(cn,{aria:!0});if(oa||Zu){var Ud;typeof Xi=="function"?(Ud=Xi(Li,{scrollbarSize:id,ref:Ss,onScroll:oh}),sh.colWidths=Ko.map(function(fs,Ys){var Va=fs.width,fu=Ys===Ko.length-1?Va-id:Va;return typeof fu=="number"&&!Number.isNaN(fu)?fu:0})):Ud=he.createElement("div",{style:(0,Xe.Z)((0,Xe.Z)({},Ma),El),onScroll:oh,ref:Ss,className:at()("".concat(ht,"-body"))},he.createElement(Ku,(0,le.Z)({style:(0,Xe.Z)((0,Xe.Z)({},Nu),{},{tableLayout:Fc})},Hd),eu,zd,jd,!os&&zs&&he.createElement(He,{stickyOffsets:Ra,flattenColumns:Ko,columns:Zo},zs)));var jc=(0,Xe.Z)((0,Xe.Z)((0,Xe.Z)({noData:!Li.length,maxContentScroll:Ns&&Io==="max-content"},sh),Cs),{},{direction:Cn,stickyClassName:js,onScroll:oh});Eh=he.createElement(he.Fragment,null,gi!==!1&&he.createElement(Rr,(0,le.Z)({},jc,{stickyTopOffset:sc,className:"".concat(ht,"-header"),ref:Jo}),_h),Ud,os&&os!=="top"&&he.createElement(Rr,(0,le.Z)({},jc,{stickyBottomOffset:zl,className:"".concat(ht,"-summary"),ref:Pl}),xf),Zu&&he.createElement(En,{ref:_c,offsetScroll:ls,scrollBodyRef:Ss,onScroll:oh,container:wa}))}else Eh=he.createElement("div",{style:(0,Xe.Z)((0,Xe.Z)({},Ma),El),className:at()("".concat(ht,"-content")),onScroll:oh,ref:Ss},he.createElement(Ku,(0,le.Z)({style:(0,Xe.Z)((0,Xe.Z)({},Nu),{},{tableLayout:Fc})},Hd),eu,zd,gi!==!1&&he.createElement(io,(0,le.Z)({},sh,Cs)),jd,zs&&he.createElement(He,{stickyOffsets:Ra,flattenColumns:Ko,columns:Zo},zs)));var fl=he.createElement("div",(0,le.Z)({className:at()(ht,bt,(Ut={},(0,Ge.Z)(Ut,"".concat(ht,"-rtl"),Cn==="rtl"),(0,Ge.Z)(Ut,"".concat(ht,"-ping-left"),xs),(0,Ge.Z)(Ut,"".concat(ht,"-ping-right"),As),(0,Ge.Z)(Ut,"".concat(ht,"-layout-fixed"),xn==="fixed"),(0,Ge.Z)(Ut,"".concat(ht,"-fixed-header"),oa),(0,Ge.Z)(Ut,"".concat(ht,"-fixed-column"),Ql),(0,Ge.Z)(Ut,"".concat(ht,"-scroll-horizontal"),Ns),(0,Ge.Z)(Ut,"".concat(ht,"-has-fix-left"),Ko[0]&&Ko[0].fixed),(0,Ge.Z)(Ut,"".concat(ht,"-has-fix-right"),Ko[Ko.length-1]&&Ko[Ko.length-1].fixed==="right"),Ut)),style:wn,id:Kn,ref:Lo},Lh),zn&&he.createElement(Fn,{className:"".concat(ht,"-title")},zn(Li)),he.createElement("div",{ref:Js,className:"".concat(ht,"-container")},Eh),ii&&he.createElement(Fn,{className:"".concat(ht,"-footer")},ii(Li)));Ns&&(fl=he.createElement(Oe.Z,{onResize:Kp},fl));var Gd=un(Ko,Ra,Cn,Zo),ba=he.useMemo(function(){return{scrollX:Io,prefixCls:ht,getComponent:pi,scrollbarSize:id,direction:Cn,fixedInfoList:Gd,isSticky:Zu,supportSticky:Fd,componentWidth:br,fixHeader:oa,fixColumn:Ql,horizonScroll:Ns,tableLayout:Fc,rowClassName:Et,expandedRowClassName:so.expandedRowClassName,expandIcon:Nr,expandableType:kr,expandRowByClick:so.expandRowByClick,expandedRowRender:so.expandedRowRender,onTriggerExpand:rs,expandIconColumnIndex:so.expandIconColumnIndex,indentSize:so.indentSize,allColumnsFixedLeft:Ko.every(function(fs){return fs.fixed==="left"}),emptyNode:Ll,columns:Zo,flattenColumns:Ko,onColumnResize:mf,hoverStartRow:vr,hoverEndRow:er,onHover:So,rowExpandable:so.rowExpandable,onRow:Oi,getRowKey:lr,expandedKeys:No,childrenColumnName:Xr}},[Io,ht,pi,id,Cn,Gd,Zu,Fd,br,oa,Ql,Ns,Fc,Et,so.expandedRowClassName,Nr,kr,so.expandRowByClick,so.expandedRowRender,rs,so.expandIconColumnIndex,so.indentSize,Ll,Zo,Ko,mf,vr,er,So,so.rowExpandable,Oi,lr,No,Xr]);return he.createElement(Pe.Provider,{value:ba},fl)}function qi(jt){return se(Ei,jt)}var Fi=qi();Fi.EXPAND_COLUMN=Me,Fi.INTERNAL_HOOKS=me,Fi.Column=Cr,Fi.ColumnGroup=Ln,Fi.Summary=Ie;var zi=Fi,fr=Ee(45680),Bn=xe(null),Br=xe(null);function In(jt,Ut,cn){var ht=Ut||1;return cn[jt+ht]-(cn[jt]||0)}function pr(jt){var Ut=jt.rowInfo,cn=jt.column,ht=jt.colIndex,bt=jt.indent,Et=jt.index,wn=jt.renderIndex,fn=jt.record,an=jt.style,Sn=jt.className,xn=jt.inverse,Cn=jt.getHeight,zn=cn.render,ii=cn.dataIndex,Zn=cn.className,wi=cn.width,Kn=ge(Br,["columnsOffset"]),gi=Kn.columnsOffset,si=gn(Ut,cn,ht,bt,Et),Ii=si.key,Oi=si.fixedInfo,Ui=si.appendCellNode,Ai=si.additionalCellProps,Ni=Ai.style,ar=Ai.colSpan,ti=ar===void 0?1:ar,ji=Ai.rowSpan,Li=ji===void 0?1:ji,bi=ht-1,Yi=In(bi,ti,gi),pi=ti>1?wi-Yi:0,lr=(0,Xe.Z)((0,Xe.Z)((0,Xe.Z)({},Ni),an),{},{flex:"0 0 ".concat(Yi,"px"),width:"".concat(Yi,"px"),marginRight:pi,pointerEvents:"auto"}),Xi=he.useMemo(function(){return xn?Li<=1:ti===0||Li===0||Li>1},[Li,ti,xn]);Xi?lr.visibility="hidden":xn&&(lr.height=Cn==null?void 0:Cn(Li));var Pi=Xi?function(){return null}:zn,Gi={};return(Li===0||ti===0)&&(Gi.rowSpan=1,Gi.colSpan=1),he.createElement(bn,(0,le.Z)({className:at()(Zn,Sn),ellipsis:cn.ellipsis,align:cn.align,scope:cn.rowScope,component:"div",prefixCls:Ut.prefixCls,key:Ii,record:fn,index:Et,renderIndex:wn,dataIndex:ii,render:Pi,shouldCellUpdate:cn.shouldCellUpdate},Oi,{appendNode:Ui,additionalProps:(0,Xe.Z)((0,Xe.Z)({},Ai),{},{style:lr},Gi)}))}var yo=pr,Ir=["data","index","className","rowKey","style","extra","getHeight"],bo=he.forwardRef(function(jt,Ut){var cn=jt.data,ht=jt.index,bt=jt.className,Et=jt.rowKey,wn=jt.style,fn=jt.extra,an=jt.getHeight,Sn=(0,kt.Z)(jt,Ir),xn=cn.record,Cn=cn.indent,zn=cn.index,ii=ge(Pe,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Zn=ii.scrollX,wi=ii.flattenColumns,Kn=ii.prefixCls,gi=ii.fixColumn,si=ii.componentWidth,Ii=ln(xn,Et,ht,Cn),Oi=Ii.rowSupportExpand,Ui=Ii.expanded,Ai=Ii.rowProps,Ni=Ii.expandedRowRender,ar=Ii.expandedRowClassName,ti;if(Oi&&Ui){var ji=Ni(xn,ht,Cn+1,Ui),Li=ar==null?void 0:ar(xn,ht,Cn),bi={};gi&&(bi={style:(0,Ge.Z)({},"--virtual-width","".concat(si,"px"))});var Yi="".concat(Kn,"-expanded-row-cell");ti=he.createElement("div",{className:at()("".concat(Kn,"-expanded-row"),"".concat(Kn,"-expanded-row-level-").concat(Cn+1),Li)},he.createElement(bn,{component:"div",prefixCls:Kn,className:at()(Yi,(0,Ge.Z)({},"".concat(Yi,"-fixed"),gi)),additionalProps:bi},ji))}var pi=(0,Xe.Z)((0,Xe.Z)({},wn),{},{width:Zn});fn&&(pi.position="absolute",pi.pointerEvents="none");var lr=he.createElement("div",(0,le.Z)({},Ai,Sn,{ref:Oi?null:Ut,className:at()(bt,"".concat(Kn,"-row"),Ai==null?void 0:Ai.className,(0,Ge.Z)({},"".concat(Kn,"-row-extra"),fn)),style:(0,Xe.Z)((0,Xe.Z)({},pi),Ai==null?void 0:Ai.style)}),wi.map(function(Xi,Pi){return he.createElement(yo,{key:Pi,rowInfo:Ii,column:Xi,colIndex:Pi,indent:Cn,index:ht,renderIndex:zn,record:xn,inverse:fn,getHeight:an})}));return Oi?he.createElement("div",{ref:Ut},lr,ti):lr}),co=ue(bo),Vi=co,Hi=he.forwardRef(function(jt,Ut){var cn=jt.data,ht=jt.onScroll,bt=ge(Pe,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),Et=bt.flattenColumns,wn=bt.onColumnResize,fn=bt.getRowKey,an=bt.expandedKeys,Sn=bt.prefixCls,xn=bt.childrenColumnName,Cn=bt.emptyNode,zn=bt.scrollX,ii=ge(Bn),Zn=ii.scrollY,wi=ii.listItemHeight,Kn=he.useRef(),gi=At(cn,xn,an,fn),si=he.useMemo(function(){var ti=0;return Et.map(function(ji){var Li=ji.width,bi=ji.key;return ti+=Li,[bi,Li,ti]})},[Et]),Ii=he.useMemo(function(){return si.map(function(ti){return ti[2]})},[si]);he.useEffect(function(){si.forEach(function(ti){var ji=(0,Be.Z)(ti,2),Li=ji[0],bi=ji[1];wn(Li,bi)})},[si]),he.useImperativeHandle(Ut,function(){var ti={};return Object.defineProperty(ti,"scrollLeft",{get:function(){var Li;return((Li=Kn.current)===null||Li===void 0?void 0:Li.getScrollInfo().x)||0},set:function(Li){var bi;(bi=Kn.current)===null||bi===void 0||bi.scrollTo({left:Li})}}),ti});var Oi=function(ji,Li){var bi,Yi=(bi=gi[Li])===null||bi===void 0?void 0:bi.record,pi=ji.onCell;if(pi){var lr,Xi=pi(Yi,Li);return(lr=Xi==null?void 0:Xi.rowSpan)!==null&&lr!==void 0?lr:1}return 1},Ui=function(ji){var Li=ji.start,bi=ji.end,Yi=ji.getSize,pi=ji.offsetY;if(bi<0)return null;for(var lr=Et.filter(function(Zr){return Oi(Zr,Li)===0}),Xi=Li,Pi=function(Er){if(lr=lr.filter(function(Jr){return Oi(Jr,Er)===0}),!lr.length)return Xi=Er,"break"},Gi=Li;Gi>=0;Gi-=1){var vr=Pi(Gi);if(vr==="break")break}for(var er=Et.filter(function(Zr){return Oi(Zr,bi)!==1}),So=bi,Co=function(Er){if(er=er.filter(function(Jr){return Oi(Jr,Er)!==1}),!er.length)return So=Math.max(Er-1,bi),"break"},is=bi;is<gi.length;is+=1){var so=Co(is);if(so==="break")break}for(var kr=[],No=function(Er){var Jr=gi[Er];if(!Jr)return"continue";Et.some(function(br){return Oi(br,Er)>1})&&kr.push(Er)},Nr=Xi;Nr<=So;Nr+=1)var Xr=No(Nr);var rs=kr.map(function(Zr){var Er=gi[Zr],Jr=fn(Er.record,Zr),br=function(ho){var Zo=Zr+ho-1,Ko=fn(gi[Zo].record,Zo),Qr=Yi(Jr,Ko);return Qr.bottom-Qr.top},ao=Yi(Jr);return he.createElement(Vi,{key:Zr,data:Er,rowKey:Jr,index:Zr,style:{top:-pi+ao.top},extra:!0,getHeight:br})});return rs},Ai=he.useMemo(function(){return{columnsOffset:Ii}},[Ii]),Ni="".concat(Sn,"-tbody"),ar;return gi.length?ar=he.createElement(fr.Z,{fullHeight:!1,ref:Kn,className:at()(Ni,"".concat(Ni,"-virtual")),height:Zn,itemHeight:wi||24,data:gi,itemKey:function(ji){return fn(ji.record)},scrollWidth:zn,onVirtualScroll:function(ji){var Li=ji.x;ht({scrollLeft:Li})},extraRender:Ui},function(ti,ji,Li){var bi=fn(ti.record,ji);return he.createElement(Vi,(0,le.Z)({data:ti,rowKey:bi,index:ji},Li))}):ar=he.createElement("div",{className:at()("".concat(Sn,"-placeholder"))},he.createElement(bn,{component:"div",prefixCls:Sn},Cn)),he.createElement(Br.Provider,{value:Ai},ar)}),ur=ue(Hi),Pr=ur,ci=function(Ut,cn){var ht=cn.ref,bt=cn.onScroll;return he.createElement(Pr,{ref:ht,data:Ut,onScroll:bt})},Mt=100;function Gr(jt){var Ut=jt.columns,cn=jt.scroll,ht=jt.prefixCls,bt=ht===void 0?Jn:ht,Et=jt.className,wn=jt.listItemHeight,fn=cn||{},an=fn.x,Sn=fn.y;typeof an!="number"&&(an=((Ut||[]).length+1)*Mt),typeof Sn!="number"&&(Sn=500);var xn=he.useMemo(function(){return{scrollY:Sn,listItemHeight:wn}},[Sn,wn]);return he.createElement(Bn.Provider,{value:xn},he.createElement(zi,(0,le.Z)({},jt,{className:at()(Et,"".concat(bt,"-virtual")),scroll:(0,Xe.Z)((0,Xe.Z)({},cn),{},{x:an}),components:{body:ci},columns:Ut,internalHooks:me,tailor:!0})))}function Hr(jt){return se(Gr,jt)}var ts=Hr(),ko=null;function ss(jt){return null}var _r=ss;function cr(jt){return null}var Vr=cr,hr=Ee(2738),eo=Ee(68031),Yo=Ee(36355),rr=Ee(93891),Wi=Ee(19716),Qn=Ee(8628),or=Ee(31724),to=Ee(58421),Ro=Ee(71418),Bo=Ee(88088);function Xo(jt){return function(cn){let{prefixCls:ht,onExpand:bt,record:Et,expanded:wn,expandable:fn}=cn;const an=`${ht}-row-expand-icon`;return he.createElement("button",{type:"button",onClick:Sn=>{bt(Et,Sn),Sn.stopPropagation()},className:at()(an,{[`${an}-spaced`]:!fn,[`${an}-expanded`]:fn&&wn,[`${an}-collapsed`]:fn&&!wn}),"aria-label":wn?jt.collapse:jt.expand,"aria-expanded":wn})}}var as=Xo;function Ho(jt,Ut){return"key"in jt&&jt.key!==void 0&&jt.key!==null?jt.key:jt.dataIndex?Array.isArray(jt.dataIndex)?jt.dataIndex.join("."):jt.dataIndex:Ut}function ia(jt,Ut){return Ut?`${Ut}-${jt}`:`${jt}`}function _s(jt,Ut){return typeof jt=="function"?jt(Ut):jt}function la(jt,Ut){const cn=_s(jt,Ut);return Object.prototype.toString.call(cn)==="[object Object]"?"":cn}var kn={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"},Is=kn,Pu=Ee(7657),Ua=function(Ut,cn){return he.createElement(Pu.Z,(0,le.Z)({},Ut,{ref:cn,icon:Is}))},Sa=he.forwardRef(Ua),us=Sa,Ws=Ee(56762);function Po(jt){const Ut=he.useRef(jt),cn=(0,Ws.Z)();return[()=>Ut.current,ht=>{Ut.current=ht,cn()}]}var Ao=Ee(3113),Eo=Ee(24905),ua=Ee(38854),xr=Ee(64165),lo=Ee(20834),Yr=Ee(40875),Mi=Ee(5112),Es=Ee(17574),Ls=Ee(47472),xa=Ee(92832);function xl(jt){let{value:Ut,onChange:cn,filterSearch:ht,tablePrefixCls:bt,locale:Et}=jt;return ht?he.createElement("div",{className:`${bt}-filter-dropdown-search`},he.createElement(xa.default,{prefix:he.createElement(Ls.Z,null),placeholder:Et.filterSearchPlaceholder,onChange:cn,value:Ut,htmlSize:1,className:`${bt}-filter-dropdown-search-input`})):null}var Il=xl,yi=Ee(10228);const ms=jt=>{const{keyCode:Ut}=jt;Ut===yi.Z.ENTER&&jt.stopPropagation()};var qa=he.forwardRef((jt,Ut)=>he.createElement("div",{className:jt.className,onClick:cn=>cn.stopPropagation(),onKeyDown:ms,ref:Ut},jt.children));function wl(jt){let Ut=[];return(jt||[]).forEach(cn=>{let{value:ht,children:bt}=cn;Ut.push(ht),bt&&(Ut=[].concat((0,vi.Z)(Ut),(0,vi.Z)(wl(bt))))}),Ut}function Dl(jt){return jt.some(Ut=>{let{children:cn}=Ut;return cn})}function jr(jt,Ut){return typeof Ut=="string"||typeof Ut=="number"?Ut==null?void 0:Ut.toString().toLowerCase().includes(jt.trim().toLowerCase()):!1}function nc(jt){let{filters:Ut,prefixCls:cn,filteredKeys:ht,filterMultiple:bt,searchValue:Et,filterSearch:wn}=jt;return Ut.map((fn,an)=>{const Sn=String(fn.value);if(fn.children)return{key:Sn||an,label:fn.text,popupClassName:`${cn}-dropdown-submenu`,children:nc({filters:fn.children,prefixCls:cn,filteredKeys:ht,filterMultiple:bt,searchValue:Et,filterSearch:wn})};const xn=bt?Eo.default:Mi.ZP,Cn={key:fn.value!==void 0?Sn:an,label:he.createElement(he.Fragment,null,he.createElement(xn,{checked:ht.includes(Sn)}),he.createElement("span",null,fn.text))};return Et.trim()?typeof wn=="function"?wn(Et,fn)?Cn:null:jr(Et,fn.text)?Cn:null:Cn})}function Ia(jt){var Ut,cn;const{tablePrefixCls:ht,prefixCls:bt,column:Et,dropdownPrefixCls:wn,columnKey:fn,filterMultiple:an,filterMode:Sn="menu",filterSearch:xn=!1,filterState:Cn,triggerFilter:zn,locale:ii,children:Zn,getPopupContainer:wi}=jt,{filterDropdownOpen:Kn,onFilterDropdownOpenChange:gi,filterResetToDefaultFilteredValue:si,defaultFilteredValue:Ii,filterDropdownVisible:Oi,onFilterDropdownVisibleChange:Ui}=Et,[Ai,Ni]=he.useState(!1),ar=!!(Cn&&(!((Ut=Cn.filteredKeys)===null||Ut===void 0)&&Ut.length||Cn.forceFiltered)),ti=Lr=>{Ni(Lr),gi==null||gi(Lr),Ui==null||Ui(Lr)},ji=(cn=Kn!=null?Kn:Oi)!==null&&cn!==void 0?cn:Ai,Li=Cn==null?void 0:Cn.filteredKeys,[bi,Yi]=Po(Li||[]),pi=Lr=>{let{selectedKeys:ho}=Lr;Yi(ho)},lr=(Lr,ho)=>{let{node:Zo,checked:Ko}=ho;pi(an?{selectedKeys:Lr}:{selectedKeys:Ko&&Zo.key?[Zo.key]:[]})};he.useEffect(()=>{Ai&&pi({selectedKeys:Li||[]})},[Li]);const[Xi,Pi]=he.useState([]),Gi=Lr=>{Pi(Lr)},[vr,er]=he.useState(""),So=Lr=>{const{value:ho}=Lr.target;er(ho)};he.useEffect(()=>{Ai||er("")},[Ai]);const Co=Lr=>{const ho=Lr&&Lr.length?Lr:null;if(ho===null&&(!Cn||!Cn.filteredKeys)||(0,Le.Z)(ho,Cn==null?void 0:Cn.filteredKeys,!0))return null;zn({column:Et,key:fn,filteredKeys:ho})},is=()=>{ti(!1),Co(bi())},so=function(){let{confirm:Lr,closeDropdown:ho}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};Lr&&Co([]),ho&&ti(!1),er(""),Yi(si?(Ii||[]).map(Zo=>String(Zo)):[])},kr=function(){let{closeDropdown:Lr}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};Lr&&ti(!1),Co(bi())},No=Lr=>{Lr&&Li!==void 0&&Yi(Li||[]),ti(Lr),!Lr&&!Et.filterDropdown&&is()},Nr=at()({[`${wn}-menu-without-submenu`]:!Dl(Et.filters||[])}),Xr=Lr=>{if(Lr.target.checked){const ho=wl(Et==null?void 0:Et.filters).map(Zo=>String(Zo));Yi(ho)}else Yi([])},rs=Lr=>{let{filters:ho}=Lr;return(ho||[]).map((Zo,Ko)=>{const Qr=String(Zo.value),Io={title:Zo.text,key:Zo.value!==void 0?Qr:Ko};return Zo.children&&(Io.children=rs({filters:Zo.children})),Io})},Zr=Lr=>{var ho;return Object.assign(Object.assign({},Lr),{text:Lr.title,value:Lr.key,children:((ho=Lr.children)===null||ho===void 0?void 0:ho.map(Zo=>Zr(Zo)))||[]})};let Er;if(typeof Et.filterDropdown=="function")Er=Et.filterDropdown({prefixCls:`${wn}-custom`,setSelectedKeys:Lr=>pi({selectedKeys:Lr}),selectedKeys:bi(),confirm:kr,clearFilters:so,filters:Et.filters,visible:ji,close:()=>{ti(!1)}});else if(Et.filterDropdown)Er=Et.filterDropdown;else{const Lr=bi()||[],ho=()=>(Et.filters||[]).length===0?he.createElement(xr.Z,{image:xr.Z.PRESENTED_IMAGE_SIMPLE,description:ii.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):Sn==="tree"?he.createElement(he.Fragment,null,he.createElement(Il,{filterSearch:xn,value:vr,onChange:So,tablePrefixCls:ht,locale:ii}),he.createElement("div",{className:`${ht}-filter-dropdown-tree`},an?he.createElement(Eo.default,{checked:Lr.length===wl(Et.filters).length,indeterminate:Lr.length>0&&Lr.length<wl(Et.filters).length,className:`${ht}-filter-dropdown-checkall`,onChange:Xr},ii.filterCheckall):null,he.createElement(Es.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:an,checkStrictly:!an,className:`${wn}-menu`,onCheck:lr,checkedKeys:Lr,selectedKeys:Lr,showIcon:!1,treeData:rs({filters:Et.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:vr.trim()?Ko=>typeof xn=="function"?xn(vr,Zr(Ko)):jr(vr,Ko.title):void 0}))):he.createElement(he.Fragment,null,he.createElement(Il,{filterSearch:xn,value:vr,onChange:So,tablePrefixCls:ht,locale:ii}),he.createElement(lo.default,{selectable:!0,multiple:an,prefixCls:`${wn}-menu`,className:Nr,onSelect:pi,onDeselect:pi,selectedKeys:Lr,getPopupContainer:wi,openKeys:Xi,onOpenChange:Gi,items:nc({filters:Et.filters||[],filterSearch:xn,prefixCls:bt,filteredKeys:bi(),filterMultiple:an,searchValue:vr})})),Zo=()=>si?(0,Le.Z)((Ii||[]).map(Ko=>String(Ko)),Lr,!0):Lr.length===0;Er=he.createElement(he.Fragment,null,ho(),he.createElement("div",{className:`${bt}-dropdown-btns`},he.createElement(Ao.ZP,{type:"link",size:"small",disabled:Zo(),onClick:()=>so()},ii.filterReset),he.createElement(Ao.ZP,{type:"primary",size:"small",onClick:is},ii.filterConfirm)))}Et.filterDropdown&&(Er=he.createElement(Yr.J,{selectable:void 0},Er));const Jr=()=>he.createElement(qa,{className:`${bt}-dropdown`},Er);let br;typeof Et.filterIcon=="function"?br=Et.filterIcon(ar):Et.filterIcon?br=Et.filterIcon:br=he.createElement(us,null);const{direction:ao}=he.useContext(Yo.E_);return he.createElement("div",{className:`${bt}-column`},he.createElement("span",{className:`${ht}-column-title`},Zn),he.createElement(ua.Z,{dropdownRender:Jr,trigger:["click"],open:ji,onOpenChange:No,getPopupContainer:wi,placement:ao==="rtl"?"bottomLeft":"bottomRight"},he.createElement("span",{role:"button",tabIndex:-1,className:at()(`${bt}-trigger`,{active:ar}),onClick:Lr=>{Lr.stopPropagation()}},br)))}var Ga=Ia;function Na(jt,Ut,cn){let ht=[];return(jt||[]).forEach((bt,Et)=>{var wn;const fn=ia(Et,cn);if(bt.filters||"filterDropdown"in bt||"onFilter"in bt)if("filteredValue"in bt){let an=bt.filteredValue;"filterDropdown"in bt||(an=(wn=an==null?void 0:an.map(String))!==null&&wn!==void 0?wn:an),ht.push({column:bt,key:Ho(bt,fn),filteredKeys:an,forceFiltered:bt.filtered})}else ht.push({column:bt,key:Ho(bt,fn),filteredKeys:Ut&&bt.defaultFilteredValue?bt.defaultFilteredValue:void 0,forceFiltered:bt.filtered});"children"in bt&&(ht=[].concat((0,vi.Z)(ht),(0,vi.Z)(Na(bt.children,Ut,fn))))}),ht}function $l(jt,Ut,cn,ht,bt,Et,wn,fn){return cn.map((an,Sn)=>{const xn=ia(Sn,fn),{filterMultiple:Cn=!0,filterMode:zn,filterSearch:ii}=an;let Zn=an;if(Zn.filters||Zn.filterDropdown){const wi=Ho(Zn,xn),Kn=ht.find(gi=>{let{key:si}=gi;return wi===si});Zn=Object.assign(Object.assign({},Zn),{title:gi=>he.createElement(Ga,{tablePrefixCls:jt,prefixCls:`${jt}-filter`,dropdownPrefixCls:Ut,column:Zn,columnKey:wi,filterState:Kn,filterMultiple:Cn,filterMode:zn,filterSearch:ii,triggerFilter:Et,locale:bt,getPopupContainer:wn},_s(an.title,gi))})}return"children"in Zn&&(Zn=Object.assign(Object.assign({},Zn),{children:$l(jt,Ut,Zn.children,ht,bt,Et,wn,xn)})),Zn})}function _u(jt){const Ut={};return jt.forEach(cn=>{let{key:ht,filteredKeys:bt,column:Et}=cn;const{filters:wn,filterDropdown:fn}=Et;if(fn)Ut[ht]=bt||null;else if(Array.isArray(bt)){const an=wl(wn);Ut[ht]=an.filter(Sn=>bt.includes(String(Sn)))}else Ut[ht]=null}),Ut}function Wa(jt,Ut){return Ut.reduce((cn,ht)=>{const{column:{onFilter:bt,filters:Et},filteredKeys:wn}=ht;return bt&&wn&&wn.length?cn.filter(fn=>wn.some(an=>{const Sn=wl(Et),xn=Sn.findIndex(zn=>String(zn)===String(an)),Cn=xn!==-1?Sn[xn]:an;return bt(Cn,fn)})):cn},jt)}const Za=jt=>jt.flatMap(Ut=>"children"in Ut?[Ut].concat((0,vi.Z)(Za(Ut.children||[]))):[Ut]);function Uu(jt){let{prefixCls:Ut,dropdownPrefixCls:cn,mergedColumns:ht,onFilterChange:bt,getPopupContainer:Et,locale:wn}=jt;const fn=he.useMemo(()=>Za(ht||[]),[ht]),[an,Sn]=he.useState(()=>Na(fn,!0)),xn=he.useMemo(()=>{const Zn=Na(fn,!1);if(Zn.length===0)return Zn;let wi=!0,Kn=!0;if(Zn.forEach(gi=>{let{filteredKeys:si}=gi;si!==void 0?wi=!1:Kn=!1}),wi){const gi=(fn||[]).map((si,Ii)=>Ho(si,ia(Ii)));return an.filter(si=>{let{key:Ii}=si;return gi.includes(Ii)}).map(si=>{const Ii=fn[gi.findIndex(Oi=>Oi===si.key)];return Object.assign(Object.assign({},si),{column:Object.assign(Object.assign({},si.column),Ii),forceFiltered:Ii.filtered})})}return Zn},[fn,an]),Cn=he.useMemo(()=>_u(xn),[xn]),zn=Zn=>{const wi=xn.filter(Kn=>{let{key:gi}=Kn;return gi!==Zn.key});wi.push(Zn),Sn(wi),bt(_u(wi),wi)};return[Zn=>$l(Ut,cn,Zn,xn,wn,zn,Et),xn,Cn]}var yc=Uu;function Eu(jt,Ut,cn){const ht=he.useRef({});function bt(Et){if(!ht.current||ht.current.data!==jt||ht.current.childrenColumnName!==Ut||ht.current.getRowKey!==cn){let fn=function(an){an.forEach((Sn,xn)=>{const Cn=cn(Sn,xn);wn.set(Cn,Sn),Sn&&typeof Sn=="object"&&Ut in Sn&&fn(Sn[Ut]||[])})};const wn=new Map;fn(jt),ht.current={data:jt,childrenColumnName:Ut,kvMap:wn,getRowKey:cn}}return ht.current.kvMap.get(Et)}return[bt]}var Rl=Ee(50371),Sc=function(jt,Ut){var cn={};for(var ht in jt)Object.prototype.hasOwnProperty.call(jt,ht)&&Ut.indexOf(ht)<0&&(cn[ht]=jt[ht]);if(jt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var bt=0,ht=Object.getOwnPropertySymbols(jt);bt<ht.length;bt++)Ut.indexOf(ht[bt])<0&&Object.prototype.propertyIsEnumerable.call(jt,ht[bt])&&(cn[ht[bt]]=jt[ht[bt]]);return cn};const Gu=10;function Lu(jt,Ut){const cn={current:jt.current,pageSize:jt.pageSize};return Object.keys(Ut&&typeof Ut=="object"?Ut:{}).forEach(bt=>{const Et=jt[bt];typeof Et!="function"&&(cn[bt]=Et)}),cn}function bl(jt,Ut,cn){const ht=cn&&typeof cn=="object"?cn:{},{total:bt=0}=ht,Et=Sc(ht,["total"]),[wn,fn]=(0,he.useState)(()=>({current:"defaultCurrent"in Et?Et.defaultCurrent:1,pageSize:"defaultPageSize"in Et?Et.defaultPageSize:Gu})),an=(0,Rl.Z)(wn,Et,{total:bt>0?bt:jt}),Sn=Math.ceil((bt||jt)/an.pageSize);an.current>Sn&&(an.current=Sn||1);const xn=(zn,ii)=>{fn({current:zn!=null?zn:1,pageSize:ii||an.pageSize})},Cn=(zn,ii)=>{var Zn;cn&&((Zn=cn.onChange)===null||Zn===void 0||Zn.call(cn,zn,ii)),xn(zn,ii),Ut(zn,ii||(an==null?void 0:an.pageSize))};return cn===!1?[{},()=>{}]:[Object.assign(Object.assign({},an),{onChange:Cn}),xn]}var th=bl,xc=Ee(84105),lu=Ee(35654),oo=Ee(90782),Uo=Ee(71430),ka=Ee(18929);const ra={},Ds="SELECT_ALL",bs="SELECT_INVERT",ks="SELECT_NONE",Zs=[],Ks=(jt,Ut)=>{let cn=[];return(Ut||[]).forEach(ht=>{cn.push(ht),ht&&typeof ht=="object"&&jt in ht&&(cn=[].concat((0,vi.Z)(cn),(0,vi.Z)(Ks(jt,ht[jt]))))}),cn};var Bl=(jt,Ut)=>{const{preserveSelectedRowKeys:cn,selectedRowKeys:ht,defaultSelectedRowKeys:bt,getCheckboxProps:Et,onChange:wn,onSelect:fn,onSelectAll:an,onSelectInvert:Sn,onSelectNone:xn,onSelectMultiple:Cn,columnWidth:zn,type:ii,selections:Zn,fixed:wi,renderCell:Kn,hideSelectAll:gi,checkStrictly:si=!0}=Ut||{},{prefixCls:Ii,data:Oi,pageData:Ui,getRecordByKey:Ai,getRowKey:Ni,expandType:ar,childrenColumnName:ti,locale:ji,getPopupContainer:Li}=jt,[bi,Yi]=(0,ka.Z)(ht||bt||Zs,{value:ht}),pi=he.useRef(new Map),lr=(0,he.useCallback)(Zr=>{if(cn){const Er=new Map;Zr.forEach(Jr=>{let br=Ai(Jr);!br&&pi.current.has(Jr)&&(br=pi.current.get(Jr)),Er.set(Jr,br)}),pi.current=Er}},[Ai,cn]);he.useEffect(()=>{lr(bi)},[bi]);const{keyEntities:Xi}=(0,he.useMemo)(()=>{if(si)return{keyEntities:null};let Zr=Oi;if(cn){const Er=new Set(Oi.map((br,ao)=>Ni(br,ao))),Jr=Array.from(pi.current).reduce((br,ao)=>{let[Lr,ho]=ao;return Er.has(Lr)?br:br.concat(ho)},[]);Zr=[].concat((0,vi.Z)(Zr),(0,vi.Z)(Jr))}return(0,Uo.I8)(Zr,{externalGetKey:Ni,childrenPropName:ti})},[Oi,Ni,si,ti,cn]),Pi=(0,he.useMemo)(()=>Ks(ti,Ui),[ti,Ui]),Gi=(0,he.useMemo)(()=>{const Zr=new Map;return Pi.forEach((Er,Jr)=>{const br=Ni(Er,Jr),ao=(Et?Et(Er):null)||{};Zr.set(br,ao)}),Zr},[Pi,Ni,Et]),vr=(0,he.useCallback)(Zr=>{var Er;return!!(!((Er=Gi.get(Ni(Zr)))===null||Er===void 0)&&Er.disabled)},[Gi,Ni]),[er,So]=(0,he.useMemo)(()=>{if(si)return[bi||[],[]];const{checkedKeys:Zr,halfCheckedKeys:Er}=(0,oo.S)(bi,!0,Xi,vr);return[Zr||[],Er]},[bi,si,Xi,vr]),Co=(0,he.useMemo)(()=>{const Zr=ii==="radio"?er.slice(0,1):er;return new Set(Zr)},[er,ii]),is=(0,he.useMemo)(()=>ii==="radio"?new Set:new Set(So),[So,ii]),[so,kr]=(0,he.useState)(null);he.useEffect(()=>{Ut||Yi(Zs)},[!!Ut]);const No=(0,he.useCallback)((Zr,Er)=>{let Jr,br;lr(Zr),cn?(Jr=Zr,br=Zr.map(ao=>pi.current.get(ao))):(Jr=[],br=[],Zr.forEach(ao=>{const Lr=Ai(ao);Lr!==void 0&&(Jr.push(ao),br.push(Lr))})),Yi(Jr),wn==null||wn(Jr,br,{type:Er})},[Yi,Ai,wn,cn]),Nr=(0,he.useCallback)((Zr,Er,Jr,br)=>{if(fn){const ao=Jr.map(Lr=>Ai(Lr));fn(Ai(Zr),Er,ao,br)}No(Jr,"single")},[fn,Ai,No]),Xr=(0,he.useMemo)(()=>!Zn||gi?null:(Zn===!0?[Ds,bs,ks]:Zn).map(Er=>Er===Ds?{key:"all",text:ji.selectionAll,onSelect(){No(Oi.map((Jr,br)=>Ni(Jr,br)).filter(Jr=>{const br=Gi.get(Jr);return!(br!=null&&br.disabled)||Co.has(Jr)}),"all")}}:Er===bs?{key:"invert",text:ji.selectInvert,onSelect(){const Jr=new Set(Co);Ui.forEach((ao,Lr)=>{const ho=Ni(ao,Lr),Zo=Gi.get(ho);Zo!=null&&Zo.disabled||(Jr.has(ho)?Jr.delete(ho):Jr.add(ho))});const br=Array.from(Jr);Sn&&Sn(br),No(br,"invert")}}:Er===ks?{key:"none",text:ji.selectNone,onSelect(){xn==null||xn(),No(Array.from(Co).filter(Jr=>{const br=Gi.get(Jr);return br==null?void 0:br.disabled}),"none")}}:Er).map(Er=>Object.assign(Object.assign({},Er),{onSelect:function(){for(var Jr,br,ao=arguments.length,Lr=new Array(ao),ho=0;ho<ao;ho++)Lr[ho]=arguments[ho];(br=Er.onSelect)===null||br===void 0||(Jr=br).call.apply(Jr,[Er].concat(Lr)),kr(null)}})),[Zn,Co,Ui,Ni,Sn,No]);return[(0,he.useCallback)(Zr=>{var Er;if(!Ut)return Zr.filter(Qo=>Qo!==ra);let Jr=(0,vi.Z)(Zr);const br=new Set(Co),ao=Pi.map(Ni).filter(Qo=>!Gi.get(Qo).disabled),Lr=ao.every(Qo=>br.has(Qo)),ho=ao.some(Qo=>br.has(Qo)),Zo=()=>{const Qo=[];Lr?ao.forEach(xs=>{br.delete(xs),Qo.push(xs)}):ao.forEach(xs=>{br.has(xs)||(br.add(xs),Qo.push(xs))});const qo=Array.from(br);an==null||an(!Lr,qo.map(xs=>Ai(xs)),Qo.map(xs=>Ai(xs))),No(qo,"all"),kr(null)};let Ko;if(ii!=="radio"){let Qo;if(Xr){const jo={getPopupContainer:Li,items:Xr.map((As,La)=>{const{key:_l,text:Xl,onSelect:jl}=As;return{key:_l!=null?_l:La,onClick:()=>{jl==null||jl(ao)},label:Xl}})};Qo=he.createElement("div",{className:`${Ii}-selection-extra`},he.createElement(ua.Z,{menu:jo,getPopupContainer:Li},he.createElement("span",null,he.createElement(xc.Z,null))))}const qo=Pi.map((jo,As)=>{const La=Ni(jo,As),_l=Gi.get(La)||{};return Object.assign({checked:br.has(La)},_l)}).filter(jo=>{let{disabled:As}=jo;return As}),xs=!!qo.length&&qo.length===Pi.length,Ts=xs&&qo.every(jo=>{let{checked:As}=jo;return As}),ma=xs&&qo.some(jo=>{let{checked:As}=jo;return As});Ko=!gi&&he.createElement("div",{className:`${Ii}-selection`},he.createElement(Eo.default,{checked:xs?Ts:!!Pi.length&&Lr,indeterminate:xs?!Ts&&ma:!Lr&&ho,onChange:Zo,disabled:Pi.length===0||xs,"aria-label":Qo?"Custom selection":"Select all",skipGroup:!0}),Qo)}let Qr;ii==="radio"?Qr=(Qo,qo,xs)=>{const Ts=Ni(qo,xs),ma=br.has(Ts);return{node:he.createElement(Mi.ZP,Object.assign({},Gi.get(Ts),{checked:ma,onClick:jo=>jo.stopPropagation(),onChange:jo=>{br.has(Ts)||Nr(Ts,!0,[Ts],jo.nativeEvent)}})),checked:ma}}:Qr=(Qo,qo,xs)=>{var Ts;const ma=Ni(qo,xs),jo=br.has(ma),As=is.has(ma),La=Gi.get(ma);let _l;return ar==="nest"?_l=As:_l=(Ts=La==null?void 0:La.indeterminate)!==null&&Ts!==void 0?Ts:As,{node:he.createElement(Eo.default,Object.assign({},La,{indeterminate:_l,checked:jo,skipGroup:!0,onClick:Xl=>Xl.stopPropagation(),onChange:Xl=>{let{nativeEvent:jl}=Xl;const{shiftKey:cu}=jl;let hu=-1,Jl=-1;if(cu&&si){const gs=new Set([so,ma]);ao.some((Ra,oa)=>{if(gs.has(Ra))if(hu===-1)hu=oa;else return Jl=oa,!0;return!1})}if(Jl!==-1&&hu!==Jl&&si){const gs=ao.slice(hu,Jl+1),Ra=[];jo?gs.forEach(Ns=>{br.has(Ns)&&(Ra.push(Ns),br.delete(Ns))}):gs.forEach(Ns=>{br.has(Ns)||(Ra.push(Ns),br.add(Ns))});const oa=Array.from(br);Cn==null||Cn(!jo,oa.map(Ns=>Ai(Ns)),Ra.map(Ns=>Ai(Ns))),No(oa,"multiple")}else{const gs=er;if(si){const Ra=jo?(0,lu._5)(gs,ma):(0,lu.L0)(gs,ma);Nr(ma,!jo,Ra,jl)}else{const Ra=(0,oo.S)([].concat((0,vi.Z)(gs),[ma]),!0,Xi,vr),{checkedKeys:oa,halfCheckedKeys:Ns}=Ra;let Ql=oa;if(jo){const _c=new Set(oa);_c.delete(ma),Ql=(0,oo.S)(Array.from(_c),{checked:!1,halfCheckedKeys:Ns},Xi,vr).checkedKeys}Nr(ma,!jo,Ql,jl)}}kr(jo?null:ma)}})),checked:jo}};const Io=(Qo,qo,xs)=>{const{node:Ts,checked:ma}=Qr(Qo,qo,xs);return Kn?Kn(ma,qo,xs,Ts):Ts};if(!Jr.includes(ra))if(Jr.findIndex(Qo=>{var qo;return((qo=Qo[ir])===null||qo===void 0?void 0:qo.columnType)==="EXPAND_COLUMN"})===0){const[Qo,...qo]=Jr;Jr=[Qo,ra].concat((0,vi.Z)(qo))}else Jr=[ra].concat((0,vi.Z)(Jr));const Cs=Jr.indexOf(ra);Jr=Jr.filter((Qo,qo)=>Qo!==ra||qo===Cs);const Lo=Jr[Cs-1],Jo=Jr[Cs+1];let Ss=wi;Ss===void 0&&((Jo==null?void 0:Jo.fixed)!==void 0?Ss=Jo.fixed:(Lo==null?void 0:Lo.fixed)!==void 0&&(Ss=Lo.fixed)),Ss&&Lo&&((Er=Lo[ir])===null||Er===void 0?void 0:Er.columnType)==="EXPAND_COLUMN"&&Lo.fixed===void 0&&(Lo.fixed=Ss);const Js=at()(`${Ii}-selection-col`,{[`${Ii}-selection-col-with-dropdown`]:Zn&&ii==="checkbox"}),Pl={fixed:Ss,width:zn,className:`${Ii}-selection-column`,title:Ut.columnTitle||Ko,render:Io,onCell:Ut.onCell,[ir]:{className:Js}};return Jr.map(Qo=>Qo===ra?Pl:Qo)},[Ni,Pi,Ut,er,Co,is,zn,Xr,ar,so,Gi,Cn,Nr,vr]),Co]},Rs=Ee(89489),xh=Ee(59477),nh=Ee(6848);const wc="ascend",gr="descend";function bc(jt){return typeof jt.sorter=="object"&&typeof jt.sorter.multiple=="number"?jt.sorter.multiple:!1}function rn(jt){return typeof jt=="function"?jt:jt&&typeof jt=="object"&&jt.compare?jt.compare:!1}function Yn(jt,Ut){return Ut?jt[jt.indexOf(Ut)+1]:jt[0]}function wh(jt,Ut,cn){let ht=[];function bt(Et,wn){ht.push({column:Et,key:Ho(Et,wn),multiplePriority:bc(Et),sortOrder:Et.sortOrder})}return(jt||[]).forEach((Et,wn)=>{const fn=ia(wn,cn);Et.children?("sortOrder"in Et&&bt(Et,fn),ht=[].concat((0,vi.Z)(ht),(0,vi.Z)(wh(Et.children,Ut,fn)))):Et.sorter&&("sortOrder"in Et?bt(Et,fn):Ut&&Et.defaultSortOrder&&ht.push({column:Et,key:Ho(Et,fn),multiplePriority:bc(Et),sortOrder:Et.defaultSortOrder}))}),ht}function Qh(jt,Ut,cn,ht,bt,Et,wn,fn){return(Ut||[]).map((an,Sn)=>{const xn=ia(Sn,fn);let Cn=an;if(Cn.sorter){const zn=Cn.sortDirections||bt,ii=Cn.showSorterTooltip===void 0?wn:Cn.showSorterTooltip,Zn=Ho(Cn,xn),wi=cn.find(ar=>{let{key:ti}=ar;return ti===Zn}),Kn=wi?wi.sortOrder:null,gi=Yn(zn,Kn);let si;if(an.sortIcon)si=an.sortIcon({sortOrder:Kn});else{const ar=zn.includes(wc)&&he.createElement(xh.Z,{className:at()(`${jt}-column-sorter-up`,{active:Kn===wc})}),ti=zn.includes(gr)&&he.createElement(Rs.Z,{className:at()(`${jt}-column-sorter-down`,{active:Kn===gr})});si=he.createElement("span",{className:at()(`${jt}-column-sorter`,{[`${jt}-column-sorter-full`]:!!(ar&&ti)})},he.createElement("span",{className:`${jt}-column-sorter-inner`,"aria-hidden":"true"},ar,ti))}const{cancelSort:Ii,triggerAsc:Oi,triggerDesc:Ui}=Et||{};let Ai=Ii;gi===gr?Ai=Ui:gi===wc&&(Ai=Oi);const Ni=typeof ii=="object"?ii:{title:Ai};Cn=Object.assign(Object.assign({},Cn),{className:at()(Cn.className,{[`${jt}-column-sort`]:Kn}),title:ar=>{const ti=he.createElement("div",{className:`${jt}-column-sorters`},he.createElement("span",{className:`${jt}-column-title`},_s(an.title,ar)),si);return ii?he.createElement(nh.Z,Object.assign({},Ni),ti):ti},onHeaderCell:ar=>{const ti=an.onHeaderCell&&an.onHeaderCell(ar)||{},ji=ti.onClick,Li=ti.onKeyDown;ti.onClick=pi=>{ht({column:an,key:Zn,sortOrder:gi,multiplePriority:bc(an)}),ji==null||ji(pi)},ti.onKeyDown=pi=>{pi.keyCode===yi.Z.ENTER&&(ht({column:an,key:Zn,sortOrder:gi,multiplePriority:bc(an)}),Li==null||Li(pi))};const bi=la(an.title,{}),Yi=bi==null?void 0:bi.toString();return Kn?ti["aria-sort"]=Kn==="ascend"?"ascending":"descending":ti["aria-label"]=Yi||"",ti.className=at()(ti.className,`${jt}-column-has-sorters`),ti.tabIndex=0,an.ellipsis&&(ti.title=(bi!=null?bi:"").toString()),ti}})}return"children"in Cn&&(Cn=Object.assign(Object.assign({},Cn),{children:Qh(jt,Cn.children,cn,ht,bt,Et,wn,xn)})),Cn})}function Mu(jt){const{column:Ut,sortOrder:cn}=jt;return{column:Ut,order:cn,field:Ut.dataIndex,columnKey:Ut.key}}function Tu(jt){const Ut=jt.filter(cn=>{let{sortOrder:ht}=cn;return ht}).map(Mu);return Ut.length===0&&jt.length?Object.assign(Object.assign({},Mu(jt[jt.length-1])),{column:void 0}):Ut.length<=1?Ut[0]||{}:Ut}function Wu(jt,Ut,cn){const ht=Ut.slice().sort((wn,fn)=>fn.multiplePriority-wn.multiplePriority),bt=jt.slice(),Et=ht.filter(wn=>{let{column:{sorter:fn},sortOrder:an}=wn;return rn(fn)&&an});return Et.length?bt.sort((wn,fn)=>{for(let an=0;an<Et.length;an+=1){const Sn=Et[an],{column:{sorter:xn},sortOrder:Cn}=Sn,zn=rn(xn);if(zn&&Cn){const ii=zn(wn,fn,Cn);if(ii!==0)return Cn===wc?ii:-ii}}return 0}).map(wn=>{const fn=wn[cn];return fn?Object.assign(Object.assign({},wn),{[cn]:Wu(fn,Ut,cn)}):wn}):bt}function bh(jt){let{prefixCls:Ut,mergedColumns:cn,onSorterChange:ht,sortDirections:bt,tableLocale:Et,showSorterTooltip:wn}=jt;const[fn,an]=he.useState(wh(cn,!0)),Sn=he.useMemo(()=>{let Zn=!0;const wi=wh(cn,!1);if(!wi.length)return fn;const Kn=[];function gi(Ii){Zn?Kn.push(Ii):Kn.push(Object.assign(Object.assign({},Ii),{sortOrder:null}))}let si=null;return wi.forEach(Ii=>{si===null?(gi(Ii),Ii.sortOrder&&(Ii.multiplePriority===!1?Zn=!1:si=!0)):(si&&Ii.multiplePriority!==!1||(Zn=!1),gi(Ii))}),Kn},[cn,fn]),xn=he.useMemo(()=>{const Zn=Sn.map(wi=>{let{column:Kn,sortOrder:gi}=wi;return{column:Kn,order:gi}});return{sortColumns:Zn,sortColumn:Zn[0]&&Zn[0].column,sortOrder:Zn[0]&&Zn[0].order}},[Sn]);function Cn(Zn){let wi;Zn.multiplePriority===!1||!Sn.length||Sn[0].multiplePriority===!1?wi=[Zn]:wi=[].concat((0,vi.Z)(Sn.filter(Kn=>{let{key:gi}=Kn;return gi!==Zn.key})),[Zn]),an(wi),ht(Tu(wi),wi)}return[Zn=>Qh(Ut,Zn,Sn,Cn,bt,Et,wn),Sn,xn,()=>Tu(Sn)]}function Cc(jt,Ut){return jt.map(cn=>{const ht=Object.assign({},cn);return ht.title=_s(cn.title,Ut),"children"in ht&&(ht.children=Cc(ht.children,Ut)),ht})}function Vs(jt){return[he.useCallback(cn=>Cc(cn,jt),[jt])]}var $r=qi((jt,Ut)=>{const{_renderTimes:cn}=jt,{_renderTimes:ht}=Ut;return cn!==ht}),Da=Hr((jt,Ut)=>{const{_renderTimes:cn}=jt,{_renderTimes:ht}=Ut;return cn!==ht}),$s=Ee(64993),Ms=Ee(17313),xo=Ee(83116),ga=Ee(37613),cs=jt=>{const{componentCls:Ut}=jt,cn=`${jt.lineWidth}px ${jt.lineType} ${jt.tableBorderColor}`,ht=(bt,Et,wn)=>({[`&${Ut}-${bt}`]:{[`> ${Ut}-container`]:{[`> ${Ut}-content, > ${Ut}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${Ut}-expanded-row-fixed`]:{margin:`-${Et}px -${wn+jt.lineWidth}px`}}}}}});return{[`${Ut}-wrapper`]:{[`${Ut}${Ut}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${Ut}-title`]:{border:cn,borderBottom:0},[`> ${Ut}-container`]:{borderInlineStart:cn,borderTop:cn,[`
|
|
|
> ${Ut}-content,
|
|
|
> ${Ut}-header,
|
|
|
> ${Ut}-body,
|
|
|
> ${Ut}-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:cn},"> thead":{"> tr:not(:last-child) > th":{borderBottom:cn},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${Ut}-cell-fix-right-first::after`]:{borderInlineEnd:cn}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${Ut}-expanded-row-fixed`]:{margin:`-${jt.tablePaddingVertical}px -${jt.tablePaddingHorizontal+jt.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:jt.lineWidth,bottom:0,borderInlineEnd:cn,content:'""'}}}}}},[`&${Ut}-scroll-horizontal`]:{[`> ${Ut}-container > ${Ut}-body`]:{"> table > tbody":{[`
|
|
|
> tr${Ut}-expanded-row,
|
|
|
> tr${Ut}-placeholder
|
|
|
`]:{"> th, > td":{borderInlineEnd:0}}}}}},ht("middle",jt.tablePaddingVerticalMiddle,jt.tablePaddingHorizontalMiddle)),ht("small",jt.tablePaddingVerticalSmall,jt.tablePaddingHorizontalSmall)),{[`> ${Ut}-footer`]:{border:cn,borderTop:0}}),[`${Ut}-cell`]:{[`${Ut}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${jt.lineWidth}px 0 ${jt.lineWidth}px ${jt.tableHeaderBg}`}},[`${Ut}-bordered ${Ut}-cell-scrollbar`]:{borderInlineEnd:cn}}}},Ea=jt=>{const{componentCls:Ut}=jt;return{[`${Ut}-wrapper`]:{[`${Ut}-cell-ellipsis`]:Object.assign(Object.assign({},Ms.vS),{wordBreak:"keep-all",[`
|
|
|
&${Ut}-cell-fix-left-last,
|
|
|
&${Ut}-cell-fix-right-first
|
|
|
`]:{overflow:"visible",[`${Ut}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${Ut}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},Go=jt=>{const{componentCls:Ut}=jt;return{[`${Ut}-wrapper`]:{[`${Ut}-tbody > tr${Ut}-placeholder`]:{textAlign:"center",color:jt.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:jt.colorBgContainer}}}}},Ka=Ee(15969),vs=jt=>{const{componentCls:Ut,antCls:cn,controlInteractiveSize:ht,motionDurationSlow:bt,lineWidth:Et,paddingXS:wn,lineType:fn,tableBorderColor:an,tableExpandIconBg:Sn,tableExpandColumnWidth:xn,borderRadius:Cn,fontSize:zn,fontSizeSM:ii,lineHeight:Zn,tablePaddingVertical:wi,tablePaddingHorizontal:Kn,tableExpandedRowBg:gi,paddingXXS:si}=jt,Ii=ht/2-Et,Oi=Ii*2+Et*3,Ui=`${Et}px ${fn} ${an}`,Ai=si-Et;return{[`${Ut}-wrapper`]:{[`${Ut}-expand-icon-col`]:{width:xn},[`${Ut}-row-expand-icon-cell`]:{textAlign:"center",[`${Ut}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${Ut}-row-indent`]:{height:1,float:"left"},[`${Ut}-row-expand-icon`]:Object.assign(Object.assign({},(0,Ka.N)(jt)),{position:"relative",float:"left",boxSizing:"border-box",width:Oi,height:Oi,padding:0,color:"inherit",lineHeight:`${Oi}px`,background:Sn,border:Ui,borderRadius:Cn,transform:`scale(${ht/Oi})`,transition:`all ${bt}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${bt} ease-out`,content:'""'},"&::before":{top:Ii,insetInlineEnd:Ai,insetInlineStart:Ai,height:Et},"&::after":{top:Ai,bottom:Ai,insetInlineStart:Ii,width:Et,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"}}),[`${Ut}-row-indent + ${Ut}-row-expand-icon`]:{marginTop:(zn*Zn-Et*3)/2-Math.ceil((ii*1.4-Et*3)/2),marginInlineEnd:wn},[`tr${Ut}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:gi}},[`${cn}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${Ut}-expanded-row-fixed`]:{position:"relative",margin:`-${wi}px -${Kn}px`,padding:`${wi}px ${Kn}px`}}}},Bs=jt=>{const{componentCls:Ut,antCls:cn,iconCls:ht,tableFilterDropdownWidth:bt,tableFilterDropdownSearchWidth:Et,paddingXXS:wn,paddingXS:fn,colorText:an,lineWidth:Sn,lineType:xn,tableBorderColor:Cn,tableHeaderIconColor:zn,fontSizeSM:ii,tablePaddingHorizontal:Zn,borderRadius:wi,motionDurationSlow:Kn,colorTextDescription:gi,colorPrimary:si,tableHeaderFilterActiveBg:Ii,colorTextDisabled:Oi,tableFilterDropdownBg:Ui,tableFilterDropdownHeight:Ai,controlItemBgHover:Ni,controlItemBgActive:ar,boxShadowSecondary:ti,filterDropdownMenuBg:ji}=jt,Li=`${cn}-dropdown`,bi=`${Ut}-filter-dropdown`,Yi=`${cn}-tree`,pi=`${Sn}px ${xn} ${Cn}`;return[{[`${Ut}-wrapper`]:{[`${Ut}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${Ut}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-wn,marginInline:`${wn}px ${-Zn/2}px`,padding:`0 ${wn}px`,color:zn,fontSize:ii,borderRadius:wi,cursor:"pointer",transition:`all ${Kn}`,"&:hover":{color:gi,background:Ii},"&.active":{color:si}}}},{[`${cn}-dropdown`]:{[bi]:Object.assign(Object.assign({},(0,Ms.Wf)(jt)),{minWidth:bt,backgroundColor:Ui,borderRadius:wi,boxShadow:ti,overflow:"hidden",[`${Li}-menu`]:{maxHeight:Ai,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:ji,"&:empty::after":{display:"block",padding:`${fn}px 0`,color:Oi,fontSize:ii,textAlign:"center",content:'"Not Found"'}},[`${bi}-tree`]:{paddingBlock:`${fn}px 0`,paddingInline:fn,[Yi]:{padding:0},[`${Yi}-treenode ${Yi}-node-content-wrapper:hover`]:{backgroundColor:Ni},[`${Yi}-treenode-checkbox-checked ${Yi}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:ar}}},[`${bi}-search`]:{padding:fn,borderBottom:pi,"&-input":{input:{minWidth:Et},[ht]:{color:Oi}}},[`${bi}-checkall`]:{width:"100%",marginBottom:wn,marginInlineStart:wn},[`${bi}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${fn-Sn}px ${fn}px`,overflow:"hidden",borderTop:pi}})}},{[`${cn}-dropdown ${bi}, ${bi}-submenu`]:{[`${cn}-checkbox-wrapper + span`]:{paddingInlineStart:fn,color:an},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},Rc=jt=>{const{componentCls:Ut,lineWidth:cn,colorSplit:ht,motionDurationSlow:bt,zIndexTableFixed:Et,tableBg:wn,zIndexTableSticky:fn}=jt,an=ht;return{[`${Ut}-wrapper`]:{[`
|
|
|
${Ut}-cell-fix-left,
|
|
|
${Ut}-cell-fix-right
|
|
|
`]:{position:"sticky !important",zIndex:Et,background:wn},[`
|
|
|
${Ut}-cell-fix-left-first::after,
|
|
|
${Ut}-cell-fix-left-last::after
|
|
|
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-cn,width:30,transform:"translateX(100%)",transition:`box-shadow ${bt}`,content:'""',pointerEvents:"none"},[`${Ut}-cell-fix-left-all::after`]:{display:"none"},[`
|
|
|
${Ut}-cell-fix-right-first::after,
|
|
|
${Ut}-cell-fix-right-last::after
|
|
|
`]:{position:"absolute",top:0,bottom:-cn,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${bt}`,content:'""',pointerEvents:"none"},[`${Ut}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:fn+1,width:30,transition:`box-shadow ${bt}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${Ut}-ping-left`]:{[`&:not(${Ut}-has-fix-left) ${Ut}-container`]:{position:"relative","&::before":{boxShadow:`inset 10px 0 8px -8px ${an}`}},[`
|
|
|
${Ut}-cell-fix-left-first::after,
|
|
|
${Ut}-cell-fix-left-last::after
|
|
|
`]:{boxShadow:`inset 10px 0 8px -8px ${an}`},[`${Ut}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${Ut}-ping-right`]:{[`&:not(${Ut}-has-fix-right) ${Ut}-container`]:{position:"relative","&::after":{boxShadow:`inset -10px 0 8px -8px ${an}`}},[`
|
|
|
${Ut}-cell-fix-right-first::after,
|
|
|
${Ut}-cell-fix-right-last::after
|
|
|
`]:{boxShadow:`inset -10px 0 8px -8px ${an}`}}}}},Ad=jt=>{const{componentCls:Ut,antCls:cn}=jt;return{[`${Ut}-wrapper`]:{[`${Ut}-pagination${cn}-pagination`]:{margin:`${jt.margin}px 0`},[`${Ut}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:jt.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},Nd=jt=>{const{componentCls:Ut,tableRadius:cn}=jt;return{[`${Ut}-wrapper`]:{[Ut]:{[`${Ut}-title, ${Ut}-header`]:{borderRadius:`${cn}px ${cn}px 0 0`},[`${Ut}-title + ${Ut}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${Ut}-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:cn,borderStartEndRadius:cn,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:cn},"> *:last-child":{borderStartEndRadius:cn}}},"&-footer":{borderRadius:`0 0 ${cn}px ${cn}px`}}}}},rh=jt=>{const{componentCls:Ut}=jt;return{[`${Ut}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${Ut}-pagination-left`]:{justifyContent:"flex-end"},[`${Ut}-pagination-right`]:{justifyContent:"flex-start"},[`${Ut}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${Ut}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${Ut}-row-indent`]:{float:"right"}}}}},Ch=jt=>{const{componentCls:Ut,antCls:cn,iconCls:ht,fontSizeIcon:bt,padding:Et,paddingXS:wn,tableHeaderIconColor:fn,tableHeaderIconColorHover:an,tableSelectionColumnWidth:Sn}=jt;return{[`${Ut}-wrapper`]:{[`${Ut}-selection-col`]:{width:Sn,[`&${Ut}-selection-col-with-dropdown`]:{width:Sn+bt+Et/4}},[`${Ut}-bordered ${Ut}-selection-col`]:{width:Sn+wn*2,[`&${Ut}-selection-col-with-dropdown`]:{width:Sn+bt+Et/4+wn*2}},[`
|
|
|
table tr th${Ut}-selection-column,
|
|
|
table tr td${Ut}-selection-column
|
|
|
`]:{paddingInlineEnd:jt.paddingXS,paddingInlineStart:jt.paddingXS,textAlign:"center",[`${cn}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${Ut}-selection-column${Ut}-cell-fix-left`]:{zIndex:jt.zIndexTableFixed+1},[`table tr th${Ut}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${Ut}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${Ut}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${jt.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${jt.tablePaddingHorizontal/4}px`,[ht]:{color:fn,fontSize:bt,verticalAlign:"baseline","&:hover":{color:an}}}}}},ro=jt=>{const{componentCls:Ut}=jt,cn=(ht,bt,Et,wn)=>({[`${Ut}${Ut}-${ht}`]:{fontSize:wn,[`
|
|
|
${Ut}-title,
|
|
|
${Ut}-footer,
|
|
|
${Ut}-cell,
|
|
|
${Ut}-thead > tr > th,
|
|
|
${Ut}-tbody > tr > th,
|
|
|
${Ut}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{padding:`${bt}px ${Et}px`},[`${Ut}-filter-trigger`]:{marginInlineEnd:`-${Et/2}px`},[`${Ut}-expanded-row-fixed`]:{margin:`-${bt}px -${Et}px`},[`${Ut}-tbody`]:{[`${Ut}-wrapper:only-child ${Ut}`]:{marginBlock:`-${bt}px`,marginInline:`${jt.tableExpandColumnWidth-Et}px -${Et}px`}},[`${Ut}-selection-column`]:{paddingInlineStart:`${Et/4}px`}}});return{[`${Ut}-wrapper`]:Object.assign(Object.assign({},cn("middle",jt.tablePaddingVerticalMiddle,jt.tablePaddingHorizontalMiddle,jt.tableFontSizeMiddle)),cn("small",jt.tablePaddingVerticalSmall,jt.tablePaddingHorizontalSmall,jt.tableFontSizeSmall))}},ku=jt=>{const{componentCls:Ut,marginXXS:cn,fontSizeIcon:ht,tableHeaderIconColor:bt,tableHeaderIconColorHover:Et}=jt;return{[`${Ut}-wrapper`]:{[`${Ut}-thead th${Ut}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${jt.motionDurationSlow}`,"&:hover":{background:jt.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:jt.colorPrimary},[`
|
|
|
&${Ut}-cell-fix-left:hover,
|
|
|
&${Ut}-cell-fix-right:hover
|
|
|
`]:{background:jt.tableFixedHeaderSortActiveBg}},[`${Ut}-thead th${Ut}-column-sort`]:{background:jt.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${Ut}-column-sort`]:{background:jt.tableBodySortBg},[`${Ut}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${Ut}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${Ut}-column-sorter`]:{marginInlineStart:cn,color:bt,fontSize:0,transition:`color ${jt.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:ht,"&.active":{color:jt.colorPrimary}},[`${Ut}-column-sorter-up + ${Ut}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${Ut}-column-sorters:hover ${Ut}-column-sorter`]:{color:Et}}}},Au=jt=>{const{componentCls:Ut,opacityLoading:cn,tableScrollThumbBg:ht,tableScrollThumbBgHover:bt,tableScrollThumbSize:Et,tableScrollBg:wn,zIndexTableSticky:fn,stickyScrollBarBorderRadius:an}=jt,Sn=`${jt.lineWidth}px ${jt.lineType} ${jt.tableBorderColor}`;return{[`${Ut}-wrapper`]:{[`${Ut}-sticky`]:{"&-holder":{position:"sticky",zIndex:fn,background:jt.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${Et}px !important`,zIndex:fn,display:"flex",alignItems:"center",background:wn,borderTop:Sn,opacity:cn,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:Et,backgroundColor:ht,borderRadius:an,transition:`all ${jt.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:bt}}}}}}},uu=jt=>{const{componentCls:Ut,lineWidth:cn,tableBorderColor:ht}=jt,bt=`${cn}px ${jt.lineType} ${ht}`;return{[`${Ut}-wrapper`]:{[`${Ut}-summary`]:{position:"relative",zIndex:jt.zIndexTableFixed,background:jt.tableBg,"> tr":{"> th, > td":{borderBottom:bt}}},[`div${Ut}-summary`]:{boxShadow:`0 -${cn}px 0 ${ht}`}}}},ps=jt=>{const{componentCls:Ut}=jt,cn=`${jt.lineWidth}px ${jt.lineType} ${jt.tableBorderColor}`,ht=`${Ut}-expanded-row-cell`;return{[`${Ut}-wrapper`]:{[`${Ut}-tbody-virtual`]:{[`${Ut}-row`]:{display:"flex",boxSizing:"border-box",width:"100%"},[`${Ut}-cell`]:{borderBottom:cn},[`${Ut}-expanded-row`]:{[`${ht}${ht}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${jt.lineWidth}px)`,borderInlineEnd:"none"}}},[`${Ut}-bordered`]:{[`${Ut}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:cn,position:"absolute"},[`${Ut}-cell`]:{borderInlineEnd:cn,[`&${Ut}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:-jt.lineWidth,borderInlineStart:cn}}}}}}};const Fs=jt=>{const{componentCls:Ut,fontWeightStrong:cn,tablePaddingVertical:ht,tablePaddingHorizontal:bt,lineWidth:Et,lineType:wn,tableBorderColor:fn,tableFontSize:an,tableBg:Sn,tableRadius:xn,tableHeaderTextColor:Cn,motionDurationMid:zn,tableHeaderBg:ii,tableHeaderCellSplitColor:Zn,tableRowHoverBg:wi,tableSelectedRowBg:Kn,tableSelectedRowHoverBg:gi,tableFooterTextColor:si,tableFooterBg:Ii,paddingContentVerticalLG:Oi}=jt,Ui=`${Et}px ${wn} ${fn}`;return{[`${Ut}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,Ms.dF)()),{[Ut]:Object.assign(Object.assign({},(0,Ms.Wf)(jt)),{fontSize:an,background:Sn,borderRadius:`${xn}px ${xn}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${xn}px ${xn}px 0 0`,borderCollapse:"separate",borderSpacing:0},[`
|
|
|
${Ut}-cell,
|
|
|
${Ut}-thead > tr > th,
|
|
|
${Ut}-tbody > tr > th,
|
|
|
${Ut}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{position:"relative",padding:`${Oi}px ${bt}px`,overflowWrap:"break-word"},[`${Ut}-title`]:{padding:`${ht}px ${bt}px`},[`${Ut}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:Cn,fontWeight:cn,textAlign:"start",background:ii,borderBottom:Ui,transition:`background ${zn} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${Ut}-selection-column):not(${Ut}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:Zn,transform:"translateY(-50%)",transition:`background-color ${zn}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${Ut}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${zn}, border-color ${zn}`,borderBottom:Ui,[`
|
|
|
> ${Ut}-wrapper:only-child,
|
|
|
> ${Ut}-expanded-row-fixed > ${Ut}-wrapper:only-child
|
|
|
`]:{[Ut]:{marginBlock:`-${ht}px`,marginInline:`${jt.tableExpandColumnWidth-bt}px -${bt}px`,[`${Ut}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:Cn,fontWeight:cn,textAlign:"start",background:ii,borderBottom:Ui,transition:`background ${zn} ease`},[`
|
|
|
&${Ut}-row:hover > th,
|
|
|
&${Ut}-row:hover > td,
|
|
|
> th${Ut}-cell-row-hover,
|
|
|
> td${Ut}-cell-row-hover
|
|
|
`]:{background:wi},[`&${Ut}-row-selected`]:{"> th, > td":{background:Kn},"&:hover > th, &:hover > td":{background:gi}}}},[`${Ut}-footer`]:{padding:`${ht}px ${bt}px`,color:si,background:Ii}})}};var rc=(0,xo.Z)("Table",jt=>{const{colorTextHeading:Ut,colorSplit:cn,colorIcon:ht,colorIconHover:bt,opacityLoading:Et,colorBgContainer:wn,controlInteractiveSize:fn,headerBg:an,headerColor:Sn,headerSortActiveBg:xn,headerSortHoverBg:Cn,bodySortBg:zn,rowHoverBg:ii,rowSelectedBg:Zn,rowSelectedHoverBg:wi,rowExpandedBg:Kn,cellPaddingBlock:gi,cellPaddingInline:si,cellPaddingBlockMD:Ii,cellPaddingInlineMD:Oi,cellPaddingBlockSM:Ui,cellPaddingInlineSM:Ai,borderColor:Ni,footerBg:ar,footerColor:ti,headerBorderRadius:ji,cellFontSize:Li,cellFontSizeMD:bi,cellFontSizeSM:Yi,headerSplitColor:pi,fixedHeaderSortActiveBg:lr,headerFilterHoverBg:Xi,filterDropdownBg:Pi,expandIconBg:Gi,selectionColumnWidth:vr,stickyScrollBarBg:er}=jt,So=new $s.C(ht),Co=new $s.C(bt),is=2,so=(0,ga.TS)(jt,{tableFontSize:Li,tableBg:wn,tableRadius:ji,tablePaddingVertical:gi,tablePaddingHorizontal:si,tablePaddingVerticalMiddle:Ii,tablePaddingHorizontalMiddle:Oi,tablePaddingVerticalSmall:Ui,tablePaddingHorizontalSmall:Ai,tableBorderColor:Ni,tableHeaderTextColor:Sn,tableHeaderBg:an,tableFooterTextColor:ti,tableFooterBg:ar,tableHeaderCellSplitColor:pi,tableHeaderSortBg:xn,tableHeaderSortHoverBg:Cn,tableHeaderIconColor:So.clone().setAlpha(So.getAlpha()*Et).toRgbString(),tableHeaderIconColorHover:Co.clone().setAlpha(Co.getAlpha()*Et).toRgbString(),tableBodySortBg:zn,tableFixedHeaderSortActiveBg:lr,tableHeaderFilterActiveBg:Xi,tableFilterDropdownBg:Pi,tableRowHoverBg:ii,tableSelectedRowBg:Zn,tableSelectedRowHoverBg:wi,zIndexTableFixed:is,zIndexTableSticky:is+1,tableFontSizeMiddle:bi,tableFontSizeSmall:Yi,tableSelectionColumnWidth:vr,tableExpandIconBg:Gi,tableExpandColumnWidth:fn+2*jt.padding,tableExpandedRowBg:Kn,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:er,tableScrollThumbBgHover:Ut,tableScrollBg:cn});return[Fs(so),Ad(so),uu(so),ku(so),Bs(so),cs(so),Nd(so),vs(so),uu(so),Go(so),Ch(so),Rc(so),Au(so),Ea(so),ro(so),rh(so),ps(so)]},jt=>{const{colorFillAlter:Ut,colorBgContainer:cn,colorTextHeading:ht,colorFillSecondary:bt,colorFillContent:Et,controlItemBgActive:wn,controlItemBgActiveHover:fn,padding:an,paddingSM:Sn,paddingXS:xn,colorBorderSecondary:Cn,borderRadiusLG:zn,fontSize:ii,controlHeight:Zn,colorTextPlaceholder:wi}=jt,Kn=new $s.C(bt).onBackground(cn).toHexShortString(),gi=new $s.C(Et).onBackground(cn).toHexShortString(),si=new $s.C(Ut).onBackground(cn).toHexShortString();return{headerBg:si,headerColor:ht,headerSortActiveBg:Kn,headerSortHoverBg:gi,bodySortBg:si,rowHoverBg:si,rowSelectedBg:wn,rowSelectedHoverBg:fn,rowExpandedBg:Ut,cellPaddingBlock:an,cellPaddingInline:an,cellPaddingBlockMD:Sn,cellPaddingInlineMD:xn,cellPaddingBlockSM:xn,cellPaddingInlineSM:xn,borderColor:Cn,headerBorderRadius:zn,footerBg:si,footerColor:ht,cellFontSize:ii,cellFontSizeMD:ii,cellFontSizeSM:ii,headerSplitColor:Cn,fixedHeaderSortActiveBg:Kn,headerFilterHoverBg:Et,filterDropdownMenuBg:cn,filterDropdownBg:cn,expandIconBg:cn,selectionColumnWidth:Zn,stickyScrollBarBg:wi,stickyScrollBarBorderRadius:100}});const el=[],Id=(jt,Ut)=>{const{prefixCls:cn,className:ht,rootClassName:bt,style:Et,size:wn,bordered:fn,dropdownPrefixCls:an,dataSource:Sn,pagination:xn,rowSelection:Cn,rowKey:zn="key",rowClassName:ii,columns:Zn,children:wi,childrenColumnName:Kn,onChange:gi,getPopupContainer:si,loading:Ii,expandIcon:Oi,expandable:Ui,expandedRowRender:Ai,expandIconColumnIndex:Ni,indentSize:ar,scroll:ti,sortDirections:ji,locale:Li,showSorterTooltip:bi=!0,virtual:Yi}=jt,pi=he.useMemo(()=>Zn||St(wi),[Zn,wi]),lr=he.useMemo(()=>pi.some(ls=>ls.responsive),[pi]),Xi=(0,Qn.Z)(lr),Pi=he.useMemo(()=>{const ls=new Set(Object.keys(Xi).filter(js=>Xi[js]));return pi.filter(js=>!js.responsive||js.responsive.some(wa=>ls.has(wa)))},[pi,Xi]),Gi=(0,hr.Z)(jt,["className","style","columns"]),{locale:vr=or.Z,direction:er,table:So,renderEmpty:Co,getPrefixCls:is,getPopupContainer:so}=he.useContext(Yo.E_),kr=(0,Wi.Z)(wn),No=Object.assign(Object.assign({},vr.Table),Li),Nr=Sn||el,Xr=is("table",cn),rs=is("dropdown",an),Zr=Object.assign({childrenColumnName:Kn,expandIconColumnIndex:Ni},Ui),{childrenColumnName:Er="children"}=Zr,Jr=he.useMemo(()=>Nr.some(ls=>ls==null?void 0:ls[Er])?"nest":Ai||Ui&&Ui.expandedRowRender?"row":null,[Nr]),br={body:he.useRef()},ao=he.useMemo(()=>typeof zn=="function"?zn:ls=>ls==null?void 0:ls[zn],[zn]),[Lr]=Eu(Nr,Er,ao),ho={},Zo=function(ls,js){let wa=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var zs,os,Ma;const El=Object.assign(Object.assign({},ho),ls);wa&&((zs=ho.resetPagination)===null||zs===void 0||zs.call(ho),!((os=El.pagination)===null||os===void 0)&&os.current&&(El.pagination.current=1),xn&&xn.onChange&&xn.onChange(1,(Ma=El.pagination)===null||Ma===void 0?void 0:Ma.pageSize)),ti&&ti.scrollToFirstRowOnChange!==!1&&br.body.current&&(0,eo.Z)(0,{getContainer:()=>br.body.current}),gi==null||gi(El.pagination,El.filters,El.sorter,{currentDataSource:Wa(Wu(Nr,El.sorterStates,Er),El.filterStates),action:js})},Ko=(ls,js)=>{Zo({sorter:ls,sorterStates:js},"sort",!1)},[Qr,Io,Cs,Lo]=bh({prefixCls:Xr,mergedColumns:Pi,onSorterChange:Ko,sortDirections:ji||["ascend","descend"],tableLocale:No,showSorterTooltip:bi}),Jo=he.useMemo(()=>Wu(Nr,Io,Er),[Nr,Io]);ho.sorter=Lo(),ho.sorterStates=Io;const Ss=(ls,js)=>{Zo({filters:ls,filterStates:js},"filter",!0)},[Js,Pl,Qo]=yc({prefixCls:Xr,locale:No,dropdownPrefixCls:rs,mergedColumns:Pi,onFilterChange:Ss,getPopupContainer:si||so}),qo=Wa(Jo,Pl);ho.filters=Qo,ho.filterStates=Pl;const xs=he.useMemo(()=>{const ls={};return Object.keys(Qo).forEach(js=>{Qo[js]!==null&&(ls[js]=Qo[js])}),Object.assign(Object.assign({},Cs),{filters:ls})},[Cs,Qo]),[Ts]=Vs(xs),ma=(ls,js)=>{Zo({pagination:Object.assign(Object.assign({},ho.pagination),{current:ls,pageSize:js})},"paginate")},[jo,As]=th(qo.length,ma,xn);ho.pagination=xn===!1?{}:Lu(jo,xn),ho.resetPagination=As;const La=he.useMemo(()=>{if(xn===!1||!jo.pageSize)return qo;const{current:ls=1,total:js,pageSize:wa=Gu}=jo;return qo.length<js?qo.length>wa?qo.slice((ls-1)*wa,ls*wa):qo:qo.slice((ls-1)*wa,ls*wa)},[!!xn,qo,jo&&jo.current,jo&&jo.pageSize,jo&&jo.total]),[_l,Xl]=Bl({prefixCls:Xr,data:qo,pageData:La,getRowKey:ao,getRecordByKey:Lr,expandType:Jr,childrenColumnName:Er,locale:No,getPopupContainer:si||so},Cn),jl=(ls,js,wa)=>{let zs;return typeof ii=="function"?zs=at()(ii(ls,js,wa)):zs=at()(ii),at()({[`${Xr}-row-selected`]:Xl.has(ao(ls,js))},zs)};Zr.__PARENT_RENDER_ICON__=Zr.expandIcon,Zr.expandIcon=Zr.expandIcon||Oi||as(No),Jr==="nest"&&Zr.expandIconColumnIndex===void 0?Zr.expandIconColumnIndex=Cn?1:0:Zr.expandIconColumnIndex>0&&Cn&&(Zr.expandIconColumnIndex-=1),typeof Zr.indentSize!="number"&&(Zr.indentSize=typeof ar=="number"?ar:15);const cu=he.useCallback(ls=>Ts(_l(Js(Qr(ls)))),[Qr,Js,_l]);let hu,Jl;if(xn!==!1&&(jo!=null&&jo.total)){let ls;jo.size?ls=jo.size:ls=kr==="small"||kr==="middle"?"small":void 0;const js=os=>he.createElement(to.Z,Object.assign({},jo,{className:at()(`${Xr}-pagination ${Xr}-pagination-${os}`,jo.className),size:ls})),wa=er==="rtl"?"left":"right",{position:zs}=jo;if(zs!==null&&Array.isArray(zs)){const os=zs.find(Nu=>Nu.includes("top")),Ma=zs.find(Nu=>Nu.includes("bottom")),El=zs.every(Nu=>`${Nu}`=="none");!os&&!Ma&&!El&&(Jl=js(wa)),os&&(hu=js(os.toLowerCase().replace("top",""))),Ma&&(Jl=js(Ma.toLowerCase().replace("bottom","")))}else Jl=js(wa)}let gs;typeof Ii=="boolean"?gs={spinning:Ii}:typeof Ii=="object"&&(gs=Object.assign({spinning:!0},Ii));const[Ra,oa]=rc(Xr),[,Ns]=(0,Bo.Z)(),Ql=at()(`${Xr}-wrapper`,So==null?void 0:So.className,{[`${Xr}-wrapper-rtl`]:er==="rtl"},ht,bt,oa),_c=Object.assign(Object.assign({},So==null?void 0:So.style),Et),du=Li&&Li.emptyText||(Co==null?void 0:Co("Table"))||he.createElement(rr.Z,{componentName:"Table"}),Zu=Yi?Da:$r,sc={},zl=he.useMemo(()=>{const{fontSize:ls,lineHeight:js,padding:wa,paddingXS:zs,paddingSM:os}=Ns,Ma=Math.floor(ls*js);switch(kr){case"large":return wa*2+Ma;case"small":return zs*2+Ma;default:return os*2+Ma}},[Ns,kr]);return Yi&&(sc.listItemHeight=zl),Ra(he.createElement("div",{ref:Ut,className:Ql,style:_c},he.createElement(Ro.Z,Object.assign({spinning:!1},gs),hu,he.createElement(Zu,Object.assign({},sc,Gi,{columns:Pi,direction:er,expandable:Zr,prefixCls:Xr,className:at()({[`${Xr}-middle`]:kr==="middle",[`${Xr}-small`]:kr==="small",[`${Xr}-bordered`]:fn,[`${Xr}-empty`]:Nr.length===0}),data:La,rowKey:ao,rowClassName:jl,emptyText:du,internalHooks:me,internalRefs:br,transformColumns:cu})),Jl)))};var td=he.forwardRef(Id);const Dd=(jt,Ut)=>{const cn=he.useRef(0);return cn.current+=1,he.createElement(td,Object.assign({},jt,{ref:Ut,_renderTimes:cn.current}))},Oa=he.forwardRef(Dd);Oa.SELECTION_COLUMN=ra,Oa.EXPAND_COLUMN=Me,Oa.SELECTION_ALL=Ds,Oa.SELECTION_INVERT=bs,Oa.SELECTION_NONE=ks,Oa.Column=_r,Oa.ColumnGroup=Vr,Oa.Summary=Ie;var oc=Oa,gf=oc},12563:function(_n,qt,Ee){"use strict";Ee.d(qt,{default:function(){return Xe}});var Me=Ee(59301),me=Ee(99267),Be=Ee(92310),ke=Ee.n(Be),Ce=Ee(36785),Le=Ee(47729),he=Ee(14088),ye=Ee(36355),xe=Ee(17313),ge=Ee(37613),le=Ee(83116);const ve=Ge=>{const{paddingXXS:ft,lineWidth:at,tagPaddingHorizontal:Ct,componentCls:et}=Ge,yt=Ct-at,st=ft-at;return{[et]:Object.assign(Object.assign({},(0,xe.Wf)(Ge)),{display:"inline-block",height:"auto",marginInlineEnd:Ge.marginXS,paddingInline:yt,fontSize:Ge.tagFontSize,lineHeight:Ge.tagLineHeight,whiteSpace:"nowrap",background:Ge.defaultBg,border:`${Ge.lineWidth}px ${Ge.lineType} ${Ge.colorBorder}`,borderRadius:Ge.borderRadiusSM,opacity:1,transition:`all ${Ge.motionDurationMid}`,textAlign:"start",position:"relative",[`&${et}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:Ge.defaultColor},[`${et}-close-icon`]:{marginInlineStart:st,color:Ge.colorTextDescription,fontSize:Ge.tagIconSize,cursor:"pointer",transition:`all ${Ge.motionDurationMid}`,"&:hover":{color:Ge.colorTextHeading}},[`&${et}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${Ge.iconCls}-close, ${Ge.iconCls}-close:hover`]:{color:Ge.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${et}-checkable-checked):hover`]:{color:Ge.colorPrimary,backgroundColor:Ge.colorFillSecondary},"&:active, &-checked":{color:Ge.colorTextLightSolid},"&-checked":{backgroundColor:Ge.colorPrimary,"&:hover":{backgroundColor:Ge.colorPrimaryHover}},"&:active":{backgroundColor:Ge.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${Ge.iconCls} + span, > span + ${Ge.iconCls}`]:{marginInlineStart:yt}}),[`${et}-borderless`]:{borderColor:"transparent",background:Ge.tagBorderlessBg}}},de=Ge=>{const{lineWidth:ft,fontSizeIcon:at}=Ge,Ct=Ge.fontSizeSM,et=`${Ge.lineHeightSM*Ct}px`;return(0,ge.TS)(Ge,{tagFontSize:Ct,tagLineHeight:et,tagIconSize:at-2*ft,tagPaddingHorizontal:8,tagBorderlessBg:Ge.colorFillTertiary})},ce=Ge=>({defaultBg:Ge.colorFillQuaternary,defaultColor:Ge.colorText});var z=(0,le.Z)("Tag",Ge=>{const ft=de(Ge);return ve(ft)},ce),ee=function(Ge,ft){var at={};for(var Ct in Ge)Object.prototype.hasOwnProperty.call(Ge,Ct)&&ft.indexOf(Ct)<0&&(at[Ct]=Ge[Ct]);if(Ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var et=0,Ct=Object.getOwnPropertySymbols(Ge);et<Ct.length;et++)ft.indexOf(Ct[et])<0&&Object.prototype.propertyIsEnumerable.call(Ge,Ct[et])&&(at[Ct[et]]=Ge[Ct[et]]);return at},ie=Ge=>{const{prefixCls:ft,style:at,className:Ct,checked:et,onChange:yt,onClick:st}=Ge,zt=ee(Ge,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:lt,tag:tt}=Me.useContext(ye.E_),ut=Ht=>{yt==null||yt(!et),st==null||st(Ht)},mt=lt("tag",ft),[Pt,gt]=z(mt),Ft=ke()(mt,`${mt}-checkable`,{[`${mt}-checkable-checked`]:et},tt==null?void 0:tt.className,Ct,gt);return Pt(Me.createElement("span",Object.assign({},zt,{style:Object.assign(Object.assign({},at),tt==null?void 0:tt.style),className:Ft,onClick:ut})))},se=Ee(45157);const ue=Ge=>(0,se.Z)(Ge,(ft,at)=>{let{textColor:Ct,lightBorderColor:et,lightColor:yt,darkColor:st}=at;return{[`${Ge.componentCls}-${ft}`]:{color:Ct,background:yt,borderColor:et,"&-inverse":{color:Ge.colorTextLightSolid,background:st,borderColor:st},[`&${Ge.componentCls}-borderless`]:{borderColor:"transparent"}}}});var Se=(0,le.b)(["Tag","preset"],Ge=>{const ft=de(Ge);return ue(ft)},ce);function we(Ge){return typeof Ge!="string"?Ge:Ge.charAt(0).toUpperCase()+Ge.slice(1)}const Pe=(Ge,ft,at)=>{const Ct=we(at);return{[`${Ge.componentCls}-${ft}`]:{color:Ge[`color${at}`],background:Ge[`color${Ct}Bg`],borderColor:Ge[`color${Ct}Border`],[`&${Ge.componentCls}-borderless`]:{borderColor:"transparent"}}}};var Ae=(0,le.b)(["Tag","status"],Ge=>{const ft=de(Ge);return[Pe(ft,"success","Success"),Pe(ft,"processing","Info"),Pe(ft,"error","Error"),Pe(ft,"warning","Warning")]},ce),De=function(Ge,ft){var at={};for(var Ct in Ge)Object.prototype.hasOwnProperty.call(Ge,Ct)&&ft.indexOf(Ct)<0&&(at[Ct]=Ge[Ct]);if(Ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var et=0,Ct=Object.getOwnPropertySymbols(Ge);et<Ct.length;et++)ft.indexOf(Ct[et])<0&&Object.prototype.propertyIsEnumerable.call(Ge,Ct[et])&&(at[Ct[et]]=Ge[Ct[et]]);return at};const ze=(Ge,ft)=>{const{prefixCls:at,className:Ct,rootClassName:et,style:yt,children:st,icon:zt,color:lt,onClose:tt,closeIcon:ut,closable:mt,bordered:Pt=!0}=Ge,gt=De(Ge,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:Ft,direction:Ht,tag:hn}=Me.useContext(ye.E_),[Jt,bn]=Me.useState(!0);Me.useEffect(()=>{"visible"in gt&&bn(gt.visible)},[gt.visible]);const Wt=(0,Ce.o2)(lt),Kt=(0,Ce.yT)(lt),Xt=Wt||Kt,$t=Object.assign(Object.assign({backgroundColor:lt&&!Xt?lt:void 0},hn==null?void 0:hn.style),yt),kt=Ft("tag",at),[pt,Bt]=z(kt),xt=ke()(kt,hn==null?void 0:hn.className,{[`${kt}-${lt}`]:Xt,[`${kt}-has-color`]:lt&&!Xt,[`${kt}-hidden`]:!Jt,[`${kt}-rtl`]:Ht==="rtl",[`${kt}-borderless`]:!Pt},Ct,et,Bt),vt=be=>{be.stopPropagation(),tt==null||tt(be),!be.defaultPrevented&&bn(!1)},[,nt]=(0,Le.Z)(mt,ut,be=>be===null?Me.createElement(me.Z,{className:`${kt}-close-icon`,onClick:vt}):Me.createElement("span",{className:`${kt}-close-icon`,onClick:vt},be),null,!1),He=typeof gt.onClick=="function"||st&&st.type==="a",Ie=zt||null,We=Ie?Me.createElement(Me.Fragment,null,Ie,st&&Me.createElement("span",null,st)):st,Oe=Me.createElement("span",Object.assign({},gt,{ref:ft,className:xt,style:$t}),We,nt,Wt&&Me.createElement(Se,{key:"preset",prefixCls:kt}),Kt&&Me.createElement(Ae,{key:"status",prefixCls:kt}));return pt(He?Me.createElement(he.Z,{component:"Tag"},Oe):Oe)},Ze=Me.forwardRef(ze);Ze.CheckableTag=ie;var Xe=Ze},17574:function(_n,qt,Ee){"use strict";Ee.d(qt,{default:function(){return lt}});var Me=Ee(54844),me=Ee(80702),Be=Ee(52671),ke=Ee(8657),Ce=Ee(72308),Le=Ee(59301),he={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"},ye=he,xe=Ee(7657),ge=function(ut,mt){return Le.createElement(xe.Z,(0,Ce.Z)({},ut,{ref:mt,icon:ye}))},le=Le.forwardRef(ge),ve=le,de=Ee(92310),ce=Ee.n(de),z=Ee(35654),ee=Ee(71430),oe=Ee(36355),ie=Ee(56082),se=Ee(62892),ue=Ee(20648);const Se=4;function we(tt){const{dropPosition:ut,dropLevelOffset:mt,prefixCls:Pt,indent:gt,direction:Ft="ltr"}=tt,Ht=Ft==="ltr"?"left":"right",hn=Ft==="ltr"?"right":"left",Jt={[Ht]:-mt*gt+Se,[hn]:0};switch(ut){case-1:Jt.top=-3;break;case 1:Jt.bottom=-3;break;default:Jt.bottom=-3,Jt[Ht]=gt+Se;break}return Le.createElement("div",{style:Jt,className:`${Pt}-drop-indicator`})}var Pe=Ee(71997),De=Le.forwardRef((tt,ut)=>{const{getPrefixCls:mt,direction:Pt,virtual:gt,tree:Ft}=Le.useContext(oe.E_),{prefixCls:Ht,className:hn,showIcon:Jt=!1,showLine:bn,switcherIcon:Wt,blockNode:Kt=!1,children:Xt,checkable:$t=!1,selectable:kt=!0,draggable:pt,motion:Bt,style:xt}=tt,vt=mt("tree",Ht),nt=mt(),He=Bt!=null?Bt:Object.assign(Object.assign({},(0,se.Z)(nt)),{motionAppear:!1}),Ie=Object.assign(Object.assign({},tt),{checkable:$t,selectable:kt,showIcon:Jt,motion:He,blockNode:Kt,showLine:!!bn,dropIndicatorRender:we}),[We,Oe]=(0,ue.ZP)(vt),be=Le.useMemo(()=>{if(!pt)return!1;let $e={};switch(typeof pt){case"function":$e.nodeDraggable=pt;break;case"object":$e=Object.assign({},pt);break;default:break}return $e.icon!==!1&&($e.icon=$e.icon||Le.createElement(ie.Z,null)),$e},[pt]),Ne=$e=>Le.createElement(Pe.Z,{prefixCls:vt,switcherIcon:Wt,treeNodeProps:$e,showLine:bn});return We(Le.createElement(Me.Z,Object.assign({itemHeight:20,ref:ut,virtual:gt},Ie,{style:Object.assign(Object.assign({},Ft==null?void 0:Ft.style),xt),prefixCls:vt,className:ce()({[`${vt}-icon-hide`]:!Jt,[`${vt}-block-node`]:Kt,[`${vt}-unselectable`]:!kt,[`${vt}-rtl`]:Pt==="rtl"},Ft==null?void 0:Ft.className,hn,Oe),direction:Pt,checkable:$t&&Le.createElement("span",{className:`${vt}-checkbox-inner`}),selectable:kt,switcherIcon:Ne,draggable:be}),Xt))}),ze;(function(tt){tt[tt.None=0]="None",tt[tt.Start=1]="Start",tt[tt.End=2]="End"})(ze||(ze={}));function Ze(tt,ut){function mt(Pt){const{key:gt,children:Ft}=Pt;ut(gt,Pt)!==!1&&Ze(Ft||[],ut)}tt.forEach(mt)}function Xe(tt){let{treeData:ut,expandedKeys:mt,startKey:Pt,endKey:gt}=tt;const Ft=[];let Ht=ze.None;if(Pt&&Pt===gt)return[Pt];if(!Pt||!gt)return[];function hn(Jt){return Jt===Pt||Jt===gt}return Ze(ut,Jt=>{if(Ht===ze.End)return!1;if(hn(Jt)){if(Ft.push(Jt),Ht===ze.None)Ht=ze.Start;else if(Ht===ze.Start)return Ht=ze.End,!1}else Ht===ze.Start&&Ft.push(Jt);return mt.includes(Jt)}),Ft}function Ge(tt,ut){const mt=(0,me.Z)(ut),Pt=[];return Ze(tt,(gt,Ft)=>{const Ht=mt.indexOf(gt);return Ht!==-1&&(Pt.push(Ft),mt.splice(Ht,1)),!!mt.length}),Pt}var ft=function(tt,ut){var mt={};for(var Pt in tt)Object.prototype.hasOwnProperty.call(tt,Pt)&&ut.indexOf(Pt)<0&&(mt[Pt]=tt[Pt]);if(tt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var gt=0,Pt=Object.getOwnPropertySymbols(tt);gt<Pt.length;gt++)ut.indexOf(Pt[gt])<0&&Object.prototype.propertyIsEnumerable.call(tt,Pt[gt])&&(mt[Pt[gt]]=tt[Pt[gt]]);return mt};function at(tt){const{isLeaf:ut,expanded:mt}=tt;return ut?Le.createElement(Be.Z,null):mt?Le.createElement(ke.Z,null):Le.createElement(ve,null)}function Ct(tt){let{treeData:ut,children:mt}=tt;return ut||(0,ee.zn)(mt)}const et=(tt,ut)=>{var{defaultExpandAll:mt,defaultExpandParent:Pt,defaultExpandedKeys:gt}=tt,Ft=ft(tt,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const Ht=Le.useRef(),hn=Le.useRef(),Jt=()=>{const{keyEntities:be}=(0,ee.I8)(Ct(Ft));let Ne;return mt?Ne=Object.keys(be):Pt?Ne=(0,z.r7)(Ft.expandedKeys||gt||[],be):Ne=Ft.expandedKeys||gt,Ne},[bn,Wt]=Le.useState(Ft.selectedKeys||Ft.defaultSelectedKeys||[]),[Kt,Xt]=Le.useState(()=>Jt());Le.useEffect(()=>{"selectedKeys"in Ft&&Wt(Ft.selectedKeys)},[Ft.selectedKeys]),Le.useEffect(()=>{"expandedKeys"in Ft&&Xt(Ft.expandedKeys)},[Ft.expandedKeys]);const $t=(be,Ne)=>{var $e;return"expandedKeys"in Ft||Xt(be),($e=Ft.onExpand)===null||$e===void 0?void 0:$e.call(Ft,be,Ne)},kt=(be,Ne)=>{var $e;const{multiple:dt}=Ft,{node:Je,nativeEvent:At}=Ne,{key:en=""}=Je,pn=Ct(Ft),ln=Object.assign(Object.assign({},Ne),{selected:!0}),gn=(At==null?void 0:At.ctrlKey)||(At==null?void 0:At.metaKey),Un=At==null?void 0:At.shiftKey;let An;dt&&gn?(An=be,Ht.current=en,hn.current=An,ln.selectedNodes=Ge(pn,An)):dt&&Un?(An=Array.from(new Set([].concat((0,me.Z)(hn.current||[]),(0,me.Z)(Xe({treeData:pn,expandedKeys:Kt,startKey:en,endKey:Ht.current}))))),ln.selectedNodes=Ge(pn,An)):(An=[en],Ht.current=en,hn.current=An,ln.selectedNodes=Ge(pn,An)),($e=Ft.onSelect)===null||$e===void 0||$e.call(Ft,An,ln),"selectedKeys"in Ft||Wt(An)},{getPrefixCls:pt,direction:Bt}=Le.useContext(oe.E_),{prefixCls:xt,className:vt,showIcon:nt=!0,expandAction:He="click"}=Ft,Ie=ft(Ft,["prefixCls","className","showIcon","expandAction"]),We=pt("tree",xt),Oe=ce()(`${We}-directory`,{[`${We}-directory-rtl`]:Bt==="rtl"},vt);return Le.createElement(De,Object.assign({icon:at,ref:ut,blockNode:!0},Ie,{showIcon:nt,expandAction:He,prefixCls:We,className:Oe,expandedKeys:Kt,selectedKeys:bn,onSelect:kt,onExpand:$t}))};var st=Le.forwardRef(et);const zt=De;zt.DirectoryTree=st,zt.TreeNode=Me.O;var lt=zt},20648:function(_n,qt,Ee){"use strict";Ee.d(qt,{TM:function(){return de},Yk:function(){return ve}});var Me=Ee(93083),me=Ee(98447),Be=Ee(17313),ke=Ee(8378),Ce=Ee(37613),Le=Ee(83116);const he=new Me.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),ye=(ce,z)=>({[`.${ce}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${z.motionDurationSlow}`}}}),xe=(ce,z)=>({[`.${ce}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:z.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${z.lineWidthBold}px solid ${z.colorPrimary}`,borderRadius:"50%",content:'""'}}}),ge=(ce,z)=>{const{treeCls:ee,treeNodeCls:oe,treeNodePadding:ie,titleHeight:se,nodeSelectedBg:ue,nodeHoverBg:Se}=z,we=z.paddingXS;return{[ee]:Object.assign(Object.assign({},(0,Be.Wf)(z)),{background:z.colorBgContainer,borderRadius:z.borderRadius,transition:`background-color ${z.motionDurationSlow}`,[`&${ee}-rtl`]:{[`${ee}-switcher`]:{"&_close":{[`${ee}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${ee}-active-focused)`]:Object.assign({},(0,Be.oN)(z)),[`${ee}-list-holder-inner`]:{alignItems:"flex-start"},[`&${ee}-block-node`]:{[`${ee}-list-holder-inner`]:{alignItems:"stretch",[`${ee}-node-content-wrapper`]:{flex:"auto"},[`${oe}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:ie,insetInlineStart:0,border:`1px solid ${z.colorPrimary}`,opacity:0,animationName:he,animationDuration:z.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${oe}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${ie}px 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${ee}-node-content-wrapper`]:{color:z.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${ee}-node-content-wrapper`]:Object.assign({},(0,Be.oN)(z)),[`&:not(${oe}-disabled).filter-node ${ee}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${ee}-draggable-icon`]:{flexShrink:0,width:se,lineHeight:`${se}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${z.motionDurationSlow}`,[`${oe}:hover &`]:{opacity:.45}},[`&${oe}-disabled`]:{[`${ee}-draggable-icon`]:{visibility:"hidden"}}}},[`${ee}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:se}},[`${ee}-draggable-icon`]:{visibility:"hidden"},[`${ee}-switcher`]:Object.assign(Object.assign({},ye(ce,z)),{position:"relative",flex:"none",alignSelf:"stretch",width:se,margin:0,lineHeight:`${se}px`,textAlign:"center",cursor:"pointer",userSelect:"none","&-noop":{cursor:"default"},"&_close":{[`${ee}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:z.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:se/2,bottom:-ie,marginInlineStart:-1,borderInlineEnd:`1px solid ${z.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:se/2*.8,height:se/2,borderBottom:`1px solid ${z.colorBorder}`,content:'""'}}}),[`${ee}-checkbox`]:{top:"initial",marginInlineEnd:we},[`${ee}-node-content-wrapper, ${ee}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:se,margin:0,padding:`0 ${z.paddingXS/2}px`,color:"inherit",lineHeight:`${se}px`,background:"transparent",borderRadius:z.borderRadius,cursor:"pointer",transition:`all ${z.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:Se},[`&${ee}-node-selected`]:{backgroundColor:ue},[`${ee}-iconEle`]:{display:"inline-block",width:se,height:se,lineHeight:`${se}px`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${ee}-unselectable ${ee}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${ee}-node-content-wrapper`]:Object.assign({lineHeight:`${se}px`,userSelect:"none"},xe(ce,z)),[`${oe}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${z.colorPrimary}`}},"&-show-line":{[`${ee}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:se/2,bottom:-ie,borderInlineEnd:`1px solid ${z.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${ee}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${oe}-leaf-last`]:{[`${ee}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${se/2}px !important`}}}}})}},le=ce=>{const{treeCls:z,treeNodeCls:ee,treeNodePadding:oe,directoryNodeSelectedBg:ie,directoryNodeSelectedColor:se}=ce;return{[`${z}${z}-directory`]:{[ee]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:oe,insetInlineStart:0,transition:`background-color ${ce.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:ce.controlItemBgHover}},"> *":{zIndex:1},[`${z}-switcher`]:{transition:`color ${ce.motionDurationMid}`},[`${z}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${z}-node-selected`]:{color:se,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:ie},[`${z}-switcher`]:{color:se},[`${z}-node-content-wrapper`]:{color:se,background:"transparent"}}}}}},ve=(ce,z)=>{const ee=`.${ce}`,oe=`${ee}-treenode`,ie=z.paddingXS/2,se=(0,Ce.TS)(z,{treeCls:ee,treeNodeCls:oe,treeNodePadding:ie});return[ge(ce,se),le(se)]},de=ce=>{const{controlHeightSM:z}=ce;return{titleHeight:z,nodeHoverBg:ce.controlItemBgHover,nodeSelectedBg:ce.controlItemBgActive}};qt.ZP=(0,Le.Z)("Tree",(ce,z)=>{let{prefixCls:ee}=z;return[{[ce.componentCls]:(0,me.C2)(`${ee}-checkbox`,ce)},ve(ee,ce),(0,ke.Z)(ce)]},ce=>{const{colorTextLightSolid:z,colorPrimary:ee}=ce;return Object.assign(Object.assign({},de(ce)),{directoryNodeSelectedColor:z,directoryNodeSelectedBg:ee})})},71997:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return oe}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(se,ue){return me.createElement(Ce.Z,(0,Me.Z)({},se,{ref:ue,icon:ke}))},he=me.forwardRef(Le),ye=he,xe=Ee(52671),ge=Ee(58617),le=Ee(15075),ve=Ee(43531),de=Ee(92310),ce=Ee.n(de),z=Ee(92343),oe=ie=>{const{prefixCls:se,switcherIcon:ue,treeNodeProps:Se,showLine:we}=ie,{isLeaf:Pe,expanded:Ae,loading:De}=Se;if(De)return me.createElement(ge.Z,{className:`${se}-switcher-loading-icon`});let ze;if(we&&typeof we=="object"&&(ze=we.showLeafIcon),Pe){if(!we)return null;if(typeof ze!="boolean"&&ze){const Ge=typeof ze=="function"?ze(Se):ze,ft=`${se}-switcher-line-custom-icon`;return(0,z.l$)(Ge)?(0,z.Tm)(Ge,{className:ce()(Ge.props.className||"",ft)}):Ge}return ze?me.createElement(xe.Z,{className:`${se}-switcher-line-icon`}):me.createElement("span",{className:`${se}-switcher-leaf-line`})}const Ze=`${se}-switcher-icon`,Xe=typeof ue=="function"?ue(Se):ue;return(0,z.l$)(Xe)?(0,z.Tm)(Xe,{className:ce()(Xe.props.className||"",Ze)}):Xe!==void 0?Xe:we?Ae?me.createElement(le.Z,{className:`${se}-switcher-line-icon`}):me.createElement(ve.Z,{className:`${se}-switcher-line-icon`}):me.createElement(ye,{className:Ze})}},99498:function(_n,qt,Ee){(function(Me){Me(Ee(89780))})(function(Me){Me.defineOption("placeholder","",function(ye,xe,ge){var le=ge&&ge!=Me.Init;if(xe&&!le)ye.on("blur",Ce),ye.on("change",Le),ye.on("swapDoc",Le),Me.on(ye.getInputField(),"compositionupdate",ye.state.placeholderCompose=function(){ke(ye)}),Le(ye);else if(!xe&&le){ye.off("blur",Ce),ye.off("change",Le),ye.off("swapDoc",Le),Me.off(ye.getInputField(),"compositionupdate",ye.state.placeholderCompose),me(ye);var ve=ye.getWrapperElement();ve.className=ve.className.replace(" CodeMirror-empty","")}xe&&!ye.hasFocus()&&Ce(ye)});function me(ye){ye.state.placeholder&&(ye.state.placeholder.parentNode.removeChild(ye.state.placeholder),ye.state.placeholder=null)}function Be(ye){me(ye);var xe=ye.state.placeholder=document.createElement("pre");xe.style.cssText="height: 0; overflow: visible",xe.style.direction=ye.getOption("direction"),xe.className="CodeMirror-placeholder CodeMirror-line-like";var ge=ye.getOption("placeholder");typeof ge=="string"&&(ge=document.createTextNode(ge)),xe.appendChild(ge),ye.display.lineSpace.insertBefore(xe,ye.display.lineSpace.firstChild)}function ke(ye){setTimeout(function(){var xe=!1,ge=ye.getInputField();ge.nodeName=="TEXTAREA"?xe=!ge.value:ye.lineCount()==1&&(xe=!/[^\u200b]/.test(ge.querySelector(".CodeMirror-line").textContent)),xe?Be(ye):me(ye)},20)}function Ce(ye){he(ye)&&Be(ye)}function Le(ye){var xe=ye.getWrapperElement(),ge=he(ye);xe.className=xe.className.replace(" CodeMirror-empty","")+(ge?" CodeMirror-empty":""),ge?Be(ye):me(ye)}function he(ye){return ye.lineCount()===1&&ye.getLine(0)===""}})},25717:function(_n,qt,Ee){(function(Me){Me(Ee(89780))})(function(Me){var me={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Be=Me.Pos;Me.defineOption("autoCloseBrackets",!1,function(z,ee,oe){oe&&oe!=Me.Init&&(z.removeKeyMap(Ce),z.state.closeBrackets=null),ee&&(Le(ke(ee,"pairs")),z.state.closeBrackets=ee,z.addKeyMap(Ce))});function ke(z,ee){return ee=="pairs"&&typeof z=="string"?z:typeof z=="object"&&z[ee]!=null?z[ee]:me[ee]}var Ce={Backspace:xe,Enter:ge};function Le(z){for(var ee=0;ee<z.length;ee++){var oe=z.charAt(ee),ie="'"+oe+"'";Ce[ie]||(Ce[ie]=he(oe))}}Le(me.pairs+"`");function he(z){return function(ee){return ve(ee,z)}}function ye(z){var ee=z.state.closeBrackets;if(!ee||ee.override)return ee;var oe=z.getModeAt(z.getCursor());return oe.closeBrackets||ee}function xe(z){var ee=ye(z);if(!ee||z.getOption("disableInput"))return Me.Pass;for(var oe=ke(ee,"pairs"),ie=z.listSelections(),se=0;se<ie.length;se++){if(!ie[se].empty())return Me.Pass;var ue=de(z,ie[se].head);if(!ue||oe.indexOf(ue)%2!=0)return Me.Pass}for(var se=ie.length-1;se>=0;se--){var Se=ie[se].head;z.replaceRange("",Be(Se.line,Se.ch-1),Be(Se.line,Se.ch+1),"+delete")}}function ge(z){var ee=ye(z),oe=ee&&ke(ee,"explode");if(!oe||z.getOption("disableInput"))return Me.Pass;for(var ie=z.listSelections(),se=0;se<ie.length;se++){if(!ie[se].empty())return Me.Pass;var ue=de(z,ie[se].head);if(!ue||oe.indexOf(ue)%2!=0)return Me.Pass}z.operation(function(){var Se=z.lineSeparator()||`
|
|
|
`;z.replaceSelection(Se+Se,null),z.execCommand("goCharLeft"),ie=z.listSelections();for(var we=0;we<ie.length;we++){var Pe=ie[we].head.line;z.indentLine(Pe,null,!0),z.indentLine(Pe+1,null,!0)}})}function le(z){var ee=Me.cmpPos(z.anchor,z.head)>0;return{anchor:new Be(z.anchor.line,z.anchor.ch+(ee?-1:1)),head:new Be(z.head.line,z.head.ch+(ee?1:-1))}}function ve(z,ee){var oe=ye(z);if(!oe||z.getOption("disableInput"))return Me.Pass;var ie=ke(oe,"pairs"),se=ie.indexOf(ee);if(se==-1)return Me.Pass;for(var ue=ke(oe,"closeBefore"),Se=ke(oe,"triples"),we=ie.charAt(se+1)==ee,Pe=z.listSelections(),Ae=se%2==0,De,ze=0;ze<Pe.length;ze++){var Ze=Pe[ze],Xe=Ze.head,Ge,ft=z.getRange(Xe,Be(Xe.line,Xe.ch+1));if(Ae&&!Ze.empty())Ge="surround";else if((we||!Ae)&&ft==ee)we&&ce(z,Xe)?Ge="both":Se.indexOf(ee)>=0&&z.getRange(Xe,Be(Xe.line,Xe.ch+3))==ee+ee+ee?Ge="skipThree":Ge="skip";else if(we&&Xe.ch>1&&Se.indexOf(ee)>=0&&z.getRange(Be(Xe.line,Xe.ch-2),Xe)==ee+ee){if(Xe.ch>2&&/\bstring/.test(z.getTokenTypeAt(Be(Xe.line,Xe.ch-2))))return Me.Pass;Ge="addFour"}else if(we){var at=Xe.ch==0?" ":z.getRange(Be(Xe.line,Xe.ch-1),Xe);if(!Me.isWordChar(ft)&&at!=ee&&!Me.isWordChar(at))Ge="both";else return Me.Pass}else if(Ae&&(ft.length===0||/\s/.test(ft)||ue.indexOf(ft)>-1))Ge="both";else return Me.Pass;if(!De)De=Ge;else if(De!=Ge)return Me.Pass}var Ct=se%2?ie.charAt(se-1):ee,et=se%2?ee:ie.charAt(se+1);z.operation(function(){if(De=="skip")z.execCommand("goCharRight");else if(De=="skipThree")for(var yt=0;yt<3;yt++)z.execCommand("goCharRight");else if(De=="surround"){for(var st=z.getSelections(),yt=0;yt<st.length;yt++)st[yt]=Ct+st[yt]+et;z.replaceSelections(st,"around"),st=z.listSelections().slice();for(var yt=0;yt<st.length;yt++)st[yt]=le(st[yt]);z.setSelections(st)}else De=="both"?(z.replaceSelection(Ct+et,null),z.triggerElectric(Ct+et),z.execCommand("goCharLeft")):De=="addFour"&&(z.replaceSelection(Ct+Ct+Ct+Ct,"before"),z.execCommand("goCharRight"))})}function de(z,ee){var oe=z.getRange(Be(ee.line,ee.ch-1),Be(ee.line,ee.ch+1));return oe.length==2?oe:null}function ce(z,ee){var oe=z.getTokenAt(Be(ee.line,ee.ch+1));return/\bstring/.test(oe.type)&&oe.start==ee.ch&&(ee.ch==0||!/\bstring/.test(z.getTokenTypeAt(ee)))}})},6313:function(_n,qt,Ee){(function(Me){Me(Ee(89780),Ee(32855))})(function(Me){Me.defineOption("autoCloseTags",!1,function(xe,ge,le){if(le!=Me.Init&&le&&xe.removeKeyMap("autoCloseTags"),!!ge){var ve={name:"autoCloseTags"};(typeof ge!="object"||ge.whenClosing!==!1)&&(ve["'/'"]=function(de){return Le(de)}),(typeof ge!="object"||ge.whenOpening!==!1)&&(ve["'>'"]=function(de){return ke(de)}),xe.addKeyMap(ve)}});var me=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Be=["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 ke(xe){if(xe.getOption("disableInput"))return Me.Pass;for(var ge=xe.listSelections(),le=[],ve=xe.getOption("autoCloseTags"),de=0;de<ge.length;de++){if(!ge[de].empty())return Me.Pass;var ce=ge[de].head,z=xe.getTokenAt(ce),ee=Me.innerMode(xe.getMode(),z.state),oe=ee.state,ie=ee.mode.xmlCurrentTag&&ee.mode.xmlCurrentTag(oe),se=ie&&ie.name;if(!se)return Me.Pass;var ue=ee.mode.configuration=="html",Se=typeof ve=="object"&&ve.dontCloseTags||ue&&me,we=typeof ve=="object"&&ve.indentTags||ue&&Be;z.end>ce.ch&&(se=se.slice(0,se.length-z.end+ce.ch));var Pe=se.toLowerCase();if(!se||z.type=="string"&&(z.end!=ce.ch||!/[\"\']/.test(z.string.charAt(z.string.length-1))||z.string.length==1)||z.type=="tag"&&ie.close||z.string.indexOf("/")==ce.ch-z.start-1||Se&&he(Se,Pe)>-1||ye(xe,ee.mode.xmlCurrentContext&&ee.mode.xmlCurrentContext(oe)||[],se,ce,!0))return Me.Pass;var Ae=typeof ve=="object"&&ve.emptyTags;if(Ae&&he(Ae,se)>-1){le[de]={text:"/>",newPos:Me.Pos(ce.line,ce.ch+2)};continue}var De=we&&he(we,Pe)>-1;le[de]={indent:De,text:">"+(De?`
|
|
|
|
|
|
`:"")+"</"+se+">",newPos:De?Me.Pos(ce.line+1,0):Me.Pos(ce.line,ce.ch+1)}}for(var ze=typeof ve=="object"&&ve.dontIndentOnAutoClose,de=ge.length-1;de>=0;de--){var Ze=le[de];xe.replaceRange(Ze.text,ge[de].head,ge[de].anchor,"+insert");var Xe=xe.listSelections().slice(0);Xe[de]={head:Ze.newPos,anchor:Ze.newPos},xe.setSelections(Xe),!ze&&Ze.indent&&(xe.indentLine(Ze.newPos.line,null,!0),xe.indentLine(Ze.newPos.line+1,null,!0))}}function Ce(xe,ge){for(var le=xe.listSelections(),ve=[],de=ge?"/":"</",ce=xe.getOption("autoCloseTags"),z=typeof ce=="object"&&ce.dontIndentOnSlash,ee=0;ee<le.length;ee++){if(!le[ee].empty())return Me.Pass;var oe=le[ee].head,ie=xe.getTokenAt(oe),se=Me.innerMode(xe.getMode(),ie.state),ue=se.state;if(ge&&(ie.type=="string"||ie.string.charAt(0)!="<"||ie.start!=oe.ch-1))return Me.Pass;var Se,we=se.mode.name!="xml"&&xe.getMode().name=="htmlmixed";if(we&&se.mode.name=="javascript")Se=de+"script";else if(we&&se.mode.name=="css")Se=de+"style";else{var Pe=se.mode.xmlCurrentContext&&se.mode.xmlCurrentContext(ue);if(!Pe||Pe.length&&ye(xe,Pe,Pe[Pe.length-1],oe))return Me.Pass;Se=de+Pe[Pe.length-1]}xe.getLine(oe.line).charAt(ie.end)!=">"&&(Se+=">"),ve[ee]=Se}if(xe.replaceSelections(ve),le=xe.listSelections(),!z)for(var ee=0;ee<le.length;ee++)(ee==le.length-1||le[ee].head.line<le[ee+1].head.line)&&xe.indentLine(le[ee].head.line)}function Le(xe){return xe.getOption("disableInput")?Me.Pass:Ce(xe,!0)}Me.commands.closeTag=function(xe){return Ce(xe)};function he(xe,ge){if(xe.indexOf)return xe.indexOf(ge);for(var le=0,ve=xe.length;le<ve;++le)if(xe[le]==ge)return le;return-1}function ye(xe,ge,le,ve,de){if(!Me.scanForClosingTag)return!1;var ce=Math.min(xe.lastLine()+1,ve.line+500),z=Me.scanForClosingTag(xe,ve,null,ce);if(!z||z.tag!=le)return!1;for(var ee=de?1:0,oe=ge.length-1;oe>=0&&ge[oe]==le;oe--)++ee;ve=z.to;for(var oe=1;oe<ee;oe++){var ie=Me.scanForClosingTag(xe,ve,null,ce);if(!ie||ie.tag!=le)return!1;ve=ie.to}return!0}})},32855:function(_n,qt,Ee){(function(Me){Me(Ee(89780))})(function(Me){"use strict";var me=Me.Pos;function Be(oe,ie){return oe.line-ie.line||oe.ch-ie.ch}var ke="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",Ce=ke+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Le=new RegExp("<(/?)(["+ke+"]["+Ce+"]*)","g");function he(oe,ie,se,ue){this.line=ie,this.ch=se,this.cm=oe,this.text=oe.getLine(ie),this.min=ue?Math.max(ue.from,oe.firstLine()):oe.firstLine(),this.max=ue?Math.min(ue.to-1,oe.lastLine()):oe.lastLine()}function ye(oe,ie){var se=oe.cm.getTokenTypeAt(me(oe.line,ie));return se&&/\btag\b/.test(se)}function xe(oe){if(!(oe.line>=oe.max))return oe.ch=0,oe.text=oe.cm.getLine(++oe.line),!0}function ge(oe){if(!(oe.line<=oe.min))return oe.text=oe.cm.getLine(--oe.line),oe.ch=oe.text.length,!0}function le(oe){for(;;){var ie=oe.text.indexOf(">",oe.ch);if(ie==-1){if(xe(oe))continue;return}if(!ye(oe,ie+1)){oe.ch=ie+1;continue}var se=oe.text.lastIndexOf("/",ie),ue=se>-1&&!/\S/.test(oe.text.slice(se+1,ie));return oe.ch=ie+1,ue?"selfClose":"regular"}}function ve(oe){for(;;){var ie=oe.ch?oe.text.lastIndexOf("<",oe.ch-1):-1;if(ie==-1){if(ge(oe))continue;return}if(!ye(oe,ie+1)){oe.ch=ie;continue}Le.lastIndex=ie,oe.ch=ie;var se=Le.exec(oe.text);if(se&&se.index==ie)return se}}function de(oe){for(;;){Le.lastIndex=oe.ch;var ie=Le.exec(oe.text);if(!ie){if(xe(oe))continue;return}if(!ye(oe,ie.index+1)){oe.ch=ie.index+1;continue}return oe.ch=ie.index+ie[0].length,ie}}function ce(oe){for(;;){var ie=oe.ch?oe.text.lastIndexOf(">",oe.ch-1):-1;if(ie==-1){if(ge(oe))continue;return}if(!ye(oe,ie+1)){oe.ch=ie;continue}var se=oe.text.lastIndexOf("/",ie),ue=se>-1&&!/\S/.test(oe.text.slice(se+1,ie));return oe.ch=ie+1,ue?"selfClose":"regular"}}function z(oe,ie){for(var se=[];;){var ue=de(oe),Se,we=oe.line,Pe=oe.ch-(ue?ue[0].length:0);if(!ue||!(Se=le(oe)))return;if(Se!="selfClose")if(ue[1]){for(var Ae=se.length-1;Ae>=0;--Ae)if(se[Ae]==ue[2]){se.length=Ae;break}if(Ae<0&&(!ie||ie==ue[2]))return{tag:ue[2],from:me(we,Pe),to:me(oe.line,oe.ch)}}else se.push(ue[2])}}function ee(oe,ie){for(var se=[];;){var ue=ce(oe);if(!ue)return;if(ue=="selfClose"){ve(oe);continue}var Se=oe.line,we=oe.ch,Pe=ve(oe);if(!Pe)return;if(Pe[1])se.push(Pe[2]);else{for(var Ae=se.length-1;Ae>=0;--Ae)if(se[Ae]==Pe[2]){se.length=Ae;break}if(Ae<0&&(!ie||ie==Pe[2]))return{tag:Pe[2],from:me(oe.line,oe.ch),to:me(Se,we)}}}}Me.registerHelper("fold","xml",function(oe,ie){for(var se=new he(oe,ie.line,0);;){var ue=de(se);if(!ue||se.line!=ie.line)return;var Se=le(se);if(!Se)return;if(!ue[1]&&Se!="selfClose"){var we=me(se.line,se.ch),Pe=z(se,ue[2]);return Pe&&Be(Pe.from,we)>0?{from:we,to:Pe.from}:null}}}),Me.findMatchingTag=function(oe,ie,se){var ue=new he(oe,ie.line,ie.ch,se);if(!(ue.text.indexOf(">")==-1&&ue.text.indexOf("<")==-1)){var Se=le(ue),we=Se&&me(ue.line,ue.ch),Pe=Se&&ve(ue);if(!(!Se||!Pe||Be(ue,ie)>0)){var Ae={from:me(ue.line,ue.ch),to:we,tag:Pe[2]};return Se=="selfClose"?{open:Ae,close:null,at:"open"}:Pe[1]?{open:ee(ue,Pe[2]),close:Ae,at:"close"}:(ue=new he(oe,we.line,we.ch,se),{open:Ae,close:z(ue,Pe[2]),at:"open"})}}},Me.findEnclosingTag=function(oe,ie,se,ue){for(var Se=new he(oe,ie.line,ie.ch,se);;){var we=ee(Se,ue);if(!we)break;var Pe=new he(oe,ie.line,ie.ch,se),Ae=z(Pe,we.tag);if(Ae)return{open:we,close:Ae}}},Me.scanForClosingTag=function(oe,ie,se,ue){var Se=new he(oe,ie.line,ie.ch,ue?{from:0,to:ue}:null);return z(Se,se)}})},89780:function(_n){(function(qt,Ee){_n.exports=Ee()})(this,function(){"use strict";var qt=navigator.userAgent,Ee=navigator.platform,Me=/gecko\/\d/i.test(qt),me=/MSIE \d/.test(qt),Be=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(qt),ke=/Edge\/(\d+)/.exec(qt),Ce=me||Be||ke,Le=Ce&&(me?document.documentMode||6:+(ke||Be)[1]),he=!ke&&/WebKit\//.test(qt),ye=he&&/Qt\/\d+\.\d+/.test(qt),xe=!ke&&/Chrome\//.test(qt),ge=/Opera\//.test(qt),le=/Apple Computer/.test(navigator.vendor),ve=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(qt),de=/PhantomJS/.test(qt),ce=!ke&&/AppleWebKit/.test(qt)&&/Mobile\/\w+/.test(qt),z=/Android/.test(qt),ee=ce||z||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(qt),oe=ce||/Mac/.test(Ee),ie=/\bCrOS\b/.test(qt),se=/win/i.test(Ee),ue=ge&&qt.match(/Version\/(\d*\.\d*)/);ue&&(ue=Number(ue[1])),ue&&ue>=15&&(ge=!1,he=!0);var Se=oe&&(ye||ge&&(ue==null||ue<12.11)),we=Me||Ce&&Le>=9;function Pe(re){return new RegExp("(^|\\s)"+re+"(?:$|\\s)\\s*")}var Ae=function(re,pe){var Fe=re.className,Re=Pe(pe).exec(Fe);if(Re){var Ue=Fe.slice(Re.index+Re[0].length);re.className=Fe.slice(0,Re.index)+(Ue?Re[1]+Ue:"")}};function De(re){for(var pe=re.childNodes.length;pe>0;--pe)re.removeChild(re.firstChild);return re}function ze(re,pe){return De(re).appendChild(pe)}function Ze(re,pe,Fe,Re){var Ue=document.createElement(re);if(Fe&&(Ue.className=Fe),Re&&(Ue.style.cssText=Re),typeof pe=="string")Ue.appendChild(document.createTextNode(pe));else if(pe)for(var ot=0;ot<pe.length;++ot)Ue.appendChild(pe[ot]);return Ue}function Xe(re,pe,Fe,Re){var Ue=Ze(re,pe,Fe,Re);return Ue.setAttribute("role","presentation"),Ue}var Ge;document.createRange?Ge=function(re,pe,Fe,Re){var Ue=document.createRange();return Ue.setEnd(Re||re,Fe),Ue.setStart(re,pe),Ue}:Ge=function(re,pe,Fe){var Re=document.body.createTextRange();try{Re.moveToElementText(re.parentNode)}catch(Ue){return Re}return Re.collapse(!0),Re.moveEnd("character",Fe),Re.moveStart("character",pe),Re};function ft(re,pe){if(pe.nodeType==3&&(pe=pe.parentNode),re.contains)return re.contains(pe);do if(pe.nodeType==11&&(pe=pe.host),pe==re)return!0;while(pe=pe.parentNode)}function at(){var re;try{re=document.activeElement}catch(pe){re=document.body||null}for(;re&&re.shadowRoot&&re.shadowRoot.activeElement;)re=re.shadowRoot.activeElement;return re}function Ct(re,pe){var Fe=re.className;Pe(pe).test(Fe)||(re.className+=(Fe?" ":"")+pe)}function et(re,pe){for(var Fe=re.split(" "),Re=0;Re<Fe.length;Re++)Fe[Re]&&!Pe(Fe[Re]).test(pe)&&(pe+=" "+Fe[Re]);return pe}var yt=function(re){re.select()};ce?yt=function(re){re.selectionStart=0,re.selectionEnd=re.value.length}:Ce&&(yt=function(re){try{re.select()}catch(pe){}});function st(re){var pe=Array.prototype.slice.call(arguments,1);return function(){return re.apply(null,pe)}}function zt(re,pe,Fe){pe||(pe={});for(var Re in re)re.hasOwnProperty(Re)&&(Fe!==!1||!pe.hasOwnProperty(Re))&&(pe[Re]=re[Re]);return pe}function lt(re,pe,Fe,Re,Ue){pe==null&&(pe=re.search(/[^\s\u00a0]/),pe==-1&&(pe=re.length));for(var ot=Re||0,wt=Ue||0;;){var Rt=re.indexOf(" ",ot);if(Rt<0||Rt>=pe)return wt+(pe-ot);wt+=Rt-ot,wt+=Fe-wt%Fe,ot=Rt+1}}var tt=function(){this.id=null,this.f=null,this.time=0,this.handler=st(this.onTimeout,this)};tt.prototype.onTimeout=function(re){re.id=0,re.time<=+new Date?re.f():setTimeout(re.handler,re.time-+new Date)},tt.prototype.set=function(re,pe){this.f=pe;var Fe=+new Date+re;(!this.id||Fe<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,re),this.time=Fe)};function ut(re,pe){for(var Fe=0;Fe<re.length;++Fe)if(re[Fe]==pe)return Fe;return-1}var mt=50,Pt={toString:function(){return"CodeMirror.Pass"}},gt={scroll:!1},Ft={origin:"*mouse"},Ht={origin:"+move"};function hn(re,pe,Fe){for(var Re=0,Ue=0;;){var ot=re.indexOf(" ",Re);ot==-1&&(ot=re.length);var wt=ot-Re;if(ot==re.length||Ue+wt>=pe)return Re+Math.min(wt,pe-Ue);if(Ue+=ot-Re,Ue+=Fe-Ue%Fe,Re=ot+1,Ue>=pe)return Re}}var Jt=[""];function bn(re){for(;Jt.length<=re;)Jt.push(Wt(Jt)+" ");return Jt[re]}function Wt(re){return re[re.length-1]}function Kt(re,pe){for(var Fe=[],Re=0;Re<re.length;Re++)Fe[Re]=pe(re[Re],Re);return Fe}function Xt(re,pe,Fe){for(var Re=0,Ue=Fe(pe);Re<re.length&&Fe(re[Re])<=Ue;)Re++;re.splice(Re,0,pe)}function $t(){}function kt(re,pe){var Fe;return Object.create?Fe=Object.create(re):($t.prototype=re,Fe=new $t),pe&&zt(pe,Fe),Fe}var pt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Bt(re){return/\w/.test(re)||re>"\x80"&&(re.toUpperCase()!=re.toLowerCase()||pt.test(re))}function xt(re,pe){return pe?pe.source.indexOf("\\w")>-1&&Bt(re)?!0:pe.test(re):Bt(re)}function vt(re){for(var pe in re)if(re.hasOwnProperty(pe)&&re[pe])return!1;return!0}var nt=/[\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 He(re){return re.charCodeAt(0)>=768&&nt.test(re)}function Ie(re,pe,Fe){for(;(Fe<0?pe>0:pe<re.length)&&He(re.charAt(pe));)pe+=Fe;return pe}function We(re,pe,Fe){for(var Re=pe>Fe?-1:1;;){if(pe==Fe)return pe;var Ue=(pe+Fe)/2,ot=Re<0?Math.ceil(Ue):Math.floor(Ue);if(ot==pe)return re(ot)?pe:Fe;re(ot)?Fe=ot:pe=ot+Re}}function Oe(re,pe,Fe,Re){if(!re)return Re(pe,Fe,"ltr",0);for(var Ue=!1,ot=0;ot<re.length;++ot){var wt=re[ot];(wt.from<Fe&&wt.to>pe||pe==Fe&&wt.to==pe)&&(Re(Math.max(wt.from,pe),Math.min(wt.to,Fe),wt.level==1?"rtl":"ltr",ot),Ue=!0)}Ue||Re(pe,Fe,"ltr")}var be=null;function Ne(re,pe,Fe){var Re;be=null;for(var Ue=0;Ue<re.length;++Ue){var ot=re[Ue];if(ot.from<pe&&ot.to>pe)return Ue;ot.to==pe&&(ot.from!=ot.to&&Fe=="before"?Re=Ue:be=Ue),ot.from==pe&&(ot.from!=ot.to&&Fe!="before"?Re=Ue:be=Ue)}return Re!=null?Re:be}var $e=function(){var re="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",pe="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function Fe(Yt){return Yt<=247?re.charAt(Yt):1424<=Yt&&Yt<=1524?"R":1536<=Yt&&Yt<=1785?pe.charAt(Yt-1536):1774<=Yt&&Yt<=2220?"r":8192<=Yt&&Yt<=8203?"w":Yt==8204?"b":"L"}var Re=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Ue=/[stwN]/,ot=/[LRr]/,wt=/[Lb1n]/,Rt=/[1n]/;function It(Yt,Tn,tn){this.level=Yt,this.from=Tn,this.to=tn}return function(Yt,Tn){var tn=Tn=="ltr"?"L":"R";if(Yt.length==0||Tn=="ltr"&&!Re.test(Yt))return!1;for(var Gn=Yt.length,jn=[],mi=0;mi<Gn;++mi)jn.push(Fe(Yt.charCodeAt(mi)));for(var _i=0,Bi=tn;_i<Gn;++_i){var nr=jn[_i];nr=="m"?jn[_i]=Bi:Bi=nr}for(var Dr=0,Sr=tn;Dr<Gn;++Dr){var Kr=jn[Dr];Kr=="1"&&Sr=="r"?jn[Dr]="n":ot.test(Kr)&&(Sr=Kr,Kr=="r"&&(jn[Dr]="R"))}for(var wo=1,yr=jn[0];wo<Gn-1;++wo){var zo=jn[wo];zo=="+"&&yr=="1"&&jn[wo+1]=="1"?jn[wo]="1":zo==","&&yr==jn[wo+1]&&(yr=="1"||yr=="n")&&(jn[wo]=yr),yr=zo}for(var ca=0;ca<Gn;++ca){var Ya=jn[ca];if(Ya==",")jn[ca]="N";else if(Ya=="%"){var va=void 0;for(va=ca+1;va<Gn&&jn[va]=="%";++va);for(var nu=ca&&jn[ca-1]=="!"||va<Gn&&jn[va]=="1"?"1":"N",Ml=ca;Ml<va;++Ml)jn[Ml]=nu;ca=va-1}}for(var ja=0,gu=tn;ja<Gn;++ja){var pl=jn[ja];gu=="L"&&pl=="1"?jn[ja]="L":ot.test(pl)&&(gu=pl)}for(var za=0;za<Gn;++za)if(Ue.test(jn[za])){var ws=void 0;for(ws=za+1;ws<Gn&&Ue.test(jn[ws]);++ws);for(var Ca=(za?jn[za-1]:tn)=="L",tl=(ws<Gn?jn[ws]:tn)=="L",gl=Ca==tl?Ca?"L":"R":tn,lc=za;lc<ws;++lc)jn[lc]=gl;za=ws-1}for(var ya=[],Vu,Ta=0;Ta<Gn;)if(wt.test(jn[Ta])){var Ef=Ta;for(++Ta;Ta<Gn&&wt.test(jn[Ta]);++Ta);ya.push(new It(0,Ef,Ta))}else{var Iu=Ta,mu=ya.length,iu=Tn=="rtl"?1:0;for(++Ta;Ta<Gn&&jn[Ta]!="L";++Ta);for(var ea=Iu;ea<Ta;)if(Rt.test(jn[ea])){Iu<ea&&(ya.splice(mu,0,new It(1,Iu,ea)),mu+=iu);var nl=ea;for(++ea;ea<Ta&&Rt.test(jn[ea]);++ea);ya.splice(mu,0,new It(2,nl,ea)),mu+=iu,Iu=ea}else++ea;Iu<Ta&&ya.splice(mu,0,new It(1,Iu,Ta))}return Tn=="ltr"&&(ya[0].level==1&&(Vu=Yt.match(/^\s+/))&&(ya[0].from=Vu[0].length,ya.unshift(new It(0,0,Vu[0].length))),Wt(ya).level==1&&(Vu=Yt.match(/\s+$/))&&(Wt(ya).to-=Vu[0].length,ya.push(new It(0,Gn-Vu[0].length,Gn)))),Tn=="rtl"?ya.reverse():ya}}();function dt(re,pe){var Fe=re.order;return Fe==null&&(Fe=re.order=$e(re.text,pe)),Fe}var Je=[],At=function(re,pe,Fe){if(re.addEventListener)re.addEventListener(pe,Fe,!1);else if(re.attachEvent)re.attachEvent("on"+pe,Fe);else{var Re=re._handlers||(re._handlers={});Re[pe]=(Re[pe]||Je).concat(Fe)}};function en(re,pe){return re._handlers&&re._handlers[pe]||Je}function pn(re,pe,Fe){if(re.removeEventListener)re.removeEventListener(pe,Fe,!1);else if(re.detachEvent)re.detachEvent("on"+pe,Fe);else{var Re=re._handlers,Ue=Re&&Re[pe];if(Ue){var ot=ut(Ue,Fe);ot>-1&&(Re[pe]=Ue.slice(0,ot).concat(Ue.slice(ot+1)))}}}function ln(re,pe){var Fe=en(re,pe);if(Fe.length)for(var Re=Array.prototype.slice.call(arguments,2),Ue=0;Ue<Fe.length;++Ue)Fe[Ue].apply(null,Re)}function gn(re,pe,Fe){return typeof pe=="string"&&(pe={type:pe,preventDefault:function(){this.defaultPrevented=!0}}),ln(re,Fe||pe.type,re,pe),Ci(pe)||pe.codemirrorIgnore}function Un(re){var pe=re._handlers&&re._handlers.cursorActivity;if(pe)for(var Fe=re.curOp.cursorActivityHandlers||(re.curOp.cursorActivityHandlers=[]),Re=0;Re<pe.length;++Re)ut(Fe,pe[Re])==-1&&Fe.push(pe[Re])}function An(re,pe){return en(re,pe).length>0}function ni(re){re.prototype.on=function(pe,Fe){At(this,pe,Fe)},re.prototype.off=function(pe,Fe){pn(this,pe,Fe)}}function ai(re){re.preventDefault?re.preventDefault():re.returnValue=!1}function ki(re){re.stopPropagation?re.stopPropagation():re.cancelBubble=!0}function Ci(re){return re.defaultPrevented!=null?re.defaultPrevented:re.returnValue==!1}function Ki(re){ai(re),ki(re)}function ir(re){return re.target||re.srcElement}function sr(re){var pe=re.which;return pe==null&&(re.button&1?pe=1:re.button&2?pe=3:re.button&4&&(pe=2)),oe&&re.ctrlKey&&pe==1&&(pe=3),pe}var Ji=function(){if(Ce&&Le<9)return!1;var re=Ze("div");return"draggable"in re||"dragDrop"in re}(),Fr;function Mr(re){if(Fr==null){var pe=Ze("span","\u200B");ze(re,Ze("span",[pe,document.createTextNode("x")])),re.firstChild.offsetHeight!=0&&(Fr=pe.offsetWidth<=1&&pe.offsetHeight>2&&!(Ce&&Le<8))}var Fe=Fr?Ze("span","\u200B"):Ze("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return Fe.setAttribute("cm-text",""),Fe}var vi;function wr(re){if(vi!=null)return vi;var pe=ze(re,document.createTextNode("A\u062EA")),Fe=Ge(pe,0,1).getBoundingClientRect(),Re=Ge(pe,1,2).getBoundingClientRect();return De(re),!Fe||Fe.left==Fe.right?!1:vi=Re.right-Fe.right<3}var Tr=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(re){for(var pe=0,Fe=[],Re=re.length;pe<=Re;){var Ue=re.indexOf(`
|
|
|
`,pe);Ue==-1&&(Ue=re.length);var ot=re.slice(pe,re.charAt(Ue-1)=="\r"?Ue-1:Ue),wt=ot.indexOf("\r");wt!=-1?(Fe.push(ot.slice(0,wt)),pe+=wt+1):(Fe.push(ot),pe=Ue+1)}return Fe}:function(re){return re.split(/\r\n?|\n/)},it=window.getSelection?function(re){try{return re.selectionStart!=re.selectionEnd}catch(pe){return!1}}:function(re){var pe;try{pe=re.ownerDocument.selection.createRange()}catch(Fe){}return!pe||pe.parentElement()!=re?!1:pe.compareEndPoints("StartToEnd",pe)!=0},Rr=function(){var re=Ze("div");return"oncopy"in re?!0:(re.setAttribute("oncopy","return;"),typeof re.oncopy=="function")}(),Or=null;function Ur(re){if(Or!=null)return Or;var pe=ze(re,Ze("span","x")),Fe=pe.getBoundingClientRect(),Re=Ge(pe,0,1).getBoundingClientRect();return Or=Math.abs(Fe.left-Re.left)>1}var uo={},po={};function io(re,pe){arguments.length>2&&(pe.dependencies=Array.prototype.slice.call(arguments,2)),uo[re]=pe}function Do(re,pe){po[re]=pe}function Xn(re){if(typeof re=="string"&&po.hasOwnProperty(re))re=po[re];else if(re&&typeof re.name=="string"&&po.hasOwnProperty(re.name)){var pe=po[re.name];typeof pe=="string"&&(pe={name:pe}),re=kt(pe,re),re.name=pe.name}else{if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(re))return Xn("application/xml");if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(re))return Xn("application/json")}return typeof re=="string"?{name:re}:re||{name:"null"}}function Ke(re,pe){pe=Xn(pe);var Fe=uo[pe.name];if(!Fe)return Ke(re,"text/plain");var Re=Fe(re,pe);if(qe.hasOwnProperty(pe.name)){var Ue=qe[pe.name];for(var ot in Ue)Ue.hasOwnProperty(ot)&&(Re.hasOwnProperty(ot)&&(Re["_"+ot]=Re[ot]),Re[ot]=Ue[ot])}if(Re.name=pe.name,pe.helperType&&(Re.helperType=pe.helperType),pe.modeProps)for(var wt in pe.modeProps)Re[wt]=pe.modeProps[wt];return Re}var qe={};function Ye(re,pe){var Fe=qe.hasOwnProperty(re)?qe[re]:qe[re]={};zt(pe,Fe)}function St(re,pe){if(pe===!0)return pe;if(re.copyState)return re.copyState(pe);var Fe={};for(var Re in pe){var Ue=pe[Re];Ue instanceof Array&&(Ue=Ue.concat([])),Fe[Re]=Ue}return Fe}function Ot(re,pe){for(var Fe;re.innerMode&&(Fe=re.innerMode(pe),!(!Fe||Fe.mode==re));)pe=Fe.state,re=Fe.mode;return Fe||{mode:re,state:pe}}function Tt(re,pe,Fe){return re.startState?re.startState(pe,Fe):!0}var _t=function(re,pe,Fe){this.pos=this.start=0,this.string=re,this.tabSize=pe||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=Fe};_t.prototype.eol=function(){return this.pos>=this.string.length},_t.prototype.sol=function(){return this.pos==this.lineStart},_t.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},_t.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},_t.prototype.eat=function(re){var pe=this.string.charAt(this.pos),Fe;if(typeof re=="string"?Fe=pe==re:Fe=pe&&(re.test?re.test(pe):re(pe)),Fe)return++this.pos,pe},_t.prototype.eatWhile=function(re){for(var pe=this.pos;this.eat(re););return this.pos>pe},_t.prototype.eatSpace=function(){for(var re=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>re},_t.prototype.skipToEnd=function(){this.pos=this.string.length},_t.prototype.skipTo=function(re){var pe=this.string.indexOf(re,this.pos);if(pe>-1)return this.pos=pe,!0},_t.prototype.backUp=function(re){this.pos-=re},_t.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)},_t.prototype.indentation=function(){return lt(this.string,null,this.tabSize)-(this.lineStart?lt(this.string,this.lineStart,this.tabSize):0)},_t.prototype.match=function(re,pe,Fe){if(typeof re=="string"){var Re=function(wt){return Fe?wt.toLowerCase():wt},Ue=this.string.substr(this.pos,re.length);if(Re(Ue)==Re(re))return pe!==!1&&(this.pos+=re.length),!0}else{var ot=this.string.slice(this.pos).match(re);return ot&&ot.index>0?null:(ot&&pe!==!1&&(this.pos+=ot[0].length),ot)}},_t.prototype.current=function(){return this.string.slice(this.start,this.pos)},_t.prototype.hideFirstChars=function(re,pe){this.lineStart+=re;try{return pe()}finally{this.lineStart-=re}},_t.prototype.lookAhead=function(re){var pe=this.lineOracle;return pe&&pe.lookAhead(re)},_t.prototype.baseToken=function(){var re=this.lineOracle;return re&&re.baseToken(this.pos)};function dn(re,pe){if(pe-=re.first,pe<0||pe>=re.size)throw new Error("There is no line "+(pe+re.first)+" in the document.");for(var Fe=re;!Fe.lines;)for(var Re=0;;++Re){var Ue=Fe.children[Re],ot=Ue.chunkSize();if(pe<ot){Fe=Ue;break}pe-=ot}return Fe.lines[pe]}function Pn(re,pe,Fe){var Re=[],Ue=pe.line;return re.iter(pe.line,Fe.line+1,function(ot){var wt=ot.text;Ue==Fe.line&&(wt=wt.slice(0,Fe.ch)),Ue==pe.line&&(wt=wt.slice(pe.ch)),Re.push(wt),++Ue}),Re}function mn(re,pe,Fe){var Re=[];return re.iter(pe,Fe,function(Ue){Re.push(Ue.text)}),Re}function on(re,pe){var Fe=pe-re.height;if(Fe)for(var Re=re;Re;Re=Re.parent)Re.height+=Fe}function Nt(re){if(re.parent==null)return null;for(var pe=re.parent,Fe=ut(pe.lines,re),Re=pe.parent;Re;pe=Re,Re=Re.parent)for(var Ue=0;Re.children[Ue]!=pe;++Ue)Fe+=Re.children[Ue].chunkSize();return Fe+pe.first}function un(re,pe){var Fe=re.first;e:do{for(var Re=0;Re<re.children.length;++Re){var Ue=re.children[Re],ot=Ue.height;if(pe<ot){re=Ue;continue e}pe-=ot,Fe+=Ue.chunkSize()}return Fe}while(!re.lines);for(var wt=0;wt<re.lines.length;++wt){var Rt=re.lines[wt],It=Rt.height;if(pe<It)break;pe-=It}return Fe+wt}function Mn(re,pe){return pe>=re.first&&pe<re.first+re.size}function Dn(re,pe){return String(re.lineNumberFormatter(pe+re.firstLineNumber))}function nn(re,pe,Fe){if(Fe===void 0&&(Fe=null),!(this instanceof nn))return new nn(re,pe,Fe);this.line=re,this.ch=pe,this.sticky=Fe}function sn(re,pe){return re.line-pe.line||re.ch-pe.ch}function Nn(re,pe){return re.sticky==pe.sticky&&sn(re,pe)==0}function On(re){return nn(re.line,re.ch)}function qn(re,pe){return sn(re,pe)<0?pe:re}function Hn(re,pe){return sn(re,pe)<0?re:pe}function ei(re,pe){return Math.max(re.first,Math.min(pe,re.first+re.size-1))}function Fn(re,pe){if(pe.line<re.first)return nn(re.first,0);var Fe=re.first+re.size-1;return pe.line>Fe?nn(Fe,dn(re,Fe).text.length):hi(pe,dn(re,pe.line).text.length)}function hi(re,pe){var Fe=re.ch;return Fe==null||Fe>pe?nn(re.line,pe):Fe<0?nn(re.line,0):re}function Di(re,pe){for(var Fe=[],Re=0;Re<pe.length;Re++)Fe[Re]=Fn(re,pe[Re]);return Fe}var Ri=function(re,pe){this.state=re,this.lookAhead=pe},En=function(re,pe,Fe,Re){this.state=pe,this.doc=re,this.line=Fe,this.maxLookAhead=Re||0,this.baseTokens=null,this.baseTokenPos=1};En.prototype.lookAhead=function(re){var pe=this.doc.getLine(this.line+re);return pe!=null&&re>this.maxLookAhead&&(this.maxLookAhead=re),pe},En.prototype.baseToken=function(re){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=re;)this.baseTokenPos+=2;var pe=this.baseTokens[this.baseTokenPos+1];return{type:pe&&pe.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-re}},En.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},En.fromSaved=function(re,pe,Fe){return pe instanceof Ri?new En(re,St(re.mode,pe.state),Fe,pe.lookAhead):new En(re,St(re.mode,pe),Fe)},En.prototype.save=function(re){var pe=re!==!1?St(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ri(pe,this.maxLookAhead):pe};function $i(re,pe,Fe,Re){var Ue=[re.state.modeGen],ot={};qi(re,pe.text,re.doc.mode,Fe,function(Yt,Tn){return Ue.push(Yt,Tn)},ot,Re);for(var wt=Fe.state,Rt=function(Yt){Fe.baseTokens=Ue;var Tn=re.state.overlays[Yt],tn=1,Gn=0;Fe.state=!0,qi(re,pe.text,Tn.mode,Fe,function(jn,mi){for(var _i=tn;Gn<jn;){var Bi=Ue[tn];Bi>jn&&Ue.splice(tn,1,jn,Ue[tn+1],Bi),tn+=2,Gn=Math.min(jn,Bi)}if(mi)if(Tn.opaque)Ue.splice(_i,tn-_i,jn,"overlay "+mi),tn=_i+2;else for(;_i<tn;_i+=2){var nr=Ue[_i+1];Ue[_i+1]=(nr?nr+" ":"")+"overlay "+mi}},ot),Fe.state=wt,Fe.baseTokens=null,Fe.baseTokenPos=1},It=0;It<re.state.overlays.length;++It)Rt(It);return{styles:Ue,classes:ot.bgClass||ot.textClass?ot:null}}function Cr(re,pe,Fe){if(!pe.styles||pe.styles[0]!=re.state.modeGen){var Re=mr(re,Nt(pe)),Ue=pe.text.length>re.options.maxHighlightLength&&St(re.doc.mode,Re.state),ot=$i(re,pe,Re);Ue&&(Re.state=Ue),pe.stateAfter=Re.save(!Ue),pe.styles=ot.styles,ot.classes?pe.styleClasses=ot.classes:pe.styleClasses&&(pe.styleClasses=null),Fe===re.doc.highlightFrontier&&(re.doc.modeFrontier=Math.max(re.doc.modeFrontier,++re.doc.highlightFrontier))}return pe.styles}function mr(re,pe,Fe){var Re=re.doc,Ue=re.display;if(!Re.mode.startState)return new En(Re,!0,pe);var ot=Fi(re,pe,Fe),wt=ot>Re.first&&dn(Re,ot-1).stateAfter,Rt=wt?En.fromSaved(Re,wt,ot):new En(Re,Tt(Re.mode),ot);return Re.iter(ot,pe,function(It){Ln(re,It.text,Rt);var Yt=Rt.line;It.stateAfter=Yt==pe-1||Yt%5==0||Yt>=Ue.viewFrom&&Yt<Ue.viewTo?Rt.save():null,Rt.nextLine()}),Fe&&(Re.modeFrontier=Rt.line),Rt}function Ln(re,pe,Fe,Re){var Ue=re.doc.mode,ot=new _t(pe,re.options.tabSize,Fe);for(ot.start=ot.pos=Re||0,pe==""&&Jn(Ue,Fe.state);!ot.eol();)ui(Ue,ot,Fe.state),ot.start=ot.pos}function Jn(re,pe){if(re.blankLine)return re.blankLine(pe);if(re.innerMode){var Fe=Ot(re,pe);if(Fe.mode.blankLine)return Fe.mode.blankLine(Fe.state)}}function ui(re,pe,Fe,Re){for(var Ue=0;Ue<10;Ue++){Re&&(Re[0]=Ot(re,Fe).mode);var ot=re.token(pe,Fe);if(pe.pos>pe.start)return ot}throw new Error("Mode "+re.name+" failed to advance stream.")}var Si=function(re,pe,Fe){this.start=re.start,this.end=re.pos,this.string=re.current(),this.type=pe||null,this.state=Fe};function di(re,pe,Fe,Re){var Ue=re.doc,ot=Ue.mode,wt;pe=Fn(Ue,pe);var Rt=dn(Ue,pe.line),It=mr(re,pe.line,Fe),Yt=new _t(Rt.text,re.options.tabSize,It),Tn;for(Re&&(Tn=[]);(Re||Yt.pos<pe.ch)&&!Yt.eol();)Yt.start=Yt.pos,wt=ui(ot,Yt,It.state),Re&&Tn.push(new Si(Yt,wt,St(Ue.mode,It.state)));return Re?Tn:new Si(Yt,wt,It.state)}function Ei(re,pe){if(re)for(;;){var Fe=re.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!Fe)break;re=re.slice(0,Fe.index)+re.slice(Fe.index+Fe[0].length);var Re=Fe[1]?"bgClass":"textClass";pe[Re]==null?pe[Re]=Fe[2]:new RegExp("(?:^|\\s)"+Fe[2]+"(?:$|\\s)").test(pe[Re])||(pe[Re]+=" "+Fe[2])}return re}function qi(re,pe,Fe,Re,Ue,ot,wt){var Rt=Fe.flattenSpans;Rt==null&&(Rt=re.options.flattenSpans);var It=0,Yt=null,Tn=new _t(pe,re.options.tabSize,Re),tn,Gn=re.options.addModeClass&&[null];for(pe==""&&Ei(Jn(Fe,Re.state),ot);!Tn.eol();){if(Tn.pos>re.options.maxHighlightLength?(Rt=!1,wt&&Ln(re,pe,Re,Tn.pos),Tn.pos=pe.length,tn=null):tn=Ei(ui(Fe,Tn,Re.state,Gn),ot),Gn){var jn=Gn[0].name;jn&&(tn="m-"+(tn?jn+" "+tn:jn))}if(!Rt||Yt!=tn){for(;It<Tn.start;)It=Math.min(Tn.start,It+5e3),Ue(It,Yt);Yt=tn}Tn.start=Tn.pos}for(;It<Tn.pos;){var mi=Math.min(Tn.pos,It+5e3);Ue(mi,Yt),It=mi}}function Fi(re,pe,Fe){for(var Re,Ue,ot=re.doc,wt=Fe?-1:pe-(re.doc.mode.innerMode?1e3:100),Rt=pe;Rt>wt;--Rt){if(Rt<=ot.first)return ot.first;var It=dn(ot,Rt-1),Yt=It.stateAfter;if(Yt&&(!Fe||Rt+(Yt instanceof Ri?Yt.lookAhead:0)<=ot.modeFrontier))return Rt;var Tn=lt(It.text,null,re.options.tabSize);(Ue==null||Re>Tn)&&(Ue=Rt-1,Re=Tn)}return Ue}function zi(re,pe){if(re.modeFrontier=Math.min(re.modeFrontier,pe),!(re.highlightFrontier<pe-10)){for(var Fe=re.first,Re=pe-1;Re>Fe;Re--){var Ue=dn(re,Re).stateAfter;if(Ue&&(!(Ue instanceof Ri)||Re+Ue.lookAhead<pe)){Fe=Re+1;break}}re.highlightFrontier=Math.min(re.highlightFrontier,Fe)}}var fr=!1,Bn=!1;function Br(){fr=!0}function In(){Bn=!0}function pr(re,pe,Fe){this.marker=re,this.from=pe,this.to=Fe}function yo(re,pe){if(re)for(var Fe=0;Fe<re.length;++Fe){var Re=re[Fe];if(Re.marker==pe)return Re}}function Ir(re,pe){for(var Fe,Re=0;Re<re.length;++Re)re[Re]!=pe&&(Fe||(Fe=[])).push(re[Re]);return Fe}function bo(re,pe){re.markedSpans=re.markedSpans?re.markedSpans.concat([pe]):[pe],pe.marker.attachLine(re)}function co(re,pe,Fe){var Re;if(re)for(var Ue=0;Ue<re.length;++Ue){var ot=re[Ue],wt=ot.marker,Rt=ot.from==null||(wt.inclusiveLeft?ot.from<=pe:ot.from<pe);if(Rt||ot.from==pe&&wt.type=="bookmark"&&(!Fe||!ot.marker.insertLeft)){var It=ot.to==null||(wt.inclusiveRight?ot.to>=pe:ot.to>pe);(Re||(Re=[])).push(new pr(wt,ot.from,It?null:ot.to))}}return Re}function Vi(re,pe,Fe){var Re;if(re)for(var Ue=0;Ue<re.length;++Ue){var ot=re[Ue],wt=ot.marker,Rt=ot.to==null||(wt.inclusiveRight?ot.to>=pe:ot.to>pe);if(Rt||ot.from==pe&&wt.type=="bookmark"&&(!Fe||ot.marker.insertLeft)){var It=ot.from==null||(wt.inclusiveLeft?ot.from<=pe:ot.from<pe);(Re||(Re=[])).push(new pr(wt,It?null:ot.from-pe,ot.to==null?null:ot.to-pe))}}return Re}function Hi(re,pe){if(pe.full)return null;var Fe=Mn(re,pe.from.line)&&dn(re,pe.from.line).markedSpans,Re=Mn(re,pe.to.line)&&dn(re,pe.to.line).markedSpans;if(!Fe&&!Re)return null;var Ue=pe.from.ch,ot=pe.to.ch,wt=sn(pe.from,pe.to)==0,Rt=co(Fe,Ue,wt),It=Vi(Re,ot,wt),Yt=pe.text.length==1,Tn=Wt(pe.text).length+(Yt?Ue:0);if(Rt)for(var tn=0;tn<Rt.length;++tn){var Gn=Rt[tn];if(Gn.to==null){var jn=yo(It,Gn.marker);jn?Yt&&(Gn.to=jn.to==null?null:jn.to+Tn):Gn.to=Ue}}if(It)for(var mi=0;mi<It.length;++mi){var _i=It[mi];if(_i.to!=null&&(_i.to+=Tn),_i.from==null){var Bi=yo(Rt,_i.marker);Bi||(_i.from=Tn,Yt&&(Rt||(Rt=[])).push(_i))}else _i.from+=Tn,Yt&&(Rt||(Rt=[])).push(_i)}Rt&&(Rt=ur(Rt)),It&&It!=Rt&&(It=ur(It));var nr=[Rt];if(!Yt){var Dr=pe.text.length-2,Sr;if(Dr>0&&Rt)for(var Kr=0;Kr<Rt.length;++Kr)Rt[Kr].to==null&&(Sr||(Sr=[])).push(new pr(Rt[Kr].marker,null,null));for(var wo=0;wo<Dr;++wo)nr.push(Sr);nr.push(It)}return nr}function ur(re){for(var pe=0;pe<re.length;++pe){var Fe=re[pe];Fe.from!=null&&Fe.from==Fe.to&&Fe.marker.clearWhenEmpty!==!1&&re.splice(pe--,1)}return re.length?re:null}function Pr(re,pe,Fe){var Re=null;if(re.iter(pe.line,Fe.line+1,function(jn){if(jn.markedSpans)for(var mi=0;mi<jn.markedSpans.length;++mi){var _i=jn.markedSpans[mi].marker;_i.readOnly&&(!Re||ut(Re,_i)==-1)&&(Re||(Re=[])).push(_i)}}),!Re)return null;for(var Ue=[{from:pe,to:Fe}],ot=0;ot<Re.length;++ot)for(var wt=Re[ot],Rt=wt.find(0),It=0;It<Ue.length;++It){var Yt=Ue[It];if(!(sn(Yt.to,Rt.from)<0||sn(Yt.from,Rt.to)>0)){var Tn=[It,1],tn=sn(Yt.from,Rt.from),Gn=sn(Yt.to,Rt.to);(tn<0||!wt.inclusiveLeft&&!tn)&&Tn.push({from:Yt.from,to:Rt.from}),(Gn>0||!wt.inclusiveRight&&!Gn)&&Tn.push({from:Rt.to,to:Yt.to}),Ue.splice.apply(Ue,Tn),It+=Tn.length-3}}return Ue}function ci(re){var pe=re.markedSpans;if(pe){for(var Fe=0;Fe<pe.length;++Fe)pe[Fe].marker.detachLine(re);re.markedSpans=null}}function Mt(re,pe){if(pe){for(var Fe=0;Fe<pe.length;++Fe)pe[Fe].marker.attachLine(re);re.markedSpans=pe}}function Gr(re){return re.inclusiveLeft?-1:0}function Hr(re){return re.inclusiveRight?1:0}function ts(re,pe){var Fe=re.lines.length-pe.lines.length;if(Fe!=0)return Fe;var Re=re.find(),Ue=pe.find(),ot=sn(Re.from,Ue.from)||Gr(re)-Gr(pe);if(ot)return-ot;var wt=sn(Re.to,Ue.to)||Hr(re)-Hr(pe);return wt||pe.id-re.id}function ko(re,pe){var Fe=Bn&&re.markedSpans,Re;if(Fe)for(var Ue=void 0,ot=0;ot<Fe.length;++ot)Ue=Fe[ot],Ue.marker.collapsed&&(pe?Ue.from:Ue.to)==null&&(!Re||ts(Re,Ue.marker)<0)&&(Re=Ue.marker);return Re}function ss(re){return ko(re,!0)}function _r(re){return ko(re,!1)}function cr(re,pe){var Fe=Bn&&re.markedSpans,Re;if(Fe)for(var Ue=0;Ue<Fe.length;++Ue){var ot=Fe[Ue];ot.marker.collapsed&&(ot.from==null||ot.from<pe)&&(ot.to==null||ot.to>pe)&&(!Re||ts(Re,ot.marker)<0)&&(Re=ot.marker)}return Re}function Vr(re,pe,Fe,Re,Ue){var ot=dn(re,pe),wt=Bn&&ot.markedSpans;if(wt)for(var Rt=0;Rt<wt.length;++Rt){var It=wt[Rt];if(It.marker.collapsed){var Yt=It.marker.find(0),Tn=sn(Yt.from,Fe)||Gr(It.marker)-Gr(Ue),tn=sn(Yt.to,Re)||Hr(It.marker)-Hr(Ue);if(!(Tn>=0&&tn<=0||Tn<=0&&tn>=0)&&(Tn<=0&&(It.marker.inclusiveRight&&Ue.inclusiveLeft?sn(Yt.to,Fe)>=0:sn(Yt.to,Fe)>0)||Tn>=0&&(It.marker.inclusiveRight&&Ue.inclusiveLeft?sn(Yt.from,Re)<=0:sn(Yt.from,Re)<0)))return!0}}}function hr(re){for(var pe;pe=ss(re);)re=pe.find(-1,!0).line;return re}function eo(re){for(var pe;pe=_r(re);)re=pe.find(1,!0).line;return re}function Yo(re){for(var pe,Fe;pe=_r(re);)re=pe.find(1,!0).line,(Fe||(Fe=[])).push(re);return Fe}function rr(re,pe){var Fe=dn(re,pe),Re=hr(Fe);return Fe==Re?pe:Nt(Re)}function Wi(re,pe){if(pe>re.lastLine())return pe;var Fe=dn(re,pe),Re;if(!Qn(re,Fe))return pe;for(;Re=_r(Fe);)Fe=Re.find(1,!0).line;return Nt(Fe)+1}function Qn(re,pe){var Fe=Bn&&pe.markedSpans;if(Fe){for(var Re=void 0,Ue=0;Ue<Fe.length;++Ue)if(Re=Fe[Ue],!!Re.marker.collapsed){if(Re.from==null)return!0;if(!Re.marker.widgetNode&&Re.from==0&&Re.marker.inclusiveLeft&&or(re,pe,Re))return!0}}}function or(re,pe,Fe){if(Fe.to==null){var Re=Fe.marker.find(1,!0);return or(re,Re.line,yo(Re.line.markedSpans,Fe.marker))}if(Fe.marker.inclusiveRight&&Fe.to==pe.text.length)return!0;for(var Ue=void 0,ot=0;ot<pe.markedSpans.length;++ot)if(Ue=pe.markedSpans[ot],Ue.marker.collapsed&&!Ue.marker.widgetNode&&Ue.from==Fe.to&&(Ue.to==null||Ue.to!=Fe.from)&&(Ue.marker.inclusiveLeft||Fe.marker.inclusiveRight)&&or(re,pe,Ue))return!0}function to(re){re=hr(re);for(var pe=0,Fe=re.parent,Re=0;Re<Fe.lines.length;++Re){var Ue=Fe.lines[Re];if(Ue==re)break;pe+=Ue.height}for(var ot=Fe.parent;ot;Fe=ot,ot=Fe.parent)for(var wt=0;wt<ot.children.length;++wt){var Rt=ot.children[wt];if(Rt==Fe)break;pe+=Rt.height}return pe}function Ro(re){if(re.height==0)return 0;for(var pe=re.text.length,Fe,Re=re;Fe=ss(Re);){var Ue=Fe.find(0,!0);Re=Ue.from.line,pe+=Ue.from.ch-Ue.to.ch}for(Re=re;Fe=_r(Re);){var ot=Fe.find(0,!0);pe-=Re.text.length-ot.from.ch,Re=ot.to.line,pe+=Re.text.length-ot.to.ch}return pe}function Bo(re){var pe=re.display,Fe=re.doc;pe.maxLine=dn(Fe,Fe.first),pe.maxLineLength=Ro(pe.maxLine),pe.maxLineChanged=!0,Fe.iter(function(Re){var Ue=Ro(Re);Ue>pe.maxLineLength&&(pe.maxLineLength=Ue,pe.maxLine=Re)})}var Xo=function(re,pe,Fe){this.text=re,Mt(this,pe),this.height=Fe?Fe(this):1};Xo.prototype.lineNo=function(){return Nt(this)},ni(Xo);function as(re,pe,Fe,Re){re.text=pe,re.stateAfter&&(re.stateAfter=null),re.styles&&(re.styles=null),re.order!=null&&(re.order=null),ci(re),Mt(re,Fe);var Ue=Re?Re(re):1;Ue!=re.height&&on(re,Ue)}function Ho(re){re.parent=null,ci(re)}var ia={},_s={};function la(re,pe){if(!re||/^\s*$/.test(re))return null;var Fe=pe.addModeClass?_s:ia;return Fe[re]||(Fe[re]=re.replace(/\S+/g,"cm-$&"))}function kn(re,pe){var Fe=Xe("span",null,null,he?"padding-right: .1px":null),Re={pre:Xe("pre",[Fe],"CodeMirror-line"),content:Fe,col:0,pos:0,cm:re,trailingSpace:!1,splitSpaces:re.getOption("lineWrapping")};pe.measure={};for(var Ue=0;Ue<=(pe.rest?pe.rest.length:0);Ue++){var ot=Ue?pe.rest[Ue-1]:pe.line,wt=void 0;Re.pos=0,Re.addToken=Pu,wr(re.display.measure)&&(wt=dt(ot,re.doc.direction))&&(Re.addToken=Sa(Re.addToken,wt)),Re.map=[];var Rt=pe!=re.display.externalMeasured&&Nt(ot);Ws(ot,Re,Cr(re,ot,Rt)),ot.styleClasses&&(ot.styleClasses.bgClass&&(Re.bgClass=et(ot.styleClasses.bgClass,Re.bgClass||"")),ot.styleClasses.textClass&&(Re.textClass=et(ot.styleClasses.textClass,Re.textClass||""))),Re.map.length==0&&Re.map.push(0,0,Re.content.appendChild(Mr(re.display.measure))),Ue==0?(pe.measure.map=Re.map,pe.measure.cache={}):((pe.measure.maps||(pe.measure.maps=[])).push(Re.map),(pe.measure.caches||(pe.measure.caches=[])).push({}))}if(he){var It=Re.content.lastChild;(/\bcm-tab\b/.test(It.className)||It.querySelector&&It.querySelector(".cm-tab"))&&(Re.content.className="cm-tab-wrap-hack")}return ln(re,"renderLine",re,pe.line,Re.pre),Re.pre.className&&(Re.textClass=et(Re.pre.className,Re.textClass||"")),Re}function Is(re){var pe=Ze("span","\u2022","cm-invalidchar");return pe.title="\\u"+re.charCodeAt(0).toString(16),pe.setAttribute("aria-label",pe.title),pe}function Pu(re,pe,Fe,Re,Ue,ot,wt){if(pe){var Rt=re.splitSpaces?Ua(pe,re.trailingSpace):pe,It=re.cm.state.specialChars,Yt=!1,Tn;if(!It.test(pe))re.col+=pe.length,Tn=document.createTextNode(Rt),re.map.push(re.pos,re.pos+pe.length,Tn),Ce&&Le<9&&(Yt=!0),re.pos+=pe.length;else{Tn=document.createDocumentFragment();for(var tn=0;;){It.lastIndex=tn;var Gn=It.exec(pe),jn=Gn?Gn.index-tn:pe.length-tn;if(jn){var mi=document.createTextNode(Rt.slice(tn,tn+jn));Ce&&Le<9?Tn.appendChild(Ze("span",[mi])):Tn.appendChild(mi),re.map.push(re.pos,re.pos+jn,mi),re.col+=jn,re.pos+=jn}if(!Gn)break;tn+=jn+1;var _i=void 0;if(Gn[0]==" "){var Bi=re.cm.options.tabSize,nr=Bi-re.col%Bi;_i=Tn.appendChild(Ze("span",bn(nr),"cm-tab")),_i.setAttribute("role","presentation"),_i.setAttribute("cm-text"," "),re.col+=nr}else Gn[0]=="\r"||Gn[0]==`
|
|
|
`?(_i=Tn.appendChild(Ze("span",Gn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),_i.setAttribute("cm-text",Gn[0]),re.col+=1):(_i=re.cm.options.specialCharPlaceholder(Gn[0]),_i.setAttribute("cm-text",Gn[0]),Ce&&Le<9?Tn.appendChild(Ze("span",[_i])):Tn.appendChild(_i),re.col+=1);re.map.push(re.pos,re.pos+1,_i),re.pos++}}if(re.trailingSpace=Rt.charCodeAt(pe.length-1)==32,Fe||Re||Ue||Yt||ot||wt){var Dr=Fe||"";Re&&(Dr+=Re),Ue&&(Dr+=Ue);var Sr=Ze("span",[Tn],Dr,ot);if(wt)for(var Kr in wt)wt.hasOwnProperty(Kr)&&Kr!="style"&&Kr!="class"&&Sr.setAttribute(Kr,wt[Kr]);return re.content.appendChild(Sr)}re.content.appendChild(Tn)}}function Ua(re,pe){if(re.length>1&&!/ /.test(re))return re;for(var Fe=pe,Re="",Ue=0;Ue<re.length;Ue++){var ot=re.charAt(Ue);ot==" "&&Fe&&(Ue==re.length-1||re.charCodeAt(Ue+1)==32)&&(ot="\xA0"),Re+=ot,Fe=ot==" "}return Re}function Sa(re,pe){return function(Fe,Re,Ue,ot,wt,Rt,It){Ue=Ue?Ue+" cm-force-border":"cm-force-border";for(var Yt=Fe.pos,Tn=Yt+Re.length;;){for(var tn=void 0,Gn=0;Gn<pe.length&&(tn=pe[Gn],!(tn.to>Yt&&tn.from<=Yt));Gn++);if(tn.to>=Tn)return re(Fe,Re,Ue,ot,wt,Rt,It);re(Fe,Re.slice(0,tn.to-Yt),Ue,ot,null,Rt,It),ot=null,Re=Re.slice(tn.to-Yt),Yt=tn.to}}}function us(re,pe,Fe,Re){var Ue=!Re&&Fe.widgetNode;Ue&&re.map.push(re.pos,re.pos+pe,Ue),!Re&&re.cm.display.input.needsContentAttribute&&(Ue||(Ue=re.content.appendChild(document.createElement("span"))),Ue.setAttribute("cm-marker",Fe.id)),Ue&&(re.cm.display.input.setUneditable(Ue),re.content.appendChild(Ue)),re.pos+=pe,re.trailingSpace=!1}function Ws(re,pe,Fe){var Re=re.markedSpans,Ue=re.text,ot=0;if(!Re){for(var wt=1;wt<Fe.length;wt+=2)pe.addToken(pe,Ue.slice(ot,ot=Fe[wt]),la(Fe[wt+1],pe.cm.options));return}for(var Rt=Ue.length,It=0,Yt=1,Tn="",tn,Gn,jn=0,mi,_i,Bi,nr,Dr;;){if(jn==It){mi=_i=Bi=Gn="",Dr=null,nr=null,jn=1/0;for(var Sr=[],Kr=void 0,wo=0;wo<Re.length;++wo){var yr=Re[wo],zo=yr.marker;if(zo.type=="bookmark"&&yr.from==It&&zo.widgetNode)Sr.push(zo);else if(yr.from<=It&&(yr.to==null||yr.to>It||zo.collapsed&&yr.to==It&&yr.from==It)){if(yr.to!=null&&yr.to!=It&&jn>yr.to&&(jn=yr.to,_i=""),zo.className&&(mi+=" "+zo.className),zo.css&&(Gn=(Gn?Gn+";":"")+zo.css),zo.startStyle&&yr.from==It&&(Bi+=" "+zo.startStyle),zo.endStyle&&yr.to==jn&&(Kr||(Kr=[])).push(zo.endStyle,yr.to),zo.title&&((Dr||(Dr={})).title=zo.title),zo.attributes)for(var ca in zo.attributes)(Dr||(Dr={}))[ca]=zo.attributes[ca];zo.collapsed&&(!nr||ts(nr.marker,zo)<0)&&(nr=yr)}else yr.from>It&&jn>yr.from&&(jn=yr.from)}if(Kr)for(var Ya=0;Ya<Kr.length;Ya+=2)Kr[Ya+1]==jn&&(_i+=" "+Kr[Ya]);if(!nr||nr.from==It)for(var va=0;va<Sr.length;++va)us(pe,0,Sr[va]);if(nr&&(nr.from||0)==It){if(us(pe,(nr.to==null?Rt+1:nr.to)-It,nr.marker,nr.from==null),nr.to==null)return;nr.to==It&&(nr=!1)}}if(It>=Rt)break;for(var nu=Math.min(Rt,jn);;){if(Tn){var Ml=It+Tn.length;if(!nr){var ja=Ml>nu?Tn.slice(0,nu-It):Tn;pe.addToken(pe,ja,tn?tn+mi:mi,Bi,It+ja.length==jn?_i:"",Gn,Dr)}if(Ml>=nu){Tn=Tn.slice(nu-It),It=nu;break}It=Ml,Bi=""}Tn=Ue.slice(ot,ot=Fe[Yt++]),tn=la(Fe[Yt++],pe.cm.options)}}}function Po(re,pe,Fe){this.line=pe,this.rest=Yo(pe),this.size=this.rest?Nt(Wt(this.rest))-Fe+1:1,this.node=this.text=null,this.hidden=Qn(re,pe)}function Ao(re,pe,Fe){for(var Re=[],Ue,ot=pe;ot<Fe;ot=Ue){var wt=new Po(re.doc,dn(re.doc,ot),ot);Ue=ot+wt.size,Re.push(wt)}return Re}var Eo=null;function ua(re){Eo?Eo.ops.push(re):re.ownsGroup=Eo={ops:[re],delayedCallbacks:[]}}function xr(re){var pe=re.delayedCallbacks,Fe=0;do{for(;Fe<pe.length;Fe++)pe[Fe].call(null);for(var Re=0;Re<re.ops.length;Re++){var Ue=re.ops[Re];if(Ue.cursorActivityHandlers)for(;Ue.cursorActivityCalled<Ue.cursorActivityHandlers.length;)Ue.cursorActivityHandlers[Ue.cursorActivityCalled++].call(null,Ue.cm)}}while(Fe<pe.length)}function lo(re,pe){var Fe=re.ownsGroup;if(Fe)try{xr(Fe)}finally{Eo=null,pe(Fe)}}var Yr=null;function Mi(re,pe){var Fe=en(re,pe);if(Fe.length){var Re=Array.prototype.slice.call(arguments,2),Ue;Eo?Ue=Eo.delayedCallbacks:Yr?Ue=Yr:(Ue=Yr=[],setTimeout(Es,0));for(var ot=function(Rt){Ue.push(function(){return Fe[Rt].apply(null,Re)})},wt=0;wt<Fe.length;++wt)ot(wt)}}function Es(){var re=Yr;Yr=null;for(var pe=0;pe<re.length;++pe)re[pe]()}function Ls(re,pe,Fe,Re){for(var Ue=0;Ue<pe.changes.length;Ue++){var ot=pe.changes[Ue];ot=="text"?yi(re,pe):ot=="gutter"?Xs(re,pe,Fe,Re):ot=="class"?ms(re,pe):ot=="widget"&&qa(re,pe,Re)}pe.changes=null}function xa(re){return re.node==re.text&&(re.node=Ze("div",null,null,"position: relative"),re.text.parentNode&&re.text.parentNode.replaceChild(re.node,re.text),re.node.appendChild(re.text),Ce&&Le<8&&(re.node.style.zIndex=2)),re.node}function xl(re,pe){var Fe=pe.bgClass?pe.bgClass+" "+(pe.line.bgClass||""):pe.line.bgClass;if(Fe&&(Fe+=" CodeMirror-linebackground"),pe.background)Fe?pe.background.className=Fe:(pe.background.parentNode.removeChild(pe.background),pe.background=null);else if(Fe){var Re=xa(pe);pe.background=Re.insertBefore(Ze("div",null,Fe),Re.firstChild),re.display.input.setUneditable(pe.background)}}function Il(re,pe){var Fe=re.display.externalMeasured;return Fe&&Fe.line==pe.line?(re.display.externalMeasured=null,pe.measure=Fe.measure,Fe.built):kn(re,pe)}function yi(re,pe){var Fe=pe.text.className,Re=Il(re,pe);pe.text==pe.node&&(pe.node=Re.pre),pe.text.parentNode.replaceChild(Re.pre,pe.text),pe.text=Re.pre,Re.bgClass!=pe.bgClass||Re.textClass!=pe.textClass?(pe.bgClass=Re.bgClass,pe.textClass=Re.textClass,ms(re,pe)):Fe&&(pe.text.className=Fe)}function ms(re,pe){xl(re,pe),pe.line.wrapClass?xa(pe).className=pe.line.wrapClass:pe.node!=pe.text&&(pe.node.className="");var Fe=pe.textClass?pe.textClass+" "+(pe.line.textClass||""):pe.line.textClass;pe.text.className=Fe||""}function Xs(re,pe,Fe,Re){if(pe.gutter&&(pe.node.removeChild(pe.gutter),pe.gutter=null),pe.gutterBackground&&(pe.node.removeChild(pe.gutterBackground),pe.gutterBackground=null),pe.line.gutterClass){var Ue=xa(pe);pe.gutterBackground=Ze("div",null,"CodeMirror-gutter-background "+pe.line.gutterClass,"left: "+(re.options.fixedGutter?Re.fixedPos:-Re.gutterTotalWidth)+"px; width: "+Re.gutterTotalWidth+"px"),re.display.input.setUneditable(pe.gutterBackground),Ue.insertBefore(pe.gutterBackground,pe.text)}var ot=pe.line.gutterMarkers;if(re.options.lineNumbers||ot){var wt=xa(pe),Rt=pe.gutter=Ze("div",null,"CodeMirror-gutter-wrapper","left: "+(re.options.fixedGutter?Re.fixedPos:-Re.gutterTotalWidth)+"px");if(re.display.input.setUneditable(Rt),wt.insertBefore(Rt,pe.text),pe.line.gutterClass&&(Rt.className+=" "+pe.line.gutterClass),re.options.lineNumbers&&(!ot||!ot["CodeMirror-linenumbers"])&&(pe.lineNumber=Rt.appendChild(Ze("div",Dn(re.options,Fe),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+Re.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+re.display.lineNumInnerWidth+"px"))),ot)for(var It=0;It<re.display.gutterSpecs.length;++It){var Yt=re.display.gutterSpecs[It].className,Tn=ot.hasOwnProperty(Yt)&&ot[Yt];Tn&&Rt.appendChild(Ze("div",[Tn],"CodeMirror-gutter-elt","left: "+Re.gutterLeft[Yt]+"px; width: "+Re.gutterWidth[Yt]+"px"))}}}function qa(re,pe,Fe){pe.alignable&&(pe.alignable=null);for(var Re=Pe("CodeMirror-linewidget"),Ue=pe.node.firstChild,ot=void 0;Ue;Ue=ot)ot=Ue.nextSibling,Re.test(Ue.className)&&pe.node.removeChild(Ue);Dl(re,pe,Fe)}function wl(re,pe,Fe,Re){var Ue=Il(re,pe);return pe.text=pe.node=Ue.pre,Ue.bgClass&&(pe.bgClass=Ue.bgClass),Ue.textClass&&(pe.textClass=Ue.textClass),ms(re,pe),Xs(re,pe,Fe,Re),Dl(re,pe,Re),pe.node}function Dl(re,pe,Fe){if(jr(re,pe.line,pe,Fe,!0),pe.rest)for(var Re=0;Re<pe.rest.length;Re++)jr(re,pe.rest[Re],pe,Fe,!1)}function jr(re,pe,Fe,Re,Ue){if(pe.widgets)for(var ot=xa(Fe),wt=0,Rt=pe.widgets;wt<Rt.length;++wt){var It=Rt[wt],Yt=Ze("div",[It.node],"CodeMirror-linewidget"+(It.className?" "+It.className:""));It.handleMouseEvents||Yt.setAttribute("cm-ignore-events","true"),nc(It,Yt,Fe,Re),re.display.input.setUneditable(Yt),Ue&&It.above?ot.insertBefore(Yt,Fe.gutter||Fe.text):ot.appendChild(Yt),Mi(It,"redraw")}}function nc(re,pe,Fe,Re){if(re.noHScroll){(Fe.alignable||(Fe.alignable=[])).push(pe);var Ue=Re.wrapperWidth;pe.style.left=Re.fixedPos+"px",re.coverGutter||(Ue-=Re.gutterTotalWidth,pe.style.paddingLeft=Re.gutterTotalWidth+"px"),pe.style.width=Ue+"px"}re.coverGutter&&(pe.style.zIndex=5,pe.style.position="relative",re.noHScroll||(pe.style.marginLeft=-Re.gutterTotalWidth+"px"))}function Ia(re){if(re.height!=null)return re.height;var pe=re.doc.cm;if(!pe)return 0;if(!ft(document.body,re.node)){var Fe="position: relative;";re.coverGutter&&(Fe+="margin-left: -"+pe.display.gutters.offsetWidth+"px;"),re.noHScroll&&(Fe+="width: "+pe.display.wrapper.clientWidth+"px;"),ze(pe.display.measure,Ze("div",[re.node],null,Fe))}return re.height=re.node.parentNode.offsetHeight}function Ga(re,pe){for(var Fe=ir(pe);Fe!=re.wrapper;Fe=Fe.parentNode)if(!Fe||Fe.nodeType==1&&Fe.getAttribute("cm-ignore-events")=="true"||Fe.parentNode==re.sizer&&Fe!=re.mover)return!0}function Na(re){return re.lineSpace.offsetTop}function $l(re){return re.mover.offsetHeight-re.lineSpace.offsetHeight}function _u(re){if(re.cachedPaddingH)return re.cachedPaddingH;var pe=ze(re.measure,Ze("pre","x","CodeMirror-line-like")),Fe=window.getComputedStyle?window.getComputedStyle(pe):pe.currentStyle,Re={left:parseInt(Fe.paddingLeft),right:parseInt(Fe.paddingRight)};return!isNaN(Re.left)&&!isNaN(Re.right)&&(re.cachedPaddingH=Re),Re}function Wa(re){return mt-re.display.nativeBarWidth}function Za(re){return re.display.scroller.clientWidth-Wa(re)-re.display.barWidth}function Uu(re){return re.display.scroller.clientHeight-Wa(re)-re.display.barHeight}function yc(re,pe,Fe){var Re=re.options.lineWrapping,Ue=Re&&Za(re);if(!pe.measure.heights||Re&&pe.measure.width!=Ue){var ot=pe.measure.heights=[];if(Re){pe.measure.width=Ue;for(var wt=pe.text.firstChild.getClientRects(),Rt=0;Rt<wt.length-1;Rt++){var It=wt[Rt],Yt=wt[Rt+1];Math.abs(It.bottom-Yt.bottom)>2&&ot.push((It.bottom+Yt.top)/2-Fe.top)}}ot.push(Fe.bottom-Fe.top)}}function Eu(re,pe,Fe){if(re.line==pe)return{map:re.measure.map,cache:re.measure.cache};for(var Re=0;Re<re.rest.length;Re++)if(re.rest[Re]==pe)return{map:re.measure.maps[Re],cache:re.measure.caches[Re]};for(var Ue=0;Ue<re.rest.length;Ue++)if(Nt(re.rest[Ue])>Fe)return{map:re.measure.maps[Ue],cache:re.measure.caches[Ue],before:!0}}function Rl(re,pe){pe=hr(pe);var Fe=Nt(pe),Re=re.display.externalMeasured=new Po(re.doc,pe,Fe);Re.lineN=Fe;var Ue=Re.built=kn(re,Re);return Re.text=Ue.pre,ze(re.display.lineMeasure,Ue.pre),Re}function Sc(re,pe,Fe,Re){return bl(re,Lu(re,pe),Fe,Re)}function Gu(re,pe){if(pe>=re.display.viewFrom&&pe<re.display.viewTo)return re.display.view[$s(re,pe)];var Fe=re.display.externalMeasured;if(Fe&&pe>=Fe.lineN&&pe<Fe.lineN+Fe.size)return Fe}function Lu(re,pe){var Fe=Nt(pe),Re=Gu(re,Fe);Re&&!Re.text?Re=null:Re&&Re.changes&&(Ls(re,Re,Fe,bh(re)),re.curOp.forceUpdate=!0),Re||(Re=Rl(re,pe));var Ue=Eu(Re,pe,Fe);return{line:pe,view:Re,rect:null,map:Ue.map,cache:Ue.cache,before:Ue.before,hasHeights:!1}}function bl(re,pe,Fe,Re,Ue){pe.before&&(Fe=-1);var ot=Fe+(Re||""),wt;return pe.cache.hasOwnProperty(ot)?wt=pe.cache[ot]:(pe.rect||(pe.rect=pe.view.text.getBoundingClientRect()),pe.hasHeights||(yc(re,pe.view,pe.rect),pe.hasHeights=!0),wt=oo(re,pe,Fe,Re),wt.bogus||(pe.cache[ot]=wt)),{left:wt.left,right:wt.right,top:Ue?wt.rtop:wt.top,bottom:Ue?wt.rbottom:wt.bottom}}var th={left:0,right:0,top:0,bottom:0};function xc(re,pe,Fe){for(var Re,Ue,ot,wt,Rt,It,Yt=0;Yt<re.length;Yt+=3)if(Rt=re[Yt],It=re[Yt+1],pe<Rt?(Ue=0,ot=1,wt="left"):pe<It?(Ue=pe-Rt,ot=Ue+1):(Yt==re.length-3||pe==It&&re[Yt+3]>pe)&&(ot=It-Rt,Ue=ot-1,pe>=It&&(wt="right")),Ue!=null){if(Re=re[Yt+2],Rt==It&&Fe==(Re.insertLeft?"left":"right")&&(wt=Fe),Fe=="left"&&Ue==0)for(;Yt&&re[Yt-2]==re[Yt-3]&&re[Yt-1].insertLeft;)Re=re[(Yt-=3)+2],wt="left";if(Fe=="right"&&Ue==It-Rt)for(;Yt<re.length-3&&re[Yt+3]==re[Yt+4]&&!re[Yt+5].insertLeft;)Re=re[(Yt+=3)+2],wt="right";break}return{node:Re,start:Ue,end:ot,collapse:wt,coverStart:Rt,coverEnd:It}}function lu(re,pe){var Fe=th;if(pe=="left")for(var Re=0;Re<re.length&&(Fe=re[Re]).left==Fe.right;Re++);else for(var Ue=re.length-1;Ue>=0&&(Fe=re[Ue]).left==Fe.right;Ue--);return Fe}function oo(re,pe,Fe,Re){var Ue=xc(pe.map,Fe,Re),ot=Ue.node,wt=Ue.start,Rt=Ue.end,It=Ue.collapse,Yt;if(ot.nodeType==3){for(var Tn=0;Tn<4;Tn++){for(;wt&&He(pe.line.text.charAt(Ue.coverStart+wt));)--wt;for(;Ue.coverStart+Rt<Ue.coverEnd&&He(pe.line.text.charAt(Ue.coverStart+Rt));)++Rt;if(Ce&&Le<9&&wt==0&&Rt==Ue.coverEnd-Ue.coverStart?Yt=ot.parentNode.getBoundingClientRect():Yt=lu(Ge(ot,wt,Rt).getClientRects(),Re),Yt.left||Yt.right||wt==0)break;Rt=wt,wt=wt-1,It="right"}Ce&&Le<11&&(Yt=Uo(re.display.measure,Yt))}else{wt>0&&(It=Re="right");var tn;re.options.lineWrapping&&(tn=ot.getClientRects()).length>1?Yt=tn[Re=="right"?tn.length-1:0]:Yt=ot.getBoundingClientRect()}if(Ce&&Le<9&&!wt&&(!Yt||!Yt.left&&!Yt.right)){var Gn=ot.parentNode.getClientRects()[0];Gn?Yt={left:Gn.left,right:Gn.left+Wu(re.display),top:Gn.top,bottom:Gn.bottom}:Yt=th}for(var jn=Yt.top-pe.rect.top,mi=Yt.bottom-pe.rect.top,_i=(jn+mi)/2,Bi=pe.view.measure.heights,nr=0;nr<Bi.length-1&&!(_i<Bi[nr]);nr++);var Dr=nr?Bi[nr-1]:0,Sr=Bi[nr],Kr={left:(It=="right"?Yt.right:Yt.left)-pe.rect.left,right:(It=="left"?Yt.left:Yt.right)-pe.rect.left,top:Dr,bottom:Sr};return!Yt.left&&!Yt.right&&(Kr.bogus=!0),re.options.singleCursorHeightPerLine||(Kr.rtop=jn,Kr.rbottom=mi),Kr}function Uo(re,pe){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ur(re))return pe;var Fe=screen.logicalXDPI/screen.deviceXDPI,Re=screen.logicalYDPI/screen.deviceYDPI;return{left:pe.left*Fe,right:pe.right*Fe,top:pe.top*Re,bottom:pe.bottom*Re}}function ka(re){if(re.measure&&(re.measure.cache={},re.measure.heights=null,re.rest))for(var pe=0;pe<re.rest.length;pe++)re.measure.caches[pe]={}}function ra(re){re.display.externalMeasure=null,De(re.display.lineMeasure);for(var pe=0;pe<re.display.view.length;pe++)ka(re.display.view[pe])}function Ds(re){ra(re),re.display.cachedCharWidth=re.display.cachedTextHeight=re.display.cachedPaddingH=null,re.options.lineWrapping||(re.display.maxLineChanged=!0),re.display.lineNumChars=null}function bs(){return xe&&z?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ks(){return xe&&z?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Zs(re){var pe=0;if(re.widgets)for(var Fe=0;Fe<re.widgets.length;++Fe)re.widgets[Fe].above&&(pe+=Ia(re.widgets[Fe]));return pe}function Ks(re,pe,Fe,Re,Ue){if(!Ue){var ot=Zs(pe);Fe.top+=ot,Fe.bottom+=ot}if(Re=="line")return Fe;Re||(Re="local");var wt=to(pe);if(Re=="local"?wt+=Na(re.display):wt-=re.display.viewOffset,Re=="page"||Re=="window"){var Rt=re.display.lineSpace.getBoundingClientRect();wt+=Rt.top+(Re=="window"?0:ks());var It=Rt.left+(Re=="window"?0:bs());Fe.left+=It,Fe.right+=It}return Fe.top+=wt,Fe.bottom+=wt,Fe}function Yl(re,pe,Fe){if(Fe=="div")return pe;var Re=pe.left,Ue=pe.top;if(Fe=="page")Re-=bs(),Ue-=ks();else if(Fe=="local"||!Fe){var ot=re.display.sizer.getBoundingClientRect();Re+=ot.left,Ue+=ot.top}var wt=re.display.lineSpace.getBoundingClientRect();return{left:Re-wt.left,top:Ue-wt.top}}function Bl(re,pe,Fe,Re,Ue){return Re||(Re=dn(re.doc,pe.line)),Ks(re,Re,Sc(re,Re,pe.ch,Ue),Fe)}function Rs(re,pe,Fe,Re,Ue,ot){Re=Re||dn(re.doc,pe.line),Ue||(Ue=Lu(re,Re));function wt(mi,_i){var Bi=bl(re,Ue,mi,_i?"right":"left",ot);return _i?Bi.left=Bi.right:Bi.right=Bi.left,Ks(re,Re,Bi,Fe)}var Rt=dt(Re,re.doc.direction),It=pe.ch,Yt=pe.sticky;if(It>=Re.text.length?(It=Re.text.length,Yt="before"):It<=0&&(It=0,Yt="after"),!Rt)return wt(Yt=="before"?It-1:It,Yt=="before");function Tn(mi,_i,Bi){var nr=Rt[_i],Dr=nr.level==1;return wt(Bi?mi-1:mi,Dr!=Bi)}var tn=Ne(Rt,It,Yt),Gn=be,jn=Tn(It,tn,Yt=="before");return Gn!=null&&(jn.other=Tn(It,Gn,Yt!="before")),jn}function xh(re,pe){var Fe=0;pe=Fn(re.doc,pe),re.options.lineWrapping||(Fe=Wu(re.display)*pe.ch);var Re=dn(re.doc,pe.line),Ue=to(Re)+Na(re.display);return{left:Fe,right:Fe,top:Ue,bottom:Ue+Re.height}}function nh(re,pe,Fe,Re,Ue){var ot=nn(re,pe,Fe);return ot.xRel=Ue,Re&&(ot.outside=Re),ot}function wc(re,pe,Fe){var Re=re.doc;if(Fe+=re.display.viewOffset,Fe<0)return nh(Re.first,0,null,-1,-1);var Ue=un(Re,Fe),ot=Re.first+Re.size-1;if(Ue>ot)return nh(Re.first+Re.size-1,dn(Re,ot).text.length,null,1,1);pe<0&&(pe=0);for(var wt=dn(Re,Ue);;){var Rt=Yn(re,wt,Ue,pe,Fe),It=cr(wt,Rt.ch+(Rt.xRel>0||Rt.outside>0?1:0));if(!It)return Rt;var Yt=It.find(1);if(Yt.line==Ue)return Yt;wt=dn(Re,Ue=Yt.line)}}function gr(re,pe,Fe,Re){Re-=Zs(pe);var Ue=pe.text.length,ot=We(function(wt){return bl(re,Fe,wt-1).bottom<=Re},Ue,0);return Ue=We(function(wt){return bl(re,Fe,wt).top>Re},ot,Ue),{begin:ot,end:Ue}}function bc(re,pe,Fe,Re){Fe||(Fe=Lu(re,pe));var Ue=Ks(re,pe,bl(re,Fe,Re),"line").top;return gr(re,pe,Fe,Ue)}function rn(re,pe,Fe,Re){return re.bottom<=Fe?!1:re.top>Fe?!0:(Re?re.left:re.right)>pe}function Yn(re,pe,Fe,Re,Ue){Ue-=to(pe);var ot=Lu(re,pe),wt=Zs(pe),Rt=0,It=pe.text.length,Yt=!0,Tn=dt(pe,re.doc.direction);if(Tn){var tn=(re.options.lineWrapping?Qh:wh)(re,pe,Fe,ot,Tn,Re,Ue);Yt=tn.level!=1,Rt=Yt?tn.from:tn.to-1,It=Yt?tn.to:tn.from-1}var Gn=null,jn=null,mi=We(function(wo){var yr=bl(re,ot,wo);return yr.top+=wt,yr.bottom+=wt,rn(yr,Re,Ue,!1)?(yr.top<=Ue&&yr.left<=Re&&(Gn=wo,jn=yr),!0):!1},Rt,It),_i,Bi,nr=!1;if(jn){var Dr=Re-jn.left<jn.right-Re,Sr=Dr==Yt;mi=Gn+(Sr?0:1),Bi=Sr?"after":"before",_i=Dr?jn.left:jn.right}else{!Yt&&(mi==It||mi==Rt)&&mi++,Bi=mi==0?"after":mi==pe.text.length?"before":bl(re,ot,mi-(Yt?1:0)).bottom+wt<=Ue==Yt?"after":"before";var Kr=Rs(re,nn(Fe,mi,Bi),"line",pe,ot);_i=Kr.left,nr=Ue<Kr.top?-1:Ue>=Kr.bottom?1:0}return mi=Ie(pe.text,mi,1),nh(Fe,mi,Bi,nr,Re-_i)}function wh(re,pe,Fe,Re,Ue,ot,wt){var Rt=We(function(tn){var Gn=Ue[tn],jn=Gn.level!=1;return rn(Rs(re,nn(Fe,jn?Gn.to:Gn.from,jn?"before":"after"),"line",pe,Re),ot,wt,!0)},0,Ue.length-1),It=Ue[Rt];if(Rt>0){var Yt=It.level!=1,Tn=Rs(re,nn(Fe,Yt?It.from:It.to,Yt?"after":"before"),"line",pe,Re);rn(Tn,ot,wt,!0)&&Tn.top>wt&&(It=Ue[Rt-1])}return It}function Qh(re,pe,Fe,Re,Ue,ot,wt){var Rt=gr(re,pe,Re,wt),It=Rt.begin,Yt=Rt.end;/\s/.test(pe.text.charAt(Yt-1))&&Yt--;for(var Tn=null,tn=null,Gn=0;Gn<Ue.length;Gn++){var jn=Ue[Gn];if(!(jn.from>=Yt||jn.to<=It)){var mi=jn.level!=1,_i=bl(re,Re,mi?Math.min(Yt,jn.to)-1:Math.max(It,jn.from)).right,Bi=_i<ot?ot-_i+1e9:_i-ot;(!Tn||tn>Bi)&&(Tn=jn,tn=Bi)}}return Tn||(Tn=Ue[Ue.length-1]),Tn.from<It&&(Tn={from:It,to:Tn.to,level:Tn.level}),Tn.to>Yt&&(Tn={from:Tn.from,to:Yt,level:Tn.level}),Tn}var Mu;function Tu(re){if(re.cachedTextHeight!=null)return re.cachedTextHeight;if(Mu==null){Mu=Ze("pre",null,"CodeMirror-line-like");for(var pe=0;pe<49;++pe)Mu.appendChild(document.createTextNode("x")),Mu.appendChild(Ze("br"));Mu.appendChild(document.createTextNode("x"))}ze(re.measure,Mu);var Fe=Mu.offsetHeight/50;return Fe>3&&(re.cachedTextHeight=Fe),De(re.measure),Fe||1}function Wu(re){if(re.cachedCharWidth!=null)return re.cachedCharWidth;var pe=Ze("span","xxxxxxxxxx"),Fe=Ze("pre",[pe],"CodeMirror-line-like");ze(re.measure,Fe);var Re=pe.getBoundingClientRect(),Ue=(Re.right-Re.left)/10;return Ue>2&&(re.cachedCharWidth=Ue),Ue||10}function bh(re){for(var pe=re.display,Fe={},Re={},Ue=pe.gutters.clientLeft,ot=pe.gutters.firstChild,wt=0;ot;ot=ot.nextSibling,++wt){var Rt=re.display.gutterSpecs[wt].className;Fe[Rt]=ot.offsetLeft+ot.clientLeft+Ue,Re[Rt]=ot.clientWidth}return{fixedPos:Cc(pe),gutterTotalWidth:pe.gutters.offsetWidth,gutterLeft:Fe,gutterWidth:Re,wrapperWidth:pe.wrapper.clientWidth}}function Cc(re){return re.scroller.getBoundingClientRect().left-re.sizer.getBoundingClientRect().left}function Vs(re){var pe=Tu(re.display),Fe=re.options.lineWrapping,Re=Fe&&Math.max(5,re.display.scroller.clientWidth/Wu(re.display)-3);return function(Ue){if(Qn(re.doc,Ue))return 0;var ot=0;if(Ue.widgets)for(var wt=0;wt<Ue.widgets.length;wt++)Ue.widgets[wt].height&&(ot+=Ue.widgets[wt].height);return Fe?ot+(Math.ceil(Ue.text.length/Re)||1)*pe:ot+pe}}function $r(re){var pe=re.doc,Fe=Vs(re);pe.iter(function(Re){var Ue=Fe(Re);Ue!=Re.height&&on(Re,Ue)})}function Da(re,pe,Fe,Re){var Ue=re.display;if(!Fe&&ir(pe).getAttribute("cm-not-content")=="true")return null;var ot,wt,Rt=Ue.lineSpace.getBoundingClientRect();try{ot=pe.clientX-Rt.left,wt=pe.clientY-Rt.top}catch(tn){return null}var It=wc(re,ot,wt),Yt;if(Re&&It.xRel>0&&(Yt=dn(re.doc,It.line).text).length==It.ch){var Tn=lt(Yt,Yt.length,re.options.tabSize)-Yt.length;It=nn(It.line,Math.max(0,Math.round((ot-_u(re.display).left)/Wu(re.display))-Tn))}return It}function $s(re,pe){if(pe>=re.display.viewTo||(pe-=re.display.viewFrom,pe<0))return null;for(var Fe=re.display.view,Re=0;Re<Fe.length;Re++)if(pe-=Fe[Re].size,pe<0)return Re}function Ms(re,pe,Fe,Re){pe==null&&(pe=re.doc.first),Fe==null&&(Fe=re.doc.first+re.doc.size),Re||(Re=0);var Ue=re.display;if(Re&&Fe<Ue.viewTo&&(Ue.updateLineNumbers==null||Ue.updateLineNumbers>pe)&&(Ue.updateLineNumbers=pe),re.curOp.viewChanged=!0,pe>=Ue.viewTo)Bn&&rr(re.doc,pe)<Ue.viewTo&&ga(re);else if(Fe<=Ue.viewFrom)Bn&&Wi(re.doc,Fe+Re)>Ue.viewFrom?ga(re):(Ue.viewFrom+=Re,Ue.viewTo+=Re);else if(pe<=Ue.viewFrom&&Fe>=Ue.viewTo)ga(re);else if(pe<=Ue.viewFrom){var ot=dl(re,Fe,Fe+Re,1);ot?(Ue.view=Ue.view.slice(ot.index),Ue.viewFrom=ot.lineN,Ue.viewTo+=Re):ga(re)}else if(Fe>=Ue.viewTo){var wt=dl(re,pe,pe,-1);wt?(Ue.view=Ue.view.slice(0,wt.index),Ue.viewTo=wt.lineN):ga(re)}else{var Rt=dl(re,pe,pe,-1),It=dl(re,Fe,Fe+Re,1);Rt&&It?(Ue.view=Ue.view.slice(0,Rt.index).concat(Ao(re,Rt.lineN,It.lineN)).concat(Ue.view.slice(It.index)),Ue.viewTo+=Re):ga(re)}var Yt=Ue.externalMeasured;Yt&&(Fe<Yt.lineN?Yt.lineN+=Re:pe<Yt.lineN+Yt.size&&(Ue.externalMeasured=null))}function xo(re,pe,Fe){re.curOp.viewChanged=!0;var Re=re.display,Ue=re.display.externalMeasured;if(Ue&&pe>=Ue.lineN&&pe<Ue.lineN+Ue.size&&(Re.externalMeasured=null),!(pe<Re.viewFrom||pe>=Re.viewTo)){var ot=Re.view[$s(re,pe)];if(ot.node!=null){var wt=ot.changes||(ot.changes=[]);ut(wt,Fe)==-1&&wt.push(Fe)}}}function ga(re){re.display.viewFrom=re.display.viewTo=re.doc.first,re.display.view=[],re.display.viewOffset=0}function dl(re,pe,Fe,Re){var Ue=$s(re,pe),ot,wt=re.display.view;if(!Bn||Fe==re.doc.first+re.doc.size)return{index:Ue,lineN:Fe};for(var Rt=re.display.viewFrom,It=0;It<Ue;It++)Rt+=wt[It].size;if(Rt!=pe){if(Re>0){if(Ue==wt.length-1)return null;ot=Rt+wt[Ue].size-pe,Ue++}else ot=Rt-pe;pe+=ot,Fe+=ot}for(;rr(re.doc,Fe)!=Fe;){if(Ue==(Re<0?0:wt.length-1))return null;Fe+=Re*wt[Ue-(Re<0?1:0)].size,Ue+=Re}return{index:Ue,lineN:Fe}}function cs(re,pe,Fe){var Re=re.display,Ue=Re.view;Ue.length==0||pe>=Re.viewTo||Fe<=Re.viewFrom?(Re.view=Ao(re,pe,Fe),Re.viewFrom=pe):(Re.viewFrom>pe?Re.view=Ao(re,pe,Re.viewFrom).concat(Re.view):Re.viewFrom<pe&&(Re.view=Re.view.slice($s(re,pe))),Re.viewFrom=pe,Re.viewTo<Fe?Re.view=Re.view.concat(Ao(re,Re.viewTo,Fe)):Re.viewTo>Fe&&(Re.view=Re.view.slice(0,$s(re,Fe)))),Re.viewTo=Fe}function Cl(re){for(var pe=re.display.view,Fe=0,Re=0;Re<pe.length;Re++){var Ue=pe[Re];!Ue.hidden&&(!Ue.node||Ue.changes)&&++Fe}return Fe}function Ea(re){re.display.input.showSelection(re.display.input.prepareSelection())}function Pc(re,pe){pe===void 0&&(pe=!0);for(var Fe=re.doc,Re={},Ue=Re.cursors=document.createDocumentFragment(),ot=Re.selection=document.createDocumentFragment(),wt=0;wt<Fe.sel.ranges.length;wt++)if(!(!pe&&wt==Fe.sel.primIndex)){var Rt=Fe.sel.ranges[wt];if(!(Rt.from().line>=re.display.viewTo||Rt.to().line<re.display.viewFrom)){var It=Rt.empty();(It||re.options.showCursorWhenSelecting)&&Go(re,Rt.head,Ue),It||Vo(re,Rt,ot)}}return Re}function Go(re,pe,Fe){var Re=Rs(re,pe,"div",null,null,!re.options.singleCursorHeightPerLine),Ue=Fe.appendChild(Ze("div","\xA0","CodeMirror-cursor"));if(Ue.style.left=Re.left+"px",Ue.style.top=Re.top+"px",Ue.style.height=Math.max(0,Re.bottom-Re.top)*re.options.cursorHeight+"px",Re.other){var ot=Fe.appendChild(Ze("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));ot.style.display="",ot.style.left=Re.other.left+"px",ot.style.top=Re.other.top+"px",ot.style.height=(Re.other.bottom-Re.other.top)*.85+"px"}}function Ka(re,pe){return re.top-pe.top||re.left-pe.left}function Vo(re,pe,Fe){var Re=re.display,Ue=re.doc,ot=document.createDocumentFragment(),wt=_u(re.display),Rt=wt.left,It=Math.max(Re.sizerWidth,Za(re)-Re.sizer.offsetLeft)-wt.right,Yt=Ue.direction=="ltr";function Tn(Sr,Kr,wo,yr){Kr<0&&(Kr=0),Kr=Math.round(Kr),yr=Math.round(yr),ot.appendChild(Ze("div",null,"CodeMirror-selected","position: absolute; left: "+Sr+`px;
|
|
|
top: `+Kr+"px; width: "+(wo==null?It-Sr:wo)+`px;
|
|
|
height: `+(yr-Kr)+"px"))}function tn(Sr,Kr,wo){var yr=dn(Ue,Sr),zo=yr.text.length,ca,Ya;function va(ja,gu){return Bl(re,nn(Sr,ja),"div",yr,gu)}function nu(ja,gu,pl){var za=bc(re,yr,null,ja),ws=gu=="ltr"==(pl=="after")?"left":"right",Ca=pl=="after"?za.begin:za.end-(/\s/.test(yr.text.charAt(za.end-1))?2:1);return va(Ca,ws)[ws]}var Ml=dt(yr,Ue.direction);return Oe(Ml,Kr||0,wo==null?zo:wo,function(ja,gu,pl,za){var ws=pl=="ltr",Ca=va(ja,ws?"left":"right"),tl=va(gu-1,ws?"right":"left"),gl=Kr==null&&ja==0,lc=wo==null&&gu==zo,ya=za==0,Vu=!Ml||za==Ml.length-1;if(tl.top-Ca.top<=3){var Ta=(Yt?gl:lc)&&ya,Ef=(Yt?lc:gl)&&Vu,Iu=Ta?Rt:(ws?Ca:tl).left,mu=Ef?It:(ws?tl:Ca).right;Tn(Iu,Ca.top,mu-Iu,Ca.bottom)}else{var iu,ea,nl,Hc;ws?(iu=Yt&&gl&&ya?Rt:Ca.left,ea=Yt?It:nu(ja,pl,"before"),nl=Yt?Rt:nu(gu,pl,"after"),Hc=Yt&&lc&&Vu?It:tl.right):(iu=Yt?nu(ja,pl,"before"):Rt,ea=!Yt&&gl&&ya?It:Ca.right,nl=!Yt&&lc&&Vu?Rt:tl.left,Hc=Yt?nu(gu,pl,"after"):It),Tn(iu,Ca.top,ea-iu,Ca.bottom),Ca.bottom<tl.top&&Tn(Rt,Ca.bottom,null,tl.top),Tn(nl,tl.top,Hc-nl,tl.bottom)}(!ca||Ka(Ca,ca)<0)&&(ca=Ca),Ka(tl,ca)<0&&(ca=tl),(!Ya||Ka(Ca,Ya)<0)&&(Ya=Ca),Ka(tl,Ya)<0&&(Ya=tl)}),{start:ca,end:Ya}}var Gn=pe.from(),jn=pe.to();if(Gn.line==jn.line)tn(Gn.line,Gn.ch,jn.ch);else{var mi=dn(Ue,Gn.line),_i=dn(Ue,jn.line),Bi=hr(mi)==hr(_i),nr=tn(Gn.line,Gn.ch,Bi?mi.text.length+1:null).end,Dr=tn(jn.line,Bi?0:null,jn.ch).start;Bi&&(nr.top<Dr.top-2?(Tn(nr.right,nr.top,null,nr.bottom),Tn(Rt,Dr.top,Dr.left,Dr.bottom)):Tn(nr.right,nr.top,Dr.left-nr.right,nr.bottom)),nr.bottom<Dr.top&&Tn(Rt,nr.bottom,null,Dr.top)}Fe.appendChild(ot)}function vs(re){if(re.state.focused){var pe=re.display;clearInterval(pe.blinker);var Fe=!0;pe.cursorDiv.style.visibility="",re.options.cursorBlinkRate>0?pe.blinker=setInterval(function(){re.hasFocus()||Rc(re),pe.cursorDiv.style.visibility=(Fe=!Fe)?"":"hidden"},re.options.cursorBlinkRate):re.options.cursorBlinkRate<0&&(pe.cursorDiv.style.visibility="hidden")}}function ds(re){re.state.focused||(re.display.input.focus(),Fo(re))}function Bs(re){re.state.delayingBlurEvent=!0,setTimeout(function(){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1,Rc(re))},100)}function Fo(re,pe){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1),re.options.readOnly!="nocursor"&&(re.state.focused||(ln(re,"focus",re,pe),re.state.focused=!0,Ct(re.display.wrapper,"CodeMirror-focused"),!re.curOp&&re.display.selForContextMenu!=re.doc.sel&&(re.display.input.reset(),he&&setTimeout(function(){return re.display.input.reset(!0)},20)),re.display.input.receivedFocus()),vs(re))}function Rc(re,pe){re.state.delayingBlurEvent||(re.state.focused&&(ln(re,"blur",re,pe),re.state.focused=!1,Ae(re.display.wrapper,"CodeMirror-focused")),clearInterval(re.display.blinker),setTimeout(function(){re.state.focused||(re.display.shift=!1)},150))}function Wr(re){for(var pe=re.display,Fe=pe.lineDiv.offsetTop,Re=0;Re<pe.view.length;Re++){var Ue=pe.view[Re],ot=re.options.lineWrapping,wt=void 0,Rt=0;if(!Ue.hidden){if(Ce&&Le<8){var It=Ue.node.offsetTop+Ue.node.offsetHeight;wt=It-Fe,Fe=It}else{var Yt=Ue.node.getBoundingClientRect();wt=Yt.bottom-Yt.top,!ot&&Ue.text.firstChild&&(Rt=Ue.text.firstChild.getBoundingClientRect().right-Yt.left-1)}var Tn=Ue.line.height-wt;if((Tn>.005||Tn<-.005)&&(on(Ue.line,wt),Ad(Ue.line),Ue.rest))for(var tn=0;tn<Ue.rest.length;tn++)Ad(Ue.rest[tn]);if(Rt>re.display.sizerWidth){var Gn=Math.ceil(Rt/Wu(re.display));Gn>re.display.maxLineLength&&(re.display.maxLineLength=Gn,re.display.maxLine=Ue.line,re.display.maxLineChanged=!0)}}}}function Ad(re){if(re.widgets)for(var pe=0;pe<re.widgets.length;++pe){var Fe=re.widgets[pe],Re=Fe.node.parentNode;Re&&(Fe.height=Re.offsetHeight)}}function Wo(re,pe,Fe){var Re=Fe&&Fe.top!=null?Math.max(0,Fe.top):re.scroller.scrollTop;Re=Math.floor(Re-Na(re));var Ue=Fe&&Fe.bottom!=null?Fe.bottom:Re+re.wrapper.clientHeight,ot=un(pe,Re),wt=un(pe,Ue);if(Fe&&Fe.ensure){var Rt=Fe.ensure.from.line,It=Fe.ensure.to.line;Rt<ot?(ot=Rt,wt=un(pe,to(dn(pe,Rt))+re.wrapper.clientHeight)):Math.min(It,pe.lastLine())>=wt&&(ot=un(pe,to(dn(pe,It))-re.wrapper.clientHeight),wt=It)}return{from:ot,to:Math.max(wt,ot+1)}}function Nd(re,pe){if(!gn(re,"scrollCursorIntoView")){var Fe=re.display,Re=Fe.sizer.getBoundingClientRect(),Ue=null;if(pe.top+Re.top<0?Ue=!0:pe.bottom+Re.top>(window.innerHeight||document.documentElement.clientHeight)&&(Ue=!1),Ue!=null&&!de){var ot=Ze("div","\u200B",null,`position: absolute;
|
|
|
top: `+(pe.top-Fe.viewOffset-Na(re.display))+`px;
|
|
|
height: `+(pe.bottom-pe.top+Wa(re)+Fe.barHeight)+`px;
|
|
|
left: `+pe.left+"px; width: "+Math.max(2,pe.right-pe.left)+"px;");re.display.lineSpace.appendChild(ot),ot.scrollIntoView(Ue),re.display.lineSpace.removeChild(ot)}}}function ih(re,pe,Fe,Re){Re==null&&(Re=0);var Ue;!re.options.lineWrapping&&pe==Fe&&(pe=pe.ch?nn(pe.line,pe.sticky=="before"?pe.ch-1:pe.ch,"after"):pe,Fe=pe.sticky=="before"?nn(pe.line,pe.ch+1,"before"):pe);for(var ot=0;ot<5;ot++){var wt=!1,Rt=Rs(re,pe),It=!Fe||Fe==pe?Rt:Rs(re,Fe);Ue={left:Math.min(Rt.left,It.left),top:Math.min(Rt.top,It.top)-Re,right:Math.max(Rt.left,It.left),bottom:Math.max(Rt.bottom,It.bottom)+Re};var Yt=Od(re,Ue),Tn=re.doc.scrollTop,tn=re.doc.scrollLeft;if(Yt.scrollTop!=null&&(Au(re,Yt.scrollTop),Math.abs(re.doc.scrollTop-Tn)>1&&(wt=!0)),Yt.scrollLeft!=null&&(uu(re,Yt.scrollLeft),Math.abs(re.doc.scrollLeft-tn)>1&&(wt=!0)),!wt)break}return Ue}function rh(re,pe){var Fe=Od(re,pe);Fe.scrollTop!=null&&Au(re,Fe.scrollTop),Fe.scrollLeft!=null&&uu(re,Fe.scrollLeft)}function Od(re,pe){var Fe=re.display,Re=Tu(re.display);pe.top<0&&(pe.top=0);var Ue=re.curOp&&re.curOp.scrollTop!=null?re.curOp.scrollTop:Fe.scroller.scrollTop,ot=Uu(re),wt={};pe.bottom-pe.top>ot&&(pe.bottom=pe.top+ot);var Rt=re.doc.height+$l(Fe),It=pe.top<Re,Yt=pe.bottom>Rt-Re;if(pe.top<Ue)wt.scrollTop=It?0:pe.top;else if(pe.bottom>Ue+ot){var Tn=Math.min(pe.top,(Yt?Rt:pe.bottom)-ot);Tn!=Ue&&(wt.scrollTop=Tn)}var tn=re.options.fixedGutter?0:Fe.gutters.offsetWidth,Gn=re.curOp&&re.curOp.scrollLeft!=null?re.curOp.scrollLeft:Fe.scroller.scrollLeft-tn,jn=Za(re)-Fe.gutters.offsetWidth,mi=pe.right-pe.left>jn;return mi&&(pe.right=pe.left+jn),pe.left<10?wt.scrollLeft=0:pe.left<Gn?wt.scrollLeft=Math.max(0,pe.left+tn-(mi?0:10)):pe.right>jn+Gn-3&&(wt.scrollLeft=pe.right+(mi?0:10)-jn),wt}function Ch(re,pe){pe!=null&&(ku(re),re.curOp.scrollTop=(re.curOp.scrollTop==null?re.doc.scrollTop:re.curOp.scrollTop)+pe)}function ic(re){ku(re);var pe=re.getCursor();re.curOp.scrollToPos={from:pe,to:pe,margin:re.options.cursorScrollMargin}}function ro(re,pe,Fe){(pe!=null||Fe!=null)&&ku(re),pe!=null&&(re.curOp.scrollLeft=pe),Fe!=null&&(re.curOp.scrollTop=Fe)}function ns(re,pe){ku(re),re.curOp.scrollToPos=pe}function ku(re){var pe=re.curOp.scrollToPos;if(pe){re.curOp.scrollToPos=null;var Fe=xh(re,pe.from),Re=xh(re,pe.to);qh(re,Fe,Re,pe.margin)}}function qh(re,pe,Fe,Re){var Ue=Od(re,{left:Math.min(pe.left,Fe.left),top:Math.min(pe.top,Fe.top)-Re,right:Math.max(pe.right,Fe.right),bottom:Math.max(pe.bottom,Fe.bottom)+Re});ro(re,Ue.scrollLeft,Ue.scrollTop)}function Au(re,pe){Math.abs(re.doc.scrollTop-pe)<2||(Me||gi(re,{top:pe}),ed(re,pe,!0),Me&&gi(re),Sn(re,100))}function ed(re,pe,Fe){pe=Math.max(0,Math.min(re.display.scroller.scrollHeight-re.display.scroller.clientHeight,pe)),!(re.display.scroller.scrollTop==pe&&!Fe)&&(re.doc.scrollTop=pe,re.display.scrollbars.setScrollTop(pe),re.display.scroller.scrollTop!=pe&&(re.display.scroller.scrollTop=pe))}function uu(re,pe,Fe,Re){pe=Math.max(0,Math.min(pe,re.display.scroller.scrollWidth-re.display.scroller.clientWidth)),!((Fe?pe==re.doc.scrollLeft:Math.abs(re.doc.scrollLeft-pe)<2)&&!Re)&&(re.doc.scrollLeft=pe,Ui(re),re.display.scroller.scrollLeft!=pe&&(re.display.scroller.scrollLeft=pe),re.display.scrollbars.setScrollLeft(pe))}function Fl(re){var pe=re.display,Fe=pe.gutters.offsetWidth,Re=Math.round(re.doc.height+$l(re.display));return{clientHeight:pe.scroller.clientHeight,viewHeight:pe.wrapper.clientHeight,scrollWidth:pe.scroller.scrollWidth,clientWidth:pe.scroller.clientWidth,viewWidth:pe.wrapper.clientWidth,barLeft:re.options.fixedGutter?Fe:0,docHeight:Re,scrollHeight:Re+Wa(re)+pe.barHeight,nativeBarWidth:pe.nativeBarWidth,gutterWidth:Fe}}var ps=function(re,pe,Fe){this.cm=Fe;var Re=this.vert=Ze("div",[Ze("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),Ue=this.horiz=Ze("div",[Ze("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");Re.tabIndex=Ue.tabIndex=-1,re(Re),re(Ue),At(Re,"scroll",function(){Re.clientHeight&&pe(Re.scrollTop,"vertical")}),At(Ue,"scroll",function(){Ue.clientWidth&&pe(Ue.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Ce&&Le<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ps.prototype.update=function(re){var pe=re.scrollWidth>re.clientWidth+1,Fe=re.scrollHeight>re.clientHeight+1,Re=re.nativeBarWidth;if(Fe){this.vert.style.display="block",this.vert.style.bottom=pe?Re+"px":"0";var Ue=re.viewHeight-(pe?Re:0);this.vert.firstChild.style.height=Math.max(0,re.scrollHeight-re.clientHeight+Ue)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(pe){this.horiz.style.display="block",this.horiz.style.right=Fe?Re+"px":"0",this.horiz.style.left=re.barLeft+"px";var ot=re.viewWidth-re.barLeft-(Fe?Re:0);this.horiz.firstChild.style.width=Math.max(0,re.scrollWidth-re.clientWidth+ot)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&re.clientHeight>0&&(Re==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:Fe?Re:0,bottom:pe?Re:0}},ps.prototype.setScrollLeft=function(re){this.horiz.scrollLeft!=re&&(this.horiz.scrollLeft=re),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ps.prototype.setScrollTop=function(re){this.vert.scrollTop!=re&&(this.vert.scrollTop=re),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ps.prototype.zeroWidthHack=function(){var re=oe&&!ve?"12px":"18px";this.horiz.style.height=this.vert.style.width=re,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new tt,this.disableVert=new tt},ps.prototype.enableZeroWidthBar=function(re,pe,Fe){re.style.pointerEvents="auto";function Re(){var Ue=re.getBoundingClientRect(),ot=Fe=="vert"?document.elementFromPoint(Ue.right-1,(Ue.top+Ue.bottom)/2):document.elementFromPoint((Ue.right+Ue.left)/2,Ue.bottom-1);ot!=re?re.style.pointerEvents="none":pe.set(1e3,Re)}pe.set(1e3,Re)},ps.prototype.clear=function(){var re=this.horiz.parentNode;re.removeChild(this.horiz),re.removeChild(this.vert)};var Fs=function(){};Fs.prototype.update=function(){return{bottom:0,right:0}},Fs.prototype.setScrollLeft=function(){},Fs.prototype.setScrollTop=function(){},Fs.prototype.clear=function(){};function rc(re,pe){pe||(pe=Fl(re));var Fe=re.display.barWidth,Re=re.display.barHeight;el(re,pe);for(var Ue=0;Ue<4&&Fe!=re.display.barWidth||Re!=re.display.barHeight;Ue++)Fe!=re.display.barWidth&&re.options.lineWrapping&&Wr(re),el(re,Fl(re)),Fe=re.display.barWidth,Re=re.display.barHeight}function el(re,pe){var Fe=re.display,Re=Fe.scrollbars.update(pe);Fe.sizer.style.paddingRight=(Fe.barWidth=Re.right)+"px",Fe.sizer.style.paddingBottom=(Fe.barHeight=Re.bottom)+"px",Fe.heightForcer.style.borderBottom=Re.bottom+"px solid transparent",Re.right&&Re.bottom?(Fe.scrollbarFiller.style.display="block",Fe.scrollbarFiller.style.height=Re.bottom+"px",Fe.scrollbarFiller.style.width=Re.right+"px"):Fe.scrollbarFiller.style.display="",Re.bottom&&re.options.coverGutterNextToScrollbar&&re.options.fixedGutter?(Fe.gutterFiller.style.display="block",Fe.gutterFiller.style.height=Re.bottom+"px",Fe.gutterFiller.style.width=pe.gutterWidth+"px"):Fe.gutterFiller.style.display=""}var Id={native:ps,null:Fs};function td(re){re.display.scrollbars&&(re.display.scrollbars.clear(),re.display.scrollbars.addClass&&Ae(re.display.wrapper,re.display.scrollbars.addClass)),re.display.scrollbars=new Id[re.options.scrollbarStyle](function(pe){re.display.wrapper.insertBefore(pe,re.display.scrollbarFiller),At(pe,"mousedown",function(){re.state.focused&&setTimeout(function(){return re.display.input.focus()},0)}),pe.setAttribute("cm-not-content","true")},function(pe,Fe){Fe=="horizontal"?uu(re,pe):Au(re,pe)},re),re.display.scrollbars.addClass&&Ct(re.display.wrapper,re.display.scrollbars.addClass)}var Dd=0;function Oa(re){re.curOp={cm:re,viewChanged:!1,startHeight:re.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:++Dd},ua(re.curOp)}function oc(re){var pe=re.curOp;pe&&lo(pe,function(Fe){for(var Re=0;Re<Fe.ops.length;Re++)Fe.ops[Re].cm.curOp=null;gf(Fe)})}function gf(re){for(var pe=re.ops,Fe=0;Fe<pe.length;Fe++)jt(pe[Fe]);for(var Re=0;Re<pe.length;Re++)Ut(pe[Re]);for(var Ue=0;Ue<pe.length;Ue++)cn(pe[Ue]);for(var ot=0;ot<pe.length;ot++)ht(pe[ot]);for(var wt=0;wt<pe.length;wt++)bt(pe[wt])}function jt(re){var pe=re.cm,Fe=pe.display;zn(pe),re.updateMaxLine&&Bo(pe),re.mustUpdate=re.viewChanged||re.forceUpdate||re.scrollTop!=null||re.scrollToPos&&(re.scrollToPos.from.line<Fe.viewFrom||re.scrollToPos.to.line>=Fe.viewTo)||Fe.maxLineChanged&&pe.options.lineWrapping,re.update=re.mustUpdate&&new Cn(pe,re.mustUpdate&&{top:re.scrollTop,ensure:re.scrollToPos},re.forceUpdate)}function Ut(re){re.updatedDisplay=re.mustUpdate&&wi(re.cm,re.update)}function cn(re){var pe=re.cm,Fe=pe.display;re.updatedDisplay&&Wr(pe),re.barMeasure=Fl(pe),Fe.maxLineChanged&&!pe.options.lineWrapping&&(re.adjustWidthTo=Sc(pe,Fe.maxLine,Fe.maxLine.text.length).left+3,pe.display.sizerWidth=re.adjustWidthTo,re.barMeasure.scrollWidth=Math.max(Fe.scroller.clientWidth,Fe.sizer.offsetLeft+re.adjustWidthTo+Wa(pe)+pe.display.barWidth),re.maxScrollLeft=Math.max(0,Fe.sizer.offsetLeft+re.adjustWidthTo-Za(pe))),(re.updatedDisplay||re.selectionChanged)&&(re.preparedSelection=Fe.input.prepareSelection())}function ht(re){var pe=re.cm;re.adjustWidthTo!=null&&(pe.display.sizer.style.minWidth=re.adjustWidthTo+"px",re.maxScrollLeft<pe.doc.scrollLeft&&uu(pe,Math.min(pe.display.scroller.scrollLeft,re.maxScrollLeft),!0),pe.display.maxLineChanged=!1);var Fe=re.focus&&re.focus==at();re.preparedSelection&&pe.display.input.showSelection(re.preparedSelection,Fe),(re.updatedDisplay||re.startHeight!=pe.doc.height)&&rc(pe,re.barMeasure),re.updatedDisplay&&Oi(pe,re.barMeasure),re.selectionChanged&&vs(pe),pe.state.focused&&re.updateInput&&pe.display.input.reset(re.typing),Fe&&ds(re.cm)}function bt(re){var pe=re.cm,Fe=pe.display,Re=pe.doc;if(re.updatedDisplay&&Kn(pe,re.update),Fe.wheelStartX!=null&&(re.scrollTop!=null||re.scrollLeft!=null||re.scrollToPos)&&(Fe.wheelStartX=Fe.wheelStartY=null),re.scrollTop!=null&&ed(pe,re.scrollTop,re.forceScroll),re.scrollLeft!=null&&uu(pe,re.scrollLeft,!0,!0),re.scrollToPos){var Ue=ih(pe,Fn(Re,re.scrollToPos.from),Fn(Re,re.scrollToPos.to),re.scrollToPos.margin);Nd(pe,Ue)}var ot=re.maybeHiddenMarkers,wt=re.maybeUnhiddenMarkers;if(ot)for(var Rt=0;Rt<ot.length;++Rt)ot[Rt].lines.length||ln(ot[Rt],"hide");if(wt)for(var It=0;It<wt.length;++It)wt[It].lines.length&&ln(wt[It],"unhide");Fe.wrapper.offsetHeight&&(Re.scrollTop=pe.display.scroller.scrollTop),re.changeObjs&&ln(pe,"changes",pe,re.changeObjs),re.update&&re.update.finish()}function Et(re,pe){if(re.curOp)return pe();Oa(re);try{return pe()}finally{oc(re)}}function wn(re,pe){return function(){if(re.curOp)return pe.apply(re,arguments);Oa(re);try{return pe.apply(re,arguments)}finally{oc(re)}}}function fn(re){return function(){if(this.curOp)return re.apply(this,arguments);Oa(this);try{return re.apply(this,arguments)}finally{oc(this)}}}function an(re){return function(){var pe=this.cm;if(!pe||pe.curOp)return re.apply(this,arguments);Oa(pe);try{return re.apply(this,arguments)}finally{oc(pe)}}}function Sn(re,pe){re.doc.highlightFrontier<re.display.viewTo&&re.state.highlight.set(pe,st(xn,re))}function xn(re){var pe=re.doc;if(!(pe.highlightFrontier>=re.display.viewTo)){var Fe=+new Date+re.options.workTime,Re=mr(re,pe.highlightFrontier),Ue=[];pe.iter(Re.line,Math.min(pe.first+pe.size,re.display.viewTo+500),function(ot){if(Re.line>=re.display.viewFrom){var wt=ot.styles,Rt=ot.text.length>re.options.maxHighlightLength?St(pe.mode,Re.state):null,It=$i(re,ot,Re,!0);Rt&&(Re.state=Rt),ot.styles=It.styles;var Yt=ot.styleClasses,Tn=It.classes;Tn?ot.styleClasses=Tn:Yt&&(ot.styleClasses=null);for(var tn=!wt||wt.length!=ot.styles.length||Yt!=Tn&&(!Yt||!Tn||Yt.bgClass!=Tn.bgClass||Yt.textClass!=Tn.textClass),Gn=0;!tn&&Gn<wt.length;++Gn)tn=wt[Gn]!=ot.styles[Gn];tn&&Ue.push(Re.line),ot.stateAfter=Re.save(),Re.nextLine()}else ot.text.length<=re.options.maxHighlightLength&&Ln(re,ot.text,Re),ot.stateAfter=Re.line%5==0?Re.save():null,Re.nextLine();if(+new Date>Fe)return Sn(re,re.options.workDelay),!0}),pe.highlightFrontier=Re.line,pe.modeFrontier=Math.max(pe.modeFrontier,Re.line),Ue.length&&Et(re,function(){for(var ot=0;ot<Ue.length;ot++)xo(re,Ue[ot],"text")})}}var Cn=function(re,pe,Fe){var Re=re.display;this.viewport=pe,this.visible=Wo(Re,re.doc,pe),this.editorIsHidden=!Re.wrapper.offsetWidth,this.wrapperHeight=Re.wrapper.clientHeight,this.wrapperWidth=Re.wrapper.clientWidth,this.oldDisplayWidth=Za(re),this.force=Fe,this.dims=bh(re),this.events=[]};Cn.prototype.signal=function(re,pe){An(re,pe)&&this.events.push(arguments)},Cn.prototype.finish=function(){for(var re=0;re<this.events.length;re++)ln.apply(null,this.events[re])};function zn(re){var pe=re.display;!pe.scrollbarsClipped&&pe.scroller.offsetWidth&&(pe.nativeBarWidth=pe.scroller.offsetWidth-pe.scroller.clientWidth,pe.heightForcer.style.height=Wa(re)+"px",pe.sizer.style.marginBottom=-pe.nativeBarWidth+"px",pe.sizer.style.borderRightWidth=Wa(re)+"px",pe.scrollbarsClipped=!0)}function ii(re){if(re.hasFocus())return null;var pe=at();if(!pe||!ft(re.display.lineDiv,pe))return null;var Fe={activeElt:pe};if(window.getSelection){var Re=window.getSelection();Re.anchorNode&&Re.extend&&ft(re.display.lineDiv,Re.anchorNode)&&(Fe.anchorNode=Re.anchorNode,Fe.anchorOffset=Re.anchorOffset,Fe.focusNode=Re.focusNode,Fe.focusOffset=Re.focusOffset)}return Fe}function Zn(re){if(!(!re||!re.activeElt||re.activeElt==at())&&(re.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(re.activeElt.nodeName)&&re.anchorNode&&ft(document.body,re.anchorNode)&&ft(document.body,re.focusNode))){var pe=window.getSelection(),Fe=document.createRange();Fe.setEnd(re.anchorNode,re.anchorOffset),Fe.collapse(!1),pe.removeAllRanges(),pe.addRange(Fe),pe.extend(re.focusNode,re.focusOffset)}}function wi(re,pe){var Fe=re.display,Re=re.doc;if(pe.editorIsHidden)return ga(re),!1;if(!pe.force&&pe.visible.from>=Fe.viewFrom&&pe.visible.to<=Fe.viewTo&&(Fe.updateLineNumbers==null||Fe.updateLineNumbers>=Fe.viewTo)&&Fe.renderedView==Fe.view&&Cl(re)==0)return!1;Ai(re)&&(ga(re),pe.dims=bh(re));var Ue=Re.first+Re.size,ot=Math.max(pe.visible.from-re.options.viewportMargin,Re.first),wt=Math.min(Ue,pe.visible.to+re.options.viewportMargin);Fe.viewFrom<ot&&ot-Fe.viewFrom<20&&(ot=Math.max(Re.first,Fe.viewFrom)),Fe.viewTo>wt&&Fe.viewTo-wt<20&&(wt=Math.min(Ue,Fe.viewTo)),Bn&&(ot=rr(re.doc,ot),wt=Wi(re.doc,wt));var Rt=ot!=Fe.viewFrom||wt!=Fe.viewTo||Fe.lastWrapHeight!=pe.wrapperHeight||Fe.lastWrapWidth!=pe.wrapperWidth;cs(re,ot,wt),Fe.viewOffset=to(dn(re.doc,Fe.viewFrom)),re.display.mover.style.top=Fe.viewOffset+"px";var It=Cl(re);if(!Rt&&It==0&&!pe.force&&Fe.renderedView==Fe.view&&(Fe.updateLineNumbers==null||Fe.updateLineNumbers>=Fe.viewTo))return!1;var Yt=ii(re);return It>4&&(Fe.lineDiv.style.display="none"),si(re,Fe.updateLineNumbers,pe.dims),It>4&&(Fe.lineDiv.style.display=""),Fe.renderedView=Fe.view,Zn(Yt),De(Fe.cursorDiv),De(Fe.selectionDiv),Fe.gutters.style.height=Fe.sizer.style.minHeight=0,Rt&&(Fe.lastWrapHeight=pe.wrapperHeight,Fe.lastWrapWidth=pe.wrapperWidth,Sn(re,400)),Fe.updateLineNumbers=null,!0}function Kn(re,pe){for(var Fe=pe.viewport,Re=!0;;Re=!1){if(!Re||!re.options.lineWrapping||pe.oldDisplayWidth==Za(re)){if(Fe&&Fe.top!=null&&(Fe={top:Math.min(re.doc.height+$l(re.display)-Uu(re),Fe.top)}),pe.visible=Wo(re.display,re.doc,Fe),pe.visible.from>=re.display.viewFrom&&pe.visible.to<=re.display.viewTo)break}else Re&&(pe.visible=Wo(re.display,re.doc,Fe));if(!wi(re,pe))break;Wr(re);var Ue=Fl(re);Ea(re),rc(re,Ue),Oi(re,Ue),pe.force=!1}pe.signal(re,"update",re),(re.display.viewFrom!=re.display.reportedViewFrom||re.display.viewTo!=re.display.reportedViewTo)&&(pe.signal(re,"viewportChange",re,re.display.viewFrom,re.display.viewTo),re.display.reportedViewFrom=re.display.viewFrom,re.display.reportedViewTo=re.display.viewTo)}function gi(re,pe){var Fe=new Cn(re,pe);if(wi(re,Fe)){Wr(re),Kn(re,Fe);var Re=Fl(re);Ea(re),rc(re,Re),Oi(re,Re),Fe.finish()}}function si(re,pe,Fe){var Re=re.display,Ue=re.options.lineNumbers,ot=Re.lineDiv,wt=ot.firstChild;function Rt(mi){var _i=mi.nextSibling;return he&&oe&&re.display.currentWheelTarget==mi?mi.style.display="none":mi.parentNode.removeChild(mi),_i}for(var It=Re.view,Yt=Re.viewFrom,Tn=0;Tn<It.length;Tn++){var tn=It[Tn];if(!tn.hidden)if(!tn.node||tn.node.parentNode!=ot){var Gn=wl(re,tn,Yt,Fe);ot.insertBefore(Gn,wt)}else{for(;wt!=tn.node;)wt=Rt(wt);var jn=Ue&&pe!=null&&pe<=Yt&&tn.lineNumber;tn.changes&&(ut(tn.changes,"gutter")>-1&&(jn=!1),Ls(re,tn,Yt,Fe)),jn&&(De(tn.lineNumber),tn.lineNumber.appendChild(document.createTextNode(Dn(re.options,Yt)))),wt=tn.node.nextSibling}Yt+=tn.size}for(;wt;)wt=Rt(wt)}function Ii(re){var pe=re.gutters.offsetWidth;re.sizer.style.marginLeft=pe+"px"}function Oi(re,pe){re.display.sizer.style.minHeight=pe.docHeight+"px",re.display.heightForcer.style.top=pe.docHeight+"px",re.display.gutters.style.height=pe.docHeight+re.display.barHeight+Wa(re)+"px"}function Ui(re){var pe=re.display,Fe=pe.view;if(!(!pe.alignWidgets&&(!pe.gutters.firstChild||!re.options.fixedGutter))){for(var Re=Cc(pe)-pe.scroller.scrollLeft+re.doc.scrollLeft,Ue=pe.gutters.offsetWidth,ot=Re+"px",wt=0;wt<Fe.length;wt++)if(!Fe[wt].hidden){re.options.fixedGutter&&(Fe[wt].gutter&&(Fe[wt].gutter.style.left=ot),Fe[wt].gutterBackground&&(Fe[wt].gutterBackground.style.left=ot));var Rt=Fe[wt].alignable;if(Rt)for(var It=0;It<Rt.length;It++)Rt[It].style.left=ot}re.options.fixedGutter&&(pe.gutters.style.left=Re+Ue+"px")}}function Ai(re){if(!re.options.lineNumbers)return!1;var pe=re.doc,Fe=Dn(re.options,pe.first+pe.size-1),Re=re.display;if(Fe.length!=Re.lineNumChars){var Ue=Re.measure.appendChild(Ze("div",[Ze("div",Fe)],"CodeMirror-linenumber CodeMirror-gutter-elt")),ot=Ue.firstChild.offsetWidth,wt=Ue.offsetWidth-ot;return Re.lineGutter.style.width="",Re.lineNumInnerWidth=Math.max(ot,Re.lineGutter.offsetWidth-wt)+1,Re.lineNumWidth=Re.lineNumInnerWidth+wt,Re.lineNumChars=Re.lineNumInnerWidth?Fe.length:-1,Re.lineGutter.style.width=Re.lineNumWidth+"px",Ii(re.display),!0}return!1}function Ni(re,pe){for(var Fe=[],Re=!1,Ue=0;Ue<re.length;Ue++){var ot=re[Ue],wt=null;if(typeof ot!="string"&&(wt=ot.style,ot=ot.className),ot=="CodeMirror-linenumbers")if(pe)Re=!0;else continue;Fe.push({className:ot,style:wt})}return pe&&!Re&&Fe.push({className:"CodeMirror-linenumbers",style:null}),Fe}function ar(re){var pe=re.gutters,Fe=re.gutterSpecs;De(pe),re.lineGutter=null;for(var Re=0;Re<Fe.length;++Re){var Ue=Fe[Re],ot=Ue.className,wt=Ue.style,Rt=pe.appendChild(Ze("div",null,"CodeMirror-gutter "+ot));wt&&(Rt.style.cssText=wt),ot=="CodeMirror-linenumbers"&&(re.lineGutter=Rt,Rt.style.width=(re.lineNumWidth||1)+"px")}pe.style.display=Fe.length?"":"none",Ii(re)}function ti(re){ar(re.display),Ms(re),Ui(re)}function ji(re,pe,Fe,Re){var Ue=this;this.input=Fe,Ue.scrollbarFiller=Ze("div",null,"CodeMirror-scrollbar-filler"),Ue.scrollbarFiller.setAttribute("cm-not-content","true"),Ue.gutterFiller=Ze("div",null,"CodeMirror-gutter-filler"),Ue.gutterFiller.setAttribute("cm-not-content","true"),Ue.lineDiv=Xe("div",null,"CodeMirror-code"),Ue.selectionDiv=Ze("div",null,null,"position: relative; z-index: 1"),Ue.cursorDiv=Ze("div",null,"CodeMirror-cursors"),Ue.measure=Ze("div",null,"CodeMirror-measure"),Ue.lineMeasure=Ze("div",null,"CodeMirror-measure"),Ue.lineSpace=Xe("div",[Ue.measure,Ue.lineMeasure,Ue.selectionDiv,Ue.cursorDiv,Ue.lineDiv],null,"position: relative; outline: none");var ot=Xe("div",[Ue.lineSpace],"CodeMirror-lines");Ue.mover=Ze("div",[ot],null,"position: relative"),Ue.sizer=Ze("div",[Ue.mover],"CodeMirror-sizer"),Ue.sizerWidth=null,Ue.heightForcer=Ze("div",null,null,"position: absolute; height: "+mt+"px; width: 1px;"),Ue.gutters=Ze("div",null,"CodeMirror-gutters"),Ue.lineGutter=null,Ue.scroller=Ze("div",[Ue.sizer,Ue.heightForcer,Ue.gutters],"CodeMirror-scroll"),Ue.scroller.setAttribute("tabIndex","-1"),Ue.wrapper=Ze("div",[Ue.scrollbarFiller,Ue.gutterFiller,Ue.scroller],"CodeMirror"),Ce&&Le<8&&(Ue.gutters.style.zIndex=-1,Ue.scroller.style.paddingRight=0),!he&&!(Me&&ee)&&(Ue.scroller.draggable=!0),re&&(re.appendChild?re.appendChild(Ue.wrapper):re(Ue.wrapper)),Ue.viewFrom=Ue.viewTo=pe.first,Ue.reportedViewFrom=Ue.reportedViewTo=pe.first,Ue.view=[],Ue.renderedView=null,Ue.externalMeasured=null,Ue.viewOffset=0,Ue.lastWrapHeight=Ue.lastWrapWidth=0,Ue.updateLineNumbers=null,Ue.nativeBarWidth=Ue.barHeight=Ue.barWidth=0,Ue.scrollbarsClipped=!1,Ue.lineNumWidth=Ue.lineNumInnerWidth=Ue.lineNumChars=null,Ue.alignWidgets=!1,Ue.cachedCharWidth=Ue.cachedTextHeight=Ue.cachedPaddingH=null,Ue.maxLine=null,Ue.maxLineLength=0,Ue.maxLineChanged=!1,Ue.wheelDX=Ue.wheelDY=Ue.wheelStartX=Ue.wheelStartY=null,Ue.shift=!1,Ue.selForContextMenu=null,Ue.activeTouch=null,Ue.gutterSpecs=Ni(Re.gutters,Re.lineNumbers),ar(Ue),Fe.init(Ue)}var Li=0,bi=null;Ce?bi=-.53:Me?bi=15:xe?bi=-.7:le&&(bi=-1/3);function Yi(re){var pe=re.wheelDeltaX,Fe=re.wheelDeltaY;return pe==null&&re.detail&&re.axis==re.HORIZONTAL_AXIS&&(pe=re.detail),Fe==null&&re.detail&&re.axis==re.VERTICAL_AXIS?Fe=re.detail:Fe==null&&(Fe=re.wheelDelta),{x:pe,y:Fe}}function pi(re){var pe=Yi(re);return pe.x*=bi,pe.y*=bi,pe}function lr(re,pe){var Fe=Yi(pe),Re=Fe.x,Ue=Fe.y,ot=re.display,wt=ot.scroller,Rt=wt.scrollWidth>wt.clientWidth,It=wt.scrollHeight>wt.clientHeight;if(Re&&Rt||Ue&&It){if(Ue&&oe&&he){e:for(var Yt=pe.target,Tn=ot.view;Yt!=wt;Yt=Yt.parentNode)for(var tn=0;tn<Tn.length;tn++)if(Tn[tn].node==Yt){re.display.currentWheelTarget=Yt;break e}}if(Re&&!Me&&!ge&&bi!=null){Ue&&It&&Au(re,Math.max(0,wt.scrollTop+Ue*bi)),uu(re,Math.max(0,wt.scrollLeft+Re*bi)),(!Ue||Ue&&It)&&ai(pe),ot.wheelStartX=null;return}if(Ue&&bi!=null){var Gn=Ue*bi,jn=re.doc.scrollTop,mi=jn+ot.wrapper.clientHeight;Gn<0?jn=Math.max(0,jn+Gn-50):mi=Math.min(re.doc.height,mi+Gn+50),gi(re,{top:jn,bottom:mi})}Li<20&&(ot.wheelStartX==null?(ot.wheelStartX=wt.scrollLeft,ot.wheelStartY=wt.scrollTop,ot.wheelDX=Re,ot.wheelDY=Ue,setTimeout(function(){if(ot.wheelStartX!=null){var _i=wt.scrollLeft-ot.wheelStartX,Bi=wt.scrollTop-ot.wheelStartY,nr=Bi&&ot.wheelDY&&Bi/ot.wheelDY||_i&&ot.wheelDX&&_i/ot.wheelDX;ot.wheelStartX=ot.wheelStartY=null,nr&&(bi=(bi*Li+nr)/(Li+1),++Li)}},200)):(ot.wheelDX+=Re,ot.wheelDY+=Ue))}}var Xi=function(re,pe){this.ranges=re,this.primIndex=pe};Xi.prototype.primary=function(){return this.ranges[this.primIndex]},Xi.prototype.equals=function(re){if(re==this)return!0;if(re.primIndex!=this.primIndex||re.ranges.length!=this.ranges.length)return!1;for(var pe=0;pe<this.ranges.length;pe++){var Fe=this.ranges[pe],Re=re.ranges[pe];if(!Nn(Fe.anchor,Re.anchor)||!Nn(Fe.head,Re.head))return!1}return!0},Xi.prototype.deepCopy=function(){for(var re=[],pe=0;pe<this.ranges.length;pe++)re[pe]=new Pi(On(this.ranges[pe].anchor),On(this.ranges[pe].head));return new Xi(re,this.primIndex)},Xi.prototype.somethingSelected=function(){for(var re=0;re<this.ranges.length;re++)if(!this.ranges[re].empty())return!0;return!1},Xi.prototype.contains=function(re,pe){pe||(pe=re);for(var Fe=0;Fe<this.ranges.length;Fe++){var Re=this.ranges[Fe];if(sn(pe,Re.from())>=0&&sn(re,Re.to())<=0)return Fe}return-1};var Pi=function(re,pe){this.anchor=re,this.head=pe};Pi.prototype.from=function(){return Hn(this.anchor,this.head)},Pi.prototype.to=function(){return qn(this.anchor,this.head)},Pi.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Gi(re,pe,Fe){var Re=re&&re.options.selectionsMayTouch,Ue=pe[Fe];pe.sort(function(Gn,jn){return sn(Gn.from(),jn.from())}),Fe=ut(pe,Ue);for(var ot=1;ot<pe.length;ot++){var wt=pe[ot],Rt=pe[ot-1],It=sn(Rt.to(),wt.from());if(Re&&!wt.empty()?It>0:It>=0){var Yt=Hn(Rt.from(),wt.from()),Tn=qn(Rt.to(),wt.to()),tn=Rt.empty()?wt.from()==wt.head:Rt.from()==Rt.head;ot<=Fe&&--Fe,pe.splice(--ot,2,new Pi(tn?Tn:Yt,tn?Yt:Tn))}}return new Xi(pe,Fe)}function vr(re,pe){return new Xi([new Pi(re,pe||re)],0)}function er(re){return re.text?nn(re.from.line+re.text.length-1,Wt(re.text).length+(re.text.length==1?re.from.ch:0)):re.to}function So(re,pe){if(sn(re,pe.from)<0)return re;if(sn(re,pe.to)<=0)return er(pe);var Fe=re.line+pe.text.length-(pe.to.line-pe.from.line)-1,Re=re.ch;return re.line==pe.to.line&&(Re+=er(pe).ch-pe.to.ch),nn(Fe,Re)}function Co(re,pe){for(var Fe=[],Re=0;Re<re.sel.ranges.length;Re++){var Ue=re.sel.ranges[Re];Fe.push(new Pi(So(Ue.anchor,pe),So(Ue.head,pe)))}return Gi(re.cm,Fe,re.sel.primIndex)}function is(re,pe,Fe){return re.line==pe.line?nn(Fe.line,re.ch-pe.ch+Fe.ch):nn(Fe.line+(re.line-pe.line),re.ch)}function so(re,pe,Fe){for(var Re=[],Ue=nn(re.first,0),ot=Ue,wt=0;wt<pe.length;wt++){var Rt=pe[wt],It=is(Rt.from,Ue,ot),Yt=is(er(Rt),Ue,ot);if(Ue=Rt.to,ot=Yt,Fe=="around"){var Tn=re.sel.ranges[wt],tn=sn(Tn.head,Tn.anchor)<0;Re[wt]=new Pi(tn?Yt:It,tn?It:Yt)}else Re[wt]=new Pi(It,It)}return new Xi(Re,re.sel.primIndex)}function kr(re){re.doc.mode=Ke(re.options,re.doc.modeOption),No(re)}function No(re){re.doc.iter(function(pe){pe.stateAfter&&(pe.stateAfter=null),pe.styles&&(pe.styles=null)}),re.doc.modeFrontier=re.doc.highlightFrontier=re.doc.first,Sn(re,100),re.state.modeGen++,re.curOp&&Ms(re)}function Nr(re,pe){return pe.from.ch==0&&pe.to.ch==0&&Wt(pe.text)==""&&(!re.cm||re.cm.options.wholeLineUpdateBefore)}function Xr(re,pe,Fe,Re){function Ue(Dr){return Fe?Fe[Dr]:null}function ot(Dr,Sr,Kr){as(Dr,Sr,Kr,Re),Mi(Dr,"change",Dr,pe)}function wt(Dr,Sr){for(var Kr=[],wo=Dr;wo<Sr;++wo)Kr.push(new Xo(Yt[wo],Ue(wo),Re));return Kr}var Rt=pe.from,It=pe.to,Yt=pe.text,Tn=dn(re,Rt.line),tn=dn(re,It.line),Gn=Wt(Yt),jn=Ue(Yt.length-1),mi=It.line-Rt.line;if(pe.full)re.insert(0,wt(0,Yt.length)),re.remove(Yt.length,re.size-Yt.length);else if(Nr(re,pe)){var _i=wt(0,Yt.length-1);ot(tn,tn.text,jn),mi&&re.remove(Rt.line,mi),_i.length&&re.insert(Rt.line,_i)}else if(Tn==tn)if(Yt.length==1)ot(Tn,Tn.text.slice(0,Rt.ch)+Gn+Tn.text.slice(It.ch),jn);else{var Bi=wt(1,Yt.length-1);Bi.push(new Xo(Gn+Tn.text.slice(It.ch),jn,Re)),ot(Tn,Tn.text.slice(0,Rt.ch)+Yt[0],Ue(0)),re.insert(Rt.line+1,Bi)}else if(Yt.length==1)ot(Tn,Tn.text.slice(0,Rt.ch)+Yt[0]+tn.text.slice(It.ch),Ue(0)),re.remove(Rt.line+1,mi);else{ot(Tn,Tn.text.slice(0,Rt.ch)+Yt[0],Ue(0)),ot(tn,Gn+tn.text.slice(It.ch),jn);var nr=wt(1,Yt.length-1);mi>1&&re.remove(Rt.line+1,mi-1),re.insert(Rt.line+1,nr)}Mi(re,"change",re,pe)}function rs(re,pe,Fe){function Re(Ue,ot,wt){if(Ue.linked)for(var Rt=0;Rt<Ue.linked.length;++Rt){var It=Ue.linked[Rt];if(It.doc!=ot){var Yt=wt&&It.sharedHist;Fe&&!Yt||(pe(It.doc,Yt),Re(It.doc,Ue,Yt))}}}Re(re,null,!0)}function Zr(re,pe){if(pe.cm)throw new Error("This document is already in use.");re.doc=pe,pe.cm=re,$r(re),kr(re),Er(re),re.options.lineWrapping||Bo(re),re.options.mode=pe.modeOption,Ms(re)}function Er(re){(re.doc.direction=="rtl"?Ct:Ae)(re.display.lineDiv,"CodeMirror-rtl")}function Jr(re){Et(re,function(){Er(re),Ms(re)})}function br(re){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=re||1}function ao(re,pe){var Fe={from:On(pe.from),to:er(pe),text:Pn(re,pe.from,pe.to)};return Cs(re,Fe,pe.from.line,pe.to.line+1),rs(re,function(Re){return Cs(Re,Fe,pe.from.line,pe.to.line+1)},!0),Fe}function Lr(re){for(;re.length;){var pe=Wt(re);if(pe.ranges)re.pop();else break}}function ho(re,pe){if(pe)return Lr(re.done),Wt(re.done);if(re.done.length&&!Wt(re.done).ranges)return Wt(re.done);if(re.done.length>1&&!re.done[re.done.length-2].ranges)return re.done.pop(),Wt(re.done)}function Zo(re,pe,Fe,Re){var Ue=re.history;Ue.undone.length=0;var ot=+new Date,wt,Rt;if((Ue.lastOp==Re||Ue.lastOrigin==pe.origin&&pe.origin&&(pe.origin.charAt(0)=="+"&&Ue.lastModTime>ot-(re.cm?re.cm.options.historyEventDelay:500)||pe.origin.charAt(0)=="*"))&&(wt=ho(Ue,Ue.lastOp==Re)))Rt=Wt(wt.changes),sn(pe.from,pe.to)==0&&sn(pe.from,Rt.to)==0?Rt.to=er(pe):wt.changes.push(ao(re,pe));else{var It=Wt(Ue.done);for((!It||!It.ranges)&&Io(re.sel,Ue.done),wt={changes:[ao(re,pe)],generation:Ue.generation},Ue.done.push(wt);Ue.done.length>Ue.undoDepth;)Ue.done.shift(),Ue.done[0].ranges||Ue.done.shift()}Ue.done.push(Fe),Ue.generation=++Ue.maxGeneration,Ue.lastModTime=Ue.lastSelTime=ot,Ue.lastOp=Ue.lastSelOp=Re,Ue.lastOrigin=Ue.lastSelOrigin=pe.origin,Rt||ln(re,"historyAdded")}function Ko(re,pe,Fe,Re){var Ue=pe.charAt(0);return Ue=="*"||Ue=="+"&&Fe.ranges.length==Re.ranges.length&&Fe.somethingSelected()==Re.somethingSelected()&&new Date-re.history.lastSelTime<=(re.cm?re.cm.options.historyEventDelay:500)}function Qr(re,pe,Fe,Re){var Ue=re.history,ot=Re&&Re.origin;Fe==Ue.lastSelOp||ot&&Ue.lastSelOrigin==ot&&(Ue.lastModTime==Ue.lastSelTime&&Ue.lastOrigin==ot||Ko(re,ot,Wt(Ue.done),pe))?Ue.done[Ue.done.length-1]=pe:Io(pe,Ue.done),Ue.lastSelTime=+new Date,Ue.lastSelOrigin=ot,Ue.lastSelOp=Fe,Re&&Re.clearRedo!==!1&&Lr(Ue.undone)}function Io(re,pe){var Fe=Wt(pe);Fe&&Fe.ranges&&Fe.equals(re)||pe.push(re)}function Cs(re,pe,Fe,Re){var Ue=pe["spans_"+re.id],ot=0;re.iter(Math.max(re.first,Fe),Math.min(re.first+re.size,Re),function(wt){wt.markedSpans&&((Ue||(Ue=pe["spans_"+re.id]={}))[ot]=wt.markedSpans),++ot})}function Lo(re){if(!re)return null;for(var pe,Fe=0;Fe<re.length;++Fe)re[Fe].marker.explicitlyCleared?pe||(pe=re.slice(0,Fe)):pe&&pe.push(re[Fe]);return pe?pe.length?pe:null:re}function Jo(re,pe){var Fe=pe["spans_"+re.id];if(!Fe)return null;for(var Re=[],Ue=0;Ue<pe.text.length;++Ue)Re.push(Lo(Fe[Ue]));return Re}function Ss(re,pe){var Fe=Jo(re,pe),Re=Hi(re,pe);if(!Fe)return Re;if(!Re)return Fe;for(var Ue=0;Ue<Fe.length;++Ue){var ot=Fe[Ue],wt=Re[Ue];if(ot&&wt)e:for(var Rt=0;Rt<wt.length;++Rt){for(var It=wt[Rt],Yt=0;Yt<ot.length;++Yt)if(ot[Yt].marker==It.marker)continue e;ot.push(It)}else wt&&(Fe[Ue]=wt)}return Fe}function Js(re,pe,Fe){for(var Re=[],Ue=0;Ue<re.length;++Ue){var ot=re[Ue];if(ot.ranges){Re.push(Fe?Xi.prototype.deepCopy.call(ot):ot);continue}var wt=ot.changes,Rt=[];Re.push({changes:Rt});for(var It=0;It<wt.length;++It){var Yt=wt[It],Tn=void 0;if(Rt.push({from:Yt.from,to:Yt.to,text:Yt.text}),pe)for(var tn in Yt)(Tn=tn.match(/^spans_(\d+)$/))&&ut(pe,Number(Tn[1]))>-1&&(Wt(Rt)[tn]=Yt[tn],delete Yt[tn])}}return Re}function Pl(re,pe,Fe,Re){if(Re){var Ue=re.anchor;if(Fe){var ot=sn(pe,Ue)<0;ot!=sn(Fe,Ue)<0?(Ue=pe,pe=Fe):ot!=sn(pe,Fe)<0&&(pe=Fe)}return new Pi(Ue,pe)}else return new Pi(Fe||pe,pe)}function Qo(re,pe,Fe,Re,Ue){Ue==null&&(Ue=re.cm&&(re.cm.display.shift||re.extend)),As(re,new Xi([Pl(re.sel.primary(),pe,Fe,Ue)],0),Re)}function qo(re,pe,Fe){for(var Re=[],Ue=re.cm&&(re.cm.display.shift||re.extend),ot=0;ot<re.sel.ranges.length;ot++)Re[ot]=Pl(re.sel.ranges[ot],pe[ot],null,Ue);var wt=Gi(re.cm,Re,re.sel.primIndex);As(re,wt,Fe)}function xs(re,pe,Fe,Re){var Ue=re.sel.ranges.slice(0);Ue[pe]=Fe,As(re,Gi(re.cm,Ue,re.sel.primIndex),Re)}function Ts(re,pe,Fe,Re){As(re,vr(pe,Fe),Re)}function ma(re,pe,Fe){var Re={ranges:pe.ranges,update:function(Ue){this.ranges=[];for(var ot=0;ot<Ue.length;ot++)this.ranges[ot]=new Pi(Fn(re,Ue[ot].anchor),Fn(re,Ue[ot].head))},origin:Fe&&Fe.origin};return ln(re,"beforeSelectionChange",re,Re),re.cm&&ln(re.cm,"beforeSelectionChange",re.cm,Re),Re.ranges!=pe.ranges?Gi(re.cm,Re.ranges,Re.ranges.length-1):pe}function jo(re,pe,Fe){var Re=re.history.done,Ue=Wt(Re);Ue&&Ue.ranges?(Re[Re.length-1]=pe,La(re,pe,Fe)):As(re,pe,Fe)}function As(re,pe,Fe){La(re,pe,Fe),Qr(re,re.sel,re.cm?re.cm.curOp.id:NaN,Fe)}function La(re,pe,Fe){(An(re,"beforeSelectionChange")||re.cm&&An(re.cm,"beforeSelectionChange"))&&(pe=ma(re,pe,Fe));var Re=Fe&&Fe.bias||(sn(pe.primary().head,re.sel.primary().head)<0?-1:1);_l(re,jl(re,pe,Re,!0)),!(Fe&&Fe.scroll===!1)&&re.cm&&ic(re.cm)}function _l(re,pe){pe.equals(re.sel)||(re.sel=pe,re.cm&&(re.cm.curOp.updateInput=1,re.cm.curOp.selectionChanged=!0,Un(re.cm)),Mi(re,"cursorActivity",re))}function Xl(re){_l(re,jl(re,re.sel,null,!1))}function jl(re,pe,Fe,Re){for(var Ue,ot=0;ot<pe.ranges.length;ot++){var wt=pe.ranges[ot],Rt=pe.ranges.length==re.sel.ranges.length&&re.sel.ranges[ot],It=hu(re,wt.anchor,Rt&&Rt.anchor,Fe,Re),Yt=hu(re,wt.head,Rt&&Rt.head,Fe,Re);(Ue||It!=wt.anchor||Yt!=wt.head)&&(Ue||(Ue=pe.ranges.slice(0,ot)),Ue[ot]=new Pi(It,Yt))}return Ue?Gi(re.cm,Ue,pe.primIndex):pe}function cu(re,pe,Fe,Re,Ue){var ot=dn(re,pe.line);if(ot.markedSpans)for(var wt=0;wt<ot.markedSpans.length;++wt){var Rt=ot.markedSpans[wt],It=Rt.marker,Yt="selectLeft"in It?!It.selectLeft:It.inclusiveLeft,Tn="selectRight"in It?!It.selectRight:It.inclusiveRight;if((Rt.from==null||(Yt?Rt.from<=pe.ch:Rt.from<pe.ch))&&(Rt.to==null||(Tn?Rt.to>=pe.ch:Rt.to>pe.ch))){if(Ue&&(ln(It,"beforeCursorEnter"),It.explicitlyCleared))if(ot.markedSpans){--wt;continue}else break;if(!It.atomic)continue;if(Fe){var tn=It.find(Re<0?1:-1),Gn=void 0;if((Re<0?Tn:Yt)&&(tn=Jl(re,tn,-Re,tn&&tn.line==pe.line?ot:null)),tn&&tn.line==pe.line&&(Gn=sn(tn,Fe))&&(Re<0?Gn<0:Gn>0))return cu(re,tn,pe,Re,Ue)}var jn=It.find(Re<0?-1:1);return(Re<0?Yt:Tn)&&(jn=Jl(re,jn,Re,jn.line==pe.line?ot:null)),jn?cu(re,jn,pe,Re,Ue):null}}return pe}function hu(re,pe,Fe,Re,Ue){var ot=Re||1,wt=cu(re,pe,Fe,ot,Ue)||!Ue&&cu(re,pe,Fe,ot,!0)||cu(re,pe,Fe,-ot,Ue)||!Ue&&cu(re,pe,Fe,-ot,!0);return wt||(re.cantEdit=!0,nn(re.first,0))}function Jl(re,pe,Fe,Re){return Fe<0&&pe.ch==0?pe.line>re.first?Fn(re,nn(pe.line-1)):null:Fe>0&&pe.ch==(Re||dn(re,pe.line)).text.length?pe.line<re.first+re.size-1?nn(pe.line+1,0):null:new nn(pe.line,pe.ch+Fe)}function gs(re){re.setSelection(nn(re.firstLine(),0),nn(re.lastLine()),gt)}function Ra(re,pe,Fe){var Re={canceled:!1,from:pe.from,to:pe.to,text:pe.text,origin:pe.origin,cancel:function(){return Re.canceled=!0}};return Fe&&(Re.update=function(Ue,ot,wt,Rt){Ue&&(Re.from=Fn(re,Ue)),ot&&(Re.to=Fn(re,ot)),wt&&(Re.text=wt),Rt!==void 0&&(Re.origin=Rt)}),ln(re,"beforeChange",re,Re),re.cm&&ln(re.cm,"beforeChange",re.cm,Re),Re.canceled?(re.cm&&(re.cm.curOp.updateInput=2),null):{from:Re.from,to:Re.to,text:Re.text,origin:Re.origin}}function oa(re,pe,Fe){if(re.cm){if(!re.cm.curOp)return wn(re.cm,oa)(re,pe,Fe);if(re.cm.state.suppressEdits)return}if(!((An(re,"beforeChange")||re.cm&&An(re.cm,"beforeChange"))&&(pe=Ra(re,pe,!0),!pe))){var Re=fr&&!Fe&&Pr(re,pe.from,pe.to);if(Re)for(var Ue=Re.length-1;Ue>=0;--Ue)Ns(re,{from:Re[Ue].from,to:Re[Ue].to,text:Ue?[""]:pe.text,origin:pe.origin});else Ns(re,pe)}}function Ns(re,pe){if(!(pe.text.length==1&&pe.text[0]==""&&sn(pe.from,pe.to)==0)){var Fe=Co(re,pe);Zo(re,pe,Fe,re.cm?re.cm.curOp.id:NaN),du(re,pe,Fe,Hi(re,pe));var Re=[];rs(re,function(Ue,ot){!ot&&ut(Re,Ue.history)==-1&&(js(Ue.history,pe),Re.push(Ue.history)),du(Ue,pe,null,Hi(Ue,pe))})}}function Ql(re,pe,Fe){var Re=re.cm&&re.cm.state.suppressEdits;if(!(Re&&!Fe)){for(var Ue=re.history,ot,wt=re.sel,Rt=pe=="undo"?Ue.done:Ue.undone,It=pe=="undo"?Ue.undone:Ue.done,Yt=0;Yt<Rt.length&&(ot=Rt[Yt],!(Fe?ot.ranges&&!ot.equals(re.sel):!ot.ranges));Yt++);if(Yt!=Rt.length){for(Ue.lastOrigin=Ue.lastSelOrigin=null;;)if(ot=Rt.pop(),ot.ranges){if(Io(ot,It),Fe&&!ot.equals(re.sel)){As(re,ot,{clearRedo:!1});return}wt=ot}else if(Re){Rt.push(ot);return}else break;var Tn=[];Io(wt,It),It.push({changes:Tn,generation:Ue.generation}),Ue.generation=ot.generation||++Ue.maxGeneration;for(var tn=An(re,"beforeChange")||re.cm&&An(re.cm,"beforeChange"),Gn=function(_i){var Bi=ot.changes[_i];if(Bi.origin=pe,tn&&!Ra(re,Bi,!1))return Rt.length=0,{};Tn.push(ao(re,Bi));var nr=_i?Co(re,Bi):Wt(Rt);du(re,Bi,nr,Ss(re,Bi)),!_i&&re.cm&&re.cm.scrollIntoView({from:Bi.from,to:er(Bi)});var Dr=[];rs(re,function(Sr,Kr){!Kr&&ut(Dr,Sr.history)==-1&&(js(Sr.history,Bi),Dr.push(Sr.history)),du(Sr,Bi,null,Ss(Sr,Bi))})},jn=ot.changes.length-1;jn>=0;--jn){var mi=Gn(jn);if(mi)return mi.v}}}}function _c(re,pe){if(pe!=0&&(re.first+=pe,re.sel=new Xi(Kt(re.sel.ranges,function(Ue){return new Pi(nn(Ue.anchor.line+pe,Ue.anchor.ch),nn(Ue.head.line+pe,Ue.head.ch))}),re.sel.primIndex),re.cm)){Ms(re.cm,re.first,re.first-pe,pe);for(var Fe=re.cm.display,Re=Fe.viewFrom;Re<Fe.viewTo;Re++)xo(re.cm,Re,"gutter")}}function du(re,pe,Fe,Re){if(re.cm&&!re.cm.curOp)return wn(re.cm,du)(re,pe,Fe,Re);if(pe.to.line<re.first){_c(re,pe.text.length-1-(pe.to.line-pe.from.line));return}if(!(pe.from.line>re.lastLine())){if(pe.from.line<re.first){var Ue=pe.text.length-1-(re.first-pe.from.line);_c(re,Ue),pe={from:nn(re.first,0),to:nn(pe.to.line+Ue,pe.to.ch),text:[Wt(pe.text)],origin:pe.origin}}var ot=re.lastLine();pe.to.line>ot&&(pe={from:pe.from,to:nn(ot,dn(re,ot).text.length),text:[pe.text[0]],origin:pe.origin}),pe.removed=Pn(re,pe.from,pe.to),Fe||(Fe=Co(re,pe)),re.cm?Zu(re.cm,pe,Re):Xr(re,pe,Re),La(re,Fe,gt),re.cantEdit&&hu(re,nn(re.firstLine(),0))&&(re.cantEdit=!1)}}function Zu(re,pe,Fe){var Re=re.doc,Ue=re.display,ot=pe.from,wt=pe.to,Rt=!1,It=ot.line;re.options.lineWrapping||(It=Nt(hr(dn(Re,ot.line))),Re.iter(It,wt.line+1,function(jn){if(jn==Ue.maxLine)return Rt=!0,!0})),Re.sel.contains(pe.from,pe.to)>-1&&Un(re),Xr(Re,pe,Fe,Vs(re)),re.options.lineWrapping||(Re.iter(It,ot.line+pe.text.length,function(jn){var mi=Ro(jn);mi>Ue.maxLineLength&&(Ue.maxLine=jn,Ue.maxLineLength=mi,Ue.maxLineChanged=!0,Rt=!1)}),Rt&&(re.curOp.updateMaxLine=!0)),zi(Re,ot.line),Sn(re,400);var Yt=pe.text.length-(wt.line-ot.line)-1;pe.full?Ms(re):ot.line==wt.line&&pe.text.length==1&&!Nr(re.doc,pe)?xo(re,ot.line,"text"):Ms(re,ot.line,wt.line+1,Yt);var Tn=An(re,"changes"),tn=An(re,"change");if(tn||Tn){var Gn={from:ot,to:wt,text:pe.text,removed:pe.removed,origin:pe.origin};tn&&Mi(re,"change",re,Gn),Tn&&(re.curOp.changeObjs||(re.curOp.changeObjs=[])).push(Gn)}re.display.selForContextMenu=null}function sc(re,pe,Fe,Re,Ue){var ot;Re||(Re=Fe),sn(Re,Fe)<0&&(ot=[Re,Fe],Fe=ot[0],Re=ot[1]),typeof pe=="string"&&(pe=re.splitLines(pe)),oa(re,{from:Fe,to:Re,text:pe,origin:Ue})}function zl(re,pe,Fe,Re){Fe<re.line?re.line+=Re:pe<re.line&&(re.line=pe,re.ch=0)}function ls(re,pe,Fe,Re){for(var Ue=0;Ue<re.length;++Ue){var ot=re[Ue],wt=!0;if(ot.ranges){ot.copied||(ot=re[Ue]=ot.deepCopy(),ot.copied=!0);for(var Rt=0;Rt<ot.ranges.length;Rt++)zl(ot.ranges[Rt].anchor,pe,Fe,Re),zl(ot.ranges[Rt].head,pe,Fe,Re);continue}for(var It=0;It<ot.changes.length;++It){var Yt=ot.changes[It];if(Fe<Yt.from.line)Yt.from=nn(Yt.from.line+Re,Yt.from.ch),Yt.to=nn(Yt.to.line+Re,Yt.to.ch);else if(pe<=Yt.to.line){wt=!1;break}}wt||(re.splice(0,Ue+1),Ue=0)}}function js(re,pe){var Fe=pe.from.line,Re=pe.to.line,Ue=pe.text.length-(Re-Fe)-1;ls(re.done,Fe,Re,Ue),ls(re.undone,Fe,Re,Ue)}function wa(re,pe,Fe,Re){var Ue=pe,ot=pe;return typeof pe=="number"?ot=dn(re,ei(re,pe)):Ue=Nt(pe),Ue==null?null:(Re(ot,Ue)&&re.cm&&xo(re.cm,Ue,Fe),ot)}function zs(re){this.lines=re,this.parent=null;for(var pe=0,Fe=0;Fe<re.length;++Fe)re[Fe].parent=this,pe+=re[Fe].height;this.height=pe}zs.prototype={chunkSize:function(){return this.lines.length},removeInner:function(re,pe){for(var Fe=re,Re=re+pe;Fe<Re;++Fe){var Ue=this.lines[Fe];this.height-=Ue.height,Ho(Ue),Mi(Ue,"delete")}this.lines.splice(re,pe)},collapse:function(re){re.push.apply(re,this.lines)},insertInner:function(re,pe,Fe){this.height+=Fe,this.lines=this.lines.slice(0,re).concat(pe).concat(this.lines.slice(re));for(var Re=0;Re<pe.length;++Re)pe[Re].parent=this},iterN:function(re,pe,Fe){for(var Re=re+pe;re<Re;++re)if(Fe(this.lines[re]))return!0}};function os(re){this.children=re;for(var pe=0,Fe=0,Re=0;Re<re.length;++Re){var Ue=re[Re];pe+=Ue.chunkSize(),Fe+=Ue.height,Ue.parent=this}this.size=pe,this.height=Fe,this.parent=null}os.prototype={chunkSize:function(){return this.size},removeInner:function(re,pe){this.size-=pe;for(var Fe=0;Fe<this.children.length;++Fe){var Re=this.children[Fe],Ue=Re.chunkSize();if(re<Ue){var ot=Math.min(pe,Ue-re),wt=Re.height;if(Re.removeInner(re,ot),this.height-=wt-Re.height,Ue==ot&&(this.children.splice(Fe--,1),Re.parent=null),(pe-=ot)==0)break;re=0}else re-=Ue}if(this.size-pe<25&&(this.children.length>1||!(this.children[0]instanceof zs))){var Rt=[];this.collapse(Rt),this.children=[new zs(Rt)],this.children[0].parent=this}},collapse:function(re){for(var pe=0;pe<this.children.length;++pe)this.children[pe].collapse(re)},insertInner:function(re,pe,Fe){this.size+=pe.length,this.height+=Fe;for(var Re=0;Re<this.children.length;++Re){var Ue=this.children[Re],ot=Ue.chunkSize();if(re<=ot){if(Ue.insertInner(re,pe,Fe),Ue.lines&&Ue.lines.length>50){for(var wt=Ue.lines.length%25+25,Rt=wt;Rt<Ue.lines.length;){var It=new zs(Ue.lines.slice(Rt,Rt+=25));Ue.height-=It.height,this.children.splice(++Re,0,It),It.parent=this}Ue.lines=Ue.lines.slice(0,wt),this.maybeSpill()}break}re-=ot}},maybeSpill:function(){if(!(this.children.length<=10)){var re=this;do{var pe=re.children.splice(re.children.length-5,5),Fe=new os(pe);if(re.parent){re.size-=Fe.size,re.height-=Fe.height;var Ue=ut(re.parent.children,re);re.parent.children.splice(Ue+1,0,Fe)}else{var Re=new os(re.children);Re.parent=re,re.children=[Re,Fe],re=Re}Fe.parent=re.parent}while(re.children.length>10);re.parent.maybeSpill()}},iterN:function(re,pe,Fe){for(var Re=0;Re<this.children.length;++Re){var Ue=this.children[Re],ot=Ue.chunkSize();if(re<ot){var wt=Math.min(pe,ot-re);if(Ue.iterN(re,wt,Fe))return!0;if((pe-=wt)==0)break;re=0}else re-=ot}}};var Ma=function(re,pe,Fe){if(Fe)for(var Re in Fe)Fe.hasOwnProperty(Re)&&(this[Re]=Fe[Re]);this.doc=re,this.node=pe};Ma.prototype.clear=function(){var re=this.doc.cm,pe=this.line.widgets,Fe=this.line,Re=Nt(Fe);if(!(Re==null||!pe)){for(var Ue=0;Ue<pe.length;++Ue)pe[Ue]==this&&pe.splice(Ue--,1);pe.length||(Fe.widgets=null);var ot=Ia(this);on(Fe,Math.max(0,Fe.height-ot)),re&&(Et(re,function(){El(re,Fe,-ot),xo(re,Re,"widget")}),Mi(re,"lineWidgetCleared",re,this,Re))}},Ma.prototype.changed=function(){var re=this,pe=this.height,Fe=this.doc.cm,Re=this.line;this.height=null;var Ue=Ia(this)-pe;Ue&&(Qn(this.doc,Re)||on(Re,Re.height+Ue),Fe&&Et(Fe,function(){Fe.curOp.forceUpdate=!0,El(Fe,Re,Ue),Mi(Fe,"lineWidgetChanged",Fe,re,Nt(Re))}))},ni(Ma);function El(re,pe,Fe){to(pe)<(re.curOp&&re.curOp.scrollTop||re.doc.scrollTop)&&Ch(re,Fe)}function Nu(re,pe,Fe,Re){var Ue=new Ma(re,Fe,Re),ot=re.cm;return ot&&Ue.noHScroll&&(ot.display.alignWidgets=!0),wa(re,pe,"widget",function(wt){var Rt=wt.widgets||(wt.widgets=[]);if(Ue.insertAt==null?Rt.push(Ue):Rt.splice(Math.min(Rt.length-1,Math.max(0,Ue.insertAt)),0,Ue),Ue.line=wt,ot&&!Qn(re,wt)){var It=to(wt)<re.scrollTop;on(wt,wt.height+Ia(Ue)),It&&Ch(ot,Ue.height),ot.curOp.forceUpdate=!0}return!0}),ot&&Mi(ot,"lineWidgetAdded",ot,Ue,typeof pe=="number"?pe:Nt(pe)),Ue}var mf=0,vn=function(re,pe){this.lines=[],this.type=pe,this.doc=re,this.id=++mf};vn.prototype.clear=function(){if(!this.explicitlyCleared){var re=this.doc.cm,pe=re&&!re.curOp;if(pe&&Oa(re),An(this,"clear")){var Fe=this.find();Fe&&Mi(this,"clear",Fe.from,Fe.to)}for(var Re=null,Ue=null,ot=0;ot<this.lines.length;++ot){var wt=this.lines[ot],Rt=yo(wt.markedSpans,this);re&&!this.collapsed?xo(re,Nt(wt),"text"):re&&(Rt.to!=null&&(Ue=Nt(wt)),Rt.from!=null&&(Re=Nt(wt))),wt.markedSpans=Ir(wt.markedSpans,Rt),Rt.from==null&&this.collapsed&&!Qn(this.doc,wt)&&re&&on(wt,Tu(re.display))}if(re&&this.collapsed&&!re.options.lineWrapping)for(var It=0;It<this.lines.length;++It){var Yt=hr(this.lines[It]),Tn=Ro(Yt);Tn>re.display.maxLineLength&&(re.display.maxLine=Yt,re.display.maxLineLength=Tn,re.display.maxLineChanged=!0)}Re!=null&&re&&this.collapsed&&Ms(re,Re,Ue+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,re&&Xl(re.doc)),re&&Mi(re,"markerCleared",re,this,Re,Ue),pe&&oc(re),this.parent&&this.parent.clear()}},vn.prototype.find=function(re,pe){re==null&&this.type=="bookmark"&&(re=1);for(var Fe,Re,Ue=0;Ue<this.lines.length;++Ue){var ot=this.lines[Ue],wt=yo(ot.markedSpans,this);if(wt.from!=null&&(Fe=nn(pe?ot:Nt(ot),wt.from),re==-1))return Fe;if(wt.to!=null&&(Re=nn(pe?ot:Nt(ot),wt.to),re==1))return Re}return Fe&&{from:Fe,to:Re}},vn.prototype.changed=function(){var re=this,pe=this.find(-1,!0),Fe=this,Re=this.doc.cm;!pe||!Re||Et(Re,function(){var Ue=pe.line,ot=Nt(pe.line),wt=Gu(Re,ot);if(wt&&(ka(wt),Re.curOp.selectionChanged=Re.curOp.forceUpdate=!0),Re.curOp.updateMaxLine=!0,!Qn(Fe.doc,Ue)&&Fe.height!=null){var Rt=Fe.height;Fe.height=null;var It=Ia(Fe)-Rt;It&&on(Ue,Ue.height+It)}Mi(Re,"markerChanged",Re,re)})},vn.prototype.attachLine=function(re){if(!this.lines.length&&this.doc.cm){var pe=this.doc.cm.curOp;(!pe.maybeHiddenMarkers||ut(pe.maybeHiddenMarkers,this)==-1)&&(pe.maybeUnhiddenMarkers||(pe.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(re)},vn.prototype.detachLine=function(re){if(this.lines.splice(ut(this.lines,re),1),!this.lines.length&&this.doc.cm){var pe=this.doc.cm.curOp;(pe.maybeHiddenMarkers||(pe.maybeHiddenMarkers=[])).push(this)}},ni(vn);function Bc(re,pe,Fe,Re,Ue){if(Re&&Re.shared)return vf(re,pe,Fe,Re,Ue);if(re.cm&&!re.cm.curOp)return wn(re.cm,Bc)(re,pe,Fe,Re,Ue);var ot=new vn(re,Ue),wt=sn(pe,Fe);if(Re&&zt(Re,ot,!1),wt>0||wt==0&&ot.clearWhenEmpty!==!1)return ot;if(ot.replacedWith&&(ot.collapsed=!0,ot.widgetNode=Xe("span",[ot.replacedWith],"CodeMirror-widget"),Re.handleMouseEvents||ot.widgetNode.setAttribute("cm-ignore-events","true"),Re.insertLeft&&(ot.widgetNode.insertLeft=!0)),ot.collapsed){if(Vr(re,pe.line,pe,Fe,ot)||pe.line!=Fe.line&&Vr(re,Fe.line,pe,Fe,ot))throw new Error("Inserting collapsed marker partially overlapping an existing one");In()}ot.addToHistory&&Zo(re,{from:pe,to:Fe,origin:"markText"},re.sel,NaN);var Rt=pe.line,It=re.cm,Yt;if(re.iter(Rt,Fe.line+1,function(tn){It&&ot.collapsed&&!It.options.lineWrapping&&hr(tn)==It.display.maxLine&&(Yt=!0),ot.collapsed&&Rt!=pe.line&&on(tn,0),bo(tn,new pr(ot,Rt==pe.line?pe.ch:null,Rt==Fe.line?Fe.ch:null)),++Rt}),ot.collapsed&&re.iter(pe.line,Fe.line+1,function(tn){Qn(re,tn)&&on(tn,0)}),ot.clearOnEnter&&At(ot,"beforeCursorEnter",function(){return ot.clear()}),ot.readOnly&&(Br(),(re.history.done.length||re.history.undone.length)&&re.clearHistory()),ot.collapsed&&(ot.id=++mf,ot.atomic=!0),It){if(Yt&&(It.curOp.updateMaxLine=!0),ot.collapsed)Ms(It,pe.line,Fe.line+1);else if(ot.className||ot.startStyle||ot.endStyle||ot.css||ot.attributes||ot.title)for(var Tn=pe.line;Tn<=Fe.line;Tn++)xo(It,Tn,"text");ot.atomic&&Xl(It.doc),Mi(It,"markerAdded",It,ot)}return ot}var ac=function(re,pe){this.markers=re,this.primary=pe;for(var Fe=0;Fe<re.length;++Fe)re[Fe].parent=this};ac.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var re=0;re<this.markers.length;++re)this.markers[re].clear();Mi(this,"clear")}},ac.prototype.find=function(re,pe){return this.primary.find(re,pe)},ni(ac);function vf(re,pe,Fe,Re,Ue){Re=zt(Re),Re.shared=!1;var ot=[Bc(re,pe,Fe,Re,Ue)],wt=ot[0],Rt=Re.widgetNode;return rs(re,function(It){Rt&&(Re.widgetNode=Rt.cloneNode(!0)),ot.push(Bc(It,Fn(It,pe),Fn(It,Fe),Re,Ue));for(var Yt=0;Yt<It.linked.length;++Yt)if(It.linked[Yt].isParent)return;wt=Wt(ot)}),new ac(ot,wt)}function Ph(re){return re.findMarks(nn(re.first,0),re.clipPos(nn(re.lastLine())),function(pe){return pe.parent})}function oh(re,pe){for(var Fe=0;Fe<pe.length;Fe++){var Re=pe[Fe],Ue=Re.find(),ot=re.clipPos(Ue.from),wt=re.clipPos(Ue.to);if(sn(ot,wt)){var Rt=Bc(re,ot,wt,Re.primary,Re.primary.type);Re.markers.push(Rt),Rt.parent=Re}}}function Rd(re){for(var pe=function(Re){var Ue=re[Re],ot=[Ue.primary.doc];rs(Ue.primary.doc,function(It){return ot.push(It)});for(var wt=0;wt<Ue.markers.length;wt++){var Rt=Ue.markers[wt];ut(ot,Rt.doc)==-1&&(Rt.parent=null,Ue.markers.splice(wt--,1))}},Fe=0;Fe<re.length;Fe++)pe(Fe)}var Kp=0,Ba=function(re,pe,Fe,Re,Ue){if(!(this instanceof Ba))return new Ba(re,pe,Fe,Re,Ue);Fe==null&&(Fe=0),os.call(this,[new zs([new Xo("",null)])]),this.first=Fe,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=Fe;var ot=nn(Fe,0);this.sel=vr(ot),this.history=new br(null),this.id=++Kp,this.modeOption=pe,this.lineSep=Re,this.direction=Ue=="rtl"?"rtl":"ltr",this.extend=!1,typeof re=="string"&&(re=this.splitLines(re)),Xr(this,{from:ot,to:ot,text:re}),As(this,vr(ot),gt)};Ba.prototype=kt(os.prototype,{constructor:Ba,iter:function(re,pe,Fe){Fe?this.iterN(re-this.first,pe-re,Fe):this.iterN(this.first,this.first+this.size,re)},insert:function(re,pe){for(var Fe=0,Re=0;Re<pe.length;++Re)Fe+=pe[Re].height;this.insertInner(re-this.first,pe,Fe)},remove:function(re,pe){this.removeInner(re-this.first,pe)},getValue:function(re){var pe=mn(this,this.first,this.first+this.size);return re===!1?pe:pe.join(re||this.lineSeparator())},setValue:an(function(re){var pe=nn(this.first,0),Fe=this.first+this.size-1;oa(this,{from:pe,to:nn(Fe,dn(this,Fe).text.length),text:this.splitLines(re),origin:"setValue",full:!0},!0),this.cm&&ro(this.cm,0,0),As(this,vr(pe),gt)}),replaceRange:function(re,pe,Fe,Re){pe=Fn(this,pe),Fe=Fe?Fn(this,Fe):pe,sc(this,re,pe,Fe,Re)},getRange:function(re,pe,Fe){var Re=Pn(this,Fn(this,re),Fn(this,pe));return Fe===!1?Re:Re.join(Fe||this.lineSeparator())},getLine:function(re){var pe=this.getLineHandle(re);return pe&&pe.text},getLineHandle:function(re){if(Mn(this,re))return dn(this,re)},getLineNumber:function(re){return Nt(re)},getLineHandleVisualStart:function(re){return typeof re=="number"&&(re=dn(this,re)),hr(re)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(re){return Fn(this,re)},getCursor:function(re){var pe=this.sel.primary(),Fe;return re==null||re=="head"?Fe=pe.head:re=="anchor"?Fe=pe.anchor:re=="end"||re=="to"||re===!1?Fe=pe.to():Fe=pe.from(),Fe},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:an(function(re,pe,Fe){Ts(this,Fn(this,typeof re=="number"?nn(re,pe||0):re),null,Fe)}),setSelection:an(function(re,pe,Fe){Ts(this,Fn(this,re),Fn(this,pe||re),Fe)}),extendSelection:an(function(re,pe,Fe){Qo(this,Fn(this,re),pe&&Fn(this,pe),Fe)}),extendSelections:an(function(re,pe){qo(this,Di(this,re),pe)}),extendSelectionsBy:an(function(re,pe){var Fe=Kt(this.sel.ranges,re);qo(this,Di(this,Fe),pe)}),setSelections:an(function(re,pe,Fe){if(re.length){for(var Re=[],Ue=0;Ue<re.length;Ue++)Re[Ue]=new Pi(Fn(this,re[Ue].anchor),Fn(this,re[Ue].head));pe==null&&(pe=Math.min(re.length-1,this.sel.primIndex)),As(this,Gi(this.cm,Re,pe),Fe)}}),addSelection:an(function(re,pe,Fe){var Re=this.sel.ranges.slice(0);Re.push(new Pi(Fn(this,re),Fn(this,pe||re))),As(this,Gi(this.cm,Re,Re.length-1),Fe)}),getSelection:function(re){for(var pe=this.sel.ranges,Fe,Re=0;Re<pe.length;Re++){var Ue=Pn(this,pe[Re].from(),pe[Re].to());Fe=Fe?Fe.concat(Ue):Ue}return re===!1?Fe:Fe.join(re||this.lineSeparator())},getSelections:function(re){for(var pe=[],Fe=this.sel.ranges,Re=0;Re<Fe.length;Re++){var Ue=Pn(this,Fe[Re].from(),Fe[Re].to());re!==!1&&(Ue=Ue.join(re||this.lineSeparator())),pe[Re]=Ue}return pe},replaceSelection:function(re,pe,Fe){for(var Re=[],Ue=0;Ue<this.sel.ranges.length;Ue++)Re[Ue]=re;this.replaceSelections(Re,pe,Fe||"+input")},replaceSelections:an(function(re,pe,Fe){for(var Re=[],Ue=this.sel,ot=0;ot<Ue.ranges.length;ot++){var wt=Ue.ranges[ot];Re[ot]={from:wt.from(),to:wt.to(),text:this.splitLines(re[ot]),origin:Fe}}for(var Rt=pe&&pe!="end"&&so(this,Re,pe),It=Re.length-1;It>=0;It--)oa(this,Re[It]);Rt?jo(this,Rt):this.cm&&ic(this.cm)}),undo:an(function(){Ql(this,"undo")}),redo:an(function(){Ql(this,"redo")}),undoSelection:an(function(){Ql(this,"undo",!0)}),redoSelection:an(function(){Ql(this,"redo",!0)}),setExtending:function(re){this.extend=re},getExtending:function(){return this.extend},historySize:function(){for(var re=this.history,pe=0,Fe=0,Re=0;Re<re.done.length;Re++)re.done[Re].ranges||++pe;for(var Ue=0;Ue<re.undone.length;Ue++)re.undone[Ue].ranges||++Fe;return{undo:pe,redo:Fe}},clearHistory:function(){var re=this;this.history=new br(this.history.maxGeneration),rs(this,function(pe){return pe.history=re.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(re){return re&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(re){return this.history.generation==(re||this.cleanGeneration)},getHistory:function(){return{done:Js(this.history.done),undone:Js(this.history.undone)}},setHistory:function(re){var pe=this.history=new br(this.history.maxGeneration);pe.done=Js(re.done.slice(0),null,!0),pe.undone=Js(re.undone.slice(0),null,!0)},setGutterMarker:an(function(re,pe,Fe){return wa(this,re,"gutter",function(Re){var Ue=Re.gutterMarkers||(Re.gutterMarkers={});return Ue[pe]=Fe,!Fe&&vt(Ue)&&(Re.gutterMarkers=null),!0})}),clearGutter:an(function(re){var pe=this;this.iter(function(Fe){Fe.gutterMarkers&&Fe.gutterMarkers[re]&&wa(pe,Fe,"gutter",function(){return Fe.gutterMarkers[re]=null,vt(Fe.gutterMarkers)&&(Fe.gutterMarkers=null),!0})})}),lineInfo:function(re){var pe;if(typeof re=="number"){if(!Mn(this,re)||(pe=re,re=dn(this,re),!re))return null}else if(pe=Nt(re),pe==null)return null;return{line:pe,handle:re,text:re.text,gutterMarkers:re.gutterMarkers,textClass:re.textClass,bgClass:re.bgClass,wrapClass:re.wrapClass,widgets:re.widgets}},addLineClass:an(function(re,pe,Fe){return wa(this,re,pe=="gutter"?"gutter":"class",function(Re){var Ue=pe=="text"?"textClass":pe=="background"?"bgClass":pe=="gutter"?"gutterClass":"wrapClass";if(!Re[Ue])Re[Ue]=Fe;else{if(Pe(Fe).test(Re[Ue]))return!1;Re[Ue]+=" "+Fe}return!0})}),removeLineClass:an(function(re,pe,Fe){return wa(this,re,pe=="gutter"?"gutter":"class",function(Re){var Ue=pe=="text"?"textClass":pe=="background"?"bgClass":pe=="gutter"?"gutterClass":"wrapClass",ot=Re[Ue];if(ot)if(Fe==null)Re[Ue]=null;else{var wt=ot.match(Pe(Fe));if(!wt)return!1;var Rt=wt.index+wt[0].length;Re[Ue]=ot.slice(0,wt.index)+(!wt.index||Rt==ot.length?"":" ")+ot.slice(Rt)||null}else return!1;return!0})}),addLineWidget:an(function(re,pe,Fe){return Nu(this,re,pe,Fe)}),removeLineWidget:function(re){re.clear()},markText:function(re,pe,Fe){return Bc(this,Fn(this,re),Fn(this,pe),Fe,Fe&&Fe.type||"range")},setBookmark:function(re,pe){var Fe={replacedWith:pe&&(pe.nodeType==null?pe.widget:pe),insertLeft:pe&&pe.insertLeft,clearWhenEmpty:!1,shared:pe&&pe.shared,handleMouseEvents:pe&&pe.handleMouseEvents};return re=Fn(this,re),Bc(this,re,re,Fe,"bookmark")},findMarksAt:function(re){re=Fn(this,re);var pe=[],Fe=dn(this,re.line).markedSpans;if(Fe)for(var Re=0;Re<Fe.length;++Re){var Ue=Fe[Re];(Ue.from==null||Ue.from<=re.ch)&&(Ue.to==null||Ue.to>=re.ch)&&pe.push(Ue.marker.parent||Ue.marker)}return pe},findMarks:function(re,pe,Fe){re=Fn(this,re),pe=Fn(this,pe);var Re=[],Ue=re.line;return this.iter(re.line,pe.line+1,function(ot){var wt=ot.markedSpans;if(wt)for(var Rt=0;Rt<wt.length;Rt++){var It=wt[Rt];!(It.to!=null&&Ue==re.line&&re.ch>=It.to||It.from==null&&Ue!=re.line||It.from!=null&&Ue==pe.line&&It.from>=pe.ch)&&(!Fe||Fe(It.marker))&&Re.push(It.marker.parent||It.marker)}++Ue}),Re},getAllMarks:function(){var re=[];return this.iter(function(pe){var Fe=pe.markedSpans;if(Fe)for(var Re=0;Re<Fe.length;++Re)Fe[Re].from!=null&&re.push(Fe[Re].marker)}),re},posFromIndex:function(re){var pe,Fe=this.first,Re=this.lineSeparator().length;return this.iter(function(Ue){var ot=Ue.text.length+Re;if(ot>re)return pe=re,!0;re-=ot,++Fe}),Fn(this,nn(Fe,pe))},indexFromPos:function(re){re=Fn(this,re);var pe=re.ch;if(re.line<this.first||re.ch<0)return 0;var Fe=this.lineSeparator().length;return this.iter(this.first,re.line,function(Re){pe+=Re.text.length+Fe}),pe},copy:function(re){var pe=new Ba(mn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return pe.scrollTop=this.scrollTop,pe.scrollLeft=this.scrollLeft,pe.sel=this.sel,pe.extend=!1,re&&(pe.history.undoDepth=this.history.undoDepth,pe.setHistory(this.getHistory())),pe},linkedDoc:function(re){re||(re={});var pe=this.first,Fe=this.first+this.size;re.from!=null&&re.from>pe&&(pe=re.from),re.to!=null&&re.to<Fe&&(Fe=re.to);var Re=new Ba(mn(this,pe,Fe),re.mode||this.modeOption,pe,this.lineSep,this.direction);return re.sharedHist&&(Re.history=this.history),(this.linked||(this.linked=[])).push({doc:Re,sharedHist:re.sharedHist}),Re.linked=[{doc:this,isParent:!0,sharedHist:re.sharedHist}],oh(Re,Ph(this)),Re},unlinkDoc:function(re){if(re instanceof ys&&(re=re.doc),this.linked)for(var pe=0;pe<this.linked.length;++pe){var Fe=this.linked[pe];if(Fe.doc==re){this.linked.splice(pe,1),re.unlinkDoc(this),Rd(Ph(this));break}}if(re.history==this.history){var Re=[re.id];rs(re,function(Ue){return Re.push(Ue.id)},!0),re.history=new br(null),re.history.done=Js(this.history.done,Re),re.history.undone=Js(this.history.undone,Re)}},iterLinkedDocs:function(re){rs(this,re)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(re){return this.lineSep?re.split(this.lineSep):Tr(re)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:an(function(re){re!="rtl"&&(re="ltr"),re!=this.direction&&(this.direction=re,this.iter(function(pe){return pe.order=null}),this.cm&&Jr(this.cm))})}),Ba.prototype.eachLine=Ba.prototype.iter;var nd=0;function Bd(re){var pe=this;if(Yf(pe),!(gn(pe,re)||Ga(pe.display,re))){ai(re),Ce&&(nd=+new Date);var Fe=Da(pe,re,!0),Re=re.dataTransfer.files;if(!(!Fe||pe.isReadOnly()))if(Re&&Re.length&&window.FileReader&&window.File)for(var Ue=Re.length,ot=Array(Ue),wt=0,Rt=function(){++wt==Ue&&wn(pe,function(){Fe=Fn(pe.doc,Fe);var jn={from:Fe,to:Fe,text:pe.doc.splitLines(ot.filter(function(mi){return mi!=null}).join(pe.doc.lineSeparator())),origin:"paste"};oa(pe.doc,jn),jo(pe.doc,vr(Fn(pe.doc,Fe),Fn(pe.doc,er(jn))))})()},It=function(jn,mi){if(pe.options.allowDropFileTypes&&ut(pe.options.allowDropFileTypes,jn.type)==-1){Rt();return}var _i=new FileReader;_i.onerror=function(){return Rt()},_i.onload=function(){var Bi=_i.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Bi)){Rt();return}ot[mi]=Bi,Rt()},_i.readAsText(jn)},Yt=0;Yt<Re.length;Yt++)It(Re[Yt],Yt);else{if(pe.state.draggingText&&pe.doc.sel.contains(Fe)>-1){pe.state.draggingText(re),setTimeout(function(){return pe.display.input.focus()},20);return}try{var Tn=re.dataTransfer.getData("Text");if(Tn){var tn;if(pe.state.draggingText&&!pe.state.draggingText.copy&&(tn=pe.listSelections()),La(pe.doc,vr(Fe,Fe)),tn)for(var Gn=0;Gn<tn.length;++Gn)sc(pe.doc,"",tn[Gn].anchor,tn[Gn].head,"drag");pe.replaceSelection(Tn,"around","paste"),pe.display.input.focus()}}catch(jn){}}}}function id(re,pe){if(Ce&&(!re.state.draggingText||+new Date-nd<100)){Ki(pe);return}if(!(gn(re,pe)||Ga(re.display,pe))&&(pe.dataTransfer.setData("Text",re.getSelection()),pe.dataTransfer.effectAllowed="copyMove",pe.dataTransfer.setDragImage&&!le)){var Fe=Ze("img",null,null,"position: fixed; left: 0; top: 0;");Fe.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",ge&&(Fe.width=Fe.height=1,re.display.wrapper.appendChild(Fe),Fe._top=Fe.offsetTop),pe.dataTransfer.setDragImage(Fe,0,0),ge&&Fe.parentNode.removeChild(Fe)}}function yf(re,pe){var Fe=Da(re,pe);if(Fe){var Re=document.createDocumentFragment();Go(re,Fe,Re),re.display.dragCursor||(re.display.dragCursor=Ze("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),re.display.lineSpace.insertBefore(re.display.dragCursor,re.display.cursorDiv)),ze(re.display.dragCursor,Re)}}function Yf(re){re.display.dragCursor&&(re.display.lineSpace.removeChild(re.display.dragCursor),re.display.dragCursor=null)}function Sf(re){if(document.getElementsByClassName){for(var pe=document.getElementsByClassName("CodeMirror"),Fe=[],Re=0;Re<pe.length;Re++){var Ue=pe[Re].CodeMirror;Ue&&Fe.push(Ue)}Fe.length&&Fe[0].operation(function(){for(var ot=0;ot<Fe.length;ot++)re(Fe[ot])})}}var Fd=!1;function ql(){Fd||(_h(),Fd=!0)}function _h(){var re;At(window,"resize",function(){re==null&&(re=setTimeout(function(){re=null,Sf(xf)},100))}),At(window,"blur",function(){return Sf(Rc)})}function xf(re){var pe=re.display;pe.cachedCharWidth=pe.cachedTextHeight=pe.cachedPaddingH=null,pe.scrollbarsClipped=!1,re.setSize()}for(var Ku={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"},Fc=0;Fc<10;Fc++)Ku[Fc+48]=Ku[Fc+96]=String(Fc);for(var Eh=65;Eh<=90;Eh++)Ku[Eh]=String.fromCharCode(Eh);for(var sh=1;sh<=12;sh++)Ku[sh+111]=Ku[sh+63235]="F"+sh;var Ll={};Ll.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"},Ll.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"},Ll.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"},Ll.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"]},Ll.default=oe?Ll.macDefault:Ll.pcDefault;function jd(re){var pe=re.split(/-(?!$)/);re=pe[pe.length-1];for(var Fe,Re,Ue,ot,wt=0;wt<pe.length-1;wt++){var Rt=pe[wt];if(/^(cmd|meta|m)$/i.test(Rt))ot=!0;else if(/^a(lt)?$/i.test(Rt))Fe=!0;else if(/^(c|ctrl|control)$/i.test(Rt))Re=!0;else if(/^s(hift)?$/i.test(Rt))Ue=!0;else throw new Error("Unrecognized modifier name: "+Rt)}return Fe&&(re="Alt-"+re),Re&&(re="Ctrl-"+re),ot&&(re="Cmd-"+re),Ue&&(re="Shift-"+re),re}function zd(re){var pe={};for(var Fe in re)if(re.hasOwnProperty(Fe)){var Re=re[Fe];if(/^(name|fallthrough|(de|at)tach)$/.test(Fe))continue;if(Re=="..."){delete re[Fe];continue}for(var Ue=Kt(Fe.split(" "),jd),ot=0;ot<Ue.length;ot++){var wt=void 0,Rt=void 0;ot==Ue.length-1?(Rt=Ue.join(" "),wt=Re):(Rt=Ue.slice(0,ot+1).join(" "),wt="...");var It=pe[Rt];if(!It)pe[Rt]=wt;else if(It!=wt)throw new Error("Inconsistent bindings for "+Rt)}delete re[Fe]}for(var Yt in pe)re[Yt]=pe[Yt];return re}function eu(re,pe,Fe,Re){pe=jc(pe);var Ue=pe.call?pe.call(re,Re):pe[re];if(Ue===!1)return"nothing";if(Ue==="...")return"multi";if(Ue!=null&&Fe(Ue))return"handled";if(pe.fallthrough){if(Object.prototype.toString.call(pe.fallthrough)!="[object Array]")return eu(re,pe.fallthrough,Fe,Re);for(var ot=0;ot<pe.fallthrough.length;ot++){var wt=eu(re,pe.fallthrough[ot],Fe,Re);if(wt)return wt}}}function Lh(re){var pe=typeof re=="string"?re:Ku[re.keyCode];return pe=="Ctrl"||pe=="Alt"||pe=="Shift"||pe=="Mod"}function Hd(re,pe,Fe){var Re=re;return pe.altKey&&Re!="Alt"&&(re="Alt-"+re),(Se?pe.metaKey:pe.ctrlKey)&&Re!="Ctrl"&&(re="Ctrl-"+re),(Se?pe.ctrlKey:pe.metaKey)&&Re!="Mod"&&(re="Cmd-"+re),!Fe&&pe.shiftKey&&Re!="Shift"&&(re="Shift-"+re),re}function Ud(re,pe){if(ge&&re.keyCode==34&&re.char)return!1;var Fe=Ku[re.keyCode];return Fe==null||re.altGraphKey?!1:(re.keyCode==3&&re.code&&(Fe=re.code),Hd(Fe,re,pe))}function jc(re){return typeof re=="string"?Ll[re]:re}function fl(re,pe){for(var Fe=re.doc.sel.ranges,Re=[],Ue=0;Ue<Fe.length;Ue++){for(var ot=pe(Fe[Ue]);Re.length&&sn(ot.from,Wt(Re).to)<=0;){var wt=Re.pop();if(sn(wt.from,ot.from)<0){ot.from=wt.from;break}}Re.push(ot)}Et(re,function(){for(var Rt=Re.length-1;Rt>=0;Rt--)sc(re.doc,"",Re[Rt].from,Re[Rt].to,"+delete");ic(re)})}function Gd(re,pe,Fe){var Re=Ie(re.text,pe+Fe,Fe);return Re<0||Re>re.text.length?null:Re}function ba(re,pe,Fe){var Re=Gd(re,pe.ch,Fe);return Re==null?null:new nn(pe.line,Re,Fe<0?"after":"before")}function fs(re,pe,Fe,Re,Ue){if(re){pe.doc.direction=="rtl"&&(Ue=-Ue);var ot=dt(Fe,pe.doc.direction);if(ot){var wt=Ue<0?Wt(ot):ot[0],Rt=Ue<0==(wt.level==1),It=Rt?"after":"before",Yt;if(wt.level>0||pe.doc.direction=="rtl"){var Tn=Lu(pe,Fe);Yt=Ue<0?Fe.text.length-1:0;var tn=bl(pe,Tn,Yt).top;Yt=We(function(Gn){return bl(pe,Tn,Gn).top==tn},Ue<0==(wt.level==1)?wt.from:wt.to-1,Yt),It=="before"&&(Yt=Gd(Fe,Yt,1))}else Yt=Ue<0?wt.to:wt.from;return new nn(Re,Yt,It)}}return new nn(Re,Ue<0?Fe.text.length:0,Ue<0?"before":"after")}function Ys(re,pe,Fe,Re){var Ue=dt(pe,re.doc.direction);if(!Ue)return ba(pe,Fe,Re);Fe.ch>=pe.text.length?(Fe.ch=pe.text.length,Fe.sticky="before"):Fe.ch<=0&&(Fe.ch=0,Fe.sticky="after");var ot=Ne(Ue,Fe.ch,Fe.sticky),wt=Ue[ot];if(re.doc.direction=="ltr"&&wt.level%2==0&&(Re>0?wt.to>Fe.ch:wt.from<Fe.ch))return ba(pe,Fe,Re);var Rt=function(nr,Dr){return Gd(pe,nr instanceof nn?nr.ch:nr,Dr)},It,Yt=function(nr){return re.options.lineWrapping?(It=It||Lu(re,pe),bc(re,pe,It,nr)):{begin:0,end:pe.text.length}},Tn=Yt(Fe.sticky=="before"?Rt(Fe,-1):Fe.ch);if(re.doc.direction=="rtl"||wt.level==1){var tn=wt.level==1==Re<0,Gn=Rt(Fe,tn?1:-1);if(Gn!=null&&(tn?Gn<=wt.to&&Gn<=Tn.end:Gn>=wt.from&&Gn>=Tn.begin)){var jn=tn?"before":"after";return new nn(Fe.line,Gn,jn)}}var mi=function(nr,Dr,Sr){for(var Kr=function(ca,Ya){return Ya?new nn(Fe.line,Rt(ca,1),"before"):new nn(Fe.line,ca,"after")};nr>=0&&nr<Ue.length;nr+=Dr){var wo=Ue[nr],yr=Dr>0==(wo.level!=1),zo=yr?Sr.begin:Rt(Sr.end,-1);if(wo.from<=zo&&zo<wo.to||(zo=yr?wo.from:Rt(wo.to,-1),Sr.begin<=zo&&zo<Sr.end))return Kr(zo,yr)}},_i=mi(ot+Re,Re,Tn);if(_i)return _i;var Bi=Re>0?Tn.end:Rt(Tn.begin,-1);return Bi!=null&&!(Re>0&&Bi==pe.text.length)&&(_i=mi(Re>0?0:Ue.length-1,Re,Yt(Bi)),_i)?_i:null}var Va={selectAll:gs,singleSelection:function(re){return re.setSelection(re.getCursor("anchor"),re.getCursor("head"),gt)},killLine:function(re){return fl(re,function(pe){if(pe.empty()){var Fe=dn(re.doc,pe.head.line).text.length;return pe.head.ch==Fe&&pe.head.line<re.lastLine()?{from:pe.head,to:nn(pe.head.line+1,0)}:{from:pe.head,to:nn(pe.head.line,Fe)}}else return{from:pe.from(),to:pe.to()}})},deleteLine:function(re){return fl(re,function(pe){return{from:nn(pe.from().line,0),to:Fn(re.doc,nn(pe.to().line+1,0))}})},delLineLeft:function(re){return fl(re,function(pe){return{from:nn(pe.from().line,0),to:pe.from()}})},delWrappedLineLeft:function(re){return fl(re,function(pe){var Fe=re.charCoords(pe.head,"div").top+5,Re=re.coordsChar({left:0,top:Fe},"div");return{from:Re,to:pe.from()}})},delWrappedLineRight:function(re){return fl(re,function(pe){var Fe=re.charCoords(pe.head,"div").top+5,Re=re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:Fe},"div");return{from:pe.from(),to:Re}})},undo:function(re){return re.undo()},redo:function(re){return re.redo()},undoSelection:function(re){return re.undoSelection()},redoSelection:function(re){return re.redoSelection()},goDocStart:function(re){return re.extendSelection(nn(re.firstLine(),0))},goDocEnd:function(re){return re.extendSelection(nn(re.lastLine()))},goLineStart:function(re){return re.extendSelectionsBy(function(pe){return fu(re,pe.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(re){return re.extendSelectionsBy(function(pe){return Wd(re,pe.head)},{origin:"+move",bias:1})},goLineEnd:function(re){return re.extendSelectionsBy(function(pe){return pu(re,pe.head.line)},{origin:"+move",bias:-1})},goLineRight:function(re){return re.extendSelectionsBy(function(pe){var Fe=re.cursorCoords(pe.head,"div").top+5;return re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:Fe},"div")},Ht)},goLineLeft:function(re){return re.extendSelectionsBy(function(pe){var Fe=re.cursorCoords(pe.head,"div").top+5;return re.coordsChar({left:0,top:Fe},"div")},Ht)},goLineLeftSmart:function(re){return re.extendSelectionsBy(function(pe){var Fe=re.cursorCoords(pe.head,"div").top+5,Re=re.coordsChar({left:0,top:Fe},"div");return Re.ch<re.getLine(Re.line).search(/\S/)?Wd(re,pe.head):Re},Ht)},goLineUp:function(re){return re.moveV(-1,"line")},goLineDown:function(re){return re.moveV(1,"line")},goPageUp:function(re){return re.moveV(-1,"page")},goPageDown:function(re){return re.moveV(1,"page")},goCharLeft:function(re){return re.moveH(-1,"char")},goCharRight:function(re){return re.moveH(1,"char")},goColumnLeft:function(re){return re.moveH(-1,"column")},goColumnRight:function(re){return re.moveH(1,"column")},goWordLeft:function(re){return re.moveH(-1,"word")},goGroupRight:function(re){return re.moveH(1,"group")},goGroupLeft:function(re){return re.moveH(-1,"group")},goWordRight:function(re){return re.moveH(1,"word")},delCharBefore:function(re){return re.deleteH(-1,"codepoint")},delCharAfter:function(re){return re.deleteH(1,"char")},delWordBefore:function(re){return re.deleteH(-1,"word")},delWordAfter:function(re){return re.deleteH(1,"word")},delGroupBefore:function(re){return re.deleteH(-1,"group")},delGroupAfter:function(re){return re.deleteH(1,"group")},indentAuto:function(re){return re.indentSelection("smart")},indentMore:function(re){return re.indentSelection("add")},indentLess:function(re){return re.indentSelection("subtract")},insertTab:function(re){return re.replaceSelection(" ")},insertSoftTab:function(re){for(var pe=[],Fe=re.listSelections(),Re=re.options.tabSize,Ue=0;Ue<Fe.length;Ue++){var ot=Fe[Ue].from(),wt=lt(re.getLine(ot.line),ot.ch,Re);pe.push(bn(Re-wt%Re))}re.replaceSelections(pe)},defaultTab:function(re){re.somethingSelected()?re.indentSelection("add"):re.execCommand("insertTab")},transposeChars:function(re){return Et(re,function(){for(var pe=re.listSelections(),Fe=[],Re=0;Re<pe.length;Re++)if(pe[Re].empty()){var Ue=pe[Re].head,ot=dn(re.doc,Ue.line).text;if(ot){if(Ue.ch==ot.length&&(Ue=new nn(Ue.line,Ue.ch-1)),Ue.ch>0)Ue=new nn(Ue.line,Ue.ch+1),re.replaceRange(ot.charAt(Ue.ch-1)+ot.charAt(Ue.ch-2),nn(Ue.line,Ue.ch-2),Ue,"+transpose");else if(Ue.line>re.doc.first){var wt=dn(re.doc,Ue.line-1).text;wt&&(Ue=new nn(Ue.line,1),re.replaceRange(ot.charAt(0)+re.doc.lineSeparator()+wt.charAt(wt.length-1),nn(Ue.line-1,wt.length-1),Ue,"+transpose"))}}Fe.push(new Pi(Ue,Ue))}re.setSelections(Fe)})},newlineAndIndent:function(re){return Et(re,function(){for(var pe=re.listSelections(),Fe=pe.length-1;Fe>=0;Fe--)re.replaceRange(re.doc.lineSeparator(),pe[Fe].anchor,pe[Fe].head,"+input");pe=re.listSelections();for(var Re=0;Re<pe.length;Re++)re.indentLine(pe[Re].from().line,null,!0);ic(re)})},openLine:function(re){return re.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(re){return re.toggleOverwrite()}};function fu(re,pe){var Fe=dn(re.doc,pe),Re=hr(Fe);return Re!=Fe&&(pe=Nt(Re)),fs(!0,re,Re,pe,1)}function pu(re,pe){var Fe=dn(re.doc,pe),Re=eo(Fe);return Re!=Fe&&(pe=Nt(Re)),fs(!0,re,Fe,pe,-1)}function Wd(re,pe){var Fe=fu(re,pe.line),Re=dn(re.doc,Fe.line),Ue=dt(Re,re.doc.direction);if(!Ue||Ue[0].level==0){var ot=Math.max(Fe.ch,Re.text.search(/\S/)),wt=pe.line==Fe.line&&pe.ch<=ot&&pe.ch;return nn(Fe.line,wt?0:ot,Fe.sticky)}return Fe}function zc(re,pe,Fe){if(typeof pe=="string"&&(pe=Va[pe],!pe))return!1;re.display.input.ensurePolled();var Re=re.display.shift,Ue=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),Fe&&(re.display.shift=!1),Ue=pe(re)!=Pt}finally{re.display.shift=Re,re.state.suppressEdits=!1}return Ue}function rd(re,pe,Fe){for(var Re=0;Re<re.state.keyMaps.length;Re++){var Ue=eu(pe,re.state.keyMaps[Re],Fe,re);if(Ue)return Ue}return re.options.extraKeys&&eu(pe,re.options.extraKeys,Fe,re)||eu(pe,re.options.keyMap,Fe,re)}var Ou=new tt;function Ec(re,pe,Fe,Re){var Ue=re.state.keySeq;if(Ue){if(Lh(pe))return"handled";if(/\'$/.test(pe)?re.state.keySeq=null:Ou.set(50,function(){re.state.keySeq==Ue&&(re.state.keySeq=null,re.display.input.reset())}),Xf(re,Ue+" "+pe,Fe,Re))return!0}return Xf(re,pe,Fe,Re)}function Xf(re,pe,Fe,Re){var Ue=rd(re,pe,Re);return Ue=="multi"&&(re.state.keySeq=pe),Ue=="handled"&&Mi(re,"keyHandled",re,pe,Fe),(Ue=="handled"||Ue=="multi")&&(ai(Fe),vs(re)),!!Ue}function Jf(re,pe){var Fe=Ud(pe,!0);return Fe?pe.shiftKey&&!re.state.keySeq?Ec(re,"Shift-"+Fe,pe,function(Re){return zc(re,Re,!0)})||Ec(re,Fe,pe,function(Re){if(typeof Re=="string"?/^go[A-Z]/.test(Re):Re.motion)return zc(re,Re)}):Ec(re,Fe,pe,function(Re){return zc(re,Re)}):!1}function Qf(re,pe,Fe){return Ec(re,"'"+Fe+"'",pe,function(Re){return zc(re,Re,!0)})}var od=null;function Vp(re){var pe=this;if(!(re.target&&re.target!=pe.display.input.getField())&&(pe.curOp.focus=at(),!gn(pe,re))){Ce&&Le<11&&re.keyCode==27&&(re.returnValue=!1);var Fe=re.keyCode;pe.display.shift=Fe==16||re.shiftKey;var Re=Jf(pe,re);ge&&(od=Re?Fe:null,!Re&&Fe==88&&!Rr&&(oe?re.metaKey:re.ctrlKey)&&pe.replaceSelection("",null,"cut")),Me&&!oe&&!Re&&Fe==46&&re.shiftKey&&!re.ctrlKey&&document.execCommand&&document.execCommand("cut"),Fe==18&&!/\bCodeMirror-crosshair\b/.test(pe.display.lineDiv.className)&&$p(pe)}}function $p(re){var pe=re.display.lineDiv;Ct(pe,"CodeMirror-crosshair");function Fe(Re){(Re.keyCode==18||!Re.altKey)&&(Ae(pe,"CodeMirror-crosshair"),pn(document,"keyup",Fe),pn(document,"mouseover",Fe))}At(document,"keyup",Fe),At(document,"mouseover",Fe)}function Yp(re){re.keyCode==16&&(this.doc.sel.shift=!1),gn(this,re)}function Lc(re){var pe=this;if(!(re.target&&re.target!=pe.display.input.getField())&&!(Ga(pe.display,re)||gn(pe,re)||re.ctrlKey&&!re.altKey||oe&&re.metaKey)){var Fe=re.keyCode,Re=re.charCode;if(ge&&Fe==od){od=null,ai(re);return}if(!(ge&&(!re.which||re.which<10)&&Jf(pe,re))){var Ue=String.fromCharCode(Re==null?Fe:Re);Ue!="\b"&&(Qf(pe,re,Ue)||pe.display.input.onKeyPress(re))}}}var om=400,Xp=function(re,pe,Fe){this.time=re,this.pos=pe,this.button=Fe};Xp.prototype.compare=function(re,pe,Fe){return this.time+om>re&&sn(pe,this.pos)==0&&Fe==this.button};var Zd,sd;function Jp(re,pe){var Fe=+new Date;return sd&&sd.compare(Fe,re,pe)?(Zd=sd=null,"triple"):Zd&&Zd.compare(Fe,re,pe)?(sd=new Xp(Fe,re,pe),Zd=null,"double"):(Zd=new Xp(Fe,re,pe),sd=null,"single")}function Mc(re){var pe=this,Fe=pe.display;if(!(gn(pe,re)||Fe.activeTouch&&Fe.input.supportsTouch())){if(Fe.input.ensurePolled(),Fe.shift=re.shiftKey,Ga(Fe,re)){he||(Fe.scroller.draggable=!1,setTimeout(function(){return Fe.scroller.draggable=!0},100));return}if(!tp(pe,re)){var Re=Da(pe,re),Ue=sr(re),ot=Re?Jp(Re,Ue):"single";window.focus(),Ue==1&&pe.state.selectingText&&pe.state.selectingText(re),!(Re&&Qp(pe,Ue,Re,ot,re))&&(Ue==1?Re?sm(pe,Re,ot,re):ir(re)==Fe.scroller&&ai(re):Ue==2?(Re&&Qo(pe.doc,Re),setTimeout(function(){return Fe.input.focus()},20)):Ue==3&&(we?pe.display.input.onContextMenu(re):Bs(pe)))}}}function Qp(re,pe,Fe,Re,Ue){var ot="Click";return Re=="double"?ot="Double"+ot:Re=="triple"&&(ot="Triple"+ot),ot=(pe==1?"Left":pe==2?"Middle":"Right")+ot,Ec(re,Hd(ot,Ue),Ue,function(wt){if(typeof wt=="string"&&(wt=Va[wt]),!wt)return!1;var Rt=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),Rt=wt(re,Fe)!=Pt}finally{re.state.suppressEdits=!1}return Rt})}function qf(re,pe,Fe){var Re=re.getOption("configureMouse"),Ue=Re?Re(re,pe,Fe):{};if(Ue.unit==null){var ot=ie?Fe.shiftKey&&Fe.metaKey:Fe.altKey;Ue.unit=ot?"rectangle":pe=="single"?"char":pe=="double"?"word":"line"}return(Ue.extend==null||re.doc.extend)&&(Ue.extend=re.doc.extend||Fe.shiftKey),Ue.addNew==null&&(Ue.addNew=oe?Fe.metaKey:Fe.ctrlKey),Ue.moveOnDrag==null&&(Ue.moveOnDrag=!(oe?Fe.altKey:Fe.ctrlKey)),Ue}function sm(re,pe,Fe,Re){Ce?setTimeout(st(ds,re),0):re.curOp.focus=at();var Ue=qf(re,Fe,Re),ot=re.doc.sel,wt;re.options.dragDrop&&Ji&&!re.isReadOnly()&&Fe=="single"&&(wt=ot.contains(pe))>-1&&(sn((wt=ot.ranges[wt]).from(),pe)<0||pe.xRel>0)&&(sn(wt.to(),pe)>0||pe.xRel<0)?qp(re,Re,pe,Ue):nv(re,Re,pe,Ue)}function qp(re,pe,Fe,Re){var Ue=re.display,ot=!1,wt=wn(re,function(Yt){he&&(Ue.scroller.draggable=!1),re.state.draggingText=!1,pn(Ue.wrapper.ownerDocument,"mouseup",wt),pn(Ue.wrapper.ownerDocument,"mousemove",Rt),pn(Ue.scroller,"dragstart",It),pn(Ue.scroller,"drop",wt),ot||(ai(Yt),Re.addNew||Qo(re.doc,Fe,null,null,Re.extend),he&&!le||Ce&&Le==9?setTimeout(function(){Ue.wrapper.ownerDocument.body.focus({preventScroll:!0}),Ue.input.focus()},20):Ue.input.focus())}),Rt=function(Yt){ot=ot||Math.abs(pe.clientX-Yt.clientX)+Math.abs(pe.clientY-Yt.clientY)>=10},It=function(){return ot=!0};he&&(Ue.scroller.draggable=!0),re.state.draggingText=wt,wt.copy=!Re.moveOnDrag,Ue.scroller.dragDrop&&Ue.scroller.dragDrop(),At(Ue.wrapper.ownerDocument,"mouseup",wt),At(Ue.wrapper.ownerDocument,"mousemove",Rt),At(Ue.scroller,"dragstart",It),At(Ue.scroller,"drop",wt),Bs(re),setTimeout(function(){return Ue.input.focus()},20)}function eg(re,pe,Fe){if(Fe=="char")return new Pi(pe,pe);if(Fe=="word")return re.findWordAt(pe);if(Fe=="line")return new Pi(nn(pe.line,0),Fn(re.doc,nn(pe.line+1,0)));var Re=Fe(re,pe);return new Pi(Re.from,Re.to)}function nv(re,pe,Fe,Re){var Ue=re.display,ot=re.doc;ai(pe);var wt,Rt,It=ot.sel,Yt=It.ranges;if(Re.addNew&&!Re.extend?(Rt=ot.sel.contains(Fe),Rt>-1?wt=Yt[Rt]:wt=new Pi(Fe,Fe)):(wt=ot.sel.primary(),Rt=ot.sel.primIndex),Re.unit=="rectangle")Re.addNew||(wt=new Pi(Fe,Fe)),Fe=Da(re,pe,!0,!0),Rt=-1;else{var Tn=eg(re,Fe,Re.unit);Re.extend?wt=Pl(wt,Tn.anchor,Tn.head,Re.extend):wt=Tn}Re.addNew?Rt==-1?(Rt=Yt.length,As(ot,Gi(re,Yt.concat([wt]),Rt),{scroll:!1,origin:"*mouse"})):Yt.length>1&&Yt[Rt].empty()&&Re.unit=="char"&&!Re.extend?(As(ot,Gi(re,Yt.slice(0,Rt).concat(Yt.slice(Rt+1)),0),{scroll:!1,origin:"*mouse"}),It=ot.sel):xs(ot,Rt,wt,Ft):(Rt=0,As(ot,new Xi([wt],0),Ft),It=ot.sel);var tn=Fe;function Gn(Sr){if(sn(tn,Sr)!=0)if(tn=Sr,Re.unit=="rectangle"){for(var Kr=[],wo=re.options.tabSize,yr=lt(dn(ot,Fe.line).text,Fe.ch,wo),zo=lt(dn(ot,Sr.line).text,Sr.ch,wo),ca=Math.min(yr,zo),Ya=Math.max(yr,zo),va=Math.min(Fe.line,Sr.line),nu=Math.min(re.lastLine(),Math.max(Fe.line,Sr.line));va<=nu;va++){var Ml=dn(ot,va).text,ja=hn(Ml,ca,wo);ca==Ya?Kr.push(new Pi(nn(va,ja),nn(va,ja))):Ml.length>ja&&Kr.push(new Pi(nn(va,ja),nn(va,hn(Ml,Ya,wo))))}Kr.length||Kr.push(new Pi(Fe,Fe)),As(ot,Gi(re,It.ranges.slice(0,Rt).concat(Kr),Rt),{origin:"*mouse",scroll:!1}),re.scrollIntoView(Sr)}else{var gu=wt,pl=eg(re,Sr,Re.unit),za=gu.anchor,ws;sn(pl.anchor,za)>0?(ws=pl.head,za=Hn(gu.from(),pl.anchor)):(ws=pl.anchor,za=qn(gu.to(),pl.head));var Ca=It.ranges.slice(0);Ca[Rt]=am(re,new Pi(Fn(ot,za),ws)),As(ot,Gi(re,Ca,Rt),Ft)}}var jn=Ue.wrapper.getBoundingClientRect(),mi=0;function _i(Sr){var Kr=++mi,wo=Da(re,Sr,!0,Re.unit=="rectangle");if(wo)if(sn(wo,tn)!=0){re.curOp.focus=at(),Gn(wo);var yr=Wo(Ue,ot);(wo.line>=yr.to||wo.line<yr.from)&&setTimeout(wn(re,function(){mi==Kr&&_i(Sr)}),150)}else{var zo=Sr.clientY<jn.top?-20:Sr.clientY>jn.bottom?20:0;zo&&setTimeout(wn(re,function(){mi==Kr&&(Ue.scroller.scrollTop+=zo,_i(Sr))}),50)}}function Bi(Sr){re.state.selectingText=!1,mi=1/0,Sr&&(ai(Sr),Ue.input.focus()),pn(Ue.wrapper.ownerDocument,"mousemove",nr),pn(Ue.wrapper.ownerDocument,"mouseup",Dr),ot.history.lastSelOrigin=null}var nr=wn(re,function(Sr){Sr.buttons===0||!sr(Sr)?Bi(Sr):_i(Sr)}),Dr=wn(re,Bi);re.state.selectingText=Dr,At(Ue.wrapper.ownerDocument,"mousemove",nr),At(Ue.wrapper.ownerDocument,"mouseup",Dr)}function am(re,pe){var Fe=pe.anchor,Re=pe.head,Ue=dn(re.doc,Fe.line);if(sn(Fe,Re)==0&&Fe.sticky==Re.sticky)return pe;var ot=dt(Ue);if(!ot)return pe;var wt=Ne(ot,Fe.ch,Fe.sticky),Rt=ot[wt];if(Rt.from!=Fe.ch&&Rt.to!=Fe.ch)return pe;var It=wt+(Rt.from==Fe.ch==(Rt.level!=1)?0:1);if(It==0||It==ot.length)return pe;var Yt;if(Re.line!=Fe.line)Yt=(Re.line-Fe.line)*(re.doc.direction=="ltr"?1:-1)>0;else{var Tn=Ne(ot,Re.ch,Re.sticky),tn=Tn-wt||(Re.ch-Fe.ch)*(Rt.level==1?-1:1);Tn==It-1||Tn==It?Yt=tn<0:Yt=tn>0}var Gn=ot[It+(Yt?-1:0)],jn=Yt==(Gn.level==1),mi=jn?Gn.from:Gn.to,_i=jn?"after":"before";return Fe.ch==mi&&Fe.sticky==_i?pe:new Pi(new nn(Fe.line,mi,_i),Re)}function ep(re,pe,Fe,Re){var Ue,ot;if(pe.touches)Ue=pe.touches[0].clientX,ot=pe.touches[0].clientY;else try{Ue=pe.clientX,ot=pe.clientY}catch(Gn){return!1}if(Ue>=Math.floor(re.display.gutters.getBoundingClientRect().right))return!1;Re&&ai(pe);var wt=re.display,Rt=wt.lineDiv.getBoundingClientRect();if(ot>Rt.bottom||!An(re,Fe))return Ci(pe);ot-=Rt.top-wt.viewOffset;for(var It=0;It<re.display.gutterSpecs.length;++It){var Yt=wt.gutters.childNodes[It];if(Yt&&Yt.getBoundingClientRect().right>=Ue){var Tn=un(re.doc,ot),tn=re.display.gutterSpecs[It];return ln(re,Fe,re,Tn,tn.className,pe),Ci(pe)}}}function tp(re,pe){return ep(re,pe,"gutterClick",!0)}function np(re,pe){Ga(re.display,pe)||lm(re,pe)||gn(re,pe,"contextmenu")||we||re.display.input.onContextMenu(pe)}function lm(re,pe){return An(re,"gutterContextMenu")?ep(re,pe,"gutterContextMenu",!1):!1}function ip(re){re.display.wrapper.className=re.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+re.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ds(re)}var Mh={toString:function(){return"CodeMirror.Init"}},tg={},wf={};function um(re){var pe=re.optionHandlers;function Fe(Re,Ue,ot,wt){re.defaults[Re]=Ue,ot&&(pe[Re]=wt?function(Rt,It,Yt){Yt!=Mh&&ot(Rt,It,Yt)}:ot)}re.defineOption=Fe,re.Init=Mh,Fe("value","",function(Re,Ue){return Re.setValue(Ue)},!0),Fe("mode",null,function(Re,Ue){Re.doc.modeOption=Ue,kr(Re)},!0),Fe("indentUnit",2,kr,!0),Fe("indentWithTabs",!1),Fe("smartIndent",!0),Fe("tabSize",4,function(Re){No(Re),Ds(Re),Ms(Re)},!0),Fe("lineSeparator",null,function(Re,Ue){if(Re.doc.lineSep=Ue,!!Ue){var ot=[],wt=Re.doc.first;Re.doc.iter(function(It){for(var Yt=0;;){var Tn=It.text.indexOf(Ue,Yt);if(Tn==-1)break;Yt=Tn+Ue.length,ot.push(nn(wt,Tn))}wt++});for(var Rt=ot.length-1;Rt>=0;Rt--)sc(Re.doc,Ue,ot[Rt],nn(ot[Rt].line,ot[Rt].ch+Ue.length))}}),Fe("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(Re,Ue,ot){Re.state.specialChars=new RegExp(Ue.source+(Ue.test(" ")?"":"| "),"g"),ot!=Mh&&Re.refresh()}),Fe("specialCharPlaceholder",Is,function(Re){return Re.refresh()},!0),Fe("electricChars",!0),Fe("inputStyle",ee?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Fe("spellcheck",!1,function(Re,Ue){return Re.getInputField().spellcheck=Ue},!0),Fe("autocorrect",!1,function(Re,Ue){return Re.getInputField().autocorrect=Ue},!0),Fe("autocapitalize",!1,function(Re,Ue){return Re.getInputField().autocapitalize=Ue},!0),Fe("rtlMoveVisually",!se),Fe("wholeLineUpdateBefore",!0),Fe("theme","default",function(Re){ip(Re),ti(Re)},!0),Fe("keyMap","default",function(Re,Ue,ot){var wt=jc(Ue),Rt=ot!=Mh&&jc(ot);Rt&&Rt.detach&&Rt.detach(Re,wt),wt.attach&&wt.attach(Re,Rt||null)}),Fe("extraKeys",null),Fe("configureMouse",null),Fe("lineWrapping",!1,cm,!0),Fe("gutters",[],function(Re,Ue){Re.display.gutterSpecs=Ni(Ue,Re.options.lineNumbers),ti(Re)},!0),Fe("fixedGutter",!0,function(Re,Ue){Re.display.gutters.style.left=Ue?Cc(Re.display)+"px":"0",Re.refresh()},!0),Fe("coverGutterNextToScrollbar",!1,function(Re){return rc(Re)},!0),Fe("scrollbarStyle","native",function(Re){td(Re),rc(Re),Re.display.scrollbars.setScrollTop(Re.doc.scrollTop),Re.display.scrollbars.setScrollLeft(Re.doc.scrollLeft)},!0),Fe("lineNumbers",!1,function(Re,Ue){Re.display.gutterSpecs=Ni(Re.options.gutters,Ue),ti(Re)},!0),Fe("firstLineNumber",1,ti,!0),Fe("lineNumberFormatter",function(Re){return Re},ti,!0),Fe("showCursorWhenSelecting",!1,Ea,!0),Fe("resetSelectionOnContextMenu",!0),Fe("lineWiseCopyCut",!0),Fe("pasteLinesPerSelection",!0),Fe("selectionsMayTouch",!1),Fe("readOnly",!1,function(Re,Ue){Ue=="nocursor"&&(Rc(Re),Re.display.input.blur()),Re.display.input.readOnlyChanged(Ue)}),Fe("screenReaderLabel",null,function(Re,Ue){Ue=Ue===""?null:Ue,Re.display.input.screenReaderLabelChanged(Ue)}),Fe("disableInput",!1,function(Re,Ue){Ue||Re.display.input.reset()},!0),Fe("dragDrop",!0,rp),Fe("allowDropFileTypes",null),Fe("cursorBlinkRate",530),Fe("cursorScrollMargin",0),Fe("cursorHeight",1,Ea,!0),Fe("singleCursorHeightPerLine",!0,Ea,!0),Fe("workTime",100),Fe("workDelay",100),Fe("flattenSpans",!0,No,!0),Fe("addModeClass",!1,No,!0),Fe("pollInterval",100),Fe("undoDepth",200,function(Re,Ue){return Re.doc.history.undoDepth=Ue}),Fe("historyEventDelay",1250),Fe("viewportMargin",10,function(Re){return Re.refresh()},!0),Fe("maxHighlightLength",1e4,No,!0),Fe("moveInputWithCursor",!0,function(Re,Ue){Ue||Re.display.input.resetPosition()}),Fe("tabindex",null,function(Re,Ue){return Re.display.input.getField().tabIndex=Ue||""}),Fe("autofocus",null),Fe("direction","ltr",function(Re,Ue){return Re.doc.setDirection(Ue)},!0),Fe("phrases",null)}function rp(re,pe,Fe){var Re=Fe&&Fe!=Mh;if(!pe!=!Re){var Ue=re.display.dragFunctions,ot=pe?At:pn;ot(re.display.scroller,"dragstart",Ue.start),ot(re.display.scroller,"dragenter",Ue.enter),ot(re.display.scroller,"dragover",Ue.over),ot(re.display.scroller,"dragleave",Ue.leave),ot(re.display.scroller,"drop",Ue.drop)}}function cm(re){re.options.lineWrapping?(Ct(re.display.wrapper,"CodeMirror-wrap"),re.display.sizer.style.minWidth="",re.display.sizerWidth=null):(Ae(re.display.wrapper,"CodeMirror-wrap"),Bo(re)),$r(re),Ms(re),Ds(re),setTimeout(function(){return rc(re)},100)}function ys(re,pe){var Fe=this;if(!(this instanceof ys))return new ys(re,pe);this.options=pe=pe?zt(pe):{},zt(tg,pe,!1);var Re=pe.value;typeof Re=="string"?Re=new Ba(Re,pe.mode,null,pe.lineSeparator,pe.direction):pe.mode&&(Re.modeOption=pe.mode),this.doc=Re;var Ue=new ys.inputStyles[pe.inputStyle](this),ot=this.display=new ji(re,Re,Ue,pe);ot.wrapper.CodeMirror=this,ip(this),pe.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),td(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 tt,keySeq:null,specialChars:null},pe.autofocus&&!ee&&ot.input.focus(),Ce&&Le<11&&setTimeout(function(){return Fe.display.input.reset(!0)},20),Kd(this),ql(),Oa(this),this.curOp.forceUpdate=!0,Zr(this,Re),pe.autofocus&&!ee||this.hasFocus()?setTimeout(function(){Fe.hasFocus()&&!Fe.state.focused&&Fo(Fe)},20):Rc(this);for(var wt in wf)wf.hasOwnProperty(wt)&&wf[wt](this,pe[wt],Mh);Ai(this),pe.finishInit&&pe.finishInit(this);for(var Rt=0;Rt<ad.length;++Rt)ad[Rt](this);oc(this),he&&pe.lineWrapping&&getComputedStyle(ot.lineDiv).textRendering=="optimizelegibility"&&(ot.lineDiv.style.textRendering="auto")}ys.defaults=tg,ys.optionHandlers=wf;function Kd(re){var pe=re.display;At(pe.scroller,"mousedown",wn(re,Mc)),Ce&&Le<11?At(pe.scroller,"dblclick",wn(re,function(It){if(!gn(re,It)){var Yt=Da(re,It);if(!(!Yt||tp(re,It)||Ga(re.display,It))){ai(It);var Tn=re.findWordAt(Yt);Qo(re.doc,Tn.anchor,Tn.head)}}})):At(pe.scroller,"dblclick",function(It){return gn(re,It)||ai(It)}),At(pe.scroller,"contextmenu",function(It){return np(re,It)}),At(pe.input.getField(),"contextmenu",function(It){pe.scroller.contains(It.target)||np(re,It)});var Fe,Re={end:0};function Ue(){pe.activeTouch&&(Fe=setTimeout(function(){return pe.activeTouch=null},1e3),Re=pe.activeTouch,Re.end=+new Date)}function ot(It){if(It.touches.length!=1)return!1;var Yt=It.touches[0];return Yt.radiusX<=1&&Yt.radiusY<=1}function wt(It,Yt){if(Yt.left==null)return!0;var Tn=Yt.left-It.left,tn=Yt.top-It.top;return Tn*Tn+tn*tn>20*20}At(pe.scroller,"touchstart",function(It){if(!gn(re,It)&&!ot(It)&&!tp(re,It)){pe.input.ensurePolled(),clearTimeout(Fe);var Yt=+new Date;pe.activeTouch={start:Yt,moved:!1,prev:Yt-Re.end<=300?Re:null},It.touches.length==1&&(pe.activeTouch.left=It.touches[0].pageX,pe.activeTouch.top=It.touches[0].pageY)}}),At(pe.scroller,"touchmove",function(){pe.activeTouch&&(pe.activeTouch.moved=!0)}),At(pe.scroller,"touchend",function(It){var Yt=pe.activeTouch;if(Yt&&!Ga(pe,It)&&Yt.left!=null&&!Yt.moved&&new Date-Yt.start<300){var Tn=re.coordsChar(pe.activeTouch,"page"),tn;!Yt.prev||wt(Yt,Yt.prev)?tn=new Pi(Tn,Tn):!Yt.prev.prev||wt(Yt,Yt.prev.prev)?tn=re.findWordAt(Tn):tn=new Pi(nn(Tn.line,0),Fn(re.doc,nn(Tn.line+1,0))),re.setSelection(tn.anchor,tn.head),re.focus(),ai(It)}Ue()}),At(pe.scroller,"touchcancel",Ue),At(pe.scroller,"scroll",function(){pe.scroller.clientHeight&&(Au(re,pe.scroller.scrollTop),uu(re,pe.scroller.scrollLeft,!0),ln(re,"scroll",re))}),At(pe.scroller,"mousewheel",function(It){return lr(re,It)}),At(pe.scroller,"DOMMouseScroll",function(It){return lr(re,It)}),At(pe.wrapper,"scroll",function(){return pe.wrapper.scrollTop=pe.wrapper.scrollLeft=0}),pe.dragFunctions={enter:function(It){gn(re,It)||Ki(It)},over:function(It){gn(re,It)||(yf(re,It),Ki(It))},start:function(It){return id(re,It)},drop:wn(re,Bd),leave:function(It){gn(re,It)||Yf(re)}};var Rt=pe.input.getField();At(Rt,"keyup",function(It){return Yp.call(re,It)}),At(Rt,"keydown",wn(re,Vp)),At(Rt,"keypress",wn(re,Lc)),At(Rt,"focus",function(It){return Fo(re,It)}),At(Rt,"blur",function(It){return Rc(re,It)})}var ad=[];ys.defineInitHook=function(re){return ad.push(re)};function $a(re,pe,Fe,Re){var Ue=re.doc,ot;Fe==null&&(Fe="add"),Fe=="smart"&&(Ue.mode.indent?ot=mr(re,pe).state:Fe="prev");var wt=re.options.tabSize,Rt=dn(Ue,pe),It=lt(Rt.text,null,wt);Rt.stateAfter&&(Rt.stateAfter=null);var Yt=Rt.text.match(/^\s*/)[0],Tn;if(!Re&&!/\S/.test(Rt.text))Tn=0,Fe="not";else if(Fe=="smart"&&(Tn=Ue.mode.indent(ot,Rt.text.slice(Yt.length),Rt.text),Tn==Pt||Tn>150)){if(!Re)return;Fe="prev"}Fe=="prev"?pe>Ue.first?Tn=lt(dn(Ue,pe-1).text,null,wt):Tn=0:Fe=="add"?Tn=It+re.options.indentUnit:Fe=="subtract"?Tn=It-re.options.indentUnit:typeof Fe=="number"&&(Tn=It+Fe),Tn=Math.max(0,Tn);var tn="",Gn=0;if(re.options.indentWithTabs)for(var jn=Math.floor(Tn/wt);jn;--jn)Gn+=wt,tn+=" ";if(Gn<Tn&&(tn+=bn(Tn-Gn)),tn!=Yt)return sc(Ue,tn,nn(pe,0),nn(pe,Yt.length),"+input"),Rt.stateAfter=null,!0;for(var mi=0;mi<Ue.sel.ranges.length;mi++){var _i=Ue.sel.ranges[mi];if(_i.head.line==pe&&_i.head.ch<Yt.length){var Bi=nn(pe,Yt.length);xs(Ue,mi,new Pi(Bi,Bi));break}}}var tu=null;function ld(re){tu=re}function bf(re,pe,Fe,Re,Ue){var ot=re.doc;re.display.shift=!1,Re||(Re=ot.sel);var wt=+new Date-200,Rt=Ue=="paste"||re.state.pasteIncoming>wt,It=Tr(pe),Yt=null;if(Rt&&Re.ranges.length>1)if(tu&&tu.text.join(`
|
|
|
`)==pe){if(Re.ranges.length%tu.text.length==0){Yt=[];for(var Tn=0;Tn<tu.text.length;Tn++)Yt.push(ot.splitLines(tu.text[Tn]))}}else It.length==Re.ranges.length&&re.options.pasteLinesPerSelection&&(Yt=Kt(It,function(nr){return[nr]}));for(var tn=re.curOp.updateInput,Gn=Re.ranges.length-1;Gn>=0;Gn--){var jn=Re.ranges[Gn],mi=jn.from(),_i=jn.to();jn.empty()&&(Fe&&Fe>0?mi=nn(mi.line,mi.ch-Fe):re.state.overwrite&&!Rt?_i=nn(_i.line,Math.min(dn(ot,_i.line).text.length,_i.ch+Wt(It).length)):Rt&&tu&&tu.lineWise&&tu.text.join(`
|
|
|
`)==It.join(`
|
|
|
`)&&(mi=_i=nn(mi.line,0)));var Bi={from:mi,to:_i,text:Yt?Yt[Gn%Yt.length]:It,origin:Ue||(Rt?"paste":re.state.cutIncoming>wt?"cut":"+input")};oa(re.doc,Bi),Mi(re,"inputRead",re,Bi)}pe&&!Rt&&ig(re,pe),ic(re),re.curOp.updateInput<2&&(re.curOp.updateInput=tn),re.curOp.typing=!0,re.state.pasteIncoming=re.state.cutIncoming=-1}function ng(re,pe){var Fe=re.clipboardData&&re.clipboardData.getData("Text");if(Fe)return re.preventDefault(),!pe.isReadOnly()&&!pe.options.disableInput&&Et(pe,function(){return bf(pe,Fe,0,null,"paste")}),!0}function ig(re,pe){if(!(!re.options.electricChars||!re.options.smartIndent))for(var Fe=re.doc.sel,Re=Fe.ranges.length-1;Re>=0;Re--){var Ue=Fe.ranges[Re];if(!(Ue.head.ch>100||Re&&Fe.ranges[Re-1].head.line==Ue.head.line)){var ot=re.getModeAt(Ue.head),wt=!1;if(ot.electricChars){for(var Rt=0;Rt<ot.electricChars.length;Rt++)if(pe.indexOf(ot.electricChars.charAt(Rt))>-1){wt=$a(re,Ue.head.line,"smart");break}}else ot.electricInput&&ot.electricInput.test(dn(re.doc,Ue.head.line).text.slice(0,Ue.head.ch))&&(wt=$a(re,Ue.head.line,"smart"));wt&&Mi(re,"electricInput",re,Ue.head.line)}}}function rg(re){for(var pe=[],Fe=[],Re=0;Re<re.doc.sel.ranges.length;Re++){var Ue=re.doc.sel.ranges[Re].head.line,ot={anchor:nn(Ue,0),head:nn(Ue+1,0)};Fe.push(ot),pe.push(re.getRange(ot.anchor,ot.head))}return{text:pe,ranges:Fe}}function og(re,pe,Fe,Re){re.setAttribute("autocorrect",Fe?"":"off"),re.setAttribute("autocapitalize",Re?"":"off"),re.setAttribute("spellcheck",!!pe)}function sg(){var re=Ze("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),pe=Ze("div",[re],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return he?re.style.width="1000px":re.setAttribute("wrap","off"),ce&&(re.style.border="1px solid black"),og(re),pe}function Th(re){var pe=re.optionHandlers,Fe=re.helpers={};re.prototype={constructor:re,focus:function(){window.focus(),this.display.input.focus()},setOption:function(Re,Ue){var ot=this.options,wt=ot[Re];ot[Re]==Ue&&Re!="mode"||(ot[Re]=Ue,pe.hasOwnProperty(Re)&&wn(this,pe[Re])(this,Ue,wt),ln(this,"optionChange",this,Re))},getOption:function(Re){return this.options[Re]},getDoc:function(){return this.doc},addKeyMap:function(Re,Ue){this.state.keyMaps[Ue?"push":"unshift"](jc(Re))},removeKeyMap:function(Re){for(var Ue=this.state.keyMaps,ot=0;ot<Ue.length;++ot)if(Ue[ot]==Re||Ue[ot].name==Re)return Ue.splice(ot,1),!0},addOverlay:fn(function(Re,Ue){var ot=Re.token?Re:re.getMode(this.options,Re);if(ot.startState)throw new Error("Overlays may not be stateful.");Xt(this.state.overlays,{mode:ot,modeSpec:Re,opaque:Ue&&Ue.opaque,priority:Ue&&Ue.priority||0},function(wt){return wt.priority}),this.state.modeGen++,Ms(this)}),removeOverlay:fn(function(Re){for(var Ue=this.state.overlays,ot=0;ot<Ue.length;++ot){var wt=Ue[ot].modeSpec;if(wt==Re||typeof Re=="string"&&wt.name==Re){Ue.splice(ot,1),this.state.modeGen++,Ms(this);return}}}),indentLine:fn(function(Re,Ue,ot){typeof Ue!="string"&&typeof Ue!="number"&&(Ue==null?Ue=this.options.smartIndent?"smart":"prev":Ue=Ue?"add":"subtract"),Mn(this.doc,Re)&&$a(this,Re,Ue,ot)}),indentSelection:fn(function(Re){for(var Ue=this.doc.sel.ranges,ot=-1,wt=0;wt<Ue.length;wt++){var Rt=Ue[wt];if(Rt.empty())Rt.head.line>ot&&($a(this,Rt.head.line,Re,!0),ot=Rt.head.line,wt==this.doc.sel.primIndex&&ic(this));else{var It=Rt.from(),Yt=Rt.to(),Tn=Math.max(ot,It.line);ot=Math.min(this.lastLine(),Yt.line-(Yt.ch?0:1))+1;for(var tn=Tn;tn<ot;++tn)$a(this,tn,Re);var Gn=this.doc.sel.ranges;It.ch==0&&Ue.length==Gn.length&&Gn[wt].from().ch>0&&xs(this.doc,wt,new Pi(It,Gn[wt].to()),gt)}}}),getTokenAt:function(Re,Ue){return di(this,Re,Ue)},getLineTokens:function(Re,Ue){return di(this,nn(Re),Ue,!0)},getTokenTypeAt:function(Re){Re=Fn(this.doc,Re);var Ue=Cr(this,dn(this.doc,Re.line)),ot=0,wt=(Ue.length-1)/2,Rt=Re.ch,It;if(Rt==0)It=Ue[2];else for(;;){var Yt=ot+wt>>1;if((Yt?Ue[Yt*2-1]:0)>=Rt)wt=Yt;else if(Ue[Yt*2+1]<Rt)ot=Yt+1;else{It=Ue[Yt*2+2];break}}var Tn=It?It.indexOf("overlay "):-1;return Tn<0?It:Tn==0?null:It.slice(0,Tn-1)},getModeAt:function(Re){var Ue=this.doc.mode;return Ue.innerMode?re.innerMode(Ue,this.getTokenAt(Re).state).mode:Ue},getHelper:function(Re,Ue){return this.getHelpers(Re,Ue)[0]},getHelpers:function(Re,Ue){var ot=[];if(!Fe.hasOwnProperty(Ue))return ot;var wt=Fe[Ue],Rt=this.getModeAt(Re);if(typeof Rt[Ue]=="string")wt[Rt[Ue]]&&ot.push(wt[Rt[Ue]]);else if(Rt[Ue])for(var It=0;It<Rt[Ue].length;It++){var Yt=wt[Rt[Ue][It]];Yt&&ot.push(Yt)}else Rt.helperType&&wt[Rt.helperType]?ot.push(wt[Rt.helperType]):wt[Rt.name]&&ot.push(wt[Rt.name]);for(var Tn=0;Tn<wt._global.length;Tn++){var tn=wt._global[Tn];tn.pred(Rt,this)&&ut(ot,tn.val)==-1&&ot.push(tn.val)}return ot},getStateAfter:function(Re,Ue){var ot=this.doc;return Re=ei(ot,Re==null?ot.first+ot.size-1:Re),mr(this,Re+1,Ue).state},cursorCoords:function(Re,Ue){var ot,wt=this.doc.sel.primary();return Re==null?ot=wt.head:typeof Re=="object"?ot=Fn(this.doc,Re):ot=Re?wt.from():wt.to(),Rs(this,ot,Ue||"page")},charCoords:function(Re,Ue){return Bl(this,Fn(this.doc,Re),Ue||"page")},coordsChar:function(Re,Ue){return Re=Yl(this,Re,Ue||"page"),wc(this,Re.left,Re.top)},lineAtHeight:function(Re,Ue){return Re=Yl(this,{top:Re,left:0},Ue||"page").top,un(this.doc,Re+this.display.viewOffset)},heightAtLine:function(Re,Ue,ot){var wt=!1,Rt;if(typeof Re=="number"){var It=this.doc.first+this.doc.size-1;Re<this.doc.first?Re=this.doc.first:Re>It&&(Re=It,wt=!0),Rt=dn(this.doc,Re)}else Rt=Re;return Ks(this,Rt,{top:0,left:0},Ue||"page",ot||wt).top+(wt?this.doc.height-to(Rt):0)},defaultTextHeight:function(){return Tu(this.display)},defaultCharWidth:function(){return Wu(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(Re,Ue,ot,wt,Rt){var It=this.display;Re=Rs(this,Fn(this.doc,Re));var Yt=Re.bottom,Tn=Re.left;if(Ue.style.position="absolute",Ue.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Ue),It.sizer.appendChild(Ue),wt=="over")Yt=Re.top;else if(wt=="above"||wt=="near"){var tn=Math.max(It.wrapper.clientHeight,this.doc.height),Gn=Math.max(It.sizer.clientWidth,It.lineSpace.clientWidth);(wt=="above"||Re.bottom+Ue.offsetHeight>tn)&&Re.top>Ue.offsetHeight?Yt=Re.top-Ue.offsetHeight:Re.bottom+Ue.offsetHeight<=tn&&(Yt=Re.bottom),Tn+Ue.offsetWidth>Gn&&(Tn=Gn-Ue.offsetWidth)}Ue.style.top=Yt+"px",Ue.style.left=Ue.style.right="",Rt=="right"?(Tn=It.sizer.clientWidth-Ue.offsetWidth,Ue.style.right="0px"):(Rt=="left"?Tn=0:Rt=="middle"&&(Tn=(It.sizer.clientWidth-Ue.offsetWidth)/2),Ue.style.left=Tn+"px"),ot&&rh(this,{left:Tn,top:Yt,right:Tn+Ue.offsetWidth,bottom:Yt+Ue.offsetHeight})},triggerOnKeyDown:fn(Vp),triggerOnKeyPress:fn(Lc),triggerOnKeyUp:Yp,triggerOnMouseDown:fn(Mc),execCommand:function(Re){if(Va.hasOwnProperty(Re))return Va[Re].call(null,this)},triggerElectric:fn(function(Re){ig(this,Re)}),findPosH:function(Re,Ue,ot,wt){var Rt=1;Ue<0&&(Rt=-1,Ue=-Ue);for(var It=Fn(this.doc,Re),Yt=0;Yt<Ue&&(It=Cf(this.doc,It,Rt,ot,wt),!It.hitSide);++Yt);return It},moveH:fn(function(Re,Ue){var ot=this;this.extendSelectionsBy(function(wt){return ot.display.shift||ot.doc.extend||wt.empty()?Cf(ot.doc,wt.head,Re,Ue,ot.options.rtlMoveVisually):Re<0?wt.from():wt.to()},Ht)}),deleteH:fn(function(Re,Ue){var ot=this.doc.sel,wt=this.doc;ot.somethingSelected()?wt.replaceSelection("",null,"+delete"):fl(this,function(Rt){var It=Cf(wt,Rt.head,Re,Ue,!1);return Re<0?{from:It,to:Rt.head}:{from:Rt.head,to:It}})}),findPosV:function(Re,Ue,ot,wt){var Rt=1,It=wt;Ue<0&&(Rt=-1,Ue=-Ue);for(var Yt=Fn(this.doc,Re),Tn=0;Tn<Ue;++Tn){var tn=Rs(this,Yt,"div");if(It==null?It=tn.left:tn.left=It,Yt=kh(this,tn,Rt,ot),Yt.hitSide)break}return Yt},moveV:fn(function(Re,Ue){var ot=this,wt=this.doc,Rt=[],It=!this.display.shift&&!wt.extend&&wt.sel.somethingSelected();if(wt.extendSelectionsBy(function(Tn){if(It)return Re<0?Tn.from():Tn.to();var tn=Rs(ot,Tn.head,"div");Tn.goalColumn!=null&&(tn.left=Tn.goalColumn),Rt.push(tn.left);var Gn=kh(ot,tn,Re,Ue);return Ue=="page"&&Tn==wt.sel.primary()&&Ch(ot,Bl(ot,Gn,"div").top-tn.top),Gn},Ht),Rt.length)for(var Yt=0;Yt<wt.sel.ranges.length;Yt++)wt.sel.ranges[Yt].goalColumn=Rt[Yt]}),findWordAt:function(Re){var Ue=this.doc,ot=dn(Ue,Re.line).text,wt=Re.ch,Rt=Re.ch;if(ot){var It=this.getHelper(Re,"wordChars");(Re.sticky=="before"||Rt==ot.length)&&wt?--wt:++Rt;for(var Yt=ot.charAt(wt),Tn=xt(Yt,It)?function(tn){return xt(tn,It)}:/\s/.test(Yt)?function(tn){return/\s/.test(tn)}:function(tn){return!/\s/.test(tn)&&!xt(tn)};wt>0&&Tn(ot.charAt(wt-1));)--wt;for(;Rt<ot.length&&Tn(ot.charAt(Rt));)++Rt}return new Pi(nn(Re.line,wt),nn(Re.line,Rt))},toggleOverwrite:function(Re){Re!=null&&Re==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ct(this.display.cursorDiv,"CodeMirror-overwrite"):Ae(this.display.cursorDiv,"CodeMirror-overwrite"),ln(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==at()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:fn(function(Re,Ue){ro(this,Re,Ue)}),getScrollInfo:function(){var Re=this.display.scroller;return{left:Re.scrollLeft,top:Re.scrollTop,height:Re.scrollHeight-Wa(this)-this.display.barHeight,width:Re.scrollWidth-Wa(this)-this.display.barWidth,clientHeight:Uu(this),clientWidth:Za(this)}},scrollIntoView:fn(function(Re,Ue){Re==null?(Re={from:this.doc.sel.primary().head,to:null},Ue==null&&(Ue=this.options.cursorScrollMargin)):typeof Re=="number"?Re={from:nn(Re,0),to:null}:Re.from==null&&(Re={from:Re,to:null}),Re.to||(Re.to=Re.from),Re.margin=Ue||0,Re.from.line!=null?ns(this,Re):qh(this,Re.from,Re.to,Re.margin)}),setSize:fn(function(Re,Ue){var ot=this,wt=function(It){return typeof It=="number"||/^\d+$/.test(String(It))?It+"px":It};Re!=null&&(this.display.wrapper.style.width=wt(Re)),Ue!=null&&(this.display.wrapper.style.height=wt(Ue)),this.options.lineWrapping&&ra(this);var Rt=this.display.viewFrom;this.doc.iter(Rt,this.display.viewTo,function(It){if(It.widgets){for(var Yt=0;Yt<It.widgets.length;Yt++)if(It.widgets[Yt].noHScroll){xo(ot,Rt,"widget");break}}++Rt}),this.curOp.forceUpdate=!0,ln(this,"refresh",this)}),operation:function(Re){return Et(this,Re)},startOperation:function(){return Oa(this)},endOperation:function(){return oc(this)},refresh:fn(function(){var Re=this.display.cachedTextHeight;Ms(this),this.curOp.forceUpdate=!0,Ds(this),ro(this,this.doc.scrollLeft,this.doc.scrollTop),Ii(this.display),(Re==null||Math.abs(Re-Tu(this.display))>.5||this.options.lineWrapping)&&$r(this),ln(this,"refresh",this)}),swapDoc:fn(function(Re){var Ue=this.doc;return Ue.cm=null,this.state.selectingText&&this.state.selectingText(),Zr(this,Re),Ds(this),this.display.input.reset(),ro(this,Re.scrollLeft,Re.scrollTop),this.curOp.forceScroll=!0,Mi(this,"swapDoc",this,Ue),Ue}),phrase:function(Re){var Ue=this.options.phrases;return Ue&&Object.prototype.hasOwnProperty.call(Ue,Re)?Ue[Re]:Re},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}},ni(re),re.registerHelper=function(Re,Ue,ot){Fe.hasOwnProperty(Re)||(Fe[Re]=re[Re]={_global:[]}),Fe[Re][Ue]=ot},re.registerGlobalHelper=function(Re,Ue,ot,wt){re.registerHelper(Re,Ue,wt),Fe[Re]._global.push({pred:ot,val:wt})}}function Cf(re,pe,Fe,Re,Ue){var ot=pe,wt=Fe,Rt=dn(re,pe.line),It=Ue&&re.direction=="rtl"?-Fe:Fe;function Yt(){var Dr=pe.line+It;return Dr<re.first||Dr>=re.first+re.size?!1:(pe=new nn(Dr,pe.ch,pe.sticky),Rt=dn(re,Dr))}function Tn(Dr){var Sr;if(Re=="codepoint"){var Kr=Rt.text.charCodeAt(pe.ch+(Re>0?0:-1));isNaN(Kr)?Sr=null:Sr=new nn(pe.line,Math.max(0,Math.min(Rt.text.length,pe.ch+Fe*(Kr>=55296&&Kr<56320?2:1))),-Fe)}else Ue?Sr=Ys(re.cm,Rt,pe,Fe):Sr=ba(Rt,pe,Fe);if(Sr==null)if(!Dr&&Yt())pe=fs(Ue,re.cm,Rt,pe.line,It);else return!1;else pe=Sr;return!0}if(Re=="char"||Re=="codepoint")Tn();else if(Re=="column")Tn(!0);else if(Re=="word"||Re=="group")for(var tn=null,Gn=Re=="group",jn=re.cm&&re.cm.getHelper(pe,"wordChars"),mi=!0;!(Fe<0&&!Tn(!mi));mi=!1){var _i=Rt.text.charAt(pe.ch)||`
|
|
|
`,Bi=xt(_i,jn)?"w":Gn&&_i==`
|
|
|
`?"n":!Gn||/\s/.test(_i)?null:"p";if(Gn&&!mi&&!Bi&&(Bi="s"),tn&&tn!=Bi){Fe<0&&(Fe=1,Tn(),pe.sticky="after");break}if(Bi&&(tn=Bi),Fe>0&&!Tn(!mi))break}var nr=hu(re,pe,ot,wt,!0);return Nn(ot,nr)&&(nr.hitSide=!0),nr}function kh(re,pe,Fe,Re){var Ue=re.doc,ot=pe.left,wt;if(Re=="page"){var Rt=Math.min(re.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),It=Math.max(Rt-.5*Tu(re.display),3);wt=(Fe>0?pe.bottom:pe.top)+Fe*It}else Re=="line"&&(wt=Fe>0?pe.bottom+3:pe.top-3);for(var Yt;Yt=wc(re,ot,wt),!!Yt.outside;){if(Fe<0?wt<=0:wt>=Ue.height){Yt.hitSide=!0;break}wt+=Fe*5}return Yt}var Qs=function(re){this.cm=re,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new tt,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Qs.prototype.init=function(re){var pe=this,Fe=this,Re=Fe.cm,Ue=Fe.div=re.lineDiv;og(Ue,Re.options.spellcheck,Re.options.autocorrect,Re.options.autocapitalize);function ot(Rt){for(var It=Rt.target;It;It=It.parentNode){if(It==Ue)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(It.className))break}return!1}At(Ue,"paste",function(Rt){!ot(Rt)||gn(Re,Rt)||ng(Rt,Re)||Le<=11&&setTimeout(wn(Re,function(){return pe.updateFromDOM()}),20)}),At(Ue,"compositionstart",function(Rt){pe.composing={data:Rt.data,done:!1}}),At(Ue,"compositionupdate",function(Rt){pe.composing||(pe.composing={data:Rt.data,done:!1})}),At(Ue,"compositionend",function(Rt){pe.composing&&(Rt.data!=pe.composing.data&&pe.readFromDOMSoon(),pe.composing.done=!0)}),At(Ue,"touchstart",function(){return Fe.forceCompositionEnd()}),At(Ue,"input",function(){pe.composing||pe.readFromDOMSoon()});function wt(Rt){if(!(!ot(Rt)||gn(Re,Rt))){if(Re.somethingSelected())ld({lineWise:!1,text:Re.getSelections()}),Rt.type=="cut"&&Re.replaceSelection("",null,"cut");else if(Re.options.lineWiseCopyCut){var It=rg(Re);ld({lineWise:!0,text:It.text}),Rt.type=="cut"&&Re.operation(function(){Re.setSelections(It.ranges,0,gt),Re.replaceSelection("",null,"cut")})}else return;if(Rt.clipboardData){Rt.clipboardData.clearData();var Yt=tu.text.join(`
|
|
|
`);if(Rt.clipboardData.setData("Text",Yt),Rt.clipboardData.getData("Text")==Yt){Rt.preventDefault();return}}var Tn=sg(),tn=Tn.firstChild;Re.display.lineSpace.insertBefore(Tn,Re.display.lineSpace.firstChild),tn.value=tu.text.join(`
|
|
|
`);var Gn=document.activeElement;yt(tn),setTimeout(function(){Re.display.lineSpace.removeChild(Tn),Gn.focus(),Gn==Ue&&Fe.showPrimarySelection()},50)}}At(Ue,"copy",wt),At(Ue,"cut",wt)},Qs.prototype.screenReaderLabelChanged=function(re){re?this.div.setAttribute("aria-label",re):this.div.removeAttribute("aria-label")},Qs.prototype.prepareSelection=function(){var re=Pc(this.cm,!1);return re.focus=document.activeElement==this.div,re},Qs.prototype.showSelection=function(re,pe){!re||!this.cm.display.view.length||((re.focus||pe)&&this.showPrimarySelection(),this.showMultipleSelections(re))},Qs.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Qs.prototype.showPrimarySelection=function(){var re=this.getSelection(),pe=this.cm,Fe=pe.doc.sel.primary(),Re=Fe.from(),Ue=Fe.to();if(pe.display.viewTo==pe.display.viewFrom||Re.line>=pe.display.viewTo||Ue.line<pe.display.viewFrom){re.removeAllRanges();return}var ot=Pf(pe,re.anchorNode,re.anchorOffset),wt=Pf(pe,re.focusNode,re.focusOffset);if(!(ot&&!ot.bad&&wt&&!wt.bad&&sn(Hn(ot,wt),Re)==0&&sn(qn(ot,wt),Ue)==0)){var Rt=pe.display.view,It=Re.line>=pe.display.viewFrom&&op(pe,Re)||{node:Rt[0].measure.map[2],offset:0},Yt=Ue.line<pe.display.viewTo&&op(pe,Ue);if(!Yt){var Tn=Rt[Rt.length-1].measure,tn=Tn.maps?Tn.maps[Tn.maps.length-1]:Tn.map;Yt={node:tn[tn.length-1],offset:tn[tn.length-2]-tn[tn.length-3]}}if(!It||!Yt){re.removeAllRanges();return}var Gn=re.rangeCount&&re.getRangeAt(0),jn;try{jn=Ge(It.node,It.offset,Yt.offset,Yt.node)}catch(mi){}jn&&(!Me&&pe.state.focused?(re.collapse(It.node,It.offset),jn.collapsed||(re.removeAllRanges(),re.addRange(jn))):(re.removeAllRanges(),re.addRange(jn)),Gn&&re.anchorNode==null?re.addRange(Gn):Me&&this.startGracePeriod()),this.rememberSelection()}},Qs.prototype.startGracePeriod=function(){var re=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){re.gracePeriod=!1,re.selectionChanged()&&re.cm.operation(function(){return re.cm.curOp.selectionChanged=!0})},20)},Qs.prototype.showMultipleSelections=function(re){ze(this.cm.display.cursorDiv,re.cursors),ze(this.cm.display.selectionDiv,re.selection)},Qs.prototype.rememberSelection=function(){var re=this.getSelection();this.lastAnchorNode=re.anchorNode,this.lastAnchorOffset=re.anchorOffset,this.lastFocusNode=re.focusNode,this.lastFocusOffset=re.focusOffset},Qs.prototype.selectionInEditor=function(){var re=this.getSelection();if(!re.rangeCount)return!1;var pe=re.getRangeAt(0).commonAncestorContainer;return ft(this.div,pe)},Qs.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Qs.prototype.blur=function(){this.div.blur()},Qs.prototype.getField=function(){return this.div},Qs.prototype.supportsTouch=function(){return!0},Qs.prototype.receivedFocus=function(){var re=this;this.selectionInEditor()?this.pollSelection():Et(this.cm,function(){return re.cm.curOp.selectionChanged=!0});function pe(){re.cm.state.focused&&(re.pollSelection(),re.polling.set(re.cm.options.pollInterval,pe))}this.polling.set(this.cm.options.pollInterval,pe)},Qs.prototype.selectionChanged=function(){var re=this.getSelection();return re.anchorNode!=this.lastAnchorNode||re.anchorOffset!=this.lastAnchorOffset||re.focusNode!=this.lastFocusNode||re.focusOffset!=this.lastFocusOffset},Qs.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var re=this.getSelection(),pe=this.cm;if(z&&xe&&this.cm.display.gutterSpecs.length&&ag(re.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var Fe=Pf(pe,re.anchorNode,re.anchorOffset),Re=Pf(pe,re.focusNode,re.focusOffset);Fe&&Re&&Et(pe,function(){As(pe.doc,vr(Fe,Re),gt),(Fe.bad||Re.bad)&&(pe.curOp.selectionChanged=!0)})}}},Qs.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var re=this.cm,pe=re.display,Fe=re.doc.sel.primary(),Re=Fe.from(),Ue=Fe.to();if(Re.ch==0&&Re.line>re.firstLine()&&(Re=nn(Re.line-1,dn(re.doc,Re.line-1).length)),Ue.ch==dn(re.doc,Ue.line).text.length&&Ue.line<re.lastLine()&&(Ue=nn(Ue.line+1,0)),Re.line<pe.viewFrom||Ue.line>pe.viewTo-1)return!1;var ot,wt,Rt;Re.line==pe.viewFrom||(ot=$s(re,Re.line))==0?(wt=Nt(pe.view[0].line),Rt=pe.view[0].node):(wt=Nt(pe.view[ot].line),Rt=pe.view[ot-1].node.nextSibling);var It=$s(re,Ue.line),Yt,Tn;if(It==pe.view.length-1?(Yt=pe.viewTo-1,Tn=pe.lineDiv.lastChild):(Yt=Nt(pe.view[It+1].line)-1,Tn=pe.view[It+1].node.previousSibling),!Rt)return!1;for(var tn=re.doc.splitLines($d(re,Rt,Tn,wt,Yt)),Gn=Pn(re.doc,nn(wt,0),nn(Yt,dn(re.doc,Yt).text.length));tn.length>1&&Gn.length>1;)if(Wt(tn)==Wt(Gn))tn.pop(),Gn.pop(),Yt--;else if(tn[0]==Gn[0])tn.shift(),Gn.shift(),wt++;else break;for(var jn=0,mi=0,_i=tn[0],Bi=Gn[0],nr=Math.min(_i.length,Bi.length);jn<nr&&_i.charCodeAt(jn)==Bi.charCodeAt(jn);)++jn;for(var Dr=Wt(tn),Sr=Wt(Gn),Kr=Math.min(Dr.length-(tn.length==1?jn:0),Sr.length-(Gn.length==1?jn:0));mi<Kr&&Dr.charCodeAt(Dr.length-mi-1)==Sr.charCodeAt(Sr.length-mi-1);)++mi;if(tn.length==1&&Gn.length==1&&wt==Re.line)for(;jn&&jn>Re.ch&&Dr.charCodeAt(Dr.length-mi-1)==Sr.charCodeAt(Sr.length-mi-1);)jn--,mi++;tn[tn.length-1]=Dr.slice(0,Dr.length-mi).replace(/^\u200b+/,""),tn[0]=tn[0].slice(jn).replace(/\u200b+$/,"");var wo=nn(wt,jn),yr=nn(Yt,Gn.length?Wt(Gn).length-mi:0);if(tn.length>1||tn[0]||sn(wo,yr))return sc(re.doc,tn,wo,yr,"+input"),!0},Qs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Qs.prototype.reset=function(){this.forceCompositionEnd()},Qs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Qs.prototype.readFromDOMSoon=function(){var re=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(re.readDOMTimeout=null,re.composing)if(re.composing.done)re.composing=null;else return;re.updateFromDOM()},80))},Qs.prototype.updateFromDOM=function(){var re=this;(this.cm.isReadOnly()||!this.pollContent())&&Et(this.cm,function(){return Ms(re.cm)})},Qs.prototype.setUneditable=function(re){re.contentEditable="false"},Qs.prototype.onKeyPress=function(re){re.charCode==0||this.composing||(re.preventDefault(),this.cm.isReadOnly()||wn(this.cm,bf)(this.cm,String.fromCharCode(re.charCode==null?re.keyCode:re.charCode),0))},Qs.prototype.readOnlyChanged=function(re){this.div.contentEditable=String(re!="nocursor")},Qs.prototype.onContextMenu=function(){},Qs.prototype.resetPosition=function(){},Qs.prototype.needsContentAttribute=!0;function op(re,pe){var Fe=Gu(re,pe.line);if(!Fe||Fe.hidden)return null;var Re=dn(re.doc,pe.line),Ue=Eu(Fe,Re,pe.line),ot=dt(Re,re.doc.direction),wt="left";if(ot){var Rt=Ne(ot,pe.ch);wt=Rt%2?"right":"left"}var It=xc(Ue.map,pe.ch,wt);return It.offset=It.collapse=="right"?It.end:It.start,It}function ag(re){for(var pe=re;pe;pe=pe.parentNode)if(/CodeMirror-gutter-wrapper/.test(pe.className))return!0;return!1}function Vd(re,pe){return pe&&(re.bad=!0),re}function $d(re,pe,Fe,Re,Ue){var ot="",wt=!1,Rt=re.doc.lineSeparator(),It=!1;function Yt(jn){return function(mi){return mi.id==jn}}function Tn(){wt&&(ot+=Rt,It&&(ot+=Rt),wt=It=!1)}function tn(jn){jn&&(Tn(),ot+=jn)}function Gn(jn){if(jn.nodeType==1){var mi=jn.getAttribute("cm-text");if(mi){tn(mi);return}var _i=jn.getAttribute("cm-marker"),Bi;if(_i){var nr=re.findMarks(nn(Re,0),nn(Ue+1,0),Yt(+_i));nr.length&&(Bi=nr[0].find(0))&&tn(Pn(re.doc,Bi.from,Bi.to).join(Rt));return}if(jn.getAttribute("contenteditable")=="false")return;var Dr=/^(pre|div|p|li|table|br)$/i.test(jn.nodeName);if(!/^br$/i.test(jn.nodeName)&&jn.textContent.length==0)return;Dr&&Tn();for(var Sr=0;Sr<jn.childNodes.length;Sr++)Gn(jn.childNodes[Sr]);/^(pre|p)$/i.test(jn.nodeName)&&(It=!0),Dr&&(wt=!0)}else jn.nodeType==3&&tn(jn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Gn(pe),pe!=Fe;)pe=pe.nextSibling,It=!1;return ot}function Pf(re,pe,Fe){var Re;if(pe==re.display.lineDiv){if(Re=re.display.lineDiv.childNodes[Fe],!Re)return Vd(re.clipPos(nn(re.display.viewTo-1)),!0);pe=null,Fe=0}else for(Re=pe;;Re=Re.parentNode){if(!Re||Re==re.display.lineDiv)return null;if(Re.parentNode&&Re.parentNode==re.display.lineDiv)break}for(var Ue=0;Ue<re.display.view.length;Ue++){var ot=re.display.view[Ue];if(ot.node==Re)return hm(ot,pe,Fe)}}function hm(re,pe,Fe){var Re=re.text.firstChild,Ue=!1;if(!pe||!ft(Re,pe))return Vd(nn(Nt(re.line),0),!0);if(pe==Re&&(Ue=!0,pe=Re.childNodes[Fe],Fe=0,!pe)){var ot=re.rest?Wt(re.rest):re.line;return Vd(nn(Nt(ot),ot.text.length),Ue)}var wt=pe.nodeType==3?pe:null,Rt=pe;for(!wt&&pe.childNodes.length==1&&pe.firstChild.nodeType==3&&(wt=pe.firstChild,Fe&&(Fe=wt.nodeValue.length));Rt.parentNode!=Re;)Rt=Rt.parentNode;var It=re.measure,Yt=It.maps;function Tn(Bi,nr,Dr){for(var Sr=-1;Sr<(Yt?Yt.length:0);Sr++)for(var Kr=Sr<0?It.map:Yt[Sr],wo=0;wo<Kr.length;wo+=3){var yr=Kr[wo+2];if(yr==Bi||yr==nr){var zo=Nt(Sr<0?re.line:re.rest[Sr]),ca=Kr[wo]+Dr;return(Dr<0||yr!=Bi)&&(ca=Kr[wo+(Dr?1:0)]),nn(zo,ca)}}}var tn=Tn(wt,Rt,Fe);if(tn)return Vd(tn,Ue);for(var Gn=Rt.nextSibling,jn=wt?wt.nodeValue.length-Fe:0;Gn;Gn=Gn.nextSibling){if(tn=Tn(Gn,Gn.firstChild,0),tn)return Vd(nn(tn.line,tn.ch-jn),Ue);jn+=Gn.textContent.length}for(var mi=Rt.previousSibling,_i=Fe;mi;mi=mi.previousSibling){if(tn=Tn(mi,mi.firstChild,-1),tn)return Vd(nn(tn.line,tn.ch+_i),Ue);_i+=mi.textContent.length}}var Fa=function(re){this.cm=re,this.prevInput="",this.pollingFast=!1,this.polling=new tt,this.hasSelection=!1,this.composing=null};Fa.prototype.init=function(re){var pe=this,Fe=this,Re=this.cm;this.createField(re);var Ue=this.textarea;re.wrapper.insertBefore(this.wrapper,re.wrapper.firstChild),ce&&(Ue.style.width="0px"),At(Ue,"input",function(){Ce&&Le>=9&&pe.hasSelection&&(pe.hasSelection=null),Fe.poll()}),At(Ue,"paste",function(wt){gn(Re,wt)||ng(wt,Re)||(Re.state.pasteIncoming=+new Date,Fe.fastPoll())});function ot(wt){if(!gn(Re,wt)){if(Re.somethingSelected())ld({lineWise:!1,text:Re.getSelections()});else if(Re.options.lineWiseCopyCut){var Rt=rg(Re);ld({lineWise:!0,text:Rt.text}),wt.type=="cut"?Re.setSelections(Rt.ranges,null,gt):(Fe.prevInput="",Ue.value=Rt.text.join(`
|
|
|
`),yt(Ue))}else return;wt.type=="cut"&&(Re.state.cutIncoming=+new Date)}}At(Ue,"cut",ot),At(Ue,"copy",ot),At(re.scroller,"paste",function(wt){if(!(Ga(re,wt)||gn(Re,wt))){if(!Ue.dispatchEvent){Re.state.pasteIncoming=+new Date,Fe.focus();return}var Rt=new Event("paste");Rt.clipboardData=wt.clipboardData,Ue.dispatchEvent(Rt)}}),At(re.lineSpace,"selectstart",function(wt){Ga(re,wt)||ai(wt)}),At(Ue,"compositionstart",function(){var wt=Re.getCursor("from");Fe.composing&&Fe.composing.range.clear(),Fe.composing={start:wt,range:Re.markText(wt,Re.getCursor("to"),{className:"CodeMirror-composing"})}}),At(Ue,"compositionend",function(){Fe.composing&&(Fe.poll(),Fe.composing.range.clear(),Fe.composing=null)})},Fa.prototype.createField=function(re){this.wrapper=sg(),this.textarea=this.wrapper.firstChild},Fa.prototype.screenReaderLabelChanged=function(re){re?this.textarea.setAttribute("aria-label",re):this.textarea.removeAttribute("aria-label")},Fa.prototype.prepareSelection=function(){var re=this.cm,pe=re.display,Fe=re.doc,Re=Pc(re);if(re.options.moveInputWithCursor){var Ue=Rs(re,Fe.sel.primary().head,"div"),ot=pe.wrapper.getBoundingClientRect(),wt=pe.lineDiv.getBoundingClientRect();Re.teTop=Math.max(0,Math.min(pe.wrapper.clientHeight-10,Ue.top+wt.top-ot.top)),Re.teLeft=Math.max(0,Math.min(pe.wrapper.clientWidth-10,Ue.left+wt.left-ot.left))}return Re},Fa.prototype.showSelection=function(re){var pe=this.cm,Fe=pe.display;ze(Fe.cursorDiv,re.cursors),ze(Fe.selectionDiv,re.selection),re.teTop!=null&&(this.wrapper.style.top=re.teTop+"px",this.wrapper.style.left=re.teLeft+"px")},Fa.prototype.reset=function(re){if(!(this.contextMenuPending||this.composing)){var pe=this.cm;if(pe.somethingSelected()){this.prevInput="";var Fe=pe.getSelection();this.textarea.value=Fe,pe.state.focused&&yt(this.textarea),Ce&&Le>=9&&(this.hasSelection=Fe)}else re||(this.prevInput=this.textarea.value="",Ce&&Le>=9&&(this.hasSelection=null))}},Fa.prototype.getField=function(){return this.textarea},Fa.prototype.supportsTouch=function(){return!1},Fa.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ee||at()!=this.textarea))try{this.textarea.focus()}catch(re){}},Fa.prototype.blur=function(){this.textarea.blur()},Fa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Fa.prototype.receivedFocus=function(){this.slowPoll()},Fa.prototype.slowPoll=function(){var re=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){re.poll(),re.cm.state.focused&&re.slowPoll()})},Fa.prototype.fastPoll=function(){var re=!1,pe=this;pe.pollingFast=!0;function Fe(){var Re=pe.poll();!Re&&!re?(re=!0,pe.polling.set(60,Fe)):(pe.pollingFast=!1,pe.slowPoll())}pe.polling.set(20,Fe)},Fa.prototype.poll=function(){var re=this,pe=this.cm,Fe=this.textarea,Re=this.prevInput;if(this.contextMenuPending||!pe.state.focused||it(Fe)&&!Re&&!this.composing||pe.isReadOnly()||pe.options.disableInput||pe.state.keySeq)return!1;var Ue=Fe.value;if(Ue==Re&&!pe.somethingSelected())return!1;if(Ce&&Le>=9&&this.hasSelection===Ue||oe&&/[\uf700-\uf7ff]/.test(Ue))return pe.display.input.reset(),!1;if(pe.doc.sel==pe.display.selForContextMenu){var ot=Ue.charCodeAt(0);if(ot==8203&&!Re&&(Re="\u200B"),ot==8666)return this.reset(),this.cm.execCommand("undo")}for(var wt=0,Rt=Math.min(Re.length,Ue.length);wt<Rt&&Re.charCodeAt(wt)==Ue.charCodeAt(wt);)++wt;return Et(pe,function(){bf(pe,Ue.slice(wt),Re.length-wt,null,re.composing?"*compose":null),Ue.length>1e3||Ue.indexOf(`
|
|
|
`)>-1?Fe.value=re.prevInput="":re.prevInput=Ue,re.composing&&(re.composing.range.clear(),re.composing.range=pe.markText(re.composing.start,pe.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Fa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Fa.prototype.onKeyPress=function(){Ce&&Le>=9&&(this.hasSelection=null),this.fastPoll()},Fa.prototype.onContextMenu=function(re){var pe=this,Fe=pe.cm,Re=Fe.display,Ue=pe.textarea;pe.contextMenuPending&&pe.contextMenuPending();var ot=Da(Fe,re),wt=Re.scroller.scrollTop;if(!ot||ge)return;var Rt=Fe.options.resetSelectionOnContextMenu;Rt&&Fe.doc.sel.contains(ot)==-1&&wn(Fe,As)(Fe.doc,vr(ot),gt);var It=Ue.style.cssText,Yt=pe.wrapper.style.cssText,Tn=pe.wrapper.offsetParent.getBoundingClientRect();pe.wrapper.style.cssText="position: static",Ue.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(re.clientY-Tn.top-5)+"px; left: "+(re.clientX-Tn.left-5)+`px;
|
|
|
z-index: 1000; background: `+(Ce?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var tn;he&&(tn=window.scrollY),Re.input.focus(),he&&window.scrollTo(null,tn),Re.input.reset(),Fe.somethingSelected()||(Ue.value=pe.prevInput=" "),pe.contextMenuPending=jn,Re.selForContextMenu=Fe.doc.sel,clearTimeout(Re.detectingSelectAll);function Gn(){if(Ue.selectionStart!=null){var _i=Fe.somethingSelected(),Bi="\u200B"+(_i?Ue.value:"");Ue.value="\u21DA",Ue.value=Bi,pe.prevInput=_i?"":"\u200B",Ue.selectionStart=1,Ue.selectionEnd=Bi.length,Re.selForContextMenu=Fe.doc.sel}}function jn(){if(pe.contextMenuPending==jn&&(pe.contextMenuPending=!1,pe.wrapper.style.cssText=Yt,Ue.style.cssText=It,Ce&&Le<9&&Re.scrollbars.setScrollTop(Re.scroller.scrollTop=wt),Ue.selectionStart!=null)){(!Ce||Ce&&Le<9)&&Gn();var _i=0,Bi=function(){Re.selForContextMenu==Fe.doc.sel&&Ue.selectionStart==0&&Ue.selectionEnd>0&&pe.prevInput=="\u200B"?wn(Fe,gs)(Fe):_i++<10?Re.detectingSelectAll=setTimeout(Bi,500):(Re.selForContextMenu=null,Re.input.reset())};Re.detectingSelectAll=setTimeout(Bi,200)}}if(Ce&&Le>=9&&Gn(),we){Ki(re);var mi=function(){pn(window,"mouseup",mi),setTimeout(jn,20)};At(window,"mouseup",mi)}else setTimeout(jn,50)},Fa.prototype.readOnlyChanged=function(re){re||this.reset(),this.textarea.disabled=re=="nocursor",this.textarea.readOnly=!!re},Fa.prototype.setUneditable=function(){},Fa.prototype.needsContentAttribute=!1;function dm(re,pe){if(pe=pe?zt(pe):{},pe.value=re.value,!pe.tabindex&&re.tabIndex&&(pe.tabindex=re.tabIndex),!pe.placeholder&&re.placeholder&&(pe.placeholder=re.placeholder),pe.autofocus==null){var Fe=at();pe.autofocus=Fe==re||re.getAttribute("autofocus")!=null&&Fe==document.body}function Re(){re.value=Rt.getValue()}var Ue;if(re.form&&(At(re.form,"submit",Re),!pe.leaveSubmitMethodAlone)){var ot=re.form;Ue=ot.submit;try{var wt=ot.submit=function(){Re(),ot.submit=Ue,ot.submit(),ot.submit=wt}}catch(It){}}pe.finishInit=function(It){It.save=Re,It.getTextArea=function(){return re},It.toTextArea=function(){It.toTextArea=isNaN,Re(),re.parentNode.removeChild(It.getWrapperElement()),re.style.display="",re.form&&(pn(re.form,"submit",Re),!pe.leaveSubmitMethodAlone&&typeof re.form.submit=="function"&&(re.form.submit=Ue))}},re.style.display="none";var Rt=ys(function(It){return re.parentNode.insertBefore(It,re.nextSibling)},pe);return Rt}function Yd(re){re.off=pn,re.on=At,re.wheelEventPixels=pi,re.Doc=Ba,re.splitLines=Tr,re.countColumn=lt,re.findColumn=hn,re.isWordChar=Bt,re.Pass=Pt,re.signal=ln,re.Line=Xo,re.changeEnd=er,re.scrollbarModel=Id,re.Pos=nn,re.cmpPos=sn,re.modes=uo,re.mimeModes=po,re.resolveMode=Xn,re.getMode=Ke,re.modeExtensions=qe,re.extendMode=Ye,re.copyState=St,re.startState=Tt,re.innerMode=Ot,re.commands=Va,re.keyMap=Ll,re.keyName=Ud,re.isModifierKey=Lh,re.lookupKey=eu,re.normalizeKeyMap=zd,re.StringStream=_t,re.SharedTextMarker=ac,re.TextMarker=vn,re.LineWidget=Ma,re.e_preventDefault=ai,re.e_stopPropagation=ki,re.e_stop=Ki,re.addClass=Ct,re.contains=ft,re.rmClass=Ae,re.keyNames=Ku}um(ys),Th(ys);var ah="iter insert remove copy getEditor constructor".split(" ");for(var _f in Ba.prototype)Ba.prototype.hasOwnProperty(_f)&&ut(ah,_f)<0&&(ys.prototype[_f]=function(re){return function(){return re.apply(this.doc,arguments)}}(Ba.prototype[_f]));return ni(Ba),ys.inputStyles={textarea:Fa,contenteditable:Qs},ys.defineMode=function(re){!ys.defaults.mode&&re!="null"&&(ys.defaults.mode=re),io.apply(this,arguments)},ys.defineMIME=Do,ys.defineMode("null",function(){return{token:function(re){return re.skipToEnd()}}}),ys.defineMIME("text/plain","null"),ys.defineExtension=function(re,pe){ys.prototype[re]=pe},ys.defineDocExtension=function(re,pe){Ba.prototype[re]=pe},ys.fromTextArea=dm,Yd(ys),ys.version="5.58.2",ys})},25419:function(_n,qt,Ee){(function(Me){Me(Ee(89780),Ee(15525),Ee(98101))})(function(Me){"use strict";Me.defineMode("markdown",function(me,Be){var ke=Me.getMode(me,"text/html"),Ce=ke.name=="null";function Le(lt){if(Me.findModeByName){var tt=Me.findModeByName(lt);tt&&(lt=tt.mime||tt.mimes[0])}var ut=Me.getMode(me,lt);return ut.name=="null"?null:ut}Be.highlightFormatting===void 0&&(Be.highlightFormatting=!1),Be.maxBlockquoteDepth===void 0&&(Be.maxBlockquoteDepth=0),Be.taskLists===void 0&&(Be.taskLists=!1),Be.strikethrough===void 0&&(Be.strikethrough=!1),Be.emoji===void 0&&(Be.emoji=!1),Be.fencedCodeBlockHighlighting===void 0&&(Be.fencedCodeBlockHighlighting=!0),Be.fencedCodeBlockDefaultMode===void 0&&(Be.fencedCodeBlockDefaultMode="text/plain"),Be.xml===void 0&&(Be.xml=!0),Be.tokenTypeOverrides===void 0&&(Be.tokenTypeOverrides={});var he={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 ye in he)he.hasOwnProperty(ye)&&Be.tokenTypeOverrides[ye]&&(he[ye]=Be.tokenTypeOverrides[ye]);var xe=/^([*\-_])(?:\s*\1){2,}\s*$/,ge=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,le=/^\[(x| )\](?=\s)/i,ve=Be.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,de=/^ {0,3}(?:\={1,}|-{2,})\s*$/,ce=/^[^#!\[\]*_\\<>` "'(~:]+/,z=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,ee=/^\s*\[[^\]]+?\]:.*$/,oe=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,ie=" ";function se(lt,tt,ut){return tt.f=tt.inline=ut,ut(lt,tt)}function ue(lt,tt,ut){return tt.f=tt.block=ut,ut(lt,tt)}function Se(lt){return!lt||!/\S/.test(lt.string)}function we(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==Ae){var tt=Ce;if(!tt){var ut=Me.innerMode(ke,lt.htmlState);tt=ut.mode.name=="xml"&&ut.state.tagStart===null&&!ut.state.context&&ut.state.tokenize.isInText}tt&&(lt.f=Xe,lt.block=Pe,lt.htmlState=null)}return lt.trailingSpace=0,lt.trailingSpaceNewLine=!1,lt.prevLine=lt.thisLine,lt.thisLine={stream:null},null}function Pe(lt,tt){var ut=lt.column()===tt.indentation,mt=Se(tt.prevLine.stream),Pt=tt.indentedCode,gt=tt.prevLine.hr,Ft=tt.list!==!1,Ht=(tt.listStack[tt.listStack.length-1]||0)+3;tt.indentedCode=!1;var hn=tt.indentation;if(tt.indentationDiff===null&&(tt.indentationDiff=tt.indentation,Ft)){for(tt.list=null;hn<tt.listStack[tt.listStack.length-1];)tt.listStack.pop(),tt.listStack.length?tt.indentation=tt.listStack[tt.listStack.length-1]:tt.list=!1;tt.list!==!1&&(tt.indentationDiff=hn-tt.listStack[tt.listStack.length-1])}var Jt=!mt&&!gt&&!tt.prevLine.header&&(!Ft||!Pt)&&!tt.prevLine.fencedCodeEnd,bn=(tt.list===!1||gt||mt)&&tt.indentation<=Ht&<.match(xe),Wt=null;if(tt.indentationDiff>=4&&(Pt||tt.prevLine.fencedCodeEnd||tt.prevLine.header||mt))return lt.skipToEnd(),tt.indentedCode=!0,he.code;if(lt.eatSpace())return null;if(ut&&tt.indentation<=Ht&&(Wt=lt.match(ve))&&Wt[1].length<=6)return tt.quote=0,tt.header=Wt[1].length,tt.thisLine.header=!0,Be.highlightFormatting&&(tt.formatting="header"),tt.f=tt.inline,ze(tt);if(tt.indentation<=Ht&<.eat(">"))return tt.quote=ut?1:tt.quote+1,Be.highlightFormatting&&(tt.formatting="quote"),lt.eatSpace(),ze(tt);if(!bn&&!tt.setext&&ut&&tt.indentation<=Ht&&(Wt=lt.match(ge))){var Kt=Wt[1]?"ol":"ul";return tt.indentation=hn+lt.current().length,tt.list=!0,tt.quote=0,tt.listStack.push(tt.indentation),tt.em=!1,tt.strong=!1,tt.code=!1,tt.strikethrough=!1,Be.taskLists&<.match(le,!1)&&(tt.taskList=!0),tt.f=tt.inline,Be.highlightFormatting&&(tt.formatting=["list","list-"+Kt]),ze(tt)}else{if(ut&&tt.indentation<=Ht&&(Wt=lt.match(z,!0)))return tt.quote=0,tt.fencedEndRE=new RegExp(Wt[1]+"+ *$"),tt.localMode=Be.fencedCodeBlockHighlighting&&Le(Wt[2]||Be.fencedCodeBlockDefaultMode),tt.localMode&&(tt.localState=Me.startState(tt.localMode)),tt.f=tt.block=De,Be.highlightFormatting&&(tt.formatting="code-block"),tt.code=-1,ze(tt);if(tt.setext||(!Jt||!Ft)&&!tt.quote&&tt.list===!1&&!tt.code&&!bn&&!ee.test(lt.string)&&(Wt=lt.lookAhead(1))&&(Wt=Wt.match(de)))return tt.setext?(tt.header=tt.setext,tt.setext=0,lt.skipToEnd(),Be.highlightFormatting&&(tt.formatting="header")):(tt.header=Wt[0].charAt(0)=="="?1:2,tt.setext=tt.header),tt.thisLine.header=!0,tt.f=tt.inline,ze(tt);if(bn)return lt.skipToEnd(),tt.hr=!0,tt.thisLine.hr=!0,he.hr;if(lt.peek()==="[")return se(lt,tt,et)}return se(lt,tt,tt.inline)}function Ae(lt,tt){var ut=ke.token(lt,tt.htmlState);if(!Ce){var mt=Me.innerMode(ke,tt.htmlState);(mt.mode.name=="xml"&&mt.state.tagStart===null&&!mt.state.context&&mt.state.tokenize.isInText||tt.md_inside&<.current().indexOf(">")>-1)&&(tt.f=Xe,tt.block=Pe,tt.htmlState=null)}return ut}function De(lt,tt){var ut=tt.listStack[tt.listStack.length-1]||0,mt=tt.indentation<ut,Pt=ut+3;if(tt.fencedEndRE&&tt.indentation<=Pt&&(mt||lt.match(tt.fencedEndRE))){Be.highlightFormatting&&(tt.formatting="code-block");var gt;return mt||(gt=ze(tt)),tt.localMode=tt.localState=null,tt.block=Pe,tt.f=Xe,tt.fencedEndRE=null,tt.code=0,tt.thisLine.fencedCodeEnd=!0,mt?ue(lt,tt,tt.block):gt}else return tt.localMode?tt.localMode.token(lt,tt.localState):(lt.skipToEnd(),he.code)}function ze(lt){var tt=[];if(lt.formatting){tt.push(he.formatting),typeof lt.formatting=="string"&&(lt.formatting=[lt.formatting]);for(var ut=0;ut<lt.formatting.length;ut++)tt.push(he.formatting+"-"+lt.formatting[ut]),lt.formatting[ut]==="header"&&tt.push(he.formatting+"-"+lt.formatting[ut]+"-"+lt.header),lt.formatting[ut]==="quote"&&(!Be.maxBlockquoteDepth||Be.maxBlockquoteDepth>=lt.quote?tt.push(he.formatting+"-"+lt.formatting[ut]+"-"+lt.quote):tt.push("error"))}if(lt.taskOpen)return tt.push("meta"),tt.length?tt.join(" "):null;if(lt.taskClosed)return tt.push("property"),tt.length?tt.join(" "):null;if(lt.linkHref?tt.push(he.linkHref,"url"):(lt.strong&&tt.push(he.strong),lt.em&&tt.push(he.em),lt.strikethrough&&tt.push(he.strikethrough),lt.emoji&&tt.push(he.emoji),lt.linkText&&tt.push(he.linkText),lt.code&&tt.push(he.code),lt.image&&tt.push(he.image),lt.imageAltText&&tt.push(he.imageAltText,"link"),lt.imageMarker&&tt.push(he.imageMarker)),lt.header&&tt.push(he.header,he.header+"-"+lt.header),lt.quote&&(tt.push(he.quote),!Be.maxBlockquoteDepth||Be.maxBlockquoteDepth>=lt.quote?tt.push(he.quote+"-"+lt.quote):tt.push(he.quote+"-"+Be.maxBlockquoteDepth)),lt.list!==!1){var mt=(lt.listStack.length-1)%3;mt?mt===1?tt.push(he.list2):tt.push(he.list3):tt.push(he.list1)}return lt.trailingSpaceNewLine?tt.push("trailing-space-new-line"):lt.trailingSpace&&tt.push("trailing-space-"+(lt.trailingSpace%2?"a":"b")),tt.length?tt.join(" "):null}function Ze(lt,tt){if(lt.match(ce,!0))return ze(tt)}function Xe(lt,tt){var ut=tt.text(lt,tt);if(typeof ut!="undefined")return ut;if(tt.list)return tt.list=null,ze(tt);if(tt.taskList){var mt=lt.match(le,!0)[1]===" ";return mt?tt.taskOpen=!0:tt.taskClosed=!0,Be.highlightFormatting&&(tt.formatting="task"),tt.taskList=!1,ze(tt)}if(tt.taskOpen=!1,tt.taskClosed=!1,tt.header&<.match(/^#+$/,!0))return Be.highlightFormatting&&(tt.formatting="header"),ze(tt);var Pt=lt.next();if(tt.linkTitle){tt.linkTitle=!1;var gt=Pt;Pt==="("&&(gt=")"),gt=(gt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ft="^\\s*(?:[^"+gt+"\\\\]+|\\\\\\\\|\\\\.)"+gt;if(lt.match(new RegExp(Ft),!0))return he.linkHref}if(Pt==="`"){var Ht=tt.formatting;Be.highlightFormatting&&(tt.formatting="code"),lt.eatWhile("`");var hn=lt.current().length;if(tt.code==0&&(!tt.quote||hn==1))return tt.code=hn,ze(tt);if(hn==tt.code){var Jt=ze(tt);return tt.code=0,Jt}else return tt.formatting=Ht,ze(tt)}else if(tt.code)return ze(tt);if(Pt==="\\"&&(lt.next(),Be.highlightFormatting)){var bn=ze(tt),Wt=he.formatting+"-escape";return bn?bn+" "+Wt:Wt}if(Pt==="!"&<.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return tt.imageMarker=!0,tt.image=!0,Be.highlightFormatting&&(tt.formatting="image"),ze(tt);if(Pt==="["&&tt.imageMarker&<.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return tt.imageMarker=!1,tt.imageAltText=!0,Be.highlightFormatting&&(tt.formatting="image"),ze(tt);if(Pt==="]"&&tt.imageAltText){Be.highlightFormatting&&(tt.formatting="image");var bn=ze(tt);return tt.imageAltText=!1,tt.image=!1,tt.inline=tt.f=ft,bn}if(Pt==="["&&!tt.image)return tt.linkText&<.match(/^.*?\]/)||(tt.linkText=!0,Be.highlightFormatting&&(tt.formatting="link")),ze(tt);if(Pt==="]"&&tt.linkText){Be.highlightFormatting&&(tt.formatting="link");var bn=ze(tt);return tt.linkText=!1,tt.inline=tt.f=lt.match(/\(.*?\)| ?\[.*?\]/,!1)?ft:Xe,bn}if(Pt==="<"&<.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){tt.f=tt.inline=Ge,Be.highlightFormatting&&(tt.formatting="link");var bn=ze(tt);return bn?bn+=" ":bn="",bn+he.linkInline}if(Pt==="<"&<.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){tt.f=tt.inline=Ge,Be.highlightFormatting&&(tt.formatting="link");var bn=ze(tt);return bn?bn+=" ":bn="",bn+he.linkEmail}if(Be.xml&&Pt==="<"&<.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Kt=lt.string.indexOf(">",lt.pos);if(Kt!=-1){var Xt=lt.string.substring(lt.start,Kt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Xt)&&(tt.md_inside=!0)}return lt.backUp(1),tt.htmlState=Me.startState(ke),ue(lt,tt,Ae)}if(Be.xml&&Pt==="<"&<.match(/^\/\w*?>/))return tt.md_inside=!1,"tag";if(Pt==="*"||Pt==="_"){for(var $t=1,kt=lt.pos==1?" ":lt.string.charAt(lt.pos-2);$t<3&<.eat(Pt);)$t++;var pt=lt.peek()||" ",Bt=!/\s/.test(pt)&&(!oe.test(pt)||/\s/.test(kt)||oe.test(kt)),xt=!/\s/.test(kt)&&(!oe.test(kt)||/\s/.test(pt)||oe.test(pt)),vt=null,nt=null;if($t%2&&(!tt.em&&Bt&&(Pt==="*"||!xt||oe.test(kt))?vt=!0:tt.em==Pt&&xt&&(Pt==="*"||!Bt||oe.test(pt))&&(vt=!1)),$t>1&&(!tt.strong&&Bt&&(Pt==="*"||!xt||oe.test(kt))?nt=!0:tt.strong==Pt&&xt&&(Pt==="*"||!Bt||oe.test(pt))&&(nt=!1)),nt!=null||vt!=null){Be.highlightFormatting&&(tt.formatting=vt==null?"strong":nt==null?"em":"strong em"),vt===!0&&(tt.em=Pt),nt===!0&&(tt.strong=Pt);var Jt=ze(tt);return vt===!1&&(tt.em=!1),nt===!1&&(tt.strong=!1),Jt}}else if(Pt===" "&&(lt.eat("*")||lt.eat("_"))){if(lt.peek()===" ")return ze(tt);lt.backUp(1)}if(Be.strikethrough){if(Pt==="~"&<.eatWhile(Pt)){if(tt.strikethrough){Be.highlightFormatting&&(tt.formatting="strikethrough");var Jt=ze(tt);return tt.strikethrough=!1,Jt}else if(lt.match(/^[^\s]/,!1))return tt.strikethrough=!0,Be.highlightFormatting&&(tt.formatting="strikethrough"),ze(tt)}else if(Pt===" "&<.match(/^~~/,!0)){if(lt.peek()===" ")return ze(tt);lt.backUp(2)}}if(Be.emoji&&Pt===":"&<.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){tt.emoji=!0,Be.highlightFormatting&&(tt.formatting="emoji");var He=ze(tt);return tt.emoji=!1,He}return Pt===" "&&(lt.match(/^ +$/,!1)?tt.trailingSpace++:tt.trailingSpace&&(tt.trailingSpaceNewLine=!0)),ze(tt)}function Ge(lt,tt){var ut=lt.next();if(ut===">"){tt.f=tt.inline=Xe,Be.highlightFormatting&&(tt.formatting="link");var mt=ze(tt);return mt?mt+=" ":mt="",mt+he.linkInline}return lt.match(/^[^>]+/,!0),he.linkInline}function ft(lt,tt){if(lt.eatSpace())return null;var ut=lt.next();return ut==="("||ut==="["?(tt.f=tt.inline=Ct(ut==="("?")":"]"),Be.highlightFormatting&&(tt.formatting="link-string"),tt.linkHref=!0,ze(tt)):"error"}var at={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ct(lt){return function(tt,ut){var mt=tt.next();if(mt===lt){ut.f=ut.inline=Xe,Be.highlightFormatting&&(ut.formatting="link-string");var Pt=ze(ut);return ut.linkHref=!1,Pt}return tt.match(at[lt]),ut.linkHref=!0,ze(ut)}}function et(lt,tt){return lt.match(/^([^\]\\]|\\.)*\]:/,!1)?(tt.f=yt,lt.next(),Be.highlightFormatting&&(tt.formatting="link"),tt.linkText=!0,ze(tt)):se(lt,tt,Xe)}function yt(lt,tt){if(lt.match(/^\]:/,!0)){tt.f=tt.inline=st,Be.highlightFormatting&&(tt.formatting="link");var ut=ze(tt);return tt.linkText=!1,ut}return lt.match(/^([^\]\\]|\\.)+/,!0),he.linkText}function st(lt,tt){return lt.eatSpace()?null:(lt.match(/^[^\s]+/,!0),lt.peek()===void 0?tt.linkTitle=!0:lt.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),tt.f=tt.inline=Xe,he.linkHref+" url")}var zt={startState:function(){return{f:Pe,prevLine:{stream:null},thisLine:{stream:null},block:Pe,htmlState:null,indentation:0,inline:Xe,text:Ze,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&&Me.copyState(ke,lt.htmlState),indentation:lt.indentation,localMode:lt.localMode,localState:lt.localMode?Me.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,tt){if(tt.formatting=!1,lt!=tt.thisLine.stream){if(tt.header=0,tt.hr=!1,lt.match(/^\s*$/,!0))return we(tt),null;if(tt.prevLine=tt.thisLine,tt.thisLine={stream:lt},tt.taskList=!1,tt.trailingSpace=0,tt.trailingSpaceNewLine=!1,!tt.localState&&(tt.f=tt.block,tt.f!=Ae)){var ut=lt.match(/^\s*/,!0)[0].replace(/\t/g,ie).length;if(tt.indentation=ut,tt.indentationDiff=null,ut>0)return null}}return tt.f(lt,tt)},innerMode:function(lt){return lt.block==Ae?{state:lt.htmlState,mode:ke}:lt.localState?{state:lt.localState,mode:lt.localMode}:{state:lt,mode:zt}},indent:function(lt,tt,ut){return lt.block==Ae&&ke.indent?ke.indent(lt.htmlState,tt,ut):lt.localState&<.localMode.indent?lt.localMode.indent(lt.localState,tt,ut):Me.Pass},blankLine:we,getType:ze,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return zt},"xml"),Me.defineMIME("text/markdown","markdown"),Me.defineMIME("text/x-markdown","markdown")})},98101:function(_n,qt,Ee){(function(Me){Me(Ee(89780))})(function(Me){"use strict";Me.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 me=0;me<Me.modeInfo.length;me++){var Be=Me.modeInfo[me];Be.mimes&&(Be.mime=Be.mimes[0])}Me.findModeByMIME=function(ke){ke=ke.toLowerCase();for(var Ce=0;Ce<Me.modeInfo.length;Ce++){var Le=Me.modeInfo[Ce];if(Le.mime==ke)return Le;if(Le.mimes){for(var he=0;he<Le.mimes.length;he++)if(Le.mimes[he]==ke)return Le}}if(/\+xml$/.test(ke))return Me.findModeByMIME("application/xml");if(/\+json$/.test(ke))return Me.findModeByMIME("application/json")},Me.findModeByExtension=function(ke){ke=ke.toLowerCase();for(var Ce=0;Ce<Me.modeInfo.length;Ce++){var Le=Me.modeInfo[Ce];if(Le.ext){for(var he=0;he<Le.ext.length;he++)if(Le.ext[he]==ke)return Le}}},Me.findModeByFileName=function(ke){for(var Ce=0;Ce<Me.modeInfo.length;Ce++){var Le=Me.modeInfo[Ce];if(Le.file&&Le.file.test(ke))return Le}var he=ke.lastIndexOf("."),ye=he>-1&&ke.substring(he+1,ke.length);if(ye)return Me.findModeByExtension(ye)},Me.findModeByName=function(ke){ke=ke.toLowerCase();for(var Ce=0;Ce<Me.modeInfo.length;Ce++){var Le=Me.modeInfo[Ce];if(Le.name.toLowerCase()==ke)return Le;if(Le.alias){for(var he=0;he<Le.alias.length;he++)if(Le.alias[he].toLowerCase()==ke)return Le}}}})},67549:function(_n,qt,Ee){(function(Me){Me(Ee(89780))})(function(Me){"use strict";Me.defineMode("stex",function(me,Be){"use strict";function ke(ce,z){ce.cmdState.push(z)}function Ce(ce){return ce.cmdState.length>0?ce.cmdState[ce.cmdState.length-1]:null}function Le(ce){var z=ce.cmdState.pop();z&&z.closeBracket()}function he(ce){for(var z=ce.cmdState,ee=z.length-1;ee>=0;ee--){var oe=z[ee];if(oe.name!="DEFAULT")return oe}return{styleIdentifier:function(){return null}}}function ye(ce,z,ee){return function(){this.name=ce,this.bracketNo=0,this.style=z,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 xe={};xe.importmodule=ye("importmodule","tag",["string","builtin"]),xe.documentclass=ye("documentclass","tag",["","atom"]),xe.usepackage=ye("usepackage","tag",["atom"]),xe.begin=ye("begin","tag",["atom"]),xe.end=ye("end","tag",["atom"]),xe.label=ye("label","tag",["atom"]),xe.ref=ye("ref","tag",["atom"]),xe.eqref=ye("eqref","tag",["atom"]),xe.cite=ye("cite","tag",["atom"]),xe.bibitem=ye("bibitem","tag",["atom"]),xe.Bibitem=ye("Bibitem","tag",["atom"]),xe.RBibitem=ye("RBibitem","tag",["atom"]),xe.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function ge(ce,z){ce.f=z}function le(ce,z){var ee;if(ce.match(/^\\[a-zA-Z@]+/)){var oe=ce.current().slice(1);return ee=xe.hasOwnProperty(oe)?xe[oe]:xe.DEFAULT,ee=new ee,ke(z,ee),ge(z,de),ee.style}if(ce.match(/^\\[$&%#{}_]/)||ce.match(/^\\[,;!\/\\]/))return"tag";if(ce.match("\\["))return ge(z,function(se,ue){return ve(se,ue,"\\]")}),"keyword";if(ce.match("\\("))return ge(z,function(se,ue){return ve(se,ue,"\\)")}),"keyword";if(ce.match("$$"))return ge(z,function(se,ue){return ve(se,ue,"$$")}),"keyword";if(ce.match("$"))return ge(z,function(se,ue){return ve(se,ue,"$")}),"keyword";var ie=ce.next();if(ie=="%")return ce.skipToEnd(),"comment";if(ie=="}"||ie=="]"){if(ee=Ce(z),ee)ee.closeBracket(ie),ge(z,de);else return"error";return"bracket"}else return ie=="{"||ie=="["?(ee=xe.DEFAULT,ee=new ee,ke(z,ee),"bracket"):/\d/.test(ie)?(ce.eatWhile(/[\w.%]/),"atom"):(ce.eatWhile(/[\w\-_]/),ee=he(z),ee.name=="begin"&&(ee.argument=ce.current()),ee.styleIdentifier())}function ve(ce,z,ee){if(ce.eatSpace())return null;if(ee&&ce.match(ee))return ge(z,le),"keyword";if(ce.match(/^\\[a-zA-Z@]+/))return"tag";if(ce.match(/^[a-zA-Z]+/))return"variable-2";if(ce.match(/^\\[$&%#{}_]/)||ce.match(/^\\[,;!\/]/)||ce.match(/^[\^_&]/))return"tag";if(ce.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(ce.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var oe=ce.next();return oe=="{"||oe=="}"||oe=="["||oe=="]"||oe=="("||oe==")"?"bracket":oe=="%"?(ce.skipToEnd(),"comment"):"error"}function de(ce,z){var ee=ce.peek(),oe;return ee=="{"||ee=="["?(oe=Ce(z),oe.openBracket(ee),ce.eat(ee),ge(z,le),"bracket"):/[ \t\r]/.test(ee)?(ce.eat(ee),null):(ge(z,le),Le(z),le(ce,z))}return{startState:function(){var ce=Be.inMathMode?function(z,ee){return ve(z,ee)}:le;return{cmdState:[],f:ce}},copyState:function(ce){return{cmdState:ce.cmdState.slice(),f:ce.f}},token:function(ce,z){return z.f(ce,z)},blankLine:function(ce){ce.f=le,ce.cmdState.length=0},lineComment:"%"}}),Me.defineMIME("text/x-stex","stex"),Me.defineMIME("text/x-latex","stex")})},15525:function(_n,qt,Ee){(function(Me){Me(Ee(89780))})(function(Me){"use strict";var me={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},Be={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};Me.defineMode("xml",function(ke,Ce){var Le=ke.indentUnit,he={},ye=Ce.htmlMode?me:Be;for(var xe in ye)he[xe]=ye[xe];for(var xe in Ce)he[xe]=Ce[xe];var ge,le;function ve(Ge,ft){function at(yt){return ft.tokenize=yt,yt(Ge,ft)}var Ct=Ge.next();if(Ct=="<")return Ge.eat("!")?Ge.eat("[")?Ge.match("CDATA[")?at(z("atom","]]>")):null:Ge.match("--")?at(z("comment","-->")):Ge.match("DOCTYPE",!0,!0)?(Ge.eatWhile(/[\w\._\-]/),at(ee(1))):null:Ge.eat("?")?(Ge.eatWhile(/[\w\._\-]/),ft.tokenize=z("meta","?>"),"meta"):(ge=Ge.eat("/")?"closeTag":"openTag",ft.tokenize=de,"tag bracket");if(Ct=="&"){var et;return Ge.eat("#")?Ge.eat("x")?et=Ge.eatWhile(/[a-fA-F\d]/)&&Ge.eat(";"):et=Ge.eatWhile(/[\d]/)&&Ge.eat(";"):et=Ge.eatWhile(/[\w\.\-:]/)&&Ge.eat(";"),et?"atom":"error"}else return Ge.eatWhile(/[^&<]/),null}ve.isInText=!0;function de(Ge,ft){var at=Ge.next();if(at==">"||at=="/"&&Ge.eat(">"))return ft.tokenize=ve,ge=at==">"?"endTag":"selfcloseTag","tag bracket";if(at=="=")return ge="equals",null;if(at=="<"){ft.tokenize=ve,ft.state=ue,ft.tagName=ft.tagStart=null;var Ct=ft.tokenize(Ge,ft);return Ct?Ct+" tag error":"tag error"}else return/[\'\"]/.test(at)?(ft.tokenize=ce(at),ft.stringStartCol=Ge.column(),ft.tokenize(Ge,ft)):(Ge.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ce(Ge){var ft=function(at,Ct){for(;!at.eol();)if(at.next()==Ge){Ct.tokenize=de;break}return"string"};return ft.isInAttribute=!0,ft}function z(Ge,ft){return function(at,Ct){for(;!at.eol();){if(at.match(ft)){Ct.tokenize=ve;break}at.next()}return Ge}}function ee(Ge){return function(ft,at){for(var Ct;(Ct=ft.next())!=null;){if(Ct=="<")return at.tokenize=ee(Ge+1),at.tokenize(ft,at);if(Ct==">")if(Ge==1){at.tokenize=ve;break}else return at.tokenize=ee(Ge-1),at.tokenize(ft,at)}return"meta"}}function oe(Ge,ft,at){this.prev=Ge.context,this.tagName=ft,this.indent=Ge.indented,this.startOfLine=at,(he.doNotIndent.hasOwnProperty(ft)||Ge.context&&Ge.context.noIndent)&&(this.noIndent=!0)}function ie(Ge){Ge.context&&(Ge.context=Ge.context.prev)}function se(Ge,ft){for(var at;;){if(!Ge.context||(at=Ge.context.tagName,!he.contextGrabbers.hasOwnProperty(at)||!he.contextGrabbers[at].hasOwnProperty(ft)))return;ie(Ge)}}function ue(Ge,ft,at){return Ge=="openTag"?(at.tagStart=ft.column(),Se):Ge=="closeTag"?we:ue}function Se(Ge,ft,at){return Ge=="word"?(at.tagName=ft.current(),le="tag",De):he.allowMissingTagName&&Ge=="endTag"?(le="tag bracket",De(Ge,ft,at)):(le="error",Se)}function we(Ge,ft,at){if(Ge=="word"){var Ct=ft.current();return at.context&&at.context.tagName!=Ct&&he.implicitlyClosed.hasOwnProperty(at.context.tagName)&&ie(at),at.context&&at.context.tagName==Ct||he.matchClosing===!1?(le="tag",Pe):(le="tag error",Ae)}else return he.allowMissingTagName&&Ge=="endTag"?(le="tag bracket",Pe(Ge,ft,at)):(le="error",Ae)}function Pe(Ge,ft,at){return Ge!="endTag"?(le="error",Pe):(ie(at),ue)}function Ae(Ge,ft,at){return le="error",Pe(Ge,ft,at)}function De(Ge,ft,at){if(Ge=="word")return le="attribute",ze;if(Ge=="endTag"||Ge=="selfcloseTag"){var Ct=at.tagName,et=at.tagStart;return at.tagName=at.tagStart=null,Ge=="selfcloseTag"||he.autoSelfClosers.hasOwnProperty(Ct)?se(at,Ct):(se(at,Ct),at.context=new oe(at,Ct,et==at.indented)),ue}return le="error",De}function ze(Ge,ft,at){return Ge=="equals"?Ze:(he.allowMissing||(le="error"),De(Ge,ft,at))}function Ze(Ge,ft,at){return Ge=="string"?Xe:Ge=="word"&&he.allowUnquoted?(le="string",De):(le="error",De(Ge,ft,at))}function Xe(Ge,ft,at){return Ge=="string"?Xe:De(Ge,ft,at)}return{startState:function(Ge){var ft={tokenize:ve,state:ue,indented:Ge||0,tagName:null,tagStart:null,context:null};return Ge!=null&&(ft.baseIndent=Ge),ft},token:function(Ge,ft){if(!ft.tagName&&Ge.sol()&&(ft.indented=Ge.indentation()),Ge.eatSpace())return null;ge=null;var at=ft.tokenize(Ge,ft);return(at||ge)&&at!="comment"&&(le=null,ft.state=ft.state(ge||at,Ge,ft),le&&(at=le=="error"?at+" error":le)),at},indent:function(Ge,ft,at){var Ct=Ge.context;if(Ge.tokenize.isInAttribute)return Ge.tagStart==Ge.indented?Ge.stringStartCol+1:Ge.indented+Le;if(Ct&&Ct.noIndent)return Me.Pass;if(Ge.tokenize!=de&&Ge.tokenize!=ve)return at?at.match(/^(\s*)/)[0].length:0;if(Ge.tagName)return he.multilineTagIndentPastTag!==!1?Ge.tagStart+Ge.tagName.length+2:Ge.tagStart+Le*(he.multilineTagIndentFactor||1);if(he.alignCDATA&&/<!\[CDATA\[/.test(ft))return 0;var et=ft&&/^<(\/)?([\w_:\.-]*)/.exec(ft);if(et&&et[1])for(;Ct;)if(Ct.tagName==et[2]){Ct=Ct.prev;break}else if(he.implicitlyClosed.hasOwnProperty(Ct.tagName))Ct=Ct.prev;else break;else if(et)for(;Ct;){var yt=he.contextGrabbers[Ct.tagName];if(yt&&yt.hasOwnProperty(et[2]))Ct=Ct.prev;else break}for(;Ct&&Ct.prev&&!Ct.startOfLine;)Ct=Ct.prev;return Ct?Ct.indent+Le:Ge.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:he.htmlMode?"html":"xml",helperType:he.htmlMode?"html":"xml",skipAttribute:function(Ge){Ge.state==Ze&&(Ge.state=De)},xmlCurrentTag:function(Ge){return Ge.tagName?{name:Ge.tagName,close:Ge.type=="closeTag"}:null},xmlCurrentContext:function(Ge){for(var ft=[],at=Ge.context;at;at=at.prev)at.tagName&&ft.push(at.tagName);return ft.reverse()}}}),Me.defineMIME("text/xml","xml"),Me.defineMIME("application/xml","xml"),Me.mimeModes.hasOwnProperty("text/html")||Me.defineMIME("text/html",{name:"xml",htmlMode:!0})})},3867:function(_n,qt,Ee){var Me=Ee(97671);(function(me,Be){_n.exports=Be()})(this,function(){"use strict";function me(Ie){var We=typeof Ie;return Ie!==null&&(We==="object"||We==="function")}function Be(Ie){return typeof Ie=="function"}var ke=void 0;Array.isArray?ke=Array.isArray:ke=function(Ie){return Object.prototype.toString.call(Ie)==="[object Array]"};var Ce=ke,Le=0,he=void 0,ye=void 0,xe=function(We,Oe){we[Le]=We,we[Le+1]=Oe,Le+=2,Le===2&&(ye?ye(Pe):De())};function ge(Ie){ye=Ie}function le(Ie){xe=Ie}var ve=typeof window!="undefined"?window:void 0,de=ve||{},ce=de.MutationObserver||de.WebKitMutationObserver,z=typeof self=="undefined"&&typeof Me!="undefined"&&{}.toString.call(Me)==="[object process]",ee=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function oe(){return function(){return Me.nextTick(Pe)}}function ie(){return typeof he!="undefined"?function(){he(Pe)}:Se()}function se(){var Ie=0,We=new ce(Pe),Oe=document.createTextNode("");return We.observe(Oe,{characterData:!0}),function(){Oe.data=Ie=++Ie%2}}function ue(){var Ie=new MessageChannel;return Ie.port1.onmessage=Pe,function(){return Ie.port2.postMessage(0)}}function Se(){var Ie=setTimeout;return function(){return Ie(Pe,1)}}var we=new Array(1e3);function Pe(){for(var Ie=0;Ie<Le;Ie+=2){var We=we[Ie],Oe=we[Ie+1];We(Oe),we[Ie]=void 0,we[Ie+1]=void 0}Le=0}function Ae(){try{var Ie=Function("return this")().require("vertx");return he=Ie.runOnLoop||Ie.runOnContext,ie()}catch(We){return Se()}}var De=void 0;z?De=oe():ce?De=se():ee?De=ue():ve===void 0?De=Ae():De=Se();function ze(Ie,We){var Oe=this,be=new this.constructor(Ge);be[Xe]===void 0&&Kt(be);var Ne=Oe._state;if(Ne){var $e=arguments[Ne-1];xe(function(){return hn(Ne,be,$e,Oe._result)})}else Ft(Oe,be,Ie,We);return be}function Ze(Ie){var We=this;if(Ie&&typeof Ie=="object"&&Ie.constructor===We)return Ie;var Oe=new We(Ge);return ut(Oe,Ie),Oe}var Xe=Math.random().toString(36).substring(2);function Ge(){}var ft=void 0,at=1,Ct=2;function et(){return new TypeError("You cannot resolve a promise with itself")}function yt(){return new TypeError("A promises callback cannot return that same promise.")}function st(Ie,We,Oe,be){try{Ie.call(We,Oe,be)}catch(Ne){return Ne}}function zt(Ie,We,Oe){xe(function(be){var Ne=!1,$e=st(Oe,We,function(dt){Ne||(Ne=!0,We!==dt?ut(be,dt):Pt(be,dt))},function(dt){Ne||(Ne=!0,gt(be,dt))},"Settle: "+(be._label||" unknown promise"));!Ne&&$e&&(Ne=!0,gt(be,$e))},Ie)}function lt(Ie,We){We._state===at?Pt(Ie,We._result):We._state===Ct?gt(Ie,We._result):Ft(We,void 0,function(Oe){return ut(Ie,Oe)},function(Oe){return gt(Ie,Oe)})}function tt(Ie,We,Oe){We.constructor===Ie.constructor&&Oe===ze&&We.constructor.resolve===Ze?lt(Ie,We):Oe===void 0?Pt(Ie,We):Be(Oe)?zt(Ie,We,Oe):Pt(Ie,We)}function ut(Ie,We){if(Ie===We)gt(Ie,et());else if(me(We)){var Oe=void 0;try{Oe=We.then}catch(be){gt(Ie,be);return}tt(Ie,We,Oe)}else Pt(Ie,We)}function mt(Ie){Ie._onerror&&Ie._onerror(Ie._result),Ht(Ie)}function Pt(Ie,We){Ie._state===ft&&(Ie._result=We,Ie._state=at,Ie._subscribers.length!==0&&xe(Ht,Ie))}function gt(Ie,We){Ie._state===ft&&(Ie._state=Ct,Ie._result=We,xe(mt,Ie))}function Ft(Ie,We,Oe,be){var Ne=Ie._subscribers,$e=Ne.length;Ie._onerror=null,Ne[$e]=We,Ne[$e+at]=Oe,Ne[$e+Ct]=be,$e===0&&Ie._state&&xe(Ht,Ie)}function Ht(Ie){var We=Ie._subscribers,Oe=Ie._state;if(We.length!==0){for(var be=void 0,Ne=void 0,$e=Ie._result,dt=0;dt<We.length;dt+=3)be=We[dt],Ne=We[dt+Oe],be?hn(Oe,be,Ne,$e):Ne($e);Ie._subscribers.length=0}}function hn(Ie,We,Oe,be){var Ne=Be(Oe),$e=void 0,dt=void 0,Je=!0;if(Ne){try{$e=Oe(be)}catch(At){Je=!1,dt=At}if(We===$e){gt(We,yt());return}}else $e=be;We._state!==ft||(Ne&&Je?ut(We,$e):Je===!1?gt(We,dt):Ie===at?Pt(We,$e):Ie===Ct&>(We,$e))}function Jt(Ie,We){try{We(function(be){ut(Ie,be)},function(be){gt(Ie,be)})}catch(Oe){gt(Ie,Oe)}}var bn=0;function Wt(){return bn++}function Kt(Ie){Ie[Xe]=bn++,Ie._state=void 0,Ie._result=void 0,Ie._subscribers=[]}function Xt(){return new Error("Array Methods must be provided an Array")}var $t=function(){function Ie(We,Oe){this._instanceConstructor=We,this.promise=new We(Ge),this.promise[Xe]||Kt(this.promise),Ce(Oe)?(this.length=Oe.length,this._remaining=Oe.length,this._result=new Array(this.length),this.length===0?Pt(this.promise,this._result):(this.length=this.length||0,this._enumerate(Oe),this._remaining===0&&Pt(this.promise,this._result))):gt(this.promise,Xt())}return Ie.prototype._enumerate=function(Oe){for(var be=0;this._state===ft&&be<Oe.length;be++)this._eachEntry(Oe[be],be)},Ie.prototype._eachEntry=function(Oe,be){var Ne=this._instanceConstructor,$e=Ne.resolve;if($e===Ze){var dt=void 0,Je=void 0,At=!1;try{dt=Oe.then}catch(pn){At=!0,Je=pn}if(dt===ze&&Oe._state!==ft)this._settledAt(Oe._state,be,Oe._result);else if(typeof dt!="function")this._remaining--,this._result[be]=Oe;else if(Ne===nt){var en=new Ne(Ge);At?gt(en,Je):tt(en,Oe,dt),this._willSettleAt(en,be)}else this._willSettleAt(new Ne(function(pn){return pn(Oe)}),be)}else this._willSettleAt($e(Oe),be)},Ie.prototype._settledAt=function(Oe,be,Ne){var $e=this.promise;$e._state===ft&&(this._remaining--,Oe===Ct?gt($e,Ne):this._result[be]=Ne),this._remaining===0&&Pt($e,this._result)},Ie.prototype._willSettleAt=function(Oe,be){var Ne=this;Ft(Oe,void 0,function($e){return Ne._settledAt(at,be,$e)},function($e){return Ne._settledAt(Ct,be,$e)})},Ie}();function kt(Ie){return new $t(this,Ie).promise}function pt(Ie){var We=this;return Ce(Ie)?new We(function(Oe,be){for(var Ne=Ie.length,$e=0;$e<Ne;$e++)We.resolve(Ie[$e]).then(Oe,be)}):new We(function(Oe,be){return be(new TypeError("You must pass an array to race."))})}function Bt(Ie){var We=this,Oe=new We(Ge);return gt(Oe,Ie),Oe}function xt(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function vt(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var nt=function(){function Ie(We){this[Xe]=Wt(),this._result=this._state=void 0,this._subscribers=[],Ge!==We&&(typeof We!="function"&&xt(),this instanceof Ie?Jt(this,We):vt())}return Ie.prototype.catch=function(Oe){return this.then(null,Oe)},Ie.prototype.finally=function(Oe){var be=this,Ne=be.constructor;return Be(Oe)?be.then(function($e){return Ne.resolve(Oe()).then(function(){return $e})},function($e){return Ne.resolve(Oe()).then(function(){throw $e})}):be.then(Oe,Oe)},Ie}();nt.prototype.then=ze,nt.all=kt,nt.race=pt,nt.resolve=Ze,nt.reject=Bt,nt._setScheduler=ge,nt._setAsap=le,nt._asap=xe;function He(){var Ie=void 0;if(typeof Ee.g!="undefined")Ie=Ee.g;else if(typeof self!="undefined")Ie=self;else try{Ie=Function("return this")()}catch(be){throw new Error("polyfill failed because global object is unavailable in this environment")}var We=Ie.Promise;if(We){var Oe=null;try{Oe=Object.prototype.toString.call(We.resolve())}catch(be){}if(Oe==="[object Promise]"&&!We.cast)return}Ie.Promise=nt}return nt.polyfill=He,nt.Promise=nt,nt})},86204:function(_n){"use strict";var qt=typeof Reflect=="object"?Reflect:null,Ee=qt&&typeof qt.apply=="function"?qt.apply:function(ue,Se,we){return Function.prototype.apply.call(ue,Se,we)},Me;qt&&typeof qt.ownKeys=="function"?Me=qt.ownKeys:Object.getOwnPropertySymbols?Me=function(ue){return Object.getOwnPropertyNames(ue).concat(Object.getOwnPropertySymbols(ue))}:Me=function(ue){return Object.getOwnPropertyNames(ue)};function me(se){console&&console.warn&&console.warn(se)}var Be=Number.isNaN||function(ue){return ue!==ue};function ke(){ke.init.call(this)}_n.exports=ke,_n.exports.once=ee,ke.EventEmitter=ke,ke.prototype._events=void 0,ke.prototype._eventsCount=0,ke.prototype._maxListeners=void 0;var Ce=10;function Le(se){if(typeof se!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof se)}Object.defineProperty(ke,"defaultMaxListeners",{enumerable:!0,get:function(){return Ce},set:function(se){if(typeof se!="number"||se<0||Be(se))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+se+".");Ce=se}}),ke.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},ke.prototype.setMaxListeners=function(ue){if(typeof ue!="number"||ue<0||Be(ue))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+ue+".");return this._maxListeners=ue,this};function he(se){return se._maxListeners===void 0?ke.defaultMaxListeners:se._maxListeners}ke.prototype.getMaxListeners=function(){return he(this)},ke.prototype.emit=function(ue){for(var Se=[],we=1;we<arguments.length;we++)Se.push(arguments[we]);var Pe=ue==="error",Ae=this._events;if(Ae!==void 0)Pe=Pe&&Ae.error===void 0;else if(!Pe)return!1;if(Pe){var De;if(Se.length>0&&(De=Se[0]),De instanceof Error)throw De;var ze=new Error("Unhandled error."+(De?" ("+De.message+")":""));throw ze.context=De,ze}var Ze=Ae[ue];if(Ze===void 0)return!1;if(typeof Ze=="function")Ee(Ze,this,Se);else for(var Xe=Ze.length,Ge=de(Ze,Xe),we=0;we<Xe;++we)Ee(Ge[we],this,Se);return!0};function ye(se,ue,Se,we){var Pe,Ae,De;if(Le(Se),Ae=se._events,Ae===void 0?(Ae=se._events=Object.create(null),se._eventsCount=0):(Ae.newListener!==void 0&&(se.emit("newListener",ue,Se.listener?Se.listener:Se),Ae=se._events),De=Ae[ue]),De===void 0)De=Ae[ue]=Se,++se._eventsCount;else if(typeof De=="function"?De=Ae[ue]=we?[Se,De]:[De,Se]:we?De.unshift(Se):De.push(Se),Pe=he(se),Pe>0&&De.length>Pe&&!De.warned){De.warned=!0;var ze=new Error("Possible EventEmitter memory leak detected. "+De.length+" "+String(ue)+" listeners added. Use emitter.setMaxListeners() to increase limit");ze.name="MaxListenersExceededWarning",ze.emitter=se,ze.type=ue,ze.count=De.length,me(ze)}return se}ke.prototype.addListener=function(ue,Se){return ye(this,ue,Se,!1)},ke.prototype.on=ke.prototype.addListener,ke.prototype.prependListener=function(ue,Se){return ye(this,ue,Se,!0)};function xe(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function ge(se,ue,Se){var we={fired:!1,wrapFn:void 0,target:se,type:ue,listener:Se},Pe=xe.bind(we);return Pe.listener=Se,we.wrapFn=Pe,Pe}ke.prototype.once=function(ue,Se){return Le(Se),this.on(ue,ge(this,ue,Se)),this},ke.prototype.prependOnceListener=function(ue,Se){return Le(Se),this.prependListener(ue,ge(this,ue,Se)),this},ke.prototype.removeListener=function(ue,Se){var we,Pe,Ae,De,ze;if(Le(Se),Pe=this._events,Pe===void 0)return this;if(we=Pe[ue],we===void 0)return this;if(we===Se||we.listener===Se)--this._eventsCount===0?this._events=Object.create(null):(delete Pe[ue],Pe.removeListener&&this.emit("removeListener",ue,we.listener||Se));else if(typeof we!="function"){for(Ae=-1,De=we.length-1;De>=0;De--)if(we[De]===Se||we[De].listener===Se){ze=we[De].listener,Ae=De;break}if(Ae<0)return this;Ae===0?we.shift():ce(we,Ae),we.length===1&&(Pe[ue]=we[0]),Pe.removeListener!==void 0&&this.emit("removeListener",ue,ze||Se)}return this},ke.prototype.off=ke.prototype.removeListener,ke.prototype.removeAllListeners=function(ue){var Se,we,Pe;if(we=this._events,we===void 0)return this;if(we.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):we[ue]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete we[ue]),this;if(arguments.length===0){var Ae=Object.keys(we),De;for(Pe=0;Pe<Ae.length;++Pe)De=Ae[Pe],De!=="removeListener"&&this.removeAllListeners(De);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(Se=we[ue],typeof Se=="function")this.removeListener(ue,Se);else if(Se!==void 0)for(Pe=Se.length-1;Pe>=0;Pe--)this.removeListener(ue,Se[Pe]);return this};function le(se,ue,Se){var we=se._events;if(we===void 0)return[];var Pe=we[ue];return Pe===void 0?[]:typeof Pe=="function"?Se?[Pe.listener||Pe]:[Pe]:Se?z(Pe):de(Pe,Pe.length)}ke.prototype.listeners=function(ue){return le(this,ue,!0)},ke.prototype.rawListeners=function(ue){return le(this,ue,!1)},ke.listenerCount=function(se,ue){return typeof se.listenerCount=="function"?se.listenerCount(ue):ve.call(se,ue)},ke.prototype.listenerCount=ve;function ve(se){var ue=this._events;if(ue!==void 0){var Se=ue[se];if(typeof Se=="function")return 1;if(Se!==void 0)return Se.length}return 0}ke.prototype.eventNames=function(){return this._eventsCount>0?Me(this._events):[]};function de(se,ue){for(var Se=new Array(ue),we=0;we<ue;++we)Se[we]=se[we];return Se}function ce(se,ue){for(;ue+1<se.length;ue++)se[ue]=se[ue+1];se.pop()}function z(se){for(var ue=new Array(se.length),Se=0;Se<ue.length;++Se)ue[Se]=se[Se].listener||se[Se];return ue}function ee(se,ue){return new Promise(function(Se,we){function Pe(De){se.removeListener(ue,Ae),we(De)}function Ae(){typeof se.removeListener=="function"&&se.removeListener("error",Pe),Se([].slice.call(arguments))}ie(se,ue,Ae,{once:!0}),ue!=="error"&&oe(se,Pe,{once:!0})})}function oe(se,ue,Se){typeof se.on=="function"&&ie(se,"error",ue,Se)}function ie(se,ue,Se,we){if(typeof se.on=="function")we.once?se.once(ue,Se):se.on(ue,Se);else if(typeof se.addEventListener=="function")se.addEventListener(ue,function Pe(Ae){we.once&&se.removeEventListener(ue,Pe),Se(Ae)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof se)}},12378:function(_n,qt,Ee){"use strict";Ee.d(qt,{$u:function(){return xe},BD:function(){return $t},E9:function(){return ye},FF:function(){return Fr},FJ:function(){return ue},Hn:function(){return se},KX:function(){return we},NB:function(){return Oe},S0:function(){return Wt},UL:function(){return ge},Vk:function(){return ie},Vm:function(){return Ne},YI:function(){return Kt},ZA:function(){return Be},Zt:function(){return le},al:function(){return vt},bn:function(){return xt},bx:function(){return kt},g2:function(){return Xt},h1:function(){return Ze},hD:function(){return ni},l4:function(){return Le},rU:function(){return be},s_:function(){return pt},uz:function(){return We},z6:function(){return ve}}),_n=Ee.hmd(_n),function(){var it;function Rr(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Or(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Rr(a)}}function Ur(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var uo=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},po;if(typeof Object.setPrototypeOf=="function")po=Object.setPrototypeOf;else{var io;e:{var Do={a:!0},Xn={};try{Xn.__proto__=Do,io=Xn.a;break e}catch(a){}io=!1}po=io?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Ke=po;function qe(a,y){if(a.prototype=uo(y.prototype),a.prototype.constructor=a,Ke)Ke(a,y);else for(var x in y)if(x!="prototype")if(Object.defineProperties){var b=Object.getOwnPropertyDescriptor(y,x);b&&Object.defineProperty(a,x,b)}else a[x]=y[x];a.QA=y.prototype}var Ye=typeof Ee.g!="undefined"&&Ee.g!=null?Ee.g:self,St=typeof Object.assign=="function"?Object.assign:function(a,y){for(var x=1;x<arguments.length;x++){var b=arguments[x];if(b)for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(a[E]=b[E])}return a},Ot=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function Tt(a,y){if(y){var x=Ye;a=a.split(".");for(var b=0;b<a.length-1;b++){var E=a[b];E in x||(x[E]={}),x=x[E]}a=a[a.length-1],b=x[a],y=y(b),y!=b&&y!=null&&Ot(x,a,{writable:!0,value:y})}}Tt("Object.assign",function(a){return a||St}),Tt("Array.prototype.fill",function(a){return a||function(y,x,b){var E=this.length||0;for(0>x&&(x=Math.max(0,E+x)),(b==null||b>E)&&(b=E),b=Number(b),0>b&&(b=Math.max(0,E+b)),x=Number(x||0);x<b;x++)this[x]=y;return this}});var _t=typeof globalThis=="object"&&globalThis||typeof Ee.g=="object"&&Ee.g.global===Ee.g&&Ee.g||typeof self=="object"&&self.self===self&&self||{};_t.requestAnimationFrame===void 0&&(_t.setImmediate===void 0?_t.requestAnimationFrame=function(a){_t.setTimeout(a,0)}:_t.requestAnimationFrame=_t.setImmediate);function dn(){}function Pn(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&_t.clearTimeout(x),x=mn(function(){x=-1,a.apply(b,E)},y)}}function mn(a,y){return _t.setTimeout(a,y)}function on(a){return _t.document.createElement(a)}function Nt(a){throw Error(a)}function un(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Nt(a)}function Mn(a,y,x,b){x=x===null?"*":typeof x=="string"?x:typeof x=="function"&&typeof x.className=="string"?x.className:"",b!==void 0&&(x+="."+b),Nt(x+" is not in the range "+y+": "+a)}function Dn(a){_t.console&&_t.console.log(a)}function nn(a){return typeof a=="object"&&a!==null}function sn(a){return Array.isArray(a)||_t.NodeList&&a instanceof _t.NodeList||_t.HTMLCollection&&a instanceof _t.HTMLCollection}function Nn(a){return Array.prototype.slice.call(a)}function On(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Nt("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function qn(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Nt("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Hn(){var a=mr.pop();return a===void 0?[]:a}function ei(a){a.length=0,mr.push(a)}function Fn(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(nn(a)&&a.constructor)return Fn(a.constructor);return typeof a}function hi(a){var y=a;return nn(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 Di(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 Ri(a,y,x){Object.defineProperty(Wo.prototype,a,{get:y,set:x})}function En(a){for(var y=[],x=0;256>x;x++)y["0123456789abcdef".charAt(x>>4)+"0123456789abcdef".charAt(x&15)]=String.fromCharCode(x);a.length%2&&(a="0"+a),x=[];for(var b=0,E=0;E<a.length;E+=2)x[b++]=y[a.substr(E,2)];for(a=x.join(""),a=a===""?"0":a,y=[],x=0;256>x;x++)y[x]=x;for(x=b=0;256>x;x++)b=(b+y[x]+119)%256,E=y[x],y[x]=y[b],y[b]=E;b=x=0;for(var te="",ne=0;ne<a.length;ne++)x=(x+1)%256,b=(b+y[x])%256,E=y[x],y[x]=y[b],y[b]=E,te+=String.fromCharCode(a.charCodeAt(ne)^y[(y[x]+y[b])%256]);return te.indexOf("GoJS 2.1 evaluation")>-1||te.indexOf("\xA9 1998-2021 Northwoods Software")>-1||te.indexOf("Not for distribution or production use")>-1||te.indexOf("gojs.net")>-1?"":te}var $i=_t.navigator!==void 0&&0<_t.navigator.userAgent.indexOf("Trident/7"),Cr=_t.navigator!==void 0&&_t.navigator.platform!==void 0&&_t.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,mr=[];Object.freeze([]),dn.className="Util",dn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",dn.adym="gojs.net",dn.vfo="28e645fdb266",dn.className="Util";function Ln(a,y,x){pr(this),this.j=a,this.xa=y,this.o=x}Ln.prototype.toString=function(){return"EnumValue."+this.xa};function Jn(a,y){return y==null||y===""?null:a[y]}Ye.Object.defineProperties(Ln.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),Ln.className="EnumValue";function ui(){this.ew=[]}ui.prototype.toString=function(){return this.ew.join("")},ui.prototype.add=function(a){a!==""&&this.ew.push(a)},ui.className="StringBuilder";function Si(){}Si.className="PropertyCollection";var di={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){_t.console&&_t.console.log(a)},HA:function(a,y,x,b){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(b.left,b.top+20),a.lineTo(b.left,b.top),a.lineTo(b.left+20,b.top),a.moveTo(b.right,b.bottom-20),a.lineTo(b.right,b.bottom),a.lineTo(b.right-20,b.bottom),a.stroke(),a.fillText("DB: "+Math.round(b.x)+", "+Math.round(b.y)+", "+Math.round(b.width)+", "+Math.round(b.height),b.left,b.top-5)},DA:function(a){var y={},x;for(x in a){if(y.x=x,y.x!=="licenseKey"){var b=a[y.x];if(b.prototype!==void 0){y.Zl=Object.getOwnPropertyNames(b.prototype);for(var E={Tj:0};E.Tj<y.Zl.length;E={Tj:E.Tj},E.Tj++){var te=Object.getOwnPropertyDescriptor(b.prototype,y.Zl[E.Tj]);te.get!==void 0&&te.set===void 0&&Object.defineProperty(b.prototype,y.Zl[E.Tj],{set:function(ne,ae){return function(){throw Error("Property "+ne.Zl[ae.Tj]+" of "+ne.x+" is read-only.")}}(y,E)})}}}y={Zl:y.Zl,x:y.x}}}};function Ei(){}Ei.prototype.reset=function(){},Ei.prototype.next=function(){return!1},Ei.prototype.Ad=function(){return!1},Ei.prototype.first=function(){return null},Ei.prototype.any=function(){return!1},Ei.prototype.all=function(){return!0},Ei.prototype.each=function(){return this},Ei.prototype.map=function(){return this},Ei.prototype.filter=function(){return this},Ei.prototype.de=function(){},Ei.prototype.toString=function(){return"EmptyIterator"},Ye.Object.defineProperties(Ei.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Ei.prototype.first=Ei.prototype.first,Ei.prototype.hasNext=Ei.prototype.Ad,Ei.prototype.next=Ei.prototype.next,Ei.prototype.reset=Ei.prototype.reset;var qi=null;Ei.className="EmptyIterator",qi=new Ei;function Fi(a){this.key=-1,this.value=a}Fi.prototype.reset=function(){this.key=-1},Fi.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Fi.prototype.Ad=function(){return this.next()},Fi.prototype.first=function(){return this.key=0,this.value},Fi.prototype.any=function(a){return this.key=-1,a(this.value)},Fi.prototype.all=function(a){return this.key=-1,a(this.value)},Fi.prototype.each=function(a){return this.key=-1,a(this.value),this},Fi.prototype.map=function(a){return new Fi(a(this.value))},Fi.prototype.filter=function(a){return a(this.value)?new Fi(this.value):qi},Fi.prototype.de=function(){this.value=null},Fi.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Ye.Object.defineProperties(Fi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),Fi.prototype.first=Fi.prototype.first,Fi.prototype.hasNext=Fi.prototype.Ad,Fi.prototype.next=Fi.prototype.next,Fi.prototype.reset=Fi.prototype.reset,Fi.className="SingletonIterator";function zi(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}zi.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},zi.prototype.next=function(){var a=this.Bb;if(a.Ja!==this.qa&&0>this.key)return!1;a=a.s;var y=a.length,x=++this.Za,b=this.qf;if(b!==null)for(;x<y;){var E=a[x];if(b(E))return this.key=this.Za=x,this.value=E,!0;x++}else{if(x<y)return this.key=x,this.value=a[x],!0;this.de()}return!1},zi.prototype.Ad=function(){return this.next()},zi.prototype.first=function(){var a=this.Bb;this.qa=a.Ja,this.Za=0,a=a.s;var y=a.length,x=this.qf;if(x!==null){for(var b=0;b<y;){var E=a[b];if(x(E))return this.key=this.Za=b,this.value=E;b++}return null}return 0<y?(a=a[0],this.key=0,this.value=a):null},zi.prototype.any=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var te=y[E];if((b===null||b(te))&&a(te))return!0}return!1},zi.prototype.all=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var te=y[E];if((b===null||b(te))&&!a(te))return!1}return!0},zi.prototype.each=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var te=y[E];(b===null||b(te))&&a(te)}return this},zi.prototype.map=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,te=0;te<b;te++){var ne=y[te];(E===null||E(ne))&&x.push(a(ne))}return a=new Bn,a.s=x,a.xb(),a.iterator},zi.prototype.filter=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,te=0;te<b;te++){var ne=y[te];(E===null||E(ne))&&a(ne)&&x.push(ne)}return a=new Bn,a.s=x,a.xb(),a.iterator},zi.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},zi.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Ye.Object.defineProperties(zi.prototype,{iterator:{get:function(){return this}},predicate:{get:function(){return this.qf},set:function(a){this.qf=a}},count:{get:function(){var a=this.qf;if(a!==null){for(var y=0,x=this.Bb.s,b=x.length,E=0;E<b;E++)a(x[E])&&y++;return y}return this.Bb.s.length}}}),zi.prototype.first=zi.prototype.first,zi.prototype.hasNext=zi.prototype.Ad,zi.prototype.next=zi.prototype.next,zi.prototype.reset=zi.prototype.reset,zi.className="ListIterator";function fr(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}fr.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},fr.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)},fr.prototype.Ad=function(){return this.next()},fr.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},fr.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},fr.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},fr.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},fr.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--)x.push(a(y[b]));return a=new Bn,a.s=x,a.xb(),a.iterator},fr.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--){var E=y[b];a(E)&&x.push(E)}return a=new Bn,a.s=x,a.xb(),a.iterator},fr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},fr.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Ye.Object.defineProperties(fr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),fr.prototype.first=fr.prototype.first,fr.prototype.hasNext=fr.prototype.Ad,fr.prototype.next=fr.prototype.next,fr.prototype.reset=fr.prototype.reset,fr.className="ListIteratorBackwards";function Bn(a){pr(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Nt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}it=Bn.prototype,it.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},it.freeze=function(){return this._isFrozen=!0,this},it.ka=function(){return this._isFrozen=!1,this},it.toString=function(){return"List()#"+Ir(this)},it.add=function(a){return a===null?this:(this._isFrozen&&un(this,a),this.s.push(a),this.xb(),this)},it.push=function(a){this.add(a)},it.addAll=function(a){if(a===null)return this;this._isFrozen&&un(this);var y=this.s;if(sn(a))for(var x=a.length,b=0;b<x;b++)y.push(a[b]);else for(a=a.iterator;a.next();)y.push(a.value);return this.xb(),this},it.clear=function(){this._isFrozen&&un(this),this.s.length=0,this.xb()},it.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},it.has=function(a){return this.contains(a)},it.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},it.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Mn(a,"0 <= i < length",Bn,"elt:i"),y[a]},it.get=function(a){return this.M(a)},it.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Mn(a,"0 <= i < length",Bn,"setElt:i"),this._isFrozen&&un(this,a),x[a]=y},it.set=function(a,y){this.cd(a,y)},it.first=function(){var a=this.s;return a.length===0?null:a[0]},it.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},it.pop=function(){this._isFrozen&&un(this);var a=this.s;return 0<a.length?a.pop():null},Bn.prototype.any=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)if(a(y[b]))return!0;return!1},Bn.prototype.all=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)if(!a(y[b]))return!1;return!0},Bn.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},Bn.prototype.map=function(a){for(var y=new Bn,x=[],b=this.s,E=b.length,te=0;te<E;te++)x.push(a(b[te]));return y.s=x,y.xb(),y},Bn.prototype.filter=function(a){for(var y=new Bn,x=[],b=this.s,E=b.length,te=0;te<E;te++){var ne=b[te];a(ne)&&x.push(ne)}return y.s=x,y.xb(),y},it=Bn.prototype,it.Gb=function(a,y){0>a&&Mn(a,">= 0",Bn,"insertAt:i"),this._isFrozen&&un(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},it.remove=function(a){if(a===null)return!1;this._isFrozen&&un(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)},it.delete=function(a){return this.remove(a)},it.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Mn(a,"0 <= i < length",Bn,"removeAt:i"),this._isFrozen&&un(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},it.removeRange=function(a,y){var x=this.s,b=x.length;if(0>a)a=0;else if(a>=b)return this;if(0>y)return this;if(y>=b&&(y=b-1),a>y)return this;this._isFrozen&&un(this);for(var E=a,te=y+1;te<b;)x[E++]=x[te++];return x.length=b-(y-a+1),this.xb(),this},Bn.prototype.copy=function(){var a=new Bn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},it=Bn.prototype,it.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},it.Iv=function(){for(var a=new In,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},it.sort=function(a){return this._isFrozen&&un(this),this.s.sort(a),this.xb(),this},it.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&un(this);var te=x-y;if(1>=te)return this;if((0>y||y>=E-1)&&Mn(y,"0 <= from < length",Bn,"sortRange:from"),te===2)return x=b[y],E=b[y+1],0<a(x,E)&&(b[y]=E,b[y+1]=x,this.xb()),this;if(y===0)if(x>=E)b.sort(a);else for(y=b.slice(0,x),y.sort(a),a=0;a<x;a++)b[a]=y[a];else if(x>=E)for(x=b.slice(y),x.sort(a),a=y;a<E;a++)b[a]=x[a-y];else for(E=b.slice(y,x),E.sort(a),a=y;a<x;a++)b[a]=E[a-y];return this.xb(),this},it.reverse=function(){return this._isFrozen&&un(this),this.s.reverse(),this.xb(),this},Ye.Object.defineProperties(Bn.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 qi;var a=this.Sa;return a!==null?(a.reset(),a):new zi(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return qi;var a=this.Hg;return a!==null?(a.reset(),a):new fr(this)}}}),Bn.prototype.reverse=Bn.prototype.reverse,Bn.prototype.sortRange=Bn.prototype.zi,Bn.prototype.sort=Bn.prototype.sort,Bn.prototype.toSet=Bn.prototype.Iv,Bn.prototype.toArray=Bn.prototype.Fa,Bn.prototype.removeRange=Bn.prototype.removeRange,Bn.prototype.removeAt=Bn.prototype.mb,Bn.prototype.delete=Bn.prototype.delete,Bn.prototype.remove=Bn.prototype.remove,Bn.prototype.insertAt=Bn.prototype.Gb,Bn.prototype.pop=Bn.prototype.pop,Bn.prototype.last=Bn.prototype.jc,Bn.prototype.first=Bn.prototype.first,Bn.prototype.set=Bn.prototype.set,Bn.prototype.setElt=Bn.prototype.cd,Bn.prototype.get=Bn.prototype.get,Bn.prototype.elt=Bn.prototype.M,Bn.prototype.indexOf=Bn.prototype.indexOf,Bn.prototype.has=Bn.prototype.has,Bn.prototype.contains=Bn.prototype.contains,Bn.prototype.clear=Bn.prototype.clear,Bn.prototype.addAll=Bn.prototype.addAll,Bn.prototype.push=Bn.prototype.push,Bn.prototype.add=Bn.prototype.add,Bn.prototype.thaw=Bn.prototype.ka,Bn.prototype.freeze=Bn.prototype.freeze,Bn.className="List";function Br(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Br.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Br.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)},Br.prototype.Ad=function(){return this.next()},Br.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},Br.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},Br.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},Br.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},Br.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new Bn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Br.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new Bn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Br.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Br.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Ye.Object.defineProperties(Br.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Br.prototype.first=Br.prototype.first,Br.prototype.hasNext=Br.prototype.Ad,Br.prototype.next=Br.prototype.next,Br.prototype.reset=Br.prototype.reset,Br.className="SetIterator";function In(a){pr(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Nt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}it=In.prototype,it.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},it.freeze=function(){return this._isFrozen=!0,this},it.ka=function(){return this._isFrozen=!1,this},it.toString=function(){return"Set()#"+Ir(this)},it.add=function(a){if(a===null)return this;this._isFrozen&&un(this,a);var y=a;return nn(a)&&(y=yo(a)),this.Tb[y]===void 0&&(this.Sb++,a=new ur(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},it.addAll=function(a){if(a===null)return this;if(this._isFrozen&&un(this),sn(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},it.contains=function(a){if(a===null)return!1;var y=a;return nn(a)&&(y=Ir(a),y===void 0)?!1:this.Tb[y]!==void 0},it.has=function(a){return this.contains(a)},it.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},it.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},it.first=function(){var a=this.ea;return a===null?null:a.value},In.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},In.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},In.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},In.prototype.map=function(a){for(var y=new In,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},In.prototype.filter=function(a){for(var y=new In,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},it=In.prototype,it.remove=function(a){if(a===null)return!1;this._isFrozen&&un(this,a);var y=a;if(nn(a)&&(y=Ir(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,b=a.ll;return x!==null&&(x.ll=b),b!==null&&(b.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=b),delete this.Tb[y],this.Sb--,this.xb(),!0},it.delete=function(a){return this.remove(a)},it.hp=function(a){if(a===null)return this;if(this._isFrozen&&un(this),sn(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},it.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&un(this);var y=new In;y.addAll(a),a=[];for(var x=this.iterator;x.next();){var b=x.value;y.contains(b)||a.push(b)}return this.hp(a),this},it.clear=function(){this._isFrozen&&un(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},In.prototype.copy=function(){var a=new In,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},In.prototype.Fa=function(){var a=Array(this.Sb),y=this.Tb,x=0,b;for(b in y)a[x]=y[b].value,x++;return a},In.prototype.Hv=function(){var a=new Bn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function pr(a){a.__gohashid=bo++}function yo(a){var y=a.__gohashid;return y===void 0&&(y=bo++,a.__gohashid=y),y}function Ir(a){return a.__gohashid}Ye.Object.defineProperties(In.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return qi;var a=this.Sa;return a!==null?(a.reset(),a):new Br(this)}}}),In.prototype.toList=In.prototype.Hv,In.prototype.toArray=In.prototype.Fa,In.prototype.clear=In.prototype.clear,In.prototype.retainAll=In.prototype.pA,In.prototype.removeAll=In.prototype.hp,In.prototype.delete=In.prototype.delete,In.prototype.remove=In.prototype.remove,In.prototype.first=In.prototype.first,In.prototype.containsAny=In.prototype.Ty,In.prototype.containsAll=In.prototype.Sy,In.prototype.has=In.prototype.has,In.prototype.contains=In.prototype.contains,In.prototype.addAll=In.prototype.addAll,In.prototype.add=In.prototype.add,In.prototype.thaw=In.prototype.ka,In.prototype.freeze=In.prototype.freeze;var bo=1;In.className="Set",In.uniqueHash=pr,In.hashIdUnique=yo,In.hashId=Ir;function co(a){this.ma=a,this.qa=a.Ja,this.sa=null}co.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},co.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)},co.prototype.Ad=function(){return this.next()},co.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},co.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},co.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},co.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},co.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new Bn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},co.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new Bn;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},co.prototype.de=function(){this.value=this.key=null,this.qa=-1},co.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Ye.Object.defineProperties(co.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),co.prototype.first=co.prototype.first,co.prototype.hasNext=co.prototype.Ad,co.prototype.next=co.prototype.next,co.prototype.reset=co.prototype.reset,co.className="MapKeySetIterator";function Vi(a){In.call(this),pr(this),this._isFrozen=!0,this.ma=a}qe(Vi,In),it=Vi.prototype,it.freeze=function(){return this},it.ka=function(){return this},it.toString=function(){return"MapKeySet("+this.ma.toString()+")"},it.add=function(){Nt("This Set is read-only: "+this.toString())},it.contains=function(a){return this.ma.contains(a)},it.has=function(a){return this.contains(a)},it.remove=function(){Nt("This Set is read-only: "+this.toString())},it.delete=function(a){return this.remove(a)},it.clear=function(){Nt("This Set is read-only: "+this.toString())},it.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Vi.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Vi.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Vi.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Vi.prototype.map=function(a){for(var y=new In,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Vi.prototype.filter=function(a){for(var y=new In,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},Vi.prototype.copy=function(){return new Vi(this.ma)},Vi.prototype.Iv=function(){var a=new In,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Vi.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,b;for(b in a)y[x]=a[b].key,x++;return y},Vi.prototype.Hv=function(){var a=new Bn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Ye.Object.defineProperties(Vi.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?qi:new co(this.ma)}}}),Vi.prototype.toList=Vi.prototype.Hv,Vi.prototype.toArray=Vi.prototype.Fa,Vi.prototype.toSet=Vi.prototype.Iv,Vi.prototype.first=Vi.prototype.first,Vi.prototype.clear=Vi.prototype.clear,Vi.prototype.delete=Vi.prototype.delete,Vi.prototype.remove=Vi.prototype.remove,Vi.prototype.has=Vi.prototype.has,Vi.prototype.contains=Vi.prototype.contains,Vi.prototype.add=Vi.prototype.add,Vi.prototype.thaw=Vi.prototype.ka,Vi.prototype.freeze=Vi.prototype.freeze,Vi.className="MapKeySet";function Hi(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Hi.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Hi.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)},Hi.prototype.Ad=function(){return this.next()},Hi.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},Hi.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},Hi.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},Hi.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},Hi.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Bn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Hi.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Bn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Hi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Hi.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Ye.Object.defineProperties(Hi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Hi.prototype.first=Hi.prototype.first,Hi.prototype.hasNext=Hi.prototype.Ad,Hi.prototype.next=Hi.prototype.next,Hi.prototype.reset=Hi.prototype.reset,Hi.className="MapValueSetIterator";function ur(a,y){this.key=a,this.value=y,this.ll=this.va=null}ur.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},ur.className="KeyValuePair";function Pr(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Pr.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Pr.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)},Pr.prototype.Ad=function(){return this.next()},Pr.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},Pr.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},Pr.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},Pr.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},Pr.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Bn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},Pr.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Bn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},Pr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Pr.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Ye.Object.defineProperties(Pr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Pr.prototype.first=Pr.prototype.first,Pr.prototype.hasNext=Pr.prototype.Ad,Pr.prototype.next=Pr.prototype.next,Pr.prototype.reset=Pr.prototype.reset,Pr.className="MapIterator";function ci(a){pr(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"&&Nt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}it=ci.prototype,it.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},it.freeze=function(){return this._isFrozen=!0,this},it.ka=function(){return this._isFrozen=!1,this},it.toString=function(){return"Map()#"+Ir(this)},it.add=function(a,y){this._isFrozen&&un(this,a);var x=a;nn(a)&&(x=yo(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new ur(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()):b.value=y,this},it.set=function(a,y){return this.add(a,y)},it.addAll=function(a){if(a===null)return this;if(sn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];this.add(b.key,b.value)}else if(a instanceof ci)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},it.first=function(){return this.ea},ci.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},ci.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},ci.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},ci.prototype.map=function(a){for(var y=new ci,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},ci.prototype.filter=function(a){for(var y=new ci,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},it=ci.prototype,it.contains=function(a){var y=a;return nn(a)&&(y=Ir(a),y===void 0)?!1:this.Tb[y]!==void 0},it.has=function(a){return this.contains(a)},it.I=function(a){var y=a;return nn(a)&&(y=Ir(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},it.get=function(a){return this.I(a)},it.remove=function(a){if(a===null)return!1;this._isFrozen&&un(this,a);var y=a;if(nn(a)&&(y=Ir(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,b=a.ll;return x!==null&&(x.ll=b),b!==null&&(b.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=b),delete this.Tb[y],this.Sb--,this.xb(),!0},it.delete=function(a){return this.remove(a)},it.clear=function(){this._isFrozen&&un(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()},ci.prototype.copy=function(){var a=new ci,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},ci.prototype.Fa=function(){var a=this.Tb,y=Array(this.Sb),x=0,b;for(b in a){var E=a[b];y[x]=new ur(E.key,E.value),x++}return y},ci.prototype.Lf=function(){return new Vi(this)},Ye.Object.defineProperties(ci.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return qi;var a=this.Sa;return a!==null?(a.reset(),a):new Pr(this)}},iteratorKeys:{get:function(){return 0>=this.count?qi:new co(this)}},iteratorValues:{get:function(){if(0>=this.count)return qi;var a=this.jf;return a!==null?(a.reset(),a):new Hi(this)}}}),ci.prototype.toKeySet=ci.prototype.Lf,ci.prototype.toArray=ci.prototype.Fa,ci.prototype.clear=ci.prototype.clear,ci.prototype.delete=ci.prototype.delete,ci.prototype.remove=ci.prototype.remove,ci.prototype.get=ci.prototype.get,ci.prototype.getValue=ci.prototype.I,ci.prototype.has=ci.prototype.has,ci.prototype.contains=ci.prototype.contains,ci.prototype.first=ci.prototype.first,ci.prototype.addAll=ci.prototype.addAll,ci.prototype.set=ci.prototype.set,ci.prototype.add=ci.prototype.add,ci.prototype.thaw=ci.prototype.ka,ci.prototype.freeze=ci.prototype.freeze,ci.className="Map";function Mt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):Nt("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Gr,Hr,ts,ko,ss;Mt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Mt.prototype.h=function(a,y){return this.x=a,this.y=y,this},Mt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Mt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Mt.prototype.copy=function(){var a=new Mt;return a.x=this.x,a.y=this.y,a},it=Mt.prototype,it.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},it.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},it.freeze=function(){return this._isFrozen=!0,this},it.ka=function(){return Object.isFrozen(this)&&Nt("cannot thaw constant: "+this),this._isFrozen=!1,this};function _r(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new Mt(x,E)}return new Mt}function cr(a){return a.x.toString()+" "+a.y.toString()}it.toString=function(){return"Point("+this.x+","+this.y+")"},it.D=function(a){return a instanceof Mt?this.x===a.x&&this.y===a.y:!1},it.hi=function(a,y){return this.x===a&&this.y===y},it.Xa=function(a){return rn.B(this.x,a.x)&&rn.B(this.y,a.y)},it.add=function(a){return this.x+=a.x,this.y+=a.y,this},it.re=function(a){return this.x-=a.x,this.y-=a.y,this},it.offset=function(a,y){return this.x+=a,this.y+=y,this},Mt.prototype.rotate=function(a){if(a===0)return this;var y=this.x,x=this.y;if(y===0&&x===0)return this;if(360<=a?a-=360:0>a&&(a+=360),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));return this.x=a*y-b*x,this.y=b*y+a*x,this},it=Mt.prototype,it.scale=function(a,y){return this.x*=a,this.y*=y,this},it.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},it.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},it.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},it.ab=function(a){return Vr(a.x-this.x,a.y-this.y)},it.direction=function(a,y){return Vr(a-this.x,y-this.y)};function Vr(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}it.Ry=function(a,y){return rn.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},it.fA=function(a,y,x,b){return rn.qh(a,y,x,b,this.x,this.y,this),this},it.gA=function(a,y){return rn.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},it.uA=function(a,y,x,b){return rn.No(this.x,this.y,a,y,x,b,this),this},it.vA=function(a,y){return rn.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},it.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},it.yi=function(a,y,x,b,E){return this.x=a+E.x*x+E.offsetX,this.y=y+E.y*b+E.offsetY,this},it.transform=function(a){return a.Ga(this),this};function hr(a,y){return y.Cd(a),a}function eo(a,y,x,b,E,te){var ne=E-x,ae=te-b,fe=ne*ne+ae*ae;x-=a,b-=y;var _e=-x*ne-b*ae;return 0>=_e||_e>=fe?(ne=E-a,ae=te-y,Math.min(x*x+b*b,ne*ne+ae*ae)):(a=ne*b-ae*x,a*a/fe)}function Yo(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function rr(a,y,x,b){return a=x-a,y=b-y,a===0?0<y?90:0>y?270:0:y===0?0<a?0:180:isNaN(a)||isNaN(y)?0:(b=180*Math.atan(Math.abs(y/a))/Math.PI,0>a?b=0>y?b+180:180-b:0>y&&(b=360-b),b)}it.w=function(){return isFinite(this.x)&&isFinite(this.y)},Mt.alloc=function(){var a=Wi.pop();return a===void 0?new Mt:a},Mt.allocAt=function(a,y){var x=Wi.pop();return x===void 0?new Mt(a,y):(x.x=a,x.y=y,x)},Mt.free=function(a){Wi.push(a)},Mt.prototype.isReal=Mt.prototype.w,Mt.prototype.setSpot=Mt.prototype.yi,Mt.prototype.setRectSpot=Mt.prototype.xi,Mt.prototype.snapToGridPoint=Mt.prototype.vA,Mt.prototype.snapToGrid=Mt.prototype.uA,Mt.prototype.projectOntoLineSegmentPoint=Mt.prototype.gA,Mt.prototype.projectOntoLineSegment=Mt.prototype.fA,Mt.intersectingLineSegments=function(a,y,x,b,E,te,ne,ae){return rn.Rl(a,y,x,b,E,te,ne,ae)},Mt.prototype.compareWithLineSegmentPoint=Mt.prototype.Ry,Mt.compareWithLineSegment=function(a,y,x,b,E,te){return rn.Fl(a,y,x,b,E,te)},Mt.prototype.direction=Mt.prototype.direction,Mt.prototype.directionPoint=Mt.prototype.ab,Mt.prototype.normalize=Mt.prototype.normalize,Mt.prototype.distanceSquared=Mt.prototype.zd,Mt.prototype.distanceSquaredPoint=Mt.prototype.Bf,Mt.prototype.scale=Mt.prototype.scale,Mt.prototype.rotate=Mt.prototype.rotate,Mt.prototype.offset=Mt.prototype.offset,Mt.prototype.subtract=Mt.prototype.re,Mt.prototype.add=Mt.prototype.add,Mt.prototype.equalsApprox=Mt.prototype.Xa,Mt.prototype.equalTo=Mt.prototype.hi,Mt.prototype.equals=Mt.prototype.D,Mt.prototype.set=Mt.prototype.set,Mt.prototype.setTo=Mt.prototype.sg;var Wi=[];Mt.className="Point",Mt.parse=_r,Mt.stringify=cr,Mt.distanceLineSegmentSquared=eo,Mt.distanceSquared=Yo,Mt.direction=rr,Mt.Origin=Gr=new Mt(0,0).ja(),Mt.InfiniteTopLeft=Hr=new Mt(-1/0,-1/0).ja(),Mt.InfiniteBottomRight=ts=new Mt(1/0,1/0).ja(),Mt.SixPoint=ko=new Mt(6,6).ja(),Mt.NoPoint=ss=new Mt(NaN,NaN).ja(),Mt.parse=_r,Mt.stringify=cr,Mt.distanceLineSegmentSquared=eo,Mt.distanceSquared=Yo,Mt.direction=rr;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):Nt("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var or,to,Ro,Bo,Xo,as,Ho;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},it=Qn.prototype,it.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},it.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},it.freeze=function(){return this._isFrozen=!0,this},it.ka=function(){return Object.isFrozen(this)&&Nt("cannot thaw constant: "+this),this._isFrozen=!1,this};function ia(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new Qn(x,E)}return new Qn}function _s(a){return a.width.toString()+" "+a.height.toString()}it.toString=function(){return"Size("+this.width+","+this.height+")"},it.D=function(a){return a instanceof Qn?this.width===a.width&&this.height===a.height:!1},it.hi=function(a,y){return this.width===a&&this.height===y},it.Xa=function(a){return rn.B(this.width,a.width)&&rn.B(this.height,a.height)},it.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},it.w=function(){return isFinite(this.width)&&isFinite(this.height)},Qn.alloc=function(){var a=la.pop();return a===void 0?new Qn:a},Qn.free=function(a){la.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 la=[];Qn.className="Size",Qn.parse=ia,Qn.stringify=_s,Qn.ZeroSize=or=new Qn(0,0).ja(),Qn.OneSize=to=new Qn(1,1).ja(),Qn.SixSize=Ro=new Qn(6,6).ja(),Qn.EightSize=Bo=new Qn(8,8).ja(),Qn.TenSize=Xo=new Qn(10,10).ja(),Qn.InfiniteSize=as=new Qn(1/0,1/0).ja(),Qn.NoSize=Ho=new Qn(NaN,NaN).ja(),Qn.parse=ia,Qn.stringify=_s;function kn(a,y,x,b){a===void 0?this.height=this.width=this.y=this.x=0:typeof a=="number"&&typeof y=="number"&&typeof x=="number"&&(0<=x||isNaN(x))&&typeof b=="number"&&(0<=b||isNaN(b))?(this.x=a,this.y=y,this.width=x,this.height=b):a instanceof Mt?(x=a.x,a=a.y,y instanceof Mt?(b=y.x,y=y.y,this.x=Math.min(x,b),this.y=Math.min(a,y),this.width=Math.abs(x-b),this.height=Math.abs(a-y)):y instanceof Qn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Nt("Incorrect second argument supplied to Rect constructor "+y)):Nt("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}it=kn.prototype,it.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},it.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function Is(a,y,x){a.width=y,a.height=x}it.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},it.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},it.dd=function(a){return this.x=a.x,this.y=a.y,this},it.tA=function(a){return this.width=a.width,this.height=a.height,this},kn.prototype.copy=function(){var a=new kn;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},it=kn.prototype,it.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},it.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},it.freeze=function(){return this._isFrozen=!0,this},it.ka=function(){return Object.isFrozen(this)&&Nt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Pu(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;(b=a[y++])&&(E=parseFloat(b));for(var te=0;a[y]==="";)y++;(b=a[y++])&&(te=parseFloat(b));for(var ne=0;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),new kn(x,E,te,ne)}return new kn}function Ua(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}it.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},it.D=function(a){return a instanceof kn?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},it.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},it.Xa=function(a){return rn.B(this.x,a.x)&&rn.B(this.y,a.y)&&rn.B(this.width,a.width)&&rn.B(this.height,a.height)};function Sa(a,y){return rn.$(a.x,y.x)&&rn.$(a.y,y.y)&&rn.$(a.width,y.width)&&rn.$(a.height,y.height)}it.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},it.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},it.contains=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+b<=this.y+this.height},it.offset=function(a,y){return this.x+=a,this.y+=y,this},it.Bc=function(a,y){return us(this,y,a,y,a)},it.Co=function(a){return us(this,a.top,a.right,a.bottom,a.left)},it.Fv=function(a){return us(this,-a.top,-a.right,-a.bottom,-a.left)},it.Hz=function(a,y,x,b){return us(this,a,y,x,b)};function us(a,y,x,b,E){var te=a.width;return x+E<=-te?(a.x+=te/2,a.width=0):(a.x-=E,a.width+=x+E),x=a.height,y+b<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+b),a}it.Ex=function(a){return Ws(this,a.x,a.y,a.width,a.height)},it.Uu=function(a,y,x,b){return Ws(this,a,y,x,b)};function Ws(a,y,x,b,E){var te=Math.max(a.x,y),ne=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+b),x=Math.min(a.y+a.height,x+E),a.x=te,a.y=ne,a.width=Math.max(0,y-te),a.height=Math.max(0,x-ne),a}it.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},it.Vu=function(a,y,x,b){var E=this.width,te=this.x;return E!==1/0&&x!==1/0&&(E+=te,x+=a,isNaN(x)||isNaN(E)||te>x||a>E)?!1:(a=this.height,x=this.y,!(a!==1/0&&b!==1/0&&(a+=x,b+=y,isNaN(b)||isNaN(a)||x>b||y>a)))};function Po(a,y){var x=a.width,b=a.x,E=y.x-10;return b>y.width+10+10+E||E>x+b?!1:(x=a.height,a=a.y,b=y.y-10,!(a>y.height+10+10+b||b>x+a))}it.Ye=function(a){return Ao(this,a.x,a.y,0,0)},it.ed=function(a){return Ao(this,a.x,a.y,a.width,a.height)},it.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),Ao(this,a,y,x,b)};function Ao(a,y,x,b,E){var te=Math.min(a.x,y),ne=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+b),x=Math.max(a.y+a.height,x+E),a.x=te,a.y=ne,a.width=y-te,a.height=x-ne,a}it.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 Eo(a,y,x,b,E,te,ne,ae){return ne===void 0&&(ne=0),ae===void 0&&(ae=0),a<=E&&E+ne<=a+x&&y<=te&&te+ae<=y+b}function ua(a,y,x,b,E,te,ne,ae){return a>ne+E||E>x+a?!1:!(y>ae+te||te>b+y)}it.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},it.Mz=function(){return this.width===0&&this.height===0},kn.alloc=function(){var a=Yr.pop();return a===void 0?new kn:a},kn.allocAt=function(a,y,x,b){var E=Yr.pop();return E===void 0?new kn(a,y,x,b):E.h(a,y,x,b)},kn.free=function(a){Yr.push(a)},Ye.Object.defineProperties(kn.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 Mt(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 Mt(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}}}),kn.prototype.isEmpty=kn.prototype.Mz,kn.prototype.isReal=kn.prototype.w,kn.intersectsLineSegment=function(a,y,x,b,E,te,ne,ae){return rn.Fx(a,y,x,b,E,te,ne,ae)},kn.prototype.setSpot=kn.prototype.yi,kn.prototype.union=kn.prototype.Kv,kn.prototype.unionRect=kn.prototype.ed,kn.prototype.unionPoint=kn.prototype.Ye,kn.prototype.intersects=kn.prototype.Vu,kn.prototype.intersectsRect=kn.prototype.Yc,kn.prototype.intersect=kn.prototype.Uu,kn.prototype.intersectRect=kn.prototype.Ex,kn.prototype.grow=kn.prototype.Hz,kn.prototype.subtractMargin=kn.prototype.Fv,kn.prototype.addMargin=kn.prototype.Co,kn.prototype.inflate=kn.prototype.Bc,kn.prototype.offset=kn.prototype.offset,kn.prototype.contains=kn.prototype.contains,kn.prototype.containsRect=kn.prototype.Re,kn.prototype.containsPoint=kn.prototype.ca,kn.prototype.equalsApprox=kn.prototype.Xa,kn.prototype.equalTo=kn.prototype.hi,kn.prototype.equals=kn.prototype.D,kn.prototype.setSize=kn.prototype.tA,kn.prototype.setPoint=kn.prototype.dd,kn.prototype.set=kn.prototype.set,kn.prototype.setTo=kn.prototype.sg;var xr=null,lo=null,Yr=[];kn.className="Rect",kn.parse=Pu,kn.stringify=Ua,kn.contains=Eo,kn.intersects=ua,kn.ZeroRect=xr=new kn(0,0,0,0).ja(),kn.NoRect=lo=new kn(NaN,NaN,NaN,NaN).ja(),kn.parse=Pu,kn.stringify=Ua,kn.contains=Eo,kn.intersects=ua;function Mi(a,y,x,b){a===void 0?this.left=this.bottom=this.right=this.top=0:y===void 0?this.left=this.bottom=this.right=this.top=a:x===void 0?(this.top=a,this.right=y,this.bottom=a,this.left=y):b!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=b):Nt("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Mi.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Mi.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},Mi.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Mi.prototype.copy=function(){var a=new Mi;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},it=Mi.prototype,it.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},it.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},it.freeze=function(){return this._isFrozen=!0,this},it.ka=function(){return Object.isFrozen(this)&&Nt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Es(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=NaN;a[y]==="";)y++;var b=a[y++];if(b&&(x=parseFloat(b)),isNaN(x))return new Mi;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new Mi(x);for(var te=NaN;a[y]==="";)y++;if((b=a[y++])&&(te=parseFloat(b)),isNaN(te))return new Mi(x,E);for(var ne=NaN;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),isNaN(ne)?new Mi(x,E):new Mi(x,E,te,ne)}return new Mi}function Ls(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}it.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},it.D=function(a){return a instanceof Mi?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},it.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},it.Xa=function(a){return rn.B(this.top,a.top)&&rn.B(this.right,a.right)&&rn.B(this.bottom,a.bottom)&&rn.B(this.left,a.left)},it.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Mi.alloc=function(){var a=Il.pop();return a===void 0?new Mi:a},Mi.free=function(a){Il.push(a)},Mi.prototype.isReal=Mi.prototype.w,Mi.prototype.equalsApprox=Mi.prototype.Xa,Mi.prototype.equalTo=Mi.prototype.hi,Mi.prototype.equals=Mi.prototype.D,Mi.prototype.set=Mi.prototype.set,Mi.prototype.setTo=Mi.prototype.sg;var xa=null,xl=null,Il=[];Mi.className="Margin",Mi.parse=Es,Mi.stringify=Ls,Mi.ZeroMargin=xa=new Mi(0,0,0,0).ja(),Mi.TwoMargin=xl=new Mi(2,2,2,2).ja(),Mi.parse=Es,Mi.stringify=Ls;function yi(a,y,x,b){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),b===void 0&&(b=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=b),this._isFrozen=!1}var ms,Xs,qa,wl,Dl,jr,nc,Ia,Ga,Na,$l,_u,Wa,Za,Uu,yc,Eu,Rl,Sc,Gu,Lu,bl,th,xc,lu,oo,Uo,ka,ra,Ds,bs,ks,Zs,Ks,Yl,Bl;yi.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},yi.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},yi.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},yi.prototype.copy=function(){var a=new yi;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},it=yi.prototype,it.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},it.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},it.freeze=function(){return this._isFrozen=!0,this},it.ka=function(){return Object.isFrozen(this)&&Nt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Rs(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function xh(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return ms;if(a==="TopLeft")return Xs;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return qa;if(a==="TopRight")return wl;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Dl;if(a==="Center")return jr;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return nc;if(a==="BottomLeft")return Ia;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return Ga;if(a==="BottomRight")return Na;if(a==="TopSide")return $l;if(a==="LeftSide")return _u;if(a==="RightSide")return Wa;if(a==="BottomSide")return Za;if(a==="TopBottomSides")return Uu;if(a==="LeftRightSides")return yc;if(a==="TopLeftSides")return Eu;if(a==="TopRightSides")return Rl;if(a==="BottomLeftSides")return Sc;if(a==="BottomRightSides")return Gu;if(a==="NotTopSide")return Lu;if(a==="NotLeftSide")return bl;if(a==="NotRightSide")return th;if(a==="NotBottomSide")return xc;if(a==="AllSides")return lu;if(a==="Default")return oo;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b!==void 0&&0<b.length&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(E=parseFloat(b));for(var te=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(te=parseFloat(b));for(var ne=0;a[y]==="";)y++;return b=a[y++],b!==void 0&&0<b.length&&(ne=parseFloat(b)),new yi(x,E,te,ne)}return new yi}function nh(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}it.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(ms)?"None":this.D(Xs)?"TopLeft":this.D(qa)?"Top":this.D(wl)?"TopRight":this.D(Dl)?"Left":this.D(jr)?"Center":this.D(nc)?"Right":this.D(Ia)?"BottomLeft":this.D(Ga)?"Bottom":this.D(Na)?"BottomRight":this.D($l)?"TopSide":this.D(_u)?"LeftSide":this.D(Wa)?"RightSide":this.D(Za)?"BottomSide":this.D(Uu)?"TopBottomSides":this.D(yc)?"LeftRightSides":this.D(Eu)?"TopLeftSides":this.D(Rl)?"TopRightSides":this.D(Sc)?"BottomLeftSides":this.D(Gu)?"BottomRightSides":this.D(Lu)?"NotTopSide":this.D(bl)?"NotLeftSide":this.D(th)?"NotRightSide":this.D(xc)?"NotBottomSide":this.D(lu)?"AllSides":this.D(oo)?"Default":"None"},it.D=function(a){return a instanceof yi?(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},it.gv=function(){return new yi(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},it.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Uo))a=_u;else if(a.D(ka))a=Wa;else if(a.D(ra))a=$l;else if(a.D(Ds))a=Za;else return!1;return a=a.offsetY,(this.offsetY&a)===a},it.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},it.Mc=function(){return isNaN(this.x)||isNaN(this.y)},it.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},it.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},it.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},yi.alloc=function(){var a=wc.pop();return a===void 0?new yi:a},yi.free=function(a){wc.push(a)},yi.prototype.isDefault=yi.prototype.Xb,yi.prototype.isNone=yi.prototype.ys,yi.prototype.isSide=yi.prototype.$c,yi.prototype.isNoSpot=yi.prototype.Mc,yi.prototype.isSpot=yi.prototype.sb,yi.prototype.includesSide=yi.prototype.Hf,yi.prototype.opposite=yi.prototype.gv,yi.prototype.equals=yi.prototype.D,yi.prototype.set=yi.prototype.set,yi.prototype.setTo=yi.prototype.sg;var wc=[];yi.className="Spot",yi.parse=xh,yi.stringify=nh,yi.None=ms=Rs(new yi(0,0,0,0),0).ja(),yi.Default=oo=Rs(new yi(0,0,-1,0),-1).ja(),yi.TopLeft=Xs=new yi(0,0,0,0).ja(),yi.TopCenter=qa=new yi(.5,0,0,0).ja(),yi.TopRight=wl=new yi(1,0,0,0).ja(),yi.LeftCenter=Dl=new yi(0,.5,0,0).ja(),yi.Center=jr=new yi(.5,.5,0,0).ja(),yi.RightCenter=nc=new yi(1,.5,0,0).ja(),yi.BottomLeft=Ia=new yi(0,1,0,0).ja(),yi.BottomCenter=Ga=new yi(.5,1,0,0).ja(),yi.BottomRight=Na=new yi(1,1,0,0).ja(),yi.MiddleTop=bs=qa,yi.MiddleLeft=ks=Dl,yi.MiddleRight=Zs=nc,yi.MiddleBottom=Ks=Ga,yi.Top=ra=qa,yi.Left=Uo=Dl,yi.Right=ka=nc,yi.Bottom=Ds=Ga,yi.TopSide=$l=Rs(new yi(0,0,1,1),1).ja(),yi.LeftSide=_u=Rs(new yi(0,0,1,2),1).ja(),yi.RightSide=Wa=Rs(new yi(0,0,1,4),1).ja(),yi.BottomSide=Za=Rs(new yi(0,0,1,8),1).ja(),yi.TopBottomSides=Uu=Rs(new yi(0,0,1,9),1).ja(),yi.LeftRightSides=yc=Rs(new yi(0,0,1,6),1).ja(),yi.TopLeftSides=Eu=Rs(new yi(0,0,1,3),1).ja(),yi.TopRightSides=Rl=Rs(new yi(0,0,1,5),1).ja(),yi.BottomLeftSides=Sc=Rs(new yi(0,0,1,10),1).ja(),yi.BottomRightSides=Gu=Rs(new yi(0,0,1,12),1).ja(),yi.NotTopSide=Lu=Rs(new yi(0,0,1,14),1).ja(),yi.NotLeftSide=bl=Rs(new yi(0,0,1,13),1).ja(),yi.NotRightSide=th=Rs(new yi(0,0,1,11),1).ja(),yi.NotBottomSide=xc=Rs(new yi(0,0,1,7),1).ja(),yi.AllSides=lu=Rs(new yi(0,0,1,15),1).ja(),Yl=new yi(.156,.156).ja(),Bl=new yi(.844,.844).ja(),yi.parse=xh,yi.stringify=nh;function gr(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}gr.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},gr.prototype.setTransform=function(a,y,x,b,E,te){return this.m11=a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=te,this},gr.prototype.copy=function(){var a=new gr;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},gr.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},gr.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},gr.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},gr.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},gr.prototype.multiply=function(a){var y=this.m11*a.m11+this.m21*a.m12,x=this.m12*a.m11+this.m22*a.m12,b=this.m11*a.m21+this.m21*a.m22,E=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=b,this.m22=E,this},gr.prototype.bv=function(a){var y=1/(a.m11*a.m22-a.m12*a.m21),x=a.m22*y,b=-a.m12*y,E=-a.m21*y,te=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*b,x=this.m12*x+this.m22*b,b=this.m11*E+this.m21*te,E=this.m12*E+this.m22*te,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=b,this.m22=E,this},gr.prototype.Vj=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),y=-this.m12*a,x=-this.m21*a,b=this.m11*a,E=a*(this.m21*this.dy-this.m22*this.dx),te=a*(this.m12*this.dx-this.m11*this.dy);return this.m11=this.m22*a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=te,this},gr.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 b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.m12*a+this.m22*b,te=this.m11*-b+this.m21*a,ne=this.m12*-b+this.m22*a;return this.m11=this.m11*a+this.m21*b,this.m12=E,this.m21=te,this.m22=ne,this.translate(-y,-x),this},it=gr.prototype,it.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},it.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},it.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)},it.Cd=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=a.x,b=a.y;return a.h(x*this.m22*y+b*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+b*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},it.Eu=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=1.25*a.x,b=1.2*a.y;return a.h(x*this.m22*y+b*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+b*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},it.pp=function(a){var y=a.x,x=a.y,b=y+a.width,E=x+a.height,te=this.m11,ne=this.m12,ae=this.m21,fe=this.m22,_e=this.dx,Te=this.dy,je=y*te+x*ae+_e,Ve=y*ne+x*fe+Te,Qe=b*te+x*ae+_e,rt=b*ne+x*fe+Te;return x=y*te+E*ae+_e,y=y*ne+E*fe+Te,te=b*te+E*ae+_e,b=b*ne+E*fe+Te,E=Math.min(je,Qe),je=Math.max(je,Qe),Qe=Math.min(Ve,rt),Ve=Math.max(Ve,rt),E=Math.min(E,x),je=Math.max(je,x),Qe=Math.min(Qe,y),Ve=Math.max(Ve,y),E=Math.min(E,te),je=Math.max(je,te),Qe=Math.min(Qe,b),Ve=Math.max(Ve,b),a.h(E,Qe,je-E,Ve-Qe),a},gr.alloc=function(){var a=bc.pop();return a===void 0?new gr:a},gr.free=function(a){bc.push(a)},gr.prototype.transformRect=gr.prototype.pp,gr.prototype.transformPoint=gr.prototype.Ga,gr.prototype.scale=gr.prototype.scale,gr.prototype.translate=gr.prototype.translate,gr.prototype.rotate=gr.prototype.rotate,gr.prototype.invert=gr.prototype.Vj,gr.prototype.multiplyInverted=gr.prototype.bv,gr.prototype.multiply=gr.prototype.multiply,gr.prototype.reset=gr.prototype.reset,gr.prototype.isIdentity=gr.prototype.ws,gr.prototype.equals=gr.prototype.D,gr.prototype.setTransform=gr.prototype.setTransform,gr.prototype.set=gr.prototype.set;var bc=[];gr.className="Transform",gr.xF="54a702f3e53909c447824c6706603faf4c";var rn={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=rn.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);rn.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,b,E,te,ne){if(0>=E&&(E=1e-6),a<x)var ae=a,fe=x;else ae=x,fe=a;if(y<b)var _e=y,Te=b;else _e=b,Te=y;if(a===x)return _e<=ne&&ne<=Te&&a-E<=te&&te<=a+E;if(y===b)return ae<=te&&te<=fe&&y-E<=ne&&ne<=y+E;if(fe+=E,ae-=E,ae<=te&&te<=fe&&(Te+=E,_e-=E,_e<=ne&&ne<=Te))if(fe-ae>Te-_e)if(a-x>E||x-a>E){if(te=(b-y)/(x-a)*(te-a)+y,te-E<=ne&&ne<=te+E)return!0}else return!0;else if(y-b>E||b-y>E){if(ne=(x-a)/(b-y)*(ne-y)+a,ne-E<=te&&te<=ne+E)return!0}else return!0;return!1},cs:function(a,y,x,b,E,te,ne,ae,fe,_e,Te,je){if(rn.Yb(a,y,ne,ae,je,x,b)&&rn.Yb(a,y,ne,ae,je,E,te))return rn.Yb(a,y,ne,ae,je,_e,Te);var Ve=(a+x)/2,Qe=(y+b)/2,rt=(x+E)/2,ct=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(Ve+rt)/2,x=(Qe+ct)/2,rt=(rt+E)/2,ct=(ct+te)/2;var Dt=(b+rt)/2,Lt=(x+ct)/2;return rn.cs(a,y,Ve,Qe,b,x,Dt,Lt,fe,_e,Te,je)||rn.cs(Dt,Lt,rt,ct,E,te,ne,ae,fe,_e,Te,je)},ax:function(a,y,x,b,E,te,ne,ae,fe){var _e=(x+E)/2,Te=(b+te)/2;return fe.h((((a+x)/2+_e)/2+(_e+(E+ne)/2)/2)/2,(((y+b)/2+Te)/2+(Te+(te+ae)/2)/2)/2),fe},My:function(a,y,x,b,E,te,ne,ae){var fe=(x+E)/2,_e=(b+te)/2;return rr(((a+x)/2+fe)/2,((y+b)/2+_e)/2,(fe+(E+ne)/2)/2,(_e+(te+ae)/2)/2)},Dl:function(a,y,x,b,E,te,ne,ae,fe,_e){if(rn.Yb(a,y,ne,ae,fe,x,b)&&rn.Yb(a,y,ne,ae,fe,E,te))Ao(_e,a,y,0,0),Ao(_e,ne,ae,0,0);else{var Te=(a+x)/2,je=(y+b)/2,Ve=(x+E)/2,Qe=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(Te+Ve)/2,x=(je+Qe)/2,Ve=(Ve+E)/2,Qe=(Qe+te)/2;var rt=(b+Ve)/2,ct=(x+Qe)/2;rn.Dl(a,y,Te,je,b,x,rt,ct,fe,_e),rn.Dl(rt,ct,Ve,Qe,E,te,ne,ae,fe,_e)}return _e},Qe:function(a,y,x,b,E,te,ne,ae,fe,_e){if(rn.Yb(a,y,ne,ae,fe,x,b)&&rn.Yb(a,y,ne,ae,fe,E,te))_e.length===0&&(_e.push(a),_e.push(y)),_e.push(ne),_e.push(ae);else{var Te=(a+x)/2,je=(y+b)/2,Ve=(x+E)/2,Qe=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(Te+Ve)/2,x=(je+Qe)/2,Ve=(Ve+E)/2,Qe=(Qe+te)/2;var rt=(b+Ve)/2,ct=(x+Qe)/2;rn.Qe(a,y,Te,je,b,x,rt,ct,fe,_e),rn.Qe(rt,ct,Ve,Qe,E,te,ne,ae,fe,_e)}return _e},jv:function(a,y,x,b,E,te,ne,ae,fe,_e){if(rn.Yb(a,y,E,te,_e,x,b))return rn.Yb(a,y,E,te,_e,ae,fe);var Te=(a+x)/2,je=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Ve=(Te+x)/2,Qe=(je+b)/2;return rn.jv(a,y,Te,je,Ve,Qe,ne,ae,fe,_e)||rn.jv(Ve,Qe,x,b,E,te,ne,ae,fe,_e)},OA:function(a,y,x,b,E,te,ne){return ne.h(((a+x)/2+(x+E)/2)/2,((y+b)/2+(b+te)/2)/2),ne},iv:function(a,y,x,b,E,te,ne,ae){if(rn.Yb(a,y,E,te,ne,x,b))Ao(ae,a,y,0,0),Ao(ae,E,te,0,0);else{var fe=(a+x)/2,_e=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Te=(fe+x)/2,je=(_e+b)/2;rn.iv(a,y,fe,_e,Te,je,ne,ae),rn.iv(Te,je,x,b,E,te,ne,ae)}return ae},ep:function(a,y,x,b,E,te,ne,ae){if(rn.Yb(a,y,E,te,ne,x,b))ae.length===0&&(ae.push(a),ae.push(y)),ae.push(E),ae.push(te);else{var fe=(a+x)/2,_e=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Te=(fe+x)/2,je=(_e+b)/2;rn.ep(a,y,fe,_e,Te,je,ne,ae),rn.ep(Te,je,x,b,E,te,ne,ae)}return ae},Eo:function(a,y,x,b,E,te,ne,ae,fe,_e,Te,je,Ve,Qe){if(rn.Yb(a,y,ne,ae,Ve,x,b)&&rn.Yb(a,y,ne,ae,Ve,E,te))return!rn.Rl(a,y,ne,ae,fe,_e,Te,je)||(Ve=(a-ne)*(_e-je)-(y-ae)*(fe-Te),Ve===0)?!1:(Qe.h(((a*ae-y*ne)*(fe-Te)-(a-ne)*(fe*je-_e*Te))/Ve,((a*ae-y*ne)*(_e-je)-(y-ae)*(fe*je-_e*Te))/Ve),!0);var rt=(a+x)/2,ct=(y+b)/2,Dt=(x+E)/2,Lt=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(rt+Dt)/2,x=(ct+Lt)/2,Dt=(Dt+E)/2,Lt=(Lt+te)/2;var Gt=(b+Dt)/2,Zt=(x+Lt)/2,Vt=1/0,Qt=!1,yn=0,ri=0;return rn.Eo(a,y,rt,ct,b,x,Gt,Zt,fe,_e,Te,je,Ve,Qe)&&(a=(Qe.x-fe)*(Qe.x-fe)+(Qe.y-_e)*(Qe.y-_e),a<Vt&&(Vt=a,Qt=!0,yn=Qe.x,ri=Qe.y)),rn.Eo(Gt,Zt,Dt,Lt,E,te,ne,ae,fe,_e,Te,je,Ve,Qe)&&(Qe.x-fe)*(Qe.x-fe)+(Qe.y-_e)*(Qe.y-_e)<Vt&&(Qt=!0,yn=Qe.x,ri=Qe.y),Qt&&(Qe.x=yn,Qe.y=ri),Qt},Fo:function(a,y,x,b,E,te,ne,ae,fe,_e,Te,je,Ve){var Qe=0;if(rn.Yb(a,y,ne,ae,Ve,x,b)&&rn.Yb(a,y,ne,ae,Ve,E,te)){if(Ve=(a-ne)*(_e-je)-(y-ae)*(fe-Te),Ve===0)return Qe;var rt=((a*ae-y*ne)*(fe-Te)-(a-ne)*(fe*je-_e*Te))/Ve,ct=((a*ae-y*ne)*(_e-je)-(y-ae)*(fe*je-_e*Te))/Ve;if(rt>=Te)return Qe;if((fe>Te?fe-Te:Te-fe)<(_e>je?_e-je:je-_e)){if(y<ae?(fe=y,a=ae):(fe=ae,a=y),ct<fe||ct>a)return Qe}else if(a<ne?(fe=a,a=ne):fe=ne,rt<fe||rt>a)return Qe;0<Ve?Qe++:0>Ve&&Qe--}else{rt=(a+x)/2,ct=(y+b)/2;var Dt=(x+E)/2,Lt=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(rt+Dt)/2,x=(ct+Lt)/2,Dt=(Dt+E)/2,Lt=(Lt+te)/2;var Gt=(b+Dt)/2,Zt=(x+Lt)/2;Qe+=rn.Fo(a,y,rt,ct,b,x,Gt,Zt,fe,_e,Te,je,Ve),Qe+=rn.Fo(Gt,Zt,Dt,Lt,E,te,ne,ae,fe,_e,Te,je,Ve)}return Qe},qh:function(a,y,x,b,E,te,ne){return rn.$(a,x)?(y<b?(x=y,y=b):x=b,te<x?(ne.h(a,x),!1):te>y?(ne.h(a,y),!1):(ne.h(a,te),!0)):rn.$(y,b)?(a<x?(b=a,a=x):b=x,E<b?(ne.h(b,y),!1):E>a?(ne.h(a,y),!1):(ne.h(E,y),!0)):(E=((a-E)*(a-x)+(y-te)*(y-b))/((x-a)*(x-a)+(b-y)*(b-y)),-5e-6>E?(ne.h(a,y),!1):1.000005<E?(ne.h(x,b),!1):(ne.h(a+E*(x-a),y+E*(b-y)),!0))},Ve:function(a,y,x,b,E,te,ne,ae,fe){return rn.B(a,x)&&rn.B(y,b)?(fe.h(a,y),!1):rn.$(E,ne)?rn.$(a,x)?(rn.qh(a,y,x,b,E,te,fe),!1):rn.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,fe):(ae=(ae-te)/(ne-E),rn.$(a,x)?(x=ae*(a-E)+te,y<b?(E=y,y=b):E=b,x<E?(fe.h(a,E),!1):x>y?(fe.h(a,y),!1):(fe.h(a,x),!0)):(ne=(b-y)/(x-a),rn.$(ae,ne)?(rn.qh(a,y,x,b,E,te,fe),!1):(E=(ne*a-ae*E+te-y)/(ne-ae),rn.$(ne,0)?(a<x?(b=a,a=x):b=x,E<b?(fe.h(b,y),!1):E>a?(fe.h(a,y),!1):(fe.h(E,y),!0)):rn.qh(a,y,x,b,E,ne*(E-a)+y,fe))))},MA:function(a,y,x,b,E){return rn.Ve(x.x,x.y,b.x,b.y,a.x,a.y,y.x,y.y,E)},KA:function(a,y,x,b,E,te,ne,ae,fe,_e){function Te(Dt,Lt){var Gt=(Dt-a)*(Dt-a)+(Lt-y)*(Lt-y);Gt<je&&(je=Gt,fe.h(Dt,Lt))}var je=1/0;Te(fe.x,fe.y);var Ve=0,Qe=0,rt=0,ct=0;if(E<ne?(Ve=E,Qe=ne):(Ve=ne,Qe=E),te<ae?(rt=E,ct=ne):(rt=ne,ct=E),Ve=(Qe-Ve)/2+_e,_e=(ct-rt)/2+_e,E=(E+ne)/2,te=(te+ae)/2,Ve===0||_e===0)return fe;if(.5>(x>a?x-a:a-x)){if(Ve=1-(x-E)*(x-E)/(Ve*Ve),0>Ve)return fe;Ve=Math.sqrt(Ve),b=-_e*Ve+te,Te(x,_e*Ve+te),Te(x,b)}else{if(x=(b-y)/(x-a),b=1/(Ve*Ve)+x*x/(_e*_e),ae=2*x*(y-x*a)/(_e*_e)-2*x*te/(_e*_e)-2*E/(Ve*Ve),Ve=ae*ae-4*b*(2*x*a*te/(_e*_e)-2*y*te/(_e*_e)+te*te/(_e*_e)+E*E/(Ve*Ve)-1+(y-x*a)*(y-x*a)/(_e*_e)),0>Ve)return fe;Ve=Math.sqrt(Ve),_e=(-ae+Ve)/(2*b),Te(_e,x*_e-x*a+y),Ve=(-ae-Ve)/(2*b),Te(Ve,x*Ve-x*a+y)}return fe},Ff:function(a,y,x,b,E,te,ne,ae,fe){var _e=1e21,Te=a,je=y;if(rn.Ve(a,y,a,b,E,te,ne,ae,fe)){var Ve=(fe.x-E)*(fe.x-E)+(fe.y-te)*(fe.y-te);Ve<_e&&(_e=Ve,Te=fe.x,je=fe.y)}return rn.Ve(x,y,x,b,E,te,ne,ae,fe)&&(Ve=(fe.x-E)*(fe.x-E)+(fe.y-te)*(fe.y-te),Ve<_e&&(_e=Ve,Te=fe.x,je=fe.y)),rn.Ve(a,y,x,y,E,te,ne,ae,fe)&&(y=(fe.x-E)*(fe.x-E)+(fe.y-te)*(fe.y-te),y<_e&&(_e=y,Te=fe.x,je=fe.y)),rn.Ve(a,b,x,b,E,te,ne,ae,fe)&&(a=(fe.x-E)*(fe.x-E)+(fe.y-te)*(fe.y-te),a<_e&&(_e=a,Te=fe.x,je=fe.y)),fe.h(Te,je),1e21>_e},us:function(a,y,x){return rn.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,b,E,te,ne,ae){var fe=a+x,_e=y+b;return E===ne?(te<ae?(ne=te,te=ae):ne=ae,a<=E&&E<=fe&&ne<=_e&&te>=y):te===ae?(E<ne?(ae=E,E=ne):ae=ne,y<=te&&te<=_e&&ae<=fe&&E>=a):!!(Eo(a,y,x,b,E,te)||Eo(a,y,x,b,ne,ae)||rn.Rl(a,y,fe,y,E,te,ne,ae)||rn.Rl(fe,y,fe,_e,E,te,ne,ae)||rn.Rl(fe,_e,a,_e,E,te,ne,ae)||rn.Rl(a,_e,a,y,E,te,ne,ae))},Rl:function(a,y,x,b,E,te,ne,ae){return a===x&&y===b&&E===ne&&te===ae?a===E&&y===te:0>=rn.Fl(a,y,x,b,E,te)*rn.Fl(a,y,x,b,ne,ae)&&0>=rn.Fl(E,te,ne,ae,a,y)*rn.Fl(E,te,ne,ae,x,b)},Fl:function(a,y,x,b,E,te){return x-=a,b-=y,a=E-a,y=te-y,te=a*b-y*x,te===0&&(te=a*x+y*b,0<te&&(te=(a-x)*x+(y-b)*b,0>te&&(te=0))),te},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,b,E,te){var ne=Math.PI;te||(b*=ne/180,E*=ne/180);var ae=b>E?-1:1;te=[];var fe=ne/2,_e=b;if(b=Math.min(2*ne,Math.abs(E-b)),1e-5>b)return fe=_e+ae*Math.min(b,fe),ae=a+x*Math.cos(_e),_e=y+x*Math.sin(_e),a+=x*Math.cos(fe),y+=x*Math.sin(fe),x=(ae+a)/2,fe=(_e+y)/2,te.push([ae,_e,x,fe,x,fe,a,y]),te;for(;1e-5<b;)E=_e+ae*Math.min(b,fe),te.push(rn.Vy(x,_e,E,a,y)),b-=Math.abs(E-_e),_e=E;return te},Vy:function(a,y,x,b,E){var te=(x-y)/2,ne=a*Math.cos(te),ae=a*Math.sin(te),fe=-ae,_e=ne*ne+fe*fe,Te=_e+ne*ne+fe*ae;return _e=4/3*(Math.sqrt(2*_e*Te)-Te)/(ne*ae-fe*ne),ae=ne-_e*fe,ne=fe+_e*ne,fe=-ne,_e=te+y,te=Math.cos(_e),_e=Math.sin(_e),[b+a*Math.cos(y),E+a*Math.sin(y),b+ae*te-ne*_e,E+ae*_e+ne*te,b+ae*te-fe*_e,E+ae*_e+fe*te,b+a*Math.cos(x),E+a*Math.sin(x)]},No:function(a,y,x,b,E,te,ne){x=Math.floor((a-x)/E)*E+x,b=Math.floor((y-b)/te)*te+b;var ae=x;return x+E-a<E/2&&(ae=x+E),a=b,b+te-y<te/2&&(a=b+te),ne.h(ae,a),ne},vx:function(a,y){var x=Math.max(a,y);a=Math.min(a,y);var b;do y=x%a,x=b=a,a=y;while(0<y);return b},$y:function(a,y,x,b){var E=0>x,te=0>b;if(a<y)var ne=1,ae=0;else ne=0,ae=1;var fe=ne===0?a:y,_e=ne===0?x:b;return(ne===0?E:te)&&(_e=-_e),ne=ae,x=ne===0?x:b,(ne===0?E:te)&&(x=-x),rn.az(fe,ne===0?a:y,_e,x,0,0)},az:function(a,y,x,b,E,te){if(0<b)if(0<x){E=a*a,te=y*y,a*=x;var ne=y*b,ae=-te+ne,fe=-te+Math.sqrt(a*a+ne*ne);y=ae;for(var _e=0;9999999999>_e&&(y=.5*(ae+fe),!(y===ae||y===fe));++_e){var Te=a/(y+E),je=ne/(y+te);if(Te=Te*Te+je*je-1,0<Te)ae=y;else if(0>Te)fe=y;else break}x=E*x/(y+E)-x,b=te*b/(y+te)-b,x=Math.sqrt(x*x+b*b)}else x=Math.abs(b-y);else b=a*a-y*y,te=a*x,te<b?(b=te/b,te=y*Math.sqrt(Math.abs(1-b*b)),x=a*b-x,x=Math.sqrt(x*x+te*te)):x=Math.abs(x-a);return x},Ze:new Si,um:new Si,Mf:new Si,Nf:0,vm:100};rn.za=rn.AA;function Yn(a){pr(this),this.l=2,a===void 0&&(a=Yn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===Yn.o?this.ee=new Bn:(Yn.V===null&&(Yn.V=new Bn().freeze()),this.ee=Yn.V),this.aq=this.ee.Ja,this.Ip=new kn().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Xs,this.gg=Na,this.Rk=this.Sk=NaN,this.Uf=Gn}Yn.prototype.copy=function(){var a=new Yn;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===Yn.o){for(var y=this.ee.s,x=a.ee,b=0;b<y.length;b++)x.add(y[b].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},Yn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},Yn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==Yn.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},Yn.prototype.ka=function(){if(Object.isFrozen(this)&&Nt("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==Yn.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},Yn.prototype.Xa=function(a){if(!(a instanceof Yn))return!1;if(this.type!==a.type)return this.type===Yn.j&&a.type===Yn.o?wh(this,a):a.type===Yn.j&&this.type===Yn.o?wh(a,this):!1;if(this.type===Yn.o){var y=this.figures.s;a=a.figures.s;var x=y.length;if(x!==a.length)return!1;for(var b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0}return rn.B(this.startX,a.startX)&&rn.B(this.startY,a.startY)&&rn.B(this.endX,a.endX)&&rn.B(this.endY,a.endY)};function wh(a,y){return a.type!==Yn.j||y.type!==Yn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&rn.B(a.startX,y.startX)&&rn.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===xo&&rn.B(a.endX,y.endX)&&rn.B(a.endY,y.endY))))}Yn.ia=function(a){return a.toString()},Yn.prototype.qb=function(a){a.classType===Yn&&(this.type=a)},Yn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Yn.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 Yn.u:var y=new kn(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 Yn.F:if(y=new kn(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 Yn.o:y="",x=this.figures.s;for(var b=x.length,E=0;E<b;E++){var te=x[E];0<E&&(y+=" x "),te.isFilled&&(y+="F "),y+=te.toString(a)}return y;default:return this.type.toString()}},Yn.nb=function(a){a=a.split(/[Xx]/);for(var y=a.length,x="",b=0;b<y;b++){var E=a[b];x=E.match(/[Ff]/)!==null?b===0?x+E:x+("X"+(E[0]===" "?"":" ")+E):x+((b===0?"":"X ")+"F"+(E[0]===" "?"":" ")+E)}return x},Yn.parse=function(a,y){function x(){return ct>=Vt-1?!0:_e[ct+1].match(Qt)!==null}function b(){return ct++,_e[ct]}function E(Qi){var Zi=parseFloat(b()),no=parseFloat(b());Dt===Dt.toLowerCase()&&(Zi=Zt.x+Zi,no=Zt.y+no),Qi.h(Zi,no)}function te(){return E(Zt),Zt}function ne(){return E(Gt),Gt}function ae(){var Qi=Lt.toLowerCase();return Qi!=="c"&&Qi!=="s"&&Qi!=="q"&&Qi!=="t"?Zt:new Mt(2*Zt.x-Gt.x,2*Zt.y-Gt.y)}y===void 0&&(y=!1);var fe=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(fe,"$1 $2"),a=a.replace(fe,"$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 _e=a.split(" ");for(a=0;a<_e.length;a++){var Te=_e[a];if(Te.match(/(\.[0-9]*)(\.)/gm)!==null){fe=Hn();for(var je="",Ve=!1,Qe=0;Qe<Te.length;Qe++){var rt=Te[Qe];rt!=="."||Ve?rt==="."?(fe.push(je),je="."):je+=rt:(Ve=!0,je+=rt)}for(fe.push(je),_e.splice(a,1),Te=0;Te<fe.length;Te++)_e.splice(a+Te,0,fe[Te]);a+=fe.length-1,ei(fe)}}var ct=-1,Dt="",Lt="";fe=new Mt(0,0);var Gt=new Mt(0,0),Zt=new Mt(0,0),Vt=_e.length;a=A1(null),Ve=je=Te=!1,Qe=!0,rt=null;for(var Qt=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(ct>=Vt-1);)if(Lt=Dt,Dt=b(),Dt!=="")switch(Dt.toUpperCase()){case"X":Qe=!0,je=Te=!1;break;case"M":for(rt=te(),a.mc===null||Qe===!0?(Sp(a,rt.x,rt.y,Te,!je,Ve),Qe=!1):a.moveTo(rt.x,rt.y),fe.assign(Zt);!x();)rt=te(),a.lineTo(rt.x,rt.y);break;case"L":for(;!x();)rt=te(),a.lineTo(rt.x,rt.y);break;case"H":for(;!x();)Zt=new Mt((Dt===Dt.toLowerCase()?Zt.x:0)+parseFloat(b()),Zt.y),a.lineTo(Zt.x,Zt.y);break;case"V":for(;!x();)Zt=new Mt(Zt.x,(Dt===Dt.toLowerCase()?Zt.y:0)+parseFloat(b())),a.lineTo(Zt.x,Zt.y);break;case"C":for(;!x();){rt=new Mt,E(rt);var yn=ne(),ri=te();Ih(a,rt.x,rt.y,yn.x,yn.y,ri.x,ri.y)}break;case"S":for(;!x();)rt=ae(),yn=ne(),ri=te(),Ih(a,rt.x,rt.y,yn.x,yn.y,ri.x,ri.y);break;case"Q":for(;!x();)rt=ne(),yn=te(),Um(a,rt.x,rt.y,yn.x,yn.y);break;case"T":for(;!x();)Gt=rt=ae(),yn=te(),Um(a,rt.x,rt.y,yn.x,yn.y);break;case"B":for(;!x();){rt=parseFloat(b()),yn=parseFloat(b()),ri=parseFloat(b());var fi=parseFloat(b()),li=parseFloat(b()),Vn=li,Rn=!1;x()||(Vn=parseFloat(b()),x()||(Rn=parseFloat(b())!==0)),Dt===Dt.toLowerCase()&&(ri+=Zt.x,fi+=Zt.y),a.arcTo(rt,yn,ri,fi,li,Vn,Rn)}break;case"A":for(;!x();)rt=Math.abs(parseFloat(b())),yn=Math.abs(parseFloat(b())),ri=parseFloat(b()),li=fi=!1,Rn=Vn=0,Vn=b(),Vn.length===1?(fi=!!parseFloat(Vn),li=!!parseFloat(b()),Vn=parseFloat(b())):Vn.length===2?(fi=!!parseFloat(Vn[0]),li=!!parseFloat(Vn[1]),Vn=parseFloat(b())):(fi=!!parseFloat(Vn[0]),li=!!parseFloat(Vn[1]),Vn=parseFloat(Vn.slice(2))),Rn=parseFloat(b()),Dt===Dt.toLowerCase()&&(Vn=Zt.x+Vn,Rn=Zt.y+Rn),Zt.h(Vn,Rn),Cx(a,rt,yn,ri,fi,li,Vn,Rn);break;case"Z":bx(a),Zt.assign(fe);break;case"F":for(rt="",yn=1;_e[ct+yn];)if(_e[ct+yn]==="0")Ve=!0,yn++;else if(_e[ct+yn].match(/[Uu]/)!==null)yn++;else if(_e[ct+yn].match(Qt)===null)yn++;else{rt=_e[ct+yn];break}rt.match(/[Mm]/)?Te=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(rt="",yn=1;_e[ct+yn];)if(_e[ct+yn].match(/[Ff]/)!==null)yn++;else if(_e[ct+yn].match(Qt)===null)yn++;else{rt=_e[ct+yn];break}rt.match(/[Mm]/)?je=!0:a.mc.isShadowed=!1}if(fe=a.os,Gm=a,y)for(y=fe.figures.iterator;y.next();)y.value.isFilled=!0;return fe},Yn.Ha=function(a,y){for(var x=a.length,b=Mt.alloc(),E=0;E<x;E++){var te=a[E];b.x=te[0],b.y=te[1],y.Ga(b),te[0]=b.x,te[1]=b.y,b.x=te[2],b.y=te[3],y.Ga(b),te[2]=b.x,te[3]=b.y,b.x=te[4],b.y=te[5],y.Ga(b),te[4]=b.x,te[5]=b.y,b.x=te[6],b.y=te[7],y.Ga(b),te[6]=b.x,te[7]=b.y}Mt.free(b)},Yn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===Yn.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},Yn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===Yn.o){this.aq=this.figures.Ja;for(var a=this.figures.s,y=a.length,x=0;x<y;x++){var b=a[x];b._isInvalidBounds=!1;var E=b.segments;b.sr=E.Ja,b=E.s,E=b.length;for(var te=0;te<E;te++){var ne=b[te];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),Qh(this,a,!1),Ao(a,0,0,0,0),a.freeze()},Yn.prototype.ix=function(){var a=new kn;return Qh(this,a,!0),a};function Qh(a,y,x){switch(a.type){case Yn.j:case Yn.u:case Yn.F:x?y.h(a.od,a.pd,0,0):Ao(y,a.od,a.pd,0,0),Ao(y,a.Dc,a.Ec,0,0);break;case Yn.o:var b=a.figures;a=b.s,b=b.length;for(var E=0;E<b;E++){var te=a[E];x&&E===0?y.h(te.startX,te.startY,0,0):Ao(y,te.startX,te.startY,0,0);for(var ne=te.segments.s,ae=ne.length,fe=te.startX,_e=te.startY,Te=0;Te<ae;Te++){var je=ne[Te];switch(je.type){case xo:case Ms:fe=je.endX,_e=je.endY,Ao(y,fe,_e,0,0);break;case ga:rn.Dl(fe,_e,je.point1X,je.point1Y,je.point2X,je.point2Y,je.endX,je.endY,.5,y),fe=je.endX,_e=je.endY;break;case dl:rn.iv(fe,_e,je.point1X,je.point1Y,je.endX,je.endY,.5,y),fe=je.endX,_e=je.endY;break;case cs:case Cl:var Ve=je.type===cs?Da(je,te):$s(je,te,fe,_e),Qe=Ve.length;if(Qe===0){fe=je.type===cs?je.centerX:je.endX,_e=je.type===cs?je.centerY:je.endY,Ao(y,fe,_e,0,0);break}je=null;for(var rt=0;rt<Qe;rt++)je=Ve[rt],rn.Dl(je[0],je[1],je[2],je[3],je[4],je[5],je[6],je[7],.5,y);je!==null&&(fe=je[6],_e=je[7]);break;default:Nt("Unknown Segment type: "+je.type)}}}break;default:Nt("Unknown Geometry type: "+a.type)}}Yn.prototype.normalize=function(){this._isFrozen&&un(this);var a=this.ix();return this.offset(-a.x,-a.y),new Mt(-a.x,-a.y)},Yn.prototype.offset=function(a,y){return this._isFrozen&&un(this),this.transform(1,0,0,1,a,y),this},Yn.prototype.scale=function(a,y){return this._isFrozen&&un(this),this.transform(a,0,0,y,0,0),this},Yn.prototype.rotate=function(a,y,x){this._isFrozen&&un(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=gr.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),gr.free(b),this},it=Yn.prototype,it.transform=function(a,y,x,b,E,te){switch(this.type){case Yn.j:case Yn.u:case Yn.F:var ne=this.od,ae=this.pd;this.od=ne*a+ae*x+E,this.pd=ne*y+ae*b+te,ne=this.Dc,ae=this.Ec,this.Dc=ne*a+ae*x+E,this.Ec=ne*y+ae*b+te;break;case Yn.o:for(var fe=this.figures.s,_e=fe.length,Te=0;Te<_e;Te++){var je=fe[Te];ne=je.startX,ae=je.startY,je.startX=ne*a+ae*x+E,je.startY=ne*y+ae*b+te,je=je.segments.s;for(var Ve=je.length,Qe=0;Qe<Ve;Qe++){var rt=je[Qe];switch(rt.type){case xo:case Ms:ne=rt.endX,ae=rt.endY,rt.endX=ne*a+ae*x+E,rt.endY=ne*y+ae*b+te;break;case ga:ne=rt.point1X,ae=rt.point1Y,rt.point1X=ne*a+ae*x+E,rt.point1Y=ne*y+ae*b+te,ne=rt.point2X,ae=rt.point2Y,rt.point2X=ne*a+ae*x+E,rt.point2Y=ne*y+ae*b+te,ne=rt.endX,ae=rt.endY,rt.endX=ne*a+ae*x+E,rt.endY=ne*y+ae*b+te;break;case dl:ne=rt.point1X,ae=rt.point1Y,rt.point1X=ne*a+ae*x+E,rt.point1Y=ne*y+ae*b+te,ne=rt.endX,ae=rt.endY,rt.endX=ne*a+ae*x+E,rt.endY=ne*y+ae*b+te;break;case cs:ne=rt.centerX,ae=rt.centerY,rt.centerX=ne*a+ae*x+E,rt.centerY=ne*y+ae*b+te,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),rt.startAngle+=ne),0>a&&(rt.startAngle=180-rt.startAngle,rt.sweepAngle=-rt.sweepAngle),0>b&&(rt.startAngle=-rt.startAngle,rt.sweepAngle=-rt.sweepAngle),rt.radiusX*=Math.sqrt(a*a+x*x),rt.radiusY!==void 0&&(rt.radiusY*=Math.sqrt(y*y+b*b));break;case Cl:if(ne=rt.endX,ae=rt.endY,rt.endX=ne*a+ae*x+E,rt.endY=ne*y+ae*b+te,rt.radiusX===0||rt.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),rt.xAxisRotation+=ne),0>a&&(rt.xAxisRotation=180-rt.xAxisRotation,rt.isClockwiseArc=!rt.isClockwiseArc),0>b&&(rt.xAxisRotation=-rt.xAxisRotation,rt.isClockwiseArc=!rt.isClockwiseArc),rt.radiusX*=Math.sqrt(a*a+x*x),rt.radiusY*=Math.sqrt(y*y+b*b);break;default:Nt("Unknown Segment type: "+rt.type)}}}}return this._isInvalidBounds=!0,this},it.ca=function(a,y){y===void 0&&(y=0);var x=this.od,b=this.pd,E=this.Dc,te=this.Ec;switch(this.type){case Yn.j:return rn.Yb(x,b,E,te,y,a.x,a.y);case Yn.u:var ne=kn.allocAt(Math.min(x,E)-y,Math.min(b,te)-y,Math.abs(E-x)+2*y,Math.abs(te-b)+2*y);return a=ne.ca(a),kn.free(ne),a;case Yn.F:ne=Math.min(x,E)-y;var ae=Math.min(b,te)-y;return x=(Math.abs(E-x)+2*y)/2,y=(Math.abs(te-b)+2*y)/2,0>=x||0>=y?!1:(ne=a.x-(ne+x),ae=a.y-(ae+y),1>=ne*ne/(x*x)+ae*ae/(y*y));case Yn.o:return Mu(this,a,y,!0,!1);default:return!1}};function Mu(a,y,x,b,E){var te=y.x;y=y.y;for(var ne=a.bounds.x-20,ae=0,fe,_e,Te,je,Ve=a.figures.s,Qe=Ve.length,rt=0;rt<Qe;rt++){var ct=Ve[rt],Dt=!ct.isEvenOdd;if(ct.isFilled){if(b&&ct.ca(te,y,x))return!0;var Lt=ct.segments;fe=ct.startX,_e=ct.startY;for(var Gt=fe,Zt=_e,Vt=Lt.s,Qt=0;Qt<=Lt.length;Qt++){var yn=void 0;if(Qt!==Lt.length){yn=Vt[Qt];var ri=yn.type;a=yn.endX,je=yn.endY}else ri=xo,a=Gt,je=Zt;switch(ri){case Ms:if(Gt=Tu(te,y,ne,y,fe,_e,Gt,Zt),isNaN(Gt))return!0;ae+=Gt,Gt=a,Zt=je;break;case xo:if(fe=Tu(te,y,ne,y,fe,_e,a,je),isNaN(fe))return!0;ae+=fe;break;case ga:Te=rn.Fo(fe,_e,yn.point1X,yn.point1Y,yn.point2X,yn.point2Y,a,je,ne,y,te,y,.5),ae+=Te;break;case dl:Te=rn.Fo(fe,_e,(fe+2*yn.point1X)/3,(_e+2*yn.point1Y)/3,(2*yn.point1X+a)/3,(2*yn.point1Y+je)/3,a,je,ne,y,te,y,.5),ae+=Te;break;case cs:case Cl:ri=yn.type===cs?Da(yn,ct):$s(yn,ct,fe,_e);var fi=ri.length;if(fi===0){if(fe=Tu(te,y,ne,y,fe,_e,yn.type===cs?yn.centerX:yn.endX,yn.type===cs?yn.centerY:yn.endY),isNaN(fe))return!0;ae+=fe;break}yn=null;for(var li=0;li<fi;li++){if(yn=ri[li],li===0){if(Te=Tu(te,y,ne,y,fe,_e,yn[0],yn[1]),isNaN(Te))return!0;ae+=Te}Te=rn.Fo(yn[0],yn[1],yn[2],yn[3],yn[4],yn[5],yn[6],yn[7],ne,y,te,y,.5),ae+=Te}yn!==null&&(a=yn[6],je=yn[7]);break;default:Nt("Unknown Segment type: "+yn.type)}fe=a,_e=je}if(Dt){if(ae!==0)return!0}else if(ae%2!==0)return!0;ae=0}else if(ct.ca(te,y,E?x:x+2))return!0}return!1}function Tu(a,y,x,b,E,te,ne,ae){if(rn.Yb(E,te,ne,ae,.05,a,y))return NaN;var fe=(a-x)*(te-ae);if(fe===0)return 0;var _e=((a*b-y*x)*(E-ne)-(a-x)*(E*ae-te*ne))/fe;if(y=(a*b-y*x)*(te-ae)/fe,_e>=a)return 0;if((E>ne?E-ne:ne-E)<(te>ae?te-ae:ae-te)){if(te<ae){if(y<te||y>ae)return 0}else if(y<ae||y>te)return 0}else if(E<ne){if(_e<E||_e>ne)return 0}else if(_e<ne||_e>E)return 0;return 0<fe?1:-1}function Wu(a,y,x,b){a=a.figures.s;for(var E=a.length,te=0;te<E;te++)if(a[te].ca(y,x,b))return!0;return!1}it.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new Mt),this.type===Yn.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,b=this.flattenedLengths,E=x.length,te=this.flattenedTotalLength*a,ne=0,ae=0;ae<E;ae++){var fe=b[ae],_e=fe.length;for(a=0;a<_e;a++){var Te=fe[a];if(ne+Te>=te)return b=te-ne,b=Te===0?0:b/Te,x=x[ae],ae=x[2*a],E=x[2*a+1],y.h(ae+(x[2*a+2]-ae)*b,E+(x[2*a+3]-E)*b),y;ne+=Te}}return y},it.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===Yn.j)return 180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI;for(var y=this.flattenedSegments,x=this.flattenedLengths,b=y.length,E=this.flattenedTotalLength*a,te=0,ne=0;ne<b;ne++){var ae=x[ne],fe=ae.length;for(a=0;a<fe;a++){var _e=ae[a];if(te+_e>=E)return E=y[ne],y=E[2*a],x=E[2*a+1],b=E[2*a+2],a=E[2*a+3],1>Math.abs(b-y)&&1>Math.abs(a-x)?0:1>Math.abs(b-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=b-y?0:180:180*Math.atan2(a-x,b-y)/Math.PI;te+=_e}}return NaN},it.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===Yn.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,b=this.flattenedLengths,E=x.length,te=this.flattenedTotalLength*a,ne=0,ae=0;ae<E;ae++){var fe=b[ae],_e=fe.length;for(a=0;a<_e;a++){var Te=fe[a];if(ne+Te>=te)return b=te-ne,b=Te===0?0:b/Te,Te=x[ae],x=Te[2*a],ae=Te[2*a+1],E=Te[2*a+2],a=Te[2*a+3],y[0]=x+(E-x)*b,y[1]=ae+(a-ae)*b,y[2]=1>Math.abs(E-x)&&1>Math.abs(a-ae)?0:1>Math.abs(E-x)?0<=a-ae?90:270:1>Math.abs(a-ae)?0<=E-x?0:180:180*Math.atan2(a-ae,E-x)/Math.PI,y;ne+=Te}}return y},it.xx=function(a){if(this.type===Yn.j){var y=this.startX,x=this.startY,b=this.endX,E=this.endY;if(y!==b||x!==E){var te=a.x;if(a=a.y,y===b){if(x<E){var ne=x;b=E}else ne=E,b=x;return a<=ne?ne===x?0:1:a>=b?b===x?0:1:Math.abs(a-x)/(b-ne)}if(x===E)return y<b?ne=y:(ne=b,b=y),te<=ne?ne===y?0:1:te>=b?b===y?0:1:Math.abs(te-y)/(b-ne);ne=(b-y)*(b-y)+(E-x)*(E-x);var ae=Mt.alloc();return rn.qh(y,x,b,E,te,a,ae),a=ae.x,te=ae.y,Mt.free(ae),Math.sqrt(((a-y)*(a-y)+(te-x)*(te-x))/ne)}}else if(this.type===Yn.u){ne=this.startX,ae=this.startY;var fe=this.endX;if(E=this.endY,ne!==fe||ae!==E){y=fe-ne,x=E-ae,te=2*y+2*x,b=a.x,a=a.y,b=Math.min(Math.max(b,ne),fe),a=Math.min(Math.max(a,ae),E),ne=Math.abs(b-ne),fe=Math.abs(b-fe),ae=Math.abs(a-ae),E=Math.abs(a-E);var _e=Math.min(ne,fe,ae,E);if(_e===ae)return b/te;if(_e===fe)return(y+a)/te;if(_e===E)return(2*y+x-b)/te;if(_e===ne)return(2*y+2*x-a)/te}}else{y=this.flattenedSegments,x=this.flattenedLengths,te=this.flattenedTotalLength,b=Mt.alloc(),E=1/0,ae=ne=0,fe=y.length;for(var Te=_e=0,je=0;je<fe;je++)for(var Ve=y[je],Qe=x[je],rt=Ve.length,ct=0;ct<rt;ct+=2){var Dt=Ve[ct],Lt=Ve[ct+1];if(ct!==0){rn.qh(_e,Te,Dt,Lt,a.x,a.y,b);var Gt=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);Gt<E&&(E=Gt,ne=ae,ne+=Math.sqrt((b.x-_e)*(b.x-_e)+(b.y-Te)*(b.y-Te))),ae+=Qe[(ct-2)/2]}_e=Dt,Te=Lt}return Mt.free(b),a=ne/te,0>a?0:1<a?1:a}return 0};function bh(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],b=[],E=[];if(a.type===Yn.j)b.push(a.startX),b.push(a.startY),b.push(a.endX),b.push(a.endY),y.push(b),E.push(Math.sqrt((a.startX-a.endX)*(a.startX-a.endX)+(a.startY-a.endY)*(a.startY-a.endY))),x.push(E);else if(a.type===Yn.u)b.push(a.startX),b.push(a.startY),b.push(a.endX),b.push(a.startY),b.push(a.endX),b.push(a.endY),b.push(a.startX),b.push(a.endY),b.push(a.startX),b.push(a.startY),y.push(b),E.push(Math.abs(a.startX-a.endX)),E.push(Math.abs(a.startY-a.endY)),E.push(Math.abs(a.startX-a.endX)),E.push(Math.abs(a.startY-a.endY)),x.push(E);else if(a.type===Yn.F){var te=new Vs;te.startX=a.endX,te.startY=(a.startY+a.endY)/2;var ne=new $r(cs);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,te.add(ne),a=Da(ne,te),E=a.length,E===0)b.push(ne.centerX),b.push(ne.centerY);else{ne=te.startX,te=te.startY;for(var ae=0;ae<E;ae++){var fe=a[ae];rn.Qe(ne,te,fe[2],fe[3],fe[4],fe[5],fe[6],fe[7],.5,b),ne=fe[6],te=fe[7]}}y.push(b),x.push(Cc(b))}else for(a=a.figures.iterator;a.next();){E=a.value,b=[],b.push(E.startX),b.push(E.startY),ne=E.startX,te=E.startY,ae=ne,fe=te;for(var _e=E.segments.s,Te=_e.length,je=0;je<Te;je++){var Ve=_e[je];switch(Ve.type){case Ms:4<=b.length&&(y.push(b),x.push(Cc(b))),b=[],b.push(Ve.endX),b.push(Ve.endY),ne=Ve.endX,te=Ve.endY,ae=ne,fe=te;break;case xo:b.push(Ve.endX),b.push(Ve.endY),ne=Ve.endX,te=Ve.endY;break;case ga:rn.Qe(ne,te,Ve.point1X,Ve.point1Y,Ve.point2X,Ve.point2Y,Ve.endX,Ve.endY,.5,b),ne=Ve.endX,te=Ve.endY;break;case dl:rn.ep(ne,te,Ve.point1X,Ve.point1Y,Ve.endX,Ve.endY,.5,b),ne=Ve.endX,te=Ve.endY;break;case cs:var Qe=Da(Ve,E),rt=Qe.length;if(rt===0){b.push(Ve.centerX),b.push(Ve.centerY),ne=Ve.centerX,te=Ve.centerY;break}for(var ct=0;ct<rt;ct++){var Dt=Qe[ct];rn.Qe(ne,te,Dt[2],Dt[3],Dt[4],Dt[5],Dt[6],Dt[7],.5,b),ne=Dt[6],te=Dt[7]}break;case Cl:if(Qe=$s(Ve,E,ne,te),rt=Qe.length,ct=Ve.endX,Dt=Ve.endY,rt===0){b.push(ct),b.push(Dt),ne=ct,te=Dt;break}for(ct=0;ct<rt;ct++)Dt=Qe[ct],rn.Qe(ne,te,Dt[2],Dt[3],Dt[4],Dt[5],Dt[6],Dt[7],.5,b),ne=Dt[6],te=Dt[7];break;default:Nt("Segment not of valid type: "+Ve.type)}Ve.isClosed&&(b.push(ae),b.push(fe))}4<=b.length&&(y.push(b),x.push(Cc(b)))}}}function Cc(a){for(var y=[],x=0,b=0,E=a.length,te=0;te<E;te+=2){var ne=a[te],ae=a[te+1];te!==0&&y.push(Math.sqrt(Yo(x,b,ne,ae))),x=ne,b=ae}return y}it.add=function(a){return this.ee.add(a),this},it.pm=function(a,y,x,b,E,te,ne,ae){return this._isFrozen&&un(this),this.fg=new yi(a,y,E,te).freeze(),this.gg=new yi(x,b,ne,ae).freeze(),this},Ye.Object.defineProperties(Yn.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 bh(this),this.tk}},flattenedLengths:{get:function(){return bh(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===Yn.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===Yn.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,b=a=0;b<x;b++)for(var E=y[b],te=E.length,ne=0;ne<te;ne++)a+=E[ne]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&un(this,a),this.na=a,a===Yn.o?this.ee=new Bn:(Yn.V===null&&(Yn.V=new Bn().freeze()),this.ee=Yn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&un(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&un(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&un(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&un(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&un(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&un(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&un(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&un(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),Yn.prototype.setSpots=Yn.prototype.pm,Yn.prototype.add=Yn.prototype.add,Yn.prototype.getFractionForPoint=Yn.prototype.xx,Yn.prototype.getPointAndAngleAlongPath=Yn.prototype.Qu,Yn.prototype.getAngleAlongPath=Yn.prototype.wx,Yn.prototype.getPointAlongPath=Yn.prototype.Pu,Yn.prototype.containsPoint=Yn.prototype.ca,Yn.prototype.transform=Yn.prototype.transform,Yn.prototype.rotate=Yn.prototype.rotate,Yn.prototype.scale=Yn.prototype.scale,Yn.prototype.offset=Yn.prototype.offset,Yn.prototype.normalize=Yn.prototype.normalize,Yn.prototype.computeBoundsWithoutOrigin=Yn.prototype.ix,Yn.prototype.equalsApprox=Yn.prototype.Xa,Yn.className="Geometry",Yn.j=new Ln(Yn,"Line",0),Yn.u=new Ln(Yn,"Rectangle",1),Yn.F=new Ln(Yn,"Ellipse",2),Yn.o=new Ln(Yn,"Path",3),Yn.V=null,Yn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",Yn.className="Geometry",Yn.stringify=Yn.ia,Yn.fillPath=Yn.nb,Yn.parse=Yn.parse,Yn.Line=Yn.j,Yn.Rectangle=Yn.u,Yn.Ellipse=Yn.F,Yn.Path=Yn.o;function Vs(a,y,x,b,E){pr(this),x===void 0&&(x=!0),b===void 0&&(b=!0),E===void 0&&(E=!1),this.l=2|(x?4:0)|(b?8:0)|(E?16:0),a!==void 0?this.od=a:this.od=0,y!==void 0?this.pd=y:this.pd=0,this.pl=new Bn,this.sr=this.pl.Ja,this.fw=null}Vs.prototype.copy=function(){var a=new Vs;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,b=a.pl,E=0;E<x;E++){var te=y[E].copy();b.add(te)}return a.sr=this.sr,a.fw=this.fw,a},it=Vs.prototype,it.Xa=function(a){if(!(a instanceof Vs&&rn.B(this.startX,a.startX)&&rn.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 b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0},it.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,b=x.length,E=0;E<b;E++)y+=" "+x[E].toString(a);return y},it.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},it.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},it.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},it.add=function(a){return this.pl.add(a),this},it.ca=function(a,y,x){for(var b=this.startX,E=this.startY,te=b,ne=E,ae=this.segments.s,fe=ae.length,_e=0;_e<fe;_e++){var Te=ae[_e];switch(Te.type){case Ms:te=Te.endX,ne=Te.endY,b=Te.endX,E=Te.endY;break;case xo:if(rn.Yb(b,E,Te.endX,Te.endY,x,a,y))return!0;b=Te.endX,E=Te.endY;break;case ga:if(rn.cs(b,E,Te.point1X,Te.point1Y,Te.point2X,Te.point2Y,Te.endX,Te.endY,.5,a,y,x))return!0;b=Te.endX,E=Te.endY;break;case dl:if(rn.jv(b,E,Te.point1X,Te.point1Y,Te.endX,Te.endY,.5,a,y,x))return!0;b=Te.endX,E=Te.endY;break;case cs:case Cl:var je=Te.type===cs?Da(Te,this):$s(Te,this,b,E),Ve=je.length,Qe=Te.type===cs?Te.centerX:Te.endX,rt=Te.type===cs?Te.centerY:Te.endY;if(Ve===0){if(rn.Yb(b,E,Qe,rt,x,a,y))return!0;b=Qe,E=rt;break}for(Qe=null,rt=0;rt<Ve;rt++)if(Qe=je[rt],rt===0&&rn.Yb(b,E,Qe[0],Qe[1],x,a,y)||rn.cs(Qe[0],Qe[1],Qe[2],Qe[3],Qe[4],Qe[5],Qe[6],Qe[7],.5,a,y,x))return!0;Qe!==null&&(b=Qe[6],E=Qe[7]);break;default:Nt("Unknown Segment type: "+Te.type)}if(Te.isClosed&&(b!==te||E!==ne)&&rn.Yb(b,E,te,ne,x,a,y))return!0}return!1},Ye.Object.defineProperties(Vs.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&&un(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&un(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&un(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&un(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&un(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&un(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Vs.prototype.add=Vs.prototype.add,Vs.prototype.equalsApprox=Vs.prototype.Xa,Vs.className="PathFigure";function $r(a,y,x,b,E,te,ne,ae){pr(this),a===void 0&&(a=xo),this.na=a,this.l=2,y!==void 0?this.Dc=y:this.Dc=0,x!==void 0?this.Ec=x:this.Ec=0,b===void 0&&(b=0),E===void 0&&(E=0),te===void 0&&(te=0),ne===void 0&&(ne=0),a===Cl?(a=te%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(b,0),this.Pg=Math.max(E,0),typeof ne=="boolean"?ne&&(this.isLargeArc=!0):typeof ne=="number"&&ne&&(this.isLargeArc=!0),ae&&(this.isClockwiseArc=!0)):(this.Ne=b,this.Vh=E,a===cs&&(te=Math.max(te,0)),this.Wh=te,typeof ne=="number"?(a===cs&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}$r.prototype.copy=function(){var a=new $r;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},it=$r.prototype,it.Xa=function(a){if(!(a instanceof $r)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Ms:case xo:return rn.B(this.endX,a.endX)&&rn.B(this.endY,a.endY);case ga:return rn.B(this.endX,a.endX)&&rn.B(this.endY,a.endY)&&rn.B(this.point1X,a.point1X)&&rn.B(this.point1Y,a.point1Y)&&rn.B(this.point2X,a.point2X)&&rn.B(this.point2Y,a.point2Y);case dl:return rn.B(this.endX,a.endX)&&rn.B(this.endY,a.endY)&&rn.B(this.point1X,a.point1X)&&rn.B(this.point1Y,a.point1Y);case cs:return rn.B(this.startAngle,a.startAngle)&&rn.B(this.sweepAngle,a.sweepAngle)&&rn.B(this.centerX,a.centerX)&&rn.B(this.centerY,a.centerY)&&rn.B(this.radiusX,a.radiusX)&&rn.B(this.radiusY,a.radiusY);case Cl:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&rn.B(this.xAxisRotation,a.xAxisRotation)&&rn.B(this.endX,a.endX)&&rn.B(this.endY,a.endY)&&rn.B(this.radiusX,a.radiusX)&&rn.B(this.radiusY,a.radiusY);default:return!1}},it.qb=function(a){a.classType===$r&&(this.type=a)},it.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Ms:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case xo:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ga: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 dl: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 cs: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 Cl: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":"")},it.freeze=function(){return this._isFrozen=!0,this},it.ka=function(){return this._isFrozen=!1,this},it.close=function(){return this.isClosed=!0,this};function Da(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,b=a.radiusY;if(b===void 0&&(b=x),x===0||b===0)return a.ae=[],a.ae;y=a.Ne;var E=a.Vh,te=rn.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var ne=gr.alloc();ne.reset(),x<b?ne.scale(1,b/x):ne.scale(x/b,1),Yn.Ha(te,ne),gr.free(ne)}for(x=te.length,b=0;b<x;b++)ne=te[b],ne[0]+=y,ne[1]+=E,ne[2]+=y,ne[3]+=E,ne[4]+=y,ne[5]+=E,ne[6]+=y,ne[7]+=E;return a.ae=te,a.ae}function $s(a,y,x,b){function E(ct,Dt,Lt,Gt){return(ct*Gt<Dt*Lt?-1:1)*Math.acos((ct*Lt+Dt*Gt)/(Math.sqrt(ct*ct+Dt*Dt)*Math.sqrt(Lt*Lt+Gt*Gt)))}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 te=a.Pg;y===0&&(y=1e-4),te===0&&(te=1e-4);var ne=Math.PI/180*a.Ne,ae=a.isLargeArc,fe=a.isClockwiseArc,_e=a.Dc,Te=a.Ec,je=Math.cos(ne),Ve=Math.sin(ne),Qe=je*(x-_e)/2+Ve*(b-Te)/2;ne=-Ve*(x-_e)/2+je*(b-Te)/2;var rt=Qe*Qe/(y*y)+ne*ne/(te*te);return 1<rt&&(y*=Math.sqrt(rt),te*=Math.sqrt(rt)),rt=(ae===fe?-1:1)*Math.sqrt((y*y*te*te-y*y*ne*ne-te*te*Qe*Qe)/(y*y*ne*ne+te*te*Qe*Qe)),isNaN(rt)&&(rt=0),ae=rt*y*ne/te,rt=rt*-te*Qe/y,isNaN(ae)&&(ae=0),isNaN(rt)&&(rt=0),x=(x+_e)/2+je*ae-Ve*rt,b=(b+Te)/2+Ve*ae+je*rt,Te=E(1,0,(Qe-ae)/y,(ne-rt)/te),je=(Qe-ae)/y,_e=(ne-rt)/te,Qe=(-Qe-ae)/y,ae=(-ne-rt)/te,ne=E(je,_e,Qe,ae),Qe=(je*Qe+_e*ae)/(Math.sqrt(je*je+_e*_e)*Math.sqrt(Qe*Qe+ae*ae)),-1>=Qe?ne=Math.PI:1<=Qe&&(ne=0),!fe&&0<ne&&(ne-=2*Math.PI),fe&&0>ne&&(ne+=2*Math.PI),fe=y>te?1:y/te,Qe=y>te?te/y:1,y=rn.jx(0,0,y>te?y:te,Te,Te+ne,!0),te=gr.alloc(),te.reset(),te.translate(x,b),te.rotate(a.Ne,0,0),te.scale(fe,Qe),Yn.Ha(y,te),gr.free(te),a.ae=y,a.ae}Ye.Object.defineProperties($r.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&&un(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&un(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&un(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&un(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&un(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&un(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&un(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&un(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&un(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Mn(a,">= zero",$r,"radiusX"),this._isFrozen&&un(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Mn(a,">= zero",$r,"radiusY"),this._isFrozen&&un(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&un(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&&un(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&&un(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&&un(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&&un(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),$r.prototype.equalsApprox=$r.prototype.Xa;var Ms=new Ln($r,"Move",0),xo=new Ln($r,"Line",1),ga=new Ln($r,"Bezier",2),dl=new Ln($r,"QuadraticBezier",3),cs=new Ln($r,"Arc",4),Cl=new Ln($r,"SvgArc",4);$r.className="PathSegment",$r.Move=Ms,$r.Line=xo,$r.Bezier=ga,$r.QuadraticBezier=dl,$r.Arc=cs,$r.SvgArc=Cl;function Ea(){this.H=null,this.xu=new Mt(0,0).freeze(),this.mt=new Mt(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}Ea.prototype.copy=function(){var a=new Ea;return this.clone(a)},Ea.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},Ea.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},Ea.prototype.So=function(a,y){var x=this.diagram;return x===null||Hd(x,a,y),y},Ea.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Hd(x,a,y),y.assign(x.Ps(y))),y},Ye.Object.defineProperties(Ea.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}}}),Ea.prototype.getMultiTouchDocumentPoint=Ea.prototype.Bz,Ea.prototype.getMultiTouchViewPoint=Ea.prototype.So,Ea.className="InputEvent";function Pc(){this.H=null,this.xa="",this.ar=this.Lr=null}Pc.prototype.copy=function(){var a=new Pc;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Pc.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},Ye.Object.defineProperties(Pc.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}}}),Pc.className="DiagramEvent";function Go(){this.Fm=Vo,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Go.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Go.prototype.copy=function(){var a=new Go;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=nn(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=nn(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=nn(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=nn(y)&&typeof y.J=="function"?y.J():y,a},Go.prototype.qb=function(a){a.classType===Go&&(this.change=a)},Go.prototype.toString=function(){var a="";return a=this.change===Ka?a+"* ":this.change===Vo?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===Ka?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=hi(this.object)),this.oldValue!==null&&(a+=" old: "+hi(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+hi(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Go.prototype.I=function(a){return a?this.oldValue:this.newValue},Go.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Go.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Go.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Go.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Go.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Ye.Object.defineProperties(Go.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===Ka&&(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}}}),Go.prototype.redo=Go.prototype.redo,Go.prototype.canRedo=Go.prototype.canRedo,Go.prototype.undo=Go.prototype.undo,Go.prototype.canUndo=Go.prototype.canUndo,Go.prototype.getParam=Go.prototype.Dz,Go.prototype.getValue=Go.prototype.I,Go.prototype.clear=Go.prototype.clear;var Ka=new Ln(Go,"Transaction",-1),Vo=new Ln(Go,"Property",0),vs=new Ln(Go,"Insert",1),ds=new Ln(Go,"Remove",2);Go.className="ChangedEvent",Go.Transaction=Ka,Go.Property=Vo,Go.Insert=vs,Go.Remove=ds;function Bs(){this.o=new Bn().freeze(),this.xa="",this.j=!1}Bs.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 b=this.changes.M(x);b!==null&&(y+=`
|
|
|
`+b.toString())}}return y},Bs.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()},Bs.prototype.canUndo=function(){return this.isComplete},Bs.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()}},Bs.prototype.canRedo=function(){return this.isComplete},Bs.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()}},Bs.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new ci,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===Vo&&b.object){var E=y.get(b.object);E||(E=new ci,y.set(b.object,E));var te=E.get(b.propertyName);te===null?E.set(b.propertyName,-1):(0<te&&a.cd(te,null),E.set(b.propertyName,x))}}for(x=y=0;x<a.count;x++)b=a.M(x),b!==null&&(x>y&&a.cd(y,b),y++);for(;a.length>y;)a.pop();a.freeze()}},Ye.Object.defineProperties(Bs.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}}}),Bs.prototype.optimize=Bs.prototype.ak,Bs.prototype.redo=Bs.prototype.redo,Bs.prototype.canRedo=Bs.prototype.canRedo,Bs.prototype.undo=Bs.prototype.undo,Bs.prototype.canUndo=Bs.prototype.canUndo,Bs.prototype.clear=Bs.prototype.clear,Bs.className="Transaction";function Fo(){this.Pt=new In,this.Jd=!1,this.u=new Bn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new Bn().freeze(),this.hl=new Bn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Fo.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,b=0;b<x;b++)0<b&&(y+=" "),y+=this.nestedTransactionNames.M(b);if(y+="]",a!==void 0&&0<a)for(x=this.history.count,b=0;b<x;b++)y+=`
|
|
|
`+this.history.M(b).toString(a-1);return y},Fo.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},Fo.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},it=Fo.prototype,it.Xw=function(a){this.Pt.add(a)},it.Rx=function(a){this.Pt.remove(a)},it.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},it.eb=function(a){return a===void 0&&(a=""),Rc(this,!0,a)},it.Kf=function(){return Rc(this,!1,"")};function Rc(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Dn("Ending transaction without having started a transaction: "+x);var b=a.transactionLevel===1,E=a.currentTransaction;b&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,E));var te=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&&(te=a.hl.M(ne-1),a.hl.mb(ne-1))}if(b){if(y)a.rq=!1,E===null&&x!==""&&(E=a.currentTransaction),a.isEnabled&&E!==null&&(E.isComplete||(E.isComplete=!0,E.name=x),a.lx(),y=a.history,y.ka(),b=a.maxHistoryLength,0<=b&&(b===0?y.clear():y.count>=b&&(te=y.M(0),te!==null&&te.clear(),y.mb(0),a.Ce--)),b===0||y.count!==0&&y.get(y.count-1)===E||(y.add(E),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,E);else{a.Fe=!0;try{a.isEnabled&&E!==null&&(E.isComplete=!0,E.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,E),a.Fe=!1}E!==null&&E.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&E!==null){for(a=te,x=E.changes,E=x.count-1;E>=a;E--)y=x.M(E),y!==null&&y.undo(),x.ka(),x.mb(E);x.freeze()}return!1}it.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()}},Fo.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Fo.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){Dn("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Fo.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Fo.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){Dn("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Fo.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new Go;for(b.change=Ka,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},Fo.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Bs);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||Dn("Change not within a transaction: "+x.toString()))}},Fo.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},Ye.Object.defineProperties(Fo.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}}}),Fo.prototype.handleChanged=Fo.prototype.Tu,Fo.prototype.redo=Fo.prototype.redo,Fo.prototype.undo=Fo.prototype.undo,Fo.prototype.canUndo=Fo.prototype.canUndo,Fo.prototype.discardHistoryAfterIndex=Fo.prototype.lx,Fo.prototype.rollbackTransaction=Fo.prototype.Kf,Fo.prototype.commitTransaction=Fo.prototype.eb,Fo.prototype.startTransaction=Fo.prototype.Ea,Fo.prototype.removeModel=Fo.prototype.Rx,Fo.prototype.addModel=Fo.prototype.Xw,Fo.prototype.clear=Fo.prototype.clear,Fo.className="UndoManager";function Wr(){pr(this),this.H=ac,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new Ea,this.Zr=-1}Wr.prototype.toString=function(){return this.name!==""?this.name+" Tool":Fn(this.constructor)},Wr.prototype.updateAdornments=function(){},Wr.prototype.canStart=function(){return this.isEnabled},Wr.prototype.doStart=function(){},Wr.prototype.doActivate=function(){this.isActive=!0},Wr.prototype.doDeactivate=function(){this.isActive=!1},Wr.prototype.doStop=function(){},Wr.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Wr.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Wr.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Wr.prototype.doMouseMove=function(){},Wr.prototype.doMouseUp=function(){this.stopTool()},Wr.prototype.doMouseWheel=function(){},Wr.prototype.canStartMultiTouch=function(){return!0},Wr.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Mt.allocAt(NaN,NaN)),b=y.So(1,Mt.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var E=b.x-x.x,te=b.y-x.y;a.Jw=Math.sqrt(E*E+te*te),y.bubbles=!1}Mt.free(x),Mt.free(b)},Wr.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Mt.allocAt(NaN,NaN)),b=y.So(1,Mt.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var E=b.x-x.x,te=b.y-x.y;te=Math.sqrt(E*E+te*te)/a.Jw,E=new Mt((Math.min(b.x,x.x)+Math.max(b.x,x.x))/2,(Math.min(b.y,x.y)+Math.max(b.y,x.y))/2),te*=a.Bw;var ne=a.commandHandler;if(te!==a.scale&&ne.canResetZoom(te)){var ae=a.zoomPoint;a.zoomPoint=E,ne.resetZoom(te),a.zoomPoint=ae}y.bubbles=!1}Mt.free(x),Mt.free(b)},Wr.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Wr.prototype.doKeyUp=function(){},Wr.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Wr.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Wr.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(Cr?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||(Cr?y.meta:y.control)||y.shift||a.clearSelection()}},Wr.prototype.standardMouseClick=function(a,y){a===void 0&&(a=null),y===void 0&&(y=function(E){return!E.layer.isTemporary});var x=this.diagram,b=x.lastInput;return a=x.ic(b.documentPoint,a,y),b.targetObject=a,Ad(a,b,x),b.handled};function Ad(a,y,x){if(y.handled=!1,a===null||a.If()){var b=0;y.left?b=y.clickCount===1?1:y.clickCount===2?2:1:y.right&&y.clickCount===1&&(b=3);var E="ObjectSingleClicked";if(a!==null){switch(b){case 1:E="ObjectSingleClicked";break;case 2:E="ObjectDoubleClicked";break;case 3:E="ObjectContextClicked"}b!==0&&x.R(E,a)}else{switch(b){case 1:E="BackgroundSingleClicked";break;case 2:E="BackgroundDoubleClicked";break;case 3:E="BackgroundContextClicked"}b!==0&&x.R(E)}if(a!==null)for(;a!==null;){switch(x=null,b){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,b){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)}}}Wr.prototype.standardMouseOver=function(){var a=this.diagram,y=a.lastInput;if(a.animationManager.zb!==!0){var x=a.skipsUndoManager;a.skipsUndoManager=!0;var b=a.viewportBounds.ca(y.documentPoint)?a.ic(y.documentPoint,null,null):null;!y.event||y.event.type!=="pointercancel"&&y.event.type!=="pointerout"||(b=null),y.targetObject=b;var E=!1;if(b!==a.Ck){var te=a.Ck,ne=te;for(a.Ck=b,this.doCurrentObjectChanged(te,b),y.handled=!1;te!==null;){var ae=te.mouseLeave;if(ae!==null&&(b===te||b!==null&&b.rg(te)||(ae(y,te,b),E=!0,y.handled)))break;te=te.panel}for(te=ne,y.handled=!1;b!==null&&(ne=b.mouseEnter,!(ne!==null&&(te===b||te!==null&&te.rg(b)||(ne(y,b,te),E=!0,y.handled))));)b=b.panel;b=a.Ck}if(b!==null){for(te=b,ne="";te!==null&&(ne=te.cursor,ne==="");)te=te.panel;for(a.currentCursor=ne,y.handled=!1,te=b;te!==null&&(b=te.mouseOver,!(b!==null&&(b(y,te),E=!0,y.handled)));)te=te.panel}else this.doUpdateCursor(null),b=a.mouseOver,b!==null&&(b(y),E=!0);E&&a.$b(),a.skipsUndoManager=x}},Wr.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Wr.prototype.doCurrentObjectChanged=function(){},Wr.prototype.standardMouseWheel=function(){var a=this.diagram,y=a.lastInput,x=y.delta;if(x!==0&&a.documentBounds.w()){var b=a.commandHandler,E=a.toolManager.mouseWheelBehavior;if(b!==null&&(E===rh&&!y.shift||E===ih&&y.control))(0<x?b.canIncreaseZoom():b.canDecreaseZoom())&&(E=a.zoomPoint,a.zoomPoint=y.viewPoint,0<x?b.increaseZoom():b.decreaseZoom(),a.zoomPoint=E),y.bubbles=!1;else if(E===rh&&y.shift||E===ih&&!y.control){b=a.position.copy();var te=y.event;E=te.deltaMode;var ne=te.deltaX;te=te.deltaY;var ae="pixel";if(ne===0&&te===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(ae,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(ae,0<x?"left":"right",Math.abs(x)));else{switch(E){case 0:ae="pixel";break;case 1:ae="line";break;case 2:ae="page"}ne!==0&&a.allowHorizontalScroll&&(ne*=a.scrollHorizontalLineChange/16,a.scroll(ae,0<ne?"right":"left",Math.abs(ne))),te!==0&&a.allowVerticalScroll&&(te*=a.scrollVerticalLineChange/16,a.scroll(ae,0<te?"down":"up",Math.abs(te)))}this.doWheelChange(a,b,y)}}},Wr.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Wr.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=mn(function(){x.doWaitAfter(b)},a)},Wr.prototype.cancelWaitAfter=function(){this.Zr!==-1&&_t.clearTimeout(this.Zr),this.Zr=-1},Wr.prototype.doWaitAfter=function(){},Wr.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof qr);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},Wr.prototype.isBeyondDragSize=function(a,y){var x=this.diagram;a===void 0&&(a=x.firstInput.viewPoint),y===void 0&&(y=x.lastInput.viewPoint);var b=x.toolManager.dragSize,E=b.width;return b=b.height,x.firstInput.isTouchEvent&&(E+=6,b+=6),Math.abs(y.x-a.x)>E||Math.abs(y.y-a.y)>b},Ye.Object.defineProperties(Wr.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof vn&&(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}}}),Wr.prototype.startTransaction=Wr.prototype.Ea,Wr.className="Tool";function Wo(){Wr.call(this),this.name="ToolManager",this.hb=new Bn,this.ob=new Bn,this.Hb=new Bn,this.F=this.V=850,this.o=new Qn(2,2).ja(),this.Ha=5e3,this.ia=ih,this.u=Ch,this.Mp=this.j=null,this.zj=-1}qe(Wo,Wr),Wo.prototype.initializeStandardTools=function(){},Wo.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof qr&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Wo.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===ic&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===ro){y.bubbles=!0;return}if(this.gestureBehavior===ic)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,b=0;b<x;b++){var E=this.mouseDownTools.M(b);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseDown());return}}a.lastInput.button===1&&(this.mouseWheelBehavior===ih?this.mouseWheelBehavior=rh:this.mouseWheelBehavior===rh&&(this.mouseWheelBehavior=ih)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Wo.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===ro){y.bubbles=!0;return}if(this.gestureBehavior===ic)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomMove();return}}if(this.isActive)for(var x=this.mouseMoveTools.length,b=0;b<x;b++){var E=this.mouseMoveTools.M(b);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseMove());return}}Nd(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Nd(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}Wo.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof qr&&(y===a||y.rg(a))||this.hideToolTip()},Wo.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()))},Wo.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)},Wo.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 qr)||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()},Wo.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof qr){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category="ToolTip",a.placeholder!==null&&(a.placeholder.scale=x.scale);var b=a.diagram;b!==null&&b!==x&&b.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionToolTip(a,y)}else a instanceof Yi&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(_t.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=mn(function(){E.hideToolTip()},a)}},Wo.prototype.positionToolTip=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),b=a.measuredBounds,E=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=b.width),x.x+b.width>E.right&&(x.x-=b.width+5/y.scale),x.x<E.x&&(x.x=E.x),x.y=x.y+20/y.scale+b.height>E.bottom?x.y-(b.height+5/y.scale):x.y+20/y.scale,x.y<E.y&&(x.y=E.y),a.position=x}},Wo.prototype.hideToolTip=function(){this.zj!==-1&&(_t.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof qr?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Yi&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Wo.prototype.doMouseUp=function(){this.cancelWaitAfter();var a=this.diagram;if(this.isActive)for(var y=this.mouseUpTools.length,x=0;x<y;x++){var b=this.mouseUpTools.M(x);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseUp());return}}a.doFocus(),this.doDeactivate()},Wo.prototype.doMouseWheel=function(){this.standardMouseWheel()},Wo.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Wo.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Wo.prototype.findTool=function(a){for(var y=this.mouseDownTools.length,x=0;x<y;x++){var b=this.mouseDownTools.M(x);if(b.name===a)return b}for(y=this.mouseMoveTools.length,x=0;x<y;x++)if(b=this.mouseMoveTools.M(x),b.name===a)return b;for(y=this.mouseUpTools.length,x=0;x<y;x++)if(b=this.mouseUpTools.M(x),b.name===a)return b;return null},Wo.prototype.replaceTool=function(a,y){y!==null&&(y.diagram=this.diagram);for(var x=this.mouseDownTools.length,b=0;b<x;b++){var E=this.mouseDownTools.M(b);if(E.name===a)return y!==null?this.mouseDownTools.cd(b,y):this.mouseDownTools.mb(b),E}for(x=this.mouseMoveTools.length,b=0;b<x;b++)if(E=this.mouseMoveTools.M(b),E.name===a)return y!==null?this.mouseMoveTools.cd(b,y):this.mouseMoveTools.mb(b),E;for(x=this.mouseUpTools.length,b=0;b<x;b++)if(E=this.mouseUpTools.M(b),E.name===a)return y!==null?this.mouseUpTools.cd(b,y):this.mouseUpTools.mb(b),E;return null},Wo.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)},Ye.Object.defineProperties(Wo.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 qr?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}}}),Wo.prototype.replaceStandardTool=Wo.prototype.gb;var ih=new Ln(Wo,"WheelScroll",0),rh=new Ln(Wo,"WheelZoom",1),Od=new Ln(Wo,"WheelNone",2),Ch=new Ln(Wo,"GestureZoom",3),ic=new Ln(Wo,"GestureCancel",4),ro=new Ln(Wo,"GestureNone",5);Wo.className="ToolManager",Wo.WheelScroll=ih,Wo.WheelZoom=rh,Wo.WheelNone=Od,Wo.GestureZoom=Ch,Wo.GestureCancel=ic,Wo.GestureNone=ro;function ns(){Wr.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 Mt(NaN,NaN),this.Fr=new Mt,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new In().freeze(),this.ia=new pe,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var ku;qe(ns,Wr),ns.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},ns.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},ns.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,(Cr?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},ns.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),ht=null,this.isActive=!0,this.tl.set(a.position),qh(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&&Ba(a),Qf(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,ht=this,bt=this.diagram,this.doSimulatedDragOut()))};function qh(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof $n?(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 Zn,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}ns.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},ns.prototype.Pd=function(a){return a===void 0?new ah(Gr):this.isGridSnapEnabled?new ah(new Mt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new ah(a.copy())},ns.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),Au(this),od(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<ku.count){for(var y=ku,x=y.length,b=0;b<x;b++){var E=y.M(b);ps(E),Fl(E),Au(E),E.diagram.ug()}y.clear()}ps(this),this.tl.h(NaN,NaN),bt!==null&&(bt.currentCursor=""),ht=bt=null,Fl(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),nd(a,!0)},ns.prototype.stopTransaction=function(){var a=this.diagram,y=Wr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function Au(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,Id(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function ed(){var a=ht;Fl(a),rc(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}ns.prototype.doCancel=function(){Fl(this),rc(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},ns.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},ns.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function uu(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var b=x.undoManager;for(b.isEnabled&&b.isInTransaction?b.currentTransaction!==null&&0<b.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):rc(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 ci,b=a.draggedParts.iterator;b.next();){var E=b.key;if(E.Zc()&&E.canCopy()){var te=y.I(E);te!==null&&(te.location=E.location,te.Va(),x.add(te,a.Pd(te.location)))}}for(y=y.iterator;y.next();)b=y.value,b instanceof $n&&b.canCopy()&&x.add(b,a.Pd());a.copiedParts=x,qh(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Bh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function Fl(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 $n&&(x.value.point=new Mt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function ps(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 Fs(a,y,x){var b=a.diagram,E=a.startPoint,te=Mt.alloc();te.assign(b.lastInput.documentPoint),a.moveParts(y,te.re(E),x),Mt.free(te),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&(Ba(b),b.hk())}ns.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var b=this.diagram;b!==null&&Ec(b,a,y,this.dragOptions,x)};function rc(a){if(a.draggedParts!==null){for(var y=a.diagram,x=a.draggedParts.iterator;x.next();){var b=x.key;b.Zc()&&(b.location=x.value.point)}for(x=a.draggedParts.iterator;x.next();)if(b=x.key,b instanceof $n&&b.suspendsRouting){var E=x.value.point;a.draggedParts.add(b,a.Pd()),Bh(b,-E.x,-E.y)}y.bd()}}function el(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),Oa(a,!1));var b=a.findDragOverObject(y),E=x.lastInput;E.targetObject=b,a.doUpdateCursor(b);var te=x.skipsUndoManager,ne=!1;try{if(x.skipsUndoManager=!0,ne=Id(a,E,b),!a.isActive&&ht===null)return;var ae=b!==null?b.part:null;if(ae===null||x.handlesDragDropForTopLevelParts&&ae.isTopLevel&&!(ae instanceof tr)){var fe=x.mouseDragOver;fe!==null&&(fe(E),ne=!0)}if(!a.isActive&&ht===null||(a.doDragOver(y,b),!a.isActive&&ht===null))return}finally{x.skipsUndoManager=te,ne&&x.bd()}a.Bn=b,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(E.viewPoint)}ns.prototype.findDragOverObject=function(a){var y=this;return Ku(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof qr||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},ns.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 Id(a,y,x){var b=!1,E=a.Cg.length,te=0<E?a.Cg[0]:null;if(x===te)return!1;y.handled=!1;for(var ne=0;ne<E;ne++){var ae=a.Cg[ne],fe=ae.mouseDragLeave;if(fe!==null&&(fe(y,ae,x),b=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&ht===null||x===null)return b;for(y.handled=!1,E=x;E!==null;)a.Cg.push(E),E=td(E);for(E=a.Cg.length,x=0;x<E&&(ne=a.Cg[x],ae=ne.mouseDragEnter,ae===null||(ae(y,ne,te),b=!0,!y.handled));x++);return b}function td(a){var y=a.panel;return y!==null?y:a instanceof Ti&&!(a instanceof tr)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function Dd(a,y,x){var b=a.Oe;if(b===null)return null;var E=a.diagram.og(y,b.portGravity,function(_e){return b.findValidLinkablePort(_e,x)});a=Mt.alloc();var te=1/0,ne=null;for(E=E.iterator;E.next();){var ae=E.value;if(ae.part!==null){var fe=ae.ga(jr,a);fe=y.Bf(fe),fe<te&&(ne=ae,te=fe)}}return Mt.free(a),ne}function Oa(a,y){var x=a.draggedLink;if(x!==null&&!(2>x.pointsCount)){var b=a.diagram;if(!b.isReadOnly){var E=a.Oe;if(E!==null){var te=null,ne=null;x.fromNode===null&&(te=Dd(a,x.i(0),!1),te!==null&&(ne=te.part));var ae=null,fe=null;x.toNode===null&&(ae=Dd(a,x.i(x.pointsCount-1),!0),ae!==null&&(fe=ae.part)),E.isValidLink(ne,te,fe,ae)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=ne,te!==null&&(x.fromPortId=te.portId),x.toNode=fe,ae!==null&&(x.toPortId=ae.portId),x.fromPort!==b.Mx&&b.R("LinkRelinked",x,b.Mx),x.toPort!==b.Nx&&b.R("LinkRelinked",x,b.Nx)):wi(E,ne,te,fe,ae):wi(E,null,null,null,null)}}}}ns.prototype.doDragOver=function(){};function oc(a,y){var x=a.diagram;a.dragsLink&&Oa(a,!0),Au(a);var b=a.findDragOverObject(y),E=x.lastInput;if(E.targetObject=b,b!==null){E.handled=!1;for(var te=b;te!==null;){var ne=te.mouseDrop;if(ne!==null&&(ne(E,te),E.handled))break;gf(a,E,te),te=td(te)}}else te=x.mouseDrop,te!==null&&te(E);if(a.isActive||ht!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)te=E.key,te instanceof oi&&te.linksConnected.each(function(ae){ae.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||ht!==null){for(a=kn.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof oi&&jt(x,b,a);kn.free(a)}}}function gf(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof tr||(x=a.mouseDrop,x!==null&&x(y))}function jt(a,y,x){var b=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(b=!0),a=a.Nu(x,function(E){return E.part},function(E){return E instanceof $n},!0,function(E){return E instanceof $n},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}ns.prototype.doDropOnto=function(){},ns.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()?(uu(this,!1),Qf(a,this.copiedParts),Fs(this,this.copiedParts,!1),od(a,this.copiedParts)):this.mayMove()?(Fl(this),Fs(this,this.draggedParts,!0)):this.mayDragOut()?(uu(this,!1),Fs(this,this.copiedParts,!1)):Fl(this),el(this,a.lastInput.documentPoint))}},ns.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?(Fl(this),uu(this,!0),Qf(a,this.copiedParts),Fs(this,this.copiedParts,!1),od(a,this.copiedParts),this.copiedParts!==null&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0}))):(y=!0,Fl(this),this.mayMove()&&(Fs(this,this.draggedParts,!0),el(this,a.lastInput.documentPoint))),this.Ym=!0,oc(this,a.lastInput.documentPoint),this.isActive){var b=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&Ut(this),a.Ya(),od(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",b)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},ns.prototype.simulatedMouseMove=function(a,y,x){if(ht===null)return!1;var b=ht.diagram;x instanceof vn||(x=null);var E=bt;return x!==E&&(E!==null&&E!==b&&(E.ug(),ht.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),bt=x,x!==null&&x!==b&&(ed(),E=x.toolManager.findTool("Dragging"),E!==null&&(ku.contains(E)||ku.add(E),E.doSimulatedDragEnter())),this.doUpdateCursor(null)),x===null||x===b||!x.allowDrop||x.isReadOnly||!x.allowInsert?!1:(b=x.toolManager.findTool("Dragging"),b!==null&&(a!==null&&(a.targetTouches!==void 0&&(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,b.doSimulatedDragOver()),!0)},ns.prototype.simulatedMouseUp=function(a,y,x){if(ht===null)return!1;var b=bt,E=ht.diagram;if(x===null)return ht.doCancel(),!0;if(x!==b){var te=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&te!==null)return b.ug(),ht.isDragOutStarted=!1,te.doSimulatedDragLeave(),!1;bt=x,b=x.toolManager.findTool("Dragging"),b!==null&&(ed(),ku.contains(b)||ku.add(b),b.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 Mt),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=ht,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function Ut(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof oi&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}ns.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Cr?!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())},ns.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())},ns.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())},ns.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},ns.prototype.Az=function(){return ht},ns.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=ht;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},ns.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),fl(a),a.animationManager.Cc(),a=ht,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},ns.prototype.doSimulatedDragLeave=function(){var a=ht;a!==null&&a.doSimulatedDragOut(),this.doCancel()},ns.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=ht;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;cn(this,y.draggedParts.Lf(),!1,a.firstInput),Fs(this,this.copiedParts,!1),el(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},ns.prototype.doSimulatedDrop=function(){var a=this.diagram,y=ht;if(y!==null){var x=y.diagram;if(y.Ym=!0,Fl(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),cn(this,y.draggedParts.Lf(),!0,a.lastInput),Fs(this,this.copiedParts,!1);var b=new In;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0,b.add(E)})),oc(this,a.lastInput.documentPoint),a.Ya(),this.copiedParts!==null&&(this.transactionResult="ExternalCopy"),this.copiedParts=null,a.doFocus(),a.R("ExternalObjectsDropped",b,x),this.stopTransaction(),a.R("ChangedSelection",a.selection)}a.animationManager.Dm=!1};function cn(a,y,x,b){if(a.copiedParts===null){var E=a.diagram;if(!E.isReadOnly&&!E.isModelReadOnly){E.skipsUndoManager=!x,E.partManager.addsToTemporaryLayer=!x,a.startPoint=b.documentPoint,x=E.Kj(y,E,!0);var te=kn.alloc();E=b=1/0;for(var ne=-1/0,ae=-1/0,fe=y.iterator;fe.next();){var _e=fe.value;if(_e.isVisible()){var Te=_e.location;_e=Te.x,Te=Te.y,isNaN(_e)||isNaN(Te)||(_e<b&&(b=_e),Te<E&&(E=Te),_e>ne&&(ne=_e),Te>ae&&(ae=Te))}}for(b===1/0?te.h(0,0,0,0):te.h(b,E,ne-b,ae-E),b=te.x+te.width/2,E=te.y+te.height/2,kn.free(te),te=a.Fr,ne=new ci,ae=Mt.alloc(),fe=y.iterator;fe.next();)_e=fe.value,_e instanceof $n&&_e.canCopy()&&(Te=x.I(_e),Te!==null&&(Te.points=_e.points,Bh(Te,te.x-b,te.y-E),Te.suspendsRouting=!0,ne.add(Te,a.Pd())));for(y=y.iterator;y.next();)_e=y.value,_e.Zc()&&_e.canCopy()&&(fe=x.I(_e),fe!==null&&(_e=_e.location,ae.h(te.x-(b-_e.x),te.y-(E-_e.y)),fe.location=ae,fe.Va(),ne.add(fe,a.Pd(ae))));Mt.free(ae),a.copiedParts=ne,qh(a,ne.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Bh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}ns.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},ns.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new Mt},Ye.Object.defineProperties(ns.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}}}),ns.prototype.getDraggingSource=ns.prototype.Az;var ht=null,bt=null;ns.className="DraggingTool",ku=new Bn,Ri("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Wo.prototype.doCancel=function(){ht!==null&&ht.doCancel(),Wr.prototype.doCancel.call(this)};function Et(){Wr.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new $n,y=new dr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new dr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new oi,y=new dr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=to,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new oi,y=new dr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=to,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 ci,this.Of=this.gj=this.Pf=null}qe(Et,Wr),Et.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},Et.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var te=y.Df(),ne=Qn.alloc();ne.width=y.naturalBounds.width*te,ne.height=y.naturalBounds.height*te,b.desiredSize=ne,Qn.free(ne),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=jr,te=Mt.alloc(),x.location=y.ga(jr,te),Mt.free(te),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},Et.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=to,y.fromSpot=ms,y.toSpot=ms),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},Et.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},Et.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof oi){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)}},Et.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof oi))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof oi)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},Et.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,b=this.portGravity;0>=b&&(b=.1);var E=this,te=y.og(x,b,function(je){return E.findValidLinkablePort(je,a)},null,!0);for(b=1/0,y=null,te=te.iterator;te.next();){var ne=te.value,ae=ne.part;if(ae instanceof oi){var fe=ne.ga(jr,Mt.alloc()),_e=x.x-fe.x,Te=x.y-fe.y;Mt.free(fe),fe=_e*_e+Te*Te,fe<b&&(_e=this.validPortsCache.I(ne),_e!==null?_e&&(y=ne,b=fe):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,ae,ne)||!a&&this.isValidLink(ae,ne,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(ne,!0),y=ne,b=fe):this.validPortsCache.add(ne,!1))}}return y!==null&&(x=y.part,x instanceof oi&&(x.layer===null||x.layer.allowLink))?y:null},Et.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},Et.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},Et.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},Et.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof oi))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof oi))return!1;for(y=y.portId,y===null&&(y=""),y=b.Sd(y);y.next();)if(b=y.value,b.fromNode===x&&b.fromPortId===a)return!0;return!1},Et.prototype.isValidLink=function(a,y,x,b){if(!this.isValidFrom(a,y)||!this.isValidTo(x,b)||!(y===null||b===null||(y.fromLinkableSelfNode&&b.toLinkableSelfNode||!this.isInSameNode(y,b))&&(y.fromLinkableDuplicates&&b.toLinkableDuplicates||!this.isLinked(y,b)))||this.originalLink!==null&&(a!==null&&this.isLabelDependentOnLink(a,this.originalLink)||x!==null&&this.isLabelDependentOnLink(x,this.originalLink))||a!==null&&x!==null&&(a.data===null&&x.data!==null||a.data!==null&&x.data===null)||!this.isValidCycle(a,x,this.originalLink))return!1;if(a!==null){var E=a.linkValidation;if(E!==null&&!E(a,y,x,b,this.originalLink))return!1}return x!==null&&(E=x.linkValidation,E!==null&&!E(a,y,x,b,this.originalLink))?!1:(E=this.linkValidation,E!==null?E(a,y,x,b,this.originalLink):!0)},Et.prototype.isLabelDependentOnLink=function(a,y){if(a===null)return!1;var x=a.labeledLink;if(x===null)return!1;if(x===y)return!0;var b=new In;return b.add(a),wn(this,x,y,b)};function wn(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),wn(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),wn(a,y.labeledLink,x,b))))}Et.prototype.isValidCycle=function(a,y,x){if(x===void 0&&(x=null),a===null||y===null)return this.isUnconnectedLinkValid;var b=this.diagram.validCycle;if(b!==bf){if(b===og){if(b=x||this.temporaryLink,b!==null&&!b.isTreeLink)return!0;for(b=y.linksConnected;b.next();){var E=b.value;if(E!==x&&E.isTreeLink&&E.toNode===y)return!1}return!fn(this,a,y,x,!0)}if(b===sg){if(b=x||this.temporaryLink,b!==null&&!b.isTreeLink)return!0;for(b=a.linksConnected;b.next();)if(E=b.value,E!==x&&E.isTreeLink&&E.fromNode===a)return!1;return!fn(this,a,y,x,!0)}if(b===ng)return a===y?a=!0:(b=new In,b.add(y),a=an(this,b,a,y,x)),!a;if(b===ig)return!fn(this,a,y,x,!1);if(b===rg)return a===y?a=!0:(b=new In,b.add(y),a=Sn(this,b,a,y,x)),!a}return!0};function fn(a,y,x,b,E){if(y===x)return!0;if(y===null||x===null)return!1;for(var te=y.linksConnected;te.next();){var ne=te.value;if(ne!==b&&(!E||ne.isTreeLink)&&ne.toNode===y&&(ne=ne.fromNode,ne!==y&&fn(a,ne,x,b,E)))return!0}return!1}function an(a,y,x,b,E){if(x===b)return!0;if(x===null||b===null||y.contains(x))return!1;y.add(x);for(var te=x.linksConnected;te.next();){var ne=te.value;if(ne!==E&&ne.toNode===x&&(ne=ne.fromNode,ne!==x&&an(a,y,ne,b,E)))return!0}return!1}function Sn(a,y,x,b,E){if(x===b)return!0;if(x===null||b===null||y.contains(x))return!1;y.add(x);for(var te=x.linksConnected;te.next();){var ne=te.value;if(ne!==E){var ae=ne.fromNode;if(ne=ne.toNode,ae=ae===x?ne:ae,ae!==x&&Sn(a,y,ae,b,E))return!0}}return!1}Ye.Object.defineProperties(Et.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}}}),Et.className="LinkingBaseTool";function xn(){Et.call(this),this.name="Linking",this.V={},this.F=null,this.K=Cn,this.Xd=null}qe(xn,Et),xn.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},xn.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 oi)))return null;var x=this.direction;if(x===Cn||x===zn){var b=this.findValidLinkablePort(y,!1);if(b!==null||this.startObject===a&&(b=a.port,this.findValidLinkablePort(b,!1)))return this.isForwards=!0,b}return(x===Cn||x===ii)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},xn.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 oi&&(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 oi&&(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)},xn.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()},xn.prototype.doStop=function(){Et.prototype.doStop.call(this),this.startObject=null},xn.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,b=null,E=null,te=null;try{var ne=this.targetPort=this.findTargetPort(this.isForwards);if(ne!==null){var ae=ne.part;ae instanceof oi&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),b=ae,E=ne):(y=ae,x=ne,this.originalToNode!==null&&(b=this.originalToNode,E=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(b=this.originalToNode,E=this.originalToPort);y!==null||b!==null?(te=this.insertLink(y,x,b,E),te!==null?(ne===null&&(this.isForwards?te.defaultToPoint=a.lastInput.documentPoint:te.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),te.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",te)):this.doNoLink(y,x,b,E)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),te&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},xn.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof $n)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)},xn.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},xn.prototype.doNoLink=function(){},Ye.Object.defineProperties(xn.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 Cn=new Ln(xn,"Either",0),zn=new Ln(xn,"ForwardsOnly",0),ii=new Ln(xn,"BackwardsOnly",0);xn.className="LinkingTool",xn.Either=Cn,xn.ForwardsOnly=zn,xn.BackwardsOnly=ii;function Zn(){Et.call(this),this.name="Relinking";var a=new dr;a.figure="Diamond",a.desiredSize=Bo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new dr,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 kn}qe(Zn,Et),Zn.prototype.updateAdornments=function(a){if(a!==null&&a instanceof $n){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var b=a.selectionObject;b!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(b,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(b=a.selectionObject,b!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(b,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},Zn.prototype.makeAdornment=function(a,y){var x=new qr;return x.type=Wn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Zn.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},Zn.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 qr&&x.adornedPart instanceof $n))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=or),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=or),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},Zn.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===bp||x===Fh)&&(x=ol),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}},Zn.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()},Zn.prototype.doStop=function(){Et.prototype.doStop.call(this),this.handle=null},Zn.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;this.transactionResult=null;var y=this.originalFromNode,x=this.originalFromPort,b=this.originalToNode,E=this.originalToPort,te=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var ne=this.targetPort.part;ne instanceof oi&&(this.isForwards?(b=ne,E=this.targetPort):(y=ne,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?E=b=null:x=y=null:te=null;te!==null?(this.reconnectLink(te,this.isForwards?b:y,this.isForwards?E:x,this.isForwards),this.targetPort===null&&(this.isForwards?te.defaultToPoint=a.lastInput.documentPoint:te.defaultFromPoint=a.lastInput.documentPoint,te.bb()),this.transactionResult=this.name,a.R("LinkRelinked",te,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},Zn.prototype.reconnectLink=function(a,y,x,b){return x=x!==null&&x.portId!==null?x.portId:"",b?(a.toNode=y,a.toPortId=x):(a.fromNode=y,a.fromPortId=x),!0},Zn.prototype.doNoRelink=function(){};function wi(a,y,x,b,E){y!==null?(a.copyPortProperties(y,x,a.temporaryFromNode,a.temporaryFromPort,!1),a.diagram.add(a.temporaryFromNode)):a.diagram.remove(a.temporaryFromNode),b!==null?(a.copyPortProperties(b,E,a.temporaryToNode,a.temporaryToPort,!0),a.diagram.add(a.temporaryToNode)):a.diagram.remove(a.temporaryToNode)}Ye.Object.defineProperties(Zn.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 qr))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Zn.className="RelinkingTool",Ri("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),Ri("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function Kn(){Wr.call(this),this.name="LinkReshaping";var a=new dr;a.figure="Rectangle",a.desiredSize=Ro,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new dr,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 Mt,this.Yq=new Bn}qe(Kn,Wr),Kn.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:si},Kn.prototype.om=function(a,y){a.reshapingBehavior=y},Kn.prototype.updateAdornments=function(a){if(a!==null&&a instanceof $n){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)}},Kn.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,b=y.isOrthogonal,E=null;if(y.points!==null&&1<x){E=new qr,E.type=Wn.Link,x=y.firstPickIndex;var te=y.lastPickIndex,ne=b?1:0;if(y.resegmentable&&y.computeCurve()!==ou)for(var ae=x+ne;ae<te-ne;ae++){var fe=this.makeResegmentHandle(a,ae);fe!==null&&(fe.segmentIndex=ae,fe.segmentFraction=.5,fe.fromMaxLinks=999,E.add(fe))}for(ne=x+1;ne<te;ne++)if(ae=this.makeHandle(a,ne),ae!==null){if(ae.segmentIndex=ne,ne!==x)if(ne===x+1&&b){fe=y.i(x);var _e=y.i(x+1);rn.B(fe.x,_e.x)&&rn.B(fe.y,_e.y)&&(_e=y.i(x-1)),rn.B(fe.x,_e.x)?(this.om(ae,Oi),ae.cursor="n-resize"):rn.B(fe.y,_e.y)&&(this.om(ae,Ii),ae.cursor="w-resize")}else ne===te-1&&b?(fe=y.i(te-1),_e=y.i(te),rn.B(fe.x,_e.x)&&rn.B(fe.y,_e.y)&&(fe=y.i(te+1)),rn.B(fe.x,_e.x)?(this.om(ae,Oi),ae.cursor="n-resize"):rn.B(fe.y,_e.y)&&(this.om(ae,Ii),ae.cursor="w-resize")):ne!==te&&(this.om(ae,Ui),ae.cursor="move");E.add(ae)}E.adornedObject=a}return E},Kn.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},Kn.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},Kn.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},Kn.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 $n){if(this.Ts=y,a.isMouseCaptured=!0,this.Ea(this.name),y.resegmentable&&this.handle.fromMaxLinks===999){var x=y.points.copy(),b=this.getResegmentingPoint();if(x.Gb(this.handle.segmentIndex+1,b),y.isOrthogonal&&x.Gb(this.handle.segmentIndex+1,b),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}}},Kn.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},Kn.prototype.stopTransaction=function(){var a=this.diagram,y=Wr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Kn.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},Kn.prototype.getResegmentingPoint=function(){return this.handle.ga(jr)},Kn.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},Kn.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,b=y.i(x-1),E=y.i(x),te=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(b.x-E.x)<this.resegmentingDistance&&Math.abs(b.y-E.y)<this.resegmentingDistance&&(gi(this,ne,b,E,te,!0)||gi(this,ne,b,E,te,!1))){var ae=y.points.copy();gi(this,ne,b,E,te,!0)?(ae.cd(x-2,new Mt(ne.x,(te.y+ne.y)/2)),ae.cd(x+1,new Mt(te.x,(te.y+ne.y)/2))):(ae.cd(x-2,new Mt((te.x+ne.x)/2,ne.y)),ae.cd(x+1,new Mt((te.x+ne.x)/2,te.y))),ae.mb(x),ae.mb(x-1),y.points=ae,y.Wb()}else ne=y.i(x+2),Math.abs(E.x-te.x)<this.resegmentingDistance&&Math.abs(E.y-te.y)<this.resegmentingDistance&&(gi(this,b,E,te,ne,!0)||gi(this,b,E,te,ne,!1))&&(ae=y.points.copy(),gi(this,b,E,te,ne,!0)?(ae.cd(x-1,new Mt(b.x,(b.y+ne.y)/2)),ae.cd(x+2,new Mt(ne.x,(b.y+ne.y)/2))):(ae.cd(x-1,new Mt((b.x+ne.x)/2,b.y)),ae.cd(x+2,new Mt((b.x+ne.x)/2,ne.y))),ae.mb(x+1),ae.mb(x),y.points=ae,y.Wb())}}else ne=Mt.alloc(),rn.qh(b.x,b.y,te.x,te.y,E.x,E.y,ne)&&ne.Bf(E)<this.resegmentingDistance*this.resegmentingDistance&&(b=y.points.copy(),b.mb(x),y.points=b,y.Wb()),Mt.free(ne)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function gi(a,y,x,b,E,te){return te?Math.abs(y.y-x.y)<a.resegmentingDistance&&Math.abs(x.y-b.y)<a.resegmentingDistance&&Math.abs(b.y-E.y)<a.resegmentingDistance:Math.abs(y.x-x.x)<a.resegmentingDistance&&Math.abs(x.x-b.x)<a.resegmentingDistance&&Math.abs(b.x-E.x)<a.resegmentingDistance}Kn.prototype.reshape=function(a){var y=this.adornedLink;y.uh();var x=this.handle.segmentIndex,b=this.Ru(this.handle);if(y.isOrthogonal)if(x===y.firstPickIndex+1)x=y.firstPickIndex+1,b===Oi?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===Ii&&(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,b===Oi?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===Ii&&(y.L(x-1,a.x,y.i(x-2).y),y.L(x,a.x,y.i(x+1).y));else{b=x;var E=y.i(b),te=y.i(b-1),ne=y.i(b+1);rn.B(te.x,E.x)&&rn.B(E.y,ne.y)?(rn.B(te.x,y.i(b-2).x)&&!rn.B(te.y,y.i(b-2).y)?(y.m(b,a.x,te.y),x++,b++):y.L(b-1,a.x,te.y),rn.B(ne.y,y.i(b+2).y)&&!rn.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)):rn.B(te.y,E.y)&&rn.B(E.x,ne.x)?(rn.B(te.y,y.i(b-2).y)&&!rn.B(te.x,y.i(b-2).x)?(y.m(b,te.x,a.y),x++,b++):y.L(b-1,te.x,a.y),rn.B(ne.x,y.i(b+2).x)&&!rn.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):rn.B(te.x,E.x)&&rn.B(E.x,ne.x)?(rn.B(te.x,y.i(b-2).x)&&!rn.B(te.y,y.i(b-2).y)?(y.m(b,a.x,te.y),x++,b++):y.L(b-1,a.x,te.y),rn.B(ne.x,y.i(b+2).x)&&!rn.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):rn.B(te.y,E.y)&&rn.B(E.y,ne.y)&&(rn.B(te.y,y.i(b-2).y)&&!rn.B(te.x,y.i(b-2).x)?(y.m(b,te.x,a.y),x++,b++):y.L(b-1,te.x,a.y),rn.B(ne.y,y.i(b+2).y)&&!rn.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)),y.L(x,a.x,a.y)}else y.L(x,a.x,a.y),b=y.fromNode,E=y.fromPort,b!==null&&(te=b.findVisibleNode(),te!==null&&te!==b&&(b=te,E=b.port)),x===1&&y.computeSpot(!0,E).Mc()&&(te=E.ga(jr,Mt.alloc()),b=y.getLinkPointFromPoint(b,E,te,a,!0,Mt.alloc()),y.L(0,b.x,b.y),Mt.free(te),Mt.free(b)),b=y.toNode,E=y.toPort,b!==null&&(te=b.findVisibleNode(),te!==null&&te!==b&&(b=te,E=b.port)),x===y.pointsCount-2&&y.computeSpot(!1,E).Mc()&&(x=E.ga(jr,Mt.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,Mt.alloc()),y.L(y.pointsCount-1,a.x,a.y),Mt.free(x),Mt.free(a));y.zf()},Kn.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case Ui:return a;case Oi:return new Mt(y.i(x).x,a.y);case Ii:return new Mt(a.x,y.i(x).y);default:case si:return y.i(x)}},Ye.Object.defineProperties(Kn.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 qr))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}}}),Kn.prototype.setReshapingBehavior=Kn.prototype.om,Kn.prototype.getReshapingBehavior=Kn.prototype.Ru;var si=new Ln(Kn,"None",0),Ii=new Ln(Kn,"Horizontal",1),Oi=new Ln(Kn,"Vertical",2),Ui=new Ln(Kn,"All",3);Kn.className="LinkReshapingTool",Kn.None=si,Kn.Horizontal=Ii,Kn.Vertical=Oi,Kn.All=Ui,Ri("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function Ai(){Wr.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 dr;a.alignmentFocus=jr,a.figure="Rectangle",a.desiredSize=Ro,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new Mt,this.Dw=new Qn,this.Tn=new Mt,this.rt=new Qn(0,0),this.qt=new Qn(1/0,1/0),this.pt=new Qn(1,1)}qe(Ai,Wr),Ai.prototype.updateAdornments=function(a){if(!(a===null||a instanceof $n)){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(),hd(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},Ai.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new qr,y.type=Wn.Spot,y.locationSpot=jr;var x=new rl;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Xs)),y.add(this.makeHandle(a,wl)),y.add(this.makeHandle(a,Na)),y.add(this.makeHandle(a,Ia)),y.add(this.makeHandle(a,bs)),y.add(this.makeHandle(a,Zs)),y.add(this.makeHandle(a,Ks)),y.add(this.makeHandle(a,ks))}else if(Ru(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Ai.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},Ai.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=jr),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 Wn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},Ai.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},Ai.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))},Ai.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},Ai.prototype.stopTransaction=function(){var a=this.diagram,y=Wr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ai.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Ai.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,Mt.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),a.bd(),Mt.free(E)}},Ai.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,Mt.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),Mt.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},Ai.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 tr){var b=new Bn;if(b.add(a),!this.dragsMembers&&a.placeholder===null){var E=new pe;E.dragsMembers=!1}y.moveParts(b,this.oppositePoint.copy().re(x),!0,E)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},Ai.prototype.computeResize=function(a,y,x,b,E,te){y.Mc()&&(y=jr);var ne=this.adornedObject.naturalBounds,ae=ne.x,fe=ne.y,_e=ne.x+ne.width,Te=ne.y+ne.height,je=1;if(!te){je=ne.width;var Ve=ne.height;0>=je&&(je=1),0>=Ve&&(Ve=1),je=Ve/je}return Ve=Mt.alloc(),rn.No(a.x,a.y,ae,fe,E.width,E.height,Ve),a=ne.copy(),0>=y.x?0>=y.y?(a.x=Math.max(Ve.x,_e-b.width),a.x=Math.min(a.x,_e-x.width),a.width=Math.max(_e-a.x,x.width),a.y=Math.max(Ve.y,Te-b.height),a.y=Math.min(a.y,Te-x.height),a.height=Math.max(Te-a.y,x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(je*a.width,b.height),x.height),a.width=a.height/je):(a.width=Math.max(Math.min(a.height/je,b.width),x.width),a.height=je*a.width),a.x=_e-a.width,a.y=Te-a.height)):1<=y.y?(a.x=Math.max(Ve.x,_e-b.width),a.x=Math.min(a.x,_e-x.width),a.width=Math.max(_e-a.x,x.width),a.height=Math.max(Math.min(Ve.y-fe,b.height),x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(je*a.width,b.height),x.height),a.width=a.height/je):(a.width=Math.max(Math.min(a.height/je,b.width),x.width),a.height=je*a.width),a.x=_e-a.width)):(a.x=Math.max(Ve.x,_e-b.width),a.x=Math.min(a.x,_e-x.width),a.width=_e-a.x,te||(a.height=Math.max(Math.min(je*a.width,b.height),x.height),a.width=a.height/je,a.y=fe+.5*(Te-fe-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(Ve.x-ae,b.width),x.width),a.y=Math.max(Ve.y,Te-b.height),a.y=Math.min(a.y,Te-x.height),a.height=Math.max(Te-a.y,x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(je*a.width,b.height),x.height),a.width=a.height/je):(a.width=Math.max(Math.min(a.height/je,b.width),x.width),a.height=je*a.width),a.y=Te-a.height)):1<=y.y?(a.width=Math.max(Math.min(Ve.x-ae,b.width),x.width),a.height=Math.max(Math.min(Ve.y-fe,b.height),x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(je*a.width,b.height),x.height),a.width=a.height/je):(a.width=Math.max(Math.min(a.height/je,b.width),x.width),a.height=je*a.width))):(a.width=Math.max(Math.min(Ve.x-ae,b.width),x.width),te||(a.height=Math.max(Math.min(je*a.width,b.height),x.height),a.width=a.height/je,a.y=fe+.5*(Te-fe-a.height))):0>=y.y?(a.y=Math.max(Ve.y,Te-b.height),a.y=Math.min(a.y,Te-x.height),a.height=Te-a.y,te||(a.width=Math.max(Math.min(a.height/je,b.width),x.width),a.height=je*a.width,a.x=ae+.5*(_e-ae-a.width))):1<=y.y&&(a.height=Math.max(Math.min(Ve.y-fe,b.height),x.height),te||(a.width=Math.max(Math.min(a.height/je,b.width),x.width),a.height=je*a.width,a.x=ae+.5*(_e-ae-a.width))),Mt.free(Ve),a},Ai.prototype.computeReshape=function(){var a=jn;return this.adornedObject instanceof dr&&(a=_v(this.adornedObject)),!(a===mi||this.diagram.lastInput.shift)},Ai.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},Ai.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},Ai.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},Ye.Object.defineProperties(Ai.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 qr))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 qr)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}}}),Ai.className="ResizingTool",Ri("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Ni(){Wr.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Mt,this.ue=null;var a=new dr;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 Mt(NaN,NaN),this.u=0,this.F=50}qe(Ni,Wr),Ni.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)}},Ni.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new qr,y.type=Wn.Position,y.locationSpot=jr;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(Ru(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Ni.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},Ni.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)},Ni.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(jr)},Ni.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 b=this.handleDistance;return x===0?y.x=a.naturalBounds.width+b:x===45?(y.x=a.naturalBounds.width+b,y.y=a.naturalBounds.height+b):x===90?y.y=a.naturalBounds.height+b:x===135?(y.x=-b,y.y=a.naturalBounds.height+b):x===180?y.x=-b:x===225?(y.x=-b,y.y=-b):x===270?y.y=-b:x===315&&(y.x=a.naturalBounds.width+b,y.y=-b),a.ga(y)},Ni.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Mt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Ni.prototype.stopTransaction=function(){var a=this.diagram,y=Wr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ni.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Ni.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Ni.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()},Ni.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,b=y.rotateObject;(x===b||x.rg(b))&&(x=this.Tn.copy(),y.location=x.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},Ni.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},Ye.Object.defineProperties(Ni.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 qr))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 qr)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}}}),Ni.className="RotatingTool",Ri("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function ar(){Wr.call(this),this.name="ClickSelecting"}qe(ar,Wr),ar.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},ar.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},ar.className="ClickSelectingTool";function ti(){Wr.call(this),this.name="Action",this.pk=null}qe(ti,Wr),ti.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,y=a.lastInput,x=a.ic(y.documentPoint,function(b){for(;b.panel!==null&&!b.isActionable;)b=b.panel;return b});return x!==null&&x.isActionable?(this.pk=x,a.Ck=a.ic(y.documentPoint,null,null),!0):!1},ti.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()},ti.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))}},ti.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()},ti.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())},ti.prototype.doStop=function(){this.pk=null},ti.className="ActionTool";function ji(){Wr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Mt(0,0)}qe(ji,Wr),ji.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)},ji.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},ji.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var b=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof Ti)x.Zc()&&(Ru(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);nn(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var te=Mt.allocAt(a.x,a.y);this.isGridSnapEnabled&&Jf(this.diagram,b,a,te),b.location=te,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),Mt.free(te)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},Ye.Object.defineProperties(ji.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}}}),ji.className="ClickCreatingTool";function Li(){Wr.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Ti;a.layerName="Tool",a.selectable=!1;var y=new dr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}qe(Li,Wr),Li.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))},Li.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},Li.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},Li.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 b=Qn.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),Qn.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Li.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()},Li.prototype.computeBoxBounds=function(){var a=this.diagram;return new kn(a.firstInput.documentPoint,a.lastInput.documentPoint)},Li.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),Cr?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 Bn,y=y.selection.iterator;y.next();){var b=y.value;a.contains(b)||x.add(b)}for(y=x.iterator;y.next();)y.value.isSelected=!1;for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0)}},Ye.Object.defineProperties(Li.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}}}),Li.className="DragSelectingTool";function bi(){Wr.call(this),this.name="Panning",this.Xt=new Mt,this.xy=new Mt,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(_t.document,"scroll",a.Kw,!1),a.stopTool()}}qe(bi,Wr),bi.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())},bi.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(_t.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},bi.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},bi.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},bi.prototype.doMouseMove=function(){this.move()},bi.prototype.doMouseUp=function(){this.move(),this.stopTool()},bi.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,b=a.lastInput.documentPoint,E=y.x+x.x-b.x;x=y.y+x.y-b.y,a.allowHorizontalScroll||(E=y.x),a.allowVerticalScroll||(x=y.y),a.position=this.xy.h(E,x)}},Ye.Object.defineProperties(bi.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),bi.className="PanningTool",Ri("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),Ri("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),Ri("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),Ri("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),Ri("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Yi(){this.F=this.u=this.j=this.o=null}Ye.Object.defineProperties(Yi.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}}}),Yi.className="HTMLInfo";function pi(a,y,x){this.text=a,this.hx=y,this.visible=x}pi.className="ContextMenuButtonInfo";function lr(){Wr.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new Mt,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}qe(lr,Wr);function Xi(a){var y=new Yi;y.show=function(E,te,ne){ne.showDefaultContextMenu()},y.hide=function(E,te){te.hideDefaultContextMenu()},So=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 b=on("style");_t.document.getElementsByTagName("head")[0].appendChild(b),b.sheet.insertRule(".goCXul { list-style: none; }",0),b.sheet.insertRule(".goCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }",0),b.sheet.insertRule(".goCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }",0),b=a.diagram,b!==null&&(b.addEventListener(y,"contextmenu",Pi,!1),b.addEventListener(y,"selectstart",Pi,!1),b.addEventListener(x,"contextmenu",Pi,!1)),y.className="goCXforeground",x.className="goCXbackground",_t.document.body&&(_t.document.body.appendChild(y),_t.document.body.appendChild(x)),so=y,is=x,Co=!0}function Pi(a){return a.preventDefault(),!1}lr.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)},lr.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},lr.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},lr.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof vn||(a instanceof tn?b=a:b=y.ic(x.documentPoint,null,function(E){return!E.layer.isTemporary})),b!==null){for(a=b;a!==null;){if(a.contextMenu!==null)return a;a=a.panel}if(y.lastInput.isTouchEvent&&this.defaultTouchContextMenu)return b.part}else if(y.contextMenu!==null)return y;return null},lr.prototype.doActivate=function(){},lr.prototype.doMouseDown=function(){if(Wr.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof qr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&Gi(this)},lr.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof qr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}Gi(this)};function Gi(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof Yi||(b=y.ic(y.lastInput.documentPoint,null,null),b!==null&&b.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(b)}}else a.canStart()&&(vr(a,!0),a.isActive||a.stopTool())}lr.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function vr(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=So,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var b=x.contextMenu;b!==null?(a.currentObject=x instanceof tn?x:null,a.showContextMenu(b,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof qr&&!a.currentContextMenu.visible&&a.stopTool()}}lr.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},lr.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof qr){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category=this.name,a.placeholder!==null&&(a.placeholder.scale=x.scale);var b=a.diagram;b!==null&&b!==x&&b.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionContextMenu(a,y)}else a instanceof Yi&&a.show(y,x,this);this.currentContextMenu=a},lr.prototype.positionContextMenu=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),b=a.measuredBounds,E=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=b.width),x.x+b.width>E.right&&(x.x-=b.width+5/y.scale),x.x<E.x&&(x.x=E.x),x.y+b.height>E.bottom&&(x.y-=b.height+5/y.scale),x.y<E.y&&(x.y=E.y),a.position=x}},lr.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof qr?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Yi&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function er(a){var y=new Bn;return y.add(new pi("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new pi("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new pi("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new pi("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new pi("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new pi("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new pi("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new pi("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new pi("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new pi("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new pi("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new pi("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new pi("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}lr.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=er(this)),so.innerHTML="",is.addEventListener("pointerdown",this.tu,!1);var y=this,x=on("ul");x.className="goCXul",so.appendChild(x),x.innerHTML="";for(var b=this.jt.iterator;b.next();){var E=b.value,te=E.visible;if(typeof E.hx=="function"&&(typeof te!="function"||te(a))){te=on("li"),te.className="goCXli";var ne=on("a");ne.className="goCXa",ne.href="#",ne.ky=E.hx,ne.addEventListener("pointerdown",function(ae){return this.ky(a),y.stopTool(),ae.preventDefault(),!1},!1),ne.textContent=E.text,te.appendChild(ne),x.appendChild(te)}}so.style.display="block",is.style.display="block"},lr.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===So){so.style.display="none",is.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(is,"pointerdown",this.tu,!1),this.currentContextMenu=null}},Ye.Object.defineProperties(lr.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof qr?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Co===!1&&So===null&&ys&&Xi(this),So},set:function(a){a===null&&(Co=!0),So=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var So=null,Co=!1,is=null,so=null;lr.className="ContextMenuTool",Ri("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function kr(){Wr.call(this),this.name="TextEditing",this.Zh=new Mo,this.ia=null,this.V=br,this.vj=null,this.qa=Lr,this.u=1,this.F=!0,this.o=null,this.j=new Yi,this.kt=null,No(this,this.j)}qe(kr,Wr);function No(a,y){if(ys){var x=on("textarea");a.kt=x,x.addEventListener("input",function(){if(a.textBlock!==null){var b=a.Lx(this.value);this.style.width=20+b.measuredBounds.width*this.wA+"px",this.rows=b.lineCount}},!1),x.addEventListener("keydown",function(b){if(!b.isComposing&&a.textBlock!==null){var E=b.key;E==="Enter"?(a.textBlock.isMultiline===!1&&b.preventDefault(),a.acceptText(Er)):E==="Tab"?(a.acceptText(Zr),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Lr){var b=a.kt;a.qa===ho&&(a.qa=Zo),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Lr){var b=a.kt;typeof b.focus=="function"&&b.focus(),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),y.valueFunction=function(){return x.value},y.mainElement=x,y.show=function(b,E,te){if(b instanceof Mo&&te instanceof kr)if(te.state===Qr)x.style.border="3px solid red",x.focus();else{var ne=b.ga(jr),ae=E.position,fe=E.scale,_e=b.Df()*fe;_e<te.minimumEditorScale&&(_e=te.minimumEditorScale);var Te=b.naturalBounds.width*_e+6,je=b.naturalBounds.height*_e+2,Ve=(ne.x-ae.x)*fe;ne=(ne.y-ae.y)*fe,ae=b.verticalAlignment,fe=(b.lineHeight+b.spacingAbove+b.spacingBelow)*b.lineCount*_e,je=ae.y*je-ae.y*fe+ae.offsetY-(.5*je-.5*fe)-fe/2,x.value=b.text,E.div.style.font=b.font,x.style.position="absolute",x.style.zIndex="100",x.style.font="inherit",x.style.fontSize=100*_e+"%",x.style.lineHeight="normal",x.style.width=Te+"px",x.style.left=(Ve-Te/2|0)-1+"px",x.style.top=(ne+je|0)-1+"px",x.style.textAlign=b.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=b.lineCount,x.wA=_e,x.className="goTXarea",E.div.appendChild(x),x.focus(),te.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(b){b.div.removeChild(x)}}}kr.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||Cs&&Cs!==this&&(Cs.acceptText(rs),Cs&&Cs!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Mo&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===br&&!y.isSelected||this.starting===ao&&2>a.lastInput.clickCount)):!1},kr.prototype.doStart=function(){Cs=this,this.textBlock!==null&&this.doActivate()},kr.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 Mo&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=ho;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new kn(this.textBlock.ga(Xs),this.textBlock.ga(Na));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},kr.prototype.doCancel=function(){this.stopTool()},kr.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},kr.prototype.doMouseDown=function(){this.isActive&&this.acceptText(rs)},kr.prototype.acceptText=function(a){switch(a){case rs:this.qa===Io?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===ho||this.qa===Qr||this.qa===Zo)&&(this.qa=Ko,Nr(this));break;case Xr:case Er:case Zr:(Er!==a||this.textBlock.isMultiline!==!0)&&(this.qa===ho||this.qa===Qr||this.qa===Zo)&&(this.qa=Ko,Nr(this))}};function Nr(a){var y=a.textBlock,x=a.diagram,b=a.currentTextEditor;if(y!==null&&b!==null){var E=y.text,te="";b.valueFunction!==null&&(te=b.valueFunction()),a.isValidText(y,E,te)?(a.Ea(a.name),a.qa=Io,a.transactionResult=a.name,y.text=te,a.doSuccess(E,te),x!==null&&x.R("TextEdited",y,E),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=Qr,a.doError(E,te))}}kr.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)},kr.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},kr.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Lr,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},kr.prototype.doStop=function(){Cs=null},kr.prototype.isValidText=function(a,y,x){var b=this.textValidation;return b!==null&&!b(a,y,x)?!1:(b=a.textValidation,!!(b===null||b(a,y,x)))},kr.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Ye.Object.defineProperties(kr.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)}}}),kr.prototype.measureTemporaryTextBlock=kr.prototype.Lx;var Xr=new Ln(kr,"LostFocus",0),rs=new Ln(kr,"MouseDown",1),Zr=new Ln(kr,"Tab",2),Er=new Ln(kr,"Enter",3),Jr=new Ln(kr,"SingleClick",0),br=new Ln(kr,"SingleClickSelected",1),ao=new Ln(kr,"DoubleClick",2),Lr=new Ln(kr,"StateNone",0),ho=new Ln(kr,"StateActive",1),Zo=new Ln(kr,"StateEditing",2),Ko=new Ln(kr,"StateValidating",3),Qr=new Ln(kr,"StateInvalid",4),Io=new Ln(kr,"StateValidated",5),Cs=null;kr.className="TextEditingTool",kr.LostFocus=Xr,kr.MouseDown=rs,kr.Tab=Zr,kr.Enter=Er,kr.SingleClick=Jr,kr.SingleClickSelected=br,kr.DoubleClick=ao,kr.StateNone=Lr,kr.StateActive=ho,kr.StateEditing=Zo,kr.StateValidating=Ko,kr.StateInvalid=Qr,kr.StateValidated=Io,Ri("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Lo(a){jl||(_l(),jl=!0),this.H=ac,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=cu,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new In,this.ce=new gs,this.ce.Yd=this,this.Ei=new In,this.pu=new In,this.Sr=new In,this.pr=new In,a&&Object.assign(this,a)}Lo.prototype.Xe=function(a){this.H=a},Lo.prototype.canStart=function(){return!0};function Jo(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),ba(a.H),a.zb=!0)}function Ss(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===cu?(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===Jl&&y.vc.clear(),a.Qw=!!(a.Pk===hu&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),b&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),Ra(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==$a&&b!==null&&(delete b.start.scale,delete b.end.scale),_t.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Ba(x),Bd(x),a.zb=!1,y.start(),y.bc&&(xs(a),x.Ya(),_c(y,0),fl(x,!0),Ts(a),x.R("AnimationStarting",a)))}))}}function Js(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function Pl(a,y,x,b){a.isTicking||Js(a)||y instanceof $n&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}it=Lo.prototype,it.fv=function(a){return this.ce.fv(a)},it.Xu=function(a){return this.ce.Xu(a)};function Qo(a,y){function x(){if(0<E.Sr.count&&(b.addAll(E.Sr),E.Sr.clear(),E.bc=!0),E.bc!==!1&&b.count!==0){E.pu.addAll(b);for(var te=E.pu.iterator;te.next();){var ne=te.value;if(ne.bc!==!1){e:if(0<ne.yl.count)var ae=!0;else{for(ae=ne.vc.iterator;ae.next();){var fe=ae.key;if(fe instanceof tn&&fe.diagram!==null||fe instanceof vn){ae=!0;break e}}ae=!1}ae?Ql(ne,!1):ne.Xk=!0}}E.pu.clear(),E.bc!==!1&&(xs(E),fl(E.H),Ts(E)),_t.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),_t.requestAnimationFrame(function(){x()}))}function qo(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function xs(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 Ts(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}it.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(),Ra(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),Ra(y,this.H)},it.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))},it.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),As(this,a))},it.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),oa(this.ce,y,"position",y.position,y.position),As(this,a))};function ma(a,y,x){!a.zb||y.D(x)||Js(a)||(a.H.pi||(y=x.copy()),oa(a.ce,a.H,"position",y,x))}function jo(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function As(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function La(a,y,x,b,E){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var te=a[0],ne=a[1],ae=a[2];a=a[3];var fe=y[0],_e=y[1],Te=y[2];return y=y[3],ae===0||ae===100?(te=fe,ne=_e):(Te===0||Te===100)&&(fe=te,_e=ne),180<Math.abs(fe-te)&&(fe>te?te+=360:fe+=360),te=E(x,te,fe-te,b)%360,ne=E(x,ne,_e-ne,b),ae=E(x,ae,Te-ae,b),x=E(x,a,y-a,b),"hsla("+te+", "+ne+"%, "+ae+"%, "+x+")"}function _l(){function a(x,b,E,te,ne,ae){x.position=new Mt(te(ne,b.x,E.x-b.x,ae),te(ne,b.y,E.y-b.y,ae))}var y=new ci;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,b,E,te,ne,ae){ne<ae?x.mm(te(ne,b.x,E.x-b.x,ae),te(ne,b.y,E.y-b.y,ae),!1):x.position=new Mt(te(ne,b.x,E.x-b.x,ae),te(ne,b.y,E.y-b.y,ae))}),y.add("location",function(x,b,E,te,ne,ae){ne<ae?x.mm(te(ne,b.x,E.x-b.x,ae),te(ne,b.y,E.y-b.y,ae),!0):x.location=new Mt(te(ne,b.x,E.x-b.x,ae),te(ne,b.y,E.y-b.y,ae))}),y.add("position:placeholder",function(x,b,E,te,ne,ae){ne<ae?x.mm(te(ne,b.x,E.x-b.x,ae),te(ne,b.y,E.y-b.y,ae),!1):x.position=new Mt(te(ne,b.x,E.x-b.x,ae),te(ne,b.y,E.y-b.y,ae))}),y.add("position:nodeCollapse",function(x,b,E,te,ne,ae){var fe=x.actualBounds,_e=E.actualBounds;E=_e.x+_e.width/2-fe.width/2,fe=_e.y+_e.height/2-fe.height/2,ne<ae?x.mm(te(ne,b.x,E-b.x,ae),te(ne,b.y,fe-b.y,ae),!1):x.position=new Mt(te(ne,b.x,E-b.x,ae),te(ne,b.y,fe-b.y,ae))}),y.add("desiredSize",function(x,b,E,te,ne,ae){x.desiredSize=new kn(te(ne,b.width,E.width-b.width,ae),te(ne,b.height,E.height-b.height,ae))}),y.add("width",function(x,b,E,te,ne,ae){x.width=te(ne,b,E-b,ae)}),y.add("height",function(x,b,E,te,ne,ae){x.height=te(ne,b,E-b,ae)}),y.add("fill",function(x,b,E,te,ne,ae){x.fill=La(b,E,ne,ae,te)}),y.add("stroke",function(x,b,E,te,ne,ae){x.stroke=La(b,E,ne,ae,te)}),y.add("strokeWidth",function(x,b,E,te,ne,ae){x.strokeWidth=te(ne,b,E-b,ae)}),y.add("strokeDashOffset",function(x,b,E,te,ne,ae){x.strokeDashOffset=te(ne,b,E-b,ae)}),y.add("background",function(x,b,E,te,ne,ae){x.background=La(b,E,ne,ae,te)}),y.add("areaBackground",function(x,b,E,te,ne,ae){x.areaBackground=La(b,E,ne,ae,te)}),y.add("opacity",function(x,b,E,te,ne,ae){x.opacity=te(ne,b,E-b,ae)}),y.add("scale",function(x,b,E,te,ne,ae){x.scale=te(ne,b,E-b,ae)}),y.add("angle",function(x,b,E,te,ne,ae){x.angle=te(ne,b,E-b,ae)}),Xl=y}Ye.Object.defineProperties(Lo.prototype,{animationReasons:{get:function(){return this.Zd}},isEnabled:{get:function(){return this.Jd},set:function(a){(this.Jd=a)&&this.Ei.each(function(y){y.isAnimating||y.runCount!==1/0||y.start()})}},duration:{get:function(){return this.Dg},set:function(a){1>a&&Mn(a,">= 1",Lo,"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}}}),Lo.prototype.stopAnimation=Lo.prototype.Cc;var Xl=null,jl=!1,cu=new Ln(Lo,"Default",1),hu=new Ln(Lo,"AnimateLocations",2),Jl=new Ln(Lo,"None",3);Lo.className="AnimationManager",Lo.defineAnimationEffect=function(a,y){jl||(_l(),jl=!0),Xl.add(a,y)},Lo.Default=cu,Lo.AnimateLocations=hu,Lo.None=Jl;function gs(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=du,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Gr,this.vc=new ci,this.Tt=new ci,this.yl=new In,this.Ut=new In,this.dw=Th,a&&Object.assign(this,a)}gs.prototype.suspend=function(){this.Xk=!0},gs.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,Ql(this,!0),xs(this.Yd),fl(this.H),Ts(this.Yd),this.H.redraw()};function Ra(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}it=gs.prototype,it.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 vn?a=x:x instanceof tn&&(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===cu&&this===y.defaultAnimation&&(this.Lp=Zu,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=Cf),xs(y),this.yl.each(function(b){b.data=null,a.add(b)}),Ts(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Qo(y,this),this)},it.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},it.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof vn?this.H=a:a instanceof tn&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Ti){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return oa(this,a,y,x,b,E),this};function oa(a,y,x,b,E,te){var ne=a.vc;if(y instanceof vn&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(uh(b),av(),b=[ru.j,ru.u,ru.o,ru.F],uh(E),av(),E=[ru.j,ru.u,ru.o,ru.F]),ne.contains(y)){var ae=ne.I(y),fe=ae.start,_e=ae.end;fe[x]===void 0&&(fe[x]=Ns(b)),_e[x]=Ns(E)}else fe={},_e={},fe[x]=Ns(b),_e[x]=Ns(E),ae=fe.position,y instanceof tn&&ae instanceof Mt&&!ae.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&ae.assign(_e.position),ae=new sc(fe,_e,te),ne.add(y,ae);ne=fe[x],ne instanceof Mt&&!ne.w()&&ne.assign(a.o),te&&x.indexOf("position:")===0&&y instanceof Ti?ae.Ku.location=Ns(y.location):te&&(ae.Ku[x]=Ns(b))}function Ns(a){return a instanceof Mt||a instanceof Qn?a.copy():a}it.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},it.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function Ql(a,y){if(!a.Xk||y){var x=a.Yd;if(a.bc!==!1){var b=+new Date,E=b>a.cn?a.Gd:b-a.Qd;y&&(E=a.gw,E<a.Gd?(a.Qd=+new Date-E,a.cn=a.Qd+a.Gd):E=a.Gd),xs(x),_c(a,E),fl(a.H,!0),Ts(x),b>a.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function _c(a,y){for(var x=a.Gd,b=a.vc.iterator,E=a.Wk;b.next();){var te=b.key;if(!(te instanceof tn&&te.diagram===null)){var ne=b.value,ae=E?ne.end:ne.start;ne=E?ne.start:ne.end;var fe=Xl,_e;for(_e in ne)_e==="position"&&(ne["position:placeholder"]||ne["position:nodeCollapse"])||fe.get(_e)===null||fe.get(_e)(te,ae[_e],ne[_e],a.Lp,y,x,a)}}}it.stop=function(){return this.bc?(this.Ml(!0),this):this},it.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,xs(x);for(var b=this.vc,E=this.yl.iterator;E.next();)y.remove(E.value);for(E=this.Ut.iterator;E.next();)E.value.v();E=this.ho,b=b.iterator;for(var te=Xl;b.next();){var ne=b.key,ae=b.value,fe=E?ae.end:ae.start,_e=E?ae.start:ae.end,Te=ae.Ku,je;for(je in _e)if(te.get(je)!==null){var Ve=je;!ae.Hu||Ve!=="position:nodeCollapse"&&Ve!=="position:placeholder"||(Ve="position"),te.get(Ve)(ne,fe[je],Te[je]!==void 0?Te[je]:ae.Hu?fe[je]:_e[je],this.Lp,this.Gd,this.Gd,this)}ae.Hu&&Te.location!==void 0&&ne instanceof Ti&&(ne.location=Te.location),ae.nv&&ne instanceof Ti&&ne.Zb(!1)}if(y.As.clear(),nd(y,!1),y.Ya(),y.N(),fl(y,!0),x.defaultAnimation===this){for(je=x.pr.iterator;je.next();)E=je.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}fl(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Ts(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),Ra(this,null),x.Ml(this),y.$b())}},it.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof tr&&(b=y.placeholder),b!==null?(x=b.ga(Xs),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new Mt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof tr)for(a=a.memberParts;a.next();)b=a.value,b instanceof oi&&this.Cj(b,y)},it.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof tr&&(x=y.placeholder),x!==null){var b=x.ga(Xs);x=x.padding,b.x+=x.left,b.y+=x.top,this.add(a,"position:placeholder",a.position,b,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),b=this.vc,b.contains(a)&&(b.I(a).nv=!0),a instanceof tr)for(a=a.memberParts;a.next();)b=a.value,b instanceof oi&&this.Aj(b,y)}},it.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Ye.Object.defineProperties(gs.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Mn(a,">= 1",gs,"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:Nt("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}}}),gs.prototype.getTemporaryState=gs.prototype.Ez,gs.prototype.stop=gs.prototype.stop,gs.prototype.add=gs.prototype.add,gs.prototype.addTemporaryPart=gs.prototype.Iy;function du(a,y,x,b){return a/=b/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Zu(a,y,x,b){return a===b?y+x:x*(-Math.pow(2,-10*a/b)+1)+y}gs.className="Animation",gs.EaseLinear=function(a,y,x,b){return x*a/b+y},gs.EaseInOutQuad=du,gs.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},gs.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},gs.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},gs.EaseOutExpo=Zu;function sc(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}sc.className="AnimationState";function zl(a,y,x){this.xd=null,this.rf=a,this.so=x||js,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=wa))}zl.prototype.copy=function(){var a=new zl(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 ls(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))}Ye.Object.defineProperties(zl.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 js=new Ln(zl,"Default",1),wa=new Ln(zl,"Immediate",2),zs=new Ln(zl,"Bundled",3);zl.className="AnimationTrigger",zl.Default=js,zl.Immediate=wa,zl.Bundled=zs;function os(a){pr(this),this.H=null,this.Pa=new Bn,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)}it=os.prototype,it.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,za(x)}a.clear(),this.Zq.length=0},it.Xe=function(a){this.H=a},it.toString=function(a){a===void 0&&(a=0);var y='Layer "'+this.name+'"';if(0>=a)return y;for(var x=0,b=0,E=0,te=0,ne=0,ae=this.Pa.iterator;ae.next();){var fe=ae.value;fe instanceof tr?E++:fe instanceof oi?b++:fe instanceof $n?te++:fe instanceof qr?ne++:x++}if(ae="",0<x&&(ae+=x+" Parts "),0<b&&(ae+=b+" Nodes "),0<E&&(ae+=E+" Groups "),0<te&&(ae+=te+" Links "),0<ne&&(ae+=ne+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,ae+=`
|
|
|
`+x.toString(),b=x.data,b!==null&&Ir(b)&&(ae+=" #"+Ir(b)),x instanceof oi?ae+=" "+hi(b):x instanceof $n&&(ae+=" "+hi(x.fromNode)+" "+hi(x.toNode));return y+" "+this.Pa.count+": "+ae},it.ic=function(a,y,x){if(y===void 0&&(y=null),x===void 0&&(x=null),this.Uh===!1)return null;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var E=Mt.alloc(),te=this.Pa.s,ne=te.length;ne--;){var ae=te[ne];if((b!==!0||hd(ae)!==!1)&&ae.isVisible()&&(E.assign(a),hr(E,ae.oe),ae=ae.ic(E,y,x),ae!==null&&(y!==null&&(ae=y(ae)),ae!==null&&(x===null||x(ae)))))return Mt.free(E),ae}return Mt.free(E),null},it.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof Bn||b instanceof In||(b=new In),this.Uh===!1)return b;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var te=Mt.alloc(),ne=this.Pa.s,ae=ne.length;ae--;){var fe=ne[ae];if((E!==!0||hd(fe)!==!1)&&fe.isVisible()){te.assign(a),hr(te,fe.oe);var _e=fe;fe.ji(te,y,x,b)&&(y!==null&&(_e=y(_e)),_e===null||x!==null&&!x(_e)||b.add(_e))}}return Mt.free(te),b},it.Cf=function(a,y,x,b,E){if(y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof Bn||E instanceof In||(E=new In),this.Uh===!1)return E;var te=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(te=!0);for(var ne=this.Pa.s,ae=ne.length;ae--;){var fe=ne[ae];if((te!==!0||hd(fe)!==!1)&&fe.isVisible()){var _e=fe;fe.Cf(a,y,x,b,E)&&(y!==null&&(_e=y(_e)),_e===null||x!==null&&!x(_e)||E.add(_e))}}return E},it.Nu=function(a,y,x,b,E,te,ne){if(this.Uh===!1)return E;for(var ae=this.Pa.s,fe=ae.length;fe--;){var _e=ae[fe];if((ne!==!0||hd(_e)!==!1)&&te(_e)&&_e.isVisible()){var Te=_e;_e.Cf(a,y,x,b,E)&&(y!==null&&(Te=y(Te)),Te===null||x!==null&&!x(Te)||E.add(Te))}}return E},it.og=function(a,y,x,b,E,te){if(x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof Bn||E instanceof In)&&(te=E),E=!0),te instanceof Bn||te instanceof In||(te=new In),this.Uh===!1)return te;var ne=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ne=!0);for(var ae=Mt.alloc(),fe=Mt.alloc(),_e=this.Pa.s,Te=_e.length;Te--;){var je=_e[Te];if((ne!==!0||hd(je)!==!1)&&je.isVisible()){ae.assign(a),hr(ae,je.oe),fe.h(a.x+y,a.y),hr(fe,je.oe);var Ve=je;je.og(ae,fe,x,b,E,te)&&(x!==null&&(Ve=x(Ve)),Ve===null||b!==null&&!b(Ve)||te.add(Ve))}}return Mt.free(ae),Mt.free(fe),te},it.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=Hn();for(var E=Hn(),te=0;te<b;te++){var ne=x[te];if(ne.vw=te,ne instanceof $n){if(ne.fd===!1)continue}else if(ne instanceof qr&&ne.adornedPart!==null)continue;var ae=ne.actualBounds;ne.isVisible()&&Po(ae,y)?(ne.Fd(!0),a.push(ne)):(ne.Fd(!1),ne.adornments!==null&&0<ne.adornments.count&&E.push(ne))}for(y=0;y<a.length;y++)for(x=a[y],Rv(x),x=x.adornments;x.next();)b=x.value,b.measure(1/0,1/0),b.arrange(),b.Fd(!0);for(y=0;y<E.length;y++)Rv(E[y]);ei(a),ei(E)}}};function Ma(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}it.gc=function(a,y,x){if(this.visible&&this.pb!==0&&(x===void 0&&(x=!0),x||!this.isTemporary)){x=this.Pa.s;var b=x.length;if(b!==0){if(a.isTemporary)for(var E=0;E<b;E++)x[E].Gj();E=Ma(this,a);var te=this.Zq;te.length=0;for(var ne=y.scale,ae=kn.alloc(),fe=0;fe<b;fe++)this.Oj(a,x[fe],y,te,ne,ae,!0);if(kn.free(ae),a.isTemporary)for(y=0;y<b;y++)x[y].Gj();a.globalAlpha=E}}};function El(a,y,x,b,E){if(a.visible&&a.pb!==0&&(E||!a.isTemporary)){E=a.Pa.s;var te=E.length;if(te!==0){var ne=Ma(a,y),ae=a.Zq;ae.length=0;for(var fe=x.scale,_e=kn.alloc(),Te=0;Te<te;Te++){var je=E[Te];b.contains(je)&&a.Oj(y,je,x,ae,fe,_e,!1)}kn.free(_e),y.globalAlpha=ne}}}it.Oj=function(a,y,x,b,E,te,ne){if(ne&&!hd(y))a.Hs(y);else{if(b!==null&&y instanceof $n&&(y.isOrthogonal&&b.push(y),y.fd===!1)){a.Hs(y);return}for(ne=!1,b=y.containingGroup;b!==null;)ne?b.tb!==null&&te.Ex(b.tb):b.tb!==null&&(ne=!0,te.assign(b.tb)),b=b.containingGroup;var ae=y.actualBounds;if(b=!1,ne&&y.isVisible()){if(!te.Yc(ae)){a.Hs(y);return}b=!te.Re(ae)}b&&(a.save(),a instanceof Hl?a.bk=te.copy():(a.beginPath(),a.rect(te.x,te.y,te.width,te.height),a.clip())),ae.width*E>x.Oq||ae.height*E>x.Oq?y.gc(a,x):(E=y.actualBounds,te=y.naturalBounds,E.width===0||E.height===0||isNaN(E.x)||isNaN(E.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(ws(y,a,y.areaBackground,!0,!0,te,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(ws(y,a,"rgba(0,0,0,0.3)",!0,!1,te,E),a.fillRect(E.x,E.y,E.width,E.height)),y.background!==null&&(a.transform(x.m11,x.m12,x.m21,x.m22,x.dx,x.dy),ws(y,a,y.background,!0,!1,te,E),a.fillRect(0,0,te.width/2,te.height/2),x.ws()||(y=1/(x.m11*x.m22-x.m12*x.m21),a.transform(x.m22*y,-x.m12*y,-x.m21*y,x.m11*y,y*(x.m21*x.dy-x.m22*x.dx),y*(x.m12*x.dx-x.m11*x.dy)))))),b&&(a.restore(),a.Vc(!0))}},it.g=function(a,y,x,b,E){var te=this.diagram;te!==null&&te.cb(Vo,a,this,y,x,b,E)},it.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&za(y),a>=b.count)a=b.count;else if(b.M(a)===y)return-1;return b.Gb(a,y),y.Vo(x),b=this.diagram,b!==null&&(x?b.N():b.oi(y)),Nu(this,a,y),a},it.pc=function(a,y,x){if(!x&&y.layer!==this&&y.layer!==null)return y.layer.pc(a,y,x);var b=this.Pa;if(0>a||a>=b.length){if(a=b.indexOf(y),0>a)return-1}else if(b.M(a)!==y&&(a=b.indexOf(y),0>a))return-1;return y.Wo(x),b.mb(a),b=this.diagram,b!==null&&(x?b.N():b.pc(y)),y.Ig=null,za(y),a};function Nu(a,y,x){if(y=mf(a,y,x),x instanceof tr&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var b=-1,E=a.Pa.s,te=E.length,ne=0;ne<te;ne++){var ae=E[ne];if(ae===x&&(y=ne,0<=b)||0>b&&ae.containingGroup===x&&(b=ne,0<=y))break}!(0>b)&&b<y&&(E=a.Pa,E.mb(y),E.Gb(b,x))}y=x.containingGroup,y!==null&&Nu(a,-1,y)}x.svg!==null&&x.svg.remove()}function mf(a,y,x){var b=x.zOrder;if(isNaN(b))return y;a=a.Pa;var E=a.count;if(1>=E)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var te=y-1,ne=NaN;0<=te&&(ne=a.M(te).zOrder,!!isNaN(ne));)te--;for(var ae=y+1,fe=NaN;ae<E&&(fe=a.M(ae).zOrder,!!isNaN(fe));)ae++;if(!isNaN(ne)&&ne>b)for(;;){if(te===-1||ne<=b){if(te++,te===y)break;return a.mb(y),a.Gb(te,x),te}for(ne=NaN;0<=--te&&(ne=a.M(te).zOrder,isNaN(ne)););}else if(!isNaN(fe)&&fe<b)for(;;){if(ae===E||fe>=b){if(ae--,ae===y)break;return a.mb(y),a.Gb(ae,x),ae}for(fe=NaN;++ae<E&&(fe=a.M(ae).zOrder,isNaN(fe)););}return y}Ye.Object.defineProperties(os.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===""&&Nt("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Nt("Layer.name is already present in this diagram: "+a);for(this.xa=a,this.g("name",y,a),a=this.Pa.iterator;a.next();)a.value.layerName=this.xa}}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&Mn(a,"0 <= value <= 1",os,"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))}}}),os.prototype.findObjectsNear=os.prototype.og,os.prototype.findObjectsIn=os.prototype.Cf,os.prototype.findObjectsAt=os.prototype.ji,os.prototype.findObjectAt=os.prototype.ic,os.className="Layer";function vn(a,y){if(hm||(Fa(),hm=!0),pr(this),ac=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,ys){var x=this,b=function(){x.removeEventListener(_t.document,"DOMContentLoaded",b,!1),x.setRTL()};_t.document.body!==null?this.setRTL():x.addEventListener(_t.document,"DOMContentLoaded",b,!1)}this.ol=null,rp.add("Model",mo);var E=this;return this.Hb=function(te){var ne=E.partManager;if(te.model===ne.diagram.model&&ne.diagram.aa){ne.diagram.aa=!1;try{var ae=te.change;te.modelChange===""&&ae===Vo&&ne.updateDataBindings(te.object,te.propertyName)}finally{ne.diagram.aa=!0}}},this.Oc=function(te){E.partManager.doModelChanged(te)},this.hu=this.ku=null,vf(this),this.model=hy(),this.Wg=!0,id(this),this.layout=new es,this.Wg=!1,this.ck=this.ek=this.fk=this.dk=this.ui=this.aA=this.$j=this.Ov=null,this.hk=function(){},this.preventDefault=null,this.rn=!1,this.Yf=new dm,a!==void 0&&(typeof a=="string"||_t.Element&&a instanceof Element?Rd(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Bc,ac;function vf(a){a.Yd=new Lo,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new Bn,a.pj=new ci,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new Mt(NaN,NaN).freeze(),a.du=new Mt(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new Mt(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new gr,a.zu=new Mt(NaN,NaN).freeze(),a.ut=new kn(NaN,NaN,NaN,NaN).freeze(),a.rj=new Mi(0,0,0,0).freeze(),a.sj=Th,a.nu=!1,a.Zt=null,a.fu=null,a.yh=$a,a.zk=oo,a.Fg=$a,a.pq=oo,a.yt=Xs,a.Bt=Xs,a.Fc=!0,a.pn=!1,a.De=new In,a.Eh=new ci,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Mi(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new Ea,a.bq.diagram=a,a.Qg=new Ea,a.Qg.diagram=a,a.cj=new Ea,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,nv(a),a.ai=new In,a.Ht=!0,a.uu=kh,a.pw=!1,a.wu=bf,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 ci,a.Xn=new Bn,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 Mi(5).freeze(),a.Hw=new In().freeze(),a.Nt=999999999,a.nw=new In().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 In,a.ow=new In,a.Xh=null,a.aw=new Qn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Mt,bounds:new kn,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 kn(NaN,NaN,NaN,NaN).freeze(),a.wo=new Qn(NaN,NaN).freeze(),a.Sp=new kn(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new ci;var y=new oi,x=new Mo;x.bind(new Hs("text","",hi)),y.add(x),a.ny=y,a.Lg.add("",y),y=new oi,x=new Mo,x.stroke="brown",x.bind(new Hs("text","",hi)),y.add(x),a.Lg.add("Comment",y),y=new oi,y.selectable=!1,y.avoidable=!1,x=new dr,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 ci,y=new tr,y.selectionObjectName="GROUPPANEL",y.type=Wn.Vertical,x=new Mo,x.font="bold 12pt sans-serif",x.bind(new Hs("text","",hi)),y.add(x),x=new Wn(Wn.Auto),x.name="GROUPPANEL";var b=new dr;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new rl,b.padding=new Mi(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new ci,y=new $n,x=new dr,x.isPanelMain=!0,y.add(x),x=new dr,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new $n,x=new dr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new qr,y.type=Wn.Auto,x=new dr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new rl,x.margin=new Mi(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new qr,y.type=Wn.Link,x=new dr,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 mo,a.toolManager=new Wo,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new pe,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=oh(),a.eq=null,a.fq=ss,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 Mt,a.zy=500,a.wp=new Mt,a.wq=!1}vn.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Kd=null,ad="",Ph(this,!1),this.Xn.clear(),vp(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function Ph(a,y){a.animationManager.Cc(!0),a.Hw=new In().freeze(),a.nw=new In().freeze();var x=a.skipsUndoManager,b=a.cc!==null&&a.cc!==void 0;b&&(a.skipsUndoManager=!0);var E=null;a.fe!==null&&(E=a.fe.part,E!==null&&a.remove(E));var te=[],ne=a.Wa.length;if(y){for(y=0;y<ne;y++)for(var ae=a.Wa.s[y].parts;ae.next();){var fe=ae.value;fe!==E&&fe.data===null&&te.push(fe)}for(y=0;y<te.length;y++)a.remove(te[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(),vp(),a.Og.clear(),mr=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),te}function oh(){return null}vn.prototype.reset=function(){this.clear(),this.vb=!0,vf(this),Mc(this),this.Wg=!0,id(this),this.layout=new es,this.Wg=!1,this.model=hy(),this.model.undoManager=new Fo,this.vb=this.rn=!1,this.N()},vn.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=_t.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},vn.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=_t.document.body);var y=0;if(ys){var x=cm;y=Bc,x===null&&(x=cm=on("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Bc=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 b=x.offsetWidth;y.style.overflow="scroll",x=x.offsetWidth,b===x&&(x=y.clientWidth),a.removeChild(y),y=b-x,y!==0||Cr||(y=11)}this.Db=y,this.Gw=!0},vn.prototype.qb=function(a){a.classType===vn&&(this.autoScale=a)},vn.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 Rd(a,y){if(ys){if(y!=null||Nt("Diagram setup requires an argument DIV."),a.Ka!==null&&Nt("Diagram has already completed setup."),typeof y=="string"?a.Ka=_t.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Nt("No DIV or DIV id supplied: "+y),a.Ka===null&&Nt("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Nt("Invalid div id; div already has a Diagram associated with it."),!a.ol&&_t.ResizeObserver){var x=Pn(function(){a.$b()},250);a.ol=new _t.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}_t.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var b="rgba(2"+y+"5, 255, 255, 0)";y--,a.Ka.style["-webkit-tap-highlight-color"]=b,a.Ka.innerHTML="",a.Ka.H=a,a.Ka.goDiagram=a,a.Ka.go=_t.go;var E=new Du(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",_t.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),E.style.zIndex="2",E.style.userSelect="none",E.style.MozUserSelect="none",E.style.touchAction="none",E.style.letterSpacing="normal !important",E.style.wordSpacing="normal !important"),a.ta=E,a.ib=E.context,b=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),Wd(a,a.Aa,a.ya),a.Ka.insertBefore(E.Oa,a.Ka.firstChild),E=new Du(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,ys){E=on("div");var te=on("div");E.style.position="absolute",E.style.overflow="auto",E.style.width=a.Aa+"px",E.style.height=a.ya+"px",E.style.zIndex="1",te.style.position="absolute",te.style.width="1px",te.style.height="1px",a.Ka.appendChild(E),E.appendChild(te),E.onscroll=Yf,E.addEventListener("pointerdown",Sf),E.H=a,E.uy=!0,E.vy=!0,a.ku=E,a.hu=te}a.hk=Pn(function(){a.Yh=null,a.N()},300),a.Ov=Pn(function(){Bd(a)},250),a.preventDefault=function(ne){return ne.preventDefault(),!1},a.$j=function(ne){if(a.isEnabled){var ae=Ll(a,ne,!0);ae.bubbles=!0;var fe=0,_e=0;ae.delta=0,ne.deltaX!==void 0?(ne.deltaX!==0&&(fe=0<ne.deltaX?1:-1),ne.deltaY!==0&&(_e=0<ne.deltaY?1:-1),ae.delta=Math.abs(ne.deltaX)>Math.abs(ne.deltaY)?-fe:-_e):ne.wheelDeltaX!==void 0?(ne.wheelDeltaX!==0&&(fe=0<ne.wheelDeltaX?-1:1),ne.wheelDeltaY!==0&&(_e=0<ne.wheelDeltaY?-1:1),ae.delta=Math.abs(ne.wheelDeltaX)>Math.abs(ne.wheelDeltaY)?-fe:-_e):ne.wheelDelta!==void 0&&ne.wheelDelta!==0&&(ae.delta=0<ne.wheelDelta?1:-1),a.doMouseWheel(),eu(ae,ne)}},a.aA=function(ne){a.isEnabled&&(a.Vk=!1,Ll(a,ne,!0),ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())},a.ui=function(ne){if(a.isEnabled){a.Vk=!0;var ae=a.Yt;ae[ne.pointerId]===void 0&&(ae[ne.pointerId]=ne),ae=a.oj;var fe=!1;if(ae[0]===null||ae[0].pointerId!==ne.pointerId&&ae[0].pointerType===ne.pointerType)if(ae[1]!==null&&ae[1].pointerId===ne.pointerId)ae[1]=ne,fe=!0;else if(ae[0]===null)ae[0]=ne;else if(ae[1]===null)ae[1]=ne,fe=!0;else{ne.preventDefault();return}else ae[0]=ne;(ae=ne.pointerType==="touch"||ne.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var _e=fe;fe=zd(a,ne,!0,!1,!0,_e),Lh(a,ne,fe),fe.targetDiagram=jd(ne,ne.target),fe.targetObject=null,_e||fe.clone(a.bq),_e=a.uw,ae=ae?25:10,ne.timeStamp-a.tw<a.zy&&!(Math.abs(_e.x-ne.screenX)>ae||Math.abs(_e.y-ne.screenY)>ae)?a.yq++:a.yq=1,fe.clickCount=a.yq,a.tw=ne.timeStamp,a.uw.sg(ne.screenX,ne.screenY),a.doMouseDown(),ne.button===1?ne.preventDefault():eu(fe,ne)}},a.dk=function(ne){if(a.isEnabled){a.Vk=!0;var ae=a.oj;if(ae[0]===null||ae[0].pointerId!==ne.pointerId&&ae[0].pointerType===ne.pointerType){if(ae[1]!==null&&ae[1].pointerId===ne.pointerId){ae[1]=ne;return}if(ae[0]===null)ae[0]=ne;else return}else ae[0]=ne;if(ae[0].pointerId===ne.pointerId){ae=zd(a,ne,!1,!1,!1,ae[1]!==null);var fe=_t.document.elementFromPoint(ne.clientX,ne.clientY)||null;fe!==null&&fe.shadowRoot!==void 0&&fe.shadowRoot!==null&&(fe=fe.shadowRoot.elementFromPoint(ne.clientX,ne.clientY));var _e=a,Te=ne;fe&&fe.H&&(Te=ne,_e=fe.H),ae.targetDiagram=_e,Lh(a,Te,ae),ae.targetObject=null,a.doMouseMove(),eu(ae,ne)}}},a.fk=function(ne){if(a.isEnabled){a.Vk=!0;var ae=ne.pointerType==="touch"||ne.pointerType==="pen",fe=a.Yt;if(ae&&a.qu)delete fe[ne.pointerId],ne.preventDefault();else if(fe=a.oj,fe[0]===null||fe[0].pointerId!==ne.pointerId&&fe[0].pointerType===ne.pointerType)fe[1]!==null&&fe[1].pointerId===ne.pointerId&&(fe[1]=null);else{fe[0]=null,fe=zd(a,ne,!1,!0,!0,!1);var _e=_t.document.elementFromPoint(ne.clientX,ne.clientY)||null;_e!==null&&_e.shadowRoot!==void 0&&_e.shadowRoot!==null&&(_e=_e.shadowRoot.elementFromPoint(ne.clientX,ne.clientY)),_e!==null&&_e.H instanceof vn&&_e.H!==a&&Lh(_e.H,ne,fe),_e===null&&(_e=ne.target),Lh(a,ne,fe),fe.clickCount=a.yq,fe.targetDiagram=jd(ne,_e),fe.targetObject=null,a.doMouseUp(),eu(fe,ne),ae&&(a.wq=!1)}}},a.ek=function(ne){if(a.isEnabled){a.Vk=!1;var ae=a.Yt;ae[ne.pointerId]&&delete ae[ne.pointerId],ae=a.oj,ae[0]!==null&&ae[0].pointerId===ne.pointerId&&(ae[0]=null),ae[1]!==null&&ae[1].pointerId===ne.pointerId&&(ae[1]=null),ne.pointerType!=="touch"&&ne.pointerType!=="pen"&&(ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())}},a.ck=function(ne){var ae=a.oj;ae[0]!==null&&ae[0].pointerId===ne.pointerId?(ae[0]=null,a.wq=!1):ae[1]!==null&&ae[1].pointerId===ne.pointerId&&(ae[1]=null)},a.Vp=b.Z["d"+_f[1]+_f[2]+"wI"+$d.slice(1,5)]["b"+Ox.slice(1,y)](b.Z,Pf,y,y),b.Vc(!0),Kp(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}vn.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},vn.prototype.removeEventListener=function(a,y,x,b){a.removeEventListener(y,x,{capture:b})};function Kp(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(_t,"resize",a.Ov,!1)}function Ba(a){30<a.Sq&&(a.Yh=1)}function nd(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),di&&di.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}vn.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:_t.devicePixelRatio||1},vn.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},vn.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},vn.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},vn.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},vn.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},vn.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},vn.prototype.doFocus=function(){this.focus()},vn.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=_t.scrollX||_t.pageXOffset,y=_t.scrollY||_t.pageYOffset;this.ta.focus(),_t.scrollTo(a,y)}},vn.prototype.Oy=function(){this.H.R("GainedFocus")},vn.prototype.Ny=function(){this.H.R("LostFocus")};function Bd(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,b=a.Be?a.Db:0,E=a.Mb;a.Mb=a.computePixelRatio(),a.Mb!==E&&(a.pn=!0,a.$b()),(y.clientWidth!==a.Aa+x||y.clientHeight!==a.ya+b)&&(a.Ee=!0,a.Fc=!0,y=a.layout,y!==null&&y.isViewportSized&&a.autoScale===$a&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function id(a){var y=new os;y.name="Background",a.Al(y),y=new os,y.name="",a.Al(y),y=new os,y.name="Foreground",a.Al(y),y=new os,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new os,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new os,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function yf(a){var y=new Wn(Wn.Grid);y.name="GRID";var x=new dr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new dr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new dr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new dr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new dr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new dr,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Ti,x.add(y),x.layerName="Grid",x.zOrder=0,x.isInDocumentBounds=!1,x.isAnimated=!1,x.pickable=!1,x.locationObjectName="GRID",a.add(x),a.partManager.parts.remove(x),y.visible=!1,y}function Yf(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):zc(this.H)}function Sf(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):zc(this.H)}vn.prototype.kx=function(a){if(this.ta!==null){var y=this.ku,x=this.hu;this.qr=!0;var b=this.documentBounds,E=this.viewportBounds,te=this.rj,ne=b.x-te.left,ae=b.y-te.top,fe=b.width+te.left+te.right,_e=b.height+te.top+te.bottom,Te=b.right+te.right;te=b.bottom+te.bottom;var je=E.x;b=E.y;var Ve=E.width,Qe=E.height,rt=E.right,ct=E.bottom;E=this.scale;var Dt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Dt=Dt+a.scrollWidth-a.clientWidth;break;case"reverse":Dt=a.scrollWidth-Dt-a.clientWidth}var Lt=Dt;Ve<fe||Qe<_e?(Dt=Mt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Lt&&(Dt.x=Lt/E+ne,this.ju=Lt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Dt.y=a.scrollTop/E+ae,this.lu=a.scrollTop),this.position=Dt,Mt.free(Dt),this.Ee=this.qr=!1):(Dt=Mt.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<je&&(this.position=Dt.h(Lt+ne,this.position.y)),Te>rt&&(this.position=Dt.h(-(y.scrollWidth-this.Aa)+Lt-this.Aa/E+Te,this.position.y))),a.vy&&this.allowVerticalScroll&&(ae<b&&(this.position=Dt.h(this.position.x,a.scrollTop+ae)),te>ct&&(this.position=Dt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+te))),Mt.free(Dt),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,Te=b.right,rt=E.right,te=b.bottom,ct=E.bottom,ne=b.x,je=E.x,ae=b.y,b=E.y,Ve>=fe&&ne>=je&&Te<=rt&&(x.style.width="1px"),Qe>=_e&&ae>=b&&te<=ct&&(x.style.height="1px"))}},vn.prototype.computeBounds=function(a){return a===void 0&&(a=new kn),ba(this),Fd(this,a)};function Fd(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,b=a.Wa.s,E=b.length,te=0;te<E;te++){var ne=b[te];if(ne.visible&&ne.isInDocumentBounds){ne=ne.Pa.s;for(var ae=ne.length,fe=0;fe<ae;fe++){var _e=ne[fe];_e.isInDocumentBounds&&_e.isVisible()&&(_e=_e.actualBounds,_e.w()&&(x?(x=!1,y.assign(_e)):y.ed(_e)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}vn.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(sn(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof $n||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds))}else for(a=a.iterator;a.next();)b=a.value,!y&&b instanceof $n||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new kn(NaN,NaN,0,0):x};function ql(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=Mt.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=kn.allocAt(0,0,b.width,b.height);var E=Mt.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,kn.free(b),Mt.free(E),Mt.free(x)}x=a.yh,y&&a.Fg!==$a&&(x=a.Fg);var te=x!==$a?_h(a,x):a.scale;x=a.pa.x,b=a.pa.y,E=a.Aa/te;var ne=a.ya/te,ae=a.zk,fe=a.pq;y&&!ae.sb()&&(fe.sb()||fe.Xb())&&(ae=fe.Xb()?jr:fe),xf(a,a.documentBounds,E,ne,ae,y),y=a.scale,a.scale=te,a.vb=!1,te=a.viewportBounds,rn.B(te.x,x)&&rn.B(te.y,b)&&rn.B(te.width,E)&&rn.B(te.height,ne)||a.onViewportBoundsChanged(new kn(x,b,E,ne),te,y,!1)}}function _h(a,y){var x=a.Pp;if(a.ta===null)return x;a.Va();var b=a.documentBounds;if(!b.w())return x;var E=b.width;b=b.height;var te=a.Aa+(a.gf?a.Db:0),ne=a.ya+(a.Be?a.Db:0),ae=te/E,fe=ne/b;return y===tu?(y=Math.min(fe,ae),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===ld?(y=fe>ae?(ne-a.Db)/b:(te-a.Db)/E,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}vn.prototype.zoomToFit=function(){var a=this.sj;this.sj=Th,this.scale=_h(this,tu),a!==Th&&(ql(this,!1),xf(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},it=vn.prototype,it.BA=function(a,y){y===void 0&&(y=tu);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===tu||y===ld)if(isNaN(x))E=this.viewportBounds.height*this.scale/b;else if(isNaN(b))E=this.viewportBounds.width*this.scale/x;else{E=this.Aa;var te=this.ya;E=y===ld?te/b>E/x?(te-(this.Be?this.Db:0))/b:(E-(this.gf?this.Db:0))/x:Math.min(te/b,E/x)}this.scale=E,this.position=new Mt(a.x,a.y)}},it.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new Mt(x.x+(a.x*x.width+a.offsetX)-(y.x*b.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*b.height-y.offsetY))},it.zz=function(a){if(a instanceof tn){this.eq=a;var y=Mt.alloc();this.fq=this.op(a.ga(Xs,y)),Mt.free(y)}else this.eq=null,this.fq=ss};function xf(a,y,x,b,E,te){var ne=Mt.allocAt(a.pa.x,a.pa.y),ae=ne.x,fe=ne.y;if(a.eq!==null){var _e=Mt.alloc();_e=a.eq.ga(Xs,_e),ae=_e.x-a.fq.x/a.scale,fe=_e.y-a.fq.y/a.scale,E=ms,Mt.free(_e)}(te||a.scrollMode===Th)&&(E.sb()&&(x>y.width&&(ae=y.x+(E.x*y.width+E.offsetX)-(E.x*x-E.offsetX)),b>y.height&&(fe=y.y+(E.y*y.height+E.offsetY)-(E.y*b-E.offsetY))),E=a.rj,te=x-y.width,x<y.width+E.left+E.right?(ae=Math.min(ae+x/2,y.right+Math.max(te,E.right)-x/2),ae=Math.max(ae,y.left-Math.max(te,E.left)+x/2),ae-=x/2):ae>y.left?ae=y.left:ae<y.right-x&&(ae=y.right-x),x=b-y.height,b<y.height+E.top+E.bottom?(fe=Math.min(fe+b/2,y.bottom+Math.max(x,E.bottom)-b/2),fe=Math.max(fe,y.top-Math.max(x,E.top)+b/2),fe-=b/2):fe>y.top?fe=y.top:fe<y.bottom-b&&(fe=y.bottom-b)),ne.x=isFinite(ae)?ae:-a.yb.left,ne.y=isFinite(fe)?fe:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,ne),ne.x=y.x,ne.y=y.y),ma(a.Yd,a.pa,ne),a.pa.h(ne.x,ne.y),Mc(a),Mt.free(ne)}it.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=Ku(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof Ti)return a}else if(a=Ku(this,a,function(x){return x.part}),a instanceof Ti)return a;return null},it.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),ba(this);for(var b=this.Wa.iteratorBackwards;b.next();){var E=b.value;if(E.visible&&(E=E.ic(a,y,x),E!==null))return E}return null};function Ku(a,y,x,b){for(x===void 0&&(x=null),b===void 0&&(b=null),ba(a),a=a.Wa.iteratorBackwards;a.next();){var E=a.value;if(E.visible&&!E.isTemporary&&(E=E.ic(y,x,b),E!==null))return E}return null}it.lz=function(a,y,x){return y===void 0&&(y=!0),Fc(this,a,function(b){return b.part},y?function(b){return b instanceof Ti&&b.canSelect()}:null,x)};function Fc(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof Bn||E instanceof In||(E=new In),ba(a),a=a.Wa.iteratorBackwards;a.next();){var te=a.value;te.visible&&!te.isTemporary&&te.ji(y,x,b,E)}return E}it.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof Bn||b instanceof In||(b=new In),ba(this);for(var E=this.Wa.iteratorBackwards;E.next();){var te=E.value;te.visible&&te.ji(a,y,x,b)}return b},it.ux=function(a,y,x,b){return y===void 0&&(y=!1),x===void 0&&(x=!0),Eh(this,a,function(E){return E instanceof Ti&&(!x||E.canSelect())},y,b)},it.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof Bn||E instanceof In||(E=new In),ba(this);for(var te=this.Wa.iteratorBackwards;te.next();){var ne=te.value;ne.visible&&ne.Cf(a,y,x,b,E)}return E},it.Nu=function(a,y,x,b,E,te){var ne=new In;ba(this);for(var ae=this.Wa.iteratorBackwards;ae.next();){var fe=ae.value;fe.visible&&fe.Nu(a,y,x,b,ne,E,te)}return ne};function Eh(a,y,x,b,E){var te=null;for(te===void 0&&(te=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof Bn||E instanceof In||(E=new In),ba(a),a=a.Wa.iteratorBackwards;a.next();){var ne=a.value;ne.visible&&!ne.isTemporary&&ne.Cf(y,te,x,b,E)}return E}it.mz=function(a,y,x,b,E){return x===void 0&&(x=!0),b===void 0&&(b=!0),sh(this,a,y,function(te){return te instanceof Ti&&(!b||te.canSelect())},x,E)},it.og=function(a,y,x,b,E,te){x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof Bn||E instanceof In)&&(te=E),E=!0),te instanceof Bn||te instanceof In||(te=new In),ba(this);for(var ne=this.Wa.iteratorBackwards;ne.next();){var ae=ne.value;ae.visible&&ae.og(a,y,x,b,E,te)}return te};function sh(a,y,x,b,E,te){var ne=null;for(ne===void 0&&(ne=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof Bn||E instanceof In)&&(te=E),E=!0),te instanceof Bn||te instanceof In||(te=new In),ba(a),a=a.Wa.iteratorBackwards;a.next();){var ae=a.value;ae.visible&&!ae.isTemporary&&ae.og(y,x,ne,b,E,te)}return te}vn.prototype.acceptEvent=function(a){return Ll(this,a,a instanceof MouseEvent)};function Ll(a,y,x){var b=a.Qg;return a.Qg=a.cj,a.cj=b,b.diagram=a,b.event=y,x?Lh(a,y,b):(b.viewPoint=a.Qg.viewPoint,b.documentPoint=a.Qg.documentPoint),a=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),b.modifiers=a,b.button=y.button,y.buttons!==void 0&&(b.buttons=y.buttons),Cr&&y.button===0&&y.ctrlKey&&(b.button=2),b.down=!1,b.up=!1,b.clickCount=1,b.delta=0,b.handled=!1,b.bubbles=!1,b.timestamp=y.timeStamp,b.isMultiTouch=!1,b.targetDiagram=jd(y,y.target),b.targetObject=null,b}function jd(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 zd(a,y,x,b,E,te){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,Cr&&y.button===0&&y.ctrlKey&&(ne.button=2),ne.down=x,ne.up=b,ne.handled=!1,ne.bubbles=E,ne.isMultiTouch=te,ne}function eu(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}vn.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Ll(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(),eu(x,a)},vn.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Ll(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(),eu(x,a)},vn.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Ll(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),eu(x,a)},vn.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Ll(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),eu(x,a)},vn.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new Mt(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?hr(new Mt(y,a),this.Ab):new Mt(y,a)};function Lh(a,y,x){var b=a.ta,E=a.Aa,te=a.ya,ne=0,ae=0;b!==null&&(b=b.getBoundingClientRect(),ne=y.clientX-E/b.width*b.left,ae=y.clientY-te/b.height*b.top),x.viewPoint.h(ne,ae),a.Ab!==null?(y=Mt.allocAt(ne,ae),a.Ab.Cd(y),x.documentPoint.assign(y),Mt.free(y)):x.documentPoint.h(ne,ae)}function Hd(a,y,x){if(a.oj[0]!==null){y=a.oj[y];var b=a.ta;b!==null&&(b=b.getBoundingClientRect(),x.h(y.clientX-a.Aa/b.width*b.left,y.clientY-a.ya/b.height*b.top))}}vn.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function Ud(a){a.ld||ba(a),a.Va()}vn.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},it=vn.prototype,it.Pz=function(){return this.kg},it.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,fl(this),this.hf=!1,this.du=new Mt(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&mn(function(){b.ld=!1,Jo(y,"Model"),a(b)},1)},it.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;_t.requestAnimationFrame(function(){y.kg&&y.bd()})}},it.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),fl(this))};function jc(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||zc(a)||(y&&ba(a),x&&ql(a,!1))}function fl(a,y){if(!a.ld&&(a.kg=!1,a.Ka!==null||a.wo.w())){a.ld=!0;var x=a.animationManager,b=a.Xn;if(!x.isAnimating&&b.length!==0){for(var E=b.s,te=E.length,ne=0;ne<te;ne++){var ae=E[ne];ea(ae,!1),ae.v()}b.clear()}b=a.ow,0<b.count&&(b.each(function(fe){fe.Nv()}),b.clear()),E=b=!1,x.defaultAnimation.isAnimating&&(E=!0,b=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||Bd(a),jc(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(Lc(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),ba(a),te=!1,(!a.hf||a.xh)&&(a.hf?qp(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),qp(a,!1)),te=!0),a.Jk=!1,ba(a),a.ou||Ud(a),jc(a,!0,!1),ne=!1,te?(x=kn.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"),jc(a,!0,!1),kn.free(x)):x.Ok&&x.Qw&&(a.Fg!==$a?a.scale=_h(a,a.Fg):a.yh!==$a?a.scale=_h(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),ql(a,!0)),te&&ne&&a.eb("Initial Layout"),ba(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function Gd(a){if(a.Fg!==$a)a.scale=_h(a,a.Fg);else if(a.yh!==$a)a.scale=_h(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}ql(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Lc(a)}function ba(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 In,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof tr&&b.U&65536&&(b.U=b.U^65536)})}}it.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof tr||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof tr&&x.isVisible()&&fs(this,x);for(a.reset();a.next();)x=a.value,x instanceof $n&&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 qr&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function fs(a,y){for(var x=Hn(),b=Hn(),E=y.memberParts;E.next();){var te=E.value;te.isVisible()&&(te instanceof tr?(iu(te)||nl(te)||cd(te))&&fs(a,te):te instanceof $n?te.fromNode===y||te.toNode===y?b.push(te):x.push(te):(te.measure(1/0,1/0),te.arrange()))}for(a=x.length,E=0;E<a;E++)te=x[E],te.measure(1/0,1/0),te.arrange();for(ei(x),y.measure(1/0,1/0),y.arrange(),a=b.length,y=0;y<a;y++)x=b[y],x.measure(1/0,1/0),x.arrange();ei(b)}it.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},it.gc=function(a){if(this.Ka!==null){if(this.ta===null&&Nt("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){pu(this);var x=this.Aa,b=this.ya;if(a.Gv.resize(x,b,x,b),x=this.Wa.s,b=x.length,this.Fd(x,b,this,this.viewportBounds),this.Fc||y.isAnimating){y=this.pa;var E=this.Ca,te=Math.round(y.x*E)/E,ne=Math.round(y.y*E)/E,ae=this.Ab;for(ae.reset(),E!==1&&ae.scale(E),y.x===0&&y.y===0||ae.translate(-te,-ne),a.ti=null,Yy(a,ae.m11,ae.m12,ae.m21,ae.m22,ae.dx,ae.dy),this.pb!==1&&(a.globalAlpha=this.pb),Va(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<b;y++)x[y].gc(a,this);a=!1,this.Yf?Yd(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(gr.prototype.Cd=gr.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(te=this.animationManager,!te.zb&&(!te.isAnimating||te.isTicking)&&(x=new Date,pu(this),this.Ka.style.opacity!=="0")){if(b=a!==this.ib,y=this.Wa.s,E=y.length,this.Fd(y,E,this,this.viewportBounds),b)a.Vc(!0),this.vd=!0;else if(!this.Fc&&!te.isAnimating)break e;te=this.Ab,te.reset(),ne=this.Mb,ae=this.pa;var fe=this.Ca,_e=Math.round(ae.x*fe)/fe,Te=Math.round(ae.y*fe)/fe;for(fe!==1&&te.scale(fe),ae.x===0&&ae.y===0||te.translate(-_e,-Te),a.setTransform(ne,0,0,ne,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),Va(this,a),ae=0;ae<E;ae++)a.setTransform(ne,0,0,ne,0,0),a.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),a.yc(),y[ae].gc(a,this);if(y=!1,this.Yf?Yd(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(gr.prototype.Cd=gr.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=di&&di.nx,x=this.zw,b||this.Yh===null){for(x[this.Tq]=y,this.Tq=(this.Tq+1)%x.length,E=y=0;E<x.length;E++)y+=x[E];this.Sq=y/x.length}if(this.pb!==1&&(a.globalAlpha=1),b)for(a.setTransform(1,0,0,1,0,0),b=0;b<x.length;b++)a.fillText(x[b].toString(),20,150+ +(20*b))}}};function Ys(a,y,x,b,E,te,ne,ae,fe,_e){if(a.Ka!==null){a.ta===null&&Nt("No canvas specified"),ne===void 0&&(ne=null),ae===void 0&&(ae=null),fe===void 0&&(fe=!1),_e===void 0&&(_e=!1),pu(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var Te=a.Ca;a.Ca=E;var je=a.Wa.s,Ve=je.length;try{var Qe=new kn(te.x,te.y,b.width/E,b.height/E),rt=Qe.copy();rt.Co(x),Lc(a,rt),ba(a),a.Fd(je,Ve,a,Qe),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,b.width,b.height),ae!==null&&ae!==""&&(y.fillStyle=ae,y.ox(0,0,b.width,b.height));var ct=a.Mb;y.scale(ct,ct);var Dt=gr.alloc();Dt.reset(),Dt.translate(x.left,x.top),Dt.scale(E),te.x===0&&te.y===0||Dt.translate(-te.x,-te.y),y.setTransform(Dt.m11,Dt.m12,Dt.m21,Dt.m22,Dt.dx,Dt.dy),y.yc(),y instanceof Hl&&Yy(y,Dt.m11,Dt.m12,Dt.m21,Dt.m22,Dt.dx,Dt.dy),gr.free(Dt),Va(a,y),y.globalAlpha=a.pb;var Lt=a.Qj("Grid");if(ne){var Gt=new In,Zt=ne.iterator;for(Zt.reset();Zt.next();){var Vt=Zt.value;Vt instanceof Ti&&(_e||Vt.layer!==Lt)&&(Vt.Gj(),Gt.add(Vt))}for(_e=0;_e<Ve;_e++)El(je[_e],y,a,Gt,fe);Gt.each(function(yn){return yn.Gj()})}else for(Gt=0;Gt<Ve;Gt++){var Qt=je[Gt];Qt===Lt?_e&&Qt.gc(y,a,!0):Qt.gc(y,a,fe)}a.$i=!1,a.Yf&&Yd(a.Yf,a)&&a.Vp()}finally{a.Ca=Te,a.ib.Vc(!0),a.vd=!0,a.Fd(je,Ve,a,a.viewportBounds),Lc(a),a.ib instanceof Hl&&(a.ib.Nj.PA(),a.redraw())}}}it.Gf=function(a){return this.Rg[a]},it.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},it.Tx=function(){this.Rg=new Si,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Cr||$i),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function Va(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}it.Ql=function(a){return this.on[a]},it.sA=function(a,y){this.on[a]=y},it.Sx=function(){this.on=new Si,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},it.set=function(a){return Object.assign(this,a),this},it.Du=function(a){return this.nm(a)},it.nm=function(a){return fu(this,a),this};function fu(a,y){var x=a instanceof Wn,b=a instanceof vn,E;for(E in y){E===""&&Nt("Setting properties requires non-empty property names");var te=a,ne=E;if(x||b){var ae=E.indexOf(".");if(0<ae){var fe=E.substring(0,ae);x?te=a.fb(fe):(te=a[fe],te==null&&(te=a.toolManager[fe])),nn(te)?ne=E.substr(ae+1):Nt("Unable to find object named: "+fe+" in "+a.toString()+" when trying to set property: "+E)}}if(ne[0]!=="_"&&!Di(te,ne))if(b&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(b&&ne==="Changed"){a.Pe(y[ne]);continue}else if(b&&Di(a.toolManager,ne))te=a.toolManager;else if(b&&am(a,ne)){a.Bj(ne,y[ne]);continue}else if(a instanceof xi&&ne==="Changed"){a.Pe(y[ne]);continue}else Nt('Trying to set undefined property "'+ne+'" on object: '+te.toString());te[ne]=y[E],ne[0]==="_"&&te instanceof tn&&te.Vw(ne)}}it.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new ci,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},it.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")},vn.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!==Cf&&this.rj.hi(0,0,0,0)&&y.width===a.width&&y.height===a.height){var b=this.scale,E=Math.max(a.y,y.y),te=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))*b&&0<Math.max(0,te-E)*b){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(b=kn.alloc(),Qp(this,this.computeBounds(b)),kn.free(b)),b=this.ta,b===null||b instanceof Tc)))){var ne=this.Mb;E=this.Aa*ne;var ae=this.ya*ne,fe=this.scale*ne;te=Math.round(Math.round(y.x*fe)-Math.round(a.x*fe)),y=Math.round(Math.round(y.y*fe)-Math.round(a.y*fe)),fe=this.jw,a=this.oy,fe.width!==E&&(fe.width=E),fe.height!==ae&&(fe.height=ae),a.clearRect(0,0,E,ae),fe=190*ne;var _e=70*ne,Te=Math.max(te,0),je=Math.max(y,0),Ve=Math.floor(E-Te),Qe=Math.floor(ae-je);a.drawImage(b.Oa,Te,je,Ve,Qe,0,0,Ve,Qe),Yd(this.Yf,this)&&a.clearRect(0,0,fe,_e),b=Hn(),a=Hn(),Qe=Math.abs(te),Ve=Math.abs(y);var rt=Te===0?0:E-Qe;Te=Mt.allocAt(rt,0),Qe=Mt.allocAt(Qe+rt,ae),a.push(new kn(Math.min(Te.x,Qe.x),Math.min(Te.y,Qe.y),Math.abs(Te.x-Qe.x),Math.abs(Te.y-Qe.y)));var ct=this.Ab;if(ct.reset(),ct.scale(ne,ne),this.Ca!==1&&ct.scale(this.Ca),ne=this.pa,(ne.x!==0||ne.y!==0)&&isFinite(ne.x)&&isFinite(ne.y)&&ct.translate(-ne.x,-ne.y),hr(Te,ct),hr(Qe,ct),b.push(new kn(Math.min(Te.x,Qe.x),Math.min(Te.y,Qe.y),Math.abs(Te.x-Qe.x),Math.abs(Te.y-Qe.y))),rt=je===0?0:ae-Ve,Te.h(0,rt),Qe.h(E,Ve+rt),a.push(new kn(Math.min(Te.x,Qe.x),Math.min(Te.y,Qe.y),Math.abs(Te.x-Qe.x),Math.abs(Te.y-Qe.y))),hr(Te,ct),hr(Qe,ct),b.push(new kn(Math.min(Te.x,Qe.x),Math.min(Te.y,Qe.y),Math.abs(Te.x-Qe.x),Math.abs(Te.y-Qe.y))),Yd(this.Yf,this)&&(E=0<te?0:-te,ae=0<y?0:-y,Te.h(E,ae),Qe.h(fe+E,_e+ae),a.push(new kn(Math.min(Te.x,Qe.x),Math.min(Te.y,Qe.y),Math.abs(Te.x-Qe.x),Math.abs(Te.y-Qe.y))),hr(Te,ct),hr(Qe,ct),b.push(new kn(Math.min(Te.x,Qe.x),Math.min(Te.y,Qe.y),Math.abs(Te.x-Qe.x),Math.abs(Te.y-Qe.y)))),Mt.free(Te),Mt.free(Qe),jc(this,!1,!0),this.Ka===null&&Nt("No div specified"),this.ta===null&&Nt("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(pu(this),ae=this.Mb,E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,this.Aa*ae,this.ya*ae),E.drawImage(this.jw.Oa,0<te?0:Math.round(-te),0<y?0:Math.round(-y)),te=this.pa,ne=this.Ca,fe=Math.round(te.x*ne)/ne,_e=Math.round(te.y*ne)/ne,y=this.Ab,y.reset(),ne!==1&&y.scale(ne),te.x===0&&te.y===0||y.translate(-fe,-_e),E.save(),E.beginPath(),te=a.length,ne=0;ne<te;ne++)fe=a[ne],fe.width!==0&&fe.height!==0&&E.rect(Math.floor(fe.x),Math.floor(fe.y),Math.ceil(fe.width),Math.ceil(fe.height));for(E.clip(),E.setTransform(ae,0,0,ae,0,0),E.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),E.yc(),y=this.Wa.s,te=y.length,this.Fd(y,te,this,this.viewportBounds),Va(this,E),E.globalAlpha=this.pb,ae=0;ae<te;ae++)if(ne=y[ae],fe=b,ne.visible&&ne.pb!==0){_e=Ma(ne,E),je=ne.Zq,je.length=0,Te=this.scale,Ve=kn.alloc(),Qe=ne.Pa.s,ct=Qe.length,rt=fe.length;for(var Dt=0;Dt<ct;Dt++){var Lt=Qe[Dt],Gt=nf(Lt,Lt.actualBounds);e:{for(var Zt=2/Te,Vt=4/Te,Qt=0;Qt<rt;Qt++){var yn=fe[Qt];if(yn.width!==0&&yn.height!==0&&Gt.Vu(yn.x-Zt,yn.y-Zt,yn.width+Vt,yn.height+Vt)){Gt=!0;break e}}Gt=!1}Gt&&ne.Oj(E,Lt,this,je,Te,Ve,!0)}kn.free(Ve),E.globalAlpha=_e}E.restore(),E.Vc(!0),this.Yf&&Yd(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}ei(b),ei(a),this.ld=!1}}else this.bd();x&&(Ba(this),this.bd(),nd(this,!0))}else x?(Ba(this),this.bd(),nd(this,!0)):this.bd()}};function pu(a){a.pn!==!1&&(a.pn=!1,Wd(a,a.Aa,a.ya))}function Wd(a,y,x){Mc(a);var b=a.Mb;a.ta.resize(y*b,x*b,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function zc(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,b=a.ya,E=a.Ka,te=!1,ne=a.gf?a.Db:0,ae=a.Be?a.Db:0,fe=E.clientWidth||x+ne,_e=E.clientHeight||b+ae,Te=a.viewportBounds;E=Te.x;var je=Te.y,Ve=Te.width,Qe=Te.height;if((fe!==x+ne||_e!==b+ae)&&(a.gf=!1,a.Be=!1,ae=ne=0,a.Aa=fe,a.ya=_e,te=a.pn=!0,Mc(a)),!a.hf||!a.viewportBounds.w())return!0;var rt=a.ku,ct=a.hu;if(a.Ee=!1,!(te||a.gf||a.Be||a.mn||a.nn))return!0;var Dt=a.documentBounds,Lt=0,Gt=0,Zt=0,Vt=0,Qt=Te.width,yn=Te.height,ri=a.rj;a.contentAlignment.sb()?(Dt.width>Qt&&(Lt=ri.left,Gt=ri.right),Dt.height>yn&&(Zt=ri.top,Vt=ri.bottom)):(Lt=ri.left,Gt=ri.right,Zt=ri.top,Vt=ri.bottom);var fi=Dt.width+Lt+Gt,li=Dt.height+Zt+Vt;ri=a.scale;var Vn=fi>fe/ri,Rn=li>_e/ri;if(!(te||a.gf||a.Be||Vn||Rn))return!0;Lt=Dt.x-Lt,fe=Te.x,Gt=Dt.right+Gt,_e=Te.right+ne,Zt=Dt.y-Zt;var Qi=Te.y;Dt=Dt.bottom+Vt,Te=Te.bottom+ae;var Zi="1px";if(Vt="1px",a.scrollMode===Th&&(Vn||Rn)&&(Vn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Vn=1,Lt+1<fe&&(Vn=Math.max((fe-Lt)*ri+a.Aa,Vn)),Gt>_e+1&&(Vn=Math.max((Gt-_e)*ri+a.Aa,Vn)),Qt+ne+1<fi&&(Vn=Math.max((fi-Qt)*ri+a.Aa,Vn)),Zi=Vn.toString()+"px"),Rn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Vn=1,Zt+1<Qi&&(Vn=Math.max((Qi-Zt)*ri+a.ya,Vn)),Dt>Te+1&&(Vn=Math.max((Dt-Te)*ri+a.ya,Vn)),yn+ae+1<li&&(Vn=Math.max((li-yn)*ri+a.ya,Vn)),Vt=Vn.toString()+"px")),Vn=Zi!=="1px",Rn=Vt!=="1px",Vn&&Rn||!Vn&&!Rn||(Rn&&(_e-=a.Db),Vn&&(Te-=a.Db),fi<Qt+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,Lt+1<fe&&(ne=Math.max((fe-Lt)*ri+a.Aa,ne)),Gt>_e+1&&(ne=Math.max((Gt-_e)*ri+a.Aa,ne)),Qt+1<fi&&(ne=Math.max((fi-Qt)*ri+a.Aa,ne)),Zi=ne.toString()+"px"),Vn=Zi!=="1px",ne=a.ya,Vn!==a.Be&&(ne=Vn?a.ya-a.Db:a.ya+a.Db),li<yn+ae||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(ae=1,Zt+1<Qi&&(ae=Math.max((Qi-Zt)*ri+ne,ae)),Dt>Te+1&&(ae=Math.max((Dt-Te)*ri+ne,ae)),yn+1<li&&(ae=Math.max((li-yn)*ri+ne,ae)),Vt=ae.toString()+"px"),Rn=Vt!=="1px"),a.qr&&Vn===a.Be&&Rn===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(Vn!==a.Be&&(Zi==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),te=!0),a.Be=Vn,ct.style.width=Zi,Rn!==a.gf&&(Vt==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),te=!0,a.tn&&(ae=Mt.alloc(),Rn?(y.style.left=a.Db+"px",a.position=ae.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=ae.h(a.pa.x-a.Db/a.scale,a.pa.y)),Mt.free(ae))),te&&Mc(a),a.gf=Rn,ct.style.height=Vt,a.gu=!0,te&&(a.pn=!0),y=rt.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Qt+1<fi?y=(a.position.x-Lt)*ri:Lt+1<fe?y=rt.scrollWidth-rt.clientWidth:Gt>_e+1&&(y=a.position.x*ri)),a.tn)switch(a.bu){case"negative":y=-(rt.scrollWidth-y-rt.clientWidth);break;case"reverse":y=rt.scrollWidth-y-rt.clientWidth}return rt.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(yn+1<li?rt.scrollTop=(a.position.y-Zt)*ri:Zt+1<Qi?rt.scrollTop=rt.scrollHeight-rt.clientHeight:Dt>Te+1&&(rt.scrollTop=a.position.y*ri)),fe=a.Aa,_e=a.ya,rt.style.width=fe+(a.gf?a.Db:0)+"px",rt.style.height=_e+(a.Be?a.Db:0)+"px",x!==fe||b!==_e||a.animationManager.zb?(x=kn.allocAt(E,je,Ve,Qe),a.onViewportBoundsChanged(x,a.viewportBounds,ri,te),kn.free(x),!1):!0}it=vn.prototype,it.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Nt("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&&Nt('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(vs,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},it.oi=function(a){this.partManager.oi(a);var y=this;qd(a,function(x){Zd(y,x)}),(a instanceof qr||a instanceof tr&&a.placeholder!==null)&&a.v(),a.data!==null&&qd(a,function(x){ly(y.partManager,x)}),nl(a)!==!0&&cd(a)!==!0||this.De.add(a),F1(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()},it.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&qd(a,function(x){uy(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()},it.remove=function(a){rd(this,a,!0)};function rd(a,y,x){var b=y.layer;b!==null&&b.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=b.pc(-1,y,!1),0<=x&&a.cb(ds,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}it.Is=function(a,y){if(y===void 0&&(y=!1),sn(a))for(var x=a.length,b=0;b<x;b++){var E=a[b];y&&!E.canDelete()||this.remove(E)}else for(x=new In,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},it.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},vn.prototype.moveParts=function(a,y,x,b){if(x===void 0&&(x=!1),b===void 0&&(b=Xf(this)),this.toolManager!==null){var E=new ci;if(a!==null)if(sn(a))for(var te=0;te<a.length;te++)Ou(this,E,a[te],x,b);else for(a=a.iterator;a.next();)Ou(this,E,a.value,x,b);else{for(a=this.parts;a.next();)Ou(this,E,a.value,x,b);for(a=this.nodes;a.next();)Ou(this,E,a.value,x,b);for(a=this.links;a.next();)Ou(this,E,a.value,x,b)}Ec(this,E,y,b,x)}};function Ou(a,y,x,b,E,te){if(!y.contains(x)&&(te===void 0&&(te=!1),!b||te||x.canMove()||x.canCopy()))if(E===void 0&&(E=Xf(a)),x instanceof oi){if(y.add(x,a.Pd(E,x,x.location)),x instanceof tr&&(x.placeholder!==null||E.dragsMembers))for(te=x.memberParts;te.next();)Ou(a,y,te.value,b,E,E.groupsAlwaysMove);for(te=x.linksConnected;te.next();){var ne=te.value;if(!y.contains(ne)){var ae=ne.fromNode,fe=ne.toNode;ae!==null&&y.contains(ae)&&fe!==null&&y.contains(fe)&&Ou(a,y,ne,b,E)}}if(E.dragsTree)for(x=x.Ou();x.next();)Ou(a,y,x.value,b,E)}else if(x instanceof $n)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)Ou(a,y,x.value,b,E);else x instanceof qr||y.add(x,a.Pd(E,x,x.location))}function Ec(a,y,x,b,E){if(y!==null&&y.count!==0){var te=Mt.alloc(),ne=Mt.alloc();ne.assign(x),isNaN(ne.x)&&(ne.x=0),isNaN(ne.y)&&(ne.y=0),(x=a.Mr)||Qf(a,y);for(var ae=Hn(),fe=Hn(),_e=y.iterator,Te=Mt.alloc();_e.next();){var je=_e.key,Ve=_e.value;if(je.Zc()){var Qe=Vp(a,je,y);Qe!==null?ae.push(new re(je,Ve,Qe)):(!E||je.canMove())&&(Qe=Ve.point,te.assign(Qe),a.computeMove(je,te.add(ne),b,Te),je.location=Te,Ve.shifted===void 0&&(Ve.shifted=new Mt),Ve.shifted.assign(Te.re(Qe)))}else _e.key instanceof $n&&fe.push(_e.sa)}for(Mt.free(Te),E=ae.length,_e=0;_e<E;_e++)je=ae[_e],te.assign(je.info.point),je.Su.shifted===void 0&&(je.Su.shifted=new Mt),je.node.location=te.add(je.Su.shifted);for(E=Mt.alloc(),_e=Mt.alloc(),je=fe.length,Ve=0;Ve<je;Ve++){var rt=fe[Ve];if(Qe=rt.key,Qe instanceof $n)if(Qe.suspendsRouting){Qe.Tg=null,Te=Qe.fromNode;var ct=Qe.toNode;if(a.draggedLink!==null&&b.dragsLink)if(ct=rt.value.point,Qe.dragComputation===null)y.add(Qe,a.Pd(b,Qe,ne)),Bh(Qe,ne.x-ct.x,ne.y-ct.y);else{rt=Mt.allocAt(0,0),(Te=Qe.i(0))&&Te.w()&&rt.assign(Te);var Dt=Te=Mt.alloc().assign(rt).add(ne);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(Dt=Mt.alloc(),Jf(a,Qe,Te,Dt,b)),Te.assign(Qe.dragComputation(Qe,Te,Dt)).re(rt),y.add(Qe,a.Pd(b,Qe,Te)),Bh(Qe,Te.x-ct.x,Te.y-ct.y),Mt.free(rt),Mt.free(Te),Dt!==Te&&Mt.free(Dt)}else Te!==null&&(E.assign(Te.location),Dt=y.I(Te),Dt!==null&&E.re(Dt.point)),ct!==null&&(_e.assign(ct.location),Dt=y.I(ct),Dt!==null&&_e.re(Dt.point)),Te!==null&&ct!==null?E.Xa(_e)?(Te=rt.value.point,ct=te,ct.assign(E),ct.re(Te),y.add(Qe,a.Pd(b,Qe,E)),Bh(Qe,ct.x,ct.y)):(Qe.suspendsRouting=!1,Qe.bb()):(rt=rt.value.point,Te=Te!==null?E:ct!==null?_e:ne,y.add(Qe,a.Pd(b,Qe,Te)),Bh(Qe,Te.x-rt.x,Te.y-rt.y))}else(Qe.fromNode===null||Qe.toNode===null)&&(Te=rt.value.point,y.add(Qe,a.Pd(b,Qe,ne)),Bh(Qe,ne.x-Te.x,ne.y-Te.y))}Mt.free(te),Mt.free(ne),Mt.free(E),Mt.free(_e),ei(ae),ei(fe),x||(ba(a),od(a,y))}}vn.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new Mt),b.assign(y),a===null)return b;var E=y,te=x.isGridSnapEnabled;te&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=Mt.alloc(),Jf(this,a,y,E,x)),x=a.dragComputation!==null?a.dragComputation(a,y,E):E;var ne=a.minLocation,ae=ne.x;isNaN(ae)&&(ae=te?Math.round(1e3*a.location.x)/1e3:a.location.x),ne=ne.y,isNaN(ne)&&(ne=te?Math.round(1e3*a.location.y)/1e3:a.location.y);var fe=a.maxLocation,_e=fe.x;return isNaN(_e)&&(_e=te?Math.round(1e3*a.location.x)/1e3:a.location.x),fe=fe.y,isNaN(fe)&&(fe=te?Math.round(1e3*a.location.y)/1e3:a.location.y),b.h(Math.max(ae,Math.min(x.x,_e)),Math.max(ne,Math.min(x.y,fe))),E!==y&&Mt.free(E),b};function Xf(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function Jf(a,y,x,b,E){if(E===void 0&&(E=Xf(a)),b.assign(x),y!==null){var te=a.grid;y=E.gridSnapCellSize,a=y.width,y=y.height;var ne=E.gridSnapOrigin,ae=ne.x;if(ne=ne.y,E=E.gridSnapCellSpot,te!==null){var fe=te.gridCellSize;isNaN(a)&&(a=fe.width),isNaN(y)&&(y=fe.height),te=te.gridOrigin,isNaN(ae)&&(ae=te.x),isNaN(ne)&&(ne=te.y)}te=Mt.allocAt(0,0),te.yi(0,0,a,y,E),rn.No(x.x,x.y,ae+te.x,ne+te.y,a,y,b),Mt.free(te)}}function Qf(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof $n&&(y.suspendsRouting=!0)}function od(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof $n&&(x.suspendsRouting=!1,$v(x)&&x.bb())}a.Mr=!1}}function Vp(a,y,x){return y=y.containingGroup,y!==null&&(a=Vp(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}it=vn.prototype,it.Pd=function(a,y,x){if(x===void 0)return new ah(Gr);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new ah(new Mt(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new ah(x.copy())};function $p(a,y,x){if(y.diagram!==null&&y.diagram!==a&&Nt("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Nt("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Nt("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Nt("Cannot move a Layer before or after itself: "+y)),y.diagram!==a){y=y.name,a=a.Wa,x=a.count;for(var b=0;b<x;b++)a.M(b).name===y&&Nt("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}it.Al=function(a){$p(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(vs,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},it.Ww=function(a,y){$p(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(ds,"layers",this,a,null,b,null));var E=x.count,te;for(te=0;te<E;te++)if(x.M(te)===y){x.Gb(te,a);break}return this.cc!==null&&this.cb(vs,"layers",this,null,a,null,te),this.N(),0>b&&this.Ya(),this},it.Cy=function(a,y){$p(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(ds,"layers",this,a,null,b,null));var E=x.count,te;for(te=0;te<E;te++)if(x.M(te)===y){x.Gb(te+1,a);break}return this.cc!==null&&this.cb(vs,"layers",this,null,a,null,te+1),this.N(),0>b&&this.Ya(),this},it.kA=function(a){if(a.diagram!==this&&Nt("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram),a.name!==""){var y=this.Wa,x=y.indexOf(a);if(y.remove(a)){for(y=a.Pa.copy().iterator;y.next();){var b=y.value,E=b.layerName;E!==a.name?b.layerName=E:b.layerName=""}this.cc!==null&&this.cb(ds,"layers",this,a,null,x,null),this.N(),this.Ya()}}},it.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},it.Yw=function(a){return this.pf===null&&(this.pf=new Bn),this.pf.add(a),this.model.Pe(a),this},it.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},it.Pe=function(a){return this.zg===null&&(this.zg=new Bn),this.zg.add(a),this},it.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},it.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==Ka&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},it.cb=function(a,y,x,b,E,te,ne){te===void 0&&(te=null),ne===void 0&&(ne=null);var ae=new Go;ae.diagram=this,ae.change=a,ae.propertyName=y,ae.object=x,ae.oldValue=b,ae.oldParam=te,ae.newValue=E,ae.newParam=ne,this.ds(ae)},it.g=function(a,y,x,b,E){this.cb(Vo,a,this,y,x,b,E)},vn.prototype.changeState=function(a,y){if(a!==null&&a.diagram===this){var x=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var b=a.change;if(b===Vo){var E=a.object;if($o(E,a.propertyName,a.I(y)),E instanceof tn){var te=E.part;te!==null&&te.Wb()}this.isModified=!0}else if(b===vs){var ne=a.object,ae=a.newParam,fe=a.newValue;if(ne instanceof Wn)if(typeof ae=="number"&&fe instanceof tn){y?ne.pc(ae):ne.Gb(ae,fe);var _e=ne.part;_e!==null&&_e.Wb()}else typeof ae=="number"&&fe instanceof ta&&(fe.isRow?h1(ne,ae,y?void 0:fe):d1(ne,ae,y?void 0:fe));else if(ne instanceof os){var Te=a.oldParam===!0;typeof ae=="number"&&fe instanceof Ti&&(y?(fe.isSelected=!1,fe.isHighlighted=!1,fe.Wb(),ne.pc(Te?ae:-1,fe,Te)):ne.oi(ae,fe,Te))}else ne instanceof vn?typeof ae=="number"&&fe instanceof os&&(y?this.Wa.mb(ae):(fe.Xe(this),this.Wa.Gb(ae,fe))):Nt("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===ds){var je=a.object,Ve=a.oldParam,Qe=a.oldValue;if(je instanceof Wn)typeof Ve=="number"&&Qe instanceof tn?y?je.Gb(Ve,Qe):je.pc(Ve):typeof Ve=="number"&&Qe instanceof ta&&(Qe.isRow?h1(je,Ve,y?Qe:void 0):d1(je,Ve,y?Qe:void 0));else if(je instanceof os){var rt=a.newParam===!0;typeof Ve=="number"&&Qe instanceof Ti&&(y?0>je.Pa.indexOf(Qe)&&je.oi(Ve,Qe,rt):(Qe.isSelected=!1,Qe.isHighlighted=!1,Qe.Wb(),je.pc(rt?Ve:-1,Qe,rt)))}else je instanceof vn?typeof Ve=="number"&&Qe instanceof os&&(y?(Qe.Xe(this),this.Wa.Gb(Ve,Qe)):this.Wa.mb(Ve)):Nt("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==Ka&&Nt("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},vn.prototype.Ea=function(a){return this.undoManager.Ea(a)},vn.prototype.eb=function(a){return this.undoManager.eb(a)},vn.prototype.Kf=function(){return this.undoManager.Kf()},vn.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var b=!1;try{a(this),b=!0}finally{b?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},vn.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},vn.prototype.rp=function(){this.partManager.rp()};function Yp(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,Mc(a),a.N(),a.Ee=!0,b.zb&&(Js(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,Mc(a);else{a.vb=!0;var E=a.viewportBounds.copy(),te=a.Aa,ne=a.ya,ae=a.zoomPoint.x,fe=a.zoomPoint.y,_e=a.contentAlignment;isNaN(ae)&&(_e.$c()?_e.Hf(_u)?ae=0:_e.Hf(Wa)&&(ae=te-1):ae=_e.sb()?_e.x*(te-1):te/2),isNaN(fe)&&(_e.$c()?_e.Hf($l)?fe=0:_e.Hf(Za)&&(fe=ne-1):fe=_e.sb()?_e.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),te=Mt.allocAt(a.pa.x+ae/y-ae/x,a.pa.y+fe/y-fe/x),a.position=te,Mt.free(te),a.Ca=x,Mc(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),ql(a,!1),b.zb&&(Js(b)||b.ce.add(b.H,"scale",y,a.Ca))}}vn.prototype.onViewportBoundsChanged=function(a,y,x,b){if(!a.D(y)){b===void 0&&(b=!1),b||(this.Ee=!0),this.vd=!0;var E=this.layout;E===null||!E.isViewportSized||this.autoScale!==$a||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof Wo&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Nd(E,this)),this.vb||this.invalidateViewport(a,y),Lc(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.canvasSize.width=Math.round(a.width*x),this.fc.canvasSize.height=Math.round(a.height*x),this.fc.newCanvasSize.width=this.Aa,this.fc.newCanvasSize.height=this.ya,this.fc.isScroll=b,this.R("ViewportBoundsChanged",this.fc,a),this.isVirtualized&&this.links.each(function(te){te.isAvoiding&&te.actualBounds.Yc(y)&&te.bb()})}};function Lc(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=Qn.alloc(),E=1,te=1,ne=x.O.s,ae=ne.length,fe=0;fe<ae;fe++){var _e=ne[fe],Te=Math.abs(_e.interval);2>Te||(mv(_e.figure)?te=te*Te/rn.vx(te,Te):E=E*Te/rn.vx(E,Te))}if(ne=x.gridCellSize,b.h(te*ne.width,E*ne.height),y!==void 0)E=y.width,te=y.height,a=y.x,ne=y.y;else{if(y=kn.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){kn.free(y);return}E=y.width,te=y.height,a=y.x,ne=y.y,kn.free(y)}x.width=E+2*b.width,x.height=te+2*b.height,y=Mt.alloc(),rn.No(a,ne,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),Qn.free(b),x.part.location=y,Mt.free(y)}}vn.prototype.clearSelection=function(a){a===void 0&&(a=!1);var y=this.selection;if(y.count!==0){a||this.R("ChangingSelection",y);for(var x=y.Fa(),b=x.length,E=0;E<b;E++)x[E].isSelected=!1;y.ka(),y.clear(),y.freeze(),a||this.R("ChangedSelection",y)}},vn.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))},vn.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),sn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof Ti||Nt("Diagram.selectCollection given something that is not a Part: "+b),b.isSelected=!0}else for(a=a.iterator;a.next();)y=a.value,y instanceof Ti||Nt("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},vn.prototype.clearHighlighteds=function(){var a=this.highlighteds;if(0<a.count){for(var y=a.Fa(),x=y.length,b=0;b<x;b++)y[b].isHighlighted=!1;a.ka(),a.clear(),a.freeze()}},it=vn.prototype,it.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},it.Jz=function(a){a=new In().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 Ti||Nt("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},it.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,te=Mt.alloc();if(a==="pixel")E=x;else if(a==="line")E=x*(b?this.scrollVerticalLineChange:this.scrollHorizontalLineChange);else if(a==="page")a=b?this.viewportBounds.height:this.viewportBounds.width,a*=this.scale,a!==0&&(E=x*Math.max(a-(b?this.scrollVerticalLineChange:this.scrollHorizontalLineChange),0));else{if(a==="document"){E=this.documentBounds,x=this.viewportBounds,y==="up"?this.position=te.h(x.x,E.y):y==="left"?this.position=te.h(E.x,x.y):y==="down"?this.position=te.h(x.x,E.bottom-x.height):y==="right"&&(this.position=te.h(E.right-x.width,x.y)),Mt.free(te);return}Nt("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}E/=this.scale,x=this.position,y==="up"?this.position=te.h(x.x,x.y-E):y==="down"?this.position=te.h(x.x,x.y+E):y==="left"?this.position=te.h(x.x-E,x.y):y==="right"?this.position=te.h(x.x+E,x.y):Nt("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),Mt.free(te)},it.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)},it.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},it.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)},it.zA=function(a){var y=this.Ab,x=a.x,b=a.y,E=x+a.width,te=b+a.height,ne=y.m11,ae=y.m12,fe=y.m21,_e=y.m22,Te=y.dx,je=y.dy,Ve=x*ne+b*fe+Te;y=x*ae+b*_e+je;var Qe=E*ne+b*fe+Te;return a=E*ae+b*_e+je,b=x*ne+te*fe+Te,x=x*ae+te*_e+je,ne=E*ne+te*fe+Te,E=E*ae+te*_e+je,te=Math.min(Ve,Qe),Ve=Math.max(Ve,Qe),Qe=Math.min(y,a),y=Math.max(y,a),te=Math.min(te,b),Ve=Math.max(Ve,b),Qe=Math.min(Qe,x),y=Math.max(y,x),te=Math.min(te,ne),Ve=Math.max(Ve,ne),Qe=Math.min(Qe,E),y=Math.max(y,E),new kn(te,Qe,Ve-te,y-Qe)},it.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),hr(a.copy(),this.Ab)};function om(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Xp(a){return a=rp.get(a),a!==null?new a:new mo}vn.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===Ka&&b[0]==="S")if(b==="StartingFirstTransaction"){var E=this;a=this.toolManager,a.mouseDownTools.each(function(fe){return fe.diagram=E}),a.mouseMoveTools.each(function(fe){return fe.diagram=E}),a.mouseUpTools.each(function(fe){return fe.diagram=E}),this.ld||this.hf||(this.Jk=!0,this.fn&&(this.kg=!0))}else b==="StartingUndo"||b==="StartingRedo"?(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc(),this.R("ChangingSelection",this.selection)):b==="StartedTransaction"&&(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc());else if(this.aa){this.aa=!1;try{if(a.modelChange===""&&x===Ka){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),ba(this));var te=this.animationManager;b==="RolledBackTransaction"&&te.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||Ss(te),b==="CommittedTransaction"&&this.undoManager.isJustDiscarded&&(this.Ce=Math.min(this.Ce,this.undoManager.historyIndex-1)),b!=="CommittedTransaction"&&b!=="RolledBackTransaction"||!this.undoManager.isPendingUnmodified||setTimeout(function(){y.isModified=!1},1);var ne=a.isTransactionFinished;if(ne&&(om(this),this.As.clear(),qo(this.animationManager)),!this.Rt&&ne&&this.lastInput.targetDiagram){this.Rt=!0;var ae=this;mn(function(){ae.currentTool.standardMouseOver(),ae.Rt=!1},10)}}}finally{this.aa=!0}}}};function Zd(a,y){y=y.O.s;for(var x=y.length,b=0;b<x;b++)sd(a,y[b])}function sd(a,y){if(y instanceof vl){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof In&&x.Bg.add(a);var b=y.Eg;if(b!==null&&b.sq===!0&&y.diagram!==null&&y.diagram.Xn.add(y),x.hn)if(x=x.getAttribute("src")||"",b=a.Og.I(x),b===null)b=[],b.push(y),a.Og.add(x,b);else{for(a=0;a<b.length;a++)if(b[a]===y)return;b.push(y)}}}}function Jp(a,y){if(y instanceof vl){var x=y.element;if(x!==null&&x instanceof HTMLImageElement&&x.hn){var b=x.getAttribute("src")||"",E=a.Og.I(b);if(E!==null){for(var te=0;te<E.length;te++)if(E[te]===y){E.splice(te,1),E.length===0&&(a.Og.remove(b),x.Fq&&x.removeEventListener("load",x.Fq),x.Yp&&x.removeEventListener("error",x.Yp),delete x.Fq,delete x.Yp,x.Bg instanceof In&&x.Bg.remove(a),vp(b));break}}}}}vn.prototype.Wd=function(){this.partManager.Wd()},vn.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},vn.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},vn.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},vn.prototype.Vb=function(a){return this.partManager.Vb(a)},vn.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},it=vn.prototype,it.Lc=function(a){return this.partManager.Lc(a)},it.ii=function(a){return this.partManager.ii(a)},it.Kc=function(a){return this.partManager.Kc(a)},it.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:Ur(Or(y)))},it.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:Ur(Or(y)))};function Mc(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 Qp(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),ql(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}it.Va=function(){if(this.Zi){var a=kn.alloc();Qp(this,this.computeBounds(a)),kn.free(a)}},it.rz=function(){for(var a=new In,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},it.qz=function(){return this.ai.iterator},it.Uz=function(a){ba(this),a&&qf(this,!0),this.ld?qp(this,!1):(this.Jk=!0,fl(this))};function qf(a,y){for(var x=a.ai.iterator;x.next();)sm(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function sm(a,y,x){if(y!==null){for(var b=y.gl.iterator;b.next();)sm(a,b.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function qp(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var b=a.undoManager.transactionLevel,E=a.layout,te=a.animationManager;try{b===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=b&&!te.defaultAnimation.isAnimating&&!te.zb&&(y||Jo(te,"Layout")),a.xh=!1;for(var ne=a.ai.iterator;ne.next();)eg(a,ne.value,y,b);E.isValidLayout||(!y||E.isRealtime||E.isRealtime===null||b===0?(E.doLayout(a),ba(a),E.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,b===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||b!==0&&b!==1||Ss(te),a.aa=x}}}function eg(a,y,x,b){if(y!==null){for(var E=y.gl.iterator;E.next();)eg(a,E.value,x,b);E=y.layout,E===null||E.isValidLayout||(!x||E.isRealtime||b===0?(y.rh=!y.location.w(),E.doLayout(y),y.C(32),fs(a,y),E.isValidLayout=!0):a.xh=!0)}}it.yz=function(){for(var a=new Bn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function nv(a){function y(E){var te=E.toLowerCase(),ne=new Bn;x.add(E,ne),x.add(te,ne),b.add(E,E),b.add(te,E)}var x=new ci,b=new ci;y("InitialAnimationStarting"),y("AnimationStarting"),y("AnimationFinished"),y("BackgroundSingleClicked"),y("BackgroundDoubleClicked"),y("BackgroundContextClicked"),y("ClipboardChanged"),y("ClipboardPasted"),y("DocumentBoundsChanged"),y("ExternalObjectsDropped"),y("GainedFocus"),y("InitialLayoutCompleted"),y("LayoutCompleted"),y("LinkDrawn"),y("LinkRelinked"),y("LinkReshaped"),y("LostFocus"),y("Modified"),y("ObjectSingleClicked"),y("ObjectDoubleClicked"),y("ObjectContextClicked"),y("PartCreated"),y("PartResized"),y("PartRotated"),y("SelectionMoved"),y("SelectionCopied"),y("SelectionDeleting"),y("SelectionDeleted"),y("SelectionGrouped"),y("SelectionUngrouped"),y("ChangingSelection"),y("ChangedSelection"),y("SubGraphCollapsed"),y("SubGraphExpanded"),y("TextEdited"),y("TreeCollapsed"),y("TreeExpanded"),y("ViewportBoundsChanged"),y("InvalidateDraw"),a.iw=x,a.hw=b}function am(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function ep(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;Nt("Unknown DiagramEvent name: "+y)}it.Bj=function(a,y){return a=ep(this,a),a!==null&&a.add(y),this},it.am=function(a,y){a=ep(this,a),a!==null&&a.remove(y)},it.R=function(a,y,x){var b=ep(this,a),E=new Pc;if(E.diagram=this,a=am(this,a),a!==null&&(E.name=a),y!==void 0&&(E.subject=y),x!==void 0&&(E.parameter=x),y=b.length,y===1)b.M(0)(E);else if(y!==0)for(b=b.Fa(),x=0;x<y;x++)(0,b[x])(E)};function tp(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}it.Yj=function(a,y){return np(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},vn.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?Fd(this,a):a.assign(this.documentBounds)};function np(a,y,x,b){var E=a.Xh;if(E===null&&(a.Xh=E=new Tg(a.avoidanceCellSize)),E.vs||E.group!==x||E.Yx!==b){if(E.Hx=Math.max(E.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.width)),E.Ix=Math.max(E.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.height)),x!==null&&(x=lm(a,x)),x===null){y=kn.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),E.initialize(y);for(var te=a.nodes;te.next();){var ne=te.value,ae=ne.layer;ae!==null&&ae.visible&&!ae.isTemporary&&ip(a,ne,b,y)}kn.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=kn.alloc(),te=x.memberParts;te.next();)ne=te.value,ne instanceof oi&&ip(a,ne,b,y);kn.free(y)}E.group=x,E.Yx=b,E.vs=!1}else y&&oS(E);return E}function lm(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?lm(a,y.containingGroup):null}function ip(a,y,x,b){if(y!==x&&y.isVisible()){if(y.avoidable&&!y.isLinkLabel){y=y.getAvoidableRect(b),a=a.Xh;var E=y.x,te=y.y;if(Cp(a,E,te))for(x=(te-a.Od)/a.sc|0,b=Math.min((E+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((te+y.height-a.Od)/a.sc|0,a.ei),E=(E-a.Nd)/a.rc|0;E<=b;E++)if(te=a.ac[E],te.fill)te.fill(jh,x,y+1);else for(var ne=x;ne<=y;ne++)te[ne]=jh}else if(y instanceof tr)for(y=y.memberParts;y.next();)E=y.value,E instanceof oi&&ip(a,E,x,b)}}function Mh(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}vn.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():tg(this)};function tg(a){a.vk===-1&&(a.vk=mn(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=kn.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Qp(a,y),kn.free(y),a.Fc=!0,a.bd(),tg(a))}},a.vp))}vn.prototype.ug=function(){this.vk!==-1&&(_t.clearTimeout(this.vk),this.vk=-1)},vn.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 b=this.viewportBounds,E=this.scale;b=kn.allocAt(0,0,b.width*E,b.height*E);var te=Mt.allocAt(0,0);if(a.x>=b.x&&a.x<b.x+x.left&&this.allowHorizontalScroll){var ne=Math.max(this.scrollHorizontalLineChange,1);ne|=0,te.x-=ne,a.x<b.x+x.left/2&&(te.x-=ne),a.x<b.x+x.left/4&&(te.x-=4*ne)}else a.x<=b.x+b.width&&a.x>b.x+b.width-x.right&&this.allowHorizontalScroll&&(ne=Math.max(this.scrollHorizontalLineChange,1),ne|=0,te.x+=ne,a.x>b.x+b.width-x.right/2&&(te.x+=ne),a.x>b.x+b.width-x.right/4&&(te.x+=4*ne));return a.y>=b.y&&a.y<b.y+x.top&&this.allowVerticalScroll?(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,te.y-=ne,a.y<b.y+x.top/2&&(te.y-=ne),a.y<b.y+x.top/4&&(te.y-=4*ne)):a.y<=b.y+b.height&&a.y>b.y+b.height-x.bottom&&this.allowVerticalScroll&&(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,te.y+=ne,a.y>b.y+b.height-x.bottom/2&&(te.y+=ne),a.y>b.y+b.height-x.bottom/4&&(te.y+=4*ne)),te.Xa(Gr)||(y=new Mt(y.x+te.x/E,y.y+te.y/E)),kn.free(b),Mt.free(te),y},it=vn.prototype,it.Cs=function(){return null},it.av=function(){return null},it.bs=function(a,y){this.pj.add(a,y)},it.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof tr&&(y.$p=null)})};function wf(a,y,x){function b(){var Te=+new Date;for(te=!0,ne.reset();ne.next();)if(!ne.value[0].al){te=!1;break}te||Te-_e>fe?y(x,E,ae):_t.requestAnimationFrame(b)}for(var E=x.callback,te=!0,ne=a.Og.iterator;ne.next();)if(!ne.value[0].al){te=!1;break}if(typeof E!="function"||te)return y(x,E,a);var ae=a,fe=x.callbackTimeout||300,_e=+new Date;return _t.requestAnimationFrame(function(){b()}),null}it.Wz=function(a){return ys?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},it.Jx=function(a){return a===void 0&&(a={}),wf(this,this.Xz,a)},it.Xz=function(a,y,x){var b=um(x,a,"canvas",null);if(b===null)return null;x=b.Z.canvas;var E=null;if(x!==null)switch(E=a.returnType,E===void 0?E="string":E=E.toLowerCase(),E){case $d+"data":E=b.getImageData(0,0,x.width,x.height);break;case $d:b=(a.document||document).createElement("img"),b.src=x.toDataURL(a.type,a.details),E=b;break;case"blob":return typeof y!="function"&&Nt('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.'),typeof x.toBlob=="function"?(x.toBlob(y,a.type,a.details),"toBlob"):(y(null),null);default:E=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(E),null):E};function um(a,y,x,b){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&Nt("properties argument must be an Object.");var E=y.size||null,te=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(te="NaN");var ne=y.maxSize;y.maxSize===void 0&&(ne=x==="SVG"?new Qn(1/0,1/0):new Qn(2e3,2e3));var ae=y.position||null,fe=y.parts||null,_e=y.padding===void 0?1:y.padding,Te=y.background||null,je=y.omitTemporary;je===void 0&&(je=!0);var Ve=y.document||document,Qe=y.elementFinished||null,rt=y.showTemporary;rt===void 0&&(rt=!je),y=y.showGrid,y===void 0&&(y=rt),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof _e=="number"?_e=new Mi(_e):_e instanceof Mi||Nt("MakeImage padding must be a Margin or a number."),_e.left=Math.max(_e.left,0),_e.right=Math.max(_e.right,0),_e.top=Math.max(_e.top,0),_e.bottom=Math.max(_e.bottom,0),a.ib.Vc(!0),je=new Du(null,Ve,void 0,!0);var ct=je.context;if(!(E||te||fe||ae))return je.width=a.Aa+Math.ceil(_e.left+_e.right),je.height=a.ya+Math.ceil(_e.top+_e.bottom),x==="SVG"?b===null?null:(b.resize(je.width,je.height,je.width,je.height),b.ownerDocument=Ve,b.hs=Qe,Ys(a,b.context,_e,new Qn(je.width,je.height),a.Ca,a.pa,fe,Te,rt,y),b.context):(a.Xm=!1,Ys(a,ct,_e,new Qn(je.width,je.height),a.Ca,a.pa,fe,Te,rt,y),a.Xm=!0,je.context);var Dt=a.Pp,Lt=a.documentBounds.copy();if(Lt.Fv(a.yb),rt)for(var Gt=a.Wa.s,Zt=Gt.length,Vt=0;Vt<Zt;Vt++){var Qt=Gt[Vt];if(Qt.visible&&Qt.isTemporary){Qt=Qt.Pa.s;for(var yn=Qt.length,ri=0;ri<yn;ri++){var fi=Qt[ri];fi.isInDocumentBounds&&fi.isVisible()&&(fi=fi.actualBounds,fi.w()&&Lt.ed(fi))}}}if(Gt=new Mt(Lt.x,Lt.y),fe!==null){for(Zt=new kn(0,0,0,0),Vt=!0,Qt=fe.iterator,Qt.reset();Qt.next();)yn=Qt.value,yn instanceof Ti&&(ri=yn.layer,ri!==null&&!ri.visible||ri!==null&&!rt&&ri.isTemporary||!yn.isVisible()||(yn=yn.actualBounds,yn.w()&&(Vt?(Vt=!1,Zt.assign(yn)):Zt.ed(yn))));Lt.width=Zt.width,Lt.height=Zt.height,Gt.x=Zt.x,Gt.y=Zt.y}return ae!==null&&ae.w()&&(Gt=ae,te||(te=Dt)),Zt=ae=0,_e!==null&&(ae=_e.left+_e.right,Zt=_e.top+_e.bottom),Vt=Qt=0,E!==null&&(Qt=E.width,Vt=E.height,isFinite(Qt)&&(Qt=Math.max(0,Qt-ae)),isFinite(Vt)&&(Vt=Math.max(0,Vt-Zt))),E!==null&&te!==null?(te==="NaN"&&(te=Dt),E.w()?(E=Qt,Lt=Vt):isNaN(Vt)?(E=Qt,Lt=Lt.height*te):(E=Lt.width*te,Lt=Vt)):E!==null?E.w()?(te=Math.min(Qt/Lt.width,Vt/Lt.height),E=Qt,Lt=Vt):isNaN(Vt)?(te=Qt/Lt.width,E=Qt,Lt=Lt.height*te):(te=Vt/Lt.height,E=Lt.width*te,Lt=Vt):te!==null?te==="NaN"&&ne.w()?(te=Math.min((ne.width-ae)/Lt.width,(ne.height-Zt)/Lt.height),te>Dt?(te=Dt,E=Lt.width,Lt=Lt.height):(E=ne.width,Lt=ne.height)):(E=Lt.width*te,Lt=Lt.height*te):(te=Dt,E=Lt.width,Lt=Lt.height),_e!==null?(E+=ae,Lt+=Zt):_e=new Mi(0),ne!==null&&(Dt=ne.width,ne=ne.height,isNaN(Dt)&&(Dt=2e3),isNaN(ne)&&(ne=2e3),isFinite(Dt)&&(E=Math.min(E,Dt)),isFinite(ne)&&(Lt=Math.min(Lt,ne))),je.width=Math.ceil(E),je.height=Math.ceil(Lt),x==="SVG"?b===null?null:(b.resize(je.width,je.height,je.width,je.height),b.ownerDocument=Ve,b.hs=Qe,Ys(a,b.context,_e,new Qn(Math.ceil(E),Math.ceil(Lt)),te,Gt,fe,Te,rt,y),b.context):(a.Xm=!1,Ys(a,ct,_e,new Qn(Math.ceil(E),Math.ceil(Lt)),te,Gt,fe,Te,rt,y),a.Xm=!0,je.context)}Ye.Object.defineProperties(vn.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof Ue||(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 Tc(this,_t.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 Tc(this,_t.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(_t,"resize",this.Ov,!1),this.removeEventListener(_t,"wheel",this.$j,!0),ac===this&&(ac=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Rd(this,a),this.hk())}}},$w:{get:function(){return this.Sq}},pi:{get:function(){return this.hf}},draggedLink:{get:function(){return this.nt},set:function(a){this.nt!==a&&(this.nt=a,a!==null&&(this.Vt=a.fromPort,this.Wt=a.toPort))}},Mx:{get:function(){return this.Vt},set:function(a){this.Vt=a}},Nx:{get:function(){return this.Wt},set:function(a){this.Wt=a}},animationManager:{get:function(){return this.Yd}},undoManager:{get:function(){return this.cc.undoManager}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a,this.cc.skipsUndoManager=a}},delaysLayout:{get:function(){return this.lt},set:function(a){this.lt=a}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&Mn(a,"0 <= value <= 1",vn,"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),ql(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),ql(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),ql(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),ql(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&Mn(a,">= 0",vn,"scrollHorizontalLineChange"),this.iu=a,this.g("scrollHorizontalLineChange",y,a))}},scrollVerticalLineChange:{get:function(){return this.mu},set:function(a){var y=this.mu;y!==a&&(0>a&&Mn(a,">= 0",vn,"scrollVerticalLineChange"),this.mu=a,this.g("scrollVerticalLineChange",y,a))}},lastInput:{get:function(){return this.cj},set:function(a){this.cj=a}},previousInput:{get:function(){return this.Qg},set:function(a){this.Qg=a}},firstInput:{get:function(){return this.bq},set:function(a){this.bq=a}},currentCursor:{get:function(){return this.it},set:function(a){if(a===""&&(a=this.Op),this.it!==a){var y=this.ta,x=this.Ka;if(y!==null&&x!==null){this.it=a;var b=y.style.cursor;y.style.cursor=a,x.style.cursor=a,y.style.cursor===b&&(y.style.cursor="-webkit-"+a,x.style.cursor="-webkit-"+a,y.style.cursor===b&&(y.style.cursor="-moz-"+a,x.style.cursor="-moz-"+a,y.style.cursor===b&&(y.style.cursor=a,x.style.cursor=a)))}}}},defaultCursor:{get:function(){return this.Op},set:function(a){a===""&&(a="auto");var y=this.Op;y!==a&&(this.Op=a,this.g("defaultCursor",y,a))}},click:{get:function(){return this.zh},set:function(a){var y=this.zh;y!==a&&(this.zh=a,this.g("click",y,a))}},doubleClick:{get:function(){return this.Fh},set:function(a){var y=this.Fh;y!==a&&(this.Fh=a,this.g("doubleClick",y,a))}},contextClick:{get:function(){return this.Bh},set:function(a){var y=this.Bh;y!==a&&(this.Bh=a,this.g("contextClick",y,a))}},mouseOver:{get:function(){return this.Qh},set:function(a){var y=this.Qh;y!==a&&(this.Qh=a,this.g("mouseOver",y,a))}},mouseHover:{get:function(){return this.Oh},set:function(a){var y=this.Oh;y!==a&&(this.Oh=a,this.g("mouseHover",y,a))}},mouseHold:{get:function(){return this.Nh},set:function(a){var y=this.Nh;y!==a&&(this.Nh=a,this.g("mouseHold",y,a))}},mouseDragOver:{get:function(){return this.Qt},set:function(a){var y=this.Qt;y!==a&&(this.Qt=a,this.g("mouseDragOver",y,a))}},mouseDrop:{get:function(){return this.Lh},set:function(a){var y=this.Lh;y!==a&&(this.Lh=a,this.g("mouseDrop",y,a))}},handlesDragDropForTopLevelParts:{get:function(){return this.xt},set:function(a){var y=this.xt;y!==a&&(this.xt=a,this.g("handlesDragDropForTopLevelParts",y,a))}},mouseEnter:{get:function(){return this.Mh},set:function(a){var y=this.Mh;y!==a&&(this.Mh=a,this.g("mouseEnter",y,a))}},mouseLeave:{get:function(){return this.Ph},set:function(a){var y=this.Ph;y!==a&&(this.Ph=a,this.g("mouseLeave",y,a))}},toolTip:{get:function(){return this.$h},set:function(a){var y=this.$h;y!==a&&(this.$h=a,this.g("toolTip",y,a))}},contextMenu:{get:function(){return this.Ch},set:function(a){var y=this.Ch;y!==a&&(this.Ch=a,this.g("contextMenu",y,a))}},commandHandler:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a,a.Xe(this))}},toolManager:{get:function(){return this.te},set:function(a){this.te!==a&&(this.te=a,a.diagram=this)}},defaultTool:{get:function(){return this.ob},set:function(a){var y=this.ob;y!==a&&(this.ob=a,a.diagram=this,this.currentTool===y&&(this.currentTool=a))}},currentTool:{get:function(){return this.hb},set:function(a){var y=this.hb;y&&(y.isActive&&y.doDeactivate(),y.cancelWaitAfter(),y.doStop()),a===null&&(a=this.defaultTool),a!==null&&(this.hb=a,a.diagram=this,a.doStart())}},selection:{get:function(){return this.Hw}},maxSelectionCount:{get:function(){return this.Nt},set:function(a){var y=this.Nt;if(y!==a)if(0<=a&&!isNaN(a)){if(this.Nt=a,this.g("maxSelectionCount",y,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0<a)){this.R("ChangingSelection",this.selection),y=this.selection.Fa();for(var x=0;x<a;x++)y[x].isSelected=!1;this.R("ChangedSelection",this.selection)}}else Mn(a,">= 0",vn,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{get:function(){return this.St},set:function(a){var y=this.St;y!==a&&(this.St=a,this.g("nodeSelectionAdornmentTemplate",y,a))}},groupSelectionAdornmentTemplate:{get:function(){return this.wt},set:function(a){var y=this.wt;y!==a&&(this.wt=a,this.g("groupSelectionAdornmentTemplate",y,a))}},linkSelectionAdornmentTemplate:{get:function(){return this.Kt},set:function(a){var y=this.Kt;y!==a&&(this.Kt=a,this.g("linkSelectionAdornmentTemplate",y,a))}},highlighteds:{get:function(){return this.nw}},isModified:{get:function(){var a=this.undoManager;return a.isEnabled?a.currentTransaction!==null?!0:this.rn&&this.Ce!==a.historyIndex:this.rn},set:function(a){if(this.rn!==a){this.rn=a;var y=this.undoManager;!a&&y.isEnabled&&(this.Ce=y.historyIndex),a||om(this)}}},model:{get:function(){return this.cc},set:function(a){var y=this.cc;if(y!==a){this.currentTool.doCancel(),y&&y.undoManager!==a.undoManager&&y.undoManager.isInTransaction&&Nt("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=Ph(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var b=this.vb;this.vb=!0,Jo(this.animationManager,"Model"),y&&(this.pf!==null&&this.pf.each(function(te){return y.ik(te)}),y.ik(this.Oc)),this.cc=a,this.partManager=Xp(this.cc.type);for(var E=0;E<x.length;E++)this.add(x[E]);a.Pe(this.Hb),this.partManager.addAllModeledParts(),a.ik(this.Hb),a.Pe(this.Oc),this.pf!==null&&this.pf.each(function(te){return a.Pe(te)}),this.vb=b,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(_t,"pointermove",this.dk,!0),this.addEventListener(_t,"pointerdown",this.ui,!0),this.addEventListener(_t,"pointerup",this.fk,!0),this.addEventListener(_t,"pointerout",this.ek,!0),this.addEventListener(_t,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(_t,"wheel",this.$j,!0),this.addEventListener(_t,"selectstart",this.preventDefault,!1)):(this.removeEventListener(_t,"pointermove",this.dk,!0),this.removeEventListener(_t,"pointerdown",this.ui,!0),this.removeEventListener(_t,"pointerup",this.fk,!0),this.removeEventListener(_t,"pointerout",this.ek,!0),this.removeEventListener(_t,"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(_t,"wheel",this.$j,!0),this.removeEventListener(_t,"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=Mt.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),ma(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?Mc(this):(this.vb=!0,a=this.scale,xf(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)}Mt.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=yf(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=yf(this)),a.type!==Wn.Grid&&Nt("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),Lc(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),Mc(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||Nt("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 Mi(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===Th&&ql(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,ql(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,Yp(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&&Yp(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!==$a&&ql(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()||Nt("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()||Nt("initialViewportSpot must be a specific Spot: "+a),this.yt=a,this.g("initialDocumentSpot",y,a))}},minScale:{get:function(){return this.Ot},set:function(a){var y=this.Ot;y!==a&&(0<a?(this.Ot=a,this.g("minScale",y,a),a>this.scale&&(this.scale=a)):Mn(a,"> 0",vn,"minScale"))}},maxScale:{get:function(){return this.Mt},set:function(a){var y=this.Mt;y!==a&&(0<a?(this.Mt=a,this.g("maxScale",y,a),a<this.scale&&(this.scale=a)):Mn(a,"> 0",vn,"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),ql(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 Mi(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&&Nt("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();)Sg(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==kh&&a!==Qs&&a!==op&&Nt("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 Mi(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Ye.Object.defineProperties(vn,{licenseKey:{get:function(){return ag.jc()},set:function(a){ag.add(a.replace(/\s/g,""))}},version:{get:function(){return Vd}}}),vn.prototype.makeImageData=vn.prototype.Jx,vn.prototype.makeImage=vn.prototype.Wz,vn.prototype.cacheGroupExternalLinks=vn.prototype.Fu,vn.prototype.addRenderer=vn.prototype.bs,vn.prototype.makeSVG=vn.prototype.av,vn.prototype.makeSvg=vn.prototype.Cs,vn.prototype.stopAutoScroll=vn.prototype.ug,vn.prototype.doAutoScroll=vn.prototype.gs,vn.prototype.isUnoccupied=vn.prototype.Yj,vn.prototype.raiseDiagramEvent=vn.prototype.R,vn.prototype.removeDiagramListener=vn.prototype.am,vn.prototype.addDiagramListener=vn.prototype.Bj,vn.prototype.findTreeRoots=vn.prototype.yz,vn.prototype.layoutDiagram=vn.prototype.Uz,vn.prototype.findTopLevelGroups=vn.prototype.qz,vn.prototype.findTopLevelNodesAndLinks=vn.prototype.rz,vn.prototype.ensureBounds=vn.prototype.Va,vn.prototype.findLinksByExample=vn.prototype.ls,vn.prototype.findNodesByExample=vn.prototype.ms,vn.prototype.findLinkForData=vn.prototype.Kc,vn.prototype.findNodeForData=vn.prototype.ii,vn.prototype.findPartForData=vn.prototype.Lc,vn.prototype.findLinkForKey=vn.prototype.findLinkForKey,vn.prototype.findNodeForKey=vn.prototype.Vb,vn.prototype.findPartForKey=vn.prototype.findPartForKey,vn.prototype.rebuildParts=vn.prototype.Wd,vn.prototype.transformViewToDoc=vn.prototype.Ps,vn.prototype.transformRectDocToView=vn.prototype.zA,vn.prototype.transformDocToView=vn.prototype.op,vn.prototype.centerRect=vn.prototype.es,vn.prototype.scrollToRect=vn.prototype.tv,vn.prototype.scroll=vn.prototype.scroll,vn.prototype.highlightCollection=vn.prototype.Jz,vn.prototype.highlight=vn.prototype.Iz,vn.prototype.selectCollection=vn.prototype.rA,vn.prototype.select=vn.prototype.select,vn.prototype.updateAllRelationshipsFromData=vn.prototype.rp,vn.prototype.updateAllTargetBindings=vn.prototype.updateAllTargetBindings,vn.prototype.commit=vn.prototype.commit,vn.prototype.rollbackTransaction=vn.prototype.Kf,vn.prototype.commitTransaction=vn.prototype.eb,vn.prototype.startTransaction=vn.prototype.Ea,vn.prototype.raiseChanged=vn.prototype.g,vn.prototype.raiseChangedEvent=vn.prototype.cb,vn.prototype.removeChangedListener=vn.prototype.ik,vn.prototype.addChangedListener=vn.prototype.Pe,vn.prototype.removeModelChangedListener=vn.prototype.mA,vn.prototype.addModelChangedListener=vn.prototype.Yw,vn.prototype.findLayer=vn.prototype.Qj,vn.prototype.removeLayer=vn.prototype.kA,vn.prototype.addLayerAfter=vn.prototype.Cy,vn.prototype.addLayerBefore=vn.prototype.Ww,vn.prototype.addLayer=vn.prototype.Al,vn.prototype.moveParts=vn.prototype.moveParts,vn.prototype.copyParts=vn.prototype.Kj,vn.prototype.removeParts=vn.prototype.Is,vn.prototype.remove=vn.prototype.remove,vn.prototype.add=vn.prototype.add,vn.prototype.clearDelayedGeometries=vn.prototype.bx,vn.prototype.setProperties=vn.prototype.nm,vn.prototype.attach=vn.prototype.Du,vn.prototype.set=vn.prototype.set,vn.prototype.resetInputOptions=vn.prototype.Sx,vn.prototype.setInputOption=vn.prototype.sA,vn.prototype.getInputOption=vn.prototype.Ql,vn.prototype.resetRenderingHints=vn.prototype.Tx,vn.prototype.setRenderingHint=vn.prototype.Xx,vn.prototype.getRenderingHint=vn.prototype.Gf,vn.prototype.maybeUpdate=vn.prototype.bd,vn.prototype.requestUpdate=vn.prototype.$b,vn.prototype.delayInitialization=vn.prototype.Xy,vn.prototype.isUpdateRequested=vn.prototype.Pz,vn.prototype.invalidateDocumentBounds=vn.prototype.Ya,vn.prototype.findObjectsNear=vn.prototype.og,vn.prototype.findPartsNear=vn.prototype.mz,vn.prototype.findObjectsIn=vn.prototype.Cf,vn.prototype.findPartsIn=vn.prototype.ux,vn.prototype.findObjectsAt=vn.prototype.ji,vn.prototype.findPartsAt=vn.prototype.lz,vn.prototype.findObjectAt=vn.prototype.ic,vn.prototype.findPartAt=vn.prototype.Ol,vn.prototype.focusObject=vn.prototype.zz,vn.prototype.alignDocument=vn.prototype.Jy,vn.prototype.zoomToRect=vn.prototype.BA,vn.prototype.zoomToFit=vn.prototype.zoomToFit,vn.prototype.diagramScroll=vn.prototype.kx,vn.prototype.focus=vn.prototype.focus;var rp=new ci,cm=null,ys=_t.document!==void 0,Kd=null,ad="",$a=new Ln(vn,"None",0),tu=new Ln(vn,"Uniform",1),ld=new Ln(vn,"UniformToFill",2),bf=new Ln(vn,"CycleAll",10),ng=new Ln(vn,"CycleNotDirected",11),ig=new Ln(vn,"CycleNotDirectedFast",12),rg=new Ln(vn,"CycleNotUndirected",13),og=new Ln(vn,"CycleDestinationTree",14),sg=new Ln(vn,"CycleSourceTree",15),Th=new Ln(vn,"DocumentScroll",1),Cf=new Ln(vn,"InfiniteScroll",2),kh=new Ln(vn,"TreeParentCollapsed",21),Qs=new Ln(vn,"AllParentsCollapsed",22),op=new Ln(vn,"AnyParentsCollapsed",23),ag=new Bn,Vd="2.3.10",$d="image",Pf=null,hm=!1;function Fa(){if(ys){var a=_t.document.createElement("canvas"),y=a.getContext("2d"),x=En("7ca11abfd022028846");y[x]=En("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",dn.Dx+"4ae6247590da4bb21c324ba3a84e385776",gr.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",rn.za],E=1;5>E;E++)y[En("7ca11abfd7330390")](En(b[E-1]),10,15*E);for(y[x]=En("39f046ebb36e4b"),x=1;5>x;x++)y[En("7ca11abfd7330390")](En(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(gr.prototype.Cd=gr.prototype.Eu),Pf=a}}vn.className="Diagram",vn.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=_t.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof vn?y.H:null},vn.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},vn.useDOM=function(a){ys=a?_t.document!==void 0:!1},vn.isUsingDOM=function(){return ys},vn.None=$a,vn.Uniform=tu,vn.UniformToFill=ld,vn.CycleAll=bf,vn.CycleNotDirected=ng,vn.CycleNotDirectedFast=ig,vn.CycleNotUndirected=rg,vn.CycleDestinationTree=og,vn.CycleSourceTree=sg,vn.DocumentScroll=Th,vn.InfiniteScroll=Cf,vn.TreeParentCollapsed=kh,vn.AllParentsCollapsed=Qs,vn.AnyParentsCollapsed=op;function dm(){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=_t[En("76a715b2f73f148a")][En("72ba13b5")]||"";if(a.Rc=!0,ys){var b=vn[En("76a115b6ed251eaf4692")];if(b)for(var E=ag.iterator;E.next()&&(b=E.value,b=En(b).split(En("39e9")),!(6>b.length));){var te=En(b[1]).split(".");if(b[4]!=="7da71ca0")break;var ne=En(dn[En("6cae19")]).split(".");if(te[0]>ne[0]||te[0]===ne[0]&&te[1]>=ne[1]){var ae=_t[En("74a900bae4370f8b51")][En("6fbb13a1c2311e8a57")].toLowerCase();if(ne=ae[En("73a612b6fb191d")](En("3aad1ab6e022098b4dc4")),te=En(b[2]),-1<ne&&(ae=ae[En("73a612b6fb191d")](te.toLowerCase()+"/"),a.Rc=!(-1<ae&&ae<ne),!a.Rc))break;for(ne=x[En("76ad18b4f73e")],ae=x[En("73a612b6fb191d")](En("35e7"))+2;ae<ne;ae++)y+=x[ae];if(ne=y[En("73a612b6fb191d")](te),0>ne&&te!==En("7da71ca0ad381e90")&&(ne=y[En("73a612b6fb191d")](En("76a715b2ef3e149757"))),0>ne&&(ne=y[En("73a612b6fb191d")](En("76a715b2ef3e149757"))),0>ne&&(ne=y[En("73a612b6fb191d")](En("2bfa41fdb3784bca12"))),0>ne&&(ne=x[En("73a612b6fb191d")](En("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[En("73a612b6fb191d")](En("35"))||y[En("73a612b6fb191d")](En("35"))===-1),!a.Rc||x[En("73a612b6fb191d")](En("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[En("73a612b6fb191d")](te)),!a.Rc)||(ne=_t[En("76a715b2f73f148a")][En("69ad17a1e03e")],ae=ne[En("73a612b6fb191d")](En("7fb002b6ed25128b4da25b2e")),-1<ae&&(a.Rc=!(ne[En("73a612b6fb191d")](te)>ae),!a.Rc)))break;if(te[0]==="#"){ne=_t.document.createElement("div");for(var fe=b[0].replace(/[A-Za-z]/g,"");4>fe.length;)fe+="9";if(ae=fe,fe=fe.substr(fe.length-4),b="",b+=["gsh","gsf"][parseInt(fe.substr(0,1),10)%2],b+=["Header","Background","Display","Feedback"][parseInt(fe.substr(0,1),10)%4],ne[En("79a417a0f0181a8946")]=b,_t.document[En("78a712aa")]){_t.document[En("78a712aa")][En("7bb806b6ed32388c4a875b")](ne),fe=_t.getComputedStyle(ne).getPropertyValue(En("78a704b7e62456904c9b12701b6532a8"));var _e=_t.getComputedStyle(ne).getPropertyValue(En("75b817b0ea2202"));if(_t.document[En("78a712aa")][En("68ad1bbcf533388c4a875b")](ne),fe){if(ne=_t[En("77a902b0eb1b1e804a8a")],_e==="0."+parseInt(ae,10)%100||fe.indexOf(parseInt(te[1]+te[2],16))!==-1&&fe.indexOf(parseInt(te[3]+te[4],16))!==-1){a.Rc=!1;break}else if(ne&&ne(En("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(b="."+b,te=0;te<document.styleSheets.length;te++){ne=document.styleSheets[te].rules||document.styleSheets[te].cssRules;for(var Te in ne)if(b===ne[Te].selectorText){a.Rc=!1;break e}}}}else a.Rc=null,a.Rc=!1}}}else{for(Te=x[En("76ad18b4f73e")],E=x[En("73a612b6fb191d")](En("35e7"))+2;E<Te;E++)y+=x[E];x=y[En("73a612b6fb191d")](En("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[En("73a612b6fb191d")](En("35")))}}}return 0<a.Rc&&a!==a.wy}dm.className="DiagramHelper";function ah(a){this.j=a===void 0?new Mt:a,this.o=new Mt}Ye.Object.defineProperties(ah.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 _f="DraggingInfo";ah.className="DraggingInfo";function re(a,y,x){this.node=a,this.info=y,this.Su=x}re.className="DraggingNodeInfoPair";function pe(){this.reset()}pe.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new Qn(NaN,NaN).freeze(),this.gridSnapCellSpot=Xs,this.gridSnapOrigin=new Mt(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},pe.className="DraggingOptions";function Fe(a,y){if(typeof a=="string"||_t.Element&&a instanceof Element)var x=vn.call(this,a)||this;else x=vn.call(this)||this,y=a;return Re(x),y&&x.nm(y),x}qe(Fe,vn);function Re(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=qa,a.layout=new Pa}Fe.prototype.reset=function(){vn.prototype.reset.call(this),Re(this)},Fe.className="Palette";function Ue(a,y){if(typeof a=="string"||_t.Element&&a instanceof Element)var x=vn.call(this,a)||this;else x=vn.call(this)||this,y=a;var b=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 Ti;var E=new dr;return E.stroke="magenta",E.strokeWidth=2,E.fill="transparent",E.name="BOXSHAPE",a.selectable=!0,a.selectionAdorned=!1,a.selectionObjectName="BOXSHAPE",a.locationObjectName="BOXSHAPE",a.resizeObjectName="BOXSHAPE",a.cursor="move",a.add(E),x.j=a,x.allowCopy=!1,x.allowDelete=!1,x.allowSelect=!0,x.autoScrollRegion=new Mi(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Rt,x.toolManager.mouseMoveTools),x.click=function(){var te=b.observed;if(te!==null){var ne=te.viewportBounds,ae=b.lastInput.documentPoint;te.position=new Mt(ae.x-ne.width/2,ae.y-ne.height/2)}},x.Pf=function(){b.Ya(),wt(b)},x.Xd=function(){b.observed!==null&&(b.Ya(),b.N())},x.Ha=function(){1>b.updateDelay?b.N():b.o||(b.o=!0,setTimeout(function(){return b.redraw()},b.updateDelay))},x.Of=function(){b.observed!==null&&wt(b)},x.autoScale=tu,x.vb=!1,y&&Object.assign(x,y),x}qe(Ue,vn),Ue.prototype.computePixelRatio=function(){return 1},Ue.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(pu(this),this.ql===null){var x=new Du(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),ot(this)}finally{this.ta=a,this.ib=y}}}vn.prototype.redraw.call(this)},Ue.prototype.gc=function(){if(this.Ka===null&&Nt("No div specified"),this.ta===null&&Nt("No canvas specified"),!(this.ta instanceof Tc)&&(Rv(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){pu(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?ot(this):this.ql!==null&&(a.drawImage(this.ql.Oa,0,0),y=this.Ab,y.reset(),this.scale!==1&&y.scale(this.scale),this.position.x===0&&this.position.y===0||y.translate(-this.position.x,-this.position.y),a.scale(this.Mb,this.Mb),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.yc()),y=this.Wa.s;for(var x=y.length,b=0;b<x;b++)y[b].gc(a,this);this.Fc=this.vd=!1}}};function ot(a){var y=a.observed;if(y!==null){var x=a.drawsTemporaryLayers,b=a.drawsGrid&&x,E=y.grid;b&&E!==null&&E.visible&&!isNaN(E.width)&&!isNaN(E.height)&&(E=kn.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Lc(y,E),kn.free(E),ba(y));var te=a.Ab;te.reset(),a.scale!==1&&te.scale(a.scale),a.position.x===0&&a.position.y===0||te.translate(-a.position.x,-a.position.y),E=a.ib,E.scale(a.Mb,a.Mb),E.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),E.yc(),y=y.Wa.s,te=y.length;for(var ne=0;ne<te;ne++){var ae=y[ne],fe=a;if(ae.visible&&ae.opacity!==0){var _e=ae.diagram.grid.part;if(!x&&ae.isTemporary)b&&_e.layer===ae&&(ae=Ma(ae,E),_e.gc(E,fe),E.globalAlpha=ae);else{for(var Te=Ma(ae,E),je=fe.scale,Ve=kn.alloc(),Qe=ae.Pa.s,rt=Qe.length,ct=0;ct<rt;ct++){var Dt=Qe[ct];(b||Dt!==_e)&&ae.Oj(E,Dt,fe,null,je,Ve,!1)}kn.free(Ve),E.globalAlpha=Te}}}}}function wt(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var b=y.selectionObject,E=Qn.alloc();E.h(x.width,x.height),b.desiredSize=E,Qn.free(E),a=2/a.scale,b instanceof dr&&(b.strokeWidth=a),y.location=new Mt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}Ue.prototype.computeBounds=function(){var a=this.observed;if(a===null)return xr;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},Ue.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},Ue.prototype.onViewportBoundsChanged=function(a,y,x,b){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),wt(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=b,this.R("ViewportBoundsChanged",this.fc,a))},Ye.Object.defineProperties(Ue.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof Ue&&Nt("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,b=this.ib;x&&b&&(b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,x.width,x.height))}else this.Ha(null),wt(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),wt(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)}}}),Ue.className="Overview";function Rt(){ns.call(this),this.j=null}qe(Rt,ns),Rt.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 Mt(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new Mt(a.x-this.j.x,a.y-this.j.y)),!0)},Rt.prototype.doActivate=function(){this.j=null,ns.prototype.doActivate.call(this)},Rt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Rt.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 b=a.firstInput.documentPoint;x=x.location,this.j=new Mt(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new Mt(a.x-this.j.x,a.y-this.j.y)}}},Rt.className="OverviewDraggingTool";function It(){pr(this),this.H=ac,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=xr,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=Cr?y.meta:y.control,b=y.shift,E=y.alt,te=y.key;!x||te!=="C"&&te!=="Insert"?x&&te==="X"||b&&te==="Del"?this.canCutSelection()&&this.cutSelection():x&&te==="V"||b&&te==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&te==="Y"||E&&b&&te==="Backspace"?this.canRedo()&&this.redo():x&&te==="Z"||E&&te==="Backspace"?this.canUndo()&&this.undo():te==="Del"||te==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&te==="A"?this.canSelectAll()&&this.selectAll():te==="Esc"?this.canStopCommand()&&this.stopCommand():te==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):te==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):te==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):te==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):te==="PageUp"?b&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):te==="PageDown"?b&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):te==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):te==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):te===" "?this.canScrollToPart()&&this.scrollToPart():te==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():te==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&te==="0"?this.canResetZoom()&&this.resetZoom():b&&te==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!b&&te==="G"?this.canGroupSelection()&&this.groupSelection():x&&b&&te==="G"?this.canUngroupSelection()&&this.ungroupSelection():te==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():te==="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 Wo&&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 b=a.links;b.next();)b.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 In,x=a.selection.iterator;x.next();)dd(y,x.value,!0,this.deletesTree?1/0:0,this.deletesConnectedLinks?null:!1,function(b){return b.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 In;for(a=a.selection.iterator;a.next();)dd(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,ad="";else{x=y.model;var b=!1,E=!1,te=null;try{x.Tl()&&(b=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(E=x.Ij,x.Ij=this.copiesGroupKey),te=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=b),x.Wj()&&(x.Ij=E),x=new Bn,x.addAll(te),Kd=x,ad=y.model.dataFormat}}y.R("ClipboardChanged",x)},It.prototype.pasteFromClipboard=function(){var a=new In,y=Kd;if(y===null)return a;var x=this.diagram;if(ad!==x.model.dataFormat)return a;var b=x.model,E=!1,te=!1,ne=null;try{b.Tl()&&(E=b.Jj,b.Jj=this.copiesParentKey),b.Wj()&&(te=b.Ij,b.Ij=this.copiesGroupKey),ne=x.Kj(y,x,!1)}finally{for(b.Tl()&&(b.Jj=E),b.Wj()&&(b.Ij=te),y=ne.iterator;y.next();)x=y.value,b=y.key,x.location.w()||(b.location.w()?x.location=b.location:!x.position.w()&&b.position.w()&&(x.position=b.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 b=x.iterator;b.next();)b.value.isSelected=!0;if(a!==null){var E=y.computePartsBounds(y.selection);if(E.w()){var te=this.computeEffectiveCollection(y.selection,y.Wm);Ec(y,te,new Mt(a.x-E.centerX,a.y-E.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||ad!==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===$a&&(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!==$a?!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===$a&&(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!==$a?!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,b=a.scale;Jo(y,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&b===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.sw,this.Au=NaN,this.yu=xr):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),Ss(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(fe){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;Jo(x,"Scroll To Part");var b=this.scrollToPartPause;if(0<b){var E=Yt(this,a,[a]);if(E.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var te=function(){y.Ea();for(var fe=E.pop();0<E.length&&fe instanceof oi&&fe.isTreeExpanded&&(!(fe instanceof tr)||fe.isSubGraphExpanded);)fe=E.pop();0<E.length?(fe instanceof Ti&&y.tv(fe.actualBounds),fe instanceof oi&&!fe.isTreeExpanded&&(fe.isTreeExpanded=!0),fe instanceof tr&&!fe.isSubGraphExpanded&&(fe.isSubGraphExpanded=!0)):(fe instanceof Ti&&y.es(fe.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){mn(te,(x.isEnabled?x.duration:0)+b)};y.Bj("LayoutCompleted",ne),te()}}else{var ae=y.position.copy();y.es(a.actualBounds),ae.Xa(y.position)&&x.Cc()}}};function Yt(a,y,x){if(y.isVisible())return x;if(y instanceof qr)Yt(a,y.adornedPart,x);else if(y instanceof $n){var b=y.fromNode;b!==null&&Yt(a,b,x),y=y.toNode,y!==null&&Yt(a,y,x)}else y instanceof oi&&(b=y.labeledLink,b!==null&&Yt(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),Yt(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),Yt(a,y,x));return x}It.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Ti)?!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"),Jo(y.animationManager,"Collapse Tree");var x=new Bn;if(a!==null&&a.isTreeExpanded)a.collapseTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof oi&&E.isTreeExpanded&&(E.collapseTree(),x.add(E))}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 oi&&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 oi&&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"),Jo(y.animationManager,"Expand Tree");var x=new Bn;if(a!==null&&!a.isTreeExpanded)a.expandTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof oi&&!E.isTreeExpanded&&(E.expandTree(),x.add(E))}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 oi)||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 oi&&!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 b=null;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Group");for(var E=new Bn,te=a.selection.iterator;te.next();){var ne=te.value;ne.Zc()&&ne.canGroup()&&E.add(ne)}for(var ae=new Bn,fe=E.iterator;fe.next();){var _e=fe.value;te=!1;for(var Te=E.iterator;Te.next();)if(_e.Td(Te.value)){te=!0;break}te||ae.add(_e)}if(0<ae.count){var je=ae.first().containingGroup;if(je!==null)for(;je!==null;){E=!1;for(var Ve=ae.iterator;Ve.next();)if(!Ve.value.Td(je)){E=!0;break}if(E)je=je.containingGroup;else break}if(x instanceof tr)Ru(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Qe=y.copyNodeData(x);nn(Qe)&&(y.xf(Qe),b=a.ii(Qe))}if(b!==null){je!==null&&this.isValidMember(je,b)&&(b.containingGroup=je);for(var rt=ae.iterator;rt.next();){var ct=rt.value;this.isValidMember(b,ct)&&(ct.containingGroup=b)}a.clearSelection(!0),b.isSelected=!0}}a.R("SelectionGrouped",b)}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 Tn(a){var y=Hn();for(a=a.iterator;a.next();){var x=a.value;x instanceof $n||y.push(x)}a=new In,x=y.length;for(var b=0;b<x;b++){for(var E=y[b],te=!0,ne=0;ne<x;ne++)if(E.Td(y[ne])){te=!1;break}te&&a.add(E)}return ei(y),a}It.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof $n)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 b=new Bn;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var te=E.value;te instanceof tr&&te.canUngroup()&&b.add(te)}var ne=new Bn;if(0<b.count){y.clearSelection(!0);for(var ae=b.iterator;ae.next();){var fe=ae.value;fe.expandSubGraph();var _e=fe.containingGroup,Te=_e!==null&&_e.data!==null?x.wa(_e.data):void 0;ne.addAll(fe.memberParts);for(var je=ne.iterator;je.next();){var Ve=je.value;if(Ve.isSelected=!0,!(Ve instanceof $n)){var Qe=Ve.data;Qe!==null?x.mp(Qe,Te):Ve.containingGroup=_e}}y.remove(fe)}}y.R("SelectionUngrouped",b,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 tr))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof tr&&y.canUngroup())return!0;return!1},It.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=Tn(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.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"),Jo(y.animationManager,"Collapse SubGraph");var x=new Bn;if(a!==null&&a.isSubGraphExpanded)a.collapseSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof tr&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}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 tr&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof tr&&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"),Jo(y.animationManager,"Expand SubGraph");var x=new Bn;if(a!==null&&!a.isSubGraphExpanded)a.expandSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof tr&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}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 tr&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof tr&&!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 b=y.selection.iterator;b.next();){var E=b.value;if(E.canEdit()){a=E;break}}if(a===null)return;a=a.Nl(function(te){return te instanceof Mo&&te.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 Mo))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 Mo&&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 b=y.lastInput,E=null;a instanceof tn?E=a.ga(jr):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new Mt(E.x+E.width/2,E.y+E.height/2)),E!==null&&(b.viewPoint=y.op(E),b.documentPoint=E,b.left=!1,b.right=!0,b.up=!0),y.currentTool=x,vr(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,b=x.toolManager.findTool("Dragging"),E=x.currentTool===b;if(y===void 0&&(y=E?b.dragOptions:x.Wm),b=new ci,a===null)return b;for(var te=a.iterator;te.next();)Ou(x,b,te.value,E,y);if(x.draggedLink!==null&&y.dragsLink)return b;for(te=a.iterator;te.next();)a=te.value,a instanceof $n&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},Ye.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||Nt("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",oh=function(){return new It};function tn(){pr(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Mt(NaN,NaN).freeze(),this.jd=Ho,this.Ab=new gr,this.wh=new gr,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=xa,this.uc=new kn(NaN,NaN,NaN,NaN).freeze(),this.Ib=new kn(NaN,NaN,NaN,NaN).freeze(),this.dc=new kn(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=oo,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 Gn,jn,mi,_i,Bi,nr,Dr,Sr,Kr,wo;tn.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=Nn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},tn.prototype.Vw=function(a){var y=this.Dh;if(sn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},tn.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},tn.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},tn.prototype.copy=function(){return this.clone()},it=tn.prototype,it.qb=function(a){a.classType===$n?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Nt("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===tn&&(this.stretch=a)},it.toString=function(){return Fn(this.constructor)+"#"+Ir(this)},it.th=function(){this.A!==null&&(this.A.nc=!0)};function yr(a){a.A===null?a.A=new Lf:a.A.nc&&(a.A=a.A.copy())}it.Xc=function(){if(this.ba===null){var a=new lg;a.Xi=ms,a.yj=ms,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},it.cb=function(a,y,x,b,E,te,ne){var ae=this.part;if(ae!==null&&(ae.gk(a,y,x,b,E,te,ne),x===this&&a===Vo&&Ta(this)&&zo(this,ae,y),te=this.diagram,this.animationTriggers===null||te===null||!te.pi||te.undoManager.isUndoingRedoing||te.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&te.animationManager.isEnabled&&!te.animationManager.isTicking&&(this.jo===null&&(this.jo=new ci),ne=te.undoManager.transactionLevel===0,a.startCondition===wa?ne=!0:a.startCondition===zs&&(ne=!1),ne?(te=new gs,ls(a,te),ne=this.jo.get(a),ne!==null&&ne.stop(),this.jo.add(a,te),te.vu=this,te.Nw=a,te.add(this,y,b,E),te.start()):(Jo(te.animationManager,"Trigger"),te.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof Wn&&x===ae&&(ae.l&16777216)!==0&&ae.data!==null))for(x=this.O.s,b=x.length,E=0;E<b;E++)ae=x[E],ae instanceof Wn&&qd(ae,function(fe){fe.data!==null&&fe.l&16777216&&fe.La(y)})};function zo(a,y,x){var b=a.ih();if(b!==null)for(var E=a.localBindings.iterator;E.next();){var te=E.value,ne=null;if(te.sourceName!==null){if(ne=LS(te,b,a),ne===null)continue;te.sp(a,ne,x,null)}else if(te.isToModel){var ae=y.diagram;ae===null||ae.skipsModelSourceBindings||te.sp(a,ae.model.modelData,x,b)}else{if(ae=b.data,ae===null)continue;var fe=y.diagram;fe===null||fe.skipsModelSourceBindings||te.sp(a,ae,x,b)}ne===a&&(ae=b.ks(te.Ai),ae!==null&&te.Mv(ae,ne,x))}}it.ks=function(a){return this.bindingId===a?this:null},it.g=function(a,y,x){this.cb(Vo,a,this,y,x)},it.Ge=function(a,y,x,b){var E=this.uc;if(E.h(a,y,x,b),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new gr);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),te.pp(E)}};function ca(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}it.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?eo(a.x,a.y,0,0,0,b.height)<=y||eo(a.x,a.y,0,b.height,b.width,b.height)<=y||eo(a.x,a.y,b.width,b.height,b.width,0)<=y||eo(a.x,a.y,b.width,0,0,0)<=y:a.zd(0,0)<=y&&a.zd(0,b.height)<=y&&a.zd(b.width,0)<=y&&a.zd(b.width,b.height)<=y},it.se=function(){return!0},it.ca=function(a){var y=Mt.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return Mt.free(y),!1;var b=this.diagram;if(b!==null&&b.wq){var E=b.Ql("extraTouchThreshold"),te=b.Ql("extraTouchArea"),ne=te/2,ae=this.naturalBounds;b=this.Df()*b.scale;var fe=1/b;if(ae.width*b<E&&ae.height*b<E)return a=Eo(x.x-ne*fe,x.y-ne*fe,x.width+te*fe,x.height+te*fe,y.x,y.y),Mt.free(y),a}return E=!1,(this instanceof qr||this instanceof dr?Eo(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)?E=!1:this.areaBackground!==null&&x.ca(y)||this.Ma!==null&&this.dc.ca(a)?E=!0:E=this.gh(a)),Mt.free(y),E},it.gh=function(a){var y=this.naturalBounds;return Eo(0,0,y.width,y.height,a.x,a.y)},it.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=kn.allocAt(0,0,y.width,y.height);var x=this.transform,b=!1,E=Mt.allocAt(a.x,a.y);return y.ca(x.Cd(E))&&(E.h(a.x,a.bottom),y.ca(x.Cd(E))&&(E.h(a.right,a.bottom),y.ca(x.Cd(E))&&(E.h(a.right,a.y),y.ca(x.Cd(E))&&(b=!0)))),Mt.free(E),kn.free(y),b},it.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=Mt.allocAt(0,0);return a.ca(y.Ga(E))&&(E.h(0,x.height),a.ca(y.Ga(E))&&(E.h(x.width,x.height),a.ca(y.Ga(E))&&(E.h(x.width,0),a.ca(y.Ga(E))&&(b=!0)))),Mt.free(E),b},it.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=Mt.allocAt(0,0),E=Mt.allocAt(0,x.height),te=Mt.allocAt(x.width,x.height),ne=Mt.allocAt(x.width,0),ae=!1;if(a.ca(y.Ga(b))||a.ca(y.Ga(E))||a.ca(y.Ga(te))||a.ca(y.Ga(ne)))ae=!0;else{x=kn.allocAt(0,0,x.width,x.height);var fe=Mt.allocAt(a.x,a.y);x.ca(y.Cd(fe))?ae=!0:(fe.h(a.x,a.bottom),x.ca(y.Cd(fe))?ae=!0:(fe.h(a.right,a.bottom),x.ca(y.Cd(fe))?ae=!0:(fe.h(a.right,a.y),x.ca(y.Cd(fe))&&(ae=!0)))),Mt.free(fe),kn.free(x),!ae&&(rn.us(a,b,E)||rn.us(a,E,te)||rn.us(a,te,ne)||rn.us(a,ne,b))&&(ae=!0)}return Mt.free(b),Mt.free(E),Mt.free(te),Mt.free(ne),ae},it.ga=function(a,y){if(y===void 0&&(y=new Mt),a instanceof yi){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},it.mi=function(a){a===void 0&&(a=new kn);var y=this.naturalBounds,x=this.oe,b=Mt.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),Ao(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),Ao(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),Ao(a,b.x,b.y,0,0),Mt.free(b),a},it.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},it.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},it.qs=function(a,y){return y===void 0&&(y=new Mt),y.assign(a),this.oe.Cd(y),y},it.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},it.Sj=function(a,y,x,b,E){var te=this.transform,ne=1/(te.m11*te.m22-te.m12*te.m21),ae=te.m22*ne,fe=-te.m12*ne,_e=-te.m21*ne,Te=te.m11*ne,je=ne*(te.m21*te.dy-te.m22*te.dx),Ve=ne*(te.m12*te.dx-te.m11*te.dy);return this.areaBackground!==null?(te=this.actualBounds,rn.Ff(te.left,te.top,te.right,te.bottom,a,y,x,b,E)):(ne=a*ae+y*_e+je,a=a*fe+y*Te+Ve,y=x*ae+b*_e+je,x=x*fe+b*Te+Ve,E.h(0,0),b=this.naturalBounds,x=rn.Ff(0,0,b.width,b.height,ne,a,y,x,E),E.transform(te),x)},tn.prototype.measure=function(a,y,x,b){if(iu(this)!==!1){var E=this.Kg,te=E.right+E.left;E=E.top+E.bottom,a=Math.max(a-te,0),y=Math.max(y-E,0),x=Math.max((x||0)-te,0),b=Math.max((b||0)-E,0),te=this.angle,E=this.desiredSize;var ne=this.kq();te===90||te===270?(a=isFinite(E.height)?E.height+ne:a,y=isFinite(E.width)?E.width+ne:y):(a=isFinite(E.width)?E.width+ne:a,y=isFinite(E.height)?E.height+ne:y),E=x||0,ne=b||0;var ae=this instanceof Wn;switch(gl(this,!0)){case jn:ne=E=0,ae&&(y=a=1/0);break;case Gn:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(ne=y);break;case _i:isFinite(a)&&a>x&&(E=a),ne=0,ae&&(y=1/0);break;case Bi:isFinite(y)&&y>b&&(ne=y),E=0,ae&&(a=1/0)}ae=this.maxSize;var fe=this.minSize;E>ae.width&&fe.width<ae.width&&(E=ae.width),ne>ae.height&&fe.height<ae.height&&(ne=ae.height),x=Math.max(E,fe.width),b=Math.max(ne,fe.height),ae.width<x&&(x=Math.min(fe.width,x)),ae.height<b&&(b=Math.min(fe.height,b)),a=Math.min(ae.width,a),y=Math.min(ae.height,y),a=Math.max(x,a),y=Math.max(b,y),(te===90||te===270)&&(te=a,a=y,y=te,te=x,x=b,b=te),this.uc.ka(),this.Wl(a,y,x,b),this.uc.freeze(),this.uc.w()||Nt("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),ea(this,!1)}},tn.prototype.Wl=function(){},tn.prototype.Dd=function(){return!1},tn.prototype.arrange=function(a,y,x,b,E){this.Uk();var te=kn.alloc();te.assign(this.Ib),this.Ib.ka(),nl(this)===!1?this.Ib.h(a,y,x,b):this.eh(a,y,x,b),this.Ib.freeze(),E===void 0?this.tb=null:this.tb=E,x=!1,E!==void 0?x=!0:(E=this.panel,E!==null&&Oh(E)&&(E=E.panel),E!==null&&(E=E.dc,b=this.measuredBounds,this.areaBackground!==null&&(b=this.Ib),x=y+b.height,b=a+b.width,x=!(0<=a+.05&&b<=E.width+.05&&0<=y+.05&&x<=E.height+.05),this instanceof Mo&&(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()||Nt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(te,this.Ib),Hc(this,!1),kn.free(te)},it=tn.prototype,it.eh=function(){};function Ya(a,y,x,b,E){if(a.Ib.h(y,x,b,E),!a.desiredSize.w()){var te=a.uc;x=a.Kg,y=x.right+x.left;var ne=x.top+x.bottom;switch(x=te.width+y,te=te.height+ne,b+=y,E+=ne,y=gl(a,!0),x===b&&te===E&&(y=jn),y){case jn:(x>b||te>E)&&(ea(a,!0),a.measure(x>b?b:x,te>E?E:te,0,0));break;case Gn:ea(a,!0),a.measure(b,E,0,0);break;case _i:ea(a,!0),a.measure(b,te,0,0);break;case Bi:ea(a,!0),a.measure(x,E,0,0)}}}it.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(),Sa(a,y)||(x.oh(),this.Pn(x)))},it.Pn=function(a){this.portId!==null&&(jv(a,!0),a instanceof oi&&W1(a,this))},it.gc=function(a,y){if(!gu(this,a,y)&&this.visible){var x=this.opacity;if(x!==0){var b=1;x!==1&&(b=a.globalAlpha,a.globalAlpha=b*x);var E="";this.filter!==""&&(E=a.filter,a.filter=this.filter);var te=this instanceof Wn&&Oh(this),ne=this.Ib;if(te){var ae=this.Ib,fe=this.dc,_e=this.areaBackground,Te=this.Ma;_e===null&&Te===null||a.yc(),_e!==null&&(ws(this,a,_e,!0,!0,fe,ae),_e instanceof fo&&_e.type===yu?(a.beginPath(),a.rect(ae.x,ae.y,ae.width,ae.height),a.ng(_e)):a.fillRect(ae.x,ae.y,ae.width,ae.height)),Te!==null&&(ws(this,a,Te,!0,!1,fe,ae),Te instanceof fo&&Te.type===yu?(a.beginPath(),a.rect(ae.x,ae.y,ae.width,ae.height),a.ng(Te)):a.fillRect(ae.x,ae.y,ae.width,ae.height)),this.hh(a,y)}if(!te&&(te||ne.width!==0&&ne.height!==0&&!isNaN(ne.x)&&!isNaN(ne.y))){te=this.transform,ae=this.panel,this.l&4096&&Ca(this),_e=this.part,fe=!1;var je=0;_e&&y.Gf("drawShadows")&&(fe=_e.isShadowed)&&(Te=_e.shadowOffset,je=Math.max(Te.y,Te.x)*y.scale*y.Mb),Te=this.Dd();var Ve;if(!(Ve=y.$i||!Te)){var Qe=this.naturalBounds;Ve=this.wh;var rt=Ve.m11,ct=Ve.m21,Dt=Ve.dx,Lt=Ve.m12,Gt=Ve.m22,Zt=Ve.dy,Vt,Qt=Vt=0;Ve=Vt*rt+Qt*ct+Dt;var yn=Vt*Lt+Qt*Gt+Zt;Vt=Qe.width+je,Qt=0;var ri=Vt*rt+Qt*ct+Dt;Vt=Vt*Lt+Qt*Gt+Zt,Qt=Math.min(Ve,ri);var fi=Math.min(yn,Vt),li=Math.max(Ve+0,ri)-Qt,Vn=Math.max(yn+0,Vt)-fi;Ve=Qt,yn=fi,Vt=Qe.width+je,Qt=Qe.height+je,ri=Vt*rt+Qt*ct+Dt,Vt=Vt*Lt+Qt*Gt+Zt,Qt=Math.min(Ve,ri),fi=Math.min(yn,Vt),li=Math.max(Ve+li,ri)-Qt,Vn=Math.max(yn+Vn,Vt)-fi,Ve=Qt,yn=fi,Vt=0,Qt=Qe.height+je,ri=Vt*rt+Qt*ct+Dt,Vt=Vt*Lt+Qt*Gt+Zt,Qt=Math.min(Ve,ri),fi=Math.min(yn,Vt),li=Math.max(Ve+li,ri)-Qt,Vn=Math.max(yn+Vn,Vt)-fi,Ve=Qt,yn=fi,je=y.viewportBounds,Qe=je.x,rt=je.y,Ve=!(Ve>je.width+Qe||Qe>li+Ve||yn>je.height+rt||rt>Vn+yn)}if(Ve){if(Ve=(this.l&256)!==0,a.clipInsteadOfFill&&(Ve=!1),this instanceof Mo&&(a.font=this.font),Ve){if(yn=ae.se()?ae.naturalBounds:ae.actualBounds,li=Math.max(ne.x,yn.x),Vn=Math.max(ne.y,yn.y),je=Math.min(ne.right,yn.right)-li,Qe=Math.min(ne.bottom,yn.bottom)-Vn,rt=this.tb,rt!==null&&(li=rt.x,Vn=rt.y,je=rt.width,Qe=rt.height),li>ne.width+ne.x||ne.x>yn.width+yn.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(li,Vn,je,Qe),a.clip()}if(Te){if(!_e.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}fe&&(yn=_e.shadowOffset,a.Ev(yn.x*y.scale*this.scale*y.Mb,yn.y*y.scale*this.scale*y.Mb,_e.shadowBlur),lh(a),a.shadowColor=_e.shadowColor)}fe&&this.shadowVisible===!0?lh(a):fe&&this.shadowVisible===!1&&Uc(a),_e=this.naturalBounds,this.areaBackground!==null&&(a.yc(),nu(this,a,_e,ne)),a.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),fe&&va(this,ae)&&this.shadowVisible===null&&Uc(a),this.Ma!==null&&(a.yc(),Ml(this,a,_e,ne)),fe&&(this.Ma!==null||this.areaBackground!==null||va(this,ae))?(Vu(this,!0),this.shadowVisible===null&&Uc(a)):Vu(this,!1),this.hh(a,y),fe&&this.l&512&&lh(a),Te&&fe&&Uc(a),Ve&&(a.restore(),a.Vc(this instanceof Wn)),te.ws()||(y=1/(te.m11*te.m22-te.m12*te.m21),a.transform(te.m22*y,-te.m12*y,-te.m21*y,te.m11*y,y*(te.m21*te.dy-te.m22*te.dx),y*(te.m12*te.dx-te.m11*te.dy)))}}x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E)}}};function va(a,y){return y===null?!1:(Oh(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Wn.Auto||y.type===Wn.Spot)&&y.Pb()!==a)}it.Dv=function(){};function nu(a,y,x,b){ws(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof fo&&a.areaBackground.type===yu?(y.beginPath(),y.rect(b.x,b.y,b.width,b.height),y.ng(a.areaBackground)):y.fillRect(b.x,b.y,b.width,b.height)}function Ml(a,y,x,b){var E=a.kq(),te=x.x,ne=x.y,ae=x.width+E,fe=x.height+E;ws(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof fo&&a.Ma.type===yu?(y.beginPath(),y.rect(te-E/2,ne-E/2,ae,fe),y.ng(a.Ma)):y.fillRect(te-E/2,ne-E/2,ae,fe)}function ja(a,y,x){for(var b=y.O.s,E=b.length,te=-1,ne=0;ne<E;ne++)if(b[ne]===a){te=ne;break}if(a=te,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===Wn.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 gu(a,y,x){if(!(y instanceof Hl))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 b=a.panel,E=a.nk(y);if(a.kk(y,x,E))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):b&&ja(a,b,a.svg),!0);if(a.Dd()&&a.isShadowed){var te=a.shadowOffset;y.Ev(te.x*x.scale*a.scale*x.Mb,te.y*x.scale*a.scale*x.Mb,a.shadowBlur),lh(y),y.shadowColor=a.shadowColor}a instanceof Mo&&(y.font=a.font),y.yd=null;var ne=a.transform;te=a instanceof Wn;var ae=a instanceof Wn?Oh(a):!1;a.l&4096&&Ca(a);var fe=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,E&&(y.o=!0,te&&ae?(ug(y,1,0,0,1,0,0),a.svg=y.ad):te?(ug(y,ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy),a.svg=y.ad):ug(y,1,0,0,1,0,0)),E=a.naturalBounds,a.areaBackground!==null){var _e=ne.copy().Vj();y.rb.ha=[_e.m11,_e.m12,_e.m21,_e.m22,_e.dx,_e.dy],nu(a,y,E,fe),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return te||(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),a.background!==null&&(te?(ae&&(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),Ml(a,y,E,fe),ae&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],Ml(a,y,E,fe)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),ne=y.yd,E=a.part,ae=!1,E&&x.Gf("drawShadows")&&(ae=E.isShadowed),y.clipInsteadOfFill&&(ae=!1),a.Dd()&&ae&&lh(y),ae&&a.shadowVisible===!0?lh(y):ae&&a.shadowVisible===!1&&Uc(y),E=a.panel,ae&&va(a,E)&&a.shadowVisible===null&&Uc(y),y.Il&&(_e=x.computePixelRatio(),_e="drop-shadow("+y.shadowOffsetX/_e+"px "+y.shadowOffsetY/_e+"px "+y.shadowBlur/_e/2+"px "+y.shadowColor+")",a.background!==null&&ne.Ma.setAttributeNS(null,"filter",_e),a.areaBackground!==null&&ne.gd.setAttributeNS(null,"filter",_e)),ae&&(a.Ma!==null||a.areaBackground!==null||va(a,E))?(Vu(a,!0),a.shadowVisible===null&&Uc(y)):Vu(a,!1),E=ae,a.hh(y,x),te&&y.nh.pop(),y.o&&y.nh.pop(),ne=y.Gv.hs,ae=te?a.svg:y.yd,_e=a.svg,!te&&_e!==null&&ae!==_e&&_e.parentNode===a.panel.svg?(a.svg.replaceWith(ae),a.svg=ae,ae!==null&&a.$o(y,b,fe,ae),pl(y,_e),!0):(a.svg=ae,ne!==null&&ae===null&&(pm(y),y.nh.pop()),ae===null||(a.$o(y,b,fe,ae),y.Il&&(x=x.computePixelRatio(),a.Dv(ae,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),E&&a.l&512&&lh(y),a.Dd()&&Uc(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&ae.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&ae.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(ae):y.Nj.prepend(ae),y.ti=ae):b!==null&&ja(a,b,ae),ne!==null&&ne(a,ae)),!0)}it.$o=function(a,y,x,b){var E=(this.l&256)!==0;if(a.clipInsteadOfFill&&(E=!1),E){var te=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,te.x),E=Math.max(x.y,te.y);var ne=Math.min(x.right,te.right)-y;x=Math.min(x.bottom,te.bottom)-E,te=this.tb,te!==null&&(y=te.x,E=te.y,ne=te.width,x=te.height),te=b.getAttribute("clip-path");var ae=null;te!==null&&(ae=a.svg.getElementById(te.split("#")[1].slice(0,-1))),ae===null?(te="CLIP"+bo++,ae=a.Ud("clipPath",{id:te}),y=a.Ud("rect",{x:y,y:E,width:ne,height:x}),this instanceof Wn&&(E=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")),ae.appendChild(y),a.svg.appendChild(ae),b.setAttributeNS(null,"clip-path","url(#"+te+")")):(a=ae.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",E.toString()),a.setAttribute("width",ne.toString()),a.setAttribute("height",x.toString()))}else b.removeAttributeNS(null,"clip-path"),pl(a,b)};function pl(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function za(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Or(y);for(var b=y.next();!b.done;b=y.next())b=x.getElementById(b.value.split("#")[1].slice(0,-1)),b!==null&&b.remove()}a.svg.remove()}}it.hh=function(){},it.lv=function(){this.Uc=!0},it.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 b=this.transform,E=this instanceof Wn?Oh(this):!1;if(!(this instanceof Wn&&E))if(this instanceof vl){var te=this.bt;a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy],te!==null&&Xy(a,te[0],te[1],te[2],te[3],te[4],te[5],te[6],te[7]),x?y.lastElementChild.setAttributeNS(null,"transform",Jy(a)):y.setAttributeNS(null,"transform",Jy(a))}else if(!x||this instanceof Wn)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof dr){te=y.getElementsByTagName("path");for(var ne=0;ne<te.length;ne++)te[ne].setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")")}else y.lastElementChild.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");return te=this.Dd()?this.opacity*a.globalAlpha:this.opacity,te===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",te.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(te=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(ne=b.copy().Vj(),a.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],nu(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),te&&gm(a,te)),(this.background!==null||y.Ma!==void 0)&&(te=y.Ma,this.background===null?(gm(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((E||x&&!(this instanceof Wn))&&(a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy]),Ml(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),te&&gm(a,te)),this.$o(a,this.panel,this.actualBounds,y),!0},it.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 ws(a,y,x,b,E,te,ne){if(x!==null){var ae=1,fe=1;if(typeof x=="string")b?y.fillStyle=x:y.strokeStyle=x;else if(x.type===Nh)b?y.fillStyle=x.color:y.strokeStyle=x.color;else{var _e=a.kq();if(ae=te.width,fe=te.height,E?(ae=ne.width,fe=ne.height):b||(ae+=_e,fe+=_e),(te=y instanceof Qd)&&x.xe&&(x.type===dp||x.yk===ae&&x.ft===fe))var Te=x.xe;else{var je=0,Ve=0,Qe=0,rt=0,ct=0,Dt=0;if(Dt=ct=0,E?(ct=ne.x,Dt=ne.y):b||(ct-=_e/2,Dt-=_e/2),je=x.start.x*ae+x.start.offsetX,Ve=x.start.y*fe+x.start.offsetY,Qe=x.end.x*ae+x.end.offsetX,rt=x.end.y*fe+x.end.offsetY,je+=ct,Qe+=ct,Ve+=Dt,rt+=Dt,x.type===ch)Te=y.createLinearGradient(je,Ve,Qe,rt);else if(x.type===yu)Dt=isNaN(x.endRadius)?Math.max(ae,fe)/2:x.endRadius,isNaN(x.startRadius)?(ct=0,Dt=Math.max(ae,fe)/2):ct=x.startRadius,Te=y.createRadialGradient(je,Ve,ct,Qe,rt,Dt);else if(x.type===dp)try{Te=y.createPattern(x.pattern,"repeat")}catch(Gt){Te=null}if(x.type!==dp&&(E=x.colorStops,E!==null))for(E=E.iterator;E.next();)Te.addColorStop(E.key,E.value);if(te&&(x.xe=Te,Te!==null&&(x.yk=ae,x.ft=fe),Te===null&&x.type===dp&&x.yk!==-1)){x.yk=-1;var Lt=a.diagram;Lt!==null&&x.yk===-1&&mn(function(){Lt.redraw()},600)}}b?y.fillStyle=Te:y.strokeStyle=Te}}}it.rg=function(a){if(a instanceof Wn)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},it.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},it.If=function(){for(var a=this instanceof Wn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Ca(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Iu(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)}Iu(a,!1),mu(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,mu(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,mu(a,!1)))}it.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=Mt.alloc();te.yi(y,x,b,E,jr),a.rotate(this.Kb,te.x,te.y),Mt.free(te)}},it.v=function(a){if(!iu(this)){a===void 0&&(a=!1),ea(this,!0),Hc(this,!0);var y=this.panel;y===null||a||y.v()}},it.Uj=function(){iu(this)||(ea(this,!0),Hc(this,!0))};function tl(a){if(!nl(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof oi&&a.Bd(),y.$b())),Hc(a,!0)}}it.Uk=function(){!(this.l&2048)&&(Iu(this,!0),mu(this,!0))},it.Wu=function(){mu(this,!0)},it.N=function(){var a=this.part;a!==null&&a.N()};function gl(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===Wn.Table?lc(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===Wn.Auto&&b.Pb()===a?ya(a,Gn,y):x===nr?b!==null?b.type===Wn.Spot&&b.Pb()===a?ya(a,Gn,y):(x=b.defaultStretch,x===nr?ya(a,jn,y):ya(a,x,y)):ya(a,jn,y):ya(a,x,y)}function lc(a,y,x,b){var E=a.stretch;if(E!==nr)return ya(a,E,b);var te=E=null;switch(y.stretch){case Bi:te=!0;break;case Gn:te=!0}switch(x.stretch){case _i:E=!0;break;case Gn:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===_i||y===Gn),te===null&&(te=y===Bi||y===Gn),E===!0&&te===!0?ya(a,Gn,b):E===!0?ya(a,_i,b):te===!0?ya(a,Bi,b):ya(a,jn,b)}function ya(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===_i)return jn;if(y===Gn)return Bi}else{if(y===Bi)return jn;if(y===Gn)return _i}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Bi)return jn;if(y===Gn)return _i}else{if(y===_i)return jn;if(y===Gn)return Bi}return y}function Vu(a,y){a.l=y?a.l|512:a.l&-513}function Ta(a){return(a.l&1024)!==0}function Ef(a,y){a.l=y?a.l|1024:a.l&-1025}function Iu(a,y){a.l=y?a.l|2048:a.l&-2049}function mu(a,y){a.l=y?a.l|4096:a.l&-4097}function iu(a){return(a.l&8192)!==0}function ea(a,y){a.l=y?a.l|8192:a.l&-8193}function nl(a){return(a.l&16384)!==0}function Hc(a,y){a.l=y?a.l|16384:a.l&-16385}it.Gj=function(){this.svg=null},it.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},it.Av=function(){},it.zv=function(a){return this.pa=a,tl(this),!0},it.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},it.kq=function(){return 0};function Xd(a){var y=a.part;if(y instanceof oi&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||W1(y,a)}}function $y(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof Wn?a instanceof oi?a.Bd():a.qm(a,function(x){Xd(x)}):Xd(a))}it.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new Hs(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&f1(a)&&Nt("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new Bn),this.localBindings.add(E),this},it.set=function(a){return Object.assign(this,a),this},it.Du=function(a){return iv(this,a),this},it.apply=function(a){return a(this),this},it.nm=function(a){return fu(this,a),this},it.pz=function(){return this.ih()},it.ih=function(){for(var a=this instanceof Wn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},it.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new ci),this.animationTriggers.add(a.propertyName,a),this};function vu(a,y){for(var x=1;x<arguments.length;++x);x=arguments;var b=null,E=null;if(typeof a=="function")E=a;else if(typeof a=="string"){var te=sp.I(a);typeof te=="function"?(x=Nn(arguments),b=te(x),nn(b)||Nt('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=_t.go[a]}if(b===null&&(E!=null&&E.constructor||Nt("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),b=new E),E=1,b instanceof vn&&1<x.length){te=b;var ne=x[1];(typeof ne=="string"||ne instanceof HTMLDivElement)&&(Rd(te,ne),E++)}for(;E<x.length;E++)te=x[E],te===void 0?Nt("Undefined value at argument "+E+" for object being constructed by GraphObject.make: "+b):iv(b,te);return b}function iv(a,y){if(typeof y=="string")if(a instanceof Mo)a.text=y;else if(a instanceof dr)a.figure=y;else if(a instanceof vl)a.source=y;else if(a instanceof Wn)y=$u.I(y),y!==null&&(a.type=y);else if(a instanceof fo){var x=Jn(fo,y);x!==null?a.type=x:Nt("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof Yn?(y=Jn(Yn,y),y!==null&&(a.type=y)):a instanceof $r&&(y=Jn($r,y),y!==null&&(a.type=y));else if(y instanceof tn)a instanceof Wn||Nt("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof ta){var b;y.isRow&&typeof a.getRowDefinition=="function"?b=a.getRowDefinition(y.index):y.isRow||typeof a.getColumnDefinition!="function"||(b=a.getColumnDefinition(y.index)),b instanceof ta?Am(b,y):Nt("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof Ln)typeof a.qb=="function"&&a.qb(y);else if(y instanceof sa)a.type=y;else if(y instanceof Hs)a instanceof tn||a instanceof ta?a.bind(y):Nt("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof zl)a instanceof tn?a.Jv(y):Nt("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Vs)a instanceof Yn&&a.type===Yn.o?a.figures.add(y):Nt("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof $r)a instanceof Vs?a.segments.add(y):Nt("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof es)a instanceof vn||a instanceof tr?a.layout=y:Nt("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++)iv(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof fo){x=new Si;for(var E in y)b=parseFloat(E),isNaN(b)?x[E]=y[E]:a.addColorStop(b,y[E]);fu(a,x)}else if(a instanceof ta){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&Nt("Must specify non-negative integer row for RowColumnDefinition "+y+", not: "+E),a.isRow=!0,a.index=E):y.column!==void 0&&(E=y.column,(E==null||E===1/0||isNaN(E)||0>E)&&Nt("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new Si;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);fu(a,E)}else fu(a,y);else Nt('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function Ah(a,y){sp.add(a,y)}function fm(a,y,x){x===void 0&&(x=null);var b=a[1];if(typeof x=="function"?x(b):typeof b=="string")return a.splice(1,1),b;if(y===void 0)throw Error("no "+(typeof x=="function"?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return y}Ye.Object.defineProperties(tn.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new Lf),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 Lf),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 Lf),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(yr(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&&(yr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:ol},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new ud),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===ol&&(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 ud),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 ud),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:Gr},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new ud),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:nr},set:function(a){var y=this.stretch;y!==a&&(yr(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&&(yr(this),this.A.xa=a,this.part!==null&&(this.part.Rh=null),this.g("name",y,a))}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&Mn(a,"0 <= value <= 1",tn,"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(),$y(this))}},pickable:{get:function(){return(this.l&2)!==0},set:function(a){var y=(this.l&2)!==0;y!==a&&(this.l^=2,this.g("pickable",y,a))}},fromLinkableDuplicates:{get:function(){return(this.l&4)!==0},set:function(a){var y=(this.l&4)!==0;y!==a&&(this.l^=4,this.g("fromLinkableDuplicates",y,a))}},fromLinkableSelfNode:{get:function(){return(this.l&8)!==0},set:function(a){var y=(this.l&8)!==0;y!==a&&(this.l^=8,this.g("fromLinkableSelfNode",y,a))}},toLinkableDuplicates:{get:function(){return(this.l&16)!==0},set:function(a){var y=(this.l&16)!==0;y!==a&&(this.l^=16,this.g("toLinkableDuplicates",y,a))}},toLinkableSelfNode:{get:function(){return(this.l&32)!==0},set:function(a){var y=(this.l&32)!==0;y!==a&&(this.l^=32,this.g("toLinkableSelfNode",y,a))}},isPanelMain:{get:function(){return(this.l&64)!==0},set:function(a){var y=(this.l&64)!==0;y!==a&&(this.l^=64,this.v(),this.g("isPanelMain",y,a))}},isActionable:{get:function(){return(this.l&128)!==0},set:function(a){var y=(this.l&128)!==0;y!==a&&(this.l^=128,this.g("isActionable",y,a))}},areaBackground:{get:function(){return this.A!==null?this.A.gd:null},set:function(a){var y=this.areaBackground;y!==a&&(a!==null&&Tf(a,"GraphObject.areaBackground"),a instanceof fo&&a.freeze(),yr(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&&Tf(a,"GraphObject.background"),a instanceof fo&&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 Ti)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,b=this.pa,E=b.x;b=b.y,(E===y||isNaN(E)&&isNaN(y))&&(b===x||isNaN(b)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,E,b)&&this.g("position",new Mt(E,b),a))}},actualBounds:{get:function(){return this.Ib}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&(0>=a&&Nt("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ca=a,this.v(),this.g("scale",y,a))}},angle:{get:function(){return this.Kb},set:function(a){var y=this.Kb;y!==a&&(a%=360,0>a&&(a+=360),y!==a&&(this.Kb=a,$y(this),this.v(),this.g("angle",y,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var y=a.width,x=a.height,b=this.jd,E=b.width,te=b.height;(E===y||isNaN(E)&&isNaN(y))&&(te===x||isNaN(te)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof dr&&this.qc(),this.g("desiredSize",b,a),Ta(this)&&(a=this.part,a!==null&&(zo(this,a,"width"),zo(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 dr&&this.qc(),this.g("desiredSize",y,a),Ta(this)&&(a=this.part,a!==null&&zo(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 dr&&this.qc(),this.g("desiredSize",y,a),Ta(this)&&(a=this.part,a!==null&&zo(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:or},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(),yr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:as},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(),yr(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 Mi(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&&Ca(this),this.Ab}},oe:{get:function(){return this.l&4096&&Ca(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(yr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:jn},set:function(a){this.reshapingBehavior!==a&&(yr(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()&&Nt("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),tl(this),this.g("alignment",y,a))}},column:{get:function(){return this.Ag},set:function(a){a=Math.round(a);var y=this.Ag;y!==a&&(0>a&&Mn(a,">= 0",tn,"column"),this.Ag=a,this.v(),this.g("column",y,a),this.svg!==null&&this.svg.remove())}},columnSpan:{get:function(){return this.A!==null?this.A.ob:1},set:function(a){a=Math.round(a);var y=this.columnSpan;y!==a&&(1>a&&Mn(a,">= 1",tn,"columnSpan"),yr(this),this.A.ob=a,this.v(),this.g("columnSpan",y,a))}},row:{get:function(){return this.io},set:function(a){a=Math.round(a);var y=this.io;y!==a&&(0>a&&Mn(a,">= 0",tn,"row"),this.io=a,this.v(),this.g("row",y,a),this.svg!==null&&this.svg.remove())}},rowSpan:{get:function(){return this.A!==null?this.A.Bi:1},set:function(a){a=Math.round(a);var y=this.rowSpan;y!==a&&(1>a&&Mn(a,">= 1",tn,"rowSpan"),yr(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&&(yr(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 oi||Nt("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Gv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,V1(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:ms},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&&Mn(a,">= 0",tn,"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&&Mn(a,">= 0",tn,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:ms},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&&Mn(a,">= 0",tn,"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&&Mn(a,">= 0",tn,"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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),tn.prototype.trigger=tn.prototype.Jv,tn.prototype.findBindingPanel=tn.prototype.ih,tn.prototype.findTemplateBinder=tn.prototype.pz,tn.prototype.setProperties=tn.prototype.nm,tn.prototype.apply=tn.prototype.apply,tn.prototype.attach=tn.prototype.Du,tn.prototype.set=tn.prototype.set,tn.prototype.isEnabledObject=tn.prototype.If,tn.prototype.isVisibleObject=tn.prototype.Ed,tn.prototype.isContainedBy=tn.prototype.rg,tn.prototype.getNearestIntersectionPoint=tn.prototype.rs,tn.prototype.getLocalPoint=tn.prototype.qs,tn.prototype.getDocumentScale=tn.prototype.Df,tn.prototype.getDocumentAngle=tn.prototype.li,tn.prototype.getDocumentBounds=tn.prototype.mi,tn.prototype.getDocumentPoint=tn.prototype.ga,tn.prototype.intersectsRect=tn.prototype.Yc,tn.prototype.containedInRect=tn.prototype.fh,tn.prototype.containsRect=tn.prototype.Re,tn.prototype.containsPoint=tn.prototype.ca,tn.prototype.raiseChanged=tn.prototype.g,tn.prototype.raiseChangedEvent=tn.prototype.cb,tn.prototype.addCopyProperty=tn.prototype.Vw;var sp=null;tn.className="GraphObject",sp=new ci,Ah("Button",function(){function a(x,b){return x.diagram.ic(x.documentPoint,function(E){for(;E.panel!==null&&!E.isActionable;)E=E.panel;return E},function(E){return E===b})!==null}var y=vu(Wn,Wn.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof Wn){var E=x.fb("ButtonBorder");E!==null&&(E.fill=b?x._buttonFillNormal:x._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD",_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},vu(dr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new yi(0,0,2.76142374915397,2.761423749153969),spot2:new yi(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return y.mouseEnter=function(x,b){if(b.If()&&b instanceof Wn&&(x=b.fb("ButtonBorder"),x instanceof dr)){var E=b._buttonFillOver;b._buttonFillNormal=x.fill,x.fill=E,E=b._buttonStrokeOver,b._buttonStrokeNormal=x.stroke,x.stroke=E}},y.mouseLeave=function(x,b){b.If()&&b instanceof Wn&&(x=b.fb("ButtonBorder"),x instanceof dr&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof Wn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof dr){x=x.diagram;var te=x.skipsUndoManager;x.skipsUndoManager=!0;var ne=b._buttonFillPressed;b._buttonFillOver=E.fill,E.fill=ne,ne=b._buttonStrokePressed,b._buttonStrokeOver=E.stroke,E.stroke=ne,x.skipsUndoManager=te}}},y.actionUp=function(x,b){if(b.If()&&b instanceof Wn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof dr){var te=x.diagram,ne=te.skipsUndoManager;te.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),te.skipsUndoManager=ne}}},y.actionCancel=function(x,b){if(b.If()&&b instanceof Wn&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof dr){var te=x.diagram,ne=te.skipsUndoManager;te.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),te.skipsUndoManager=ne}}},y.actionMove=function(x,b){if(b.If()&&b instanceof Wn&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof dr))){var te=E.skipsUndoManager;E.skipsUndoManager=!0;var ne=b._buttonFillPressed;x.fill!==ne&&(x.fill=ne),ne=b._buttonStrokePressed,x.stroke!==ne&&(x.stroke=ne),E.skipsUndoManager=te}}},y}),Ah("TreeExpanderButton",function(){var a=vu("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},vu(dr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Bo},new Hs("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Hs("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof qr&&(x=x.adornedPart),x instanceof oi){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isTreeExpanded){if(!b.canCollapseTree(x))return}else if(!b.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?b.collapseTree(x):b.expandTree(x)}}},a}),Ah("SubGraphExpanderButton",function(){var a=vu("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},vu(dr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Bo},new Hs("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 qr&&(x=x.adornedPart),x instanceof tr){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isSubGraphExpanded){if(!b.canCollapseSubGraph(x))return}else if(!b.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?b.collapseSubGraph(x):b.expandSubGraph(x)}}},a}),Ah("ToolTip",function(){return vu(qr,Wn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Mt(0,3),shadowBlur:5},vu(dr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new yi(0,0,4,6),spot2:new yi(1,1,-4,-4)}))}),Ah("ContextMenu",function(){return vu(qr,Wn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Mt(0,3),shadowBlur:5},new Hs("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Ah("ContextMenuButton",function(){var a=vu("Button");a.stretch=_i;var y=a.fb("ButtonBorder");return y instanceof dr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new yi(0,0,2,3),y.spot2=new yi(1,1,-2,-2)),a}),Ah("PanelExpanderButton",function(a){var y=fm(a,"COLLAPSIBLE"),x=vu("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},vu(dr,{name:"ButtonIcon",strokeWidth:2},new Hs("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof dr&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(b,E){var te=E.diagram;if(te!==null&&!te.isReadOnly){var ne=E.ih();ne===null&&(ne=E.part),ne!==null&&(E=ne.fb(y),E!==null&&(b.handled=!0,te.Ea("Collapse/Expand Panel"),E.visible=!E.visible,te.eb("Collapse/Expand Panel")))}},x}),Ah("CheckBoxButton",function(a){var y=fm(a);return a=vu("Button",{desiredSize:new Qn(14,14)},vu(dr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Gn,geometryStretch:mi,visible:!1},y!==""?new Hs("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof Wn){var E=x.diagram;if(!(E===null||E.isReadOnly||y!==""&&E.model.isReadOnly)){x.handled=!0;var te=b.fb("ButtonIcon");E.Ea("checkbox"),te.visible=!te.visible,typeof b._doClick=="function"&&b._doClick(x,b),E.eb("checkbox")}}},a}),Ah("CheckBox",function(a){a=fm(a),a=vu("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Mi(0,1,0,0)});var y=vu(Wn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Mi(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}),tn.None=jn=new Ln(tn,"None",0),tn.Default=nr=new Ln(tn,"Default",0),tn.Vertical=Bi=new Ln(tn,"Vertical",4),tn.Horizontal=_i=new Ln(tn,"Horizontal",5),tn.Fill=Gn=new Ln(tn,"Fill",3),tn.Uniform=mi=new Ln(tn,"Uniform",1),tn.UniformToFill=Dr=new Ln(tn,"UniformToFill",2),tn.FlipVertical=Sr=new Ln(tn,"FlipVertical",1),tn.FlipHorizontal=Kr=new Ln(tn,"FlipHorizontal",2),tn.FlipBoth=wo=new Ln(tn,"FlipBoth",3),tn.make=vu,tn.getBuilders=function(){var a=new ci,y;for(y in sp)if(y!==y.toLowerCase()){var x=sp.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},tn.defineBuilder=Ah,tn.build=function(a,y,x){for(var b=[],E=2;E<arguments.length;++E)b[E-2]=arguments[E];if(E=sp.I(a),typeof E=="function"&&(b=E([a].concat(b)),b instanceof tn))return y&&b.set(y),b;Nt('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},tn.takeBuilderArgument=fm;function Lf(){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=or,this.o=as,this.hg=nr,this.ob=this.Bi=1,this.Pf=jn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}Lf.prototype.copy=function(){var a=new Lf;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 ud(){this.u=-1/0,this.o=0,this.F=Gr,this.rr=ol,this.j=this.V="None"}ud.prototype.copy=function(){var a=new ud;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},ud.className="LinkElementSettings";function lg(){this.yj=this.Xi=oo,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}lg.prototype.copy=function(){var a=new lg;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},lg.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 b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.ha[1]*a+this.ha[3]*b,te=this.ha[0]*-b+this.ha[2]*a,ne=this.ha[1]*-b+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*b,this.ha[1]=E,this.ha[2]=te,this.ha[3]=ne,this.translate(-y,-x)}},Jd.className="STransform";function Mf(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Mf.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Mf.className="SGradient";function Tc(a,y,x){this.ownerDocument=a=y===void 0?_t.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 Hl(this,x)}Tc.prototype.resize=function(a,y,x,b){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=b+"px",this.Oa.setAttributeNS(null,"width",x+"px"),this.Oa.setAttributeNS(null,"height",b+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+x+" "+b),this.context.ww.firstElementChild.setAttributeNS(null,"width",x+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",b+"px"),!0):!1},Tc.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),nn(y))for(var b in y)a.setAttributeNS(b==="href"?"http://www.w3.org/1999/xlink":"",b,y[b]);return x!==void 0&&(a.textContent=x),a},Tc.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Tc.prototype.focus=function(){this.Oa.focus()},Tc.prototype.mx=function(){this.ownerDocument=null},Ye.Object.defineProperties(Tc.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}}}),Tc.className="SVGSurface";function Hl(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=pm(this),this.Nj=pm(this,"gojs-diagram"),this.Hl=this.ti=null;var x=bo++,b=this.Ud("clipPath",{id:"mainClip"+x});b.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=b,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(b),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function Yy(a,y,x,b,E,te,ne){a.Nj===void 0?ug(a,y,x,b,E,te,ne):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+b+", "+E+", "+te+", "+ne+")")}it=Hl.prototype,it.arc=function(a,y,x,b,E,te,ne,ae){var fe=2*Math.PI,_e=fe-1e-6,Te=x*Math.cos(b),je=x*Math.sin(b),Ve=a+Te,Qe=y+je,rt=te?0:1;b=te?b-E:E-b,(1e-6<Math.abs(ne-Ve)||1e-6<Math.abs(ae-Qe))&&this.path.push(["L",Ve,+Qe]),0>b&&(b=b%fe+fe),b>_e?(this.path.push(["A",x,x,0,1,rt,a-Te,y-je]),this.path.push(["A",x,x,0,1,rt,Ve,Qe])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),rt,a+x*Math.cos(E),y+x*Math.sin(E)])},it.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},it.Se=function(a){this.addPath(this.path,this.rb,a||0)},it.bezierCurveTo=function(a,y,x,b,E,te){this.path.push(["C",a,y,x,b,E,te])},it.clearRect=function(){},it.clip=function(){this.Yl.clipPath=!0},it.closePath=function(){this.path.push(["z"])},it.createLinearGradient=function(a,y,x,b){var E=new Mf("linear");return E.x1=a,E.y1=y,E.x2=x,E.y2=b,E},it.createPattern=function(a){var y="";a instanceof HTMLCanvasElement&&(y=a.toDataURL()),a instanceof HTMLImageElement&&(y=a.getAttribute("src"));var x=this.eA;if(x[y])return"url(#"+x[y]+")";var b="PATTERN"+bo++,E={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:b,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud($d,E)),this.svg.appendChild(a),x[y]=b,"url(#"+b+")"},it.createRadialGradient=function(a,y,x,b,E,te){var ne=new Mf("radial");return ne.x1=a,ne.y1=y,ne.r1=x,ne.x2=b,ne.y2=E,ne.r2=te,ne};function Xy(a,y,x,b,E,te,ne,ae,fe){b=ae/b,E=fe/E,te===0&&ne===0||a.rb.translate(te,ne),b===1&&E===1||a.rb.scale(b,E),y===0&&x===0||a.rb.translate(-y,-x)}it.drawImage=function(a,y,x,b,E,te,ne,ae,fe){var _e="";a instanceof HTMLCanvasElement&&(_e=a.toDataURL()),a instanceof HTMLImageElement&&(_e=a.getAttribute("src"));var Te=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,b===void 0&&(te=y,ne=x,ae=b=Te,fe=E=a),b=b||0,E=E||0,ae=ae||0,fe=fe||0,Xy(this,y,x,b,E,te||0,ne||0,ae,fe),te={x:0,y:0,width:Te||b,height:a||E,href:_e},rn.$(b,ae)&&rn.$(E,fe)?_e.toLowerCase().indexOf(".svg")===-1&&_e.toLowerCase().indexOf("data:image/svg")===-1&&(te.preserveAspectRatio="xMidYMid slice"):te.preserveAspectRatio="none",(y!==0||x!==0||b!==Te||E!==a)&&(b+=y,E+=x,te["clip-path"]="path('M "+y+","+x+" L "+b+" "+x+" L "+b+" "+E+" L "+y+" "+E+" z')"),ap(this,$d,te,this.rb),this.addElement($d,te)},it.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),rv(this,this.Yl)},it.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},it.fillRect=function(a,y,x,b){a=[a,y,x,b],a={x:a[0],y:a[1],width:a[2],height:a[3]},ap(this,"fill",a,this.rb),this.addElement("rect",a)},it.ox=function(a,y,x,b){a={x:a,y,width:x,height:b},ap(this,"fill",a,this.rb),rv(this,a),this.svg.prepend(this.Ud("rect",a))},it.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},ap(this,"fill",y,this.rb),this.addElement("text",y,a[0])},it.lineTo=function(a,y){this.path.push(["L",a,y])},it.moveTo=function(a,y){this.path.push(["M",a,y])},it.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},it.rect=function(a,y,x,b){this.path.push(["M",a,y],["L",a+x,y],["L",a+x,y+b],["L",a,y+b],["z"])},it.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},it.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())},it.setTransform=function(a,y,x,b,E,te){a===1&&y===0&&x===0&&b===1&&E===0&&te===0||ug(this,a,y,x,b,E,te)};function Jy(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}it.scale=function(a,y){this.rb.scale(a,y)},it.translate=function(a,y){this.rb.translate(a,y)},it.transform=function(){},it.yc=function(){},it.stroke=function(){qy(this,this.Yl)},it.jk=function(){this.clipInsteadOfFill||this.stroke()},it.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},it.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 ap(a,y,x,b){y==="fill"?rv(a,x):y==="stroke"&&qy(a,x),b!==null&&(a=b.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function rv(a,y){a.fillStyle instanceof Mf?y.fill=ov(a,a.fillStyle,!0):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.fill="rgb("+a[1]+","+a[2]+","+a[3]+")",y["fill-opacity"]=a[4]):y.fill=a.fillStyle}function Qy(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof Mf?y.setAttributeNS(null,"fill",ov(a,a.fillStyle,!0)):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.setAttributeNS(null,x,"rgb("+a[1]+","+a[2]+","+a[3]+")"),y.setAttributeNS(null,x+"-opacity",a[4])):y.setAttributeNS(null,x,a.fillStyle)}function qy(a,y){if(a.strokeStyle instanceof Mf)y.stroke=ov(a,a.strokeStyle,!1);else if(/^rgba\(/.test(a.strokeStyle)){var x=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.strokeStyle);y.stroke="rgb("+x[1]+","+x[2]+","+x[3]+")",y["stroke-opacity"]=x[4]}else y.stroke=a.strokeStyle;y["stroke-width"]=a.lineWidth,y["stroke-linecap"]=a.lineCap,y["stroke-linejoin"]=a.lineJoin,y["stroke-miterlimit"]=a.miterLimit,a.Ct&&(y["stroke-dasharray"]=a.Yg.toString(),y["stroke-dashoffset"]=a.uj)}function ov(a,y,x){var b="";if(b=a.Hl!==null?a.Hl.getAttribute(x?"fill":"stroke"):null,b!==null&&b.indexOf("GRAD")!==-1?(b=b.split("#")[1].slice(0,-1),x=a.svg.getElementById(b),x!==null&&x.remove()):b="GRAD"+bo++,y.type==="linear")x=a.Ud("linearGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,id:b,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:b});else throw Error("invalid gradient");var E=y.gx;y=E.length;for(var te=[],ne=0;ne<y;ne++){var ae=E[ne],fe=ae.color;ae={offset:ae.offset,"stop-color":fe},/^rgba\(/.test(fe)&&(fe=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(fe),ae["stop-color"]="rgb("+fe[1]+","+fe[2]+","+fe[3]+")",ae["stop-opacity"]=fe[4]),te.push(ae)}for(te.sort(function(_e,Te){return _e.offset>Te.offset?1:-1}),E=0;E<y;E++)x.appendChild(a.Ud("stop",te[E]));return a.svg.appendChild(x),"url(#"+b+")"}it.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var te=Nn(a[E]),ne=[te.shift()];if(ne[0]==="A")ne.push(te.shift()+","+te.shift(),te.shift(),te.shift()+","+te.shift(),te.shift()+","+te.shift());else for(;te.length;)ne.push(te.shift()+","+te.shift());b.push(ne.join(" "))}if(b=b.join(" "),a=this.Yl,a.clipPath)0<this.nh.length&&this.nh[this.nh.length-1].setAttributeNS(null,"clip-path",'path("'+b+'")');else if(a.d=b,ap(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var ae in a)ae!=="transform"&&y.setAttributeNS(null,ae,a[ae]);else{ae=y.getElementsByTagName("path");for(var fe in a)fe!=="transform"&&ae[x].setAttributeNS(null,fe,a[fe])}else this.addElement("path",a)};function ug(a,y,x,b,E,te,ne){var ae=new Jd;ae.ha=[y,x,b,E,te,ne],y={},ap(a,"g",y,ae),ae=a.addElement("g",y),a.nh.push(ae)}function pm(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}it.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Uc(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function lh(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}it.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},it.fs=function(){this.Ct=!1},it.Vc=function(){},it.Wx=function(){},Hl.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Hl.prototype.getImageData=function(){return null},Hl.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()))}Hl.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Hl.className="SVGContext",vn.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Tc(this,_t.document));var y=new Tc(this,_t.document,!0);a===void 0&&(a=new Si);var x=this;return wf(this,function(b,E){return b=um(x,b,"SVG",y),b=b!==null?b.svg:null,typeof E=="function"?(E(b),null):b},a)},vn.prototype.makeSvg=vn.prototype.Cs,vn.prototype.av=function(a){return this.Cs(a)},vn.prototype.makeSVG=vn.prototype.av;function Du(a,y,x,b){this.ownerDocument=y=y===void 0?_t.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Qd(y,x,b),y.H=a}Du.prototype.resize=function(a,y,x,b){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=b+"px",!0):!1},Du.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},Du.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Du.prototype.focus=function(){this.Oa.focus()},Du.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},Ye.Object.defineProperties(Du.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}}}),Du.className="CanvasSurface";function Qd(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&Nt("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 gr,this.isTemporary=!!x}it=Qd.prototype,it.Wx=function(a){this.Z.imageSmoothingEnabled=a},it.arc=function(a,y,x,b,E,te){this.Z.arc(a,y,x,b,E,te)},it.beginPath=function(){this.Z.beginPath()},it.Se=function(){},it.bezierCurveTo=function(a,y,x,b,E,te){this.Z.bezierCurveTo(a,y,x,b,E,te)},it.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},it.clip=function(){this.Z.clip()},it.closePath=function(){this.Z.closePath()},it.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},it.createPattern=function(a,y){return this.Z.createPattern(a,y)},it.createRadialGradient=function(a,y,x,b,E,te){return this.Z.createRadialGradient(a,y,x,b,E,te)},it.drawImage=function(a,y,x,b,E,te,ne,ae,fe){b===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,b,E,te,ne,ae,fe)},it.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},it.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},it.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},it.fillText=function(a,y,x){this.Z.fillText(a,y,x)},it.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},it.lineTo=function(a,y){this.Z.lineTo(a,y)},it.measureText=function(a){return this.Z.measureText(a)},it.moveTo=function(a,y){this.Z.moveTo(a,y)},it.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},it.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},it.restore=function(){this.Z.restore()},it.save=function(){this.yc(),this.Z.save()},Qd.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},it=Qd.prototype,it.setTransform=function(a,y,x,b,E,te){this.El.setTransform(a,y,x,b,E,te)},it.scale=function(a,y){this.El.scale(a,y)},it.translate=function(a,y){this.El.translate(a,y)},it.stroke=function(){this.Z.stroke()},it.transform=function(a,y,x,b,E,te){if(a!==1||y!==0||x!==0||b!==1||E!==0||te!==0){var ne=this.El,ae=ne.m11*a+ne.m21*y;a=ne.m12*a+ne.m22*y,y=ne.m11*x+ne.m21*b,x=ne.m12*x+ne.m22*b,ne.dx=ne.m11*E+ne.m21*te+ne.dx,ne.dy=ne.m12*E+ne.m22*te+ne.dy,ne.m11=ae,ne.m12=a,ne.m21=y,ne.m22=x}},it.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},it.ng=function(a,y){if(a instanceof fo&&a.type===yu){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)},it.jk=function(){this.Hm||this.stroke()},it.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},it.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},it.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vx),a.lineDashOffset=0)},it.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},it.Hs=function(){},Ye.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 vx=Object.freeze([]);Qd.className="CanvasSurfaceContext";function cg(){this.F=this.o=this.u=this.j=0}cg.className="ColorNumbers";function fo(a,y){hp||(hv(),hp=!0),pr(this),this._isFrozen=!1,a===void 0?(this.na=Nh,this.xk="black"):typeof a=="string"?(this.na=Nh,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===ch?(this.Qd=qa,this.Lk=Ga):this.Lk=a===yu?this.Qd=jr:this.Qd=ms,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}fo.prototype.copy=function(){var a=new fo;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},it=fo.prototype,it.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},it.ka=function(){return Object.isFrozen(this)&&Nt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},it.qb=function(a){a.classType===fo&&(this.type=a)},it.toString=function(){var a="Brush(";if(this.type===Nh)a+=this.color;else if(a=this.type===ch?a+"Linear ":this.type===yu?a+"Radial ":this.type===dp?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+")"},it.addColorStop=function(a,y){return this._isFrozen&&un(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Mn(a,"0 <= loc <= 1",fo,"addColorStop:loc"),this.we===null&&(this.we=new ci),this.we.add(a,y),this.na===Nh&&(this.type=ch),this.xe=null,this},it.Vz=function(a,y){if(this._isFrozen&&un(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?fp:y,this.type===Nh)uh(this.color),this.color=up(a,y);else if((this.type===ch||this.type===yu)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)uh(x.value),this.addColorStop(x.key,up(a,y));return this};function e1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?fp:x,uh(a),up(y,x)}it.Wy=function(a,y){if(this._isFrozen&&un(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?fp:y,this.type===Nh)uh(this.color),this.color=up(-a,y);else if((this.type===ch||this.type===yu)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)uh(x.value),this.addColorStop(x.key,up(-a,y));return this};function t1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?fp:x,uh(a),up(-y,x)}function sv(a,y,x){uh(a),a=Oo.j;var b=Oo.u,E=Oo.o,te=Oo.F;return uh(y),x===void 0&&(x=.5),"rgba("+Math.round((Oo.j-a)*x+a)+", "+Math.round((Oo.u-b)*x+b)+", "+Math.round((Oo.o-E)*x+E)+", "+Math.round((Oo.F-te)*x+te)+")"}it.Gx=function(){if(this.type===Nh)return lp(this.color);if((this.type===ch||this.type===yu)&&this.colorStops!==null){var a=this.colorStops;if(this.type===yu)return lp(a.first().value);if(a.get(.5)!==null)return lp(a.get(.5));if(a.count===2)return a=a.Fa(),lp(sv(a[0].value,a[1].value));for(var y=a.iterator,x=-1,b=-1,E=1,te=1;y.next();){var ne=y.key,ae=Math.abs(.5-y.key);E>te&&ae<E?(x=ne,E=ae):te>=E&&ae<te&&(b=ne,te=ae)}return x>b&&(te=x,x=b,b=te,te=E),E=b-x,lp(sv(a.get(x),a.get(b),1-te/E))}return!1};function lp(a){return a?a instanceof fo?a.Gx():(uh(a),128>(299*Oo.j+587*Oo.u+114*Oo.o)/1e3):!1}function up(a,y){switch(y){case fp:y=100*lv(Oo.j);var x=100*lv(Oo.u),b=100*lv(Oo.o);return il.j=.4124564*y+.3575761*x+.1804375*b,il.u=.2126729*y+.7151522*x+.072175*b,il.o=.0193339*y+.119192*x+.9503041*b,il.F=Oo.F,y=cv(il.j/cp[0]),x=cv(il.u/cp[1]),b=cv(il.o/cp[2]),Gc.j=116*x-16,Gc.u=500*(y-x),Gc.o=200*(x-b),Gc.F=il.F,Gc.j=Math.min(100,Math.max(0,Gc.j+100*a)),a=(Gc.j+16)/116,y=a-Gc.o/200,il.j=cp[0]*n1(Gc.u/500+a),il.u=cp[1]*(Gc.j>mm*dv?Math.pow(a,3):Gc.j/mm),il.o=cp[2]*n1(y),il.F=Gc.F,a=-.969266*il.j+1.8760108*il.u+.041556*il.o,y=.0556434*il.j+-.2040259*il.u+1.0572252*il.o,Oo.j=255*uv((3.2404542*il.j+-1.5371385*il.u+-.4985314*il.o)/100),Oo.u=255*uv(a/100),Oo.o=255*uv(y/100),Oo.F=il.F,Oo.j=Math.round(Oo.j),255<Oo.j?Oo.j=255:0>Oo.j&&(Oo.j=0),Oo.u=Math.round(Oo.u),255<Oo.u?Oo.u=255:0>Oo.u&&(Oo.u=0),Oo.o=Math.round(Oo.o),255<Oo.o?Oo.o=255:0>Oo.o&&(Oo.o=0),"rgba("+Oo.j+", "+Oo.u+", "+Oo.o+", "+Oo.F+")";case i1:return av(),ru.o=Math.min(100,Math.max(0,ru.o+100*a)),"hsla("+ru.j+", "+ru.u+"%, "+ru.o+"%, "+ru.F+")";default:Nt("Unknown color space: "+y)}}function uh(a){hp||(hv(),hp=!0);var y=fv;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,Oo.j=a[0],Oo.u=a[1],Oo.o=a[2],Oo.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Oo.j=0,Oo.u=0,Oo.o=0,Oo.F=1)}}function av(){var a=Oo.j/255,y=Oo.u/255,x=Oo.o/255,b=Math.max(a,y,x),E=Math.min(a,y,x),te=b-E;if(E=(b+E)/2,te===0)var ne=a=0;else{switch(b){case a:ne=(y-x)/te%6;break;case y:ne=(x-a)/te+2;break;case x:ne=(a-y)/te+4}ne*=60,0>ne&&(ne+=360),a=te/(1-Math.abs(2*E-1))}ru.j=Math.round(ne),ru.u=Math.round(100*a),ru.o=Math.round(100*E),ru.F=Oo.F}function lv(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function uv(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function cv(a){return a>dv?Math.pow(a,1/3):(mm*a+16)/116}function n1(a){var y=a*a*a;return y>dv?y:(116*a-16)/mm}function Tf(a,y){typeof a!="string"&&(a instanceof fo||Nt("Value for "+y+" must be a color string or a Brush, not "+a))}function hv(){fv=ys?new Du(null,void 0,{willReadFrequently:!0}).context:null}Ye.Object.defineProperties(fo.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&un(this,a),this.na=a,this.start.Mc()&&(a===ch?this.start=qa:a===yu&&(this.start=jr)),this.end.Mc()&&(a===ch?this.end=Ga:a===yu&&(this.end=jr)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&un(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&un(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&un(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&un(this,a),0>a&&Mn(a,">= zero",fo,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&un(this,a),0>a&&Mn(a,">= zero",fo,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&un(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&un(this,a),this.cr=a,this.xe=null}}}),fo.prototype.isDark=fo.prototype.Gx,fo.prototype.darkenBy=fo.prototype.Wy,fo.prototype.lightenBy=fo.prototype.Vz,fo.prototype.addColorStop=fo.prototype.addColorStop;var dv=216/24389,mm=24389/27,cp=[95.047,100,108.883],fv=null,Oo=new cg,ru=new cg,il=new cg,Gc=new cg,hp=!1;fo.className="Brush";var Nh;fo.Solid=Nh=new Ln(fo,"Solid",0);var ch;fo.Linear=ch=new Ln(fo,"Linear",1);var yu;fo.Radial=yu=new Ln(fo,"Radial",2);var dp;fo.Pattern=dp=new Ln(fo,"Pattern",4);var fp;fo.Lab=fp=new Ln(fo,"Lab",5);var i1;fo.HSL=i1=new Ln(fo,"HSL",6),fo.randomColor=function(a,y){a===void 0&&(a=128),y===void 0&&(y=Math.max(a,255));var x=Math.abs(y-a);y=Math.floor(a+Math.random()*x).toString(16);var b=Math.floor(a+Math.random()*x).toString(16);return a=Math.floor(a+Math.random()*x).toString(16),2>y.length&&(y="0"+y),2>b.length&&(b="0"+b),2>a.length&&(a="0"+a),"#"+y+b+a},fo.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;hp||(hv(),hp=!0);var y=fv;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)},fo.lighten=function(a){return e1(a)},fo.lightenBy=e1,fo.darken=function(a){return t1(a)},fo.darkenBy=t1,fo.mix=sv,fo.isDark=lp;function sa(){this.xa="Base"}sa.prototype.measure=function(){},sa.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},sa.prototype.arrange=function(){},sa.prototype.Ly=function(a,y,x,b,E,te){a.arrange(y,x,b,E,te)},sa.prototype.iA=function(a){a.Uj()},sa.prototype.gc=function(){},Ye.Object.defineProperties(sa.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Wn}}}),sa.prototype.remeasureObject=sa.prototype.iA,sa.prototype.arrangeElement=sa.prototype.Ly,sa.prototype.measureElement=sa.prototype.Yz,sa.className="PanelLayout";function vm(){this.xa="Base"}qe(vm,sa),vm.prototype.measure=function(a,y,x,b,E,te,ne){var ae=b.length;a=hh(a);for(var fe=0;fe<ae;fe++){var _e=b[fe];if(_e.visible||_e===a){var Te=_e.margin,je=Te.right+Te.left;Te=Te.top+Te.bottom,_e.measure(y,x,te,ne);var Ve=_e.measuredBounds;je=Math.max(Ve.width+je,0),Te=Math.max(Ve.height+Te,0),Ve=_e.position.x;var Qe=_e.position.y;isFinite(Ve)||(Ve=0),isFinite(Qe)||(Qe=0),_e instanceof dr&&_e.isGeometryPositioned&&(_e=_e.strokeWidth/2,Ve-=_e,Qe-=_e),Ao(E,Ve,Qe,je,Te)}}},vm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding;for(a=x.x-E.left,x=x.y-E.top,E=0;E<b;E++){var te=y[E],ne=te.measuredBounds,ae=te.margin,fe=te.position.x,_e=te.position.y;if(fe=isNaN(fe)?-a:fe-a,_e=isNaN(_e)?-x:_e-x,te instanceof dr&&te.isGeometryPositioned){var Te=te.strokeWidth/2;fe-=Te,_e-=Te}te.visible&&te.arrange(fe+ae.left,_e+ae.top,ne.width,ne.height)}};function ym(){this.xa="Base"}qe(ym,sa),ym.prototype.measure=function(a,y,x,b,E,te,ne){var ae=b.length;y=Hn(),te=hh(a);for(var fe=0;fe<ae;fe++){var _e=b[fe];if(_e.visible||_e===te){var Te=gl(_e,!1);if(Te!==jn&&Te!==_i)y.push(_e);else{_e.measure(1/0,x,0,ne),Te=_e.margin,_e=_e.measuredBounds;var je=Math.max(_e.height+Te.top+Te.bottom,0);E.width+=Math.max(_e.width+Te.right+Te.left,0),E.height=Math.max(E.height,je)}}}for(b=y.length,a.desiredSize.height?x=Math.min(a.desiredSize.height,a.maxSize.height):E.height!==0&&(x=Math.min(E.height,a.maxSize.height)),a=0;a<b;a++)fe=y[a],(fe.visible||fe===te)&&(Te=fe.margin,ae=Te.right+Te.left,Te=Te.top+Te.bottom,fe.measure(1/0,x,0,ne),fe=fe.measuredBounds,Te=Math.max(fe.height+Te,0),E.width+=Math.max(fe.width+ae,0),E.height=Math.max(E.height,Te));ei(y)},ym.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,te=E.top,ne=a.isOpposite,ae=ne?x.width:E.left,fe=0;fe<b;fe++){var _e=te,Te=y[fe];if(Te.visible){var je=Te.measuredBounds,Ve=Te.margin,Qe=Ve.top+Ve.bottom,rt=te+E.bottom,ct=je.height,Dt=gl(Te,!1);(isNaN(Te.desiredSize.height)&&Dt===Gn||Dt===Bi)&&(ct=Math.max(x.height-Qe-rt,0)),Qe=ct+Qe+rt,rt=Te.alignment,rt.Xb()&&(rt=a.defaultAlignment),rt.sb()||(rt=jr),ne&&(ae-=je.width+Ve.left+Ve.right),Te.arrange(ae+rt.offsetX+Ve.left,_e+rt.offsetY+Ve.top+(x.height*rt.y-Qe*rt.y),je.width,ct),ne||(ae+=je.width+Ve.left+Ve.right)}}};function Sm(){this.xa="Base"}qe(Sm,sa),Sm.prototype.measure=function(a,y,x,b,E,te){var ne=b.length;x=Hn();for(var ae=hh(a),fe=0;fe<ne;fe++){var _e=b[fe];if(_e.visible||_e===ae){var Te=gl(_e,!1);if(Te!==jn&&Te!==Bi)x.push(_e);else{var je=_e.margin;Te=je.right+je.left,je=je.top+je.bottom,_e.measure(y,1/0,te,0),_e=_e.measuredBounds,Is(E,Math.max(E.width,Math.max(_e.width+Te,0)),E.height+Math.max(_e.height+je,0))}}}if(b=x.length,b!==0){for(a.desiredSize.width?y=Math.min(a.desiredSize.width,a.maxSize.width):E.width!==0&&(y=Math.min(E.width,a.maxSize.width)),a=0;a<b;a++)fe=x[a],(fe.visible||fe===ae)&&(_e=fe.margin,ne=_e.right+_e.left,_e=_e.top+_e.bottom,fe.measure(y,1/0,te,0),fe=fe.measuredBounds,_e=Math.max(fe.height+_e,0),E.width=Math.max(E.width,Math.max(fe.width+ne,0)),E.height+=_e);ei(x)}},Sm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,te=E.left,ne=a.isOpposite,ae=ne?x.height:E.top,fe=0;fe<b;fe++){var _e=te,Te=y[fe];if(Te.visible){var je=Te.measuredBounds,Ve=Te.margin,Qe=Ve.left+Ve.right,rt=te+E.right,ct=je.width,Dt=gl(Te,!1);(isNaN(Te.desiredSize.width)&&Dt===Gn||Dt===_i)&&(ct=Math.max(x.width-Qe-rt,0)),Qe=ct+Qe+rt,rt=Te.alignment,rt.Xb()&&(rt=a.defaultAlignment),rt.sb()||(rt=jr),ne&&(ae-=je.height+Ve.bottom+Ve.top),Te.arrange(_e+rt.offsetX+Ve.left+(x.width*rt.x-Qe*rt.x),ae+rt.offsetY+Ve.top,ct,je.height),ne||(ae+=je.height+Ve.bottom+Ve.top)}}};function xm(){this.xa="Base"}qe(xm,sa),xm.prototype.measure=function(a,y,x,b,E,te,ne){var ae=b.length,fe=a.Pb(),_e=fe.margin,Te=_e.right+_e.left,je=_e.top+_e.bottom;fe.measure(y,x,te,ne);var Ve=fe.measuredBounds;te=Ve.width,ne=Ve.height;var Qe=Math.max(te+Te,0),rt=Math.max(ne+je,0),ct=a.isClipping,Dt=kn.allocAt(-_e.left,-_e.top,Qe,rt),Lt=kn.allocAt(0,0,te,ne);pv(fe,Lt,!0),te=Lt.width,ne=Lt.height;for(var Gt=!0,Zt=hh(a),Vt=0;Vt<ae;Vt++){var Qt=b[Vt];Ve=y;var yn=x;if(Qt!==fe&&(Qt.visible||Qt===Zt)){_e=Qt.margin;var ri=_e.left,fi=_e.top;switch(Qe=_e.right+_e.left,rt=_e.top+_e.bottom,_e=gl(Qt,!1),_e){case Gn:Ve=te,yn=ne,fi=ri=rt=Qe=0;break;case _i:Ve=te,ri=Qe=0;break;case Bi:yn=ne,fi=rt=0}Qt.measure(Ve,yn,0,0),Ve=Qt.measuredBounds,Qe=Math.max(Ve.width+Qe,0),rt=Math.max(Ve.height+rt,0),_e=Qt.alignment,_e.Xb()&&(_e=a.defaultAlignment),_e.sb()||(_e=jr);var li=Qt.alignmentFocus;if(li.Xb()&&(li=jr),yn=null,Qt instanceof Wn&&Qt.$e!==""&&(yn=Qt.fb(Qt.$e),yn===Qt&&(yn=null)),ri=Lt.x-ri,fi=Lt.y-fi,yn!==null){for(Qt.arrange(0,0,Ve.width,Ve.height),Ve=yn.actualBounds,Ve=Mt.allocAt(Ve.x+(li.x*Ve.width-li.offsetX),Ve.y+(li.y*Ve.height-li.offsetY)),yn=yn.panel;yn!==Qt;)yn.transform.Ga(Ve),yn=yn.panel;ri+=_e.x*te+_e.offsetX-Ve.x,fi+=_e.y*ne+_e.offsetY-Ve.y,Mt.free(Ve)}else ri+=_e.x*te+_e.offsetX-(li.x*Ve.width+li.offsetX),fi+=_e.y*ne+_e.offsetY-(li.y*Ve.height+li.offsetY);Gt?(Gt=!1,E.h(ri,fi,Qe,rt)):Ao(E,ri,fi,Qe,rt)}}switch(Gt?E.assign(Dt):ct?E.Uu(Lt.x,Lt.y,Lt.width,Lt.height):Ao(E,Dt.x,Dt.y,Dt.width,Dt.height),kn.free(Dt),kn.free(Lt),_e=fe.stretch,_e===nr&&(_e=gl(fe,!1)),_e){case jn:return;case Gn:if(!isFinite(y)&&!isFinite(x))return;break;case _i:if(!isFinite(y))return;break;case Bi:if(!isFinite(x))return}for(Ve=fe.measuredBounds,te=Ve.width,ne=Ve.height,Qe=Math.max(te+Te,0),rt=Math.max(ne+je,0),_e=fe.margin,Lt=kn.allocAt(-_e.left,-_e.top,Qe,rt),pv(fe,Lt,!0),te=Lt.width,ne=Lt.height,y=0;y<ae;y++)x=b[y],x===fe||!x.visible&&x!==Zt||(_e=x.margin,Qe=_e.right+_e.left,rt=_e.top+_e.bottom,Ve=x.measuredBounds,Qe=Math.max(Ve.width+Qe,0),rt=Math.max(Ve.height+rt,0),Te=x.alignment,Te.Xb()&&(Te=a.defaultAlignment),Te.sb()||(Te=jr),x=x.alignmentFocus,x.Xb()&&(x=jr),Gt?(Gt=!1,E.h(Te.x*te+Te.offsetX-(x.x*Ve.width+x.offsetX)-_e.left,Te.y*ne+Te.offsetY-(x.y*Ve.height+x.offsetY)-_e.top,Qe,rt)):Ao(E,Te.x*te+Te.offsetX-(x.x*Ve.width+x.offsetX)-_e.left,Te.y*ne+Te.offsetY-(x.y*Ve.height+x.offsetY)-_e.top,Qe,rt));Gt?E.assign(Dt):ct?E.Uu(Lt.x,Lt.y,Lt.width,Lt.height):Ao(E,Dt.x,Dt.y,Dt.width,Dt.height),kn.free(Lt)},xm.prototype.arrange=function(a,y,x){var b=y.length,E=a.Pb(),te=E.measuredBounds,ne=te.width,ae=te.height,fe=a.padding;te=fe.left,fe=fe.top;var _e=te-x.x,Te=fe-x.y;for(E.arrange(_e,Te,ne,ae),ne=kn.allocAt(0,0,ne,ae),pv(E,ne,!1),ae=0;ae<b;ae++){var je=y[ae];if(je!==E){_e=je.measuredBounds;var Ve=_e.width,Qe=_e.height;Te=je.alignment,Te.Xb()&&(Te=a.defaultAlignment),Te.sb()||(Te=jr);var rt=je.alignmentFocus;if(rt.Xb()&&(rt=jr),_e=null,je instanceof Wn&&je.$e!==""&&(_e=je.fb(je.$e),_e===je&&(_e=null)),_e!==null){var ct=_e.actualBounds;for(rt=Mt.allocAt(ct.x+(rt.x*ct.width-rt.offsetX),ct.y+(rt.y*ct.height-rt.offsetY)),_e=_e.panel;_e!==je;)_e.transform.Ga(rt),_e=_e.panel;_e=Te.x*ne.width+Te.offsetX-rt.x,Te=Te.y*ne.height+Te.offsetY-rt.y,Mt.free(rt)}else _e=Te.x*ne.width+Te.offsetX-(rt.x*Ve+rt.offsetX),Te=Te.y*ne.height+Te.offsetY-(rt.y*Qe+rt.offsetY);_e+=ne.x-x.x,Te+=ne.y-x.y,je.visible&&je.arrange(te+_e,fe+Te,Ve,Qe)}}kn.free(ne)};function pv(a,y,x){var b=null;if(a instanceof Wn&&a.$e!==""&&(b=a.fb(a.$e),b===a&&(b=null)),b!==null)for(x&&a.arrange(0,0,y.width,y.height),y.assign(b.actualBounds),b=b.panel;b!==a;)b.transform.pp(y),b=b.panel}function wm(){this.xa="Base"}qe(wm,sa),wm.prototype.measure=function(a,y,x,b,E,te,ne){var ae=b.length,fe=a.Pb(),_e=fe.margin,Te=y,je=x,Ve=_e.right+_e.left,Qe=_e.top+_e.bottom;fe.measure(y,x,te,ne),_e=fe.measuredBounds;var rt=0,ct=null;fe instanceof dr&&(ct=fe,rt=ct.strokeWidth*ct.scale);var Dt=Math.max(_e.width+Ve,0);_e=Math.max(_e.height+Qe,0);var Lt=yv(fe),Gt=Lt.x*Dt+Lt.offsetX;Lt=Lt.y*_e+Lt.offsetY;var Zt=Sv(fe),Vt=Zt.x*Dt+Zt.offsetX;for(Zt=Zt.y*_e+Zt.offsetY,isFinite(y)&&(Te=Math.max(Math.abs(Gt-Vt)-rt,0)),isFinite(x)&&(je=Math.max(Math.abs(Lt-Zt)-rt,0)),rt=Qn.alloc(),rt.h(0,0),a=hh(a),Zt=0;Zt<ae;Zt++)Lt=b[Zt],Lt===fe||!Lt.visible&&Lt!==a||(_e=Lt.margin,Dt=_e.right+_e.left,Gt=_e.top+_e.bottom,Lt.measure(Te,je,0,0),_e=Lt.measuredBounds,Dt=Math.max(_e.width+Dt,0),_e=Math.max(_e.height+Gt,0),rt.h(Math.max(Dt,rt.width),Math.max(_e,rt.height)));if(ae===1)E.width=Dt,E.height=_e,Qn.free(rt);else{switch(Lt=yv(fe),Zt=Sv(fe),ae=b=0,Zt.x!==Lt.x&&Zt.y!==Lt.y&&(b=rt.width/Math.abs(Zt.x-Lt.x),ae=rt.height/Math.abs(Zt.y-Lt.y)),Qn.free(rt),rt=0,ct!==null&&(rt=ct.strokeWidth*ct.scale,_v(ct)===mi&&(b=ae=Math.max(b,ae))),b+=Math.abs(Lt.offsetX)+Math.abs(Zt.offsetX)+rt,ae+=Math.abs(Lt.offsetY)+Math.abs(Zt.offsetY)+rt,ct=fe.stretch,ct===nr&&(ct=gl(fe,!1)),ct){case jn:ne=te=0;break;case Gn:isFinite(y)&&(b=y),isFinite(x)&&(ae=x);break;case _i:isFinite(y)&&(b=y),ne=0;break;case Bi:te=0,isFinite(x)&&(ae=x)}fe.Uj(),fe.measure(b,ae,te,ne),E.width=fe.measuredBounds.width+Ve,E.height=fe.measuredBounds.height+Qe}},wm.prototype.arrange=function(a,y){var x=y.length,b=a.Pb(),E=b.measuredBounds,te=kn.alloc();te.h(0,0,1,1);var ne=b.margin,ae=ne.left;ne=ne.top;var fe=a.padding,_e=fe.left;fe=fe.top,b.arrange(_e+ae,fe+ne,E.width,E.height);var Te=yv(b),je=Sv(b),Ve=Te.y*E.height+Te.offsetY,Qe=je.x*E.width+je.offsetX;for(je=je.y*E.height+je.offsetY,te.x=Te.x*E.width+Te.offsetX,te.y=Ve,Ao(te,Qe,je,0,0),te.x+=ae+_e,te.y+=ne+fe,E=0;E<x;E++)ae=y[E],ae!==b&&(_e=ae.measuredBounds,ne=ae.margin,fe=Math.max(_e.width+ne.right+ne.left,0),Te=Math.max(_e.height+ne.top+ne.bottom,0),Ve=ae.alignment,Ve.Xb()&&(Ve=a.defaultAlignment),Ve.sb()||(Ve=jr),fe=te.width*Ve.x+Ve.offsetX-fe*Ve.x+ne.left+te.x,ne=te.height*Ve.y+Ve.offsetY-Te*Ve.y+ne.top+te.y,ae.visible&&(Eo(te.x,te.y,te.width,te.height,fe,ne,_e.width,_e.height)?ae.arrange(fe,ne,_e.width,_e.height):ae.arrange(fe,ne,_e.width,_e.height,new kn(te.x,te.y,te.width,te.height))));kn.free(te)};function bm(){this.xa="Base",this.name="Table"}qe(bm,sa),bm.prototype.measure=function(a,y,x,b,E){for(var te=b.length,ne=Hn(),ae=Hn(),fe=0;fe<te;fe++){var _e=b[fe],Te=_e instanceof Wn?_e:null;if(Te!==null&&Oh(Te)&&_e.visible){ae.push(Te);for(var je=Te.O.s,Ve=je.length,Qe=0;Qe<Ve;Qe++){var rt=je[Qe];Te.type===Wn.TableRow?rt.row=_e.row:Te.type===Wn.TableColumn&&(rt.column=_e.column),ne.push(rt)}}else ne.push(_e)}te=ne.length,te===0&&(a.Fb(0),a.Eb(0));for(var ct=[],Dt=0;Dt<te;Dt++){var Lt=ne[Dt];Lt.visible&&(ea(Lt,!0),Hc(Lt,!0),ct[Lt.row]||(ct[Lt.row]=[]),ct[Lt.row][Lt.column]||(ct[Lt.row][Lt.column]=[]),ct[Lt.row][Lt.column].push(Lt))}ei(ne);var Gt=Hn(),Zt=Hn(),Vt=Hn(),Qt={count:0},yn={count:0},ri=y,fi=x,li=a.rowDefs,Vn=a.colDefs,Rn=null;te=li.length;for(var Qi=0;Qi<te;Qi++)Rn=li[Qi],Rn!==void 0&&(Rn.actual=0);te=Vn.length;for(var Zi=0;Zi<te;Zi++)Rn=Vn[Zi],Rn!==void 0&&(Rn.actual=0);for(var no=ct.length,_o=0,ha=0;ha<no;ha++)ct[ha]&&(_o=Math.max(_o,ct[ha].length));var pa=Math.min(a.topIndex,no-1),Xa=Math.min(a.leftIndex,_o-1),da=0;no=ct.length;for(var Gh=hh(a),Us=0;Us<no;Us++)if(ct[Us]){_o=ct[Us].length;var fc=a.Fb(Us);fc.actual=0;for(var Ja=fc.oc=0;Ja<_o;Ja++)if(ct[Us][Ja]){var Wh=a.Eb(Ja);Gt[Ja]===void 0&&(Wh.actual=0,Wh.oc=0,Gt[Ja]=!0);for(var au=ct[Us][Ja],ju=au.length,Wl=0;Wl<ju;Wl++){var kl=au[Wl];if(kl.visible||kl===Gh){var Cd=1<kl.rowSpan||1<kl.columnSpan;Cd&&(Us<pa||Ja<Xa||Zt.push(kl));var pc=kl.margin,Rp=pc.right+pc.left,Zl=pc.top+pc.bottom,Qa=lc(kl,fc,Wh,!1),Jg=kl.desiredSize,Hf=!isNaN(Jg.height),Nc=!isNaN(Jg.width)&&Hf;if(Cd||Qa===jn||Nc||Us<pa||Ja<Xa||(Qt[Ja]!==void 0||Qa!==Gn&&Qa!==_i||(Qt[Ja]=-1,Qt.count++),yn[Us]!==void 0||Qa!==Gn&&Qa!==Bi||(yn[Us]=-1,yn.count++),Vt.push(kl)),kl.measure(1/0,1/0,0,0),!(Us<pa||Ja<Xa)){var Al=kl.measuredBounds,lf=Math.max(Al.width+Rp,0),Kl=Math.max(Al.height+Zl,0);if(kl.rowSpan===1&&(Qa===jn||Qa===_i)){Rn=a.Fb(Us);var Pd=Rn.Wc();da=Math.max(Kl-Rn.actual,0),da+Pd>fi&&(da=Math.max(fi-Pd,0));var Z0=Rn.oa===0;Rn.oc=Rn.oc+da,Rn.actual=Rn.oa+da,fi=Math.max(fi-(da+(Z0?Pd:0)),0)}if(kl.columnSpan===1&&(Qa===jn||Qa===Bi)){Rn=a.Eb(Ja);var Qg=Rn.Wc();da=Math.max(lf-Rn.actual,0),da+Qg>ri&&(da=Math.max(ri-Qg,0));var Hy=Rn.oa===0;Rn.oc=Rn.oc+da,Rn.actual=Rn.oa+da,ri=Math.max(ri-(da+(Hy?Qg:0)),0)}Cd&&kl.Uj()}}}}}ei(Gt);var Qc=0,ph=0;te=a.columnCount;for(var Uf=0;Uf<te;Uf++){var _d=Vn[Uf];_d!==void 0&&(Qc+=isNaN(_d.Hc)?_d.oc:_d.Hc,_d.oc!==0&&(Qc+=_d.Wc()))}te=a.rowCount;for(var Bp=0;Bp<te;Bp++){var Ed=li[Bp];Ed!==void 0&&(ph+=isNaN(Ed.Hc)?Ed.oc:Ed.Hc,Ed.oc!==0&&(ph+=Ed.Wc()))}ri=Math.max(y-Qc,0);var qc=fi=Math.max(x-ph,0),Zh=ri;te=Vt.length;for(var Nl=0;Nl<te;Nl++){var Oc=Vt[Nl],K0=a.Fb(Oc.row),gh=a.Eb(Oc.column),Fp=Oc.measuredBounds,gc=Oc.margin,uf=gc.right+gc.left,Ic=gc.top+gc.bottom;Qt[Oc.column]=gh.oc===0&&Qt[Oc.column]!==void 0?Math.max(Fp.width+uf,Qt[Oc.column]):null,yn[Oc.row]=K0.oc===0&&yn[Oc.row]!==void 0?Math.max(Fp.height+Ic,yn[Oc.row]):null}var Gf=0,jp=0,ec;for(ec in yn)ec!=="count"&&(Gf+=yn[ec]);for(ec in Qt)ec!=="count"&&(jp+=Qt[ec]);for(var _a=Qn.alloc(),qg=0;qg<te;qg++){var cl=Vt[qg];if(cl.visible||cl===Gh){var Gs=a.Fb(cl.row),hl=a.Eb(cl.column),mh=0;isFinite(hl.width)?mh=hl.width:(isFinite(ri)&&Qt[cl.column]!==null?jp===0?mh=hl.actual+ri:mh=Qt[cl.column]/jp*Zh:Qt[cl.column]!==null?mh=ri:mh=hl.actual||ri,mh=Math.max(0,mh-hl.Wc()));var Kh=0;switch(isFinite(Gs.height)?Kh=Gs.height:(isFinite(fi)&&yn[cl.row]!==null?Gf===0?Kh=Gs.actual+fi:Kh=yn[cl.row]/Gf*qc:yn[cl.row]!==null?Kh=fi:Kh=Gs.actual||fi,Kh=Math.max(0,Kh-Gs.Wc())),_a.h(Math.max(hl.minimum,Math.min(mh,hl.maximum)),Math.max(Gs.minimum,Math.min(Kh,Gs.maximum))),Qa=lc(cl,Gs,hl,!1),Qa){case _i:_a.height=Math.max(_a.height,Gs.actual+fi);break;case Bi:_a.width=Math.max(_a.width,hl.actual+ri)}var cf=cl.margin,Uy=cf.right+cf.left,V0=cf.top+cf.bottom;cl.Uj(),cl.measure(_a.width,_a.height,hl.minimum,Gs.minimum);var zp=cl.measuredBounds,hf=Math.max(zp.width+Uy,0),Wf=Math.max(zp.height+V0,0);isFinite(ri)&&(hf=Math.min(hf,_a.width)),isFinite(fi)&&(Wf=Math.min(Wf,_a.height));var Ol=0;Ol=Gs.actual,Gs.actual=Math.max(Gs.actual,Wf),Gs.oc=Math.max(Gs.oc,Wf),da=Gs.actual-Ol,fi=Math.max(fi-da,0),yn[cl.row]===null&&(qc=Math.max(qc-da,0)),Ol=hl.actual,hl.actual=Math.max(hl.actual,hf),hl.oc=Math.max(hl.oc,hf),da=hl.actual-Ol,ri=Math.max(ri-da,0),Qt[cl.column]===null&&(Zh=Math.max(Zh-da,0))}}ei(Vt);var vh=Qn.alloc(),mc=Hn(),Cu=Hn();if(te=Zt.length,te!==0){for(var Ld=0;Ld<no;Ld++)if(ct[Ld]){_o=ct[Ld].length;var Hp=a.Fb(Ld);mc[Ld]=Hp.actual;for(var Md=0;Md<_o;Md++)if(ct[Ld][Md]){var $0=a.Eb(Md);Cu[Md]=$0.actual}}}for(var Up=0;Up<te;Up++){var Ps=Zt[Up];if(Ps.visible||Ps===Gh){var tc=a.Fb(Ps.row),zu=a.Eb(Ps.column);switch(_a.h(Math.max(zu.minimum,Math.min(y,zu.maximum)),Math.max(tc.minimum,Math.min(x,tc.maximum))),Qa=lc(Ps,tc,zu,!1),Qa){case Gn:Cu[zu.index]!==0&&(_a.width=Math.min(_a.width,Cu[zu.index])),mc[tc.index]!==0&&(_a.height=Math.min(_a.height,mc[tc.index]));break;case _i:Cu[zu.index]!==0&&(_a.width=Math.min(_a.width,Cu[zu.index]));break;case Bi:mc[tc.index]!==0&&(_a.height=Math.min(_a.height,mc[tc.index]))}isFinite(zu.width)&&(_a.width=zu.width),isFinite(tc.height)&&(_a.height=tc.height),vh.h(0,0);for(var Y0=zu.minimum,Vl=tc.minimum,Vh=1;Vh<Ps.rowSpan&&!(Ps.row+Vh>=a.rowCount);Vh++)Rn=a.Fb(Ps.row+Vh),da=0,da=Qa===Gn||Qa===Bi?Math.max(Rn.minimum,mc[Ps.row+Vh]===0?Rn.maximum:Math.min(mc[Ps.row+Vh],Rn.maximum)):Math.max(Rn.minimum,isNaN(Rn.Hc)?Rn.maximum:Math.min(Rn.Hc,Rn.maximum)),vh.height+=da,Vl+=Rn.minimum;for(var Hu=1;Hu<Ps.columnSpan&&!(Ps.column+Hu>=a.columnCount);Hu++)Rn=a.Eb(Ps.column+Hu),da=0,da=Qa===Gn||Qa===_i?Math.max(Rn.minimum,Cu[Ps.column+Hu]===0?Rn.maximum:Math.min(Cu[Ps.column+Hu],Rn.maximum)):Math.max(Rn.minimum,isNaN(Rn.Hc)?Rn.maximum:Math.min(Rn.Hc,Rn.maximum)),vh.width+=da,Y0+=Rn.minimum;_a.width+=vh.width,_a.height+=vh.height;var Gp=Ps.margin,Td=Gp.right+Gp.left,em=Gp.top+Gp.bottom;Ps.measure(_a.width,_a.height,Y0,Vl);for(var Wp=Ps.measuredBounds,Dc=Math.max(Wp.width+Td,0),df=Math.max(Wp.height+em,0),kd=0,Zp=0;Zp<Ps.rowSpan&&!(Ps.row+Zp>=a.rowCount);Zp++)Rn=a.Fb(Ps.row+Zp),kd+=Rn.total||0;if(kd<df){var $h=df-kd,eh=df-kd;if(Ps.spanAllocation!==null)for(var Yh=Ps.spanAllocation,yh=0;yh<Ps.rowSpan&&!(0>=$h)&&!(Ps.row+yh>=a.rowCount);yh++){Rn=a.Fb(Ps.row+yh);var Xh=Rn.oa||0,ff=Yh(Ps,Rn,eh);Rn.actual=Math.min(Rn.maximum,Xh+ff),Rn.oa!==Xh&&($h-=Rn.oa-Xh)}for(;0<$h;){var vc=Rn.oa||0;if(isNaN(Rn.height)&&Rn.maximum>vc&&(Rn.actual=Math.min(Rn.maximum,vc+$h),Rn.oa!==vc&&($h-=Rn.oa-vc)),Rn.index===0)break;Rn=a.Fb(Rn.index-1)}}for(var Zf=0,Jh=0;Jh<Ps.columnSpan&&!(Ps.column+Jh>=a.columnCount);Jh++)Rn=a.Eb(Ps.column+Jh),Zf+=Rn.total||0;if(Zf<Dc){var Kf=Dc-Zf,Gy=Dc-Zf;if(Ps.spanAllocation!==null)for(var Sh=Ps.spanAllocation,pf=0;pf<Ps.columnSpan&&!(0>=Kf)&&!(Ps.column+pf>=a.columnCount);pf++){Rn=a.Eb(Ps.column+pf);var tm=Rn.oa||0,Wy=Sh(Ps,Rn,Gy);Rn.actual=Math.min(Rn.maximum,tm+Wy),Rn.oa!==tm&&(Kf-=Rn.oa-tm)}for(;0<Kf;){var X0=Rn.oa||0;if(isNaN(Rn.width)&&Rn.maximum>X0&&(Rn.actual=Math.min(Rn.maximum,X0+Kf),Rn.oa!==X0&&(Kf-=Rn.oa-X0)),Rn.index===0)break;Rn=a.Eb(Rn.index-1)}}}}ei(Zt),Qn.free(vh),Qn.free(_a),mc!==void 0&&ei(mc),Cu!==void 0&&ei(Cu);var Vf=0,$f=0,J0=a.desiredSize,gx=a.maxSize;Qa=gl(a,!0);var nm=ph=Qc=0,im=0;te=a.columnCount;for(var Q0=0;Q0<te;Q0++)Vn[Q0]!==void 0&&(Rn=a.Eb(Q0),isFinite(Rn.width)?(nm+=Rn.width,nm+=Rn.Wc()):Nm(Rn)===pg?(nm+=Rn.oa,nm+=Rn.Wc()):Rn.oa!==0&&(Qc+=Rn.oa,Qc+=Rn.Wc()));isFinite(J0.width)?Vf=Math.min(J0.width,gx.width):Vf=Qa!==jn&&isFinite(y)?y:Qc,Vf=Math.max(Vf,a.minSize.width),Vf=Math.max(Vf-nm,0);for(var Qx=Qc===0?1:Math.max(Vf/Qc,1),q0=0;q0<te;q0++)Vn[q0]!==void 0&&(Rn=a.Eb(q0),isFinite(Rn.width)||Nm(Rn)===pg||(Rn.actual=Rn.oa*Qx),Rn.position=E.width,Rn.oa!==0&&(E.width+=Rn.oa,E.width+=Rn.Wc()));te=a.rowCount;for(var ev=0;ev<te;ev++)li[ev]!==void 0&&(Rn=a.Fb(ev),isFinite(Rn.height)?(im+=Rn.height,im+=Rn.Wc()):Nm(Rn)===pg?(im+=Rn.oa,im+=Rn.Wc()):Rn.oa!==0&&(ph+=Rn.oa,ph+=Rn.Wc()));isFinite(J0.height)?$f=Math.min(J0.height,gx.height):$f=Qa!==jn&&isFinite(x)?x:ph,$f=Math.max($f,a.minSize.height),$f=Math.max($f-im,0);for(var qx=ph===0?1:Math.max($f/ph,1),tv=0;tv<te;tv++)li[tv]!==void 0&&(Rn=a.Fb(tv),isFinite(Rn.height)||Nm(Rn)===pg||(Rn.actual=Rn.oa*qx),Rn.position=E.height,Rn.oa!==0&&(E.height+=Rn.oa,E.height+=Rn.Wc()));te=ae.length;for(var Zy=0;Zy<te;Zy++){var rm=ae[Zy],Ky=0,Vy=0;rm.type===Wn.TableRow?(Ky=E.width,Rn=a.Fb(rm.row),Vy=Rn.actual):(Rn=a.Eb(rm.column),Ky=Rn.actual,Vy=E.height),rm.measuredBounds.h(0,0,Ky,Vy),ea(rm,!1)}ei(ae),a.inRowsCols=ct},bm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding,te=E.left;E=E.top;var ne=a.inRowsCols;if(ne!==null){for(var ae,fe,_e=ne.length,Te=0,je=0;je<_e;je++)ne[je]&&(Te=Math.max(Te,ne[je].length));fe=a.rowDefs,ae=a.colDefs;var Ve=je=0,Qe=Math.min(a.topIndex,_e-1);if(0<fe.length){for(;Qe!==_e&&(fe[Qe]===void 0||fe[Qe].oa===0);)Qe++;Qe=Math.max(Math.min(Qe,_e-1),0),je=-fe[Qe].position}var rt=Math.min(a.leftIndex,Te-1);if(0<ae.length){for(;rt!==Te&&(ae[rt]===void 0||ae[rt].oa===0);)rt++;rt=Math.max(Math.min(rt,Te-1),0),Ve=-ae[rt].position}for(var ct=0,Dt=0;ct!==_e&&fe[ct]===void 0;)ct++;for(;Dt!==_e&&ae[Dt]===void 0;)Dt++;Te=a.part,a.Fb(ct),a.Eb(Dt);for(var Lt=0;Lt<y.length;Lt++){var Gt=y[Lt];if(Gt instanceof Wn&&Gt.visible&&Oh(Gt)){if(Gt.type===Wn.TableRow){ae=a.Fb(Gt.row);var Zt=a.Eb(Dt)}else ae=a.Fb(ct),Zt=a.Eb(Gt.column);fe=ae.position+je+E,ae.oa!==0&&(fe+=ae.Io(Math.max(ct,Qe))),ae=Zt.position+Ve+te,Zt.oa!==0&&(ae+=Zt.Io(Math.max(Dt,rt))),Zt=Gt.measuredBounds,Gt.Uk(),Gt.actualBounds.ka();var Vt=Gt.actualBounds,Qt=kn.allocAt(Vt.x,Vt.y,Vt.width,Vt.height);Vt.x=Gt.type===Wn.TableRow?te:ae,Vt.y=Gt.type===Wn.TableColumn?E:fe,Vt.width=Zt.width,Vt.height=Zt.height,Gt.actualBounds.freeze(),Hc(Gt,!1),Sa(Qt,Vt)||Te===null||(Te.oh(),Gt.Pn(Te)),kn.free(Qt)}}for(Lt=Qn.alloc(),Gt=0;Gt<_e;Gt++)if(ne[Gt]){for(Te=ne[Gt].length,Zt=a.Fb(Gt),fe=Zt.position+je+E,Zt.oa!==0&&(fe+=Zt.Io(Math.max(ct,Qe))),Vt=0;Vt<Te;Vt++)if(ne[Gt][Vt]){Qt=a.Eb(Vt),ae=Qt.position+Ve+te,Qt.oa!==0&&(ae+=Qt.Io(Math.max(Dt,rt)));for(var yn=ne[Gt][Vt],ri=yn.length,fi=0;fi<ri;fi++){var li=yn[fi],Vn=li.measuredBounds;Lt.h(0,0);for(var Rn=1;Rn<li.rowSpan&&!(Gt+Rn>=a.rowCount);Rn++){var Qi=a.Fb(Gt+Rn);Qi.oa!==0&&(Lt.height+=Qi.total)}for(Rn=1;Rn<li.columnSpan&&!(Vt+Rn>=a.columnCount);Rn++)Qi=a.Eb(Vt+Rn),Qi.oa!==0&&(Lt.width+=Qi.total);var Zi=Qt.oa+Lt.width,no=Zt.oa+Lt.height;Rn=ae,Qi=fe;var _o=Zi,ha=no,pa=ae,Xa=fe,da=Zi,Gh=no;ae+Zi>x.width&&(da=Math.max(x.width-ae,0)),fe+no>x.height&&(Gh=Math.max(x.height-fe,0));var Us=li.alignment;if(Us.Xb()){Us=a.defaultAlignment,Us.sb()||(Us=jr);var fc=Us.x,Ja=Us.y,Wh=Us.offsetX;Us=Us.offsetY;var au=Qt.alignment,ju=Zt.alignment;au.sb()&&(fc=au.x,Wh=au.offsetX),ju.sb()&&(Ja=ju.y,Us=ju.offsetY)}else fc=Us.x,Ja=Us.y,Wh=Us.offsetX,Us=Us.offsetY;(isNaN(fc)||isNaN(Ja))&&(Ja=fc=.5,Us=Wh=0),au=Vn.width,ju=Vn.height;var Wl=li.margin,kl=Wl.left+Wl.right,Cd=Wl.top+Wl.bottom,pc=lc(li,Zt,Qt,!1);!isNaN(li.desiredSize.width)||pc!==Gn&&pc!==_i||(au=Math.max(Zi-kl,0)),!isNaN(li.desiredSize.height)||pc!==Gn&&pc!==Bi||(ju=Math.max(no-Cd,0)),Zi=li.maxSize,no=li.minSize,au=Math.min(Zi.width,au),ju=Math.min(Zi.height,ju),au=Math.max(no.width,au),ju=Math.max(no.height,ju),Zi=ju+Cd,Rn+=_o*fc-(au+kl)*fc+Wh+Wl.left,Qi+=ha*Ja-Zi*Ja+Us+Wl.top,li.visible&&(Eo(pa,Xa,da,Gh,Rn,Qi,Vn.width,Vn.height)?li.arrange(Rn,Qi,au,ju):li.arrange(Rn,Qi,au,ju,new kn(pa,Xa,da,Gh)))}}}for(Qn.free(Lt),a=0;a<b;a++)x=y[a],te=x instanceof Wn?x:null,te!==null&&Oh(te)&&(te=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,te.width,te.height),x.naturalBounds.freeze())}};function Cm(){this.xa="Base"}qe(Cm,sa),Cm.prototype.measure=function(){},Cm.prototype.arrange=function(){};function Pm(){this.xa="Base"}qe(Pm,sa),Pm.prototype.measure=function(){},Pm.prototype.arrange=function(){};function _m(){this.xa="Base"}qe(_m,sa),_m.prototype.measure=function(a,y,x,b,E,te,ne){1<b.length&&Nt("Viewbox Panel cannot contain more than one GraphObject."),b=b[0],b.Ca=1,b.Uj(),b.measure(1/0,1/0,te,ne);var ae=b.measuredBounds,fe=b.margin,_e=fe.right+fe.left;if(fe=fe.top+fe.bottom,isFinite(y)||isFinite(x)){var Te=b.scale,je=ae.width;ae=ae.height;var Ve=Math.max(y-_e,0),Qe=Math.max(x-fe,0),rt=1;a.viewboxStretch===mi?je!==0&&ae!==0&&(rt=Math.min(Ve/je,Qe/ae)):je!==0&&ae!==0&&(rt=Math.max(Ve/je,Qe/ae)),rt===0&&(rt=1e-4),b.Ca*=rt,Te!==b.scale&&(ea(b,!0),b.measure(1/0,1/0,te,ne))}ae=b.measuredBounds,E.width=isFinite(y)?y:Math.max(ae.width+_e,0),E.height=isFinite(x)?x:Math.max(ae.height+fe,0)},_m.prototype.arrange=function(a,y,x){y=y[0];var b=y.measuredBounds,E=y.margin,te=Math.max(b.width+(E.right+E.left),0);E=Math.max(b.height+(E.top+E.bottom),0);var ne=y.alignment;ne.Xb()&&(ne=a.defaultAlignment),ne.sb()||(ne=jr),y.arrange(x.width*ne.x-te*ne.x+ne.offsetX,x.height*ne.y-E*ne.y+ne.offsetY,b.width,b.height)};function hg(){this.xa="Base"}qe(hg,sa),hg.prototype.measure=function(){},hg.prototype.arrange=function(){},hg.prototype.gc=function(a,y,x){x=a.Df()*x.scale,0>=x&&(x=1);var b=a.gridCellSize,E=b.width;b=b.height;var te=a.naturalBounds,ne=a.actualBounds,ae=te.width,fe=te.height,_e=Math.ceil(ae/E),Te=Math.ceil(fe/b),je=a.gridOrigin,Ve=je.x;je=je.y,y.save(),y.beginPath(),y.rect(0,0,ae,fe),y.clip(),y.Se();for(var Qe=[],rt=a.O.s,ct=rt.length,Dt=0;Dt<ct;Dt++){var Lt=rt[Dt],Gt=[];if(Qe.push(Gt),Lt.visible){var Zt=Lt.interval;if(!(0>Zt)){Lt=mv(Lt.figure);for(var Vt=0;Vt<ct;Vt++)if(Vt!==Dt){var Qt=rt[Vt];Qt.visible&&mv(Qt.figure)===Lt&&(Qt=Qt.interval,Qt>Zt&&Gt.push(Qt))}}}}for(rt=a.O.s,ct=rt.length,Dt=0;Dt<ct;Dt++){var yn=rt[Dt];if(yn.visible&&(Gt=yn.interval||1,Lt=Math.abs(Gt),!(2>E*Lt*x))){if(Zt=yn.segmentIndex,(!isFinite(Zt)||isNaN(Zt))&&(Zt=0),0>Zt&&(Zt=Lt-Math.min(-Zt,Lt)),Zt=Math.round(Zt%Lt),Lt=yn.opacity,Vt=1,Lt!==1){if(Lt===0)continue;Vt=y.globalAlpha,y.globalAlpha=Vt*Lt}Qt=Qe[Dt];var ri=!1,fi=yn.strokeDashArray;if(fi!==null&&(ri=!0,y.js(fi,yn.strokeDashOffset)),yn.figure==="LineV"&&yn.stroke!==null&&0<yn.strokeWidth){for(y.lineWidth=yn.strokeWidth,ws(a,y,yn.stroke,!1,!1,te,ne),y.beginPath(),fi=yn=Math.floor((Ve-E)/E);fi<=yn+_e;fi++){var li=fi*E+Ve;0<=li&&li<=ae&&Em(fi,Gt,Zt,Qt)&&(y.moveTo(li,0),y.lineTo(li,fe))}y.stroke(),y.Se()}else if(yn.figure==="LineH"&&yn.stroke!==null&&0<yn.strokeWidth){for(y.lineWidth=yn.strokeWidth,ws(a,y,yn.stroke,!1,!1,te,ne),y.beginPath(),fi=yn=Math.floor((je-b)/b);fi<=yn+Te;fi++)li=fi*b+je,0<=li&&li<=fe&&Em(fi,Gt,Zt,Qt)&&(y.moveTo(0,li),y.lineTo(ae,li));y.stroke(),y.Se()}else if(yn.figure==="BarV"&&yn.fill!==null)for(ws(a,y,yn.fill,!0,!1,te,ne),yn=yn.width,isNaN(yn)&&(yn=E),li=fi=Math.floor((Ve-E)/E);li<=fi+_e;li++){var Vn=li*E+Ve;0<=Vn+yn&&Vn<=ae&&Em(li,Gt,Zt,Qt)&&y.fillRect(Vn,0,yn,fe)}else if(yn.figure==="BarH"&&yn.fill!==null)for(ws(a,y,yn.fill,!0,!1,te,ne),yn=yn.height,isNaN(yn)&&(yn=b),li=fi=Math.floor((je-b)/b);li<=fi+Te;li++)Vn=li*b+je,0<=Vn+yn&&Vn<=fe&&Em(li,Gt,Zt,Qt)&&y.fillRect(0,Vn,ae,yn);ri&&y.fs(),Lt!==1&&(y.globalAlpha=Vt)}}y.restore(),y.Vc(!1)};function Em(a,y,x,b){if(0>y)return a%y===x;if(a%y!==x)return!1;y=b.length;for(var E=0;E<y;E++)if(a%b[E]===x)return!1;return!0}function Lm(){this.xa="Base"}qe(Lm,sa),Lm.prototype.measure=function(a,y,x,b,E){var te=b.length;if(a instanceof qr||a instanceof $n){var ne=null,ae=null;if(a instanceof $n&&(ne=a),a instanceof qr&&(ae=a,ne=ae.adornedPart,a.j===null&&(a.j=[])),ne instanceof $n){var fe=ne;if(te===0)Is(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var _e=a instanceof qr?null:ne.path;y=ne.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var Te=fe.points,je=ne.pointsCount;ae!==null?ae.Ul(!1):ne!==null&&ne.Ul(!1),ae=y.width;var Ve=y.height,Qe=a.j;if(Qe.length=0,_e!==null){r1(a,ae,Ve,_e);var rt=_e.measuredBounds;x.ed(rt),Qe.push(rt)}rt=gr.alloc();for(var ct=Mt.alloc(),Dt=Mt.alloc(),Lt=0;Lt<te;Lt++){var Gt=b[Lt];if(Gt!==_e)if(Gt.isPanelMain&&Gt instanceof dr){r1(a,ae,Ve,Gt);var Zt=Gt.measuredBounds;x.ed(Zt),Qe.push(Zt)}else if(2>je)Gt.measure(1/0,1/0,0,0),Zt=Gt.measuredBounds,x.ed(Zt),Qe.push(Zt);else{var Vt=Gt.segmentIndex,Qt=Gt.segmentFraction,yn=Gt.alignmentFocus;yn.Mc()&&(yn=jr);var ri=Gt.segmentOrientation,fi=Gt.segmentOffset;if(isNaN(Vt)){var li=fe.ua;Zt=Hn(),li.Qu(Qt,Zt);var Vn=Mt.allocAt(Zt[0],Zt[1]);if(Vn.add(fe.i(0)),li.type===Yn.j?Vn.offset(-li.startX,-li.startY):(li=li.figures.first(),li!==null&&Vn.offset(-li.startX,-li.startY)),li=Zt[2],ri!==ol){var Rn=fe.computeAngle(Gt,ri,li);Gt.Kb=Rn}Rn=Vn.x-y.x;var Qi=Vn.y-y.y;Mt.free(Vn),ei(Zt)}else if(Vt<-je||Vt>=je)Zt=Mt.alloc(),fe.vg(),fe.computeMidPoint(Zt),li=fe.midAngle,ri!==ol&&(Rn=fe.computeAngle(Gt,ri,li),Gt.Kb=Rn),Rn=Zt.x-y.x,Qi=Zt.y-y.y,Mt.free(Zt);else{if(Rn=0,0<=Vt?(Qi=Te.M(Vt),Zt=Vt<je-1?Te.M(Vt+1):Qi):(Rn=je+Vt,Qi=Te.M(Rn),Zt=0<Rn?Te.M(Rn-1):Qi),Qi.Xa(Zt)){0<=Vt?(li=0<Vt?Te.M(Vt-1):Qi,Rn=Vt<je-2?Te.M(Vt+2):Zt):(li=Rn<je-1?Te.M(Rn+1):Qi,Rn=1<Rn?Te.M(Rn-2):Zt),Vn=li.Bf(Qi);var Zi=Zt.Bf(Rn);li=Vn>Zi+10?0<=Vt?li.ab(Qi):Qi.ab(li):Zi>Vn+10?0<=Vt?Zt.ab(Rn):Rn.ab(Zt):0<=Vt?li.ab(Rn):Rn.ab(li)}else li=0<=Vt?Qi.ab(Zt):Zt.ab(Qi);ri!==ol&&(Rn=fe.computeAngle(Gt,ri,li),Gt.Kb=Rn),Rn=Qi.x+(Zt.x-Qi.x)*Qt-y.x,Qi=Qi.y+(Zt.y-Qi.y)*Qt-y.y}Gt.measure(1/0,1/0,0,0),Zt=Gt.measuredBounds,Vn=Gt.naturalBounds;var no=0;Gt instanceof dr&&(no=Gt.strokeWidth),Zi=Vn.width+no;var _o=Vn.height+no;rt.reset(),rt.translate(-Zt.x,-Zt.y),rt.scale(Gt.scale,Gt.scale),rt.rotate(ri===ol?Gt.angle:li,Zi/2,_o/2),ri!==Pg&&ri!==Eg||rt.rotate(90,Zi/2,_o/2),ri!==_g&&ri!==Lg||rt.rotate(-90,Zi/2,_o/2),ri===i0&&(45<li&&135>li||225<li&&315>li)&&rt.rotate(-li,Zi/2,_o/2),Vn=new kn(0,0,Zi,_o),ct.xi(Vn,yn),rt.Ga(ct),yn=-ct.x+no/2*Gt.scale,Gt=-ct.y+no/2*Gt.scale,Dt.assign(fi),no=isNaN(fi.x);var ha=isNaN(fi.y);if(no||ha){Zi=Zi/2+3,_o=_o/2+3;var pa=45<=li&&135>=li,Xa=225<=li&&315>=li;ri===ol&&(pa||Xa)?(Dt.x=ha?Zi:fi.y,Dt.y=no?_o:fi.x,pa?0<=Vt||isNaN(Vt)&&.5>Qt||!no||(Dt.y=-_o):Xa&&((0<=Vt||isNaN(Vt)&&.5>Qt)&&no&&(Dt.y=-_o),ha&&(Dt.x=-Zi))):(no&&(Dt.x=0<=Vt||isNaN(Vt)&&.5>Qt?Zi:-Zi),ha&&(Dt.y=-_o),Dt.rotate(li))}else Dt.rotate(li);Rn+=Dt.x,Qi+=Dt.y,Vn.set(Zt),Vn.h(Rn+yn,Qi+Gt,Zt.width,Zt.height),Qe.push(Vn),x.ed(Vn)}}if(ne!==null)for(b=ne.labelNodes;b.next();)b.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),Is(E,x.width||0,x.height||0),gr.free(rt),Mt.free(ct),Mt.free(Dt)}}}},Lm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof qr||a instanceof $n){var b=a,E=null;a instanceof qr&&(E=a,b=E.adornedPart);var te=a instanceof qr?null:b.path,ne=a.j;if(ne.length!==0){var ae=0;if(te!==null&&ae<ne.length){var fe=ne[ae];ae++,te.arrange(fe.x-a.jg.x,fe.y-a.jg.y,fe.width,fe.height)}for(fe=0;fe<x;fe++){var _e=y[fe];if(_e!==te&&ae<ne.length){var Te=ne[ae];ae++,_e.arrange(Te.x-a.jg.x,Te.y-a.jg.y,Te.width,Te.height)}}}if(y=b.points,x=y.count,2<=x&&a instanceof $n)for(te=a.labelNodes;te.next();){var je=a;ne=te.value,ae=ne.segmentIndex,fe=ne.segmentFraction;var Ve=ne.alignmentFocus;if(_e=ne.segmentOrientation,Te=ne.segmentOffset,isNaN(ae)){var Qe=je.ua,rt=Hn();Qe.Qu(fe,rt);var ct=Mt.allocAt(rt[0],rt[1]);ct.add(je.i(0)),Qe.type===Yn.j||(Qe=Qe.figures.first()),ct.offset(-Qe.startX,-Qe.startY),Qe=rt[2],_e!==ol&&(je=je.computeAngle(ne,_e,Qe),ne.angle=je),je=ct.x;var Dt=ct.y;Mt.free(ct),ei(rt)}else if(ae<-x||ae>=x)rt=Mt.alloc(),Qe=je,Dt=rt,Qe.vg(),Qe.computeMidPoint(Dt),Qe=je.midAngle,_e!==ol&&(je=je.computeAngle(ne,_e,Qe),ne.angle=je),je=rt.x,Dt=rt.y,Mt.free(rt);else{if(ct=0,0<=ae?(rt=y.s[ae],Dt=ae<x-1?y.s[ae+1]:rt):(ct=x+ae,rt=y.s[ct],Dt=0<ct?y.s[ct-1]:rt),rt.Xa(Dt)){0<=ae?(Qe=0<ae?y.s[ae-1]:rt,ct=ae<x-2?y.s[ae+2]:Dt):(Qe=ct<x-1?y.s[ct+1]:rt,ct=1<ct?y.s[ct-2]:Dt);var Lt=Qe.Bf(rt),Gt=Dt.Bf(ct);Qe=Lt>Gt+10?0<=ae?Qe.ab(rt):rt.ab(Qe):Gt>Lt+10?0<=ae?Dt.ab(ct):ct.ab(Dt):0<=ae?Qe.ab(ct):ct.ab(Qe)}else Qe=0<=ae?rt.ab(Dt):Dt.ab(rt);_e!==ol&&(je=je.computeAngle(ne,_e,Qe),ne.angle=je),je=rt.x+(Dt.x-rt.x)*fe,Dt=rt.y+(Dt.y-rt.y)*fe}if(Ve.ys())ne.location=new Mt(je,Dt);else{Ve.Mc()&&(Ve=jr),rt=gr.alloc(),rt.reset(),rt.scale(ne.scale,ne.scale),rt.rotate(ne.angle,0,0);var Zt=ne.naturalBounds;ct=kn.allocAt(0,0,Zt.width,Zt.height),Lt=Mt.alloc(),Lt.xi(ct,Ve),rt.Ga(Lt),Ve=-Lt.x,Gt=-Lt.y;var Vt=Zt.width,Qt=Zt.height;Zt=Mt.alloc(),Zt.assign(Te);var yn=isNaN(Te.x),ri=isNaN(Te.y);if(yn||ri){Vt=Vt/2+3,Qt=Qt/2+3;var fi=45<=Qe&&135>=Qe,li=225<=Qe&&315>=Qe;_e===ol&&(fi||li)?(Zt.x=ri?Vt:Te.y,Zt.y=yn?Qt:Te.x,fi?0<=ae||isNaN(ae)&&.5>fe||!yn||(Zt.y=-Qt):li&&((0<=ae||isNaN(ae)&&.5>fe)&&yn&&(Zt.y=-Qt),ri&&(Zt.x=-Vt))):(yn&&(Zt.x=0<=ae||isNaN(ae)&&.5>fe?Vt:-Vt),ri&&(Zt.y=-Qt),Zt.rotate(Qe))}else Zt.rotate(Qe);je+=Zt.x,Dt+=Zt.y,rt.pp(ct),Ve+=ct.x,Gt+=ct.y,ae=Mt.allocAt(je+Ve,Dt+Gt),ne.move(ae),Mt.free(ae),Mt.free(Zt),Mt.free(Lt),kn.free(ct),gr.free(rt)}}E!==null?E.Ul(!1):b.Ul(!1),b=O1(a),a.location.h(a.position.x+b.x,a.position.y+b.y),Mt.free(b)}};function r1(a,y,x,b){if(iu(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof qr&&a.type===Wn.Link&&a.adornedObject instanceof dr&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof $n&&a.ua!==null?(a=a.geometry.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):a instanceof qr&&a.adornedPart.ua!==null?(a=a.adornedPart.ua.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):b.Ge(-(E/2),-(E/2),y+E,x+E),E=b.desiredSize,E.w()||b.ua===null?b.dc.h(0,0,E.width,E.height):b.dc.assign(b.ua.bounds),ea(b,!1)}}function dg(){this.xa="Base"}qe(dg,sa),dg.prototype.measure=function(a,y,x,b,E,te,ne){var ae=a.Pb();a.graduatedBounds=[];var fe=ae.margin,_e=fe.right+fe.left,Te=fe.top+fe.bottom;ae.measure(y,x,te,ne);var je=ae.measuredBounds,Ve=new kn(-fe.left,-fe.top,Math.max(je.width+_e,0),Math.max(je.height+Te,0));a.graduatedBounds.push(Ve),E.assign(Ve);for(var Qe=ae.geometry,rt=ae.strokeWidth,ct=Qe.flattenedSegments,Dt=Qe.flattenedLengths,Lt=Qe.flattenedTotalLength,Gt=ct.length,Zt=0,Vt=0,Qt=Hn(),yn=0;yn<Gt;yn++){var ri=ct[yn],fi=[];Vt=Zt=0;for(var li=ri.length,Vn=0;Vn<li;Vn+=2){var Rn=ri[Vn],Qi=ri[Vn+1];if(Vn!==0){var Zi=180*Math.atan2(Qi-Vt,Rn-Zt)/Math.PI;0>Zi&&(Zi+=360),fi.push(Zi)}Zt=Rn,Vt=Qi}Qt.push(fi)}if(a.graduatedIntervals===null){for(var no=[],_o=a.O.s,ha=_o.length,pa=0;pa<ha;pa++){var Xa=_o[pa],da=[];if(no.push(da),Xa.visible){var Gh=Xa.interval;if(!(0>Gh)){for(var Us=0;Us<ha;Us++)if(Us!==pa){var fc=_o[Us];if(fc.visible&&Xa.constructor===fc.constructor){var Ja=fc.interval;Ja>Gh&&da.push(Ja)}}}}}a.graduatedIntervals=no}var Wh=a.graduatedIntervals,au=a.O.s,ju=au.length,Wl=0,kl=0,Cd=Lt;a.graduatedMarks=[];for(var pc,Rp=0;Rp<ju;Rp++){var Zl=au[Rp];if(pc=[],Zl.visible&&Zl!==ae){var Qa=Math.abs(Zl.interval),Jg=a.graduatedTickUnit;if(!(2>Jg*Qa*Lt/a.graduatedRange&&Zl.graduatedSkip===null)){var Hf=Dt[0][0],Nc=0,Al=0;kl=Lt*Zl.graduatedStart-1e-4,Cd=Lt*Zl.graduatedEnd+1e-4;var lf=Jg*Qa,Kl=a.graduatedTickBase;if(Kl<a.graduatedMin){var Pd=(a.graduatedMin-Kl)/lf;Pd=Pd%1===0?Pd:Math.floor(Pd+1),Kl+=Pd*lf}else Kl>a.graduatedMin+lf&&(Kl-=Math.floor((Kl-a.graduatedMin)/lf)*lf);for(var Z0=Wh[Rp],Qg=Kl,Hy=1e-6*a.graduatedMax,Qc=1;Kl<=a.graduatedMax+Hy;Qc++){e:{for(var ph=Z0.length,Uf=0;Uf<ph;Uf++){var _d=(Kl-a.graduatedTickBase)%(Z0[Uf]*a.graduatedTickUnit),Bp=1e-6*a.graduatedTickUnit;if(_d<Bp&&_d>-Bp){var Ed=!1;break e}}Ed=!0}if(Ed&&(Kl>a.graduatedMax&&(Kl=a.graduatedMax),Zl.graduatedSkip===null||Zl instanceof Mo&&!Zl.graduatedSkip(Kl,Zl)||Zl instanceof dr&&!Zl.graduatedSkip(Kl,Zl))&&(Wl=(Kl-a.graduatedMin)*Lt/a.graduatedRange,Wl>Lt&&(Wl=Lt),kl<=Wl&&Wl<=Cd)){for(var qc=Qt[Nc][Al],Zh=Dt[Nc][Al];Nc<Dt.length;){for(;Wl>Hf&&Al<Dt[Nc].length-1;)Al++,qc=Qt[Nc][Al],Zh=Dt[Nc][Al],Hf+=Zh;if(Wl<=Hf)break;Nc++,Al=0,qc=Qt[Nc][Al],Zh=Dt[Nc][Al],Hf+=Zh}var Nl=ct[Nc],Oc=Nl[2*Al],K0=Nl[2*Al+1],gh=(Wl-(Hf-Zh))/Zh,Fp=new Mt(Oc+(Nl[2*Al+2]-Oc)*gh+rt/2-Qe.bounds.x,K0+(Nl[2*Al+3]-K0)*gh+rt/2-Qe.bounds.y);Fp.scale(ae.scale,ae.scale);e:{var gc=qc,uf=Qt[Nc];if(!(.5005>gh&&.4995<gh)){var Ic=gc;if(.5>gh?0<Al?Ic=uf[Al-1]:rn.$(Nl[0],Nl[Nl.length-2])&&rn.$(Nl[1],Nl[Nl.length-1])&&(Ic=uf[uf.length-1]):.5<gh&&(Al+1<uf.length?Ic=uf[Al+1]:rn.$(Nl[0],Nl[Nl.length-2])&&rn.$(Nl[1],Nl[Nl.length-1])&&(Ic=uf[0])),gc!==Ic){var Gf=Math.abs(gc-Ic);if(180<Gf&&(gc<Ic?gc+=360:Ic+=360,Gf=Math.abs(gc-Ic)),5e-4>gh||.9995<gh){qc=(gc+Ic)/2%360;break e}if(10>Gf){var jp=1-Math.abs(.5-gh);qc=(gc*jp+Ic*(1-jp))%360;break e}}}qc=gc}if(Zl instanceof Mo){var ec="";Zl.graduatedFunction!==null?(ec=Zl.graduatedFunction(Kl,Zl),ec=ec!=null?ec.toString():""):ec=(+Kl.toFixed(2)).toString(),ec!==""&&pc.push({$l:Fp,angle:qc,text:ec})}else pc.push({$l:Fp,angle:qc})}Kl=Qg+Qc*lf}}}a.graduatedMarks.push(pc)}ei(Qt);var _a=a.graduatedMarks;if(_a!==null)for(var qg=b.length,cl=0;cl<qg;cl++){var Gs=b[cl],hl=_a[cl];if(Gs.visible&&Gs!==ae&&hl.length!==0){if(Gs instanceof dr){var mh=a,Kh=E,cf=Gs.alignmentFocus;cf.Mc()&&(cf=qa);var Uy=Gs.angle;Gs.Kb=0,Gs.measure(1/0,1/0,0,0),Gs.Kb=Uy;var V0=Gs.measuredBounds,zp=V0.width,hf=V0.height,Wf=kn.allocAt(0,0,zp,hf),Ol=Mt.alloc();Ol.xi(Wf,cf),kn.free(Wf);for(var vh=-Ol.x,mc=-Ol.y,Cu=new kn,Ld=hl.length,Hp=0;Hp<Ld;Hp++)for(var Md=hl[Hp],$0=Md.$l.x,Up=Md.$l.y,Ps=Md.angle,tc=0;4>tc;tc++){switch(tc){case 0:Ol.h(vh,mc);break;case 1:Ol.h(vh+zp,mc);break;case 2:Ol.h(vh,mc+hf);break;case 3:Ol.h(vh+zp,mc+hf)}Ol.rotate(Ps+Gs.angle),Ol.offset($0,Up),Hp===0&&tc===0?Cu.h(Ol.x,Ol.y,0,0):Cu.Ye(Ol),Ol.offset(-$0,-Up),Ol.rotate(-Ps-Gs.angle)}Mt.free(Ol),mh.graduatedBounds!==null&&mh.graduatedBounds.push(Cu),Ao(Kh,Cu.x,Cu.y,Cu.width,Cu.height)}else if(Gs instanceof Mo){var zu=a,Y0=E;zu.temporaryTextBlock===null&&(zu.temporaryTextBlock=new Mo);var Vl=zu.temporaryTextBlock;S1(Vl,Gs);var Vh=Gs.alignmentFocus;Vh.Mc()&&(Vh=qa);for(var Hu=Gs.segmentOrientation,Gp=Gs.segmentOffset,Td=new kn,em=0,Wp=0,Dc=0,df=0,kd=0,Zp=hl.length,$h=0;$h<Zp;$h++){var eh=hl[$h];em=eh.$l.x,Wp=eh.$l.y,Dc=eh.angle,kd=df=Gs.angle,Hu!==ol&&(kd=Hu===Cg||Hu===n0?Dc+Gs.angle:Dc,df=$n.computeAngle(Hu,kd)),Vl.Kb=df,Vl.text=eh.text||"",Vl.measure(1/0,1/0,0,0);var Yh=Vl.measuredBounds,yh=Vl.naturalBounds,Xh=yh.width,ff=yh.height,vc=gr.alloc();vc.reset(),vc.translate(-Yh.x,-Yh.y),vc.scale(Vl.scale,Vl.scale),vc.rotate(kd,Xh/2,ff/2),Hu!==Pg&&Hu!==Eg||vc.rotate(90,Xh/2,ff/2),Hu!==_g&&Hu!==Lg||vc.rotate(-90,Xh/2,ff/2),Hu===i0&&(45<Dc&&135>Dc||225<Dc&&315>Dc)&&vc.rotate(-Dc,Xh/2,ff/2);var Zf=kn.allocAt(0,0,Xh,ff),Jh=Mt.alloc();Jh.xi(Zf,Vh),vc.Ga(Jh);var Kf=-Jh.x,Gy=-Jh.y,Sh=Mt.alloc();Sh.assign(Gp),isNaN(Sh.x)&&(Sh.x=Xh/2+3),isNaN(Sh.y)&&(Sh.y=-(ff/2+3)),Sh.rotate(Dc),em+=Sh.x+Kf,Wp+=Sh.y+Gy;var pf=new kn(em,Wp,Yh.width,Yh.height),tm=new kn(Yh.x,Yh.y,Yh.width,Yh.height),Wy=new kn(yh.x,yh.y,yh.width,yh.height);eh.Sz=df,eh.lineCount=Vl.lineCount,eh.lines=[Vl.Cb,Vl.Ih,Vl.df,Vl.Le,Vl.Qc,Vl.Qb,Vl.ze],eh.actualBounds=pf,eh.measuredBounds=tm,eh.naturalBounds=Wy,$h===0?Td.assign(pf):Td.ed(pf),Mt.free(Sh),Mt.free(Jh),kn.free(Zf),gr.free(vc)}zu.graduatedBounds!==null&&zu.graduatedBounds.push(Td),Ao(Y0,Td.x,Td.y,Td.width,Td.height)}ea(Gs,!1)}}},dg.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var b=a.Pb(),E=a.graduatedMarks;if(E!==null){var te=a.graduatedBounds,ne=0,ae=te[ne];ne++,b!==null&&b.arrange(ae.x-x.x,ae.y-x.y,ae.width,ae.height);for(var fe=y.length,_e=0;_e<fe;_e++){var Te=y[_e];ae=E[_e],Te.visible&&Te!==b&&ae.length!==0&&(ae=te[ne],ne++,Te.arrange(ae.x-x.x,ae.y-x.y,ae.width,ae.height))}a.graduatedBounds=null}}},dg.prototype.gc=function(a,y,x){var b=x.$i;x.$i=!0;var E=a.naturalBounds,te=E.width,ne=E.height;E=y instanceof Hl,y.save(),y.beginPath(),y.rect(-1,-1,te+1,ne+1),y.clip(),y.Se(),te=a.Pb(),te.gc(y,x),ne=a.Df()*x.scale,0>=ne&&(ne=1);for(var ae=te.actualBounds,fe=a.O.s,_e=a.graduatedMarks,Te=fe.length,je=0;je<Te;je++){var Ve=fe[je],Qe=_e[je],rt=Qe.length;if(Ve.visible&&Ve!==te&&Qe.length!==0){if(Ve instanceof dr){if(!(2>a.graduatedTickUnit*Ve.interval*te.geometry.flattenedTotalLength/a.graduatedRange*ne&&Ve.graduatedSkip===null)){var ct=Ve.measuredBounds,Dt=Ve.strokeWidth*Ve.scale,Lt=Ve.alignmentFocus;Lt.Mc()&&(Lt=qa);for(var Gt=0;Gt<rt;Gt++){var Zt=Qe[Gt].$l,Vt=Qe[Gt].angle,Qt=Lt,yn=Ve.Ab;yn.reset(),yn.translate(Zt.x+ae.x,Zt.y+ae.y),yn.rotate(Vt+Ve.angle,0,0),yn.translate(-ct.width*Qt.x+Qt.offsetX+Dt/2,-ct.height*Qt.y+Qt.offsetY+Dt/2),yn.scale(Ve.scale,Ve.scale),Iu(Ve,!1),Ve.wh.set(Ve.Ab),Ve.Kk=Ve.scale,mu(Ve,!1),Ve.gc(y,x),E&&(a.svg.appendChild(Ve.svg),Ve.svg=null),Ve.Ab.reset()}}}else if(Ve instanceof Mo)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Mo),ct=a.temporaryTextBlock,S1(ct,Ve),Dt=0;Dt<rt;Dt++)Lt=Qe[Dt],Lt.actualBounds&&Lt.measuredBounds&&Lt.naturalBounds&&(ct.ec=Lt.text||"",ct.Kb=Lt.Sz||0,ct.Gc=Lt.lineCount||0,Gt=Lt.lines,Gt!==void 0&&(ct.Cb=Gt[0],ct.Ih=Gt[1],ct.df=Gt[2],ct.Le=Gt[3],ct.Qc=Gt[4],ct.Qb=Gt[5],ct.ze=Gt[6]),Lt.naturalBounds&&(ct.dc=Lt.naturalBounds),Lt.actualBounds&&(Gt=Lt.actualBounds,ct.arrange(Gt.x,Gt.y,Gt.width,Gt.height)),Gt=Lt.actualBounds,ct.arrange(Gt.x,Gt.y,Gt.width,Gt.height),Zt=Lt.measuredBounds,Lt=Lt.naturalBounds,Vt=ct.Ab,Vt.reset(),Vt.translate(Gt.x+ae.x,Gt.y+ae.y),Vt.translate(-Zt.x,-Zt.y),ct.no(Vt,Lt.x,Lt.y,Lt.width,Lt.height),Iu(ct,!1),ct.wh.set(ct.Ab),ct.Kk=ct.scale,mu(ct,!1),ct.Ng=Ve.part,ct.Me=Ve.panel,ct.gc(y,x),ct.Me=null,ct.Ng=null,E&&(a.svg.appendChild(ct.svg),ct.svg=null))}}x.$i=b,y.restore(),y.Vc(!0)};function Wn(a,y){if(tn.call(this),this.na=null,a===void 0)this.na=Wn.Position;else if(typeof a=="string"){var x=$u.I(a);x!==null&&(this.na=x)}else a instanceof sa?this.na=a:a&&(this.na=Wn.Position,y=a);this.na===null&&Nt("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Wn.Grid?1048576:0),this.O=new Bn,this.yb=xa,this.Tm=oo,this.Uf=nr,this.$g=null,this.$e="",this.jg=new kn(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=mi,this.jn=Xo,this.kn=Gr,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}qe(Wn,tn),Wn.prototype.cloneProtected=function(a){tn.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},Wn.prototype.Af=function(a){tn.prototype.Af.call(this,a),a.O=this.O;for(var y=a.O.s,x=y.length,b=0;b<x;b++)y[b].Me=a;a.$g=null},Wn.prototype.copy=function(){var a=tn.prototype.copy.call(this);if(a!==null){for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b].copy();E.wi(a),E.Ng=null;var te=a.O,ne=te.count;if(te.Gb(ne,E),te=a.part,te!==null){te.Rh=null,E.portId!==null&&te instanceof oi&&(te.Te=!0);var ae=a.diagram;ae!==null&&ae.undoManager.isUndoingRedoing||te.cb(vs,"elements",a,null,E,null,ne)}}return a}return null},it=Wn.prototype,it.toString=function(){return"Panel("+this.type.name+")#"+Ir(this)},it.Pn=function(a){tn.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,b=0;b<x;b++)y[b].Pn(a)},it.hh=function(a,y){if(this.na===Wn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Wn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Wn.Table)if(a.yc(),a instanceof Hl){var x=a.yd;a.yd=pm(a,"gojs-ts"),gv(this,a),a.nh.pop(),a.yd=x}else gv(this,a);(x=this.isClipping&&this.na===Wn.Spot)&&a.save();for(var b=this.Pb(),E=this.O.s,te=E.length,ne=0;ne<te;ne++){var ae=E[ne];x&&ae===b&&(a.clipInsteadOfFill=!0),ae.gc(a,y),x&&ae===b&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function gv(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,b=0<a.columnCount?a.colDefs:null;x!==null&&Mm(a,y,!0,x,!0),b!==null&&Mm(a,y,!1,b,!0),x!==null&&o1(a,y,!0,x),b!==null&&o1(a,y,!1,b),x!==null&&Mm(a,y,!0,x,!1),b!==null&&Mm(a,y,!1,b,!1)}function o1(a,y,x,b){for(var E=b.length,te=a.actualBounds,ne=a.naturalBounds,ae=!0,fe=0;fe<E;fe++){var _e=b[fe];if(_e!==void 0&&_e.actual!==0)if(ae)ae=!1;else{if(x){if(_e.position>ne.height)continue}else if(_e.position>ne.width)continue;var Te=_e.separatorStrokeWidth;isNaN(Te)&&(Te=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var je=_e.separatorStroke;if(je===null&&(je=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),Te!==0&&je!==null){ws(a,y,je,!1,!1,ne,te),je=!1;var Ve=_e.separatorDashArray;Ve===null&&(Ve=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),Ve!==null&&(je=!0,y.js(Ve,0)),y.beginPath(),Ve=_e.position+Te,x?Ve>ne.height&&(Te-=Ve-ne.height):Ve>ne.width&&(Te-=Ve-ne.width),_e=_e.position+Te/2,y.lineWidth=Te,Te=a.yb,x?(_e+=Te.top,Ve=ne.width-Te.right,y.moveTo(Te.left,_e),y.lineTo(Ve,_e)):(_e+=Te.left,Ve=ne.height-Te.bottom,y.moveTo(_e,Te.top),y.lineTo(_e,Ve)),y.stroke(),y.Se(),je&&y.fs()}}}}function Mm(a,y,x,b,E){for(var te=b.length,ne=a.actualBounds,ae=a.naturalBounds,fe=s1(a,!0),_e=s1(a,!1),Te=0;Te<te;Te++){var je=b[Te];if(je!==void 0&&je.background!==null&&je.coversSeparators!==E&&je.actual!==0){var Ve=x?ne.height:ne.width;if(!(je.position>Ve)){var Qe=je.Wc(),rt=je.separatorStrokeWidth;isNaN(rt)&&(rt=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ct=je.separatorStroke;ct===null&&(ct=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(ct===null||je.index===(x?fe:_e))&&(rt=0),Qe-=rt,rt=je.position+rt,Qe+=je.actual,rt+Qe>Ve&&(Qe=Ve-rt),0>=Qe||(Ve=a.yb,ws(a,y,je.background,!0,!1,ae,ne),x?y.fillRect(Ve.left,rt+Ve.top,ne.width-(Ve.left+Ve.right),Qe):y.fillRect(rt+Ve.left,Ve.top,Qe,ne.height-(Ve.top+Ve.bottom)))}}}}function s1(a,y){for(var x=y?a.rowCount:a.columnCount,b=0;b<x;b++){var E=y?a.rowDefs[b]:a.colDefs[b];if(E!==void 0)return E.index}return 0}function mv(a){return a==="LineV"||a==="BarV"}it.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},it.kk=function(a,y,x){if(!tn.prototype.kk.call(this,a,y,x))return!1;if(this.type===Wn.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===Wn.Grid||this.na===Wn.Graduated)return this.svg.innerHTML="",this.svg.remove(),!1;x=this.O.s;for(var b=x.length,E=0;E<b;E++)x[E].gc(a,y);return!0},it.nk=function(){return!0},it.$o=function(a,y,x,b){if(!this.isClipping)if(this.Dd()&&a.bk!==null){a=a.bk,y=this.O.s;for(var E=0,te=0,ne=0;ne<y.length;ne++)if(y[ne].Ed()){var ae=y[ne].actualBounds;E=ne===0?ae.x:Math.min(ae.x,E),te=ne===0?ae.y:Math.min(ae.y,te)}b.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-E)+","+(a.y-x.y-te)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else tn.prototype.$o.call(this,a,y,x,b)},it.Sj=function(a,y,x,b,E){var te=this.se(),ne=this.transform,ae=1/(ne.m11*ne.m22-ne.m12*ne.m21),fe=ne.m22*ae,_e=-ne.m12*ae,Te=-ne.m21*ae,je=ne.m11*ae,Ve=ae*(ne.m21*ne.dy-ne.m22*ne.dx),Qe=ae*(ne.m12*ne.dx-ne.m11*ne.dy);if(this.areaBackground!==null)return ne=this.actualBounds,rn.Ff(ne.left,ne.top,ne.right,ne.bottom,a,y,x,b,E);if(this.background!==null)return te=a*fe+y*Te+Ve,ae=a*_e+y*je+Qe,a=x*fe+b*Te+Ve,fe=x*_e+b*je+Qe,E.h(0,0),x=this.naturalBounds,te=rn.Ff(0,0,x.width,x.height,te,ae,a,fe,E),E.transform(ne),te;te||(fe=1,Te=_e=0,je=1,Qe=Ve=0),ae=a*fe+y*Te+Ve,a=a*_e+y*je+Qe,fe=x*fe+b*Te+Ve,x=x*_e+b*je+Qe,E.h(fe,x),b=(fe-ae)*(fe-ae)+(x-a)*(x-a),_e=!1,je=this.O.s,Qe=je.length,Te=Mt.alloc(),Ve=null,y=1/0;var rt=null,ct=this.isClipping&&this.na===Wn.Spot;ct&&(rt=Mt.alloc(),Ve=this.Pb(),(_e=Ve.Sj(ae,a,fe,x,rt))&&(y=(ae-rt.x)*(ae-rt.x)+(a-rt.y)*(a-rt.y)));for(var Dt=0;Dt<Qe;Dt++){var Lt=je[Dt];Lt.visible&&Lt!==Ve&&Lt.Sj(ae,a,fe,x,Te)&&(_e=!0,Lt=(ae-Te.x)*(ae-Te.x)+(a-Te.y)*(a-Te.y),Lt<b&&(b=Lt,E.set(Te)))}return ct&&(y>b&&E.set(rt),Mt.free(rt)),Mt.free(Te),te&&E.transform(ne),_e},it.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();tn.prototype.Gj.call(this)},it.v=function(a){if(!iu(this)){tn.prototype.v.call(this,a),a=null,(this.na===Wn.Auto||this.na===Wn.Link)&&(a=this.Pb());for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];if((E===a||E.isPanelMain)&&E.v(!0),!E.desiredSize.w()){var te=gl(E,!1);(E instanceof rl||E instanceof Wn||E instanceof Mo||te!==jn)&&E.v(!0)}}}},it.Uj=function(){if(!iu(this)){ea(this,!0),Hc(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},it.Uk=function(){if(!(this.l&2048)){Iu(this,!0),mu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},it.Wu=function(){mu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},it.Wl=function(a,y,x,b){var E=this.jg;E.h(0,0,0,0);var te=this.desiredSize,ne=this.minSize;x===void 0&&(x=ne.width,b=ne.height),x=Math.max(x,ne.width),b=Math.max(b,ne.height);var ae=this.maxSize;isNaN(te.width)||(a=Math.min(te.width,ae.width)),isNaN(te.height)||(y=Math.min(te.height,ae.height)),a=Math.max(x,a),y=Math.max(b,y);var fe=this.yb;a=Math.max(a-fe.left-fe.right,0),y=Math.max(y-fe.top-fe.bottom,0);var _e=this.O.s;_e.length!==0&&this.na.measure(this,a,y,_e,E,x,b),a=E.width+fe.left+fe.right,fe=E.height+fe.top+fe.bottom,isFinite(te.width)&&(a=te.width),isFinite(te.height)&&(fe=te.height),a=Math.min(ae.width,a),fe=Math.min(ae.height,fe),a=Math.max(ne.width,a),fe=Math.max(ne.height,fe),a=Math.max(x,a),fe=Math.max(b,fe),Is(E,a,fe),Is(this.naturalBounds,a,fe),this.Ge(0,0,a,fe)},it.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 b=a[x];if(b.isPanelMain===!0)return this.$g=b}this.$g=a[0]}return this.$g};function hh(a){return a.part!==null?a.part.locationObject:null}it.eh=function(a,y,x,b){var E=this.O.s;if(this.actualBounds.h(a,y,x,b),E.length!==0){if(!this.desiredSize.w()){a=gl(this,!0);var te=this.measuredBounds;y=te.width,te=te.height;var ne=this.Kg,ae=ne.left+ne.right;switch(ne=ne.top+ne.bottom,y===x&&te===b&&(a=jn),a){case jn:(y>x||te>b)&&(this.v(),this.measure(y>x?x:y,te>b?b:te,0,0));break;case Gn:this.v(!0),this.measure(x+ae,b+ne,0,0);break;case _i:this.v(!0),this.measure(x+ae,te+ne,0,0);break;case Bi:this.v(!0),this.measure(y+ae,b+ne,0,0)}}this.na.arrange(this,E,this.jg)}},it.gh=function(a){var y=this.naturalBounds,x=hh(this);if(Eo(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=Mt.allocAt(0,0);b--;){var te=y[b];if((te.visible||te===x)&&(hr(E.set(a),te.transform),te.ca(E)))return Mt.free(E),!0}return Mt.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},it.ks=function(a){if(this.bindingId===a)return this;for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b].ks(a);if(E!==null)return E}return null},it.qm=function(a,y){if(y(this,a),a instanceof Wn){a=a.O.s;for(var x=a.length,b=0;b<x;b++)this.qm(a[b],y)}};function qd(a,y){a1(a,a,y)}function a1(a,y,x){x(y),y=y.O.s;for(var b=y.length,E=0;E<b;E++){var te=y[E];te instanceof Wn&&a1(a,te,x)}}function yx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof Wn){y=y.O.s;for(var b=y.length,E=0;E<b;E++)l1(a,y[E],x)}}it.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof Wn){y=y.O.s;for(var b=y.length,E=0;E<b;E++){var te=u1(a,y[E],x);if(te!==null)return te}}return null}it.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=fg(this));for(var b=0;b<x;b++){var E=y[b];if(E instanceof Wn){var te=E.fb(a);if(te!==null)return te}if(E.name===a)return E}return null};function c1(a){a=a.O.s;for(var y=a.length,x=0,b=0;b<y;b++){var E=a[b];E instanceof Wn?x=Math.max(x,c1(E)):E instanceof dr&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}it.se=function(){return!(this.type===Wn.TableRow||this.type===Wn.TableColumn)};function Oh(a){return a.type===Wn.TableRow||a.type===Wn.TableColumn}it.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),nl(this)))return null;var b=this.naturalBounds,E=1/this.Df(),te=this.se(),ne=te?a:hr(Mt.allocAt(a.x,a.y),this.transform),ae=this.diagram,fe=10,_e=5;if(ae!==null&&(fe=ae.Ql("extraTouchArea"),_e=fe/2),Eo(-(_e*E),-(_e*E),b.width+fe*E,b.height+fe*E,ne.x,ne.y)){if(!this.isAtomic){E=this.O.s;var Te=E.length;if(ae=Mt.alloc(),_e=(fe=this.isClipping&&this.na===Wn.Spot)?this.Pb():null,fe&&(_e.se()?hr(ae.set(a),_e.transform):ae.set(a),!_e.ca(ae)))return Mt.free(ae),te||Mt.free(ne),null;for(var je=hh(this);Te--;){var Ve=E[Te];if((Ve.visible||Ve===je)&&(Ve.se()?hr(ae.set(a),Ve.transform):ae.set(a),!fe||Ve!==_e)){var Qe=null;if(Ve instanceof Wn?Qe=Ve.ic(ae,y,x):Ve.pickable===!0&&Ve.ca(ae)&&(Qe=Ve),Qe!==null&&(y!==null&&(Qe=y(Qe)),Qe!==null&&(x===null||x(Qe))))return Mt.free(ae),te||Mt.free(ne),Qe}}Mt.free(ae)}return this.background===null&&this.areaBackground===null?(te||Mt.free(ne),null):(a=Eo(0,0,b.width,b.height,ne.x,ne.y)?this:null,te||Mt.free(ne),a)}return te||Mt.free(ne),null},it.ji=function(a,y,x,b){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var E=this.naturalBounds,te=this.se(),ne=te?a:hr(Mt.allocAt(a.x,a.y),this.transform);if(E=Eo(0,0,E.width,E.height,ne.x,ne.y),Oh(this)||E){if(!this.isAtomic){for(var ae=this.O.s,fe=ae.length,_e=Mt.alloc(),Te=hh(this);fe--;){var je=ae[fe];if(je.visible||je===Te){je.se()?hr(_e.set(a),je.transform):_e.set(a);var Ve=je;je=je instanceof Wn?je:null,(je!==null?je.ji(_e,y,x,b):Ve.ca(_e))&&Ve.pickable!==!1&&(y!==null&&(Ve=y(Ve)),Ve===null||x!==null&&!x(Ve)||b.add(Ve))}}Mt.free(_e)}return te||Mt.free(ne),E&&(this.background!==null||this.areaBackground!==null)}return te||Mt.free(ne),!1},it.Cf=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=te;if(te===void 0&&(ne=gr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&gr.free(ne),!0;if(this.Yc(a,ne)){if(!this.isAtomic)for(var ae=hh(this),fe=this.O.s,_e=fe.length;_e--;){var Te=fe[_e];if(Te.visible||Te===ae){var je=Te.actualBounds,Ve=this.naturalBounds;je.x>Ve.width||je.y>Ve.height||0>je.x+je.width||0>je.y+je.height||(je=Te,Te=Te instanceof Wn?Te:null,Ve=gr.alloc(),Ve.set(ne),(Te!==null?Te.Cf(a,y,x,b,E,Ve):ca(je,a,b,Ve))&&(y!==null&&(je=y(je)),je===null||x!==null&&!x(je)||E.add(je)),gr.free(Ve))}}return te===void 0&&gr.free(ne),b}return te===void 0&&gr.free(ne),!1};function vv(a,y,x,b){for(var E=a.O.s,te=E.length;te--;){var ne=E[te];if(ne.visible){var ae=ne.actualBounds,fe=a.naturalBounds;ae.x>fe.width||ae.y>fe.height||0>ae.x+ae.width||0>ae.y+ae.height||(ne instanceof Wn&&vv(ne,y,x,b),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||b.add(ne))}}}it.og=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;x===void 0&&(x=null),b===void 0&&(b=null);var ne=this.naturalBounds,ae=this.se(),fe=ae?a:hr(Mt.allocAt(a.x,a.y),this.transform),_e=ae?y:hr(Mt.allocAt(y.x,y.y),this.transform),Te=fe.Bf(_e),je=0<fe.x&&fe.x<ne.width&&0<fe.y&&fe.y<ne.height||eo(fe.x,fe.y,0,0,0,ne.height)<=Te||eo(fe.x,fe.y,0,ne.height,ne.width,ne.height)<=Te||eo(fe.x,fe.y,ne.width,ne.height,ne.width,0)<=Te||eo(fe.x,fe.y,ne.width,0,0,0)<=Te;if(ne=fe.zd(0,0)<=Te&&fe.zd(0,ne.height)<=Te&&fe.zd(ne.width,0)<=Te&&fe.zd(ne.width,ne.height)<=Te,ae||(Mt.free(fe),Mt.free(_e)),je){if(!this.isAtomic){fe=Mt.alloc(),_e=Mt.alloc(),Te=hh(this);for(var Ve=this.O.s,Qe=Ve.length;Qe--;){var rt=Ve[Qe];if(rt.visible||rt===Te){var ct=rt.actualBounds,Dt=this.naturalBounds;(!ae||!(ct.x>Dt.width||ct.y>Dt.height||0>ct.x+ct.width||0>ct.y+ct.height))&&(rt.se()?(ct=rt.transform,hr(fe.set(a),ct),hr(_e.set(y),ct)):(fe.set(a),_e.set(y)),ct=rt,rt=rt instanceof Wn?rt:null,(rt!==null?rt.og(fe,_e,x,b,E,te):ct.tx(fe,_e,E))&&(x!==null&&(ct=x(ct)),ct===null||b!==null&&!b(ct)||te.add(ct)))}}Mt.free(fe),Mt.free(_e)}return E?je:ne}return!1};function yv(a){var y=null;return a instanceof dr&&(y=a.spot1,y===oo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Xs),y}function Sv(a){var y=null;return a instanceof dr&&(y=a.spot2,y===oo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Na),y}it.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},it.M=function(a){return this.O.M(a)},it.Gb=function(a,y){y instanceof Ti&&Nt("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Nt("Cannot make a Panel contain itself: "+this.toString()),Nt("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Nt("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!==Wn.Grid||y instanceof dr||Nt("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Wn.Graduated||y instanceof dr||y instanceof Mo||Nt("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+y),y.wi(this),y.Ng=null,this.itemArray!==null){var b=y.data;b!==null&&typeof b=="object"&&(this.ge===null&&(this.ge=new ci),this.ge.add(b,y))}var E=this.O;if(b=-1,x===this){for(var te=-1,ne=this.O.s,ae=ne.length,fe=0;fe<ae;fe++)if(ne[fe]===y){te=fe;break}if(te!==-1){if(te===a||te+1>=E.count&&a>=E.count)return;E.mb(te),b=te}else Nt("element "+y.toString()+" has panel "+x.toString()+" but is not contained by it.")}(0>a||a>E.count)&&(a=E.count),E.Gb(a,y),(a===0||y.isPanelMain)&&(this.$g=null),iu(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Wn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||km(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof oi&&(x.Te=!0),x.Te&&x instanceof oi&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(ds,"elements",this,y,null,b,null),x.cb(vs,"elements",this,null,y,null,a)))};function xv(a,y){a.l=y?a.l|16777216:a.l&-16777217}it.remove=function(a){for(var y=this.O.s,x=y.length,b=-1,E=0;E<x;E++)if(y[E]===a){b=E;break}b!==-1&&this.pc(b,!0)},it.mb=function(a){0<=a&&this.pc(a,!0)},it.pc=function(a,y){var x=this.O,b=x.M(a);if(b.Ng=null,b.wi(null),this.ge!==null){var E=b.data;typeof E=="object"&&this.ge.remove(E)}x.mb(a),ea(this,!1),this.v(),this.$g===b&&(this.$g=null),this.graduatedIntervals=null;var te=this.part;te!==null&&(te.Rh=null,te.ag=NaN,te.Wb(),te instanceof oi&&(b instanceof Wn?b.qm(b,function(ne,ae){Gv(te,ae,y)}):Gv(te,b,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||te.cb(ds,"elements",this,b,null,a,null))},it.Fb=function(a){0>a&&Mn(a,">= 0",Wn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new ta;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(vs,"rowdefs",this,null,x,null,a)}return y[a]},it.oA=function(a){if(0>a&&Mn(a,">= 0",Wn,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(ds,"rowdefs",this,x,null,a,null),this.v()}}};function h1(a,y,x){var b=a.rowDefs;if(!(0>y)){if(b[y]=x instanceof ta?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}it.Eb=function(a){0>a&&Mn(a,">= 0",Wn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new ta;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(vs,"coldefs",this,null,x,null,a)}return y[a]},it.jA=function(a){if(0>a&&Mn(a,">= 0",Wn,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(ds,"coldefs",this,x,null,a,null),this.v()}}};function d1(a,y,x){var b=a.colDefs;if(!(0>y)){if(b[y]=x instanceof ta?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}it.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&Am(y,a),this},it.Hy=function(a,y){return(a=this.Fb(a))&&Am(a,new ta(y)),this},it.By=function(a,y){return(a=this.Eb(a))&&Am(a,new ta(y)),this},it.nz=function(a){if(0>a||this.type!==Wn.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,b=x.length,E=this.topIndex;E<b;E++){var te=x[E];if(te!==void 0&&(y+=te.total,a<y))break}return E},it.fz=function(a){if(0>a||this.type!==Wn.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,b=x.length,E=this.leftIndex;E<b;E++){var te=x[E];if(te!==void 0&&(y+=te.total,a<y))break}return E},it.Fz=function(a,y){if(y===void 0&&(y=new Mt(NaN,NaN)),this.type!==Wn.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)},it.Gz=function(a){if(this.type!==Wn.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function f1(a){return a=a.allBindings,a!==null&&a._isFrozen}function Ru(a){var y=a.allBindings;if(y===null)a.data!==null&&Nt("Template cannot have .data be non-null: "+a),a.allBindings=y=new Bn;else if(y._isFrozen)return;var x=new Bn;xv(a,!1),a.qm(a,function(_e,Te){Te.th();var je=Te.localBindings;if(je!==null)for(Ef(Te,!1),je=je.iterator;je.next();){var Ve=je.value;Ve.mode===Dg&&Ef(Te,!0);var Qe=Ve.sourceName;Qe!==null&&(Qe==="/"&&xv(_e,!0),Qe=LS(Ve,_e,Te),Qe!==null&&(x.add(Qe),Qe.srcBindings===null&&(Qe.srcBindings=new Bn),Qe.srcBindings.add(Ve))),y.add(Ve)}if(Te instanceof Wn&&Te.type===Wn.Table){if(0<Te.rowCount){for(_e=Te.rowDefs,je=_e.length,Ve=0;Ve<je;Ve++)if(Qe=_e[Ve],Qe!==void 0&&Qe.be!==null)for(var rt=Qe.be.iterator;rt.next();){var ct=rt.value;ct.xd=Qe,ct.to=2,ct.wl=Qe.index,y.add(ct)}}if(0<Te.columnCount){for(Te=Te.colDefs,_e=Te.length,je=0;je<_e;je++)if(Ve=Te[je],Ve!==void 0&&Ve.be!==null)for(Qe=Ve.be.iterator;Qe.next();)rt=Qe.value,rt.xd=Ve,rt.to=1,rt.wl=Ve.index,y.add(rt)}}});for(var b=x.iterator;b.next();){var E=b.value;if(E.srcBindings!==null){Ef(E,!0);for(var te=E.srcBindings.iterator;te.next();){var ne=te.value;E.localBindings===null&&(E.localBindings=new Bn),E.localBindings.add(ne)}}E.srcBindings=null}for(b=y.iterator;b.next();)if(E=b.value,te=E.xd,te!==null){E.xd=null;var ae=E.targetProperty,fe=ae.indexOf(".");0<fe&&te instanceof Wn&&(ne=ae.substring(0,fe),ae=ae.substr(fe+1),fe=te.fb(ne),fe!==null?(te=fe,E.targetProperty=ae):Dn('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+E.toString())),te instanceof ta?(ne=Ir(te.panel),E.Ai=ne===void 0?-1:ne,te.panel.bindingId=E.Ai):te instanceof tn?(ne=Ir(te),E.Ai=ne===void 0?-1:ne,te.bindingId=E.Ai):Nt("Unknown type of binding target: "+te)}y.freeze(),a instanceof Ti&&a.Zc()&&a.Va()}it.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return yx(y,function(x){x instanceof Wn&&(x.allBindings=null,x.ub=null);var b=x.localBindings;b!==null&&(x.localBindings=null,b.each(function(E){x.bind(E.copy())})),b=x.animationTriggers,b!==null&&(x.animationTriggers=null,b.each(function(E){x.Jv(E.value.copy())}))}),a&&Ru(y),y},it.La=function(a){var y=this.allBindings;if(y!==null)for(a===void 0&&(a=""),y=y.iterator;y.next();){var x=y.value,b=x.sourceProperty;if((a===""||b===""||b===a)&&(b=x.targetProperty,x.converter!==null||b!=="")){b=this.data;var E=x.sourceName;if(E!==null){if(E==="")b=this;else if(E==="/")b=this;else if(E===".")b=this;else if(E==="..")b=this;else if(b=this.fb(E),b===null)continue}else if(x.isToModel)if(b=this.diagram,b!==null)b=b.model.modelData;else continue;var te=this,ne=x.Ai;if(ne!==-1){if(te=this.ks(ne),te===null)continue}else x.xd!==null&&(te=x.xd);if(E==="/"?b=te.part:E==="."?b=te:E===".."&&(b=te.panel),E=x.to,E!==0){if(!(te instanceof Wn))continue;E===1?te=te.Eb(x.wl):E===2&&(te=te.Fb(x.wl))}te!==void 0&&x.Mv(te,b)}}},it.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function Sx(a,y){a=a.O.s;for(var x=a.length,b=y.length,E=0,te=null;E<x&&(te=a[E],!(te instanceof Wn&&te.data!==null));)E++,te=a[E];if(x-E!==b)return!0;if(te===null)return 0<b;for(var ne=0;E<x&&ne<b;){if(te=a[E],!(te instanceof Wn)||te.data!==y[ne])return!0;E++,ne++}return!1}function fg(a){if(a.type===Wn.Spot||a.type===Wn.Auto)return Math.min(a.O.length,1);if(a.type===Wn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof dr&&b.isPanelMain))break}return x}return a.type===Wn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Wn&&Oh(a))?1:0}it.mv=function(){for(var a=fg(this);this.O.length>a;)this.pc(this.O.length-1,!1);p1(this,this.itemArray)};function p1(a,y){var x=fg(a);if(y===null||y.length===0)for(;a.O.length>x;)a.pc(a.O.length-1,!1);else if(a.O.length<=x){x=y.length;for(var b=0;b<x;b++)Tm(a,y[b],b,!0)}else{b=x;for(var E=0;E<y.length;E++,b++){var te=y[E],ne=b<a.O.length?a.O.M(b):null;if(ne instanceof Wn){if(ne.data!==te){var ae=bv(a,ne.data),fe=bv(a,te),_e=fe!==ae;_e||(ae=Cv(a,ae),_e=Cv(a,fe)!==ae),_e?(a.pc(b,!1),Tm(a,te,E,!1)):ne.data=te}}else Tm(a,te,E,!1)}for(;b<a.O.length;)a.pc(b,!1);a.$g=null,wv(a,x,0),iu(a)||a.v(),a.graduatedIntervals=null,a.If()||km(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof oi&&(y.Te=!0),y.Te&&y instanceof oi&&(y.wc=null))}}function Tm(a,y,x,b){if(!(y==null||0>x)){var E=bv(a,y);if(E=Cv(a,E),E!==null){if(Ru(E),E=E.copy(),E.l&16777216){var te=a.ih();te!==null&&xv(te,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new ci),a.ge.add(y,E)),te=x+fg(a),a.Gb(te,E),b&&(E.ub=y,wv(a,te,x),E.ub=null),E.data=y}}}function wv(a,y,x){for(a=a.O;y<a.length;){var b=a.M(y);if(b instanceof Wn){var E=y,te=x;b.type===Wn.TableRow?b.row=E:b.type===Wn.TableColumn&&(b.column=E),b.itemIndex=te}y++,x++}}function bv(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=Os(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;Nt("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function Cv(a,y){var x=a.itemTemplateMap,b=null;return x!==null&&(b=x.I(y)),b===null&&(x!==null&&(b=x.I("")),b===null&&(g1||(g1=!0,Dn('No item template Panel found for category "'+y+'" on '+a),Dn(" Using default item template."),a=new Wn,y=new Mo,y.bind(new Hs("text","",hi)),a.add(y),m1=a),b=m1)),b}function km(a,y,x){var b=y.enabledChanged;if(b!==null&&b(y,x),y instanceof Wn){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var te=y[E];x&&te instanceof Wn&&!te.isEnabled||km(a,te,x)}}}function kc(a,y){y.name=a,$u.add(a,y)}Ye.Object.defineProperties(Wn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Wn.Grid,this.v(),this.g("type",y,a))}},elements:{get:function(){return this.O.iterator}},naturalBounds:{get:function(){return this.dc}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"?(0>a&&Mn(a,">= 0",Wn,"padding"),a=new Mi(a)):(0>a.left&&Mn(a.left,">= 0",Wn,"padding:value.left"),0>a.right&&Mn(a.right,">= 0",Wn,"padding:value.right"),0>a.top&&Mn(a.top,">= 0",Wn,"padding:value.top"),0>a.bottom&&Mn(a.bottom,">= 0",Wn,"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:xa},set:function(a){typeof a=="number"&&(a=new Mi(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new Su),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 fo)&&(a instanceof fo&&a.freeze(),this.T===null&&(this.T=new Su),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 Su),this.T.Ha=a,this.v(),this.g("defaultRowSeparatorStrokeWidth",y,a))}},defaultRowSeparatorDashArray:{get:function(){return this.T!==null?this.T.V:null},set:function(a){var y=this.defaultRowSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var te=a[E];typeof te=="number"&&0<=te&&isFinite(te)||Nt("defaultRowSeparatorDashArray value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new Su),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 fo)&&(a instanceof fo&&a.freeze(),this.T===null&&(this.T=new Su),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 Su),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,b=0,E=0;E<x;E++){var te=a[E];typeof te=="number"&&0<=te&&isFinite(te)||Nt("defaultColumnSeparatorDashArray value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new Su),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 Su),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||Nt("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Lc(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()||Nt("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Lc(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 dh),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),Ta(this)&&(a=this.part,a!==null&&zo(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 dh),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),Ta(this)&&(a=this.part,a!==null&&zo(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 dh),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 dh),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 dh,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 dh,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 dh,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 dh,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 Su),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new Su),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:Om},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new Su),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:Om},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new Su),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)&&Nt("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Su),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)&&Nt("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Su),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 Ti&&!(this instanceof qr);Ru(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof $n?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Ti&&(y!==null&&x.cf.remove(y),a!==null&&x.cf.add(a,this))):(x=this.panel,x!==null&&x.ge!==null&&(y!==null&&x.ge.remove(y),a!==null&&x.ge.add(a,this)))),this.g("data",y,a),b!==null&&b.undoManager.isUndoingRedoing||a!==null&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var y=this.zn;y!==a&&(this.zn=a,this.g("itemIndex",y,a))}},allBindings:{get:function(){return this.A!==null?this.A.nb:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new Lf),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&Sx(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&uy(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&ly(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||p1(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 ci}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Ti||a.isPanelMain)&&Nt("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(););yr(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&&(yr(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 tr&&(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&&km(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))}}}),Ye.Object.defineProperties(Wn,{Position:{get:function(){return $u.I("Position")}},Horizontal:{get:function(){return $u.I("Horizontal")}},Vertical:{get:function(){return $u.I("Vertical")}},Spot:{get:function(){return $u.I("Spot")}},Auto:{get:function(){return $u.I("Auto")}},Table:{get:function(){return $u.I("Table")}},Viewbox:{get:function(){return $u.I("Viewbox")}},TableRow:{get:function(){return $u.I("TableRow")}},TableColumn:{get:function(){return $u.I("TableColumn")}},Link:{get:function(){return $u.I("Link")}},Grid:{get:function(){return $u.I("Grid")}},Graduated:{get:function(){return $u.I("Graduated")}}}),Wn.prototype.rebuildItemElements=Wn.prototype.mv,Wn.prototype.findItemPanelForData=Wn.prototype.sx,Wn.prototype.updateTargetBindings=Wn.prototype.La,Wn.prototype.copyTemplate=Wn.prototype.Uy,Wn.prototype.graduatedValueForPoint=Wn.prototype.Gz,Wn.prototype.graduatedPointForValue=Wn.prototype.Fz,Wn.prototype.findColumnForLocalX=Wn.prototype.fz,Wn.prototype.findRowForLocalY=Wn.prototype.nz,Wn.prototype.addColumnDefinition=Wn.prototype.By,Wn.prototype.addRowDefinition=Wn.prototype.Hy,Wn.prototype.addRowColumnDefinition=Wn.prototype.Gy,Wn.prototype.removeColumnDefinition=Wn.prototype.jA,Wn.prototype.getColumnDefinition=Wn.prototype.Eb,Wn.prototype.removeRowDefinition=Wn.prototype.oA,Wn.prototype.getRowDefinition=Wn.prototype.Fb,Wn.prototype.removeAt=Wn.prototype.mb,Wn.prototype.remove=Wn.prototype.remove,Wn.prototype.insertAt=Wn.prototype.Gb,Wn.prototype.elt=Wn.prototype.M,Wn.prototype.add=Wn.prototype.add,Wn.prototype.findObject=Wn.prototype.fb,Wn.prototype.findInVisualTree=Wn.prototype.Nl,Wn.prototype.walkVisualTreeFrom=Wn.prototype.qm,Wn.prototype.findMainElement=Wn.prototype.Pb;var g1=!1,m1=null,$u=new ci;Wn.className="Panel",Wn.definePanelLayout=kc,kc("Position",new vm),kc("Vertical",new Sm),kc("Auto",new wm),kc("Link",new Lm);function dh(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}dh.prototype.copy=function(){var a=new dh;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},dh.className="GradPanelSettings";function Su(){this.Pc=[],this.Oc=[],this.j=this.ob=Om,this.hb=this.Hb=0,this.Qp=xa,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}Su.prototype.copy=function(a){for(var y=new Su,x=this.Pc,b=x.length,E=y.Pc,te=0;te<b;te++)if(x[te]!==void 0){var ne=x[te].copy();ne.wi(a),E[te]=ne}for(x=this.Oc,b=x.length,E=y.Oc,te=0;te<b;te++)x[te]!==void 0&&(ne=x[te].copy(),ne.wi(a),E[te]=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},Su.className="TablePanelSettings";function ta(a){pr(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=oo,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Pv,this.hg=nr,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))}ta.prototype.copy=function(){var a=new ta;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=Nn(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function Am(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=Nn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}it=ta.prototype,it.qb=function(a){a.classType===ta&&(this.sizing=a)},it.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Ir(this)},it.wi=function(a){this.Me=a},it.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)},it.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===Wn.Table)for(var E=b?y.rowDefs.length:y.colDefs.length,te=0;te<E;te++){var ne=b?y.rowDefs[te]:y.colDefs[te];if(ne!==void 0&&ne.oa!==0){x=ne.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=b?y.defaultRowSeparatorStroke:y.defaultColumnSeparatorStroke),x!==null&&(a=this.separatorStrokeWidth,isNaN(a)&&(y!==null?a=b?y.defaultRowSeparatorStrokeWidth:y.defaultColumnSeparatorStrokeWidth:a=0))),b=this.dg,b===null)if(y!==null)b=y.defaultSeparatorPadding;else return a;return a+(this.isRow?b.top+b.bottom:b.left+b.right)},it.Ob=function(a,y,x){var b=this.Me;if(b!==null&&(b.cb(Vo,a,this,y,x,void 0,void 0),this.be!==null&&(y=b.diagram,y!==null&&!y.skipsModelSourceBindings&&(b=b.ih(),b!==null&&(y=b.data,y!==null)))))for(x=this.be.iterator;x.next();)x.value.sp(this,y,a,b)};function Nm(a){if(a.sizing===Pv){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}it.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new Hs(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&f1(y)&&Nt("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new Bn),this.be.add(E),this},Ye.Object.defineProperties(ta.prototype,{panel:{get:function(){return this.Me}},isRow:{get:function(){return this.uq},set:function(a){this.uq=a}},index:{get:function(){return this.Za},set:function(a){this.Za=a}},height:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&Mn(a,">= 0",ta,"height"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("height",y,a))}},width:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&Mn(a,">= 0",ta,"width"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("width",y,a))}},minimum:{get:function(){return this.jj},set:function(a){var y=this.jj;y!==a&&((0>a||!isFinite(a))&&Mn(a,">= 0",ta,"minimum"),this.jj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("minimum",y,a))}},maximum:{get:function(){return this.hj},set:function(a){var y=this.hj;y!==a&&(0>a&&Mn(a,">= 0",ta,"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 Mi(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&&Tf(a,"RowColumnDefinition.separatorStroke"),a instanceof fo&&a.freeze(),this.lo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStroke",y,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var y=this.mo;y!==a&&(this.mo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStrokeWidth",y,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var y=this.tj;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var te=a[E];typeof te=="number"&&0<=te&&isFinite(te)||Nt("separatorDashArray value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===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&&Tf(a,"RowColumnDefinition.background"),a instanceof fo&&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}}}),ta.prototype.computeEffectiveSpacing=ta.prototype.Wc,ta.prototype.computeEffectiveSpacingTop=ta.prototype.Io;var Pv=new Ln(ta,"Default",0),pg=new Ln(ta,"None",1),Om=new Ln(ta,"ProportionalExtra",2);ta.className="RowColumnDefinition",ta.Default=Pv,ta.None=pg,ta.ProportionalExtra=Om;function dr(a,y){tn.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)}qe(dr,tn),dr.prototype.cloneProtected=function(a){tn.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=Nn(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 Lv:a.Na.nc&&(a.Na=a.Na.copy())}it=dr.prototype,it.th=function(){tn.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},it.qb=function(a){a===jn||a===mi||a===Dr||a===nr?this.geometryStretch=a:tn.prototype.qb.call(this,a)},it.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Ir(this)};function pp(a,y,x,b){var E=x.length;if(!(4>E)){var te=b.measuredBounds,ne=Math.max(1,te.width);te=te.height;for(var ae=x[0],fe=x[1],_e,Te,je,Ve,Qe,rt,ct=0,Dt=Hn(),Lt=2;Lt<E;Lt+=2)_e=x[Lt],Te=x[Lt+1],je=_e-ae,ae=Te-fe,je===0&&(je=.001),Ve=ae/je,Qe=Math.atan2(ae,je),rt=Math.sqrt(je*je+ae*ae),Dt.push([je,Qe,Ve,rt]),ct+=rt,ae=_e,fe=Te;ae=x[0],fe=x[1],je=b.measuredBounds.width,b instanceof dr&&(je-=b.strokeWidth),1>je&&(je=1),E=x=je,_e=ne/2,Te=_e!==0,Lt=0,rt=Dt[Lt],je=rt[0],Qe=rt[1],Ve=rt[2],rt=rt[3];for(var Gt=0;.1<=ct;){if(Gt===0&&(Te?(E=x,E-=_e,ct-=_e,Te=!1):E=x,E===0&&(E=1)),E>ct){ei(Dt);return}E>rt?(Gt=E-rt,E=rt):Gt=0;var Zt=Math.sqrt(E*E/(1+Ve*Ve));if(0>je&&(Zt=-Zt),ae+=Zt,fe+=Ve*Zt,a.translate(ae,fe),a.rotate(Qe),a.translate(-(ne/2),-(te/2)),Gt===0&&b.hh(a,y),a.translate(ne/2,te/2),a.rotate(-Qe),a.translate(-ae,-fe),ct-=E,rt-=E,Gt!==0){if(Lt++,Lt===Dt.length){ei(Dt);return}rt=Dt[Lt],je=rt[0],Qe=rt[1],Ve=rt[2],rt=rt[3],E=Gt}}ei(Dt)}}it.hh=function(a,y){var x=this.xc,b=this.Ui;if(x!==null||b!==null){var E=this.ua;if(E!==null){a.yc();var te=this.actualBounds,ne=this.naturalBounds;b!==null&&ws(this,a,b,!0,!1,ne,te);var ae=this.part,fe=this.ig;if(x===null||fe!==0||ae===null||!this.isPanelMain&&ae.Pb()!==this||(fe=ae.type===Wn.Link&&ae instanceof qr&&ae.category==="Selection"&&ae.adornedObject instanceof dr&&ae.adornedPart.Pb()===ae.adornedObject?ae.adornedObject.strokeWidth:0),fe===0&&(x=null),x!==null&&fe!==0&&(ws(this,a,x,!1,!1,ne,te),a.lineWidth=fe,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),te=!1,ae&&y.Gf("drawShadows")&&(te=ae.isShadowed),a.Il===!1&&(te=!1),ae=!0,x===null||b!==null&&b!=="transparent"||(ae=!1),ne=!1,fe=this.strokeDashArray,fe!==null&&(ne=!0,a.js(fe,this.strokeDashOffset)),E.type===Yn.j)a.beginPath(),a.moveTo(E.startX,E.startY),a.lineTo(E.endX,E.endY),x!==null&&a.jk(),a.Se();else if(E.type===Yn.u){var _e=E.startX;fe=E.startY;var Te=E.endX,je=E.endY;E=Math.min(_e,Te);var Ve=Math.min(fe,je);_e=Math.abs(Te-_e),fe=Math.abs(je-fe),a.beginPath(),a.rect(E,Ve,_e,fe),b!==null&&a.ng(b),x!==null&&(ae&&te&&Uc(a),a.jk(),ae&&te&&lh(a)),a.Se()}else if(E.type===Yn.F)_e=E.startX,fe=E.startY,Te=E.endX,je=E.endY,E=Math.abs(Te-_e)/2,Ve=Math.abs(je-fe)/2,_e=Math.min(_e,Te)+E,fe=Math.min(fe,je)+Ve,a.beginPath(),a.moveTo(_e,fe-Ve),a.bezierCurveTo(_e+rn.wg*E,fe-Ve,_e+E,fe-rn.wg*Ve,_e+E,fe),a.bezierCurveTo(_e+E,fe+rn.wg*Ve,_e+rn.wg*E,fe+Ve,_e,fe+Ve),a.bezierCurveTo(_e-rn.wg*E,fe+Ve,_e-E,fe+rn.wg*Ve,_e-E,fe),a.bezierCurveTo(_e-E,fe-rn.wg*Ve,_e-rn.wg*E,fe-Ve,_e,fe-Ve),a.closePath(),b!==null&&a.ng(b),x!==null&&(ae&&te&&Uc(a),a.jk(),ae&&te&&lh(a)),a.Se();else if(E.type===Yn.o)for(E=E.figures,fe=E.length,Ve=0;Ve<fe;Ve++){_e=E.s[Ve],a.beginPath(),a.moveTo(_e.startX,_e.startY),Te=_e.segments.s,je=Te.length;for(var Qe=null,rt=0;rt<je;rt++){var ct=Te[rt];switch(ct.type){case Ms:a.moveTo(ct.endX,ct.endY);break;case xo:a.lineTo(ct.endX,ct.endY);break;case ga:a.bezierCurveTo(ct.point1X,ct.point1Y,ct.point2X,ct.point2Y,ct.endX,ct.endY);break;case dl:a.quadraticCurveTo(ct.point1X,ct.point1Y,ct.endX,ct.endY);break;case cs:if(ct.radiusX===ct.radiusY){var Dt=Math.PI/180;a.arc(ct.point1X,ct.point1Y,ct.radiusX,ct.startAngle*Dt,(ct.startAngle+ct.sweepAngle)*Dt,0>ct.sweepAngle,Qe!==null?Qe.endX:_e.startX,Qe!==null?Qe.endY:_e.startY)}else if(Qe=Da(ct,_e),Dt=Qe.length,Dt===0)a.lineTo(ct.centerX,ct.centerY);else for(var Lt=0;Lt<Dt;Lt++){var Gt=Qe[Lt];Lt===0&&a.lineTo(Gt[0],Gt[1]),a.bezierCurveTo(Gt[2],Gt[3],Gt[4],Gt[5],Gt[6],Gt[7])}break;case Cl:if(Lt=Dt=0,Qe!==null&&Qe.type===cs){if(Qe=Da(Qe,_e),Gt=Qe.length,Gt===0){a.lineTo(ct.endX,ct.endY);break}Qe=Qe[Gt-1]||null,Qe!==null&&(Dt=Qe[6],Lt=Qe[7])}else Dt=Qe!==null?Qe.endX:_e.startX,Lt=Qe!==null?Qe.endY:_e.startY;if(Qe=$s(ct,_e,Dt,Lt),Dt=Qe.length,Dt===0){a.lineTo(ct.endX,ct.endY);break}for(Lt=0;Lt<Dt;Lt++)Gt=Qe[Lt],a.bezierCurveTo(Gt[2],Gt[3],Gt[4],Gt[5],Gt[6],Gt[7]);break;default:Nt("Segment not of valid type: "+ct.type)}ct.isClosed&&a.closePath(),Qe=ct}Te=_e.isFilled,te?_e.isShadowed?(Te===!0&&b!=="transparent"&&b!==null&&a.ng(b,_e.isEvenOdd),x!==null&&(Te&&ae&&Uc(a),a.jk(),Te&&ae&&lh(a))):(Uc(a),Te&&b!=="transparent"&&b!==null&&a.ng(b,_e.isEvenOdd),x!==null&&a.jk(),lh(a)):(Te&&b!==null&&a.ng(b,_e.isEvenOdd),x!==null&&a.jk()),a.Se(Ve)}if(ne&&a.fs(),this.pathPattern!==null){if(x=this.pathPattern,x.measure(1/0,1/0),b=x.measuredBounds,x.arrange(0,0,b.width,b.height),te=this.geometry,a.save(),a.beginPath(),b=Hn(),te.type===Yn.j)b.push(te.startX),b.push(te.startY),b.push(te.endX),b.push(te.endY),pp(a,y,b,x);else if(te.type===Yn.o)for(te=te.figures.iterator;te.next();){for(ae=te.value,b.length=0,b.push(ae.startX),b.push(ae.startY),ne=ae.startX,E=ae.startY,fe=ne,Ve=E,_e=ae.segments.s,Te=_e.length,je=0;je<Te;je++){switch(rt=_e[je],rt.type){case Ms:pp(a,y,b,x),b.length=0,b.push(rt.endX),b.push(rt.endY),ne=rt.endX,E=rt.endY,fe=ne,Ve=E;break;case xo:b.push(rt.endX),b.push(rt.endY),ne=rt.endX,E=rt.endY;break;case ga:rn.Qe(ne,E,rt.point1X,rt.point1Y,rt.point2X,rt.point2Y,rt.endX,rt.endY,.5,b),ne=rt.endX,E=rt.endY;break;case dl:rn.ep(ne,E,rt.point1X,rt.point1Y,rt.endX,rt.endY,.5,b),ne=rt.endX,E=rt.endY;break;case cs:if(ct=Da(rt,ae),Qe=ct.length,Qe===0){b.push(rt.centerX),b.push(rt.centerY),ne=rt.centerX,E=rt.centerY;break}for(Dt=0;Dt<Qe;Dt++)Lt=ct[Dt],rn.Qe(ne,E,Lt[2],Lt[3],Lt[4],Lt[5],Lt[6],Lt[7],.5,b),ne=Lt[6],E=Lt[7];break;case Cl:if(ct=$s(rt,ae,ne,E),Qe=ct.length,Qe===0){b.push(rt.endX),b.push(rt.endY),ne=rt.endX,E=rt.endY;break}for(Dt=0;Dt<Qe;Dt++)Lt=ct[Dt],rn.Qe(ne,E,Lt[2],Lt[3],Lt[4],Lt[5],Lt[6],Lt[7],.5,b),ne=Lt[6],E=Lt[7];break;default:Nt("Segment not of valid type: "+rt.type)}rt.isClosed&&(b.push(fe),b.push(Ve),pp(a,y,b,x))}pp(a,y,b,x)}else if(te.type===Yn.u)b.push(te.startX),b.push(te.startY),b.push(te.endX),b.push(te.startY),b.push(te.endX),b.push(te.endY),b.push(te.startX),b.push(te.endY),b.push(te.startX),b.push(te.startY),pp(a,y,b,x);else if(te.type===Yn.F){if(E=new Vs,E.startX=te.endX,E.startY=(te.startY+te.endY)/2,ne=new $r(cs),ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(te.startX+te.endX)/2,ne.centerY=(te.startY+te.endY)/2,ne.radiusX=Math.abs(te.startX-te.endX)/2,ne.radiusY=Math.abs(te.startY-te.endY)/2,E.add(ne),te=Da(ne,E),ae=te.length,ae===0)b.push(ne.centerX),b.push(ne.centerY);else for(ne=E.startX,E=E.startY,fe=0;fe<ae;fe++)Ve=te[fe],rn.Qe(ne,E,Ve[2],Ve[3],Ve[4],Ve[5],Ve[6],Ve[7],.5,b),ne=Ve[6],E=Ve[7];pp(a,y,b,x)}ei(b),a.restore(),a.Vc(!1)}}}},it.kk=function(a,y,x){return!tn.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)},it.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:tn.prototype.nk.call(this,a)},it.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)}},it.ga=function(a,y){if(y===void 0&&(y=new Mt),a instanceof yi){a.Mc()&&Nt("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var x=this.naturalBounds,b=this.strokeWidth;y.h(a.x*(x.width+b)-b/2+x.x+a.offsetX,a.y*(x.height+b)-b/2+x.y+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},it.mi=function(a){a===void 0&&(a=new kn);var y=this.naturalBounds,x=this.oe;y=kn.allocAt(y.x,y.y,y.width,y.height);var b=this.strokeWidth;return y.Bc(b/2,b/2),b=Mt.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),Ao(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),Ao(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),Ao(a,b.x,b.y,0,0),kn.free(y),Mt.free(b),a},it.gh=function(a,y){var x=this.geometry;if(x===null||this.fill===null&&this.stroke===null)return!1;var b=x.bounds,E=this.strokeWidth/2;x.type!==Yn.j||y||(E+=2);var te=kn.alloc();if(te.assign(b),te.Bc(E+2,E+2),!te.ca(a))return kn.free(te),!1;if(b=E+1e-4,x.type===Yn.j)return this.stroke===null||(b=(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>b)?!1:(kn.free(te),rn.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===Yn.u){y=x.startX;var ne=x.startY,ae=x.endX;if(x=x.endY,te.x=Math.min(y,ae),te.y=Math.min(ne,x),te.width=Math.abs(ae-y),te.height=Math.abs(x-ne),this.fill===null){if(te.Bc(-b,-b),te.ca(a))return kn.free(te),!1;te.Bc(b,b)}return this.stroke!==null&&te.Bc(E,E),a=te.ca(a),kn.free(te),a}if(x.type===Yn.F){ne=x.startX,E=x.startY,ae=x.endX;var fe=x.endY;if(x=Math.min(ne,ae),y=Math.min(E,fe),ne=Math.abs(ae-ne)/2,E=Math.abs(fe-E)/2,x=a.x-(x+ne),y=a.y-(y+E),this.fill===null){if(ne-=b,E-=b,0>=ne||0>=E||1>=x*x/(ne*ne)+y*y/(E*E))return kn.free(te),!1;ne+=b,E+=b}return this.stroke!==null&&(ne+=b,E+=b),kn.free(te),0>=ne||0>=E?!1:1>=x*x/(ne*ne)+y*y/(E*E)}if(x.type===Yn.o)return kn.free(te),this.fill===null?Wu(x,a.x,a.y,E):Mu(x,a,E,1<this.strokeWidth,y);Nt("Unknown Geometry type: "+x.type)},it.Wl=function(a,y,x,b){var E=this.desiredSize,te=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var ne=this.geometry.bounds;else{var ae=this.figure,fe=Ev[ae];if(fe===void 0){var _e=rn.Ze[ae];typeof _e=="string"&&(_e=rn.Ze[_e]),typeof _e=="function"?(fe=_e(null,100,100),Ev[ae]=fe):Nt("Unsupported Figure: "+ae)}ne=fe.bounds}ae=ne.width,fe=ne.height,_e=ne.width;var Te=ne.height;switch(gl(this,!0)){case jn:b=x=0;break;case Gn:_e=Math.max(a-te,0),Te=Math.max(y-te,0);break;case _i:_e=Math.max(a-te,0),b=0;break;case Bi:x=0,Te=Math.max(y-te,0)}isFinite(E.width)&&(_e=E.width),isFinite(E.height)&&(Te=E.height);var je=this.maxSize,Ve=this.minSize;switch(x=Math.max(x-te,Ve.width),b=Math.max(b-te,Ve.height),_e=Math.min(je.width,_e),Te=Math.min(je.height,Te),_e=isFinite(_e)?Math.max(x,_e):Math.max(ae,x),Te=isFinite(Te)?Math.max(b,Te):Math.max(fe,b),x=_v(this),x){case jn:break;case Gn:ae=_e,fe=Te;break;case mi:x=Math.min(_e/ae,Te/fe),isFinite(x)||(x=1),ae*=x,fe*=x;break;default:Nt(x+" is not a valid geometryStretch.")}this.Rd!==null?(ae===0&&(ae=.001),fe===0&&(fe=.001),x=this.Rd!==null?this.Rd:this.ua,ne=x.bounds,b=ae/ne.width,ne=fe/ne.height,isFinite(b)||(b=1),isFinite(ne)||(ne=1),this.ua=b===1&&ne===1?x:x.copy().scale(b,ne)):this.ua!==null&&rn.$(this.ua.Sk,a-te)&&rn.$(this.ua.Rk,y-te)||(this.ua=dr.makeGeometry(this,ae,fe)),ne=this.ua.bounds,a===1/0||y===1/0?this.Ge(ne.x-te/2,ne.y-te/2,a===0&&ae===0?0:ne.width+te,y===0&&fe===0?0:ne.height+te):this.Ge(-(te/2),-(te/2),_e+te,Te+te),E.w()?(_e=E.width,Te=E.height,_e=Math.min(je.width,_e),Te=Math.min(je.height,Te),_e=Math.max(Ve.width,_e),Te=Math.max(Ve.height,Te),this.dc.h(0,0,_e,Te)):this.dc.assign(ne)};function _v(a){var y=a.geometryStretch;return a.Rd!==null?y===nr?Gn:y:y===nr?Ev[a.figure].defaultStretch:y}it.eh=function(a,y,x,b){Ya(this,a,y,x,b)},it.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},it.Sj=function(a,y,x,b,E){var te=this.transform,ne=1/(te.m11*te.m22-te.m12*te.m21),ae=te.m22*ne,fe=-te.m12*ne,_e=-te.m21*ne,Te=te.m11*ne,je=ne*(te.m21*te.dy-te.m22*te.dx),Ve=ne*(te.m12*te.dx-te.m11*te.dy);te=a*ae+y*_e+je,ne=a*fe+y*Te+Ve,ae=x*ae+b*_e+je,fe=x*fe+b*Te+Ve,je=this.ig/2,_e=this.ua,_e===null&&(this.measure(1/0,1/0),_e=this.ua);var Qe=_e.bounds;if(Te=!1,_e.type===Yn.j)if(1.5>=this.strokeWidth)Te=rn.Ve(_e.startX,_e.startY,_e.endX,_e.endY,te,ne,ae,fe,E);else{if(_e.startX===_e.endX?(b=je,Te=0):(y=(_e.endY-_e.startY)/(_e.endX-_e.startX),Te=je/Math.sqrt(1+y*y),b=Te*y),y=Hn(),a=new Mt,rn.Ve(_e.startX+b,_e.startY+Te,_e.endX+b,_e.endY+Te,te,ne,ae,fe,a)&&y.push(a),a=new Mt,rn.Ve(_e.startX-b,_e.startY-Te,_e.endX-b,_e.endY-Te,te,ne,ae,fe,a)&&y.push(a),a=new Mt,rn.Ve(_e.startX+b,_e.startY+Te,_e.startX-b,_e.startY-Te,te,ne,ae,fe,a)&&y.push(a),a=new Mt,rn.Ve(_e.endX+b,_e.endY+Te,_e.endX-b,_e.endY-Te,te,ne,ae,fe,a)&&y.push(a),ae=y.length,ae===0)return ei(y),!1;for(Te=!0,fe=1/0,b=0;b<ae;b++)a=y[b],x=(a.x-te)*(a.x-te)+(a.y-ne)*(a.y-ne),x<fe&&(fe=x,E.x=a.x,E.y=a.y);ei(y)}else if(_e.type===Yn.u)Te=rn.Ff(Qe.x-je,Qe.y-je,Qe.x+Qe.width+je,Qe.y+Qe.height+je,te,ne,ae,fe,E);else if(_e.type===Yn.F){y=kn.allocAt(Qe.x,Qe.y,Qe.width,Qe.height).Bc(je,je);e:if(y.width===0)Te=rn.Ve(y.x,y.y,y.x,y.y+y.height,te,ne,ae,fe,E);else if(y.height===0)Te=rn.Ve(y.x,y.y,y.x+y.width,y.y,te,ne,ae,fe,E);else{if(a=y.width/2,_e=y.height/2,b=y.x+a,Te=y.y+_e,x=9999,te!==ae&&(x=(ne-fe)/(te-ae)),9999>Math.abs(x)){if(fe=ne-Te-x*(te-b),0>a*a*x*x+_e*_e-fe*fe){E.x=NaN,E.y=NaN,Te=!1;break e}je=Math.sqrt(a*a*x*x+_e*_e-fe*fe),ae=(-(a*a*x*fe)+a*_e*je)/(_e*_e+a*a*x*x)+b,a=(-(a*a*x*fe)-a*_e*je)/(_e*_e+a*a*x*x)+b,_e=x*(ae-b)+fe+Te,fe=x*(a-b)+fe+Te,Math.abs((te-ae)*(te-ae))+Math.abs((ne-_e)*(ne-_e))<Math.abs((te-a)*(te-a))+Math.abs((ne-fe)*(ne-fe))?(E.x=ae,E.y=_e):(E.x=a,E.y=fe)}else{if(ae=_e*_e,fe=te-b,ae-=ae/(a*a)*fe*fe,0>ae){E.x=NaN,E.y=NaN,Te=!1;break e}fe=Math.sqrt(ae),ae=Te+fe,fe=Te-fe,Math.abs(ae-ne)<Math.abs(fe-ne)?(E.x=te,E.y=ae):(E.x=te,E.y=fe)}Te=!0}kn.free(y)}else if(_e.type===Yn.o){Ve=Mt.alloc();var rt=ae-te,ct=fe-ne,Dt=rt*rt+ct*ct,Lt=te,Gt=ne;if(0<Dt&&Qe.contains(Lt,Gt)&&(Ve.x=Lt,Ve.y=Gt,this.ca(Ve)))for(rt!==0&&.5>Math.abs(rt)?(ct*=.5/rt,rt=.5):ct!==0&&.5>Math.abs(ct)&&(rt*=.5/ct,ct=.5),Lt-=rt,Gt-=ct;Qe.contains(Lt,Gt);)Lt-=rt,Gt-=ct;for(E.x=ae,E.y=fe,ct=0;ct<_e.figures.count;ct++){var Zt=_e.figures.s[ct],Vt=Zt.isFilled?Lt:te,Qt=Zt.isFilled?Gt:ne,yn=Zt.segments;Qe=Zt.startX,rt=Zt.startY;for(var ri=Qe,fi=rt,li=0;li<yn.count;li++){var Vn=yn.s[li],Rn=Vn.type,Qi=Vn.endX,Zi=Vn.endY,no=!1;switch(Rn){case Ms:ri=Qi,fi=Zi;break;case xo:no=Dm(Qe,rt,Qi,Zi,Vt,Qt,ae,fe,Ve);break;case ga:no=rn.Eo(Qe,rt,Vn.point1X,Vn.point1Y,Vn.point2X,Vn.point2Y,Qi,Zi,Vt,Qt,ae,fe,.6,Ve);break;case dl:no=rn.Eo(Qe,rt,Qe+2/3*(Vn.point1X-Qe),rt+2/3*(Vn.point1Y-rt),Qi+2/3*(Vn.point1X-Qi),Zi+2/3*(Vn.point1Y-Zi),Qi,Zi,Vt,Qt,ae,fe,.6,Ve);break;case cs:case Cl:Rn=Vn.type===cs?Da(Vn,Zt):$s(Vn,Zt,Qe,rt);var _o=Rn.length;if(_o===0){no=Dm(Qe,rt,Vn.type===cs?Vn.centerX:Vn.endX,Vn.type===cs?Vn.centerY:Vn.endY,Vt,Qt,ae,fe,Ve);break}for(Zi=null,Qi=0;Qi<_o;Qi++){if(Zi=Rn[Qi],Qi===0&&Dm(Qe,rt,Zi[0],Zi[1],Vt,Qt,ae,fe,Ve)){var ha=Im(Vt,Qt,Ve,Dt,E);ha<Dt&&(Dt=ha,Te=!0)}rn.Eo(Zi[0],Zi[1],Zi[2],Zi[3],Zi[4],Zi[5],Zi[6],Zi[7],Vt,Qt,ae,fe,.6,Ve)&&(ha=Im(Vt,Qt,Ve,Dt,E),ha<Dt&&(Dt=ha,Te=!0))}Qi=Zi[6],Zi=Zi[7];break;default:Nt("Unknown Segment type: "+Rn)}Qe=Qi,rt=Zi,no&&(no=Im(Vt,Qt,Ve,Dt,E),no<Dt&&(Dt=no,Te=!0)),Vn.isClosed&&(Qi=ri,Zi=fi,Dm(Qe,rt,Qi,Zi,Vt,Qt,ae,fe,Ve)&&(Vn=Im(Vt,Qt,Ve,Dt,E),Vn<Dt&&(Dt=Vn,Te=!0)))}}te=x-a,ne=b-y,ae=Math.sqrt(te*te+ne*ne),ae!==0&&(te/=ae,ne/=ae),E.x-=te*je,E.y-=ne*je,Mt.free(Ve)}else Nt("Unknown Geometry type: "+_e.type);return Te?(this.transform.Ga(E),!0):!1};function Im(a,y,x,b,E){return a=x.x-a,y=x.y-y,y=a*a+y*y,y<b?(E.x=x.x,E.y=x.y,y):b}function Dm(a,y,x,b,E,te,ne,ae,fe){if(rn.$(a,x)&&rn.$(y,b)||rn.$(E,ne)&&rn.$(te,ae))return!1;var _e=!1,Te=(E-ne)*(y-b)-(te-ae)*(a-x);return Te===0?!1:(fe.x=((E*ae-te*ne)*(a-x)-(E-ne)*(a*b-y*x))/Te,fe.y=((E*ae-te*ne)*(y-b)-(te-ae)*(a*b-y*x))/Te,(a>x?a-x:x-a)<(y>b?y-b:b-y)?(a=y<b?y:b,y=y<b?b:y,(fe.y>a||rn.$(fe.y,a))&&(fe.y<y||rn.$(fe.y,y))&&(_e=!0)):(y=a<x?a:x,a=a<x?x:a,(fe.x>y||rn.$(fe.x,y))&&(fe.x<a||rn.$(fe.x,a))&&(_e=!0)),_e)}it.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 b=this.strokeWidth/2,E=!1,te=Mt.alloc();return te.h(x.x-b,x.y-b),a.ca(y.Ga(te))&&(te.h(x.x-b,x.bottom+b),a.ca(y.Ga(te))&&(te.h(x.right+b,x.bottom+b),a.ca(y.Ga(te))&&(te.h(x.right+b,x.y-b),a.ca(y.Ga(te))&&(E=!0)))),Mt.free(te),E},it.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=gr.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,te=a.top;a=a.bottom;var ne=Mt.alloc();if(ne.h(b,te),x.Ga(ne),this.gh(ne,!0)||(ne.h(E,te),x.Ga(ne),this.gh(ne,!0))||(ne.h(b,a),x.Ga(ne),this.gh(ne,!0))||(ne.h(E,a),x.Ga(ne),this.gh(ne,!0)))return Mt.free(ne),!0;var ae=Mt.alloc(),fe=Mt.alloc();return x.set(y),x.bv(this.transform),x.Vj(),ae.x=E,ae.y=te,ae.transform(x),ne.x=b,ne.y=te,ne.transform(x),y=!1,tf(this,ne,ae,fe)?y=!0:(ne.x=E,ne.y=a,ne.transform(x),tf(this,ne,ae,fe)?y=!0:(ae.x=b,ae.y=a,ae.transform(x),tf(this,ne,ae,fe)?y=!0:(ne.x=b,ne.y=te,ne.transform(x),tf(this,ne,ae,fe)&&(y=!0)))),Mt.free(ne),gr.free(x),Mt.free(ae),Mt.free(fe),y};function tf(a,y,x,b){if(!a.rs(y,x,b))return!1;a=y.x,y=y.y;var E=x.x,te=x.y;return x=b.x,b=b.y,a===E?(y<te?(a=y,y=te):a=te,b>=a&&b<=y):(a<E?(b=a,a=E):b=E,x>=b&&x<=a)}it.tx=function(a,y,x){function b(Dt,Lt){for(var Gt=Dt.length,Zt=0;Zt<Gt;Zt+=2)if(Lt.zd(Dt[Zt],Dt[Zt+1])>E)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var E=a.Bf(y),te=E;if(1.5<this.strokeWidth&&(E=this.strokeWidth/2+Math.sqrt(E),E*=E),y=this.ua,y===null&&(this.measure(1/0,1/0),y=this.ua,y===null))return!1;if(!x){var ne=y.bounds,ae=ne.x,fe=ne.y,_e=ne.x+ne.width;if(ne=ne.y+ne.height,Yo(a.x,a.y,ae,fe)<=E&&Yo(a.x,a.y,_e,fe)<=E&&Yo(a.x,a.y,ae,ne)<=E&&Yo(a.x,a.y,_e,ne)<=E)return!0}if(ae=y.startX,fe=y.startY,_e=y.endX,ne=y.endY,y.type===Yn.j){if(x=(ae-_e)*(a.x-_e)+(fe-ne)*(a.y-ne),eo(a.x,a.y,ae,fe,_e,ne)<=(0<=(_e-ae)*(a.x-ae)+(ne-fe)*(a.y-fe)&&0<=x?E:te))return!0}else{if(y.type===Yn.u)return y=!1,x&&(y=eo(a.x,a.y,ae,fe,ae,ne)<=E||eo(a.x,a.y,ae,fe,_e,fe)<=E||eo(a.x,a.y,_e,fe,_e,ne)<=E||eo(a.x,a.y,ae,ne,_e,ne)<=E),y;if(y.type===Yn.F){y=a.x-(ae+_e)/2,te=a.y-(fe+ne)/2;var Te=Math.abs(_e-ae)/2,je=Math.abs(ne-fe)/2;if(Te===0||je===0)return eo(a.x,a.y,ae,fe,_e,ne)<=E;if(x){if(a=rn.$y(Te,je,y,te),a*a<=E)return!0}else return!(Yo(y,te,-Te,0)>=E||Yo(y,te,0,-je)>=E||Yo(y,te,0,je)>=E||Yo(y,te,Te,0)>=E)}else if(y.type===Yn.o){if(_e=y.bounds,te=_e.x,ae=_e.y,fe=_e.x+_e.width,_e=_e.y+_e.height,a.x>fe&&a.x<te&&a.y>_e&&a.y<ae&&eo(a.x,a.y,te,ae,te,_e)>E&&eo(a.x,a.y,te,ae,fe,ae)>E&&eo(a.x,a.y,fe,_e,te,_e)>E&&eo(a.x,a.y,fe,_e,fe,ae)>E)return!1;if(te=Math.sqrt(E),x){if(this.fill===null?Wu(y,a.x,a.y,te):Mu(y,a,te,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(te=x.s[y],ne=te.startX,Te=te.startY,a.zd(ne,Te)>E)return!1;for(ae=te.segments.s,fe=ae.length,_e=0;_e<fe;_e++)switch(je=ae[_e],je.type){case Ms:case xo:if(ne=je.endX,Te=je.endY,a.zd(ne,Te)>E)return!1;break;case ga:var Ve=Hn();if(rn.Qe(ne,Te,je.point1X,je.point1Y,je.point2X,je.point2Y,je.endX,je.endY,.8,Ve),ne=b(Ve,a),ei(Ve),ne||(ne=je.endX,Te=je.endY,a.zd(ne,Te)>E))return!1;break;case dl:if(Ve=Hn(),rn.ep(ne,Te,je.point1X,je.point1Y,je.endX,je.endY,.8,Ve),ne=b(Ve,a),ei(Ve),ne||(ne=je.endX,Te=je.endY,a.zd(ne,Te)>E))return!1;break;case cs:case Cl:Ve=je.type===cs?Da(je,te):$s(je,te,ne,Te);var Qe=Ve.length;if(Qe===0){if(ne=je.type===cs?je.centerX:je.endX,Te=je.type===cs?je.centerY:je.endY,a.zd(ne,Te)>E)return!1;break}je=null;for(var rt=Hn(),ct=0;ct<Qe;ct++)if(je=Ve[ct],rt.length=0,rn.Qe(je[0],je[1],je[2],je[3],je[4],je[5],je[6],je[7],.8,rt),b(rt,a))return ei(rt),!1;ei(rt),je!==null&&(ne=je[6],Te=je[7]);break;default:Nt("Unknown Segment type: "+je.type)}}return!0}}}return!1},it.qc=function(){this.ua=null},it.kq=function(){return this.ig};function v1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=Cg,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=Zs):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new yi(1-Zs.x,Zs.y)))}dr.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=Wc[a.toArrow];else a.fromArrow!=="None"?b=Wc[a.fromArrow]:(b=rn.Ze[a.figure],typeof b=="string"&&(b=rn.Ze[b]),b===void 0&&Nt("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=rn.Ze.Rectangle;typeof E=="function"&&(b=E(a,y,x))}return b};function y1(a){var y=Wc[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=Wc[x],y===void 0){var b=null,E;for(E in rn.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=Yn.parse(rn.um[b],!1),Wc[b]=a,x!==b&&(Wc[x]=b),b}}return typeof y=="string"?y:y instanceof Yn?a:null}Ye.Object.defineProperties(dr.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 b=this.part;b!==null&&(b.ag=NaN),this.v(),this.g("geometry",y||x,a),Ta(this)&&(a=this.part,a!==null&&zo(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=Yn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=Mt.allocAt(-y.x,-y.y),Mt.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&&Tf(a,"Shape.fill"),a instanceof fo&&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&&Tf(a,"Shape.stroke"),a instanceof fo&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},strokeWidth:{get:function(){return this.ig},set:function(a){var y=this.ig;if(y!==a)if(0<=a){this.ig=a,this.v();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeWidth",y,a)}else Mn(a,"value >= 0",dr,"strokeWidth:value")}},strokeCap:{get:function(){return this.Na!==null?this.Na.Hr:"butt"},set:function(a){var y=this.strokeCap;y!==a&&(typeof a!="string"||a!=="butt"&&a!=="round"&&a!=="square"?Mn(a,'"butt", "round", or "square"',dr,"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"?Mn(a,'"miter", "bevel", or "round"',dr,"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,b=0,E=0;E<x;E++){var te=a[E];0<=te&&isFinite(te)||Nt("strokeDashArray:value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===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=rn.Ze[a];typeof x=="function"?x=a:(x=rn.Ze[a.toLowerCase()])||Nt("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=y1(a);x===null?Nt("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new ud),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),v1(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=y1(a);x===null?Nt("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new ud),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),v1(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:oo},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:oo},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:nr},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 Zc),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&Lc(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 Zc),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 Zc),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 Zc),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),dr.prototype.intersectsRect=dr.prototype.Yc,dr.prototype.containedInRect=dr.prototype.fh,dr.prototype.getNearestIntersectionPoint=dr.prototype.rs,dr.prototype.getDocumentBounds=dr.prototype.mi,dr.prototype.getDocumentPoint=dr.prototype.ga;var Wc=new Si,Ev=new Si;dr.className="Shape",dr.getFigureGenerators=function(){var a=new ci,y;for(y in rn.Ze)y!==y.toLowerCase()&&a.add(y,rn.Ze[y]);return a.freeze(),a},dr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=rn.Ze;b[a]=y,b[x]=a},dr.getArrowheadGeometries=function(){var a=new ci;for(b in rn.um)if(Wc[b]===void 0){var y=Yn.parse(rn.um[b],!1);Wc[b]=y,y=b.toLowerCase(),y!==b&&(Wc[y]=b)}for(var x in Wc)if(x!==x.toLowerCase()){var b=Wc[x];b instanceof Yn&&a.add(x,b)}return a.freeze(),a},dr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=Yn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Nt("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var b=Wc;b[a]=x,b[y]=a};function Lv(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=nr,this.gg=this.fg=oo}Lv.prototype.copy=function(){var a=new Lv;return a.Hr=this.Hr,a.Ir=this.Ir,a.Jr=this.Jr,a.uj=this.uj,a.br=this.br,a.jq=this.jq,a.fg=this.fg.J(),a.gg=this.gg.J(),a};function Mo(a,y){return tn.call(this),zm||(ml=ys?new Du(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}qe(Mo,tn),Mo.prototype.cloneProtected=function(a){tn.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 Ac(a){a.da===null?a.da=new Iv:a.da.nc&&(a.da=a.da.copy())}it=Mo.prototype,it.th=function(){tn.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function S1(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}it.qb=function(a){a.classType===Mo?this.wrap=a:tn.prototype.qb.call(this,a)},it.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},it.v=function(){tn.prototype.v.call(this)},it.hh=function(a,y){if(this.xc!==null&&this.ec.length!==0&&this.Ae!==null){var x=this.naturalBounds,b=this.actualBounds,E=x.width,te=x.height,ne=mg(this),ae=a.textAlign=this.textAlign,fe=y.tn;ae==="start"?ae=fe?"right":"left":ae==="end"&&(ae=fe?"left":"right"),fe=this.isUnderline;var _e=this.isStrikethrough;ws(this,a,this.xc,!0,!1,x,b),(fe||_e)&&ws(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var Te=this.oe,je=Te.dx-(ne*Te.m21+Te.dx);Te=Te.dy-(ne*Te.m22+Te.dy);var Ve=y.scale;switch(8>(je*je+Te*Te)*Ve*Ve&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Hl&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,je=this.spacingBelow,this.flip){case Kr:a.translate(E,0),a.scale(-1,1);break;case Sr:a.translate(0,te),a.scale(1,-1);break;case wo:a.translate(E,te),a.scale(-1,-1)}if(a.yc(),Te=this.Gc,Ve=(y+ne+je)*Te,te>Ve&&(b=this.verticalAlignment,b=b.y*te-b.y*Ve+b.offsetY),Te===1&&this.ze!==null)je=this.Cb,je>E&&(je=E),this.Oj(this.ze,a,0,b+y,E,ne,je,x,ae,fe,_e);else if(this.Qc!==null&&this.Qb!==null)for(Ve=0;Ve<Te;Ve++){var Qe=this.Qc[Ve];Qe>E&&(Qe=E),b+=y,this.Oj(this.Qb[Ve],a,0,b,E,ne,Qe,x,ae,fe,_e),b+=ne+je}switch(this.flip){case Kr:a.scale(-1,1),a.translate(-E,0);break;case Sr:a.scale(1,-1),a.translate(0,-te);break;case wo:a.scale(-1,-1),a.translate(-E,-te)}}},it.Oj=function(a,y,x,b,E,te,ne,ae,fe,_e,Te){var je=0;if(ae)fe==="left"?je=0:fe==="right"?je=E-ne:fe==="center"&&(je=(E-ne)/2),y.fillRect(x+je,b+.25*te,ne,1);else{if(fe==="left"?je=0:fe==="right"?je=E:fe==="center"&&(je=E/2),E=Rm!==null?Rm(this,te):.75*te,y.fillText(a,x+je,b+E),a=te/20|0,a===0&&(a=1),fe==="right"?je-=ne:fe==="center"&&(je-=ne/2),_e){ae=Bm!==null?Bm(this,te):.8*te,fe=x+je,_e=b+ae,E=x+je+ne,ae=b+ae;var Ve=a;y.beginPath(),y.lineWidth=Ve,y.moveTo(fe,_e),y.lineTo(E,ae),y.stroke(),y.Se(),y instanceof Hl&&y.ad.classList.add("gojs-td")}Te&&(Te=b+te-te/2.2|0,a%2!==0&&(Te+=.5),b=x+je,te=Te,x=x+je+ne,ne=Te,je=a,y.beginPath(),y.lineWidth=je,y.moveTo(b,te),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof Hl&&y.ad.classList.add("gojs-td"))}},it.kk=function(a,y,x){if(!tn.prototype.kk.call(this,a,y,x))return!1;if(ws(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++)Qy(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,Qy(a,y,!0);return!0},it.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:tn.prototype.nk.call(this,a)},it.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)}},it.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var te=this.Ae;ml!==null&&E1!==te&&(E1=ml.font=te),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var ne;if(isNaN(this.desiredSize.width)){if(te=this.ec.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`),te.length===0)te=8;else if(this.isMultiline){for(var ae=ne=0,fe=!1;!fe;){var _e=te.indexOf(`
|
|
|
`,ae);_e===-1&&(_e=te.length,fe=!0),ae=te.substr(ae,_e-ae),this.formatting===vg&&(ae=ae.trim()),ne=Math.max(ne,Yu(ae)),ae=_e+1}te=ne}else ne=te.indexOf(`
|
|
|
`,0),0<=ne&&(te=te.substr(0,ne)),te=Yu(te);te=Math.min(te,a/this.scale)}else te=this.desiredSize.width;if(this.panel!==null&&(te=Math.min(te,this.panel.maxSize.width)),ne=w1(this,te),isNaN(this.desiredSize.height)?ne=Math.min(ne,y/this.scale):ne=this.desiredSize.height,fe=ne,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===Fm&&(y=this.Ae,y=this.overflow===Fm?x1(y):0,_e=this.spacingAbove+this.spacingBelow,_e=Math.max(0,mg(this)+_e),fe=Math.min(this.maxLines-1,Math.max(Math.floor(fe/_e+.01)-1,0)),!(fe+1>=this.Qb.length))){for(this.l|=16777216,_e=this.Qb[fe],y=Math.max(1,a-y);Yu(_e)>y&&1<_e.length;)_e=_e.substr(0,_e.length-1);_e+=yg,y=Yu(_e),this.Qb[fe]=_e,this.Qb=this.Qb.slice(0,fe+1),this.Qc[fe]=y,this.Qc=this.Qc.slice(0,fe+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===b1||isNaN(this.desiredSize.width))&&(te=isNaN(a)?this.Cb:Math.min(a,this.Cb)),te=Math.max(x,te),ne=Math.max(b,ne),Is(this.dc,te,ne),this.Ge(0,0,te,ne),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},it.eh=function(a,y,x,b){Ya(this,a,y,x,b)};function gg(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 Mv(a,y,x,b){var E=a.formatting===vg;E&&(y=y.trim());var te=0,ne=a.Ae,ae=a.spacingAbove+a.spacingBelow;ae=Math.max(0,mg(a)+ae);var fe=a.overflow===Fm?x1(ne):0;if(a.Gc>=a.maxLines)b!==null&&b.h(0,ae);else if(ne=y,a.wrap===Tv){a.Le=1;var _e=Yu(y);if(fe===0||_e<=x)a.Cb=Math.max(a.Cb,_e),gg(a,y,a.Cb),b!==null&&b.h(_e,ae);else{for(te=gp(a,ne),ne=ne.substr(te.length),y=gp(a,ne),_e=Yu(te+y);0<y.length&&_e<=x;)te+=y,ne=ne.substr(y.length),y=gp(a,ne),_e=te+y,E&&(_e=_e.trim()),_e=Yu(_e);for(E&&(y=y.trim()),te+=y,x=Math.max(1,x-fe);Yu(te)>x&&1<te.length;)te=te.substr(0,te.length-1);a.l|=16777216,te+=yg;var Te=Yu(te);a.Cb=Te,gg(a,te,Te),b!==null&&b.h(Te,ae)}}else{for(fe=0,ne.length===0&&(fe=1,gg(a,ne,0));0<ne.length;){for(y=gp(a,ne),ne=ne.substr(y.length);Yu(y)>x;){var je=1;for(_e=Yu(y.substr(0,je)),Te=0;_e<=x;)je++,Te=_e,_e=Yu(y.substr(0,je));if(je===1){var Ve=_e;te=Math.max(te,_e)}else Ve=Te,te=Math.max(te,Te);if(je--,1>je&&(je=1),gg(a,y.substr(0,je),Ve),fe++,y=y.substr(je),a.Gc+fe>a.maxLines)break}for(Te=gp(a,ne),_e=Yu(y+Te);0<Te.length&&_e<=x;)y+=Te,ne=ne.substr(Te.length),Te=gp(a,ne),_e=y+Te,E&&(_e=_e.trim()),_e=Yu(_e);if(E&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),Te.length===0?(je=_e,te=Math.max(te,_e)):(je=Te=Yu(y),te=Math.max(te,Te)),gg(a,y,je),fe++,a.Gc+fe>a.maxLines))break}a.Le=Math.min(a.maxLines,fe),a.Cb=Math.max(a.Cb,te),b!==null&&b.h(a.Cb,ae*a.Le)}}function gp(a,y){if(a.wrap===C1)return y.substr(0,1);for(var x=y.length,b=0,E=xx;b<x&&!E.test(y.charAt(b));)b++;for(a.formatting===P1&&(x=Math.min(x,b+1));b<x&&E.test(y.charAt(b));)b++;return b>=y.length?y:y.substr(0,b)}function Yu(a){return ml===null?8*a.length:ml.measureText(a).width}function mg(a){if(a.df!==null)return a.df;var y=a.Ae;if(ml===null){var x=16;return a.df=x}return Nv[y]!==void 0&&5e3>_1?x=Nv[y]:(x=1.3*ml.measureText("M").width,Nv[y]=x,_1++),a.df=x}function x1(a){if(ml===null)return 6;if(jm[a]!==void 0&&5e3>Ov)var y=jm[a];else y=ml.measureText(yg).width,jm[a]=y,Ov++;return y}function w1(a,y){var x=a.ec.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`),b=a.spacingAbove+a.spacingBelow;if(b=Math.max(0,mg(a)+b),x.length===0)return a.Cb=0,a.Gc=1,b;if(!a.isMultiline){var E=x.indexOf(`
|
|
|
`,0);0<=E&&(x=x.substr(0,E))}E=0;for(var te=a.Gc=0,ne,ae=!1;!ae;){if(ne=x.indexOf(`
|
|
|
`,te),ne===-1&&(ne=x.length,ae=!0),te<=ne){if(te=x.substr(te,ne-te),a.wrap!==Tv){a.Le=0;var fe=Qn.alloc();Mv(a,te,y,fe),E+=fe.height,Qn.free(fe),a.Gc+=a.Le}else Mv(a,te,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(ae=!0)}te=ne+1}return a.Lq=E}Ye.Object.defineProperties(Mo.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"||(Ac(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&&(Ac(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:ra},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),Ac(this),this.da.Yr=a,tl(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=Qn.alloc();Mv(this,this.ec,999999,a);var y=a.width;Qn.free(a),a=w1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Is(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:kv},set:function(a){var y=this.wrap;y!==a&&(Ac(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Av},set:function(a){var y=this.overflow;y!==a&&(Ac(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&&Tf(a,"TextBlock.stroke"),a instanceof fo&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return mg(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&&(Ac(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&&(Ac(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 Zc),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 Zc),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 Zc),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 Zc),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 Zc),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&&(Ac(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&&(Ac(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&&(Ac(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&&(Ac(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:vg},set:function(a){var y=this.formatting;y!==a&&(Ac(this),this.da.gq=a,this.v(),this.g("formatting",y,a))}},maxLines:{get:function(){return this.da!==null?this.da.Jq:1/0},set:function(a){var y=this.maxLines;y!==a&&(a=Math.floor(a),0>=a&&Mn(a,"> 0",Mo,"maxLines"),Ac(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 Rm=null,Bm=null,Tv=new Ln(Mo,"None",0),b1=new Ln(Mo,"WrapFit",1),kv=new Ln(Mo,"WrapDesiredSize",2),C1=new Ln(Mo,"WrapBreakAll",3),Av=new Ln(Mo,"OverflowClip",0),Fm=new Ln(Mo,"OverflowEllipsis",1),vg=new Ln(Mo,"FormatTrim",0),P1=new Ln(Mo,"FormatNone",0),xx=/[ \u200b\u00ad]/,Nv=new Si,_1=0,jm=new Si,Ov=0,yg="...",E1="",ml=null,zm=!1;Mo.className="TextBlock";function Iv(){this.nc=!1,this.Hd=null,this.Xf=jn,this.gq=vg,this.Jq=1/0,this.$q=Av,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=ra,this.$r=kv}Iv.prototype.copy=function(){var a=new Iv;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},Mo.getEllipsis=function(){return yg},Mo.setEllipsis=function(a){yg=a,jm=new Si,Ov=0},Mo.getBaseline=function(){return Rm},Mo.setBaseline=function(a){Rm=a},Mo.getUnderline=function(){return Bm},Mo.setUnderline=function(a){Bm=a},Mo.isValidFont=function(a){if(zm||(ml=ys?new Du(null).context:null,zm=!0),ml===null)return!0;var y=ml.font;if(a===y||a==="10px sans-serif")return!0;ml.font="10px sans-serif",ml.font=a;var x=ml.font;if(x!=="10px sans-serif")return ml.font=y,!0;ml.font="19px serif";var b=ml.font;return ml.font=a,x=ml.font,ml.font=y,x!==b},Mo.FormatNone=P1,Mo.FormatTrim=vg,Mo.None=Tv,Mo.OverflowClip=Av,Mo.OverflowEllipsis=Fm,Mo.WrapBreakAll=C1,Mo.WrapDesiredSize=kv,Mo.WrapFit=b1;function Zc(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}Zc.prototype.copy=function(){var a=new Zc;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},Zc.className="GradElementSettings";function vl(a,y){tn.call(this),this.Eg=null,this.qo="",this.Xg=lo,this.Nk=Gn,this.Zg=this.Hd=null,this.Mk=jr,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 mp;qe(vl,tn),vl.prototype.cloneProtected=function(a){tn.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},vl.prototype.qb=function(a){a===jn||a===mi||a===Dr?this.imageStretch=a:tn.prototype.qb.call(this,a)},vl.prototype.toString=function(){return"Picture("+this.source+")#"+Ir(this)};function vp(a){a===void 0&&(a=""),a!==""?mp[a]&&(delete mp[a],Hm--):(mp=new Si,Hm=0)}function L1(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var b=y.Bg.copy();if(b!=null){for(b=b.iterator;b.next();){var E=b.value;E.N();var te=y.getAttribute("src")||"",ne=E.Og.I(te);if(ne!==null)for(var ae=ne.length,fe=0;fe<ae;fe++)te=ne[fe],E.Xn.add(te),te.Uc=!0,E.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),te.Zg!==null&&te.Zg(te,x))}y.Bg.clear()}a.desiredSize.w()||(ea(a,!1),a.v())},y.Yp=function(x){y.ln=x;var b=y.Bg.copy();if(b!=null){for(b=b.iterator;b.next();){var E=b.value,te=y.getAttribute("src")||"",ne=E.Og.I(te);if(ne!==null){E=ne.length,te=Hn();for(var ae=0;ae<E;ae++)te.push(ne[ae]);if(y.hn)for(ae=0;ae<E;ae++)ne=te[ae],ne.Hd!==null&&ne.Hd(ne,x);ei(te)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}vl.prototype.hA=function(){if(this.source!==""){vp(this.source);var a=this.source;this.source="",this.source=a}},vl.prototype.redraw=function(){this.N(),this.Uc=!0},vl.prototype.hh=function(a,y){var x=this.Eg;if(x!==null){var b=x.getAttribute("src");if(!(x instanceof HTMLImageElement&&(b===null||b==="")||x.ln instanceof Event&&a instanceof Qd)){var E=a instanceof Hl;b=this.naturalBounds;var te=0,ne=0,ae=this.qn,fe=ae?+x.width:x.naturalWidth;if(ae=ae?+x.height:x.naturalHeight,fe===void 0&&x.videoWidth&&(fe=x.videoWidth),ae===void 0&&x.videoHeight&&(ae=x.videoHeight),fe=fe||b.width,ae=ae||b.height,fe!==0&&ae!==0){var _e=fe,Te=ae;this.sourceRect.w()&&(te=this.Xg.x,ne=this.Xg.y,fe=this.Xg.width,ae=this.Xg.height);var je=fe,Ve=ae,Qe=this.Nk,rt=this.Mk;switch(Qe){case jn:if(this.sourceRect.w())break;je>=b.width&&(te=te+rt.offsetX+(je*rt.x-b.width*rt.x)),Ve>=b.height&&(ne=ne+rt.offsetY+(Ve*rt.y-b.height*rt.y)),fe=Math.min(b.width,je),ae=Math.min(b.height,Ve);break;case Gn:je=b.width,Ve=b.height;break;case mi:case Dr:Qe===mi?(Qe=Math.min(b.height/Ve,b.width/je),je*=Qe,Ve*=Qe):Qe===Dr&&(Qe=Math.max(b.height/Ve,b.width/je),je*=Qe,Ve*=Qe,je>=b.width&&(te=(te+rt.offsetX+(je*rt.x-b.width*rt.x)/je)*fe),Ve>=b.height&&(ne=(ne+rt.offsetY+(Ve*rt.y-b.height*rt.y)/Ve)*ae),fe*=1/(je/b.width),ae*=1/(Ve/b.height),je=b.width,Ve=b.height)}Qe=this.Df()*y.scale;var ct=je*Qe*Ve*Qe,Dt=fe*ae/ct,Lt=x.__goCache;Qe=null;var Gt=wx;if(!E){if(x.sq&&Lt!==void 0&&4<ct&&Dt>Gt*Gt)for(Lt.gi===null&&(T1(Lt,4,_e,Te,x),T1(Lt,16,_e,Te,x)),E=Lt.gi,_e=E.length,Te=0;Te<_e&&E[Te].ratio*E[Te].ratio<Dt;Te++)Qe=E[Te];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{E=new Du(null).context;try{E.drawImage(this.Eg,0,0)}catch(Zt){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Zt){this.vl=!0}}if(this.vl)return}}switch(E=je<b.width?rt.offsetX+(b.width*rt.x-je*rt.x):0,rt=Ve<b.height?rt.offsetY+(b.height*rt.y-Ve*rt.y):0,this.flip){case Kr:a.translate(Math.min(b.width,je),0),a.scale(-1,1);break;case Sr:a.translate(0,Math.min(b.height,Ve)),a.scale(1,-1);break;case wo:a.translate(Math.min(b.width,je),Math.min(b.height,Ve)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Lt!==void 0&&Qe!==null&&Qe.ratio!==1){a.save(),y=Qe.ratio;try{a.drawImage(Qe.source,te/y,ne/y,Math.min(Qe.source.width,fe/y),Math.min(Qe.source.height,ae/y),E,rt,Math.min(b.width,je),Math.min(b.height,Ve)),a instanceof Hl&&(this.bt=[te/y,ne/y,Math.min(Qe.source.width,fe/y),Math.min(Qe.source.height,ae/y),E,rt,Math.min(b.width,je),Math.min(b.height,Ve)])}catch(Zt){this.en=!1}a.restore()}else try{a.drawImage(x,te,ne,fe,ae,E,rt,Math.min(b.width,je),Math.min(b.height,Ve)),a instanceof Hl&&(this.bt=[te,ne,fe,ae,E,rt,Math.min(b.width,je),Math.min(b.height,Ve)])}catch(Zt){this.en=!1}switch(this.flip){case Kr:a.scale(-1,1),a.translate(-Math.min(b.width,je),0);break;case Sr:a.scale(1,-1),a.translate(0,-Math.min(b.height,Ve));break;case wo:a.scale(-1,-1),a.translate(-Math.min(b.width,je),-Math.min(b.height,Ve))}}}}},vl.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,te=gl(this,!0),ne=this.Eg,ae=this.qn,fe=0,_e=0;(ae||!this.al&&ne&&ne.complete)&&(this.al=!0),ne===null?(isFinite(E.width)||(a=0),isFinite(E.height)||(y=0)):(fe=ae?+ne.width:ne.naturalWidth,_e=ae?+ne.height:ne.naturalHeight),isFinite(E.width)||te===Gn||te===_i?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:ne!==null&&(a=fe)),x=0):ne!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:fe),isFinite(E.height)||te===Gn||te===Bi?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:ne!==null&&(y=_e)),b=0):ne!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:_e),isFinite(E.width)&&(a=E.width),isFinite(E.height)&&(y=E.height),E=this.maxSize,te=this.minSize,x=Math.max(x||0,te.width),b=Math.max(b||0,te.height),a=Math.min(E.width,a),y=Math.min(E.height,y),a=Math.max(x,a),y=Math.max(b,y),ne===null||ne.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),Is(this.dc,a,y),this.Ge(0,0,a,y)},vl.prototype.eh=function(a,y,x,b){Ya(this,a,y,x,b)},Ye.Object.defineProperties(vl.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||Nt("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var b=this.diagram;b!==null&&Jp(b,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new In),b!==null&&x&&sd(b,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()||(ea(this,!1),this.v())):x&&L1(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=mp;if(ys){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<Hm&&(vp(),x=mp),b=on("img"),b.hn=!0,L1(this,b);var E=this.rl;E!==null&&(b.crossOrigin=E(this)),b.src=a,x[a]=b,Hm++}this.element=b,b!==null&&b.__goCache===void 0&&(b.__goCache=new M1),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}}}),vl.prototype.redraw=vl.prototype.redraw,vl.prototype.reloadSource=vl.prototype.hA;var Hm=0,wx=4;vl.className="Picture",mp=new Si,vl.clearCache=vp;function M1(){this.gi=null}function T1(a,y,x,b,E){a.gi===null&&(a.gi=[]);var te=new Du(null),ne=te.context,ae=1/y;te.width=x/y,te.height=b/y,te.width!==0&&te.height!==0&&(y=new k1(te.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],E=x.source,x=x.ratio),ne.setTransform(ae*x,0,0,ae*x,0,0),ne.yc(),ne.drawImage(E,0,0),a.gi.push(y))}M1.className="PictureCacheArray";function k1(a,y){this.source=a,this.ratio=y}k1.className="PictureCacheInstance";function yp(){this.os=new Yn,this.mc=null}yp.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new Yn,this.mc=null};function Sp(a,y,x,b,E,te){a.mc=new Vs,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=b,a.mc.isEvenOdd=te||!1,a.os.figures.add(a.mc),E!==void 0&&(a.mc.isShadowed=E)}function bx(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}yp.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var b=new $r(Ms);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)},yp.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var b=new $r(xo);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)};function Ih(a,y,x,b,E,te,ne){var ae;ae===void 0&&(ae=!1);var fe=new $r(ga);fe.point1X=y,fe.point1Y=x,fe.point2X=b,fe.point2Y=E,fe.endX=te,fe.endY=ne,ae&&fe.close(),a.mc.segments.add(fe)}function Um(a,y,x,b,E){var te;te===void 0&&(te=!1);var ne=new $r(dl);ne.point1X=y,ne.point1Y=x,ne.endX=b,ne.endY=E,te&&ne.close(),a.mc.segments.add(ne)}yp.prototype.arcTo=function(a,y,x,b,E,te,ne){te===void 0&&(te=0),ne===void 0&&(ne=!1);var ae=new $r(cs);ae.startAngle=a,ae.sweepAngle=y,ae.centerX=x,ae.centerY=b,ae.radiusX=E,ae.radiusY=te!==0?te:E,ne&&ae.close(),this.mc.segments.add(ae)};function Cx(a,y,x,b,E,te,ne,ae){var fe;fe===void 0&&(fe=!1),y=new $r(Cl,ne,ae,y,x,b,E,te),fe&&y.close(),a.mc.segments.add(y)}function A1(a){var y=Gm;return y!==null?(Gm=null,y.reset(a),y):(y=new yp,y.reset(a),y)}var Gm=null;yp.className="StreamGeometryContext";function Ha(a,y){var x=a.toLowerCase(),b=rn.Ze;b[a]=y,b[x]=a}Ha("Rectangle",function(a,y,x){a="r"+y+","+x;var b=rn.Mf[a];return b!==void 0||(b=new Yn(Yn.u),b.endX=y,b.endY=x,rn.Nf<rn.vm&&(rn.Mf[a]=b,rn.Nf++)),b}),Ha("Square",function(a,y,x){a="s"+y+","+x;var b=rn.Mf[a];return b!==void 0||(b=new Yn(Yn.u),b.endX=y,b.endY=x,b.defaultStretch=mi,rn.Nf<rn.vm&&(rn.Mf[a]=b,rn.Nf++)),b}),Ha("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 b="rr"+y+","+x+","+a,E=rn.Mf[b];if(E!==void 0)return E;var te=a*rn.wg;return E=new Yn().add(new Vs(a,0,!0).add(new $r(xo,y-a,0)).add(new $r(ga,y,a,y-te,0,y,te)).add(new $r(xo,y,x-a)).add(new $r(ga,y-a,x,y,x-te,y-te,x)).add(new $r(xo,a,x)).add(new $r(ga,0,x-a,te,x,0,x-te)).add(new $r(xo,0,a)).add(new $r(ga,a,0,0,te,te,0).close())),1<te&&(E.spot1=new yi(0,0,te,te),E.spot2=new yi(1,1,-te,-te)),rn.Nf<rn.vm&&(rn.Mf[b]=E,rn.Nf++),E}),Ha("Border","RoundedRectangle"),Ha("Ellipse",function(a,y,x){a="e"+y+","+x;var b=rn.Mf[a];return b!==void 0||(b=new Yn(Yn.F),b.endX=y,b.endY=x,b.spot1=Yl,b.spot2=Bl,rn.Nf<rn.vm&&(rn.Mf[a]=b,rn.Nf++)),b}),Ha("Circle",function(a,y,x){a="c"+y+","+x;var b=rn.Mf[a];return b!==void 0||(b=new Yn(Yn.F),b.endX=y,b.endY=x,b.spot1=Yl,b.spot2=Bl,b.defaultStretch=mi,rn.Nf<rn.vm&&(rn.Mf[a]=b,rn.Nf++)),b}),Ha("TriangleRight",function(a,y,x){return new Yn().add(new Vs(0,0).add(new $r(xo,y,.5*x)).add(new $r(xo,0,x).close())).pm(0,.25,.5,.75)}),Ha("TriangleDown",function(a,y,x){return new Yn().add(new Vs(0,0).add(new $r(xo,y,0)).add(new $r(xo,.5*y,x).close())).pm(.25,0,.75,.5)}),Ha("TriangleLeft",function(a,y,x){return new Yn().add(new Vs(y,x).add(new $r(xo,0,.5*x)).add(new $r(xo,y,0).close())).pm(.5,.25,1,.75)}),Ha("TriangleUp",function(a,y,x){return new Yn().add(new Vs(y,x).add(new $r(xo,0,x)).add(new $r(xo,.5*y,0).close())).pm(.25,.5,.75,1)}),Ha("Triangle","TriangleUp"),Ha("Diamond",function(a,y,x){return new Yn().add(new Vs(.5*y,0).add(new $r(xo,0,.5*x)).add(new $r(xo,.5*y,x)).add(new $r(xo,y,.5*x).close())).pm(.25,.25,.75,.75)}),Ha("LineH",function(a,y,x){return a=new Yn(Yn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),Ha("LineV",function(a,y,x){return a=new Yn(Yn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),Ha("None","Rectangle"),Ha("BarH","Rectangle"),Ha("BarV","Rectangle"),Ha("MinusLine","LineH"),Ha("PlusLine",function(a,y,x){return new Yn().add(new Vs(0,x/2,!1).add(new $r(xo,y,x/2)).add(new $r(Ms,y/2,0)).add(new $r(xo,y/2,x)))}),Ha("XLine",function(a,y,x){return new Yn().add(new Vs(0,x,!1).add(new $r(xo,y,0)).add(new $r(Ms,0,0)).add(new $r(xo,y,x)))}),Ha("LineRight",function(a,y,x){return new Yn().add(new Vs(.25*y,0,!1).add(new $r(xo,.75*y,.5*x)).add(new $r(xo,.25*y,x)))}),Ha("LineDown",function(a,y,x){return new Yn().add(new Vs(0,.25*x,!1).add(new $r(xo,.5*y,.75*x)).add(new $r(xo,y,.25*x)))}),Ha("LineLeft",function(a,y,x){return new Yn().add(new Vs(.75*y,0,!1).add(new $r(xo,.25*y,.5*x)).add(new $r(xo,.75*y,x)))}),Ha("LineUp",function(a,y,x){return new Yn().add(new Vs(0,.75*x,!1).add(new $r(xo,.5*y,.25*x)).add(new $r(xo,y,.75*x)))}),rn.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=Ho,this.ir=null,this.jr="",this.lr=oo,this.Gq="",this.Hq=Xs,this.Pq=Hr,this.Kq=ts,this.Up=null,this.Cq=127,this.zr=ko,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 Ti(a,y){a===void 0||a instanceof sa||typeof a=="string"?Wn.call(this,a):(Wn.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 Mt(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new kn,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}qe(Ti,Wn),Ti.prototype.cloneProtected=function(a){Wn.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},it=Ti.prototype,it.Af=function(a){Wn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},it.toString=function(){var a=Fn(this.constructor)+"#"+Ir(this);return this.data!==null&&(a+="("+hi(this.data)+")"),a};function yl(a){a.P===null?a.P=new Dv:a.P.nc&&(a.P=a.P.copy())}it.th=function(){Wn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},it.gk=function(a,y,x,b,E,te,ne){var ae=this.diagram;ae!==null&&(a===vs&&y==="elements"?E instanceof Wn?qd(E,function(fe){ly(ae.partManager,fe),Zd(ae,fe)}):sd(ae,E):a===ds&&y==="elements"&&(E instanceof Wn?qd(E,function(fe){uy(ae.partManager,fe,ae)}):Jp(ae,E)),ae.cb(a,y,x,b,E,te,ne))},it.La=function(a){if(Wn.prototype.La.call(this,a),this.data!==null){for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];E instanceof Wn&&qd(E,function(te){te.data!==null&&te.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Ti.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Ti.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Ti.prototype.bh=function(a,y){if(y!==null){var x=null,b=this.Qf;if(b!==null&&(x=b.I(a)),x!==y){if(x!==null){var E=x.diagram;E!==null&&E.remove(x)}b===null&&(this.Qf=b=new ci),y.Tf!==a&&(y.category=a),b.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)))}}},Ti.prototype.Jf=function(a){var y=this.Qf;if(y!==null){var x=y.I(a);if(x!==null){var b=x.diagram;b!==null&&b.remove(x)}y.remove(a),y.count===0&&(this.Qf=null)}},Ti.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Hn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);ei(y)}},Ti.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 tr?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof qr))break e;Ru(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Wn.Link),x.adornedObject=y)}if(x!==null){x.type===Wn.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Px(this,a),y=this.adornments;y.next();)y.value.La()}},Ti.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Rv(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function Px(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function Wm(a){if(cd(a)===!1){Fv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function N1(a){if(a.G|=2097152,cd(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||D1(a,y,x),x=a.Ib;var b=kn.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),kn.free(b),Fv(a,!1)}}Ti.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new gr);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),this.Lb=te,te.ws()||te.pp(E)},Ti.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=jr;this.locationSpot.sb()&&(te=this.locationSpot);var ne=Mt.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,ne.yi(x.x,x.y,x.width,x.height,te),y.Lb!==null&&y.Lb.Ga(ne),ne.offset(-y.measuredBounds.x,-y.measuredBounds.y),te=y.panel;te!==null&&te!==this;)te.Lb!==null&&te.Lb.Ga(ne),ne.offset(-te.measuredBounds.x,-te.measuredBounds.y),te=te.panel;else ne.yi(y,x,b,E,te);a.rotate(this.Kb,ne.x,ne.y),Mt.free(ne)}},Ti.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Ti.prototype.moveTo=function(a,y,x){a=Mt.allocAt(a,y),this.move(a,x),Mt.free(a)},Ti.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())},Ti.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())},Ti.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new ci),y.I(a)!==null)return y.I(a);var x=Wn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function Dh(a,y,x,b){b===void 0&&(b=new Mt),x=x.Mc()?jr:x;var E=y.naturalBounds;if(b.h(E.width*x.x+x.offsetX,E.height*x.y+x.offsetY),y===null||y===a)return b;for(y.transform.Ga(b),y=y.panel;y!==null&&y!==a;)y.transform.Ga(b),y=y.panel;return a.Lb!==null&&a.Lb.Ga(b),b.offset(-a.uc.x,-a.uc.y),b}Ti.prototype.mi=function(a){return a===void 0&&(a=new kn),a.assign(this.actualBounds)},Ti.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function O1(a){var y=Mt.alloc(),x=a.locationObject,b=x.naturalBounds,E=x instanceof dr?x.strokeWidth:0;if(y.yi(0,0,b.width+E,b.height+E,a.locationSpot),x!==a)for(y.offset(-E/2,-E/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=c1(a));var b=a.ag,E=2*b;if(!a.isShadowed)return x.h(y.x-1-b,y.y-1-b,y.width+2+E,y.height+2+E),x;b=y.x,E=y.y;var te=y.width;y=y.height;var ne=a.shadowBlur;return a=a.shadowOffset,te+=ne,y+=ne,b-=ne/2,E-=ne/2,0<a.x?te+=a.x:(b+=a.x,te-=a.x),0<a.y?y+=a.y:(E+=a.y,y-=a.y),x.h(b-1,E-1,te+2,y+2),x}Ti.prototype.arrange=function(){if(nl(this)===!1)N1(this);else{Hc(this,!1);var a=this.Ib,y=kn.alloc();y.assign(a);var x=hd(this);this.eh(0,0,this.uc.width,this.uc.height);var b=this.position;D1(this,b,this.location),a.ka(),a.x=b.x,a.y=b.y,a.freeze(),this.Xl(y,a),y.D(a)?this.Fd(x):!this.Zc()||rn.B(y.width,a.width)&&rn.B(y.height,a.height)||0<=this.vw&&this.C(16),kn.free(y),Fv(this,!1)}},it=Ti.prototype,it.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=kn.alloc();E.assign(x.documentBounds),E.Fv(x.padding),a.x>E.x&&a.y>E.y&&a.right<E.right&&a.bottom<E.bottom&&y.x>E.x&&y.y>E.y&&y.right<E.right&&y.bottom<E.bottom&&(b=!0),kn.free(E)}!(this.G&65536)&&a.D(y)||F1(this,b,x),x.N(),!a.w()&&!y.w()||Sa(a,y)||(this instanceof oi&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},it.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var b=this.diagram;return b!==null&&I1(this,b,a,y,x),this.pa=a,this.G&=-2097153,!this.ke.w()||b!==null&&!b.animationManager.isTicking&&b.undoManager.isUndoingRedoing||(b=this.ke,this.ke=new Mt(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),cd(this)===!1&&nl(this)===!1&&(Wm(this),N1(this)),!0};function I1(a,y,x,b,E){y===null||a instanceof qr||(y=y.animationManager,y.zb&&Pl(y,a,new Mt(b,E),x))}it.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;cd(this)||nl(this)?E.h(NaN,NaN):E.h(E.x+a-b.x,E.y+y-b.y),b.h(a,y)}else{if(E.x===a&&E.y===y)return;b.h(b.x+a-E.x,b.y+y-E.y),E.h(a,y)}Wm(this)},it.Av=function(){this.G&=-2097153,Wm(this)};function D1(a,y,x){var b=O1(a),E=a.diagram,te=x.w(),ne=y.w();te&&ne?a.G&2097152?R1(a,y,x,E,b):B1(a,y,x,E,b):te?R1(a,y,x,E,b):ne&&B1(a,y,x,E,b),a.G|=2097152,Mt.free(b),a.Uk()}function R1(a,y,x,b,E){var te=y.x,ne=y.y;y.h(x.x-E.x,x.y-E.y),b!==null&&(x=b.animationManager,(b=x.defaultAnimation.isAnimating)||!x.zb||a instanceof qr||Pl(x,a,new Mt(te,ne),y),b||y.x===te&&y.y===ne||a.g("position",new Mt(te,ne),y.copy()))}function B1(a,y,x,b,E){var te=x.copy();x.h(y.x+E.x,y.y+E.y),x.D(te)||b===null||a.g("location",te,x.copy())}function F1(a,y,x){jv(a,!1),a instanceof oi&&Mh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?hd(a)?(Po(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}it.si=function(){return!0},it.Zc=function(){return!0},it.ph=function(){return!1},it.Dd=function(){return!0};function Bv(a,y,x,b){y.constructor===a.constructor||H1||(H1=!0,Dn('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),Dn(" Old class: "+Fn(a.constructor)+", new class: "+Fn(y.constructor)+", part: "+a.toString())),a.Ej();var E=a.data;x=a.layerName;var te=a.isSelected,ne=a.isHighlighted,ae=!0,fe=!0,_e=!1;a instanceof oi&&(ae=a.isTreeLeaf,fe=a.isTreeExpanded,_e=a.wasTreeExpanded),y.Af(a),y.cloneProtected(a),a.Tf=b,a.svg!==null&&(a.svg.remove(),a.svg=null,a.Uc=!0),a.v(),a.N(),y=a.diagram,b=!0,y!==null&&(b=y.skipsUndoManager,y.skipsUndoManager=!0),a.ub=E,a.G=te?a.G|4096:a.G&-4097,a.G=ne?a.G|524288:a.G&-524289,a instanceof oi&&(a.U=ae?a.U|4:a.U&-5,a.U=fe?a.U|1:a.U&-2,a.U=_e?a.U|2:a.U&-3),E!==null&&a.La(),E=a.layerName,E!==x&&(a.Jg=x,a.layerName=E),y!==null&&(y.skipsUndoManager=b),a.Zc()&&a.C(64)}Ti.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},Ti.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},Ti.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},Ti.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},Ti.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},Ti.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},Ti.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},Ti.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},Ti.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 cd(a){return(a.G&32768)!==0}function Fv(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 hd(a){return(a.G&131072)!==0}it=Ti.prototype,it.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function Zm(a,y){a.G=y?a.G|1048576:a.G&-1048577}it.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},it.N=function(){var a=this.diagram;a!==null&&!nl(this)&&!cd(this)&&this.isVisible()&&this.Ib.w()&&a.N(nf(this,this.Ib))},it.v=function(){Wn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof oi&&this.labeledLink!==null&&tl(this.labeledLink),a.$b(!0))},it.Vo=function(a){a||(a=this.Ah,a!==null&&Zv(a,this))},it.Wo=function(a){a||(a=this.Ah,a!==null&&Kv(a,this))},it.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},it.oz=function(){return zv(this,this)};function zv(a,y){var x=y.containingGroup;return x!==null?1+zv(a,x):y instanceof oi&&(y=y.labeledLink,y!==null)?zv(a,y):0}it.sz=function(){return j1(this,this)};function j1(a,y){var x=y.containingGroup;return x!==null||y instanceof oi&&(x=y.labeledLink,x!==null)?j1(a,x):y}it.Td=function(a){return a instanceof tr?Hv(this,this,a):!1};function Hv(a,y,x){if(y===x||x===null)return!1;var b=y.containingGroup;return b===null||b!==x&&!Hv(a,b,x)?y instanceof oi&&(y=y.labeledLink,y!==null)?Hv(a,y,x):!1:!0}it.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof tr&&Zm(y,!0),y instanceof oi){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 oi&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof tr&&Zm(y,!1),y instanceof oi&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Ti.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof oi&&this.isLinkLabel)},Ti.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 oi&&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 dd(a,y,x,b,E,te){if(te===void 0&&(te=null),!(a.contains(y)||te!==null&&!te(y)||y instanceof qr)){if(a.add(y),y instanceof oi){if(x&&y instanceof tr)for(var ne=y.memberParts;ne.next();)dd(a,ne.value,x,b,E,te);if(E!==!1)for(ne=y.linksConnected;ne.next();){var ae=ne.value;if(!a.contains(ae)){var fe=ae.fromNode,_e=ae.toNode;fe=fe===null||a.contains(fe),_e=_e===null||a.contains(_e),(E?fe&&_e:fe||_e)&&dd(a,ae,x,b,E,te)}}if(1<b)for(y=y.Ou();y.next();)dd(a,y.value,x,b-1,E,te)}else if(y instanceof $n)for(y=y.labelNodes;y.next();)dd(a,y.value,x,b,E,te)}}Ye.Object.defineProperties(Ti.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?qi: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 b=y.pc(-1,this,!0);if(0<=b&&x.cb(ds,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb(vs,"parts",a,null,this,!0,b),b=this.layerChanged,b!==null){var E=x.aa;x.aa=!0,b(this,y,a),x.aa=E}}}}},layerChanged:{get:function(){return this.P!==null?this.P.zq:null},set:function(a){var y=this.layerChanged;y!==a&&(yl(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&&Nu(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 qr?this.type!==Wn.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:Hr},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),yl(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:ts},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),yl(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&&(yl(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:Xs},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),yl(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,b=this.ke;if(!(b.x===y||isNaN(b.x)&&isNaN(y))||!(b.y===x||isNaN(b.y)&&isNaN(x))){if(a=a.copy(),y=a,this.ph())y=!1;else{if(this.ke=y,this.G|=2097152,nl(this)===!1&&(Wm(this),x=this.pa,x.w())){var E=this.diagram;if(E===null||E.animationManager.isTicking||!E.undoManager.isUndoingRedoing){var te=x.copy();x.h(x.x+(y.x-b.x),x.y+(y.y-b.y)),I1(this,E,x,te.x,te.y),this.g("position",te,x.copy())}}y=!0}y&&this.g("location",b,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,b=this.data,E=null;if(x!==null&&b!==null&&!(this instanceof qr)){var te=x.model.undoManager;te.isEnabled&&!te.isUndoingRedoing&&(E=this.clone(),E.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||b===null||this instanceof qr?this instanceof qr&&(E=this.adornedPart,E!==null&&(a=E.Qf,a!==null&&a.remove(y),E.bh(this.category,this))):(te=x.model,te.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(b,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(Ru(x),x=x.copy(),x!==null&&Bv(this,x,y,a))):(te!==null&&te.jm(b,a),x=dS(x.partManager,b,a),x!==null&&(Ru(x),x=x.copy(),x===null||x instanceof $n||(b=this.location.copy(),Bv(this,x,y,a),this.location.w()||(this.location=b)))),E!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",E,y))))}}},self:{get:function(){return this},set:function(a){Bv(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 b=!1;if(x!==null){b=x.skipsUndoManager,x.skipsUndoManager=!0;var E=x.selection;E.ka(),a?E.add(this):E.remove(this),E.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=b)}}}},isHighlighted:{get:function(){return(this.G&524288)!==0},set:function(a){var y=(this.G&524288)!==0;if(y!==a){this.G^=524288;var x=this.diagram;x!==null&&(x=x.highlighteds,x.ka(),a?x.add(this):x.remove(this),x.freeze()),this.g("isHighlighted",y,a),this.N(),a=this.highlightedChanged,a!==null&&a(this)}}},isShadowed:{get:function(){return(this.G&8192)!==0},set:function(a){var y=(this.G&8192)!==0;y!==a&&(this.G^=8192,this.Uc=!0,this.g("isShadowed",y,a),this.N())}},isAnimated:{get:function(){return(this.G&262144)!==0},set:function(a){var y=(this.G&262144)!==0;y!==a&&(this.G^=262144,this.g("isAnimated",y,a))}},highlightedChanged:{get:function(){return this.P!==null?this.P.oq:null},set:function(a){var y=this.highlightedChanged;y!==a&&(yl(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&&(yl(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&&(yl(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 $n?(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&&(yl(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&&(yl(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&&(yl(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:Ho},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),yl(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&&(yl(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&&(yl(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:oo},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),yl(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&&Nt("Cannot make a Group a member of itself: "+this.toString()),Nt("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?Kv(y,this):this instanceof tr&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Zv(a,this):this instanceof tr&&x!==null&&x.ai.add(this),this.C(1),x!==null&&x.aa){var b=this.data,E=x.model;if(b!==null&&E.Xj()){var te=E.wa(a!==null?a.data:null);E.mp(b,te)}}if(b=this.containingGroupChanged,b!==null&&(E=!0,x!==null&&(E=x.aa,x.aa=!0),b(this,y,a),x!==null&&(x.aa=E)),this instanceof tr){for(x=new In,dd(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof oi)for(b=b.linksConnected;b.next();)xp(b.value)}if(this instanceof oi){for(x=this.linksConnected;x.next();)xp(x.value);x=this.labeledLink,x!==null&&xp(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&Nu(y,-1,a))}}else Nt("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&&(yl(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof oi&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(yl(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&&(yl(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:ko},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),yl(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&&(yl(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&&(yl(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Ti.prototype.invalidateLayout=Ti.prototype.C,Ti.prototype.findCommonContainingGroup=Ti.prototype.px,Ti.prototype.isMemberOf=Ti.prototype.Td,Ti.prototype.findTopLevelPart=Ti.prototype.sz,Ti.prototype.findSubGraphLevel=Ti.prototype.oz,Ti.prototype.ensureBounds=Ti.prototype.Va,Ti.prototype.getDocumentBounds=Ti.prototype.mi,Ti.prototype.findObject=Ti.prototype.fb,Ti.prototype.moveTo=Ti.prototype.moveTo,Ti.prototype.invalidateAdornments=Ti.prototype.Wb,Ti.prototype.clearAdornments=Ti.prototype.Ej,Ti.prototype.removeAdornment=Ti.prototype.Jf,Ti.prototype.addAdornment=Ti.prototype.bh,Ti.prototype.findAdornment=Ti.prototype.Pj,Ti.prototype.updateTargetBindings=Ti.prototype.La;var H1=!1;Ti.className="Part",Ti.LayoutNone=0,Ti.LayoutAdded=1,Ti.LayoutRemoved=2,Ti.LayoutShown=4,Ti.LayoutHidden=8,Ti.LayoutNodeSized=16,Ti.LayoutGroupLayout=32,Ti.LayoutNodeReplaced=64,Ti.LayoutStandard=127,Ti.LayoutAll=16777215;function qr(a,y){a===void 0||a instanceof sa||typeof a=="string"?Ti.call(this,a):(Ti.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)}qe(qr,Ti),qr.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},qr.prototype.updateRelationshipsFromData=function(){},qr.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof $n&&y instanceof dr){y=x.path,x.Ul(a),a=y.geometry,x=this.O.s,y=x.length;for(var b=0;b<y;b++){var E=x[b];E.isPanelMain&&E instanceof dr&&(E.ua=a)}}},qr.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!nl(a))},qr.prototype.Zc=function(){return!1},qr.prototype.gk=function(a,y,x,b,E,te,ne){if(a===vs&&y==="elements"){if(E instanceof rl)this.$a===null&&(this.$a=E);else if(E instanceof Wn){var ae=E.Nl(function(fe){return fe instanceof rl});ae instanceof rl&&this.$a===null&&(this.$a=ae)}}else a===ds&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Wn&&this.$a.rg(b)&&(this.$a=null));Ti.prototype.gk.call(this,a,y,x,b,E,te,ne)},qr.prototype.updateAdornments=function(){},qr.prototype.Lj=function(){},Ye.Object.defineProperties(qr.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}}}),qr.className="Adornment";function Uv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=xl,this.er=$m,this.Kr=this.ij=this.Nq=this.Mq=null}Uv.prototype.copy=function(){var a=new Uv;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 oi(a,y){a===void 0||a instanceof sa||typeof a=="string"?Ti.call(this,a):(Ti.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new Bn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}qe(oi,Ti),oi.prototype.cloneProtected=function(a){Ti.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},it=oi.prototype,it.Af=function(a){Ti.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function Rh(a){a.Ba===null?a.Ba=new Uv:a.Ba.nc&&(a.Ba=a.Ba.copy())}it.th=function(){Ti.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function U1(a,y){y!==null&&(a.af===null&&(a.af=new In),a.af.add(y))}function G1(a,y,x,b){if(y===null||a.af===null)return null;for(var E=a.af.iterator;E.next();){var te=E.value;if(te.Ds===a&&te.cv===y&&te.Ox===x&&te.Px===b||te.Ds===y&&te.cv===a&&te.Ox===b&&te.Px===x)return te}return null}it.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=G1(this,a,y,x),a!==null&&a.Sl()},it.gk=function(a,y,x,b,E,te,ne){a===vs&&y==="elements"?this.wc=null:a===ds&&y==="elements"&&(this.wc=null),Ti.prototype.gk.call(this,a,y,x,b,E,te,ne)},it.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Ul(x.fromPort),Ul(x.toPort),x.bb())}};function W1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Ul(x.fromPort),Ul(x.toPort),x.bb())}}function Ul(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Ul(y.port)}}it.si=function(){return!0},oi.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},oi.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},oi.prototype.isVisible=function(){if(!Ti.prototype.isVisible.call(this))return!1;var a=!0,y=kh,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===kh){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Qs){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(b){return!b.isTreeExpanded}))return!1}else if(y===op&&(a=a?this.Oo():this.Po(),0<a.count&&a.any(function(b){return!b.isTreeExpanded})))return!1;return a=this.labeledLink,a!==null?a.isVisible():!0},oi.prototype.Zb=function(a){Ti.prototype.Zb.call(this,a);for(var y=this.linksConnected;y.next();){var x=y.value;if(a&&this.containingGroup!==null){var b=x.To(this);b===null||b.Td(this.containingGroup)||x.bb()}x.Zb(a)}},oi.prototype.qx=function(){var a=new In,y=new In;return Z1(this,this,a,y),y.iterator};function Z1(a,y,x,b){if(y!==null&&!x.has(y)){x.add(y);var E=!0,te=a.diagram;te!==null&&(E=te.isTreePathToChildren),y.linksConnected.each(function(ne){ne.isTreeLink?(E?ne.fromNode===y:ne.toNode===y)&&Z1(a,E?ne.toNode:ne.fromNode,x,b):b.add(ne)})}}oi.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new zi(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},it=oi.prototype,it.Mo=function(a){a===void 0&&(a=null);var y=new zi(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},it.Sd=function(a){a===void 0&&(a=null);var y=new zi(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},it.Mu=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.fromNode===this?(a===null||E.fromPortId===a)&&(E=E.toNode,y!==null?y.add(E):x!==null&&x!==E?(y=new In,y.add(x),y.add(E)):x=E):E.toNode!==this||a!==null&&E.toPortId!==a||(E=E.fromNode,y!==null?y.add(E):x!==null&&x!==E?(y=new In,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Fi(x):qi},it.Po=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.fromNode!==this||a!==null&&E.fromPortId!==a||(E=E.toNode,y!==null?y.add(E):x!==null&&x!==E?(y=new In,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Fi(x):qi},it.Oo=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.toNode!==this||a!==null&&E.toPortId!==a||(E=E.fromNode,y!==null?y.add(E):x!==null&&x!==E?(y=new In,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Fi(x):qi},it.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new zi(this.jb),E=this;return b.predicate=function(te){return!((te.fromNode!==E||te.toNode!==a||y!==null&&te.fromPortId!==y||x!==null&&te.toPortId!==x)&&(te.fromNode!==a||te.toNode!==E||x!==null&&te.fromPortId!==x||y!==null&&te.toPortId!==y))},b},it.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new zi(this.jb),E=this;return b.predicate=function(te){return!(te.fromNode!==E||te.toNode!==a||y!==null&&te.fromPortId!==y||x!==null&&te.toPortId!==x)},b};function Km(a,y,x){Ul(x);var b=a.jb.contains(y);if(b||a.jb.add(y),!b||y.fromNode===y.toNode){var E=a.linkConnected;if(E!==null){var te=!0,ne=a.diagram;ne!==null&&(te=ne.aa,ne.aa=!0),E(a,y,x),ne!==null&&(ne.aa=te)}}!b&&y.isTreeLink&&(x=y.fromNode,y=y.toNode,x!==null&&y!==null&&x!==y&&(b=!0,a=a.diagram,a!==null&&(b=a.isTreePathToChildren),E=b?y:x,te=b?x:y,E.ci||(E.ci=te),!te.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(b?x===te&&(te.isTreeLeaf=!1):y===te&&(te.isTreeLeaf=!1))))}function Vm(a,y,x){Ul(x);var b=a.jb.remove(y),E=null;if(b||y.toNode===y.fromNode){var te=a.linkDisconnected;if(E=a.diagram,te!==null){var ne=!0;E!==null&&(ne=E.aa,E.aa=!0),te(a,y,x),E!==null&&(E.aa=ne)}}b&&y.isTreeLink&&(x=!0,E!==null&&(x=E.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,E!==null&&E.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):Sg(y)))}function Sg(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 b=x.value;if(b.isTreeLink){if(y){if(b.fromNode===a){a.isTreeLeaf=!1;return}}else if(b.toNode===a){a.isTreeLeaf=!1;return}}}a.isTreeLeaf=!0}}}oi.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},it=oi.prototype,it.Vo=function(a){Ti.prototype.Vo.call(this,a),a||(Sg(this),a=this.Yk,a!==null&&eS(a,this))},it.Wo=function(a){Ti.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},it.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 b=x.value;y?a.remove(b):(b.fromNode===this&&(b.fromNode=null),b.toNode===this&&(b.toNode=null))}}this.labeledLink=null,Ti.prototype.Lj.call(this)},it.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;K1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function K1(a){a.wc===null?a.wc=new ci:a.wc.clear(),a.qm(a,function(y,x){V1(y,x)}),a.wc.count===0&&a.wc.add("",a)}function V1(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function Gv(a,y,x){var b=y.portId;if(b!==null&&(a.wc!==null&&a.wc.remove(b),y=a.diagram,y!==null&&x)){for(x=null,a=a.findLinksConnected(b);a.next();)b=a.value,x===null&&(x=Hn()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);ei(x)}}}it.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 b=x.jb.iterator;b.next();){var E=b.value;if(E.isTreeLink&&(y=E.fromNode,y!==x&&y!==this))break}if(y===this||y===null||y===x)return!1;x=y}else for(;x!==a;){for(y=null,b=x.jb.iterator;b.next()&&(E=b.value,!E.isTreeLink||(y=E.toNode,y===x||y===this)););if(y===this||y===null||y===x)return!1;x=y}return!0},it.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 b=x.value;if(b.isTreeLink&&(a=b.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()&&(b=x.value,!b.isTreeLink||(a=b.toNode,a===y||a===this)););if(a===this)return this;if(a===null||a===y)return y;y=a}},it.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)Zm(y,!0),y=y.pg();var x=null;for(y=a;y!==null;){if(y.G&1048576){x=y;break}y=y.pg()}for(y=this;y!==null;)Zm(y,!1),y=y.pg();return x},it.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},it.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof oi)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},it.vz=function(){function a(x,b){b.add(x);var E=x.kh();E!==null&&(b.add(E),x=x.pg(),x!==null&&a(x,b))}var y=new In;return a(this,y),y},it.uz=function(){return $1(this,this)};function $1(a,y){return y=y.pg(),y===null?0:1+$1(a,y)}it.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new zi(this.jb);var x=this;return y.predicate=a?function(b){return!!(b.isTreeLink&&b.fromNode===x)}:function(b){return!!(b.isTreeLink&&b.toNode===x)},y},it.Ou=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren);var x=y=null,b=this.jb.iterator;if(a)for(;b.next();)a=b.value,a.isTreeLink&&a.fromNode===this&&(a=a.toNode,y!==null?y.add(a):x!==null&&x!==a?(y=new Bn,y.add(x),y.add(a)):x=a);else for(;b.next();)a=b.value,a.isTreeLink&&a.toNode===this&&(a=a.fromNode,y!==null?y.add(a):x!==null&&x!==a?(y=new Bn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Fi(x):qi},it.wz=function(a){a===void 0&&(a=1/0);var y=new In;return dd(y,this,!1,a,!0),y},oi.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 In;x.add(this),Y1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===kh),y.Ue=!1}};function Y1(a,y,x,b,E,te,ne){if(1<b)for(var ae=x?a.Mo():a.Sd();ae.next();){var fe=ae.value;fe.isTreeLink&&(fe=fe.To(a),fe===null||fe===a||y.contains(fe)||(y.add(fe),Y1(fe,y,x,b-1,E,te,ne)))}else X1(a,y,x,E,te,ne)}function X1(a,y,x,b,E,te){for(var ne=E===a?!0:a.isTreeExpanded,ae=x?a.Mo():a.Sd(),fe={};ae.next();){var _e=ae.value;if(_e.isTreeLink&&(_e=_e.To(a),_e!==null&&_e!==a)){var Te=y.contains(_e);if(Te||y.add(_e),ne){var je=x?_e.Oo():_e.Po();fe.uv=a,je.all(function(Ve){return function(Qe){return Qe===Ve.uv||!Qe.isTreeExpanded}}(fe))&&b.Aj(_e,E),_e.oh(),_e.Zb(!1)}_e.isTreeExpanded&&(_e.wasTreeExpanded=_e.isTreeExpanded,Te||X1(_e,y,x,b,E,te))}fe={uv:fe.uv}}a.isTreeExpanded=!1}oi.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 In;x.add(this),J1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===kh),y.Ue=!1}};function J1(a,y,x,b,E,te,ne){for(var ae=te===a?!1:a.isTreeExpanded,fe=x?a.Mo():a.Sd(),_e={};fe.next();){var Te=fe.value;if(Te.isTreeLink&&(ae||Te.fd||Te.bb(),Te=Te.To(a),Te!==null&&Te!==a&&!y.contains(Te))){if(y.add(Te),!ae){Te.Zb(!0),Te.oh();var je=x?Te.Oo():Te.Po();_e.vv=a,je.all(function(Ve){return function(Qe){return Qe===Ve.vv||!Qe.isTreeExpanded}}(_e))&&E.Cj(Te,te)}(2<b||Te.wasTreeExpanded)&&(Te.wasTreeExpanded=!1,J1(Te,y,x,b-1,E,te,ne))}_e={vv:_e.vv}}a.isTreeExpanded=!0}Ye.Object.defineProperties(oi.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:$m},set:function(a){var y=this.portSpreading;y!==a&&(Rh(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&&Mh(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:xl},set:function(a){typeof a=="number"&&(a=new Mi(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),Rh(this),this.Ba.yp=a;var x=this.diagram;x!==null&&Mh(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&&(Rh(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&&(Rh(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&&(Rh(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,b=this.data;if(y!==null){if(y.wd!==null&&(y.wd.remove(this),y.v()),x!==null&&b!==null&&!x.undoManager.isUndoingRedoing){var E=y.data,te=x.model;if(E!==null&&te.ri()){var ne=te.wa(b);ne!==void 0&&te.Qx(E,ne)}}this.containingGroup=null}this.Yk=a,a!==null&&(eS(a,this),x===null||b===null||x.undoManager.isUndoingRedoing||(E=a.data,x=x.model,E!==null&&x.ri()&&(b=x.wa(b),b!==void 0&&x.Bu(E,b))),this.containingGroup=a.containingGroup),tl(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&K1(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 b=!0;x!==null&&(b=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=b)}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&&(Rh(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))}}}),oi.prototype.expandTree=oi.prototype.expandTree,oi.prototype.collapseTree=oi.prototype.collapseTree,oi.prototype.findTreeParts=oi.prototype.wz,oi.prototype.findTreeChildrenNodes=oi.prototype.Ou,oi.prototype.findTreeChildrenLinks=oi.prototype.Qo,oi.prototype.findTreeLevel=oi.prototype.uz,oi.prototype.findTreeParentChain=oi.prototype.vz,oi.prototype.findTreeParentNode=oi.prototype.pg,oi.prototype.findTreeParentLink=oi.prototype.kh,oi.prototype.findCommonTreeParent=oi.prototype.gz,oi.prototype.findTreeRoot=oi.prototype.xz,oi.prototype.isInTreeOf=oi.prototype.Nz,oi.prototype.findPort=oi.prototype.ns,oi.prototype.findLinksTo=oi.prototype.kz,oi.prototype.findLinksBetween=oi.prototype.jz,oi.prototype.findNodesInto=oi.prototype.Oo,oi.prototype.findNodesOutOf=oi.prototype.Po,oi.prototype.findNodesConnected=oi.prototype.Mu,oi.prototype.findLinksInto=oi.prototype.Sd,oi.prototype.findLinksOutOf=oi.prototype.Mo,oi.prototype.findExternalTreeLinksConnected=oi.prototype.qx,oi.prototype.invalidateConnectedLinks=oi.prototype.Bd,oi.prototype.invalidateLinkBundle=oi.prototype.Lz;var _x=new Ln(oi,"SpreadingNone",10),$m=new Ln(oi,"SpreadingEvenly",11),Wv=new Ln(oi,"SpreadingPacked",12);oi.className="Node",oi.SpreadingNone=_x,oi.SpreadingEvenly=$m,oi.SpreadingPacked=Wv;function tr(a,y){a===void 0||a instanceof sa||typeof a=="string"?oi.call(this,a):(oi.call(this),a&&(y=a)),this.U|=4608,this.Gn=new In,this.$a=null,this.Sc=new es,this.Sc.group=this,this.gl=new In,this.tb=this.$p=null,y&&Object.assign(this,y)}qe(tr,oi),tr.prototype.cloneProtected=function(a){oi.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof rl});y instanceof rl?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())},it=tr.prototype,it.Af=function(a){oi.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 oi)x.Bd(y);else if(x instanceof $n)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},it.gk=function(a,y,x,b,E,te,ne){if(a===vs&&y==="elements"){if(E instanceof rl)this.$a===null?this.$a=E:this.$a!==E&&Nt("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof Wn){var ae=E.Nl(function(fe){return fe instanceof rl});ae instanceof rl&&(this.$a===null?this.$a=ae:this.$a!==ae&&Nt("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===ds&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Wn&&this.$a.rg(b)&&(this.$a=null));oi.prototype.gk.call(this,a,y,x,b,E,te,ne)},it.Xl=function(a,y){oi.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Wn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Wn&&(a=a.Pb()),this.tb===null&&(this.tb=new kn),a.mi(this.tb),a instanceof dr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},it.eh=function(a,y,x,b){this.nf=this.$a,oi.prototype.eh.call(this,a,y,x,b)},it.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof $n||y.Va()}),oi.prototype.Va.call(this)},it.si=function(){if(!oi.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof oi){if(y.isVisible()&&nl(y))return!1}else if(y instanceof $n&&y.isVisible()&&nl(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function Zv(a,y){if(a.Gn.add(y)){y instanceof tr&&a.gl.add(y);var x=a.memberAdded;if(x!==null){var b=!0,E=a.diagram;E!==null&&(b=E.aa,E.aa=!0),x(a,y),E!==null&&(E.aa=b)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!1)}y instanceof $n&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function Kv(a,y){if(a.Gn.remove(y)){y instanceof tr&&a.gl.remove(y);var x=a.memberRemoved;if(x!==null){var b=!0,E=a.diagram;E!==null&&(b=E.aa,E.aa=!0),x(a,y),E!==null&&(E.aa=b)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!0)}y instanceof $n&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}it.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)}oi.prototype.Lj.call(this)},tr.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=Tn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},tr.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=Tn(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},tr.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))},it=tr.prototype,it.Bd=function(a){var y=(this.U&65536)!==0;if(oi.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 b=x.fromNode;b!==null&&b!==this&&b.Td(this)&&!b.isVisible()?(Ul(x.fromPort),Ul(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(Ul(x.fromPort),Ul(x.toPort),x.bb()))}}},it.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 In,b=y.iterator;b.next();){var E=b.value;if(E instanceof oi)for(E=E.linksConnected;E.next();){var te=E.value;y.contains(te)||x.add(te)}}return a&&(this.$p=x),x.iterator},it.iz=function(){var a=this.Rj();a.add(this);for(var y=new In,x=a.iterator;x.next();){var b=x.value;if(b instanceof oi)for(b=b.linksConnected;b.next();){var E=b.value,te=E.fromNode;te===null||a.contains(te)&&te!==this||y.add(te),E=E.toNode,E===null||a.contains(E)&&E!==this||y.add(E)}}return y.iterator},it.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new In;return a(this,y),y},it.Rj=function(){var a=new In;return dd(a,this,!0,0,!0),a.remove(this),a},it.Zb=function(a){oi.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},tr.prototype.collapseSubGraph=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,b){for(var E=a.memberParts;E.next();){var te=E.value;if(te.Zb(!1),te instanceof tr&&te.isSubGraphExpanded&&(te.wasSubGraphExpanded=te.isSubGraphExpanded,Q1(te,y,x,b)),te instanceof oi)te.Bd(y),x.Aj(te,b);else if(te instanceof $n)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!1}tr.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,b){for(var E=a.memberParts;E.next();){var te=E.value;if(te.Zb(!0),te instanceof tr&&te.wasSubGraphExpanded&&(te.wasSubGraphExpanded=!1,q1(te,y,x,b)),te instanceof oi)te.Bd(y),x.Cj(te,b);else if(te instanceof $n)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!0}tr.prototype.move=function(a,y){y===void 0&&(y=!1);var x=y?this.location:this.position,b=x.x;x=x.y;var E=a.x,te=a.y;if(!(b===E||isNaN(b)&&isNaN(E))||!(x===te||isNaN(x)&&isNaN(te))){for(b=E-(isNaN(b)?0:b),x=te-(isNaN(x)?0:x),te=Mt.alloc(),oi.prototype.move.call(this,a,y),a=new In,y=this.Rj().iterator;y.next();)E=y.value,E instanceof $n&&(E.suspendsRouting&&a.add(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(E.suspendsRouting=!0);for(y.reset();y.next();)if(E=y.value,!(E.ph()||E instanceof oi&&E.isLinkLabel)){var ne=E.position,ae=E.location;ne.w()?(te.x=ne.x+b,te.y=ne.y+x,E.position=te):ae.w()&&(te.x=ae.x+b,te.y=ae.y+x,E.location=te)}for(y.reset();y.next();)E=y.value,E instanceof $n&&(E.suspendsRouting=a.contains(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(ne=E.position,te.x=ne.x+b,te.y=ne.y+x,te.w()?E.move(te):E.bb(),$v(E)&&E.bb());Mt.free(te)}},Ye.Object.defineProperties(tr.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&&Nt("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&&(Rh(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&&(Rh(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&&(Rh(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 b=!0;x!==null&&(b=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=b)}x!==null&&x.undoManager.isUndoingRedoing?(this.$a!==null&&this.$a.v(),this.memberParts.each(function(E){E.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&&(Rh(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)}}}),tr.prototype.expandSubGraph=tr.prototype.expandSubGraph,tr.prototype.collapseSubGraph=tr.prototype.collapseSubGraph,tr.prototype.findSubGraphParts=tr.prototype.Rj,tr.prototype.findContainingGroupChain=tr.prototype.hz,tr.prototype.findExternalNodesConnected=tr.prototype.iz,tr.prototype.findExternalLinksConnected=tr.prototype.Lu,tr.prototype.ensureBounds=tr.prototype.Va,tr.className="Group";function rl(a){tn.call(this),this.yb=xa,this.ko=new kn(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}qe(rl,tn),rl.prototype.cloneProtected=function(a){tn.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},rl.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Eo(0,0,y.width,y.height,a.x,a.y)},rl.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof tr||a instanceof qr)||Nt("Placeholder is not inside a Group or Adornment."),a instanceof tr){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(Is(b,(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,b.width,b.height),b=a.memberParts,x=!1;b.next();)if(b.value.isVisible()){x=!0;break}b=a.diagram,!x||b===null||b.animationManager.Xu(a)||isNaN(y.x)||isNaN(y.y)||(x=Mt.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),Mt.free(x))}else{y=this.dc,x=this.yb,b=x.left+x.right;var E=x.top+x.bottom,te=a.adornedObject;a.angle=te.li();var ne=0;te instanceof dr&&(ne=te.strokeWidth);var ae=te.Df(),fe=te.naturalBounds,_e=(fe.width+ne)*ae;ne=(fe.height+ne)*ae,a.type!==Wn.Link&&(ae=te.ga(a.category==="Selection"?Xs:a.locationSpot,Mt.alloc()),a.location=ae,Mt.free(ae)),isNaN(_e)||isNaN(ne)?(a=te.ga(Xs,Mt.alloc()),_e=kn.allocAt(a.x,a.y,0,0),_e.Ye(te.ga(Na,a)),_e.Ye(te.ga(wl,a)),_e.Ye(te.ga(Ia,a)),Is(y,_e.width+b||0,_e.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),Mt.free(a),kn.free(_e)):(Is(y,_e+b||0,ne+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},rl.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},rl.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof tr&&!y.layer.isTemporary&&y.computesBoundsAfterDrag&&this.ko.w()){var E=x.toolManager.findTool("Dragging");if(E===x.currentTool&&(x=E.computeBorder(y,this.ko,a),x!==null))return x}x=kn.alloc(),E=this.computeMemberBounds(x);var te=this.yb;return y instanceof tr&&!y.isSubGraphExpanded?a.h(E.x-te.left,E.y-te.top,0,0):a.h(E.x-te.left,E.y-te.top,Math.max(E.width+te.left+te.right,0),Math.max(E.height+te.top+te.bottom,0)),kn.free(x),b&&y instanceof tr&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},rl.prototype.computeMemberBounds=function(a){if(!(this.part instanceof tr))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,b=1/0,E=-1/0,te=-1/0,ne=y.memberParts;ne.next();){var ae=ne.value;if(ae.isVisible()){if(ae instanceof $n&&(!y.computesBoundsIncludingLinks||iu(ae)||ae.fromNode===y||ae.toNode===y))continue;ae=ae.actualBounds,ae.left<x&&(x=ae.left),ae.top<b&&(b=ae.top),ae.right>E&&(E=ae.right),ae.bottom>te&&(te=ae.bottom)}}return isFinite(x)&&isFinite(b)?a.h(x,b,E-x,te-b):(y=y.location,a.h(y.x,y.y,0,0)),a},Ye.Object.defineProperties(rl.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Mi(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),rl.className="Placeholder";function $n(a){Ti.call(this,Wn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=ol,this.Om=0,this.Qm=ol,this.Rm=NaN,this.qj=Jv,this.po=.5,this.wd=null,this.Nb=new Bn().freeze(),this.Tg=this.Mg=null,this.ml=new kn,this.ua=new Yn,this.u=this.o=this.Sf=this.Wf=null,this.su=new Mt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}qe($n,Ti),$n.prototype.cloneProtected=function(a){Ti.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())},it=$n.prototype,it.Af=function(a){Ti.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&&Ul(y),a=a.toPort,a!==null&&Ul(a)},it.qb=function(a){a.classType===$n?(a.value&2)===2?this.routing=a:a===ou||a===Fh||a===bp?this.curve=a:a===bg||a===e0||a===t0?this.adjusting=a:a!==Jv&&a!==ol&&Nt("Unknown Link enum value for a Link property: "+a):Ti.prototype.qb.call(this,a)},it.Xc=function(){this.ba===null&&(this.ba=new lg)},it.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),nl(a)||cd(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),nl(a)||cd(a)))},it.zv=function(){return!1},it.Av=function(){},it.Zc=function(){return!1},$n.prototype.computeAngle=function(a,y,x){return $n.computeAngle(y,x)},$n.computeAngle=function(a,y){switch(a){default:case ol:a=0;break;case Cg:a=y;break;case Pg:a=y+90;break;case _g:a=y-90;break;case Qv:a=y+180;break;case n0:a=rn.bp(y),90<a&&270>a&&(a-=180);break;case Eg:a=rn.bp(y+90),90<a&&270>a&&(a-=180);break;case Lg:a=rn.bp(y-90),90<a&&270>a&&(a-=180);break;case i0:if(a=rn.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return rn.bp(a)};function xp(a){var y=a.fromNode,x=a.toNode,b=null;if(y!==null?b=x!==null?y.px(x):y.containingGroup:x!==null?b=x.containingGroup:b=null,y=b,x=a.Ah,x!==y){x!==null&&Kv(x,a),a.Ah=y,y!==null&&Zv(y,a);var E=a.containingGroupChanged;if(E!==null){var te=!0,ne=a.diagram;ne!==null&&(te=ne.aa,ne.aa=!0),E(a,x,y),ne!==null&&(ne.aa=te)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=b}it=$n.prototype,it.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Ti.prototype.oh.call(this)},it.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},it.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function eS(a,y){a.wd===null&&(a.wd=new In),a.wd.add(y),a.v()}it.Vo=function(a){if(Ti.prototype.Vo.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 b=this.toPort;x===a&&b===y||Km(x,this,b)}xg(this)}},it.Wo=function(a){if(Ti.prototype.Wo.call(this,a),rf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Vm(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Vm(x,this,b)}wg(this)}},it.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))},$n.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},$n.prototype.move=function(a,y){var x=y?this.location:this.position,b=x.x;isNaN(b)&&(b=0);var E=x.y;for(isNaN(E)&&(E=0),b=a.x-b,E=a.y-E,y===!0?Ti.prototype.move.call(this,a,!1):(a=Mt.allocAt(x.x+b,x.y+E),Ti.prototype.move.call(this,a,!1),Mt.free(a)),Bh(this,b,E),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+b,x.y+E)},$n.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},$n.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},$n.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(ss),a;if(y===1)return a.assign(this.i(0)),a;if(y===2){var x=this.i(0),b=this.i(1);return a.h((x.x+b.x)/2,(x.y+b.y)/2),a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===ou))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()===ou){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return rn.ax(x.x,x.y,b.x,b.y,b.x,b.y,E.x,E.y,a),a}if(b=(y-1)/3|0,x=3*(b/2|0),b%2===1){b=this.i(x),E=this.i(x+1);var te=this.i(x+2);x=this.i(x+3),rn.ax(b.x,b.y,E.x,E.y,te.x,te.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var ne=this.flattenedLengths;for(x=this.flattenedTotalLength,E=te=b=0;b<x/2&&te<y&&(E=ne[te],!(b+E>x/2));)b+=E,te++;return y=this.i(te),te=this.i(te+1),1>Math.abs(y.x-te.x)?y.y>te.y?a.h(y.x,y.y-(x/2-b)):a.h(y.x,y.y+(x/2-b)):1>Math.abs(y.y-te.y)?y.x>te.x?a.h(y.x-(x/2-b),y.y):a.h(y.x+(x/2-b),y.y):(x=(x/2-b)/E,a.h(y.x+x*(te.x-y.x),y.y+x*(te.y-y.y))),a},$n.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()===ou))return this.ua.wx(.5);if(this.computeCurve()===ou&&4<=a){var y=(a-1)/3|0,x=3*(y/2|0);if(y%2===1){x=Math.floor(x),a=this.i(x),y=this.i(x+1);var b=this.i(x+2);return x=this.i(x+3),rn.My(a.x,a.y,y.x,y.y,b.x,b.y,x.x,x.y)}if(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,b=this.flattenedTotalLength;var E=0;x=0;for(var te;E<b/2&&x<a&&(te=y[x],!(E+te>b/2));)E+=te,x++;if(y=this.i(x),b=this.i(x+1),1>Math.abs(y.x-b.x)&&1>Math.abs(y.y-b.y)){if(0<x&&x+2<a)return this.i(x-1).ab(this.i(x+2))}else{if(1>Math.abs(y.x-b.x))return y.y>b.y?270:90;if(1>Math.abs(y.y-b.y))return y.x>b.x?180:0}return y.ab(b)},it=$n.prototype,it.i=function(a){return this.Nb.s[a]},it.dd=function(a,y){this.Nb.cd(a,y)},it.L=function(a,y,x){this.Nb.cd(a,new Mt(y,x))},it.Kz=function(a,y){this.Nb.Gb(a,y)},it.m=function(a,y,x){this.Nb.Gb(a,new Mt(y,x))},it.ne=function(a){this.Nb.add(a)},it.yf=function(a,y){this.Nb.add(new Mt(a,y))},it.pv=function(a){this.Nb.mb(a)},it.Fj=function(){this.Nb.clear()};function Bh(a,y,x){if(y!==0||x!==0)if(a.pointsCount===0)a.defaultFromPoint&&a.defaultFromPoint.offset(y,x),a.defaultToPoint&&a.defaultToPoint.offset(y,x);else{for(var b=a.fd,E=new Bn,te=a.Nb.iterator;te.next();){var ne=te.value;E.add(new Mt(ne.x+y,ne.y+x).freeze())}E.freeze(),te=a.Nb,a.Nb=E,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),tl(a)),b?Ym(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),ne!==null&&ne.animationManager.zb&&jo(ne.animationManager,a,E),a.g("points",te,E)}}it.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},it.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,b=1/0,E=a.s,te=E.length,ne=0;ne<te;ne++){var ae=E[ne];x=Math.min(ae.x,x),b=Math.min(ae.y,b)}ae=ne=1/0;for(var fe=y.s,_e=fe.length,Te=0;Te<_e;Te++){var je=fe[Te];ne=Math.min(je.x,ne),ae=Math.min(je.y,ae),je.freeze()}if(y.freeze(),_e===te){for(te=0;te<_e;te++)if(Te=E[te],je=fe[te],Te.x-x!==je.x-ne||Te.y-b!==je.y-ae){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&jo(x.animationManager,this,y),Ym(this),this.g("points",a,y)}},it.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function Ym(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))}it.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())}},it.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()}}},$n.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Nf||(Nf=new oi,Nf.desiredSize=or,Nf.Va()),this.defaultFromPoint&&(Nf.location=this.defaultFromPoint,Nf.Va(),y=a=Nf)):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 b=this.toNode,E=null;if(b===null?(Of||(Of=new oi,Of.desiredSize=or,Of.Va()),this.defaultToPoint&&(Of.location=this.defaultToPoint,Of.Va(),E=b=Of)):E=this.toPort,E===null||b.isVisible()||(x=b.findVisibleNode(),x!==null&&x!==b?(b=x,E=x.port):b=x),this.Mw=b,b===null||!b.location.w())return!1;for(;!(E===null||E.actualBounds.w()&&E.Ed());)E=E.panel;if(E===null)return!1;var te=this.pointsCount,ne=this.computeSpot(!0,y);x=this.computeSpot(!1,E);var ae=wp(ne),fe=wp(x),_e=y===E&&y!==null,Te=this.isOrthogonal,je=this.curve===ou;this.Wf=_e&&!Te?je=!0:!1;var Ve=this.computeAdjusting()===ol||_e;if(!Te&&!_e&&ae&&fe){if(ae=!1,!Ve&&3<=te&&(Ve=this.getLinkPoint(a,y,ne,!0,!1,b,E),fe=this.getLinkPoint(b,E,x,!1,!1,a,y),ae=this.adjustPoints(0,Ve,te-1,fe))&&(Ve=this.getLinkPoint(a,y,ne,!0,!1,b,E),fe=this.getLinkPoint(b,E,x,!1,!1,a,y),this.adjustPoints(0,Ve,te-1,fe)),!ae)if(this.Fj(),je){te=this.getLinkPoint(a,y,ne,!0,!1,b,E),Ve=this.getLinkPoint(b,E,x,!1,!1,a,y),ae=Ve.x-te.x,fe=Ve.y-te.y,_e=this.computeCurviness(),je=Te=0;var Qe=te.x+ae/3,rt=te.y+fe/3,ct=Qe,Dt=rt;rn.B(fe,0)?Dt=0<ae?Dt-_e:Dt+_e:(Te=-ae/fe,je=Math.sqrt(_e*_e/(Te*Te+1)),0>_e&&(je=-je),ct=(0>fe?-1:1)*je+Qe,Dt=Te*(ct-Qe)+rt),Qe=te.x+2*ae/3,rt=te.y+2*fe/3;var Lt=Qe,Gt=rt;rn.B(fe,0)?Gt=0<ae?Gt-_e:Gt+_e:(Lt=(0>fe?-1:1)*je+Qe,Gt=Te*(Lt-Qe)+rt),this.Fj(),this.ne(te),this.yf(ct,Dt),this.yf(Lt,Gt),this.ne(Ve),this.dd(0,this.getLinkPoint(a,y,ne,!0,!1,b,E)),this.dd(3,this.getLinkPoint(b,E,x,!1,!1,a,y))}else te=b,Ve=E,b=this.getLinkPoint(a,y,ne,!0,!1,te,Ve),E=this.getLinkPoint(te,Ve,x,!1,!1,a,y),this.hasCurviness()?(Ve=E.x-b.x,x=E.y-b.y,ne=this.computeCurviness(),a=b.x+Ve/2,y=b.y+x/2,te=a,ae=y,rn.B(x,0)?ae=0<Ve?ae-ne:ae+ne:(Ve=-Ve/x,te=Math.sqrt(ne*ne/(Ve*Ve+1)),0>ne&&(te=-te),te=(0>x?-1:1)*te+a,ae=Ve*(te-a)+y),this.ne(b),this.yf(te,ae),this.ne(E)):(this.ne(b),this.ne(E),ae=kn.alloc(),y.mi(ae),fe=ae.ca(E),Ve.mi(ae),_e=ae.ca(b),(fe||_e)&&(ne=y.ga(Jm(ne),new Mt),this.dd(0,this.getLinkPointFromPoint(a,y,ne,E,!0,ne)),x=Ve.ga(Jm(x),new Mt),this.dd(1,this.getLinkPointFromPoint(te,Ve,x,b,!1,x))),kn.free(ae))}else{je=this.isAvoiding,Ve&&(Te&&je||_e)&&this.Fj();var Zt=_e?this.computeCurviness():0;je=this.getLinkPoint(a,y,ne,!0,Te,b,E),Qe=ct=rt=0,(Te||!ae||_e)&&(Dt=this.computeEndSegmentLength(a,y,ne,!0),Qe=this.getLinkDirection(a,y,je,ne,!0,Te,b,E),_e&&(ae||ne.D(x)||!Te&&ne.x+x.x===1&&ne.y+x.y===1)&&(Qe-=Te?90:30,0>Zt&&(Qe-=180)),0>Qe?Qe+=360:360<=Qe&&(Qe-=360),_e&&(Dt+=Math.abs(Zt)*(Te?1:2)),Qe===0?rt=Dt:Qe===90?ct=Dt:Qe===180?rt=-Dt:Qe===270?ct=-Dt:(rt=Dt*Math.cos(Qe*Math.PI/180),ct=Dt*Math.sin(Qe*Math.PI/180)),ne.Mc()&&_e&&(Dt=y.ga(jr,Mt.alloc()),Lt=Mt.allocAt(Dt.x+1e3*rt,Dt.y+1e3*ct),this.getLinkPointFromPoint(a,y,Dt,Lt,!0,je),Mt.free(Dt),Mt.free(Lt))),Dt=this.getLinkPoint(b,E,x,!1,Te,a,y);var Vt=Gt=Lt=0;if(Te||!fe||_e){var Qt=this.computeEndSegmentLength(b,E,x,!1);Vt=this.getLinkDirection(b,E,Dt,x,!1,Te,a,y),_e&&(fe||ne.D(x)||!Te&&ne.x+x.x===1&&ne.y+x.y===1)&&(Vt+=Te?0:30,0>Zt&&(Vt+=180)),0>Vt?Vt+=360:360<=Vt&&(Vt-=360),_e&&(Qt+=Math.abs(Zt)*(Te?1:2)),Vt===0?Lt=Qt:Vt===90?Gt=Qt:Vt===180?Lt=-Qt:Vt===270?Gt=-Qt:(Lt=Qt*Math.cos(Vt*Math.PI/180),Gt=Qt*Math.sin(Vt*Math.PI/180)),x.Mc()&&_e&&(x=E.ga(jr,Mt.alloc()),ne=Mt.allocAt(x.x+1e3*Lt,x.y+1e3*Gt),this.getLinkPointFromPoint(b,E,x,ne,!1,Dt),Mt.free(x),Mt.free(ne))}x=je,(Te||!ae||_e)&&(x=new Mt(je.x+rt,je.y+ct)),ne=Dt,(Te||!fe||_e)&&(ne=new Mt(Dt.x+Lt,Dt.y+Gt)),!Ve&&!Te&&ae&&3<te&&this.adjustPoints(0,je,te-2,ne)?this.dd(te-1,Dt):!Ve&&!Te&&fe&&3<te&&this.adjustPoints(1,x,te-1,Dt)?this.dd(0,je):!Ve&&(Te?6<=te:4<te)&&this.adjustPoints(1,x,te-2,ne)?(this.dd(0,je),this.dd(te-1,Dt)):(this.Fj(),this.ne(je),(Te||!ae||_e)&&this.ne(x),Te&&this.addOrthoPoints(x,Qe,ne,Vt,a,b),(Te||!fe||_e)&&this.ne(ne),this.ne(Dt))}return!0};function Vv(a,y){return Math.abs(y.x-a.x)>Math.abs(y.y-a.y)?(y.x>=a.x?y.x=a.x+9e9:y.x=a.x-9e9,y.y=a.y):(y.y>=a.y?y.y=a.y+9e9:y.y=a.y-9e9,y.x=a.x),y}$n.prototype.getLinkPointFromPoint=function(a,y,x,b,E,te){if(te===void 0&&(te=new Mt),a===null||y===null)return te.assign(x),te;if(a.isVisible()||(E=a.findVisibleNode(),E!==null&&E!==a&&(y=E.port)),a=null,E=y.panel,E===null||E.se()||(E=E.panel),E===null){E=b.x,b=b.y;var ne=x.x;x=x.y}else{a=E.oe,E=1/(a.m11*a.m22-a.m12*a.m21),ne=a.m22*E;var ae=-a.m12*E,fe=-a.m21*E,_e=a.m11*E,Te=E*(a.m21*a.dy-a.m22*a.dx),je=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*ne+b.y*fe+Te,b=b.x*ae+b.y*_e+je,ne=x.x*ne+x.y*fe+Te,x=x.x*ae+x.y*_e+je}return y.Sj(E,b,ne,x,te),a!==null&&te.transform(a),te};function Xm(a,y){var x=y.Zn;return x===null&&(x=new If,x.port=y,x.node=y.part,y.Zn=x),lS(x,a)}$n.prototype.getLinkPoint=function(a,y,x,b,E,te,ne,ae){if(ae===void 0&&(ae=new Mt),x.sb()&&!wp(x))return y.ga(x,ae),ae;if(x.$c()){var fe=Xm(this,y);if(fe!==null){if(ae.assign(fe.Zo),E&&this.routing===nS){var _e=Xm(this,ne);if(_e!==null&&fe.Gl<_e.Gl){fe=Mt.alloc(),_e=Mt.alloc();var Te=new kn(y.ga(Xs,fe),y.ga(Na,_e)),je=this.computeSpot(!b,ne);a=this.getLinkPoint(te,ne,je,!b,E,a,y,_e),(x.Hf(_u)||x.Hf(Wa))&&a.y>=Te.y&&a.y<=Te.y+Te.height?ae.y=a.y:(x.Hf($l)||x.Hf(Za))&&a.x>=Te.x&&a.x<=Te.x+Te.width&&(ae.x=a.x),Mt.free(fe),Mt.free(_e)}}return ae}}return x=y.ga(Jm(x),Mt.alloc()),this.pointsCount>(E?6:2)?(ne=b?this.i(1):this.i(this.pointsCount-2),E&&(ne=Vv(x,ne.copy()))):(fe=this.computeSpot(!b,ne),te=Mt.alloc(),ne=ne.ga(Jm(fe),te),E&&(ne=Vv(x,ne)),Mt.free(te)),this.getLinkPointFromPoint(a,y,x,ne,b,ae),Mt.free(x),ae},$n.prototype.getLinkDirection=function(a,y,x,b,E,te,ne,ae){e:if(b.sb())var fe=b.x>b.y?b.x>1-b.y?0:b.x<1-b.y?270:315:b.x<b.y?b.x>1-b.y?90:b.x<1-b.y?180:135:.5>b.x?225:.5<b.x?45:0;else{if(b.$c()&&(fe=Xm(this,y),fe!==null))switch(fe.Nc){case 1:fe=270;break e;case 2:fe=180;break e;default:case 4:fe=0;break e;case 8:fe=90;break e}fe=y.ga(jr,Mt.alloc()),this.pointsCount>(te?6:2)?(ae=E?this.i(1):this.i(this.pointsCount-2),ae=te?Vv(fe,ae.copy()):x):(x=Mt.alloc(),ae=ae.ga(jr,x),Mt.free(x)),x=Math.abs(ae.x-fe.x)>Math.abs(ae.y-fe.y)?ae.x>=fe.x?0:180:ae.y>=fe.y?90:270,Mt.free(fe),fe=x}return b.Mc()&&ne.Td(a)&&(fe+=180,360<=fe&&(fe-=360)),wp(b)||(a=y.li(),a===0)||(45<=a&&135>a?fe+=90:135<=a&&225>a?fe+=180:225<=a&&315>a&&(fe+=270),360<=fe&&(fe-=360)),fe},$n.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=Xm(this,y),a!==null)?a.Ju:(a=b?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=b?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},$n.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=jr:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===oo?ms:y)):(a=y||this.toPort,a===null?a=jr:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===oo?ms:y)),a};function wp(a){return a===ms||a.x===.5&&a.y===.5}function Jm(a){return a.x===.5&&a.y===.5?a:jr}$n.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==ol&&4<this.pointsCount?this.computeMidPoint(new Mt):(a=y.Zn,a=a!==null?lS(a,this):null,a!==null?a.Zo:y.ga(jr))},$n.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},$n.prototype.Cf=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=te;if(te===void 0&&(ne=gr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&gr.free(ne),!0;if(this.Yc(a,ne)){var ae=!1;if(!this.isAtomic)for(var fe=this.O.s,_e=fe.length;_e--;){var Te=fe[_e];if(Te.visible||Te===this.locationObject){var je=Te.actualBounds,Ve=this.naturalBounds;if(!(je.x>Ve.width||je.y>Ve.height||0>je.x+je.width||0>je.y+je.height)){if(je=gr.alloc(),je.set(ne),Te instanceof Wn)ae=Te.Cf(a,y,x,b,E,je);else if(this.path===Te){if(Te instanceof dr)if(ae=a,Ve=b,Te.pickable===!1)ae=!1;else if(je.multiply(Te.transform),Ve)e:{var Qe=ae,rt=je;if(Te.fh(Qe,rt))ae=!0;else{if(rt===void 0&&(rt=Te.transform,Qe.Re(Te.actualBounds))){ae=!0;break e}ae=Qe.left,Ve=Qe.right;var ct=Qe.top;Qe=Qe.bottom;var Dt=Mt.alloc(),Lt=Mt.alloc(),Gt=Mt.alloc(),Zt=gr.alloc();Zt.set(rt),Zt.bv(Te.transform),Zt.Vj(),Lt.x=Ve,Lt.y=ct,Lt.transform(Zt),Dt.x=ae,Dt.y=ct,Dt.transform(Zt),rt=!1,tf(Te,Dt,Lt,Gt)?rt=!0:(Dt.x=Ve,Dt.y=Qe,Dt.transform(Zt),tf(Te,Dt,Lt,Gt)?rt=!0:(Lt.x=ae,Lt.y=Qe,Lt.transform(Zt),tf(Te,Dt,Lt,Gt)?rt=!0:(Dt.x=ae,Dt.y=ct,Dt.transform(Zt),tf(Te,Dt,Lt,Gt)&&(rt=!0)))),gr.free(Zt),Mt.free(Dt),Mt.free(Lt),Mt.free(Gt),ae=rt}}else ae=Te.fh(ae,je)}else ae=ca(Te,a,b,je);ae&&(Ve=Te,y!==null&&(Ve=y(Te)),Ve&&(x===null||x(Ve))&&E.add(Ve)),gr.free(je)}}}return te===void 0&&gr.free(ne),ae||this.background!==null||this.areaBackground!==null}return te===void 0&&gr.free(ne),!1},$n.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?ou:this.curve},$n.prototype.computeCorner=function(){if(this.curve===ou)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},$n.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];if(E!==a&&!E.isPanelMain&&(E.segmentIndex===-1/0||isNaN(E.segmentIndex)))return E}for(a=this.labelNodes;a.next();)if(y=a.value,y.segmentIndex===-1/0||isNaN(y.segmentIndex))return y;return null},$n.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=rS;a=Math.max(a,this.computeThickness());var y=this.fromPort,x=this.toPort;if(y!==null&&x!==null){var b=this.findMidLabel();if(b!==null){var E=b.naturalBounds,te=b.margin,ne=isNaN(E.width)?30:E.width*b.scale+te.left+te.right;E=isNaN(E.height)?14:E.height*b.scale+te.top+te.bottom,b=b.segmentOrientation,b===Cg||b===n0||b===Qv?a=Math.max(a,E):b===_g||b===Lg||b===Pg||b===Eg?a=Math.max(a,ne):(y=y.ga(jr).ab(x.ga(jr))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*ne)+Math.abs(Math.cos(y)*E)+1)),this.curve===ou&&(a*=1.333)}}return a},$n.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===ol&&x.bb()}},$n.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=iS;var y=this.Sf;if(y!==null){for(var x=Hn(),b=0,E=y.links,te=0;te<E.length;te++){var ne=E[te].computeSpacing();x.push(ne),b+=ne}for(b=-b/2,te=0;te<E.length;te++){if(E[te]===this){a=b+x[te]/2;break}b+=x[te]}y.Ds===this.fromNode&&(a=-a),ei(x)}}return a},$n.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},$n.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},$n.prototype.adjustPoints=function(a,y,x,b){var E=this.computeAdjusting();if(this.isOrthogonal){if(E===e0)return!1;E===t0&&(E=bg)}switch(E){case e0:var te=this.i(a),ne=this.i(x);if(!te.Xa(y)||!ne.Xa(b)){E=te.x,te=te.y;var ae=ne.x-E,fe=ne.y-te,_e=Math.sqrt(ae*ae+fe*fe);if(!rn.$(_e,0)){if(rn.$(ae,0))var Te=0>fe?-Math.PI/2:Math.PI/2;else Te=Math.atan(fe/Math.abs(ae)),0>ae&&(Te=Math.PI-Te);ne=y.x;var je=y.y;ae=b.x-ne;var Ve=b.y-je;for(fe=Math.sqrt(ae*ae+Ve*Ve),rn.$(ae,0)?Ve=0>Ve?-Math.PI/2:Math.PI/2:(Ve=Math.atan(Ve/Math.abs(ae)),0>ae&&(Ve=Math.PI-Ve)),_e=fe/_e,Te=Ve-Te,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),ae=y.x-E,fe=y.y-te,y=Math.sqrt(ae*ae+fe*fe),rn.$(y,0)||(rn.$(ae,0)?fe=0>fe?-Math.PI/2:Math.PI/2:(fe=Math.atan(fe/Math.abs(ae)),0>ae&&(fe=Math.PI-fe)),ae=fe+Te,y*=_e,this.L(a,ne+y*Math.cos(ae),je+y*Math.sin(ae)));this.dd(x,b)}}return!0;case t0:if(te=this.i(a),je=this.i(x),!te.Xa(y)||!je.Xa(b)){E=te.x,te=te.y,ne=je.x,je=je.y,_e=(ne-E)*(ne-E)+(je-te)*(je-te),ae=y.x,Te=y.y,fe=b.x,Ve=b.y;var Qe=1;if(fe-ae!==0){var rt=(Ve-Te)/(fe-ae);Qe=Math.sqrt(1+1/(rt*rt))}else rt=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var ct=y.x,Dt=y.y,Lt=.5;_e!==0&&(Lt=((E-ct)*(E-ne)+(te-Dt)*(te-je))/_e);var Gt=E+Lt*(ne-E),Zt=te+Lt*(je-te);y=Math.sqrt((ct-Gt)*(ct-Gt)+(Dt-Zt)*(Dt-Zt)),Dt<rt*(ct-Gt)+Zt&&(y=-y),0<rt&&(y=-y),ct=ae+Lt*(fe-ae),Lt=Te+Lt*(Ve-Te),rt!==0?(y=ct+y/Qe,this.L(a,y,Lt-(y-ct)/rt)):this.L(a,ct,Lt+y)}this.dd(x,b)}return!0;case bg:e:{if(this.isOrthogonal&&(E=this.i(a),te=this.i(a+1),ne=this.i(a+2),ae=te.x,Te=te.y,je=ae,_e=Te,rn.B(E.y,te.y)?rn.B(te.x,ne.x)?Te=y.y:rn.B(te.y,ne.y)&&(ae=y.x):rn.B(E.x,te.x)&&(rn.B(te.y,ne.y)?ae=y.x:rn.B(te.x,ne.x)&&(Te=y.y)),this.L(a+1,ae,Te),E=this.i(x),te=this.i(x-1),ne=this.i(x-2),ae=te.x,Te=te.y,fe=ae,Ve=Te,rn.B(E.y,te.y)?rn.B(te.x,ne.x)?Te=b.y:rn.B(te.y,ne.y)&&(ae=b.x):rn.B(E.x,te.x)&&(rn.B(te.y,ne.y)?ae=b.x:rn.B(te.x,ne.x)&&(Te=b.y)),this.L(x-1,ae,Te),$v(this))){this.L(a+1,je,_e),this.L(x-1,fe,Ve),x=!1;break e}this.dd(a,y),this.dd(x,b),x=!0}return x;default:return!1}},$n.prototype.addOrthoPoints=function(a,y,x,b,E,te){0>y?y+=360:360<=y&&(y-=360),0>b?b+=360:360<=b&&(b-=360);var ne=b;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;var ae=E.actualBounds.copy(),fe=te.actualBounds.copy();if(ae.w()&&fe.w()){ae.Bc(Mg,Mg),fe.Bc(Mg,Mg),ae.Ye(a),fe.Ye(x);var _e=Mt.alloc(),Te=Mt.alloc();y===0?x.x>a.x||b===270&&x.y<a.y&&fe.right>a.x||b===90&&x.y>a.y&&fe.right>a.x?(_e.h(x.x,a.y),Te.h(x.x,(a.y+x.y)/2),b===180?(_e.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),Te.x=_e.x,Te.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(_e.x=a.x<fe.left?this.computeMidOrthoPosition(a.x,a.y,fe.left,x.y,!1):a.x<fe.right&&(b===270&&a.y<fe.top||b===90&&a.y>fe.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):fe.right,Te.x=_e.x,Te.y=x.y):b===0&&a.x<fe.left&&a.y>fe.top&&a.y<fe.bottom&&(_e.x=a.x,_e.y=a.y<x.y?Math.min(x.y,fe.top):Math.max(x.y,fe.bottom),Te.y=_e.y)):(_e.h(a.x,x.y),Te.h((a.x+x.x)/2,x.y),(b===180||b===90&&x.y<ae.top||b===270&&x.y>ae.bottom)&&(b===180&&(fe.ca(a)||ae.ca(x))?_e.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===180||b===90)?_e.y=this.computeMidOrthoPosition(a.x,ae.top,x.x,Math.max(x.y,fe.bottom),!0):x.y>a.y&&(b===180||b===270)&&(_e.y=this.computeMidOrthoPosition(a.x,ae.bottom,x.x,Math.min(x.y,fe.top),!0)),Te.x=x.x,Te.y=_e.y),_e.y>ae.top&&_e.y<ae.bottom&&(x.x>=ae.left&&x.x<=a.x||a.x<=fe.right&&a.x>=x.x?(b===90||b===270)&&(_e.h(Math.max((a.x+x.x)/2,a.x),a.y),Te.h(_e.x,x.y)):(_e.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===0?ae.top:Math.min(ae.top,fe.top)):Math.max(x.y,b===0?ae.bottom:Math.max(ae.bottom,fe.bottom)),Te.x=x.x,Te.y=_e.y))):y===180?x.x<a.x||b===270&&x.y<a.y&&fe.left<a.x||b===90&&x.y>a.y&&fe.left<a.x?(_e.h(x.x,a.y),Te.h(x.x,(a.y+x.y)/2),b===0?(_e.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),Te.x=_e.x,Te.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(_e.x=a.x>fe.right?this.computeMidOrthoPosition(a.x,a.y,fe.right,x.y,!1):a.x>fe.left&&(b===270&&a.y<fe.top||b===90&&a.y>fe.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):fe.left,Te.x=_e.x,Te.y=x.y):b===180&&a.x>fe.right&&a.y>fe.top&&a.y<fe.bottom&&(_e.x=a.x,_e.y=a.y<x.y?Math.min(x.y,fe.top):Math.max(x.y,fe.bottom),Te.y=_e.y)):(_e.h(a.x,x.y),Te.h((a.x+x.x)/2,x.y),(b===0||b===90&&x.y<ae.top||b===270&&x.y>ae.bottom)&&(b===0&&(fe.ca(a)||ae.ca(x))?_e.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===0||b===90)?_e.y=this.computeMidOrthoPosition(a.x,ae.top,x.x,Math.max(x.y,fe.bottom),!0):x.y>a.y&&(b===0||b===270)&&(_e.y=this.computeMidOrthoPosition(a.x,ae.bottom,x.x,Math.min(x.y,fe.top),!0)),Te.x=x.x,Te.y=_e.y),_e.y>ae.top&&_e.y<ae.bottom&&(x.x<=ae.right&&x.x>=a.x||a.x>=fe.left&&a.x<=x.x?(b===90||b===270)&&(_e.h(Math.min((a.x+x.x)/2,a.x),a.y),Te.h(_e.x,x.y)):(_e.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===180?ae.top:Math.min(ae.top,fe.top)):Math.max(x.y,b===180?ae.bottom:Math.max(ae.bottom,fe.bottom)),Te.x=x.x,Te.y=_e.y))):y===90?x.y>a.y||b===180&&x.x<a.x&&fe.bottom>a.y||b===0&&x.x>a.x&&fe.bottom>a.y?(_e.h(a.x,x.y),Te.h((a.x+x.x)/2,x.y),b===270?(_e.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),Te.x=x.x,Te.y=_e.y):b===180&&x.x<a.x||b===0&&x.x>a.x?(_e.y=a.y<fe.top?this.computeMidOrthoPosition(a.x,a.y,x.x,fe.top,!0):a.y<fe.bottom&&(b===180&&a.x<fe.left||b===0&&a.x>fe.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):fe.bottom,Te.x=x.x,Te.y=_e.y):b===90&&a.y<fe.top&&a.x>fe.left&&a.x<fe.right&&(_e.x=a.x<x.x?Math.min(x.x,fe.left):Math.max(x.x,fe.right),_e.y=a.y,Te.x=_e.x)):(_e.h(x.x,a.y),Te.h(x.x,(a.y+x.y)/2),(b===270||b===0&&x.x<ae.left||b===180&&x.x>ae.right)&&(b===270&&(fe.ca(a)||ae.ca(x))?_e.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===270||b===0)?_e.x=this.computeMidOrthoPosition(ae.left,a.y,Math.max(x.x,fe.right),x.y,!1):x.x>a.x&&(b===270||b===180)&&(_e.x=this.computeMidOrthoPosition(ae.right,a.y,Math.min(x.x,fe.left),x.y,!1)),Te.x=_e.x,Te.y=x.y),_e.x>ae.left&&_e.x<ae.right&&(x.y>=ae.top&&x.y<=a.y||a.y<=fe.bottom&&a.y>=x.y?(b===0||b===180)&&(_e.h(a.x,Math.max((a.y+x.y)/2,a.y)),Te.h(x.x,_e.y)):(_e.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===90?ae.left:Math.min(ae.left,fe.left)):Math.max(x.x,b===90?ae.right:Math.max(ae.right,fe.right)),Te.x=_e.x,Te.y=x.y))):x.y<a.y||b===180&&x.x<a.x&&fe.top<a.y||b===0&&x.x>a.x&&fe.top<a.y?(_e.h(a.x,x.y),Te.h((a.x+x.x)/2,x.y),b===90?(_e.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),Te.x=x.x,Te.y=_e.y):b===180&&x.x<a.x||b===0&&x.x>=a.x?(_e.y=a.y>fe.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,fe.bottom,!0):a.y>fe.top&&(b===180&&a.x<fe.left||b===0&&a.x>fe.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):fe.top,Te.x=x.x,Te.y=_e.y):b===270&&a.y>fe.bottom&&a.x>fe.left&&a.x<fe.right&&(_e.x=a.x<x.x?Math.min(x.x,fe.left):Math.max(x.x,fe.right),_e.y=a.y,Te.x=_e.x)):(_e.h(x.x,a.y),Te.h(x.x,(a.y+x.y)/2),(b===90||b===0&&x.x<ae.left||b===180&&x.x>ae.right)&&(b===90&&(fe.ca(a)||ae.ca(x))?_e.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===90||b===0)?_e.x=this.computeMidOrthoPosition(ae.left,a.y,Math.max(x.x,fe.right),x.y,!1):x.x>a.x&&(b===90||b===180)&&(_e.x=this.computeMidOrthoPosition(ae.right,a.y,Math.min(x.x,fe.left),x.y,!1)),Te.x=_e.x,Te.y=x.y),_e.x>ae.left&&_e.x<ae.right&&(x.y<=ae.bottom&&x.y>=a.y||a.y>=fe.top&&a.y<=x.y?(b===0||b===180)&&(_e.h(a.x,Math.min((a.y+x.y)/2,a.y)),Te.h(x.x,_e.y)):(_e.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===270?ae.left:Math.min(ae.left,fe.left)):Math.max(x.x,b===270?ae.right:Math.max(ae.right,fe.right)),Te.x=_e.x,Te.y=x.y)));var je=x;if(this.isAvoiding){var Ve=this.diagram;if(Ve===null||E===te||this.layer.isTemporary||!tp(Ve)||ae.ca(je)&&!te.Td(E)||fe.ca(a)&&!E.Td(te))y=!1;else{var Qe=np(Ve,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Qe.Yj(Math.min(a.x,_e.x),Math.min(a.y,_e.y),Math.abs(a.x-_e.x),Math.abs(a.y-_e.y))&&Qe.Yj(Math.min(_e.x,Te.x),Math.min(_e.y,Te.y),Math.abs(_e.x-Te.x),Math.abs(_e.y-Te.y))&&Qe.Yj(Math.min(Te.x,je.x),Math.min(Te.y,je.y),Math.abs(Te.x-je.x),Math.abs(Te.y-je.y)))y=!1;else{E=a,te=je;var rt=x=null;if(Ve.isVirtualized){Ve=Qe.bounds.copy(),Ve.Bc(-Qe.Ho,-Qe.Go);var ct=Mt.alloc();Cp(Qe,a.x,a.y)||(rn.Ff(Ve.x,Ve.y,Ve.x+Ve.width,Ve.y+Ve.height,a.x,a.y,_e.x,_e.y,ct)?(x=a=ct.copy(),y=ct.ab(_e)):rn.Ff(Ve.x,Ve.y,Ve.x+Ve.width,Ve.y+Ve.height,_e.x,_e.y,Te.x,Te.y,ct)?(x=a=ct.copy(),y=ct.ab(Te)):rn.Ff(Ve.x,Ve.y,Ve.x+Ve.width,Ve.y+Ve.height,Te.x,Te.y,je.x,je.y,ct)&&(x=a=ct.copy(),y=ct.ab(je))),Cp(Qe,je.x,je.y)||(rn.Ff(Ve.x,Ve.y,Ve.x+Ve.width,Ve.y+Ve.height,je.x,je.y,Te.x,Te.y,ct)?(rt=je=ct.copy(),b=Te.ab(ct)):rn.Ff(Ve.x,Ve.y,Ve.x+Ve.width,Ve.y+Ve.height,Te.x,Te.y,_e.x,_e.y,ct)?(rt=je=ct.copy(),b=_e.ab(ct)):rn.Ff(Ve.x,Ve.y,Ve.x+Ve.width,Ve.y+Ve.height,_e.x,_e.y,a.x,a.y,ct)&&(rt=je=ct.copy(),b=a.ab(ct))),Mt.free(ct)}ae=ae.copy().ed(fe),ae.Bc(Qe.Ho*Qe.Os,Qe.Go*Qe.Os),sS(Qe,a,y,je,b,ae,!0),fe=Kc(Qe,je.x,je.y),!Qe.abort&&fe>=Pp&&(oS(Qe),ae.Bc(Qe.Ho*Qe.Hx,Qe.Go*Qe.Ix),sS(Qe,a,y,je,b,ae,!1),fe=Kc(Qe,je.x,je.y)),!Qe.abort&&fe<Pp&&Kc(Qe,je.x,je.y)!==jh?(Yv(this,Qe,je.x,je.y,b,!0,ne),ae=this.i(2),4>this.pointsCount?(y===0||y===180?(ae.x=a.x,ae.y=je.y):(ae.x=je.x,ae.y=a.y),this.L(2,ae.x,ae.y),this.m(3,ae.x,ae.y)):(ne=this.i(3),y===0||y===180?rn.B(ae.x,ne.x)?(ae=y===0?Math.max(ae.x,a.x):Math.min(ae.x,a.x),this.L(2,ae,a.y),this.L(3,ae,ne.y)):rn.B(ae.y,ne.y)?(Math.abs(a.y-ae.y)<=Qe.Go/2&&(this.L(2,ae.x,a.y),this.L(3,ne.x,a.y)),this.m(2,ae.x,a.y)):this.L(2,a.x,ae.y):(y===90||y===270)&&(rn.B(ae.y,ne.y)?(ae=y===90?Math.max(ae.y,a.y):Math.min(ae.y,a.y),this.L(2,a.x,ae),this.L(3,ne.x,ae)):rn.B(ae.x,ne.x)?(Math.abs(a.x-ae.x)<=Qe.Ho/2&&(this.L(2,a.x,ae.y),this.L(3,a.x,ne.y)),this.m(2,a.x,ae.y)):this.L(2,ae.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,E.x,x.y):this.m(2,x.x,E.y)),rt!==null&&(b===0||b===180?this.yf(te.x,rt.y):this.yf(rt.x,te.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(_e.copy()),this.ne(Te.copy())),Mt.free(_e),Mt.free(Te)}},$n.prototype.computeMidOrthoPosition=function(a,y,x,b,E){var te=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(te=this.computeCurviness()),E?(y+b)/2+te:(a+x)/2+te};function $v(a){if(a.diagram===null||!a.isAvoiding||!tp(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=np(a.diagram,!0,a.containingGroup,null);for(var b=1;b<x-2;b++){var E=y[b],te=y[b+1];if(!a.Yj(Math.min(E.x,te.x),Math.min(E.y,te.y),Math.abs(E.x-te.x),Math.abs(E.y-te.y)))return!0}return!1}function Yv(a,y,x,b,E,te,ne){var ae=y.Ho,fe=y.Go,_e=Kc(y,x,b),Te=x,je=b;for(E===0?Te+=ae:E===90?je+=fe:E===180?Te-=ae:je-=fe,E!==ne&&_e>of&&Kc(y,Te,je)!==_e-1&&(Kc(y,x-ae,b)===_e-1?(E=180,Te=x-ae,je=b):Kc(y,x+ae,b)===_e-1?(E=0,Te=x+ae,je=b):Kc(y,x,b-fe)===_e-1?(E=270,Te=x,je=b-fe):Kc(y,x,b+fe)===_e-1&&(E=90,Te=x,je=b+fe));_e>of&&Kc(y,Te,je)===_e-1;)x=Te,b=je,E===0?Te+=ae:E===90?je+=fe:E===180?Te-=ae:je-=fe,--_e;te?_e>of&&(E===180||E===0?x=Math.floor(x/ae)*ae+ae/2:(E===90||E===270)&&(b=Math.floor(b/fe)*fe+fe/2)):(x=Math.floor(x/ae)*ae+ae/2,b=Math.floor(b/fe)*fe+fe/2),_e>of&&(te=E,ne=x,Te=b,E===0?(te=90,Te+=fe):E===90?(te=180,ne-=ae):E===180?(te=270,Te-=fe):E===270&&(te=0,ne+=ae),Kc(y,ne,Te)===_e-1?Yv(a,y,ne,Te,te,!1,te):(ne=x,Te=b,E===0?(te=270,Te-=fe):E===90?(te=0,ne+=ae):E===180?(te=90,Te+=fe):E===270&&(te=180,ne-=ae),Kc(y,ne,Te)===_e-1&&Yv(a,y,ne,Te,te,!1,te))),a.yf(x,b)}$n.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=eo(y,a,x.x,x.y,b.x,b.y),te=0,ne=1;ne<this.pointsCount-1;ne++){x=this.i(ne+1);var ae=eo(y,a,b.x,b.y,x.x,x.y);b=x,ae<E&&(te=ne,E=ae)}return te},$n.prototype.qc=function(){this.lk=!1,this.v()},$n.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,b=0;b<x;b++){var E=y[b];E!==a&&E.isPanelMain&&E instanceof dr&&(E.ua=this.ua)}}},$n.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,b=this.diagram;b!==null&&rf(this)&&b.Eh.contains(this)&&(this.ml.width!==0||this.ml.height!==0)&&(b.animationManager.isAnimating||b.currentTool!==b.toolManager)&&(x=!0);var E=this.i(0).copy(),te=E.copy();b=this.Nb.s;var ne=this.computeCurve();if(ne===ou&&3<=y&&!rn.$(this.smoothness,0))if(y===3){var ae=this.i(1);b=Math.min(E.x,ae.x);var fe=Math.min(E.y,ae.y);ae=this.i(2),b=Math.min(b,ae.x),fe=Math.min(fe,ae.y)}else{if(this.isOrthogonal)for(fe=0;fe<y;fe++)ae=b[fe],te.x=Math.min(ae.x,te.x),te.y=Math.min(ae.y,te.y);else for(b=3;b<y;b+=3)b+3>=y&&(b=y-1),fe=this.i(b),te.x=Math.min(fe.x,te.x),te.y=Math.min(fe.y,te.y);b=te.x,fe=te.y}else{for(fe=0;fe<y;fe++)ae=b[fe],te.x=Math.min(ae.x,te.x),te.y=Math.min(ae.y,te.y);b=te.x,fe=te.y}if(b-=this.su.x,fe-=this.su.y,E.x-=b,E.y-=fe,y!==2||rf(this)){if(a.type=Yn.o,ae=A1(a),this.computeShortLength(!0)!==0&&(E=kf(this,E,!0,te)),Sp(ae,E.x,E.y,!1),ne===ou&&3<=y&&!rn.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-b,x=x.y-fe,E=this.i(2).copy(),E.x-=b,E.y-=fe,this.computeShortLength(!1)!==0&&(E=kf(this,E,!1,te)),Ih(ae,y,x,y,x,E.x,E.y);else if(this.isOrthogonal){y=Mt.allocAt(b,fe),x=Mt.alloc(),x.assign(this.i(1)),te=Mt.allocAt(b,fe),E=Mt.allocAt(b,fe),ne=this.i(0);for(var _e,Te=this.smoothness/3,je=1;je<this.pointsCount-1;je++){_e=this.i(je);var Ve=ne,Qe=_e,rt=this.i(Xv(this,_e,je,!1));if((!rn.$(Ve.x,Qe.x)||!rn.$(Qe.x,rt.x))&&(!rn.$(Ve.y,Qe.y)||!rn.$(Qe.y,rt.y))){var ct=Te;isNaN(ct)&&(ct=this.smoothness/3);var Dt=Ve.x;Ve=Ve.y;var Lt=Qe.x;Qe=Qe.y;var Gt=rt.x;rt=rt.y;var Zt=ct*Qm(Dt,Ve,Lt,Qe);ct*=Qm(Lt,Qe,Gt,rt),rn.$(Ve,Qe)&&rn.$(Lt,Gt)&&(Lt>Dt?rt>Qe?(te.x=Lt-Zt,te.y=Qe-Zt,E.x=Lt+ct,E.y=Qe+ct):(te.x=Lt-Zt,te.y=Qe+Zt,E.x=Lt+ct,E.y=Qe-ct):rt>Qe?(te.x=Lt+Zt,te.y=Qe-Zt,E.x=Lt-ct,E.y=Qe+ct):(te.x=Lt+Zt,te.y=Qe+Zt,E.x=Lt-ct,E.y=Qe-ct)),rn.$(Dt,Lt)&&rn.$(Qe,rt)&&(Qe>Ve?(Gt>Lt?(te.x=Lt-Zt,te.y=Qe-Zt,E.x=Lt+ct):(te.x=Lt+Zt,te.y=Qe-Zt,E.x=Lt-ct),E.y=Qe+ct):(Gt>Lt?(te.x=Lt-Zt,te.y=Qe+Zt,E.x=Lt+ct):(te.x=Lt+Zt,te.y=Qe+Zt,E.x=Lt-ct),E.y=Qe-ct)),(rn.$(Dt,Lt)&&rn.$(Lt,Gt)||rn.$(Ve,Qe)&&rn.$(Qe,rt))&&(Dt=.5*(Dt+Gt),Ve=.5*(Ve+rt),te.x=Dt,te.y=Ve,E.x=Dt,E.y=Ve),(je===1||je===2&&rn.$(ne.x,this.i(0).x)&&rn.$(ne.y,this.i(0).y))&&(x.x=.5*(ne.x+_e.x),x.y=.5*(ne.y+_e.y)),Ih(ae,x.x-b,x.y-fe,te.x-b,te.y-fe,_e.x-b,_e.y-fe),y.set(te),x.set(E),ne=_e}}_e=ne.x,ne=ne.y,Te=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(Te=kf(this,Te.copy(),!1,Gr)),_e=.5*(_e+Te.x),ne=.5*(ne+Te.y),Ih(ae,E.x-b,E.y-fe,_e-b,ne-fe,Te.x-b,Te.y-fe),Mt.free(y),Mt.free(x),Mt.free(te),Mt.free(E)}else for(x=3;x<y;x+=3)te=this.i(x-2),x+3>=y&&(x=y-1),E=this.i(x-1),ne=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(ne=kf(this,ne.copy(),!1,Gr)),Ih(ae,te.x-b,te.y-fe,E.x-b,E.y-fe,ne.x-b,ne.y-fe);else{for(te=Mt.alloc(),te.assign(this.i(0)),E=Mt.alloc(),E.assign(te),ne=this.computeCorner(),je=1,_e=0;je<y;){if(je=Xv(this,te,je,1<je),Te=this.i(je),je>=y-1){if(!te.D(Te))this.computeShortLength(!1)!==0&&(Te=kf(this,Te.copy(),!1,Gr)),Af(this,ae,-b,-fe,te,Te,x);else if(_e===0)for(je=1;je<y;)E.assign(te),Te=this.i(je++),Af(this,ae,-b,-fe,te,Te,x),te.assign(Te);break}if(_e=Xv(this,Te,je+1,je<y-3),je=-b,Dt=-fe,Ve=Te,Lt=this.i(_e),ct=x,rn.B(te.y,Ve.y)&&rn.B(Ve.x,Lt.x))if(rt=Math.min(ne,Math.abs(Ve.x-E.x)/2),rt=Zt=Math.min(rt,Math.abs(Lt.y-Ve.y)/2),rn.B(rt,0))Af(this,ae,je,Dt,te,Ve,ct),te.assign(Ve);else{var Vt=Ve.x,Qt=Ve.y;Qe=Vt,Gt=Qt,Ve.x>te.x?Vt=Ve.x-rt:Vt=Ve.x+rt,Lt.y>Ve.y?Gt=Ve.y+Zt:Gt=Ve.y-Zt,Lt=Mt.allocAt(Vt,Qt),Af(this,ae,je,Dt,te,Lt,ct),Mt.free(Lt),Um(ae,Ve.x+je,Ve.y+Dt,Qe+je,Gt+Dt),te.h(Qe,Gt)}else rn.B(te.x,Ve.x)&&rn.B(Ve.y,Lt.y)?(rt=Math.min(ne,Math.abs(Ve.y-E.y)/2),rt=Zt=Math.min(rt,Math.abs(Lt.x-Ve.x)/2),rn.B(Zt,0)?(Af(this,ae,je,Dt,te,Ve,ct),te.assign(Ve)):(Vt=Ve.x,Qt=Ve.y,Qe=Vt,Gt=Qt,Ve.y>te.y?Qt=Ve.y-rt:Qt=Ve.y+rt,Lt.x>Ve.x?Qe=Ve.x+Zt:Qe=Ve.x-Zt,Lt=Mt.allocAt(Vt,Qt),Af(this,ae,je,Dt,te,Lt,ct),Mt.free(Lt),Um(ae,Ve.x+je,Ve.y+Dt,Qe+je,Gt+Dt),te.h(Qe,Gt))):(Af(this,ae,je,Dt,te,Ve,ct),te.assign(Ve));E.assign(Te),je=_e}Mt.free(te)}Gm=ae}else ae=this.i(1).copy(),ae.x-=b,ae.y-=fe,this.computeShortLength(!0)!==0&&(E=kf(this,E,!0,te)),this.computeShortLength(!1)!==0&&(ae=kf(this,ae,!1,te)),a.type=Yn.j,a.startX=E.x,a.startY=E.y,a.endX=ae.x,a.endY=ae.y;return this.lk=!0,a};function Qm(a,y,x,b){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=b-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),rn.$(a,0)?y:rn.$(y,0)?a:Math.sqrt(a*a+y*y)))}function kf(a,y,x,b){var E=a.pointsCount;if(2>E)return y;if(x){var te=a.i(1);if(x=te.x-b.x,te=te.y-b.y,b=Qm(y.x,y.y,x,te),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!0),a>E&&(a=E),E=a*(te-y.y)/b,y.x+=a*(x-y.x)/b,y.y+=E}else{if(te=a.i(E-2),x=te.x-b.x,te=te.y-b.y,b=Qm(y.x,y.y,x,te),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!1),a>E&&(a=E),E=a*(y.y-te)/b,y.x-=a*(y.x-x)/b,y.y-=E}return y}function Xv(a,y,x,b){for(var E=a.pointsCount,te=y;rn.$(y.x,te.x)&&rn.$(y.y,te.y);){if(x>=E)return E-1;te=a.i(x++)}if(!rn.$(y.x,te.x)&&!rn.$(y.y,te.y))return x-1;for(var ne=te;rn.$(y.x,te.x)&&rn.$(te.x,ne.x)&&(!b||(y.y>=te.y?te.y>=ne.y:te.y<=ne.y))||rn.$(y.y,te.y)&&rn.$(te.y,ne.y)&&(!b||(y.x>=te.x?te.x>=ne.x:te.x<=ne.x));){if(x>=E)return E-1;ne=a.i(x++)}return x-2}$n.prototype.computeJumpLength=function(){return 10};function Af(a,y,x,b,E,te,ne){if(!ne&&rf(a)){ne=a.computeJumpLength();var ae=ne/2,fe=[],_e=0;if(a.isVisible()&&(_e=Ex(a,E,te,fe)),0<_e){if(rn.B(E.y,te.y))if(E.x<te.x)for(var Te=0;Te<_e;){var je=Math.max(E.x,Math.min(fe[Te++]-ae,te.x-ne));y.lineTo(je+x,te.y+b);for(var Ve=je+x,Qe=Math.min(je+ne,te.x);Te<_e&&(je=fe[Te],je<Qe+ne);)Te++,Qe=Math.min(je+ae,te.x);je=te.y-ne+b,Qe+=x;var rt=te.y+b;a.curve===Fh?Sp(y,Qe,rt,!1):Ih(y,Ve,je,Qe,je,Qe,rt)}else for(--_e;0<=_e;){for(Te=Math.min(E.x,Math.max(fe[_e--]+ae,te.x+ne)),y.lineTo(Te+x,te.y+b),Ve=Te+x,je=Math.max(Te-ne,te.x);0<=_e&&(Te=fe[_e],Te>je-ne);)_e--,je=Math.max(Te-ae,te.x);Te=te.y-ne+b,je+=x,Qe=te.y+b,a.curve===Fh?Sp(y,je,Qe,!1):Ih(y,Ve,Te,je,Te,je,Qe)}else if(rn.B(E.x,te.x))if(E.y<te.y)for(Te=0;Te<_e;){for(je=Math.max(E.y,Math.min(fe[Te++]-ae,te.y-ne)),y.lineTo(te.x+x,je+b),Ve=je+b,je=Math.min(je+ne,te.y);Te<_e&&(Qe=fe[Te],Qe<je+ne);)Te++,je=Math.min(Qe+ae,te.y);Qe=te.x-ne+x,rt=te.x+x,je+=b,a.curve===Fh?Sp(y,rt,je,!1):Ih(y,Qe,Ve,Qe,je,rt,je)}else for(--_e;0<=_e;){for(Te=Math.min(E.y,Math.max(fe[_e--]+ae,te.y+ne)),y.lineTo(te.x+x,Te+b),Ve=Te+b,Te=Math.max(Te-ne,te.y);0<=_e&&(je=fe[_e],je>Te-ne);)_e--,Te=Math.max(je-ae,te.y);je=te.x-ne+x,Qe=te.x+x,Te+=b,a.curve===Fh?Sp(y,Qe,Te,!1):Ih(y,je,Ve,je,Te,Qe,Te)}}}y.lineTo(te.x+x,te.y+b)}function Ex(a,y,x,b){var E=a.diagram;if(E===null||y.D(x))return 0;for(E=E.layers;E.next();){var te=E.value;if(te!==null&&te.visible){te=te.Pa.s;for(var ne=te.length,ae=0;ae<ne;ae++){var fe=te[ae];if(fe instanceof $n){if(fe===a)return 0<b.length&&b.sort(function(Te,je){return Te-je}),b.length;if(fe.isVisible()&&rf(fe)){var _e=fe.routeBounds;_e.w()&&a.routeBounds.Yc(_e)&&!a.usesSamePort(fe)&&(_e=fe.path,_e!==null&&_e.Ed()&&Lx(y,x,b,fe))}}}}}return 0<b.length&&b.sort(function(Te,je){return Te-je}),b.length}function Lx(a,y,x,b){for(var E=rn.B(a.y,y.y),te=b.pointsCount,ne=b.i(0),ae=Mt.alloc(),fe=1;fe<te;fe++){var _e=b.i(fe);if(fe<te-1){var Te=b.i(fe+1);if(ne.y===_e.y&&_e.y===Te.y){if(_e.x>ne.x&&Te.x>=_e.x||_e.x<ne.x&&Te.x<=_e.x)continue}else if(ne.x===_e.x&&_e.x===Te.x&&(_e.y>ne.y&&Te.y>=_e.y||_e.y<ne.y&&Te.y<=_e.y))continue}e:{Te=a.x;var je=a.y,Ve=y.x,Qe=y.y,rt=ne.x;ne=ne.y;var ct=_e.x,Dt=_e.y;if(rn.B(Te,Ve)){if(!rn.B(je,Qe)&&rn.B(ne,Dt)&&Math.min(je,Qe)<ne&&Math.max(je,Qe)>ne&&Math.min(rt,ct)<Te&&Math.max(rt,ct)>Te&&!rn.B(rt,ct)){ae.x=Te,ae.y=ne,Te=!0;break e}}else if(rn.B(je,Qe)&&rn.B(rt,ct)&&Math.min(Te,Ve)<rt&&Math.max(Te,Ve)>rt&&Math.min(ne,Dt)<je&&Math.max(ne,Dt)>je&&!rn.B(ne,Dt)){ae.x=rt,ae.y=je,Te=!0;break e}ae.x=0,ae.y=0,Te=!1}Te&&(E?x.push(ae.x):x.push(ae.y)),ne=_e}Mt.free(ae)}function rf(a){return a=a.curve,a===bp||a===Fh}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()))}$n.prototype.Xo=function(a){var y=this.layer;if(y!==null&&y.visible&&!y.isTemporary){var x=y.diagram;if(x!==null&&!x.animationManager.isTicking){var b=!1;for(x=x.layers;x.next();){var E=x.value;if(E.visible){if(E===y){b=!0;var te=!1;E=E.Pa.s;for(var ne=E.length,ae=0;ae<ne;ae++){var fe=E[ae];fe instanceof $n&&(fe===this?te=!0:te&&tS(this,fe,a))}}else if(b)for(te=E.Pa.s,E=te.length,ne=0;ne<E;ne++)ae=te[ne],ae instanceof $n&&tS(this,ae,a)}}}}};function tS(a,y,x){if(y!==null&&y.lk&&y.fd&&rf(y)){var b=y.routeBounds;b.w()&&(a.routeBounds.Yc(b)||x.Yc(b))&&(a.usesSamePort(y)||y.qc())}}$n.prototype.usesSamePort=function(a){var y=this.pointsCount,x=a.pointsCount;if(0<y&&0<x){var b=this.i(0),E=a.i(0);if(b.Xa(E)||(y=this.i(y-1),a=a.i(x-1),y.Xa(a)||b.Xa(a)||y.Xa(E)))return!0}else if(this.fromNode===a.fromNode||this.toNode===a.toNode||this.fromNode===a.toNode||this.toNode===a.fromNode)return!0;return!1},$n.prototype.isVisible=function(){if(!Ti.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 b=x;b!==null;){if(b.labeledLink===this)return!0;b=b.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},$n.prototype.Zb=function(a){if(Ti.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)},$n.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?bg:this.qk};function xg(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var b=a.ff,E=a.vf,te=a=null,ne=y.jb.s,ae=ne.length,fe=0;fe<ae;fe++){var _e=ne[fe];(_e.ef===y&&_e.ff===b&&_e.uf===x&&_e.vf===E||_e.ef===x&&_e.ff===E&&_e.uf===y&&_e.vf===b)&&(te===null?te=_e:(a===null&&(a=[],a.push(te)),a.push(_e)))}if(a!==null){for(te=G1(y,x,b,E),te===null&&(te=new r0(y,b,x,E),U1(y,te),U1(x,te)),te.links=a,y=0;y<a.length;y++)a[y].Sf=te;te.Sl()}}}}function wg(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(qn(y.links,a),y.Sl()))}$n.prototype.ph=function(){return!0},Ye.Object.defineProperties($n.prototype,{fromNode:{get:function(){return this.ef},set:function(a){var y=this.ef;if(y!==a){var x=this.fromPort;y!==null&&(this.uf!==y&&Vm(y,this,x),wg(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setFromNodeForLink(this,a,y);var E=this.fromPort,te=this.fromPortChanged;if(te!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),te(this,x,E),b!==null&&(b.aa=ne)}a!==null&&(this.uf!==a&&Km(a,this,E),xg(this),this.C(1)),this.g("fromNode",y,a),xp(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&Ul(x),wg(this),this.ff=a;var b=this.fromPort;b!==null&&Ul(b);var E=this.diagram;if(E!==null){var te=this.data,ne=E.model;te!==null&&ne.ri()&&ne.xv(te,a)}x!==b&&(this.Wf=null,this.bb(),te=this.fromPortChanged,te!==null&&(ne=!0,E!==null&&(ne=E.aa,E.aa=!0),te(this,x,b),E!==null&&(E.aa=ne))),xg(this),this.g("fromPortId",y,a)}}},fromPort:{get:function(){var a=this.ef;return a===null?null:a.ns(this.ff)}},fromPortChanged:{get:function(){return this.gn},set:function(a){var y=this.gn;y!==a&&(this.gn=a,this.g("fromPortChanged",y,a))}},toNode:{get:function(){return this.uf},set:function(a){var y=this.uf;if(y!==a){var x=this.toPort;y!==null&&(this.ef!==y&&Vm(y,this,x),wg(this),this.C(2)),this.uf=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setToNodeForLink(this,a,y);var E=this.toPort,te=this.toPortChanged;if(te!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),te(this,x,E),b!==null&&(b.aa=ne)}a!==null&&(this.ef!==a&&Km(a,this,E),xg(this),this.C(1)),this.g("toNode",y,a),xp(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&Ul(x),wg(this),this.vf=a;var b=this.toPort;b!==null&&Ul(b);var E=this.diagram;if(E!==null){var te=this.data,ne=E.model;te!==null&&ne.ri()&&ne.Cv(te,a)}x!==b&&(this.Wf=null,this.bb(),te=this.toPortChanged,te!==null&&(ne=!0,E!==null&&(ne=E.aa,E.aa=!0),te(this,x,b),E!==null&&(E.aa=ne))),xg(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:oo},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&&Ul(this.fromPort),this.bb())}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:NaN},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Mn(a,">= 0",$n,"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:oo},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&&Ul(this.toPort),this.bb())}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:NaN},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Mn(a,">= 0",$n,"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?qi: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&&Sg(this.fromNode),this.toNode!==null&&Sg(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof dr?a:null}},routeBounds:{get:function(){this.vg();var a=this.ml,y=1/0,x=1/0,b=this.pointsCount;if(b===0)a.h(NaN,NaN,0,0);else{if(b===1)b=this.i(0),y=Math.min(b.x,y),x=Math.min(b.y,x),a.h(b.x,b.y,0,0);else if(b===2){b=this.i(0);var E=this.i(1);y=Math.min(b.x,E.x),x=Math.min(b.y,E.y),a.h(b.x,b.y,0,0),a.Ye(E)}else if(this.computeCurve()===ou&&3<=b&&!this.isOrthogonal)if(E=this.i(0),y=E.x,x=E.y,a.h(y,x,0,0),b===3){b=this.i(1),y=Math.min(b.x,y),x=Math.min(b.y,x);var te=this.i(2);y=Math.min(te.x,y),x=Math.min(te.y,x),rn.Dl(E.x,E.y,b.x,b.y,b.x,b.y,te.x,te.y,.5,a)}else for(te=3;te<b;te+=3){var ne=this.i(te-2);te+3>=b&&(te=b-1);var ae=this.i(te-1),fe=this.i(te);rn.Dl(E.x,E.y,ne.x,ne.y,ae.x,ae.y,fe.x,fe.y,.5,a),y=Math.min(fe.x,y),x=Math.min(fe.y,x),E=fe}else for(E=this.i(0),te=this.i(1),y=Math.min(E.x,te.x),x=Math.min(E.y,te.y),a.h(E.x,E.y,0,0),a.Ye(te),E=2;E<b;E++)te=this.i(E),y=Math.min(te.x,y),x=Math.min(te.y,x),a.Ye(te);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new Mt)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||Ym(this);for(var a=this.cq=[],y=this.pointsCount,x=0;x<y-1;x++){var b=this.i(x),E=this.i(x+1);rn.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):rn.$(b.y,E.y)?(b=E.x-b.x,0>b&&(b=-b)):b=Math.sqrt(b.Bf(E)),a.push(b)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,b=a=0;b<x;b++)a+=y[b];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 b=a.length%2===0;if(b){for(var E=0;E<a.length;E++)if(typeof a[E]!="number"||isNaN(a[E])){b=!1;break}}if(b)for(x=new Bn,b=0;b<a.length/2;b++)E=new Mt(a[2*b],a[2*b+1]).freeze(),x.add(E);else{for(b=!0,E=0;E<a.length;E++){var te=a[E];if(!nn(te)||typeof te.x!="number"||isNaN(te.x)||typeof te.y!="number"||isNaN(te.y)){b=!1;break}}if(b)for(x=new Bn,b=0;b<a.length;b++)E=a[b],x.add(new Mt(E.x,E.y).freeze())}}else if(a instanceof Bn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Nt("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),Ym(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&jo(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||!wp(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!wp(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===Fh||y===bp||a===Fh||a===bp),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)}}}),$n.prototype.invalidateOtherJumpOvers=$n.prototype.Xo,$n.prototype.findClosestSegment=$n.prototype.ez,$n.prototype.updateRoute=$n.prototype.vg,$n.prototype.invalidateRoute=$n.prototype.bb,$n.prototype.rollbackRoute=$n.prototype.rv,$n.prototype.commitRoute=$n.prototype.zf,$n.prototype.startRoute=$n.prototype.uh,$n.prototype.clearPoints=$n.prototype.Fj,$n.prototype.removePoint=$n.prototype.pv,$n.prototype.addPointAt=$n.prototype.yf,$n.prototype.addPoint=$n.prototype.ne,$n.prototype.insertPointAt=$n.prototype.m,$n.prototype.insertPoint=$n.prototype.Kz,$n.prototype.setPointAt=$n.prototype.L,$n.prototype.setPoint=$n.prototype.dd,$n.prototype.getPoint=$n.prototype.i,$n.prototype.getOtherPort=$n.prototype.Cz,$n.prototype.getOtherNode=$n.prototype.To;var Nf=null,Of=null,Jv=new Ln($n,"Normal",1),Mx=new Ln($n,"Orthogonal",2),Tx=new Ln($n,"AvoidsNodes",6),nS=new Ln($n,"AvoidsNodesStraight",7),ol=new Ln($n,"None",0),ou=new Ln($n,"Bezier",9),Fh=new Ln($n,"JumpGap",10),bp=new Ln($n,"JumpOver",11),bg=new Ln($n,"End",17),e0=new Ln($n,"Scale",18),t0=new Ln($n,"Stretch",19),Cg=new Ln($n,"OrientAlong",21),Pg=new Ln($n,"OrientPlus90",22),_g=new Ln($n,"OrientMinus90",23),Qv=new Ln($n,"OrientOpposite",24),n0=new Ln($n,"OrientUpright",25),Eg=new Ln($n,"OrientPlus90Upright",26),Lg=new Ln($n,"OrientMinus90Upright",27),i0=new Ln($n,"OrientUpright45",28),iS=16,rS=14,Mg=8;$n.className="Link",$n.Normal=Jv,$n.Orthogonal=Mx,$n.AvoidsNodes=Tx,$n.AvoidsNodesStraight=nS,$n.None=ol,$n.Bezier=ou,$n.JumpGap=Fh,$n.JumpOver=bp,$n.End=bg,$n.Scale=e0,$n.Stretch=t0,$n.OrientAlong=Cg,$n.OrientPlus90=Pg,$n.OrientMinus90=_g,$n.OrientOpposite=Qv,$n.OrientUpright=n0,$n.OrientPlus90Upright=Eg,$n.OrientMinus90Upright=Lg,$n.OrientUpright45=i0,$n.EndSegmentStep=8,$n.CurvinessStart=iS,$n.SpacingMin=rS,$n.OrthoShortCut=Mg;function r0(a,y,x,b){pr(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=b,this.links=[]}r0.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},r0.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))}},r0.className="LinkBundle";function Tg(a){pr(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}Tg.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,b=a.y+a.height;if(this.Nd=Math.floor((a.x-this.rc)/this.rc)*this.rc,this.Od=Math.floor((y-this.sc)/this.sc)*this.sc,this.En=Math.ceil((x+2*this.rc)/this.rc)*this.rc,this.Fn=Math.ceil((b+2*this.sc)/this.sc)*this.sc,a=1+(Math.ceil((this.En-this.Nd)/this.rc)|0),y=1+(Math.ceil((this.Fn-this.Od)/this.sc)|0),this.ac===null||this.di<a-1||this.ei<y-1){for(x=[],b=0;b<=a;b++)x[b]=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(b=0;b<=this.ei;b++)x[b]=a}};function Cp(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function Kc(a,y,x){return Cp(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):qv}function oS(a){if(a.ac!==null)for(var y=0;y<=a.di;y++)for(var x=a.ac[y],b=0;b<=a.ei;b++)x[b]>=of&&(x[b]=qv)}Tg.prototype.Yj=function(a,y,x,b){if(a>this.En||a+x<this.Nd||y>this.Fn||y+b<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 E=Math.max(0,b)/this.sc+1|0;if(0>a&&(x+=a,a=0),0>y&&(E+=y,y=0),0>x||0>E)return!0;for(b=Math.min(a+x-1,this.di)|0,x=Math.min(y+E-1,this.ei)|0;a<=b;a++){E=this.ac[a];for(var te=y;te<=x;te++)if(E[te]===jh)return!1}return!0};function Vc(a,y,x,b,E,te,ne,ae,fe){if(!(y<te||y>ne||x<ae||x>fe)){var _e=y|0,Te=x|0,je=a.ac[_e][Te];if(je>=of&&je<Pp)for(E?Te+=b:_e+=b,je+=1;te<=_e&&_e<=ne&&ae<=Te&&Te<=fe&&!(je>=a.ac[_e][Te]);)a.ac[_e][Te]=je,je+=1,E?Te+=b:_e+=b;if(_e=E?Te:_e,E)if(0<b)for(x+=b;x<_e;x+=b)Vc(a,y,x,1,!E,te,ne,ae,fe),Vc(a,y,x,-1,!E,te,ne,ae,fe);else for(x+=b;x>_e;x+=b)Vc(a,y,x,1,!E,te,ne,ae,fe),Vc(a,y,x,-1,!E,te,ne,ae,fe);else if(0<b)for(y+=b;y<_e;y+=b)Vc(a,y,x,1,!E,te,ne,ae,fe),Vc(a,y,x,-1,!E,te,ne,ae,fe);else for(y+=b;y>_e;y+=b)Vc(a,y,x,1,!E,te,ne,ae,fe),Vc(a,y,x,-1,!E,te,ne,ae,fe)}}function o0(a,y,x,b,E,te,ne,ae,fe){y|=0,x|=0;var _e=jh,Te=of;for(a.ac[y][x]=Te;_e===jh&&y>te&&y<ne&&x>ae&&x<fe;)Te+=1,a.ac[y][x]=Te,E?x+=b:y+=b,_e=a.ac[y][x]}function s0(a,y,x,b,E,te,ne,ae,fe){y|=0,x|=0;var _e=jh,Te=Pp;for(a.ac[y][x]=Te;_e===jh&&y>te&&y<ne&&x>ae&&x<fe;)a.ac[y][x]=Te,E?x+=b:y+=b,_e=a.ac[y][x]}function sS(a,y,x,b,E,te,ne){if(a.ac!==null){a.abort=!1;var ae=y.x,fe=y.y;if(Cp(a,ae,fe)){ae-=a.Nd,ae/=a.rc,fe-=a.Od,fe/=a.sc;var _e=b.x,Te=b.y;if(Cp(a,_e,Te))if(_e-=a.Nd,_e/=a.rc,Te-=a.Od,Te/=a.sc,1>=Math.abs(ae-_e)&&1>=Math.abs(fe-Te))a.abort=!0;else{var je=te.x;b=te.y,y=te.x+te.width;var Ve=te.y+te.height;je-=a.Nd,je/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,Ve-=a.Od,Ve/=a.sc,te=Math.max(0,Math.min(a.di,je|0)),y=Math.min(a.di,Math.max(0,y|0)),je=Math.max(0,Math.min(a.ei,b|0)),Ve=Math.min(a.ei,Math.max(0,Ve|0)),b=a.ac,ae|=0,fe|=0,_e|=0,Te|=0;var Qe=x===0||x===90?1:-1;if(x=x===90||x===270,b[ae][fe]===jh?(o0(a,ae,fe,Qe,x,te,y,je,Ve),o0(a,ae,fe,1,!x,te,y,je,Ve),o0(a,ae,fe,-1,!x,te,y,je,Ve)):o0(a,ae,fe,Qe,x,ae,fe,ae,fe),b[_e][Te]===jh?(s0(a,_e,Te,E===0||E===90?1:-1,E===90||E===270,te,y,je,Ve),s0(a,_e,Te,1,!(E===90||E===270),te,y,je,Ve),s0(a,_e,Te,-1,!(E===90||E===270),te,y,je,Ve)):s0(a,_e,Te,Qe,x,_e,Te,_e,Te),x=Hn(),ne&&aS(a,_e,Te,E,ae,fe,x))for((x[0]!==_e||x[1]!==Te)&&(x.unshift(Te),x.unshift(_e)),(x[x.length-2]!==ae||x[x.length-1]!==fe)&&(x.push(ae),x.push(fe)),a=of,E=x[x.length-2],ne=x[x.length-1],b[E][ne]=a++,te=x.length-4;0<=te;te-=2)for(E=x[te+2],ne=x[te+3],y=x[te],_e=x[te+1];y>E?E++:y<E?E--:_e>ne?ne++:_e<ne&&ne--,b[E][ne]=a++,E!==y||ne!==_e;);else Vc(a,ae,fe,1,!1,te,y,je,Ve),Vc(a,ae,fe,-1,!1,te,y,je,Ve),Vc(a,ae,fe,1,!0,te,y,je,Ve),Vc(a,ae,fe,-1,!0,te,y,je,Ve);ei(x)}}}}function aS(a,y,x,b,E,te,ne){for(var ae=a.ac,fe=y,_e=x;;){if(fe===E&&_e===te)return!0;var Te=fe,je=_e;if(b===0)if(Te<E)Te++;else break;else if(b===90)if(je<te)je++;else break;else if(b===180)if(Te>E)Te--;else break;else if(je>te)je--;else break;var Ve=ae[Te][je];if(Ve===0||Ve===ey)break;fe=Te,_e=je}for(;;){if(Te=b,je=fe,Ve=_e,b===0?Ve<te?(Te=90,Ve++):Ve>te&&(Te=270,Ve--):b===90?je<E?(Te=0,je++):je>E&&(Te=180,je--):b===180?Ve<te?(Te=90,Ve++):Ve>te&&(Te=270,Ve--):je<E?(Te=0,je++):je>E&&(Te=180,je--),je=ae[je][Ve],Te!==b&&je!==0&&je!==ey){if(ne.push(fe),ne.push(_e),aS(a,fe,_e,Te,E,te,ne))return!0;ne.pop(),ne.pop()}if(ae[fe][_e]=ey,b===0){if(fe===y)return!1;fe--}else if(b===90){if(_e===x)return!1;_e--}else if(b===180){if(fe===y)return!1;fe++}else{if(_e===x)return!1;_e++}}}Ye.Object.defineProperties(Tg.prototype,{bounds:{get:function(){return new kn(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 jh=0,of=1,Pp=999999,qv=Pp+1,ey=Pp+2;Tg.className="PositionArray";function If(){pr(this),this.port=this.node=null,this.pe=[],this.ap=!1}If.prototype.toString=function(){for(var a=this.pe,y=this.node.toString()+" "+a.length.toString()+":",x=0;x<a.length;x++){var b=a[x];b!==null&&(y+=`
|
|
|
`+b.toString())}return y};function kx(a,y,x,b){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 b&&y!==15&&(x-=15,0>x&&(x+=360)),x>a&&x<180-a?90:x>=180-a&&x<=180+a?180:x>180+a&&x<360-a?270:0}If.prototype.Sl=function(){this.pe.length=0};function lS(a,y){var x=a.pe;if(x.length===0){e:if(!a.ap){x=a.ap,a.ap=!0;var b=null,E=a.node,te=E instanceof tr?E:null;if(te===null||te.isSubGraphExpanded)var ne=E.isTreeExpanded?E.findLinksConnected(a.port.portId):E.qx();else{if(!te.actualBounds.w()){a.ap=x;break e}b=te,ne=b.Lu()}te=a.pe.length=0;var ae=a.port.ga(Xs,Mt.alloc()),fe=a.port.ga(Na,Mt.alloc());for(E=kn.allocAt(ae.x,ae.y,0,0),E.Ye(fe),Mt.free(ae),Mt.free(fe),ae=Mt.allocAt(E.x+E.width/2,E.y+E.height/2),fe=a.port.li(),ne=ne.iterator;ne.next();){var _e=ne.value;if(_e.isVisible()&&_e.fromPort!==_e.toPort){var Te=_e.fromPort===a.port||_e.fromNode!==null&&_e.fromNode.Td(b),je=_e.computeSpot(Te,a.port);if(je.$c()&&(Te=Te?_e.toPort:_e.fromPort,Te!==null)){var Ve=Te.part;if(Ve!==null){var Qe=Ve.findVisibleNode();Qe!==null&&Qe!==Ve&&(Ve=Qe,Te=Ve.port),Te=_e.computeOtherPoint(Ve,Te),Ve=ae.ab(Te),Ve-=fe,0>Ve?Ve+=360:360<=Ve&&(Ve-=360),je=kx(E,je,Ve,_e.isOrthogonal),je===0?(je=4,180<Ve&&(Ve-=360)):je===90?(je=8,270<Ve&&(Ve-=360)):je===180?je=2:(je=1,90>Ve&&(Ve+=360)),Qe=a.pe[te],Qe===void 0?(Qe=new ty(_e,Ve,je),a.pe[te]=Qe):(Qe.link=_e,Qe.angle=Ve,Qe.Nc=je),Qe.hv.set(Te),te++}}}}for(Mt.free(ae),a.pe.sort(If.prototype.j),fe=a.pe.length,b=-1,te=ae=0;te<fe;te++)ne=a.pe[te],ne!==void 0&&(ne.Nc!==b&&(b=ne.Nc,ae=0),ne.Uo=ae,ae++);for(b=-1,ae=0,te=fe-1;0<=te;te--)fe=a.pe[te],fe!==void 0&&(fe.Nc!==b&&(b=fe.Nc,ae=fe.Uo+1),fe.Gl=ae);if(te=a.pe,je=a.port,b=a.node.portSpreading,ae=Mt.alloc(),fe=Mt.alloc(),ne=Mt.alloc(),_e=Mt.alloc(),je.ga(Xs,ae),je.ga(wl,fe),je.ga(Na,ne),je.ga(Ia,_e),Qe=Ve=Te=je=0,b===Wv)for(var rt=0;rt<te.length;rt++){var ct=te[rt];if(ct!==null){var Dt=ct.link.computeThickness();switch(ct.Nc){case 8:Ve+=Dt;break;case 2:Qe+=Dt;break;case 1:je+=Dt;break;default:case 4:Te+=Dt}}}var Lt=rt=0,Gt=1,Zt=ct=0;for(Dt=0;Dt<te.length;Dt++){var Vt=te[Dt];if(Vt!==null){if(rt!==Vt.Nc){switch(rt=Vt.Nc,rt){case 8:var Qt=ne;Lt=_e;break;case 2:Qt=_e,Lt=ae;break;case 1:Qt=ae,Lt=fe;break;default:case 4:Qt=fe,Lt=ne}switch(ct=Lt.x-Qt.x,Zt=Lt.y-Qt.y,rt){case 8:Ve>Math.abs(ct)?(Gt=Math.abs(ct)/Ve,Ve=Math.abs(ct)):Gt=1;break;case 2:Qe>Math.abs(Zt)?(Gt=Math.abs(Zt)/Qe,Qe=Math.abs(Zt)):Gt=1;break;case 1:je>Math.abs(ct)?(Gt=Math.abs(ct)/je,je=Math.abs(ct)):Gt=1;break;default:case 4:Te>Math.abs(Zt)?(Gt=Math.abs(Zt)/Te,Te=Math.abs(Zt)):Gt=1}Lt=0}var yn=Vt.Zo;if(b===Wv){switch(Vt=Vt.link.computeThickness(),Vt*=Gt,yn.set(Qt),rt){case 8:yn.x=Qt.x+ct/2+Ve/2-Lt-Vt/2;break;case 2:yn.y=Qt.y+Zt/2+Qe/2-Lt-Vt/2;break;case 1:yn.x=Qt.x+ct/2-je/2+Lt+Vt/2;break;default:case 4:yn.y=Qt.y+Zt/2-Te/2+Lt+Vt/2}Lt+=Vt}else{var ri=.5;b===$m&&(ri=(Vt.Uo+1)/(Vt.Gl+1)),yn.x=Qt.x+ct*ri,yn.y=Qt.y+Zt*ri}}}for(Mt.free(ae),Mt.free(fe),Mt.free(ne),Mt.free(_e),Qt=a.pe,te=0;te<Qt.length;te++)b=Qt[te],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,kn.free(E)}x=a.pe}for(a=0;a<x.length;a++)if(E=x[a],E!==null&&E.link===y)return E;return null}If.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},If.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,ms,y.fromPort===this.port),b=a.Uo;if(0>b)return x;var E=a.Gl;if(1>=E||!y.isOrthogonal)return x;y=a.hv;var te=a.Zo;return(a.Nc===2||a.Nc===8)&&(b=E-1-b),((a=a.Nc===2||a.Nc===4)?y.y<te.y:y.x<te.x)?x+8*b:(a?y.y===te.y:y.x===te.x)?x:x+8*(E-1-b)},If.className="Knot";function ty(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new Mt,this.Gl=this.Uo=0,this.Zo=new Mt,this.Ju=0}ty.prototype.toString=function(){return this.link.toString()+" "+this.angle.toString()+" "+this.Nc.toString()+":"+this.Uo.toString()+"/"+this.Gl.toString()+" "+this.Zo.toString()+" "+this.Ju.toString()+" "+this.hv.toString()},ty.className="LinkInfo";function es(a){pr(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new Mt(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}es.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},es.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},es.prototype.qb=function(){},es.prototype.toString=function(){var a=Fn(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},es.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())}}},es.prototype.createNetwork=function(){return new To(this)},es.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof vn?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof tr?y.lg(a.memberParts):y.lg(a.iterator),y},es.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")}},es.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()}},es.prototype.doLayout=function(a){var y=new In;a instanceof vn?(fd(this,y,a.nodes,!0,this.rh,!0,!1,!0),fd(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof tr?fd(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},es.prototype.doMinimalNoNetworkLayout=function(a){var y=Math.ceil(Math.sqrt(a.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var x=this.arrangementOrigin.x,b=x,E=this.arrangementOrigin.y,te=0,ne=0;for(a=a.iterator;a.next();){var ae=a.value;kg(ae);var fe=ae.measuredBounds,_e=fe.width;fe=fe.height,ae.moveTo(b,E),ae instanceof tr&&(ae.rh=!1),b+=Math.max(_e,50)+20,ne=Math.max(ne,Math.max(fe,50)),te>=y-1?(te=0,b=x,E+=ne+20,ne=0):te++}},es.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var y=this.arrangementOrigin.x,x=y,b=this.arrangementOrigin.y,E=0,te=0,ne=this.network.vertexes.iterator;ne.next();){var ae=ne.value.node;if(!(ae===null||ae instanceof $n)&&(kg(ae),this.rh(ae))){var fe=ae.measuredBounds,_e=fe.width;fe=fe.height,ae.moveTo(x,b),ae instanceof tr&&(ae.rh=!1),x+=Math.max(_e,50)+20,te=Math.max(te,Math.max(fe,50)),E>=a-1?(E=0,x=y,b+=te+20,te=0):E++}}},es.prototype.rh=function(a){return!!(!a.location.w()||a instanceof tr&&a.rh)};function fd(a,y,x,b,E,te,ne,ae){for(x=x.iterator;x.next();){var fe=x.value;b&&!fe.isTopLevel||E!==null&&!E(fe)||!fe.canLayout()||(te&&fe instanceof oi?fe.isLinkLabel||(fe instanceof tr&&fe.layout===null?fd(a,y,fe.memberParts,!1,E,te,ne,ae):(kg(fe),y.add(fe))):ne&&fe instanceof $n?y.add(fe):!ae||!fe.Zc()||fe instanceof oi||(kg(fe),y.add(fe)))}}function kg(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}es.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new kn),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},es.prototype.ex=function(a){var y=new In;return a instanceof vn?(fd(this,y,a.nodes,!0,null,!0,!0,!0),fd(this,y,a.links,!0,null,!0,!0,!0),fd(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof tr?fd(this,y,a.memberParts,!1,null,!0,!0,!0):fd(this,y,a.iterator,!1,null,!0,!0,!0),y},es.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(Xs),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Ye.Object.defineProperties(es.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())}}}),es.prototype.collectParts=es.prototype.ex,es.prototype.getLayoutBounds=es.prototype.ni,es.prototype.invalidateLayout=es.prototype.C,es.className="Layout";function To(a){pr(this),this.Sc=a,this.wf=new In,this.ye=new In,this.Es=new ci,this.zs=new ci}To.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 In,this.ye=new In,this.Es=new ci,this.zs=new ci},To.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},To.prototype.createVertex=function(){return new aa(this)},To.prototype.createEdge=function(){return new Gl(this)},To.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 oi)return!ne.isLinkLabel;if(ne instanceof $n){var ae=ne.fromNode;return ae===null||ae.isLinkLabel?!1:(ne=ne.toNode,!(ne===null||ne.isLinkLabel))}return!1}),a=a.iterator;a.next();){var b=a.value;if(b instanceof oi&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof tr&&b.layout===null)this.lg(b.memberParts,!1);else if(this.ki(b)===null){var E=this.createVertex();E.node=b,this.dh(E)}}}for(a.reset();a.next();)if(b=a.value,b instanceof $n&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)&&this.Lo(b)===null){var te=b.fromNode;E=b.toNode,te!==null&&E!==null&&te!==E&&(te=this.findGroupVertex(te),E=this.findGroupVertex(E),te!==null&&E!==null&&this.Zj(te,E,b))}}},To.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},it=To.prototype,it.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},it.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},it.Iu=function(a){if(a!==null&&uS(this,a)){for(var y=a.tg,x=y.count-1;0<=x;x--){var b=y.M(x);this.Mj(b)}for(y=a.mg,a=y.count-1;0<=a;a--)x=y.M(a),this.Mj(x)}};function uS(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}it.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},it.ki=function(a){return a===null?null:this.Es.I(a)},it.Bo=function(a){if(a!==null){ny(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function ny(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}}it.Dy=function(a){if(a===null)return null;var y=a.fromNode,x=a.toNode,b=this.Lo(a);return b===null?(b=this.createEdge(),b.link=a,y!==null&&(b.fromVertex=this.Bl(y)),x!==null&&(b.toVertex=this.Bl(x)),this.Bo(b)):(y!==null?b.fromVertex=this.Bl(y):b.fromVertex=null,x!==null?b.toVertex=this.Bl(x):b.toVertex=null),b},it.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),iy(this,a)}};function iy(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}it.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},it.Lo=function(a){return a===null?null:this.zs.I(a)},it.Zj=function(a,y,x){if(a===null||y===null)return null;if(a.network===this&&y.network===this){var b=this.createEdge();return b.link=x,b.fromVertex=a,b.toVertex=y,this.Bo(b),b}return null},it.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))}},it.Ko=function(){for(var a=Hn(),y=this.ye.iterator;y.next();){var x=y.value;x.fromVertex===x.toVertex&&a.push(x)}for(y=a.length,x=0;x<y;x++)this.Mj(a[x]);ei(a)},To.prototype.deleteArtificialVertexes=function(){for(var a=Hn(),y=this.wf.iterator;y.next();){var x=y.value;x.node===null&&x.data===null&&a.push(x)}for(x=a.length,y=0;y<x;y++)this.Iu(a[y]);for(y=Hn(),x=this.ye.iterator;x.next();){var b=x.value;b.link===null&&b.data===null&&y.push(b)}for(x=y.length,b=0;b<x;b++)this.Mj(y[b]);ei(a),ei(y)};function Ax(a){for(var y=Hn(),x=a.ye.iterator;x.next();){var b=x.value;b.fromVertex!==null&&b.toVertex!==null||y.push(b)}for(x=y.length,b=0;b<x;b++)a.Mj(y[b]);ei(y)}To.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Ax(this),this.Ko()),a=new Bn;for(var y=!0;y;){y=!1;for(var x=this.wf.iterator;x.next();){var b=x.value;if(0<b.tg.count||0<b.mg.count){y=this.layout.createNetwork(),a.add(y),ry(this,y,b),y=!0;break}}}return a.sort(function(E,te){return E===null||te===null||E===te?0:te.vertexes.count-E.vertexes.count}),a};function ry(a,y,x){if(x!==null&&x.network!==y){uS(a,x),y.dh(x);for(var b=x.sourceEdges;b.next();){var E=b.value;E.network!==y&&(iy(a,E),ny(y,E),ry(a,y,E.fromVertex))}for(b=x.destinationEdges;b.next();)x=b.value,x.network!==y&&(iy(a,x),ny(y,x),ry(a,y,x.toVertex))}}To.prototype.dz=function(){for(var a=new In,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},Ye.Object.defineProperties(To.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}}}),To.prototype.findAllParts=To.prototype.dz,To.prototype.splitIntoSubNetworks=To.prototype.Zx,To.prototype.deleteSelfEdges=To.prototype.Ko,To.prototype.reverseEdge=To.prototype.gm,To.prototype.linkVertexes=To.prototype.Zj,To.prototype.findEdge=To.prototype.Lo,To.prototype.deleteLink=To.prototype.Yy,To.prototype.deleteEdge=To.prototype.Mj,To.prototype.addLink=To.prototype.Dy,To.prototype.addEdge=To.prototype.Bo,To.prototype.findVertex=To.prototype.ki,To.prototype.deleteNode=To.prototype.Zy,To.prototype.deleteVertex=To.prototype.Iu,To.prototype.addNode=To.prototype.Bl,To.prototype.addVertex=To.prototype.dh,To.prototype.addParts=To.prototype.lg,To.className="LayoutNetwork";function aa(a){pr(this),this.ob=a,this.j=new kn(0,0,10,10).freeze(),this.o=new Mt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new Bn,this.mg=new Bn}aa.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new Bn,this.mg=new Bn},aa.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Ir(this);if(0<a&&(y+=this.node!==null?"("+this.node.toString()+")":"",1<a)){a="";for(var x=!0,b=this.tg.iterator;b.next();){var E=b.value;x?x=!1:a+=",",a+=E.toString(0)}for(E="",x=!0,b=this.mg.iterator;b.next();){var te=b.value;x?x=!1:E+=",",E+=te.toString(0)}y+=" sources: "+a+" destinations: "+E}return y},aa.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;nn(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 tr)){x=kn.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(jr);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),kn.free(x);return}kn.free(x)}a.moveTo(y.x,y.y)}},aa.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},aa.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},aa.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},aa.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function oy(a,y){return a=a.Sh,y=y.Sh,a?y?(a=a.text,y=y.text,a<y?-1:a>y?1:0):1:y!==null?-1:0}Ye.Object.defineProperties(aa.prototype,{sourceEdgesArrayAccess:{get:function(){return this.tg._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.mg._dataArray}},data:{get:function(){return this.ub},set:function(a){if(this.ub=a,a!==null&&a.bounds){var y=a.bounds;a=y.x;var x=y.y,b=y.width;y=y.height,this.o.h(b/2,y/2),this.j.h(a,x,b,y)}}},node:{get:function(){return this.Sh},set:function(a){if(this.Sh!==a){this.Sh=a,a.Va();var y=this.network.layout,x=kn.alloc(),b=y.ni(a,x);y=b.x;var E=b.y,te=b.width;if(b=b.height,isNaN(y)&&(y=0),isNaN(E)&&(E=0),this.j.h(y,E,te,b),kn.free(x),!(a instanceof tr)&&(a=a.locationObject.ga(jr),a.w())){this.o.h(a.x-y,a.y-E);return}this.o.h(te/2,b/2)}}},bounds:{get:function(){return this.j},set:function(a){this.j.D(a)||this.j.assign(a)}},focus:{get:function(){return this.o},set:function(a){this.o.D(a)||this.o.assign(a)}},centerX:{get:function(){return this.j.x+this.o.x},set:function(a){var y=this.j;y.x+this.o.x!==a&&(y.ka(),y.x=a-this.o.x,y.freeze())}},centerY:{get:function(){return this.j.y+this.o.y},set:function(a){var y=this.j;y.y+this.o.y!==a&&(y.ka(),y.y=a-this.o.y,y.freeze())}},focusX:{get:function(){return this.o.x},set:function(a){var y=this.o;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},focusY:{get:function(){return this.o.y},set:function(a){var y=this.o;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},x:{get:function(){return this.j.x},set:function(a){var y=this.j;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},y:{get:function(){return this.j.y},set:function(a){var y=this.j;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},width:{get:function(){return this.j.width},set:function(a){var y=this.j;y.width!==a&&(y.ka(),y.width=a,y.freeze())}},height:{get:function(){return this.j.height},set:function(a){var y=this.j;y.height!==a&&(y.ka(),y.height=a,y.freeze())}},network:{get:function(){return this.ob},set:function(a){this.ob=a}},sourceVertexes:{get:function(){for(var a=new In,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new In,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new In,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 Bn,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}}}),aa.prototype.deleteDestinationEdge=aa.prototype.Jl,aa.prototype.addDestinationEdge=aa.prototype.zl,aa.prototype.deleteSourceEdge=aa.prototype.Kl,aa.prototype.addSourceEdge=aa.prototype.Cl,aa.className="LayoutVertex",aa.standardComparer=oy,aa.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 b=parseFloat(y[x]),E=parseFloat(a[x]);if(isNaN(b))if(isNaN(E)){if(y[x].localeCompare(a[x])!==0)return y[x].localeCompare(a[x])}else return 1;else{if(isNaN(E))return-1;if(b-E!==0)return b-E}}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 Gl(a){pr(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Gl.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Gl.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Ir(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},Gl.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Gl.prototype.commit=function(){},Gl.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},Ye.Object.defineProperties(Gl.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)}}}),Gl.prototype.getOtherVertex=Gl.prototype.Ax,Gl.className="LayoutEdge";function Pa(a){es.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=Ag,this.Rb=l0,this.nd=Ng,this.hd=cS,a&&Object.assign(this,a)}qe(Pa,es),Pa.prototype.cloneProtected=function(a){es.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},Pa.prototype.qb=function(a){a.classType===Pa?a===Ng||a===c0||a===sy||a===u0?this.sorting=a:a===l0||a===uc?this.arrangement=a:a===Ag||a===a0?this.alignment=a:Nt("Unknown enum value: "+a):es.prototype.qb.call(this,a)},Pa.prototype.doLayout=function(a){this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var y=this.ex(a);a=this.diagram;for(var x=y.copy().iterator;x.next();){var b=x.value;if(!b.ph()||b.fromNode===null&&b.toNode===null){if(b.Va(),b instanceof tr)for(b=b.memberParts;b.next();)y.remove(b.value)}else y.remove(b)}var E=y.Fa();if(E.length!==0){switch(this.sorting){case u0:E.reverse();break;case Ng:E.sort(this.comparer);break;case c0:E.sort(this.comparer),E.reverse()}var te=this.wrappingColumn;isNaN(te)&&(te=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>=te&&0>=ne&&(te=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),b=[],this.alignment){case a0:var ae=y,fe=x,_e=kn.alloc(),Te=Math.max(this.cellSize.width,1);if(!isFinite(Te))for(var je=Te=0;je<E.length;je++){var Ve=this.ni(E[je],_e);Te=Math.max(Te,Ve.width)}if(Te=Math.max(Te+ae,1),je=Math.max(this.cellSize.height,1),!isFinite(je))for(Ve=je=0;Ve<E.length;Ve++){var Qe=this.ni(E[Ve],_e);je=Math.max(je,Qe.height)}je=Math.max(je+fe,1),Ve=this.arrangement;for(var rt=Qe=this.arrangementOrigin.x,ct=this.arrangementOrigin.y,Dt=0,Lt=0,Gt=0;Gt<E.length;Gt++){var Zt=E[Gt],Vt=this.ni(Zt,_e),Qt=Math.ceil((Vt.width+ae)/Te)*Te,yn=Math.ceil((Vt.height+fe)/je)*je;switch(Ve){case uc:var ri=Math.abs(rt-Vt.width);break;default:ri=rt+Vt.width}switch((0<te&&Dt>te-1||0<ne&&0<Dt&&ri-Qe>ne)&&(b.push(new kn(0,ct,ne+ae,Lt)),Dt=0,rt=Qe,ct+=Lt,Lt=0),Lt=Math.max(Lt,yn),Ve){case uc:Vt=-Vt.width;break;default:Vt=0}switch(Zt.moveTo(rt+Vt,ct),Ve){case uc:rt-=Qt;break;default:rt+=Qt}Dt++}b.push(new kn(0,ct,ne+ae,Lt)),kn.free(_e);break;case Ag:for(fe=ne,Te=te,je=y,Ve=x,ne=kn.alloc(),Qe=Math.max(this.cellSize.width,1),te=ct=_e=0,ae=Mt.alloc(),rt=0;rt<E.length;rt++)Lt=E[rt],Dt=this.ni(Lt,ne),Lt=Dh(Lt,Lt.locationObject,Lt.locationSpot,ae),_e=Math.max(_e,Lt.x),ct=Math.max(ct,Dt.width-Lt.x),te=Math.max(te,Lt.y);switch(rt=this.arrangement,rt){case uc:_e+=je;break;default:ct+=je}Qe=isFinite(Qe)?Math.max(Qe+je,1):Math.max(_e+ct,1);var fi=Lt=this.arrangementOrigin.x;for(Gt=this.arrangementOrigin.y,ct=0,fe>=_e&&(fe-=_e),_e=Zt=0,Qt=Math.max(this.cellSize.height,1),Vt=te=0,yn=!0,Dt=Mt.alloc(),ri=0;ri<E.length;ri++){var li=E[ri],Vn=this.ni(li,ne),Rn=Dh(li,li.locationObject,li.locationSpot,ae);if(0<ct)switch(rt){case uc:fi=(fi-Lt-(Vn.width-Rn.x))/Qe,fi=rn.$(Math.round(fi),fi)?Math.round(fi):Math.floor(fi),fi=fi*Qe+Lt;break;default:fi=(fi-Lt+Rn.x)/Qe,fi=rn.$(Math.round(fi),fi)?Math.round(fi):Math.ceil(fi),fi=fi*Qe+Lt}else switch(rt){case uc:Zt=fi+Rn.x+Vn.width;break;default:Zt=fi-Rn.x}switch(rt){case uc:var Qi=-(fi+Rn.x)+Zt;break;default:Qi=fi+Vn.width-Rn.x-Zt}if(0<Te&&ct>Te-1||0<fe&&0<ct&&Qi>fe){for(b.push(new kn(0,yn?Gt-te:Gt,fe+je,Vt+te+Ve)),fi=0;fi<ct&&ri!==ct;fi++){Qi=E[ri-ct+fi];var Zi=Dh(Qi,Qi.locationObject,Qi.locationSpot,Dt);Qi.moveTo(Qi.position.x,Qi.position.y+te-Zi.y)}Vt+=Ve,Gt=yn?Gt+Vt:Gt+(Vt+te),ct=Vt=te=0,fi=Lt,yn=!1}switch(fi===Lt&&(_e=rt===uc?Math.max(_e,Vn.width-Rn.x):Math.min(_e,-Rn.x)),te=Math.max(te,Rn.y),Vt=Math.max(Vt,Vn.height-Rn.y),isFinite(Qt)&&(Vt=Math.max(Vt,Math.max(Vn.height,Qt)-Rn.y)),yn?li.moveTo(fi-Rn.x,Gt-Rn.y):li.moveTo(fi-Rn.x,Gt),rt){case uc:fi-=Rn.x+je;break;default:fi+=Vn.width-Rn.x+je}ct++}if(b.push(new kn(0,Gt,fe+je,(yn?Vt:Vt+te)+Ve)),E.length!==ct)for(fe=0;fe<ct;fe++)Te=E[E.length-ct+fe],je=Dh(Te,Te.locationObject,Te.locationSpot,ae),Te.moveTo(Te.position.x,Te.position.y+te-je.y);if(Mt.free(ae),Mt.free(Dt),rt===uc)for(E=0;E<b.length;E++)te=b[E],te.width+=_e,te.x-=_e;else for(E=0;E<b.length;E++)te=b[E],te.x>_e&&(te.width+=te.x-_e,te.x=_e);kn.free(ne)}for(ae=te=ne=E=0;ae<b.length;ae++)fe=b[ae],E=Math.min(E,fe.x),ne=Math.min(ne,fe.y),te=Math.max(te,fe.x+fe.width);this.arrangement===uc?this.commitLayers(b,new Mt(E+y/2-(te+E),ne-x/2)):this.commitLayers(b,new Mt(E-y/2,ne-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},Pa.prototype.commitLayers=function(){};function cS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}Ye.Object.defineProperties(Pa.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!==Ag&&a!==a0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==l0&&a!==uc||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==sy&&a!==u0&&a!==Ng&&a!==c0||(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 Ln(Pa,"Position",0),Ag=new Ln(Pa,"Location",1),l0=new Ln(Pa,"LeftToRight",2),uc=new Ln(Pa,"RightToLeft",3),sy=new Ln(Pa,"Forward",4),u0=new Ln(Pa,"Reverse",5),Ng=new Ln(Pa,"Ascending",6),c0=new Ln(Pa,"Descending",7);Pa.className="GridLayout",Pa.standardComparer=cS,Pa.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 b=parseFloat(a[x]),E=parseFloat(y[x]);if(isNaN(b))if(isNaN(E)){if(a[x].localeCompare(y[x])!==0)return a[x].localeCompare(y[x])}else return 1;else{if(isNaN(E))return-1;if(b-E!==0)return b-E}}else if(a[x]!=="")return 1;return y[x]!==""&&y[x]!==void 0?-1:0}return 1}return y!==null?-1:0},Pa.Position=a0,Pa.Location=Ag,Pa.LeftToRight=l0,Pa.RightToLeft=uc,Pa.Forward=sy,Pa.Reverse=u0,Pa.Ascending=Ng,Pa.Descending=c0;function mo(){this.On=new In,this.Dn=new In,this.Pa=new In,this.cf=new ci,this.bf=new ci,this.aj=new ci,this.H=null,this.tp=!1}it=mo.prototype,it.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},it.Xe=function(a){this.H=a},it.oi=function(a){if(a instanceof oi){if(this.On.add(a),a instanceof tr){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 $n?this.Dn.add(a):a instanceof qr||this.Pa.add(a);y=a.data,y===null||a instanceof qr||(a instanceof $n?this.bf.add(y,a):this.cf.add(y,a))},it.pc=function(a){if(a.Ej(),a instanceof oi){if(this.On.remove(a),a instanceof tr){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 $n?this.Dn.remove(a):a instanceof qr||this.Pa.remove(a);y=a.data,y===null||a instanceof qr||(a instanceof $n?this.bf.remove(y):this.cf.remove(y))},it.Wd=function(){var a=this.H;if(a!==null){for(var y=a.nodeTemplateMap.iterator;y.next();){var x=y.value,b=y.key;(!x.Zc()||x instanceof tr)&&Nt('Invalid node template in Diagram.nodeTemplateMap: template for "'+b+'" must be a Node or a simple Part, not a Group or Link: '+x)}for(y=a.groupTemplateMap.iterator;y.next();)x=y.value,b=y.key,x instanceof tr||Nt('Invalid group template in Diagram.groupTemplateMap: template for "'+b+'" must be a Group, not a normal Node or Link: '+x);for(y=a.linkTemplateMap.iterator;y.next();)x=y.value,b=y.key,x instanceof $n||Nt('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Hn(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=Hn(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=Hn(),b=this.nodes.iterator;b.next();){var E=b.value;E.data!==null&&(a.push(E.data),a.push(E.location))}for(b=this.links.iterator;b.next();)E=b.value,E.data!==null&&(a.push(E.data),a.push(E.location));for(b=this.parts.iterator;b.next();)E=b.value,E.data!==null&&(a.push(E.data),a.push(E.location));for(this.removeAllModeledParts(),this.addAllModeledParts(),b=0;b<y.length;b++)E=this.Lc(y[b]),E!==null&&(E.isSelected=!0);for(b=0;b<x.length;b++)E=this.Lc(x[b]),E!==null&&(E.isHighlighted=!0);for(b=0;b<a.length;b+=2)E=this.Lc(a[b]),E!==null&&(E.location=a[b+1]);ei(y),ei(x),ei(a)}},mo.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},mo.prototype.addModeledParts=function(a,y){var x=this,b=this.diagram.model;a.forEach(function(E){b.lb(E)&&hS(x,E,!1)}),a.forEach(function(E){b.lb(E)&&x.resolveReferencesForData(E)}),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 b=a.Ro(y),E=dS(a,y,b);if(E!==null&&(Ru(E),E=E.copy(),E!==null)){var te=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,E.Tf=b,E.ub=y,a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=te,b=E;break e}}b=null}b!==null&&x&&a.resolveReferencesForData(y)}}mo.prototype.insertLink=function(){return null},mo.prototype.resolveReferencesForData=function(){},mo.prototype.Ro=function(a){return this.H.model.Ro(a)};function dS(a,y,x){a=a.H;var b=a.model;return b.Xj()&&b.Yu(y)?(y=a.groupTemplateMap.I(x),y===null&&(y=a.groupTemplateMap.I(""),y===null&&(gS||(gS=!0,Dn('No Group template found for category "'+x+'"'),Dn(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,Dn('No Node template found for category "'+x+'"'),Dn(" Using default node template")),y=a.ny))),y}mo.prototype.getLinkCategoryForData=function(){return""},mo.prototype.setLinkCategoryForData=function(){},mo.prototype.setFromNodeForLink=function(){},mo.prototype.setToNodeForLink=function(){},mo.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(mS||(mS=!0,Dn('No Link template found for category "'+a+'"'),Dn(" Using default link template")),x=y.my)),x},mo.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},mo.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},mo.prototype.ip=function(a){a=this.Lc(a),a!==null&&(rd(this.diagram,a,!1),this.unresolveReferencesForPart(a))},mo.prototype.unresolveReferencesForPart=function(){},mo.prototype.removeDataForLink=function(){},mo.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},mo.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof oi?a:null)},mo.prototype.findLinkForKey=function(){return null},it=mo.prototype,it.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},it.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof oi?a:null)},it.Kc=function(a){return a===null?null:this.bf.I(a)},it.ms=function(a){for(var y=0;y<arguments.length;++y);y=new In;for(var x=this.On.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var te=0;te<arguments.length;te++){var ne=arguments[te];if(nn(ne)&&ay(this,E,ne)){y.add(b);break}}}return y.iterator},it.ls=function(a){for(var y=0;y<arguments.length;++y);y=new In;for(var x=this.Dn.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var te=0;te<arguments.length;te++){var ne=arguments[te];if(nn(ne)&&ay(this,E,ne)){y.add(b);break}}}return y.iterator};function ay(a,y,x){for(var b in x){var E=y[b],te=x[b];if(sn(te)){if(!sn(E)||E.length<te.length)return!1;for(var ne=0;ne<E.length;ne++){var ae=te[ne];if(ae!==void 0&&!fS(a,E[ne],ae))return!1}}else if(!fS(a,E,te))return!1}return!0}function fS(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(nn(y)&&nn(x)){if(!ay(a,y,x))return!1}else if(y!==x)return!1;return!0}mo.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 b=a.modelChange;if(b!=="")if(x===Vo){if(b==="nodeCategory"){var E=this.Lc(a.object),te=a.newValue;E!==null&&typeof te=="string"&&(E.category=te)}else b==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===vs){var ne=a.newValue;b==="nodeDataArray"&&nn(ne)&&hS(this,ne),y.isModified=!0}else if(x===ds){var ae=a.oldValue;b==="nodeDataArray"&&nn(ae)&&this.ip(ae),y.isModified=!0}else x===Ka&&(b==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):b==="ModelDisplaced"&&this.Wd());else if(x===Vo){var fe=a.propertyName,_e=a.object;_e===y.model?(fe==="nodeKeyProperty"||fe==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(_e,fe),y.isModified=!0}else if(x===vs||x===ds){var Te=a.change===vs,je=Te?a.newParam:a.oldParam,Ve=Te?a.newValue:a.oldValue,Qe=this.aj.I(a.object);if(Array.isArray(Qe))for(a=0;a<Qe.length;a++){var rt=Qe[a];if(Te)Tm(rt,Ve,je,!0);else if(!(0>je)){var ct=je+fg(rt);rt.pc(ct,!0),wv(rt,ct,je)}}y.isModified=!0}}finally{y.aa=!0}}}}},mo.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)},mo.prototype.rp=function(){for(var a=this.H.model,y=new In,x=a.nodeDataArray,b=0;b<x.length;b++)y.add(x[b]);var E=[];for(this.nodes.each(function(ne){ne.data===null||y.contains(ne.data)||E.push(ne.data)}),this.parts.each(function(ne){ne.data===null||y.contains(ne.data)||E.push(ne.data)}),E.forEach(function(ne){_S(a,ne,!1)}),b=0;b<x.length;b++){var te=x[b];this.Lc(te)===null&&PS(a,te,!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()},mo.prototype.refreshDataBoundLinks=function(){},mo.prototype.updateRelationshipsFromData=function(){},mo.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 b=this.aj.iterator;b.next();){for(var E=b.value,te=0;te<E.length;te++){var ne=E[te].sx(a);ne!==null&&(x===null&&(x=Hn()),x.push(ne))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);ei(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ly(a,y){var x=y.Hh;if(sn(x)){var b=a.aj.I(x);if(b===null)b=[],b.push(y),a.aj.add(x,b);else{for(a=0;a<b.length;a++)if(b[a]===y)return;b.push(y)}}}function uy(a,y,x){qd(y,function(ne){ne=ne.O.s;for(var ae=ne.length,fe=0;fe<ae;fe++)Jp(x,ne[fe])});var b=y.Hh;if(sn(b)){var E=a.aj.I(b);if(E!==null){for(var te=0;te<E.length;te++)if(E[te]===y){E.splice(te,1),E.length===0&&a.aj.remove(b);break}}}}mo.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new ci;if(sn(a))for(var E=0;E<a.length;E++)h0(this,a[E],y,b,x);else for(a=a.iterator;a.next();)h0(this,a.value,y,b,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,E=new In;for(var te=new ci,ne=b.iterator;ne.next();){var ae=ne.value;if(ae instanceof $n)a||ae.fromNode!==null&&ae.toNode!==null||E.add(ae);else if(ae instanceof oi&&ae.data!==null&&x.Tl()){var fe=ae;ae=ne.key;var _e=ae.pg();_e!==null&&(_e=b.I(_e),_e!==null?(x.qe(fe.data,x.wa(_e.data)),fe=y.Kc(fe.data),ae=ae.kh(),ae!==null&&fe!==null&&te.add(ae,fe)):x.qe(fe.data,void 0))}}if(0<E.count&&y.Is(E,!1),0<te.count)for(x=te.iterator;x.next();)b.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var Te=new ci;b.each(function(je){je.key.data!==null&&Te.add(je.key.data,je.value.data)}),x(Te,y,this.H.model)}for(y=b.iterator;y.next();)y.value.La();return b};function h0(a,y,x,b,E){if(y===null||E&&!y.canCopy())return null;if(b.contains(y))return b.I(y);var te=a.copyPartData(y,x);if(!(te instanceof Ti))return null;if(te.isSelected=!1,te.isHighlighted=!1,b.add(y,te),y instanceof oi){for(var ne=y.linksConnected;ne.next();){var ae=ne.value;if(ae.fromNode===y){var fe=b.I(ae);fe!==null&&(fe.fromNode=te)}ae.toNode===y&&(ae=b.I(ae),ae!==null&&(ae.toNode=te))}if(y instanceof tr&&te instanceof tr)for(y=y.memberParts;y.next();)ne=h0(a,y.value,x,b,E),ne instanceof $n||ne===null||(ne.containingGroup=te)}else if(y instanceof $n&&te instanceof $n)for(ne=y.fromNode,ne!==null&&(ne=b.I(ne),ne!==null&&(te.fromNode=ne)),ne=y.toNode,ne!==null&&(ne=b.I(ne),ne!==null&&(te.toNode=ne)),y=y.labelNodes;y.next();)ne=h0(a,y.value,x,b,E),ne!==null&&ne instanceof oi&&(ne.labeledLink=te);return te}mo.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof $n||(b=E.copyNodeData(b),nn(b)&&(E.xf(b),x=y.Lc(b)))}else Ru(a),x=a.copy(),x!==null&&(E=this.H,y!==null?y.add(x):b!==null&&E!==null&&E.commandHandler!==null&&E.commandHandler.copiesClipboardData&&(y=E.model,E=null,x instanceof $n||(E=y.copyNodeData(b)),nn(E)&&(x.data=E)));return x},Ye.Object.defineProperties(mo.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}}}),mo.prototype.updateAllRelationshipsFromData=mo.prototype.rp,mo.prototype.findLinksByExample=mo.prototype.ls,mo.prototype.findNodesByExample=mo.prototype.ms,mo.prototype.findLinkForData=mo.prototype.Kc,mo.prototype.findNodeForData=mo.prototype.ii,mo.prototype.findPartForData=mo.prototype.Lc,mo.prototype.findNodeForKey=mo.prototype.Vb,mo.prototype.removeModeledPart=mo.prototype.ip,mo.prototype.removeModeledParts=mo.prototype.Gs,mo.prototype.rebuildParts=mo.prototype.Wd;var pS=!1,gS=!1,mS=!1;mo.className="PartManager";function fa(a){mo.apply(this,arguments)}qe(fa,mo),fa.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},fa.prototype.addModeledParts=function(a){for(mo.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)xp(a.value);qf(this.diagram,!1)};function vS(a,y){y.forEach(function(x){yS(a,x)}),qf(a.diagram,!1)}function yS(a,y){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.bf.contains(y)){var x=a.getLinkCategoryForData(y),b=a.findLinkTemplateForCategory(x);if(b!==null){Ru(b);var E=b.copy();if(E!==null){b=a.diagram.skipsModelSourceBindings,a.diagram.skipsModelSourceBindings=!0,E.Tf=x,E.ub=y,x=a.diagram.model;var te=g0(x,y,!0);te!==""&&(E.fromPortId=te),te=su(x,y,!0),te!==void 0&&(te=a.Vb(te),te instanceof oi&&(E.fromNode=te)),te=g0(x,y,!1),te!==""&&(E.toPortId=te),te=su(x,y,!1),te!==void 0&&(te=a.Vb(te),te instanceof oi&&(E.toNode=te)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(ne){ne=a.Vb(ne),ne!==null&&(ne.labeledLink=E)}),a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=b}}}}fa.prototype.removeAllModeledParts=function(){var a=this.diagram.model;SS(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function SS(a,y){y.forEach(function(x){a.ip(x)})}fa.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},fa.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},fa.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},fa.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},fa.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},fa.prototype.findPartForKey=function(a){var y=mo.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},fa.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},fa.prototype.doModelChanged=function(a){var y=this;if(mo.prototype.doModelChanged.call(this,a),this.diagram){var x=this.diagram;if(a.model===x.model){var b=a.change;if(x.aa){x.aa=!1;try{var E=a.modelChange;if(E!==""){if(b===Vo){if(E==="linkFromKey"){var te=this.Kc(a.object);if(te!==null){var ne=this.Vb(a.newValue);te.fromNode=ne}}else if(E==="linkToKey"){var ae=this.Kc(a.object);if(ae!==null){var fe=this.Vb(a.newValue);ae.toNode=fe}}else if(E==="linkFromPortId"){var _e=this.Kc(a.object);if(_e!==null){var Te=a.newValue;typeof Te=="string"&&(_e.fromPortId=Te)}}else if(E==="linkToPortId"){var je=this.Kc(a.object);if(je!==null){var Ve=a.newValue;typeof Ve=="string"&&(je.toPortId=Ve)}}else if(E==="nodeGroupKey"){var Qe=this.Lc(a.object);if(Qe!==null){var rt=a.newValue;if(rt!==void 0){var ct=this.Vb(rt);ct instanceof tr?Qe.containingGroup=ct:Qe.containingGroup=null}else Qe.containingGroup=null}}else if(E==="linkLabelKeys"){var Dt=this.Kc(a.object);if(Dt!==null){var Lt=a.oldValue,Gt=a.newValue;Array.isArray(Lt)&&Lt.forEach(function(Rn){0<=Gt.indexOf(Rn)||(Rn=y.Vb(Rn),Rn!==null&&(Rn.labeledLink=null))}),Array.isArray(Gt)&&Gt.forEach(function(Rn){Rn=y.Vb(Rn),Rn!==null&&(Rn.labeledLink=Dt)})}}else if(E==="linkCategory"){var Zt=this.Kc(a.object),Vt=a.newValue;Zt!==null&&typeof Vt=="string"&&(Zt.category=Vt)}else E==="linkDataArray"&&(SS(this,a.oldValue),vS(this,a.newValue));x.isModified=!0}else if(b===vs){var Qt=a.newValue;if(E==="linkDataArray"&&typeof Qt=="object"&&Qt!==null)yS(this,Qt);else if(E==="linkLabelKeys"&&gd(Qt)){var yn=this.Kc(a.object),ri=this.Vb(Qt);yn!==null&&ri!==null&&(ri.labeledLink=yn)}x.isModified=!0}else if(b===ds){var fi=a.oldValue;if(E==="linkDataArray"&&typeof fi=="object"&&fi!==null)this.ip(fi);else if(E==="linkLabelKeys"&&gd(fi)){var li=this.Vb(fi);li!==null&&(li.labeledLink=null)}x.isModified=!0}}else if(b===Vo){var Vn=a.propertyName;a.object!==x.model||Vn!=="linkFromKeyProperty"&&Vn!=="linkToKeyProperty"&&Vn!=="linkFromPortIdProperty"&&Vn!=="linkToPortIdProperty"&&Vn!=="linkLabelKeysProperty"&&Vn!=="nodeIsGroupProperty"&&Vn!=="nodeGroupKeyProperty"&&Vn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},fa.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new In,b=y.linkDataArray;b.forEach(function(te){x.add(te)});var E=[];this.links.each(function(te){te.data===null||x.contains(te.data)||E.push(te.data)}),E.forEach(function(te){AS(y,te,!1)}),b.forEach(function(te){a.Kc(te)===null&&kS(y,te,!1)})},fa.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;if(a instanceof $n){var E=su(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=su(b,y,!1),E=x.Vb(E),a.toNode=E,y=b.Ef(y),0<y.length||0<a.labelNodes.count){if(y.length===1&&a.labelNodes.count===1){E=y[0];var te=a.labelNodes.first();if(b.wa(te.data)===E)return}E=new In().addAll(y);var ne=new In;a.labelNodes.each(function(ae){ae.data!==null&&(ae=b.wa(ae.data),ae!==void 0&&ne.add(ae))}),y=ne.copy(),y.hp(E),E=E.copy(),E.hp(ne),(0<y.count||0<E.count)&&(y.each(function(ae){ae=x.Vb(ae),ae!==null&&ae.labeledLink===a&&(ae.labeledLink=null)}),E.each(function(ae){ae=x.Vb(ae),ae!==null&&ae.labeledLink!==a&&(ae.labeledLink=a)}))}}else!(a instanceof qr)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof tr)&&(a.containingGroup=y)}}},fa.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=Og(y,x),E=this.Lc(a);if(b!==null&&E!==null){b=b.iterator;for(var te={};b.next();){var ne=b.value;y.lb(ne)?E instanceof tr&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=E)):(te.link=this.Kc(ne),te.link!==null&&E instanceof oi&&(su(y,ne,!0)===x&&(te.link.fromNode=E),su(y,ne,!1)===x&&(te.link.toNode=E),ne=y.Ef(ne),Array.isArray(ne)&&ne.some(function(ae){return function(fe){return fe===x?(E.labeledLink=ae.link,!0):!1}}(te)))),te={link:te.link}}hc(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof tr&&(E.containingGroup=a))}},fa.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof oi){var x=y.wa(a.data);if(x!==void 0){for(var b=a.linksConnected;b.next();)cc(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&cc(y,x,b.data)),a instanceof tr)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&cc(y,x,b)}}},fa.prototype.copyPartData=function(a,y){var x=mo.prototype.copyPartData.call(this,a,y);if(a instanceof $n)if(a=a.data,a!==null&&y!==null){var b=y.model;a=b.Jo(a),typeof a=="object"&&a!==null&&(b.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},fa.prototype.insertLink=function(a,y,x,b){var E=this.diagram,te=E.model,ne=E.toolManager.findTool("Linking"),ae="";if(a!==null&&(y===null&&(y=a),ae=y.portId,ae===null&&(ae="")),y="",x!==null&&(b===null&&(b=x),y=b.portId,y===null&&(y="")),b=ne.archetypeLinkData,b instanceof $n){if(Ru(b),te=b.copy(),te!==null)return te.fromNode=a,te.fromPortId=ae,te.toNode=x,te.toPortId=y,E.add(te),a=ne.archetypeLabelNodeData,a instanceof oi&&(Ru(a),a=a.copy(),a!==null&&(a.labeledLink=te,E.add(a))),te}else if(b!==null&&(b=te.Jo(b),typeof b=="object"&&b!==null))return a!==null&&Ep(te,b,te.wa(a.data),!0),Lp(te,b,ae,!0),x!==null&&Ep(te,b,te.wa(x.data),!1),Lp(te,b,y,!1),te.fi(b),a=ne.archetypeLabelNodeData,a===null||a instanceof oi||(a=te.copyNodeData(a),typeof a=="object"&&a!==null&&(te.xf(a),a=te.wa(a),a!==void 0&&te.Bu(b,a))),E.Kc(b);return null},fa.prototype.findLinkForKey=fa.prototype.findLinkForKey,fa.prototype.findPartForKey=fa.prototype.findPartForKey,fa.prototype.removeAllModeledParts=fa.prototype.removeAllModeledParts,fa.prototype.addModeledParts=fa.prototype.addModeledParts,fa.prototype.addAllModeledParts=fa.prototype.addAllModeledParts,fa.className="GraphLinksPartManager";function xu(){mo.apply(this,arguments),this.Sg=null}qe(xu,mo);function d0(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var b=a.diagram.toolManager.findTool("Linking"),E=y,te=x;if(a.diagram.isTreePathToChildren||(E=x,te=y),(b===null||!fn(b,E,te,null,!0))&&(y=a.getLinkCategoryForData(x.data),b=a.findLinkTemplateForCategory(y),b!==null&&(Ru(b),b=b.copy(),b!==null))){var ne=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=y,b.ub=x.data,b.fromNode=E,b.toNode=te,a.diagram.add(b),b.ub=null,b.data=x.data,a.diagram.skipsModelSourceBindings=ne}}}xu.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},xu.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},xu.prototype.setFromNodeForLink=function(a,y,x){var b=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren)b.qe(a.data,b.wa(y));else{var E=this.Sg;this.Sg=a,x!==null&&b.qe(x.data,void 0),b.qe(y,b.wa(a.toNode!==null?a.toNode.data:null)),this.Sg=E}},xu.prototype.setToNodeForLink=function(a,y,x){var b=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren){var E=this.Sg;this.Sg=a,x!==null&&b.qe(x.data,void 0),b.qe(y,b.wa(a.fromNode!==null?a.fromNode.data:null)),this.Sg=E}else b.qe(a.data,b.wa(y))},xu.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},xu.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},xu.prototype.doModelChanged=function(a){if(mo.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 b=a.modelChange;if(b!==""){if(x===Vo){if(b==="nodeParentKey"){var E=a.object,te=this.Vb(a.newValue),ne=this.ii(E);if(this.Sg!==null)te!==null&&(this.Sg.data=E,this.Sg.category=this.getLinkCategoryForData(E));else if(ne!==null){var ae=ne.kh();ae!==null?te===null?y.remove(ae):y.isTreePathToChildren?ae.fromNode=te:ae.toNode=te:d0(this,te,ne)}}else if(b==="parentLinkCategory"){var fe=this.ii(a.object),_e=a.newValue;if(fe!==null&&typeof _e=="string"){var Te=fe.kh();Te!==null&&(Te.category=_e)}}y.isModified=!0}}else if(x===Vo){var je=a.propertyName;a.object===y.model&&je==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},xu.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;a instanceof oi&&(y=b.mh(y),y=x.Vb(y),b=a.pg(),y!==b&&(b=a.kh(),y!==null?b!==null?x.isTreePathToChildren?b.fromNode=y:b.toNode=y:d0(this,y,a):b!==null&&rd(x,b,!1)))}}},xu.prototype.updateDataBindings=function(a,y){mo.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},xu.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=Og(y,x),E=this.Lc(a);if(b!==null&&E!==null){for(b=b.iterator;b.next();){var te=b.value;y.lb(te)&&E instanceof oi&&y.mh(te)===x&&d0(this,E,this.ii(te))}hc(y,x)}a=y.mh(a),a!==void 0&&E instanceof oi&&(a=this.Vb(a),d0(this,a,E))}},xu.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof oi){var x=y.wa(a.data),b=this.Kc(a.data);if(b!==null){b.isSelected=!1,b.isHighlighted=!1;var E=b.layer;if(E!==null){var te=E.pc(-1,b,!1);0<=te&&this.diagram.cb(ds,"parts",E,b,null,te,null),te=b.layerChanged,te!==null&&te(b,E,null)}}for(b=this.diagram.isTreePathToChildren,a=a.linksConnected;a.next();)E=a.value,E=(b?E.toNode:E.fromNode).data,y.lb(E)&&cc(y,x,E)}},xu.prototype.insertLink=function(a,y,x){y=this.diagram.model;var b=a,E=x;return this.diagram.isTreePathToChildren||(b=x,E=a),b!==null&&E!==null?(y.qe(E.data,y.wa(b.data)),E.kh()):null},xu.prototype.findLinkForKey=xu.prototype.findLinkForKey,xu.className="TreePartManager";function xi(a,y){this.kl=new In,this.il=new In,this.Wv=`,
|
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
|
"removedNodeKeys": `,this.vh=null,pr(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new ci,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 ci,this.Lt=new Bn,this.Wg=!1,this.o=null,this.undoManager=new Fo,a!==void 0&&(sn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}xi.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},xi.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},xi.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},xi.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,b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+hi(E)}}return y},xi.prototype.xA=function(a){a.change!==Ka&&Nt("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Bs?(wS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},xi.prototype.Qv=function(a,y){var x=this,b=!1,E=new In,te=new In,ne=new In,ae=this.vh;a.changes.each(function(je){je.model===x&&(je.modelChange==="nodeDataArray"?je.change===vs?E.add(je.newValue):je.change===ds&&ne.add(je.oldValue):x.lb(je.object)?te.add(je.object):je.change!==Vo||x.modelData!==je.object&&je.propertyName!=="modelData"?je.object!==null&&(ae&&ae.contains(je.object)?ae.get(je.object).each(function(Ve){x.lb(Ve)&&te.add(Ve)}):je.object instanceof xi||x.ri()&&x.Jc(je.object)||bS(x,je.object).each(function(Ve){te.add(Ve)})):b=!0)});var fe=this.il;fe.clear(),E.each(function(je){fe.add(x.wa(je)),y||te.add(je)});var _e=this.kl;_e.clear(),ne.each(function(je){_e.add(x.wa(je)),y&&te.add(je)}),a=x.cloneDeep(te.Fa());var Te=null;return b&&(Te===null&&(Te={}),Te.modelData=this.cloneDeep(this.modelData)),0<fe.count&&(Te===null&&(Te={}),y?Te.removedNodeKeys=fe.Fa():Te.insertedNodeKeys=fe.Fa()),0<a.length&&(Te===null&&(Te={}),Te.modifiedNodeData=a),0<_e.count&&(Te===null&&(Te={}),y?Te.insertedNodeKeys=_e.Fa():Te.removedNodeKeys=_e.Fa()),_e.clear(),fe.clear(),Te},xi.prototype.cloneDeep=function(a){return _p(this,a,!0)};function _p(a,y,x,b,E,te){function ne(je,Ve){ae?(je.__gohashid===void 0&&te.push(je),b.set(je,Ve)):(je=bo++,b.set(je,Ve),E.set(je,y))}if(!nn(y))return y;te||(te=[]);var ae=Object.isExtensible(y);if(b||(b=new ci),ae){var fe=b.get(y);if(fe)return fe}else for(E||(E=new ci),fe=E.iterator;fe.next();){var _e=fe.key;if(fe.value===y&&(_e=b.get(_e)))return _e}if(Array.isArray(y)){fe=[],ne(y,fe);for(var Te=0;Te<y.length;Te++)fe.push(_p(a,y[Te],!1,b,E,te))}else if(y instanceof Mt||y instanceof Qn||y instanceof kn||y instanceof Mi||y instanceof yi)fe=y.copy(),ne(y,fe);else{if(y instanceof fo||y instanceof Yn||y instanceof Ln)return y;if(y instanceof Bn)fe=new Bn().addAll(_p(a,y.Fa(),!1,b,E,te)),ne(y,fe);else if(y instanceof In)fe=new In().addAll(_p(a,y.Fa(),!1,b,E,te)),ne(y,fe);else if(y instanceof ci)fe=new ci().addAll(_p(a,y.Fa(),!1,b,E,te)),ne(y,fe);else if(y instanceof Date)fe=new Date(y.getTime()),ne(y,fe);else if(y instanceof RegExp)fe=new RegExp(y),ne(y,fe),fe.lastIndex=y.lastIndex;else if(typeof y.copy=="function")fe=y.copy(),ne(y,fe);else for(Te in fe={},ne(y,fe),y)Te!=="__gohashid"&&(fe[Te]=_p(a,y[Te],!1,b,E,te))}return x&&te.forEach(function(je){delete je.__gohashid}),fe}it=xi.prototype,it.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},it.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},it.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 xS(a,y){y=y.modelData,nn(y)&&(a.dm(y),a.modelData=y)}it.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!CS(x,a[x])){y=!0;break}return a="",y&&(a=`,
|
|
|
"modelData": `+cy(this,this.modelData)),a+`,
|
|
|
"nodeDataArray": `+pd(this,this.nodeDataArray,!0)},it.kv=function(a){xS(this,a),a=a.nodeDataArray,sn(a)&&(this.dm(a),this.nodeDataArray=a)};function wS(a,y){function x(E,te){if((te=te.part)&&(te=te.data,E!==te)){var ne=b.get(E);ne===null?(ne=new In,ne.add(te),b.add(E,ne)):ne.add(te)}}var b=a.vh;b===null&&(b=new ci,y.changes.each(function(E){if(E.diagram!==null){var te=E.change;te===Vo?(E=E.object.panel)&&(te=E.data)&&x(te,E):(te===vs||te===ds)&&(E=E.object,(te=E.itemArray)&&x(te,E))}}),a.vh=b)}function bS(a,y){for(var x=new In,b=0;b<a.nodeDataArray.length;b++){var E=a.nodeDataArray[b];f0(a,y,E,E,x)}return x}function f0(a,y,x,b,E){if(Array.isArray(x))for(var te=0;te<x.length;te++){var ne=x[te];if(ne===y)return E.add(b),!0;if(f0(a,y,ne,b,E))return!0}else if(nn(x)&&Object.getPrototypeOf(x)===Object.prototype)for(te in x){if(ne=x[te],ne===y)return E.add(b),!0;if(f0(a,y,ne,b,E))return!0}return!1}it.Pv=function(a,y){var x=this,b=!1,E=new In,te=new In,ne=new In,ae=this.vh;a.changes.each(function(Te){Te.model===x&&(Te.modelChange==="nodeDataArray"?Te.change===vs?E.add(Te.newValue):Te.change===ds&&ne.add(Te.oldValue):x.lb(Te.object)?te.add(Te.object):Te.change!==Vo||x.modelData!==Te.object&&Te.propertyName!=="modelData"?Te.object!==null&&(ae&&ae.contains(Te.object)?ae.get(Te.object).each(function(je){x.lb(je)&&te.add(je)}):Te.object instanceof xi||x.ri()&&x.Jc(Te.object)||bS(x,Te.object).each(function(je){te.add(je)})):b=!0)});var fe=this.il;fe.clear(),E.each(function(Te){fe.add(x.wa(Te)),y||te.add(Te)});var _e=this.kl;return _e.clear(),ne.each(function(Te){_e.add(x.wa(Te)),y&&te.add(Te)}),a="",b&&(a+=`,
|
|
|
"modelData": `+cy(this,this.modelData)),0<fe.count&&(a+=(y?this.Yv:this.Wv)+pd(this,fe.Fa(),!0)),0<te.count&&(a+=this.jy+pd(this,te.Fa(),!0)),0<_e.count&&(a+=(y?this.Wv:this.Yv)+pd(this,_e.Fa(),!0)),_e.clear(),fe.clear(),a},it.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)&&Nt("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new ci;if(Array.isArray(x))for(var E=0;E<x.length;E++){var te=x[E],ne=this.wa(te);ne!=null&&b.set(ne,te)}if(Array.isArray(y))for(E=y.length,te=0;te<E;te++){ne=y[te];var ae=this.hc(ne);ae===null&&(ae=(ae=b.get(ne))?ae:this.copyNodeData({}),this.km(ae,ne),this.xf(ae))}if(Array.isArray(x)){for(y=x.length,b=0;b<y;b++)if(E=x[b],te=this.wa(E),te=this.hc(te),te!==null){for(var fe in E)fe==="__gohashid"||fe===this.nodeKeyProperty||this.Wj()&&fe===this.nodeIsGroupProperty||this.setDataProperty(te,fe,E[fe]);this.lm(E,te)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,fe=0;fe<x;fe++)y=this.hc(a[fe]),y!==null&&this.cm(y)},it.$x=function(a,y){a.change!==Ka&&Nt("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Bs?(y===void 0&&(y=Ig(this,this)),wS(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 }'},it.yA=function(a,y){return this.$x(a,y)},it.np=function(a){return a===void 0&&(a=Ig(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},it.toJSON=function(a){return this.np(a)},it.Zw=function(a){var y=null;if(typeof a=="string")try{y=_t.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:Nt("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Nt("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},it.Ky=function(a){return this.Zw(a)},xi.constructGraphLinksModel=function(){return new xi},it=xi.prototype,it.dm=function(a){if(sn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(nn(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:Nt("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(nn(a)){for(y in a)if(x=a[y],nn(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(E=x.length%2===0,b=0;b<x.length;b++)if(typeof x[b]!="number"){E=!1;break}if(E){for(E=new Bn,b=0;b<x.length/2;b++)E.add(new Mt(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return Nx(a)}return a},it.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()):sn(a)?pd(this,a):nn(a)?cy(this,a):typeof a=="function"?"null":a.toString()};function pd(a,y,x){x===void 0&&(x=!1);var b=y.length;if(0>=b)return"[]";var E=new ui;E.add("["),x&&1<b&&E.add(`
|
|
|
`);for(var te=0;te<b;te++){var ne=y[te];ne!==void 0&&(0<te&&(E.add(","),x&&E.add(`
|
|
|
`)),E.add(a.sm(ne)))}return x&&1<b&&E.add(`
|
|
|
`),E.add("]"),E.toString()}function CS(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function sl(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function cy(a,y){var x=y;if(x instanceof Mt)y={class:"go.Point",x:sl(x.x),y:sl(x.y)};else if(x instanceof Qn)y={class:"go.Size",width:sl(x.width),height:sl(x.height)};else if(x instanceof kn)y={class:"go.Rect",x:sl(x.x),y:sl(x.y),width:sl(x.width),height:sl(x.height)};else if(x instanceof Mi)y={class:"go.Margin",top:sl(x.top),right:sl(x.right),bottom:sl(x.bottom),left:sl(x.left)};else if(x instanceof yi)x.sb()?y={class:"go.Spot",x:sl(x.x),y:sl(x.y),offsetX:sl(x.offsetX),offsetY:sl(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof fo){if(y={class:"go.Brush",type:x.type.name},x.type===Nh?y.color=x.color:(x.type===ch||x.type===yu)&&(y.start=x.start,y.end=x.end,x.type===yu&&(x.startRadius!==0&&(y.startRadius=sl(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=sl(x.endRadius)))),x.colorStops!==null){var b={};for(x=x.colorStops.iterator;x.next();)b[x.key]=x.value;y.colorStops=b}}else x instanceof Yn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=sl(x.startX)),x.startY!==0&&(y.startY=sl(x.startY)),x.endX!==0&&(y.endX=sl(x.endX)),x.endY!==0&&(y.endY=sl(x.endY)),x.spot1.D(Xs)||(y.spot1=x.spot1),x.spot2.D(Na)||(y.spot2=x.spot2),x.type===Yn.o&&(y.path=Yn.ia(x))):x instanceof Ln&&(y={class:"go.EnumValue",classType:Ig(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var te=Os(y,E);if(!CS(E,te))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&te instanceof Bn){var ne="[";for(te=te.iterator;te.next();){var ae=te.value;1<ne.length&&(ne+=","),ne+=a.sm(ae.x),ne+=",",ne+=a.sm(ae.y)}ne+="]",b+=ne}else b+=a.sm(te)}return b+"}"}function al(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function Nx(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 Mt(al(a.x),al(a.y));else if(y==="Size")x=new Qn(al(a.width),al(a.height));else if(y==="Rect")x=new kn(al(a.x),al(a.y),al(a.width),al(a.height));else if(y==="Margin")x=new Mi(al(a.top),al(a.right),al(a.bottom),al(a.left));else if(y==="Spot")typeof a.enum=="string"?x=xh(a.enum):x=new yi(al(a.x),al(a.y),al(a.offsetX),al(a.offsetY));else if(y==="Brush"){if(x=new fo,x.type=Jn(fo,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof yi&&(x.start=a.start),a.end instanceof yi&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=al(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=al(a.endRadius)),a=a.colorStops,nn(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=Yn.parse(a.path):x=new Yn,x.type=Jn(Yn,a.type),typeof a.startX=="number"&&(x.startX=al(a.startX)),typeof a.startY=="number"&&(x.startY=al(a.startY)),typeof a.endX=="number"&&(x.endX=al(a.endX)),typeof a.endY=="number"&&(x.endY=al(a.endY)),a.spot1 instanceof yi&&(x.spot1=a.spot1),a.spot2 instanceof yi&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=dy(b),typeof b=="function"&&(x=Jn(b,a.name)));return x}it.Pe=function(a){return this.Lt.add(a),this},it.ik=function(a){this.Lt.remove(a)},it.ds=function(a){this.skipsUndoManager||this.undoManager.Tu(a);for(var y=this.Lt,x=y.length,b=0;b<x;b++)y.M(b)(a)},it.cb=function(a,y,x,b,E,te,ne){na(this,"",a,y,x,b,E,te,ne)},it.g=function(a,y,x,b,E){na(this,"",Vo,a,this,y,x,b,E)},it.Fs=function(a,y,x,b,E,te){na(this,"",Vo,y,a,x,b,E,te)};function na(a,y,x,b,E,te,ne,ae,fe){ae===void 0&&(ae=null),fe===void 0&&(fe=null);var _e=new Go;_e.model=a,_e.change=x,_e.modelChange=y,_e.propertyName=b,_e.object=E,_e.oldValue=te,_e.oldParam=ae,_e.newValue=ne,_e.newParam=fe,a.ds(_e)}xi.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===Vo){var x=a.object,b=a.propertyName,E=a.I(y);b===this.nodeKeyProperty&&this.lb(x)&&(y=a.I(!y),y!==void 0&&this.kb.remove(y),E!==void 0&&this.kb.add(E,x)),$o(x,b,E)}else a.change===vs?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,nn(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&qn(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&On(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!sn(b)&&a.propertyName&&(b=Os(a.object,a.propertyName)),sn(b)&&typeof x=="number"&&(a=a.newValue,y?qn(b,x):On(b,x,a))):Nt("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===ds?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,nn(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&On(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&qn(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!sn(b)&&a.propertyName&&(b=Os(a.object,a.propertyName)),sn(b)&&typeof x=="number"&&(a=a.oldValue,y?On(b,x,a):qn(b,x))):Nt("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Ka&&Nt("unknown ChangedEvent: "+a.toString())},xi.prototype.Ea=function(a){return this.undoManager.Ea(a)},xi.prototype.eb=function(a){return this.undoManager.eb(a)},xi.prototype.Kf=function(){return this.undoManager.Kf()},xi.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var b=!1;try{a(this),b=!0}finally{b?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},it=xi.prototype,it.La=function(a,y){y===void 0&&(y=""),na(this,"SourceChanged",Ka,y,a,null,null)},it.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Os(a,y),y!==void 0)){if(gd(y))return y;Nt("Key value for node data "+a+" is not a number or a string: "+y)}}},it.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=Os(a,x);b!==y&&this.hc(y)===null&&($o(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),na(this,"nodeKey",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else $o(a,x,y)}};function gd(a){return typeof a=="number"||typeof a=="string"}it.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},it.hc=function(a){return a===null&&Nt("Model.findNodeDataForKey:key must not be null"),a!==void 0&&gd(a)?this.kb.I(a):null},it.$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 b=this.bl;if(b!==null&&(x=b(this,a),x!=null&&!this.kb.contains(x))){$o(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;$o(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;$o(a,y,x)}}}}},it.xf=function(a){a!==null&&(yo(a),this.lb(a)||PS(this,a,!0))};function PS(a,y,x){var b=a.wa(y);(b===void 0||a.kb.I(b)!==y)&&(a.$u(y),b=a.wa(y),b===void 0&&Nt("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,On(a.Tc,b,y)),na(a,"nodeDataArray",vs,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}it.Fy=function(a){if(sn(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)},it.cm=function(a){a!==null&&_S(this,a,!0)};function _S(a,y,x){var b=a.wa(y);if(b!==void 0&&a.kb.remove(b),b=null,x){e:if(x=a.Tc,Array.isArray(x))b=x.indexOf(y);else{b=x.length;for(var E=0;E<b;E++)if(x[E]===y){b=E;break e}b=-1}if(0>b)return;qn(a.Tc,b)}na(a,"nodeDataArray",ds,"nodeDataArray",a,y,null,b,null),a.qp(y)}it.nA=function(a){if(sn(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)},it.$z=function(a){if(a!==this.nodeDataArray&&sn(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var b=a.length,E=0;E<b;E++){var te=a[E],ne=this.wa(te);if(ne!==void 0){x.add(ne);var ae=this.hc(ne);ae!==te&&(ae!==null?(this.Do(ae,te),this.lm(te,ae)):(te=this.cloneDeep(te),this.km(te,ne),this.xf(te)))}else ne=this.cloneDeep(te),this.xf(ne),x.add(this.wa(ne))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.hc(b))&&this.cm(b);y.clear(),x.clear()}},it.jp=function(a,y){y!==void 0&&(a=Og(this,a),a instanceof In&&this.Vf.add(y,a))},it.Lv=function(){},it.fm=function(){},it.em=function(){},it.qp=function(){};function cc(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new In,a.Vf.add(y,b)),b.add(x)}}function hc(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b instanceof In&&(x==null?a.Vf.remove(y):(b.remove(x),b.count===0&&a.Vf.remove(y)))}}function Og(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof In?a:null)}it.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},xi.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):p0(this,a,!0),nn(a)&&pr(a),a};function p0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var b=[];for(x=0;x<y.length;x++){var E=p0(a,y[x],a.copiesArrayObjects);b.push(E)}return pr(b),b}if(x&&nn(y)){x=(x=y.constructor)?new x:{},E=a.copiesKey||typeof a.nodeKeyProperty!="string"?null:a.nodeKeyProperty;for(b in y)if(b==="__gohashid")x.__gohashid=void 0;else if(b===E)x[E]=void 0;else{var te=Os(y,b),ne=Ig(a,te);ne==="GraphObject"||ne==="Diagram"||ne==="Layer"||ne==="RowColumnDefinition"||ne==="AnimationManager"||ne==="Tool"||ne==="CommandHandler"||ne==="Layout"||ne==="InputEvent"||ne==="DiagramEvent"||te instanceof xi||te instanceof Fo||te instanceof Bs||te instanceof Go||(te=p0(a,te,!1)),$o(x,b,te)}return pr(x),x}return y instanceof Mt||y instanceof Qn||y instanceof kn||y instanceof yi||y instanceof Mi?y.copy():y}xi.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!ES&&a instanceof tn&&(ES=!0,Dn('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Dn(" Is that really your intent?"));var b=Os(a,y);b!==x&&($o(a,y,x),this.Fs(a,y,b,x))},it=xi.prototype,it.set=function(a,y,x){this.setDataProperty(a,y,x)},it.Do=function(a,y){if(y){var x=this.lb(a),b;for(b in y)b==="__gohashid"||x&&b===this.nodeKeyProperty||this.setDataProperty(a,b,y[b])}},it.Ay=function(a,y){this.ts(a,-1,y)},it.ts=function(a,y,x){0>y&&(y=a.length),On(a,y,x),na(this,"",vs,"",a,null,x,null,y)},it.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Nt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];qn(a,y),na(this,"",ds,"",a,x,null,y,null)},it.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Os(a,y),y===void 0))return"";if(typeof y=="string")return y;Nt("getCategoryForNodeData found a non-string category for "+a+": "+y)},it.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=Os(a,x);b===void 0&&(b=""),b!==y&&($o(a,x,y),na(this,"nodeCategory",Vo,x,a,b,y))}else $o(a,x,y)}},it.lm=function(a,y){this.jm(y,this.Ro(a))},it.Tl=function(){return!1},it.Wj=function(){return!1},it.ri=function(){return!1},it.xs=function(){return!1},it.Xj=function(){return!1};function hy(){return new xi}function Ig(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 Ig(a,y.constructor);return typeof y}function dy(a){return Xu[a]?Xu[a]:_t.go!==void 0&&_t.go[a]?_t.go[a]:null}function Os(a,y){if(!a||!y)return null;try{if(typeof y=="function")var x=y(a);else typeof a.getAttribute=="function"?(x=a.getAttribute(y),x===null&&(x=void 0)):x=a[y]}catch(b){}return x}function $o(a,y,x){if(a&&y)try{typeof y=="function"?y(a,x):typeof a.setAttribute=="function"?a.setAttribute(y,x):a[y]=x}catch(b){}}Ye.Object.defineProperties(xi.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===""&&Nt("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Nt("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,b=0;b<x;b++){var E=a[b];nn(E)||Nt("Model.nodeDataArray must only contain Objects, not: "+E),yo(E)}for(this.Tc=a,b=new Bn,E=0;E<x;E++){var te=a[E],ne=this.wa(te);ne===void 0||this.kb.I(ne)!==null?b.add(te):this.kb.add(ne,te)}for(b=b.iterator;b.next();)E=b.value,this.$u(E),te=this.wa(E),te!==void 0&&this.kb.add(te,E);for(na(this,"nodeDataArray",Vo,"nodeDataArray",this,y,a),y=0;y<x;y++)b=a[y],this.fm(b),this.em(b);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"}}}),xi.prototype.setCategoryForNodeData=xi.prototype.jm,xi.prototype.getCategoryForNodeData=xi.prototype.Ro,xi.prototype.removeArrayItem=xi.prototype.ov,xi.prototype.insertArrayItem=xi.prototype.ts,xi.prototype.addArrayItem=xi.prototype.Ay,xi.prototype.assignAllDataProperties=xi.prototype.Do,xi.prototype.set=xi.prototype.set,xi.prototype.clearUnresolvedReferences=xi.prototype.Qy,xi.prototype.mergeNodeDataArray=xi.prototype.$z,xi.prototype.removeNodeDataCollection=xi.prototype.nA,xi.prototype.removeNodeData=xi.prototype.cm,xi.prototype.addNodeDataCollection=xi.prototype.Fy,xi.prototype.addNodeData=xi.prototype.xf,xi.prototype.makeNodeDataKeyUnique=xi.prototype.$u,xi.prototype.findNodeDataForKey=xi.prototype.hc,xi.prototype.containsNodeData=xi.prototype.lb,xi.prototype.setKeyForNodeData=xi.prototype.km,xi.prototype.getKeyForNodeData=xi.prototype.wa,xi.prototype.updateTargetBindings=xi.prototype.La,xi.prototype.commit=xi.prototype.commit,xi.prototype.rollbackTransaction=xi.prototype.Kf,xi.prototype.commitTransaction=xi.prototype.eb,xi.prototype.startTransaction=xi.prototype.Ea,xi.prototype.raiseDataChanged=xi.prototype.Fs,xi.prototype.raiseChanged=xi.prototype.g,xi.prototype.raiseChangedEvent=xi.prototype.cb,xi.prototype.removeChangedListener=xi.prototype.ik,xi.prototype.addChangedListener=xi.prototype.Pe,xi.prototype.writeJsonValue=xi.prototype.sm,xi.prototype.replaceJsonObjects=xi.prototype.dm,xi.prototype.applyIncrementalJSON=xi.prototype.Ky,xi.prototype.applyIncrementalJson=xi.prototype.Zw,xi.prototype.toJSON=xi.prototype.toJSON,xi.prototype.toJson=xi.prototype.np,xi.prototype.toIncrementalJSON=xi.prototype.yA,xi.prototype.toIncrementalJson=xi.prototype.$x,xi.prototype.toIncrementalData=xi.prototype.xA,xi.prototype.clear=xi.prototype.clear;var ES=!1,Xu={};xi.className="Model",xi.fromJSON=xi.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=_t.JSON.parse(a)}catch(te){}else typeof a=="object"?x=a:Nt("Unable to construct a Model from: "+a);if(y===null){a=null;var b=x.class;if(typeof b=="string")try{var E=null;b.indexOf("go.")===0?(b=b.substr(3),E=dy(b)):(E=dy(b),E===null&&(E=_t[b])),typeof E=="function"&&(a=new E)}catch(te){}a===null||a instanceof xi?y=a:Nt("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=xi.constructGraphLinksModel()),y.gp(x),y.kv(x),y},xi.safePropertyValue=Os,xi.safePropertySet=$o,Xu.Brush=fo,Xu.ChangedEvent=Go,Xu.Geometry=Yn,Xu.Margin=Mi,Xu.Panel=Wn,Xu.Point=Mt,Xu.Rect=kn,Xu.Size=Qn,Xu.Spot=yi,Xu.Transaction=Bs,Xu.UndoManager=Fo;function Hs(a,y,x,b){pr(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,b===void 0?(this.el=MS,this.wk=null):(this.el=Dg,this.wk=b),this.st=new In}Hs.prototype.copy=function(){var a=new Hs;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},it=Hs.prototype,it.qb=function(a){a.classType===Hs&&(this.mode=a)},it.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},it.freeze=function(){return this._isFrozen=!0,this},it.ka=function(){return this._isFrozen=!1,this},it.Kx=function(a){return a===void 0&&(a=null),this.mode=Dg,this.backConverter=a,this},it.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},it.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function LS(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}it.Mv=function(a,y,x){var b=this.sl;if(x===void 0||b===""||b===x){x=this.xl;var E=this.Im;if(E===null&&x==="")Dn("Binding error: target property is the empty string: "+this.toString());else{var te=y;if(b!==""&&(te=Os(y,b)),te!==void 0)if(E===null)x!==""&&$o(a,x,te);else try{if(x!==""){var ne=E(te,a);$o(a,x,ne)}else E(te,a)}catch(ae){}}}},it.sp=function(a,y,x,b){if(this.el===Dg){var E=this.xl;if(x===void 0||E===x){x=this.sl;var te=this.wk,ne=a;if(E!==""&&(ne=Os(a,E)),ne!==void 0&&!this.st.contains(a))try{this.st.add(a);var ae=b!==null?b.diagram:null,fe=ae!==null?ae.model:null;if(te===null){if(x!=="")fe!==null?fe.setDataProperty(y,x,ne):$o(y,x,ne);else if(fe!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var _e=b.itemIndex,Te=b.panel.itemArray;fe.ov(Te,_e),fe.ts(Te,_e,ne)}}else try{if(x!==""){var je=te(ne,y,fe);fe!==null?fe.setDataProperty(y,x,je):$o(y,x,je)}else{var Ve=te(ne,y,fe);if(Ve!==void 0&&fe!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var Qe=b.itemIndex,rt=b.panel.itemArray;fe.ov(rt,Qe),fe.ts(rt,Qe,Ve)}}}catch(ct){}}finally{this.st.remove(a)}}}},Ye.Object.defineProperties(Hs.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&un(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&un(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&un(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&un(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&un(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&un(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&un(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&un(this),this.el=a}}}),Hs.prototype.updateSource=Hs.prototype.sp,Hs.prototype.updateTarget=Hs.prototype.Mv,Hs.prototype.ofModel=Hs.prototype.dA,Hs.prototype.ofObject=Hs.prototype.cp,Hs.prototype.makeTwoWay=Hs.prototype.Kx;var Ox="Binding",MS=new Ln(Hs,"OneWay",1),Dg=new Ln(Hs,"TwoWay",2);Hs.className="Binding",Hs.parseEnum=function(a,y){return function(x){return x=Jn(a,x),x===null?y:x}},Hs.toString=hi,Hs.OneWay=MS,Hs.TwoWay=Dg;function zr(a,y,x){xi.call(this),this.Vv=`,
|
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
|
"removedLinkKeys": `,this.md=[],this.$f=new In,this.wb=new ci,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&&(sn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}qe(zr,xi),zr.constructGraphLinksModel=xi.constructGraphLinksModel,zr.prototype.cloneProtected=function(a){xi.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},it=zr.prototype,it.clear=function(){xi.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},it.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,b;for(b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+hi(E)}for(y+=`
|
|
|
link data:`,a=this.linkDataArray,x=a.length,b=0;b<x;b++)E=a[b],y+=" "+su(this,E,!0)+"-->"+su(this,E,!1)}return y},it.Qv=function(a,y){this.linkKeyProperty===""&&Nt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=xi.prototype.Qv.call(this,a,y),b=this,E=new In,te=new In,ne=new In,ae=this.vh;a.changes.each(function(Te){Te.model===b&&(Te.modelChange==="linkDataArray"?Te.change===vs?E.add(Te.newValue):Te.change===ds&&ne.add(Te.oldValue):b.Jc(Te.object)?te.add(Te.object):Te.object!==null&&(Te.object!==null&&ae&&ae.contains(Te.object)?ae.get(Te.object).each(function(je){b.Jc(je)&&te.add(je)}):Te.object instanceof xi||b.lb(Te.object)||TS(b,Te.object).each(function(je){te.add(je)})))});var fe=this.il;fe.clear(),E.each(function(Te){fe.add(b.Ac(Te)),y||te.add(Te)});var _e=this.kl;return _e.clear(),ne.each(function(Te){_e.add(b.Ac(Te)),y&&te.add(Te)}),a=b.cloneDeep(te.Fa()),0<fe.count&&(x===null&&(x={}),y?x.removedLinkKeys=fe.Fa():x.insertedLinkKeys=fe.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<_e.count&&(x===null&&(x={}),y?x.insertedLinkKeys=_e.Fa():x.removedLinkKeys=_e.Fa()),_e.clear(),fe.clear(),x},it.rm=function(){var a=xi.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},it.gp=function(a){xi.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)},it.Rv=function(){var a=xi.prototype.Rv.call(this),y=`,
|
|
|
"linkDataArray": `+pd(this,this.linkDataArray,!0);return a+y},it.kv=function(a){xi.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function TS(a,y){for(var x=new In,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];f0(a,y,E,E,x)}return x}it.Pv=function(a,y){this.linkKeyProperty===""&&Nt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=xi.prototype.Pv.call(this,a,y),b=this,E=new In,te=new In,ne=new In,ae=this.vh;a.changes.each(function(Te){Te.model===b&&(Te.modelChange==="linkDataArray"?Te.change===vs?E.add(Te.newValue):Te.change===ds&&ne.add(Te.oldValue):b.Jc(Te.object)?te.add(Te.object):Te.object!==null&&(Te.object!==null&&ae&&ae.contains(Te.object)?ae.get(Te.object).each(function(je){b.Jc(je)&&te.add(je)}):Te.object instanceof xi||b.lb(Te.object)||TS(b,Te.object).each(function(je){te.add(je)})))});var fe=this.il;fe.clear(),E.each(function(Te){fe.add(b.Ac(Te)),y||te.add(Te)});var _e=this.kl;return _e.clear(),ne.each(function(Te){_e.add(b.Ac(Te)),y&&te.add(Te)}),a=x,0<fe.count&&(a+=(y?this.Xv:this.Vv)+pd(this,fe.Fa(),!0)),0<te.count&&(a+=this.iy+pd(this,te.Fa(),!0)),0<_e.count&&(a+=(y?this.Vv:this.Xv)+pd(this,_e.Fa(),!0)),_e.clear(),fe.clear(),a},it.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)&&Nt("applyIncrementalJson cannot change Model properties"),xi.prototype.fp.call(this,a);var y=a.insertedLinkKeys;if(Array.isArray(y))for(var x=y.length,b=0;b<x;b++){var E=y[b],te=this.jh(E);te===null&&(te=this.Jo({}),this.Ks(te,E),this.fi(te))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,b=0;b<x;b++)if(E=y[b],te=this.Ac(E),te=this.jh(te),te!==null){for(var ne in E)ne!=="__gohashid"&&ne!==this.linkKeyProperty&&this.setDataProperty(te,ne,E[ne]);NS(this,E,te)}}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)},zr.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===Vo){var x=a.object,b=a.propertyName;if(b===this.linkKeyProperty&&this.Jc(x)){var E=a.I(y);y=a.I(!y),y!==void 0&&this.wb.remove(y),E!==void 0&&this.wb.add(E,x),$o(x,b,E);return}}else if(a.change===vs){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,nn(a)&&typeof x=="number"&&(b=this.Ac(a),y?(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),b!==void 0&&this.wb.remove(b)):(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),b!==void 0&&this.wb.add(b,a)));return}if(a.modelChange==="linkLabelKeys"){b=this.Ef(a.object),Array.isArray(b)&&typeof x=="number"&&(y?(x=b.indexOf(a.newValue),0<=x&&b.splice(x,1)):0>b.indexOf(a.newValue)&&b.splice(x,0,a.newValue));return}}else if(a.change===ds){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,nn(a)&&typeof x=="number"&&(b=this.Ac(a),y?(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),b!==void 0&&this.wb.add(b,a)):(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),b!==void 0&&this.wb.remove(b)));return}if(a.modelChange==="linkLabelKeys"){b=this.Ef(a.object),Array.isArray(b)&&typeof x=="number"&&(y?0>b.indexOf(a.newValue)&&b.splice(x,0,a.newValue):(x=b.indexOf(a.newValue),0<=x&&b.splice(x,1)));return}}xi.prototype.changeState.call(this,a,y)}},it=zr.prototype,it.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),$o(x,this.nodeKeyProperty,a),this.xf(x))}return a}},it.yx=function(a){return su(this,a,!0)},it.wv=function(a,y){Ep(this,a,y,!0)},it.Bx=function(a){return su(this,a,!1)},it.Bv=function(a,y){Ep(this,a,y,!1)};function su(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Os(y,a),a!==void 0))){if(gd(a))return a;Nt((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Ep(a,y,x,b){if(x===null&&(x=void 0),y!==null){var E=b?a.lf:a.mf;if(E!=="")if(x=a.Vl(x),a.Jc(y)){var te=Os(y,E);te!==x&&(hc(a,te,y),$o(y,E,x),a.hc(x)===null&&cc(a,x,y),na(a,b?"linkFromKey":"linkToKey",Vo,E,y,te,x),typeof E=="string"&&a.La(y,E))}else $o(y,E,x)}}it.zx=function(a){return g0(this,a,!0)},it.xv=function(a,y){Lp(this,a,y,!0)},it.Cx=function(a){return g0(this,a,!1)},it.Cv=function(a,y){Lp(this,a,y,!1)};function g0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=Os(y,a),y===void 0?"":y)}function Lp(a,y,x,b){if(y!==null){var E=b?a.ej:a.fj;if(E!=="")if(a.Jc(y)){var te=Os(y,E);te===void 0&&(te=""),te!==x&&($o(y,E,x),na(a,b?"linkFromPortId":"linkToPortId",Vo,E,y,te,x),typeof E=="string"&&a.La(y,E))}else $o(y,E,x)}}it.Ef=function(a){if(a===null)return m0;var y=this.je;return y===""?m0:(a=Os(a,y),a===void 0?m0:a)},it.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=Os(a,x);if(b===void 0&&(b=m0),b!==y){if(Array.isArray(b))for(var E=b.length,te=0;te<E;te++)hc(this,b[te],a);for($o(a,x,y),E=y.length,te=0;te<E;te++){var ne=y[te];this.hc(ne)===null&&cc(this,ne,a)}na(this,"linkLabelKeys",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else $o(a,x,y)}},it.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Os(a,x);if(b===void 0)x=[],x.push(y),this.Ls(a,x);else if(Array.isArray(b)){var E=b.indexOf(y);0<=E||(E=b.length,b.push(y),this.Jc(a)&&(this.hc(y)===null&&cc(this,y,a),na(this,"linkLabelKeys",vs,x,a,null,y,null,E)))}else Nt(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},it.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Os(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(hc(this,y,a),na(this,"linkLabelKeys",ds,x,a,y,null,E,null)))}else b!==void 0&&Nt(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},it.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Os(a,y),y!==void 0)){if(gd(y))return y;Nt("Key value for link data "+a+" is not a number or a string: "+y)}}},it.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=Os(a,x);b!==y&&this.jh(y)===null&&($o(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),na(this,"linkKey",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},it.jh=function(a){return a===null&&Nt("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&gd(a)?this.wb.I(a):null},it.Bs=function(a){if(a!==null){var y=this.Jh;if(y!==""){var x=this.Ac(a);if(x===void 0||this.wb.contains(x)){var b=this.cl;if(b!==null&&(x=b(this,a),x!=null&&!this.wb.contains(x))){$o(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;$o(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;$o(a,y,x)}}}}},it.Jc=function(a){return a===null?!1:this.$f.contains(a)},it.fi=function(a){a!==null&&(yo(a),this.Jc(a)||kS(this,a,!0))};function kS(a,y,x){if(a.linkKeyProperty!==""){var b=a.Ac(y);if(b!==void 0&&a.wb.I(b)===y)return;a.Bs(y),b=a.Ac(y),b===void 0&&Nt("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(b,y)}a.$f.add(y),b=null,x&&(b=a.md.length,a.md.splice(b,0,y)),na(a,"linkDataArray",vs,"linkDataArray",a,null,y,null,b),fy(a,y)}it.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)},it.bm=function(a){a!==null&&AS(this,a,!0)};function AS(a,y,x){a.$f.remove(y);var b=a.Ac(y);if(b!==void 0&&a.wb.remove(b),b=null,x){if(b=a.md.indexOf(y),0>b)return;a.md.splice(b,1)}if(na(a,"linkDataArray",ds,"linkDataArray",a,y,null,b,null),x=su(a,y,!0),hc(a,x,y),x=su(a,y,!1),hc(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,te=0;te<E;te++)x=b[te],hc(a,x,y)}it.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)},it.Zz=function(a){if(this.linkKeyProperty===""&&Nt("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&sn(a)){var y=this.kl;y.clear(),y.addAll(this.wb.iteratorKeys);var x=this.il;x.clear();for(var b=a.length,E=0;E<b;E++){var te=a[E],ne=this.Ac(te);if(ne!==void 0){x.add(ne);var ae=this.jh(ne);ae!==te&&(ae!==null?(this.Do(ae,te),NS(this,te,ae)):(te=this.cloneDeep(te),this.Ks(te,ne),this.fi(te)))}else ne=this.cloneDeep(te),this.fi(ne),x.add(this.Ac(ne))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.jh(b))&&this.bm(b);y.clear(),x.clear()}};function fy(a,y){var x=su(a,y,!0);x=a.Vl(x),a.hc(x)===null&&cc(a,x,y),x=su(a,y,!1),x=a.Vl(x),a.hc(x)===null&&cc(a,x,y);var b=a.Ef(y);if(Array.isArray(b))for(var E=b.length,te=0;te<E;te++)x=b[te],a.hc(x)===null&&cc(a,x,y)}it.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):p0(this,a,!0),nn(a)&&(pr(a),this.lf!==""&&$o(a,this.lf,void 0),this.mf!==""&&$o(a,this.mf,void 0),this.je!==""&&$o(a,this.je,[])),a},it.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Os(a,y)},it.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Os(a,y),y!==void 0)){if(gd(y))return y;Nt("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},it.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=Os(a,x);b!==y&&(hc(this,b,a),$o(a,x,y),this.hc(y)===null&&cc(this,y,a),na(this,"nodeGroupKey",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},zr.prototype.copyNodeData=function(a){return a===null?null:(a=xi.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Os(a,this.Je)===void 0||$o(a,this.Je,void 0),a)},zr.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){Ep(this,a,x,!0);return}if(y===this.linkToKeyProperty){Ep(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Lp(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Lp(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 b=Os(a,y);b!==x&&($o(a,y,x),this.Fs(a,y,b,x))},it=zr.prototype,it.Do=function(a,y){if(y){var x=this.lb(a),b=this.Jc(a),E;for(E in y)E==="__gohashid"||x&&E===this.nodeKeyProperty||x&&E===this.nodeIsGroupProperty&&Os(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},it.jp=function(a,y){xi.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 b=x.value,E=a,te=y;if(su(this,b,!0)===E){var ne=this.lf;$o(b,ne,te),na(this,"linkFromKey",Vo,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)}if(su(this,b,!1)===E&&(ne=this.mf,$o(b,ne,te),na(this,"linkToKey",Vo,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)),ne=this.Ef(b),Array.isArray(ne))for(var ae=ne.length,fe=this.je,_e=0;_e<ae;_e++)ne[_e]===E&&(ne[_e]=te,na(this,"linkLabelKeys",vs,fe,b,E,te,_e,_e))}},it.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;$o(a,b,x),na(this,"nodeGroupKey",Vo,b,a,y,x),typeof b=="string"&&this.La(a,b)}},it.Lv=function(){xi.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)fy(this,a[x])},it.fm=function(a){xi.prototype.fm.call(this,a),a=this.wa(a);var y=Og(this,a);if(y!==null){var x=Hn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;na(this,"nodeGroupKey",Vo,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(su(this,b,!0)===a&&(E=this.lf,na(this,"linkFromKey",Vo,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),su(this,b,!1)===a&&(E=this.mf,na(this,"linkToKey",Vo,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),E=this.Ef(b),Array.isArray(E))for(var te=E.length,ne=this.je,ae=0;ae<te;ae++)E[ae]===a&&(na(this,"linkLabelKeys",vs,ne,b,a,a,ae,ae),x.push(b))}for(y=0;y<x.length;y++)hc(this,a,x[y]);ei(x)}},it.em=function(a){xi.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&cc(this,y,a)},it.qp=function(a){xi.prototype.qp.call(this,a);var y=this.lh(a);hc(this,y,a)},it.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Os(a,y),y===void 0))return"";if(typeof y=="string")return y;Nt("getCategoryForLinkData found a non-string category for "+a+": "+y)},zr.prototype.getLinkCategoryForData=function(a){return this.ps(a)},zr.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=Os(a,x);b===void 0&&(b=""),b!==y&&($o(a,x,y),na(this,"linkCategory",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},zr.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},it=zr.prototype,it.lm=function(a,y){xi.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function NS(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))}it.Wj=function(){return!0},it.ri=function(){return!0},it.xs=function(){return!0},it.Xj=function(){return!0},Ye.Object.defineProperties(zr.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,b=0;b<x;b++){var E=a[b];nn(E)||Nt("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),yo(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new Bn,E=0;E<x;E++){var te=a[E],ne=this.Ac(te);ne===void 0||this.wb.I(ne)!==null?b.add(te):this.wb.add(ne,te)}for(b=b.iterator;b.next();)E=b.value,this.Bs(E),te=this.Ac(E),te!==void 0&&this.wb.add(te,E)}for(b=new In,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,na(this,"linkDataArray",Vo,"linkDataArray",this,y,a),y=0;y<x;y++)fy(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,b=0;b<x;b++){var E=this.linkDataArray[b],te=this.Ac(E);te===void 0&&(this.Bs(E),te=this.Ac(E)),te!==void 0&&this.wb.add(te,E)}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"}}}),zr.prototype.setCategoryForLinkData=zr.prototype.lp,zr.prototype.getCategoryForLinkData=zr.prototype.ps,zr.prototype.assignAllDataProperties=zr.prototype.Do,zr.prototype.setGroupKeyForNodeData=zr.prototype.mp,zr.prototype.getGroupKeyForNodeData=zr.prototype.lh,zr.prototype.isGroupForNodeData=zr.prototype.Yu,zr.prototype.copyLinkData=zr.prototype.Jo,zr.prototype.mergeLinkDataArray=zr.prototype.Zz,zr.prototype.removeLinkDataCollection=zr.prototype.lA,zr.prototype.removeLinkData=zr.prototype.bm,zr.prototype.addLinkDataCollection=zr.prototype.Ey,zr.prototype.addLinkData=zr.prototype.fi,zr.prototype.containsLinkData=zr.prototype.Jc,zr.prototype.makeLinkDataKeyUnique=zr.prototype.Bs,zr.prototype.findLinkDataForKey=zr.prototype.jh,zr.prototype.setKeyForLinkData=zr.prototype.Ks,zr.prototype.getKeyForLinkData=zr.prototype.Ac,zr.prototype.removeLabelKeyForLinkData=zr.prototype.Qx,zr.prototype.addLabelKeyForLinkData=zr.prototype.Bu,zr.prototype.setLabelKeysForLinkData=zr.prototype.Ls,zr.prototype.getLabelKeysForLinkData=zr.prototype.Ef,zr.prototype.setToPortIdForLinkData=zr.prototype.Cv,zr.prototype.getToPortIdForLinkData=zr.prototype.Cx,zr.prototype.setFromPortIdForLinkData=zr.prototype.xv,zr.prototype.getFromPortIdForLinkData=zr.prototype.zx,zr.prototype.setToKeyForLinkData=zr.prototype.Bv,zr.prototype.getToKeyForLinkData=zr.prototype.Bx,zr.prototype.setFromKeyForLinkData=zr.prototype.wv,zr.prototype.getFromKeyForLinkData=zr.prototype.yx,zr.prototype.clear=zr.prototype.clear;var m0=Object.freeze([]);zr.className="GraphLinksModel",Xu.GraphLinksModel=zr,xi.constructGraphLinksModel=xi.constructGraphLinksModel=function(){return new zr},xi.initDiagramModel=hy=function(){return new zr};function ll(a,y){xi.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(sn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}qe(ll,xi),ll.constructGraphLinksModel=xi.constructGraphLinksModel,ll.prototype.cloneProtected=function(a){xi.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},it=ll.prototype,it.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,b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+hi(E)}}return y},it.rm=function(){var a=xi.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},it.gp=function(a){xi.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},it.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Nt("applyIncrementalJson cannot change Model properties"),xi.prototype.fp.call(this,a)},it.Vl=function(a){return a},it.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Os(a,y),y!==void 0)){if(gd(y))return y;Nt("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},it.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 b=Os(a,x);b!==y&&(hc(this,b,a),$o(a,x,y),this.hc(y)===null&&cc(this,y,a),na(this,"nodeParentKey",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},it.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Os(a,y),y===void 0)?"":typeof y=="string"?y:(Nt("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},ll.prototype.getLinkCategoryForData=function(a){return this.ss(a)},ll.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=Os(a,x);b===void 0&&(b=""),b!==y&&($o(a,x,y),na(this,"parentLinkCategory",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},ll.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},ll.prototype.copyNodeData=function(a){return a===null?null:(a=xi.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Os(a,this.Ke)===void 0||$o(a,this.Ke,void 0),a)},ll.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 b=Os(a,y);b!==x&&($o(a,y,x),this.Fs(a,y,b,x))},it=ll.prototype,it.jp=function(a,y){xi.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},it.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;$o(a,b,x),na(this,"nodeParentKey",Vo,b,a,y,x),typeof b=="string"&&this.La(a,b)}},it.fm=function(a){xi.prototype.fm.call(this,a),a=this.wa(a);var y=Og(this,a);if(y!==null){var x=Hn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;na(this,"nodeParentKey",Vo,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)hc(this,a,x[y]);ei(x)}},it.em=function(a){xi.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&cc(this,y,a)},it.qp=function(a){xi.prototype.qp.call(this,a);var y=this.mh(a);hc(this,y,a)},it.lm=function(a,y){xi.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},it.Tl=function(){return!0},it.xs=function(){return!0},Ye.Object.defineProperties(ll.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"}}}),ll.prototype.setParentLinkCategoryForNodeData=ll.prototype.Ms,ll.prototype.getParentLinkCategoryForNodeData=ll.prototype.ss,ll.prototype.setParentKeyForNodeData=ll.prototype.qe,ll.prototype.getParentKeyForNodeData=ll.prototype.mh,ll.className="TreeModel",Xu.TreeModel=ll;function hs(a){es.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=Ju,this.Ti=0,this.Zv=new Mt,this.Jp=this.me=0,this.Xr=new jg,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=Ju,this.K=ul,this.nd=Tp,this.hd=oy,this.tf=6,this.Nn=C0,a&&Object.assign(this,a)}qe(hs,es),hs.prototype.cloneProtected=function(a){es.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},hs.prototype.qb=function(a){a.classType===hs?a===w0||a===b0||a===S0||a===x0||a===Tp?this.sorting=a:a===sf||a===Mp||a===ul||a===vd?this.direction=a:a===zh||a===md||a===Ju||a===Qu?this.arrangement=a:(a===Df||a===C0)&&(this.nodeDiameterFormula=a):es.prototype.qb.call(this,a)},hs.prototype.createNetwork=function(){return new kp(this)},hs.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 Bn;y.addAll(a.iterator),a=new Bn;var x=new Bn,b=this.sort(y),E,te,ne=this.Jp,ae=this.arrangement,fe=this.nodeDiameterFormula,_e=this.radius;(!isFinite(_e)||0>=_e)&&(_e=NaN);var Te=this.aspectRatio;(!isFinite(Te)||0>=Te)&&(Te=1);var je=this.startAngle;isFinite(je)||(je=0);var Ve=this.sweepAngle;if((!isFinite(Ve)||360<Ve||1>Ve)&&(Ve=360),y=this.spacing,isFinite(y)||(y=NaN),ae===Qu&&fe===Df?ae=Ju:ae===Qu&&fe!==Df&&(ae=this.arrangement),(this.direction===sf||this.direction===Mp)&&this.sorting!==Tp){for(fe=0;!(fe>=b.length)&&(a.add(b.M(fe)),!(fe+1>=b.length));fe+=2)x.add(b.M(fe+1));this.direction===sf?(this.arrangement===Qu&&a.reverse(),b=new Bn,b.addAll(a),b.addAll(x)):(this.arrangement===Qu&&x.reverse(),b=new Bn,b.addAll(x),b.addAll(a))}fe=b.length;for(var Qe=te=E=0;Qe<b.length;Qe++){var rt=je+Ve*te*(this.direction===ul?1:-1)/fe,ct=b.M(Qe).diameter;isNaN(ct)&&(ct=yd(b.M(Qe),rt)),360>Ve&&(Qe===0||Qe===b.length-1)&&(ct/=2),E+=ct,te++}if(isNaN(_e)||ae===Qu){if(isNaN(y)&&(y=6),ae!==Ju&&ae!==Qu){for(te=-1/0,ne=0;ne<fe;ne++)Qe=b.M(ne),E=b.M(ne===fe-1?0:ne+1),isNaN(Qe.diameter)&&yd(Qe,0),isNaN(E.diameter)&&yd(E,0),te=Math.max(te,(Qe.diameter+E.diameter)/2);ne=te+y,ae===zh?_e=(te+y)/(2*Math.PI/fe):_e=v0(this,ne*(360<=Ve?fe:fe-1),Te,je*Math.PI/180,Ve*Math.PI/180)}else _e=v0(this,E+(360<=Ve?fe:fe-1)*(ae!==Qu?y:1.6*y),Te,je*Math.PI/180,Ve*Math.PI/180);te=_e*Te}else if(te=_e*Te,Qe=py(this,_e,te,je*Math.PI/180,Ve*Math.PI/180),isNaN(y))(ae===Ju||ae===Qu)&&(y=(Qe-E)/(360<=Ve?fe:fe-1));else if(ae===Ju||ae===Qu)Qe=(Qe-E)/(360<=Ve?fe:fe-1),Qe<y?(_e=v0(this,E+y*(360<=Ve?fe:fe-1),Te,je*Math.PI/180,Ve*Math.PI/180),te=_e*Te):y=Qe;else{for(ne=-1/0,E=0;E<fe;E++)rt=b.M(E),ct=b.M(E===fe-1?0:E+1),isNaN(rt.diameter)&&yd(rt,0),isNaN(ct.diameter)&&yd(ct,0),ne=Math.max(ne,(rt.diameter+ct.diameter)/2);ne+=y,E=v0(this,ne*(360<=Ve?fe:fe-1),Te,je*Math.PI/180,Ve*Math.PI/180),E>_e?(_e=E,te=_e*Te):ne=Qe/(360<=Ve?fe:fe-1)}if(this.kw=ae,this.lc=_e,this.Zm=Te,this.lw=je,this.Wp=Ve,this.Ti=y,this.me=te,this.Jp=ne,y=b,b=this.kw,ae=this.lc,_e=this.lw,Te=this.Wp,je=this.Ti,Ve=this.me,fe=this.Jp,this.direction!==sf&&this.direction!==Mp||b!==Qu)if(this.direction===sf||this.direction===Mp){switch(ne=0,b){case md:ne=180*y0(this,ae,Ve,_e,fe)/Math.PI;break;case Ju:fe=y=0,ne=a.first(),ne!==null&&(y=yd(ne,Math.PI/2)),ne=x.first(),ne!==null&&(fe=yd(ne,Math.PI/2)),ne=180*y0(this,ae,Ve,_e,je+(y+fe)/2)/Math.PI;break;case zh:ne=Te/y.length}if(this.direction===sf){switch(b){case md:Fg(this,a,_e,vd);break;case Ju:Bg(this,a,_e,vd);break;case zh:Rg(this,a,Te/2,_e,vd)}switch(b){case md:Fg(this,x,_e+ne,ul);break;case Ju:Bg(this,x,_e+ne,ul);break;case zh:Rg(this,x,Te/2,_e+ne,ul)}}else{switch(b){case md:Fg(this,x,_e,vd);break;case Ju:Bg(this,x,_e,vd);break;case zh:Rg(this,x,Te/2,_e,vd)}switch(b){case md:Fg(this,a,_e+ne,ul);break;case Ju:Bg(this,a,_e+ne,ul);break;case zh:Rg(this,a,Te/2,_e+ne,ul)}}}else switch(b){case md:Fg(this,y,_e,this.direction);break;case Ju:Bg(this,y,_e,this.direction);break;case zh:Rg(this,y,Te,_e,this.direction);break;case Qu:OS(this,y,Te,_e,this.direction)}else OS(this,y,Te,_e-Te/2,ul)}this.updateParts(),this.network=null,this.isValidLayout=!0};function Rg(a,y,x,b,E){var te=a.Wp,ne=a.lc;a=a.me,b=b*Math.PI/180,x=x*Math.PI/180;for(var ae=y.length,fe=0;fe<ae;fe++){var _e=b+(E===ul?fe*x/(360<=te?ae:ae-1):-(fe*x)/ae),Te=y.M(fe),je=ne*Math.tan(_e)/a;je=Math.sqrt((ne*ne+a*a*je*je)/(1+je*je)),Te.centerX=je*Math.cos(_e),Te.centerY=je*Math.sin(_e),Te.actualAngle=180*_e/Math.PI}}function Bg(a,y,x,b){var E=a.lc,te=a.me,ne=a.Ti;x=x*Math.PI/180;for(var ae=y.length,fe=0;fe<ae;fe++){var _e=y.M(fe),Te=y.M(fe===ae-1?0:fe+1),je=te*Math.sin(x);_e.centerX=E*Math.cos(x),_e.centerY=je,_e.actualAngle=180*x/Math.PI,isNaN(_e.diameter)&&yd(_e,0),isNaN(Te.diameter)&&yd(Te,0),_e=y0(a,E,te,b===ul?x:-x,(_e.diameter+Te.diameter)/2+ne),x+=b===ul?_e:-_e}}function Fg(a,y,x,b){var E=a.lc,te=a.me,ne=a.Jp;x=x*Math.PI/180;for(var ae=y.length,fe=0;fe<ae;fe++){var _e=y.M(fe);_e.centerX=E*Math.cos(x),_e.centerY=te*Math.sin(x),_e.actualAngle=180*x/Math.PI,_e=y0(a,E,te,b===ul?x:-x,ne),x+=b===ul?_e:-_e}}function OS(a,y,x,b,E){var te=a.Wp;if(a.mj=0,a.Xr=new jg,360>x){for(te=b+(E===ul?te:-te);0>te;)te+=360;te%=360,180<te&&(te-=360),te*=Math.PI/180,a.gt=te,DS(a,y,x,b,E)}else IS(a,y,x,b,E);a.Xr.commit(y)}function IS(a,y,x,b,E){var te=a.lc,ne=a.Ti,ae=a.Zm,fe=te*Math.cos(b*Math.PI/180),_e=a.me*Math.sin(b*Math.PI/180),Te=y.Fa();if(Te.length===3)Te[0].centerX=te,Te[0].centerY=0,Te[1].centerX=Te[0].centerX-Te[0].width/2-Te[1].width/2-ne,Te[1].y=Te[0].y,Te[2].centerX=(Te[0].centerX+Te[1].centerX)/2,Te[2].y=Te[0].y-Te[2].height-ne;else if(Te.length===4)Te[0].centerX=te,Te[0].centerY=0,Te[2].centerX=-Te[0].centerX,Te[2].centerY=Te[0].centerY,Te[1].centerX=0,Te[1].y=Math.min(Te[0].y,Te[2].y)-Te[1].height-ne,Te[3].centerX=0,Te[3].y=Math.max(Te[0].y+Te[0].height+ne,Te[2].y+Te[2].height+ne);else{te=Mt.alloc();for(var je=0;je<Te.length&&(Te[je].centerX=fe,Te[je].centerY=_e,!(je>=Te.length-1));je++)RS(a,fe,_e,Te,je,E,te)||BS(a,fe,_e,Te,je,E,te),fe=te.x,_e=te.y;if(Mt.free(te),a.mj++,!(23<a.mj)){fe=Te[0].centerX,_e=Te[0].centerY,te=Te[Te.length-1].centerX,je=Te[Te.length-1].centerY;var Ve=Math.abs(fe-te)-((Te[0].width+Te[Te.length-1].width)/2+ne),Qe=Math.abs(_e-je)-((Te[0].height+Te[Te.length-1].height)/2+ne);ne=0,1>Math.abs(Qe)?Math.abs(fe-te)<(Te[0].width+Te[Te.length-1].width)/2&&(ne=0):ne=0<Qe?Qe:1>Math.abs(Ve)?0:Ve,fe=Math.abs(te)>Math.abs(je)?0<te!=_e>je:0<je!=fe<te,(fe=E===ul?fe:!fe)&&(ne=-Math.abs(ne),ne=Math.min(ne,-Te[Te.length-1].width),ne=Math.min(ne,-Te[Te.length-1].height)),a.Xr.compare(ne,Te),1<Math.abs(ne)&&(a.lc=8>a.mj?a.lc-ne/(2*Math.PI):5>Te.length&&10<ne?a.lc/2:a.lc-(0<ne?1.7:-2.3),a.me=a.lc*ae,IS(a,y,x,b,E))}}}function DS(a,y,x,b,E){for(var te=a.lc,ne=a.me,ae=a.Zm,fe=te*Math.cos(b*Math.PI/180),_e=ne*Math.sin(b*Math.PI/180),Te=Mt.alloc(),je=y.Fa(),Ve=0;Ve<je.length&&(je[Ve].centerX=fe,je[Ve].centerY=_e,!(Ve>=je.length-1));Ve++)RS(a,fe,_e,je,Ve,E,Te)||BS(a,fe,_e,je,Ve,E,Te),fe=Te.x,_e=Te.y;if(Mt.free(Te),a.mj++,!(23<a.mj)){if(fe=Math.atan2(_e,fe),fe=E===ul?a.gt-fe:fe-a.gt,fe=Math.abs(fe)<Math.abs(fe-2*Math.PI)?fe:fe-2*Math.PI,te=fe*(te+ne)/2,ne=a.Xr,Math.abs(te)<Math.abs(ne.Pl))for(ne.Pl=te,ne.mk=[],ne.tm=[],fe=0;fe<je.length;fe++)ne.mk[fe]=je[fe].bounds.x,ne.tm[fe]=je[fe].bounds.y;1<Math.abs(te)&&(a.lc=8>a.mj?a.lc-te/(2*Math.PI):a.lc-(0<te?1.7:-2.3),a.me=a.lc*ae,DS(a,y,x,b,E))}}function RS(a,y,x,b,E,te,ne){var ae=a.lc,fe=a.me,_e=0;a=(b[E].width+b[E+1].width)/2+a.Ti;var Te=!1;if(0<=x!=(te===ul)){if(te=y+a,te>ae){if(te=y-a,te<-ae)return ne.x=te,ne.y=_e,!1;Te=!0}}else if(te=y-a,te<-ae){if(te=y+a,te>ae)return ne.x=te,ne.y=_e,!1;Te=!0}return _e=Math.sqrt(1-Math.min(1,te*te/(ae*ae)))*fe,0>x!==Te&&(_e=-_e),Math.abs(x-_e)>(b[E].height+b[E+1].height)/2?(ne.x=te,ne.y=_e,!1):(ne.x=te,ne.y=_e,!0)}function BS(a,y,x,b,E,te,ne){var ae=a.lc,fe=a.me,_e=0;if(a=(b[E].height+b[E+1].height)/2+a.Ti,b=!1,0<=y!=(te===ul)){if(te=x-a,te<-fe){if(te=x+a,te>fe){ne.x=_e,ne.y=te;return}b=!0}}else if(te=x+a,te>fe){if(te=x-a,te<-fe){ne.x=_e,ne.y=te;return}b=!0}_e=Math.sqrt(1-Math.min(1,te*te/(fe*fe)))*ae,0>y!==b&&(_e=-_e),ne.x=_e,ne.y=te}hs.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},hs.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 Mt(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;E.x+=x.x,E.y+=x.y,E.commit()}a&&(this.group.Va(),a=this.group.position.copy(),x=this.group.location.copy(),y=y.re(x.re(a)),this.group.move(y),this.Zv=y.re(a))},hs.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function py(a,y,x,b,E){var te=a.ty;if(.001>Math.abs(a.Zm-1))return b!==void 0&&E!==void 0?E*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var ne=0,ae=b!==void 0&&E!==void 0?E/(te+1):Math.PI/(2*(te+1)),fe=0,_e=0;_e<=te;_e++){b!==void 0&&E!==void 0?fe=b+_e*E/te:fe=_e*Math.PI/(2*te);var Te=Math.sin(fe);ne+=Math.sqrt(1-a*a*Te*Te)*ae}return b!==void 0&&E!==void 0?(y>x?y:x)*ne:4*(y>x?y:x)*ne}function v0(a,y,x,b,E){return y/(b!==void 0&&E!==void 0?py(a,1,x,b,E):py(a,1,x))}function y0(a,y,x,b,E){if(.001>Math.abs(a.Zm-1))return E/y;var te=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&&(b+=Math.PI/2);for(var ae=0;;ae++){var fe=Math.sin(b+ae*a);if(ne+=(y>x?y:x)*Math.sqrt(1-te*te*fe*fe)*a,ne>=E)return ae*a}}hs.prototype.sort=function(a){switch(this.sorting){case S0:break;case x0:a.reverse();break;case w0:a.sort(this.comparer);break;case b0:a.sort(this.comparer),a.reverse();break;case Tp:return this.ak(Ix(a));default:Nt("Invalid sorting type.")}return a};function Ix(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new Bn;for(var b=0;b<a.length;b++){var E=-1,te=-1;if(b===0)for(var ne=0;ne<a.length;ne++){var ae=a.M(ne).edgesCount;ae>E&&(E=ae,te=ne)}else for(ne=0;ne<a.length;ne++)ae=y[ne],ae>E&&(E=ae,te=ne);for(x.add(a.M(te)),y[te]=-1,te=a.M(te),ne=te.sourceEdges;ne.next();)E=a.indexOf(ne.value.fromVertex),0>E||0<=y[E]&&y[E]++;for(te=te.destinationEdges;te.next();)E=a.indexOf(te.value.toVertex),0>E||0<=y[E]&&y[E]++}return x}hs.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var b=a.M(x);y[x]=[];for(var E,te=b.destinationEdges;te.next();)E=a.indexOf(te.value.toVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E);for(b=b.sourceEdges;b.next();)E=a.indexOf(b.value.fromVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E)}for(te=[],x=0;x<y.length;x++)te[x]=0;x=[];var ne=[],ae=[];b=[],E=new Bn;for(var fe=0,_e=0;_e<y.length;_e++){var Te=y[_e].length;if(Te===1)b.push(_e);else if(Te===0)E.add(a.M(_e));else{if(fe===0)x.push(_e);else{for(var je=Te=1/0,Ve=-1,Qe=[],rt=0;rt<x.length;rt++)0>y[x[rt]].indexOf(x[rt===x.length-1?0:rt+1])&&Qe.push(rt===x.length-1?0:rt+1);if(Qe.length===0)for(rt=0;rt<x.length;rt++)Qe.push(rt);for(rt=0;rt<Qe.length;rt++){for(var ct=Qe[rt],Dt=y[_e],Lt=0,Gt=0;Gt<ne.length;Gt++){var Zt=te[ne[Gt]],Vt=te[ae[Gt]];if(Zt<Vt){var Qt=Zt;Zt=Vt}else Qt=Vt;if(Qt<ct&&ct<=Zt)for(Vt=0;Vt<Dt.length;Vt++){var yn=Dt[Vt];0>x.indexOf(yn)||Qt<te[yn]&&te[yn]<Zt||Qt===te[yn]||Zt===te[yn]||Lt++}else for(Vt=0;Vt<Dt.length;Vt++)yn=Dt[Vt],0>x.indexOf(yn)||Qt<te[yn]&&te[yn]<Zt&&Qt!==te[yn]&&Zt!==te[yn]&&Lt++}for(Dt=Lt,Gt=Lt=0;Gt<y[_e].length;Gt++)Qt=x.indexOf(y[_e][Gt]),0<=Qt&&(Qt=Math.abs(ct-(Qt>=ct?Qt+1:Qt)),Lt+=Qt<x.length+1-Qt?Qt:x.length+1-Qt);for(Gt=0;Gt<ne.length;Gt++)Qt=te[ne[Gt]],Zt=te[ae[Gt]],Qt>=ct&&Qt++,Zt>=ct&&Zt++,Qt>Zt&&(Vt=Zt,Zt=Qt,Qt=Vt),Zt-Qt<(x.length+2)/2==(Qt<ct&&ct<=Zt)&&Lt++;(Dt<Te||Dt===Te&&Lt<je)&&(Te=Dt,je=Lt,Ve=ct)}for(x.splice(Ve,0,_e),Te=0;Te<x.length;Te++)te[x[Te]]=Te;for(Te=0;Te<y[_e].length;Te++)je=y[_e][Te],0<=x.indexOf(je)&&(ne.push(_e),ae.push(je))}fe++}}for(ne=x.length;;){for(te=!0,ae=0;ae<b.length;ae++)if(fe=b[ae],_e=y[fe][0],Te=x.indexOf(_e),0<=Te){for(Ve=je=0;Ve<y[_e].length;Ve++)Qe=x.indexOf(y[_e][Ve]),0>Qe||Qe===Te||(rt=Qe>Te?Qe-Te:Te-Qe,je+=Qe<Te!=rt>ne-rt?1:-1);x.splice(0>je?Te:Te+1,0,fe),b.splice(ae,1),ae--}else te=!1;if(te)break;x.push(b[0]),b.splice(0,1)}for(y=0;y<x.length;y++)E.add(a.M(x[y]));return E},Ye.Object.defineProperties(hs.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!==Qu&&a!==Ju&&a!==md&&a!==zh||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==ul&&a!==vd&&a!==sf&&a!==Mp||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==S0&&a!==x0&&a!==w0&&!b0&&a!==Tp||(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!==C0&&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 Ju=new Ln(hs,"ConstantSpacing",0),md=new Ln(hs,"ConstantDistance",1),zh=new Ln(hs,"ConstantAngle",2),Qu=new Ln(hs,"Packed",3),ul=new Ln(hs,"Clockwise",4),vd=new Ln(hs,"Counterclockwise",5),sf=new Ln(hs,"BidirectionalLeft",6),Mp=new Ln(hs,"BidirectionalRight",7),S0=new Ln(hs,"Forwards",8),x0=new Ln(hs,"Reverse",9),w0=new Ln(hs,"Ascending",10),b0=new Ln(hs,"Descending",11),Tp=new Ln(hs,"Optimized",12),C0=new Ln(hs,"Pythagorean",13),Df=new Ln(hs,"Circular",14);hs.className="CircularLayout",hs.ConstantSpacing=Ju,hs.ConstantDistance=md,hs.ConstantAngle=zh,hs.Packed=Qu,hs.Clockwise=ul,hs.Counterclockwise=vd,hs.BidirectionalLeft=sf,hs.BidirectionalRight=Mp,hs.Forwards=S0,hs.Reverse=x0,hs.Ascending=w0,hs.Descending=b0,hs.Optimized=Tp,hs.Pythagorean=C0,hs.Circular=Df;function jg(){this.Pl=-1/0,this.tm=this.mk=null}jg.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},jg.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]}},jg.className="VertexArrangement";function kp(a){To.call(this,a)}qe(kp,To),kp.prototype.createVertex=function(){return new zg(this)},kp.prototype.createEdge=function(){return new P0(this)},kp.className="CircularNetwork";function zg(a){aa.call(this,a),this.u=this.Si=NaN}qe(zg,aa);function yd(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===Qu)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}Ye.Object.defineProperties(zg.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)}}}),zg.className="CircularVertex";function P0(a){Gl.call(this,a)}qe(P0,Gl),P0.className="CircularEdge";function Aa(a){es.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)}qe(Aa,es),Aa.prototype.cloneProtected=function(a){es.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},Aa.prototype.createNetwork=function(){return new Rf(this)},Aa.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 b=x.iterator;b.next();){this.network=b.value;for(var E=this.network.vertexes.iterator;E.next();){var te=E.value;te.Vd=te.vertexes.count,te.sh=1,te.Hj=null,te.We=null}FS(this,0,a)}this.network=y;var ne=b=x.iterator;b=this.arrangementSpacing;var ae=ne.count,fe=!0;te=E=0;for(var _e=Hn(),Te=0;Te<ae+y.vertexes.count+2;Te++)_e[Te]=null;ae=0,ne.reset();for(var je=kn.alloc();ne.next();)if(Te=ne.value,this.computeBounds(Te,je),fe)fe=!1,E=je.x+je.width/2,te=je.y+je.height/2,_e[0]=new Mt(je.x+je.width+b.width,je.y),_e[1]=new Mt(je.x,je.y+je.height+b.height),ae=2;else{var Ve=jS(_e,ae,E,te,je.width,je.height,b),Qe=_e[Ve],rt=new Mt(Qe.x+je.width+b.width,Qe.y),ct=new Mt(Qe.x,Qe.y+je.height+b.height);for(Ve+1<ae&&_e.splice(Ve+1,0,null),_e[Ve]=rt,_e[Ve+1]=ct,ae++,Ve=Qe.x-je.x,Qe=Qe.y-je.y,Te=Te.vertexes.iterator;Te.next();)rt=Te.value,rt.centerX+=Ve,rt.centerY+=Qe}for(kn.free(je),Te=y.vertexes.iterator;Te.next();)ne=Te.value,Ve=ne.bounds,2>ae?(E=Ve.x+Ve.width/2,te=Ve.y+Ve.height/2,_e[0]=new Mt(Ve.x+Ve.width+b.width,Ve.y),_e[1]=new Mt(Ve.x,Ve.y+Ve.height+b.height),ae=2):(fe=jS(_e,ae,E,te,Ve.width,Ve.height,b),je=_e[fe],Qe=new Mt(je.x+Ve.width+b.width,je.y),Ve=new Mt(je.x,je.y+Ve.height+b.height),fe+1<ae&&_e.splice(fe+1,0,null),_e[fe]=Qe,_e[fe+1]=Ve,ae++,ne.centerX=je.x+ne.width/2,ne.centerY=je.y+ne.height/2);for(ei(_e),b=x.iterator;b.next();){for(x=b.value,E=x.vertexes.iterator;E.next();)y.dh(E.value);for(x=x.edges.iterator;x.next();)y.Bo(x.value)}}HS(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},Aa.prototype.needsClusterLayout=function(){if(3>this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,b=this.network.vertexes.iterator;b.next();){if(b.value.bounds.Yc(x)&&(a++,2<a))return!0;if(10<y)break;y++}return!1},Aa.prototype.computeBounds=function(a,y){var x=!0;for(a=a.vertexes.iterator;a.next();){var b=a.value;x?(x=!1,y.set(b.bounds)):y.ed(b.bounds)}return y};function FS(a,y,x){if(Dx(a,y)){var b=a.Zf;a.Zf*=1+1/(y+1);var E=Rx(a,y),te=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=te,FS(a,y+1,x),HS(a,te),Bx(a,E),y=E.vertexes.Fa(),y.sort(function(ne,ae){return ne===null||ae===null||ne===ae?0:ae.Vd-ne.Vd}),x=0;x<y.length;x++)Fx(a,y[x]);a.Zf=b}}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,b){return x===null||b===null||x===b?0:b.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1<a.length-y}function Rx(a,y){for(var x=a.network,b=new Rf(a),E=0;E<a.ah.length;E++){var te=a.ah[E];if(1<te.Vd){b.dh(te);var ne=new US;ne.Rs=te.Vd,ne.Ss=te.width,ne.Qs=te.height,ne.Sv=te.focus.x,ne.Tv=te.focus.y,te.We===null&&(te.We=new Bn),te.We.add(ne),te.sv=te.We.count-1}else break}for(te=x.edges.iterator;te.next();){var ae=te.value;E=ae.fromVertex,ne=ae.toVertex,E.network===b&&ne.network===b?b.Bo(ae):E.network===b?(ae=E.Hj,ae===null&&(ae=new Bn,E.Hj=ae),ae.add(ne),E.Vd--,E.sh+=ne.sh):ne.network===b&&(ae=ne.Hj,ae===null&&(ae=new Bn,ne.Hj=ae),ae.add(E),ne.Vd--,ne.sh+=E.sh)}for(E=b.edges.iterator;E.next();)te=E.value,te.length*=Math.max(1,rn.sqrt((te.fromVertex.sh+te.toVertex.sh)/(4*y+1)));for(y=b.vertexes.iterator;y.next();){E=y.value;var fe=E.Hj;if(fe!==null&&0<fe.count&&(ne=E.We.M(E.We.count-1).Rs-E.Vd,!(0>=ne))){for(var _e=ae=0,Te=fe.count-ne;Te<fe.count;Te++){var je=fe.M(Te),Ve=null;for(te=je.edges.iterator;te.next();){var Qe=te.value;if(Qe.Ax(je)===E){Ve=Qe;break}}Ve!==null&&(_e+=Ve.length,ae+=je.width*je.height)}te=E.centerX,fe=E.centerY,Te=E.width,je=E.height,Ve=E.focus,Qe=Te*je,1>Qe&&(Qe=1),ae=rn.sqrt((ae+Qe+_e*_e*4/(ne*ne))/Qe),ne=(ae-1)*Te/2,ae=(ae-1)*je/2,E.bounds=new kn(te-Ve.x-ne,fe-Ve.y-ae,Te+2*ne,je+2*ae),E.focus=new Mt(Ve.x+ne,Ve.y+ae)}}return a.network=b,x}function Bx(a,y){for(var x=a.network.vertexes.iterator;x.next();){var b=x.value;if(b.network=y,b.We!==null){var E=b.We.M(b.sv);b.Vd=E.Rs;var te=E.Sv,ne=E.Tv;b.bounds=new kn(b.centerX-te,b.centerY-ne,E.Ss,E.Qs),b.focus=new Mt(te,ne),b.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function Fx(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var b=y.centerX,E=y.centerY,te=y.width,ne=y.height;y.We!==null&&0<y.We.count&&(ne=y.We.M(0),te=ne.Ss,ne=ne.Qs),te=rn.sqrt(te*te+ne*ne)/2;for(var ae=!1,fe=ne=0,_e=0,Te=y.vertexes.iterator;Te.next();){var je=Te.value;1>=je.Vd?fe++:(ae=!0,_e++,ne+=Math.atan2(y.centerY-je.centerY,y.centerX-je.centerX))}if(fe!==0){for(0<_e&&(ne/=_e),_e=y=0,y=ae?2*Math.PI/(fe+1):2*Math.PI/fe,fe%2===0&&(_e=y/2),1<x.count&&x.sort(function(Qe,rt){return Qe===null||rt===null||Qe===rt?0:rt.width*rt.height-Qe.width*Qe.height}),ae=fe%2===0?0:1,x=x.iterator;x.next();)if(fe=x.value,!(1<fe.Vd||a.isFixed(fe))){for(Te=null,je=fe.edges.iterator;je.next();){Te=je.value;break}je=fe.width;var Ve=fe.height;je=rn.sqrt(je*je+Ve*Ve)/2,Te=te+Te.length+je,je=ne+(y*(ae/2>>1)+_e)*(ae%2===0?1:-1),fe.centerX=b+Te*Math.cos(je),fe.centerY=E+Te*Math.sin(je),ae++}}}}function jS(a,y,x,b,E,te,ne){var ae=9e19,fe=-1,_e=0;e:for(;_e<y;_e++){var Te=a[_e],je=Te.x-x,Ve=Te.y-b;if(je=je*je+Ve*Ve,je<ae){for(Ve=_e-1;0<=Ve;Ve--)if(a[Ve].y>Te.y&&a[Ve].x-Te.x<E+ne.width)continue e;for(Ve=_e+1;Ve<y;Ve++)if(a[Ve].x>Te.x&&a[Ve].y-Te.y<te+ne.height)continue e;fe=_e,ae=je}}return fe}Aa.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Aa.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 b=this.network.ki(x);b===null&&(b=this.network.Bl(x)),b.charge=this.defaultCommentElectricalCharge,x=null;for(var E=b.destinationEdges;E.next();){var te=E.value;if(te.toVertex===a){x=te;break}}if(x===null){for(E=b.sourceEdges;E.next();)if(te=E.value,te.fromVertex===a){x=te;break}}x===null&&(x=this.network.Zj(a,b,null)),x.length=this.defaultCommentSpringLength}}};function zS(a,y){var x=a.bounds,b=x.x;a=x.y;var E=x.width;x=x.height;var te=y.bounds,ne=te.x;y=te.y;var ae=te.width;return te=te.height,b+E<ne?a>y+te?(x=b+E-ne,a=a-y-te,rn.sqrt(x*x+a*a)):a+x<y?(b=b+E-ne,a=a+x-y,rn.sqrt(b*b+a*a)):ne-(b+E):b>ne+ae?a>y+te?(x=b-ne-ae,a=a-y-te,rn.sqrt(x*x+a*a)):a+x<y?(b=b-ne-ae,a=a+x-y,rn.sqrt(b*b+a*a)):b-(ne+ae):a>y+te?a-(y+te):a+x<y?y-(a+x):.1}function HS(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 b=x.centerX,E=b,te=x=x.centerY,ne=1;ne<y.length;ne++){var ae=y[ne];ae.forceX=0,ae.forceY=0;var fe=ae.centerX;ae=ae.centerY,b=Math.min(b,fe),E=Math.max(E,fe),x=Math.min(x,ae),te=Math.max(te,ae)}(E=E-b>te-x)?y.sort(function(ct,Dt){return ct===null||Dt===null||ct===Dt?0:ct.centerX-Dt.centerX}):y.sort(function(ct,Dt){return ct===null||Dt===null||ct===Dt?0:ct.centerY-Dt.centerY}),x=a.Zf;var _e=b=ae=0;for(te=0;te<y.length;te++){ne=y[te],b=ne.bounds,ae=ne.focus,fe=b.x+ae.x;var Te=b.y+ae.y;b=ne.charge*a.electricalFieldX(fe,Te),_e=ne.charge*a.electricalFieldY(fe,Te),b+=ne.mass*a.gravitationalFieldX(fe,Te),_e+=ne.mass*a.gravitationalFieldY(fe,Te),ne.forceX+=b,ne.forceY+=_e;for(var je=te+1;je<y.length;je++){var Ve=y[je];if(Ve!==ne){b=Ve.bounds,ae=Ve.focus,_e=b.x+ae.x;var Qe=b.y+ae.y;if(fe-_e>x||_e-fe>x){if(E)break}else if(Te-Qe>x||Qe-Te>x){if(!E)break}else{var rt=zS(ne,Ve);1>rt?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new _0),rt=b.random(),ae=b.random(),fe>_e?(b=Math.abs(Ve.bounds.right-ne.bounds.x),b=(1+b)*rt):fe<_e?(b=Math.abs(Ve.bounds.x-ne.bounds.right),b=-(1+b)*rt):(b=Math.max(Ve.width,ne.width),b=(1+b)*rt-b/2),Te>Qe?(_e=Math.abs(Ve.bounds.bottom-ne.bounds.y),_e=(1+_e)*ae):fe<_e?(_e=Math.abs(Ve.bounds.y-ne.bounds.bottom),_e=-(1+_e)*ae):(_e=Math.max(Ve.height,ne.height),_e=(1+_e)*ae-_e/2)):(ae=-(ne.charge*Ve.charge)/(rt*rt),b=(_e-fe)/rt*ae,_e=(Qe-Te)/rt*ae),ne.forceX+=b,ne.forceY+=_e,Ve.forceX-=b,Ve.forceY-=_e}}}}for(E=a.network.edges.iterator;E.next();)ae=E.value,x=ae.fromVertex,te=ae.toVertex,ne=x.bounds,fe=x.focus,b=ne.x+fe.x,ne=ne.y+fe.y,Te=te.bounds,je=te.focus,fe=Te.x+je.x,Te=Te.y+je.y,je=zS(x,te),1>je?(je=a.randomNumberGenerator,je===null&&(a.randomNumberGenerator=je=new _0),ae=je.random(),je=je.random(),b=(b>fe?1:-1)*(1+(te.width>x.width?te.width:x.width))*ae,_e=(ne>Te?1:-1)*(1+(te.height>x.height?te.height:x.height))*je):(ae=ae.stiffness*(je-ae.length),b=(fe-b)/je*ae,_e=(Te-ne)/je*ae),x.forceX+=b,x.forceY+=_e,te.forceX-=b,te.forceY-=_e;for(E=b=0;E<y.length;E++)x=y[E],a.isFixed(x)?a.moveFixedVertex(x):b=Math.max(b,a.moveVertex(x)||0);return b>a.epsilonDistance*a.epsilonDistance}Aa.prototype.moveVertex=function(a){var y=a.forceX,x=a.forceY,b=this.moveLimit;return y<-b?y=-b:y>b&&(y=b),x<-b?x=-b:x>b&&(x=b),a.centerX+=y,a.centerY+=x,y*y+x*x},Aa.prototype.moveFixedVertex=function(){},Aa.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Aa.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=oo,y.toSpot=oo)}},Aa.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=kn.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,kn.free(x)}x=kn.alloc();for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;(a!==0||y!==0)&&(x.assign(E.bounds),x.x+=a,x.y+=y,E.bounds=x),E.commit()}kn.free(x)},Aa.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Aa.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Aa.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Aa.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Aa.prototype.electricalFieldX=function(){return 0},Aa.prototype.electricalFieldY=function(){return 0},Aa.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Aa.prototype.gravitationalFieldX=function(){return 0},Aa.prototype.gravitationalFieldY=function(){return 0},Aa.prototype.isFixed=function(a){return a.isFixed},Ye.Object.defineProperties(Aa.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"&&Nt('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())}}}),Aa.className="ForceDirectedLayout";function US(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}US.className="ForceDirectedSubnet";function Rf(a){To.call(this,a)}qe(Rf,To),Rf.prototype.createVertex=function(){return new Hg(this)},Rf.prototype.createEdge=function(){return new Ug(this)},Rf.className="ForceDirectedNetwork";function Hg(a){aa.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}qe(Hg,aa),Ye.Object.defineProperties(Hg.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)}}}),Hg.className="ForceDirectedVertex";function Ug(a){Gl.call(this,a),this.j=this.o=NaN}qe(Ug,Gl),Ye.Object.defineProperties(Ug.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)}}}),Ug.className="ForceDirectedEdge";function _0(){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()}_0.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},_0.className="RandomNumberGenerator";function vo(a){es.call(this),this.kc=this.ie=25,this.K=0,this.Dk=k0,this.Zk=A0,this.Qk=N0,this.bj=4,this.rk=O0,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 Mt,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}qe(vo,es),vo.prototype.cloneProtected=function(a){es.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},vo.prototype.qb=function(a){a.classType===vo?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:Nt("Unknown enum value: "+a):es.prototype.qb.call(this,a)},vo.prototype.createNetwork=function(){return new Np(this)},vo.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!==Wg&&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===Wg&&this.removeCycles(),a=this.network;for(var y=[],x=a.edges.iterator;x.next();){var b=x.value;b.valid=!1,y.push(b)}for(x=0;x<y.length;x++){b=y[x];var E=b.fromVertex,te=b.toVertex;if(!(b.valid||(E.node===null&&E.data===null||te.node===null&&te.data===null)&&E.layer===te.layer)){var ne=0,ae=0,fe=0,_e=0;if(b.link!==null){if(ae=b.link,ae===null)continue;var Te=E.node;if(ne=te.node,Te===null||ne===null)continue;var je=ae.fromNode;fe=ae.toNode;for(var Ve=ae.fromPort;Ve!==null&&!Ve.Ed();)Ve=Ve.panel;for(ae=ae.toPort;ae!==null&&!ae.Ed();)ae=ae.panel;if(b.rev){_e=je;var Qe=Ve;je=fe,Ve=ae,fe=_e,ae=Qe}var rt=E.focus;_e=te.focus;var ct=b.rev?te.bounds:E.bounds;Qe=Mt.alloc(),Te!==je?ct.w()&&je.isVisible()?je.actualBounds.w()?(Dh(je,Ve,jr,Qe),Qe.x+=je.actualBounds.x-ct.x,Qe.y+=je.actualBounds.y-ct.y):(Dh(je,Ve,jr,Qe),Qe.w()||Qe.assign(rt)):Qe.assign(rt):ct.w()?(Dh(je,Ve,jr,Qe),Qe.w()||Qe.assign(rt)):Qe.assign(rt),je=b.rev?E.bounds:te.bounds,Te=Mt.alloc(),ne!==fe?je.w()&&fe.isVisible()?fe.actualBounds.w()?(Dh(fe,ae,jr,Te),Te.x+=fe.actualBounds.x-je.x,Te.y+=fe.actualBounds.y-je.y):(Dh(fe,ae,jr,Te),Te.w()||Te.assign(_e)):Te.assign(_e):je.w()?(Dh(fe,ae,jr,Te),Te.w()||Te.assign(_e)):Te.assign(_e),this.K===90||this.K===270?(ne=Math.round((Qe.x-rt.x)/this.kc),fe=Qe.x,ae=Math.round((Te.x-_e.x)/this.kc),_e=Te.x):(ne=Math.round((Qe.y-rt.y)/this.kc),fe=Qe.y,ae=Math.round((Te.y-_e.y)/this.kc),_e=Te.y),Mt.free(Qe),Mt.free(Te),b.portFromColOffset=ne,b.portFromPos=fe,b.portToColOffset=ae,b.portToPos=_e}else b.portFromColOffset=0,b.portFromPos=0,b.portToColOffset=0,b.portToPos=0;if(Qe=E.layer,Te=te.layer,je=0,ct=b.link,ct!==null){var Dt=ct.fromPort,Lt=ct.toPort;if(Dt!==null&&Lt!==null){var Gt=ct.fromNode;if(Ve=ct.toNode,Gt!==null&&Ve!==null){var Zt=T0(this,!0),Vt=T0(this,!1),Qt=this.setsPortSpots?Zt:ct.computeSpot(!0,Dt);rt=this.setsPortSpots?Vt:ct.computeSpot(!1,Lt);var yn=ct.isOrthogonal;Qt.$c()&&Qt.Hf(Vt)&&rt.$c()&&rt.Hf(Zt)?je=0:(Zt=ct.getLinkPoint(Gt,Dt,Qt,!0,yn,Ve,Lt,Mt.alloc()),Vt=ct.getLinkDirection(Gt,Dt,Zt,Qt,!0,yn,Ve,Lt),Mt.free(Zt),Qt.ys()||Vt!==JS(this,b,!0)?this.setsPortSpots&&Gt!==null&&Gt.ports.count===1&&b.rev&&(je+=1):je+=1,Qt=ct.getLinkPoint(Ve,Lt,rt,!1,yn,Gt,Dt,Mt.alloc()),ct=ct.getLinkDirection(Ve,Lt,Qt,rt,!1,yn,Gt,Dt),Mt.free(Qt),rt.ys()||ct!==JS(this,b,!1)?this.setsPortSpots&&Ve!==null&&Ve.ports.count===1&&b.rev&&(je+=2):je+=2)}}}if(Ve=je,je=Ve===1||Ve===3,(Ve=Ve===2||Ve===3)&&(rt=a.createVertex(),rt.node=null,rt.Dj=1,rt.layer=Qe,rt.near=E,a.dh(rt),E=a.Zj(E,rt,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=ne,E.portToColOffset=0,E.portFromPos=fe,E.portToPos=0,E=rt),ct=1,je&&ct--,Qe-Te>ct&&0<Qe){for(b.valid=!1,rt=a.createVertex(),rt.node=null,rt.Dj=2,rt.layer=Qe-1,a.dh(rt),E=a.Zj(E,rt,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=Ve?0:ne,E.portToColOffset=0,E.portFromPos=Ve?0:fe,E.portToPos=0,E=rt,Qe--;Qe-Te>ct&&0<Qe;)rt=a.createVertex(),rt.node=null,rt.Dj=3,rt.layer=Qe-1,a.dh(rt),E=a.Zj(E,rt,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=rt,Qe--;E=a.Zj(rt,te,b.link),E.valid=!je,je&&(rt.near=te),E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=ae,E.portFromPos=0,E.portToPos=_e}else b.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=Sd(this,a),x=0,b=this.tc[a],te=0;te<b;te++)E=y[te],x+=this.nodeMinColumnSpace(E,!0),E.column=x,x+=1,x+=this.nodeMinColumnSpace(E,!1);this.Ra=Math.max(this.Ra,x-1),xd(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},vo.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}vo.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},vo.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 Sl(a){a.kj===null&&(a.kj=[]);for(var y=0,x=a.network.vertexes.iterator;x.next();){var b=x.value;a.kj[y]=b.layer,y++,a.kj[y]=b.column,y++,a.kj[y]=b.index,y++}return a.kj}function wu(a,y){var x=0;for(a=a.network.vertexes.iterator;a.next();){var b=a.value;b.layer=y[x],x++,b.column=y[x],x++,b.index=y[x],x++}}function GS(a,y,x){var b=Sd(a,y),E=a.tc[y];(a.Jn===null||a.Jn.length<E*E)&&(a.Jn=[]);for(var te=a.Jn,ne=0;ne<E;ne++){var ae=0,fe=b[ne],_e=fe.near;if(_e!==null&&_e.layer===fe.layer)if(fe=_e.index,fe>ne)for(var Te=ne+1;Te<fe;Te++){var je=b[Te];je.near===_e&&je.Dj===_e.Dj||ae++}else for(Te=ne-1;Te>fe;Te--)je=b[Te],je.near===_e&&je.Dj===_e.Dj||ae++;var Ve;if(0<=x)for(fe=b[ne].sourceEdgesArrayAccess,_e=0;_e<fe.length;_e++){var Qe=fe[_e];if(Qe.valid&&Qe.fromVertex.layer!==y)for(je=Qe.fromVertex.index,Te=Qe.portToPos,Qe=Qe.portFromPos,Ve=_e+1;Ve<fe.length;Ve++){var rt=fe[Ve];if(rt.valid&&rt.fromVertex.layer!==y){var ct=rt.fromVertex.index,Dt=rt.portToPos;rt=rt.portFromPos,Te<Dt&&(je>ct||je===ct&&Qe>rt)&&ae++,Dt<Te&&(ct>je||ct===je&&rt>Qe)&&ae++}}}if(0>=x){for(fe=b[ne].destinationEdgesArrayAccess,_e=0;_e<fe.length;_e++)if(Qe=fe[_e],Qe.valid&&Qe.toVertex.layer!==y)for(je=Qe.toVertex.index,Te=Qe.portToPos,Qe=Qe.portFromPos,Ve=_e+1;Ve<fe.length;Ve++)rt=fe[Ve],rt.valid&&rt.toVertex.layer!==y&&(ct=rt.toVertex.index,Dt=rt.portToPos,rt=rt.portFromPos,Qe<rt&&(je>ct||je===ct&&Te>Dt)&&ae++,rt<Qe&&(ct>je||ct===je&&Dt>Te)&&ae++)}for(te[ne*E+ne]=ae,fe=ne+1;fe<E;fe++){var Lt=0,Gt=0;if(0<=x){ae=b[ne].sourceEdgesArrayAccess;var Zt=b[fe].sourceEdgesArrayAccess;for(_e=0;_e<ae.length;_e++)if(Qe=ae[_e],Qe.valid&&Qe.fromVertex.layer!==y)for(je=Qe.fromVertex.index,Qe=Qe.portFromPos,Ve=0;Ve<Zt.length;Ve++)rt=Zt[Ve],rt.valid&&rt.fromVertex.layer!==y&&(ct=rt.fromVertex.index,rt=rt.portFromPos,(je<ct||je===ct&&Qe<rt)&&Gt++,(ct<je||ct===je&&rt<Qe)&&Lt++)}if(0>=x){for(ae=b[ne].destinationEdgesArrayAccess,Zt=b[fe].destinationEdgesArrayAccess,_e=0;_e<ae.length;_e++)if(Qe=ae[_e],Qe.valid&&Qe.toVertex.layer!==y)for(je=Qe.toVertex.index,Te=Qe.portToPos,Ve=0;Ve<Zt.length;Ve++)rt=Zt[Ve],rt.valid&&rt.toVertex.layer!==y&&(ct=rt.toVertex.index,Dt=rt.portToPos,(je<ct||je===ct&&Te<Dt)&&Gt++,(ct<je||ct===je&&Dt<Te)&&Lt++)}te[ne*E+fe]=Lt,te[fe*E+ne]=Gt}}return xd(a,y,b),te}vo.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=GS(this,y,1),b=this.tc[y],E=0;E<b;E++)for(var te=E;te<b;te++)a+=x[E*b+te];return a};function E0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var b=a,E=x,te=Sd(b,E),ne=b.tc[E],ae=0,fe=0;fe<ne;fe++){var _e=te[fe].destinationEdgesArrayAccess;if(_e!==null)for(var Te=0;Te<_e.length;Te++){var je=_e[Te];if(je.valid&&je.toVertex.layer!==E){var Ve=je.fromVertex.column+je.portFromColOffset,Qe=je.toVertex.column+je.portToColOffset;ae+=(Math.abs(Ve-Qe)+1)*gy(je)}}}xd(b,E,te),y+=ae}return y}vo.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 my(a,y,x){for(var b=Sd(a,y),E=a.tc[y],te=[],ne=0;ne<E;ne++){var ae=b[ne],fe=null;0>=x&&(fe=ae.sourceEdgesArrayAccess);var _e=null;0<=x&&(_e=ae.destinationEdgesArrayAccess);var Te=0,je=0,Ve=ae.near;if(Ve!==null&&Ve.layer===ae.layer&&(Te+=Ve.column-1,je++),fe!==null)for(Ve=0;Ve<fe.length;Ve++){ae=fe[Ve];var Qe=ae.fromVertex;ae.valid&&!ae.rev&&Qe.layer!==y&&(Te+=Qe.column,je++)}if(_e!==null)for(fe=0;fe<_e.length;fe++)ae=_e[fe],Ve=ae.toVertex,ae.valid&&!ae.rev&&Ve.layer!==y&&(Te+=Ve.column,je++);te[ne]=je===0?-1:Te/je}return xd(a,y,b),te}function WS(a,y,x){for(var b=Sd(a,y),E=a.tc[y],te=[],ne=0;ne<E;ne++){var ae=b[ne],fe=null;0>=x&&(fe=ae.sourceEdgesArrayAccess);var _e=null;0<=x&&(_e=ae.destinationEdgesArrayAccess);var Te=0,je=[],Ve=ae.near;if(Ve!==null&&Ve.layer===ae.layer&&(je[Te]=Ve.column-1,Te++),ae=void 0,fe!==null)for(Ve=0;Ve<fe.length;Ve++){ae=fe[Ve];var Qe=ae.fromVertex;ae.valid&&!ae.rev&&Qe.layer!==y&&(je[Te]=Qe.column+ae.portFromColOffset,Te++)}if(_e!==null)for(fe=0;fe<_e.length;fe++)ae=_e[fe],Ve=ae.toVertex,ae.valid&&!ae.rev&&Ve.layer!==y&&(je[Te]=Ve.column+ae.portToColOffset,Te++);Te===0?te[ne]=-1:(je.sort(function(rt,ct){return rt-ct}),_e=Te>>1,te[ne]=Te&1?je[_e]:je[_e-1]+je[_e]>>1)}return xd(a,y,b),te}function Gg(a,y,x,b,E,te){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();){var ae=ne.value,fe=ae.toVertex,_e=y.layer-fe.layer;ae=a.linkMinLength(ae),_e===ae&&Gg(a,fe,x,b,E,te)}if(te)for(ne=y.sourceEdges;ne.next();)ae=ne.value,fe=ae.fromVertex,_e=fe.layer-y.layer,ae=a.linkMinLength(ae),_e===ae&&Gg(a,fe,x,b,E,te)}}function vy(a,y,x,b,E,te){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();)vy(a,ne.value.toVertex,x,b,E,te);if(te)for(y=y.sourceEdges;y.next();)vy(a,y.value.fromVertex,x,b,E,te)}}vo.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case xy:a=this.network;var y=0,x=a.vertexes.count-1,b=[];b.length=x+1;for(var E=a.vertexes.iterator;E.next();)E.value.valid=!0;for(;zx(a)!==null;){for(E=ZS(a);E!==null;)b[x]=E,x--,E.valid=!1,E=ZS(a);for(E=KS(a);E!==null;)b[y]=E,y++,E.valid=!1,E=KS(a);E=null;for(var te=0,ne=this.network.vertexes.iterator;ne.next();){var ae=ne.value;if(ae.valid){for(var fe=0,_e=ae.destinationEdges;_e.next();)_e.value.toVertex.valid&&fe++;_e=0;for(var Te=ae.sourceEdges;Te.next();)Te.value.fromVertex.valid&&_e++;(E===null||te<fe-_e)&&(E=ae,te=fe-_e)}}E!==null&&(b[y]=E,y++,E.valid=!1)}for(y=0;y<a.vertexes.count;y++)b[y].index=y;for(b=a.edges.iterator;b.next();)y=b.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case k0:for(b=this.network.vertexes.iterator;b.next();)a=b.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,b.reset();b.next();)y=b.value,y.sourceEdges.count===0&&yy(this,y);for(b.reset();b.next();)y=b.value,y.Ll===-1&&yy(this,y);for(a.reset();a.next();)b=a.value,b.forest||(y=b.fromVertex,x=y.finish,E=b.toVertex,te=E.finish,E.Ll<y.Ll&&x<te&&(this.network.gm(b),b.rev=!0));break;case Wg:for(a=this.network,y=a.vertexes.iterator,b=1/0;y.next();)b=Math.min(b,y.value.layer);if(1/0>b){if(0>b)for(y.reset();y.next();)y.value.layer-=b;for(b=[],y.reset();y.next();)x=y.value,E=b[x.layer],E===void 0?b[x.layer]=[x]:E.push(x);for(x=y=0;x<b.length;x++)if(E=b[x],!E||E.length===0)y++;else if(0<x)for(te=0;te<E.length;te++)E[te].layer-=y;for(b=a.edges.iterator;b.next();)y=b.value,y.fromVertex.layer<y.toVertex.layer&&(a.gm(y),y.rev=!0)}}};function zx(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function ZS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.destinationEdges;b.next();)if(b.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function KS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.sourceEdges;b.next();)if(b.value.fromVertex.valid){x=!1;break}if(x)return y}}return null}function yy(a,y){y.Ll=a.Kn,a.Kn++;for(var x=y.destinationEdges;x.next();){var b=x.value,E=b.toVertex;E.Ll===-1&&(b.forest=!0,yy(a,E))}y.finish=a.Kn,a.Kn++}vo.prototype.assignLayers=function(){switch(this.Zk){case wy:VS(this);break;case by:for(var a,y=this.network.vertexes.iterator;y.next();)a=YS(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 A0:for(VS(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&XS(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 VS(a){for(var y=a.network.vertexes.iterator;y.next();){var x=$S(a,y.value);a.Ia=Math.max(x,a.Ia)}}function $S(a,y){var x=0;if(y.layer===-1){for(var b=y.destinationEdges;b.next();){var E=b.value,te=E.toVertex;E=a.linkMinLength(E),x=Math.max(x,$S(a,te)+E)}y.layer=x}else x=y.layer;return x}function YS(a,y){var x=0;if(y.layer===-1){for(var b=y.sourceEdges;b.next();){var E=b.value,te=E.fromVertex;E=a.linkMinLength(E),x=Math.max(x,YS(a,te)+E)}y.layer=x}else x=y.layer;return x}function XS(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)XS(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var b=y.sourceEdgesArrayAccess,E=b.length,te=0;te<E;te++){var ne=b[te],ae=ne.fromVertex,fe=ne.toVertex;ne=a.linkMinLength(ne),ae.layer-fe.layer>ne&&Gg(a,ae,0,-1,!0,!1)}for(Gg(a,y,1,-1,!0,!0);y.component!==0;){for(te=0,b=1/0,ae=0,fe=null,ne=a.network.vertexes.iterator;ne.next();){var _e=ne.value;if(_e.component===1){var Te=0,je=!1,Ve=_e.sourceEdgesArrayAccess;E=Ve.length;for(var Qe=0;Qe<E;Qe++){var rt=Ve[Qe],ct=rt.fromVertex;Te+=1,ct.component!==1&&(te+=1,ct=ct.layer-_e.layer,rt=a.linkMinLength(rt),b=Math.min(b,ct-rt))}for(Ve=_e.destinationEdgesArrayAccess,E=Ve.length,Qe=0;Qe<E;Qe++)rt=Ve[Qe].toVertex,--Te,rt.component!==1?--te:je=!0;(fe===null||Te<ae)&&!je&&(fe=_e,ae=Te)}}if(0<te){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer+=b);y.component=0}else fe.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(Gg(a,y,1,-1,!0,!1);y.component!==0;){for(b=0,E=1/0,te=0,ae=null,fe=a.network.vertexes.iterator;fe.next();)if(ne=fe.value,ne.component===1){for(_e=0,Te=!1,Ve=ne.sourceEdgesArrayAccess,je=Ve.length,Qe=0;Qe<je;Qe++)rt=Ve[Qe].fromVertex,_e+=1,rt.component!==1?b+=1:Te=!0;for(Ve=ne.destinationEdgesArrayAccess,je=Ve.length,Qe=0;Qe<je;Qe++)rt=Ve[Qe],ct=rt.toVertex,--_e,ct.component!==1&&(--b,ct=ne.layer-ct.layer,rt=a.linkMinLength(rt),E=Math.min(E,ct-rt));(ae===null||_e>te)&&!Te&&(ae=ne,te=_e)}if(0>b){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer-=E);y.component=0}else ae.component=0}}}function JS(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}vo.prototype.initializeIndices=function(){switch(this.Qk){default:case Py: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 N0: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&&QS(this,x);break;case Cy: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 QS(a,y){var x=y.layer;for(y.index=a.tc[x],a.tc[x]++,y=y.destinationEdgesArrayAccess,x=!0;x;){x=!1;for(var b=0;b<y.length-1;b++){var E=y[b],te=y[b+1];E.portFromColOffset>te.portFromColOffset&&(x=!0,y[b]=te,y[b+1]=E)}}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.toVertex,b.index===-1&&QS(a,b))}function qS(a,y){var x=y.layer;y.index=a.tc[x],a.tc[x]++,y=y.sourceEdgesArrayAccess;for(var b=!0;b;)for(b=!1,x=0;x<y.length-1;x++){var E=y[x],te=y[x+1];E.portToColOffset>te.portToColOffset&&(b=!0,y[x]=te,y[x+1]=E)}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.fromVertex,b.index===-1&&qS(a,b))}vo.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=Sl(this),x,b;for(x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)L0(this,b,1),Bu(this,b,1);var E=this.countCrossings();for(E<a&&(a=E,y=Sl(this)),b=this.Ia;0<=b;b--)L0(this,b,-1),Bu(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=Sl(this))}for(wu(this,y),x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)L0(this,b,0),Bu(this,b,0);for(E=this.countCrossings(),E<a&&(a=E,y=Sl(this)),b=this.Ia;0<=b;b--)L0(this,b,0),Bu(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=Sl(this))}wu(this,y);var te,ne,ae;switch(this.rk){case _y:break;case Ey:for(ae=a+1;(b=this.countCrossings())<ae;)for(ae=b,x=this.Ia;0<=x;x--)for(ne=0;ne<=x;ne++){for(te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,-1)||te;for(E=this.countCrossings(),E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,1)||te;for(E=this.countCrossings(),E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,1)||te;for(E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,-1)||te;for(E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,0)||te;for(E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,0)||te;E>=a?wu(this,y):(a=E,y=Sl(this))}break;default:case O0:for(x=this.Ia,ne=0,ae=a+1;(b=this.countCrossings())<ae;){for(ae=b,te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,-1)||te;for(E=this.countCrossings(),E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,1)||te;for(E=this.countCrossings(),E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,1)||te;for(E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,-1)||te;for(E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,0)||te;for(E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,0)||te;E>=a?wu(this,y):(a=E,y=Sl(this))}}wu(this,y)};function L0(a,y,x){var b=Sd(a,y),E=a.tc[y],te=WS(a,y,x),ne=my(a,y,x);for(x=0;x<E;x++)ne[x]===-1&&(ne[x]=b[x].column),te[x]===-1&&(te[x]=b[x].column);for(var ae=!0,fe;ae;)for(ae=!1,x=0;x<E-1;x++)(te[x+1]<te[x]||te[x+1]===te[x]&&ne[x+1]<ne[x])&&(ae=!0,fe=te[x],te[x]=te[x+1],te[x+1]=fe,fe=ne[x],ne[x]=ne[x+1],ne[x+1]=fe,fe=b[x],b[x]=b[x+1],b[x+1]=fe);for(x=te=0;x<E;x++)fe=b[x],fe.index=x,te+=a.nodeMinColumnSpace(fe,!0),fe.column=te,te+=1,te+=a.nodeMinColumnSpace(fe,!1);xd(a,y,b)}function Bu(a,y,x){var b=Sd(a,y),E=a.tc[y];x=GS(a,y,x);var te,ne=[];for(te=0;te<E;te++)ne[te]=-1;var ae=[];for(te=0;te<E;te++)ae[te]=-1;for(var fe=!1,_e=!0;_e;)for(_e=!1,te=0;te<E-1;te++){var Te=x[b[te].index*E+b[te+1].index],je=x[b[te+1].index*E+b[te].index],Ve=0,Qe=0,rt=b[te].column,ct=b[te+1].column,Dt=a.nodeMinColumnSpace(b[te],!0),Lt=a.nodeMinColumnSpace(b[te],!1),Gt=a.nodeMinColumnSpace(b[te+1],!0),Zt=a.nodeMinColumnSpace(b[te+1],!1);Dt=rt-Dt+Gt,Lt=ct-Lt+Zt;var Vt=b[te].sourceEdges.iterator;for(Vt.reset();Vt.next();)if(Gt=Vt.value,Zt=Gt.fromVertex,Gt.valid&&Zt.layer===y){for(Gt=0;b[Gt]!==Zt;)Gt++;Gt<te&&(Ve+=2*(te-Gt),Qe+=2*(te+1-Gt)),Gt===te+1&&(Ve+=1),Gt>te+1&&(Ve+=4*(Gt-te),Qe+=4*(Gt-(te+1)))}for(Vt=b[te].destinationEdges.iterator,Vt.reset();Vt.next();)if(Gt=Vt.value,Zt=Gt.toVertex,Gt.valid&&Zt.layer===y){for(Gt=0;b[Gt]!==Zt;)Gt++;Gt===te+1&&(Qe+=1)}for(Vt=b[te+1].sourceEdges.iterator,Vt.reset();Vt.next();)if(Gt=Vt.value,Zt=Gt.fromVertex,Gt.valid&&Zt.layer===y){for(Gt=0;b[Gt]!==Zt;)Gt++;Gt<te&&(Ve+=2*(te+1-Gt),Qe+=2*(te-Gt)),Gt===te&&(Qe+=1),Gt>te+1&&(Ve+=4*(Gt-(te+1)),Qe+=4*(Gt-te))}for(Vt=b[te+1].destinationEdges.iterator,Vt.reset();Vt.next();)if(Gt=Vt.value,Zt=Gt.toVertex,Gt.valid&&Zt.layer===y){for(Gt=0;b[Gt]!==Zt;)Gt++;Gt===te&&(Ve+=1)}Gt=Zt=0,Vt=ne[b[te].index];var Qt=ae[b[te].index],yn=ne[b[te+1].index],ri=ae[b[te+1].index];Vt!==-1&&(Zt+=Math.abs(Vt-rt),Gt+=Math.abs(Vt-Lt)),Qt!==-1&&(Zt+=Math.abs(Qt-rt),Gt+=Math.abs(Qt-Lt)),yn!==-1&&(Zt+=Math.abs(yn-ct),Gt+=Math.abs(yn-Dt)),ri!==-1&&(Zt+=Math.abs(ri-ct),Gt+=Math.abs(ri-Dt)),(Qe<Ve-.5||Qe===Ve&&je<Te-.5||Qe===Ve&&je===Te&&Gt<Zt-.5)&&(_e=fe=!0,b[te].column=Lt,b[te+1].column=Dt,Te=b[te],b[te]=b[te+1],b[te+1]=Te)}for(te=0;te<E;te++)b[te].index=te;return xd(a,y,b),fe}vo.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&$x)!==0;if(1e3<this.network.edges.count&&y&&(a=!1),a){var x=[];for(y=0;y<=this.Ia;y++)x[y]=0;for(var b,E=this.network.vertexes.iterator;E.next();){var te=E.value;y=te.layer,b=te.column,te=this.nodeMinColumnSpace(te,!1),x[y]=Math.max(x[y],b+te)}for(E.reset();E.next();)te=E.value,y=te.layer,b=te.column,te.column=(8*(this.Ra-x[y])>>1)+8*b;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=Ap(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Ap(this,y,-1)||x;x=Ap(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)Sy(this,y,1);for(y=this.Md-1;0<=y;y--)Sy(this,y,-1);Sy(this,this.Md,0)}if(a&&(ex(this,-1),ex(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Ap(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Ap(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Ap(this,y,0)||x}}else Wx(this)};function Ap(a,y,x){for(var b=!1;Hx(a,y,x);)b=!0;return b}function Hx(a,y,x){var b,E=Sd(a,y),te=a.tc[y],ne=my(a,y,-1);if(0<x)for(b=0;b<te;b++)ne[b]=-1;var ae=my(a,y,1);if(0>x)for(b=0;b<te;b++)ae[b]=-1;for(var fe=!1,_e=!0;_e;)for(_e=!1,b=0;b<te;b++){var Te=E[b].column,je=a.nodeMinColumnSpace(E[b],!0),Ve=a.nodeMinColumnSpace(E[b],!1),Qe=0;0>b-1||Te-E[b-1].column-1>je+a.nodeMinColumnSpace(E[b-1],!1)?Qe=Te-1:Qe=Te,je=b+1>=te||E[b+1].column-Te-1>Ve+a.nodeMinColumnSpace(E[b+1],!0)?Te+1:Te;var rt=Ve=0,ct=0;if(0>=x)for(var Dt=E[b].sourceEdges.iterator;Dt.next();){var Lt=Dt.value,Gt=Lt.fromVertex;if(Lt.valid&&Gt.layer!==y){var Zt=gy(Lt),Vt=Lt.portFromColOffset;Lt=Lt.portToColOffset,Gt=Gt.column,Ve+=(Math.abs(Te+Lt-(Gt+Vt))+1)*Zt,rt+=(Math.abs(Qe+Lt-(Gt+Vt))+1)*Zt,ct+=(Math.abs(je+Lt-(Gt+Vt))+1)*Zt}}if(0<=x)for(Dt=E[b].destinationEdges.iterator;Dt.next();)Lt=Dt.value,Gt=Lt.toVertex,Lt.valid&&Gt.layer!==y&&(Zt=gy(Lt),Vt=Lt.portFromColOffset,Lt=Lt.portToColOffset,Gt=Gt.column,Ve+=(Math.abs(Te+Vt-(Gt+Lt))+1)*Zt,rt+=(Math.abs(Qe+Vt-(Gt+Lt))+1)*Zt,ct+=(Math.abs(je+Vt-(Gt+Lt))+1)*Zt);Lt=Vt=Zt=0,Dt=ne[E[b].index],Gt=ae[E[b].index],Dt!==-1&&(Zt+=Math.abs(Dt-Te),Vt+=Math.abs(Dt-Qe),Lt+=Math.abs(Dt-je)),Gt!==-1&&(Zt+=Math.abs(Gt-Te),Vt+=Math.abs(Gt-Qe),Lt+=Math.abs(Gt-je)),rt<Ve||rt===Ve&&Vt<Zt?(_e=fe=!0,E[b].column=Qe):(ct<Ve||ct===Ve&&Lt<Zt)&&(_e=fe=!0,E[b].column=je)}return xd(a,y,E),a.normalize(),fe}function Sy(a,y,x){var b=Sd(a,y),E=a.tc[y],te=WS(a,y,x),ne=[];for(x=0;x<E;x++)ne[x]=te[x];for(te=!0;te;)for(te=!1,x=0;x<E;x++){var ae=b[x].column,fe=a.nodeMinColumnSpace(b[x],!0),_e=a.nodeMinColumnSpace(b[x],!1),Te=0;if(ne[x]===-1)if(x===0&&x===E-1)Te=ae;else if(x===0){var je=b[x+1].column;je-ae===_e+a.nodeMinColumnSpace(b[x+1],!0)?Te=ae-1:Te=ae}else x===E-1?(je=b[x-1].column,Te=ae-je===fe+a.nodeMinColumnSpace(b[x-1],!1)?ae+1:ae):(je=b[x-1].column,fe=je+a.nodeMinColumnSpace(b[x-1],!1)+fe+1,je=b[x+1].column,_e=je-a.nodeMinColumnSpace(b[x+1],!0)-_e-1,Te=(fe+_e)/2|0);else x===0&&x===E-1?Te=ne[x]:x===0?(je=b[x+1].column,_e=je-a.nodeMinColumnSpace(b[x+1],!0)-_e-1,Te=Math.min(ne[x],_e)):x===E-1?(je=b[x-1].column,fe=je+a.nodeMinColumnSpace(b[x-1],!1)+fe+1,Te=Math.max(ne[x],fe)):(je=b[x-1].column,fe=je+a.nodeMinColumnSpace(b[x-1],!1)+fe+1,je=b[x+1].column,_e=je-a.nodeMinColumnSpace(b[x+1],!0)-_e-1,fe<ne[x]&&ne[x]<_e?Te=ne[x]:fe>=ne[x]?Te=fe:_e<=ne[x]&&(Te=_e));Te!==ae&&(te=!0,b[x].column=Te)}xd(a,y,b),a.normalize()}function Ux(a,y){for(var x=!0,b=a.network.vertexes.iterator;b.next();){var E=b.value,te=a.nodeMinColumnSpace(E,!0),ne=a.nodeMinColumnSpace(E,!1);if(E.column-te<=y&&E.column+ne>=y){x=!1;break}}if(a=!1,x)for(b.reset();b.next();)x=b.value,x.column>y&&(--x.column,a=!0);return a}function Gx(a,y){var x=y+1,b,E=[],te=[];for(b=0;b<=a.Ia;b++)E[b]=!1,te[b]=!1;for(var ne=a.network.vertexes.iterator;ne.next();){b=ne.value;var ae=b.column-a.nodeMinColumnSpace(b,!0),fe=b.column+a.nodeMinColumnSpace(b,!1);ae<=y&&fe>=y&&(E[b.layer]=!0),ae<=x&&fe>=x&&(te[b.layer]=!0)}for(ae=!0,x=!1,b=0;b<=a.Ia;b++)ae=ae&&!(E[b]&&te[b]);if(ae)for(ne.reset();ne.next();)a=ne.value,a.column>y&&(--a.column,x=!0);return x}function ex(a,y){for(var x=0;x<=a.Ra;x++)for(;Ux(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Gx(a,x););a.normalize();var b;if(0<y)for(x=0;x<=a.Ra;x++){var E=Sl(a),te=E0(a);for(b=te+1;te<b;){b=te,tx(a,x,1);var ne=E0(a);ne>te?wu(a,E):ne<te&&(te=ne,E=Sl(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=Sl(a),te=E0(a),b=te+1;te<b;)b=te,tx(a,x,-1),ne=E0(a),ne>te?wu(a,E):ne<te&&(te=ne,E=Sl(a));a.normalize()}function tx(a,y,x){a.le=0;for(var b=a.network.vertexes.iterator;b.next();)b.value.component=-1;if(0<x)for(b.reset();b.next();){var E=b.value;E.column-a.nodeMinColumnSpace(E,!0)<=y&&(E.component=a.le)}if(0>x)for(b.reset();b.next();)E=b.value,E.column+a.nodeMinColumnSpace(E,!1)>=y&&(E.component=a.le);for(a.le++,b.reset();b.next();)y=b.value,y.component===-1&&(vy(a,y,a.le,-1,!0,!0),a.le++);var te;for(y=[],te=0;te<a.le*a.le;te++)y[te]=!1;for(E=[],te=0;te<(a.Ia+1)*(a.Ra+1);te++)E[te]=-1;for(b.reset();b.next();){te=b.value;for(var ne=te.layer,ae=Math.max(0,te.column-a.nodeMinColumnSpace(te,!0)),fe=Math.min(a.Ra,te.column+a.nodeMinColumnSpace(te,!1));ae<=fe;ae++)E[ne*(a.Ra+1)+ae]=te.component}for(te=0;te<=a.Ia;te++){if(0<x)for(ne=0;ne<a.Ra;ne++)E[te*(a.Ra+1)+ne]!==-1&&E[te*(a.Ra+1)+ne+1]!==-1&&E[te*(a.Ra+1)+ne]!==E[te*(a.Ra+1)+ne+1]&&(y[E[te*(a.Ra+1)+ne]*a.le+E[te*(a.Ra+1)+ne+1]]=!0);if(0>x)for(ne=a.Ra;0<ne;ne--)E[te*(a.Ra+1)+ne]!==-1&&E[te*(a.Ra+1)+ne-1]!==-1&&E[te*(a.Ra+1)+ne]!==E[te*(a.Ra+1)+ne-1]&&(y[E[te*(a.Ra+1)+ne]*a.le+E[te*(a.Ra+1)+ne-1]]=!0)}for(E=[],te=0;te<a.le;te++)E[te]=!0;for(ne=[],ne.push(0);ne.length!==0;)if(fe=ne[ne.length-1],ne.pop(),E[fe])for(E[fe]=!1,te=0;te<a.le;te++)y[fe*a.le+te]&&ne.splice(0,0,te);if(0<x)for(b.reset();b.next();)a=b.value,E[a.component]&&--a.column;if(0>x)for(b.reset();b.next();)x=b.value,E[x.component]&&(x.column+=1)}function Wx(a){for(var y=Hn(),x=a.fl.length,b=0;b<=x;b++)y[b]=[];for(b=a.network.vertexes.iterator;b.next();){var E=b.value;y[x-E.layer][E.index]=E}x=new In,Zx(y,x);var te=null,ne=null,ae=null,fe=null,_e=(a.ve&1)!==0,Te=(a.ve&2)!==0,je=(a.ve&4)!==0,Ve=(a.ve&8)!==0;for(_e&&(a.verticalAlignment(y,x,!0),te=M0(a,y,!0,!1)),y.reverse(),je&&(a.verticalAlignment(y,x,!1),ae=M0(a,y,!1,!1)),b=Or(y),E=b.next();!E.done;E=b.next())E.value.reverse();Ve&&(a.verticalAlignment(y,x,!1),fe=M0(a,y,!1,!0)),y.reverse(),Te&&(a.verticalAlignment(y,x,!0),ne=M0(a,y,!0,!0)),ei(y),a.u(te,ne,ae,fe),a.network.vertexes.each(function(Qe){var rt=Hn();_e&&rt.push(te.get(Qe)),Te&&rt.push(ne.get(Qe)),je&&rt.push(ae.get(Qe)),Ve&&rt.push(fe.get(Qe)),rt.sort(function(Dt,Lt){return Dt-Lt});var ct=rt.length;ct=(rt[Math.floor((ct-1)/2)]+rt[Math.ceil((ct-1)/2)])/2,ei(rt),Qe.zc=ct})}function Zx(a,y){for(var x=a.length,b=1;b<x-1;b++)for(var E=0,te=0,ne=a[b],ae=a[b+1],fe=0;te<ae.length;fe++){var _e=ae[fe];e:{if(_e.node===null){var Te=Ly(_e);if(0<Te.length){Te=Te[0].node===null;break e}}Te=!1}var je=Te;if(fe===ae.length-1||je){for(Te=ne.length-1,je&&(Te=Ly(_e)[0].index);te<=fe;){if(_e=ae[te],!_e.bo){je=[];for(var Ve=Or(_e.sourceEdgesArrayAccess),Qe=Ve.next();!Qe.done;Qe=Ve.next())Qe=Qe.value,Qe.valid&&je.push(Qe);_e.bo=je}for(_e=Or(_e.bo),je=_e.next();!je.done;je=_e.next())je=je.value,Ve=je.fromVertex.index,(Ve<E||Ve>Te)&&y.add(je);te++}E=Te}}}vo.prototype.verticalAlignment=function(a,y,x){Kx(a),a=Or(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=Or(b.value);for(var te=b.next();!te.done;te=b.next()){te=te.value;var ne=x?Ly(te):Yx(te),ae=ne.length;if(0<ae){ne.sort(function(je,Ve){return je.vi-Ve.vi});var fe=(ae-1)/2;for(ae=Math.floor(fe),fe=Math.ceil(fe);ae<=fe;ae++)if(te.align===te){var _e=ne[ae],Te=void 0;Te=x?I0(_e,te):I0(te,_e),!y.contains(Te)&&E<_e.vi&&(_e.align=te,te.root=_e.root,te.align=_e.root,E=_e.vi)}}}}};function Kx(a){for(var y=0;y<a.length;y++)for(var x=a[y],b=0;b<x.length;b++){var E=x[b];E.root=E,E.align=E,E.Tz=y,E.vi=b}}function M0(a,y,x,b){for(var E=a.K===90||a.K===270,te=Or(y),ne=te.next();!ne.done;ne=te.next()){var ae=Or(ne.value);for(ne=ae.next();!ne.done;ne=ae.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,te=Or(y),ae=te.next();!ae.done;ae=te.next()){ae=Or(ae.value);for(var fe=ae.next();!fe.done;fe=ae.next())if(fe=fe.value,fe.root===fe){for(var _e=0,Te=fe;Te.align!==fe;){var je=Te.align,Ve=ne?Te.width:Te.height,Qe=ne?je.width:je.height;if(x){var rt=I0(Te,je),ct=rt.portFromPos,Dt=rt.portToPos;rt.link!==null&&(Te.node&&Te.node!==rt.link.fromNode&&(ct=ne?Te.focusX:Te.focusY),je.node&&je.node!==rt.link.toNode&&(Dt=ne?je.focusX:je.focusY))}else rt=I0(je,Te),ct=rt.portToPos,Dt=rt.portFromPos,rt.link!==null&&(Te.node&&Te.node!==rt.link.toNode&&(ct=ne?Te.focusX:Te.focusY),je.node&&je.node!==rt.link.fromNode&&(Dt=ne?je.focusX:je.focusY));Ve=b?Te.qg+(Ve-ct)-(Qe-Dt):Te.qg+ct-Dt,je.qg=Ve,_e=Math.min(_e,Ve),Te=Te.align}Te=fe;do Te.qg=Te.qg-_e,Te=Te.align;while(Te!==fe)}}for(x=Or(y),ne=x.next();!ne.done;ne=x.next())for(te=Or(ne.value),ne=te.next();!ne.done;ne=te.next())ne=ne.value,ne.root===ne&&nx(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,ae=0;do{for(te=y[ne][ae];te.align!==te.root;)te=te.align,ne++,0<te.vi&&(ae=ix(te,y),ae.sd.shift=Math.min(ae.sd.shift,te.sd.shift+te.zc+te.qg-(ae.zc+ae.qg+(E?ae.width:ae.height)+a.columnSpacing)));ae=te.vi+1}while(ne<y.length&&ae<y[ne].length&&te.sd===y[ne][ae].sd)}for(a=new ci,y=Or(y),ne=y.next();!ne.done;ne=y.next())for(x=Or(ne.value),ne=x.next();!ne.done;ne=x.next())ne=ne.value,ne.zc=ne.zc+ne.sd.shift+ne.qg,te=E?ne.width:ne.height,a.add(ne,b?-ne.zc-te:ne.zc);return a}function nx(a,y,x){if(isNaN(y.zc)){y.zc=0;var b=y;do{if(0<b.vi){var E=ix(b,x),te=E.root;nx(a,te,x),y.sd===y&&(y.sd=te.sd);var ne=a.K===90||a.K===270?E.width:E.height;y.sd===te.sd&&(y.zc=Math.max(y.zc,te.zc+E.qg+ne-b.qg+a.columnSpacing))}b=b.align}while(b!==y);for(;b.align!==y;)b=b.align,b.zc=y.zc,b.sd=y.sd}}function ix(a,y){var x=a.Tz;return a=a.vi,1>a&&Nt("Could not determine previous vertex in layer"),y[x][a-1]}vo.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=Hn(),E=Hn(),te=1/0,ne=0;4>ne;ne++)if(y[ne]){var ae=Vx(this,y[ne],b,E,ne);ae<te&&(x=ne,te=ae)}for(te={},ne=0;4>ne;te={delta:te.delta},ne++)y[ne]&&(te.delta=ne===0||ne===2?b[x]-b[ne]:E[x]-E[ne],te.delta!==0&&y[ne].each(function(fe){return function(_e){_e.value+=fe.delta}}(te)));ei(b),ei(E)};function Vx(a,y,x,b,E){if(!y||y.count===0)return x[E]=0,b[E]=0,1/0;var te=1/0,ne=-1/0;return y.each(function(ae){var fe=ae.key;ae=ae.value,fe=a.K===90||a.K===270?fe.width:fe.height,ae<te&&(te=ae),ae+fe>ne&&(ne=ae+fe)}),x[E]=te,b[E]=ne,ne-te}vo.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=T0(this,!0),y=T0(this,!1),x=this.network.edges.iterator;x.next();){var b=x.value.link;b!==null&&(b.fromSpot=a,b.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function T0(a,y){return a.K===270?y?bs:Ks:a.K===90?y?Ks:bs:a.K===180?y?ks:Zs:y?Zs:ks}vo.prototype.commitNodes=function(){this.he=[],this.Ld=[],this.Kd=[],this.Ta=[];for(var a=0;a<=this.Ia;a++)this.he[a]=0,this.Ld[a]=0,this.Kd[a]=0,this.Ta[a]=0;for(a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;this.he[x]=Math.max(this.he[x],this.nodeMinLayerSpace(y,!0)),this.Ld[x]=Math.max(this.Ld[x],this.nodeMinLayerSpace(y,!1))}y=0,x=this.ie;for(var b=0;b<=this.Ia;b++){var E=x;0>=this.he[b]+this.Ld[b]&&(E=0),0<b&&(y+=E/2),this.K===90||this.K===0?(y+=this.Ld[b],this.Kd[b]=y,y+=this.he[b]):(y+=this.he[b],this.Kd[b]=y,y+=this.Ld[b]),b<this.Ia&&(y+=E/2),this.Ta[b]=y}for(x=y,y=this.arrangementOrigin,b=0;b<=this.Ia;b++)this.K===270?this.Kd[b]=y.y+this.Kd[b]:this.K===90?(this.Kd[b]=y.y+x-this.Kd[b],this.Ta[b]=x-this.Ta[b]):this.K===180?this.Kd[b]=y.x+this.Kd[b]:(this.Kd[b]=y.x+x-this.Kd[b],this.Ta[b]=x-this.Ta[b]);x=this.ve!==0,a.reset(),b=this.K===270||this.K===90;for(var te=1/0,ne=E=1/0,ae=-1/0;a.next();){var fe=a.value,_e=fe.layer,Te=fe.column|0;b?(ne=y.x+this.kc*Te,_e=this.Kd[_e]):(ne=this.Kd[_e],_e=y.y+this.kc*Te),fe.centerX=ne,fe.centerY=_e,x&&isFinite(fe.zc)&&(b?fe.node?fe.x=y.x+fe.zc:fe.centerX=y.x+fe.zc:fe.node?fe.y=y.y+fe.zc:fe.centerY=y.y+fe.zc),te=Math.min(fe.x,te),E=Math.min(fe.y,E),b?(ne=te,ae=Math.max(ae,fe.bounds.right)):(ne=E,ae=Math.max(ae,fe.bounds.bottom))}for(this.xw=ae-ne,te=y.x-te,y=y.y-E,this.Rf=new Mt(x&&b?0:te,x&&!b?0:y),a.reset();a.next();)x=a.value,x.x+=te,x.y+=y,x.commit()},vo.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 b=this.maxLayer;0<=b;b--)this.K===270?b===0?y.push(new kn(0,0,x,Math.abs(this.Ta[0]))):y.push(new kn(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new kn(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new kn(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new kn(0,0,Math.abs(this.Ta[0]),x)):y.push(new kn(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new kn(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new kn(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},vo.prototype.commitLayers=function(){},vo.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 b=y,E=b.fromNode,te=b.toNode,ne=b.fromPort,ae=b.toPort;if(E!==null){var fe=E.findVisibleNode();fe!==null&&fe!==E&&(E=fe,ne=fe.port)}te!==null&&(fe=te.findVisibleNode(),fe!==null&&fe!==te&&(te=fe,ae=fe.port));var _e=y.computeSpot(!0,ne);fe=y.computeSpot(!1,ae);var Te=x.fromVertex,je=x.toVertex;if(x.valid)y.curve===ou&&y.pointsCount===4&&(Te.column===je.column&&this.alignOption===0?(x=y.getLinkPoint(E,ne,_e,!0,!1,te,ae),ae=y.getLinkPoint(te,ae,fe,!1,!1,E,ne),x.w()||x.set(E.actualBounds.center),ae.w()||ae.set(te.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+ae.x)/3,(2*x.y+ae.y)/3),y.yf((x.x+2*ae.x)/3,(x.y+2*ae.y)/3),y.yf(ae.x,ae.y)):(x=b=!1,ne!==null&&_e===ms&&(b=!0),ae!==null&&fe===ms&&(x=!0),(b||x)&&(fe=null,b&&(fe=y.getLinkPointFromPoint(E,ne,ne.ga(jr),y.i(3),!0),fe.w()||fe.set(E.actualBounds.center),y.L(0,fe.x,fe.y)),E=null,x&&(E=y.getLinkPointFromPoint(te,ae,ae.ga(jr),y.i(0),!1),E.w()||E.set(te.actualBounds.center),y.L(3,E.x,E.y)),fe&&(te=y.i(2),y.L(1,(2*fe.x+te.x)/3,(2*fe.y+te.y)/3)),E&&(te=y.i(1),y.L(2,(2*E.x+te.x)/3,(2*E.y+te.y)/3))))),y.zf();else if(Te.layer===je.layer)y.zf();else{var Ve=!1,Qe=!1,rt=this.ie,ct=y.firstPickIndex+1;if(y.isOrthogonal){Qe=!0;var Dt=y.pointsCount;4<Dt&&y.points.removeRange(2,Dt-3)}else if(y.curve===ou)Ve=!0,Dt=y.pointsCount,4<Dt&&y.points.removeRange(2,Dt-3),Dt===4&&(ct=2);else{Dt=y.pointsCount;var Lt=_e===ms,Gt=fe===ms;2<Dt&&Lt&&Gt?y.points.removeRange(1,Dt-2):3<Dt&&Lt&&!Gt?y.points.removeRange(1,Dt-3):3<Dt&&!Lt&&Gt?y.points.removeRange(2,Dt-2):4<Dt&&!Lt&&!Gt&&y.points.removeRange(2,Dt-3)}if(x.rev){for(;je!==null&&Te!==je;){var Zt=Dt=null;for(Lt=je.sourceEdges.iterator;Lt.next()&&(Gt=Lt.value,Gt.link!==x.link||(Dt=Gt.fromVertex,Zt=Gt.toVertex,Dt.node!==null)););if(Dt===null)break;if(Dt!==Te){Lt=y.i(ct-1).x,Gt=y.i(ct-1).y;var Vt=Dt.centerX,Qt=Dt.centerY;if(Qe)this.K===180||this.K===0?ct===y.firstPickIndex+1?(y.m(ct++,Lt,Gt),y.m(ct++,Lt,Qt)):(Zt!==null?Zt.centerY:Gt)!==Qt&&(Zt=this.Ta[Dt.layer-1]+this.Rf.x,y.m(ct++,Zt,Gt),y.m(ct++,Zt,Qt)):ct===y.firstPickIndex+1?(y.m(ct++,Lt,Gt),y.m(ct++,Vt,Gt)):(Zt!==null?Zt.centerX:Lt)!==Vt&&(Zt=this.Ta[Dt.layer-1]+this.Rf.y,y.m(ct++,Lt,Zt),y.m(ct++,Vt,Zt));else if(ct===y.firstPickIndex+1){Zt=Math.max(10,this.he[je.layer]);var yn=Math.max(10,this.Ld[je.layer]);if(Ve)this.K===180?Vt<=je.bounds.x?(je=je.bounds.x,y.m(ct++,je-Zt,Qt),y.m(ct++,je,Qt),y.m(ct++,je+yn,Qt)):(y.m(ct++,Vt-Zt,Qt),y.m(ct++,Vt,Qt),y.m(ct++,Vt+yn,Qt)):this.K===90?Qt>=je.bounds.bottom?(je=je.bounds.y+je.bounds.height,y.m(ct++,Vt,je+yn),y.m(ct++,Vt,je),y.m(ct++,Vt,je-Zt)):(y.m(ct++,Vt,Qt+yn),y.m(ct++,Vt,Qt),y.m(ct++,Vt,Qt-Zt)):this.K===270?Qt<=je.bounds.y?(je=je.bounds.y,y.m(ct++,Vt,je-Zt),y.m(ct++,Vt,je),y.m(ct++,Vt,je+yn)):(y.m(ct++,Vt,Qt-Zt),y.m(ct++,Vt,Qt),y.m(ct++,Vt,Qt+yn)):this.K===0&&(Vt>=je.bounds.right?(je=je.bounds.x+je.bounds.width,y.m(ct++,je+yn,Qt),y.m(ct++,je,Qt),y.m(ct++,je-Zt,Qt)):(y.m(ct++,Vt+yn,Qt),y.m(ct++,Vt,Qt),y.m(ct++,Vt-Zt,Qt)));else{y.m(ct++,Lt,Gt);var ri=0;this.K===180||this.K===0?((this.K===180?Vt>=je.bounds.right:Vt<=je.bounds.x)&&(ri=(this.K===0?-Zt:yn)/2),y.m(ct++,Lt+ri,Qt)):((this.K===270?Qt>=je.bounds.bottom:Qt<=je.bounds.y)&&(ri=(this.K===90?-Zt:yn)/2),y.m(ct++,Vt,Gt+ri)),y.m(ct++,Vt,Qt)}}else Zt=Math.max(10,this.he[Dt.layer]),yn=Math.max(10,this.Ld[Dt.layer]),Ve?this.K===180?(y.m(ct++,Vt-Zt-rt,Qt),y.m(ct++,Math.min(Vt-Zt+rt/2,Vt),Qt),y.m(ct++,Vt,Qt),y.m(ct++,Vt,Qt),y.m(ct++,Math.max(Vt+yn-rt/2,Vt),Qt),y.m(ct++,Vt+yn+rt,Qt)):this.K===90?(y.m(ct++,Vt,Qt+yn+rt),y.m(ct++,Vt,Math.max(Qt+yn-rt/2,Qt)),y.m(ct++,Vt,Qt),y.m(ct++,Vt,Qt),y.m(ct++,Vt,Math.min(Qt-Zt+rt/2,Qt)),y.m(ct++,Vt,Qt-Zt-rt)):this.K===270?(y.m(ct++,Vt,Qt-Zt-rt),y.m(ct++,Vt,Math.min(Qt-Zt+rt/2,Qt)),y.m(ct++,Vt,Qt),y.m(ct++,Vt,Qt),y.m(ct++,Vt,Math.max(Qt+yn-rt/2,Qt)),y.m(ct++,Vt,Qt+yn+rt)):(y.m(ct++,Vt+yn+rt,Qt),y.m(ct++,Math.max(Vt+yn-rt/2,Vt),Qt),y.m(ct++,Vt,Qt),y.m(ct++,Vt,Qt),y.m(ct++,Math.min(Vt-Zt+rt/2,Vt),Qt),y.m(ct++,Vt-Zt-rt,Qt)):y.m(ct++,Vt,Qt)}je=Dt}(ae===null||_e!==ms||Qe)&&(Lt=y.i(ct-1).x,Gt=y.i(ct-1).y,Vt=y.i(ct).x,Qt=y.i(ct).y,Qe?(rt=this.Ld[Te.layer],this.K===180||this.K===0?(Qe=Gt,Qe>=Te.bounds.y&&Qe<=Te.bounds.bottom&&(this.K===180?Vt>=Te.bounds.x:Vt<=Te.bounds.right)&&(je=Te.centerX+(this.K===180?-rt:rt),Qe<Te.bounds.y+Te.bounds.height/2?Qe=Te.bounds.y-this.kc/2:Qe=Te.bounds.bottom+this.kc/2,y.m(ct++,je,Gt),y.m(ct++,je,Qe)),y.m(ct++,Vt,Qe)):(Qe=Lt,Qe>=Te.bounds.x&&Qe<=Te.bounds.right&&(this.K===270?Qt>=Te.bounds.y:Qt<=Te.bounds.bottom)&&(je=Te.centerY+(this.K===270?-rt:rt),Qe<Te.bounds.x+Te.bounds.width/2?Qe=Te.bounds.x-this.kc/2:Qe=Te.bounds.right+this.kc/2,y.m(ct++,Lt,je),y.m(ct++,Qe,je)),y.m(ct++,Qe,Qt)),y.m(ct++,Vt,Qt)):Ve?(Zt=Math.max(10,this.he[Te.layer]),yn=Math.max(10,this.Ld[Te.layer]),this.K===180&&Vt>=Te.bounds.x?(je=Te.bounds.x+Te.bounds.width,y.L(ct-2,je,Gt),y.L(ct-1,je+yn,Gt)):this.K===90&&Qt<=Te.bounds.bottom?(je=Te.bounds.y,y.L(ct-2,Lt,je),y.L(ct-1,Lt,je-Zt)):this.K===270&&Qt>=Te.bounds.y?(je=Te.bounds.y+Te.bounds.height,y.L(ct-2,Lt,je),y.L(ct-1,Lt,je+yn)):this.K===0&&Vt<=Te.bounds.right&&(je=Te.bounds.x,y.L(ct-2,je,Gt),y.L(ct-1,je-Zt,Gt))):(Zt=Math.max(10,this.he[Te.layer]),yn=Math.max(10,this.Ld[Te.layer]),Qe=0,this.K===180||this.K===0?((this.K===180?Vt<=Te.bounds.x:Vt>=Te.bounds.right)&&(Qe=(this.K===0?yn:-Zt)/2),y.m(ct++,Vt+Qe,Gt)):((this.K===270?Qt<=Te.bounds.y:Qt>=Te.bounds.bottom)&&(Qe=(this.K===90?yn:-Zt)/2),y.m(ct++,Lt,Qt+Qe)),y.m(ct++,Vt,Qt)))}else{for(;Te!==null&&Te!==je;){for(Zt=Dt=null,Te=Te.destinationEdges.iterator;Te.next()&&(Lt=Te.value,Lt.link!==x.link||(Dt=Lt.toVertex,Zt=Lt.fromVertex,Zt.node!==null&&(Zt=null),Dt.node!==null)););if(Dt===null)break;Dt!==je&&(Lt=y.i(ct-1).x,Gt=y.i(ct-1).y,Vt=Dt.centerX,Qt=Dt.centerY,Qe?this.K===180||this.K===0?(Zt!==null?Zt.centerY:Gt)!==Qt&&(Zt=this.Ta[Dt.layer]+this.Rf.x,ct===y.firstPickIndex+1&&(Zt=this.K===0?Math.max(Zt,Lt):Math.min(Zt,Lt)),y.m(ct++,Zt,Gt),y.m(ct++,Zt,Qt)):(Zt!==null?Zt.centerX:Lt)!==Vt&&(Zt=this.Ta[Dt.layer]+this.Rf.y,ct===y.firstPickIndex+1&&(Zt=this.K===90?Math.max(Zt,Gt):Math.min(Zt,Gt)),y.m(ct++,Lt,Zt),y.m(ct++,Vt,Zt)):(Zt=Math.max(10,this.he[Dt.layer]),yn=Math.max(10,this.Ld[Dt.layer]),Ve?this.K===180?(y.m(ct++,Vt+yn+rt,Qt),y.m(ct++,Math.max(Vt+yn-rt/2,Vt),Qt),y.m(ct++,Vt,Qt),y.m(ct++,Vt,Qt),y.m(ct++,Math.min(Vt-Zt+rt/2,Vt),Qt),y.m(ct++,Vt-Zt-rt,Qt)):this.K===90?(y.m(ct++,Vt,Qt-Zt-rt),y.m(ct++,Vt,Math.min(Qt-Zt+rt/2,Qt)),y.m(ct++,Vt,Qt),y.m(ct++,Vt,Qt),y.m(ct++,Vt,Math.max(Qt+yn-rt/2,Qt)),y.m(ct++,Vt,Qt+yn+rt)):this.K===270?(y.m(ct++,Vt,Qt+yn+rt),y.m(ct++,Vt,Math.max(Qt+yn-rt/2,Qt)),y.m(ct++,Vt,Qt),y.m(ct++,Vt,Qt),y.m(ct++,Vt,Math.min(Qt-Zt+rt/2,Qt)),y.m(ct++,Vt,Qt-Zt-rt)):(y.m(ct++,Vt-Zt-rt,Qt),y.m(ct++,Math.min(Vt-Zt+rt/2,Vt),Qt),y.m(ct++,Vt,Qt),y.m(ct++,Vt,Qt),y.m(ct++,Math.max(Vt+yn-rt/2,Vt),Qt),y.m(ct++,Vt+yn+rt,Qt)):this.K===180?(y.m(ct++,Vt+yn,Qt),y.m(ct++,Vt-Zt,Qt)):this.K===90?(y.m(ct++,Vt,Qt-Zt),y.m(ct++,Vt,Qt+yn)):this.K===270?(y.m(ct++,Vt,Qt+yn),y.m(ct++,Vt,Qt-Zt)):(y.m(ct++,Vt-Zt,Qt),y.m(ct++,Vt+yn,Qt)))),Te=Dt}Qe&&(Lt=y.i(ct-1).x,Gt=y.i(ct-1).y,Vt=y.i(ct).x,Qt=y.i(ct).y,this.K===180||this.K===0?Gt!==Qt&&(Zt=this.K===0?Math.min(Math.max((Vt+Lt)/2,this.Ta[je.layer]+this.Rf.x),Vt):Math.max(Math.min((Vt+Lt)/2,this.Ta[je.layer]+this.Rf.x),Vt),y.m(ct++,Zt,Gt),y.m(ct++,Zt,Qt)):Lt!==Vt&&(Zt=this.K===90?Math.min(Math.max((Qt+Gt)/2,this.Ta[je.layer]+this.Rf.y),Qt):Math.max(Math.min((Qt+Gt)/2,this.Ta[je.layer]+this.Rf.y),Qt),y.m(ct++,Lt,Zt),y.m(ct++,Vt,Zt)))}b!==null&&Ve&&4<=y.pointsCount&&(ne!==null&&(ne=_e===ms?y.getLinkPointFromPoint(E,ne,ne.ga(jr),y.i(3),!0):y.i(0),_e===ms&&(_e=y.i(2),b=y.i(3),this.direction===90||this.direction===270?(y.L(1,(ne.x+_e.x)/2,_e.y),y.L(2,b.x,(_e.y+b.y)/2)):(y.L(1,_e.x,(ne.y+_e.y)/2),y.L(2,(_e.x+b.x)/2,b.y))),ne.w()||ne.set(E.actualBounds.center),y.L(0,ne.x,ne.y)),ae!==null&&(E=fe===ms?y.getLinkPointFromPoint(te,ae,ae.ga(jr),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),fe===ms&&(ae=y.i(y.pointsCount-3),fe=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(E.x+ae.x)/2,ae.y),y.L(y.pointsCount-2,fe.x,(ae.y+fe.y)/2)):(y.L(y.pointsCount-2,ae.x,(E.y+ae.y)/2),y.L(y.pointsCount-3,(ae.x+fe.x)/2,fe.y))),E.w()||E.set(te.actualBounds.center),y.L(y.pointsCount-1,E.x,E.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},vo.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new Bn,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 b=a.value;if(b!==null&&b.isOrthogonal)for(var E=2;E<b.pointsCount-3;E++){var te=b.i(E),ne=b.i(E+1);if(this.B(te.y,ne.y)&&!this.B(te.x,ne.x)){var ae=new wd;ae.layer=Math.floor(te.y/2);var fe=b.i(0),_e=b.i(b.pointsCount-1);if(ae.first=fe.x*fe.x+fe.y,ae.jc=_e.x*_e.x+_e.y,ae.rd=Math.min(te.x,ne.x),ae.Ic=Math.max(te.x,ne.x),ae.index=E,ae.link=b,E+2<b.pointsCount){fe=b.i(E-1),_e=b.i(E+2);var Te=0;fe.y<te.y?Te=_e.y<te.y?3:te.x<ne.x?2:1:fe.y>te.y&&(Te=_e.y>te.y?0:ne.x<te.x?2:1),ae.j=Te}x.push(ae)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(te=x[a].layer,b=a+1;b<x.length&&x[b].layer===te;)b++;if(1<b-a)for(te=a;te<b;){for(ne=x[te].Ic,E=a+1;E<b&&x[E].rd<ne;)ne=Math.max(ne,x[E].Ic),E++;if(ne=E-te,1<ne){for(this.zi(x,this.Js,te,te+ne),Te=1,ae=x[te].jc,fe=te;fe<E;fe++)_e=x[fe],_e.jc!==ae&&(Te++,ae=_e.jc);this.zi(x,this.Ux,te,te+ne);var je=1;for(ae=x[te].first,fe=te;fe<E;fe++)_e=x[fe],_e.first!==ae&&(je++,ae=_e.first);for(fe=!0,_e=je,Te<je?(fe=!1,_e=Te,ae=x[te].jc,this.zi(x,this.Js,te,te+ne)):ae=x[te].first,Te=0,je=te;je<E;je++){var Ve=x[je];(fe?Ve.first:Ve.jc)!==ae&&(Te++,ae=fe?Ve.first:Ve.jc);var Qe=Ve.link;te=Qe.i(Ve.index),ne=Qe.i(Ve.index+1);var rt=this.linkSpacing*(Te-(_e-1)/2);y++,Qe.uh(),Qe.L(Ve.index,te.x,te.y+rt),Qe.L(Ve.index+1,ne.x,ne.y+rt),Qe.zf()}}te=E}a=b}}else{for(y=0,x=[],a=a.iterator;a.next();)if(b=a.value,b!==null&&b.isOrthogonal)for(E=2;E<b.pointsCount-3;E++)te=b.i(E),ne=b.i(E+1),this.B(te.x,ne.x)&&!this.B(te.y,ne.y)&&(ae=new wd,ae.layer=Math.floor(te.x/2),fe=b.i(0),_e=b.i(b.pointsCount-1),ae.first=fe.x+fe.y*fe.y,ae.jc=_e.x+_e.y*_e.y,ae.rd=Math.min(te.y,ne.y),ae.Ic=Math.max(te.y,ne.y),ae.index=E,ae.link=b,E+2<b.pointsCount&&(fe=b.i(E-1),_e=b.i(E+2),Te=0,fe.x<te.x?Te=_e.x<te.x?3:te.y<ne.y?2:1:fe.x>te.x&&(Te=_e.x>te.x?0:ne.y<te.y?2:1),ae.j=Te),x.push(ae));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(te=x[a].layer,b=a+1;b<x.length&&x[b].layer===te;)b++;if(1<b-a)for(te=a;te<b;){for(ne=x[te].Ic,E=a+1;E<b&&x[E].rd<ne;)ne=Math.max(ne,x[E].Ic),E++;if(ne=E-te,1<ne){for(this.zi(x,this.Js,te,te+ne),Te=1,ae=x[te].jc,fe=te;fe<E;fe++)_e=x[fe],_e.jc!==ae&&(Te++,ae=_e.jc);for(this.zi(x,this.Ux,te,te+ne),je=1,ae=x[te].first,fe=te;fe<E;fe++)_e=x[fe],_e.first!==ae&&(je++,ae=_e.first);for(fe=!0,_e=je,Te<je?(fe=!1,_e=Te,ae=x[te].jc,this.zi(x,this.Js,te,te+ne)):ae=x[te].first,Te=0,je=te;je<E;je++)Ve=x[je],(fe?Ve.first:Ve.jc)!==ae&&(Te++,ae=fe?Ve.first:Ve.jc),Qe=Ve.link,te=Qe.i(Ve.index),ne=Qe.i(Ve.index+1),rt=this.linkSpacing*(Te-(_e-1)/2),y++,Qe.uh(),Qe.L(Ve.index,te.x+rt,te.y),Qe.L(Ve.index+1,ne.x+rt,ne.y),Qe.zf()}te=E}a=b}}}},it=vo.prototype,it.Vx=function(a,y){return a instanceof wd&&y instanceof wd&&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},it.Ux=function(a,y){return a instanceof wd&&y instanceof wd&&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},it.Js=function(a,y){return a instanceof wd&&y instanceof wd&&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},it.B=function(a,y){return a-=y,-1<a&&1>a},it.zi=function(a,y,x,b){var E=a.length,te=b-x;if(!(1>=te))if((0>x||x>=E-1)&&Nt("not in range 0 <= from < length: "+x),te===2)b=a[x],E=a[x+1],0<y(b,E)&&(a[x]=E,a[x+1]=b);else if(x===0)if(b>=E)a.sort(y);else for(x=a.slice(0,b),x.sort(y),y=0;y<b;y++)a[y]=x[y];else if(b>=E)for(b=a.slice(x),b.sort(y),y=x;y<E;y++)a[y]=b[y-x];else for(E=a.slice(x,b),E.sort(y),y=x;y<b;y++)a[y]=E[y-x]};function Sd(a,y){var x=a.tc[y];if(x>=a.He.length){for(var b=[],E=0;E<a.He.length;E++)b[E]=a.He[E];a.He=b}for(a.He[x]===void 0||a.He[x]===null?b=[]:(b=a.He[x],a.He[x]=null),a=a.fl[y],y=0;y<a.length;y++)x=a[y],b[x.index]=x;return b}function xd(a,y,x){a.He[a.tc[y]]=x}Ye.Object.defineProperties(vo.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()):Nt("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==xy&&a!==k0&&a!==Wg||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==A0&&a!==wy&&a!==by||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==N0&&a!==Cy&&a!==Py||(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!==_y&&a!==O0&&a!==Ey||(this.rk=a,this.C())}},packOption:{get:function(){return this.bg},set:function(a){this.bg!==a&&0<=a&&8>a&&(this.bg=a,this.C())}},alignOption:{get:function(){return this.ve},set:function(a){this.ve!==a&&0<=a&&16>a&&(this.ve=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},linkSpacing:{get:function(){return this.Cn},set:function(a){this.Cn!==a&&0<=a&&(this.Cn=a,this.C())}},maxLayer:{get:function(){return this.Ia}},maxIndex:{get:function(){return this.Iq}},maxColumn:{get:function(){return this.Ra}},minIndexLayer:{get:function(){return this.Hn}},maxIndexLayer:{get:function(){return this.Md}}});var k0=new Ln(vo,"CycleDepthFirst",0),xy=new Ln(vo,"CycleGreedy",1),Wg=new Ln(vo,"CycleFromLayers",2),A0=new Ln(vo,"LayerOptimalLinkLength",0),wy=new Ln(vo,"LayerLongestPathSink",1),by=new Ln(vo,"LayerLongestPathSource",2),N0=new Ln(vo,"InitDepthFirstOut",0),Cy=new Ln(vo,"InitDepthFirstIn",1),Py=new Ln(vo,"InitNaive",2),_y=new Ln(vo,"AggressiveNone",0),O0=new Ln(vo,"AggressiveLess",1),Ey=new Ln(vo,"AggressiveMore",2),$x=8;vo.className="LayeredDigraphLayout",vo.CycleDepthFirst=k0,vo.CycleGreedy=xy,vo.CycleFromLayers=Wg,vo.LayerOptimalLinkLength=A0,vo.LayerLongestPathSink=wy,vo.LayerLongestPathSource=by,vo.InitDepthFirstOut=N0,vo.InitDepthFirstIn=Cy,vo.InitNaive=Py,vo.AggressiveNone=_y,vo.AggressiveLess=O0,vo.AggressiveMore=Ey,vo.PackNone=0,vo.PackExpand=1,vo.PackStraighten=2,vo.PackMedian=4,vo.PackAll=15,vo.AlignNone=0,vo.AlignUpperLeft=1,vo.AlignUpperRight=2,vo.AlignLowerLeft=4,vo.AlignLowerRight=8,vo.AlignAll=15;function wd(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}wd.className="SegInfo";function Np(a){To.call(this,a)}qe(Np,To),Np.prototype.createVertex=function(){return new bu(this)},Np.prototype.createEdge=function(){return new Zg(this)},Np.className="LayeredDigraphNetwork";function bu(a){aa.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}qe(bu,aa);function rx(a,y){return a.index-y.index}function I0(a,y){if(!a.$n){for(var x=[],b=Or(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=Or(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Nt("Unable to find destination edge to given vertex")}function Ly(a){if(!a.co){for(var y=[],x=Or(a.sourceEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.fromVertex);y.sort(rx),a.co=y}return a.co}function Yx(a){if(!a.ao){for(var y=[],x=Or(a.destinationEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.toVertex);y.sort(rx),a.ao=y}return a.ao}bu.prototype.Cl=function(a){aa.prototype.Cl.call(this,a),this.bo=this.co=null},bu.prototype.Kl=function(a){aa.prototype.Kl.call(this,a),this.bo=this.co=null},bu.prototype.zl=function(a){aa.prototype.zl.call(this,a),this.$n=this.ao=null},bu.prototype.Jl=function(a){aa.prototype.Jl.call(this,a),this.$n=this.ao=null},Ye.Object.defineProperties(bu.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)}}}),bu.prototype.deleteDestinationEdge=bu.prototype.Jl,bu.prototype.addDestinationEdge=bu.prototype.zl,bu.prototype.deleteSourceEdge=bu.prototype.Kl,bu.prototype.addSourceEdge=bu.prototype.Cl,bu.className="LayeredDigraphVertex";function Zg(a){Gl.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}qe(Zg,Gl),Ye.Object.defineProperties(Zg.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)}}}),Zg.className="LayeredDigraphEdge";function Ar(a){es.call(this),this.Ub=new In,this.Wn=F0,this.ud=$c,this.vo=z0,this.Bq=Fy,this.$v=[],this.td=!0,this.Rb=H0,this.$d=new Qn(10,10).freeze();var y=new zf(this);this.W=new Fu(y),this.Y=new Fu(y),this.ru=[],a&&Object.assign(this,a)}qe(Ar,es),Ar.prototype.cloneProtected=function(a){es.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)},Ar.prototype.qb=function(a){a.classType===Ar?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:Nt("Unknown enum value: "+a):es.prototype.qb.call(this,a)},Ar.prototype.createNetwork=function(){return new zf(this)},Ar.prototype.makeNetwork=function(a){function y(b){if(b instanceof oi)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof $n){var E=b.fromNode;return E===null||E.isLinkLabel||E.category==="Comment"?!1:(b=b.toNode,!(b===null||b.isLinkLabel||b.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof vn?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof tr?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Ar.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==U0&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof vn&&(y=a),this.path===F0&&y!==null?this.ud=y.isTreePathToChildren?$c:Ff:this.ud=this.path===F0?$c: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 In,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof oi?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof Fu&&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,My(this,y));for(y=this.network.vertexes,a=null;a=Xx(y),0<a.count;)y=ox(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,My(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Fu&&ax(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Fu&&lx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Fu&&ux(this,y);if(this.Cu(),this.layerStyle===G0){for(a=[],y=this.network.vertexes.iterator;y.next();){x=y.value;var b=x.parent;b===null&&(b=x),b=b.angle===0||b.angle===180;var E=a[x.level];E===void 0&&(E=0),a[x.level]=Math.max(E,b?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,b=x.parent,b===null&&(b=x),b.angle===0||b.angle===180?(b.angle===180&&(x.focusX+=a[x.level]-x.width),x.width=a[x.level]):(b.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,b=-1,E=0;E<y.children.length;E++){var te=y.children[E];b=Math.max(b,x?te.width:te.height)}if(0<=b)for(E=0;E<y.children.length;E++)te=y.children[E],x?(y.angle===180&&(te.focusX+=b-te.width),te.width=b):(y.angle===270&&(te.focusY+=b-te.height),te.height=b)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Fu&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new In,this.isValidLayout=!0};function Xx(a){var y=new In;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Ar.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case $c:x.sourceEdges.count===0&&this.Ub.add(x);break;case Ff:x.destinationEdges.count===0&&this.Ub.add(x);break;default:Nt("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=ox(this,a),a!==null&&this.Ub.add(a))};function ox(a,y){var x=999999,b=null;for(y=y.iterator;y.next();){var E=y.value;switch(a.ud){case $c:E.sourceEdges.count<x&&(x=E.sourceEdges.count,b=E);break;case Ff:E.destinationEdges.count<x&&(x=E.destinationEdges.count,b=E);break;default:Nt("Unhandled path value "+a.ud.toString())}}return b}function My(a,y){if(y!==null){switch(a.ud){case $c:if(0<y.destinationEdges.count){for(var x=new Bn,b=y.destinationVertexes;b.next();){var E=b.value;sx(a,y,E)&&x.add(E)}0<x.count&&(y.children=x.Fa())}break;case Ff:if(0<y.sourceEdges.count){for(x=new Bn,b=y.sourceVertexes;b.next();)E=b.value,sx(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:Nt("Unhandled path value"+a.ud.toString())}for(x=y.children,b=x.length,E=0;E<b;E++){var te=x[E];te.initialized=!0,te.level=y.level+1,te.parent=y,a.Ub.remove(te)}for(y=0;y<b;y++)My(a,x[y])}}function sx(a,y,x){if(x.initialized){if(y===null)var b=!1;else{for(b=y.parent;b!==null&&b!==x;)b=b.parent;b=b===x}if(b||x.level>y.level)return!1;a.removeChild(x.parent,x)}return!0}Ar.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,b=0,E=0;E<x.length;E++)x[E]===y&&b++;if(0<b){b=Array(x.length-b);for(var te=E=0;te<x.length;te++)x[te]!==y&&(b[E++]=x[te]);a.children=b}}};function ax(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===Jc&&a.sortTreeVertexChildren(y);for(var x=0,b=y.childrenCount,E=0,te=y.children,ne=te.length,ae=0;ae<ne;ae++){var fe=te[ae];ax(a,fe),x+=fe.descendantCount+1,b=Math.max(b,fe.maxChildrenCount),E=Math.max(E,fe.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=b,y.maxGenerationCount=0<b?E+1:0}}function Jx(a,y){switch(a.vo){default:case z0:return y.parent!==null?y.parent:a.W;case Ry: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 Iy:var x=!0;if(y.childrenCount===0)x=!1;else for(var b=y.children,E=b.length,te=0;te<E;te++)if(0<b[te].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}Ar.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Jx(this,a)),a.parent!==null&&a.parent.alignment===Jc){for(var y=a.angle,x=a.parent.children,b=0;b<x.length&&a!==x[b];)b++;b%2===0?b!==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 lx(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,b=0;b<x;b++)lx(a,y[b])}}Ar.prototype.assignTreeVertexValues=function(){};function ux(a,y){if(y!==null){y.alignment!==Jc&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,b=0;b<x;b++)ux(a,y[b])}}Ar.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Op:break;case Vg:a.children.reverse();break;case $g:a.children.sort(a.comparer);break;case Yg:a.children.sort(a.comparer),a.children.reverse();break;default:Nt("Unhandled sorting value "+a.sorting.toString())}},Ar.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Ar.prototype.addComments=function(a){var y=a.angle,x=a.parent,b=0,E=!1;x!==null&&(b=x.angle,E=x.alignment,E=bd(E)),y=y===90||y===270,b=b===90||b===270,x=a.childrenCount===0;var te=0,ne=0,ae=0,fe=a.commentSpacing;if(a.node!==null)for(var _e=a.node.Mu();_e.next();){var Te=_e.value;Te.category==="Comment"&&Te.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(Te),Te.Va(),Te=Te.measuredBounds,y&&!x||!E&&!b&&x||E&&b&&x?(te=Math.max(te,Te.width),ne+=Te.height+Math.abs(ae)):(te+=Te.width+Math.abs(ae),ne=Math.max(ne,Te.height)),ae=fe)}a.comments!==null&&(y&&!x||!E&&!b&&x||E&&b&&x?(te+=Math.abs(a.commentMargin),ne=Math.max(0,ne-a.height)):(ne+=Math.abs(a.commentMargin),te=Math.max(0,te-a.width)),E=kn.allocAt(0,0,a.bounds.width+te,a.bounds.height+ne),a.bounds=E,kn.free(E))};function bd(a){return a===Hh||a===Jc||a===Uh||a===fh}function Kg(a){return a===Hh||a===Jc}function Ty(a){var y=a.parent;if(y!==null){var x=y.alignment;if(bd(x)){if(Kg(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===Uh)return!0}}return!1}Ar.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,b=a.angle,E=0,te=!1;x!==null&&(E=x.angle,te=x.alignment,te=bd(te)),b=b===90||b===270,x=E===90||E===270;for(var ne=a.childrenCount===0,ae=Ty(a),fe=0,_e=a.comments,Te=_e.length,je=Mt.alloc(),Ve=0;Ve<Te;Ve++){var Qe=_e[Ve],rt=Qe.measuredBounds;if(b&&!ne||!te&&!x&&ne||te&&x&&ne){if(135<E&&!te||x&&ae)if(0<=a.commentMargin)for(je.h(a.bounds.x-a.commentMargin-rt.width,a.bounds.y+fe),Qe.move(je),Qe=Qe.Sd();Qe.next();){var ct=Qe.value;ct.fromSpot=ks,ct.toSpot=Zs}else for(je.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+fe),Qe.move(je),Qe=Qe.Sd();Qe.next();)ct=Qe.value,ct.fromSpot=Zs,ct.toSpot=ks;else if(0<=a.commentMargin)for(je.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+fe),Qe.move(je),Qe=Qe.Sd();Qe.next();)ct=Qe.value,ct.fromSpot=Zs,ct.toSpot=ks;else for(je.h(a.bounds.x+a.commentMargin-rt.width,a.bounds.y+fe),Qe.move(je),Qe=Qe.Sd();Qe.next();)ct=Qe.value,ct.fromSpot=ks,ct.toSpot=Zs;fe=0<=a.commentSpacing?fe+(rt.height+a.commentSpacing):fe+(a.commentSpacing-rt.height)}else{if(135<E&&!te||!x&&ae)if(0<=a.commentMargin)for(je.h(a.bounds.x+fe,a.bounds.y-a.commentMargin-rt.height),Qe.move(je),Qe=Qe.Sd();Qe.next();)ct=Qe.value,ct.fromSpot=bs,ct.toSpot=Ks;else for(je.h(a.bounds.x+fe,a.bounds.y+2*a.focus.y-a.commentMargin),Qe.move(je),Qe=Qe.Sd();Qe.next();)ct=Qe.value,ct.fromSpot=Ks,ct.toSpot=bs;else if(0<=a.commentMargin)for(je.h(a.bounds.x+fe,a.bounds.y+2*a.focus.y+a.commentMargin),Qe.move(je),Qe=Qe.Sd();Qe.next();)ct=Qe.value,ct.fromSpot=Ks,ct.toSpot=bs;else for(je.h(a.bounds.x+fe,a.bounds.y+a.commentMargin-rt.height),Qe.move(je),Qe=Qe.Sd();Qe.next();)ct=Qe.value,ct.fromSpot=bs,ct.toSpot=Ks;fe=0<=a.commentSpacing?fe+(rt.width+a.commentSpacing):fe+(a.commentSpacing-rt.width)}}if(Mt.free(je),y=fe-a.commentSpacing-(b?y.height:y.width),this.ud===$c)for(a=a.destinationEdges;a.next();)E=a.value.link,E===null||E.isAvoiding||(E.fromEndSegmentLength=0<y?y:NaN);else for(a=a.sourceEdges;a.next();)E=a.value.link,E===null||E.isAvoiding||(E.toEndSegmentLength=0<y?y:NaN)}},Ar.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,b=0;b<x;b++)this.layoutTree(y[b]);switch(a.compaction){case j0:cx(this,a);break;case Xg:if(a.alignment===Jc)cx(this,a);else if(a.childrenCount===0)b=a.parent,x=!1,y=0,b!==null&&(y=b.angle,x=b.alignment,x=bd(x)),b=Ty(a),a.S.h(0,0),a.Da.h(a.width,a.height),a.parent===null||a.comments===null||(y!==180&&y!==270||x)&&!b?a.la.h(0,0):y===180&&!x||(y===90||y===270)&&b?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 E=qu(a);y=E===90||E===270;var te=0,ne=a.children,ae=ne.length;for(x=0;x<ae;x++)b=ne[x],te=Math.max(te,y?b.Da.width:b.Da.height);var fe=a.alignment;b=fe===Yc;var _e=fe===Xc,Te=bd(fe),je=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var Ve=a.nodeSpacing,Qe=this.computeNodeIndent(a),rt=a.rowSpacing,ct=0;(b||_e||a.hm||a.im&&a.maxGenerationCount===1)&&(ct=Math.max(0,a.rowIndent)),b=a.width;var Dt=a.height,Lt=0,Gt=0,Zt=0,Vt=null,Qt=null,yn=0,ri=0,fi=0,li=0,Vn=0,Rn=0,Qi=0,Zi=0;if(Te&&!Kg(fe)&&135<E&&ne.reverse(),Kg(fe))if(1<ae)for(var no=0;no<ae;no++)no%2===0&&no!==ae-1&&(Zi=Math.max(Zi,y?ne[no].Da.width:ne[no].Da.height));else ae===1&&(Zi=y?ne[0].Da.width:ne[0].Da.height);if(Te){switch(fe){case Hh:Gt=135>E?hx(this,a,ne,Zi,Lt,Gt):dx(this,a,ne,Zi,Lt,Gt),Zi=Gt.x,Lt=Gt.width,Gt=Gt.height;break;case Uh:for(Vt=0;Vt<ae;Vt++)Qt=ne[Vt],je=Qt.Da,Zt=Rn===0?0:rt,y?(Qt.S.h(te-je.width,li+Zt),Lt=Math.max(Lt,je.width),Gt=Math.max(Gt,li+Zt+je.height),li+=Zt+je.height):(Qt.S.h(fi+Zt,te-je.height),Lt=Math.max(Lt,fi+Zt+je.width),Gt=Math.max(Gt,je.height),fi+=Zt+je.width),Rn++;break;case fh:for(Vt=0;Vt<ae;Vt++)Qt=ne[Vt],te=Qt.Da,je=Rn===0?0:rt,y?(Qt.S.h(Ve/2+a.focus.x,li+je),Lt=Math.max(Lt,te.width),Gt=Math.max(Gt,li+je+te.height),li+=je+te.height):(Qt.S.h(fi+je,Ve/2+a.focus.y),Lt=Math.max(Lt,fi+je+te.width),Gt=Math.max(Gt,te.height),fi+=je+te.width),Rn++}Vt=Tl(this,2),Qt=Tl(this,2),y?(Vt[0].h(0,0),Vt[1].h(0,Gt),Qt[0].h(Lt,0)):(Vt[0].h(0,0),Vt[1].h(Lt,0),Qt[0].h(0,Gt)),Qt[1].h(Lt,Gt)}else for(no=0;no<ae;no++){var _o=ne[no],ha=_o.Da;if(y){0<je&&0<Rn&&fi+Ve+ha.width>je&&(fi<te&&af(a,fe,te-fi,0,Qi,no-1),Vn++,Rn=0,Qi=no,Zt=Gt,fi=0,li=135<E?-Gt-rt:Gt+rt),R0(this,_o,0,li);var pa=0;if(Rn===0)Vt=_o.Yo,Qt=_o.kp,yn=ha.width,ri=ha.height,(Vt===null||Qt===null||E!==qu(_o))&&(Vt=Tl(this,2),Qt=Tl(this,2),Vt[0].h(0,0),Vt[1].h(0,ri),Qt[0].h(yn,0),Qt[1].h(yn,ri));else{var Xa=Hn();ri=fx(this,a,_o,Vt,Qt,yn,ri,Xa),pa=ri.x,Vt=Xa[0],Qt=Xa[1],yn=ri.width,ri=ri.height,ei(Xa),fi<ha.width&&0>pa&&(Bf(a,-pa,0,Qi,no-1),B0(Vt,-pa,0),B0(Qt,-pa,0),pa=0)}_o.S.h(pa,li),Lt=Math.max(Lt,yn),Gt=Math.max(Gt,Zt+(Vn===0?0:rt)+ha.height),fi=yn}else 0<je&&0<Rn&&li+Ve+ha.height>je&&(li<te&&af(a,fe,0,te-li,Qi,no-1),Vn++,Rn=0,Qi=no,Zt=Lt,li=0,fi=135<E?-Lt-rt:Lt+rt),R0(this,_o,fi,0),pa=0,Rn===0?(Vt=_o.Yo,Qt=_o.kp,yn=ha.width,ri=ha.height,(Vt===null||Qt===null||E!==qu(_o))&&(Vt=Tl(this,2),Qt=Tl(this,2),Vt[0].h(0,0),Vt[1].h(yn,0),Qt[0].h(0,ri),Qt[1].h(yn,ri))):(Xa=Hn(),ri=fx(this,a,_o,Vt,Qt,yn,ri,Xa),pa=ri.x,Vt=Xa[0],Qt=Xa[1],yn=ri.width,ri=ri.height,ei(Xa),li<ha.height&&0>pa&&(Bf(a,0,-pa,Qi,no-1),B0(Vt,0,-pa),B0(Qt,0,-pa),pa=0)),_o.S.h(fi,pa),Gt=Math.max(Gt,ri),Lt=Math.max(Lt,Zt+(Vn===0?0:rt)+ha.width),li=ri;Rn++}switch(0<Vn&&(y?(Gt+=Math.max(0,x),fi<Lt&&af(a,fe,Lt-fi,0,Qi,ae-1),0<ct&&(_e||Bf(a,ct,0,0,ae-1),Lt+=ct)):(Lt+=Math.max(0,x),li<Gt&&af(a,fe,0,Gt-li,Qi,ae-1),0<ct&&(_e||Bf(a,0,ct,0,ae-1),Gt+=ct))),ct=_e=0,fe){case Ip:y?_e+=Lt/2-a.focus.x-Qe/2:ct+=Gt/2-a.focus.y-Qe/2;break;case jf:0<Vn?y?_e+=Lt/2-a.focus.x-Qe/2:ct+=Gt/2-a.focus.y-Qe/2:y?(Zi=ne[0].S.x+ne[0].la.x,_e+=Zi+(ne[ae-1].S.x+ne[ae-1].la.x+2*ne[ae-1].focus.x-Zi)/2-a.focus.x-Qe/2):(Zi=ne[0].S.y+ne[0].la.y,ct+=Zi+(ne[ae-1].S.y+ne[ae-1].la.y+2*ne[ae-1].focus.y-Zi)/2-a.focus.y-Qe/2);break;case Yc:y?(_e-=Qe,Lt+=Qe):(ct-=Qe,Gt+=Qe);break;case Xc:y?(_e+=Lt-a.width+Qe,Lt+=Qe):(ct+=Gt-a.height+Qe,Gt+=Qe);break;case Hh:y?1<ae?_e+=Zi+Ve/2-a.focus.x:_e+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<ae?ct+=Zi+Ve/2-a.focus.y:ct+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case Uh:y?_e+=Lt+Ve/2-a.focus.x:ct+=Gt+Ve/2-a.focus.y;break;case fh:break;default:Gt=this.customAlignment(a,_e,ct,Lt,Gt),_e=Gt[0],ct=Gt[1],Lt=Gt[2],Gt=Gt[3]}for(Qe=0;Qe<ae;Qe++)Zi=ne[Qe],y?Zi.S.h(Zi.S.x+Zi.la.x-_e,Zi.S.y+(135<E?(Te?-Gt:-Zi.Da.height)+Zi.la.y-x:Dt+x+Zi.la.y)):Zi.S.h(Zi.S.x+(135<E?(Te?-Lt:-Zi.Da.width)+Zi.la.x-x:b+x+Zi.la.x),Zi.S.y+Zi.la.y-ct);if(ae=ne=0,Te?y?(Lt=ky(a,Lt,_e),0>_e&&(_e=0),135<E&&(ct+=Gt+x),Gt+=Dt+x,fe===fh&&(ne+=Ve/2+a.focus.x),ae+=Dt+x):(135<E&&(_e+=Lt+x),Lt+=b+x,Gt=Ay(a,Gt,ct),0>ct&&(ct=0),fe===fh&&(ae+=Ve/2+a.focus.y),ne+=b+x):y?(a.comments===null?b>Lt&&(Lt=Ny(fe,b-Lt,0),ne=Lt.x,ae=Lt.y,Lt=b,_e=0):Lt=ky(a,Lt,_e),0>_e&&(ne-=_e,_e=0),135<E&&(ct+=Gt+x),Gt=Math.max(Math.max(Gt,Dt),Gt+Dt+x),ae+=Dt+x):(135<E&&(_e+=Lt+x),Lt=Math.max(Math.max(Lt,b),Lt+b+x),a.comments===null?Dt>Gt&&(Gt=Ny(fe,0,Dt-Gt),ne=Gt.x,ae=Gt.y,Gt=Dt,ct=0):Gt=Ay(a,Gt,ct),0>ct&&(ae-=ct,ct=0),ne+=b+x),0<Vn)E=Tl(this,4),Vn=Tl(this,4),y?(E[2].h(0,Dt+x),E[3].h(E[2].x,Gt),Vn[2].h(Lt,E[2].y),Vn[3].h(Vn[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(Lt,E[2].y),Vn[2].h(E[2].x,Gt),Vn[3].h(E[3].x,Vn[2].y));else{for(E=Tl(this,Vt.length+2),Vn=Tl(this,Qt.length+2),fe=0;fe<Vt.length;fe++)Te=Vt[fe],E[fe+2].h(Te.x+ne,Te.y+ae);for(fe=0;fe<Qt.length;fe++)Te=Qt[fe],Vn[fe+2].h(Te.x+ne,Te.y+ae)}y?(E[0].h(_e,0),E[1].h(E[0].x,Dt),E[2].y<E[1].y&&(E[2].x>E[0].x?E[2].assign(E[1]):E[1].assign(E[2])),E[3].y<E[2].y&&(E[3].x>E[0].x?E[3].assign(E[2]):E[2].assign(E[3])),Vn[0].h(_e+b,0),Vn[1].h(Vn[0].x,Dt),Vn[2].y<Vn[1].y&&(Vn[2].x<Vn[0].x?Vn[2].assign(Vn[1]):Vn[1].assign(Vn[2])),Vn[3].y<Vn[2].y&&(Vn[3].x<Vn[0].x?Vn[3].assign(Vn[2]):Vn[2].assign(Vn[3])),E[2].y-=x/2,Vn[2].y-=x/2):(E[0].h(0,ct),E[1].h(b,E[0].y),E[2].x<E[1].x&&(E[2].y>E[0].y?E[2].assign(E[1]):E[1].assign(E[2])),E[3].x<E[2].x&&(E[3].y>E[0].y?E[3].assign(E[2]):E[2].assign(E[3])),Vn[0].h(0,ct+Dt),Vn[1].h(b,Vn[0].y),Vn[2].x<Vn[1].x&&(Vn[2].y<Vn[0].y?Vn[2].assign(Vn[1]):Vn[1].assign(Vn[2])),Vn[3].x<Vn[2].x&&(Vn[3].y<Vn[0].y?Vn[3].assign(Vn[2]):Vn[2].assign(Vn[3])),E[2].x-=x/2,Vn[2].x-=x/2),dc(this,Vt),dc(this,Qt),a.Yo=E,a.kp=Vn,a.la.h(_e,ct),a.Da.h(Lt,Gt)}break;default:Nt("Unhandled compaction value "+a.compaction.toString())}}};function cx(a,y){if(y.childrenCount===0){var x=!1,b=0;y.parent!==null&&(b=y.parent.angle,x=y.parent.alignment,x=bd(x));var E=Ty(y);y.S.h(0,0),y.Da.h(y.width,y.height),y.parent===null||y.comments===null||(b!==180&&b!==270||x)&&!E?y.la.h(0,0):b===180&&!x||(b===90||b===270)&&E?y.la.h(y.width-2*y.focus.x,0):y.la.h(0,y.height-2*y.focus.y)}else{b=qu(y),x=b===90||b===270;var te=0;E=y.children;for(var ne=E.length,ae=0;ae<ne;ae++){var fe=E[ae];te=Math.max(te,x?fe.Da.width:fe.Da.height)}var _e=y.alignment,Te=_e===Yc,je=_e===Xc;ae=bd(_e);var Ve=Math.max(0,y.breadthLimit);fe=a.computeLayerSpacing(y);var Qe=y.nodeSpacing,rt=a.computeNodeIndent(y),ct=Te||je?0:rt/2,Dt=y.rowSpacing,Lt=0;(Te||je||y.hm||y.im&&y.maxGenerationCount===1)&&(Lt=Math.max(0,y.rowIndent)),Te=y.width;var Gt=y.height,Zt=0,Vt=0,Qt=0,yn=0,ri=0,fi=0,li=0,Vn=0,Rn=0,Qi=0;if(ae&&!Kg(_e)&&135<b&&E.reverse(),Kg(_e))if(1<ne)for(var Zi=0;Zi<ne;Zi++){var no=E[Zi],_o=no.Da;Zi%2===0&&Zi!==ne-1?Rn=Math.max(Rn,(x?_o.width:_o.height)+a.computeBusNodeSpacing(no)-Qe):Zi%2!==0&&(Qi=Math.max(Qi,(x?_o.width:_o.height)+a.computeBusNodeSpacing(no)-Qe))}else ne===1&&(Rn=x?E[0].Da.width:E[0].Da.height);if(ae)switch(_e){case Hh:case Jc:Vt=135>b?hx(a,y,E,Rn,Zt,Vt):dx(a,y,E,Rn,Zt,Vt),Rn=Vt.x,Zt=Vt.width,Vt=Vt.height;break;case Uh:for(Ve=0;Ve<ne;Ve++)ct=E[Ve],Qt=ct.Da,Qi=li===0?0:Dt,x?(ct.S.h(te-Qt.width,ri+Qi),Zt=Math.max(Zt,Qt.width),Vt=Math.max(Vt,ri+Qi+Qt.height),ri+=Qi+Qt.height):(ct.S.h(yn+Qi,te-Qt.height),Zt=Math.max(Zt,yn+Qi+Qt.width),Vt=Math.max(Vt,Qt.height),yn+=Qi+Qt.width),li++;break;case fh:for(te=0;te<ne;te++)Ve=E[te],ct=Ve.Da,Qt=li===0?0:Dt,x?(Ve.S.h(Qe/2+y.focus.x,ri+Qt),Zt=Math.max(Zt,ct.width),Vt=Math.max(Vt,ri+Qt+ct.height),ri+=Qt+ct.height):(Ve.S.h(yn+Qt,Qe/2+y.focus.y),Zt=Math.max(Zt,yn+Qt+ct.width),Vt=Math.max(Vt,ct.height),yn+=Qt+ct.width),li++}else for(Qi=0;Qi<ne;Qi++)Zi=E[Qi],no=Zi.Da,x?(0<Ve&&0<li&&yn+Qe+no.width>Ve&&(yn<te&&af(y,_e,te-yn,0,Vn,Qi-1),fi++,li=0,Vn=Qi,Qt=Vt,yn=0,ri=135<b?-Vt-Dt:Vt+Dt),_o=li===0?ct:Qe,R0(a,Zi,0,ri),Zi.S.h(yn+_o,ri),Zt=Math.max(Zt,yn+_o+no.width),Vt=Math.max(Vt,Qt+(fi===0?0:Dt)+no.height),yn+=_o+no.width):(0<Ve&&0<li&&ri+Qe+no.height>Ve&&(ri<te&&af(y,_e,0,te-ri,Vn,Qi-1),fi++,li=0,Vn=Qi,Qt=Zt,ri=0,yn=135<b?-Zt-Dt:Zt+Dt),_o=li===0?ct:Qe,R0(a,Zi,yn,0),Zi.S.h(yn,ri+_o),Vt=Math.max(Vt,ri+_o+no.height),Zt=Math.max(Zt,Qt+(fi===0?0:Dt)+no.width),ri+=_o+no.height),li++;switch(0<fi&&(x?(Vt+=Math.max(0,fe),yn<Zt&&af(y,_e,Zt-yn,0,Vn,ne-1),0<Lt&&(je||Bf(y,Lt,0,0,ne-1),Zt+=Lt)):(Zt+=Math.max(0,fe),ri<Vt&&af(y,_e,0,Vt-ri,Vn,ne-1),0<Lt&&(je||Bf(y,0,Lt,0,ne-1),Vt+=Lt))),Lt=je=0,_e){case Ip:x?je+=Zt/2-y.focus.x-rt/2:Lt+=Vt/2-y.focus.y-rt/2;break;case jf:0<fi?x?je+=Zt/2-y.focus.x-rt/2:Lt+=Vt/2-y.focus.y-rt/2:x?(a=E[0].S.x+E[0].la.x,je+=a+(E[ne-1].S.x+E[ne-1].la.x+2*E[ne-1].focus.x-a)/2-y.focus.x-rt/2):(a=E[0].S.y+E[0].la.y,Lt+=a+(E[ne-1].S.y+E[ne-1].la.y+2*E[ne-1].focus.y-a)/2-y.focus.y-rt/2);break;case Yc:x?(je-=rt,Zt+=rt):(Lt-=rt,Vt+=rt);break;case Xc:x?(je+=Zt-y.width+rt,Zt+=rt):(Lt+=Vt-y.height+rt,Vt+=rt);break;case Hh:case Jc:x?1<ne?je+=Rn+Qe/2-y.focus.x:je+=E[0].focus.x-y.focus.x+E[0].la.x:1<ne?Lt+=Rn+Qe/2-y.focus.y:Lt+=E[0].focus.y-y.focus.y+E[0].la.y;break;case Uh:x?je+=Zt+Qe/2-y.focus.x:Lt+=Vt+Qe/2-y.focus.y;break;case fh:break;default:a=a.customAlignment(y,je,Lt,Zt,Vt),je=a[0],Lt=a[1],Zt=a[2],Vt=a[3]}for(a=0;a<ne;a++)rt=E[a],x?rt.S.h(rt.S.x+rt.la.x-je,rt.S.y+(135<b?(ae?-Vt:-rt.Da.height)+rt.la.y-fe:Gt+fe+rt.la.y)):rt.S.h(rt.S.x+(135<b?(ae?-Zt:-rt.Da.width)+rt.la.x-fe:Te+fe+rt.la.x),rt.S.y+rt.la.y-Lt);x?(Zt=ky(y,Zt,je),0>je&&(je=0),135<b&&(Lt+=Vt+fe),Vt=Math.max(Math.max(Vt,Gt),Vt+Gt+fe)):(135<b&&(je+=Zt+fe),Zt=Math.max(Math.max(Zt,Te),Zt+Te+fe),Vt=Ay(y,Vt,Lt),0>Lt&&(Lt=0)),y.la.h(je,Lt),y.Da.h(Zt,Vt)}}Ar.prototype.customAlignment=function(a,y,x,b,E){return[y,x,b,E]};function hx(a,y,x,b,E,te){var ne=x.length;if(ne===0)return new kn(b,0,E,te);if(ne===1)return y=x[0],E=y.Da.width,te=y.Da.height,new kn(b,0,E,te);for(var ae=y.nodeSpacing,fe=y.rowSpacing,_e=qu(y)===90,Te=0,je=0,Ve=0,Qe=0;Qe<ne;Qe++)if(!(Qe%2!==0||1<ne&&Qe===ne-1)){var rt=x[Qe],ct=rt.Da,Dt=Te===0?0:fe;if(_e){var Lt=a.computeBusNodeSpacing(rt)-ae;rt.S.h(b-(ct.width+Lt),Ve+Dt),E=Math.max(E,ct.width+Lt),te=Math.max(te,Ve+Dt+ct.height),Ve+=Dt+ct.height}else Lt=a.computeBusNodeSpacing(rt)-ae,rt.S.h(je+Dt,b-(ct.height+Lt)),te=Math.max(te,ct.height+Lt),E=Math.max(E,je+Dt+ct.width),je+=Dt+ct.width;Te++}for(Te=0,rt=je,Qe=Ve,_e?(je=b+ae,Ve=0):(je=0,Ve=b+ae),ct=0;ct<ne;ct++)if(ct%2!==0){Dt=x[ct],Lt=Dt.Da;var Gt=Te===0?0:fe;if(_e){var Zt=a.computeBusNodeSpacing(Dt)-ae;Dt.S.h(je+Zt,Ve+Gt),E=Math.max(E,je+Lt.width+Zt),te=Math.max(te,Ve+Gt+Lt.height),Ve+=Gt+Lt.height}else Zt=a.computeBusNodeSpacing(Dt)-ae,Dt.S.h(je+Gt,Ve+Zt),E=Math.max(E,je+Gt+Lt.width),te=Math.max(te,Ve+Lt.height+Zt),je+=Gt+Lt.width;Te++}return 1<ne&&ne%2===1&&(x=x[ne-1],ne=x.Da,a=a.computeBusLastRowSpacing(x,_e?Math.max(Math.abs(Qe),Math.abs(Ve)):Math.max(Math.abs(rt),Math.abs(je))),_e?(x.S.h(b+ae/2-x.focus.x-x.la.x,te+a),_e=b+ae/2-x.focus.x-x.la.x,E=Math.max(E,_e+ne.width),0>_e&&(E-=_e),te=Math.max(te,Math.max(Qe,Ve)+a+ne.height),0>x.S.x&&(b=D0(y,x.S.x,!1,b,ae))):(x.S.h(E+a,b+ae/2-x.focus.y-x.la.y),E=Math.max(E,Math.max(rt,je)+a+ne.width),Ve=b+ae/2-x.focus.y-x.la.y,te=Math.max(te,Ve+ne.height),0>Ve&&(te-=Ve),0>x.S.y&&(b=D0(y,x.S.y,!0,b,ae)))),new kn(b,0,E,te)}function dx(a,y,x,b,E,te){var ne=x.length;if(ne===0)return new kn(b,0,E,te);if(ne===1)return x=x[0],E=x.Da.width,te=x.Da.height,new kn(b,0,E,te);for(var ae=y.nodeSpacing,fe=y.rowSpacing,_e=qu(y)===270,Te=0,je=0,Ve=0,Qe=0;Qe<ne;Qe++)if(!(Qe%2!==0||1<ne&&Qe===ne-1)){var rt=x[Qe],ct=rt.Da,Dt=Te===0?0:fe;if(_e){var Lt=a.computeBusNodeSpacing(rt)-ae;Ve-=Dt+ct.height,rt.S.h(b-(ct.width+Lt),Ve),E=Math.max(E,ct.width+Lt),te=Math.max(te,Math.abs(Ve))}else Lt=a.computeBusNodeSpacing(rt)-ae,je-=Dt+ct.width,rt.S.h(je,b-(ct.height+Lt)),te=Math.max(te,ct.height+Lt),E=Math.max(E,Math.abs(je));Te++}for(Te=0,rt=je,Qe=Ve,_e?(je=b+ae,Ve=0):(je=0,Ve=b+ae),ct=0;ct<ne;ct++)if(ct%2!==0){Dt=x[ct],Lt=Dt.Da;var Gt=Te===0?0:fe;if(_e){var Zt=a.computeBusNodeSpacing(Dt)-ae;Ve-=Gt+Lt.height,Dt.S.h(je+Zt,Ve),E=Math.max(E,je+Lt.width+Zt),te=Math.max(te,Math.abs(Ve))}else Zt=a.computeBusNodeSpacing(Dt)-ae,je-=Gt+Lt.width,Dt.S.h(je,Ve+Zt),te=Math.max(te,Ve+Lt.height+Zt),E=Math.max(E,Math.abs(je));Te++}for(1<ne&&ne%2===1&&(fe=x[ne-1],Te=fe.Da,a=a.computeBusLastRowSpacing(fe,_e?Math.max(Math.abs(Qe),Math.abs(Ve)):Math.max(Math.abs(rt),Math.abs(je))),_e?(fe.S.h(b+ae/2-fe.focus.x-fe.la.x,-te-Te.height-a),je=b+ae/2-fe.focus.x-fe.la.x,E=Math.max(E,je+Te.width),0>je&&(E-=je),te=Math.max(te,Math.abs(Math.min(Qe,Ve))+a+Te.height),0>fe.S.x&&(b=D0(y,fe.S.x,!1,b,ae))):(fe.S.h(-E-Te.width-a,b+ae/2-fe.focus.y-fe.la.y),E=Math.max(E,Math.abs(Math.min(rt,je))+a+Te.width),Ve=b+ae/2-fe.focus.y-fe.la.y,te=Math.max(te,Ve+Te.height),0>Ve&&(te-=Ve),0>fe.S.y&&(b=D0(y,fe.S.y,!0,b,ae)))),y=0;y<ne;y++)ae=x[y],_e?ae.S.h(ae.S.x,ae.S.y+te):ae.S.h(ae.S.x+E,ae.S.y);return new kn(b,0,E,te)}Ar.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Ar.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function D0(a,y,x,b,E){a=a.children;for(var te=a.length,ne=0;ne<te;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[te-1],Math.max(b,x?y.la.y+y.focus.y-E/2:y.la.x+y.focus.x-E/2)}function ky(a,y,x){switch(a.alignment){case jf:case Ip:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case Yc:return a.width>y?a.width:y;case Xc:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Hh:case Jc:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case Uh:return a.width-a.focus.x+a.nodeSpacing/2+y;case fh:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ay(a,y,x){switch(a.alignment){case jf:case Ip:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case Yc:return a.height>y?a.height:y;case Xc:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Hh:case Jc:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case Uh:return a.height-a.focus.y+a.nodeSpacing/2+y;case fh:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Ny(a,y,x){switch(a){case Ip:y/=2,x/=2;break;case jf:y/=2,x/=2;break;case Yc:x=y=0;break;case Xc:break;default:Nt("Unhandled alignment value "+a.toString())}return new Mt(y,x)}function af(a,y,x,b,E,te){y=Ny(y,x,b),Bf(a,y.x,y.y,E,te)}function Bf(a,y,x,b,E){if(y!==0||x!==0)for(a=a.children;b<=E;b++){var te=a[b].S;te.x+=y,te.y+=x}}function R0(a,y,x,b){var E=y.parent;switch(a.ud){case $c:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===E&&y.relativePoint.h(x,b);break;case Ff:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===E&&y.relativePoint.h(x,b);break;default:Nt("Unhandled path value "+a.ud.toString())}}function B0(a,y,x){for(var b=0;b<a.length;b++){var E=a[b];E.x+=y,E.y+=x}}function fx(a,y,x,b,E,te,ne,ae){var fe=qu(y),_e=fe===90||fe===270,Te=y.nodeSpacing;y=b;var je=E;b=te;var Ve=ne,Qe=x.Yo,rt=x.kp;ne=x.Da;var ct=_e?Math.max(Ve,ne.height):Math.max(b,ne.width);if((Qe===null||fe!==qu(x))&&(Qe=Tl(a,2),rt=Tl(a,2),_e?(Qe[0].h(0,0),Qe[1].h(0,ne.height),rt[0].h(ne.width,0),rt[1].h(rt[0].x,Qe[1].y)):(Qe[0].h(0,0),Qe[1].h(ne.width,0),rt[0].h(0,ne.height),rt[1].h(Qe[1].x,rt[0].y))),_e){if(Ve=9999999,!(je===null||2>je.length||Qe===null||2>Qe.length))for(E=x=0;x<je.length&&E<Qe.length;){te=je[x];var Dt=Qe[E];fe=Dt.x,_e=Dt.y,fe+=b;var Lt=te;x+1<je.length&&(Lt=je[x+1]);var Gt=Dt;Dt=Gt.x,Gt=Gt.y,E+1<Qe.length&&(Gt=Qe[E+1],Dt=Gt.x,Gt=Gt.y,Dt+=b);var Zt=Ve;te.y===_e?Zt=fe-te.x:te.y>_e&&te.y<Gt?Zt=fe+(te.y-_e)/(Gt-_e)*(Dt-fe)-te.x:_e>te.y&&_e<Lt.y&&(Zt=fe-(te.x+(_e-te.y)/(Lt.y-te.y)*(Lt.x-te.x))),Zt<Ve&&(Ve=Zt),Lt.y<=te.y?x++:Gt<=_e?E++:(Lt.y<=Gt&&x++,Gt<=Lt.y&&E++)}if(Ve=b-Ve,Ve+=Te,x=Qe,E=Ve,y===null||2>y.length||x===null||2>x.length)b=null;else{for(Te=Tl(a,y.length+x.length),b=te=fe=0;te<x.length&&x[te].y<y[0].y;)_e=x[te++],Te[b++].h(_e.x+E,_e.y);for(;fe<y.length;)_e=y[fe++],Te[b++].h(_e.x,_e.y);for(fe=y[y.length-1].y;te<x.length&&x[te].y<=fe;)te++;for(;te<x.length&&x[te].y>fe;)_e=x[te++],Te[b++].h(_e.x+E,_e.y);for(x=Tl(a,b),fe=0;fe<b;fe++)x[fe].assign(Te[fe]);dc(a,Te),b=x}if(te=rt,fe=Ve,je===null||2>je.length||te===null||2>te.length)E=null;else{for(Te=Tl(a,je.length+te.length),E=_e=x=0;x<je.length&&je[x].y<te[0].y;)Lt=je[x++],Te[E++].h(Lt.x,Lt.y);for(;_e<te.length;)Lt=te[_e++],Te[E++].h(Lt.x+fe,Lt.y);for(te=te[te.length-1].y;x<je.length&&je[x].y<=te;)x++;for(;x<je.length&&je[x].y>te;)fe=je[x++],Te[E++].h(fe.x,fe.y);for(te=Tl(a,E),x=0;x<E;x++)te[x].assign(Te[x]);dc(a,Te),E=te}return te=Math.max(0,Ve)+ne.width,ne=ct,dc(a,y),dc(a,Qe),dc(a,je),dc(a,rt),ae[0]=b,ae[1]=E,new kn(Ve,0,te,ne)}if(b=9999999,!(je===null||2>je.length||Qe===null||2>Qe.length))for(E=x=0;x<je.length&&E<Qe.length;)te=je[x],Dt=Qe[E],fe=Dt.x,_e=Dt.y,_e+=Ve,Lt=te,x+1<je.length&&(Lt=je[x+1]),Gt=Dt,Dt=Gt.x,Gt=Gt.y,E+1<Qe.length&&(Gt=Qe[E+1],Dt=Gt.x,Gt=Gt.y,Gt+=Ve),Zt=b,te.x===fe?Zt=_e-te.y:te.x>fe&&te.x<Dt?Zt=_e+(te.x-fe)/(Dt-fe)*(Gt-_e)-te.y:fe>te.x&&fe<Lt.x&&(Zt=_e-(te.y+(fe-te.x)/(Lt.x-te.x)*(Lt.y-te.y))),Zt<b&&(b=Zt),Lt.x<=te.x?x++:Dt<=fe?E++:(Lt.x<=Dt&&x++,Dt<=Lt.x&&E++);if(Ve-=b,Ve+=Te,x=Qe,E=Ve,y===null||2>y.length||x===null||2>x.length)b=null;else{for(Te=Tl(a,y.length+x.length),b=te=fe=0;te<x.length&&x[te].x<y[0].x;)_e=x[te++],Te[b++].h(_e.x,_e.y+E);for(;fe<y.length;)_e=y[fe++],Te[b++].h(_e.x,_e.y);for(fe=y[y.length-1].x;te<x.length&&x[te].x<=fe;)te++;for(;te<x.length&&x[te].x>fe;)_e=x[te++],Te[b++].h(_e.x,_e.y+E);for(x=Tl(a,b),fe=0;fe<b;fe++)x[fe].assign(Te[fe]);dc(a,Te),b=x}if(te=rt,fe=Ve,je===null||2>je.length||te===null||2>te.length)E=null;else{for(Te=Tl(a,je.length+te.length),E=_e=x=0;x<je.length&&je[x].x<te[0].x;)Lt=je[x++],Te[E++].h(Lt.x,Lt.y);for(;_e<te.length;)Lt=te[_e++],Te[E++].h(Lt.x,Lt.y+fe);for(te=te[te.length-1].x;x<je.length&&je[x].x<=te;)x++;for(;x<je.length&&je[x].x>te;)fe=je[x++],Te[E++].h(fe.x,fe.y);for(te=Tl(a,E),x=0;x<E;x++)te[x].assign(Te[x]);dc(a,Te),E=te}return te=ct,ne=Math.max(0,Ve)+ne.height,dc(a,y),dc(a,Qe),dc(a,je),dc(a,rt),ae[0]=b,ae[1]=E,new kn(Ve,0,te,ne)}function Tl(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 Mt;return a}function dc(a,y){var x=y.length,b=a.ru[x];b===void 0&&(b=[],a.ru[x]=b),b.push(y)}Ar.prototype.arrangeTrees=function(){if(this.Rb===U0)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof Fu){var x=y.node;if(x!==null){var b=x.position;x=b.x,b=b.y,isFinite(x)||(x=0),isFinite(b)||(b=0),Oy(this,y,x,b)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof Fu&&a.push(x);switch(this.sorting){case Op:break;case Vg:a.reverse();break;case $g:a.sort(this.comparer);break;case Yg:a.sort(this.comparer),a.reverse();break;default:Nt("Unhandled sorting value "+this.sorting.toString())}for(x=this.arrangementOrigin,y=x.x,x=x.y,b=0;b<a.length;b++){var E=a[b];switch(Oy(this,E,y+E.la.x,x+E.la.y),this.Rb){case H0:x+=E.Da.height+this.$d.height;break;case By:y+=E.Da.width+this.$d.width;break;default:Nt("Unhandled arrangement value "+this.Rb.toString())}}}};function Oy(a,y,x,b){if(y!==null){y.x=x,y.y=b,y=y.children;for(var E=y.length,te=0;te<E;te++){var ne=y[te];Oy(a,ne,x+ne.S.x,b+ne.S.y)}}}Ar.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Ar.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Ar.prototype.Gu=function(){if(this.layerStyle===G0){for(var a=this.$v,y=[],x=null,b=this.network.vertexes.iterator;b.next();){var E=b.value;x===null?x=E.bounds.copy():x.ed(E.bounds);var te=y[E.level];te===void 0?te=this.computeLayerSpacing(E):te=Math.max(te,this.computeLayerSpacing(E)),y[E.level]=te}for(b=0;b<y.length;b++)y[b]===void 0&&(y[b]=0);if(this.angle===90||this.angle===270?(x.Bc(this.nodeSpacing/2,this.layerSpacing),b=new Mt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new Mt(-this.layerSpacing/2,-this.nodeSpacing/2)),E=[],x=this.angle===90||this.angle===270?x.width:x.height,te=0,this.angle===180||this.angle===270)for(var ne=0;ne<a.length;ne++)te+=a[ne]+y[ne];for(ne=0;ne<a.length;ne++){var ae=a[ne]+y[ne];this.angle===270?(te-=ae,E.push(new kn(0,te,x,ae))):this.angle===90?(E.push(new kn(0,te,x,ae)),te+=ae):this.angle===180?(te-=ae,E.push(new kn(te,0,ae,x))):(E.push(new kn(te,0,ae,x)),te+=ae)}this.commitLayers(E,b)}},Ar.prototype.commitLayers=function(){},Ar.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Ar.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof Fu&&px(this,y)}};function px(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,b=0;b<x;b++)px(a,y[b])}}Ar.prototype.setPortSpots=function(a){var y=a.alignment;if(bd(y)){var x=this.ud===$c,b=qu(a);switch(b){case 0:var E=Zs;break;case 90:E=Ks;break;case 180:E=ks;break;default:E=bs}var te=a.children,ne=te.length;switch(y){case Hh:case Jc:for(y=0;y<ne;y++){var ae=te[y];if(ae=(x?ae.sourceEdges:ae.destinationEdges).first(),ae!==null&&(ae=ae.link,ae!==null)){var fe=b===90||b===270?ks:bs;if(ne===1||y===ne-1&&ne%2===1)switch(b){case 0:fe=ks;break;case 90:fe=bs;break;case 180:fe=Zs;break;default:fe=Ks}else y%2===0&&(fe=b===90||b===270?Zs:Ks);x?(a.setsPortSpot&&(ae.fromSpot=E),a.setsChildPortSpot&&(ae.toSpot=fe)):(a.setsPortSpot&&(ae.fromSpot=fe),a.setsChildPortSpot&&(ae.toSpot=E))}}break;case Uh:for(b=b===90||b===270?Zs:Ks,te=x?a.destinationEdges:a.sourceEdges;te.next();)ne=te.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)):(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)));break;case fh:for(b=b===90||b===270?ks:bs,te=x?a.destinationEdges:a.sourceEdges;te.next();)ne=te.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)):(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)))}}else if(x=qu(a),this.ud===$c){for(E=a.destinationEdges;E.next();)if(b=E.value.link,b!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:b.fromSpot=Zs;break;case 90:b.fromSpot=Ks;break;case 180:b.fromSpot=ks;break;default:b.fromSpot=bs}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=ks;break;case 90:b.toSpot=bs;break;case 180:b.toSpot=Zs;break;default:b.toSpot=Ks}else b.toSpot=a.childPortSpot}}else for(E=a.sourceEdges;E.next();)if(b=E.value.link,b!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:b.toSpot=Zs;break;case 90:b.toSpot=Ks;break;case 180:b.toSpot=ks;break;default:b.toSpot=bs}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=ks;break;case 90:b.fromSpot=bs;break;case 180:b.fromSpot=Zs;break;default:b.fromSpot=Ks}else b.fromSpot=a.childPortSpot}};function qu(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}Ar.prototype.computeLayerSpacing=function(a){var y=qu(a);y=y===90||y===270;var x=a.layerSpacing;if(0<a.layerSpacingParentOverlap){var b=Math.min(1,a.layerSpacingParentOverlap);x-=y?a.height*b:a.width*b}return x<(y?-a.height:-a.width)&&(x=y?-a.height:-a.width),x},Ar.prototype.computeNodeIndent=function(a){var y=qu(a),x=a.nodeIndent;if(0<a.nodeIndentPastParent){var b=Math.min(1,a.nodeIndentPastParent);x+=y===90||y===270?a.width*b:a.height*b}return x=Math.max(0,x)},Ye.Object.defineProperties(Ar.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!==Iy&&a!==Ry||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Fy&&a!==jy&&a!==G0||(this.Bq=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==H0&&a!==By&&a!==U0||(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!==Op&&a!==Vg&&a!==$g&&!Yg||(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()):Nt("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!==Xg||(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!==Op&&a!==Vg&&a!==$g&&!Yg||(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!==Xg||(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 F0=new Ln(Ar,"PathDefault",-1),$c=new Ln(Ar,"PathDestination",0),Ff=new Ln(Ar,"PathSource",1),Op=new Ln(Ar,"SortingForwards",10),Vg=new Ln(Ar,"SortingReverse",11),$g=new Ln(Ar,"SortingAscending",12),Yg=new Ln(Ar,"SortingDescending",13),Ip=new Ln(Ar,"AlignmentCenterSubtrees",20),jf=new Ln(Ar,"AlignmentCenterChildren",21),Yc=new Ln(Ar,"AlignmentStart",22),Xc=new Ln(Ar,"AlignmentEnd",23),Hh=new Ln(Ar,"AlignmentBus",24),Jc=new Ln(Ar,"AlignmentBusBranching",25),Uh=new Ln(Ar,"AlignmentTopLeftBus",26),fh=new Ln(Ar,"AlignmentBottomRightBus",27),j0=new Ln(Ar,"CompactionNone",30),Xg=new Ln(Ar,"CompactionBlock",31),z0=new Ln(Ar,"StyleLayered",40),Iy=new Ln(Ar,"StyleLastParents",41),Dy=new Ln(Ar,"StyleAlternating",42),Ry=new Ln(Ar,"StyleRootOnly",43),H0=new Ln(Ar,"ArrangementVertical",50),By=new Ln(Ar,"ArrangementHorizontal",51),U0=new Ln(Ar,"ArrangementFixedRoots",52),Fy=new Ln(Ar,"LayerIndividual",60),jy=new Ln(Ar,"LayerSiblings",61),G0=new Ln(Ar,"LayerUniform",62);Ar.className="TreeLayout",Ar.PathDefault=F0,Ar.PathDestination=$c,Ar.PathSource=Ff,Ar.SortingForwards=Op,Ar.SortingReverse=Vg,Ar.SortingAscending=$g,Ar.SortingDescending=Yg,Ar.AlignmentCenterSubtrees=Ip,Ar.AlignmentCenterChildren=jf,Ar.AlignmentStart=Yc,Ar.AlignmentEnd=Xc,Ar.AlignmentBus=Hh,Ar.AlignmentBusBranching=Jc,Ar.AlignmentTopLeftBus=Uh,Ar.AlignmentBottomRightBus=fh,Ar.CompactionNone=j0,Ar.CompactionBlock=Xg,Ar.StyleLayered=z0,Ar.StyleLastParents=Iy,Ar.StyleAlternating=Dy,Ar.StyleRootOnly=Ry,Ar.ArrangementVertical=H0,Ar.ArrangementHorizontal=By,Ar.ArrangementFixedRoots=U0,Ar.LayerIndividual=Fy,Ar.LayerSiblings=jy,Ar.LayerUniform=G0;function zf(a){To.call(this,a)}qe(zf,To),zf.prototype.createVertex=function(){return new Fu(this)},zf.prototype.createEdge=function(){return new Dp(this)},zf.className="TreeNetwork";function Fu(a){aa.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 Mt(0,0),this.Da=new Qn(0,0),this.la=new Mt(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Op,this.hd=oy,this.Kb=0,this.Jb=jf,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Xg,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=oo,this.wr=!0,this.Dp=oo}qe(Fu,aa),Fu.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)},Ye.Object.defineProperties(Fu.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)}}}),Fu.className="TreeVertex";function Dp(a){Gl.call(this,a),this.$t=new Mt(0,0)}qe(Dp,Gl),Dp.prototype.commit=function(){var a=this.link;if(a!==null&&!a.isAvoiding){var y=this.network.layout,x=null,b=null;switch(y.ud){case $c:x=this.fromVertex,b=this.toVertex;break;case Ff:x=this.toVertex,b=this.fromVertex;break;default:Nt("Unhandled path value "+y.ud.toString())}if(x!==null&&b!==null){var E=this.$t;if(E.x!==0||E.y!==0||x.qA){b=x.bounds;var te=qu(x),ne=y.computeLayerSpacing(x),ae=x.rowSpacing;a.vg();var fe=a.curve===ou,_e=a.isOrthogonal,Te;if(a.uh(),_e||fe){for(Te=2;4<a.pointsCount;)a.pv(2);var je=a.i(1),Ve=a.i(2)}else{for(Te=1;3<a.pointsCount;)a.pv(1);je=a.i(0),Ve=a.i(a.pointsCount-1)}var Qe=a.i(a.pointsCount-1);te===0?(x.alignment===Xc?(te=b.bottom+E.y,E.y===0&&je.y>Qe.y+x.rowIndent&&(te=Math.min(te,Math.max(je.y,te-y.computeNodeIndent(x))))):x.alignment===Yc?(te=b.top+E.y,E.y===0&&je.y<Qe.y-x.rowIndent&&(te=Math.max(te,Math.min(je.y,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,fe?(a.m(Te,je.x,te),Te++,a.m(Te,b.right+ne,te),Te++,a.m(Te,b.right+ne+(E.x-ae)/3,te),Te++,a.m(Te,b.right+ne+2*(E.x-ae)/3,te),Te++,a.m(Te,b.right+ne+(E.x-ae),te),Te++,a.m(Te,Ve.x,te)):(_e&&(a.m(Te,b.right+ne/2,je.y),Te++),a.m(Te,b.right+ne/2,te),Te++,a.m(Te,b.right+ne+E.x-(_e?ae/2:ae),te),Te++,_e&&a.m(Te,a.i(Te-1).x,Ve.y))):te===90?(x.alignment===Xc?(te=b.right+E.x,E.x===0&&je.x>Qe.x+x.rowIndent&&(te=Math.min(te,Math.max(je.x,te-y.computeNodeIndent(x))))):x.alignment===Yc?(te=b.left+E.x,E.x===0&&je.x<Qe.x-x.rowIndent&&(te=Math.max(te,Math.min(je.x,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,fe?(a.m(Te,te,je.y),Te++,a.m(Te,te,b.bottom+ne),Te++,a.m(Te,te,b.bottom+ne+(E.y-ae)/3),Te++,a.m(Te,te,b.bottom+ne+2*(E.y-ae)/3),Te++,a.m(Te,te,b.bottom+ne+(E.y-ae)),Te++,a.m(Te,te,Ve.y)):(_e&&(a.m(Te,je.x,b.bottom+ne/2),Te++),a.m(Te,te,b.bottom+ne/2),Te++,a.m(Te,te,b.bottom+ne+E.y-(_e?ae/2:ae)),Te++,_e&&a.m(Te,Ve.x,a.i(Te-1).y))):te===180?(x.alignment===Xc?(te=b.bottom+E.y,E.y===0&&je.y>Qe.y+x.rowIndent&&(te=Math.min(te,Math.max(je.y,te-y.computeNodeIndent(x))))):x.alignment===Yc?(te=b.top+E.y,E.y===0&&je.y<Qe.y-x.rowIndent&&(te=Math.max(te,Math.min(je.y,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,fe?(a.m(Te,je.x,te),Te++,a.m(Te,b.left-ne,te),Te++,a.m(Te,b.left-ne+(E.x+ae)/3,te),Te++,a.m(Te,b.left-ne+2*(E.x+ae)/3,te),Te++,a.m(Te,b.left-ne+(E.x+ae),te),Te++,a.m(Te,Ve.x,te)):(_e&&(a.m(Te,b.left-ne/2,je.y),Te++),a.m(Te,b.left-ne/2,te),Te++,a.m(Te,b.left-ne+E.x+(_e?ae/2:ae),te),Te++,_e&&a.m(Te,a.i(Te-1).x,Ve.y))):te===270?(x.alignment===Xc?(te=b.right+E.x,E.x===0&&je.x>Qe.x+x.rowIndent&&(te=Math.min(te,Math.max(je.x,te-y.computeNodeIndent(x))))):x.alignment===Yc?(te=b.left+E.x,E.x===0&&je.x<Qe.x-x.rowIndent&&(te=Math.max(te,Math.min(je.x,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,fe?(a.m(Te,te,je.y),Te++,a.m(Te,te,b.top-ne),Te++,a.m(Te,te,b.top-ne+(E.y+ae)/3),Te++,a.m(Te,te,b.top-ne+2*(E.y+ae)/3),Te++,a.m(Te,te,b.top-ne+(E.y+ae)),Te++,a.m(Te,te,Ve.y)):(_e&&(a.m(Te,je.x,b.top-ne/2),Te++),a.m(Te,te,b.top-ne/2),Te++,a.m(Te,te,b.top-ne+E.y+(_e?ae/2:ae)),Te++,_e&&a.m(Te,Ve.x,a.i(Te-1).y))):Nt("Invalid angle "+te),a.zf()}else E=b,a=this.link,b=this.network.layout,y=qu(x),y!==qu(E)&&(ne=b.computeLayerSpacing(x),ae=x.bounds,x=E.bounds,y===0&&x.left-ae.right<ne+1||y===90&&x.top-ae.bottom<ne+1||y===180&&ae.left-x.right<ne+1||y===270&&ae.top-x.bottom<ne+1||(a.vg(),x=a.curve===ou,E=a.isOrthogonal,b=bd(this.fromVertex.alignment),a.uh(),y===0?(y=ae.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)):E?b?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=ae.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)):E?b?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=ae.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)):E?b?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=ae.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)):E?b?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()))}}},Ye.Object.defineProperties(Dp.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)}}}),Dp.className="TreeEdge",Wo.prototype.initializeStandardTools=function(){this.gb("Action",new ti,this.mouseDownTools),this.gb("Relinking",new Zn,this.mouseDownTools),this.gb("LinkReshaping",new Kn,this.mouseDownTools),this.gb("Rotating",new Ni,this.mouseDownTools),this.gb("Resizing",new Ai,this.mouseDownTools),this.gb("Linking",new xn,this.mouseMoveTools),this.gb("Dragging",new ns,this.mouseMoveTools),this.gb("DragSelecting",new Li,this.mouseMoveTools),this.gb("Panning",new bi,this.mouseMoveTools),this.gb("ContextMenu",new lr,this.mouseUpTools),this.gb("TextEditing",new kr,this.mouseUpTools),this.gb("ClickCreating",new ji,this.mouseUpTools),this.gb("ClickSelecting",new ar,this.mouseUpTools)},kc("Horizontal",new ym),kc("Spot",new xm),kc("Table",new bm),kc("Viewbox",new _m),kc("TableRow",new Cm),kc("TableColumn",new Pm),kc("Graduated",new dg),kc("Grid",new hg),rp.add("GraphLinksModel",fa),rp.add("TreeModel",xu);var W0=_t.go,zy={get licenseKey(){return vn.licenseKey},set licenseKey(a){vn.licenseKey=a},get version(){return vn.version},Group:tr,EnumValue:Ln,List:Bn,Set:In,Map:ci,Point:Mt,Size:Qn,Rect:kn,Margin:Mi,Spot:yi,Geometry:Yn,PathFigure:Vs,PathSegment:$r,InputEvent:Ea,DiagramEvent:Pc,ChangedEvent:Go,Model:xi,GraphLinksModel:zr,TreeModel:ll,Binding:Hs,Transaction:Bs,UndoManager:Fo,CommandHandler:It,Tool:Wr,DraggingTool:ns,DraggingInfo:ah,DraggingOptions:pe,LinkingBaseTool:Et,LinkingTool:xn,RelinkingTool:Zn,LinkReshapingTool:Kn,ResizingTool:Ai,RotatingTool:Ni,ClickSelectingTool:ar,ActionTool:ti,ClickCreatingTool:ji,HTMLInfo:Yi,ContextMenuTool:lr,DragSelectingTool:Li,PanningTool:bi,TextEditingTool:kr,ToolManager:Wo,Animation:gs,AnimationManager:Lo,AnimationTrigger:zl,Layer:os,Diagram:vn,Palette:Fe,Overview:Ue,Brush:fo,GraphObject:tn,Panel:Wn,RowColumnDefinition:ta,Shape:dr,TextBlock:Mo,Picture:vl,Part:Ti,Adornment:qr,Node:oi,Link:$n,Placeholder:rl,Layout:es,LayoutNetwork:To,LayoutVertex:aa,LayoutEdge:Gl,GridLayout:Pa,PanelLayout:sa,CircularLayout:hs,CircularNetwork:kp,CircularVertex:zg,CircularEdge:P0,ForceDirectedLayout:Aa,ForceDirectedNetwork:Rf,ForceDirectedVertex:Hg,ForceDirectedEdge:Ug,LayeredDigraphLayout:vo,LayeredDigraphNetwork:Np,LayeredDigraphVertex:bu,LayeredDigraphEdge:Zg,TreeLayout:Ar,TreeNetwork:zf,TreeVertex:Fu,TreeEdge:Dp};typeof W0=="object"&&W0.version&&Dn("WARNING: a `go` object on the root object is already defined. "+("Debug"in W0?"debug ":"")+"version: "+W0.version+", replaced with version: "+zy.version),vn.prototype.go=zy,_t.go=zy,typeof _n.exports=="object"&&(_n.exports=typeof Ee.g!="undefined"?Ee.g.go:self.go)}();var Me=typeof Ee.g!="undefined"?Ee.g.go:self.go;const me=typeof Ee.g!="undefined"?Ee.g.go:self.go,Be=me.Group,ke=me.EnumValue,Ce=me.List,Le=me.Set,he=me.Map,ye=me.Point,xe=me.Size,ge=me.Rect,le=me.Margin,ve=me.Spot,de=me.Geometry,ce=me.PathFigure,z=me.PathSegment,ee=me.InputEvent,oe=me.DiagramEvent,ie=me.ChangedEvent,se=me.Model,ue=me.GraphLinksModel,Se=me.TreeModel,we=me.Binding,Pe=me.Transaction,Ae=me.UndoManager,De=me.CommandHandler,ze=me.Tool,Ze=me.DraggingTool,Xe=me.DraggingInfo,Ge=me.LinkingBaseTool,ft=me.LinkingTool,at=me.RelinkingTool,Ct=me.LinkReshapingTool,et=me.ResizingTool,yt=me.RotatingTool,st=me.ClickSelectingTool,zt=me.ActionTool,lt=me.ClickCreatingTool,tt=me.HTMLInfo,ut=me.ContextMenuTool,mt=me.DragSelectingTool,Pt=me.PanningTool,gt=me.TextEditingTool,Ft=me.ToolManager,Ht=me.Animation,hn=me.AnimationManager,Jt=me.AnimationTrigger,bn=me.Layer,Wt=me.Diagram,Kt=me.Palette,Xt=me.Overview,$t=me.Brush,kt=me.GraphObject,pt=me.Panel,Bt=me.RowColumnDefinition,xt=me.Shape,vt=me.TextBlock,nt=me.TextBlockMetrics,He=me.Picture,Ie=me.Part,We=me.Adornment,Oe=me.Node,be=me.Link,Ne=me.Placeholder,$e=me.Layout,dt=me.LayoutNetwork,Je=me.LayoutVertex,At=me.LayoutEdge,en=me.GridLayout,pn=me.PanelLayout,ln=me.CircularLayout,gn=me.CircularNetwork,Un=me.CircularVertex,An=me.CircularEdge,ni=me.ForceDirectedLayout,ai=me.ForceDirectedNetwork,ki=me.ForceDirectedVertex,Ci=me.ForceDirectedEdge,Ki=me.LayeredDigraphLayout,ir=me.LayeredDigraphNetwork,sr=me.LayeredDigraphVertex,Ji=me.LayeredDigraphEdge,Fr=me.TreeLayout,Mr=me.TreeNetwork,vi=me.TreeVertex,wr=me.TreeEdge,Tr=me.version},24334:function(_n,qt,Ee){var Me,me;(function(Be,ke){_n.exports=ke(Be)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof Ee.g!="undefined"?Ee.g:this,function(Be){"use strict";Be=Be||{};var ke=Be.Base64,Ce="2.6.4",Le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",he=function(at){for(var Ct={},et=0,yt=at.length;et<yt;et++)Ct[at.charAt(et)]=et;return Ct}(Le),ye=String.fromCharCode,xe=function(at){if(at.length<2){var Ct=at.charCodeAt(0);return Ct<128?at:Ct<2048?ye(192|Ct>>>6)+ye(128|Ct&63):ye(224|Ct>>>12&15)+ye(128|Ct>>>6&63)+ye(128|Ct&63)}else{var Ct=65536+(at.charCodeAt(0)-55296)*1024+(at.charCodeAt(1)-56320);return ye(240|Ct>>>18&7)+ye(128|Ct>>>12&63)+ye(128|Ct>>>6&63)+ye(128|Ct&63)}},ge=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,le=function(at){return at.replace(ge,xe)},ve=function(at){var Ct=[0,2,1][at.length%3],et=at.charCodeAt(0)<<16|(at.length>1?at.charCodeAt(1):0)<<8|(at.length>2?at.charCodeAt(2):0),yt=[Le.charAt(et>>>18),Le.charAt(et>>>12&63),Ct>=2?"=":Le.charAt(et>>>6&63),Ct>=1?"=":Le.charAt(et&63)];return yt.join("")},de=Be.btoa&&typeof Be.btoa=="function"?function(at){return Be.btoa(at)}:function(at){if(at.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return at.replace(/[\s\S]{1,3}/g,ve)},ce=function(at){return de(le(String(at)))},z=function(at){return at.replace(/[+\/]/g,function(Ct){return Ct=="+"?"-":"_"}).replace(/=/g,"")},ee=function(at,Ct){return Ct?z(ce(at)):ce(at)},oe=function(at){return ee(at,!0)},ie;Be.Uint8Array&&(ie=function(at,Ct){for(var et="",yt=0,st=at.length;yt<st;yt+=3){var zt=at[yt],lt=at[yt+1],tt=at[yt+2],ut=zt<<16|lt<<8|tt;et+=Le.charAt(ut>>>18)+Le.charAt(ut>>>12&63)+(typeof lt!="undefined"?Le.charAt(ut>>>6&63):"=")+(typeof tt!="undefined"?Le.charAt(ut&63):"=")}return Ct?z(et):et});var se=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ue=function(at){switch(at.length){case 4:var Ct=(7&at.charCodeAt(0))<<18|(63&at.charCodeAt(1))<<12|(63&at.charCodeAt(2))<<6|63&at.charCodeAt(3),et=Ct-65536;return ye((et>>>10)+55296)+ye((et&1023)+56320);case 3:return ye((15&at.charCodeAt(0))<<12|(63&at.charCodeAt(1))<<6|63&at.charCodeAt(2));default:return ye((31&at.charCodeAt(0))<<6|63&at.charCodeAt(1))}},Se=function(at){return at.replace(se,ue)},we=function(at){var Ct=at.length,et=Ct%4,yt=(Ct>0?he[at.charAt(0)]<<18:0)|(Ct>1?he[at.charAt(1)]<<12:0)|(Ct>2?he[at.charAt(2)]<<6:0)|(Ct>3?he[at.charAt(3)]:0),st=[ye(yt>>>16),ye(yt>>>8&255),ye(yt&255)];return st.length-=[0,0,2,1][et],st.join("")},Pe=Be.atob&&typeof Be.atob=="function"?function(at){return Be.atob(at)}:function(at){return at.replace(/\S{1,4}/g,we)},Ae=function(at){return Pe(String(at).replace(/[^A-Za-z0-9\+\/]/g,""))},De=function(at){return Se(Pe(at))},ze=function(at){return String(at).replace(/[-_]/g,function(Ct){return Ct=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ze=function(at){return De(ze(at))},Xe;Be.Uint8Array&&(Xe=function(at){return Uint8Array.from(Ae(ze(at)),function(Ct){return Ct.charCodeAt(0)})});var Ge=function(){var at=Be.Base64;return Be.Base64=ke,at};if(Be.Base64={VERSION:Ce,atob:Ae,btoa:de,fromBase64:Ze,toBase64:ee,utob:le,encode:ee,encodeURI:oe,btou:Se,decode:Ze,noConflict:Ge,fromUint8Array:ie,toUint8Array:Xe},typeof Object.defineProperty=="function"){var ft=function(at){return{value:at,enumerable:!1,writable:!0,configurable:!0}};Be.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",ft(function(){return Ze(this)})),Object.defineProperty(String.prototype,"toBase64",ft(function(at){return ee(this,at)})),Object.defineProperty(String.prototype,"toBase64URI",ft(function(){return ee(this,!0)}))}}return Be.Meteor&&(Base64=Be.Base64),_n.exports?_n.exports.Base64=Be.Base64:(Me=[],me=function(){return Be.Base64}.apply(qt,Me),me!==void 0&&(_n.exports=me)),{Base64:Be.Base64}})},17115:function(_n,qt,Ee){"use strict";Ee.d(qt,{ZP:function(){return he}});var Me=Ee(52487),me=Ee(59301),Be=Ee(47273),ke=0,Ce=(0,Be.Z)();function Le(){var ye;return Ce?(ye=ke,ke+=1):ye="TEST_OR_SSR",ye}function he(ye){var xe=me.useState(),ge=(0,Me.Z)(xe,2),le=ge[0],ve=ge[1];return me.useEffect(function(){ve("rc_select_".concat(Le()))},[]),ye||le}},77861:function(_n,qt,Ee){"use strict";Ee.d(qt,{Ac:function(){return $e},Xo:function(){return Ci},Wx:function(){return ir},ZP:function(){return Ot},lk:function(){return Se}});var Me=Ee(72308),me=Ee(80702),Be=Ee(49618),ke=Ee(77321),Ce=Ee(52487),Le=Ee(74416),he=Ee(62853),ye=Ee(18929),xe=Ee(48736),ge=Ee(59301),le=Ee(92310),ve=Ee.n(le),de=Ee(34280),ce=Ee(49658),z=Ee(10228),ee=Ee(8654),oe=function(_t){var dn=_t.className,Pn=_t.customizeIcon,mn=_t.customizeIconProps,on=_t.onMouseDown,Nt=_t.onClick,un=_t.children,Mn;return typeof Pn=="function"?Mn=Pn(mn):Mn=Pn,ge.createElement("span",{className:dn,onMouseDown:function(nn){nn.preventDefault(),on&&on(nn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Nt,"aria-hidden":!0},Mn!==void 0?Mn:ge.createElement("span",{className:ve()(dn.split(/\s+/).map(function(Dn){return"".concat(Dn,"-icon")}))},un))},ie=oe;function se(Tt,_t,dn,Pn,mn){var on=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Nt=arguments.length>6?arguments[6]:void 0,un=arguments.length>7?arguments[7]:void 0,Mn=ge.useMemo(function(){if((0,he.Z)(Pn)==="object")return Pn.clearIcon;if(mn)return mn},[Pn,mn]),Dn=ge.useMemo(function(){return!!(!on&&Pn&&(dn.length||Nt)&&!(un==="combobox"&&Nt===""))},[Pn,on,dn.length,Nt,un]);return{allowClear:Dn,clearIcon:ge.createElement(ie,{className:"".concat(Tt,"-clear"),onMouseDown:_t,customizeIcon:Mn},"\xD7")}}var ue=ge.createContext(null);function Se(){return ge.useContext(ue)}function we(){var Tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,_t=ge.useState(!1),dn=(0,Ce.Z)(_t,2),Pn=dn[0],mn=dn[1],on=ge.useRef(null),Nt=function(){window.clearTimeout(on.current)};ge.useEffect(function(){return Nt},[]);var un=function(Dn,nn){Nt(),on.current=window.setTimeout(function(){mn(Dn),nn&&nn()},Tt)};return[Pn,un,Nt]}function Pe(){var Tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,_t=ge.useRef(null),dn=ge.useRef(null);ge.useEffect(function(){return function(){window.clearTimeout(dn.current)}},[]);function Pn(mn){(mn||_t.current===null)&&(_t.current=mn),window.clearTimeout(dn.current),dn.current=window.setTimeout(function(){_t.current=null},Tt)}return[function(){return _t.current},Pn]}function Ae(Tt,_t,dn,Pn){var mn=ge.useRef(null);mn.current={open:_t,triggerOpen:dn,customizedTrigger:Pn},ge.useEffect(function(){function on(Nt){var un;if(!((un=mn.current)!==null&&un!==void 0&&un.customizedTrigger)){var Mn=Nt.target;Mn.shadowRoot&&Nt.composed&&(Mn=Nt.composedPath()[0]||Mn),mn.current.open&&Tt().filter(function(Dn){return Dn}).every(function(Dn){return!Dn.contains(Mn)&&Dn!==Mn})&&mn.current.triggerOpen(!1)}}return window.addEventListener("mousedown",on),function(){return window.removeEventListener("mousedown",on)}},[])}var De=Ee(26112),ze=Ee(11780),Ze=function(_t,dn){var Pn,mn,on=_t.prefixCls,Nt=_t.id,un=_t.inputElement,Mn=_t.disabled,Dn=_t.tabIndex,nn=_t.autoFocus,sn=_t.autoComplete,Nn=_t.editable,On=_t.activeDescendantId,qn=_t.value,Hn=_t.maxLength,ei=_t.onKeyDown,Fn=_t.onMouseDown,hi=_t.onChange,Di=_t.onPaste,Ri=_t.onCompositionStart,En=_t.onCompositionEnd,$i=_t.open,Cr=_t.attrs,mr=un||ge.createElement("input",null),Ln=mr,Jn=Ln.ref,ui=Ln.props,Si=ui.onKeyDown,di=ui.onChange,Ei=ui.onMouseDown,qi=ui.onCompositionStart,Fi=ui.onCompositionEnd,zi=ui.style;return(0,xe.Kp)(!("maxLength"in mr.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),mr=ge.cloneElement(mr,(0,ke.Z)((0,ke.Z)((0,ke.Z)({type:"search"},ui),{},{id:Nt,ref:(0,ee.sQ)(dn,Jn),disabled:Mn,tabIndex:Dn,autoComplete:sn||"off",autoFocus:nn,className:ve()("".concat(on,"-selection-search-input"),(Pn=mr)===null||Pn===void 0||(mn=Pn.props)===null||mn===void 0?void 0:mn.className),role:"combobox","aria-label":"Search","aria-expanded":$i||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Nt,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Nt,"_list"),"aria-activedescendant":$i?On:void 0},Cr),{},{value:Nn?qn:"",maxLength:Hn,readOnly:!Nn,unselectable:Nn?null:"on",style:(0,ke.Z)((0,ke.Z)({},zi),{},{opacity:Nn?null:0}),onKeyDown:function(Bn){ei(Bn),Si&&Si(Bn)},onMouseDown:function(Bn){Fn(Bn),Ei&&Ei(Bn)},onChange:function(Bn){hi(Bn),di&&di(Bn)},onCompositionStart:function(Bn){Ri(Bn),qi&&qi(Bn)},onCompositionEnd:function(Bn){En(Bn),Fi&&Fi(Bn)},onPaste:Di})),mr},Xe=ge.forwardRef(Ze);Xe.displayName="Input";var Ge=Xe;function ft(Tt){return Array.isArray(Tt)?Tt:Tt!==void 0?[Tt]:[]}var at=typeof window!="undefined"&&window.document&&window.document.documentElement,Ct=at;function et(Tt){return Tt!=null}function yt(Tt){return!Tt&&Tt!==0}function st(Tt){return["string","number"].includes((0,he.Z)(Tt))}function zt(Tt){var _t=void 0;return Tt&&(st(Tt.title)?_t=Tt.title.toString():st(Tt.label)&&(_t=Tt.label.toString())),_t}function lt(Tt,_t){Ct?ge.useLayoutEffect(Tt,_t):ge.useEffect(Tt,_t)}function tt(Tt){var _t;return(_t=Tt.key)!==null&&_t!==void 0?_t:Tt.value}var ut=function(_t){_t.preventDefault(),_t.stopPropagation()},mt=function(_t){var dn=_t.id,Pn=_t.prefixCls,mn=_t.values,on=_t.open,Nt=_t.searchValue,un=_t.autoClearSearchValue,Mn=_t.inputRef,Dn=_t.placeholder,nn=_t.disabled,sn=_t.mode,Nn=_t.showSearch,On=_t.autoFocus,qn=_t.autoComplete,Hn=_t.activeDescendantId,ei=_t.tabIndex,Fn=_t.removeIcon,hi=_t.maxTagCount,Di=_t.maxTagTextLength,Ri=_t.maxTagPlaceholder,En=Ri===void 0?function(Gr){return"+ ".concat(Gr.length," ...")}:Ri,$i=_t.tagRender,Cr=_t.onToggleOpen,mr=_t.onRemove,Ln=_t.onInputChange,Jn=_t.onInputPaste,ui=_t.onInputKeyDown,Si=_t.onInputMouseDown,di=_t.onInputCompositionStart,Ei=_t.onInputCompositionEnd,qi=ge.useRef(null),Fi=(0,ge.useState)(0),zi=(0,Ce.Z)(Fi,2),fr=zi[0],Bn=zi[1],Br=(0,ge.useState)(!1),In=(0,Ce.Z)(Br,2),pr=In[0],yo=In[1],Ir="".concat(Pn,"-selection"),bo=on||sn==="multiple"&&un===!1||sn==="tags"?Nt:"",co=sn==="tags"||sn==="multiple"&&un===!1||Nn&&(on||pr);lt(function(){Bn(qi.current.scrollWidth)},[bo]);function Vi(Gr,Hr,ts,ko,ss){return ge.createElement("span",{className:ve()("".concat(Ir,"-item"),(0,Be.Z)({},"".concat(Ir,"-item-disabled"),ts)),title:zt(Gr)},ge.createElement("span",{className:"".concat(Ir,"-item-content")},Hr),ko&&ge.createElement(ie,{className:"".concat(Ir,"-item-remove"),onMouseDown:ut,onClick:ss,customizeIcon:Fn},"\xD7"))}function Hi(Gr,Hr,ts,ko,ss){var _r=function(Vr){ut(Vr),Cr(!on)};return ge.createElement("span",{onMouseDown:_r},$i({label:Hr,value:Gr,disabled:ts,closable:ko,onClose:ss}))}function ur(Gr){var Hr=Gr.disabled,ts=Gr.label,ko=Gr.value,ss=!nn&&!Hr,_r=ts;if(typeof Di=="number"&&(typeof ts=="string"||typeof ts=="number")){var cr=String(_r);cr.length>Di&&(_r="".concat(cr.slice(0,Di),"..."))}var Vr=function(eo){eo&&eo.stopPropagation(),mr(Gr)};return typeof $i=="function"?Hi(ko,_r,Hr,ss,Vr):Vi(Gr,_r,Hr,ss,Vr)}function Pr(Gr){var Hr=typeof En=="function"?En(Gr):En;return Vi({title:Hr},Hr,!1)}var ci=ge.createElement("div",{className:"".concat(Ir,"-search"),style:{width:fr},onFocus:function(){yo(!0)},onBlur:function(){yo(!1)}},ge.createElement(Ge,{ref:Mn,open:on,prefixCls:Pn,id:dn,inputElement:null,disabled:nn,autoFocus:On,autoComplete:qn,editable:co,activeDescendantId:Hn,value:bo,onKeyDown:ui,onMouseDown:Si,onChange:Ln,onPaste:Jn,onCompositionStart:di,onCompositionEnd:Ei,tabIndex:ei,attrs:(0,De.Z)(_t,!0)}),ge.createElement("span",{ref:qi,className:"".concat(Ir,"-search-mirror"),"aria-hidden":!0},bo,"\xA0")),Mt=ge.createElement(ze.Z,{prefixCls:"".concat(Ir,"-overflow"),data:mn,renderItem:ur,renderRest:Pr,suffix:ci,itemKey:tt,maxCount:hi});return ge.createElement(ge.Fragment,null,Mt,!mn.length&&!bo&&ge.createElement("span",{className:"".concat(Ir,"-placeholder")},Dn))},Pt=mt,gt=function(_t){var dn=_t.inputElement,Pn=_t.prefixCls,mn=_t.id,on=_t.inputRef,Nt=_t.disabled,un=_t.autoFocus,Mn=_t.autoComplete,Dn=_t.activeDescendantId,nn=_t.mode,sn=_t.open,Nn=_t.values,On=_t.placeholder,qn=_t.tabIndex,Hn=_t.showSearch,ei=_t.searchValue,Fn=_t.activeValue,hi=_t.maxLength,Di=_t.onInputKeyDown,Ri=_t.onInputMouseDown,En=_t.onInputChange,$i=_t.onInputPaste,Cr=_t.onInputCompositionStart,mr=_t.onInputCompositionEnd,Ln=_t.title,Jn=ge.useState(!1),ui=(0,Ce.Z)(Jn,2),Si=ui[0],di=ui[1],Ei=nn==="combobox",qi=Ei||Hn,Fi=Nn[0],zi=ei||"";Ei&&Fn&&!Si&&(zi=Fn),ge.useEffect(function(){Ei&&di(!1)},[Ei,Fn]);var fr=nn!=="combobox"&&!sn&&!Hn?!1:!!zi,Bn=Ln===void 0?zt(Fi):Ln,Br=function(){if(Fi)return null;var pr=fr?{visibility:"hidden"}:void 0;return ge.createElement("span",{className:"".concat(Pn,"-selection-placeholder"),style:pr},On)};return ge.createElement(ge.Fragment,null,ge.createElement("span",{className:"".concat(Pn,"-selection-search")},ge.createElement(Ge,{ref:on,prefixCls:Pn,id:mn,open:sn,inputElement:dn,disabled:Nt,autoFocus:un,autoComplete:Mn,editable:qi,activeDescendantId:Dn,value:zi,onKeyDown:Di,onMouseDown:Ri,onChange:function(pr){di(!0),En(pr)},onPaste:$i,onCompositionStart:Cr,onCompositionEnd:mr,tabIndex:qn,attrs:(0,De.Z)(_t,!0),maxLength:Ei?hi:void 0})),!Ei&&Fi?ge.createElement("span",{className:"".concat(Pn,"-selection-item"),title:Bn,style:fr?{visibility:"hidden"}:void 0},Fi.label):null,Br())},Ft=gt;function Ht(Tt){return![z.Z.ESC,z.Z.SHIFT,z.Z.BACKSPACE,z.Z.TAB,z.Z.WIN_KEY,z.Z.ALT,z.Z.META,z.Z.WIN_KEY_RIGHT,z.Z.CTRL,z.Z.SEMICOLON,z.Z.EQUALS,z.Z.CAPS_LOCK,z.Z.CONTEXT_MENU,z.Z.F1,z.Z.F2,z.Z.F3,z.Z.F4,z.Z.F5,z.Z.F6,z.Z.F7,z.Z.F8,z.Z.F9,z.Z.F10,z.Z.F11,z.Z.F12].includes(Tt)}var hn=function(_t,dn){var Pn=(0,ge.useRef)(null),mn=(0,ge.useRef)(!1),on=_t.prefixCls,Nt=_t.open,un=_t.mode,Mn=_t.showSearch,Dn=_t.tokenWithEnter,nn=_t.autoClearSearchValue,sn=_t.onSearch,Nn=_t.onSearchSubmit,On=_t.onToggleOpen,qn=_t.onInputKeyDown,Hn=_t.domRef;ge.useImperativeHandle(dn,function(){return{focus:function(){Pn.current.focus()},blur:function(){Pn.current.blur()}}});var ei=Pe(0),Fn=(0,Ce.Z)(ei,2),hi=Fn[0],Di=Fn[1],Ri=function(zi){var fr=zi.which;(fr===z.Z.UP||fr===z.Z.DOWN)&&zi.preventDefault(),qn&&qn(zi),fr===z.Z.ENTER&&un==="tags"&&!mn.current&&!Nt&&(Nn==null||Nn(zi.target.value)),Ht(fr)&&On(!0)},En=function(){Di(!0)},$i=(0,ge.useRef)(null),Cr=function(zi){sn(zi,!0,mn.current)!==!1&&On(!0)},mr=function(){mn.current=!0},Ln=function(zi){mn.current=!1,un!=="combobox"&&Cr(zi.target.value)},Jn=function(zi){var fr=zi.target.value;if(Dn&&$i.current&&/[\r\n]/.test($i.current)){var Bn=$i.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");fr=fr.replace(Bn,$i.current)}$i.current=null,Cr(fr)},ui=function(zi){var fr=zi.clipboardData,Bn=fr.getData("text");$i.current=Bn},Si=function(zi){var fr=zi.target;if(fr!==Pn.current){var Bn=document.body.style.msTouchAction!==void 0;Bn?setTimeout(function(){Pn.current.focus()}):Pn.current.focus()}},di=function(zi){var fr=hi();zi.target!==Pn.current&&!fr&&un!=="combobox"&&zi.preventDefault(),(un!=="combobox"&&(!Mn||!fr)||!Nt)&&(Nt&&nn!==!1&&sn("",!0,!1),On())},Ei={inputRef:Pn,onInputKeyDown:Ri,onInputMouseDown:En,onInputChange:Jn,onInputPaste:ui,onInputCompositionStart:mr,onInputCompositionEnd:Ln},qi=un==="multiple"||un==="tags"?ge.createElement(Pt,(0,Me.Z)({},_t,Ei)):ge.createElement(Ft,(0,Me.Z)({},_t,Ei));return ge.createElement("div",{ref:Hn,className:"".concat(on,"-selector"),onClick:Si,onMouseDown:di},qi)},Jt=ge.forwardRef(hn);Jt.displayName="Selector";var bn=Jt,Wt=Ee(35593),Kt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Xt=function(_t){var dn=_t===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:dn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:dn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:dn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:dn,adjustY:1},htmlRegion:"scroll"}}},$t=function(_t,dn){var Pn=_t.prefixCls,mn=_t.disabled,on=_t.visible,Nt=_t.children,un=_t.popupElement,Mn=_t.animation,Dn=_t.transitionName,nn=_t.dropdownStyle,sn=_t.dropdownClassName,Nn=_t.direction,On=Nn===void 0?"ltr":Nn,qn=_t.placement,Hn=_t.builtinPlacements,ei=_t.dropdownMatchSelectWidth,Fn=_t.dropdownRender,hi=_t.dropdownAlign,Di=_t.getPopupContainer,Ri=_t.empty,En=_t.getTriggerDOMNode,$i=_t.onPopupVisibleChange,Cr=_t.onPopupMouseEnter,mr=(0,Le.Z)(_t,Kt),Ln="".concat(Pn,"-dropdown"),Jn=un;Fn&&(Jn=Fn(un));var ui=ge.useMemo(function(){return Hn||Xt(ei)},[Hn,ei]),Si=Mn?"".concat(Ln,"-").concat(Mn):Dn,di=typeof ei=="number",Ei=ge.useMemo(function(){return di?null:ei===!1?"minWidth":"width"},[ei,di]),qi=nn;di&&(qi=(0,ke.Z)((0,ke.Z)({},qi),{},{width:ei}));var Fi=ge.useRef(null);return ge.useImperativeHandle(dn,function(){return{getPopupElement:function(){return Fi.current}}}),ge.createElement(Wt.Z,(0,Me.Z)({},mr,{showAction:$i?["click"]:[],hideAction:$i?["click"]:[],popupPlacement:qn||(On==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:ui,prefixCls:Ln,popupTransitionName:Si,popup:ge.createElement("div",{ref:Fi,onMouseEnter:Cr},Jn),stretch:Ei,popupAlign:hi,popupVisible:on,getPopupContainer:Di,popupClassName:ve()(sn,(0,Be.Z)({},"".concat(Ln,"-empty"),Ri)),popupStyle:qi,getTriggerDOMNode:En,onPopupVisibleChange:$i}),Nt)},kt=ge.forwardRef($t);kt.displayName="SelectTrigger";var pt=kt,Bt=Ee(68413);function xt(Tt,_t){var dn=Tt.key,Pn;return"value"in Tt&&(Pn=Tt.value),dn!=null?dn:Pn!==void 0?Pn:"rc-index-key-".concat(_t)}function vt(Tt,_t){var dn=Tt||{},Pn=dn.label,mn=dn.value,on=dn.options,Nt=dn.groupLabel,un=Pn||(_t?"children":"label");return{label:un,value:mn||"value",options:on||"options",groupLabel:Nt||un}}function nt(Tt){var _t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},dn=_t.fieldNames,Pn=_t.childrenAsData,mn=[],on=vt(dn,!1),Nt=on.label,un=on.value,Mn=on.options,Dn=on.groupLabel;function nn(sn,Nn){sn.forEach(function(On){if(Nn||!(Mn in On)){var qn=On[un];mn.push({key:xt(On,mn.length),groupOption:Nn,data:On,label:On[Nt],value:qn})}else{var Hn=On[Dn];Hn===void 0&&Pn&&(Hn=On.label),mn.push({key:xt(On,mn.length),group:!0,data:On,label:Hn}),nn(On[Mn],!0)}})}return nn(Tt,!1),mn}function He(Tt){var _t=(0,ke.Z)({},Tt);return"props"in _t||Object.defineProperty(_t,"props",{get:function(){return(0,xe.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),_t}}),_t}function Ie(Tt,_t){if(!_t||!_t.length)return null;var dn=!1;function Pn(on,Nt){var un=(0,Bt.Z)(Nt),Mn=un[0],Dn=un.slice(1);if(!Mn)return[on];var nn=on.split(Mn);return dn=dn||nn.length>1,nn.reduce(function(sn,Nn){return[].concat((0,me.Z)(sn),(0,me.Z)(Pn(Nn,Dn)))},[]).filter(function(sn){return sn})}var mn=Pn(Tt,_t);return dn?mn:null}var We=["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"],Oe=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function be(Tt){return Tt==="tags"||Tt==="multiple"}var Ne=ge.forwardRef(function(Tt,_t){var dn,Pn,mn=Tt.id,on=Tt.prefixCls,Nt=Tt.className,un=Tt.showSearch,Mn=Tt.tagRender,Dn=Tt.direction,nn=Tt.omitDomProps,sn=Tt.displayValues,Nn=Tt.onDisplayValuesChange,On=Tt.emptyOptions,qn=Tt.notFoundContent,Hn=qn===void 0?"Not Found":qn,ei=Tt.onClear,Fn=Tt.mode,hi=Tt.disabled,Di=Tt.loading,Ri=Tt.getInputElement,En=Tt.getRawInputElement,$i=Tt.open,Cr=Tt.defaultOpen,mr=Tt.onDropdownVisibleChange,Ln=Tt.activeValue,Jn=Tt.onActiveValueChange,ui=Tt.activeDescendantId,Si=Tt.searchValue,di=Tt.autoClearSearchValue,Ei=Tt.onSearch,qi=Tt.onSearchSplit,Fi=Tt.tokenSeparators,zi=Tt.allowClear,fr=Tt.suffixIcon,Bn=Tt.clearIcon,Br=Tt.OptionList,In=Tt.animation,pr=Tt.transitionName,yo=Tt.dropdownStyle,Ir=Tt.dropdownClassName,bo=Tt.dropdownMatchSelectWidth,co=Tt.dropdownRender,Vi=Tt.dropdownAlign,Hi=Tt.placement,ur=Tt.builtinPlacements,Pr=Tt.getPopupContainer,ci=Tt.showAction,Mt=ci===void 0?[]:ci,Gr=Tt.onFocus,Hr=Tt.onBlur,ts=Tt.onKeyUp,ko=Tt.onKeyDown,ss=Tt.onMouseDown,_r=(0,Le.Z)(Tt,We),cr=be(Fn),Vr=(un!==void 0?un:cr)||Fn==="combobox",hr=(0,ke.Z)({},_r);Oe.forEach(function(oo){delete hr[oo]}),nn==null||nn.forEach(function(oo){delete hr[oo]});var eo=ge.useState(!1),Yo=(0,Ce.Z)(eo,2),rr=Yo[0],Wi=Yo[1];ge.useEffect(function(){Wi((0,ce.Z)())},[]);var Qn=ge.useRef(null),or=ge.useRef(null),to=ge.useRef(null),Ro=ge.useRef(null),Bo=ge.useRef(null),Xo=we(),as=(0,Ce.Z)(Xo,3),Ho=as[0],ia=as[1],_s=as[2];ge.useImperativeHandle(_t,function(){var oo,Uo;return{focus:(oo=Ro.current)===null||oo===void 0?void 0:oo.focus,blur:(Uo=Ro.current)===null||Uo===void 0?void 0:Uo.blur,scrollTo:function(ra){var Ds;return(Ds=Bo.current)===null||Ds===void 0?void 0:Ds.scrollTo(ra)}}});var la=ge.useMemo(function(){var oo;if(Fn!=="combobox")return Si;var Uo=(oo=sn[0])===null||oo===void 0?void 0:oo.value;return typeof Uo=="string"||typeof Uo=="number"?String(Uo):""},[Si,Fn,sn]),kn=Fn==="combobox"&&typeof Ri=="function"&&Ri()||null,Is=typeof En=="function"&&En(),Pu=(0,ee.x1)(or,Is==null||(dn=Is.props)===null||dn===void 0?void 0:dn.ref),Ua=ge.useState(!1),Sa=(0,Ce.Z)(Ua,2),us=Sa[0],Ws=Sa[1];(0,de.Z)(function(){Ws(!0)},[]);var Po=(0,ye.Z)(!1,{defaultValue:Cr,value:$i}),Ao=(0,Ce.Z)(Po,2),Eo=Ao[0],ua=Ao[1],xr=us?Eo:!1,lo=!Hn&&On;(hi||lo&&xr&&Fn==="combobox")&&(xr=!1);var Yr=lo?!1:xr,Mi=ge.useCallback(function(oo){var Uo=oo!==void 0?oo:!xr;hi||(ua(Uo),xr!==Uo&&(mr==null||mr(Uo)))},[hi,xr,ua,mr]),Es=ge.useMemo(function(){return(Fi||[]).some(function(oo){return[`
|
|
|
`,`\r
|
|
|
`].includes(oo)})},[Fi]),Ls=function(Uo,ka,ra){var Ds=!0,bs=Uo;Jn==null||Jn(null);var ks=ra?null:Ie(Uo,Fi);return Fn!=="combobox"&&ks&&(bs="",qi==null||qi(ks),Mi(!1),Ds=!1),Ei&&la!==bs&&Ei(bs,{source:ka?"typing":"effect"}),Ds},xa=function(Uo){!Uo||!Uo.trim()||Ei(Uo,{source:"submit"})};ge.useEffect(function(){!xr&&!cr&&Fn!=="combobox"&&Ls("",!1,!1)},[xr]),ge.useEffect(function(){Eo&&hi&&ua(!1),hi&&ia(!1)},[hi]);var xl=Pe(),Il=(0,Ce.Z)(xl,2),yi=Il[0],ms=Il[1],Xs=function(Uo){var ka=yi(),ra=Uo.which;if(ra===z.Z.ENTER&&(Fn!=="combobox"&&Uo.preventDefault(),xr||Mi(!0)),ms(!!la),ra===z.Z.BACKSPACE&&!ka&&cr&&!la&&sn.length){for(var Ds=(0,me.Z)(sn),bs=null,ks=Ds.length-1;ks>=0;ks-=1){var Zs=Ds[ks];if(!Zs.disabled){Ds.splice(ks,1),bs=Zs;break}}bs&&Nn(Ds,{type:"remove",values:[bs]})}for(var Ks=arguments.length,Yl=new Array(Ks>1?Ks-1:0),Bl=1;Bl<Ks;Bl++)Yl[Bl-1]=arguments[Bl];if(xr&&Bo.current){var Rs;(Rs=Bo.current).onKeyDown.apply(Rs,[Uo].concat(Yl))}ko==null||ko.apply(void 0,[Uo].concat(Yl))},qa=function(Uo){for(var ka=arguments.length,ra=new Array(ka>1?ka-1:0),Ds=1;Ds<ka;Ds++)ra[Ds-1]=arguments[Ds];if(xr&&Bo.current){var bs;(bs=Bo.current).onKeyUp.apply(bs,[Uo].concat(ra))}ts==null||ts.apply(void 0,[Uo].concat(ra))},wl=function(Uo){var ka=sn.filter(function(ra){return ra!==Uo});Nn(ka,{type:"remove",values:[Uo]})},Dl=ge.useRef(!1),jr=function(){ia(!0),hi||(Gr&&!Dl.current&&Gr.apply(void 0,arguments),Mt.includes("focus")&&Mi(!0)),Dl.current=!0},nc=function(){ia(!1,function(){Dl.current=!1,Mi(!1)}),!hi&&(la&&(Fn==="tags"?Ei(la,{source:"submit"}):Fn==="multiple"&&Ei("",{source:"blur"})),Hr&&Hr.apply(void 0,arguments))},Ia=[];ge.useEffect(function(){return function(){Ia.forEach(function(oo){return clearTimeout(oo)}),Ia.splice(0,Ia.length)}},[]);var Ga=function(Uo){var ka,ra=Uo.target,Ds=(ka=to.current)===null||ka===void 0?void 0:ka.getPopupElement();if(Ds&&Ds.contains(ra)){var bs=setTimeout(function(){var Yl=Ia.indexOf(bs);if(Yl!==-1&&Ia.splice(Yl,1),_s(),!rr&&!Ds.contains(document.activeElement)){var Bl;(Bl=Ro.current)===null||Bl===void 0||Bl.focus()}});Ia.push(bs)}for(var ks=arguments.length,Zs=new Array(ks>1?ks-1:0),Ks=1;Ks<ks;Ks++)Zs[Ks-1]=arguments[Ks];ss==null||ss.apply(void 0,[Uo].concat(Zs))},Na=ge.useState({}),$l=(0,Ce.Z)(Na,2),_u=$l[1];function Wa(){_u({})}var Za;Is&&(Za=function(Uo){Mi(Uo)}),Ae(function(){var oo;return[Qn.current,(oo=to.current)===null||oo===void 0?void 0:oo.getPopupElement()]},Yr,Mi,!!Is);var Uu=ge.useMemo(function(){return(0,ke.Z)((0,ke.Z)({},Tt),{},{notFoundContent:Hn,open:xr,triggerOpen:Yr,id:mn,showSearch:Vr,multiple:cr,toggleOpen:Mi})},[Tt,Hn,Yr,xr,mn,Vr,cr,Mi]),yc=!!fr||Di,Eu;yc&&(Eu=ge.createElement(ie,{className:ve()("".concat(on,"-arrow"),(0,Be.Z)({},"".concat(on,"-arrow-loading"),Di)),customizeIcon:fr,customizeIconProps:{loading:Di,searchValue:la,open:xr,focused:Ho,showSearch:Vr}}));var Rl=function(){var Uo;ei==null||ei(),(Uo=Ro.current)===null||Uo===void 0||Uo.focus(),Nn([],{type:"clear",values:sn}),Ls("",!1,!1)},Sc=se(on,Rl,sn,zi,Bn,hi,la,Fn),Gu=Sc.allowClear,Lu=Sc.clearIcon,bl=ge.createElement(Br,{ref:Bo}),th=ve()(on,Nt,(Pn={},(0,Be.Z)(Pn,"".concat(on,"-focused"),Ho),(0,Be.Z)(Pn,"".concat(on,"-multiple"),cr),(0,Be.Z)(Pn,"".concat(on,"-single"),!cr),(0,Be.Z)(Pn,"".concat(on,"-allow-clear"),zi),(0,Be.Z)(Pn,"".concat(on,"-show-arrow"),yc),(0,Be.Z)(Pn,"".concat(on,"-disabled"),hi),(0,Be.Z)(Pn,"".concat(on,"-loading"),Di),(0,Be.Z)(Pn,"".concat(on,"-open"),xr),(0,Be.Z)(Pn,"".concat(on,"-customize-input"),kn),(0,Be.Z)(Pn,"".concat(on,"-show-search"),Vr),Pn)),xc=ge.createElement(pt,{ref:to,disabled:hi,prefixCls:on,visible:Yr,popupElement:bl,animation:In,transitionName:pr,dropdownStyle:yo,dropdownClassName:Ir,direction:Dn,dropdownMatchSelectWidth:bo,dropdownRender:co,dropdownAlign:Vi,placement:Hi,builtinPlacements:ur,getPopupContainer:Pr,empty:On,getTriggerDOMNode:function(){return or.current},onPopupVisibleChange:Za,onPopupMouseEnter:Wa},Is?ge.cloneElement(Is,{ref:Pu}):ge.createElement(bn,(0,Me.Z)({},Tt,{domRef:or,prefixCls:on,inputElement:kn,ref:Ro,id:mn,showSearch:Vr,autoClearSearchValue:di,mode:Fn,activeDescendantId:ui,tagRender:Mn,values:sn,open:xr,onToggleOpen:Mi,activeValue:Ln,searchValue:la,onSearch:Ls,onSearchSubmit:xa,onRemove:wl,tokenWithEnter:Es}))),lu;return Is?lu=xc:lu=ge.createElement("div",(0,Me.Z)({className:th},hr,{ref:Qn,onMouseDown:Ga,onKeyDown:Xs,onKeyUp:qa,onFocus:jr,onBlur:nc}),Ho&&!xr&&ge.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(sn.map(function(oo){var Uo=oo.label,ka=oo.value;return["number","string"].includes((0,he.Z)(Uo))?Uo:ka}).join(", "))),xc,Eu,Gu&&Lu),ge.createElement(ue.Provider,{value:Uu},lu)}),$e=Ne,dt=function(Tt,_t){var dn=ge.useRef({values:new Map,options:new Map}),Pn=ge.useMemo(function(){var on=dn.current,Nt=on.values,un=on.options,Mn=Tt.map(function(sn){if(sn.label===void 0){var Nn;return(0,ke.Z)((0,ke.Z)({},sn),{},{label:(Nn=Nt.get(sn.value))===null||Nn===void 0?void 0:Nn.label})}return sn}),Dn=new Map,nn=new Map;return Mn.forEach(function(sn){Dn.set(sn.value,sn),nn.set(sn.value,_t.get(sn.value)||un.get(sn.value))}),dn.current.values=Dn,dn.current.options=nn,Mn},[Tt,_t]),mn=ge.useCallback(function(on){return _t.get(on)||dn.current.options.get(on)},[_t]);return[Pn,mn]};function Je(Tt,_t){return ft(Tt).join("").toUpperCase().includes(_t)}var At=function(Tt,_t,dn,Pn,mn){return ge.useMemo(function(){if(!dn||Pn===!1)return Tt;var on=_t.options,Nt=_t.label,un=_t.value,Mn=[],Dn=typeof Pn=="function",nn=dn.toUpperCase(),sn=Dn?Pn:function(On,qn){return mn?Je(qn[mn],nn):qn[on]?Je(qn[Nt!=="children"?Nt:"label"],nn):Je(qn[un],nn)},Nn=Dn?function(On){return He(On)}:function(On){return On};return Tt.forEach(function(On){if(On[on]){var qn=sn(dn,Nn(On));if(qn)Mn.push(On);else{var Hn=On[on].filter(function(ei){return sn(dn,Nn(ei))});Hn.length&&Mn.push((0,ke.Z)((0,ke.Z)({},On),{},(0,Be.Z)({},on,Hn)))}return}sn(dn,Nn(On))&&Mn.push(On)}),Mn},[Tt,Pn,mn,dn,_t])},en=Ee(17115),pn=Ee(11592),ln=["children","value"],gn=["children"];function Un(Tt){var _t=Tt,dn=_t.key,Pn=_t.props,mn=Pn.children,on=Pn.value,Nt=(0,Le.Z)(Pn,ln);return(0,ke.Z)({key:dn,value:on!==void 0?on:dn,children:mn},Nt)}function An(Tt){var _t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,pn.Z)(Tt).map(function(dn,Pn){if(!ge.isValidElement(dn)||!dn.type)return null;var mn=dn,on=mn.type.isSelectOptGroup,Nt=mn.key,un=mn.props,Mn=un.children,Dn=(0,Le.Z)(un,gn);return _t||!on?Un(dn):(0,ke.Z)((0,ke.Z)({key:"__RC_SELECT_GRP__".concat(Nt===null?Pn:Nt,"__"),label:Nt},Dn),{},{options:An(Mn)})}).filter(function(dn){return dn})}function ni(Tt,_t,dn,Pn,mn){return ge.useMemo(function(){var on=Tt,Nt=!Tt;Nt&&(on=An(_t));var un=new Map,Mn=new Map,Dn=function(Nn,On,qn){qn&&typeof qn=="string"&&Nn.set(On[qn],On)};function nn(sn){for(var Nn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,On=0;On<sn.length;On+=1){var qn=sn[On];!qn[dn.options]||Nn?(un.set(qn[dn.value],qn),Dn(Mn,qn,dn.label),Dn(Mn,qn,Pn),Dn(Mn,qn,mn)):nn(qn[dn.options],!0)}}return nn(on),{options:on,valueOptions:un,labelOptions:Mn}},[Tt,_t,dn,Pn,mn])}function ai(Tt){var _t=ge.useRef();_t.current=Tt;var dn=ge.useCallback(function(){return _t.current.apply(_t,arguments)},[]);return dn}var ki=function(){return null};ki.isSelectOptGroup=!0;var Ci=ki,Ki=function(){return null};Ki.isSelectOption=!0;var ir=Ki,sr=Ee(80547),Ji=Ee(2738),Fr=Ee(45680),Mr=ge.createContext(null),vi=Mr;function wr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Tr=["disabled","title","children","style","className"];function it(Tt){return typeof Tt=="string"||typeof Tt=="number"}var Rr=function(_t,dn){var Pn=Se(),mn=Pn.prefixCls,on=Pn.id,Nt=Pn.open,un=Pn.multiple,Mn=Pn.mode,Dn=Pn.searchValue,nn=Pn.toggleOpen,sn=Pn.notFoundContent,Nn=Pn.onPopupScroll,On=ge.useContext(vi),qn=On.flattenOptions,Hn=On.onActiveValue,ei=On.defaultActiveFirstOption,Fn=On.onSelect,hi=On.menuItemSelectedIcon,Di=On.rawValues,Ri=On.fieldNames,En=On.virtual,$i=On.direction,Cr=On.listHeight,mr=On.listItemHeight,Ln="".concat(mn,"-item"),Jn=(0,sr.Z)(function(){return qn},[Nt,qn],function(Vi,Hi){return Hi[0]&&Vi[1]!==Hi[1]}),ui=ge.useRef(null),Si=function(Hi){Hi.preventDefault()},di=function(Hi){ui.current&&ui.current.scrollTo(typeof Hi=="number"?{index:Hi}:Hi)},Ei=function(Hi){for(var ur=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Pr=Jn.length,ci=0;ci<Pr;ci+=1){var Mt=(Hi+ci*ur+Pr)%Pr,Gr=Jn[Mt],Hr=Gr.group,ts=Gr.data;if(!Hr&&!ts.disabled)return Mt}return-1},qi=ge.useState(function(){return Ei(0)}),Fi=(0,Ce.Z)(qi,2),zi=Fi[0],fr=Fi[1],Bn=function(Hi){var ur=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;fr(Hi);var Pr={source:ur?"keyboard":"mouse"},ci=Jn[Hi];if(!ci){Hn(null,-1,Pr);return}Hn(ci.value,Hi,Pr)};(0,ge.useEffect)(function(){Bn(ei!==!1?Ei(0):-1)},[Jn.length,Dn]);var Br=ge.useCallback(function(Vi){return Di.has(Vi)&&Mn!=="combobox"},[Mn,(0,me.Z)(Di).toString(),Di.size]);(0,ge.useEffect)(function(){var Vi=setTimeout(function(){if(!un&&Nt&&Di.size===1){var ur=Array.from(Di)[0],Pr=Jn.findIndex(function(ci){var Mt=ci.data;return Mt.value===ur});Pr!==-1&&(Bn(Pr),di(Pr))}});if(Nt){var Hi;(Hi=ui.current)===null||Hi===void 0||Hi.scrollTo(void 0)}return function(){return clearTimeout(Vi)}},[Nt,Dn,qn.length]);var In=function(Hi){Hi!==void 0&&Fn(Hi,{selected:!Di.has(Hi)}),un||nn(!1)};if(ge.useImperativeHandle(dn,function(){return{onKeyDown:function(Hi){var ur=Hi.which,Pr=Hi.ctrlKey;switch(ur){case z.Z.N:case z.Z.P:case z.Z.UP:case z.Z.DOWN:{var ci=0;if(ur===z.Z.UP?ci=-1:ur===z.Z.DOWN?ci=1:wr()&&Pr&&(ur===z.Z.N?ci=1:ur===z.Z.P&&(ci=-1)),ci!==0){var Mt=Ei(zi+ci,ci);di(Mt),Bn(Mt,!0)}break}case z.Z.ENTER:{var Gr=Jn[zi];Gr&&!Gr.data.disabled?In(Gr.value):In(void 0),Nt&&Hi.preventDefault();break}case z.Z.ESC:nn(!1),Nt&&Hi.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Hi){di(Hi)}}}),Jn.length===0)return ge.createElement("div",{role:"listbox",id:"".concat(on,"_list"),className:"".concat(Ln,"-empty"),onMouseDown:Si},sn);var pr=Object.keys(Ri).map(function(Vi){return Ri[Vi]}),yo=function(Hi){return Hi.label};function Ir(Vi,Hi){var ur=Vi.group;return{role:ur?"presentation":"option",id:"".concat(on,"_list_").concat(Hi)}}var bo=function(Hi){var ur=Jn[Hi];if(!ur)return null;var Pr=ur.data||{},ci=Pr.value,Mt=ur.group,Gr=(0,De.Z)(Pr,!0),Hr=yo(ur);return ur?ge.createElement("div",(0,Me.Z)({"aria-label":typeof Hr=="string"&&!Mt?Hr:null},Gr,{key:Hi},Ir(ur,Hi),{"aria-selected":Br(ci)}),ci):null},co={role:"listbox",id:"".concat(on,"_list")};return ge.createElement(ge.Fragment,null,En&&ge.createElement("div",(0,Me.Z)({},co,{style:{height:0,width:0,overflow:"hidden"}}),bo(zi-1),bo(zi),bo(zi+1)),ge.createElement(Fr.Z,{itemKey:"key",ref:ui,data:Jn,height:Cr,itemHeight:mr,fullHeight:!1,onMouseDown:Si,onScroll:Nn,virtual:En,direction:$i,innerProps:En?null:co},function(Vi,Hi){var ur,Pr=Vi.group,ci=Vi.groupOption,Mt=Vi.data,Gr=Vi.label,Hr=Vi.value,ts=Mt.key;if(Pr){var ko,ss=(ko=Mt.title)!==null&&ko!==void 0?ko:it(Gr)?Gr.toString():void 0;return ge.createElement("div",{className:ve()(Ln,"".concat(Ln,"-group")),title:ss},Gr!==void 0?Gr:ts)}var _r=Mt.disabled,cr=Mt.title,Vr=Mt.children,hr=Mt.style,eo=Mt.className,Yo=(0,Le.Z)(Mt,Tr),rr=(0,Ji.Z)(Yo,pr),Wi=Br(Hr),Qn="".concat(Ln,"-option"),or=ve()(Ln,Qn,eo,(ur={},(0,Be.Z)(ur,"".concat(Qn,"-grouped"),ci),(0,Be.Z)(ur,"".concat(Qn,"-active"),zi===Hi&&!_r),(0,Be.Z)(ur,"".concat(Qn,"-disabled"),_r),(0,Be.Z)(ur,"".concat(Qn,"-selected"),Wi),ur)),to=yo(Vi),Ro=!hi||typeof hi=="function"||Wi,Bo=typeof to=="number"?to:to||Hr,Xo=it(Bo)?Bo.toString():void 0;return cr!==void 0&&(Xo=cr),ge.createElement("div",(0,Me.Z)({},(0,De.Z)(rr),En?{}:Ir(Vi,Hi),{"aria-selected":Wi,className:or,title:Xo,onMouseMove:function(){zi===Hi||_r||Bn(Hi)},onClick:function(){_r||In(Hr)},style:hr}),ge.createElement("div",{className:"".concat(Qn,"-content")},Bo),ge.isValidElement(hi)||Wi,Ro&&ge.createElement(ie,{className:"".concat(Ln,"-option-state"),customizeIcon:hi,customizeIconProps:{isSelected:Wi}},Wi?"\u2713":null))}))},Or=ge.forwardRef(Rr);Or.displayName="OptionList";var Ur=Or;function uo(Tt){var _t=Tt.mode,dn=Tt.options,Pn=Tt.children,mn=Tt.backfill,on=Tt.allowClear,Nt=Tt.placeholder,un=Tt.getInputElement,Mn=Tt.showSearch,Dn=Tt.onSearch,nn=Tt.defaultOpen,sn=Tt.autoFocus,Nn=Tt.labelInValue,On=Tt.value,qn=Tt.inputValue,Hn=Tt.optionLabelProp,ei=isMultiple(_t),Fn=Mn!==void 0?Mn:ei||_t==="combobox",hi=dn||convertChildrenToData(Pn);if(warning(_t!=="tags"||hi.every(function($i){return!$i.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),_t==="tags"||_t==="combobox"){var Di=hi.some(function($i){return $i.options?$i.options.some(function(Cr){return typeof("value"in Cr?Cr.value:Cr.key)=="number"}):typeof("value"in $i?$i.value:$i.key)=="number"});warning(!Di,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(_t!=="combobox"||!Hn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(_t==="combobox"||!mn,"`backfill` only works with `combobox` mode."),warning(_t==="combobox"||!un,"`getInputElement` only work with `combobox` mode."),noteOnce(_t!=="combobox"||!un||!on||!Nt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Dn&&!Fn&&_t!=="combobox"&&_t!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!nn||sn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),On!=null){var Ri=toArray(On);warning(!Nn||Ri.every(function($i){return _typeof($i)==="object"&&("key"in $i||"value"in $i)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!ei||Array.isArray(On),"`value` should be array when `mode` is `multiple` or `tags`")}if(Pn){var En=null;toNodeArray(Pn).some(function($i){if(!React.isValidElement($i)||!$i.type)return!1;var Cr=$i,mr=Cr.type;if(mr.isSelectOption)return!1;if(mr.isSelectOptGroup){var Ln=toNodeArray($i.props.children).every(function(Jn){return!React.isValidElement(Jn)||!$i.type||Jn.type.isSelectOption?!0:(En=Jn.type,!1)});return!Ln}return En=mr,!0}),En&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(En.displayName||En.name||En,"`.")),warning(qn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function po(Tt,_t){if(Tt){var dn=function Pn(mn){for(var on=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Nt=0;Nt<mn.length;Nt++){var un=mn[Nt];if(un[_t==null?void 0:_t.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!on&&Array.isArray(un[_t==null?void 0:_t.options])&&Pn(un[_t==null?void 0:_t.options],!0))break}};dn(Tt)}}var io=null,Do=["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"],Xn=["inputValue"];function Ke(Tt){return!Tt||(0,he.Z)(Tt)!=="object"}var qe=ge.forwardRef(function(Tt,_t){var dn=Tt.id,Pn=Tt.mode,mn=Tt.prefixCls,on=mn===void 0?"rc-select":mn,Nt=Tt.backfill,un=Tt.fieldNames,Mn=Tt.inputValue,Dn=Tt.searchValue,nn=Tt.onSearch,sn=Tt.autoClearSearchValue,Nn=sn===void 0?!0:sn,On=Tt.onSelect,qn=Tt.onDeselect,Hn=Tt.dropdownMatchSelectWidth,ei=Hn===void 0?!0:Hn,Fn=Tt.filterOption,hi=Tt.filterSort,Di=Tt.optionFilterProp,Ri=Tt.optionLabelProp,En=Tt.options,$i=Tt.children,Cr=Tt.defaultActiveFirstOption,mr=Tt.menuItemSelectedIcon,Ln=Tt.virtual,Jn=Tt.direction,ui=Tt.listHeight,Si=ui===void 0?200:ui,di=Tt.listItemHeight,Ei=di===void 0?20:di,qi=Tt.value,Fi=Tt.defaultValue,zi=Tt.labelInValue,fr=Tt.onChange,Bn=(0,Le.Z)(Tt,Do),Br=(0,en.ZP)(dn),In=be(Pn),pr=!!(!En&&$i),yo=ge.useMemo(function(){return Fn===void 0&&Pn==="combobox"?!1:Fn},[Fn,Pn]),Ir=ge.useMemo(function(){return vt(un,pr)},[JSON.stringify(un),pr]),bo=(0,ye.Z)("",{value:Dn!==void 0?Dn:Mn,postState:function(lo){return lo||""}}),co=(0,Ce.Z)(bo,2),Vi=co[0],Hi=co[1],ur=ni(En,$i,Ir,Di,Ri),Pr=ur.valueOptions,ci=ur.labelOptions,Mt=ur.options,Gr=ge.useCallback(function(xr){var lo=ft(xr);return lo.map(function(Yr){var Mi,Es,Ls,xa,xl;if(Ke(Yr))Mi=Yr;else{var Il;Ls=Yr.key,Es=Yr.label,Mi=(Il=Yr.value)!==null&&Il!==void 0?Il:Ls}var yi=Pr.get(Mi);if(yi){var ms;if(Es===void 0&&(Es=yi==null?void 0:yi[Ri||Ir.label]),Ls===void 0&&(Ls=(ms=yi==null?void 0:yi.key)!==null&&ms!==void 0?ms:Mi),xa=yi==null?void 0:yi.disabled,xl=yi==null?void 0:yi.title,0)var Xs}return{label:Es,value:Mi,key:Ls,disabled:xa,title:xl}})},[Ir,Ri,Pr]),Hr=(0,ye.Z)(Fi,{value:qi}),ts=(0,Ce.Z)(Hr,2),ko=ts[0],ss=ts[1],_r=ge.useMemo(function(){var xr,lo=Gr(ko);return Pn==="combobox"&&yt((xr=lo[0])===null||xr===void 0?void 0:xr.value)?[]:lo},[ko,Gr,Pn]),cr=dt(_r,Pr),Vr=(0,Ce.Z)(cr,2),hr=Vr[0],eo=Vr[1],Yo=ge.useMemo(function(){if(!Pn&&hr.length===1){var xr=hr[0];if(xr.value===null&&(xr.label===null||xr.label===void 0))return[]}return hr.map(function(lo){var Yr;return(0,ke.Z)((0,ke.Z)({},lo),{},{label:(Yr=lo.label)!==null&&Yr!==void 0?Yr:lo.value})})},[Pn,hr]),rr=ge.useMemo(function(){return new Set(hr.map(function(xr){return xr.value}))},[hr]);ge.useEffect(function(){if(Pn==="combobox"){var xr,lo=(xr=hr[0])===null||xr===void 0?void 0:xr.value;Hi(et(lo)?String(lo):"")}},[hr]);var Wi=ai(function(xr,lo){var Yr,Mi=lo!=null?lo:xr;return Yr={},(0,Be.Z)(Yr,Ir.value,xr),(0,Be.Z)(Yr,Ir.label,Mi),Yr}),Qn=ge.useMemo(function(){if(Pn!=="tags")return Mt;var xr=(0,me.Z)(Mt),lo=function(Mi){return Pr.has(Mi)};return(0,me.Z)(hr).sort(function(Yr,Mi){return Yr.value<Mi.value?-1:1}).forEach(function(Yr){var Mi=Yr.value;lo(Mi)||xr.push(Wi(Mi,Yr.label))}),xr},[Wi,Mt,Pr,hr,Pn]),or=At(Qn,Ir,Vi,yo,Di),to=ge.useMemo(function(){return Pn!=="tags"||!Vi||or.some(function(xr){return xr[Di||"value"]===Vi})||or.some(function(xr){return xr[Ir.value]===Vi})?or:[Wi(Vi)].concat((0,me.Z)(or))},[Wi,Di,Pn,or,Vi,Ir]),Ro=ge.useMemo(function(){return hi?(0,me.Z)(to).sort(function(xr,lo){return hi(xr,lo)}):to},[to,hi]),Bo=ge.useMemo(function(){return nt(Ro,{fieldNames:Ir,childrenAsData:pr})},[Ro,Ir,pr]),Xo=function(lo){var Yr=Gr(lo);if(ss(Yr),fr&&(Yr.length!==hr.length||Yr.some(function(Ls,xa){var xl;return((xl=hr[xa])===null||xl===void 0?void 0:xl.value)!==(Ls==null?void 0:Ls.value)}))){var Mi=zi?Yr:Yr.map(function(Ls){return Ls.value}),Es=Yr.map(function(Ls){return He(eo(Ls.value))});fr(In?Mi:Mi[0],In?Es:Es[0])}},as=ge.useState(null),Ho=(0,Ce.Z)(as,2),ia=Ho[0],_s=Ho[1],la=ge.useState(0),kn=(0,Ce.Z)(la,2),Is=kn[0],Pu=kn[1],Ua=Cr!==void 0?Cr:Pn!=="combobox",Sa=ge.useCallback(function(xr,lo){var Yr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Mi=Yr.source,Es=Mi===void 0?"keyboard":Mi;Pu(lo),Nt&&Pn==="combobox"&&xr!==null&&Es==="keyboard"&&_s(String(xr))},[Nt,Pn]),us=function(lo,Yr,Mi){var Es=function(){var Dl,jr=eo(lo);return[zi?{label:jr==null?void 0:jr[Ir.label],value:lo,key:(Dl=jr==null?void 0:jr.key)!==null&&Dl!==void 0?Dl:lo}:lo,He(jr)]};if(Yr&&On){var Ls=Es(),xa=(0,Ce.Z)(Ls,2),xl=xa[0],Il=xa[1];On(xl,Il)}else if(!Yr&&qn&&Mi!=="clear"){var yi=Es(),ms=(0,Ce.Z)(yi,2),Xs=ms[0],qa=ms[1];qn(Xs,qa)}},Ws=ai(function(xr,lo){var Yr,Mi=In?lo.selected:!0;Mi?Yr=In?[].concat((0,me.Z)(hr),[xr]):[xr]:Yr=hr.filter(function(Es){return Es.value!==xr}),Xo(Yr),us(xr,Mi),Pn==="combobox"?_s(""):(!be||Nn)&&(Hi(""),_s(""))}),Po=function(lo,Yr){Xo(lo);var Mi=Yr.type,Es=Yr.values;(Mi==="remove"||Mi==="clear")&&Es.forEach(function(Ls){us(Ls.value,!1,Mi)})},Ao=function(lo,Yr){if(Hi(lo),_s(null),Yr.source==="submit"){var Mi=(lo||"").trim();if(Mi){var Es=Array.from(new Set([].concat((0,me.Z)(rr),[Mi])));Xo(Es),us(Mi,!0),Hi("")}return}Yr.source!=="blur"&&(Pn==="combobox"&&Xo(lo),nn==null||nn(lo))},Eo=function(lo){var Yr=lo;Pn!=="tags"&&(Yr=lo.map(function(Es){var Ls=ci.get(Es);return Ls==null?void 0:Ls.value}).filter(function(Es){return Es!==void 0}));var Mi=Array.from(new Set([].concat((0,me.Z)(rr),(0,me.Z)(Yr))));Xo(Mi),Mi.forEach(function(Es){us(Es,!0)})},ua=ge.useMemo(function(){var xr=Ln!==!1&&ei!==!1;return(0,ke.Z)((0,ke.Z)({},ur),{},{flattenOptions:Bo,onActiveValue:Sa,defaultActiveFirstOption:Ua,onSelect:Ws,menuItemSelectedIcon:mr,rawValues:rr,fieldNames:Ir,virtual:xr,direction:Jn,listHeight:Si,listItemHeight:Ei,childrenAsData:pr})},[ur,Bo,Sa,Ua,Ws,mr,rr,Ir,Ln,ei,Si,Ei,pr]);return ge.createElement(vi.Provider,{value:ua},ge.createElement($e,(0,Me.Z)({},Bn,{id:Br,prefixCls:on,ref:_t,omitDomProps:Xn,mode:Pn,displayValues:Yo,onDisplayValuesChange:Po,direction:Jn,searchValue:Vi,onSearch:Ao,autoClearSearchValue:Nn,onSearchSplit:Eo,dropdownMatchSelectWidth:ei,OptionList:Ur,emptyOptions:!Bo.length,activeValue:ia,activeDescendantId:"".concat(Br,"_list_").concat(Is)})))}),Ye=qe;Ye.Option=ir,Ye.OptGroup=Ci;var St=Ye,Ot=St},9296:function(_n,qt,Ee){"use strict";Ee.r(qt),Ee.d(qt,{ResizableTextArea:function(){return Xe},default:function(){return yt}});var Me=Ee(72308),me=Ee(77321),Be=Ee(49618),ke=Ee(62853),Ce=Ee(52487),Le=Ee(74416),he=Ee(80702),ye=Ee(92310),xe=Ee.n(ye),ge=Ee(93681),le=Ee(5643),ve=Ee(18929),de=Ee(59301),ce=Ee(29301),z=Ee(34280),ee=Ee(16089),oe=`
|
|
|
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;
|
|
|
`,ie=["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"],se={},ue;function Se(st){var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,lt=st.getAttribute("id")||st.getAttribute("data-reactid")||st.getAttribute("name");if(zt&&se[lt])return se[lt];var tt=window.getComputedStyle(st),ut=tt.getPropertyValue("box-sizing")||tt.getPropertyValue("-moz-box-sizing")||tt.getPropertyValue("-webkit-box-sizing"),mt=parseFloat(tt.getPropertyValue("padding-bottom"))+parseFloat(tt.getPropertyValue("padding-top")),Pt=parseFloat(tt.getPropertyValue("border-bottom-width"))+parseFloat(tt.getPropertyValue("border-top-width")),gt=ie.map(function(Ht){return"".concat(Ht,":").concat(tt.getPropertyValue(Ht))}).join(";"),Ft={sizingStyle:gt,paddingSize:mt,borderSize:Pt,boxSizing:ut};return zt&<&&(se[lt]=Ft),Ft}function we(st){var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,lt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,tt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ue||(ue=document.createElement("textarea"),ue.setAttribute("tab-index","-1"),ue.setAttribute("aria-hidden","true"),document.body.appendChild(ue)),st.getAttribute("wrap")?ue.setAttribute("wrap",st.getAttribute("wrap")):ue.removeAttribute("wrap");var ut=Se(st,zt),mt=ut.paddingSize,Pt=ut.borderSize,gt=ut.boxSizing,Ft=ut.sizingStyle;ue.setAttribute("style","".concat(Ft,";").concat(oe)),ue.value=st.value||st.placeholder||"";var Ht=void 0,hn=void 0,Jt,bn=ue.scrollHeight;if(gt==="border-box"?bn+=Pt:gt==="content-box"&&(bn-=mt),lt!==null||tt!==null){ue.value=" ";var Wt=ue.scrollHeight-mt;lt!==null&&(Ht=Wt*lt,gt==="border-box"&&(Ht=Ht+mt+Pt),bn=Math.max(Ht,bn)),tt!==null&&(hn=Wt*tt,gt==="border-box"&&(hn=hn+mt+Pt),Jt=bn>hn?"":"hidden",bn=Math.min(hn,bn))}var Kt={height:bn,overflowY:Jt,resize:"none"};return Ht&&(Kt.minHeight=Ht),hn&&(Kt.maxHeight=hn),Kt}var Pe=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Ae=0,De=1,ze=2,Ze=de.forwardRef(function(st,zt){var lt=st,tt=lt.prefixCls,ut=lt.onPressEnter,mt=lt.defaultValue,Pt=lt.value,gt=lt.autoSize,Ft=lt.onResize,Ht=lt.className,hn=lt.style,Jt=lt.disabled,bn=lt.onChange,Wt=lt.onInternalAutoSize,Kt=(0,Le.Z)(lt,Pe),Xt=(0,ve.Z)(mt,{value:Pt,postState:function(Ci){return Ci!=null?Ci:""}}),$t=(0,Ce.Z)(Xt,2),kt=$t[0],pt=$t[1],Bt=function(Ci){pt(Ci.target.value),bn==null||bn(Ci)},xt=de.useRef();de.useImperativeHandle(zt,function(){return{textArea:xt.current}});var vt=de.useMemo(function(){return gt&&(0,ke.Z)(gt)==="object"?[gt.minRows,gt.maxRows]:[]},[gt]),nt=(0,Ce.Z)(vt,2),He=nt[0],Ie=nt[1],We=!!gt,Oe=function(){try{if(document.activeElement===xt.current){var Ci=xt.current,Ki=Ci.selectionStart,ir=Ci.selectionEnd,sr=Ci.scrollTop;xt.current.setSelectionRange(Ki,ir),xt.current.scrollTop=sr}}catch(Ji){}},be=de.useState(ze),Ne=(0,Ce.Z)(be,2),$e=Ne[0],dt=Ne[1],Je=de.useState(),At=(0,Ce.Z)(Je,2),en=At[0],pn=At[1],ln=function(){dt(Ae)};(0,z.Z)(function(){We&&ln()},[Pt,He,Ie,We]),(0,z.Z)(function(){if($e===Ae)dt(De);else if($e===De){var ki=we(xt.current,!1,He,Ie);dt(ze),pn(ki)}else Oe()},[$e]);var gn=de.useRef(),Un=function(){ee.Z.cancel(gn.current)},An=function(Ci){$e===ze&&(Ft==null||Ft(Ci),gt&&(Un(),gn.current=(0,ee.Z)(function(){ln()})))};de.useEffect(function(){return Un},[]);var ni=We?en:null,ai=(0,me.Z)((0,me.Z)({},hn),ni);return($e===Ae||$e===De)&&(ai.overflowY="hidden",ai.overflowX="hidden"),de.createElement(ce.Z,{onResize:An,disabled:!(gt||Ft)},de.createElement("textarea",(0,Me.Z)({},Kt,{ref:xt,style:ai,className:xe()(tt,Ht,(0,Be.Z)({},"".concat(tt,"-disabled"),Jt)),disabled:Jt,value:kt,onChange:Bt})))}),Xe=Ze,Ge=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function ft(st,zt){return(0,he.Z)(st||"").slice(0,zt).join("")}function at(st,zt,lt,tt){var ut=lt;return st?ut=ft(lt,tt):(0,he.Z)(zt||"").length<lt.length&&(0,he.Z)(lt||"").length>tt&&(ut=zt),ut}var Ct=de.forwardRef(function(st,zt){var lt,tt=st.defaultValue,ut=st.value,mt=st.onFocus,Pt=st.onBlur,gt=st.onChange,Ft=st.allowClear,Ht=st.maxLength,hn=st.onCompositionStart,Jt=st.onCompositionEnd,bn=st.suffix,Wt=st.prefixCls,Kt=Wt===void 0?"rc-textarea":Wt,Xt=st.classes,$t=st.showCount,kt=st.className,pt=st.style,Bt=st.disabled,xt=st.hidden,vt=st.classNames,nt=st.styles,He=st.onResize,Ie=(0,Le.Z)(st,Ge),We=(0,ve.Z)(tt,{value:ut,defaultValue:tt}),Oe=(0,Ce.Z)(We,2),be=Oe[0],Ne=Oe[1],$e=(0,de.useRef)(null),dt=de.useState(!1),Je=(0,Ce.Z)(dt,2),At=Je[0],en=Je[1],pn=de.useState(!1),ln=(0,Ce.Z)(pn,2),gn=ln[0],Un=ln[1],An=de.useRef(),ni=de.useRef(0),ai=de.useState(null),ki=(0,Ce.Z)(ai,2),Ci=ki[0],Ki=ki[1],ir=function(){var Ke;(Ke=$e.current)===null||Ke===void 0||Ke.textArea.focus()};(0,de.useImperativeHandle)(zt,function(){return{resizableTextArea:$e.current,focus:ir,blur:function(){var Ke;(Ke=$e.current)===null||Ke===void 0||Ke.textArea.blur()}}}),(0,de.useEffect)(function(){en(function(Xn){return!Bt&&Xn})},[Bt]);var sr=Number(Ht)>0,Ji=function(Ke){Un(!0),An.current=be,ni.current=Ke.currentTarget.selectionStart,hn==null||hn(Ke)},Fr=function(Ke){Un(!1);var qe=Ke.currentTarget.value;if(sr){var Ye,St=ni.current>=Ht+1||ni.current===((Ye=An.current)===null||Ye===void 0?void 0:Ye.length);qe=at(St,An.current,qe,Ht)}qe!==be&&(Ne(qe),(0,le.rJ)(Ke.currentTarget,Ke,gt,qe)),Jt==null||Jt(Ke)},Mr=function(Ke){var qe=Ke.target.value;if(!gn&&sr){var Ye=Ke.target.selectionStart>=Ht+1||Ke.target.selectionStart===qe.length||!Ke.target.selectionStart;qe=at(Ye,be,qe,Ht)}Ne(qe),(0,le.rJ)(Ke.currentTarget,Ke,gt,qe)},vi=function(Ke){var qe=Ie.onPressEnter,Ye=Ie.onKeyDown;Ke.key==="Enter"&&qe&&qe(Ke),Ye==null||Ye(Ke)},wr=function(Ke){en(!0),mt==null||mt(Ke)},Tr=function(Ke){en(!1),Pt==null||Pt(Ke)},it=function(Ke){var qe;Ne(""),ir(),(0,le.rJ)((qe=$e.current)===null||qe===void 0?void 0:qe.textArea,Ke,gt)},Rr=(0,le.D7)(be);!gn&&sr&&ut==null&&(Rr=ft(Rr,Ht));var Or=bn,Ur;if($t){var uo=(0,he.Z)(Rr).length;(0,ke.Z)($t)==="object"?Ur=$t.formatter({value:Rr,count:uo,maxLength:Ht}):Ur="".concat(uo).concat(sr?" / ".concat(Ht):""),Or=de.createElement(de.Fragment,null,Or,de.createElement("span",{className:xe()("".concat(Kt,"-data-count"),vt==null?void 0:vt.count),style:nt==null?void 0:nt.count},Ur))}var po=function(Ke){var qe;He==null||He(Ke),(qe=$e.current)!==null&&qe!==void 0&&qe.textArea.style.height&&Ki(!0)},io=!Ie.autoSize&&!$t&&!Ft,Do=de.createElement(ge.BaseInput,{value:Rr,allowClear:Ft,handleReset:it,suffix:Or,prefixCls:Kt,classes:{affixWrapper:xe()(Xt==null?void 0:Xt.affixWrapper,(lt={},(0,Be.Z)(lt,"".concat(Kt,"-show-count"),$t),(0,Be.Z)(lt,"".concat(Kt,"-textarea-allow-clear"),Ft),lt))},disabled:Bt,focused:At,className:kt,style:(0,me.Z)((0,me.Z)({},pt),Ci&&!io?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Ur=="string"?Ur:void 0}},hidden:xt,inputElement:de.createElement(Xe,(0,Me.Z)({},Ie,{onKeyDown:vi,onChange:Mr,onFocus:wr,onBlur:Tr,onCompositionStart:Ji,onCompositionEnd:Fr,className:vt==null?void 0:vt.textarea,style:(0,me.Z)((0,me.Z)({},nt==null?void 0:nt.textarea),{},{resize:pt==null?void 0:pt.resize}),disabled:Bt,prefixCls:Kt,onResize:po,ref:$e}))});return Do}),et=Ct,yt=et},39417:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return De}});var Me=Ee(72308),me=Ee(49618),Be=Ee(74416),ke=Ee(77321),Ce=Ee(96949),Le=Ee(55090),he=Ee(80237),ye=Ee(77205),xe=Ee(38793),ge=Ee(92310),le=Ee.n(ge),ve=Ee(26112),de=Ee(59301),ce=Ee(39378),z=function(Ze){for(var Xe=Ze.prefixCls,Ge=Ze.level,ft=Ze.isStart,at=Ze.isEnd,Ct="".concat(Xe,"-indent-unit"),et=[],yt=0;yt<Ge;yt+=1){var st;et.push(de.createElement("span",{key:yt,className:le()(Ct,(st={},(0,me.Z)(st,"".concat(Ct,"-start"),ft[yt]),(0,me.Z)(st,"".concat(Ct,"-end"),at[yt]),st))}))}return de.createElement("span",{"aria-hidden":"true",className:"".concat(Xe,"-indent")},et)},ee=de.memo(z),oe=Ee(67841),ie=Ee(71430),se=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],ue="open",Se="close",we="---",Pe=function(ze){(0,ye.Z)(Xe,ze);var Ze=(0,xe.Z)(Xe);function Xe(){var Ge;(0,Ce.Z)(this,Xe);for(var ft=arguments.length,at=new Array(ft),Ct=0;Ct<ft;Ct++)at[Ct]=arguments[Ct];return Ge=Ze.call.apply(Ze,[this].concat(at)),Ge.state={dragNodeHighlight:!1},Ge.selectHandle=void 0,Ge.cacheIndent=void 0,Ge.onSelectorClick=function(et){var yt=Ge.props.context.onNodeClick;yt(et,(0,ie.F)(Ge.props)),Ge.isSelectable()?Ge.onSelect(et):Ge.onCheck(et)},Ge.onSelectorDoubleClick=function(et){var yt=Ge.props.context.onNodeDoubleClick;yt(et,(0,ie.F)(Ge.props))},Ge.onSelect=function(et){if(!Ge.isDisabled()){var yt=Ge.props.context.onNodeSelect;yt(et,(0,ie.F)(Ge.props))}},Ge.onCheck=function(et){if(!Ge.isDisabled()){var yt=Ge.props,st=yt.disableCheckbox,zt=yt.checked,lt=Ge.props.context.onNodeCheck;if(!(!Ge.isCheckable()||st)){var tt=!zt;lt(et,(0,ie.F)(Ge.props),tt)}}},Ge.onMouseEnter=function(et){var yt=Ge.props.context.onNodeMouseEnter;yt(et,(0,ie.F)(Ge.props))},Ge.onMouseLeave=function(et){var yt=Ge.props.context.onNodeMouseLeave;yt(et,(0,ie.F)(Ge.props))},Ge.onContextMenu=function(et){var yt=Ge.props.context.onNodeContextMenu;yt(et,(0,ie.F)(Ge.props))},Ge.onDragStart=function(et){var yt=Ge.props.context.onNodeDragStart;et.stopPropagation(),Ge.setState({dragNodeHighlight:!0}),yt(et,(0,he.Z)(Ge));try{et.dataTransfer.setData("text/plain","")}catch(st){}},Ge.onDragEnter=function(et){var yt=Ge.props.context.onNodeDragEnter;et.preventDefault(),et.stopPropagation(),yt(et,(0,he.Z)(Ge))},Ge.onDragOver=function(et){var yt=Ge.props.context.onNodeDragOver;et.preventDefault(),et.stopPropagation(),yt(et,(0,he.Z)(Ge))},Ge.onDragLeave=function(et){var yt=Ge.props.context.onNodeDragLeave;et.stopPropagation(),yt(et,(0,he.Z)(Ge))},Ge.onDragEnd=function(et){var yt=Ge.props.context.onNodeDragEnd;et.stopPropagation(),Ge.setState({dragNodeHighlight:!1}),yt(et,(0,he.Z)(Ge))},Ge.onDrop=function(et){var yt=Ge.props.context.onNodeDrop;et.preventDefault(),et.stopPropagation(),Ge.setState({dragNodeHighlight:!1}),yt(et,(0,he.Z)(Ge))},Ge.onExpand=function(et){var yt=Ge.props,st=yt.loading,zt=yt.context.onNodeExpand;st||zt(et,(0,ie.F)(Ge.props))},Ge.setSelectHandle=function(et){Ge.selectHandle=et},Ge.getNodeState=function(){var et=Ge.props.expanded;return Ge.isLeaf()?null:et?ue:Se},Ge.hasChildren=function(){var et=Ge.props.eventKey,yt=Ge.props.context.keyEntities,st=(0,oe.Z)(yt,et)||{},zt=st.children;return!!(zt||[]).length},Ge.isLeaf=function(){var et=Ge.props,yt=et.isLeaf,st=et.loaded,zt=Ge.props.context.loadData,lt=Ge.hasChildren();return yt===!1?!1:yt||!zt&&!lt||zt&&st&&!lt},Ge.isDisabled=function(){var et=Ge.props.disabled,yt=Ge.props.context.disabled;return!!(yt||et)},Ge.isCheckable=function(){var et=Ge.props.checkable,yt=Ge.props.context.checkable;return!yt||et===!1?!1:yt},Ge.syncLoadData=function(et){var yt=et.expanded,st=et.loading,zt=et.loaded,lt=Ge.props.context,tt=lt.loadData,ut=lt.onNodeLoad;st||tt&&yt&&!Ge.isLeaf()&&!Ge.hasChildren()&&!zt&&ut((0,ie.F)(Ge.props))},Ge.isDraggable=function(){var et=Ge.props,yt=et.data,st=et.context.draggable;return!!(st&&(!st.nodeDraggable||st.nodeDraggable(yt)))},Ge.renderDragHandler=function(){var et=Ge.props.context,yt=et.draggable,st=et.prefixCls;return yt!=null&&yt.icon?de.createElement("span",{className:"".concat(st,"-draggable-icon")},yt.icon):null},Ge.renderSwitcherIconDom=function(et){var yt=Ge.props.switcherIcon,st=Ge.props.context.switcherIcon,zt=yt||st;return typeof zt=="function"?zt((0,ke.Z)((0,ke.Z)({},Ge.props),{},{isLeaf:et})):zt},Ge.renderSwitcher=function(){var et=Ge.props.expanded,yt=Ge.props.context.prefixCls;if(Ge.isLeaf()){var st=Ge.renderSwitcherIconDom(!0);return st!==!1?de.createElement("span",{className:le()("".concat(yt,"-switcher"),"".concat(yt,"-switcher-noop"))},st):null}var zt=le()("".concat(yt,"-switcher"),"".concat(yt,"-switcher_").concat(et?ue:Se)),lt=Ge.renderSwitcherIconDom(!1);return lt!==!1?de.createElement("span",{onClick:Ge.onExpand,className:zt},lt):null},Ge.renderCheckbox=function(){var et=Ge.props,yt=et.checked,st=et.halfChecked,zt=et.disableCheckbox,lt=Ge.props.context.prefixCls,tt=Ge.isDisabled(),ut=Ge.isCheckable();if(!ut)return null;var mt=typeof ut!="boolean"?ut:null;return de.createElement("span",{className:le()("".concat(lt,"-checkbox"),yt&&"".concat(lt,"-checkbox-checked"),!yt&&st&&"".concat(lt,"-checkbox-indeterminate"),(tt||zt)&&"".concat(lt,"-checkbox-disabled")),onClick:Ge.onCheck},mt)},Ge.renderIcon=function(){var et=Ge.props.loading,yt=Ge.props.context.prefixCls;return de.createElement("span",{className:le()("".concat(yt,"-iconEle"),"".concat(yt,"-icon__").concat(Ge.getNodeState()||"docu"),et&&"".concat(yt,"-icon_loading"))})},Ge.renderSelector=function(){var et=Ge.state.dragNodeHighlight,yt=Ge.props,st=yt.title,zt=st===void 0?we:st,lt=yt.selected,tt=yt.icon,ut=yt.loading,mt=yt.data,Pt=Ge.props.context,gt=Pt.prefixCls,Ft=Pt.showIcon,Ht=Pt.icon,hn=Pt.loadData,Jt=Pt.titleRender,bn=Ge.isDisabled(),Wt="".concat(gt,"-node-content-wrapper"),Kt;if(Ft){var Xt=tt||Ht;Kt=Xt?de.createElement("span",{className:le()("".concat(gt,"-iconEle"),"".concat(gt,"-icon__customize"))},typeof Xt=="function"?Xt(Ge.props):Xt):Ge.renderIcon()}else hn&&ut&&(Kt=Ge.renderIcon());var $t;typeof zt=="function"?$t=zt(mt):Jt?$t=Jt(mt):$t=zt;var kt=de.createElement("span",{className:"".concat(gt,"-title")},$t);return de.createElement("span",{ref:Ge.setSelectHandle,title:typeof zt=="string"?zt:"",className:le()("".concat(Wt),"".concat(Wt,"-").concat(Ge.getNodeState()||"normal"),!bn&&(lt||et)&&"".concat(gt,"-node-selected")),onMouseEnter:Ge.onMouseEnter,onMouseLeave:Ge.onMouseLeave,onContextMenu:Ge.onContextMenu,onClick:Ge.onSelectorClick,onDoubleClick:Ge.onSelectorDoubleClick},Kt,kt,Ge.renderDropIndicator())},Ge.renderDropIndicator=function(){var et=Ge.props,yt=et.disabled,st=et.eventKey,zt=Ge.props.context,lt=zt.draggable,tt=zt.dropLevelOffset,ut=zt.dropPosition,mt=zt.prefixCls,Pt=zt.indent,gt=zt.dropIndicatorRender,Ft=zt.dragOverNodeKey,Ht=zt.direction,hn=!!lt,Jt=!yt&&hn&&Ft===st,bn=Pt!=null?Pt:Ge.cacheIndent;return Ge.cacheIndent=Pt,Jt?gt({dropPosition:ut,dropLevelOffset:tt,indent:bn,prefixCls:mt,direction:Ht}):null},Ge}return(0,Le.Z)(Xe,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var ft=this.props.selectable,at=this.props.context.selectable;return typeof ft=="boolean"?ft:at}},{key:"render",value:function(){var ft,at=this.props,Ct=at.eventKey,et=at.className,yt=at.style,st=at.dragOver,zt=at.dragOverGapTop,lt=at.dragOverGapBottom,tt=at.isLeaf,ut=at.isStart,mt=at.isEnd,Pt=at.expanded,gt=at.selected,Ft=at.checked,Ht=at.halfChecked,hn=at.loading,Jt=at.domRef,bn=at.active,Wt=at.data,Kt=at.onMouseMove,Xt=at.selectable,$t=(0,Be.Z)(at,se),kt=this.props.context,pt=kt.prefixCls,Bt=kt.filterTreeNode,xt=kt.keyEntities,vt=kt.dropContainerKey,nt=kt.dropTargetKey,He=kt.draggingNodeKey,Ie=this.isDisabled(),We=(0,ve.Z)($t,{aria:!0,data:!0}),Oe=(0,oe.Z)(xt,Ct)||{},be=Oe.level,Ne=mt[mt.length-1],$e=this.isDraggable(),dt=!Ie&&$e,Je=He===Ct,At=Xt!==void 0?{"aria-selected":!!Xt}:void 0;return de.createElement("div",(0,Me.Z)({ref:Jt,className:le()(et,"".concat(pt,"-treenode"),(ft={},(0,me.Z)(ft,"".concat(pt,"-treenode-disabled"),Ie),(0,me.Z)(ft,"".concat(pt,"-treenode-switcher-").concat(Pt?"open":"close"),!tt),(0,me.Z)(ft,"".concat(pt,"-treenode-checkbox-checked"),Ft),(0,me.Z)(ft,"".concat(pt,"-treenode-checkbox-indeterminate"),Ht),(0,me.Z)(ft,"".concat(pt,"-treenode-selected"),gt),(0,me.Z)(ft,"".concat(pt,"-treenode-loading"),hn),(0,me.Z)(ft,"".concat(pt,"-treenode-active"),bn),(0,me.Z)(ft,"".concat(pt,"-treenode-leaf-last"),Ne),(0,me.Z)(ft,"".concat(pt,"-treenode-draggable"),$e),(0,me.Z)(ft,"dragging",Je),(0,me.Z)(ft,"drop-target",nt===Ct),(0,me.Z)(ft,"drop-container",vt===Ct),(0,me.Z)(ft,"drag-over",!Ie&&st),(0,me.Z)(ft,"drag-over-gap-top",!Ie&&zt),(0,me.Z)(ft,"drag-over-gap-bottom",!Ie&<),(0,me.Z)(ft,"filter-node",Bt&&Bt((0,ie.F)(this.props))),ft)),style:yt,draggable:dt,"aria-grabbed":Je,onDragStart:dt?this.onDragStart:void 0,onDragEnter:$e?this.onDragEnter:void 0,onDragOver:$e?this.onDragOver:void 0,onDragLeave:$e?this.onDragLeave:void 0,onDrop:$e?this.onDrop:void 0,onDragEnd:$e?this.onDragEnd:void 0,onMouseMove:Kt},At,We),de.createElement(ee,{prefixCls:pt,level:be,isStart:ut,isEnd:mt}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),Xe}(de.Component),Ae=function(Ze){return de.createElement(ce.k.Consumer,null,function(Xe){return de.createElement(Pe,(0,Me.Z)({},Ze,{context:Xe}))})};Ae.displayName="TreeNode",Ae.isTreeNode=1;var De=Ae},39378:function(_n,qt,Ee){"use strict";Ee.d(qt,{k:function(){return me}});var Me=Ee(59301),me=Me.createContext(null)},54844:function(_n,qt,Ee){"use strict";Ee.d(qt,{O:function(){return De.Z},Z:function(){return kt}});var Me=Ee(72308),me=Ee(49618),Be=Ee(62853),ke=Ee(77321),Ce=Ee(80702),Le=Ee(96949),he=Ee(55090),ye=Ee(80237),xe=Ee(77205),ge=Ee(38793),le=Ee(92310),ve=Ee.n(le),de=Ee(10228),ce=Ee(26112),z=Ee(48736),ee=Ee(59301),oe=Ee(39378);function ie(pt){var Bt=pt.dropPosition,xt=pt.dropLevelOffset,vt=pt.indent,nt={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Bt){case-1:nt.top=0,nt.left=-xt*vt;break;case 1:nt.bottom=0,nt.left=-xt*vt;break;case 0:nt.bottom=0,nt.left=vt;break}return ee.createElement("div",{style:nt})}function se(pt){if(pt==null)throw new TypeError("Cannot destructure "+pt)}var ue=Ee(52487),Se=Ee(74416),we=Ee(34280),Pe=Ee(45680),Ae=Ee(77900),De=Ee(39417);function ze(pt,Bt){var xt=ee.useState(!1),vt=(0,ue.Z)(xt,2),nt=vt[0],He=vt[1];ee.useLayoutEffect(function(){if(nt)return pt(),function(){Bt()}},[nt]),ee.useLayoutEffect(function(){return He(!0),function(){He(!1)}},[])}var Ze=Ee(71430),Xe=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ge=function(Bt,xt){var vt=Bt.className,nt=Bt.style,He=Bt.motion,Ie=Bt.motionNodes,We=Bt.motionType,Oe=Bt.onMotionStart,be=Bt.onMotionEnd,Ne=Bt.active,$e=Bt.treeNodeRequiredProps,dt=(0,Se.Z)(Bt,Xe),Je=ee.useState(!0),At=(0,ue.Z)(Je,2),en=At[0],pn=At[1],ln=ee.useContext(oe.k),gn=ln.prefixCls,Un=Ie&&We!=="hide";(0,we.Z)(function(){Ie&&Un!==en&&pn(Un)},[Ie]);var An=function(){Ie&&Oe()},ni=ee.useRef(!1),ai=function(){Ie&&!ni.current&&(ni.current=!0,be())};ze(An,ai);var ki=function(Ki){Un===Ki&&ai()};return Ie?ee.createElement(Ae.default,(0,Me.Z)({ref:xt,visible:en},He,{motionAppear:We==="show",onVisibleChanged:ki}),function(Ci,Ki){var ir=Ci.className,sr=Ci.style;return ee.createElement("div",{ref:Ki,className:ve()("".concat(gn,"-treenode-motion"),ir),style:sr},Ie.map(function(Ji){var Fr=(0,Me.Z)({},(se(Ji.data),Ji.data)),Mr=Ji.title,vi=Ji.key,wr=Ji.isStart,Tr=Ji.isEnd;delete Fr.children;var it=(0,Ze.H8)(vi,$e);return ee.createElement(De.Z,(0,Me.Z)({},Fr,it,{title:Mr,active:Ne,data:Ji.data,key:vi,isStart:wr,isEnd:Tr}))}))}):ee.createElement(De.Z,(0,Me.Z)({domRef:xt,className:vt,style:nt},dt,{active:Ne}))};Ge.displayName="MotionTreeNode";var ft=ee.forwardRef(Ge),at=ft;function Ct(){var pt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],xt=pt.length,vt=Bt.length;if(Math.abs(xt-vt)!==1)return{add:!1,key:null};function nt(He,Ie){var We=new Map;He.forEach(function(be){We.set(be,!0)});var Oe=Ie.filter(function(be){return!We.has(be)});return Oe.length===1?Oe[0]:null}return xt<vt?{add:!0,key:nt(pt,Bt)}:{add:!1,key:nt(Bt,pt)}}function et(pt,Bt,xt){var vt=pt.findIndex(function(We){return We.key===xt}),nt=pt[vt+1],He=Bt.findIndex(function(We){return We.key===xt});if(nt){var Ie=Bt.findIndex(function(We){return We.key===nt.key});return Bt.slice(He+1,Ie)}return Bt.slice(He+1)}var yt=["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"],st={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},zt=function(){},lt="RC_TREE_MOTION_".concat(Math.random()),tt={key:lt},ut={key:lt,level:0,index:0,pos:"0",node:tt,nodes:[tt]},mt={parent:null,children:[],pos:ut.pos,data:tt,title:null,key:lt,isStart:[],isEnd:[]};function Pt(pt,Bt,xt,vt){return Bt===!1||!xt?pt:pt.slice(0,Math.ceil(xt/vt)+1)}function gt(pt){var Bt=pt.key,xt=pt.pos;return(0,Ze.km)(Bt,xt)}function Ft(pt){for(var Bt=String(pt.data.key),xt=pt;xt.parent;)xt=xt.parent,Bt="".concat(xt.data.key," > ").concat(Bt);return Bt}var Ht=ee.forwardRef(function(pt,Bt){var xt=pt.prefixCls,vt=pt.data,nt=pt.selectable,He=pt.checkable,Ie=pt.expandedKeys,We=pt.selectedKeys,Oe=pt.checkedKeys,be=pt.loadedKeys,Ne=pt.loadingKeys,$e=pt.halfCheckedKeys,dt=pt.keyEntities,Je=pt.disabled,At=pt.dragging,en=pt.dragOverNodeKey,pn=pt.dropPosition,ln=pt.motion,gn=pt.height,Un=pt.itemHeight,An=pt.virtual,ni=pt.focusable,ai=pt.activeItem,ki=pt.focused,Ci=pt.tabIndex,Ki=pt.onKeyDown,ir=pt.onFocus,sr=pt.onBlur,Ji=pt.onActiveChange,Fr=pt.onListChangeStart,Mr=pt.onListChangeEnd,vi=(0,Se.Z)(pt,yt),wr=ee.useRef(null),Tr=ee.useRef(null);ee.useImperativeHandle(Bt,function(){return{scrollTo:function(sn){wr.current.scrollTo(sn)},getIndentWidth:function(){return Tr.current.offsetWidth}}});var it=ee.useState(Ie),Rr=(0,ue.Z)(it,2),Or=Rr[0],Ur=Rr[1],uo=ee.useState(vt),po=(0,ue.Z)(uo,2),io=po[0],Do=po[1],Xn=ee.useState(vt),Ke=(0,ue.Z)(Xn,2),qe=Ke[0],Ye=Ke[1],St=ee.useState([]),Ot=(0,ue.Z)(St,2),Tt=Ot[0],_t=Ot[1],dn=ee.useState(null),Pn=(0,ue.Z)(dn,2),mn=Pn[0],on=Pn[1],Nt=ee.useRef(vt);Nt.current=vt;function un(){var nn=Nt.current;Do(nn),Ye(nn),_t([]),on(null),Mr()}(0,we.Z)(function(){Ur(Ie);var nn=Ct(Or,Ie);if(nn.key!==null)if(nn.add){var sn=io.findIndex(function(Fn){var hi=Fn.key;return hi===nn.key}),Nn=Pt(et(io,vt,nn.key),An,gn,Un),On=io.slice();On.splice(sn+1,0,mt),Ye(On),_t(Nn),on("show")}else{var qn=vt.findIndex(function(Fn){var hi=Fn.key;return hi===nn.key}),Hn=Pt(et(vt,io,nn.key),An,gn,Un),ei=vt.slice();ei.splice(qn+1,0,mt),Ye(ei),_t(Hn),on("hide")}else io!==vt&&(Do(vt),Ye(vt))},[Ie,vt]),ee.useEffect(function(){At||un()},[At]);var Mn=ln?qe:vt,Dn={expandedKeys:Ie,selectedKeys:We,loadedKeys:be,loadingKeys:Ne,checkedKeys:Oe,halfCheckedKeys:$e,dragOverNodeKey:en,dropPosition:pn,keyEntities:dt};return ee.createElement(ee.Fragment,null,ki&&ai&&ee.createElement("span",{style:st,"aria-live":"assertive"},Ft(ai)),ee.createElement("div",null,ee.createElement("input",{style:st,disabled:ni===!1||Je,tabIndex:ni!==!1?Ci:null,onKeyDown:Ki,onFocus:ir,onBlur:sr,value:"",onChange:zt,"aria-label":"for screen reader"})),ee.createElement("div",{className:"".concat(xt,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},ee.createElement("div",{className:"".concat(xt,"-indent")},ee.createElement("div",{ref:Tr,className:"".concat(xt,"-indent-unit")}))),ee.createElement(Pe.Z,(0,Me.Z)({},vi,{data:Mn,itemKey:gt,height:gn,fullHeight:!1,virtual:An,itemHeight:Un,prefixCls:"".concat(xt,"-list"),ref:wr,onVisibleChange:function(sn,Nn){var On=new Set(sn),qn=Nn.filter(function(Hn){return!On.has(Hn)});qn.some(function(Hn){return gt(Hn)===lt})&&un()}}),function(nn){var sn=nn.pos,Nn=(0,Me.Z)({},(se(nn.data),nn.data)),On=nn.title,qn=nn.key,Hn=nn.isStart,ei=nn.isEnd,Fn=(0,Ze.km)(qn,sn);delete Nn.key,delete Nn.children;var hi=(0,Ze.H8)(Fn,Dn);return ee.createElement(at,(0,Me.Z)({},Nn,hi,{title:On,active:!!ai&&qn===ai.key,pos:sn,data:nn.data,isStart:Hn,isEnd:ei,motion:ln,motionNodes:qn===lt?Tt:null,motionType:mn,onMotionStart:Fr,onMotionEnd:un,treeNodeRequiredProps:Dn,onMouseMove:function(){Ji(null)}}))}))});Ht.displayName="NodeList";var hn=Ht,Jt=Ee(35654),bn=Ee(90782),Wt=Ee(67841),Kt=10,Xt=function(pt){(0,xe.Z)(xt,pt);var Bt=(0,ge.Z)(xt);function xt(){var vt;(0,Le.Z)(this,xt);for(var nt=arguments.length,He=new Array(nt),Ie=0;Ie<nt;Ie++)He[Ie]=arguments[Ie];return vt=Bt.call.apply(Bt,[this].concat(He)),vt.destroyed=!1,vt.delayedDragEnterLogic=void 0,vt.loadingRetryTimes={},vt.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,Ze.w$)()},vt.dragStartMousePosition=null,vt.dragNode=void 0,vt.currentMouseOverDroppableNodeKey=null,vt.listRef=ee.createRef(),vt.onNodeDragStart=function(We,Oe){var be=vt.state,Ne=be.expandedKeys,$e=be.keyEntities,dt=vt.props.onDragStart,Je=Oe.props.eventKey;vt.dragNode=Oe,vt.dragStartMousePosition={x:We.clientX,y:We.clientY};var At=(0,Jt._5)(Ne,Je);vt.setState({draggingNodeKey:Je,dragChildrenKeys:(0,Jt.wA)(Je,$e),indent:vt.listRef.current.getIndentWidth()}),vt.setExpandedKeys(At),window.addEventListener("dragend",vt.onWindowDragEnd),dt==null||dt({event:We,node:(0,Ze.F)(Oe.props)})},vt.onNodeDragEnter=function(We,Oe){var be=vt.state,Ne=be.expandedKeys,$e=be.keyEntities,dt=be.dragChildrenKeys,Je=be.flattenNodes,At=be.indent,en=vt.props,pn=en.onDragEnter,ln=en.onExpand,gn=en.allowDrop,Un=en.direction,An=Oe.props,ni=An.pos,ai=An.eventKey,ki=(0,ye.Z)(vt),Ci=ki.dragNode;if(vt.currentMouseOverDroppableNodeKey!==ai&&(vt.currentMouseOverDroppableNodeKey=ai),!Ci){vt.resetDragState();return}var Ki=(0,Jt.OM)(We,Ci,Oe,At,vt.dragStartMousePosition,gn,Je,$e,Ne,Un),ir=Ki.dropPosition,sr=Ki.dropLevelOffset,Ji=Ki.dropTargetKey,Fr=Ki.dropContainerKey,Mr=Ki.dropTargetPos,vi=Ki.dropAllowed,wr=Ki.dragOverNodeKey;if(dt.indexOf(Ji)!==-1||!vi){vt.resetDragState();return}if(vt.delayedDragEnterLogic||(vt.delayedDragEnterLogic={}),Object.keys(vt.delayedDragEnterLogic).forEach(function(Tr){clearTimeout(vt.delayedDragEnterLogic[Tr])}),Ci.props.eventKey!==Oe.props.eventKey&&(We.persist(),vt.delayedDragEnterLogic[ni]=window.setTimeout(function(){if(vt.state.draggingNodeKey!==null){var Tr=(0,Ce.Z)(Ne),it=(0,Wt.Z)($e,Oe.props.eventKey);it&&(it.children||[]).length&&(Tr=(0,Jt.L0)(Ne,Oe.props.eventKey)),"expandedKeys"in vt.props||vt.setExpandedKeys(Tr),ln==null||ln(Tr,{node:(0,Ze.F)(Oe.props),expanded:!0,nativeEvent:We.nativeEvent})}},800)),Ci.props.eventKey===Ji&&sr===0){vt.resetDragState();return}vt.setState({dragOverNodeKey:wr,dropPosition:ir,dropLevelOffset:sr,dropTargetKey:Ji,dropContainerKey:Fr,dropTargetPos:Mr,dropAllowed:vi}),pn==null||pn({event:We,node:(0,Ze.F)(Oe.props),expandedKeys:Ne})},vt.onNodeDragOver=function(We,Oe){var be=vt.state,Ne=be.dragChildrenKeys,$e=be.flattenNodes,dt=be.keyEntities,Je=be.expandedKeys,At=be.indent,en=vt.props,pn=en.onDragOver,ln=en.allowDrop,gn=en.direction,Un=(0,ye.Z)(vt),An=Un.dragNode;if(An){var ni=(0,Jt.OM)(We,An,Oe,At,vt.dragStartMousePosition,ln,$e,dt,Je,gn),ai=ni.dropPosition,ki=ni.dropLevelOffset,Ci=ni.dropTargetKey,Ki=ni.dropContainerKey,ir=ni.dropAllowed,sr=ni.dropTargetPos,Ji=ni.dragOverNodeKey;Ne.indexOf(Ci)!==-1||!ir||(An.props.eventKey===Ci&&ki===0?vt.state.dropPosition===null&&vt.state.dropLevelOffset===null&&vt.state.dropTargetKey===null&&vt.state.dropContainerKey===null&&vt.state.dropTargetPos===null&&vt.state.dropAllowed===!1&&vt.state.dragOverNodeKey===null||vt.resetDragState():ai===vt.state.dropPosition&&ki===vt.state.dropLevelOffset&&Ci===vt.state.dropTargetKey&&Ki===vt.state.dropContainerKey&&sr===vt.state.dropTargetPos&&ir===vt.state.dropAllowed&&Ji===vt.state.dragOverNodeKey||vt.setState({dropPosition:ai,dropLevelOffset:ki,dropTargetKey:Ci,dropContainerKey:Ki,dropTargetPos:sr,dropAllowed:ir,dragOverNodeKey:Ji}),pn==null||pn({event:We,node:(0,Ze.F)(Oe.props)}))}},vt.onNodeDragLeave=function(We,Oe){vt.currentMouseOverDroppableNodeKey===Oe.props.eventKey&&!We.currentTarget.contains(We.relatedTarget)&&(vt.resetDragState(),vt.currentMouseOverDroppableNodeKey=null);var be=vt.props.onDragLeave;be==null||be({event:We,node:(0,Ze.F)(Oe.props)})},vt.onWindowDragEnd=function(We){vt.onNodeDragEnd(We,null,!0),window.removeEventListener("dragend",vt.onWindowDragEnd)},vt.onNodeDragEnd=function(We,Oe){var be=vt.props.onDragEnd;vt.setState({dragOverNodeKey:null}),vt.cleanDragState(),be==null||be({event:We,node:(0,Ze.F)(Oe.props)}),vt.dragNode=null,window.removeEventListener("dragend",vt.onWindowDragEnd)},vt.onNodeDrop=function(We,Oe){var be,Ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,$e=vt.state,dt=$e.dragChildrenKeys,Je=$e.dropPosition,At=$e.dropTargetKey,en=$e.dropTargetPos,pn=$e.dropAllowed;if(pn){var ln=vt.props.onDrop;if(vt.setState({dragOverNodeKey:null}),vt.cleanDragState(),At!==null){var gn=(0,ke.Z)((0,ke.Z)({},(0,Ze.H8)(At,vt.getTreeNodeRequiredProps())),{},{active:((be=vt.getActiveItem())===null||be===void 0?void 0:be.key)===At,data:(0,Wt.Z)(vt.state.keyEntities,At).node}),Un=dt.indexOf(At)!==-1;(0,z.ZP)(!Un,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var An=(0,Jt.yx)(en),ni={event:We,node:(0,Ze.F)(gn),dragNode:vt.dragNode?(0,Ze.F)(vt.dragNode.props):null,dragNodesKeys:[vt.dragNode.props.eventKey].concat(dt),dropToGap:Je!==0,dropPosition:Je+Number(An[An.length-1])};Ne||ln==null||ln(ni),vt.dragNode=null}}},vt.cleanDragState=function(){var We=vt.state.draggingNodeKey;We!==null&&vt.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),vt.dragStartMousePosition=null,vt.currentMouseOverDroppableNodeKey=null},vt.triggerExpandActionExpand=function(We,Oe){var be=vt.state,Ne=be.expandedKeys,$e=be.flattenNodes,dt=Oe.expanded,Je=Oe.key,At=Oe.isLeaf;if(!(At||We.shiftKey||We.metaKey||We.ctrlKey)){var en=$e.filter(function(ln){return ln.key===Je})[0],pn=(0,Ze.F)((0,ke.Z)((0,ke.Z)({},(0,Ze.H8)(Je,vt.getTreeNodeRequiredProps())),{},{data:en.data}));vt.setExpandedKeys(dt?(0,Jt._5)(Ne,Je):(0,Jt.L0)(Ne,Je)),vt.onNodeExpand(We,pn)}},vt.onNodeClick=function(We,Oe){var be=vt.props,Ne=be.onClick,$e=be.expandAction;$e==="click"&&vt.triggerExpandActionExpand(We,Oe),Ne==null||Ne(We,Oe)},vt.onNodeDoubleClick=function(We,Oe){var be=vt.props,Ne=be.onDoubleClick,$e=be.expandAction;$e==="doubleClick"&&vt.triggerExpandActionExpand(We,Oe),Ne==null||Ne(We,Oe)},vt.onNodeSelect=function(We,Oe){var be=vt.state.selectedKeys,Ne=vt.state,$e=Ne.keyEntities,dt=Ne.fieldNames,Je=vt.props,At=Je.onSelect,en=Je.multiple,pn=Oe.selected,ln=Oe[dt.key],gn=!pn;gn?en?be=(0,Jt.L0)(be,ln):be=[ln]:be=(0,Jt._5)(be,ln);var Un=be.map(function(An){var ni=(0,Wt.Z)($e,An);return ni?ni.node:null}).filter(function(An){return An});vt.setUncontrolledState({selectedKeys:be}),At==null||At(be,{event:"select",selected:gn,node:Oe,selectedNodes:Un,nativeEvent:We.nativeEvent})},vt.onNodeCheck=function(We,Oe,be){var Ne=vt.state,$e=Ne.keyEntities,dt=Ne.checkedKeys,Je=Ne.halfCheckedKeys,At=vt.props,en=At.checkStrictly,pn=At.onCheck,ln=Oe.key,gn,Un={event:"check",node:Oe,checked:be,nativeEvent:We.nativeEvent};if(en){var An=be?(0,Jt.L0)(dt,ln):(0,Jt._5)(dt,ln),ni=(0,Jt._5)(Je,ln);gn={checked:An,halfChecked:ni},Un.checkedNodes=An.map(function(sr){return(0,Wt.Z)($e,sr)}).filter(function(sr){return sr}).map(function(sr){return sr.node}),vt.setUncontrolledState({checkedKeys:An})}else{var ai=(0,bn.S)([].concat((0,Ce.Z)(dt),[ln]),!0,$e),ki=ai.checkedKeys,Ci=ai.halfCheckedKeys;if(!be){var Ki=new Set(ki);Ki.delete(ln);var ir=(0,bn.S)(Array.from(Ki),{checked:!1,halfCheckedKeys:Ci},$e);ki=ir.checkedKeys,Ci=ir.halfCheckedKeys}gn=ki,Un.checkedNodes=[],Un.checkedNodesPositions=[],Un.halfCheckedKeys=Ci,ki.forEach(function(sr){var Ji=(0,Wt.Z)($e,sr);if(Ji){var Fr=Ji.node,Mr=Ji.pos;Un.checkedNodes.push(Fr),Un.checkedNodesPositions.push({node:Fr,pos:Mr})}}),vt.setUncontrolledState({checkedKeys:ki},!1,{halfCheckedKeys:Ci})}pn==null||pn(gn,Un)},vt.onNodeLoad=function(We){var Oe=We.key,be=new Promise(function(Ne,$e){vt.setState(function(dt){var Je=dt.loadedKeys,At=Je===void 0?[]:Je,en=dt.loadingKeys,pn=en===void 0?[]:en,ln=vt.props,gn=ln.loadData,Un=ln.onLoad;if(!gn||At.indexOf(Oe)!==-1||pn.indexOf(Oe)!==-1)return null;var An=gn(We);return An.then(function(){var ni=vt.state.loadedKeys,ai=(0,Jt.L0)(ni,Oe);Un==null||Un(ai,{event:"load",node:We}),vt.setUncontrolledState({loadedKeys:ai}),vt.setState(function(ki){return{loadingKeys:(0,Jt._5)(ki.loadingKeys,Oe)}}),Ne()}).catch(function(ni){if(vt.setState(function(ki){return{loadingKeys:(0,Jt._5)(ki.loadingKeys,Oe)}}),vt.loadingRetryTimes[Oe]=(vt.loadingRetryTimes[Oe]||0)+1,vt.loadingRetryTimes[Oe]>=Kt){var ai=vt.state.loadedKeys;(0,z.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),vt.setUncontrolledState({loadedKeys:(0,Jt.L0)(ai,Oe)}),Ne()}$e(ni)}),{loadingKeys:(0,Jt.L0)(pn,Oe)}})});return be.catch(function(){}),be},vt.onNodeMouseEnter=function(We,Oe){var be=vt.props.onMouseEnter;be==null||be({event:We,node:Oe})},vt.onNodeMouseLeave=function(We,Oe){var be=vt.props.onMouseLeave;be==null||be({event:We,node:Oe})},vt.onNodeContextMenu=function(We,Oe){var be=vt.props.onRightClick;be&&(We.preventDefault(),be({event:We,node:Oe}))},vt.onFocus=function(){var We=vt.props.onFocus;vt.setState({focused:!0});for(var Oe=arguments.length,be=new Array(Oe),Ne=0;Ne<Oe;Ne++)be[Ne]=arguments[Ne];We==null||We.apply(void 0,be)},vt.onBlur=function(){var We=vt.props.onBlur;vt.setState({focused:!1}),vt.onActiveChange(null);for(var Oe=arguments.length,be=new Array(Oe),Ne=0;Ne<Oe;Ne++)be[Ne]=arguments[Ne];We==null||We.apply(void 0,be)},vt.getTreeNodeRequiredProps=function(){var We=vt.state,Oe=We.expandedKeys,be=We.selectedKeys,Ne=We.loadedKeys,$e=We.loadingKeys,dt=We.checkedKeys,Je=We.halfCheckedKeys,At=We.dragOverNodeKey,en=We.dropPosition,pn=We.keyEntities;return{expandedKeys:Oe||[],selectedKeys:be||[],loadedKeys:Ne||[],loadingKeys:$e||[],checkedKeys:dt||[],halfCheckedKeys:Je||[],dragOverNodeKey:At,dropPosition:en,keyEntities:pn}},vt.setExpandedKeys=function(We){var Oe=vt.state,be=Oe.treeData,Ne=Oe.fieldNames,$e=(0,Ze.oH)(be,We,Ne);vt.setUncontrolledState({expandedKeys:We,flattenNodes:$e},!0)},vt.onNodeExpand=function(We,Oe){var be=vt.state.expandedKeys,Ne=vt.state,$e=Ne.listChanging,dt=Ne.fieldNames,Je=vt.props,At=Je.onExpand,en=Je.loadData,pn=Oe.expanded,ln=Oe[dt.key];if(!$e){var gn=be.indexOf(ln),Un=!pn;if((0,z.ZP)(pn&&gn!==-1||!pn&&gn===-1,"Expand state not sync with index check"),Un?be=(0,Jt.L0)(be,ln):be=(0,Jt._5)(be,ln),vt.setExpandedKeys(be),At==null||At(be,{node:Oe,expanded:Un,nativeEvent:We.nativeEvent}),Un&&en){var An=vt.onNodeLoad(Oe);An&&An.then(function(){var ni=(0,Ze.oH)(vt.state.treeData,be,dt);vt.setUncontrolledState({flattenNodes:ni})}).catch(function(){var ni=vt.state.expandedKeys,ai=(0,Jt._5)(ni,ln);vt.setExpandedKeys(ai)})}}},vt.onListChangeStart=function(){vt.setUncontrolledState({listChanging:!0})},vt.onListChangeEnd=function(){setTimeout(function(){vt.setUncontrolledState({listChanging:!1})})},vt.onActiveChange=function(We){var Oe=vt.state.activeKey,be=vt.props.onActiveChange;Oe!==We&&(vt.setState({activeKey:We}),We!==null&&vt.scrollTo({key:We}),be==null||be(We))},vt.getActiveItem=function(){var We=vt.state,Oe=We.activeKey,be=We.flattenNodes;return Oe===null?null:be.find(function(Ne){var $e=Ne.key;return $e===Oe})||null},vt.offsetActiveKey=function(We){var Oe=vt.state,be=Oe.flattenNodes,Ne=Oe.activeKey,$e=be.findIndex(function(At){var en=At.key;return en===Ne});$e===-1&&We<0&&($e=be.length),$e=($e+We+be.length)%be.length;var dt=be[$e];if(dt){var Je=dt.key;vt.onActiveChange(Je)}else vt.onActiveChange(null)},vt.onKeyDown=function(We){var Oe=vt.state,be=Oe.activeKey,Ne=Oe.expandedKeys,$e=Oe.checkedKeys,dt=Oe.fieldNames,Je=vt.props,At=Je.onKeyDown,en=Je.checkable,pn=Je.selectable;switch(We.which){case de.Z.UP:{vt.offsetActiveKey(-1),We.preventDefault();break}case de.Z.DOWN:{vt.offsetActiveKey(1),We.preventDefault();break}}var ln=vt.getActiveItem();if(ln&&ln.data){var gn=vt.getTreeNodeRequiredProps(),Un=ln.data.isLeaf===!1||!!(ln.data[dt.children]||[]).length,An=(0,Ze.F)((0,ke.Z)((0,ke.Z)({},(0,Ze.H8)(be,gn)),{},{data:ln.data,active:!0}));switch(We.which){case de.Z.LEFT:{Un&&Ne.includes(be)?vt.onNodeExpand({},An):ln.parent&&vt.onActiveChange(ln.parent.key),We.preventDefault();break}case de.Z.RIGHT:{Un&&!Ne.includes(be)?vt.onNodeExpand({},An):ln.children&&ln.children.length&&vt.onActiveChange(ln.children[0].key),We.preventDefault();break}case de.Z.ENTER:case de.Z.SPACE:{en&&!An.disabled&&An.checkable!==!1&&!An.disableCheckbox?vt.onNodeCheck({},An,!$e.includes(be)):!en&&pn&&!An.disabled&&An.selectable!==!1&&vt.onNodeSelect({},An);break}}}At==null||At(We)},vt.setUncontrolledState=function(We){var Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,be=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!vt.destroyed){var Ne=!1,$e=!0,dt={};Object.keys(We).forEach(function(Je){if(Je in vt.props){$e=!1;return}Ne=!0,dt[Je]=We[Je]}),Ne&&(!Oe||$e)&&vt.setState((0,ke.Z)((0,ke.Z)({},dt),be))}},vt.scrollTo=function(We){vt.listRef.current.scrollTo(We)},vt}return(0,he.Z)(xt,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var nt=this.props.activeKey;nt!==void 0&&nt!==this.state.activeKey&&(this.setState({activeKey:nt}),nt!==null&&this.scrollTo({key:nt}))}},{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 nt,He=this.state,Ie=He.focused,We=He.flattenNodes,Oe=He.keyEntities,be=He.draggingNodeKey,Ne=He.activeKey,$e=He.dropLevelOffset,dt=He.dropContainerKey,Je=He.dropTargetKey,At=He.dropPosition,en=He.dragOverNodeKey,pn=He.indent,ln=this.props,gn=ln.prefixCls,Un=ln.className,An=ln.style,ni=ln.showLine,ai=ln.focusable,ki=ln.tabIndex,Ci=ki===void 0?0:ki,Ki=ln.selectable,ir=ln.showIcon,sr=ln.icon,Ji=ln.switcherIcon,Fr=ln.draggable,Mr=ln.checkable,vi=ln.checkStrictly,wr=ln.disabled,Tr=ln.motion,it=ln.loadData,Rr=ln.filterTreeNode,Or=ln.height,Ur=ln.itemHeight,uo=ln.virtual,po=ln.titleRender,io=ln.dropIndicatorRender,Do=ln.onContextMenu,Xn=ln.onScroll,Ke=ln.direction,qe=ln.rootClassName,Ye=ln.rootStyle,St=(0,ce.Z)(this.props,{aria:!0,data:!0}),Ot;return Fr&&((0,Be.Z)(Fr)==="object"?Ot=Fr:typeof Fr=="function"?Ot={nodeDraggable:Fr}:Ot={}),ee.createElement(oe.k.Provider,{value:{prefixCls:gn,selectable:Ki,showIcon:ir,icon:sr,switcherIcon:Ji,draggable:Ot,draggingNodeKey:be,checkable:Mr,checkStrictly:vi,disabled:wr,keyEntities:Oe,dropLevelOffset:$e,dropContainerKey:dt,dropTargetKey:Je,dropPosition:At,dragOverNodeKey:en,indent:pn,direction:Ke,dropIndicatorRender:io,loadData:it,filterTreeNode:Rr,titleRender:po,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:ve()(gn,Un,qe,(nt={},(0,me.Z)(nt,"".concat(gn,"-show-line"),ni),(0,me.Z)(nt,"".concat(gn,"-focused"),Ie),(0,me.Z)(nt,"".concat(gn,"-active-focused"),Ne!==null),nt)),style:Ye},ee.createElement(hn,(0,Me.Z)({ref:this.listRef,prefixCls:gn,style:An,data:We,disabled:wr,selectable:Ki,checkable:!!Mr,motion:Tr,dragging:be!==null,height:Or,itemHeight:Ur,virtual:uo,focusable:ai,focused:Ie,tabIndex:Ci,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Do,onScroll:Xn},this.getTreeNodeRequiredProps(),St))))}}],[{key:"getDerivedStateFromProps",value:function(nt,He){var Ie=He.prevProps,We={prevProps:nt};function Oe(ai){return!Ie&&ai in nt||Ie&&Ie[ai]!==nt[ai]}var be,Ne=He.fieldNames;if(Oe("fieldNames")&&(Ne=(0,Ze.w$)(nt.fieldNames),We.fieldNames=Ne),Oe("treeData")?be=nt.treeData:Oe("children")&&((0,z.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),be=(0,Ze.zn)(nt.children)),be){We.treeData=be;var $e=(0,Ze.I8)(be,{fieldNames:Ne});We.keyEntities=(0,ke.Z)((0,me.Z)({},lt,ut),$e.keyEntities)}var dt=We.keyEntities||He.keyEntities;if(Oe("expandedKeys")||Ie&&Oe("autoExpandParent"))We.expandedKeys=nt.autoExpandParent||!Ie&&nt.defaultExpandParent?(0,Jt.r7)(nt.expandedKeys,dt):nt.expandedKeys;else if(!Ie&&nt.defaultExpandAll){var Je=(0,ke.Z)({},dt);delete Je[lt],We.expandedKeys=Object.keys(Je).map(function(ai){return Je[ai].key})}else!Ie&&nt.defaultExpandedKeys&&(We.expandedKeys=nt.autoExpandParent||nt.defaultExpandParent?(0,Jt.r7)(nt.defaultExpandedKeys,dt):nt.defaultExpandedKeys);if(We.expandedKeys||delete We.expandedKeys,be||We.expandedKeys){var At=(0,Ze.oH)(be||He.treeData,We.expandedKeys||He.expandedKeys,Ne);We.flattenNodes=At}if(nt.selectable&&(Oe("selectedKeys")?We.selectedKeys=(0,Jt.BT)(nt.selectedKeys,nt):!Ie&&nt.defaultSelectedKeys&&(We.selectedKeys=(0,Jt.BT)(nt.defaultSelectedKeys,nt))),nt.checkable){var en;if(Oe("checkedKeys")?en=(0,Jt.E6)(nt.checkedKeys)||{}:!Ie&&nt.defaultCheckedKeys?en=(0,Jt.E6)(nt.defaultCheckedKeys)||{}:be&&(en=(0,Jt.E6)(nt.checkedKeys)||{checkedKeys:He.checkedKeys,halfCheckedKeys:He.halfCheckedKeys}),en){var pn=en,ln=pn.checkedKeys,gn=ln===void 0?[]:ln,Un=pn.halfCheckedKeys,An=Un===void 0?[]:Un;if(!nt.checkStrictly){var ni=(0,bn.S)(gn,!0,dt);gn=ni.checkedKeys,An=ni.halfCheckedKeys}We.checkedKeys=gn,We.halfCheckedKeys=An}}return Oe("loadedKeys")&&(We.loadedKeys=nt.loadedKeys),We}}]),xt}(ee.Component);Xt.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:ie,allowDrop:function(){return!0},expandAction:!1},Xt.TreeNode=De.Z;var $t=Xt,kt=$t},35654:function(_n,qt,Ee){"use strict";Ee.d(qt,{BT:function(){return ee},E6:function(){return se},L0:function(){return ge},OM:function(){return z},_5:function(){return xe},r7:function(){return ue},wA:function(){return ve},yx:function(){return le}});var Me=Ee(80702),me=Ee(62853),Be=Ee(48736),ke=Ee(59301),Ce=Ee(39417),Le=Ee(67841),he=Ee(71430),ye=null;function xe(Se,we){if(!Se)return[];var Pe=Se.slice(),Ae=Pe.indexOf(we);return Ae>=0&&Pe.splice(Ae,1),Pe}function ge(Se,we){var Pe=(Se||[]).slice();return Pe.indexOf(we)===-1&&Pe.push(we),Pe}function le(Se){return Se.split("-")}function ve(Se,we){var Pe=[],Ae=(0,Le.Z)(we,Se);function De(){var ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];ze.forEach(function(Ze){var Xe=Ze.key,Ge=Ze.children;Pe.push(Xe),De(Ge)})}return De(Ae.children),Pe}function de(Se){if(Se.parent){var we=le(Se.pos);return Number(we[we.length-1])===Se.parent.children.length-1}return!1}function ce(Se){var we=le(Se.pos);return Number(we[we.length-1])===0}function z(Se,we,Pe,Ae,De,ze,Ze,Xe,Ge,ft){var at,Ct=Se.clientX,et=Se.clientY,yt=Se.target.getBoundingClientRect(),st=yt.top,zt=yt.height,lt=(ft==="rtl"?-1:1)*(((De==null?void 0:De.x)||0)-Ct),tt=(lt-12)/Ae,ut=(0,Le.Z)(Xe,Pe.props.eventKey);if(et<st+zt/2){var mt=Ze.findIndex(function(kt){return kt.key===ut.key}),Pt=mt<=0?0:mt-1,gt=Ze[Pt].key;ut=(0,Le.Z)(Xe,gt)}var Ft=ut.key,Ht=ut,hn=ut.key,Jt=0,bn=0;if(!Ge.includes(Ft))for(var Wt=0;Wt<tt&&de(ut);Wt+=1)ut=ut.parent,bn+=1;var Kt=we.props.data,Xt=ut.node,$t=!0;return ce(ut)&&ut.level===0&&et<st+zt/2&&ze({dragNode:Kt,dropNode:Xt,dropPosition:-1})&&ut.key===Pe.props.eventKey?Jt=-1:(Ht.children||[]).length&&Ge.includes(hn)?ze({dragNode:Kt,dropNode:Xt,dropPosition:0})?Jt=0:$t=!1:bn===0?tt>-1.5?ze({dragNode:Kt,dropNode:Xt,dropPosition:1})?Jt=1:$t=!1:ze({dragNode:Kt,dropNode:Xt,dropPosition:0})?Jt=0:ze({dragNode:Kt,dropNode:Xt,dropPosition:1})?Jt=1:$t=!1:ze({dragNode:Kt,dropNode:Xt,dropPosition:1})?Jt=1:$t=!1,{dropPosition:Jt,dropLevelOffset:bn,dropTargetKey:ut.key,dropTargetPos:ut.pos,dragOverNodeKey:hn,dropContainerKey:Jt===0?null:((at=ut.parent)===null||at===void 0?void 0:at.key)||null,dropAllowed:$t}}function ee(Se,we){if(Se){var Pe=we.multiple;return Pe?Se.slice():Se.length?[Se[0]]:Se}}var oe=function(we){return we};function ie(Se,we){if(!Se)return[];var Pe=we||{},Ae=Pe.processProps,De=Ae===void 0?oe:Ae,ze=Array.isArray(Se)?Se:[Se];return ze.map(function(Ze){var Xe=Ze.children,Ge=_objectWithoutProperties(Ze,ye),ft=ie(Xe,we);return React.createElement(TreeNode,_extends({key:Ge.key},De(Ge)),ft)})}function se(Se){if(!Se)return null;var we;if(Array.isArray(Se))we={checkedKeys:Se,halfCheckedKeys:void 0};else if((0,me.Z)(Se)==="object")we={checkedKeys:Se.checked||void 0,halfCheckedKeys:Se.halfChecked||void 0};else return(0,Be.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return we}function ue(Se,we){var Pe=new Set;function Ae(De){if(!Pe.has(De)){var ze=(0,Le.Z)(we,De);if(ze){Pe.add(De);var Ze=ze.parent,Xe=ze.node;Xe.disabled||Ze&&Ae(Ze.key)}}}return(Se||[]).forEach(function(De){Ae(De)}),(0,Me.Z)(Pe)}},90782:function(_n,qt,Ee){"use strict";Ee.d(qt,{S:function(){return he}});var Me=Ee(48736),me=Ee(67841);function Be(ye,xe){var ge=new Set;return ye.forEach(function(le){xe.has(le)||ge.add(le)}),ge}function ke(ye){var xe=ye||{},ge=xe.disabled,le=xe.disableCheckbox,ve=xe.checkable;return!!(ge||le)||ve===!1}function Ce(ye,xe,ge,le){for(var ve=new Set(ye),de=new Set,ce=0;ce<=ge;ce+=1){var z=xe.get(ce)||new Set;z.forEach(function(se){var ue=se.key,Se=se.node,we=se.children,Pe=we===void 0?[]:we;ve.has(ue)&&!le(Se)&&Pe.filter(function(Ae){return!le(Ae.node)}).forEach(function(Ae){ve.add(Ae.key)})})}for(var ee=new Set,oe=ge;oe>=0;oe-=1){var ie=xe.get(oe)||new Set;ie.forEach(function(se){var ue=se.parent,Se=se.node;if(!(le(Se)||!se.parent||ee.has(se.parent.key))){if(le(se.parent.node)){ee.add(ue.key);return}var we=!0,Pe=!1;(ue.children||[]).filter(function(Ae){return!le(Ae.node)}).forEach(function(Ae){var De=Ae.key,ze=ve.has(De);we&&!ze&&(we=!1),!Pe&&(ze||de.has(De))&&(Pe=!0)}),we&&ve.add(ue.key),Pe&&de.add(ue.key),ee.add(ue.key)}})}return{checkedKeys:Array.from(ve),halfCheckedKeys:Array.from(Be(de,ve))}}function Le(ye,xe,ge,le,ve){for(var de=new Set(ye),ce=new Set(xe),z=0;z<=le;z+=1){var ee=ge.get(z)||new Set;ee.forEach(function(ue){var Se=ue.key,we=ue.node,Pe=ue.children,Ae=Pe===void 0?[]:Pe;!de.has(Se)&&!ce.has(Se)&&!ve(we)&&Ae.filter(function(De){return!ve(De.node)}).forEach(function(De){de.delete(De.key)})})}ce=new Set;for(var oe=new Set,ie=le;ie>=0;ie-=1){var se=ge.get(ie)||new Set;se.forEach(function(ue){var Se=ue.parent,we=ue.node;if(!(ve(we)||!ue.parent||oe.has(ue.parent.key))){if(ve(ue.parent.node)){oe.add(Se.key);return}var Pe=!0,Ae=!1;(Se.children||[]).filter(function(De){return!ve(De.node)}).forEach(function(De){var ze=De.key,Ze=de.has(ze);Pe&&!Ze&&(Pe=!1),!Ae&&(Ze||ce.has(ze))&&(Ae=!0)}),Pe||de.delete(Se.key),Ae&&ce.add(Se.key),oe.add(Se.key)}})}return{checkedKeys:Array.from(de),halfCheckedKeys:Array.from(Be(ce,de))}}function he(ye,xe,ge,le){var ve=[],de;le?de=le:de=ke;var ce=new Set(ye.filter(function(ie){var se=!!(0,me.Z)(ge,ie);return se||ve.push(ie),se})),z=new Map,ee=0;Object.keys(ge).forEach(function(ie){var se=ge[ie],ue=se.level,Se=z.get(ue);Se||(Se=new Set,z.set(ue,Se)),Se.add(se),ee=Math.max(ee,ue)}),(0,Me.ZP)(!ve.length,"Tree missing follow keys: ".concat(ve.slice(0,100).map(function(ie){return"'".concat(ie,"'")}).join(", ")));var oe;return xe===!0?oe=Ce(ce,z,ee,de):oe=Le(ce,xe.halfCheckedKeys,z,ee,de),oe}},67841:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Me}});function Me(me,Be){return me[Be]}},71430:function(_n,qt,Ee){"use strict";Ee.d(qt,{F:function(){return ue},H8:function(){return se},I8:function(){return ie},km:function(){return ve},oH:function(){return ee},w$:function(){return de},zn:function(){return z}});var Me=Ee(62853),me=Ee(80702),Be=Ee(77321),ke=Ee(74416),Ce=Ee(11592),Le=Ee(2738),he=Ee(48736),ye=Ee(67841),xe=["children"];function ge(Se,we){return"".concat(Se,"-").concat(we)}function le(Se){return Se&&Se.type&&Se.type.isTreeNode}function ve(Se,we){return Se!=null?Se:we}function de(Se){var we=Se||{},Pe=we.title,Ae=we._title,De=we.key,ze=we.children,Ze=Pe||"title";return{title:Ze,_title:Ae||[Ze],key:De||"key",children:ze||"children"}}function ce(Se,we){var Pe=new Map;function Ae(De){var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(De||[]).forEach(function(Ze){var Xe=Ze[we.key],Ge=Ze[we.children];warning(Xe!=null,"Tree node must have a certain key: [".concat(ze).concat(Xe,"]"));var ft=String(Xe);warning(!Pe.has(ft)||Xe===null||Xe===void 0,"Same 'key' exist in the Tree: ".concat(ft)),Pe.set(ft,!0),Ae(Ge,"".concat(ze).concat(ft," > "))})}Ae(Se)}function z(Se){function we(Pe){var Ae=(0,Ce.Z)(Pe);return Ae.map(function(De){if(!le(De))return(0,he.ZP)(!De,"Tree/TreeNode can only accept TreeNode as children."),null;var ze=De.key,Ze=De.props,Xe=Ze.children,Ge=(0,ke.Z)(Ze,xe),ft=(0,Be.Z)({key:ze},Ge),at=we(Xe);return at.length&&(ft.children=at),ft}).filter(function(De){return De})}return we(Se)}function ee(Se,we,Pe){var Ae=de(Pe),De=Ae._title,ze=Ae.key,Ze=Ae.children,Xe=new Set(we===!0?[]:we),Ge=[];function ft(at){var Ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return at.map(function(et,yt){for(var st=ge(Ct?Ct.pos:"0",yt),zt=ve(et[ze],st),lt,tt=0;tt<De.length;tt+=1){var ut=De[tt];if(et[ut]!==void 0){lt=et[ut];break}}var mt=(0,Be.Z)((0,Be.Z)({},(0,Le.Z)(et,[].concat((0,me.Z)(De),[ze,Ze]))),{},{title:lt,key:zt,parent:Ct,pos:st,children:null,data:et,isStart:[].concat((0,me.Z)(Ct?Ct.isStart:[]),[yt===0]),isEnd:[].concat((0,me.Z)(Ct?Ct.isEnd:[]),[yt===at.length-1])});return Ge.push(mt),we===!0||Xe.has(zt)?mt.children=ft(et[Ze]||[],mt):mt.children=[],mt})}return ft(Se),Ge}function oe(Se,we,Pe){var Ae={};(0,Me.Z)(Pe)==="object"?Ae=Pe:Ae={externalGetKey:Pe},Ae=Ae||{};var De=Ae,ze=De.childrenPropName,Ze=De.externalGetKey,Xe=De.fieldNames,Ge=de(Xe),ft=Ge.key,at=Ge.children,Ct=ze||at,et;Ze?typeof Ze=="string"?et=function(zt){return zt[Ze]}:typeof Ze=="function"&&(et=function(zt){return Ze(zt)}):et=function(zt,lt){return ve(zt[ft],lt)};function yt(st,zt,lt,tt){var ut=st?st[Ct]:Se,mt=st?ge(lt.pos,zt):"0",Pt=st?[].concat((0,me.Z)(tt),[st]):[];if(st){var gt=et(st,mt),Ft={node:st,index:zt,pos:mt,key:gt,parentPos:lt.node?lt.pos:null,level:lt.level+1,nodes:Pt};we(Ft)}ut&&ut.forEach(function(Ht,hn){yt(Ht,hn,{node:st,pos:mt,level:lt?lt.level+1:-1},Pt)})}yt(null)}function ie(Se){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Pe=we.initWrapper,Ae=we.processEntity,De=we.onProcessFinished,ze=we.externalGetKey,Ze=we.childrenPropName,Xe=we.fieldNames,Ge=arguments.length>2?arguments[2]:void 0,ft=ze||Ge,at={},Ct={},et={posEntities:at,keyEntities:Ct};return Pe&&(et=Pe(et)||et),oe(Se,function(yt){var st=yt.node,zt=yt.index,lt=yt.pos,tt=yt.key,ut=yt.parentPos,mt=yt.level,Pt=yt.nodes,gt={node:st,nodes:Pt,index:zt,key:tt,pos:lt,level:mt},Ft=ve(tt,lt);at[lt]=gt,Ct[Ft]=gt,gt.parent=at[ut],gt.parent&&(gt.parent.children=gt.parent.children||[],gt.parent.children.push(gt)),Ae&&Ae(gt,et)},{externalGetKey:ft,childrenPropName:Ze,fieldNames:Xe}),De&&De(et),et}function se(Se,we){var Pe=we.expandedKeys,Ae=we.selectedKeys,De=we.loadedKeys,ze=we.loadingKeys,Ze=we.checkedKeys,Xe=we.halfCheckedKeys,Ge=we.dragOverNodeKey,ft=we.dropPosition,at=we.keyEntities,Ct=(0,ye.Z)(at,Se),et={eventKey:Se,expanded:Pe.indexOf(Se)!==-1,selected:Ae.indexOf(Se)!==-1,loaded:De.indexOf(Se)!==-1,loading:ze.indexOf(Se)!==-1,checked:Ze.indexOf(Se)!==-1,halfChecked:Xe.indexOf(Se)!==-1,pos:String(Ct?Ct.pos:""),dragOver:Ge===Se&&ft===0,dragOverGapTop:Ge===Se&&ft===-1,dragOverGapBottom:Ge===Se&&ft===1};return et}function ue(Se){var we=Se.data,Pe=Se.expanded,Ae=Se.selected,De=Se.checked,ze=Se.loaded,Ze=Se.loading,Xe=Se.halfChecked,Ge=Se.dragOver,ft=Se.dragOverGapTop,at=Se.dragOverGapBottom,Ct=Se.pos,et=Se.active,yt=Se.eventKey,st=(0,Be.Z)((0,Be.Z)({},we),{},{expanded:Pe,selected:Ae,checked:De,loaded:ze,loading:Ze,halfChecked:Xe,dragOver:Ge,dragOverGapTop:ft,dragOverGapBottom:at,pos:Ct,active:et,key:yt});return"props"in st||Object.defineProperty(st,"props",{get:function(){return(0,he.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),Se}}),st}},8224:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return me}});var Me=Ee(4676);function me(Be,ke,Ce,Le){var he=Me.unstable_batchedUpdates?function(xe){Me.unstable_batchedUpdates(Ce,xe)}:Ce;return Be!=null&&Be.addEventListener&&Be.addEventListener(ke,he,Le),{remove:function(){Be!=null&&Be.removeEventListener&&Be.removeEventListener(ke,he,Le)}}}},55468:function(_n,qt,Ee){"use strict";Ee.d(qt,{g1:function(){return le},os:function(){return de}});var Me=/margin|padding|width|height|max|min|offset/,me={left:!0,top:!0},Be={cssFloat:1,styleFloat:1,float:1};function ke(ce){return ce.nodeType===1?ce.ownerDocument.defaultView.getComputedStyle(ce,null):{}}function Ce(ce,z,ee){if(z=z.toLowerCase(),ee==="auto"){if(z==="height")return ce.offsetHeight;if(z==="width")return ce.offsetWidth}return z in me||(me[z]=Me.test(z)),me[z]?parseFloat(ee)||0:ee}function Le(ce,z){var ee=arguments.length,oe=ke(ce);return z=Be[z]?"cssFloat"in ce.style?"cssFloat":"styleFloat":z,ee===1?oe:Ce(ce,z,oe[z]||ce.style[z])}function he(ce,z,ee){var oe=arguments.length;if(z=Be[z]?"cssFloat"in ce.style?"cssFloat":"styleFloat":z,oe===3)return typeof ee=="number"&&Me.test(z)&&(ee="".concat(ee,"px")),ce.style[z]=ee,ee;for(var ie in z)z.hasOwnProperty(ie)&&he(ce,ie,z[ie]);return ke(ce)}function ye(ce){return ce===document.body?document.documentElement.clientWidth:ce.offsetWidth}function xe(ce){return ce===document.body?window.innerHeight||document.documentElement.clientHeight:ce.offsetHeight}function ge(){var ce=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),z=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:ce,height:z}}function le(){var ce=document.documentElement.clientWidth,z=window.innerHeight||document.documentElement.clientHeight;return{width:ce,height:z}}function ve(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function de(ce){var z=ce.getBoundingClientRect(),ee=document.documentElement;return{left:z.left+(window.pageXOffset||ee.scrollLeft)-(ee.clientLeft||document.body.clientLeft||0),top:z.top+(window.pageYOffset||ee.scrollTop)-(ee.clientTop||document.body.clientTop||0)}}},24514:function(_n,qt,Ee){"use strict";Ee.d(qt,{G:function(){return ke}});var Me=Ee(47273),me=function(Le){if((0,Me.Z)()&&window.document.documentElement){var he=Array.isArray(Le)?Le:[Le],ye=window.document.documentElement;return he.some(function(xe){return xe in ye.style})}return!1},Be=function(Le,he){if(!me(Le))return!1;var ye=document.createElement("div"),xe=ye.style[Le];return ye.style[Le]=he,ye.style[Le]!==xe};function ke(Ce,Le){return!Array.isArray(Ce)&&Le!==void 0?Be(Ce,Le):me(Ce)}},45680:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Xt}});var Me=Ee(72308),me=Ee(62853),Be=Ee(77321),ke=Ee(49618),Ce=Ee(52487),Le=Ee(74416),he=Ee(92310),ye=Ee.n(he),xe=Ee(29301),ge=Ee(70425),le=Ee(34280),ve=Ee(59301),de=Ee(4676),ce=ve.forwardRef(function($t,kt){var pt=$t.height,Bt=$t.offsetY,xt=$t.offsetX,vt=$t.children,nt=$t.prefixCls,He=$t.onInnerResize,Ie=$t.innerProps,We=$t.rtl,Oe=$t.extra,be={},Ne={display:"flex",flexDirection:"column"};return Bt!==void 0&&(be={height:pt,position:"relative",overflow:"hidden"},Ne=(0,Be.Z)((0,Be.Z)({},Ne),{},(0,ke.Z)((0,ke.Z)((0,ke.Z)((0,ke.Z)((0,ke.Z)({transform:"translateY(".concat(Bt,"px)")},We?"marginRight":"marginLeft",-xt),"position","absolute"),"left",0),"right",0),"top",0))),ve.createElement("div",{style:be},ve.createElement(xe.Z,{onResize:function(dt){var Je=dt.offsetHeight;Je&&He&&He()}},ve.createElement("div",(0,Me.Z)({style:Ne,className:ye()((0,ke.Z)({},"".concat(nt,"-holder-inner"),nt)),ref:kt},Ie),vt,Oe)))});ce.displayName="Filler";var z=ce;function ee($t){var kt=$t.children,pt=$t.setRef,Bt=ve.useCallback(function(xt){pt(xt)},[]);return ve.cloneElement(kt,{ref:Bt})}function oe($t,kt,pt,Bt,xt,vt,nt,He){var Ie=He.getKey;return $t.slice(kt,pt+1).map(function(We,Oe){var be=kt+Oe,Ne=nt(We,be,{style:{width:Bt},offsetX:xt}),$e=Ie(We);return ve.createElement(ee,{key:$e,setRef:function(Je){return vt(We,Je)}},Ne)})}function ie($t,kt,pt,Bt){var xt=pt-$t,vt=kt-pt,nt=Math.min(xt,vt)*2;if(Bt<=nt){var He=Math.floor(Bt/2);return Bt%2?pt+He+1:pt-He}return xt>vt?pt-(Bt-vt):pt+(Bt-xt)}function se($t,kt,pt){var Bt=$t.length,xt=kt.length,vt,nt;if(Bt===0&&xt===0)return null;Bt<xt?(vt=$t,nt=kt):(vt=kt,nt=$t);var He={__EMPTY_ITEM__:!0};function Ie(dt){return dt!==void 0?pt(dt):He}for(var We=null,Oe=Math.abs(Bt-xt)!==1,be=0;be<nt.length;be+=1){var Ne=Ie(vt[be]),$e=Ie(nt[be]);if(Ne!==$e){We=be,Oe=Oe||Ne!==Ie(nt[be+1]);break}}return We===null?null:{index:We,multiple:Oe}}function ue($t,kt,pt){var Bt=ve.useState($t),xt=(0,Ce.Z)(Bt,2),vt=xt[0],nt=xt[1],He=ve.useState(null),Ie=(0,Ce.Z)(He,2),We=Ie[0],Oe=Ie[1];return ve.useEffect(function(){var be=se(vt||[],$t||[],kt);(be==null?void 0:be.index)!==void 0&&(pt==null||pt(be.index),Oe($t[be.index])),nt($t)},[$t]),[We]}var Se=Ee(16089),we=(typeof navigator=="undefined"?"undefined":(0,me.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Pe=we,Ae=function($t,kt,pt,Bt){var xt=(0,ve.useRef)(!1),vt=(0,ve.useRef)(null);function nt(){clearTimeout(vt.current),xt.current=!0,vt.current=setTimeout(function(){xt.current=!1},50)}var He=(0,ve.useRef)({top:$t,bottom:kt,left:pt,right:Bt});return He.current.top=$t,He.current.bottom=kt,He.current.left=pt,He.current.right=Bt,function(Ie,We){var Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,be=Ie?We<0&&He.current.left||We>0&&He.current.right:We<0&&He.current.top||We>0&&He.current.bottom;return Oe&&be?(clearTimeout(vt.current),xt.current=!1):(!be||xt.current)&&nt(),!xt.current&&be}};function De($t,kt,pt,Bt,xt,vt,nt){var He=(0,ve.useRef)(0),Ie=(0,ve.useRef)(null),We=(0,ve.useRef)(null),Oe=(0,ve.useRef)(!1),be=Ae(kt,pt,Bt,xt);function Ne(pn,ln){if(Se.Z.cancel(Ie.current),!be(!1,ln)){var gn=pn;if(!gn._virtualHandled)gn._virtualHandled=!0;else return;He.current+=ln,We.current=ln,Pe||gn.preventDefault(),Ie.current=(0,Se.Z)(function(){var Un=Oe.current?10:1;nt(He.current*Un,!1),He.current=0})}}function $e(pn,ln){nt(ln,!0),Pe||pn.preventDefault()}var dt=(0,ve.useRef)(null),Je=(0,ve.useRef)(null);function At(pn){if($t){Se.Z.cancel(Je.current),Je.current=(0,Se.Z)(function(){dt.current=null},2);var ln=pn.deltaX,gn=pn.deltaY,Un=pn.shiftKey,An=ln,ni=gn;(dt.current==="sx"||!dt.current&&Un&&gn&&!ln)&&(An=gn,ni=0,dt.current="sx");var ai=Math.abs(An),ki=Math.abs(ni);dt.current===null&&(dt.current=vt&&ai>ki?"x":"y"),dt.current==="y"?Ne(pn,ni):$e(pn,An)}}function en(pn){$t&&(Oe.current=pn.detail===We.current)}return[At,en]}function ze($t,kt,pt,Bt){var xt=ve.useMemo(function(){return[new Map,[]]},[$t,pt.id,Bt]),vt=(0,Ce.Z)(xt,2),nt=vt[0],He=vt[1],Ie=function(Oe){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Oe,Ne=nt.get(Oe),$e=nt.get(be);if(Ne===void 0||$e===void 0)for(var dt=$t.length,Je=He.length;Je<dt;Je+=1){var At,en=$t[Je],pn=kt(en);nt.set(pn,Je);var ln=(At=pt.get(pn))!==null&&At!==void 0?At:Bt;if(He[Je]=(He[Je-1]||0)+ln,pn===Oe&&(Ne=Je),pn===be&&($e=Je),Ne!==void 0&&$e!==void 0)break}return{top:He[Ne-1]||0,bottom:He[$e]}};return Ie}var Ze=Ee(96949),Xe=Ee(55090),Ge=function(){function $t(){(0,Ze.Z)(this,$t),(0,ke.Z)(this,"maps",void 0),(0,ke.Z)(this,"id",0),(0,ke.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,Xe.Z)($t,[{key:"set",value:function(pt,Bt){this.maps[pt]=Bt,this.id+=1,this.diffKeys.add(pt)}},{key:"get",value:function(pt){return this.maps[pt]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),$t}(),ft=Ge;function at($t){var kt=parseFloat($t);return isNaN(kt)?0:kt}function Ct($t,kt,pt){var Bt=ve.useState(0),xt=(0,Ce.Z)(Bt,2),vt=xt[0],nt=xt[1],He=(0,ve.useRef)(new Map),Ie=(0,ve.useRef)(new ft),We=(0,ve.useRef)(0);function Oe(){We.current+=1}function be(){var $e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Oe();var dt=function(){var en=!1;He.current.forEach(function(pn,ln){if(pn&&pn.offsetParent){var gn=pn.offsetHeight,Un=getComputedStyle(pn),An=Un.marginTop,ni=Un.marginBottom,ai=at(An),ki=at(ni),Ci=gn+ai+ki;Ie.current.get(ln)!==Ci&&(Ie.current.set(ln,Ci),en=!0)}}),en&&nt(function(pn){return pn+1})};if($e)dt();else{We.current+=1;var Je=We.current;Promise.resolve().then(function(){Je===We.current&&dt()})}}function Ne($e,dt){var Je=$t($e),At=He.current.get(Je);dt?(He.current.set(Je,dt),be()):He.current.delete(Je),!At!=!dt&&(dt?kt==null||kt($e):pt==null||pt($e))}return(0,ve.useEffect)(function(){return Oe},[]),[Ne,be,Ie.current,vt]}var et=14/15;function yt($t,kt,pt){var Bt=(0,ve.useRef)(!1),xt=(0,ve.useRef)(0),vt=(0,ve.useRef)(0),nt=(0,ve.useRef)(null),He=(0,ve.useRef)(null),Ie,We=function($e){if(Bt.current){var dt=Math.ceil($e.touches[0].pageX),Je=Math.ceil($e.touches[0].pageY),At=xt.current-dt,en=vt.current-Je,pn=Math.abs(At)>Math.abs(en);pn?xt.current=dt:vt.current=Je;var ln=pt(pn,pn?At:en,!1,$e);ln&&$e.preventDefault(),clearInterval(He.current),ln&&(He.current=setInterval(function(){pn?At*=et:en*=et;var gn=Math.floor(pn?At:en);(!pt(pn,gn,!0)||Math.abs(gn)<=.1)&&clearInterval(He.current)},16))}},Oe=function(){Bt.current=!1,Ie()},be=function($e){Ie(),$e.touches.length===1&&!Bt.current&&(Bt.current=!0,xt.current=Math.ceil($e.touches[0].pageX),vt.current=Math.ceil($e.touches[0].pageY),nt.current=$e.target,nt.current.addEventListener("touchmove",We,{passive:!1}),nt.current.addEventListener("touchend",Oe,{passive:!0}))};Ie=function(){nt.current&&(nt.current.removeEventListener("touchmove",We),nt.current.removeEventListener("touchend",Oe))},(0,le.Z)(function(){return $t&&kt.current.addEventListener("touchstart",be,{passive:!0}),function(){var Ne;(Ne=kt.current)===null||Ne===void 0||Ne.removeEventListener("touchstart",be),Ie(),clearInterval(He.current)}},[$t])}function st($t){return Math.floor(Math.pow($t,.5))}function zt($t,kt){var pt="touches"in $t?$t.touches[0]:$t;return pt[kt?"pageX":"pageY"]-window[kt?"scrollX":"scrollY"]}function lt($t,kt,pt){ve.useEffect(function(){var Bt=kt.current;if($t&&Bt){var xt=!1,vt,nt,He=function(){Se.Z.cancel(vt)},Ie=function Ne(){He(),vt=(0,Se.Z)(function(){pt(nt),Ne()})},We=function($e){if(!($e.target.draggable||$e.button!==0)){var dt=$e;dt._virtualHandled||(dt._virtualHandled=!0,xt=!0)}},Oe=function(){xt=!1,He()},be=function($e){if(xt){var dt=zt($e,!1),Je=Bt.getBoundingClientRect(),At=Je.top,en=Je.bottom;if(dt<=At){var pn=At-dt;nt=-st(pn),Ie()}else if(dt>=en){var ln=dt-en;nt=st(ln),Ie()}else He()}};return Bt.addEventListener("mousedown",We),Bt.ownerDocument.addEventListener("mouseup",Oe),Bt.ownerDocument.addEventListener("mousemove",be),function(){Bt.removeEventListener("mousedown",We),Bt.ownerDocument.removeEventListener("mouseup",Oe),Bt.ownerDocument.removeEventListener("mousemove",be),He()}}},[$t])}var tt=10;function ut($t,kt,pt,Bt,xt,vt,nt,He){var Ie=ve.useRef(),We=ve.useState(null),Oe=(0,Ce.Z)(We,2),be=Oe[0],Ne=Oe[1];return(0,le.Z)(function(){if(be&&be.times<tt){if(!$t.current){Ne(function(Tr){return(0,Be.Z)({},Tr)});return}vt();var $e=be.targetAlign,dt=be.originAlign,Je=be.index,At=be.offset,en=$t.current.clientHeight,pn=!1,ln=$e,gn=null;if(en){for(var Un=$e||dt,An=0,ni=0,ai=0,ki=Math.min(kt.length-1,Je),Ci=0;Ci<=ki;Ci+=1){var Ki=xt(kt[Ci]);ni=An;var ir=pt.get(Ki);ai=ni+(ir===void 0?Bt:ir),An=ai}for(var sr=Un==="top"?At:en-At,Ji=ki;Ji>=0;Ji-=1){var Fr=xt(kt[Ji]),Mr=pt.get(Fr);if(Mr===void 0){pn=!0;break}if(sr-=Mr,sr<=0)break}switch(Un){case"top":gn=ni-At;break;case"bottom":gn=ai-en+At;break;default:{var vi=$t.current.scrollTop,wr=vi+en;ni<vi?ln="top":ai>wr&&(ln="bottom")}}gn!==null&&nt(gn),gn!==be.lastTop&&(pn=!0)}pn&&Ne((0,Be.Z)((0,Be.Z)({},be),{},{times:be.times+1,targetAlign:ln,lastTop:gn}))}},[be,$t.current]),function($e){if($e==null){He();return}if(Se.Z.cancel(Ie.current),typeof $e=="number")nt($e);else if($e&&(0,me.Z)($e)==="object"){var dt,Je=$e.align;"index"in $e?dt=$e.index:dt=kt.findIndex(function(pn){return xt(pn)===$e.key});var At=$e.offset,en=At===void 0?0:At;Ne({times:0,index:dt,offset:en,originAlign:Je})}}}var mt=ve.forwardRef(function($t,kt){var pt=$t.prefixCls,Bt=$t.rtl,xt=$t.scrollOffset,vt=$t.scrollRange,nt=$t.onStartMove,He=$t.onStopMove,Ie=$t.onScroll,We=$t.horizontal,Oe=$t.spinSize,be=$t.containerSize,Ne=$t.style,$e=$t.thumbStyle,dt=$t.showScrollBar,Je=ve.useState(!1),At=(0,Ce.Z)(Je,2),en=At[0],pn=At[1],ln=ve.useState(null),gn=(0,Ce.Z)(ln,2),Un=gn[0],An=gn[1],ni=ve.useState(null),ai=(0,Ce.Z)(ni,2),ki=ai[0],Ci=ai[1],Ki=!Bt,ir=ve.useRef(),sr=ve.useRef(),Ji=ve.useState(dt),Fr=(0,Ce.Z)(Ji,2),Mr=Fr[0],vi=Fr[1],wr=ve.useRef(),Tr=function(){dt===!0||dt===!1||(clearTimeout(wr.current),vi(!0),wr.current=setTimeout(function(){vi(!1)},3e3))},it=vt-be||0,Rr=be-Oe||0,Or=ve.useMemo(function(){if(xt===0||it===0)return 0;var Ye=xt/it;return Ye*Rr},[xt,it,Rr]),Ur=function(St){St.stopPropagation(),St.preventDefault()},uo=ve.useRef({top:Or,dragging:en,pageY:Un,startTop:ki});uo.current={top:Or,dragging:en,pageY:Un,startTop:ki};var po=function(St){pn(!0),An(zt(St,We)),Ci(uo.current.top),nt(),St.stopPropagation(),St.preventDefault()};ve.useEffect(function(){var Ye=function(_t){_t.preventDefault()},St=ir.current,Ot=sr.current;return St.addEventListener("touchstart",Ye,{passive:!1}),Ot.addEventListener("touchstart",po,{passive:!1}),function(){St.removeEventListener("touchstart",Ye),Ot.removeEventListener("touchstart",po)}},[]);var io=ve.useRef();io.current=it;var Do=ve.useRef();Do.current=Rr,ve.useEffect(function(){if(en){var Ye,St=function(_t){var dn=uo.current,Pn=dn.dragging,mn=dn.pageY,on=dn.startTop;Se.Z.cancel(Ye);var Nt=ir.current.getBoundingClientRect(),un=be/(We?Nt.width:Nt.height);if(Pn){var Mn=(zt(_t,We)-mn)*un,Dn=on;!Ki&&We?Dn-=Mn:Dn+=Mn;var nn=io.current,sn=Do.current,Nn=sn?Dn/sn:0,On=Math.ceil(Nn*nn);On=Math.max(On,0),On=Math.min(On,nn),Ye=(0,Se.Z)(function(){Ie(On,We)})}},Ot=function(){pn(!1),He()};return window.addEventListener("mousemove",St,{passive:!0}),window.addEventListener("touchmove",St,{passive:!0}),window.addEventListener("mouseup",Ot,{passive:!0}),window.addEventListener("touchend",Ot,{passive:!0}),function(){window.removeEventListener("mousemove",St),window.removeEventListener("touchmove",St),window.removeEventListener("mouseup",Ot),window.removeEventListener("touchend",Ot),Se.Z.cancel(Ye)}}},[en]),ve.useEffect(function(){return Tr(),function(){clearTimeout(wr.current)}},[xt]),ve.useImperativeHandle(kt,function(){return{delayHidden:Tr}});var Xn="".concat(pt,"-scrollbar"),Ke={position:"absolute",visibility:Mr?null:"hidden"},qe={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return We?(Ke.height=8,Ke.left=0,Ke.right=0,Ke.bottom=0,qe.height="100%",qe.width=Oe,Ki?qe.left=Or:qe.right=Or):(Ke.width=8,Ke.top=0,Ke.bottom=0,Ki?Ke.right=0:Ke.left=0,qe.width="100%",qe.height=Oe,qe.top=Or),ve.createElement("div",{ref:ir,className:ye()(Xn,(0,ke.Z)((0,ke.Z)((0,ke.Z)({},"".concat(Xn,"-horizontal"),We),"".concat(Xn,"-vertical"),!We),"".concat(Xn,"-visible"),Mr)),style:(0,Be.Z)((0,Be.Z)({},Ke),Ne),onMouseDown:Ur,onMouseMove:Tr},ve.createElement("div",{ref:sr,className:ye()("".concat(Xn,"-thumb"),(0,ke.Z)({},"".concat(Xn,"-thumb-moving"),en)),style:(0,Be.Z)((0,Be.Z)({},qe),$e),onMouseDown:po}))}),Pt=mt,gt=20;function Ft(){var $t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,pt=$t/kt*$t;return isNaN(pt)&&(pt=0),pt=Math.max(pt,gt),Math.floor(pt)}var Ht=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],hn=[],Jt={overflowY:"auto",overflowAnchor:"none"};function bn($t,kt){var pt=$t.prefixCls,Bt=pt===void 0?"rc-virtual-list":pt,xt=$t.className,vt=$t.height,nt=$t.itemHeight,He=$t.fullHeight,Ie=He===void 0?!0:He,We=$t.style,Oe=$t.data,be=$t.children,Ne=$t.itemKey,$e=$t.virtual,dt=$t.direction,Je=$t.scrollWidth,At=$t.component,en=At===void 0?"div":At,pn=$t.onScroll,ln=$t.onVirtualScroll,gn=$t.onVisibleChange,Un=$t.innerProps,An=$t.extraRender,ni=$t.styles,ai=$t.showScrollBar,ki=ai===void 0?"optional":ai,Ci=(0,Le.Z)($t,Ht),Ki=ve.useCallback(function(_r){return typeof Ne=="function"?Ne(_r):_r==null?void 0:_r[Ne]},[Ne]),ir=Ct(Ki,null,null),sr=(0,Ce.Z)(ir,4),Ji=sr[0],Fr=sr[1],Mr=sr[2],vi=sr[3],wr=!!($e!==!1&&vt&&nt),Tr=ve.useMemo(function(){return Object.values(Mr.maps).reduce(function(_r,cr){return _r+cr},0)},[Mr.id,Mr.maps]),it=wr&&Oe&&(Math.max(nt*Oe.length,Tr)>vt||!!Je),Rr=dt==="rtl",Or=ye()(Bt,(0,ke.Z)({},"".concat(Bt,"-rtl"),Rr),xt),Ur=Oe||hn,uo=(0,ve.useRef)(),po=(0,ve.useRef)(),io=(0,ve.useRef)(),Do=(0,ve.useState)(0),Xn=(0,Ce.Z)(Do,2),Ke=Xn[0],qe=Xn[1],Ye=(0,ve.useState)(0),St=(0,Ce.Z)(Ye,2),Ot=St[0],Tt=St[1],_t=(0,ve.useState)(!1),dn=(0,Ce.Z)(_t,2),Pn=dn[0],mn=dn[1],on=function(){mn(!0)},Nt=function(){mn(!1)},un={getKey:Ki};function Mn(_r){qe(function(cr){var Vr;typeof _r=="function"?Vr=_r(cr):Vr=_r;var hr=Ei(Vr);return uo.current.scrollTop=hr,hr})}var Dn=(0,ve.useRef)({start:0,end:Ur.length}),nn=(0,ve.useRef)(),sn=ue(Ur,Ki),Nn=(0,Ce.Z)(sn,1),On=Nn[0];nn.current=On;var qn=ve.useMemo(function(){if(!wr)return{scrollHeight:void 0,start:0,end:Ur.length-1,offset:void 0};if(!it){var _r;return{scrollHeight:((_r=po.current)===null||_r===void 0?void 0:_r.offsetHeight)||0,start:0,end:Ur.length-1,offset:void 0}}for(var cr=0,Vr,hr,eo,Yo=Ur.length,rr=0;rr<Yo;rr+=1){var Wi=Ur[rr],Qn=Ki(Wi),or=Mr.get(Qn),to=cr+(or===void 0?nt:or);to>=Ke&&Vr===void 0&&(Vr=rr,hr=cr),to>Ke+vt&&eo===void 0&&(eo=rr),cr=to}return Vr===void 0&&(Vr=0,hr=0,eo=Math.ceil(vt/nt)),eo===void 0&&(eo=Ur.length-1),eo=Math.min(eo+1,Ur.length-1),{scrollHeight:cr,start:Vr,end:eo,offset:hr}},[it,wr,Ke,Ur,vi,vt]),Hn=qn.scrollHeight,ei=qn.start,Fn=qn.end,hi=qn.offset;Dn.current.start=ei,Dn.current.end=Fn,ve.useLayoutEffect(function(){var _r=Mr.getRecord();if(_r.size===1){var cr=Array.from(_r)[0],Vr=Ur[ei];if(Vr){var hr=Ki(Vr);if(hr===cr){var eo=Mr.get(cr),Yo=eo-nt;Mn(function(rr){return rr+Yo})}}}Mr.resetRecord()},[Hn]);var Di=ve.useState({width:0,height:vt}),Ri=(0,Ce.Z)(Di,2),En=Ri[0],$i=Ri[1],Cr=function(cr){$i({width:cr.offsetWidth,height:cr.offsetHeight})},mr=(0,ve.useRef)(),Ln=(0,ve.useRef)(),Jn=ve.useMemo(function(){return Ft(En.width,Je)},[En.width,Je]),ui=ve.useMemo(function(){return Ft(En.height,Hn)},[En.height,Hn]),Si=Hn-vt,di=(0,ve.useRef)(Si);di.current=Si;function Ei(_r){var cr=_r;return Number.isNaN(di.current)||(cr=Math.min(cr,di.current)),cr=Math.max(cr,0),cr}var qi=Ke<=0,Fi=Ke>=Si,zi=Ot<=0,fr=Ot>=Je,Bn=Ae(qi,Fi,zi,fr),Br=function(){return{x:Rr?-Ot:Ot,y:Ke}},In=(0,ve.useRef)(Br()),pr=(0,ge.useEvent)(function(_r){if(ln){var cr=(0,Be.Z)((0,Be.Z)({},Br()),_r);(In.current.x!==cr.x||In.current.y!==cr.y)&&(ln(cr),In.current=cr)}});function yo(_r,cr){var Vr=_r;cr?((0,de.flushSync)(function(){Tt(Vr)}),pr()):Mn(Vr)}function Ir(_r){var cr=_r.currentTarget.scrollTop;cr!==Ke&&Mn(cr),pn==null||pn(_r),pr()}var bo=function(cr){var Vr=cr,hr=Je?Je-En.width:0;return Vr=Math.max(Vr,0),Vr=Math.min(Vr,hr),Vr},co=(0,ge.useEvent)(function(_r,cr){cr?((0,de.flushSync)(function(){Tt(function(Vr){var hr=Vr+(Rr?-_r:_r);return bo(hr)})}),pr()):Mn(function(Vr){var hr=Vr+_r;return hr})}),Vi=De(wr,qi,Fi,zi,fr,!!Je,co),Hi=(0,Ce.Z)(Vi,2),ur=Hi[0],Pr=Hi[1];yt(wr,uo,function(_r,cr,Vr,hr){var eo=hr;return Bn(_r,cr,Vr)?!1:!eo||!eo._virtualHandled?(eo&&(eo._virtualHandled=!0),ur({preventDefault:function(){},deltaX:_r?cr:0,deltaY:_r?0:cr}),!0):!1}),lt(it,uo,function(_r){Mn(function(cr){return cr+_r})}),(0,le.Z)(function(){function _r(Vr){var hr=qi&&Vr.detail<0,eo=Fi&&Vr.detail>0;wr&&!hr&&!eo&&Vr.preventDefault()}var cr=uo.current;return cr.addEventListener("wheel",ur,{passive:!1}),cr.addEventListener("DOMMouseScroll",Pr,{passive:!0}),cr.addEventListener("MozMousePixelScroll",_r,{passive:!1}),function(){cr.removeEventListener("wheel",ur),cr.removeEventListener("DOMMouseScroll",Pr),cr.removeEventListener("MozMousePixelScroll",_r)}},[wr,qi,Fi]),(0,le.Z)(function(){if(Je){var _r=bo(Ot);Tt(_r),pr({x:_r})}},[En.width,Je]);var ci=function(){var cr,Vr;(cr=mr.current)===null||cr===void 0||cr.delayHidden(),(Vr=Ln.current)===null||Vr===void 0||Vr.delayHidden()},Mt=ut(uo,Ur,Mr,nt,Ki,function(){return Fr(!0)},Mn,ci);ve.useImperativeHandle(kt,function(){return{nativeElement:io.current,getScrollInfo:Br,scrollTo:function(cr){function Vr(hr){return hr&&(0,me.Z)(hr)==="object"&&("left"in hr||"top"in hr)}Vr(cr)?(cr.left!==void 0&&Tt(bo(cr.left)),Mt(cr.top)):Mt(cr)}}}),(0,le.Z)(function(){if(gn){var _r=Ur.slice(ei,Fn+1);gn(_r,Ur)}},[ei,Fn,Ur]);var Gr=ze(Ur,Ki,Mr,nt),Hr=An==null?void 0:An({start:ei,end:Fn,virtual:it,offsetX:Ot,offsetY:hi,rtl:Rr,getSize:Gr}),ts=oe(Ur,ei,Fn,Je,Ot,Ji,be,un),ko=null;vt&&(ko=(0,Be.Z)((0,ke.Z)({},Ie?"height":"maxHeight",vt),Jt),wr&&(ko.overflowY="hidden",Je&&(ko.overflowX="hidden"),Pn&&(ko.pointerEvents="none")));var ss={};return Rr&&(ss.dir="rtl"),ve.createElement("div",(0,Me.Z)({ref:io,style:(0,Be.Z)((0,Be.Z)({},We),{},{position:"relative"}),className:Or},ss,Ci),ve.createElement(xe.Z,{onResize:Cr},ve.createElement(en,{className:"".concat(Bt,"-holder"),style:ko,ref:uo,onScroll:Ir,onMouseEnter:ci},ve.createElement(z,{prefixCls:Bt,height:Hn,offsetX:Ot,offsetY:hi,scrollWidth:Je,onInnerResize:Fr,ref:po,innerProps:Un,rtl:Rr,extra:Hr},ts))),it&&Hn>vt&&ve.createElement(Pt,{ref:mr,prefixCls:Bt,scrollOffset:Ke,scrollRange:Hn,rtl:Rr,onScroll:yo,onStartMove:on,onStopMove:Nt,spinSize:ui,containerSize:En.height,style:ni==null?void 0:ni.verticalScrollBar,thumbStyle:ni==null?void 0:ni.verticalScrollBarThumb,showScrollBar:ki}),it&&Je>En.width&&ve.createElement(Pt,{ref:Ln,prefixCls:Bt,scrollOffset:Ot,scrollRange:Je,rtl:Rr,onScroll:yo,onStartMove:on,onStopMove:Nt,spinSize:Jn,containerSize:En.width,horizontal:!0,style:ni==null?void 0:ni.horizontalScrollBar,thumbStyle:ni==null?void 0:ni.horizontalScrollBarThumb,showScrollBar:ki}))}var Wt=ve.forwardRef(bn);Wt.displayName="List";var Kt=Wt,Xt=Kt},7062:function(_n,qt,Ee){var Me=Ee(19637),me=Ee(97573),Be=[Ee(96627)];_n.exports=Me.createStore(me,Be)},96627:function(_n,qt,Ee){_n.exports=Me;function Me(){return Ee(42424),{}}},42424:function(){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(_n){return _n<10?"0"+_n:_n}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(_n){return rx_escapable.lastIndex=0,rx_escapable.test(_n)?'"'+_n.replace(rx_escapable,function(qt){var Ee=meta[qt];return typeof Ee=="string"?Ee:"\\u"+("0000"+qt.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+_n+'"'}function str(_n,qt){var Ee,Me,me,Be,ke=gap,Ce,Le=qt[_n];switch(Le&&typeof Le=="object"&&typeof Le.toJSON=="function"&&(Le=Le.toJSON(_n)),typeof rep=="function"&&(Le=rep.call(qt,_n,Le)),typeof Le){case"string":return quote(Le);case"number":return isFinite(Le)?String(Le):"null";case"boolean":case"null":return String(Le);case"object":if(!Le)return"null";if(gap+=indent,Ce=[],Object.prototype.toString.apply(Le)==="[object Array]"){for(Be=Le.length,Ee=0;Ee<Be;Ee+=1)Ce[Ee]=str(Ee,Le)||"null";return me=Ce.length===0?"[]":gap?`[
|
|
|
`+gap+Ce.join(`,
|
|
|
`+gap)+`
|
|
|
`+ke+"]":"["+Ce.join(",")+"]",gap=ke,me}if(rep&&typeof rep=="object")for(Be=rep.length,Ee=0;Ee<Be;Ee+=1)typeof rep[Ee]=="string"&&(Me=rep[Ee],me=str(Me,Le),me&&Ce.push(quote(Me)+(gap?": ":":")+me));else for(Me in Le)Object.prototype.hasOwnProperty.call(Le,Me)&&(me=str(Me,Le),me&&Ce.push(quote(Me)+(gap?": ":":")+me));return me=Ce.length===0?"{}":gap?`{
|
|
|
`+gap+Ce.join(`,
|
|
|
`+gap)+`
|
|
|
`+ke+"}":"{"+Ce.join(",")+"}",gap=ke,me}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(_n,qt,Ee){var Me;if(gap="",indent="",typeof Ee=="number")for(Me=0;Me<Ee;Me+=1)indent+=" ";else typeof Ee=="string"&&(indent=Ee);if(rep=qt,qt&&typeof qt!="function"&&(typeof qt!="object"||typeof qt.length!="number"))throw new Error("JSON.stringify");return str("",{"":_n})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(_n,qt){var Ee,Me,me=_n[qt];if(me&&typeof me=="object")for(Ee in me)Object.prototype.hasOwnProperty.call(me,Ee)&&(Me=walk(me,Ee),Me!==void 0?me[Ee]=Me:delete me[Ee]);return reviver.call(_n,qt,me)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(_n){return"\\u"+("0000"+_n.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},19637:function(_n,qt,Ee){var Me=Ee(67039),me=Me.slice,Be=Me.pluck,ke=Me.each,Ce=Me.bind,Le=Me.create,he=Me.isList,ye=Me.isFunction,xe=Me.isObject;_n.exports={createStore:ve};var ge={version:"2.0.12",enabled:!1,get:function(de,ce){var z=this.storage.read(this._namespacePrefix+de);return this._deserialize(z,ce)},set:function(de,ce){return ce===void 0?this.remove(de):(this.storage.write(this._namespacePrefix+de,this._serialize(ce)),ce)},remove:function(de){this.storage.remove(this._namespacePrefix+de)},each:function(de){var ce=this;this.storage.each(function(z,ee){de.call(ce,ce._deserialize(z),(ee||"").replace(ce._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(de){return this._namespacePrefix=="__storejs_"+de+"_"},createStore:function(){return ve.apply(this,arguments)},addPlugin:function(de){this._addPlugin(de)},namespace:function(de){return ve(this.storage,this.plugins,de)}};function le(){var de=typeof console=="undefined"?null:console;if(de){var ce=de.warn?de.warn:de.log;ce.apply(de,arguments)}}function ve(de,ce,z){z||(z=""),de&&!he(de)&&(de=[de]),ce&&!he(ce)&&(ce=[ce]);var ee=z?"__storejs_"+z+"_":"",oe=z?new RegExp("^"+ee):null,ie=/^[a-zA-Z0-9_\-]*$/;if(!ie.test(z))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var se={_namespacePrefix:ee,_namespaceRegexp:oe,_testStorage:function(Se){try{var we="__storejs__test__";Se.write(we,we);var Pe=Se.read(we)===we;return Se.remove(we),Pe}catch(Ae){return!1}},_assignPluginFnProp:function(Se,we){var Pe=this[we];this[we]=function(){var De=me(arguments,0),ze=this;function Ze(){if(Pe)return ke(arguments,function(Ge,ft){De[ft]=Ge}),Pe.apply(ze,De)}var Xe=[Ze].concat(De);return Se.apply(ze,Xe)}},_serialize:function(Se){return JSON.stringify(Se)},_deserialize:function(Se,we){if(!Se)return we;var Pe="";try{Pe=JSON.parse(Se)}catch(Ae){Pe=Se}return Pe!==void 0?Pe:we},_addStorage:function(Se){this.enabled||this._testStorage(Se)&&(this.storage=Se,this.enabled=!0)},_addPlugin:function(Se){var we=this;if(he(Se)){ke(Se,function(De){we._addPlugin(De)});return}var Pe=Be(this.plugins,function(De){return Se===De});if(!Pe){if(this.plugins.push(Se),!ye(Se))throw new Error("Plugins must be function values that return objects");var Ae=Se.call(this);if(!xe(Ae))throw new Error("Plugins must return an object of function properties");ke(Ae,function(De,ze){if(!ye(De))throw new Error("Bad plugin property: "+ze+" from plugin "+Se.name+". Plugins should only return functions.");we._assignPluginFnProp(De,ze)})}},addStorage:function(Se){le("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(Se)}},ue=Le(se,ge,{plugins:[]});return ue.raw={},ke(ue,function(Se,we){ye(Se)&&(ue.raw[we]=Ce(ue,Se))}),ke(de,function(Se){ue._addStorage(Se)}),ke(ce,function(Se){ue._addPlugin(Se)}),ue}},67039:function(_n,qt,Ee){var Me=Ce(),me=Le(),Be=he(),ke=typeof window!="undefined"?window:Ee.g;_n.exports={assign:Me,create:me,trim:Be,bind:ye,slice:xe,each:ge,map:le,pluck:ve,isList:de,isFunction:ce,isObject:z,Global:ke};function Ce(){return Object.assign?Object.assign:function(oe,ie,se,ue){for(var Se=1;Se<arguments.length;Se++)ge(Object(arguments[Se]),function(we,Pe){oe[Pe]=we});return oe}}function Le(){if(Object.create)return function(ie,se,ue,Se){var we=xe(arguments,1);return Me.apply(this,[Object.create(ie)].concat(we))};{let oe=function(){};var ee=oe;return function(se,ue,Se,we){var Pe=xe(arguments,1);return oe.prototype=se,Me.apply(this,[new oe].concat(Pe))}}}function he(){return String.prototype.trim?function(oe){return String.prototype.trim.call(oe)}:function(oe){return oe.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function ye(ee,oe){return function(){return oe.apply(ee,Array.prototype.slice.call(arguments,0))}}function xe(ee,oe){return Array.prototype.slice.call(ee,oe||0)}function ge(ee,oe){ve(ee,function(ie,se){return oe(ie,se),!1})}function le(ee,oe){var ie=de(ee)?[]:{};return ve(ee,function(se,ue){return ie[ue]=oe(se,ue),!1}),ie}function ve(ee,oe){if(de(ee)){for(var ie=0;ie<ee.length;ie++)if(oe(ee[ie],ie))return ee[ie]}else for(var se in ee)if(ee.hasOwnProperty(se)&&oe(ee[se],se))return ee[se]}function de(ee){return ee!=null&&typeof ee!="function"&&typeof ee.length=="number"}function ce(ee){return ee&&{}.toString.call(ee)==="[object Function]"}function z(ee){return ee&&{}.toString.call(ee)==="[object Object]"}},97573:function(_n,qt,Ee){_n.exports=[Ee(52496),Ee(16436),Ee(76673),Ee(35701),Ee(65578),Ee(65300)]},35701:function(_n,qt,Ee){var Me=Ee(67039),me=Me.Global,Be=Me.trim;_n.exports={name:"cookieStorage",read:Ce,write:he,each:Le,remove:ye,clearAll:xe};var ke=me.document;function Ce(le){if(!le||!ge(le))return null;var ve="(?:^|.*;\\s*)"+escape(le).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(ke.cookie.replace(new RegExp(ve),"$1"))}function Le(le){for(var ve=ke.cookie.split(/; ?/g),de=ve.length-1;de>=0;de--)if(Be(ve[de])){var ce=ve[de].split("="),z=unescape(ce[0]),ee=unescape(ce[1]);le(ee,z)}}function he(le,ve){le&&(ke.cookie=escape(le)+"="+escape(ve)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function ye(le){!le||!ge(le)||(ke.cookie=escape(le)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function xe(){Le(function(le,ve){ye(ve)})}function ge(le){return new RegExp("(?:^|;\\s*)"+escape(le).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(ke.cookie)}},52496:function(_n,qt,Ee){var Me=Ee(67039),me=Me.Global;_n.exports={name:"localStorage",read:ke,write:Ce,each:Le,remove:he,clearAll:ye};function Be(){return me.localStorage}function ke(xe){return Be().getItem(xe)}function Ce(xe,ge){return Be().setItem(xe,ge)}function Le(xe){for(var ge=Be().length-1;ge>=0;ge--){var le=Be().key(ge);xe(ke(le),le)}}function he(xe){return Be().removeItem(xe)}function ye(){return Be().clear()}},65300:function(_n){_n.exports={name:"memoryStorage",read:Ee,write:Me,each:me,remove:Be,clearAll:ke};var qt={};function Ee(Ce){return qt[Ce]}function Me(Ce,Le){qt[Ce]=Le}function me(Ce){for(var Le in qt)qt.hasOwnProperty(Le)&&Ce(qt[Le],Le)}function Be(Ce){delete qt[Ce]}function ke(Ce){qt={}}},16436:function(_n,qt,Ee){var Me=Ee(67039),me=Me.Global;_n.exports={name:"oldFF-globalStorage",read:ke,write:Ce,each:Le,remove:he,clearAll:ye};var Be=me.globalStorage;function ke(xe){return Be[xe]}function Ce(xe,ge){Be[xe]=ge}function Le(xe){for(var ge=Be.length-1;ge>=0;ge--){var le=Be.key(ge);xe(Be[le],le)}}function he(xe){return Be.removeItem(xe)}function ye(){Le(function(xe,ge){delete Be[xe]})}},76673:function(_n,qt,Ee){var Me=Ee(67039),me=Me.Global;_n.exports={name:"oldIE-userDataStorage",write:he,read:ye,each:xe,remove:ge,clearAll:le};var Be="storejs",ke=me.document,Ce=ce(),Le=(me.navigator?me.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function he(z,ee){if(!Le){var oe=de(z);Ce(function(ie){ie.setAttribute(oe,ee),ie.save(Be)})}}function ye(z){if(!Le){var ee=de(z),oe=null;return Ce(function(ie){oe=ie.getAttribute(ee)}),oe}}function xe(z){Ce(function(ee){for(var oe=ee.XMLDocument.documentElement.attributes,ie=oe.length-1;ie>=0;ie--){var se=oe[ie];z(ee.getAttribute(se.name),se.name)}})}function ge(z){var ee=de(z);Ce(function(oe){oe.removeAttribute(ee),oe.save(Be)})}function le(){Ce(function(z){var ee=z.XMLDocument.documentElement.attributes;z.load(Be);for(var oe=ee.length-1;oe>=0;oe--)z.removeAttribute(ee[oe].name);z.save(Be)})}var ve=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function de(z){return z.replace(/^\d/,"___$&").replace(ve,"___")}function ce(){if(!ke||!ke.documentElement||!ke.documentElement.addBehavior)return null;var z="script",ee,oe,ie;try{oe=new ActiveXObject("htmlfile"),oe.open(),oe.write("<"+z+">document.w=window</"+z+'><iframe src="/favicon.ico"></iframe>'),oe.close(),ee=oe.w.frames[0].document,ie=ee.createElement("div")}catch(se){ie=ke.createElement("div"),ee=ke.body}return function(se){var ue=[].slice.call(arguments,0);ue.unshift(ie),ee.appendChild(ie),ie.addBehavior("#default#userData"),ie.load(Be),se.apply(this,ue),ee.removeChild(ie)}}},65578:function(_n,qt,Ee){var Me=Ee(67039),me=Me.Global;_n.exports={name:"sessionStorage",read:ke,write:Ce,each:Le,remove:he,clearAll:ye};function Be(){return me.sessionStorage}function ke(xe){return Be().getItem(xe)}function Ce(xe,ge){return Be().setItem(xe,ge)}function Le(xe){for(var ge=Be().length-1;ge>=0;ge--){var le=Be().key(ge);xe(ke(le),le)}}function he(xe){return Be().removeItem(xe)}function ye(){return Be().clear()}},82059:function(_n){var qt=arguments[3],Ee=arguments[4],Me=arguments[5],me=JSON.stringify;_n.exports=function(Be,ke){for(var Ce,Le=Object.keys(Me),he=0,ye=Le.length;he<ye;he++){var xe=Le[he],ge=Me[xe].exports;if(ge===Be||ge&&ge.default===Be){Ce=xe;break}}if(!Ce){Ce=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var le={},he=0,ye=Le.length;he<ye;he++){var xe=Le[he];le[xe]=xe}Ee[Ce]=["function(require,module,exports){"+Be+"(self); }",le]}var ve=Math.floor(Math.pow(16,8)*Math.random()).toString(16),de={};de[Ce]=Ce,Ee[ve]=["function(require,module,exports){var f = require("+me(Ce)+");(f.default ? f.default : f)(self);}",de];var ce={};z(ve);function z(Se){ce[Se]=!0;for(var we in Ee[Se][1]){var Pe=Ee[Se][1][we];ce[Pe]||z(Pe)}}var ee="("+qt+")({"+Object.keys(ce).map(function(Se){return me(Se)+":["+Ee[Se][0]+","+me(Ee[Se][1])+"]"}).join(",")+"},{},["+me(ve)+"])",oe=window.URL||window.webkitURL||window.mozURL||window.msURL,ie=new Blob([ee],{type:"text/javascript"});if(ke&&ke.bare)return ie;var se=oe.createObjectURL(ie),ue=new Worker(se);return ue.objectURL=se,ue}},34376:function(_n){(function(qt,Ee){if(1)_n.exports=Ee();else var Me,me})(window,function(){return function(qt){var Ee={};function Me(me){if(Ee[me])return Ee[me].exports;var Be=Ee[me]={i:me,l:!1,exports:{}};return qt[me].call(Be.exports,Be,Be.exports,Me),Be.l=!0,Be.exports}return Me.m=qt,Me.c=Ee,Me.d=function(me,Be,ke){Me.o(me,Be)||Object.defineProperty(me,Be,{enumerable:!0,get:ke})},Me.r=function(me){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(me,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(me,"__esModule",{value:!0})},Me.t=function(me,Be){if(1&Be&&(me=Me(me)),8&Be||4&Be&&typeof me=="object"&&me&&me.__esModule)return me;var ke=Object.create(null);if(Me.r(ke),Object.defineProperty(ke,"default",{enumerable:!0,value:me}),2&Be&&typeof me!="string")for(var Ce in me)Me.d(ke,Ce,function(Le){return me[Le]}.bind(null,Ce));return ke},Me.n=function(me){var Be=me&&me.__esModule?function(){return me.default}:function(){return me};return Me.d(Be,"a",Be),Be},Me.o=function(me,Be){return Object.prototype.hasOwnProperty.call(me,Be)},Me.p="",Me(Me.s=34)}([function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.forwardEvent=Ee.EventEmitter=void 0;var me=function(){function Be(){this._listeners=[],this._disposed=!1}return Object.defineProperty(Be.prototype,"event",{get:function(){var ke=this;return this._event||(this._event=function(Ce){return ke._listeners.push(Ce),{dispose:function(){if(!ke._disposed){for(var Le=0;Le<ke._listeners.length;Le++)if(ke._listeners[Le]===Ce)return void ke._listeners.splice(Le,1)}}}}),this._event},enumerable:!1,configurable:!0}),Be.prototype.fire=function(ke,Ce){for(var Le=[],he=0;he<this._listeners.length;he++)Le.push(this._listeners[he]);for(he=0;he<Le.length;he++)Le[he].call(void 0,ke,Ce)},Be.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},Be}();Ee.EventEmitter=me,Ee.forwardEvent=function(Be,ke){return Be(function(Ce){return ke.fire(Ce)})}},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.IUnicodeService=Ee.IOptionsService=Ee.ILogService=Ee.IInstantiationService=Ee.IDirtyRowService=Ee.ICharsetService=Ee.ICoreService=Ee.ICoreMouseService=Ee.IBufferService=void 0;var me=Me(14);Ee.IBufferService=me.createDecorator("BufferService"),Ee.ICoreMouseService=me.createDecorator("CoreMouseService"),Ee.ICoreService=me.createDecorator("CoreService"),Ee.ICharsetService=me.createDecorator("CharsetService"),Ee.IDirtyRowService=me.createDecorator("DirtyRowService"),Ee.IInstantiationService=me.createDecorator("InstantiationService"),Ee.ILogService=me.createDecorator("LogService"),Ee.IOptionsService=me.createDecorator("OptionsService"),Ee.IUnicodeService=me.createDecorator("UnicodeService")},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.getDisposeArrayDisposable=Ee.disposeArray=Ee.Disposable=void 0;var me=function(){function ke(){this._disposables=[],this._isDisposed=!1}return ke.prototype.dispose=function(){this._isDisposed=!0;for(var Ce=0,Le=this._disposables;Ce<Le.length;Ce++)Le[Ce].dispose();this._disposables.length=0},ke.prototype.register=function(Ce){return this._disposables.push(Ce),Ce},ke.prototype.unregister=function(Ce){var Le=this._disposables.indexOf(Ce);Le!==-1&&this._disposables.splice(Le,1)},ke}();function Be(ke){for(var Ce=0,Le=ke;Ce<Le.length;Ce++)Le[Ce].dispose();ke.length=0}Ee.Disposable=me,Ee.disposeArray=Be,Ee.getDisposeArrayDisposable=function(ke){return{dispose:function(){return Be(ke)}}}},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.WHITESPACE_CELL_CODE=Ee.WHITESPACE_CELL_WIDTH=Ee.WHITESPACE_CELL_CHAR=Ee.NULL_CELL_CODE=Ee.NULL_CELL_WIDTH=Ee.NULL_CELL_CHAR=Ee.CHAR_DATA_CODE_INDEX=Ee.CHAR_DATA_WIDTH_INDEX=Ee.CHAR_DATA_CHAR_INDEX=Ee.CHAR_DATA_ATTR_INDEX=Ee.DEFAULT_ATTR=Ee.DEFAULT_COLOR=void 0,Ee.DEFAULT_COLOR=256,Ee.DEFAULT_ATTR=256|Ee.DEFAULT_COLOR<<9,Ee.CHAR_DATA_ATTR_INDEX=0,Ee.CHAR_DATA_CHAR_INDEX=1,Ee.CHAR_DATA_WIDTH_INDEX=2,Ee.CHAR_DATA_CODE_INDEX=3,Ee.NULL_CELL_CHAR="",Ee.NULL_CELL_WIDTH=1,Ee.NULL_CELL_CODE=0,Ee.WHITESPACE_CELL_CHAR=" ",Ee.WHITESPACE_CELL_WIDTH=1,Ee.WHITESPACE_CELL_CODE=32},function(qt,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(ye,xe){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ge,le){ge.__proto__=le}||function(ge,le){for(var ve in le)le.hasOwnProperty(ve)&&(ge[ve]=le[ve])})(ye,xe)},function(ye,xe){function ge(){this.constructor=ye}me(ye,xe),ye.prototype=xe===null?Object.create(xe):(ge.prototype=xe.prototype,new ge)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CellData=void 0;var ke=Me(8),Ce=Me(3),Le=Me(6),he=function(ye){function xe(){var ge=ye!==null&&ye.apply(this,arguments)||this;return ge.content=0,ge.fg=0,ge.bg=0,ge.extended=new Le.ExtendedAttrs,ge.combinedData="",ge}return Be(xe,ye),xe.fromCharData=function(ge){var le=new xe;return le.setFromCharData(ge),le},xe.prototype.isCombined=function(){return 2097152&this.content},xe.prototype.getWidth=function(){return this.content>>22},xe.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?ke.stringFromCodePoint(2097151&this.content):""},xe.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},xe.prototype.setFromCharData=function(ge){this.fg=ge[Ce.CHAR_DATA_ATTR_INDEX],this.bg=0;var le=!1;if(ge[Ce.CHAR_DATA_CHAR_INDEX].length>2)le=!0;else if(ge[Ce.CHAR_DATA_CHAR_INDEX].length===2){var ve=ge[Ce.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=ve&&ve<=56319){var de=ge[Ce.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=de&&de<=57343?this.content=1024*(ve-55296)+de-56320+65536|ge[Ce.CHAR_DATA_WIDTH_INDEX]<<22:le=!0}else le=!0}else this.content=ge[Ce.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|ge[Ce.CHAR_DATA_WIDTH_INDEX]<<22;le&&(this.combinedData=ge[Ce.CHAR_DATA_CHAR_INDEX],this.content=2097152|ge[Ce.CHAR_DATA_WIDTH_INDEX]<<22)},xe.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},xe}(Le.AttributeData);Ee.CellData=he},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.ISoundService=Ee.ISelectionService=Ee.IRenderService=Ee.IMouseService=Ee.ICoreBrowserService=Ee.ICharSizeService=void 0;var me=Me(14);Ee.ICharSizeService=me.createDecorator("CharSizeService"),Ee.ICoreBrowserService=me.createDecorator("CoreBrowserService"),Ee.IMouseService=me.createDecorator("MouseService"),Ee.IRenderService=me.createDecorator("RenderService"),Ee.ISelectionService=me.createDecorator("SelectionService"),Ee.ISoundService=me.createDecorator("SoundService")},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.ExtendedAttrs=Ee.AttributeData=void 0;var me=function(){function ke(){this.fg=0,this.bg=0,this.extended=new Be}return ke.toColorRGB=function(Ce){return[Ce>>>16&255,Ce>>>8&255,255&Ce]},ke.fromColorRGB=function(Ce){return(255&Ce[0])<<16|(255&Ce[1])<<8|255&Ce[2]},ke.prototype.clone=function(){var Ce=new ke;return Ce.fg=this.fg,Ce.bg=this.bg,Ce.extended=this.extended.clone(),Ce},ke.prototype.isInverse=function(){return 67108864&this.fg},ke.prototype.isBold=function(){return 134217728&this.fg},ke.prototype.isUnderline=function(){return 268435456&this.fg},ke.prototype.isBlink=function(){return 536870912&this.fg},ke.prototype.isInvisible=function(){return 1073741824&this.fg},ke.prototype.isItalic=function(){return 67108864&this.bg},ke.prototype.isDim=function(){return 134217728&this.bg},ke.prototype.getFgColorMode=function(){return 50331648&this.fg},ke.prototype.getBgColorMode=function(){return 50331648&this.bg},ke.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},ke.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},ke.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},ke.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},ke.prototype.isFgDefault=function(){return(50331648&this.fg)==0},ke.prototype.isBgDefault=function(){return(50331648&this.bg)==0},ke.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},ke.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},ke.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},ke.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},ke.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},ke.prototype.getUnderlineColor=function(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()},ke.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},ke.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},ke.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},ke.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},ke.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},ke}();Ee.AttributeData=me;var Be=function(){function ke(Ce,Le){Ce===void 0&&(Ce=0),Le===void 0&&(Le=-1),this.underlineStyle=Ce,this.underlineColor=Le}return ke.prototype.clone=function(){return new ke(this.underlineStyle,this.underlineColor)},ke.prototype.isEmpty=function(){return this.underlineStyle===0},ke}();Ee.ExtendedAttrs=Be},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.addDisposableDomListener=void 0,Ee.addDisposableDomListener=function(me,Be,ke,Ce){me.addEventListener(Be,ke,Ce);var Le=!1;return{dispose:function(){Le||(Le=!0,me.removeEventListener(Be,ke,Ce))}}}},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Utf8ToUtf32=Ee.StringToUtf32=Ee.utf32ToString=Ee.stringFromCodePoint=void 0,Ee.stringFromCodePoint=function(ke){return ke>65535?(ke-=65536,String.fromCharCode(55296+(ke>>10))+String.fromCharCode(ke%1024+56320)):String.fromCharCode(ke)},Ee.utf32ToString=function(ke,Ce,Le){Ce===void 0&&(Ce=0),Le===void 0&&(Le=ke.length);for(var he="",ye=Ce;ye<Le;++ye){var xe=ke[ye];xe>65535?(xe-=65536,he+=String.fromCharCode(55296+(xe>>10))+String.fromCharCode(xe%1024+56320)):he+=String.fromCharCode(xe)}return he};var me=function(){function ke(){this._interim=0}return ke.prototype.clear=function(){this._interim=0},ke.prototype.decode=function(Ce,Le){var he=Ce.length;if(!he)return 0;var ye=0,xe=0;this._interim&&(56320<=(ve=Ce.charCodeAt(xe++))&&ve<=57343?Le[ye++]=1024*(this._interim-55296)+ve-56320+65536:(Le[ye++]=this._interim,Le[ye++]=ve),this._interim=0);for(var ge=xe;ge<he;++ge){var le=Ce.charCodeAt(ge);if(55296<=le&&le<=56319){if(++ge>=he)return this._interim=le,ye;var ve;56320<=(ve=Ce.charCodeAt(ge))&&ve<=57343?Le[ye++]=1024*(le-55296)+ve-56320+65536:(Le[ye++]=le,Le[ye++]=ve)}else Le[ye++]=le}return ye},ke}();Ee.StringToUtf32=me;var Be=function(){function ke(){this.interim=new Uint8Array(3)}return ke.prototype.clear=function(){this.interim.fill(0)},ke.prototype.decode=function(Ce,Le){var he=Ce.length;if(!he)return 0;var ye,xe,ge,le,ve=0,de=0,ce=0;if(this.interim[0]){var z=!1,ee=this.interim[0];ee&=(224&ee)==192?31:(240&ee)==224?15:7;for(var oe=0,ie=void 0;(ie=63&this.interim[++oe])&&oe<4;)ee<<=6,ee|=ie;for(var se=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,ue=se-oe;ce<ue;){if(ce>=he)return 0;if((192&(ie=Ce[ce++]))!=128){ce--,z=!0;break}this.interim[oe++]=ie,ee<<=6,ee|=63&ie}z||(se===2?ee<128?ce--:Le[ve++]=ee:se===3?ee<2048||ee>=55296&&ee<=57343||(Le[ve++]=ee):ee<65536||ee>1114111||(Le[ve++]=ee)),this.interim.fill(0)}for(var Se=he-4,we=ce;we<he;){for(;!(!(we<Se)||128&(ye=Ce[we])||128&(xe=Ce[we+1])||128&(ge=Ce[we+2])||128&(le=Ce[we+3]));)Le[ve++]=ye,Le[ve++]=xe,Le[ve++]=ge,Le[ve++]=le,we+=4;if((ye=Ce[we++])<128)Le[ve++]=ye;else if((224&ye)==192){if(we>=he)return this.interim[0]=ye,ve;if((192&(xe=Ce[we++]))!=128){we--;continue}if((de=(31&ye)<<6|63&xe)<128){we--;continue}Le[ve++]=de}else if((240&ye)==224){if(we>=he)return this.interim[0]=ye,ve;if((192&(xe=Ce[we++]))!=128){we--;continue}if(we>=he)return this.interim[0]=ye,this.interim[1]=xe,ve;if((192&(ge=Ce[we++]))!=128){we--;continue}if((de=(15&ye)<<12|(63&xe)<<6|63&ge)<2048||de>=55296&&de<=57343)continue;Le[ve++]=de}else if((248&ye)==240){if(we>=he)return this.interim[0]=ye,ve;if((192&(xe=Ce[we++]))!=128){we--;continue}if(we>=he)return this.interim[0]=ye,this.interim[1]=xe,ve;if((192&(ge=Ce[we++]))!=128){we--;continue}if(we>=he)return this.interim[0]=ye,this.interim[1]=xe,this.interim[2]=ge,ve;if((192&(le=Ce[we++]))!=128){we--;continue}if((de=(7&ye)<<18|(63&xe)<<12|(63&ge)<<6|63&le)<65536||de>1114111)continue;Le[ve++]=de}}return ve},ke}();Ee.Utf8ToUtf32=Be},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CHAR_ATLAS_CELL_SPACING=Ee.DIM_OPACITY=Ee.INVERTED_DEFAULT_COLOR=void 0,Ee.INVERTED_DEFAULT_COLOR=257,Ee.DIM_OPACITY=.5,Ee.CHAR_ATLAS_CELL_SPACING=1},function(qt,Ee,Me){"use strict";var me,Be,ke,Ce;function Le(ye){var xe=ye.toString(16);return xe.length<2?"0"+xe:xe}function he(ye,xe){return ye<xe?(xe+.05)/(ye+.05):(ye+.05)/(xe+.05)}Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.contrastRatio=Ee.toPaddedHex=Ee.rgba=Ee.rgb=Ee.css=Ee.color=Ee.channels=void 0,function(ye){ye.toCss=function(xe,ge,le,ve){return ve!==void 0?"#"+Le(xe)+Le(ge)+Le(le)+Le(ve):"#"+Le(xe)+Le(ge)+Le(le)},ye.toRgba=function(xe,ge,le,ve){return ve===void 0&&(ve=255),(xe<<24|ge<<16|le<<8|ve)>>>0}}(me=Ee.channels||(Ee.channels={})),(Be=Ee.color||(Ee.color={})).blend=function(ye,xe){var ge=(255&xe.rgba)/255;if(ge===1)return{css:xe.css,rgba:xe.rgba};var le=xe.rgba>>24&255,ve=xe.rgba>>16&255,de=xe.rgba>>8&255,ce=ye.rgba>>24&255,z=ye.rgba>>16&255,ee=ye.rgba>>8&255,oe=ce+Math.round((le-ce)*ge),ie=z+Math.round((ve-z)*ge),se=ee+Math.round((de-ee)*ge);return{css:me.toCss(oe,ie,se),rgba:me.toRgba(oe,ie,se)}},Be.isOpaque=function(ye){return(255&ye.rgba)==255},Be.ensureContrastRatio=function(ye,xe,ge){var le=Ce.ensureContrastRatio(ye.rgba,xe.rgba,ge);if(le)return Ce.toColor(le>>24&255,le>>16&255,le>>8&255)},Be.opaque=function(ye){var xe=(255|ye.rgba)>>>0,ge=Ce.toChannels(xe),le=ge[0],ve=ge[1],de=ge[2];return{css:me.toCss(le,ve,de),rgba:xe}},Be.opacity=function(ye,xe){var ge=Math.round(255*xe),le=Ce.toChannels(ye.rgba),ve=le[0],de=le[1],ce=le[2];return{css:me.toCss(ve,de,ce,ge),rgba:me.toRgba(ve,de,ce,ge)}},(Ee.css||(Ee.css={})).toColor=function(ye){switch(ye.length){case 7:return{css:ye,rgba:(parseInt(ye.slice(1),16)<<8|255)>>>0};case 9:return{css:ye,rgba:parseInt(ye.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(ye){function xe(ge,le,ve){var de=ge/255,ce=le/255,z=ve/255;return .2126*(de<=.03928?de/12.92:Math.pow((de+.055)/1.055,2.4))+.7152*(ce<=.03928?ce/12.92:Math.pow((ce+.055)/1.055,2.4))+.0722*(z<=.03928?z/12.92:Math.pow((z+.055)/1.055,2.4))}ye.relativeLuminance=function(ge){return xe(ge>>16&255,ge>>8&255,255&ge)},ye.relativeLuminance2=xe}(ke=Ee.rgb||(Ee.rgb={})),function(ye){function xe(le,ve,de){for(var ce=le>>24&255,z=le>>16&255,ee=le>>8&255,oe=ve>>24&255,ie=ve>>16&255,se=ve>>8&255,ue=he(ke.relativeLuminance2(oe,se,ie),ke.relativeLuminance2(ce,z,ee));ue<de&&(oe>0||ie>0||se>0);)oe-=Math.max(0,Math.ceil(.1*oe)),ie-=Math.max(0,Math.ceil(.1*ie)),se-=Math.max(0,Math.ceil(.1*se)),ue=he(ke.relativeLuminance2(oe,se,ie),ke.relativeLuminance2(ce,z,ee));return(oe<<24|ie<<16|se<<8|255)>>>0}function ge(le,ve,de){for(var ce=le>>24&255,z=le>>16&255,ee=le>>8&255,oe=ve>>24&255,ie=ve>>16&255,se=ve>>8&255,ue=he(ke.relativeLuminance2(oe,se,ie),ke.relativeLuminance2(ce,z,ee));ue<de&&(oe<255||ie<255||se<255);)oe=Math.min(255,oe+Math.ceil(.1*(255-oe))),ie=Math.min(255,ie+Math.ceil(.1*(255-ie))),se=Math.min(255,se+Math.ceil(.1*(255-se))),ue=he(ke.relativeLuminance2(oe,se,ie),ke.relativeLuminance2(ce,z,ee));return(oe<<24|ie<<16|se<<8|255)>>>0}ye.ensureContrastRatio=function(le,ve,de){var ce=ke.relativeLuminance(le>>8),z=ke.relativeLuminance(ve>>8);if(he(ce,z)<de)return z<ce?xe(le,ve,de):ge(le,ve,de)},ye.reduceLuminance=xe,ye.increaseLuminance=ge,ye.toChannels=function(le){return[le>>24&255,le>>16&255,le>>8&255,255&le]},ye.toColor=function(le,ve,de){return{css:me.toCss(le,ve,de),rgba:me.toRgba(le,ve,de)}}}(Ce=Ee.rgba||(Ee.rgba={})),Ee.toPaddedHex=Le,Ee.contrastRatio=he},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.isLinux=Ee.isWindows=Ee.isIphone=Ee.isIpad=Ee.isMac=Ee.isSafari=Ee.isFirefox=void 0;var me=typeof navigator=="undefined",Be=me?"node":navigator.userAgent,ke=me?"node":navigator.platform;function Ce(Le,he){return Le.indexOf(he)>=0}Ee.isFirefox=!!~Be.indexOf("Firefox"),Ee.isSafari=/^((?!chrome|android).)*safari/i.test(Be),Ee.isMac=Ce(["Macintosh","MacIntel","MacPPC","Mac68K"],ke),Ee.isIpad=ke==="iPad",Ee.isIphone=ke==="iPhone",Ee.isWindows=Ce(["Windows","Win16","Win32","WinCE"],ke),Ee.isLinux=ke.indexOf("Linux")>=0},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.C1=Ee.C0=void 0,function(me){me.NUL="\0",me.SOH="",me.STX="",me.ETX="",me.EOT="",me.ENQ="",me.ACK="",me.BEL="\x07",me.BS="\b",me.HT=" ",me.LF=`
|
|
|
`,me.VT="\v",me.FF="\f",me.CR="\r",me.SO="",me.SI="",me.DLE="",me.DC1="",me.DC2="",me.DC3="",me.DC4="",me.NAK="",me.SYN="",me.ETB="",me.CAN="",me.EM="",me.SUB="",me.ESC="\x1B",me.FS="",me.GS="",me.RS="",me.US="",me.SP=" ",me.DEL="\x7F"}(Ee.C0||(Ee.C0={})),function(me){me.PAD="\x80",me.HOP="\x81",me.BPH="\x82",me.NBH="\x83",me.IND="\x84",me.NEL="\x85",me.SSA="\x86",me.ESA="\x87",me.HTS="\x88",me.HTJ="\x89",me.VTS="\x8A",me.PLD="\x8B",me.PLU="\x8C",me.RI="\x8D",me.SS2="\x8E",me.SS3="\x8F",me.DCS="\x90",me.PU1="\x91",me.PU2="\x92",me.STS="\x93",me.CCH="\x94",me.MW="\x95",me.SPA="\x96",me.EPA="\x97",me.SOS="\x98",me.SGCI="\x99",me.SCI="\x9A",me.CSI="\x9B",me.ST="\x9C",me.OSC="\x9D",me.PM="\x9E",me.APC="\x9F"}(Ee.C1||(Ee.C1={}))},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BaseRenderLayer=void 0;var me=Me(3),Be=Me(9),ke=Me(25),Ce=Me(6),Le=Me(28),he=Me(10),ye=Me(17),xe=function(){function ge(le,ve,de,ce,z,ee,oe,ie){this._container=le,this._alpha=ce,this._colors=z,this._rendererId=ee,this._bufferService=oe,this._optionsService=ie,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+ve+"-layer"),this._canvas.style.zIndex=de.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return ge.prototype.dispose=function(){var le;ye.removeElementFromParent(this._canvas),(le=this._charAtlas)===null||le===void 0||le.dispose()},ge.prototype._initCanvas=function(){this._ctx=Le.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},ge.prototype.onOptionsChanged=function(){},ge.prototype.onBlur=function(){},ge.prototype.onFocus=function(){},ge.prototype.onCursorMove=function(){},ge.prototype.onGridChanged=function(le,ve){},ge.prototype.onSelectionChanged=function(le,ve,de){de===void 0&&(de=!1)},ge.prototype.setColors=function(le){this._refreshCharAtlas(le)},ge.prototype._setTransparency=function(le){if(le!==this._alpha){var ve=this._canvas;this._alpha=le,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,ve),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},ge.prototype._refreshCharAtlas=function(le){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=ke.acquireCharAtlas(this._optionsService.options,this._rendererId,le,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},ge.prototype.resize=function(le){this._scaledCellWidth=le.scaledCellWidth,this._scaledCellHeight=le.scaledCellHeight,this._scaledCharWidth=le.scaledCharWidth,this._scaledCharHeight=le.scaledCharHeight,this._scaledCharLeft=le.scaledCharLeft,this._scaledCharTop=le.scaledCharTop,this._canvas.width=le.scaledCanvasWidth,this._canvas.height=le.scaledCanvasHeight,this._canvas.style.width=le.canvasWidth+"px",this._canvas.style.height=le.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},ge.prototype._fillCells=function(le,ve,de,ce){this._ctx.fillRect(le*this._scaledCellWidth,ve*this._scaledCellHeight,de*this._scaledCellWidth,ce*this._scaledCellHeight)},ge.prototype._fillBottomLineAtCells=function(le,ve,de){de===void 0&&(de=1),this._ctx.fillRect(le*this._scaledCellWidth,(ve+1)*this._scaledCellHeight-window.devicePixelRatio-1,de*this._scaledCellWidth,window.devicePixelRatio)},ge.prototype._fillLeftLineAtCell=function(le,ve,de){this._ctx.fillRect(le*this._scaledCellWidth,ve*this._scaledCellHeight,window.devicePixelRatio*de,this._scaledCellHeight)},ge.prototype._strokeRectAtCell=function(le,ve,de,ce){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(le*this._scaledCellWidth+window.devicePixelRatio/2,ve*this._scaledCellHeight+window.devicePixelRatio/2,de*this._scaledCellWidth-window.devicePixelRatio,ce*this._scaledCellHeight-window.devicePixelRatio)},ge.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},ge.prototype._clearCells=function(le,ve,de,ce){this._alpha?this._ctx.clearRect(le*this._scaledCellWidth,ve*this._scaledCellHeight,de*this._scaledCellWidth,ce*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(le*this._scaledCellWidth,ve*this._scaledCellHeight,de*this._scaledCellWidth,ce*this._scaledCellHeight))},ge.prototype._fillCharTrueColor=function(le,ve,de){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(de),this._ctx.fillText(le.getChars(),ve*this._scaledCellWidth+this._scaledCharLeft,de*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},ge.prototype._drawChars=function(le,ve,de){var ce,z,ee=this._getContrastColor(le);ee||le.isFgRGB()||le.isBgRGB()?this._drawUncachedChars(le,ve,de,ee):(le.isInverse()?(ce=le.isBgDefault()?Be.INVERTED_DEFAULT_COLOR:le.getBgColor(),z=le.isFgDefault()?Be.INVERTED_DEFAULT_COLOR:le.getFgColor()):(z=le.isBgDefault()?me.DEFAULT_COLOR:le.getBgColor(),ce=le.isFgDefault()?me.DEFAULT_COLOR:le.getFgColor()),ce+=this._optionsService.options.drawBoldTextInBrightColors&&le.isBold()&&ce<8?8:0,this._currentGlyphIdentifier.chars=le.getChars()||me.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=le.getCode()||me.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=z,this._currentGlyphIdentifier.fg=ce,this._currentGlyphIdentifier.bold=!!le.isBold(),this._currentGlyphIdentifier.dim=!!le.isDim(),this._currentGlyphIdentifier.italic=!!le.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,ve*this._scaledCellWidth+this._scaledCharLeft,de*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(le,ve,de))},ge.prototype._drawUncachedChars=function(le,ve,de,ce){if(this._ctx.save(),this._ctx.font=this._getFont(!!le.isBold(),!!le.isItalic()),this._ctx.textBaseline="middle",le.isInverse())if(ce)this._ctx.fillStyle=ce.css;else if(le.isBgDefault())this._ctx.fillStyle=he.color.opaque(this._colors.background).css;else if(le.isBgRGB())this._ctx.fillStyle="rgb("+Ce.AttributeData.toColorRGB(le.getBgColor()).join(",")+")";else{var z=le.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&le.isBold()&&z<8&&(z+=8),this._ctx.fillStyle=this._colors.ansi[z].css}else if(ce)this._ctx.fillStyle=ce.css;else if(le.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(le.isFgRGB())this._ctx.fillStyle="rgb("+Ce.AttributeData.toColorRGB(le.getFgColor()).join(",")+")";else{var ee=le.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&le.isBold()&&ee<8&&(ee+=8),this._ctx.fillStyle=this._colors.ansi[ee].css}this._clipRow(de),le.isDim()&&(this._ctx.globalAlpha=Be.DIM_OPACITY),this._ctx.fillText(le.getChars(),ve*this._scaledCellWidth+this._scaledCharLeft,de*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},ge.prototype._clipRow=function(le){this._ctx.beginPath(),this._ctx.rect(0,le*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},ge.prototype._getFont=function(le,ve){return(ve?"italic":"")+" "+(le?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},ge.prototype._getContrastColor=function(le){if(this._optionsService.options.minimumContrastRatio!==1){var ve=this._colors.contrastCache.getColor(le.bg,le.fg);if(ve!==void 0)return ve||void 0;var de=le.getFgColor(),ce=le.getFgColorMode(),z=le.getBgColor(),ee=le.getBgColorMode(),oe=!!le.isInverse(),ie=!!le.isInverse();if(oe){var se=de;de=z,z=se;var ue=ce;ce=ee,ee=ue}var Se=this._resolveBackgroundRgba(ee,z,oe),we=this._resolveForegroundRgba(ce,de,oe,ie),Pe=he.rgba.ensureContrastRatio(Se,we,this._optionsService.options.minimumContrastRatio);if(Pe){var Ae={css:he.channels.toCss(Pe>>24&255,Pe>>16&255,Pe>>8&255),rgba:Pe};return this._colors.contrastCache.setColor(le.bg,le.fg,Ae),Ae}this._colors.contrastCache.setColor(le.bg,le.fg,null)}},ge.prototype._resolveBackgroundRgba=function(le,ve,de){switch(le){case 16777216:case 33554432:return this._colors.ansi[ve].rgba;case 50331648:return ve<<8;case 0:default:return de?this._colors.foreground.rgba:this._colors.background.rgba}},ge.prototype._resolveForegroundRgba=function(le,ve,de,ce){switch(le){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&ce&&ve<8&&(ve+=8),this._colors.ansi[ve].rgba;case 50331648:return ve<<8;case 0:default:return de?this._colors.background.rgba:this._colors.foreground.rgba}},ge}();Ee.BaseRenderLayer=xe},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.createDecorator=Ee.getServiceDependencies=Ee.serviceRegistry=void 0;function me(Be,ke,Ce){ke.di$target===ke?ke.di$dependencies.push({id:Be,index:Ce}):(ke.di$dependencies=[{id:Be,index:Ce}],ke.di$target=ke)}Ee.serviceRegistry=new Map,Ee.getServiceDependencies=function(Be){return Be.di$dependencies||[]},Ee.createDecorator=function(Be){if(Ee.serviceRegistry.has(Be))return Ee.serviceRegistry.get(Be);var ke=function(Ce,Le,he){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");me(ke,Ce,he)};return ke.toString=function(){return Be},Ee.serviceRegistry.set(Be,ke),ke}},function(qt,Ee,Me){"use strict";function me(Be,ke,Ce,Le){if(Ce===void 0&&(Ce=0),Le===void 0&&(Le=Be.length),Ce>=Be.length)return Be;Ce=(Be.length+Ce)%Be.length,Le=Le>=Be.length?Be.length:(Be.length+Le)%Be.length;for(var he=Ce;he<Le;++he)Be[he]=ke;return Be}Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.concat=Ee.fillFallback=Ee.fill=void 0,Ee.fill=function(Be,ke,Ce,Le){return Be.fill?Be.fill(ke,Ce,Le):me(Be,ke,Ce,Le)},Ee.fillFallback=me,Ee.concat=function(Be,ke){var Ce=new Be.constructor(Be.length+ke.length);return Ce.set(Be),Ce.set(ke,Be.length),Ce}},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BufferLine=Ee.DEFAULT_ATTR_DATA=void 0;var me=Me(8),Be=Me(3),ke=Me(4),Ce=Me(6);Ee.DEFAULT_ATTR_DATA=Object.freeze(new Ce.AttributeData);var Le=function(){function he(ye,xe,ge){ge===void 0&&(ge=!1),this.isWrapped=ge,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*ye);for(var le=xe||ke.CellData.fromCharData([0,Be.NULL_CELL_CHAR,Be.NULL_CELL_WIDTH,Be.NULL_CELL_CODE]),ve=0;ve<ye;++ve)this.setCell(ve,le);this.length=ye}return he.prototype.get=function(ye){var xe=this._data[3*ye+0],ge=2097151&xe;return[this._data[3*ye+1],2097152&xe?this._combined[ye]:ge?me.stringFromCodePoint(ge):"",xe>>22,2097152&xe?this._combined[ye].charCodeAt(this._combined[ye].length-1):ge]},he.prototype.set=function(ye,xe){this._data[3*ye+1]=xe[Be.CHAR_DATA_ATTR_INDEX],xe[Be.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[ye]=xe[1],this._data[3*ye+0]=2097152|ye|xe[Be.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*ye+0]=xe[Be.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|xe[Be.CHAR_DATA_WIDTH_INDEX]<<22},he.prototype.getWidth=function(ye){return this._data[3*ye+0]>>22},he.prototype.hasWidth=function(ye){return 12582912&this._data[3*ye+0]},he.prototype.getFg=function(ye){return this._data[3*ye+1]},he.prototype.getBg=function(ye){return this._data[3*ye+2]},he.prototype.hasContent=function(ye){return 4194303&this._data[3*ye+0]},he.prototype.getCodePoint=function(ye){var xe=this._data[3*ye+0];return 2097152&xe?this._combined[ye].charCodeAt(this._combined[ye].length-1):2097151&xe},he.prototype.isCombined=function(ye){return 2097152&this._data[3*ye+0]},he.prototype.getString=function(ye){var xe=this._data[3*ye+0];return 2097152&xe?this._combined[ye]:2097151&xe?me.stringFromCodePoint(2097151&xe):""},he.prototype.loadCell=function(ye,xe){var ge=3*ye;return xe.content=this._data[ge+0],xe.fg=this._data[ge+1],xe.bg=this._data[ge+2],2097152&xe.content&&(xe.combinedData=this._combined[ye]),268435456&xe.bg&&(xe.extended=this._extendedAttrs[ye]),xe},he.prototype.setCell=function(ye,xe){2097152&xe.content&&(this._combined[ye]=xe.combinedData),268435456&xe.bg&&(this._extendedAttrs[ye]=xe.extended),this._data[3*ye+0]=xe.content,this._data[3*ye+1]=xe.fg,this._data[3*ye+2]=xe.bg},he.prototype.setCellFromCodePoint=function(ye,xe,ge,le,ve,de){268435456&ve&&(this._extendedAttrs[ye]=de),this._data[3*ye+0]=xe|ge<<22,this._data[3*ye+1]=le,this._data[3*ye+2]=ve},he.prototype.addCodepointToCell=function(ye,xe){var ge=this._data[3*ye+0];2097152&ge?this._combined[ye]+=me.stringFromCodePoint(xe):(2097151&ge?(this._combined[ye]=me.stringFromCodePoint(2097151&ge)+me.stringFromCodePoint(xe),ge&=-2097152,ge|=2097152):ge=xe|1<<22,this._data[3*ye+0]=ge)},he.prototype.insertCells=function(ye,xe,ge,le){if((ye%=this.length)&&this.getWidth(ye-1)===2&&this.setCellFromCodePoint(ye-1,0,1,(le==null?void 0:le.fg)||0,(le==null?void 0:le.bg)||0,(le==null?void 0:le.extended)||new Ce.ExtendedAttrs),xe<this.length-ye){for(var ve=new ke.CellData,de=this.length-ye-xe-1;de>=0;--de)this.setCell(ye+xe+de,this.loadCell(ye+de,ve));for(de=0;de<xe;++de)this.setCell(ye+de,ge)}else for(de=ye;de<this.length;++de)this.setCell(de,ge);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(le==null?void 0:le.fg)||0,(le==null?void 0:le.bg)||0,(le==null?void 0:le.extended)||new Ce.ExtendedAttrs)},he.prototype.deleteCells=function(ye,xe,ge,le){if(ye%=this.length,xe<this.length-ye){for(var ve=new ke.CellData,de=0;de<this.length-ye-xe;++de)this.setCell(ye+de,this.loadCell(ye+xe+de,ve));for(de=this.length-xe;de<this.length;++de)this.setCell(de,ge)}else for(de=ye;de<this.length;++de)this.setCell(de,ge);ye&&this.getWidth(ye-1)===2&&this.setCellFromCodePoint(ye-1,0,1,(le==null?void 0:le.fg)||0,(le==null?void 0:le.bg)||0,(le==null?void 0:le.extended)||new Ce.ExtendedAttrs),this.getWidth(ye)!==0||this.hasContent(ye)||this.setCellFromCodePoint(ye,0,1,(le==null?void 0:le.fg)||0,(le==null?void 0:le.bg)||0,(le==null?void 0:le.extended)||new Ce.ExtendedAttrs)},he.prototype.replaceCells=function(ye,xe,ge,le){for(ye&&this.getWidth(ye-1)===2&&this.setCellFromCodePoint(ye-1,0,1,(le==null?void 0:le.fg)||0,(le==null?void 0:le.bg)||0,(le==null?void 0:le.extended)||new Ce.ExtendedAttrs),xe<this.length&&this.getWidth(xe-1)===2&&this.setCellFromCodePoint(xe,0,1,(le==null?void 0:le.fg)||0,(le==null?void 0:le.bg)||0,(le==null?void 0:le.extended)||new Ce.ExtendedAttrs);ye<xe&&ye<this.length;)this.setCell(ye++,ge)},he.prototype.resize=function(ye,xe){if(ye!==this.length){if(ye>this.length){var ge=new Uint32Array(3*ye);this.length&&(3*ye<this._data.length?ge.set(this._data.subarray(0,3*ye)):ge.set(this._data)),this._data=ge;for(var le=this.length;le<ye;++le)this.setCell(le,xe)}else if(ye){(ge=new Uint32Array(3*ye)).set(this._data.subarray(0,3*ye)),this._data=ge;var ve=Object.keys(this._combined);for(le=0;le<ve.length;le++){var de=parseInt(ve[le],10);de>=ye&&delete this._combined[de]}}else this._data=new Uint32Array(0),this._combined={};this.length=ye}},he.prototype.fill=function(ye){this._combined={},this._extendedAttrs={};for(var xe=0;xe<this.length;++xe)this.setCell(xe,ye)},he.prototype.copyFrom=function(ye){for(var xe in this.length!==ye.length?this._data=new Uint32Array(ye._data):this._data.set(ye._data),this.length=ye.length,this._combined={},ye._combined)this._combined[xe]=ye._combined[xe];for(var xe in this._extendedAttrs={},ye._extendedAttrs)this._extendedAttrs[xe]=ye._extendedAttrs[xe];this.isWrapped=ye.isWrapped},he.prototype.clone=function(){var ye=new he(0);for(var xe in ye._data=new Uint32Array(this._data),ye.length=this.length,this._combined)ye._combined[xe]=this._combined[xe];for(var xe in this._extendedAttrs)ye._extendedAttrs[xe]=this._extendedAttrs[xe];return ye.isWrapped=this.isWrapped,ye},he.prototype.getTrimmedLength=function(){for(var ye=this.length-1;ye>=0;--ye)if(4194303&this._data[3*ye+0])return ye+(this._data[3*ye+0]>>22);return 0},he.prototype.copyCellsFrom=function(ye,xe,ge,le,ve){var de=ye._data;if(ve)for(var ce=le-1;ce>=0;ce--)for(var z=0;z<3;z++)this._data[3*(ge+ce)+z]=de[3*(xe+ce)+z];else for(ce=0;ce<le;ce++)for(z=0;z<3;z++)this._data[3*(ge+ce)+z]=de[3*(xe+ce)+z];var ee=Object.keys(ye._combined);for(z=0;z<ee.length;z++){var oe=parseInt(ee[z],10);oe>=xe&&(this._combined[oe-xe+ge]=ye._combined[oe])}},he.prototype.translateToString=function(ye,xe,ge){ye===void 0&&(ye=!1),xe===void 0&&(xe=0),ge===void 0&&(ge=this.length),ye&&(ge=Math.min(ge,this.getTrimmedLength()));for(var le="";xe<ge;){var ve=this._data[3*xe+0],de=2097151&ve;le+=2097152&ve?this._combined[xe]:de?me.stringFromCodePoint(de):Be.WHITESPACE_CELL_CHAR,xe+=ve>>22||1}return le},he}();Ee.BufferLine=Le},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.removeElementFromParent=void 0,Ee.removeElementFromParent=function(){for(var me,Be=[],ke=0;ke<arguments.length;ke++)Be[ke]=arguments[ke];for(var Ce=0,Le=Be;Ce<Le.length;Ce++){var he=Le[Ce];(me=he==null?void 0:he.parentElement)===null||me===void 0||me.removeChild(he)}}},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.tooMuchOutput=Ee.promptLabel=void 0,Ee.promptLabel="Terminal input",Ee.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},function(qt,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(we,Pe){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ae,De){Ae.__proto__=De}||function(Ae,De){for(var ze in De)De.hasOwnProperty(ze)&&(Ae[ze]=De[ze])})(we,Pe)},function(we,Pe){function Ae(){this.constructor=we}me(we,Pe),we.prototype=Pe===null?Object.create(Pe):(Ae.prototype=Pe.prototype,new Ae)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.InputHandler=Ee.WindowsOptionsReportType=void 0;var ke,Ce=Me(12),Le=Me(20),he=Me(39),ye=Me(2),xe=Me(15),ge=Me(8),le=Me(16),ve=Me(0),de=Me(3),ce=Me(4),z=Me(6),ee=Me(22),oe=Me(24),ie={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function se(we,Pe){if(we>24)return Pe.setWinLines||!1;switch(we){case 1:return!!Pe.restoreWin;case 2:return!!Pe.minimizeWin;case 3:return!!Pe.setWinPosition;case 4:return!!Pe.setWinSizePixels;case 5:return!!Pe.raiseWin;case 6:return!!Pe.lowerWin;case 7:return!!Pe.refreshWin;case 8:return!!Pe.setWinSizeChars;case 9:return!!Pe.maximizeWin;case 10:return!!Pe.fullscreenWin;case 11:return!!Pe.getWinState;case 13:return!!Pe.getWinPosition;case 14:return!!Pe.getWinSizePixels;case 15:return!!Pe.getScreenSizePixels;case 16:return!!Pe.getCellSizePixels;case 18:return!!Pe.getWinSizeChars;case 19:return!!Pe.getScreenSizeChars;case 20:return!!Pe.getIconTitle;case 21:return!!Pe.getWinTitle;case 22:return!!Pe.pushTitle;case 23:return!!Pe.popTitle;case 24:return!!Pe.setWinLines}return!1}(function(we){we[we.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",we[we.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(ke=Ee.WindowsOptionsReportType||(Ee.WindowsOptionsReportType={}));var ue=function(){function we(Pe,Ae,De,ze){this._bufferService=Pe,this._coreService=Ae,this._logService=De,this._optionsService=ze,this._data=new Uint32Array(0)}return we.prototype.hook=function(Pe){this._data=new Uint32Array(0)},we.prototype.put=function(Pe,Ae,De){this._data=xe.concat(this._data,Pe.subarray(Ae,De))},we.prototype.unhook=function(Pe){if(Pe){var Ae=ge.utf32ToString(this._data);switch(this._data=new Uint32Array(0),Ae){case'"q':return this._coreService.triggerDataEvent(Ce.C0.ESC+'P1$r0"q'+Ce.C0.ESC+"\\");case'"p':return this._coreService.triggerDataEvent(Ce.C0.ESC+'P1$r61;1"p'+Ce.C0.ESC+"\\");case"r":var De=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(Ce.C0.ESC+"P1$r"+De+Ce.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(Ce.C0.ESC+"P1$r0m"+Ce.C0.ESC+"\\");case" q":var ze={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];return ze-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(Ce.C0.ESC+"P1$r"+ze+" q"+Ce.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",Ae),this._coreService.triggerDataEvent(Ce.C0.ESC+"P0$r"+Ce.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},we}(),Se=function(we){function Pe(Ae,De,ze,Ze,Xe,Ge,ft,at,Ct){Ct===void 0&&(Ct=new he.EscapeSequenceParser);var et=we.call(this)||this;et._bufferService=Ae,et._charsetService=De,et._coreService=ze,et._dirtyRowService=Ze,et._logService=Xe,et._optionsService=Ge,et._coreMouseService=ft,et._unicodeService=at,et._parser=Ct,et._parseBuffer=new Uint32Array(4096),et._stringDecoder=new ge.StringToUtf32,et._utf8Decoder=new ge.Utf8ToUtf32,et._workCell=new ce.CellData,et._windowTitle="",et._iconName="",et._windowTitleStack=[],et._iconNameStack=[],et._curAttrData=le.DEFAULT_ATTR_DATA.clone(),et._eraseAttrDataInternal=le.DEFAULT_ATTR_DATA.clone(),et._onRequestBell=new ve.EventEmitter,et._onRequestRefreshRows=new ve.EventEmitter,et._onRequestReset=new ve.EventEmitter,et._onRequestScroll=new ve.EventEmitter,et._onRequestSyncScrollBar=new ve.EventEmitter,et._onRequestWindowsOptionsReport=new ve.EventEmitter,et._onA11yChar=new ve.EventEmitter,et._onA11yTab=new ve.EventEmitter,et._onCursorMove=new ve.EventEmitter,et._onLineFeed=new ve.EventEmitter,et._onScroll=new ve.EventEmitter,et._onTitleChange=new ve.EventEmitter,et.register(et._parser),et._parser.setCsiHandlerFallback(function(lt,tt){et._logService.debug("Unknown CSI code: ",{identifier:et._parser.identToString(lt),params:tt.toArray()})}),et._parser.setEscHandlerFallback(function(lt){et._logService.debug("Unknown ESC code: ",{identifier:et._parser.identToString(lt)})}),et._parser.setExecuteHandlerFallback(function(lt){et._logService.debug("Unknown EXECUTE code: ",{code:lt})}),et._parser.setOscHandlerFallback(function(lt,tt,ut){et._logService.debug("Unknown OSC code: ",{identifier:lt,action:tt,data:ut})}),et._parser.setDcsHandlerFallback(function(lt,tt,ut){tt==="HOOK"&&(ut=ut.toArray()),et._logService.debug("Unknown DCS code: ",{identifier:et._parser.identToString(lt),action:tt,payload:ut})}),et._parser.setPrintHandler(function(lt,tt,ut){return et.print(lt,tt,ut)}),et._parser.setCsiHandler({final:"@"},function(lt){return et.insertChars(lt)}),et._parser.setCsiHandler({intermediates:" ",final:"@"},function(lt){return et.scrollLeft(lt)}),et._parser.setCsiHandler({final:"A"},function(lt){return et.cursorUp(lt)}),et._parser.setCsiHandler({intermediates:" ",final:"A"},function(lt){return et.scrollRight(lt)}),et._parser.setCsiHandler({final:"B"},function(lt){return et.cursorDown(lt)}),et._parser.setCsiHandler({final:"C"},function(lt){return et.cursorForward(lt)}),et._parser.setCsiHandler({final:"D"},function(lt){return et.cursorBackward(lt)}),et._parser.setCsiHandler({final:"E"},function(lt){return et.cursorNextLine(lt)}),et._parser.setCsiHandler({final:"F"},function(lt){return et.cursorPrecedingLine(lt)}),et._parser.setCsiHandler({final:"G"},function(lt){return et.cursorCharAbsolute(lt)}),et._parser.setCsiHandler({final:"H"},function(lt){return et.cursorPosition(lt)}),et._parser.setCsiHandler({final:"I"},function(lt){return et.cursorForwardTab(lt)}),et._parser.setCsiHandler({final:"J"},function(lt){return et.eraseInDisplay(lt)}),et._parser.setCsiHandler({prefix:"?",final:"J"},function(lt){return et.eraseInDisplay(lt)}),et._parser.setCsiHandler({final:"K"},function(lt){return et.eraseInLine(lt)}),et._parser.setCsiHandler({prefix:"?",final:"K"},function(lt){return et.eraseInLine(lt)}),et._parser.setCsiHandler({final:"L"},function(lt){return et.insertLines(lt)}),et._parser.setCsiHandler({final:"M"},function(lt){return et.deleteLines(lt)}),et._parser.setCsiHandler({final:"P"},function(lt){return et.deleteChars(lt)}),et._parser.setCsiHandler({final:"S"},function(lt){return et.scrollUp(lt)}),et._parser.setCsiHandler({final:"T"},function(lt){return et.scrollDown(lt)}),et._parser.setCsiHandler({final:"X"},function(lt){return et.eraseChars(lt)}),et._parser.setCsiHandler({final:"Z"},function(lt){return et.cursorBackwardTab(lt)}),et._parser.setCsiHandler({final:"`"},function(lt){return et.charPosAbsolute(lt)}),et._parser.setCsiHandler({final:"a"},function(lt){return et.hPositionRelative(lt)}),et._parser.setCsiHandler({final:"b"},function(lt){return et.repeatPrecedingCharacter(lt)}),et._parser.setCsiHandler({final:"c"},function(lt){return et.sendDeviceAttributesPrimary(lt)}),et._parser.setCsiHandler({prefix:">",final:"c"},function(lt){return et.sendDeviceAttributesSecondary(lt)}),et._parser.setCsiHandler({final:"d"},function(lt){return et.linePosAbsolute(lt)}),et._parser.setCsiHandler({final:"e"},function(lt){return et.vPositionRelative(lt)}),et._parser.setCsiHandler({final:"f"},function(lt){return et.hVPosition(lt)}),et._parser.setCsiHandler({final:"g"},function(lt){return et.tabClear(lt)}),et._parser.setCsiHandler({final:"h"},function(lt){return et.setMode(lt)}),et._parser.setCsiHandler({prefix:"?",final:"h"},function(lt){return et.setModePrivate(lt)}),et._parser.setCsiHandler({final:"l"},function(lt){return et.resetMode(lt)}),et._parser.setCsiHandler({prefix:"?",final:"l"},function(lt){return et.resetModePrivate(lt)}),et._parser.setCsiHandler({final:"m"},function(lt){return et.charAttributes(lt)}),et._parser.setCsiHandler({final:"n"},function(lt){return et.deviceStatus(lt)}),et._parser.setCsiHandler({prefix:"?",final:"n"},function(lt){return et.deviceStatusPrivate(lt)}),et._parser.setCsiHandler({intermediates:"!",final:"p"},function(lt){return et.softReset(lt)}),et._parser.setCsiHandler({intermediates:" ",final:"q"},function(lt){return et.setCursorStyle(lt)}),et._parser.setCsiHandler({final:"r"},function(lt){return et.setScrollRegion(lt)}),et._parser.setCsiHandler({final:"s"},function(lt){return et.saveCursor(lt)}),et._parser.setCsiHandler({final:"t"},function(lt){return et.windowOptions(lt)}),et._parser.setCsiHandler({final:"u"},function(lt){return et.restoreCursor(lt)}),et._parser.setCsiHandler({intermediates:"'",final:"}"},function(lt){return et.insertColumns(lt)}),et._parser.setCsiHandler({intermediates:"'",final:"~"},function(lt){return et.deleteColumns(lt)}),et._parser.setExecuteHandler(Ce.C0.BEL,function(){return et.bell()}),et._parser.setExecuteHandler(Ce.C0.LF,function(){return et.lineFeed()}),et._parser.setExecuteHandler(Ce.C0.VT,function(){return et.lineFeed()}),et._parser.setExecuteHandler(Ce.C0.FF,function(){return et.lineFeed()}),et._parser.setExecuteHandler(Ce.C0.CR,function(){return et.carriageReturn()}),et._parser.setExecuteHandler(Ce.C0.BS,function(){return et.backspace()}),et._parser.setExecuteHandler(Ce.C0.HT,function(){return et.tab()}),et._parser.setExecuteHandler(Ce.C0.SO,function(){return et.shiftOut()}),et._parser.setExecuteHandler(Ce.C0.SI,function(){return et.shiftIn()}),et._parser.setExecuteHandler(Ce.C1.IND,function(){return et.index()}),et._parser.setExecuteHandler(Ce.C1.NEL,function(){return et.nextLine()}),et._parser.setExecuteHandler(Ce.C1.HTS,function(){return et.tabSet()}),et._parser.setOscHandler(0,new ee.OscHandler(function(lt){et.setTitle(lt),et.setIconName(lt)})),et._parser.setOscHandler(1,new ee.OscHandler(function(lt){return et.setIconName(lt)})),et._parser.setOscHandler(2,new ee.OscHandler(function(lt){return et.setTitle(lt)})),et._parser.setEscHandler({final:"7"},function(){return et.saveCursor()}),et._parser.setEscHandler({final:"8"},function(){return et.restoreCursor()}),et._parser.setEscHandler({final:"D"},function(){return et.index()}),et._parser.setEscHandler({final:"E"},function(){return et.nextLine()}),et._parser.setEscHandler({final:"H"},function(){return et.tabSet()}),et._parser.setEscHandler({final:"M"},function(){return et.reverseIndex()}),et._parser.setEscHandler({final:"="},function(){return et.keypadApplicationMode()}),et._parser.setEscHandler({final:">"},function(){return et.keypadNumericMode()}),et._parser.setEscHandler({final:"c"},function(){return et.fullReset()}),et._parser.setEscHandler({final:"n"},function(){return et.setgLevel(2)}),et._parser.setEscHandler({final:"o"},function(){return et.setgLevel(3)}),et._parser.setEscHandler({final:"|"},function(){return et.setgLevel(3)}),et._parser.setEscHandler({final:"}"},function(){return et.setgLevel(2)}),et._parser.setEscHandler({final:"~"},function(){return et.setgLevel(1)}),et._parser.setEscHandler({intermediates:"%",final:"@"},function(){return et.selectDefaultCharset()}),et._parser.setEscHandler({intermediates:"%",final:"G"},function(){return et.selectDefaultCharset()});var yt=function(lt){st._parser.setEscHandler({intermediates:"(",final:lt},function(){return et.selectCharset("("+lt)}),st._parser.setEscHandler({intermediates:")",final:lt},function(){return et.selectCharset(")"+lt)}),st._parser.setEscHandler({intermediates:"*",final:lt},function(){return et.selectCharset("*"+lt)}),st._parser.setEscHandler({intermediates:"+",final:lt},function(){return et.selectCharset("+"+lt)}),st._parser.setEscHandler({intermediates:"-",final:lt},function(){return et.selectCharset("-"+lt)}),st._parser.setEscHandler({intermediates:".",final:lt},function(){return et.selectCharset("."+lt)}),st._parser.setEscHandler({intermediates:"/",final:lt},function(){return et.selectCharset("/"+lt)})},st=this;for(var zt in Le.CHARSETS)yt(zt);return et._parser.setEscHandler({intermediates:"#",final:"8"},function(){return et.screenAlignmentPattern()}),et._parser.setErrorHandler(function(lt){return et._logService.error("Parsing error: ",lt),lt}),et._parser.setDcsHandler({intermediates:"$",final:"q"},new ue(et._bufferService,et._coreService,et._logService,et._optionsService)),et}return Be(Pe,we),Object.defineProperty(Pe.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Pe.prototype.dispose=function(){we.prototype.dispose.call(this)},Pe.prototype.parse=function(Ae){var De=this._bufferService.buffer,ze=De.x,Ze=De.y;if(this._logService.debug("parsing data",Ae),this._parseBuffer.length<Ae.length&&this._parseBuffer.length<131072&&(this._parseBuffer=new Uint32Array(Math.min(Ae.length,131072))),this._dirtyRowService.clearRange(),Ae.length>131072)for(var Xe=0;Xe<Ae.length;Xe+=131072){var Ge=Xe+131072<Ae.length?Xe+131072:Ae.length,ft=typeof Ae=="string"?this._stringDecoder.decode(Ae.substring(Xe,Ge),this._parseBuffer):this._utf8Decoder.decode(Ae.subarray(Xe,Ge),this._parseBuffer);this._parser.parse(this._parseBuffer,ft)}else ft=typeof Ae=="string"?this._stringDecoder.decode(Ae,this._parseBuffer):this._utf8Decoder.decode(Ae,this._parseBuffer),this._parser.parse(this._parseBuffer,ft);(De=this._bufferService.buffer).x===ze&&De.y===Ze||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},Pe.prototype.print=function(Ae,De,ze){var Ze,Xe,Ge=this._bufferService.buffer,ft=this._charsetService.charset,at=this._optionsService.options.screenReaderMode,Ct=this._bufferService.cols,et=this._coreService.decPrivateModes.wraparound,yt=this._coreService.modes.insertMode,st=this._curAttrData,zt=Ge.lines.get(Ge.ybase+Ge.y);this._dirtyRowService.markDirty(Ge.y),Ge.x&&ze-De>0&&zt.getWidth(Ge.x-1)===2&&zt.setCellFromCodePoint(Ge.x-1,0,1,st.fg,st.bg,st.extended);for(var lt=De;lt<ze;++lt){if(Ze=Ae[lt],Xe=this._unicodeService.wcwidth(Ze),Ze<127&&ft){var tt=ft[String.fromCharCode(Ze)];tt&&(Ze=tt.charCodeAt(0))}if(at&&this._onA11yChar.fire(ge.stringFromCodePoint(Ze)),Xe||!Ge.x){if(Ge.x+Xe-1>=Ct){if(et){for(;Ge.x<Ct;)zt.setCellFromCodePoint(Ge.x++,0,1,st.fg,st.bg,st.extended);Ge.x=0,Ge.y++,Ge.y===Ge.scrollBottom+1?(Ge.y--,this._onRequestScroll.fire(this._eraseAttrData(),!0)):(Ge.y>=this._bufferService.rows&&(Ge.y=this._bufferService.rows-1),Ge.lines.get(Ge.ybase+Ge.y).isWrapped=!0),zt=Ge.lines.get(Ge.ybase+Ge.y)}else if(Ge.x=Ct-1,Xe===2)continue}if(yt&&(zt.insertCells(Ge.x,Xe,Ge.getNullCell(st),st),zt.getWidth(Ct-1)===2&&zt.setCellFromCodePoint(Ct-1,de.NULL_CELL_CODE,de.NULL_CELL_WIDTH,st.fg,st.bg,st.extended)),zt.setCellFromCodePoint(Ge.x++,Ze,Xe,st.fg,st.bg,st.extended),Xe>0)for(;--Xe;)zt.setCellFromCodePoint(Ge.x++,0,0,st.fg,st.bg,st.extended)}else zt.getWidth(Ge.x-1)?zt.addCodepointToCell(Ge.x-1,Ze):zt.addCodepointToCell(Ge.x-2,Ze)}ze-De>0&&(zt.loadCell(Ge.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),Ge.x<Ct&&ze-De>0&&zt.getWidth(Ge.x)===0&&!zt.hasContent(Ge.x)&&zt.setCellFromCodePoint(Ge.x,0,1,st.fg,st.bg,st.extended),this._dirtyRowService.markDirty(Ge.y)},Pe.prototype.addCsiHandler=function(Ae,De){var ze=this;return Ae.final!=="t"||Ae.prefix||Ae.intermediates?this._parser.addCsiHandler(Ae,De):this._parser.addCsiHandler(Ae,function(Ze){return!se(Ze.params[0],ze._optionsService.options.windowOptions)||De(Ze)})},Pe.prototype.addDcsHandler=function(Ae,De){return this._parser.addDcsHandler(Ae,new oe.DcsHandler(De))},Pe.prototype.addEscHandler=function(Ae,De){return this._parser.addEscHandler(Ae,De)},Pe.prototype.addOscHandler=function(Ae,De){return this._parser.addOscHandler(Ae,new ee.OscHandler(De))},Pe.prototype.bell=function(){this._onRequestBell.fire()},Pe.prototype.lineFeed=function(){var Ae=this._bufferService.buffer;this._dirtyRowService.markDirty(Ae.y),this._optionsService.options.convertEol&&(Ae.x=0),Ae.y++,Ae.y===Ae.scrollBottom+1?(Ae.y--,this._onRequestScroll.fire(this._eraseAttrData())):Ae.y>=this._bufferService.rows&&(Ae.y=this._bufferService.rows-1),Ae.x>=this._bufferService.cols&&Ae.x--,this._dirtyRowService.markDirty(Ae.y),this._onLineFeed.fire()},Pe.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},Pe.prototype.backspace=function(){var Ae,De=this._bufferService.buffer;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),void(De.x>0&&De.x--);if(this._restrictCursor(this._bufferService.cols),De.x>0)De.x--;else if(De.x===0&&De.y>De.scrollTop&&De.y<=De.scrollBottom&&(!((Ae=De.lines.get(De.ybase+De.y))===null||Ae===void 0)&&Ae.isWrapped)){De.lines.get(De.ybase+De.y).isWrapped=!1,De.y--,De.x=this._bufferService.cols-1;var ze=De.lines.get(De.ybase+De.y);ze.hasWidth(De.x)&&!ze.hasContent(De.x)&&De.x--}this._restrictCursor()},Pe.prototype.tab=function(){if(!(this._bufferService.buffer.x>=this._bufferService.cols)){var Ae=this._bufferService.buffer.x;this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._bufferService.buffer.x-Ae)}},Pe.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},Pe.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},Pe.prototype._restrictCursor=function(Ae){Ae===void 0&&(Ae=this._bufferService.cols-1),this._bufferService.buffer.x=Math.min(Ae,Math.max(0,this._bufferService.buffer.x)),this._bufferService.buffer.y=this._coreService.decPrivateModes.origin?Math.min(this._bufferService.buffer.scrollBottom,Math.max(this._bufferService.buffer.scrollTop,this._bufferService.buffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._bufferService.buffer.y)),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},Pe.prototype._setCursor=function(Ae,De){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=Ae,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+De):(this._bufferService.buffer.x=Ae,this._bufferService.buffer.y=De),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},Pe.prototype._moveCursor=function(Ae,De){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+Ae,this._bufferService.buffer.y+De)},Pe.prototype.cursorUp=function(Ae){var De=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;De>=0?this._moveCursor(0,-Math.min(De,Ae.params[0]||1)):this._moveCursor(0,-(Ae.params[0]||1))},Pe.prototype.cursorDown=function(Ae){var De=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;De>=0?this._moveCursor(0,Math.min(De,Ae.params[0]||1)):this._moveCursor(0,Ae.params[0]||1)},Pe.prototype.cursorForward=function(Ae){this._moveCursor(Ae.params[0]||1,0)},Pe.prototype.cursorBackward=function(Ae){this._moveCursor(-(Ae.params[0]||1),0)},Pe.prototype.cursorNextLine=function(Ae){this.cursorDown(Ae),this._bufferService.buffer.x=0},Pe.prototype.cursorPrecedingLine=function(Ae){this.cursorUp(Ae),this._bufferService.buffer.x=0},Pe.prototype.cursorCharAbsolute=function(Ae){this._setCursor((Ae.params[0]||1)-1,this._bufferService.buffer.y)},Pe.prototype.cursorPosition=function(Ae){this._setCursor(Ae.length>=2?(Ae.params[1]||1)-1:0,(Ae.params[0]||1)-1)},Pe.prototype.charPosAbsolute=function(Ae){this._setCursor((Ae.params[0]||1)-1,this._bufferService.buffer.y)},Pe.prototype.hPositionRelative=function(Ae){this._moveCursor(Ae.params[0]||1,0)},Pe.prototype.linePosAbsolute=function(Ae){this._setCursor(this._bufferService.buffer.x,(Ae.params[0]||1)-1)},Pe.prototype.vPositionRelative=function(Ae){this._moveCursor(0,Ae.params[0]||1)},Pe.prototype.hVPosition=function(Ae){this.cursorPosition(Ae)},Pe.prototype.tabClear=function(Ae){var De=Ae.params[0];De===0?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:De===3&&(this._bufferService.buffer.tabs={})},Pe.prototype.cursorForwardTab=function(Ae){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var De=Ae.params[0]||1;De--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},Pe.prototype.cursorBackwardTab=function(Ae){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var De=Ae.params[0]||1,ze=this._bufferService.buffer;De--;)ze.x=ze.prevStop()},Pe.prototype._eraseInBufferLine=function(Ae,De,ze,Ze){Ze===void 0&&(Ze=!1);var Xe=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+Ae);Xe.replaceCells(De,ze,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Ze&&(Xe.isWrapped=!1)},Pe.prototype._resetBufferLine=function(Ae){var De=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+Ae);De.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),De.isWrapped=!1},Pe.prototype.eraseInDisplay=function(Ae){var De;switch(this._restrictCursor(),Ae.params[0]){case 0:for(De=this._bufferService.buffer.y,this._dirtyRowService.markDirty(De),this._eraseInBufferLine(De++,this._bufferService.buffer.x,this._bufferService.cols,this._bufferService.buffer.x===0);De<this._bufferService.rows;De++)this._resetBufferLine(De);this._dirtyRowService.markDirty(De);break;case 1:for(De=this._bufferService.buffer.y,this._dirtyRowService.markDirty(De),this._eraseInBufferLine(De,0,this._bufferService.buffer.x+1,!0),this._bufferService.buffer.x+1>=this._bufferService.cols&&(this._bufferService.buffer.lines.get(De+1).isWrapped=!1);De--;)this._resetBufferLine(De);this._dirtyRowService.markDirty(0);break;case 2:for(De=this._bufferService.rows,this._dirtyRowService.markDirty(De-1);De--;)this._resetBufferLine(De);this._dirtyRowService.markDirty(0);break;case 3:var ze=this._bufferService.buffer.lines.length-this._bufferService.rows;ze>0&&(this._bufferService.buffer.lines.trimStart(ze),this._bufferService.buffer.ybase=Math.max(this._bufferService.buffer.ybase-ze,0),this._bufferService.buffer.ydisp=Math.max(this._bufferService.buffer.ydisp-ze,0),this._onScroll.fire(0))}},Pe.prototype.eraseInLine=function(Ae){switch(this._restrictCursor(),Ae.params[0]){case 0:this._eraseInBufferLine(this._bufferService.buffer.y,this._bufferService.buffer.x,this._bufferService.cols);break;case 1:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.buffer.x+1);break;case 2:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.cols)}this._dirtyRowService.markDirty(this._bufferService.buffer.y)},Pe.prototype.insertLines=function(Ae){this._restrictCursor();var De=Ae.params[0]||1,ze=this._bufferService.buffer;if(!(ze.y>ze.scrollBottom||ze.y<ze.scrollTop)){for(var Ze=ze.ybase+ze.y,Xe=this._bufferService.rows-1-ze.scrollBottom,Ge=this._bufferService.rows-1+ze.ybase-Xe+1;De--;)ze.lines.splice(Ge-1,1),ze.lines.splice(Ze,0,ze.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(ze.y,ze.scrollBottom),ze.x=0}},Pe.prototype.deleteLines=function(Ae){this._restrictCursor();var De=Ae.params[0]||1,ze=this._bufferService.buffer;if(!(ze.y>ze.scrollBottom||ze.y<ze.scrollTop)){var Ze,Xe=ze.ybase+ze.y;for(Ze=this._bufferService.rows-1-ze.scrollBottom,Ze=this._bufferService.rows-1+ze.ybase-Ze;De--;)ze.lines.splice(Xe,1),ze.lines.splice(Ze,0,ze.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(ze.y,ze.scrollBottom),ze.x=0}},Pe.prototype.insertChars=function(Ae){this._restrictCursor();var De=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);De&&(De.insertCells(this._bufferService.buffer.x,Ae.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},Pe.prototype.deleteChars=function(Ae){this._restrictCursor();var De=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);De&&(De.deleteCells(this._bufferService.buffer.x,Ae.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},Pe.prototype.scrollUp=function(Ae){for(var De=Ae.params[0]||1,ze=this._bufferService.buffer;De--;)ze.lines.splice(ze.ybase+ze.scrollTop,1),ze.lines.splice(ze.ybase+ze.scrollBottom,0,ze.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(ze.scrollTop,ze.scrollBottom)},Pe.prototype.scrollDown=function(Ae){for(var De=Ae.params[0]||1,ze=this._bufferService.buffer;De--;)ze.lines.splice(ze.ybase+ze.scrollBottom,1),ze.lines.splice(ze.ybase+ze.scrollTop,0,ze.getBlankLine(le.DEFAULT_ATTR_DATA));this._dirtyRowService.markRangeDirty(ze.scrollTop,ze.scrollBottom)},Pe.prototype.scrollLeft=function(Ae){var De=this._bufferService.buffer;if(!(De.y>De.scrollBottom||De.y<De.scrollTop)){for(var ze=Ae.params[0]||1,Ze=De.scrollTop;Ze<=De.scrollBottom;++Ze){var Xe=De.lines.get(De.ybase+Ze);Xe.deleteCells(0,ze,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Xe.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},Pe.prototype.scrollRight=function(Ae){var De=this._bufferService.buffer;if(!(De.y>De.scrollBottom||De.y<De.scrollTop)){for(var ze=Ae.params[0]||1,Ze=De.scrollTop;Ze<=De.scrollBottom;++Ze){var Xe=De.lines.get(De.ybase+Ze);Xe.insertCells(0,ze,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Xe.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},Pe.prototype.insertColumns=function(Ae){var De=this._bufferService.buffer;if(!(De.y>De.scrollBottom||De.y<De.scrollTop)){for(var ze=Ae.params[0]||1,Ze=De.scrollTop;Ze<=De.scrollBottom;++Ze){var Xe=this._bufferService.buffer.lines.get(De.ybase+Ze);Xe.insertCells(De.x,ze,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Xe.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},Pe.prototype.deleteColumns=function(Ae){var De=this._bufferService.buffer;if(!(De.y>De.scrollBottom||De.y<De.scrollTop)){for(var ze=Ae.params[0]||1,Ze=De.scrollTop;Ze<=De.scrollBottom;++Ze){var Xe=De.lines.get(De.ybase+Ze);Xe.deleteCells(De.x,ze,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Xe.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},Pe.prototype.eraseChars=function(Ae){this._restrictCursor();var De=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);De&&(De.replaceCells(this._bufferService.buffer.x,this._bufferService.buffer.x+(Ae.params[0]||1),this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},Pe.prototype.repeatPrecedingCharacter=function(Ae){if(this._parser.precedingCodepoint){for(var De=Ae.params[0]||1,ze=new Uint32Array(De),Ze=0;Ze<De;++Ze)ze[Ze]=this._parser.precedingCodepoint;this.print(ze,0,ze.length)}},Pe.prototype.sendDeviceAttributesPrimary=function(Ae){Ae.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(Ce.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(Ce.C0.ESC+"[?6c"))},Pe.prototype.sendDeviceAttributesSecondary=function(Ae){Ae.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(Ce.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(Ce.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(Ae.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(Ce.C0.ESC+"[>83;40003;0c"))},Pe.prototype._is=function(Ae){return(this._optionsService.options.termName+"").indexOf(Ae)===0},Pe.prototype.setMode=function(Ae){for(var De=0;De<Ae.length;De++)switch(Ae.params[De]){case 4:this._coreService.modes.insertMode=!0}},Pe.prototype.setModePrivate=function(Ae){for(var De=0;De<Ae.length;De++)switch(Ae.params[De]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,Le.DEFAULT_CHARSET),this._charsetService.setgCharset(1,Le.DEFAULT_CHARSET),this._charsetService.setgCharset(2,Le.DEFAULT_CHARSET),this._charsetService.setgCharset(3,Le.DEFAULT_CHARSET);break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0;break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}},Pe.prototype.resetMode=function(Ae){for(var De=0;De<Ae.length;De++)switch(Ae.params[De]){case 4:this._coreService.modes.insertMode=!1}},Pe.prototype.resetModePrivate=function(Ae){for(var De=0;De<Ae.length;De++)switch(Ae.params[De]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),Ae.params[De]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}},Pe.prototype._updateAttrColor=function(Ae,De,ze,Ze,Xe){return De===2?(Ae|=50331648,Ae&=-16777216,Ae|=z.AttributeData.fromColorRGB([ze,Ze,Xe])):De===5&&(Ae&=-50331904,Ae|=33554432|255&ze),Ae},Pe.prototype._extractColor=function(Ae,De,ze){var Ze=[0,0,-1,0,0,0],Xe=0,Ge=0;do{if(Ze[Ge+Xe]=Ae.params[De+Ge],Ae.hasSubParams(De+Ge)){var ft=Ae.getSubParams(De+Ge),at=0;do Ze[1]===5&&(Xe=1),Ze[Ge+at+1+Xe]=ft[at];while(++at<ft.length&&at+Ge+1+Xe<Ze.length);break}if(Ze[1]===5&&Ge+Xe>=2||Ze[1]===2&&Ge+Xe>=5)break;Ze[1]&&(Xe=1)}while(++Ge+De<Ae.length&&Ge+Xe<Ze.length);for(at=2;at<Ze.length;++at)Ze[at]===-1&&(Ze[at]=0);switch(Ze[0]){case 38:ze.fg=this._updateAttrColor(ze.fg,Ze[1],Ze[3],Ze[4],Ze[5]);break;case 48:ze.bg=this._updateAttrColor(ze.bg,Ze[1],Ze[3],Ze[4],Ze[5]);break;case 58:ze.extended=ze.extended.clone(),ze.extended.underlineColor=this._updateAttrColor(ze.extended.underlineColor,Ze[1],Ze[3],Ze[4],Ze[5])}return Ge},Pe.prototype._processUnderline=function(Ae,De){De.extended=De.extended.clone(),(!~Ae||Ae>5)&&(Ae=1),De.extended.underlineStyle=Ae,De.fg|=268435456,Ae===0&&(De.fg&=-268435457),De.updateExtended()},Pe.prototype.charAttributes=function(Ae){if(Ae.length===1&&Ae.params[0]===0)return this._curAttrData.fg=le.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=le.DEFAULT_ATTR_DATA.bg);for(var De,ze=Ae.length,Ze=this._curAttrData,Xe=0;Xe<ze;Xe++)(De=Ae.params[Xe])>=30&&De<=37?(Ze.fg&=-50331904,Ze.fg|=16777216|De-30):De>=40&&De<=47?(Ze.bg&=-50331904,Ze.bg|=16777216|De-40):De>=90&&De<=97?(Ze.fg&=-50331904,Ze.fg|=16777224|De-90):De>=100&&De<=107?(Ze.bg&=-50331904,Ze.bg|=16777224|De-100):De===0?(Ze.fg=le.DEFAULT_ATTR_DATA.fg,Ze.bg=le.DEFAULT_ATTR_DATA.bg):De===1?Ze.fg|=134217728:De===3?Ze.bg|=67108864:De===4?(Ze.fg|=268435456,this._processUnderline(Ae.hasSubParams(Xe)?Ae.getSubParams(Xe)[0]:1,Ze)):De===5?Ze.fg|=536870912:De===7?Ze.fg|=67108864:De===8?Ze.fg|=1073741824:De===2?Ze.bg|=134217728:De===21?this._processUnderline(2,Ze):De===22?(Ze.fg&=-134217729,Ze.bg&=-134217729):De===23?Ze.bg&=-67108865:De===24?Ze.fg&=-268435457:De===25?Ze.fg&=-536870913:De===27?Ze.fg&=-67108865:De===28?Ze.fg&=-1073741825:De===39?(Ze.fg&=-67108864,Ze.fg|=16777215&le.DEFAULT_ATTR_DATA.fg):De===49?(Ze.bg&=-67108864,Ze.bg|=16777215&le.DEFAULT_ATTR_DATA.bg):De===38||De===48||De===58?Xe+=this._extractColor(Ae,Xe,Ze):De===59?(Ze.extended=Ze.extended.clone(),Ze.extended.underlineColor=-1,Ze.updateExtended()):De===100?(Ze.fg&=-67108864,Ze.fg|=16777215&le.DEFAULT_ATTR_DATA.fg,Ze.bg&=-67108864,Ze.bg|=16777215&le.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",De)},Pe.prototype.deviceStatus=function(Ae){switch(Ae.params[0]){case 5:this._coreService.triggerDataEvent(Ce.C0.ESC+"[0n");break;case 6:var De=this._bufferService.buffer.y+1,ze=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(Ce.C0.ESC+"["+De+";"+ze+"R")}},Pe.prototype.deviceStatusPrivate=function(Ae){switch(Ae.params[0]){case 6:var De=this._bufferService.buffer.y+1,ze=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(Ce.C0.ESC+"[?"+De+";"+ze+"R")}},Pe.prototype.softReset=function(Ae){this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._bufferService.buffer.scrollTop=0,this._bufferService.buffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=le.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._bufferService.buffer.savedX=0,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1},Pe.prototype.setCursorStyle=function(Ae){var De=Ae.params[0]||1;switch(De){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}var ze=De%2==1;this._optionsService.options.cursorBlink=ze},Pe.prototype.setScrollRegion=function(Ae){var De,ze=Ae.params[0]||1;(Ae.length<2||(De=Ae.params[1])>this._bufferService.rows||De===0)&&(De=this._bufferService.rows),De>ze&&(this._bufferService.buffer.scrollTop=ze-1,this._bufferService.buffer.scrollBottom=De-1,this._setCursor(0,0))},Pe.prototype.windowOptions=function(Ae){if(se(Ae.params[0],this._optionsService.options.windowOptions)){var De=Ae.length>1?Ae.params[1]:0;switch(Ae.params[0]){case 14:De!==2&&this._onRequestWindowsOptionsReport.fire(ke.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(ke.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(Ce.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:De!==0&&De!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),De!==0&&De!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:De!==0&&De!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),De!==0&&De!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}}},Pe.prototype.saveCursor=function(Ae){this._bufferService.buffer.savedX=this._bufferService.buffer.x,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase+this._bufferService.buffer.y,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset},Pe.prototype.restoreCursor=function(Ae){this._bufferService.buffer.x=this._bufferService.buffer.savedX||0,this._bufferService.buffer.y=Math.max(this._bufferService.buffer.savedY-this._bufferService.buffer.ybase,0),this._curAttrData.fg=this._bufferService.buffer.savedCurAttrData.fg,this._curAttrData.bg=this._bufferService.buffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._bufferService.buffer.savedCharset&&(this._charsetService.charset=this._bufferService.buffer.savedCharset),this._restrictCursor()},Pe.prototype.setTitle=function(Ae){this._windowTitle=Ae,this._onTitleChange.fire(Ae)},Pe.prototype.setIconName=function(Ae){this._iconName=Ae},Pe.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},Pe.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},Pe.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},Pe.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,Le.DEFAULT_CHARSET)},Pe.prototype.selectCharset=function(Ae){Ae.length===2?Ae[0]!=="/"&&this._charsetService.setgCharset(ie[Ae[0]],Le.CHARSETS[Ae[1]]||Le.DEFAULT_CHARSET):this.selectDefaultCharset()},Pe.prototype.index=function(){this._restrictCursor();var Ae=this._bufferService.buffer;this._bufferService.buffer.y++,Ae.y===Ae.scrollBottom+1?(Ae.y--,this._onRequestScroll.fire(this._eraseAttrData())):Ae.y>=this._bufferService.rows&&(Ae.y=this._bufferService.rows-1),this._restrictCursor()},Pe.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},Pe.prototype.reverseIndex=function(){this._restrictCursor();var Ae=this._bufferService.buffer;if(Ae.y===Ae.scrollTop){var De=Ae.scrollBottom-Ae.scrollTop;Ae.lines.shiftElements(Ae.ybase+Ae.y,De,1),Ae.lines.set(Ae.ybase+Ae.y,Ae.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(Ae.scrollTop,Ae.scrollBottom)}else Ae.y--,this._restrictCursor()},Pe.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},Pe.prototype.reset=function(){this._curAttrData=le.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=le.DEFAULT_ATTR_DATA.clone()},Pe.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},Pe.prototype.setgLevel=function(Ae){this._charsetService.setgLevel(Ae)},Pe.prototype.screenAlignmentPattern=function(){var Ae=new ce.CellData;Ae.content=1<<22|69,Ae.fg=this._curAttrData.fg,Ae.bg=this._curAttrData.bg;var De=this._bufferService.buffer;this._setCursor(0,0);for(var ze=0;ze<this._bufferService.rows;++ze){var Ze=De.ybase+De.y+ze,Xe=De.lines.get(Ze);Xe&&(Xe.fill(Ae),Xe.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},Pe}(ye.Disposable);Ee.InputHandler=Se},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.DEFAULT_CHARSET=Ee.CHARSETS=void 0,Ee.CHARSETS={},Ee.DEFAULT_CHARSET=Ee.CHARSETS.B,Ee.CHARSETS[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"},Ee.CHARSETS.A={"#":"\xA3"},Ee.CHARSETS.B=void 0,Ee.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},Ee.CHARSETS.C=Ee.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},Ee.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},Ee.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},Ee.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},Ee.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},Ee.CHARSETS.E=Ee.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},Ee.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},Ee.CHARSETS.H=Ee.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},Ee.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Params=void 0;var me=function(){function Be(ke,Ce){if(ke===void 0&&(ke=32),Ce===void 0&&(Ce=32),this.maxLength=ke,this.maxSubParamsLength=Ce,Ce>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(ke),this.length=0,this._subParams=new Int32Array(Ce),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(ke),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return Be.fromArray=function(ke){var Ce=new Be;if(!ke.length)return Ce;for(var Le=ke[0]instanceof Array?1:0;Le<ke.length;++Le){var he=ke[Le];if(he instanceof Array)for(var ye=0;ye<he.length;++ye)Ce.addSubParam(he[ye]);else Ce.addParam(he)}return Ce},Be.prototype.clone=function(){var ke=new Be(this.maxLength,this.maxSubParamsLength);return ke.params.set(this.params),ke.length=this.length,ke._subParams.set(this._subParams),ke._subParamsLength=this._subParamsLength,ke._subParamsIdx.set(this._subParamsIdx),ke._rejectDigits=this._rejectDigits,ke._rejectSubDigits=this._rejectSubDigits,ke._digitIsSub=this._digitIsSub,ke},Be.prototype.toArray=function(){for(var ke=[],Ce=0;Ce<this.length;++Ce){ke.push(this.params[Ce]);var Le=this._subParamsIdx[Ce]>>8,he=255&this._subParamsIdx[Ce];he-Le>0&&ke.push(Array.prototype.slice.call(this._subParams,Le,he))}return ke},Be.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},Be.prototype.addParam=function(ke){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(ke<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=ke>2147483647?2147483647:ke}},Be.prototype.addSubParam=function(ke){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(ke<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=ke>2147483647?2147483647:ke,this._subParamsIdx[this.length-1]++}},Be.prototype.hasSubParams=function(ke){return(255&this._subParamsIdx[ke])-(this._subParamsIdx[ke]>>8)>0},Be.prototype.getSubParams=function(ke){var Ce=this._subParamsIdx[ke]>>8,Le=255&this._subParamsIdx[ke];return Le-Ce>0?this._subParams.subarray(Ce,Le):null},Be.prototype.getSubParamsAll=function(){for(var ke={},Ce=0;Ce<this.length;++Ce){var Le=this._subParamsIdx[Ce]>>8,he=255&this._subParamsIdx[Ce];he-Le>0&&(ke[Ce]=this._subParams.slice(Le,he))}return ke},Be.prototype.addDigit=function(ke){var Ce;if(!(this._rejectDigits||!(Ce=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var Le=this._digitIsSub?this._subParams:this.params,he=Le[Ce-1];Le[Ce-1]=~he?Math.min(10*he+ke,2147483647):ke}},Be}();Ee.Params=me},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.OscHandler=Ee.OscParser=void 0;var me=Me(23),Be=Me(8),ke=function(){function Le(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return Le.prototype.addHandler=function(he,ye){this._handlers[he]===void 0&&(this._handlers[he]=[]);var xe=this._handlers[he];return xe.push(ye),{dispose:function(){var ge=xe.indexOf(ye);ge!==-1&&xe.splice(ge,1)}}},Le.prototype.setHandler=function(he,ye){this._handlers[he]=[ye]},Le.prototype.clearHandler=function(he){this._handlers[he]&&delete this._handlers[he]},Le.prototype.setHandlerFallback=function(he){this._handlerFb=he},Le.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},Le.prototype.reset=function(){this._state===2&&this.end(!1),this._id=-1,this._state=0},Le.prototype._start=function(){var he=this._handlers[this._id];if(he)for(var ye=he.length-1;ye>=0;ye--)he[ye].start();else this._handlerFb(this._id,"START")},Le.prototype._put=function(he,ye,xe){var ge=this._handlers[this._id];if(ge)for(var le=ge.length-1;le>=0;le--)ge[le].put(he,ye,xe);else this._handlerFb(this._id,"PUT",Be.utf32ToString(he,ye,xe))},Le.prototype._end=function(he){var ye=this._handlers[this._id];if(ye){for(var xe=ye.length-1;xe>=0&&ye[xe].end(he)===!1;xe--);for(xe--;xe>=0;xe--)ye[xe].end(!1)}else this._handlerFb(this._id,"END",he)},Le.prototype.start=function(){this.reset(),this._id=-1,this._state=1},Le.prototype.put=function(he,ye,xe){if(this._state!==3){if(this._state===1)for(;ye<xe;){var ge=he[ye++];if(ge===59){this._state=2,this._start();break}if(ge<48||57<ge)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+ge-48}this._state===2&&xe-ye>0&&this._put(he,ye,xe)}},Le.prototype.end=function(he){this._state!==0&&(this._state!==3&&(this._state===1&&this._start(),this._end(he)),this._id=-1,this._state=0)},Le}();Ee.OscParser=ke;var Ce=function(){function Le(he){this._handler=he,this._data="",this._hitLimit=!1}return Le.prototype.start=function(){this._data="",this._hitLimit=!1},Le.prototype.put=function(he,ye,xe){this._hitLimit||(this._data+=Be.utf32ToString(he,ye,xe),this._data.length>me.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},Le.prototype.end=function(he){var ye;return this._hitLimit?ye=!1:he&&(ye=this._handler(this._data)),this._data="",this._hitLimit=!1,ye},Le}();Ee.OscHandler=Ce},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.PAYLOAD_LIMIT=void 0,Ee.PAYLOAD_LIMIT=1e7},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.DcsHandler=Ee.DcsParser=void 0;var me=Me(8),Be=Me(21),ke=Me(23),Ce=[],Le=function(){function ye(){this._handlers=Object.create(null),this._active=Ce,this._ident=0,this._handlerFb=function(){}}return ye.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},ye.prototype.addHandler=function(xe,ge){this._handlers[xe]===void 0&&(this._handlers[xe]=[]);var le=this._handlers[xe];return le.push(ge),{dispose:function(){var ve=le.indexOf(ge);ve!==-1&&le.splice(ve,1)}}},ye.prototype.setHandler=function(xe,ge){this._handlers[xe]=[ge]},ye.prototype.clearHandler=function(xe){this._handlers[xe]&&delete this._handlers[xe]},ye.prototype.setHandlerFallback=function(xe){this._handlerFb=xe},ye.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=Ce,this._ident=0},ye.prototype.hook=function(xe,ge){if(this.reset(),this._ident=xe,this._active=this._handlers[xe]||Ce,this._active.length)for(var le=this._active.length-1;le>=0;le--)this._active[le].hook(ge);else this._handlerFb(this._ident,"HOOK",ge)},ye.prototype.put=function(xe,ge,le){if(this._active.length)for(var ve=this._active.length-1;ve>=0;ve--)this._active[ve].put(xe,ge,le);else this._handlerFb(this._ident,"PUT",me.utf32ToString(xe,ge,le))},ye.prototype.unhook=function(xe){if(this._active.length){for(var ge=this._active.length-1;ge>=0&&this._active[ge].unhook(xe)===!1;ge--);for(ge--;ge>=0;ge--)this._active[ge].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",xe);this._active=Ce,this._ident=0},ye}();Ee.DcsParser=Le;var he=function(){function ye(xe){this._handler=xe,this._data="",this._hitLimit=!1}return ye.prototype.hook=function(xe){this._params=xe.clone(),this._data="",this._hitLimit=!1},ye.prototype.put=function(xe,ge,le){this._hitLimit||(this._data+=me.utf32ToString(xe,ge,le),this._data.length>ke.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},ye.prototype.unhook=function(xe){var ge;return this._hitLimit?ge=!1:xe&&(ge=this._handler(this._data,this._params||new Be.Params)),this._params=void 0,this._data="",this._hitLimit=!1,ge},ye}();Ee.DcsHandler=he},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.removeTerminalFromCache=Ee.acquireCharAtlas=void 0;var me=Me(26),Be=Me(43),ke=[];Ee.acquireCharAtlas=function(Ce,Le,he,ye,xe){for(var ge=me.generateConfig(ye,xe,Ce,he),le=0;le<ke.length;le++){var ve=(de=ke[le]).ownedBy.indexOf(Le);if(ve>=0){if(me.configEquals(de.config,ge))return de.atlas;de.ownedBy.length===1?(de.atlas.dispose(),ke.splice(le,1)):de.ownedBy.splice(ve,1);break}}for(le=0;le<ke.length;le++){var de=ke[le];if(me.configEquals(de.config,ge))return de.ownedBy.push(Le),de.atlas}var ce={atlas:new Be.DynamicCharAtlas(document,ge),config:ge,ownedBy:[Le]};return ke.push(ce),ce.atlas},Ee.removeTerminalFromCache=function(Ce){for(var Le=0;Le<ke.length;Le++){var he=ke[Le].ownedBy.indexOf(Ce);if(he!==-1){ke[Le].ownedBy.length===1?(ke[Le].atlas.dispose(),ke.splice(Le,1)):ke[Le].ownedBy.splice(he,1);break}}}},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.is256Color=Ee.configEquals=Ee.generateConfig=void 0;var me=Me(3);Ee.generateConfig=function(Be,ke,Ce,Le){var he={foreground:Le.foreground,background:Le.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:Le.ansi.slice(0,16)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:Be,scaledCharHeight:ke,fontFamily:Ce.fontFamily,fontSize:Ce.fontSize,fontWeight:Ce.fontWeight,fontWeightBold:Ce.fontWeightBold,allowTransparency:Ce.allowTransparency,colors:he}},Ee.configEquals=function(Be,ke){for(var Ce=0;Ce<Be.colors.ansi.length;Ce++)if(Be.colors.ansi[Ce].rgba!==ke.colors.ansi[Ce].rgba)return!1;return Be.devicePixelRatio===ke.devicePixelRatio&&Be.fontFamily===ke.fontFamily&&Be.fontSize===ke.fontSize&&Be.fontWeight===ke.fontWeight&&Be.fontWeightBold===ke.fontWeightBold&&Be.allowTransparency===ke.allowTransparency&&Be.scaledCharWidth===ke.scaledCharWidth&&Be.scaledCharHeight===ke.scaledCharHeight&&Be.colors.foreground===ke.colors.foreground&&Be.colors.background===ke.colors.background},Ee.is256Color=function(Be){return Be<me.DEFAULT_COLOR}},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.ColorManager=Ee.DEFAULT_ANSI_COLORS=void 0;var me=Me(10),Be=Me(45),ke=me.css.toColor("#ffffff"),Ce=me.css.toColor("#000000"),Le=me.css.toColor("#ffffff"),he=me.css.toColor("#000000"),ye={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};Ee.DEFAULT_ANSI_COLORS=function(){for(var ge=[me.css.toColor("#2e3436"),me.css.toColor("#cc0000"),me.css.toColor("#4e9a06"),me.css.toColor("#c4a000"),me.css.toColor("#3465a4"),me.css.toColor("#75507b"),me.css.toColor("#06989a"),me.css.toColor("#d3d7cf"),me.css.toColor("#555753"),me.css.toColor("#ef2929"),me.css.toColor("#8ae234"),me.css.toColor("#fce94f"),me.css.toColor("#729fcf"),me.css.toColor("#ad7fa8"),me.css.toColor("#34e2e2"),me.css.toColor("#eeeeec")],le=[0,95,135,175,215,255],ve=0;ve<216;ve++){var de=le[ve/36%6|0],ce=le[ve/6%6|0],z=le[ve%6];ge.push({css:me.channels.toCss(de,ce,z),rgba:me.channels.toRgba(de,ce,z)})}for(ve=0;ve<24;ve++){var ee=8+10*ve;ge.push({css:me.channels.toCss(ee,ee,ee),rgba:me.channels.toRgba(ee,ee,ee)})}return ge}();var xe=function(){function ge(le,ve){this.allowTransparency=ve;var de=le.createElement("canvas");de.width=1,de.height=1;var ce=de.getContext("2d");if(!ce)throw new Error("Could not get rendering context");this._ctx=ce,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new Be.ColorContrastCache,this.colors={foreground:ke,background:Ce,cursor:Le,cursorAccent:he,selectionTransparent:ye,selectionOpaque:me.color.blend(Ce,ye),ansi:Ee.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return ge.prototype.onOptionsChange=function(le){le==="minimumContrastRatio"&&this._contrastCache.clear()},ge.prototype.setTheme=function(le){le===void 0&&(le={}),this.colors.foreground=this._parseColor(le.foreground,ke),this.colors.background=this._parseColor(le.background,Ce),this.colors.cursor=this._parseColor(le.cursor,Le,!0),this.colors.cursorAccent=this._parseColor(le.cursorAccent,he,!0),this.colors.selectionTransparent=this._parseColor(le.selection,ye,!0),this.colors.selectionOpaque=me.color.blend(this.colors.background,this.colors.selectionTransparent),me.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=me.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(le.black,Ee.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(le.red,Ee.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(le.green,Ee.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(le.yellow,Ee.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(le.blue,Ee.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(le.magenta,Ee.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(le.cyan,Ee.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(le.white,Ee.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(le.brightBlack,Ee.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(le.brightRed,Ee.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(le.brightGreen,Ee.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(le.brightYellow,Ee.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(le.brightBlue,Ee.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(le.brightMagenta,Ee.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(le.brightCyan,Ee.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(le.brightWhite,Ee.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},ge.prototype._parseColor=function(le,ve,de){if(de===void 0&&(de=this.allowTransparency),le===void 0)return ve;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=le,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+le+" is invalid using fallback "+ve.css),ve;this._ctx.fillRect(0,0,1,1);var ce=this._ctx.getImageData(0,0,1,1).data;if(ce[3]!==255){if(!de)return console.warn("Color: "+le+" is using transparency, but allowTransparency is false. Using fallback "+ve.css+"."),ve;var z=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(Se){return Number(Se)}),ee=z[0],oe=z[1],ie=z[2],se=z[3],ue=Math.round(255*se);return{rgba:me.channels.toRgba(ee,oe,ie,ue),css:le}}return{css:this._ctx.fillStyle,rgba:me.channels.toRgba(ce[0],ce[1],ce[2],ce[3])}},ge}();Ee.ColorManager=xe},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.throwIfFalsy=void 0,Ee.throwIfFalsy=function(me){if(!me)throw new Error("value must not be falsy");return me}},function(qt,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(xe,ge){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(le,ve){le.__proto__=ve}||function(le,ve){for(var de in ve)ve.hasOwnProperty(de)&&(le[de]=ve[de])})(xe,ge)},function(xe,ge){function le(){this.constructor=xe}me(xe,ge),xe.prototype=ge===null?Object.create(ge):(le.prototype=ge.prototype,new le)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CharacterJoinerRegistry=Ee.JoinedCellData=void 0;var ke=Me(6),Ce=Me(3),Le=Me(4),he=function(xe){function ge(le,ve,de){var ce=xe.call(this)||this;return ce.content=0,ce.combinedData="",ce.fg=le.fg,ce.bg=le.bg,ce.combinedData=ve,ce._width=de,ce}return Be(ge,xe),ge.prototype.isCombined=function(){return 2097152},ge.prototype.getWidth=function(){return this._width},ge.prototype.getChars=function(){return this.combinedData},ge.prototype.getCode=function(){return 2097151},ge.prototype.setFromCharData=function(le){throw new Error("not implemented")},ge.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},ge}(ke.AttributeData);Ee.JoinedCellData=he;var ye=function(){function xe(ge){this._bufferService=ge,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new Le.CellData}return xe.prototype.registerCharacterJoiner=function(ge){var le={id:this._nextCharacterJoinerId++,handler:ge};return this._characterJoiners.push(le),le.id},xe.prototype.deregisterCharacterJoiner=function(ge){for(var le=0;le<this._characterJoiners.length;le++)if(this._characterJoiners[le].id===ge)return this._characterJoiners.splice(le,1),!0;return!1},xe.prototype.getJoinedCharacters=function(ge){if(this._characterJoiners.length===0)return[];var le=this._bufferService.buffer.lines.get(ge);if(!le||le.length===0)return[];for(var ve=[],de=le.translateToString(!0),ce=0,z=0,ee=0,oe=le.getFg(0),ie=le.getBg(0),se=0;se<le.getTrimmedLength();se++)if(le.loadCell(se,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==oe||this._workCell.bg!==ie){if(se-ce>1)for(var ue=this._getJoinedRanges(de,ee,z,le,ce),Se=0;Se<ue.length;Se++)ve.push(ue[Se]);ce=se,ee=z,oe=this._workCell.fg,ie=this._workCell.bg}z+=this._workCell.getChars().length||Ce.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-ce>1)for(ue=this._getJoinedRanges(de,ee,z,le,ce),Se=0;Se<ue.length;Se++)ve.push(ue[Se]);return ve},xe.prototype._getJoinedRanges=function(ge,le,ve,de,ce){for(var z=ge.substring(le,ve),ee=this._characterJoiners[0].handler(z),oe=1;oe<this._characterJoiners.length;oe++)for(var ie=this._characterJoiners[oe].handler(z),se=0;se<ie.length;se++)xe._mergeRanges(ee,ie[se]);return this._stringRangesToCellRanges(ee,de,ce),ee},xe.prototype._stringRangesToCellRanges=function(ge,le,ve){var de=0,ce=!1,z=0,ee=ge[de];if(ee){for(var oe=ve;oe<this._bufferService.cols;oe++){var ie=le.getWidth(oe),se=le.getString(oe).length||Ce.WHITESPACE_CELL_CHAR.length;if(ie!==0){if(!ce&&ee[0]<=z&&(ee[0]=oe,ce=!0),ee[1]<=z){if(ee[1]=oe,!(ee=ge[++de]))break;ee[0]<=z?(ee[0]=oe,ce=!0):ce=!1}z+=se}}ee&&(ee[1]=this._bufferService.cols)}},xe._mergeRanges=function(ge,le){for(var ve=!1,de=0;de<ge.length;de++){var ce=ge[de];if(ve){if(le[1]<=ce[0])return ge[de-1][1]=le[1],ge;if(le[1]<=ce[1])return ge[de-1][1]=Math.max(le[1],ce[1]),ge.splice(de,1),ge;ge.splice(de,1),de--}else{if(le[1]<=ce[0])return ge.splice(de,0,le),ge;if(le[1]<=ce[1])return ce[0]=Math.min(le[0],ce[0]),ge;le[0]<ce[1]&&(ce[0]=Math.min(le[0],ce[0]),ve=!0)}}return ve?ge[ge.length-1][1]=le[1]:ge.push(le),ge},xe}();Ee.CharacterJoinerRegistry=ye},function(qt,Ee,Me){"use strict";function me(Be,ke){var Ce=ke.getBoundingClientRect();return[Be.clientX-Ce.left,Be.clientY-Ce.top]}Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.getRawByteCoords=Ee.getCoords=Ee.getCoordsRelativeToElement=void 0,Ee.getCoordsRelativeToElement=me,Ee.getCoords=function(Be,ke,Ce,Le,he,ye,xe,ge){if(he){var le=me(Be,ke);if(le)return le[0]=Math.ceil((le[0]+(ge?ye/2:0))/ye),le[1]=Math.ceil(le[1]/xe),le[0]=Math.min(Math.max(le[0],1),Ce+(ge?1:0)),le[1]=Math.min(Math.max(le[1],1),Le),le}},Ee.getRawByteCoords=function(Be){if(Be)return{x:Be[0]+32,y:Be[1]+32}}},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.RenderDebouncer=void 0;var me=function(){function Be(ke){this._renderCallback=ke}return Be.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},Be.prototype.refresh=function(ke,Ce,Le){var he=this;this._rowCount=Le,ke=ke!==void 0?ke:0,Ce=Ce!==void 0?Ce:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,ke):ke,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,Ce):Ce,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return he._innerRefresh()}))},Be.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var ke=Math.max(this._rowStart,0),Ce=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(ke,Ce)}},Be}();Ee.RenderDebouncer=me},function(qt,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(Ce,Le){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(he,ye){he.__proto__=ye}||function(he,ye){for(var xe in ye)ye.hasOwnProperty(xe)&&(he[xe]=ye[xe])})(Ce,Le)},function(Ce,Le){function he(){this.constructor=Ce}me(Ce,Le),Ce.prototype=Le===null?Object.create(Le):(he.prototype=Le.prototype,new he)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.ScreenDprMonitor=void 0;var ke=function(Ce){function Le(){var he=Ce!==null&&Ce.apply(this,arguments)||this;return he._currentDevicePixelRatio=window.devicePixelRatio,he}return Be(Le,Ce),Le.prototype.setListener=function(he){var ye=this;this._listener&&this.clearListener(),this._listener=he,this._outerListener=function(){ye._listener&&(ye._listener(window.devicePixelRatio,ye._currentDevicePixelRatio),ye._updateDpr())},this._updateDpr()},Le.prototype.dispose=function(){Ce.prototype.dispose.call(this),this.clearListener()},Le.prototype._updateDpr=function(){var he;this._outerListener&&((he=this._resolutionMediaMatchList)===null||he===void 0||he.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},Le.prototype.clearListener=function(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)},Le}(Me(2).Disposable);Ee.ScreenDprMonitor=ke},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.clone=void 0,Ee.clone=function me(Be,ke){if(ke===void 0&&(ke=5),typeof Be!="object")return Be;var Ce=Array.isArray(Be)?[]:{};for(var Le in Be)Ce[Le]=ke<=1?Be[Le]:Be[Le]?me(Be[Le],ke-1):Be[Le];return Ce}},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Terminal=void 0;var me=Me(4),Be=Me(35),ke=Me(18),Ce=Me(0),Le=Me(83),he=function(){function de(ce){this._core=new Be.Terminal(ce),this._addonManager=new Le.AddonManager}return de.prototype._checkProposedApi=function(){if(!this._core.optionsService.options.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")},Object.defineProperty(de.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new le(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"unicode",{get:function(){return this._checkProposedApi(),new ve(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"buffer",{get:function(){return this._checkProposedApi(),new xe(this._core.buffers)},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),de.prototype.blur=function(){this._core.blur()},de.prototype.focus=function(){this._core.focus()},de.prototype.resize=function(ce,z){this._verifyIntegers(ce,z),this._core.resize(ce,z)},de.prototype.open=function(ce){this._core.open(ce)},de.prototype.attachCustomKeyEventHandler=function(ce){this._core.attachCustomKeyEventHandler(ce)},de.prototype.registerLinkMatcher=function(ce,z,ee){return this._checkProposedApi(),this._core.registerLinkMatcher(ce,z,ee)},de.prototype.deregisterLinkMatcher=function(ce){this._checkProposedApi(),this._core.deregisterLinkMatcher(ce)},de.prototype.registerLinkProvider=function(ce){return this._checkProposedApi(),this._core.registerLinkProvider(ce)},de.prototype.registerCharacterJoiner=function(ce){return this._checkProposedApi(),this._core.registerCharacterJoiner(ce)},de.prototype.deregisterCharacterJoiner=function(ce){this._checkProposedApi(),this._core.deregisterCharacterJoiner(ce)},de.prototype.registerMarker=function(ce){return this._checkProposedApi(),this._verifyIntegers(ce),this._core.addMarker(ce)},de.prototype.addMarker=function(ce){return this.registerMarker(ce)},de.prototype.hasSelection=function(){return this._core.hasSelection()},de.prototype.select=function(ce,z,ee){this._verifyIntegers(ce,z,ee),this._core.select(ce,z,ee)},de.prototype.getSelection=function(){return this._core.getSelection()},de.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},de.prototype.clearSelection=function(){this._core.clearSelection()},de.prototype.selectAll=function(){this._core.selectAll()},de.prototype.selectLines=function(ce,z){this._verifyIntegers(ce,z),this._core.selectLines(ce,z)},de.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},de.prototype.scrollLines=function(ce){this._verifyIntegers(ce),this._core.scrollLines(ce)},de.prototype.scrollPages=function(ce){this._verifyIntegers(ce),this._core.scrollPages(ce)},de.prototype.scrollToTop=function(){this._core.scrollToTop()},de.prototype.scrollToBottom=function(){this._core.scrollToBottom()},de.prototype.scrollToLine=function(ce){this._verifyIntegers(ce),this._core.scrollToLine(ce)},de.prototype.clear=function(){this._core.clear()},de.prototype.write=function(ce,z){this._core.write(ce,z)},de.prototype.writeUtf8=function(ce,z){this._core.write(ce,z)},de.prototype.writeln=function(ce,z){this._core.write(ce),this._core.write(`\r
|
|
|
`,z)},de.prototype.paste=function(ce){this._core.paste(ce)},de.prototype.getOption=function(ce){return this._core.optionsService.getOption(ce)},de.prototype.setOption=function(ce,z){this._core.optionsService.setOption(ce,z)},de.prototype.refresh=function(ce,z){this._verifyIntegers(ce,z),this._core.refresh(ce,z)},de.prototype.reset=function(){this._core.reset()},de.prototype.loadAddon=function(ce){return this._addonManager.loadAddon(this,ce)},Object.defineProperty(de,"strings",{get:function(){return ke},enumerable:!1,configurable:!0}),de.prototype._verifyIntegers=function(){for(var ce=[],z=0;z<arguments.length;z++)ce[z]=arguments[z];for(var ee=0,oe=ce;ee<oe.length;ee++){var ie=oe[ee];if(ie===1/0||isNaN(ie)||ie%1!=0)throw new Error("This API only accepts integers")}},de}();Ee.Terminal=he;var ye=function(){function de(ce,z){this._buffer=ce,this.type=z}return de.prototype.init=function(ce){return this._buffer=ce,this},Object.defineProperty(de.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),de.prototype.getLine=function(ce){var z=this._buffer.lines.get(ce);if(z)return new ge(z)},de.prototype.getNullCell=function(){return new me.CellData},de}(),xe=function(){function de(ce){var z=this;this._buffers=ce,this._onBufferChange=new Ce.EventEmitter,this._normal=new ye(this._buffers.normal,"normal"),this._alternate=new ye(this._buffers.alt,"alternate"),this._buffers.onBufferActivate(function(){return z._onBufferChange.fire(z.active)})}return Object.defineProperty(de.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"active",{get:function(){if(this._buffers.active===this._buffers.normal)return this.normal;if(this._buffers.active===this._buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"normal",{get:function(){return this._normal.init(this._buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"alternate",{get:function(){return this._alternate.init(this._buffers.alt)},enumerable:!1,configurable:!0}),de}(),ge=function(){function de(ce){this._line=ce}return Object.defineProperty(de.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),de.prototype.getCell=function(ce,z){if(!(ce<0||ce>=this._line.length))return z?(this._line.loadCell(ce,z),z):this._line.loadCell(ce,new me.CellData)},de.prototype.translateToString=function(ce,z,ee){return this._line.translateToString(ce,z,ee)},de}(),le=function(){function de(ce){this._core=ce}return de.prototype.registerCsiHandler=function(ce,z){return this._core.addCsiHandler(ce,function(ee){return z(ee.toArray())})},de.prototype.addCsiHandler=function(ce,z){return this.registerCsiHandler(ce,z)},de.prototype.registerDcsHandler=function(ce,z){return this._core.addDcsHandler(ce,function(ee,oe){return z(ee,oe.toArray())})},de.prototype.addDcsHandler=function(ce,z){return this.registerDcsHandler(ce,z)},de.prototype.registerEscHandler=function(ce,z){return this._core.addEscHandler(ce,z)},de.prototype.addEscHandler=function(ce,z){return this.registerEscHandler(ce,z)},de.prototype.registerOscHandler=function(ce,z){return this._core.addOscHandler(ce,z)},de.prototype.addOscHandler=function(ce,z){return this.registerOscHandler(ce,z)},de}(),ve=function(){function de(ce){this._core=ce}return de.prototype.register=function(ce){this._core.unicodeService.register(ce)},Object.defineProperty(de.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(ce){this._core.unicodeService.activeVersion=ce},enumerable:!1,configurable:!0}),de}()},function(qt,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(Ct,et){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(yt,st){yt.__proto__=st}||function(yt,st){for(var zt in st)st.hasOwnProperty(zt)&&(yt[zt]=st[zt])})(Ct,et)},function(Ct,et){function yt(){this.constructor=Ct}me(Ct,et),Ct.prototype=et===null?Object.create(et):(yt.prototype=et.prototype,new yt)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Terminal=void 0;var ke=Me(36),Ce=Me(37),Le=Me(38),he=Me(12),ye=Me(19),xe=Me(40),ge=Me(50),le=Me(51),ve=Me(11),de=Me(7),ce=Me(18),z=Me(54),ee=Me(55),oe=Me(56),ie=Me(57),se=Me(59),ue=Me(0),Se=Me(16),we=Me(27),Pe=Me(60),Ae=Me(5),De=Me(61),ze=Me(62),Ze=Me(63),Xe=Me(64),Ge=Me(65),ft=typeof window!="undefined"?window.document:null,at=function(Ct){function et(yt){yt===void 0&&(yt={});var st=Ct.call(this,yt)||this;return st.browser=ve,st._keyDownHandled=!1,st._onCursorMove=new ue.EventEmitter,st._onKey=new ue.EventEmitter,st._onRender=new ue.EventEmitter,st._onSelectionChange=new ue.EventEmitter,st._onTitleChange=new ue.EventEmitter,st._onFocus=new ue.EventEmitter,st._onBlur=new ue.EventEmitter,st._onA11yCharEmitter=new ue.EventEmitter,st._onA11yTabEmitter=new ue.EventEmitter,st._setup(),st.linkifier=st._instantiationService.createInstance(ge.Linkifier),st.linkifier2=st.register(st._instantiationService.createInstance(Ze.Linkifier2)),st.register(st._inputHandler.onRequestBell(function(){return st.bell()})),st.register(st._inputHandler.onRequestRefreshRows(function(zt,lt){return st.refresh(zt,lt)})),st.register(st._inputHandler.onRequestReset(function(){return st.reset()})),st.register(st._inputHandler.onRequestScroll(function(zt,lt){return st.scroll(zt,lt||void 0)})),st.register(st._inputHandler.onRequestWindowsOptionsReport(function(zt){return st._reportWindowsOptions(zt)})),st.register(ue.forwardEvent(st._inputHandler.onCursorMove,st._onCursorMove)),st.register(ue.forwardEvent(st._inputHandler.onTitleChange,st._onTitleChange)),st.register(ue.forwardEvent(st._inputHandler.onA11yChar,st._onA11yCharEmitter)),st.register(ue.forwardEvent(st._inputHandler.onA11yTab,st._onA11yTabEmitter)),st.register(st._bufferService.onResize(function(zt){return st._afterResize(zt.cols,zt.rows)})),st}return Be(et,Ct),Object.defineProperty(et.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),et.prototype.dispose=function(){var yt,st,zt;this._isDisposed||(Ct.prototype.dispose.call(this),(yt=this._renderService)===null||yt===void 0||yt.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(zt=(st=this.element)===null||st===void 0?void 0:st.parentNode)===null||zt===void 0||zt.removeChild(this.element))},et.prototype._setup=function(){Ct.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(et.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),et.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},et.prototype._updateOptions=function(yt){var st,zt,lt,tt;switch(Ct.prototype._updateOptions.call(this,yt),yt){case"fontFamily":case"fontSize":(st=this._renderService)===null||st===void 0||st.clear(),(zt=this._charSizeService)===null||zt===void 0||zt.measure();break;case"cursorBlink":case"cursorStyle":this.refresh(this.buffer.y,this.buffer.y);break;case"drawBoldTextInBrightColors":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":case"minimumContrastRatio":this._renderService&&(this._renderService.clear(),this._renderService.onResize(this.cols,this.rows),this.refresh(0,this.rows-1));break;case"rendererType":this._renderService&&(this._renderService.setRenderer(this._createRenderer()),this._renderService.onResize(this.cols,this.rows));break;case"scrollback":(lt=this.viewport)===null||lt===void 0||lt.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new oe.AccessibilityManager(this,this._renderService)):((tt=this._accessibilityManager)===null||tt===void 0||tt.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},et.prototype._onTextAreaFocus=function(yt){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(he.C0.ESC+"[I"),this.updateCursorStyle(yt),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},et.prototype.blur=function(){var yt;return(yt=this.textarea)===null||yt===void 0?void 0:yt.blur()},et.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(he.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},et.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var yt=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),st=this._bufferService.buffer.y*yt,zt=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=zt+"px",this.textarea.style.top=st+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=yt+"px",this.textarea.style.lineHeight=yt+"px",this.textarea.style.zIndex="-5"}},et.prototype._initGlobal=function(){var yt=this;this._bindKeys(),this.register(de.addDisposableDomListener(this.element,"copy",function(zt){yt.hasSelection()&&Le.copyHandler(zt,yt._selectionService)}));var st=function(zt){return Le.handlePasteEvent(zt,yt.textarea,yt._coreService)};this.register(de.addDisposableDomListener(this.textarea,"paste",st)),this.register(de.addDisposableDomListener(this.element,"paste",st)),ve.isFirefox?this.register(de.addDisposableDomListener(this.element,"mousedown",function(zt){zt.button===2&&Le.rightClickHandler(zt,yt.textarea,yt.screenElement,yt._selectionService,yt.options.rightClickSelectsWord)})):this.register(de.addDisposableDomListener(this.element,"contextmenu",function(zt){Le.rightClickHandler(zt,yt.textarea,yt.screenElement,yt._selectionService,yt.options.rightClickSelectsWord)})),ve.isLinux&&this.register(de.addDisposableDomListener(this.element,"auxclick",function(zt){zt.button===1&&Le.moveTextAreaUnderMouseCursor(zt,yt.textarea,yt.screenElement)}))},et.prototype._bindKeys=function(){var yt=this;this.register(de.addDisposableDomListener(this.textarea,"keyup",function(st){return yt._keyUp(st)},!0)),this.register(de.addDisposableDomListener(this.textarea,"keydown",function(st){return yt._keyDown(st)},!0)),this.register(de.addDisposableDomListener(this.textarea,"keypress",function(st){return yt._keyPress(st)},!0)),this.register(de.addDisposableDomListener(this.textarea,"compositionstart",function(){return yt._compositionHelper.compositionstart()})),this.register(de.addDisposableDomListener(this.textarea,"compositionupdate",function(st){return yt._compositionHelper.compositionupdate(st)})),this.register(de.addDisposableDomListener(this.textarea,"compositionend",function(){return yt._compositionHelper.compositionend()})),this.register(this.onRender(function(){return yt._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(st){return yt._queueLinkification(st.start,st.end)}))},et.prototype.open=function(yt){var st=this;if(!yt)throw new Error("Terminal requires a parent element.");ft.body.contains(yt)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=yt.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),yt.appendChild(this.element);var zt=ft.createDocumentFragment();this._viewportElement=ft.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),zt.appendChild(this._viewportElement),this._viewportScrollArea=ft.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=ft.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=ft.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),zt.appendChild(this.screenElement),this.textarea=ft.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",ce.promptLabel),this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.register(de.addDisposableDomListener(this.textarea,"focus",function(ut){return st._onTextAreaFocus(ut)})),this.register(de.addDisposableDomListener(this.textarea,"blur",function(){return st._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var lt=this._instantiationService.createInstance(Xe.CoreBrowserService,this.textarea);this._instantiationService.setService(Ae.ICoreBrowserService,lt),this._charSizeService=this._instantiationService.createInstance(De.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(Ae.ICharSizeService,this._charSizeService),this._compositionView=ft.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(ke.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(zt),this._theme=this.options.theme||this._theme,this._colorManager=new we.ColorManager(ft,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(ut){return st._colorManager.onOptionsChange(ut)})),this._colorManager.setTheme(this._theme);var tt=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(Pe.RenderService,tt,this.rows,this.screenElement)),this._instantiationService.setService(Ae.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(ut){return st._onRender.fire(ut)})),this.onResize(function(ut){return st._renderService.resize(ut.cols,ut.rows)}),this._soundService=this._instantiationService.createInstance(z.SoundService),this._instantiationService.setService(Ae.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(ze.MouseService),this._instantiationService.setService(Ae.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(Ce.Viewport,function(ut,mt){return st.scrollLines(ut,mt)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return st.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){st._renderService.onCursorMove(),st._syncTextArea()})),this.register(this.onResize(function(){return st._renderService.onResize(st.cols,st.rows)})),this.register(this.onBlur(function(){return st._renderService.onBlur()})),this.register(this.onFocus(function(){return st._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return st.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(le.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(Ae.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(ut){return st.scrollLines(ut.amount,ut.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return st._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(ut){return st._renderService.onSelectionChanged(ut.start,ut.end,ut.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(ut){st.textarea.value=ut,st.textarea.focus(),st.textarea.select()})),this.register(this.onScroll(function(){st.viewport.syncScrollArea(),st._selectionService.refresh()})),this.register(de.addDisposableDomListener(this._viewportElement,"scroll",function(){return st._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(ee.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return st._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.element,this._mouseService,this._renderService),this.register(de.addDisposableDomListener(this.element,"mousedown",function(ut){return st._selectionService.onMouseDown(ut)})),this._coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new oe.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},et.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(xe.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(ie.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},et.prototype._setTheme=function(yt){var st,zt,lt;this._theme=yt,(st=this._colorManager)===null||st===void 0||st.setTheme(yt),(zt=this._renderService)===null||zt===void 0||zt.setColors(this._colorManager.colors),(lt=this.viewport)===null||lt===void 0||lt.onThemeChange(this._colorManager.colors)},et.prototype.bindMouse=function(){var yt=this,st=this,zt=this.element;function lt(Ft){var Ht,hn,Jt=st._mouseService.getRawByteCoords(Ft,st.screenElement,st.cols,st.rows);if(!Jt)return!1;switch(Ft.overrideType||Ft.type){case"mousemove":hn=32,Ft.buttons===void 0?(Ht=3,Ft.button!==void 0&&(Ht=Ft.button<3?Ft.button:3)):Ht=1&Ft.buttons?0:4&Ft.buttons?1:2&Ft.buttons?2:3;break;case"mouseup":hn=0,Ht=Ft.button<3?Ft.button:3;break;case"mousedown":hn=1,Ht=Ft.button<3?Ft.button:3;break;case"wheel":Ft.deltaY!==0&&(hn=Ft.deltaY<0?0:1),Ht=4;break;default:return!1}return!(hn===void 0||Ht===void 0||Ht>4)&&st._coreMouseService.triggerMouseEvent({col:Jt.x-33,row:Jt.y-33,button:Ht,action:hn,ctrl:Ft.ctrlKey,alt:Ft.altKey,shift:Ft.shiftKey})}var tt={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ut=function(Ft){return lt(Ft),Ft.buttons||(yt._document.removeEventListener("mouseup",tt.mouseup),tt.mousedrag&&yt._document.removeEventListener("mousemove",tt.mousedrag)),yt.cancel(Ft)},mt=function(Ft){return lt(Ft),Ft.preventDefault(),yt.cancel(Ft)},Pt=function(Ft){Ft.buttons&<(Ft)},gt=function(Ft){Ft.buttons||lt(Ft)};this.register(this._coreMouseService.onProtocolChange(function(Ft){Ft?(yt.optionsService.options.logLevel==="debug"&&yt._logService.debug("Binding to mouse events:",yt._coreMouseService.explainEvents(Ft)),yt.element.classList.add("enable-mouse-events"),yt._selectionService.disable()):(yt._logService.debug("Unbinding from mouse events."),yt.element.classList.remove("enable-mouse-events"),yt._selectionService.enable()),8&Ft?tt.mousemove||(zt.addEventListener("mousemove",gt),tt.mousemove=gt):(zt.removeEventListener("mousemove",tt.mousemove),tt.mousemove=null),16&Ft?tt.wheel||(zt.addEventListener("wheel",mt,{passive:!1}),tt.wheel=mt):(zt.removeEventListener("wheel",tt.wheel),tt.wheel=null),2&Ft?tt.mouseup||(tt.mouseup=ut):(yt._document.removeEventListener("mouseup",tt.mouseup),tt.mouseup=null),4&Ft?tt.mousedrag||(tt.mousedrag=Pt):(yt._document.removeEventListener("mousemove",tt.mousedrag),tt.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(de.addDisposableDomListener(zt,"mousedown",function(Ft){if(Ft.preventDefault(),yt.focus(),yt._coreMouseService.areMouseEventsActive&&!yt._selectionService.shouldForceSelection(Ft))return lt(Ft),tt.mouseup&&yt._document.addEventListener("mouseup",tt.mouseup),tt.mousedrag&&yt._document.addEventListener("mousemove",tt.mousedrag),yt.cancel(Ft)})),this.register(de.addDisposableDomListener(zt,"wheel",function(Ft){if(!tt.wheel){if(!yt.buffer.hasScrollback){var Ht=yt.viewport.getLinesScrolled(Ft);if(Ht===0)return;for(var hn=he.C0.ESC+(yt._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Ft.deltaY<0?"A":"B"),Jt="",bn=0;bn<Math.abs(Ht);bn++)Jt+=hn;yt._coreService.triggerDataEvent(Jt,!0)}}},{passive:!0})),this.register(de.addDisposableDomListener(zt,"wheel",function(Ft){if(!tt.wheel)return yt.viewport.onWheel(Ft)?void 0:yt.cancel(Ft)},{passive:!1})),this.register(de.addDisposableDomListener(zt,"touchstart",function(Ft){if(!yt._coreMouseService.areMouseEventsActive)return yt.viewport.onTouchStart(Ft),yt.cancel(Ft)},{passive:!0})),this.register(de.addDisposableDomListener(zt,"touchmove",function(Ft){if(!yt._coreMouseService.areMouseEventsActive)return yt.viewport.onTouchMove(Ft)?void 0:yt.cancel(Ft)},{passive:!1}))},et.prototype.refresh=function(yt,st){var zt;(zt=this._renderService)===null||zt===void 0||zt.refreshRows(yt,st)},et.prototype._queueLinkification=function(yt,st){var zt;(zt=this.linkifier)===null||zt===void 0||zt.linkifyRows(yt,st)},et.prototype.updateCursorStyle=function(yt){this._selectionService&&this._selectionService.shouldColumnSelect(yt)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},et.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},et.prototype.scrollLines=function(yt,st){Ct.prototype.scrollLines.call(this,yt,st),this.refresh(0,this.rows-1)},et.prototype.paste=function(yt){Le.paste(yt,this.textarea,this._coreService)},et.prototype.attachCustomKeyEventHandler=function(yt){this._customKeyEventHandler=yt},et.prototype.registerLinkMatcher=function(yt,st,zt){var lt=this.linkifier.registerLinkMatcher(yt,st,zt);return this.refresh(0,this.rows-1),lt},et.prototype.deregisterLinkMatcher=function(yt){this.linkifier.deregisterLinkMatcher(yt)&&this.refresh(0,this.rows-1)},et.prototype.registerLinkProvider=function(yt){return this.linkifier2.registerLinkProvider(yt)},et.prototype.registerCharacterJoiner=function(yt){var st=this._renderService.registerCharacterJoiner(yt);return this.refresh(0,this.rows-1),st},et.prototype.deregisterCharacterJoiner=function(yt){this._renderService.deregisterCharacterJoiner(yt)&&this.refresh(0,this.rows-1)},Object.defineProperty(et.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),et.prototype.addMarker=function(yt){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+yt)},et.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},et.prototype.select=function(yt,st,zt){this._selectionService.setSelection(yt,st,zt)},et.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},et.prototype.getSelectionPosition=function(){if(this._selectionService&&this._selectionService.hasSelection)return{startColumn:this._selectionService.selectionStart[0],startRow:this._selectionService.selectionStart[1],endColumn:this._selectionService.selectionEnd[0],endRow:this._selectionService.selectionEnd[1]}},et.prototype.clearSelection=function(){var yt;(yt=this._selectionService)===null||yt===void 0||yt.clearSelection()},et.prototype.selectAll=function(){var yt;(yt=this._selectionService)===null||yt===void 0||yt.selectAll()},et.prototype.selectLines=function(yt,st){var zt;(zt=this._selectionService)===null||zt===void 0||zt.selectLines(yt,st)},et.prototype._keyDown=function(yt){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(yt)===!1)return!1;if(!this._compositionHelper.keydown(yt))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var st=se.evaluateKeyboardEvent(yt,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(yt),st.type===3||st.type===2){var zt=this.rows-1;return this.scrollLines(st.type===2?-zt:zt),this.cancel(yt,!0)}return st.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,yt)||(st.cancel&&this.cancel(yt,!0),!st.key||(st.key!==he.C0.ETX&&st.key!==he.C0.CR||(this.textarea.value=""),this._onKey.fire({key:st.key,domEvent:yt}),this._showCursor(),this._coreService.triggerDataEvent(st.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(yt,!0)))},et.prototype._isThirdLevelShift=function(yt,st){var zt=yt.isMac&&!this.options.macOptionIsMeta&&st.altKey&&!st.ctrlKey&&!st.metaKey||yt.isWindows&&st.altKey&&st.ctrlKey&&!st.metaKey;return st.type==="keypress"?zt:zt&&(!st.keyCode||st.keyCode>47)},et.prototype._keyUp=function(yt){this._customKeyEventHandler&&this._customKeyEventHandler(yt)===!1||(function(st){return st.keyCode===16||st.keyCode===17||st.keyCode===18}(yt)||this.focus(),this.updateCursorStyle(yt))},et.prototype._keyPress=function(yt){var st;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(yt)===!1)return!1;if(this.cancel(yt),yt.charCode)st=yt.charCode;else if(yt.which===null||yt.which===void 0)st=yt.keyCode;else{if(yt.which===0||yt.charCode===0)return!1;st=yt.which}return!(!st||(yt.altKey||yt.ctrlKey||yt.metaKey)&&!this._isThirdLevelShift(this.browser,yt))&&(st=String.fromCharCode(st),this._onKey.fire({key:st,domEvent:yt}),this._showCursor(),this._coreService.triggerDataEvent(st,!0),!0)},et.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},et.prototype.resize=function(yt,st){yt!==this.cols||st!==this.rows?Ct.prototype.resize.call(this,yt,st):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},et.prototype._afterResize=function(yt,st){var zt,lt;(zt=this._charSizeService)===null||zt===void 0||zt.measure(),(lt=this.viewport)===null||lt===void 0||lt.syncScrollArea(!0)},et.prototype.clear=function(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(var yt=1;yt<this.rows;yt++)this.buffer.lines.push(this.buffer.getBlankLine(Se.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},et.prototype.reset=function(){var yt,st;this.options.rows=this.rows,this.options.cols=this.cols;var zt=this._customKeyEventHandler;this._setup(),Ct.prototype.reset.call(this),(yt=this._selectionService)===null||yt===void 0||yt.reset(),this._customKeyEventHandler=zt,this.refresh(0,this.rows-1),(st=this.viewport)===null||st===void 0||st.syncScrollArea()},et.prototype._reportWindowsOptions=function(yt){if(this._renderService)switch(yt){case ye.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var st=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),zt=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(he.C0.ESC+"[4;"+zt+";"+st+"t");break;case ye.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var lt=this._renderService.dimensions.scaledCellWidth.toFixed(0),tt=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(he.C0.ESC+"[6;"+tt+";"+lt+"t")}},et.prototype.cancel=function(yt,st){if(this.options.cancelEvents||st)return yt.preventDefault(),yt.stopPropagation(),!1},et.prototype._visualBell=function(){return!1},et.prototype._soundBell=function(){return this.options.bellStyle==="sound"},et}(Ge.CoreTerminal);Ee.Terminal=at},function(qt,Ee,Me){"use strict";var me=this&&this.__decorate||function(he,ye,xe,ge){var le,ve=arguments.length,de=ve<3?ye:ge===null?ge=Object.getOwnPropertyDescriptor(ye,xe):ge;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")de=Reflect.decorate(he,ye,xe,ge);else for(var ce=he.length-1;ce>=0;ce--)(le=he[ce])&&(de=(ve<3?le(de):ve>3?le(ye,xe,de):le(ye,xe))||de);return ve>3&&de&&Object.defineProperty(ye,xe,de),de},Be=this&&this.__param||function(he,ye){return function(xe,ge){ye(xe,ge,he)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CompositionHelper=void 0;var ke=Me(5),Ce=Me(1),Le=function(){function he(ye,xe,ge,le,ve,de){this._textarea=ye,this._compositionView=xe,this._bufferService=ge,this._optionsService=le,this._charSizeService=ve,this._coreService=de,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0}}return Object.defineProperty(he.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),he.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._compositionView.classList.add("active")},he.prototype.compositionupdate=function(ye){var xe=this;this._compositionView.textContent=ye.data,this.updateCompositionElements(),setTimeout(function(){xe._compositionPosition.end=xe._textarea.value.length},0)},he.prototype.compositionend=function(){this._finalizeComposition(!0)},he.prototype.keydown=function(ye){if(this._isComposing||this._isSendingComposition){if(ye.keyCode===229||ye.keyCode===16||ye.keyCode===17||ye.keyCode===18)return!1;this._finalizeComposition(!1)}return ye.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},he.prototype._finalizeComposition=function(ye){var xe=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,ye){var ge={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(xe._isSendingComposition){xe._isSendingComposition=!1;var ve=void 0;ve=xe._isComposing?xe._textarea.value.substring(ge.start,ge.end):xe._textarea.value.substring(ge.start),xe._coreService.triggerDataEvent(ve,!0)}},0)}else{this._isSendingComposition=!1;var le=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(le,!0)}},he.prototype._handleAnyTextareaChanges=function(){var ye=this,xe=this._textarea.value;setTimeout(function(){if(!ye._isComposing){var ge=ye._textarea.value.replace(xe,"");ge.length>0&&ye._coreService.triggerDataEvent(ge,!0)}},0)},he.prototype.updateCompositionElements=function(ye){var xe=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var ge=Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight),le=this._bufferService.buffer.y*ge,ve=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=ve+"px",this._compositionView.style.top=le+"px",this._compositionView.style.height=ge+"px",this._compositionView.style.lineHeight=ge+"px",this._compositionView.style.fontFamily=this._optionsService.options.fontFamily,this._compositionView.style.fontSize=this._optionsService.options.fontSize+"px";var de=this._compositionView.getBoundingClientRect();this._textarea.style.left=ve+"px",this._textarea.style.top=le+"px",this._textarea.style.width=de.width+"px",this._textarea.style.height=de.height+"px",this._textarea.style.lineHeight=de.height+"px"}ye||setTimeout(function(){return xe.updateCompositionElements(!0)},0)}},he=me([Be(2,Ce.IBufferService),Be(3,Ce.IOptionsService),Be(4,ke.ICharSizeService),Be(5,Ce.ICoreService)],he)}();Ee.CompositionHelper=Le},function(qt,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(le,ve){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ce){de.__proto__=ce}||function(de,ce){for(var z in ce)ce.hasOwnProperty(z)&&(de[z]=ce[z])})(le,ve)},function(le,ve){function de(){this.constructor=le}me(le,ve),le.prototype=ve===null?Object.create(ve):(de.prototype=ve.prototype,new de)}),ke=this&&this.__decorate||function(le,ve,de,ce){var z,ee=arguments.length,oe=ee<3?ve:ce===null?ce=Object.getOwnPropertyDescriptor(ve,de):ce;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(le,ve,de,ce);else for(var ie=le.length-1;ie>=0;ie--)(z=le[ie])&&(oe=(ee<3?z(oe):ee>3?z(ve,de,oe):z(ve,de))||oe);return ee>3&&oe&&Object.defineProperty(ve,de,oe),oe},Ce=this&&this.__param||function(le,ve){return function(de,ce){ve(de,ce,le)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Viewport=void 0;var Le=Me(2),he=Me(7),ye=Me(5),xe=Me(1),ge=function(le){function ve(de,ce,z,ee,oe,ie,se){var ue=le.call(this)||this;return ue._scrollLines=de,ue._viewportElement=ce,ue._scrollArea=z,ue._bufferService=ee,ue._optionsService=oe,ue._charSizeService=ie,ue._renderService=se,ue.scrollBarWidth=0,ue._currentRowHeight=0,ue._lastRecordedBufferLength=0,ue._lastRecordedViewportHeight=0,ue._lastRecordedBufferHeight=0,ue._lastTouchY=0,ue._lastScrollTop=0,ue._wheelPartialScroll=0,ue._refreshAnimationFrame=null,ue._ignoreNextScrollEvent=!1,ue.scrollBarWidth=ue._viewportElement.offsetWidth-ue._scrollArea.offsetWidth||15,ue.register(he.addDisposableDomListener(ue._viewportElement,"scroll",ue._onScroll.bind(ue))),setTimeout(function(){return ue.syncScrollArea()},0),ue}return Be(ve,le),ve.prototype.onThemeChange=function(de){this._viewportElement.style.backgroundColor=de.background.css},ve.prototype._refresh=function(de){var ce=this;if(de)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return ce._innerRefresh()}))},ve.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var de=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==de&&(this._lastRecordedBufferHeight=de,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var ce=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==ce&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=ce),this._refreshAnimationFrame=null},ve.prototype.syncScrollArea=function(de){if(de===void 0&&(de=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(de);if(this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight){var ce=this._bufferService.buffer.ydisp*this._currentRowHeight;this._lastScrollTop===ce&&this._lastScrollTop===this._viewportElement.scrollTop&&this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio===this._currentRowHeight||this._refresh(de)}else this._refresh(de)},ve.prototype._onScroll=function(de){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent)if(this._ignoreNextScrollEvent)this._ignoreNextScrollEvent=!1;else{var ce=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(ce,!0)}},ve.prototype._bubbleScroll=function(de,ce){var z=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(ce<0&&this._viewportElement.scrollTop!==0||ce>0&&z<this._lastRecordedBufferHeight)||(de.cancelable&&de.preventDefault(),!1)},ve.prototype.onWheel=function(de){var ce=this._getPixelsScrolled(de);return ce!==0&&(this._viewportElement.scrollTop+=ce,this._bubbleScroll(de,ce))},ve.prototype._getPixelsScrolled=function(de){if(de.deltaY===0)return 0;var ce=this._applyScrollModifier(de.deltaY,de);return de.deltaMode===WheelEvent.DOM_DELTA_LINE?ce*=this._currentRowHeight:de.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(ce*=this._currentRowHeight*this._bufferService.rows),ce},ve.prototype.getLinesScrolled=function(de){if(de.deltaY===0)return 0;var ce=this._applyScrollModifier(de.deltaY,de);return de.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(ce/=this._currentRowHeight+0,this._wheelPartialScroll+=ce,ce=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):de.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(ce*=this._bufferService.rows),ce},ve.prototype._applyScrollModifier=function(de,ce){var z=this._optionsService.options.fastScrollModifier;return z==="alt"&&ce.altKey||z==="ctrl"&&ce.ctrlKey||z==="shift"&&ce.shiftKey?de*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:de*this._optionsService.options.scrollSensitivity},ve.prototype.onTouchStart=function(de){this._lastTouchY=de.touches[0].pageY},ve.prototype.onTouchMove=function(de){var ce=this._lastTouchY-de.touches[0].pageY;return this._lastTouchY=de.touches[0].pageY,ce!==0&&(this._viewportElement.scrollTop+=ce,this._bubbleScroll(de,ce))},ve=ke([Ce(3,xe.IBufferService),Ce(4,xe.IOptionsService),Ce(5,ye.ICharSizeService),Ce(6,ye.IRenderService)],ve)}(Le.Disposable);Ee.Viewport=ge},function(qt,Ee,Me){"use strict";function me(Le){return Le.replace(/\r?\n/g,"\r")}function Be(Le,he){return he?"\x1B[200~"+Le+"\x1B[201~":Le}function ke(Le,he,ye){Le=Be(Le=me(Le),ye.decPrivateModes.bracketedPasteMode),ye.triggerDataEvent(Le,!0),he.value=""}function Ce(Le,he,ye){var xe=ye.getBoundingClientRect(),ge=Le.clientX-xe.left-10,le=Le.clientY-xe.top-10;he.style.width="20px",he.style.height="20px",he.style.left=ge+"px",he.style.top=le+"px",he.style.zIndex="1000",he.focus()}Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.rightClickHandler=Ee.moveTextAreaUnderMouseCursor=Ee.paste=Ee.handlePasteEvent=Ee.copyHandler=Ee.bracketTextForPaste=Ee.prepareTextForTerminal=void 0,Ee.prepareTextForTerminal=me,Ee.bracketTextForPaste=Be,Ee.copyHandler=function(Le,he){Le.clipboardData&&Le.clipboardData.setData("text/plain",he.selectionText),Le.preventDefault()},Ee.handlePasteEvent=function(Le,he,ye){Le.stopPropagation(),Le.clipboardData&&ke(Le.clipboardData.getData("text/plain"),he,ye)},Ee.paste=ke,Ee.moveTextAreaUnderMouseCursor=Ce,Ee.rightClickHandler=function(Le,he,ye,xe,ge){Ce(Le,he,ye),ge&&!xe.isClickInSelection(Le)&&xe.selectWordAtCursor(Le),he.value=xe.selectionText,he.select()}},function(qt,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(le,ve){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ce){de.__proto__=ce}||function(de,ce){for(var z in ce)ce.hasOwnProperty(z)&&(de[z]=ce[z])})(le,ve)},function(le,ve){function de(){this.constructor=le}me(le,ve),le.prototype=ve===null?Object.create(ve):(de.prototype=ve.prototype,new de)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.EscapeSequenceParser=Ee.VT500_TRANSITION_TABLE=Ee.TransitionTable=void 0;var ke=Me(2),Ce=Me(15),Le=Me(21),he=Me(22),ye=Me(24),xe=function(){function le(ve){this.table=new Uint8Array(ve)}return le.prototype.setDefault=function(ve,de){Ce.fill(this.table,ve<<4|de)},le.prototype.add=function(ve,de,ce,z){this.table[de<<8|ve]=ce<<4|z},le.prototype.addMany=function(ve,de,ce,z){for(var ee=0;ee<ve.length;ee++)this.table[de<<8|ve[ee]]=ce<<4|z},le}();Ee.TransitionTable=xe,Ee.VT500_TRANSITION_TABLE=function(){var le=new xe(4095),ve=Array.apply(null,Array(256)).map(function(ie,se){return se}),de=function(ie,se){return ve.slice(ie,se)},ce=de(32,127),z=de(0,24);z.push(25),z.push.apply(z,de(28,32));var ee,oe=de(0,14);for(ee in le.setDefault(1,0),le.addMany(ce,0,2,0),oe)le.addMany([24,26,153,154],ee,3,0),le.addMany(de(128,144),ee,3,0),le.addMany(de(144,152),ee,3,0),le.add(156,ee,0,0),le.add(27,ee,11,1),le.add(157,ee,4,8),le.addMany([152,158,159],ee,0,7),le.add(155,ee,11,3),le.add(144,ee,11,9);return le.addMany(z,0,3,0),le.addMany(z,1,3,1),le.add(127,1,0,1),le.addMany(z,8,0,8),le.addMany(z,3,3,3),le.add(127,3,0,3),le.addMany(z,4,3,4),le.add(127,4,0,4),le.addMany(z,6,3,6),le.addMany(z,5,3,5),le.add(127,5,0,5),le.addMany(z,2,3,2),le.add(127,2,0,2),le.add(93,1,4,8),le.addMany(ce,8,5,8),le.add(127,8,5,8),le.addMany([156,27,24,26,7],8,6,0),le.addMany(de(28,32),8,0,8),le.addMany([88,94,95],1,0,7),le.addMany(ce,7,0,7),le.addMany(z,7,0,7),le.add(156,7,0,0),le.add(127,7,0,7),le.add(91,1,11,3),le.addMany(de(64,127),3,7,0),le.addMany(de(48,60),3,8,4),le.addMany([60,61,62,63],3,9,4),le.addMany(de(48,60),4,8,4),le.addMany(de(64,127),4,7,0),le.addMany([60,61,62,63],4,0,6),le.addMany(de(32,64),6,0,6),le.add(127,6,0,6),le.addMany(de(64,127),6,0,0),le.addMany(de(32,48),3,9,5),le.addMany(de(32,48),5,9,5),le.addMany(de(48,64),5,0,6),le.addMany(de(64,127),5,7,0),le.addMany(de(32,48),4,9,5),le.addMany(de(32,48),1,9,2),le.addMany(de(32,48),2,9,2),le.addMany(de(48,127),2,10,0),le.addMany(de(48,80),1,10,0),le.addMany(de(81,88),1,10,0),le.addMany([89,90,92],1,10,0),le.addMany(de(96,127),1,10,0),le.add(80,1,11,9),le.addMany(z,9,0,9),le.add(127,9,0,9),le.addMany(de(28,32),9,0,9),le.addMany(de(32,48),9,9,12),le.addMany(de(48,60),9,8,10),le.addMany([60,61,62,63],9,9,10),le.addMany(z,11,0,11),le.addMany(de(32,128),11,0,11),le.addMany(de(28,32),11,0,11),le.addMany(z,10,0,10),le.add(127,10,0,10),le.addMany(de(28,32),10,0,10),le.addMany(de(48,60),10,8,10),le.addMany([60,61,62,63],10,0,11),le.addMany(de(32,48),10,9,12),le.addMany(z,12,0,12),le.add(127,12,0,12),le.addMany(de(28,32),12,0,12),le.addMany(de(32,48),12,9,12),le.addMany(de(48,64),12,0,11),le.addMany(de(64,127),12,12,13),le.addMany(de(64,127),10,12,13),le.addMany(de(64,127),9,12,13),le.addMany(z,13,13,13),le.addMany(ce,13,13,13),le.add(127,13,0,13),le.addMany([27,156,24,26],13,14,0),le.add(160,0,2,0),le.add(160,8,5,8),le.add(160,6,0,6),le.add(160,11,0,11),le.add(160,13,13,13),le}();var ge=function(le){function ve(de){de===void 0&&(de=Ee.VT500_TRANSITION_TABLE);var ce=le.call(this)||this;return ce._transitions=de,ce.initialState=0,ce.currentState=ce.initialState,ce._params=new Le.Params,ce._params.addParam(0),ce._collect=0,ce.precedingCodepoint=0,ce._printHandlerFb=function(z,ee,oe){},ce._executeHandlerFb=function(z){},ce._csiHandlerFb=function(z,ee){},ce._escHandlerFb=function(z){},ce._errorHandlerFb=function(z){return z},ce._printHandler=ce._printHandlerFb,ce._executeHandlers=Object.create(null),ce._csiHandlers=Object.create(null),ce._escHandlers=Object.create(null),ce._oscParser=new he.OscParser,ce._dcsParser=new ye.DcsParser,ce._errorHandler=ce._errorHandlerFb,ce.setEscHandler({final:"\\"},function(){}),ce}return Be(ve,le),ve.prototype._identifier=function(de,ce){ce===void 0&&(ce=[64,126]);var z=0;if(de.prefix){if(de.prefix.length>1)throw new Error("only one byte as prefix supported");if((z=de.prefix.charCodeAt(0))&&60>z||z>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(de.intermediates){if(de.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var ee=0;ee<de.intermediates.length;++ee){var oe=de.intermediates.charCodeAt(ee);if(32>oe||oe>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");z<<=8,z|=oe}}if(de.final.length!==1)throw new Error("final must be a single byte");var ie=de.final.charCodeAt(0);if(ce[0]>ie||ie>ce[1])throw new Error("final must be in range "+ce[0]+" .. "+ce[1]);return z<<=8,z|=ie},ve.prototype.identToString=function(de){for(var ce=[];de;)ce.push(String.fromCharCode(255&de)),de>>=8;return ce.reverse().join("")},ve.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},ve.prototype.setPrintHandler=function(de){this._printHandler=de},ve.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},ve.prototype.addEscHandler=function(de,ce){var z=this._identifier(de,[48,126]);this._escHandlers[z]===void 0&&(this._escHandlers[z]=[]);var ee=this._escHandlers[z];return ee.push(ce),{dispose:function(){var oe=ee.indexOf(ce);oe!==-1&&ee.splice(oe,1)}}},ve.prototype.setEscHandler=function(de,ce){this._escHandlers[this._identifier(de,[48,126])]=[ce]},ve.prototype.clearEscHandler=function(de){this._escHandlers[this._identifier(de,[48,126])]&&delete this._escHandlers[this._identifier(de,[48,126])]},ve.prototype.setEscHandlerFallback=function(de){this._escHandlerFb=de},ve.prototype.setExecuteHandler=function(de,ce){this._executeHandlers[de.charCodeAt(0)]=ce},ve.prototype.clearExecuteHandler=function(de){this._executeHandlers[de.charCodeAt(0)]&&delete this._executeHandlers[de.charCodeAt(0)]},ve.prototype.setExecuteHandlerFallback=function(de){this._executeHandlerFb=de},ve.prototype.addCsiHandler=function(de,ce){var z=this._identifier(de);this._csiHandlers[z]===void 0&&(this._csiHandlers[z]=[]);var ee=this._csiHandlers[z];return ee.push(ce),{dispose:function(){var oe=ee.indexOf(ce);oe!==-1&&ee.splice(oe,1)}}},ve.prototype.setCsiHandler=function(de,ce){this._csiHandlers[this._identifier(de)]=[ce]},ve.prototype.clearCsiHandler=function(de){this._csiHandlers[this._identifier(de)]&&delete this._csiHandlers[this._identifier(de)]},ve.prototype.setCsiHandlerFallback=function(de){this._csiHandlerFb=de},ve.prototype.addDcsHandler=function(de,ce){return this._dcsParser.addHandler(this._identifier(de),ce)},ve.prototype.setDcsHandler=function(de,ce){this._dcsParser.setHandler(this._identifier(de),ce)},ve.prototype.clearDcsHandler=function(de){this._dcsParser.clearHandler(this._identifier(de))},ve.prototype.setDcsHandlerFallback=function(de){this._dcsParser.setHandlerFallback(de)},ve.prototype.addOscHandler=function(de,ce){return this._oscParser.addHandler(de,ce)},ve.prototype.setOscHandler=function(de,ce){this._oscParser.setHandler(de,ce)},ve.prototype.clearOscHandler=function(de){this._oscParser.clearHandler(de)},ve.prototype.setOscHandlerFallback=function(de){this._oscParser.setHandlerFallback(de)},ve.prototype.setErrorHandler=function(de){this._errorHandler=de},ve.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},ve.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0},ve.prototype.parse=function(de,ce){for(var z=0,ee=0,oe=this.currentState,ie=this._oscParser,se=this._dcsParser,ue=this._collect,Se=this._params,we=this._transitions.table,Pe=0;Pe<ce;++Pe){switch((ee=we[oe<<8|((z=de[Pe])<160?z:160)])>>4){case 2:for(var Ae=Pe+1;;++Ae){if(Ae>=ce||(z=de[Ae])<32||z>126&&z<160){this._printHandler(de,Pe,Ae),Pe=Ae-1;break}if(++Ae>=ce||(z=de[Ae])<32||z>126&&z<160){this._printHandler(de,Pe,Ae),Pe=Ae-1;break}if(++Ae>=ce||(z=de[Ae])<32||z>126&&z<160){this._printHandler(de,Pe,Ae),Pe=Ae-1;break}if(++Ae>=ce||(z=de[Ae])<32||z>126&&z<160){this._printHandler(de,Pe,Ae),Pe=Ae-1;break}}break;case 3:this._executeHandlers[z]?this._executeHandlers[z]():this._executeHandlerFb(z),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:Pe,code:z,currentState:oe,collect:ue,params:Se,abort:!1}).abort)return;break;case 7:for(var De=this._csiHandlers[ue<<8|z],ze=De?De.length-1:-1;ze>=0&&De[ze](Se)===!1;ze--);ze<0&&this._csiHandlerFb(ue<<8|z,Se),this.precedingCodepoint=0;break;case 8:do switch(z){case 59:Se.addParam(0);break;case 58:Se.addSubParam(-1);break;default:Se.addDigit(z-48)}while(++Pe<ce&&(z=de[Pe])>47&&z<60);Pe--;break;case 9:ue<<=8,ue|=z;break;case 10:for(var Ze=this._escHandlers[ue<<8|z],Xe=Ze?Ze.length-1:-1;Xe>=0&&Ze[Xe]()===!1;Xe--);Xe<0&&this._escHandlerFb(ue<<8|z),this.precedingCodepoint=0;break;case 11:Se.reset(),Se.addParam(0),ue=0;break;case 12:se.hook(ue<<8|z,Se);break;case 13:for(var Ge=Pe+1;;++Ge)if(Ge>=ce||(z=de[Ge])===24||z===26||z===27||z>127&&z<160){se.put(de,Pe,Ge),Pe=Ge-1;break}break;case 14:se.unhook(z!==24&&z!==26),z===27&&(ee|=1),Se.reset(),Se.addParam(0),ue=0,this.precedingCodepoint=0;break;case 4:ie.start();break;case 5:for(var ft=Pe+1;;ft++)if(ft>=ce||(z=de[ft])<32||z>127&&z<=159){ie.put(de,Pe,ft),Pe=ft-1;break}break;case 6:ie.end(z!==24&&z!==26),z===27&&(ee|=1),Se.reset(),Se.addParam(0),ue=0,this.precedingCodepoint=0}oe=15&ee}this._collect=ue,this.currentState=oe},ve}(ke.Disposable);Ee.EscapeSequenceParser=ge},function(qt,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(ie,se){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ue,Se){ue.__proto__=Se}||function(ue,Se){for(var we in Se)Se.hasOwnProperty(we)&&(ue[we]=Se[we])})(ie,se)},function(ie,se){function ue(){this.constructor=ie}me(ie,se),ie.prototype=se===null?Object.create(se):(ue.prototype=se.prototype,new ue)}),ke=this&&this.__decorate||function(ie,se,ue,Se){var we,Pe=arguments.length,Ae=Pe<3?se:Se===null?Se=Object.getOwnPropertyDescriptor(se,ue):Se;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ae=Reflect.decorate(ie,se,ue,Se);else for(var De=ie.length-1;De>=0;De--)(we=ie[De])&&(Ae=(Pe<3?we(Ae):Pe>3?we(se,ue,Ae):we(se,ue))||Ae);return Pe>3&&Ae&&Object.defineProperty(se,ue,Ae),Ae},Ce=this&&this.__param||function(ie,se){return function(ue,Se){se(ue,Se,ie)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Renderer=void 0;var Le=Me(41),he=Me(47),ye=Me(48),xe=Me(49),ge=Me(29),le=Me(2),ve=Me(5),de=Me(1),ce=Me(25),z=Me(0),ee=1,oe=function(ie){function se(ue,Se,we,Pe,Ae,De,ze,Ze,Xe){var Ge=ie.call(this)||this;Ge._colors=ue,Ge._screenElement=Se,Ge._bufferService=Ae,Ge._charSizeService=De,Ge._optionsService=ze,Ge._id=ee++,Ge._onRequestRedraw=new z.EventEmitter;var ft=Ge._optionsService.options.allowTransparency;return Ge._characterJoinerRegistry=new ge.CharacterJoinerRegistry(Ge._bufferService),Ge._renderLayers=[new Le.TextRenderLayer(Ge._screenElement,0,Ge._colors,Ge._characterJoinerRegistry,ft,Ge._id,Ge._bufferService,ze),new he.SelectionRenderLayer(Ge._screenElement,1,Ge._colors,Ge._id,Ge._bufferService,ze),new xe.LinkRenderLayer(Ge._screenElement,2,Ge._colors,Ge._id,we,Pe,Ge._bufferService,ze),new ye.CursorRenderLayer(Ge._screenElement,3,Ge._colors,Ge._id,Ge._onRequestRedraw,Ge._bufferService,ze,Ze,Xe)],Ge.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},Ge._devicePixelRatio=window.devicePixelRatio,Ge._updateDimensions(),Ge.onOptionsChanged(),Ge}return Be(se,ie),Object.defineProperty(se.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),se.prototype.dispose=function(){for(var ue=0,Se=this._renderLayers;ue<Se.length;ue++)Se[ue].dispose();ie.prototype.dispose.call(this),ce.removeTerminalFromCache(this._id)},se.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},se.prototype.setColors=function(ue){this._colors=ue;for(var Se=0,we=this._renderLayers;Se<we.length;Se++){var Pe=we[Se];Pe.setColors(this._colors),Pe.reset()}},se.prototype.onResize=function(ue,Se){this._updateDimensions();for(var we=0,Pe=this._renderLayers;we<Pe.length;we++)Pe[we].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},se.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},se.prototype.onBlur=function(){this._runOperation(function(ue){return ue.onBlur()})},se.prototype.onFocus=function(){this._runOperation(function(ue){return ue.onFocus()})},se.prototype.onSelectionChanged=function(ue,Se,we){we===void 0&&(we=!1),this._runOperation(function(Pe){return Pe.onSelectionChanged(ue,Se,we)})},se.prototype.onCursorMove=function(){this._runOperation(function(ue){return ue.onCursorMove()})},se.prototype.onOptionsChanged=function(){this._runOperation(function(ue){return ue.onOptionsChanged()})},se.prototype.clear=function(){this._runOperation(function(ue){return ue.reset()})},se.prototype._runOperation=function(ue){for(var Se=0,we=this._renderLayers;Se<we.length;Se++)ue(we[Se])},se.prototype.renderRows=function(ue,Se){for(var we=0,Pe=this._renderLayers;we<Pe.length;we++)Pe[we].onGridChanged(ue,Se)},se.prototype._updateDimensions=function(){this._charSizeService.hasValidSize&&(this.dimensions.scaledCharWidth=Math.floor(this._charSizeService.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharTop=this._optionsService.options.lineHeight===1?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._optionsService.options.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._bufferService.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._bufferService.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols)},se.prototype.registerCharacterJoiner=function(ue){return this._characterJoinerRegistry.registerCharacterJoiner(ue)},se.prototype.deregisterCharacterJoiner=function(ue){return this._characterJoinerRegistry.deregisterCharacterJoiner(ue)},se=ke([Ce(4,de.IBufferService),Ce(5,ve.ICharSizeService),Ce(6,de.IOptionsService),Ce(7,de.ICoreService),Ce(8,ve.ICoreBrowserService)],se)}(le.Disposable);Ee.Renderer=oe},function(qt,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(le,ve){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ce){de.__proto__=ce}||function(de,ce){for(var z in ce)ce.hasOwnProperty(z)&&(de[z]=ce[z])})(le,ve)},function(le,ve){function de(){this.constructor=le}me(le,ve),le.prototype=ve===null?Object.create(ve):(de.prototype=ve.prototype,new de)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.TextRenderLayer=void 0;var ke=Me(42),Ce=Me(13),Le=Me(6),he=Me(3),ye=Me(29),xe=Me(4),ge=function(le){function ve(de,ce,z,ee,oe,ie,se,ue){var Se=le.call(this,de,"text",ce,oe,z,ie,se,ue)||this;return Se._characterWidth=0,Se._characterFont="",Se._characterOverlapCache={},Se._workCell=new xe.CellData,Se._state=new ke.GridCache,Se._characterJoinerRegistry=ee,Se}return Be(ve,le),ve.prototype.resize=function(de){le.prototype.resize.call(this,de);var ce=this._getFont(!1,!1);this._characterWidth===de.scaledCharWidth&&this._characterFont===ce||(this._characterWidth=de.scaledCharWidth,this._characterFont=ce,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},ve.prototype.reset=function(){this._state.clear(),this._clearAll()},ve.prototype._forEachCell=function(de,ce,z,ee){for(var oe=de;oe<=ce;oe++)for(var ie=oe+this._bufferService.buffer.ydisp,se=this._bufferService.buffer.lines.get(ie),ue=z?z.getJoinedCharacters(ie):[],Se=0;Se<this._bufferService.cols;Se++){se.loadCell(Se,this._workCell);var we=this._workCell,Pe=!1,Ae=Se;if(we.getWidth()!==0){if(ue.length>0&&Se===ue[0][0]){Pe=!0;var De=ue.shift();we=new ye.JoinedCellData(this._workCell,se.translateToString(!0,De[0],De[1]),De[1]-De[0]),Ae=De[1]-1}!Pe&&this._isOverlapping(we)&&Ae<se.length-1&&se.getCodePoint(Ae+1)===he.NULL_CELL_CODE&&(we.content&=-12582913,we.content|=2<<22),ee(we,Se,oe),Se=Ae}}},ve.prototype._drawBackground=function(de,ce){var z=this,ee=this._ctx,oe=this._bufferService.cols,ie=0,se=0,ue=null;ee.save(),this._forEachCell(de,ce,null,function(Se,we,Pe){var Ae=null;Se.isInverse()?Ae=Se.isFgDefault()?z._colors.foreground.css:Se.isFgRGB()?"rgb("+Le.AttributeData.toColorRGB(Se.getFgColor()).join(",")+")":z._colors.ansi[Se.getFgColor()].css:Se.isBgRGB()?Ae="rgb("+Le.AttributeData.toColorRGB(Se.getBgColor()).join(",")+")":Se.isBgPalette()&&(Ae=z._colors.ansi[Se.getBgColor()].css),ue===null&&(ie=we,se=Pe),Pe!==se?(ee.fillStyle=ue||"",z._fillCells(ie,se,oe-ie,1),ie=we,se=Pe):ue!==Ae&&(ee.fillStyle=ue||"",z._fillCells(ie,se,we-ie,1),ie=we,se=Pe),ue=Ae}),ue!==null&&(ee.fillStyle=ue,this._fillCells(ie,se,oe-ie,1)),ee.restore()},ve.prototype._drawForeground=function(de,ce){var z=this;this._forEachCell(de,ce,this._characterJoinerRegistry,function(ee,oe,ie){if(!ee.isInvisible()&&(z._drawChars(ee,oe,ie),ee.isUnderline())){if(z._ctx.save(),ee.isInverse())if(ee.isBgDefault())z._ctx.fillStyle=z._colors.background.css;else if(ee.isBgRGB())z._ctx.fillStyle="rgb("+Le.AttributeData.toColorRGB(ee.getBgColor()).join(",")+")";else{var se=ee.getBgColor();z._optionsService.options.drawBoldTextInBrightColors&&ee.isBold()&&se<8&&(se+=8),z._ctx.fillStyle=z._colors.ansi[se].css}else if(ee.isFgDefault())z._ctx.fillStyle=z._colors.foreground.css;else if(ee.isFgRGB())z._ctx.fillStyle="rgb("+Le.AttributeData.toColorRGB(ee.getFgColor()).join(",")+")";else{var ue=ee.getFgColor();z._optionsService.options.drawBoldTextInBrightColors&&ee.isBold()&&ue<8&&(ue+=8),z._ctx.fillStyle=z._colors.ansi[ue].css}z._fillBottomLineAtCells(oe,ie,ee.getWidth()),z._ctx.restore()}})},ve.prototype.onGridChanged=function(de,ce){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,de,this._bufferService.cols,ce-de+1),this._drawBackground(de,ce),this._drawForeground(de,ce))},ve.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},ve.prototype._isOverlapping=function(de){if(de.getWidth()!==1||de.getCode()<256)return!1;var ce=de.getChars();if(this._characterOverlapCache.hasOwnProperty(ce))return this._characterOverlapCache[ce];this._ctx.save(),this._ctx.font=this._characterFont;var z=Math.floor(this._ctx.measureText(ce).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[ce]=z,z},ve}(Ce.BaseRenderLayer);Ee.TextRenderLayer=ge},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.GridCache=void 0;var me=function(){function Be(){this.cache=[]}return Be.prototype.resize=function(ke,Ce){for(var Le=0;Le<ke;Le++){this.cache.length<=Le&&this.cache.push([]);for(var he=this.cache[Le].length;he<Ce;he++)this.cache[Le].push(void 0);this.cache[Le].length=Ce}this.cache.length=ke},Be.prototype.clear=function(){for(var ke=0;ke<this.cache.length;ke++)for(var Ce=0;Ce<this.cache[ke].length;Ce++)this.cache[ke][Ce]=void 0},Be}();Ee.GridCache=me},function(qt,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(z,ee){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(oe,ie){oe.__proto__=ie}||function(oe,ie){for(var se in ie)ie.hasOwnProperty(se)&&(oe[se]=ie[se])})(z,ee)},function(z,ee){function oe(){this.constructor=z}me(z,ee),z.prototype=ee===null?Object.create(ee):(oe.prototype=ee.prototype,new oe)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.NoneCharAtlas=Ee.DynamicCharAtlas=Ee.getGlyphCacheKey=void 0;var ke=Me(9),Ce=Me(44),Le=Me(27),he=Me(46),ye=Me(11),xe=Me(28),ge=Me(10),le={css:"rgba(0, 0, 0, 0)",rgba:0};function ve(z){return z.code<<21|z.bg<<12|z.fg<<3|(z.bold?0:4)+(z.dim?0:2)+(z.italic?0:1)}Ee.getGlyphCacheKey=ve;var de=function(z){function ee(oe,ie){var se=z.call(this)||this;se._config=ie,se._drawToCacheCount=0,se._glyphsWaitingOnBitmap=[],se._bitmapCommitTimeout=null,se._bitmap=null,se._cacheCanvas=oe.createElement("canvas"),se._cacheCanvas.width=1024,se._cacheCanvas.height=1024,se._cacheCtx=xe.throwIfFalsy(se._cacheCanvas.getContext("2d",{alpha:!0}));var ue=oe.createElement("canvas");ue.width=se._config.scaledCharWidth,ue.height=se._config.scaledCharHeight,se._tmpCtx=xe.throwIfFalsy(ue.getContext("2d",{alpha:se._config.allowTransparency})),se._width=Math.floor(1024/se._config.scaledCharWidth),se._height=Math.floor(1024/se._config.scaledCharHeight);var Se=se._width*se._height;return se._cacheMap=new he.LRUMap(Se),se._cacheMap.prealloc(Se),se}return Be(ee,z),ee.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},ee.prototype.beginFrame=function(){this._drawToCacheCount=0},ee.prototype.draw=function(oe,ie,se,ue){if(ie.code===32)return!0;if(!this._canCache(ie))return!1;var Se=ve(ie),we=this._cacheMap.get(Se);if(we!=null)return this._drawFromCache(oe,we,se,ue),!0;if(this._drawToCacheCount<100){var Pe=void 0;Pe=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var Ae=this._drawToCache(ie,Pe);return this._cacheMap.set(Se,Ae),this._drawFromCache(oe,Ae,se,ue),!0}return!1},ee.prototype._canCache=function(oe){return oe.code<256},ee.prototype._toCoordinateX=function(oe){return oe%this._width*this._config.scaledCharWidth},ee.prototype._toCoordinateY=function(oe){return Math.floor(oe/this._width)*this._config.scaledCharHeight},ee.prototype._drawFromCache=function(oe,ie,se,ue){if(!ie.isEmpty){var Se=this._toCoordinateX(ie.index),we=this._toCoordinateY(ie.index);oe.drawImage(ie.inBitmap?this._bitmap:this._cacheCanvas,Se,we,this._config.scaledCharWidth,this._config.scaledCharHeight,se,ue,this._config.scaledCharWidth,this._config.scaledCharHeight)}},ee.prototype._getColorFromAnsiIndex=function(oe){return oe<this._config.colors.ansi.length?this._config.colors.ansi[oe]:Le.DEFAULT_ANSI_COLORS[oe]},ee.prototype._getBackgroundColor=function(oe){return this._config.allowTransparency?le:oe.bg===ke.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:oe.bg<256?this._getColorFromAnsiIndex(oe.bg):this._config.colors.background},ee.prototype._getForegroundColor=function(oe){return oe.fg===ke.INVERTED_DEFAULT_COLOR?ge.color.opaque(this._config.colors.background):oe.fg<256?this._getColorFromAnsiIndex(oe.fg):this._config.colors.foreground},ee.prototype._drawToCache=function(oe,ie){this._drawToCacheCount++,this._tmpCtx.save();var se=this._getBackgroundColor(oe);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=se.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var ue=oe.bold?this._config.fontWeightBold:this._config.fontWeight,Se=oe.italic?"italic":"";this._tmpCtx.font=Se+" "+ue+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline="middle",this._tmpCtx.fillStyle=this._getForegroundColor(oe).css,oe.dim&&(this._tmpCtx.globalAlpha=ke.DIM_OPACITY),this._tmpCtx.fillText(oe.chars,0,this._config.scaledCharHeight/2),this._tmpCtx.restore();var we=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),Pe=!1;this._config.allowTransparency||(Pe=function(Ze,Xe){for(var Ge=!0,ft=Xe.rgba>>>24,at=Xe.rgba>>>16&255,Ct=Xe.rgba>>>8&255,et=0;et<Ze.data.length;et+=4)Ze.data[et]===ft&&Ze.data[et+1]===at&&Ze.data[et+2]===Ct?Ze.data[et+3]=0:Ge=!1;return Ge}(we,se));var Ae=this._toCoordinateX(ie),De=this._toCoordinateY(ie);this._cacheCtx.putImageData(we,Ae,De);var ze={index:ie,isEmpty:Pe,inBitmap:!1};return this._addGlyphToBitmap(ze),ze},ee.prototype._addGlyphToBitmap=function(oe){var ie=this;!("createImageBitmap"in window)||ye.isFirefox||ye.isSafari||(this._glyphsWaitingOnBitmap.push(oe),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return ie._generateBitmap()},100)))},ee.prototype._generateBitmap=function(){var oe=this,ie=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(se){oe._bitmap=se;for(var ue=0;ue<ie.length;ue++)ie[ue].inBitmap=!0}),this._bitmapCommitTimeout=null},ee}(Ce.BaseCharAtlas);Ee.DynamicCharAtlas=de;var ce=function(z){function ee(oe,ie){return z.call(this)||this}return Be(ee,z),ee.prototype.draw=function(oe,ie,se,ue){return!1},ee}(Ce.BaseCharAtlas);Ee.NoneCharAtlas=ce},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BaseCharAtlas=void 0;var me=function(){function Be(){this._didWarmUp=!1}return Be.prototype.dispose=function(){},Be.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},Be.prototype._doWarmUp=function(){},Be.prototype.beginFrame=function(){},Be}();Ee.BaseCharAtlas=me},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.ColorContrastCache=void 0;var me=function(){function Be(){this._color={},this._rgba={}}return Be.prototype.clear=function(){this._color={},this._rgba={}},Be.prototype.setCss=function(ke,Ce,Le){this._rgba[ke]||(this._rgba[ke]={}),this._rgba[ke][Ce]=Le},Be.prototype.getCss=function(ke,Ce){return this._rgba[ke]?this._rgba[ke][Ce]:void 0},Be.prototype.setColor=function(ke,Ce,Le){this._color[ke]||(this._color[ke]={}),this._color[ke][Ce]=Le},Be.prototype.getColor=function(ke,Ce){return this._color[ke]?this._color[ke][Ce]:void 0},Be}();Ee.ColorContrastCache=me},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.LRUMap=void 0;var me=function(){function Be(ke){this.capacity=ke,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return Be.prototype._unlinkNode=function(ke){var Ce=ke.prev,Le=ke.next;ke===this._head&&(this._head=Le),ke===this._tail&&(this._tail=Ce),Ce!==null&&(Ce.next=Le),Le!==null&&(Le.prev=Ce)},Be.prototype._appendNode=function(ke){var Ce=this._tail;Ce!==null&&(Ce.next=ke),ke.prev=Ce,ke.next=null,this._tail=ke,this._head===null&&(this._head=ke)},Be.prototype.prealloc=function(ke){for(var Ce=this._nodePool,Le=0;Le<ke;Le++)Ce.push({prev:null,next:null,key:null,value:null})},Be.prototype.get=function(ke){var Ce=this._map[ke];return Ce!==void 0?(this._unlinkNode(Ce),this._appendNode(Ce),Ce.value):null},Be.prototype.peekValue=function(ke){var Ce=this._map[ke];return Ce!==void 0?Ce.value:null},Be.prototype.peek=function(){var ke=this._head;return ke===null?null:ke.value},Be.prototype.set=function(ke,Ce){var Le=this._map[ke];if(Le!==void 0)Le=this._map[ke],this._unlinkNode(Le),Le.value=Ce;else if(this.size>=this.capacity)Le=this._head,this._unlinkNode(Le),delete this._map[Le.key],Le.key=ke,Le.value=Ce,this._map[ke]=Le;else{var he=this._nodePool;he.length>0?((Le=he.pop()).key=ke,Le.value=Ce):Le={prev:null,next:null,key:ke,value:Ce},this._map[ke]=Le,this.size++}this._appendNode(Le)},Be}();Ee.LRUMap=me},function(qt,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(Ce,Le){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(he,ye){he.__proto__=ye}||function(he,ye){for(var xe in ye)ye.hasOwnProperty(xe)&&(he[xe]=ye[xe])})(Ce,Le)},function(Ce,Le){function he(){this.constructor=Ce}me(Ce,Le),Ce.prototype=Le===null?Object.create(Le):(he.prototype=Le.prototype,new he)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.SelectionRenderLayer=void 0;var ke=function(Ce){function Le(he,ye,xe,ge,le,ve){var de=Ce.call(this,he,"selection",ye,!0,xe,ge,le,ve)||this;return de._clearState(),de}return Be(Le,Ce),Le.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},Le.prototype.resize=function(he){Ce.prototype.resize.call(this,he),this._clearState()},Le.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},Le.prototype.onSelectionChanged=function(he,ye,xe){if(this._didStateChange(he,ye,xe,this._bufferService.buffer.ydisp))if(this._clearAll(),he&&ye){var ge=he[1]-this._bufferService.buffer.ydisp,le=ye[1]-this._bufferService.buffer.ydisp,ve=Math.max(ge,0),de=Math.min(le,this._bufferService.rows-1);if(!(ve>=this._bufferService.rows||de<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,xe){var ce=he[0],z=ye[0]-ce,ee=de-ve+1;this._fillCells(ce,ve,z,ee)}else{ce=ge===ve?he[0]:0;var oe=ve===de?ye[0]:this._bufferService.cols;this._fillCells(ce,ve,oe-ce,1);var ie=Math.max(de-ve-1,0);if(this._fillCells(0,ve+1,this._bufferService.cols,ie),ve!==de){var se=le===de?ye[0]:this._bufferService.cols;this._fillCells(0,de,se,1)}}this._state.start=[he[0],he[1]],this._state.end=[ye[0],ye[1]],this._state.columnSelectMode=xe,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},Le.prototype._didStateChange=function(he,ye,xe,ge){return!this._areCoordinatesEqual(he,this._state.start)||!this._areCoordinatesEqual(ye,this._state.end)||xe!==this._state.columnSelectMode||ge!==this._state.ydisp},Le.prototype._areCoordinatesEqual=function(he,ye){return!(!he||!ye)&&he[0]===ye[0]&&he[1]===ye[1]},Le}(Me(13).BaseRenderLayer);Ee.SelectionRenderLayer=ke},function(qt,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(ye,xe){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ge,le){ge.__proto__=le}||function(ge,le){for(var ve in le)le.hasOwnProperty(ve)&&(ge[ve]=le[ve])})(ye,xe)},function(ye,xe){function ge(){this.constructor=ye}me(ye,xe),ye.prototype=xe===null?Object.create(xe):(ge.prototype=xe.prototype,new ge)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CursorRenderLayer=void 0;var ke=Me(13),Ce=Me(4),Le=function(ye){function xe(ge,le,ve,de,ce,z,ee,oe,ie){var se=ye.call(this,ge,"cursor",le,!0,ve,de,z,ee)||this;return se._onRequestRedraw=ce,se._coreService=oe,se._coreBrowserService=ie,se._cell=new Ce.CellData,se._state={x:0,y:0,isFocused:!1,style:"",width:0},se._cursorRenderers={bar:se._renderBarCursor.bind(se),block:se._renderBlockCursor.bind(se),underline:se._renderUnderlineCursor.bind(se)},se}return Be(xe,ye),xe.prototype.resize=function(ge){ye.prototype.resize.call(this,ge),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},xe.prototype.reset=function(){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0,this.onOptionsChanged())},xe.prototype.onBlur=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},xe.prototype.onFocus=function(){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume():this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},xe.prototype.onOptionsChanged=function(){var ge,le=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new he(this._coreBrowserService.isFocused,function(){le._render(!0)})):((ge=this._cursorBlinkStateManager)===null||ge===void 0||ge.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},xe.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},xe.prototype.onGridChanged=function(ge,le){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},xe.prototype._render=function(ge){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var le=this._bufferService.buffer.ybase+this._bufferService.buffer.y,ve=le-this._bufferService.buffer.ydisp;if(ve<0||ve>=this._bufferService.rows)this._clearCursor();else{var de=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(le).loadCell(de,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var ce=this._optionsService.options.cursorStyle;return ce&&ce!=="block"?this._cursorRenderers[ce](de,ve,this._cell):this._renderBlurCursor(de,ve,this._cell),this._ctx.restore(),this._state.x=de,this._state.y=ve,this._state.isFocused=!1,this._state.style=ce,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===de&&this._state.y===ve&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.options.cursorStyle||"block"](de,ve,this._cell),this._ctx.restore(),this._state.x=de,this._state.y=ve,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},xe.prototype._clearCursor=function(){this._state&&(this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},xe.prototype._renderBarCursor=function(ge,le,ve){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(ge,le,this._optionsService.options.cursorWidth),this._ctx.restore()},xe.prototype._renderBlockCursor=function(ge,le,ve){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(ge,le,ve.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(ve,ge,le),this._ctx.restore()},xe.prototype._renderUnderlineCursor=function(ge,le,ve){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(ge,le),this._ctx.restore()},xe.prototype._renderBlurCursor=function(ge,le,ve){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(ge,le,ve.getWidth(),1),this._ctx.restore()},xe}(ke.BaseRenderLayer);Ee.CursorRenderLayer=Le;var he=function(){function ye(xe,ge){this._renderCallback=ge,this.isCursorVisible=!0,xe&&this._restartInterval()}return Object.defineProperty(ye.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),ye.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},ye.prototype.restartBlinkAnimation=function(){var xe=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){xe._renderCallback(),xe._animationFrame=void 0})))},ye.prototype._restartInterval=function(xe){var ge=this;xe===void 0&&(xe=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=window.setTimeout(function(){if(ge._animationTimeRestarted){var le=600-(Date.now()-ge._animationTimeRestarted);if(ge._animationTimeRestarted=void 0,le>0)return void ge._restartInterval(le)}ge.isCursorVisible=!1,ge._animationFrame=window.requestAnimationFrame(function(){ge._renderCallback(),ge._animationFrame=void 0}),ge._blinkInterval=window.setInterval(function(){if(ge._animationTimeRestarted){var ve=600-(Date.now()-ge._animationTimeRestarted);return ge._animationTimeRestarted=void 0,void ge._restartInterval(ve)}ge.isCursorVisible=!ge.isCursorVisible,ge._animationFrame=window.requestAnimationFrame(function(){ge._renderCallback(),ge._animationFrame=void 0})},600)},xe)},ye.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},ye.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},ye}()},function(qt,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(ye,xe){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ge,le){ge.__proto__=le}||function(ge,le){for(var ve in le)le.hasOwnProperty(ve)&&(ge[ve]=le[ve])})(ye,xe)},function(ye,xe){function ge(){this.constructor=ye}me(ye,xe),ye.prototype=xe===null?Object.create(xe):(ge.prototype=xe.prototype,new ge)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.LinkRenderLayer=void 0;var ke=Me(13),Ce=Me(9),Le=Me(26),he=function(ye){function xe(ge,le,ve,de,ce,z,ee,oe){var ie=ye.call(this,ge,"link",le,!0,ve,de,ee,oe)||this;return ce.onShowLinkUnderline(function(se){return ie._onShowLinkUnderline(se)}),ce.onHideLinkUnderline(function(se){return ie._onHideLinkUnderline(se)}),z.onShowLinkUnderline(function(se){return ie._onShowLinkUnderline(se)}),z.onHideLinkUnderline(function(se){return ie._onHideLinkUnderline(se)}),ie}return Be(xe,ye),xe.prototype.resize=function(ge){ye.prototype.resize.call(this,ge),this._state=void 0},xe.prototype.reset=function(){this._clearCurrentLink()},xe.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var ge=this._state.y2-this._state.y1-1;ge>0&&this._clearCells(0,this._state.y1+1,this._state.cols,ge),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},xe.prototype._onShowLinkUnderline=function(ge){if(ge.fg===Ce.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:ge.fg&&Le.is256Color(ge.fg)?this._ctx.fillStyle=this._colors.ansi[ge.fg].css:this._ctx.fillStyle=this._colors.foreground.css,ge.y1===ge.y2)this._fillBottomLineAtCells(ge.x1,ge.y1,ge.x2-ge.x1);else{this._fillBottomLineAtCells(ge.x1,ge.y1,ge.cols-ge.x1);for(var le=ge.y1+1;le<ge.y2;le++)this._fillBottomLineAtCells(0,le,ge.cols);this._fillBottomLineAtCells(0,ge.y2,ge.x2)}this._state=ge},xe.prototype._onHideLinkUnderline=function(ge){this._clearCurrentLink()},xe}(ke.BaseRenderLayer);Ee.LinkRenderLayer=he},function(qt,Ee,Me){"use strict";var me=this&&this.__decorate||function(ye,xe,ge,le){var ve,de=arguments.length,ce=de<3?xe:le===null?le=Object.getOwnPropertyDescriptor(xe,ge):le;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ce=Reflect.decorate(ye,xe,ge,le);else for(var z=ye.length-1;z>=0;z--)(ve=ye[z])&&(ce=(de<3?ve(ce):de>3?ve(xe,ge,ce):ve(xe,ge))||ce);return de>3&&ce&&Object.defineProperty(xe,ge,ce),ce},Be=this&&this.__param||function(ye,xe){return function(ge,le){xe(ge,le,ye)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.MouseZone=Ee.Linkifier=void 0;var ke=Me(0),Ce=Me(1),Le=function(){function ye(xe,ge,le){this._bufferService=xe,this._logService=ge,this._unicodeService=le,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new ke.EventEmitter,this._onHideLinkUnderline=new ke.EventEmitter,this._onLinkTooltip=new ke.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(ye.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),ye.prototype.attachToDom=function(xe,ge){this._element=xe,this._mouseZoneManager=ge},ye.prototype.linkifyRows=function(xe,ge){var le=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=xe,this._rowsToLinkify.end=ge):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,xe),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,ge)),this._mouseZoneManager.clearAll(xe,ge),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return le._linkifyRows()},ye._timeBeforeLatency))},ye.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var xe=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var ge=xe.ydisp+this._rowsToLinkify.start;if(!(ge>=xe.lines.length)){for(var le=xe.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,ve=Math.ceil(2e3/this._bufferService.cols),de=this._bufferService.buffer.iterator(!1,ge,le,ve,ve);de.hasNext();)for(var ce=de.next(),z=0;z<this._linkMatchers.length;z++)this._doLinkifyRow(ce.range.first,ce.content,this._linkMatchers[z]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},ye.prototype.registerLinkMatcher=function(xe,ge,le){if(le===void 0&&(le={}),!ge)throw new Error("handler must be defined");var ve={id:this._nextLinkMatcherId++,regex:xe,handler:ge,matchIndex:le.matchIndex,validationCallback:le.validationCallback,hoverTooltipCallback:le.tooltipCallback,hoverLeaveCallback:le.leaveCallback,willLinkActivate:le.willLinkActivate,priority:le.priority||0};return this._addLinkMatcherToList(ve),ve.id},ye.prototype._addLinkMatcherToList=function(xe){if(this._linkMatchers.length!==0){for(var ge=this._linkMatchers.length-1;ge>=0;ge--)if(xe.priority<=this._linkMatchers[ge].priority)return void this._linkMatchers.splice(ge+1,0,xe);this._linkMatchers.splice(0,0,xe)}else this._linkMatchers.push(xe)},ye.prototype.deregisterLinkMatcher=function(xe){for(var ge=0;ge<this._linkMatchers.length;ge++)if(this._linkMatchers[ge].id===xe)return this._linkMatchers.splice(ge,1),!0;return!1},ye.prototype._doLinkifyRow=function(xe,ge,le){for(var ve,de=this,ce=new RegExp(le.regex.source,(le.regex.flags||"")+"g"),z=-1,ee=function(){var ie=ve[typeof le.matchIndex!="number"?0:le.matchIndex];if(!ie)return oe._logService.debug("match found without corresponding matchIndex",ve,le),"break";if(z=ge.indexOf(ie,z+1),ce.lastIndex=z+ie.length,z<0)return"break";var se=oe._bufferService.buffer.stringIndexToBufferIndex(xe,z);if(se[0]<0)return"break";var ue=oe._bufferService.buffer.lines.get(se[0]);if(!ue)return"break";var Se=ue.getFg(se[1]),we=Se?Se>>9&511:void 0;le.validationCallback?le.validationCallback(ie,function(Pe){de._rowsTimeoutId||Pe&&de._addLink(se[1],se[0]-de._bufferService.buffer.ydisp,ie,le,we)}):oe._addLink(se[1],se[0]-oe._bufferService.buffer.ydisp,ie,le,we)},oe=this;(ve=ce.exec(ge))!==null&&ee()!=="break";);},ye.prototype._addLink=function(xe,ge,le,ve,de){var ce=this;if(this._mouseZoneManager&&this._element){var z=this._unicodeService.getStringCellWidth(le),ee=xe%this._bufferService.cols,oe=ge+Math.floor(xe/this._bufferService.cols),ie=(ee+z)%this._bufferService.cols,se=oe+Math.floor((ee+z)/this._bufferService.cols);ie===0&&(ie=this._bufferService.cols,se--),this._mouseZoneManager.add(new he(ee+1,oe+1,ie+1,se+1,function(ue){if(ve.handler)return ve.handler(ue,le);var Se=window.open();Se?(Se.opener=null,Se.location.href=le):console.warn("Opening link blocked as opener could not be cleared")},function(){ce._onShowLinkUnderline.fire(ce._createLinkHoverEvent(ee,oe,ie,se,de)),ce._element.classList.add("xterm-cursor-pointer")},function(ue){ce._onLinkTooltip.fire(ce._createLinkHoverEvent(ee,oe,ie,se,de)),ve.hoverTooltipCallback&&ve.hoverTooltipCallback(ue,le,{start:{x:ee,y:oe},end:{x:ie,y:se}})},function(){ce._onHideLinkUnderline.fire(ce._createLinkHoverEvent(ee,oe,ie,se,de)),ce._element.classList.remove("xterm-cursor-pointer"),ve.hoverLeaveCallback&&ve.hoverLeaveCallback()},function(ue){return!ve.willLinkActivate||ve.willLinkActivate(ue,le)}))}},ye.prototype._createLinkHoverEvent=function(xe,ge,le,ve,de){return{x1:xe,y1:ge,x2:le,y2:ve,cols:this._bufferService.cols,fg:de}},ye._timeBeforeLatency=200,ye=me([Be(0,Ce.IBufferService),Be(1,Ce.ILogService),Be(2,Ce.IUnicodeService)],ye)}();Ee.Linkifier=Le;var he=function(ye,xe,ge,le,ve,de,ce,z,ee){this.x1=ye,this.y1=xe,this.x2=ge,this.y2=le,this.clickCallback=ve,this.hoverCallback=de,this.tooltipCallback=ce,this.leaveCallback=z,this.willLinkActivate=ee};Ee.MouseZone=he},function(qt,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(ie,se){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ue,Se){ue.__proto__=Se}||function(ue,Se){for(var we in Se)Se.hasOwnProperty(we)&&(ue[we]=Se[we])})(ie,se)},function(ie,se){function ue(){this.constructor=ie}me(ie,se),ie.prototype=se===null?Object.create(se):(ue.prototype=se.prototype,new ue)}),ke=this&&this.__decorate||function(ie,se,ue,Se){var we,Pe=arguments.length,Ae=Pe<3?se:Se===null?Se=Object.getOwnPropertyDescriptor(se,ue):Se;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ae=Reflect.decorate(ie,se,ue,Se);else for(var De=ie.length-1;De>=0;De--)(we=ie[De])&&(Ae=(Pe<3?we(Ae):Pe>3?we(se,ue,Ae):we(se,ue))||Ae);return Pe>3&&Ae&&Object.defineProperty(se,ue,Ae),Ae},Ce=this&&this.__param||function(ie,se){return function(ue,Se){se(ue,Se,ie)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.SelectionService=void 0;var Le=Me(11),he=Me(52),ye=Me(4),xe=Me(0),ge=Me(5),le=Me(1),ve=Me(30),de=Me(53),ce=Me(2),z="\xA0",ee=new RegExp(z,"g"),oe=function(ie){function se(ue,Se,we,Pe,Ae,De,ze){var Ze=ie.call(this)||this;return Ze._element=ue,Ze._screenElement=Se,Ze._bufferService=we,Ze._coreService=Pe,Ze._mouseService=Ae,Ze._optionsService=De,Ze._renderService=ze,Ze._dragScrollAmount=0,Ze._enabled=!0,Ze._workCell=new ye.CellData,Ze._mouseDownTimeStamp=0,Ze._onLinuxMouseSelection=Ze.register(new xe.EventEmitter),Ze._onRedrawRequest=Ze.register(new xe.EventEmitter),Ze._onSelectionChange=Ze.register(new xe.EventEmitter),Ze._onRequestScrollLines=Ze.register(new xe.EventEmitter),Ze._mouseMoveListener=function(Xe){return Ze._onMouseMove(Xe)},Ze._mouseUpListener=function(Xe){return Ze._onMouseUp(Xe)},Ze._coreService.onUserInput(function(){Ze.hasSelection&&Ze.clearSelection()}),Ze._trimListener=Ze._bufferService.buffer.lines.onTrim(function(Xe){return Ze._onTrim(Xe)}),Ze.register(Ze._bufferService.buffers.onBufferActivate(function(Xe){return Ze._onBufferActivate(Xe)})),Ze.enable(),Ze._model=new he.SelectionModel(Ze._bufferService),Ze._activeSelectionMode=0,Ze}return Be(se,ie),Object.defineProperty(se.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),se.prototype.dispose=function(){this._removeMouseDownListeners()},se.prototype.reset=function(){this.clearSelection()},se.prototype.disable=function(){this.clearSelection(),this._enabled=!1},se.prototype.enable=function(){this._enabled=!0},Object.defineProperty(se.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"hasSelection",{get:function(){var ue=this._model.finalSelectionStart,Se=this._model.finalSelectionEnd;return!(!ue||!Se)&&(ue[0]!==Se[0]||ue[1]!==Se[1])},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"selectionText",{get:function(){var ue=this._model.finalSelectionStart,Se=this._model.finalSelectionEnd;if(!ue||!Se)return"";var we=this._bufferService.buffer,Pe=[];if(this._activeSelectionMode===3){if(ue[0]===Se[0])return"";for(var Ae=ue[1];Ae<=Se[1];Ae++){var De=we.translateBufferLineToString(Ae,!0,ue[0],Se[0]);Pe.push(De)}}else{var ze=ue[1]===Se[1]?Se[0]:void 0;for(Pe.push(we.translateBufferLineToString(ue[1],!0,ue[0],ze)),Ae=ue[1]+1;Ae<=Se[1]-1;Ae++){var Ze=we.lines.get(Ae);De=we.translateBufferLineToString(Ae,!0),Ze&&Ze.isWrapped?Pe[Pe.length-1]+=De:Pe.push(De)}ue[1]!==Se[1]&&(Ze=we.lines.get(Se[1]),De=we.translateBufferLineToString(Se[1],!0,0,Se[0]),Ze&&Ze.isWrapped?Pe[Pe.length-1]+=De:Pe.push(De))}return Pe.map(function(Xe){return Xe.replace(ee," ")}).join(Le.isWindows?`\r
|
|
|
`:`
|
|
|
`)},enumerable:!1,configurable:!0}),se.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},se.prototype.refresh=function(ue){var Se=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return Se._refresh()})),Le.isLinux&&ue&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},se.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},se.prototype.isClickInSelection=function(ue){var Se=this._getMouseBufferCoords(ue),we=this._model.finalSelectionStart,Pe=this._model.finalSelectionEnd;return!!(we&&Pe&&Se)&&this._areCoordsInSelection(Se,we,Pe)},se.prototype._areCoordsInSelection=function(ue,Se,we){return ue[1]>Se[1]&&ue[1]<we[1]||Se[1]===we[1]&&ue[1]===Se[1]&&ue[0]>=Se[0]&&ue[0]<we[0]||Se[1]<we[1]&&ue[1]===we[1]&&ue[0]<we[0]||Se[1]<we[1]&&ue[1]===Se[1]&&ue[0]>=Se[0]},se.prototype.selectWordAtCursor=function(ue){var Se=this._getMouseBufferCoords(ue);Se&&(this._selectWordAt(Se,!1),this._model.selectionEnd=void 0,this.refresh(!0))},se.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},se.prototype.selectLines=function(ue,Se){this._model.clearSelection(),ue=Math.max(ue,0),Se=Math.min(Se,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,ue],this._model.selectionEnd=[this._bufferService.cols,Se],this.refresh(),this._onSelectionChange.fire()},se.prototype._onTrim=function(ue){this._model.onTrim(ue)&&this.refresh()},se.prototype._getMouseBufferCoords=function(ue){var Se=this._mouseService.getCoords(ue,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(Se)return Se[0]--,Se[1]--,Se[1]+=this._bufferService.buffer.ydisp,Se},se.prototype._getMouseEventScrollAmount=function(ue){var Se=ve.getCoordsRelativeToElement(ue,this._screenElement)[1],we=this._renderService.dimensions.canvasHeight;return Se>=0&&Se<=we?0:(Se>we&&(Se-=we),Se=Math.min(Math.max(Se,-50),50),(Se/=50)/Math.abs(Se)+Math.round(14*Se))},se.prototype.shouldForceSelection=function(ue){return Le.isMac?ue.altKey&&this._optionsService.options.macOptionClickForcesSelection:ue.shiftKey},se.prototype.onMouseDown=function(ue){if(this._mouseDownTimeStamp=ue.timeStamp,(ue.button!==2||!this.hasSelection)&&ue.button===0){if(!this._enabled){if(!this.shouldForceSelection(ue))return;ue.stopPropagation()}ue.preventDefault(),this._dragScrollAmount=0,this._enabled&&ue.shiftKey?this._onIncrementalClick(ue):ue.detail===1?this._onSingleClick(ue):ue.detail===2?this._onDoubleClick(ue):ue.detail===3&&this._onTripleClick(ue),this._addMouseDownListeners(),this.refresh(!0)}},se.prototype._addMouseDownListeners=function(){var ue=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return ue._dragScroll()},50)},se.prototype._removeMouseDownListeners=function(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0},se.prototype._onIncrementalClick=function(ue){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(ue))},se.prototype._onSingleClick=function(ue){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(ue)?3:0,this._model.selectionStart=this._getMouseBufferCoords(ue),this._model.selectionStart){this._model.selectionEnd=void 0;var Se=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);Se&&Se.length!==this._model.selectionStart[0]&&Se.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},se.prototype._onDoubleClick=function(ue){var Se=this._getMouseBufferCoords(ue);Se&&(this._activeSelectionMode=1,this._selectWordAt(Se,!0))},se.prototype._onTripleClick=function(ue){var Se=this._getMouseBufferCoords(ue);Se&&(this._activeSelectionMode=2,this._selectLineAt(Se[1]))},se.prototype.shouldColumnSelect=function(ue){return ue.altKey&&!(Le.isMac&&this._optionsService.options.macOptionClickForcesSelection)},se.prototype._onMouseMove=function(ue){if(ue.stopImmediatePropagation(),this._model.selectionStart){var Se=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(ue),this._model.selectionEnd){this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(ue),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var we=this._bufferService.buffer;if(this._model.selectionEnd[1]<we.lines.length){var Pe=we.lines.get(this._model.selectionEnd[1]);Pe&&Pe.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}Se&&Se[0]===this._model.selectionEnd[0]&&Se[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},se.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var ue=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(ue.ydisp+this._bufferService.rows,ue.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=ue.ydisp),this.refresh()}},se.prototype._onMouseUp=function(ue){var Se=ue.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&Se<500&&ue.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var we=this._mouseService.getCoords(ue,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(we&&we[0]!==void 0&&we[1]!==void 0){var Pe=de.moveToCellSequence(we[0]-1,we[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(Pe,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},se.prototype._onBufferActivate=function(ue){var Se=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=ue.activeBuffer.lines.onTrim(function(we){return Se._onTrim(we)})},se.prototype._convertViewportColToCharacterIndex=function(ue,Se){for(var we=Se[0],Pe=0;Se[0]>=Pe;Pe++){var Ae=ue.loadCell(Pe,this._workCell).getChars().length;this._workCell.getWidth()===0?we--:Ae>1&&Se[0]!==Pe&&(we+=Ae-1)}return we},se.prototype.setSelection=function(ue,Se,we){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[ue,Se],this._model.selectionStartLength=we,this.refresh()},se.prototype._getWordAt=function(ue,Se,we,Pe){if(we===void 0&&(we=!0),Pe===void 0&&(Pe=!0),!(ue[0]>=this._bufferService.cols)){var Ae=this._bufferService.buffer,De=Ae.lines.get(ue[1]);if(De){var ze=Ae.translateBufferLineToString(ue[1],!1),Ze=this._convertViewportColToCharacterIndex(De,ue),Xe=Ze,Ge=ue[0]-Ze,ft=0,at=0,Ct=0,et=0;if(ze.charAt(Ze)===" "){for(;Ze>0&&ze.charAt(Ze-1)===" ";)Ze--;for(;Xe<ze.length&&ze.charAt(Xe+1)===" ";)Xe++}else{var yt=ue[0],st=ue[0];De.getWidth(yt)===0&&(ft++,yt--),De.getWidth(st)===2&&(at++,st++);var zt=De.getString(st).length;for(zt>1&&(et+=zt-1,Xe+=zt-1);yt>0&&Ze>0&&!this._isCharWordSeparator(De.loadCell(yt-1,this._workCell));){De.loadCell(yt-1,this._workCell);var lt=this._workCell.getChars().length;this._workCell.getWidth()===0?(ft++,yt--):lt>1&&(Ct+=lt-1,Ze-=lt-1),Ze--,yt--}for(;st<De.length&&Xe+1<ze.length&&!this._isCharWordSeparator(De.loadCell(st+1,this._workCell));){De.loadCell(st+1,this._workCell);var tt=this._workCell.getChars().length;this._workCell.getWidth()===2?(at++,st++):tt>1&&(et+=tt-1,Xe+=tt-1),Xe++,st++}}Xe++;var ut=Ze+Ge-ft+Ct,mt=Math.min(this._bufferService.cols,Xe-Ze+ft+at-Ct-et);if(Se||ze.slice(Ze,Xe).trim()!==""){if(we&&ut===0&&De.getCodePoint(0)!==32){var Pt=Ae.lines.get(ue[1]-1);if(Pt&&De.isWrapped&&Pt.getCodePoint(this._bufferService.cols-1)!==32){var gt=this._getWordAt([this._bufferService.cols-1,ue[1]-1],!1,!0,!1);if(gt){var Ft=this._bufferService.cols-gt.start;ut-=Ft,mt+=Ft}}}if(Pe&&ut+mt===this._bufferService.cols&&De.getCodePoint(this._bufferService.cols-1)!==32){var Ht=Ae.lines.get(ue[1]+1);if(Ht&&Ht.isWrapped&&Ht.getCodePoint(0)!==32){var hn=this._getWordAt([0,ue[1]+1],!1,!1,!0);hn&&(mt+=hn.length)}}return{start:ut,length:mt}}}}},se.prototype._selectWordAt=function(ue,Se){var we=this._getWordAt(ue,Se);if(we){for(;we.start<0;)we.start+=this._bufferService.cols,ue[1]--;this._model.selectionStart=[we.start,ue[1]],this._model.selectionStartLength=we.length}},se.prototype._selectToWordAt=function(ue){var Se=this._getWordAt(ue,!0);if(Se){for(var we=ue[1];Se.start<0;)Se.start+=this._bufferService.cols,we--;if(!this._model.areSelectionValuesReversed())for(;Se.start+Se.length>this._bufferService.cols;)Se.length-=this._bufferService.cols,we++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?Se.start:Se.start+Se.length,we]}},se.prototype._isCharWordSeparator=function(ue){return ue.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(ue.getChars())>=0},se.prototype._selectLineAt=function(ue){var Se=this._bufferService.buffer.getWrappedRangeForLine(ue);this._model.selectionStart=[0,Se.first],this._model.selectionEnd=[this._bufferService.cols,Se.last],this._model.selectionStartLength=0},se=ke([Ce(2,le.IBufferService),Ce(3,le.ICoreService),Ce(4,ge.IMouseService),Ce(5,le.IOptionsService),Ce(6,ge.IRenderService)],se)}(ce.Disposable);Ee.SelectionService=oe},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.SelectionModel=void 0;var me=function(){function Be(ke){this._bufferService=ke,this.isSelectAllActive=!1,this.selectionStartLength=0}return Be.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(Be.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(Be.prototype,"finalSelectionEnd",{get:function(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){var ke=this.selectionStart[0]+this.selectionStartLength;return ke>this._bufferService.cols?[ke%this._bufferService.cols,this.selectionStart[1]+Math.floor(ke/this._bufferService.cols)]:[ke,this.selectionStart[1]]}return this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd}},enumerable:!1,configurable:!0}),Be.prototype.areSelectionValuesReversed=function(){var ke=this.selectionStart,Ce=this.selectionEnd;return!(!ke||!Ce)&&(ke[1]>Ce[1]||ke[1]===Ce[1]&&ke[0]>Ce[0])},Be.prototype.onTrim=function(ke){return this.selectionStart&&(this.selectionStart[1]-=ke),this.selectionEnd&&(this.selectionEnd[1]-=ke),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},Be}();Ee.SelectionModel=me},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.moveToCellSequence=void 0;var me=Me(12);function Be(xe,ge,le,ve){var de=xe-ke(le,xe),ce=ge-ke(le,ge);return ye(Math.abs(de-ce)-function(z,ee,oe){for(var ie=0,se=z-ke(oe,z),ue=ee-ke(oe,ee),Se=0;Se<Math.abs(se-ue);Se++){var we=Ce(z,ee)==="A"?-1:1,Pe=oe.buffer.lines.get(se+we*Se);Pe&&Pe.isWrapped&&ie++}return ie}(xe,ge,le),he(Ce(xe,ge),ve))}function ke(xe,ge){for(var le=0,ve=xe.buffer.lines.get(ge),de=ve&&ve.isWrapped;de&&ge>=0&&ge<xe.rows;)le++,de=(ve=xe.buffer.lines.get(--ge))&&ve.isWrapped;return le}function Ce(xe,ge){return xe>ge?"A":"B"}function Le(xe,ge,le,ve,de,ce){for(var z=xe,ee=ge,oe="";z!==le||ee!==ve;)z+=de?1:-1,de&&z>ce.cols-1?(oe+=ce.buffer.translateBufferLineToString(ee,!1,xe,z),z=0,xe=0,ee++):!de&&z<0&&(oe+=ce.buffer.translateBufferLineToString(ee,!1,0,xe+1),xe=z=ce.cols-1,ee--);return oe+ce.buffer.translateBufferLineToString(ee,!1,xe,z)}function he(xe,ge){var le=ge?"O":"[";return me.C0.ESC+le+xe}function ye(xe,ge){xe=Math.floor(xe);for(var le="",ve=0;ve<xe;ve++)le+=ge;return le}Ee.moveToCellSequence=function(xe,ge,le,ve){var de,ce=le.buffer.x,z=le.buffer.y;if(!le.buffer.hasScrollback)return function(oe,ie,se,ue,Se,we){return Be(ie,ue,Se,we).length===0?"":ye(Le(oe,ie,oe,ie-ke(Se,ie),!1,Se).length,he("D",we))}(ce,z,0,ge,le,ve)+Be(z,ge,le,ve)+function(oe,ie,se,ue,Se,we){var Pe;Pe=Be(ie,ue,Se,we).length>0?ue-ke(Se,ue):ie;var Ae=ue,De=function(ze,Ze,Xe,Ge,ft,at){var Ct;return Ct=Be(Xe,Ge,ft,at).length>0?Ge-ke(ft,Ge):Ze,ze<Xe&&Ct<=Ge||ze>=Xe&&Ct<Ge?"C":"D"}(oe,ie,se,ue,Se,we);return ye(Le(oe,Pe,se,Ae,De==="C",Se).length,he(De,we))}(ce,z,xe,ge,le,ve);if(z===ge)return de=ce>xe?"D":"C",ye(Math.abs(ce-xe),he(de,ve));de=z>ge?"D":"C";var ee=Math.abs(z-ge);return ye(function(oe,ie){return ie.cols-oe}(z>ge?xe:ce,le)+(ee-1)*le.cols+1+((z>ge?ce:xe)-1),he(de,ve))}},function(qt,Ee,Me){"use strict";var me=this&&this.__decorate||function(Le,he,ye,xe){var ge,le=arguments.length,ve=le<3?he:xe===null?xe=Object.getOwnPropertyDescriptor(he,ye):xe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(Le,he,ye,xe);else for(var de=Le.length-1;de>=0;de--)(ge=Le[de])&&(ve=(le<3?ge(ve):le>3?ge(he,ye,ve):ge(he,ye))||ve);return le>3&&ve&&Object.defineProperty(he,ye,ve),ve},Be=this&&this.__param||function(Le,he){return function(ye,xe){he(ye,xe,Le)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.SoundService=void 0;var ke=Me(1),Ce=function(){function Le(he){this._optionsService=he}return Object.defineProperty(Le,"audioContext",{get:function(){if(!Le._audioContext){var he=window.AudioContext||window.webkitAudioContext;if(!he)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;Le._audioContext=new he}return Le._audioContext},enumerable:!1,configurable:!0}),Le.prototype.playBellSound=function(){var he=Le.audioContext;if(he){var ye=he.createBufferSource();he.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(xe){ye.buffer=xe,ye.connect(he.destination),ye.start(0)})}},Le.prototype._base64ToArrayBuffer=function(he){for(var ye=window.atob(he),xe=ye.length,ge=new Uint8Array(xe),le=0;le<xe;le++)ge[le]=ye.charCodeAt(le);return ge.buffer},Le.prototype._removeMimeType=function(he){return he.split(",")[1]},Le=me([Be(0,ke.IOptionsService)],Le)}();Ee.SoundService=Ce},function(qt,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(le,ve){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ce){de.__proto__=ce}||function(de,ce){for(var z in ce)ce.hasOwnProperty(z)&&(de[z]=ce[z])})(le,ve)},function(le,ve){function de(){this.constructor=le}me(le,ve),le.prototype=ve===null?Object.create(ve):(de.prototype=ve.prototype,new de)}),ke=this&&this.__decorate||function(le,ve,de,ce){var z,ee=arguments.length,oe=ee<3?ve:ce===null?ce=Object.getOwnPropertyDescriptor(ve,de):ce;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(le,ve,de,ce);else for(var ie=le.length-1;ie>=0;ie--)(z=le[ie])&&(oe=(ee<3?z(oe):ee>3?z(ve,de,oe):z(ve,de))||oe);return ee>3&&oe&&Object.defineProperty(ve,de,oe),oe},Ce=this&&this.__param||function(le,ve){return function(de,ce){ve(de,ce,le)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.MouseZoneManager=void 0;var Le=Me(2),he=Me(7),ye=Me(5),xe=Me(1),ge=function(le){function ve(de,ce,z,ee,oe,ie){var se=le.call(this)||this;return se._element=de,se._screenElement=ce,se._bufferService=z,se._mouseService=ee,se._selectionService=oe,se._optionsService=ie,se._zones=[],se._areZonesActive=!1,se._lastHoverCoords=[void 0,void 0],se._initialSelectionLength=0,se.register(he.addDisposableDomListener(se._element,"mousedown",function(ue){return se._onMouseDown(ue)})),se._mouseMoveListener=function(ue){return se._onMouseMove(ue)},se._mouseLeaveListener=function(ue){return se._onMouseLeave(ue)},se._clickListener=function(ue){return se._onClick(ue)},se}return Be(ve,le),ve.prototype.dispose=function(){le.prototype.dispose.call(this),this._deactivate()},ve.prototype.add=function(de){this._zones.push(de),this._zones.length===1&&this._activate()},ve.prototype.clearAll=function(de,ce){if(this._zones.length!==0){de&&ce||(de=0,ce=this._bufferService.rows-1);for(var z=0;z<this._zones.length;z++){var ee=this._zones[z];(ee.y1>de&&ee.y1<=ce+1||ee.y2>de&&ee.y2<=ce+1||ee.y1<de&&ee.y2>ce+1)&&(this._currentZone&&this._currentZone===ee&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(z--,1))}this._zones.length===0&&this._deactivate()}},ve.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._element.addEventListener("mousemove",this._mouseMoveListener),this._element.addEventListener("mouseleave",this._mouseLeaveListener),this._element.addEventListener("click",this._clickListener))},ve.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._element.removeEventListener("mousemove",this._mouseMoveListener),this._element.removeEventListener("mouseleave",this._mouseLeaveListener),this._element.removeEventListener("click",this._clickListener))},ve.prototype._onMouseMove=function(de){this._lastHoverCoords[0]===de.pageX&&this._lastHoverCoords[1]===de.pageY||(this._onHover(de),this._lastHoverCoords=[de.pageX,de.pageY])},ve.prototype._onHover=function(de){var ce=this,z=this._findZoneEventAt(de);z!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),z&&(this._currentZone=z,z.hoverCallback&&z.hoverCallback(de),this._tooltipTimeout=window.setTimeout(function(){return ce._onTooltip(de)},this._optionsService.options.linkTooltipHoverDuration)))},ve.prototype._onTooltip=function(de){this._tooltipTimeout=void 0;var ce=this._findZoneEventAt(de);ce&&ce.tooltipCallback&&ce.tooltipCallback(de)},ve.prototype._onMouseDown=function(de){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var ce=this._findZoneEventAt(de);ce!=null&&ce.willLinkActivate(de)&&(de.preventDefault(),de.stopImmediatePropagation())}},ve.prototype._onMouseLeave=function(de){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},ve.prototype._onClick=function(de){var ce=this._findZoneEventAt(de),z=this._getSelectionLength();ce&&z===this._initialSelectionLength&&(ce.clickCallback(de),de.preventDefault(),de.stopImmediatePropagation())},ve.prototype._getSelectionLength=function(){var de=this._selectionService.selectionText;return de?de.length:0},ve.prototype._findZoneEventAt=function(de){var ce=this._mouseService.getCoords(de,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(ce)for(var z=ce[0],ee=ce[1],oe=0;oe<this._zones.length;oe++){var ie=this._zones[oe];if(ie.y1===ie.y2){if(ee===ie.y1&&z>=ie.x1&&z<ie.x2)return ie}else if(ee===ie.y1&&z>=ie.x1||ee===ie.y2&&z<ie.x2||ee>ie.y1&&ee<ie.y2)return ie}},ve=ke([Ce(2,xe.IBufferService),Ce(3,ye.IMouseService),Ce(4,ye.ISelectionService),Ce(5,xe.IOptionsService)],ve)}(Le.Disposable);Ee.MouseZoneManager=ge},function(qt,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(ve,de){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ce,z){ce.__proto__=z}||function(ce,z){for(var ee in z)z.hasOwnProperty(ee)&&(ce[ee]=z[ee])})(ve,de)},function(ve,de){function ce(){this.constructor=ve}me(ve,de),ve.prototype=de===null?Object.create(de):(ce.prototype=de.prototype,new ce)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.AccessibilityManager=void 0;var ke=Me(18),Ce=Me(11),Le=Me(31),he=Me(7),ye=Me(2),xe=Me(32),ge=Me(17),le=function(ve){function de(ce,z){var ee=ve.call(this)||this;ee._terminal=ce,ee._renderService=z,ee._liveRegionLineCount=0,ee._charsToConsume=[],ee._charsToAnnounce="",ee._accessibilityTreeRoot=document.createElement("div"),ee._accessibilityTreeRoot.classList.add("xterm-accessibility"),ee._rowContainer=document.createElement("div"),ee._rowContainer.classList.add("xterm-accessibility-tree"),ee._rowContainer.setAttribute("role","list"),ee._rowElements=[];for(var oe=0;oe<ee._terminal.rows;oe++)ee._rowElements[oe]=ee._createAccessibilityTreeNode(),ee._rowContainer.appendChild(ee._rowElements[oe]);if(ee._topBoundaryFocusListener=function(ie){return ee._onBoundaryFocus(ie,0)},ee._bottomBoundaryFocusListener=function(ie){return ee._onBoundaryFocus(ie,1)},ee._rowElements[0].addEventListener("focus",ee._topBoundaryFocusListener),ee._rowElements[ee._rowElements.length-1].addEventListener("focus",ee._bottomBoundaryFocusListener),ee._refreshRowsDimensions(),ee._accessibilityTreeRoot.appendChild(ee._rowContainer),ee._renderRowsDebouncer=new Le.RenderDebouncer(ee._renderRows.bind(ee)),ee._refreshRows(),ee._liveRegion=document.createElement("div"),ee._liveRegion.classList.add("live-region"),ee._liveRegion.setAttribute("aria-live","assertive"),ee._accessibilityTreeRoot.appendChild(ee._liveRegion),!ee._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return ee._terminal.element.insertAdjacentElement("afterbegin",ee._accessibilityTreeRoot),ee.register(ee._renderRowsDebouncer),ee.register(ee._terminal.onResize(function(ie){return ee._onResize(ie.rows)})),ee.register(ee._terminal.onRender(function(ie){return ee._refreshRows(ie.start,ie.end)})),ee.register(ee._terminal.onScroll(function(){return ee._refreshRows()})),ee.register(ee._terminal.onA11yChar(function(ie){return ee._onChar(ie)})),ee.register(ee._terminal.onLineFeed(function(){return ee._onChar(`
|
|
|
`)})),ee.register(ee._terminal.onA11yTab(function(ie){return ee._onTab(ie)})),ee.register(ee._terminal.onKey(function(ie){return ee._onKey(ie.key)})),ee.register(ee._terminal.onBlur(function(){return ee._clearLiveRegion()})),ee.register(ee._renderService.onDimensionsChange(function(){return ee._refreshRowsDimensions()})),ee._screenDprMonitor=new xe.ScreenDprMonitor,ee.register(ee._screenDprMonitor),ee._screenDprMonitor.setListener(function(){return ee._refreshRowsDimensions()}),ee.register(he.addDisposableDomListener(window,"resize",function(){return ee._refreshRowsDimensions()})),ee}return Be(de,ve),de.prototype.dispose=function(){ve.prototype.dispose.call(this),ge.removeElementFromParent(this._accessibilityTreeRoot),this._rowElements.length=0},de.prototype._onBoundaryFocus=function(ce,z){var ee=ce.target,oe=this._rowElements[z===0?1:this._rowElements.length-2];if(ee.getAttribute("aria-posinset")!==(z===0?"1":""+this._terminal.buffer.lines.length)&&ce.relatedTarget===oe){var ie,se;if(z===0?(ie=ee,se=this._rowElements.pop(),this._rowContainer.removeChild(se)):(ie=this._rowElements.shift(),se=ee,this._rowContainer.removeChild(ie)),ie.removeEventListener("focus",this._topBoundaryFocusListener),se.removeEventListener("focus",this._bottomBoundaryFocusListener),z===0){var ue=this._createAccessibilityTreeNode();this._rowElements.unshift(ue),this._rowContainer.insertAdjacentElement("afterbegin",ue)}else ue=this._createAccessibilityTreeNode(),this._rowElements.push(ue),this._rowContainer.appendChild(ue);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(z===0?-1:1),this._rowElements[z===0?1:this._rowElements.length-2].focus(),ce.preventDefault(),ce.stopImmediatePropagation()}},de.prototype._onResize=function(ce){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var z=this._rowContainer.children.length;z<this._terminal.rows;z++)this._rowElements[z]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[z]);for(;this._rowElements.length>ce;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},de.prototype._createAccessibilityTreeNode=function(){var ce=document.createElement("div");return ce.setAttribute("role","listitem"),ce.tabIndex=-1,this._refreshRowDimensions(ce),ce},de.prototype._onTab=function(ce){for(var z=0;z<ce;z++)this._onChar(" ")},de.prototype._onChar=function(ce){var z=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==ce&&(this._charsToAnnounce+=ce):this._charsToAnnounce+=ce,ce===`
|
|
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=ke.tooMuchOutput)),Ce.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){z._accessibilityTreeRoot.appendChild(z._liveRegion)},0))},de.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,Ce.isMac&&ge.removeElementFromParent(this._liveRegion)},de.prototype._onKey=function(ce){this._clearLiveRegion(),this._charsToConsume.push(ce)},de.prototype._refreshRows=function(ce,z){this._renderRowsDebouncer.refresh(ce,z,this._terminal.rows)},de.prototype._renderRows=function(ce,z){for(var ee=this._terminal.buffer,oe=ee.lines.length.toString(),ie=ce;ie<=z;ie++){var se=ee.translateBufferLineToString(ee.ydisp+ie,!0),ue=(ee.ydisp+ie+1).toString(),Se=this._rowElements[ie];Se&&(se.length===0?Se.innerHTML=" ":Se.textContent=se,Se.setAttribute("aria-posinset",ue),Se.setAttribute("aria-setsize",oe))}this._announceCharacters()},de.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var ce=0;ce<this._terminal.rows;ce++)this._refreshRowDimensions(this._rowElements[ce])}},de.prototype._refreshRowDimensions=function(ce){ce.style.height=this._renderService.dimensions.actualCellHeight+"px"},de.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},de}(ye.Disposable);Ee.AccessibilityManager=le},function(qt,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(ee,oe){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ie,se){ie.__proto__=se}||function(ie,se){for(var ue in se)se.hasOwnProperty(ue)&&(ie[ue]=se[ue])})(ee,oe)},function(ee,oe){function ie(){this.constructor=ee}me(ee,oe),ee.prototype=oe===null?Object.create(oe):(ie.prototype=oe.prototype,new ie)}),ke=this&&this.__decorate||function(ee,oe,ie,se){var ue,Se=arguments.length,we=Se<3?oe:se===null?se=Object.getOwnPropertyDescriptor(oe,ie):se;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")we=Reflect.decorate(ee,oe,ie,se);else for(var Pe=ee.length-1;Pe>=0;Pe--)(ue=ee[Pe])&&(we=(Se<3?ue(we):Se>3?ue(oe,ie,we):ue(oe,ie))||we);return Se>3&&we&&Object.defineProperty(oe,ie,we),we},Ce=this&&this.__param||function(ee,oe){return function(ie,se){oe(ie,se,ee)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.DomRenderer=void 0;var Le=Me(58),he=Me(9),ye=Me(2),xe=Me(5),ge=Me(1),le=Me(0),ve=Me(10),de=Me(17),ce=1,z=function(ee){function oe(ie,se,ue,Se,we,Pe,Ae,De,ze){var Ze=ee.call(this)||this;return Ze._colors=ie,Ze._element=se,Ze._screenElement=ue,Ze._viewportElement=Se,Ze._linkifier=we,Ze._linkifier2=Pe,Ze._charSizeService=Ae,Ze._optionsService=De,Ze._bufferService=ze,Ze._terminalClass=ce++,Ze._rowElements=[],Ze._rowContainer=document.createElement("div"),Ze._rowContainer.classList.add("xterm-rows"),Ze._rowContainer.style.lineHeight="normal",Ze._rowContainer.setAttribute("aria-hidden","true"),Ze._refreshRowElements(Ze._bufferService.cols,Ze._bufferService.rows),Ze._selectionContainer=document.createElement("div"),Ze._selectionContainer.classList.add("xterm-selection"),Ze._selectionContainer.setAttribute("aria-hidden","true"),Ze.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},Ze._updateDimensions(),Ze._injectCss(),Ze._rowFactory=new Le.DomRendererRowFactory(document,Ze._optionsService,Ze._colors),Ze._element.classList.add("xterm-dom-renderer-owner-"+Ze._terminalClass),Ze._screenElement.appendChild(Ze._rowContainer),Ze._screenElement.appendChild(Ze._selectionContainer),Ze._linkifier.onShowLinkUnderline(function(Xe){return Ze._onLinkHover(Xe)}),Ze._linkifier.onHideLinkUnderline(function(Xe){return Ze._onLinkLeave(Xe)}),Ze._linkifier2.onShowLinkUnderline(function(Xe){return Ze._onLinkHover(Xe)}),Ze._linkifier2.onHideLinkUnderline(function(Xe){return Ze._onLinkLeave(Xe)}),Ze}return Be(oe,ee),Object.defineProperty(oe.prototype,"onRequestRedraw",{get:function(){return new le.EventEmitter().event},enumerable:!1,configurable:!0}),oe.prototype.dispose=function(){this._element.classList.remove("xterm-dom-renderer-owner-"+this._terminalClass),de.removeElementFromParent(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),ee.prototype.dispose.call(this)},oe.prototype._updateDimensions=function(){this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;for(var ie=0,se=this._rowElements;ie<se.length;ie++){var ue=se[ie];ue.style.width=this.dimensions.canvasWidth+"px",ue.style.height=this.dimensions.actualCellHeight+"px",ue.style.lineHeight=this.dimensions.actualCellHeight+"px",ue.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var Se=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.innerHTML=Se,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},oe.prototype.setColors=function(ie){this._colors=ie,this._injectCss()},oe.prototype._injectCss=function(){var ie=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var se=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";se+=this._terminalSelector+" span:not(."+Le.BOLD_CLASS+") { font-weight: "+this._optionsService.options.fontWeight+";}"+this._terminalSelector+" span."+Le.BOLD_CLASS+" { font-weight: "+this._optionsService.options.fontWeightBold+";}"+this._terminalSelector+" span."+Le.ITALIC_CLASS+" { font-style: italic;}",se+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",se+="@keyframes blink_block_"+this._terminalClass+" { 0% { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+"; } 50% { background-color: "+this._colors.cursorAccent.css+"; color: "+this._colors.cursor.css+"; }}",se+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+Le.CURSOR_CLASS+"."+Le.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+Le.CURSOR_CLASS+"."+Le.CURSOR_BLINK_CLASS+":not(."+Le.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+Le.CURSOR_CLASS+"."+Le.CURSOR_BLINK_CLASS+"."+Le.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+Le.CURSOR_CLASS+"."+Le.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+Le.CURSOR_CLASS+"."+Le.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.options.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+Le.CURSOR_CLASS+"."+Le.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",se+=this._terminalSelector+" .xterm-selection { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}"+this._terminalSelector+" .xterm-selection div { position: absolute; background-color: "+this._colors.selectionTransparent.css+";}",this._colors.ansi.forEach(function(ue,Se){se+=ie._terminalSelector+" .xterm-fg-"+Se+" { color: "+ue.css+"; }"+ie._terminalSelector+" .xterm-bg-"+Se+" { background-color: "+ue.css+"; }"}),se+=this._terminalSelector+" .xterm-fg-"+he.INVERTED_DEFAULT_COLOR+" { color: "+ve.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" .xterm-bg-"+he.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.innerHTML=se},oe.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},oe.prototype._refreshRowElements=function(ie,se){for(var ue=this._rowElements.length;ue<=se;ue++){var Se=document.createElement("div");this._rowContainer.appendChild(Se),this._rowElements.push(Se)}for(;this._rowElements.length>se;)this._rowContainer.removeChild(this._rowElements.pop())},oe.prototype.onResize=function(ie,se){this._refreshRowElements(ie,se),this._updateDimensions()},oe.prototype.onCharSizeChanged=function(){this._updateDimensions()},oe.prototype.onBlur=function(){this._rowContainer.classList.remove("xterm-focus")},oe.prototype.onFocus=function(){this._rowContainer.classList.add("xterm-focus")},oe.prototype.onSelectionChanged=function(ie,se,ue){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(ie&&se){var Se=ie[1]-this._bufferService.buffer.ydisp,we=se[1]-this._bufferService.buffer.ydisp,Pe=Math.max(Se,0),Ae=Math.min(we,this._bufferService.rows-1);if(!(Pe>=this._bufferService.rows||Ae<0)){var De=document.createDocumentFragment();if(ue)De.appendChild(this._createSelectionElement(Pe,ie[0],se[0],Ae-Pe+1));else{var ze=Se===Pe?ie[0]:0,Ze=Pe===Ae?se[0]:this._bufferService.cols;De.appendChild(this._createSelectionElement(Pe,ze,Ze));var Xe=Ae-Pe-1;if(De.appendChild(this._createSelectionElement(Pe+1,0,this._bufferService.cols,Xe)),Pe!==Ae){var Ge=we===Ae?se[0]:this._bufferService.cols;De.appendChild(this._createSelectionElement(Ae,0,Ge))}}this._selectionContainer.appendChild(De)}}},oe.prototype._createSelectionElement=function(ie,se,ue,Se){Se===void 0&&(Se=1);var we=document.createElement("div");return we.style.height=Se*this.dimensions.actualCellHeight+"px",we.style.top=ie*this.dimensions.actualCellHeight+"px",we.style.left=se*this.dimensions.actualCellWidth+"px",we.style.width=this.dimensions.actualCellWidth*(ue-se)+"px",we},oe.prototype.onCursorMove=function(){},oe.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},oe.prototype.clear=function(){for(var ie=0,se=this._rowElements;ie<se.length;ie++)se[ie].innerHTML=""},oe.prototype.renderRows=function(ie,se){for(var ue=this._bufferService.buffer.ybase+this._bufferService.buffer.y,Se=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),we=this._optionsService.options.cursorBlink,Pe=ie;Pe<=se;Pe++){var Ae=this._rowElements[Pe];Ae.innerHTML="";var De=Pe+this._bufferService.buffer.ydisp,ze=this._bufferService.buffer.lines.get(De),Ze=this._optionsService.options.cursorStyle;Ae.appendChild(this._rowFactory.createRow(ze,De===ue,Ze,Se,we,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(oe.prototype,"_terminalSelector",{get:function(){return".xterm-dom-renderer-owner-"+this._terminalClass},enumerable:!1,configurable:!0}),oe.prototype.registerCharacterJoiner=function(ie){return-1},oe.prototype.deregisterCharacterJoiner=function(ie){return!1},oe.prototype._onLinkHover=function(ie){this._setCellUnderline(ie.x1,ie.x2,ie.y1,ie.y2,ie.cols,!0)},oe.prototype._onLinkLeave=function(ie){this._setCellUnderline(ie.x1,ie.x2,ie.y1,ie.y2,ie.cols,!1)},oe.prototype._setCellUnderline=function(ie,se,ue,Se,we,Pe){for(;ie!==se||ue!==Se;){var Ae=this._rowElements[ue];if(!Ae)return;var De=Ae.children[ie];De&&(De.style.textDecoration=Pe?"underline":"none"),++ie>=we&&(ie=0,ue++)}},oe=ke([Ce(6,xe.ICharSizeService),Ce(7,ge.IOptionsService),Ce(8,ge.IBufferService)],oe)}(ye.Disposable);Ee.DomRenderer=z},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.DomRendererRowFactory=Ee.CURSOR_STYLE_UNDERLINE_CLASS=Ee.CURSOR_STYLE_BAR_CLASS=Ee.CURSOR_STYLE_BLOCK_CLASS=Ee.CURSOR_BLINK_CLASS=Ee.CURSOR_CLASS=Ee.UNDERLINE_CLASS=Ee.ITALIC_CLASS=Ee.DIM_CLASS=Ee.BOLD_CLASS=void 0;var me=Me(9),Be=Me(3),ke=Me(4),Ce=Me(10);Ee.BOLD_CLASS="xterm-bold",Ee.DIM_CLASS="xterm-dim",Ee.ITALIC_CLASS="xterm-italic",Ee.UNDERLINE_CLASS="xterm-underline",Ee.CURSOR_CLASS="xterm-cursor",Ee.CURSOR_BLINK_CLASS="xterm-cursor-blink",Ee.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",Ee.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",Ee.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var Le=function(){function ye(xe,ge,le){this._document=xe,this._optionsService=ge,this._colors=le,this._workCell=new ke.CellData}return ye.prototype.setColors=function(xe){this._colors=xe},ye.prototype.createRow=function(xe,ge,le,ve,de,ce,z){for(var ee=this._document.createDocumentFragment(),oe=0,ie=Math.min(xe.length,z)-1;ie>=0;ie--)if(xe.loadCell(ie,this._workCell).getCode()!==Be.NULL_CELL_CODE||ge&&ie===ve){oe=ie+1;break}for(ie=0;ie<oe;ie++){xe.loadCell(ie,this._workCell);var se=this._workCell.getWidth();if(se!==0){var ue=this._document.createElement("span");if(se>1&&(ue.style.width=ce*se+"px"),ge&&ie===ve)switch(ue.classList.add(Ee.CURSOR_CLASS),de&&ue.classList.add(Ee.CURSOR_BLINK_CLASS),le){case"bar":ue.classList.add(Ee.CURSOR_STYLE_BAR_CLASS);break;case"underline":ue.classList.add(Ee.CURSOR_STYLE_UNDERLINE_CLASS);break;default:ue.classList.add(Ee.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&ue.classList.add(Ee.BOLD_CLASS),this._workCell.isItalic()&&ue.classList.add(Ee.ITALIC_CLASS),this._workCell.isDim()&&ue.classList.add(Ee.DIM_CLASS),this._workCell.isUnderline()&&ue.classList.add(Ee.UNDERLINE_CLASS),this._workCell.isInvisible()?ue.textContent=Be.WHITESPACE_CELL_CHAR:ue.textContent=this._workCell.getChars()||Be.WHITESPACE_CELL_CHAR;var Se=this._workCell.getFgColor(),we=this._workCell.getFgColorMode(),Pe=this._workCell.getBgColor(),Ae=this._workCell.getBgColorMode(),De=!!this._workCell.isInverse();if(De){var ze=Se;Se=Pe,Pe=ze;var Ze=we;we=Ae,Ae=Ze}switch(we){case 16777216:case 33554432:this._workCell.isBold()&&Se<8&&this._optionsService.options.drawBoldTextInBrightColors&&(Se+=8),this._applyMinimumContrast(ue,this._colors.background,this._colors.ansi[Se])||ue.classList.add("xterm-fg-"+Se);break;case 50331648:var Xe=Ce.rgba.toColor(Se>>16&255,Se>>8&255,255&Se);this._applyMinimumContrast(ue,this._colors.background,Xe)||this._addStyle(ue,"color:#"+he(Se.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(ue,this._colors.background,this._colors.foreground)||De&&ue.classList.add("xterm-fg-"+me.INVERTED_DEFAULT_COLOR)}switch(Ae){case 16777216:case 33554432:ue.classList.add("xterm-bg-"+Pe);break;case 50331648:this._addStyle(ue,"background-color:#"+he(Pe.toString(16),"0",6));break;case 0:default:De&&ue.classList.add("xterm-bg-"+me.INVERTED_DEFAULT_COLOR)}ee.appendChild(ue)}}return ee},ye.prototype._applyMinimumContrast=function(xe,ge,le){if(this._optionsService.options.minimumContrastRatio===1)return!1;var ve=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return ve===void 0&&(ve=Ce.color.ensureContrastRatio(ge,le,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,ve!=null?ve:null)),!!ve&&(this._addStyle(xe,"color:"+ve.css),!0)},ye.prototype._addStyle=function(xe,ge){xe.setAttribute("style",""+(xe.getAttribute("style")||"")+ge+";")},ye}();function he(ye,xe,ge){for(;ye.length<ge;)ye=xe+ye;return ye}Ee.DomRendererRowFactory=Le},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.evaluateKeyboardEvent=void 0;var me=Me(12),Be={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};Ee.evaluateKeyboardEvent=function(ke,Ce,Le,he){var ye={type:0,cancel:!1,key:void 0},xe=(ke.shiftKey?1:0)|(ke.altKey?2:0)|(ke.ctrlKey?4:0)|(ke.metaKey?8:0);switch(ke.keyCode){case 0:ke.key==="UIKeyInputUpArrow"?ye.key=Ce?me.C0.ESC+"OA":me.C0.ESC+"[A":ke.key==="UIKeyInputLeftArrow"?ye.key=Ce?me.C0.ESC+"OD":me.C0.ESC+"[D":ke.key==="UIKeyInputRightArrow"?ye.key=Ce?me.C0.ESC+"OC":me.C0.ESC+"[C":ke.key==="UIKeyInputDownArrow"&&(ye.key=Ce?me.C0.ESC+"OB":me.C0.ESC+"[B");break;case 8:if(ke.shiftKey){ye.key=me.C0.BS;break}if(ke.altKey){ye.key=me.C0.ESC+me.C0.DEL;break}ye.key=me.C0.DEL;break;case 9:if(ke.shiftKey){ye.key=me.C0.ESC+"[Z";break}ye.key=me.C0.HT,ye.cancel=!0;break;case 13:ye.key=ke.altKey?me.C0.ESC+me.C0.CR:me.C0.CR,ye.cancel=!0;break;case 27:ye.key=me.C0.ESC,ke.altKey&&(ye.key=me.C0.ESC+me.C0.ESC),ye.cancel=!0;break;case 37:if(ke.metaKey)break;xe?(ye.key=me.C0.ESC+"[1;"+(xe+1)+"D",ye.key===me.C0.ESC+"[1;3D"&&(ye.key=me.C0.ESC+(Le?"b":"[1;5D"))):ye.key=Ce?me.C0.ESC+"OD":me.C0.ESC+"[D";break;case 39:if(ke.metaKey)break;xe?(ye.key=me.C0.ESC+"[1;"+(xe+1)+"C",ye.key===me.C0.ESC+"[1;3C"&&(ye.key=me.C0.ESC+(Le?"f":"[1;5C"))):ye.key=Ce?me.C0.ESC+"OC":me.C0.ESC+"[C";break;case 38:if(ke.metaKey)break;xe?(ye.key=me.C0.ESC+"[1;"+(xe+1)+"A",Le||ye.key!==me.C0.ESC+"[1;3A"||(ye.key=me.C0.ESC+"[1;5A")):ye.key=Ce?me.C0.ESC+"OA":me.C0.ESC+"[A";break;case 40:if(ke.metaKey)break;xe?(ye.key=me.C0.ESC+"[1;"+(xe+1)+"B",Le||ye.key!==me.C0.ESC+"[1;3B"||(ye.key=me.C0.ESC+"[1;5B")):ye.key=Ce?me.C0.ESC+"OB":me.C0.ESC+"[B";break;case 45:ke.shiftKey||ke.ctrlKey||(ye.key=me.C0.ESC+"[2~");break;case 46:ye.key=xe?me.C0.ESC+"[3;"+(xe+1)+"~":me.C0.ESC+"[3~";break;case 36:ye.key=xe?me.C0.ESC+"[1;"+(xe+1)+"H":Ce?me.C0.ESC+"OH":me.C0.ESC+"[H";break;case 35:ye.key=xe?me.C0.ESC+"[1;"+(xe+1)+"F":Ce?me.C0.ESC+"OF":me.C0.ESC+"[F";break;case 33:ke.shiftKey?ye.type=2:ye.key=me.C0.ESC+"[5~";break;case 34:ke.shiftKey?ye.type=3:ye.key=me.C0.ESC+"[6~";break;case 112:ye.key=xe?me.C0.ESC+"[1;"+(xe+1)+"P":me.C0.ESC+"OP";break;case 113:ye.key=xe?me.C0.ESC+"[1;"+(xe+1)+"Q":me.C0.ESC+"OQ";break;case 114:ye.key=xe?me.C0.ESC+"[1;"+(xe+1)+"R":me.C0.ESC+"OR";break;case 115:ye.key=xe?me.C0.ESC+"[1;"+(xe+1)+"S":me.C0.ESC+"OS";break;case 116:ye.key=xe?me.C0.ESC+"[15;"+(xe+1)+"~":me.C0.ESC+"[15~";break;case 117:ye.key=xe?me.C0.ESC+"[17;"+(xe+1)+"~":me.C0.ESC+"[17~";break;case 118:ye.key=xe?me.C0.ESC+"[18;"+(xe+1)+"~":me.C0.ESC+"[18~";break;case 119:ye.key=xe?me.C0.ESC+"[19;"+(xe+1)+"~":me.C0.ESC+"[19~";break;case 120:ye.key=xe?me.C0.ESC+"[20;"+(xe+1)+"~":me.C0.ESC+"[20~";break;case 121:ye.key=xe?me.C0.ESC+"[21;"+(xe+1)+"~":me.C0.ESC+"[21~";break;case 122:ye.key=xe?me.C0.ESC+"[23;"+(xe+1)+"~":me.C0.ESC+"[23~";break;case 123:ye.key=xe?me.C0.ESC+"[24;"+(xe+1)+"~":me.C0.ESC+"[24~";break;default:if(!ke.ctrlKey||ke.shiftKey||ke.altKey||ke.metaKey)if(Le&&!he||!ke.altKey||ke.metaKey)Le&&!ke.altKey&&!ke.ctrlKey&&ke.metaKey?ke.keyCode===65&&(ye.type=1):ke.key&&!ke.ctrlKey&&!ke.altKey&&!ke.metaKey&&ke.keyCode>=48&&ke.key.length===1?ye.key=ke.key:ke.key&&ke.ctrlKey&&ke.key==="_"&&(ye.key=me.C0.US);else{var ge=Be[ke.keyCode],le=ge&&ge[ke.shiftKey?1:0];if(le)ye.key=me.C0.ESC+le;else if(ke.keyCode>=65&&ke.keyCode<=90){var ve=ke.ctrlKey?ke.keyCode-64:ke.keyCode+32;ye.key=me.C0.ESC+String.fromCharCode(ve)}}else ke.keyCode>=65&&ke.keyCode<=90?ye.key=String.fromCharCode(ke.keyCode-64):ke.keyCode===32?ye.key=me.C0.NUL:ke.keyCode>=51&&ke.keyCode<=55?ye.key=String.fromCharCode(ke.keyCode-51+27):ke.keyCode===56?ye.key=me.C0.DEL:ke.keyCode===219?ye.key=me.C0.ESC:ke.keyCode===220?ye.key=me.C0.FS:ke.keyCode===221&&(ye.key=me.C0.GS)}return ye}},function(qt,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(ce,z){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ee,oe){ee.__proto__=oe}||function(ee,oe){for(var ie in oe)oe.hasOwnProperty(ie)&&(ee[ie]=oe[ie])})(ce,z)},function(ce,z){function ee(){this.constructor=ce}me(ce,z),ce.prototype=z===null?Object.create(z):(ee.prototype=z.prototype,new ee)}),ke=this&&this.__decorate||function(ce,z,ee,oe){var ie,se=arguments.length,ue=se<3?z:oe===null?oe=Object.getOwnPropertyDescriptor(z,ee):oe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ue=Reflect.decorate(ce,z,ee,oe);else for(var Se=ce.length-1;Se>=0;Se--)(ie=ce[Se])&&(ue=(se<3?ie(ue):se>3?ie(z,ee,ue):ie(z,ee))||ue);return se>3&&ue&&Object.defineProperty(z,ee,ue),ue},Ce=this&&this.__param||function(ce,z){return function(ee,oe){z(ee,oe,ce)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.RenderService=void 0;var Le=Me(31),he=Me(0),ye=Me(2),xe=Me(32),ge=Me(7),le=Me(1),ve=Me(5),de=function(ce){function z(ee,oe,ie,se,ue,Se){var we=ce.call(this)||this;if(we._renderer=ee,we._rowCount=oe,we._isPaused=!1,we._needsFullRefresh=!1,we._isNextRenderRedrawOnly=!0,we._needsSelectionRefresh=!1,we._canvasWidth=0,we._canvasHeight=0,we._selectionState={start:void 0,end:void 0,columnSelectMode:!1},we._onDimensionsChange=new he.EventEmitter,we._onRender=new he.EventEmitter,we._onRefreshRequest=new he.EventEmitter,we.register({dispose:function(){return we._renderer.dispose()}}),we._renderDebouncer=new Le.RenderDebouncer(function(Ae,De){return we._renderRows(Ae,De)}),we.register(we._renderDebouncer),we._screenDprMonitor=new xe.ScreenDprMonitor,we._screenDprMonitor.setListener(function(){return we.onDevicePixelRatioChange()}),we.register(we._screenDprMonitor),we.register(Se.onResize(function(Ae){return we._fullRefresh()})),we.register(se.onOptionChange(function(){return we._renderer.onOptionsChanged()})),we.register(ue.onCharSizeChange(function(){return we.onCharSizeChanged()})),we._renderer.onRequestRedraw(function(Ae){return we.refreshRows(Ae.start,Ae.end,!0)}),we.register(ge.addDisposableDomListener(window,"resize",function(){return we.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var Pe=new IntersectionObserver(function(Ae){return we._onIntersectionChange(Ae[Ae.length-1])},{threshold:0});Pe.observe(ie),we.register({dispose:function(){return Pe.disconnect()}})}return we}return Be(z,ce),Object.defineProperty(z.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),z.prototype._onIntersectionChange=function(ee){this._isPaused=ee.intersectionRatio===0,!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},z.prototype.refreshRows=function(ee,oe,ie){ie===void 0&&(ie=!1),this._isPaused?this._needsFullRefresh=!0:(ie||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(ee,oe,this._rowCount))},z.prototype._renderRows=function(ee,oe){this._renderer.renderRows(ee,oe),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:ee,end:oe}),this._isNextRenderRedrawOnly=!0},z.prototype.resize=function(ee,oe){this._rowCount=oe,this._fireOnCanvasResize()},z.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},z.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},z.prototype.dispose=function(){ce.prototype.dispose.call(this)},z.prototype.setRenderer=function(ee){var oe=this;this._renderer.dispose(),this._renderer=ee,this._renderer.onRequestRedraw(function(ie){return oe.refreshRows(ie.start,ie.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},z.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},z.prototype.setColors=function(ee){this._renderer.setColors(ee),this._fullRefresh()},z.prototype.onDevicePixelRatioChange=function(){this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},z.prototype.onResize=function(ee,oe){this._renderer.onResize(ee,oe),this._fullRefresh()},z.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},z.prototype.onBlur=function(){this._renderer.onBlur()},z.prototype.onFocus=function(){this._renderer.onFocus()},z.prototype.onSelectionChanged=function(ee,oe,ie){this._selectionState.start=ee,this._selectionState.end=oe,this._selectionState.columnSelectMode=ie,this._renderer.onSelectionChanged(ee,oe,ie)},z.prototype.onCursorMove=function(){this._renderer.onCursorMove()},z.prototype.clear=function(){this._renderer.clear()},z.prototype.registerCharacterJoiner=function(ee){return this._renderer.registerCharacterJoiner(ee)},z.prototype.deregisterCharacterJoiner=function(ee){return this._renderer.deregisterCharacterJoiner(ee)},z=ke([Ce(3,le.IOptionsService),Ce(4,ve.ICharSizeService),Ce(5,le.IBufferService)],z)}(ye.Disposable);Ee.RenderService=de},function(qt,Ee,Me){"use strict";var me=this&&this.__decorate||function(ye,xe,ge,le){var ve,de=arguments.length,ce=de<3?xe:le===null?le=Object.getOwnPropertyDescriptor(xe,ge):le;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ce=Reflect.decorate(ye,xe,ge,le);else for(var z=ye.length-1;z>=0;z--)(ve=ye[z])&&(ce=(de<3?ve(ce):de>3?ve(xe,ge,ce):ve(xe,ge))||ce);return de>3&&ce&&Object.defineProperty(xe,ge,ce),ce},Be=this&&this.__param||function(ye,xe){return function(ge,le){xe(ge,le,ye)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CharSizeService=void 0;var ke=Me(1),Ce=Me(0),Le=function(){function ye(xe,ge,le){this._optionsService=le,this.width=0,this.height=0,this._onCharSizeChange=new Ce.EventEmitter,this._measureStrategy=new he(xe,ge,this._optionsService)}return Object.defineProperty(ye.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),ye.prototype.measure=function(){var xe=this._measureStrategy.measure();xe.width===this.width&&xe.height===this.height||(this.width=xe.width,this.height=xe.height,this._onCharSizeChange.fire())},ye=me([Be(2,ke.IOptionsService)],ye)}();Ee.CharSizeService=Le;var he=function(){function ye(xe,ge,le){this._document=xe,this._parentElement=ge,this._optionsService=le,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement)}return ye.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.options.fontFamily,this._measureElement.style.fontSize=this._optionsService.options.fontSize+"px";var xe=this._measureElement.getBoundingClientRect();return xe.width!==0&&xe.height!==0&&(this._result.width=xe.width,this._result.height=Math.ceil(xe.height)),this._result},ye}()},function(qt,Ee,Me){"use strict";var me=this&&this.__decorate||function(he,ye,xe,ge){var le,ve=arguments.length,de=ve<3?ye:ge===null?ge=Object.getOwnPropertyDescriptor(ye,xe):ge;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")de=Reflect.decorate(he,ye,xe,ge);else for(var ce=he.length-1;ce>=0;ce--)(le=he[ce])&&(de=(ve<3?le(de):ve>3?le(ye,xe,de):le(ye,xe))||de);return ve>3&&de&&Object.defineProperty(ye,xe,de),de},Be=this&&this.__param||function(he,ye){return function(xe,ge){ye(xe,ge,he)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.MouseService=void 0;var ke=Me(5),Ce=Me(30),Le=function(){function he(ye,xe){this._renderService=ye,this._charSizeService=xe}return he.prototype.getCoords=function(ye,xe,ge,le,ve){return Ce.getCoords(ye,xe,ge,le,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,ve)},he.prototype.getRawByteCoords=function(ye,xe,ge,le){var ve=this.getCoords(ye,xe,ge,le);return Ce.getRawByteCoords(ve)},he=me([Be(0,ke.IRenderService),Be(1,ke.ICharSizeService)],he)}();Ee.MouseService=Le},function(qt,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(le,ve){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ce){de.__proto__=ce}||function(de,ce){for(var z in ce)ce.hasOwnProperty(z)&&(de[z]=ce[z])})(le,ve)},function(le,ve){function de(){this.constructor=le}me(le,ve),le.prototype=ve===null?Object.create(ve):(de.prototype=ve.prototype,new de)}),ke=this&&this.__decorate||function(le,ve,de,ce){var z,ee=arguments.length,oe=ee<3?ve:ce===null?ce=Object.getOwnPropertyDescriptor(ve,de):ce;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(le,ve,de,ce);else for(var ie=le.length-1;ie>=0;ie--)(z=le[ie])&&(oe=(ee<3?z(oe):ee>3?z(ve,de,oe):z(ve,de))||oe);return ee>3&&oe&&Object.defineProperty(ve,de,oe),oe},Ce=this&&this.__param||function(le,ve){return function(de,ce){ve(de,ce,le)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Linkifier2=void 0;var Le=Me(1),he=Me(0),ye=Me(2),xe=Me(7),ge=function(le){function ve(de){var ce=le.call(this)||this;return ce._bufferService=de,ce._linkProviders=[],ce._linkCacheDisposables=[],ce._isMouseOut=!0,ce._activeLine=-1,ce._onShowLinkUnderline=ce.register(new he.EventEmitter),ce._onHideLinkUnderline=ce.register(new he.EventEmitter),ce.register(ye.getDisposeArrayDisposable(ce._linkCacheDisposables)),ce}return Be(ve,le),Object.defineProperty(ve.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),ve.prototype.registerLinkProvider=function(de){var ce=this;return this._linkProviders.push(de),{dispose:function(){var z=ce._linkProviders.indexOf(de);z!==-1&&ce._linkProviders.splice(z,1)}}},ve.prototype.attachToDom=function(de,ce,z){var ee=this;this._element=de,this._mouseService=ce,this._renderService=z,this.register(xe.addDisposableDomListener(this._element,"mouseleave",function(){ee._isMouseOut=!0,ee._clearCurrentLink()})),this.register(xe.addDisposableDomListener(this._element,"mousemove",this._onMouseMove.bind(this))),this.register(xe.addDisposableDomListener(this._element,"click",this._onClick.bind(this)))},ve.prototype._onMouseMove=function(de){if(this._lastMouseEvent=de,this._element&&this._mouseService){var ce=this._positionFromMouseEvent(de,this._element,this._mouseService);if(ce){this._isMouseOut=!1;for(var z=de.composedPath(),ee=0;ee<z.length;ee++){var oe=z[ee];if(oe.classList.contains("xterm"))break;if(oe.classList.contains("xterm-hover"))return}this._lastBufferCell&&ce.x===this._lastBufferCell.x&&ce.y===this._lastBufferCell.y||(this._onHover(ce),this._lastBufferCell=ce)}}},ve.prototype._onHover=function(de){if(this._activeLine!==de.y)return this._clearCurrentLink(),void this._askForLink(de,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,de)||(this._clearCurrentLink(),this._askForLink(de,!0))},ve.prototype._askForLink=function(de,ce){var z=this;this._activeProviderReplies&&ce||(this._activeProviderReplies=new Map,this._activeLine=de.y);var ee=!1;this._linkProviders.forEach(function(oe,ie){var se;ce?!((se=z._activeProviderReplies)===null||se===void 0)&&se.get(ie)&&(ee=z._checkLinkProviderResult(ie,de,ee)):oe.provideLinks(de.y,function(ue){var Se,we;if(!z._isMouseOut){var Pe=ue==null?void 0:ue.map(function(Ae){return{link:Ae}});(Se=z._activeProviderReplies)===null||Se===void 0||Se.set(ie,Pe),ee=z._checkLinkProviderResult(ie,de,ee),((we=z._activeProviderReplies)===null||we===void 0?void 0:we.size)===z._linkProviders.length&&z._removeIntersectingLinks(de.y,z._activeProviderReplies)}})})},ve.prototype._removeIntersectingLinks=function(de,ce){for(var z=new Set,ee=0;ee<ce.size;ee++){var oe=ce.get(ee);if(oe)for(var ie=0;ie<oe.length;ie++)for(var se=oe[ie],ue=se.link.range.start.y<de?0:se.link.range.start.x,Se=se.link.range.end.y>de?this._bufferService.cols:se.link.range.end.x,we=ue;we<=Se;we++){if(z.has(we)){oe.splice(ie--,1);break}z.add(we)}}},ve.prototype._checkLinkProviderResult=function(de,ce,z){var ee,oe=this;if(!this._activeProviderReplies)return z;for(var ie=this._activeProviderReplies.get(de),se=!1,ue=0;ue<de;ue++)this._activeProviderReplies.has(ue)&&!this._activeProviderReplies.get(ue)||(se=!0);if(!se&&ie){var Se=ie.find(function(Pe){return oe._linkAtPosition(Pe.link,ce)});Se&&(z=!0,this._handleNewLink(Se))}if(this._activeProviderReplies.size===this._linkProviders.length&&!z)for(ue=0;ue<this._activeProviderReplies.size;ue++){var we=(ee=this._activeProviderReplies.get(ue))===null||ee===void 0?void 0:ee.find(function(Pe){return oe._linkAtPosition(Pe.link,ce)});if(we){z=!0,this._handleNewLink(we);break}}return z},ve.prototype._onClick=function(de){if(this._element&&this._mouseService&&this._currentLink){var ce=this._positionFromMouseEvent(de,this._element,this._mouseService);ce&&this._linkAtPosition(this._currentLink.link,ce)&&this._currentLink.link.activate(de,this._currentLink.link.text)}},ve.prototype._clearCurrentLink=function(de,ce){this._element&&this._currentLink&&this._lastMouseEvent&&(!de||!ce||this._currentLink.link.range.start.y>=de&&this._currentLink.link.range.end.y<=ce)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,ye.disposeArray(this._linkCacheDisposables))},ve.prototype._handleNewLink=function(de){var ce=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var z=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);z&&this._linkAtPosition(de.link,z)&&(this._currentLink=de,this._currentLink.state={decorations:{underline:de.link.decorations===void 0||de.link.decorations.underline,pointerCursor:de.link.decorations===void 0||de.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,de.link,this._lastMouseEvent),de.link.decorations={},Object.defineProperties(de.link.decorations,{pointerCursor:{get:function(){var ee,oe;return(oe=(ee=ce._currentLink)===null||ee===void 0?void 0:ee.state)===null||oe===void 0?void 0:oe.decorations.pointerCursor},set:function(ee){var oe,ie;!((oe=ce._currentLink)===null||oe===void 0)&&oe.state&&ce._currentLink.state.decorations.pointerCursor!==ee&&(ce._currentLink.state.decorations.pointerCursor=ee,ce._currentLink.state.isHovered&&((ie=ce._element)===null||ie===void 0||ie.classList.toggle("xterm-cursor-pointer",ee)))}},underline:{get:function(){var ee,oe;return(oe=(ee=ce._currentLink)===null||ee===void 0?void 0:ee.state)===null||oe===void 0?void 0:oe.decorations.underline},set:function(ee){var oe,ie,se;!((oe=ce._currentLink)===null||oe===void 0)&&oe.state&&((se=(ie=ce._currentLink)===null||ie===void 0?void 0:ie.state)===null||se===void 0?void 0:se.decorations.underline)!==ee&&(ce._currentLink.state.decorations.underline=ee,ce._currentLink.state.isHovered&&ce._fireUnderlineEvent(de.link,ee))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(ee){var oe=ee.start===0?0:ee.start+1+ce._bufferService.buffer.ydisp;ce._clearCurrentLink(oe,ee.end+1+ce._bufferService.buffer.ydisp)})))}},ve.prototype._linkHover=function(de,ce,z){var ee;!((ee=this._currentLink)===null||ee===void 0)&&ee.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(ce,!0),this._currentLink.state.decorations.pointerCursor&&de.classList.add("xterm-cursor-pointer")),ce.hover&&ce.hover(z,ce.text)},ve.prototype._fireUnderlineEvent=function(de,ce){var z=de.range,ee=this._bufferService.buffer.ydisp,oe=this._createLinkUnderlineEvent(z.start.x-1,z.start.y-ee-1,z.end.x,z.end.y-ee-1,void 0);(ce?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(oe)},ve.prototype._linkLeave=function(de,ce,z){var ee;!((ee=this._currentLink)===null||ee===void 0)&&ee.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(ce,!1),this._currentLink.state.decorations.pointerCursor&&de.classList.remove("xterm-cursor-pointer")),ce.leave&&ce.leave(z,ce.text)},ve.prototype._linkAtPosition=function(de,ce){var z=de.range.start.y===de.range.end.y,ee=de.range.start.y<ce.y,oe=de.range.end.y>ce.y;return(z&&de.range.start.x<=ce.x&&de.range.end.x>=ce.x||ee&&de.range.end.x>=ce.x||oe&&de.range.start.x<=ce.x||ee&&oe)&&de.range.start.y<=ce.y&&de.range.end.y>=ce.y},ve.prototype._positionFromMouseEvent=function(de,ce,z){var ee=z.getCoords(de,ce,this._bufferService.cols,this._bufferService.rows);if(ee)return{x:ee[0],y:ee[1]+this._bufferService.buffer.ydisp}},ve.prototype._createLinkUnderlineEvent=function(de,ce,z,ee,oe){return{x1:de,y1:ce,x2:z,y2:ee,cols:this._bufferService.cols,fg:oe}},ve=ke([Ce(0,Le.IBufferService)],ve)}(ye.Disposable);Ee.Linkifier2=ge},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CoreBrowserService=void 0;var me=function(){function Be(ke){this._textarea=ke}return Object.defineProperty(Be.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),Be}();Ee.CoreBrowserService=me},function(qt,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(ue,Se){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(we,Pe){we.__proto__=Pe}||function(we,Pe){for(var Ae in Pe)Pe.hasOwnProperty(Ae)&&(we[Ae]=Pe[Ae])})(ue,Se)},function(ue,Se){function we(){this.constructor=ue}me(ue,Se),ue.prototype=Se===null?Object.create(Se):(we.prototype=Se.prototype,new we)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CoreTerminal=void 0;var ke=Me(2),Ce=Me(1),Le=Me(66),he=Me(67),ye=Me(68),xe=Me(74),ge=Me(75),le=Me(0),ve=Me(76),de=Me(77),ce=Me(78),z=Me(80),ee=Me(81),oe=Me(19),ie=Me(82),se=function(ue){function Se(we){var Pe=ue.call(this)||this;return Pe._onBinary=new le.EventEmitter,Pe._onData=new le.EventEmitter,Pe._onLineFeed=new le.EventEmitter,Pe._onResize=new le.EventEmitter,Pe._onScroll=new le.EventEmitter,Pe._instantiationService=new Le.InstantiationService,Pe.optionsService=new xe.OptionsService(we),Pe._instantiationService.setService(Ce.IOptionsService,Pe.optionsService),Pe._bufferService=Pe.register(Pe._instantiationService.createInstance(ye.BufferService)),Pe._instantiationService.setService(Ce.IBufferService,Pe._bufferService),Pe._logService=Pe._instantiationService.createInstance(he.LogService),Pe._instantiationService.setService(Ce.ILogService,Pe._logService),Pe._coreService=Pe.register(Pe._instantiationService.createInstance(ge.CoreService,function(){return Pe.scrollToBottom()})),Pe._instantiationService.setService(Ce.ICoreService,Pe._coreService),Pe._coreMouseService=Pe._instantiationService.createInstance(ve.CoreMouseService),Pe._instantiationService.setService(Ce.ICoreMouseService,Pe._coreMouseService),Pe._dirtyRowService=Pe._instantiationService.createInstance(de.DirtyRowService),Pe._instantiationService.setService(Ce.IDirtyRowService,Pe._dirtyRowService),Pe.unicodeService=Pe._instantiationService.createInstance(ce.UnicodeService),Pe._instantiationService.setService(Ce.IUnicodeService,Pe.unicodeService),Pe._charsetService=Pe._instantiationService.createInstance(z.CharsetService),Pe._instantiationService.setService(Ce.ICharsetService,Pe._charsetService),Pe._inputHandler=new oe.InputHandler(Pe._bufferService,Pe._charsetService,Pe._coreService,Pe._dirtyRowService,Pe._logService,Pe.optionsService,Pe._coreMouseService,Pe.unicodeService),Pe.register(le.forwardEvent(Pe._inputHandler.onLineFeed,Pe._onLineFeed)),Pe.register(Pe._inputHandler),Pe.register(le.forwardEvent(Pe._bufferService.onResize,Pe._onResize)),Pe.register(le.forwardEvent(Pe._coreService.onData,Pe._onData)),Pe.register(le.forwardEvent(Pe._coreService.onBinary,Pe._onBinary)),Pe.register(Pe.optionsService.onOptionChange(function(Ae){return Pe._updateOptions(Ae)})),Pe._writeBuffer=new ie.WriteBuffer(function(Ae){return Pe._inputHandler.parse(Ae)}),Pe}return Be(Se,ue),Object.defineProperty(Se.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),Se.prototype.dispose=function(){var we;this._isDisposed||(ue.prototype.dispose.call(this),(we=this._windowsMode)===null||we===void 0||we.dispose(),this._windowsMode=void 0)},Se.prototype.write=function(we,Pe){this._writeBuffer.write(we,Pe)},Se.prototype.writeSync=function(we){this._writeBuffer.writeSync(we)},Se.prototype.resize=function(we,Pe){isNaN(we)||isNaN(Pe)||(we=Math.max(we,ye.MINIMUM_COLS),Pe=Math.max(Pe,ye.MINIMUM_ROWS),this._bufferService.resize(we,Pe))},Se.prototype.scroll=function(we,Pe){Pe===void 0&&(Pe=!1);var Ae,De=this._bufferService.buffer;(Ae=this._cachedBlankLine)&&Ae.length===this.cols&&Ae.getFg(0)===we.fg&&Ae.getBg(0)===we.bg||(Ae=De.getBlankLine(we,Pe),this._cachedBlankLine=Ae),Ae.isWrapped=Pe;var ze=De.ybase+De.scrollTop,Ze=De.ybase+De.scrollBottom;if(De.scrollTop===0){var Xe=De.lines.isFull;Ze===De.lines.length-1?Xe?De.lines.recycle().copyFrom(Ae):De.lines.push(Ae.clone()):De.lines.splice(Ze+1,0,Ae.clone()),Xe?this._bufferService.isUserScrolling&&(De.ydisp=Math.max(De.ydisp-1,0)):(De.ybase++,this._bufferService.isUserScrolling||De.ydisp++)}else{var Ge=Ze-ze+1;De.lines.shiftElements(ze+1,Ge-1,-1),De.lines.set(Ze,Ae.clone())}this._bufferService.isUserScrolling||(De.ydisp=De.ybase),this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom),this._onScroll.fire(De.ydisp)},Se.prototype.scrollLines=function(we,Pe){var Ae=this._bufferService.buffer;if(we<0){if(Ae.ydisp===0)return;this._bufferService.isUserScrolling=!0}else we+Ae.ydisp>=Ae.ybase&&(this._bufferService.isUserScrolling=!1);var De=Ae.ydisp;Ae.ydisp=Math.max(Math.min(Ae.ydisp+we,Ae.ybase),0),De!==Ae.ydisp&&(Pe||this._onScroll.fire(Ae.ydisp))},Se.prototype.scrollPages=function(we){this.scrollLines(we*(this.rows-1))},Se.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},Se.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},Se.prototype.scrollToLine=function(we){var Pe=we-this._bufferService.buffer.ydisp;Pe!==0&&this.scrollLines(Pe)},Se.prototype.addEscHandler=function(we,Pe){return this._inputHandler.addEscHandler(we,Pe)},Se.prototype.addDcsHandler=function(we,Pe){return this._inputHandler.addDcsHandler(we,Pe)},Se.prototype.addCsiHandler=function(we,Pe){return this._inputHandler.addCsiHandler(we,Pe)},Se.prototype.addOscHandler=function(we,Pe){return this._inputHandler.addOscHandler(we,Pe)},Se.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},Se.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},Se.prototype._updateOptions=function(we){var Pe;switch(we){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((Pe=this._windowsMode)===null||Pe===void 0||Pe.dispose(),this._windowsMode=void 0)}},Se.prototype._enableWindowsMode=function(){var we=this;if(!this._windowsMode){var Pe=[];Pe.push(this.onLineFeed(ee.updateWindowsModeWrappedState.bind(null,this._bufferService))),Pe.push(this.addCsiHandler({final:"H"},function(){return ee.updateWindowsModeWrappedState(we._bufferService),!1})),this._windowsMode={dispose:function(){for(var Ae=0,De=Pe;Ae<De.length;Ae++)De[Ae].dispose()}}}},Se}(ke.Disposable);Ee.CoreTerminal=se},function(qt,Ee,Me){"use strict";var me=this&&this.__spreadArrays||function(){for(var he=0,ye=0,xe=arguments.length;ye<xe;ye++)he+=arguments[ye].length;var ge=Array(he),le=0;for(ye=0;ye<xe;ye++)for(var ve=arguments[ye],de=0,ce=ve.length;de<ce;de++,le++)ge[le]=ve[de];return ge};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.InstantiationService=Ee.ServiceCollection=void 0;var Be=Me(1),ke=Me(14),Ce=function(){function he(){for(var ye=[],xe=0;xe<arguments.length;xe++)ye[xe]=arguments[xe];this._entries=new Map;for(var ge=0,le=ye;ge<le.length;ge++){var ve=le[ge],de=ve[0],ce=ve[1];this.set(de,ce)}}return he.prototype.set=function(ye,xe){var ge=this._entries.get(ye);return this._entries.set(ye,xe),ge},he.prototype.forEach=function(ye){this._entries.forEach(function(xe,ge){return ye(ge,xe)})},he.prototype.has=function(ye){return this._entries.has(ye)},he.prototype.get=function(ye){return this._entries.get(ye)},he}();Ee.ServiceCollection=Ce;var Le=function(){function he(){this._services=new Ce,this._services.set(Be.IInstantiationService,this)}return he.prototype.setService=function(ye,xe){this._services.set(ye,xe)},he.prototype.getService=function(ye){return this._services.get(ye)},he.prototype.createInstance=function(ye){for(var xe=[],ge=1;ge<arguments.length;ge++)xe[ge-1]=arguments[ge];for(var le=ke.getServiceDependencies(ye).sort(function(ie,se){return ie.index-se.index}),ve=[],de=0,ce=le;de<ce.length;de++){var z=ce[de],ee=this._services.get(z.id);if(!ee)throw new Error("[createInstance] "+ye.name+" depends on UNKNOWN service "+z.id+".");ve.push(ee)}var oe=le.length>0?le[0].index:xe.length;if(xe.length!==oe)throw new Error("[createInstance] First service dependency of "+ye.name+" at position "+(oe+1)+" conflicts with "+xe.length+" static arguments");return new(ye.bind.apply(ye,me([void 0],me(xe,ve))))},he}();Ee.InstantiationService=Le},function(qt,Ee,Me){"use strict";var me=this&&this.__decorate||function(xe,ge,le,ve){var de,ce=arguments.length,z=ce<3?ge:ve===null?ve=Object.getOwnPropertyDescriptor(ge,le):ve;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(xe,ge,le,ve);else for(var ee=xe.length-1;ee>=0;ee--)(de=xe[ee])&&(z=(ce<3?de(z):ce>3?de(ge,le,z):de(ge,le))||z);return ce>3&&z&&Object.defineProperty(ge,le,z),z},Be=this&&this.__param||function(xe,ge){return function(le,ve){ge(le,ve,xe)}},ke=this&&this.__spreadArrays||function(){for(var xe=0,ge=0,le=arguments.length;ge<le;ge++)xe+=arguments[ge].length;var ve=Array(xe),de=0;for(ge=0;ge<le;ge++)for(var ce=arguments[ge],z=0,ee=ce.length;z<ee;z++,de++)ve[de]=ce[z];return ve};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.LogService=Ee.LogLevel=void 0;var Ce,Le=Me(1);(function(xe){xe[xe.DEBUG=0]="DEBUG",xe[xe.INFO=1]="INFO",xe[xe.WARN=2]="WARN",xe[xe.ERROR=3]="ERROR",xe[xe.OFF=4]="OFF"})(Ce=Ee.LogLevel||(Ee.LogLevel={}));var he={debug:Ce.DEBUG,info:Ce.INFO,warn:Ce.WARN,error:Ce.ERROR,off:Ce.OFF},ye=function(){function xe(ge){var le=this;this._optionsService=ge,this._updateLogLevel(),this._optionsService.onOptionChange(function(ve){ve==="logLevel"&&le._updateLogLevel()})}return xe.prototype._updateLogLevel=function(){this._logLevel=he[this._optionsService.options.logLevel]},xe.prototype._evalLazyOptionalParams=function(ge){for(var le=0;le<ge.length;le++)typeof ge[le]=="function"&&(ge[le]=ge[le]())},xe.prototype._log=function(ge,le,ve){this._evalLazyOptionalParams(ve),ge.call.apply(ge,ke([console,"xterm.js: "+le],ve))},xe.prototype.debug=function(ge){for(var le=[],ve=1;ve<arguments.length;ve++)le[ve-1]=arguments[ve];this._logLevel<=Ce.DEBUG&&this._log(console.log,ge,le)},xe.prototype.info=function(ge){for(var le=[],ve=1;ve<arguments.length;ve++)le[ve-1]=arguments[ve];this._logLevel<=Ce.INFO&&this._log(console.info,ge,le)},xe.prototype.warn=function(ge){for(var le=[],ve=1;ve<arguments.length;ve++)le[ve-1]=arguments[ve];this._logLevel<=Ce.WARN&&this._log(console.warn,ge,le)},xe.prototype.error=function(ge){for(var le=[],ve=1;ve<arguments.length;ve++)le[ve-1]=arguments[ve];this._logLevel<=Ce.ERROR&&this._log(console.error,ge,le)},xe=me([Be(0,Le.IOptionsService)],xe)}();Ee.LogService=ye},function(qt,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(le,ve){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ce){de.__proto__=ce}||function(de,ce){for(var z in ce)ce.hasOwnProperty(z)&&(de[z]=ce[z])})(le,ve)},function(le,ve){function de(){this.constructor=le}me(le,ve),le.prototype=ve===null?Object.create(ve):(de.prototype=ve.prototype,new de)}),ke=this&&this.__decorate||function(le,ve,de,ce){var z,ee=arguments.length,oe=ee<3?ve:ce===null?ce=Object.getOwnPropertyDescriptor(ve,de):ce;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(le,ve,de,ce);else for(var ie=le.length-1;ie>=0;ie--)(z=le[ie])&&(oe=(ee<3?z(oe):ee>3?z(ve,de,oe):z(ve,de))||oe);return ee>3&&oe&&Object.defineProperty(ve,de,oe),oe},Ce=this&&this.__param||function(le,ve){return function(de,ce){ve(de,ce,le)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BufferService=Ee.MINIMUM_ROWS=Ee.MINIMUM_COLS=void 0;var Le=Me(1),he=Me(69),ye=Me(0),xe=Me(2);Ee.MINIMUM_COLS=2,Ee.MINIMUM_ROWS=1;var ge=function(le){function ve(de){var ce=le.call(this)||this;return ce._optionsService=de,ce.isUserScrolling=!1,ce._onResize=new ye.EventEmitter,ce.cols=Math.max(de.options.cols,Ee.MINIMUM_COLS),ce.rows=Math.max(de.options.rows,Ee.MINIMUM_ROWS),ce.buffers=new he.BufferSet(de,ce),ce}return Be(ve,le),Object.defineProperty(ve.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),ve.prototype.dispose=function(){le.prototype.dispose.call(this),this.buffers.dispose()},ve.prototype.resize=function(de,ce){this.cols=de,this.rows=ce,this.buffers.resize(de,ce),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:de,rows:ce})},ve.prototype.reset=function(){this.buffers.dispose(),this.buffers=new he.BufferSet(this._optionsService,this),this.isUserScrolling=!1},ve=ke([Ce(0,Le.IOptionsService)],ve)}(xe.Disposable);Ee.BufferService=ge},function(qt,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(he,ye){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(xe,ge){xe.__proto__=ge}||function(xe,ge){for(var le in ge)ge.hasOwnProperty(le)&&(xe[le]=ge[le])})(he,ye)},function(he,ye){function xe(){this.constructor=he}me(he,ye),he.prototype=ye===null?Object.create(ye):(xe.prototype=ye.prototype,new xe)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BufferSet=void 0;var ke=Me(70),Ce=Me(0),Le=function(he){function ye(xe,ge){var le=he.call(this)||this;return le._onBufferActivate=le.register(new Ce.EventEmitter),le._normal=new ke.Buffer(!0,xe,ge),le._normal.fillViewportRows(),le._alt=new ke.Buffer(!1,xe,ge),le._activeBuffer=le._normal,le.setupTabStops(),le}return Be(ye,he),Object.defineProperty(ye.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),ye.prototype.activateNormalBuffer=function(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))},ye.prototype.activateAltBuffer=function(xe){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(xe),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))},ye.prototype.resize=function(xe,ge){this._normal.resize(xe,ge),this._alt.resize(xe,ge)},ye.prototype.setupTabStops=function(xe){this._normal.setupTabStops(xe),this._alt.setupTabStops(xe)},ye}(Me(2).Disposable);Ee.BufferSet=Le},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BufferStringIterator=Ee.Buffer=Ee.MAX_BUFFER_SIZE=void 0;var me=Me(71),Be=Me(16),ke=Me(4),Ce=Me(3),Le=Me(72),he=Me(73),ye=Me(20),xe=Me(6);Ee.MAX_BUFFER_SIZE=4294967295;var ge=function(){function ve(de,ce,z){this._hasScrollback=de,this._optionsService=ce,this._bufferService=z,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=Be.DEFAULT_ATTR_DATA.clone(),this.savedCharset=ye.DEFAULT_CHARSET,this.markers=[],this._nullCell=ke.CellData.fromCharData([0,Ce.NULL_CELL_CHAR,Ce.NULL_CELL_WIDTH,Ce.NULL_CELL_CODE]),this._whitespaceCell=ke.CellData.fromCharData([0,Ce.WHITESPACE_CELL_CHAR,Ce.WHITESPACE_CELL_WIDTH,Ce.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new me.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return ve.prototype.getNullCell=function(de){return de?(this._nullCell.fg=de.fg,this._nullCell.bg=de.bg,this._nullCell.extended=de.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new xe.ExtendedAttrs),this._nullCell},ve.prototype.getWhitespaceCell=function(de){return de?(this._whitespaceCell.fg=de.fg,this._whitespaceCell.bg=de.bg,this._whitespaceCell.extended=de.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new xe.ExtendedAttrs),this._whitespaceCell},ve.prototype.getBlankLine=function(de,ce){return new Be.BufferLine(this._bufferService.cols,this.getNullCell(de),ce)},Object.defineProperty(ve.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"isCursorInViewport",{get:function(){var de=this.ybase+this.y-this.ydisp;return de>=0&&de<this._rows},enumerable:!1,configurable:!0}),ve.prototype._getCorrectBufferLength=function(de){if(!this._hasScrollback)return de;var ce=de+this._optionsService.options.scrollback;return ce>Ee.MAX_BUFFER_SIZE?Ee.MAX_BUFFER_SIZE:ce},ve.prototype.fillViewportRows=function(de){if(this.lines.length===0){de===void 0&&(de=Be.DEFAULT_ATTR_DATA);for(var ce=this._rows;ce--;)this.lines.push(this.getBlankLine(de))}},ve.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new me.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},ve.prototype.resize=function(de,ce){var z=this.getNullCell(Be.DEFAULT_ATTR_DATA),ee=this._getCorrectBufferLength(ce);if(ee>this.lines.maxLength&&(this.lines.maxLength=ee),this.lines.length>0){if(this._cols<de)for(var oe=0;oe<this.lines.length;oe++)this.lines.get(oe).resize(de,z);var ie=0;if(this._rows<ce)for(var se=this._rows;se<ce;se++)this.lines.length<ce+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new Be.BufferLine(de,z)):this.ybase>0&&this.lines.length<=this.ybase+this.y+ie+1?(this.ybase--,ie++,this.ydisp>0&&this.ydisp--):this.lines.push(new Be.BufferLine(de,z)));else for(se=this._rows;se>ce;se--)this.lines.length>ce+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(ee<this.lines.maxLength){var ue=this.lines.length-ee;ue>0&&(this.lines.trimStart(ue),this.ybase=Math.max(this.ybase-ue,0),this.ydisp=Math.max(this.ydisp-ue,0),this.savedY=Math.max(this.savedY-ue,0)),this.lines.maxLength=ee}this.x=Math.min(this.x,de-1),this.y=Math.min(this.y,ce-1),ie&&(this.y+=ie),this.savedX=Math.min(this.savedX,de-1),this.scrollTop=0}if(this.scrollBottom=ce-1,this._isReflowEnabled&&(this._reflow(de,ce),this._cols>de))for(oe=0;oe<this.lines.length;oe++)this.lines.get(oe).resize(de,z);this._cols=de,this._rows=ce},Object.defineProperty(ve.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),ve.prototype._reflow=function(de,ce){this._cols!==de&&(de>this._cols?this._reflowLarger(de,ce):this._reflowSmaller(de,ce))},ve.prototype._reflowLarger=function(de,ce){var z=Le.reflowLargerGetLinesToRemove(this.lines,this._cols,de,this.ybase+this.y,this.getNullCell(Be.DEFAULT_ATTR_DATA));if(z.length>0){var ee=Le.reflowLargerCreateNewLayout(this.lines,z);Le.reflowLargerApplyNewLayout(this.lines,ee.layout),this._reflowLargerAdjustViewport(de,ce,ee.countRemoved)}},ve.prototype._reflowLargerAdjustViewport=function(de,ce,z){for(var ee=this.getNullCell(Be.DEFAULT_ATTR_DATA),oe=z;oe-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<ce&&this.lines.push(new Be.BufferLine(de,ee))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-z,0)},ve.prototype._reflowSmaller=function(de,ce){for(var z=this.getNullCell(Be.DEFAULT_ATTR_DATA),ee=[],oe=0,ie=this.lines.length-1;ie>=0;ie--){var se=this.lines.get(ie);if(!(!se||!se.isWrapped&&se.getTrimmedLength()<=de)){for(var ue=[se];se.isWrapped&&ie>0;)se=this.lines.get(--ie),ue.unshift(se);var Se=this.ybase+this.y;if(!(Se>=ie&&Se<ie+ue.length)){var we=ue[ue.length-1].getTrimmedLength(),Pe=Le.reflowSmallerGetNewLineLengths(ue,this._cols,de),Ae=Pe.length-ue.length,De=void 0;De=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+Ae):Math.max(0,this.lines.length-this.lines.maxLength+Ae);for(var ze=[],Ze=0;Ze<Ae;Ze++){var Xe=this.getBlankLine(Be.DEFAULT_ATTR_DATA,!0);ze.push(Xe)}ze.length>0&&(ee.push({start:ie+ue.length+oe,newLines:ze}),oe+=ze.length),ue.push.apply(ue,ze);var Ge=Pe.length-1,ft=Pe[Ge];ft===0&&(ft=Pe[--Ge]);for(var at=ue.length-Ae-1,Ct=we;at>=0;){var et=Math.min(Ct,ft);if(ue[Ge].copyCellsFrom(ue[at],Ct-et,ft-et,et,!0),(ft-=et)===0&&(ft=Pe[--Ge]),(Ct-=et)===0){at--;var yt=Math.max(at,0);Ct=Le.getWrappedLineTrimmedLength(ue,yt,this._cols)}}for(Ze=0;Ze<ue.length;Ze++)Pe[Ze]<de&&ue[Ze].setCell(Pe[Ze],z);for(var st=Ae-De;st-- >0;)this.ybase===0?this.y<ce-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+oe)-ce&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+Ae,this.ybase+ce-1)}}}if(ee.length>0){var zt=[],lt=[];for(Ze=0;Ze<this.lines.length;Ze++)lt.push(this.lines.get(Ze));var tt=this.lines.length,ut=tt-1,mt=0,Pt=ee[mt];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+oe);var gt=0;for(Ze=Math.min(this.lines.maxLength-1,tt+oe-1);Ze>=0;Ze--)if(Pt&&Pt.start>ut+gt){for(var Ft=Pt.newLines.length-1;Ft>=0;Ft--)this.lines.set(Ze--,Pt.newLines[Ft]);Ze++,zt.push({index:ut+1,amount:Pt.newLines.length}),gt+=Pt.newLines.length,Pt=ee[++mt]}else this.lines.set(Ze,lt[ut--]);var Ht=0;for(Ze=zt.length-1;Ze>=0;Ze--)zt[Ze].index+=Ht,this.lines.onInsertEmitter.fire(zt[Ze]),Ht+=zt[Ze].amount;var hn=Math.max(0,tt+oe-this.lines.maxLength);hn>0&&this.lines.onTrimEmitter.fire(hn)}},ve.prototype.stringIndexToBufferIndex=function(de,ce,z){for(z===void 0&&(z=!1);ce;){var ee=this.lines.get(de);if(!ee)return[-1,-1];for(var oe=z?ee.getTrimmedLength():ee.length,ie=0;ie<oe;++ie)if(ee.get(ie)[Ce.CHAR_DATA_WIDTH_INDEX]&&(ce-=ee.get(ie)[Ce.CHAR_DATA_CHAR_INDEX].length||1),ce<0)return[de,ie];de++}return[de,0]},ve.prototype.translateBufferLineToString=function(de,ce,z,ee){z===void 0&&(z=0);var oe=this.lines.get(de);return oe?oe.translateToString(ce,z,ee):""},ve.prototype.getWrappedRangeForLine=function(de){for(var ce=de,z=de;ce>0&&this.lines.get(ce).isWrapped;)ce--;for(;z+1<this.lines.length&&this.lines.get(z+1).isWrapped;)z++;return{first:ce,last:z}},ve.prototype.setupTabStops=function(de){for(de!=null?this.tabs[de]||(de=this.prevStop(de)):(this.tabs={},de=0);de<this._cols;de+=this._optionsService.options.tabStopWidth)this.tabs[de]=!0},ve.prototype.prevStop=function(de){for(de==null&&(de=this.x);!this.tabs[--de]&&de>0;);return de>=this._cols?this._cols-1:de<0?0:de},ve.prototype.nextStop=function(de){for(de==null&&(de=this.x);!this.tabs[++de]&&de<this._cols;);return de>=this._cols?this._cols-1:de<0?0:de},ve.prototype.addMarker=function(de){var ce=this,z=new he.Marker(de);return this.markers.push(z),z.register(this.lines.onTrim(function(ee){z.line-=ee,z.line<0&&z.dispose()})),z.register(this.lines.onInsert(function(ee){z.line>=ee.index&&(z.line+=ee.amount)})),z.register(this.lines.onDelete(function(ee){z.line>=ee.index&&z.line<ee.index+ee.amount&&z.dispose(),z.line>ee.index&&(z.line-=ee.amount)})),z.register(z.onDispose(function(){return ce._removeMarker(z)})),z},ve.prototype._removeMarker=function(de){this.markers.splice(this.markers.indexOf(de),1)},ve.prototype.iterator=function(de,ce,z,ee,oe){return new le(this,de,ce,z,ee,oe)},ve}();Ee.Buffer=ge;var le=function(){function ve(de,ce,z,ee,oe,ie){z===void 0&&(z=0),ee===void 0&&(ee=de.lines.length),oe===void 0&&(oe=0),ie===void 0&&(ie=0),this._buffer=de,this._trimRight=ce,this._startIndex=z,this._endIndex=ee,this._startOverscan=oe,this._endOverscan=ie,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return ve.prototype.hasNext=function(){return this._current<this._endIndex},ve.prototype.next=function(){var de=this._buffer.getWrappedRangeForLine(this._current);de.first<this._startIndex-this._startOverscan&&(de.first=this._startIndex-this._startOverscan),de.last>this._endIndex+this._endOverscan&&(de.last=this._endIndex+this._endOverscan),de.first=Math.max(de.first,0),de.last=Math.min(de.last,this._buffer.lines.length);for(var ce="",z=de.first;z<=de.last;++z)ce+=this._buffer.translateBufferLineToString(z,this._trimRight);return this._current=de.last+1,{range:de,content:ce}},ve}();Ee.BufferStringIterator=le},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CircularList=void 0;var me=Me(0),Be=function(){function ke(Ce){this._maxLength=Ce,this.onDeleteEmitter=new me.EventEmitter,this.onInsertEmitter=new me.EventEmitter,this.onTrimEmitter=new me.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(ke.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"maxLength",{get:function(){return this._maxLength},set:function(Ce){if(this._maxLength!==Ce){for(var Le=new Array(Ce),he=0;he<Math.min(Ce,this.length);he++)Le[he]=this._array[this._getCyclicIndex(he)];this._array=Le,this._maxLength=Ce,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"length",{get:function(){return this._length},set:function(Ce){if(Ce>this._length)for(var Le=this._length;Le<Ce;Le++)this._array[Le]=void 0;this._length=Ce},enumerable:!1,configurable:!0}),ke.prototype.get=function(Ce){return this._array[this._getCyclicIndex(Ce)]},ke.prototype.set=function(Ce,Le){this._array[this._getCyclicIndex(Ce)]=Le},ke.prototype.push=function(Ce){this._array[this._getCyclicIndex(this._length)]=Ce,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},ke.prototype.recycle=function(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]},Object.defineProperty(ke.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),ke.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},ke.prototype.splice=function(Ce,Le){for(var he=[],ye=2;ye<arguments.length;ye++)he[ye-2]=arguments[ye];if(Le){for(var xe=Ce;xe<this._length-Le;xe++)this._array[this._getCyclicIndex(xe)]=this._array[this._getCyclicIndex(xe+Le)];this._length-=Le}for(xe=this._length-1;xe>=Ce;xe--)this._array[this._getCyclicIndex(xe+he.length)]=this._array[this._getCyclicIndex(xe)];for(xe=0;xe<he.length;xe++)this._array[this._getCyclicIndex(Ce+xe)]=he[xe];if(this._length+he.length>this._maxLength){var ge=this._length+he.length-this._maxLength;this._startIndex+=ge,this._length=this._maxLength,this.onTrimEmitter.fire(ge)}else this._length+=he.length},ke.prototype.trimStart=function(Ce){Ce>this._length&&(Ce=this._length),this._startIndex+=Ce,this._length-=Ce,this.onTrimEmitter.fire(Ce)},ke.prototype.shiftElements=function(Ce,Le,he){if(!(Le<=0)){if(Ce<0||Ce>=this._length)throw new Error("start argument out of range");if(Ce+he<0)throw new Error("Cannot shift elements in list beyond index 0");if(he>0){for(var ye=Le-1;ye>=0;ye--)this.set(Ce+ye+he,this.get(Ce+ye));var xe=Ce+Le+he-this._length;if(xe>0)for(this._length+=xe;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(ye=0;ye<Le;ye++)this.set(Ce+ye+he,this.get(Ce+ye))}},ke.prototype._getCyclicIndex=function(Ce){return(this._startIndex+Ce)%this._maxLength},ke}();Ee.CircularList=Be},function(qt,Ee,Me){"use strict";function me(Be,ke,Ce){if(ke===Be.length-1)return Be[ke].getTrimmedLength();var Le=!Be[ke].hasContent(Ce-1)&&Be[ke].getWidth(Ce-1)===1,he=Be[ke+1].getWidth(0)===2;return Le&&he?Ce-1:Ce}Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.getWrappedLineTrimmedLength=Ee.reflowSmallerGetNewLineLengths=Ee.reflowLargerApplyNewLayout=Ee.reflowLargerCreateNewLayout=Ee.reflowLargerGetLinesToRemove=void 0,Ee.reflowLargerGetLinesToRemove=function(Be,ke,Ce,Le,he){for(var ye=[],xe=0;xe<Be.length-1;xe++){var ge=xe,le=Be.get(++ge);if(le.isWrapped){for(var ve=[Be.get(xe)];ge<Be.length&&le.isWrapped;)ve.push(le),le=Be.get(++ge);if(Le>=xe&&Le<ge)xe+=ve.length-1;else{for(var de=0,ce=me(ve,de,ke),z=1,ee=0;z<ve.length;){var oe=me(ve,z,ke),ie=oe-ee,se=Ce-ce,ue=Math.min(ie,se);ve[de].copyCellsFrom(ve[z],ee,ce,ue,!1),(ce+=ue)===Ce&&(de++,ce=0),(ee+=ue)===oe&&(z++,ee=0),ce===0&&de!==0&&ve[de-1].getWidth(Ce-1)===2&&(ve[de].copyCellsFrom(ve[de-1],Ce-1,ce++,1,!1),ve[de-1].setCell(Ce-1,he))}ve[de].replaceCells(ce,Ce,he);for(var Se=0,we=ve.length-1;we>0&&(we>de||ve[we].getTrimmedLength()===0);we--)Se++;Se>0&&(ye.push(xe+ve.length-Se),ye.push(Se)),xe+=ve.length-1}}}return ye},Ee.reflowLargerCreateNewLayout=function(Be,ke){for(var Ce=[],Le=0,he=ke[Le],ye=0,xe=0;xe<Be.length;xe++)if(he===xe){var ge=ke[++Le];Be.onDeleteEmitter.fire({index:xe-ye,amount:ge}),xe+=ge-1,ye+=ge,he=ke[++Le]}else Ce.push(xe);return{layout:Ce,countRemoved:ye}},Ee.reflowLargerApplyNewLayout=function(Be,ke){for(var Ce=[],Le=0;Le<ke.length;Le++)Ce.push(Be.get(ke[Le]));for(Le=0;Le<Ce.length;Le++)Be.set(Le,Ce[Le]);Be.length=ke.length},Ee.reflowSmallerGetNewLineLengths=function(Be,ke,Ce){for(var Le=[],he=Be.map(function(ce,z){return me(Be,z,ke)}).reduce(function(ce,z){return ce+z}),ye=0,xe=0,ge=0;ge<he;){if(he-ge<Ce){Le.push(he-ge);break}ye+=Ce;var le=me(Be,xe,ke);ye>le&&(ye-=le,xe++);var ve=Be[xe].getWidth(ye-1)===2;ve&&ye--;var de=ve?Ce-1:Ce;Le.push(de),ge+=de}return Le},Ee.getWrappedLineTrimmedLength=me},function(qt,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(Le,he){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ye,xe){ye.__proto__=xe}||function(ye,xe){for(var ge in xe)xe.hasOwnProperty(ge)&&(ye[ge]=xe[ge])})(Le,he)},function(Le,he){function ye(){this.constructor=Le}me(Le,he),Le.prototype=he===null?Object.create(he):(ye.prototype=he.prototype,new ye)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Marker=void 0;var ke=Me(0),Ce=function(Le){function he(ye){var xe=Le.call(this)||this;return xe.line=ye,xe._id=he._nextId++,xe.isDisposed=!1,xe._onDispose=new ke.EventEmitter,xe}return Be(he,Le),Object.defineProperty(he.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(he.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),he.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire())},he._nextId=1,he}(Me(2).Disposable);Ee.Marker=Ce},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.OptionsService=Ee.DEFAULT_OPTIONS=Ee.DEFAULT_BELL_SOUND=void 0;var me=Me(0),Be=Me(11),ke=Me(33);Ee.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",Ee.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:Ee.DEFAULT_BELL_SOUND,bellStyle:"none",drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,linkTooltipHoverDuration:500,letterSpacing:0,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!0,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:Be.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",convertEol:!1,termName:"xterm",cancelEvents:!1});var Ce=["cols","rows"],Le=function(){function he(ye){this._onOptionChange=new me.EventEmitter,this.options=ke.clone(Ee.DEFAULT_OPTIONS);for(var xe=0,ge=Object.keys(ye);xe<ge.length;xe++){var le=ge[xe];if(le in this.options){var ve=ye[le];this.options[le]=ve}}}return Object.defineProperty(he.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),he.prototype.setOption=function(ye,xe){if(!(ye in Ee.DEFAULT_OPTIONS))throw new Error('No option with key "'+ye+'"');if(Ce.indexOf(ye)!==-1)throw new Error('Option "'+ye+'" can only be set in the constructor');this.options[ye]!==xe&&(xe=this._sanitizeAndValidateOption(ye,xe),this.options[ye]!==xe&&(this.options[ye]=xe,this._onOptionChange.fire(ye)))},he.prototype._sanitizeAndValidateOption=function(ye,xe){switch(ye){case"bellStyle":case"cursorStyle":case"fontWeight":case"fontWeightBold":case"rendererType":case"wordSeparator":xe||(xe=Ee.DEFAULT_OPTIONS[ye]);break;case"cursorWidth":xe=Math.floor(xe);case"lineHeight":case"tabStopWidth":if(xe<1)throw new Error(ye+" cannot be less than 1, value: "+xe);break;case"minimumContrastRatio":xe=Math.max(1,Math.min(21,Math.round(10*xe)/10));break;case"scrollback":if((xe=Math.min(xe,4294967295))<0)throw new Error(ye+" cannot be less than 0, value: "+xe);break;case"fastScrollSensitivity":case"scrollSensitivity":if(xe<=0)throw new Error(ye+" cannot be less than or equal to 0, value: "+xe)}return xe},he.prototype.getOption=function(ye){if(!(ye in Ee.DEFAULT_OPTIONS))throw new Error('No option with key "'+ye+'"');return this.options[ye]},he}();Ee.OptionsService=Le},function(qt,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(de,ce){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,ee){z.__proto__=ee}||function(z,ee){for(var oe in ee)ee.hasOwnProperty(oe)&&(z[oe]=ee[oe])})(de,ce)},function(de,ce){function z(){this.constructor=de}me(de,ce),de.prototype=ce===null?Object.create(ce):(z.prototype=ce.prototype,new z)}),ke=this&&this.__decorate||function(de,ce,z,ee){var oe,ie=arguments.length,se=ie<3?ce:ee===null?ee=Object.getOwnPropertyDescriptor(ce,z):ee;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")se=Reflect.decorate(de,ce,z,ee);else for(var ue=de.length-1;ue>=0;ue--)(oe=de[ue])&&(se=(ie<3?oe(se):ie>3?oe(ce,z,se):oe(ce,z))||se);return ie>3&&se&&Object.defineProperty(ce,z,se),se},Ce=this&&this.__param||function(de,ce){return function(z,ee){ce(z,ee,de)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CoreService=void 0;var Le=Me(1),he=Me(0),ye=Me(33),xe=Me(2),ge=Object.freeze({insertMode:!1}),le=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),ve=function(de){function ce(z,ee,oe,ie){var se=de.call(this)||this;return se._bufferService=ee,se._logService=oe,se._optionsService=ie,se.isCursorInitialized=!1,se.isCursorHidden=!1,se._onData=se.register(new he.EventEmitter),se._onUserInput=se.register(new he.EventEmitter),se._onBinary=se.register(new he.EventEmitter),se._scrollToBottom=z,se.register({dispose:function(){return se._scrollToBottom=void 0}}),se.modes=ye.clone(ge),se.decPrivateModes=ye.clone(le),se}return Be(ce,de),Object.defineProperty(ce.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),ce.prototype.reset=function(){this.modes=ye.clone(ge),this.decPrivateModes=ye.clone(le)},ce.prototype.triggerDataEvent=function(z,ee){if(ee===void 0&&(ee=!1),!this._optionsService.options.disableStdin){var oe=this._bufferService.buffer;oe.ybase!==oe.ydisp&&this._scrollToBottom(),ee&&this._onUserInput.fire(),this._logService.debug('sending data "'+z+'"',function(){return z.split("").map(function(ie){return ie.charCodeAt(0)})}),this._onData.fire(z)}},ce.prototype.triggerBinaryEvent=function(z){this._optionsService.options.disableStdin||(this._logService.debug('sending binary "'+z+'"',function(){return z.split("").map(function(ee){return ee.charCodeAt(0)})}),this._onBinary.fire(z))},ce=ke([Ce(1,Le.IBufferService),Ce(2,Le.ILogService),Ce(3,Le.IOptionsService)],ce)}(xe.Disposable);Ee.CoreService=ve},function(qt,Ee,Me){"use strict";var me=this&&this.__decorate||function(le,ve,de,ce){var z,ee=arguments.length,oe=ee<3?ve:ce===null?ce=Object.getOwnPropertyDescriptor(ve,de):ce;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(le,ve,de,ce);else for(var ie=le.length-1;ie>=0;ie--)(z=le[ie])&&(oe=(ee<3?z(oe):ee>3?z(ve,de,oe):z(ve,de))||oe);return ee>3&&oe&&Object.defineProperty(ve,de,oe),oe},Be=this&&this.__param||function(le,ve){return function(de,ce){ve(de,ce,le)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CoreMouseService=void 0;var ke=Me(1),Ce=Me(0),Le={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(le){return le.button!==4&&le.action===1&&(le.ctrl=!1,le.alt=!1,le.shift=!1,!0)}},VT200:{events:19,restrict:function(le){return le.action!==32}},DRAG:{events:23,restrict:function(le){return le.action!==32||le.button!==3}},ANY:{events:31,restrict:function(le){return!0}}};function he(le,ve){var de=(le.ctrl?16:0)|(le.shift?4:0)|(le.alt?8:0);return le.button===4?(de|=64,de|=le.action):(de|=3&le.button,4&le.button&&(de|=64),8&le.button&&(de|=128),le.action===32?de|=32:le.action!==0||ve||(de|=3)),de}var ye=String.fromCharCode,xe={DEFAULT:function(le){var ve=[he(le,!1)+32,le.col+32,le.row+32];return ve[0]>255||ve[1]>255||ve[2]>255?"":"\x1B[M"+ye(ve[0])+ye(ve[1])+ye(ve[2])},SGR:function(le){var ve=le.action===0&&le.button!==4?"m":"M";return"\x1B[<"+he(le,!0)+";"+le.col+";"+le.row+ve}},ge=function(){function le(ve,de){this._bufferService=ve,this._coreService=de,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new Ce.EventEmitter,this._lastEvent=null;for(var ce=0,z=Object.keys(Le);ce<z.length;ce++){var ee=z[ce];this.addProtocol(ee,Le[ee])}for(var oe=0,ie=Object.keys(xe);oe<ie.length;oe++){var se=ie[oe];this.addEncoding(se,xe[se])}this.reset()}return le.prototype.addProtocol=function(ve,de){this._protocols[ve]=de},le.prototype.addEncoding=function(ve,de){this._encodings[ve]=de},Object.defineProperty(le.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(ve){if(!this._protocols[ve])throw new Error('unknown protocol "'+ve+'"');this._activeProtocol=ve,this._onProtocolChange.fire(this._protocols[ve].events)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(ve){if(!this._encodings[ve])throw new Error('unknown encoding "'+ve+'"');this._activeEncoding=ve},enumerable:!1,configurable:!0}),le.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(le.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),le.prototype.triggerMouseEvent=function(ve){if(ve.col<0||ve.col>=this._bufferService.cols||ve.row<0||ve.row>=this._bufferService.rows||ve.button===4&&ve.action===32||ve.button===3&&ve.action!==32||ve.button!==4&&(ve.action===2||ve.action===3)||(ve.col++,ve.row++,ve.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,ve))||!this._protocols[this._activeProtocol].restrict(ve))return!1;var de=this._encodings[this._activeEncoding](ve);return de&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(de):this._coreService.triggerDataEvent(de,!0)),this._lastEvent=ve,!0},le.prototype.explainEvents=function(ve){return{down:!!(1&ve),up:!!(2&ve),drag:!!(4&ve),move:!!(8&ve),wheel:!!(16&ve)}},le.prototype._compareEvents=function(ve,de){return ve.col===de.col&&ve.row===de.row&&ve.button===de.button&&ve.action===de.action&&ve.ctrl===de.ctrl&&ve.alt===de.alt&&ve.shift===de.shift},le=me([Be(0,ke.IBufferService),Be(1,ke.ICoreService)],le)}();Ee.CoreMouseService=ge},function(qt,Ee,Me){"use strict";var me=this&&this.__decorate||function(Le,he,ye,xe){var ge,le=arguments.length,ve=le<3?he:xe===null?xe=Object.getOwnPropertyDescriptor(he,ye):xe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(Le,he,ye,xe);else for(var de=Le.length-1;de>=0;de--)(ge=Le[de])&&(ve=(le<3?ge(ve):le>3?ge(he,ye,ve):ge(he,ye))||ve);return le>3&&ve&&Object.defineProperty(he,ye,ve),ve},Be=this&&this.__param||function(Le,he){return function(ye,xe){he(ye,xe,Le)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.DirtyRowService=void 0;var ke=Me(1),Ce=function(){function Le(he){this._bufferService=he,this.clearRange()}return Object.defineProperty(Le.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(Le.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),Le.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},Le.prototype.markDirty=function(he){he<this._start?this._start=he:he>this._end&&(this._end=he)},Le.prototype.markRangeDirty=function(he,ye){if(he>ye){var xe=he;he=ye,ye=xe}he<this._start&&(this._start=he),ye>this._end&&(this._end=ye)},Le.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},Le=me([Be(0,ke.IBufferService)],Le)}();Ee.DirtyRowService=Ce},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.UnicodeService=void 0;var me=Me(0),Be=Me(79),ke=function(){function Ce(){this._providers=Object.create(null),this._active="",this._onChange=new me.EventEmitter;var Le=new Be.UnicodeV6;this.register(Le),this._active=Le.version,this._activeProvider=Le}return Object.defineProperty(Ce.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"activeVersion",{get:function(){return this._active},set:function(Le){if(!this._providers[Le])throw new Error('unknown Unicode version "'+Le+'"');this._active=Le,this._activeProvider=this._providers[Le],this._onChange.fire(Le)},enumerable:!1,configurable:!0}),Ce.prototype.register=function(Le){this._providers[Le.version]=Le},Ce.prototype.wcwidth=function(Le){return this._activeProvider.wcwidth(Le)},Ce.prototype.getStringCellWidth=function(Le){for(var he=0,ye=Le.length,xe=0;xe<ye;++xe){var ge=Le.charCodeAt(xe);if(55296<=ge&&ge<=56319){if(++xe>=ye)return he+this.wcwidth(ge);var le=Le.charCodeAt(xe);56320<=le&&le<=57343?ge=1024*(ge-55296)+le-56320+65536:he+=this.wcwidth(le)}he+=this.wcwidth(ge)}return he},Ce}();Ee.UnicodeService=ke},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.UnicodeV6=void 0;var me,Be=Me(15),ke=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],Ce=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],Le=function(){function he(){if(this.version="6",!me){me=new Uint8Array(65536),Be.fill(me,1),me[0]=0,Be.fill(me,0,1,32),Be.fill(me,0,127,160),Be.fill(me,2,4352,4448),me[9001]=2,me[9002]=2,Be.fill(me,2,11904,42192),me[12351]=1,Be.fill(me,2,44032,55204),Be.fill(me,2,63744,64256),Be.fill(me,2,65040,65050),Be.fill(me,2,65072,65136),Be.fill(me,2,65280,65377),Be.fill(me,2,65504,65511);for(var ye=0;ye<ke.length;++ye)Be.fill(me,0,ke[ye][0],ke[ye][1]+1)}}return he.prototype.wcwidth=function(ye){return ye<32?0:ye<127?1:ye<65536?me[ye]:function(xe,ge){var le,ve=0,de=ge.length-1;if(xe<ge[0][0]||xe>ge[de][1])return!1;for(;de>=ve;)if(xe>ge[le=ve+de>>1][1])ve=le+1;else{if(!(xe<ge[le][0]))return!0;de=le-1}return!1}(ye,Ce)?0:ye>=131072&&ye<=196605||ye>=196608&&ye<=262141?2:1},he}();Ee.UnicodeV6=Le},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CharsetService=void 0;var me=function(){function Be(){this.glevel=0,this._charsets=[]}return Be.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},Be.prototype.setgLevel=function(ke){this.glevel=ke,this.charset=this._charsets[ke]},Be.prototype.setgCharset=function(ke,Ce){this._charsets[ke]=Ce,this.glevel===ke&&(this.charset=Ce)},Be}();Ee.CharsetService=me},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.updateWindowsModeWrappedState=void 0;var me=Me(3);Ee.updateWindowsModeWrappedState=function(Be){var ke=Be.buffer.lines.get(Be.buffer.ybase+Be.buffer.y-1),Ce=ke==null?void 0:ke.get(Be.cols-1),Le=Be.buffer.lines.get(Be.buffer.ybase+Be.buffer.y);Le&&Ce&&(Le.isWrapped=Ce[me.CHAR_DATA_CODE_INDEX]!==me.NULL_CELL_CODE&&Ce[me.CHAR_DATA_CODE_INDEX]!==me.WHITESPACE_CELL_CODE)}},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.WriteBuffer=void 0;var me=function(){function Be(ke){this._action=ke,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return Be.prototype.writeSync=function(ke){if(this._writeBuffer.length){for(var Ce=this._bufferOffset;Ce<this._writeBuffer.length;++Ce){var Le=this._writeBuffer[Ce],he=this._callbacks[Ce];this._action(Le),he&&he()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(ke)},Be.prototype.write=function(ke,Ce){var Le=this;if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout(function(){return Le._innerWrite()})),this._pendingData+=ke.length,this._writeBuffer.push(ke),this._callbacks.push(Ce)},Be.prototype._innerWrite=function(){for(var ke=this,Ce=Date.now();this._writeBuffer.length>this._bufferOffset;){var Le=this._writeBuffer[this._bufferOffset],he=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(Le),this._pendingData-=Le.length,he&&he(),Date.now()-Ce>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(function(){return ke._innerWrite()},0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},Be}();Ee.WriteBuffer=me},function(qt,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.AddonManager=void 0;var me=function(){function Be(){this._addons=[]}return Be.prototype.dispose=function(){for(var ke=this._addons.length-1;ke>=0;ke--)this._addons[ke].instance.dispose()},Be.prototype.loadAddon=function(ke,Ce){var Le=this,he={instance:Ce,dispose:Ce.dispose,isDisposed:!1};this._addons.push(he),Ce.dispose=function(){return Le._wrappedAddonDispose(he)},Ce.activate(ke)},Be.prototype._wrappedAddonDispose=function(ke){if(!ke.isDisposed){for(var Ce=-1,Le=0;Le<this._addons.length;Le++)if(this._addons[Le]===ke){Ce=Le;break}if(Ce===-1)throw new Error("Could not dispose an addon that has not been loaded");ke.isDisposed=!0,ke.dispose.apply(ke.instance),this._addons.splice(Ce,1)}},Be}();Ee.AddonManager=me}])})},93314:function(_n){"use strict";_n.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=="},62522:function(_n){"use strict";_n.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUYAAABYCAYAAACJfF6vAAAAAXNSR0IArs4c6QAAIABJREFUeF7sXQe4FcXZfmd2T7n90jtYsFGModkVUGNJ7BVTVIxdI5ii/iYmxkRjEhV7ohF7wQaxBqOIxgqCQSkWUKRIv72csjvzP9/M7p7ZPefce8EGhOOD95wt0+ed9yvzDcO2z7YW2NYCm00LNL19cQ/H4j/nEt+vKK38LhtyVWazKdz/UEHY/1Bdt1V1Wwts1i3QMGviGRLyJgAVVFCb4YiykZNe2KwLvZUWbhswbqUdu61aW1YL1L0z4TrG8Cuz1IyxOytH3njOllWTraO024Bx6+jHbbXYglugcfaEC4TErZEqNAN4q2rUpEO24KptsUXfBoxbbNdtK/jW0AINsyfsC2CGlIgzBgGJaRzi9jKeeo2NuDO7NdRxS6zDNmDcEnttW5k32xYYP3XZFADfA6QFsKWTj+2/e7HCyld+azeU1S8AsDOAjxnEGZWjbn7z26rc+H8u/yWEPMti9kV3HdN7+rdVjs0h323AuDn0wrYybDUtMH7a8lsh5QW6Qqxl8rH9yopVrmHWhLMl8HcAL1UK93i21y0N30ZD/Hj66rJYKjMZAid5+T82+dj+J38bZdlc8twGjJtLT2wrx1bRAmc+tWy8ZLhb4yJWTz6mf69CFSO2WF9av5QxLG1w2CH99rmx9dtogDP/uXygFHIqgCG6zOyhxkzf0x4/ibnfRnk2lzy3WGBsmDXhTSkxFAxSAksB9jFneIFZztMVw25Zt7k08Jcpx7p9d6lAPD5BMHkKY/K33V9e8MSXSe+berf+zYmdEZO3VpZUnf6/5od35tTloyTkO15bz5t8bP89CrV7/bsTvg+B+2yOoWUjJq36pvomms/4aStugxTne6A4td/RfU+4ijHxbZVnc8l3SwbGP0ng0gIN6TDgXhv896Wjbli+uTT0xpZj7ZihR0gmJwPoocmH/E33GQv+sLHpfBvP18+eOBFS3sAYplWOnHTst1GGbyvPs5/5oqvjOGphZmBP3X1sv+MLAuOsCVM4w2sVIyfd9m2V1c93/D+XHQWBS7Kl8e8/cGhPsob/z3+2WGCsnz3hcEg8X7QHpUwxxi6uHDXpzi2tl2tG7z4ky8UcAHG/7BJ4vueM+d/fEupSN2viSwzyIAbMqxw1qSBj2hLqsallPGPqshYGlDCGP959TP9fR9ORn1yUaKy1llQ4bCf2LYnQm1q3/5X3tlhgbPrg4h6ilR0NoBJgO0vIsQB2zBuEUl5WvedN121JHbruoKHXCSlNZ986Bjat+4wPztgS6tEwa8JqSUyXyb9VjbzpvC2hzF9lGcdPXbYSQG8p+ZH3HNf32WjaTbMvPsQFP7xq5I2XfJX5bkvrq2uBLRYYC4on7168JxPsCgkcGdxnEFzKMRWjbnrtq2u2rzeltWOHPCKBU1QuDNNjrOXkzi99Wv/15vrVpV4/awL539mc48qKEZOu/upS3jJSGj91+ceA3D4Vk90f/sGA2mip62dPuF5IPNBp1KT/bhk1+t8r5VYFjH73Ncye8CspEbBECTxVPWpSQV3P5tjla8cOeVMCezNgJUtnd+v2xkeNm2M5i5WpbtaEJgaUMc4urxxx45+2pLJ/FWU9Y+qyxUz5MPY7uFB6DbMn/LNy5CSSdrZ9NtMW2CqBUT52otWwXZ80AMtr9wVVoyZpd4TN/LNu/916iZhFRiMLjP22x8sf/H4zL3Je8RpmT3xfSjlUQl5fPeqmX2xp5f+y5R0/bdkqJnDF3cf1J+NZ6FP3/mWdrHT69xUjb7zoy+az7f2vrwW2SmCsfeOCATxmf0ZOWV7TPV01avNfoSXA144d8iSAY6jcUoq9er6y0Hf9+PpGwVeccv27E2+DkOcD7M2qUTfSlrf/mc/oV6S9Q92KVY1Z9H/8pH55vom170w8llbryj1vJN/BbZ/NtAW2SmBsmD3xH1LKM/02t5j8XvnIm/69mfaBKtYXhwwZYbns94A83Ctn4/L6RJcRc+Zscftl62dPHAUp/8gku/1/DQDGP7XiO5KJI+85tn9B16r6WRNulen0b6r3vyNP97g5j89vs2xrxgw5jjGc0W3G/KMYIL+Jsmx1wNjwzoS9JZNvBGyR4f6qkZNO+yYa88vksWbskPcBDDXSeKrHjPlbjF70y9R9a3p3/NSlxyezpdNvP6l7U6F61c+e+EjVyBvHbWqdT3/mi10t1zlTSowF5E4ASwJYx4A5kvEn7L59HrlzBNviFtNi7bF27ODnJZhPFu5Yt1pMGLJw4dcevHfrA8bZE5+QUvqAslzEsHun706q29SB+E29t3bMkMslwzWUH62KEjisx4z5L37d+cvHYKEbZYlyoMJuqXFjpby8NCvczjEeY04qYYML2+ash+uyOMAtBlYGLsshEQNYDC6LcUtWA7Ic4EwIxjizOJjkAsxidJGJCsncwVLCBhhnknFIFWiBQzAOFuiDAbrHyKddswPJpNADlUkwSbsyBJikLWt0X0gmXMaRhbBWMmmtEKBnJHkjuABzIaUEE6SpqBdSNoOLLIfMgCHrZuM1YI4DLh3Eso4U1hqb7nGRzXJHCJltTJSiEYl0Fk5jFp+iBWdDMIaCW+bOfnpl/zuP6rOsUL81vTtxqCvkiVWjJl25Kf3q7cMm9yde7H0GLHGZnHjvMQOe2ZQ8Nrd31o4dulJC9vbLxYAVYHig+8vz/+/rLOtWBYzyldOTDWXVtBE/Ro3GGT+hYuQNpLPb7D9LDt6hqlyUUrTmnTjDn7q9PP/6YoWWr8BGBVhtLUqTtSXlJYmycgi7Ck4sASa7u+lYGWDFmO30hcNLYKE7wBOMsTgYejLJ4hDclpIiRYsqSG4ziVJIZlFUGElgxRnBkCLeGp0UYOuP1MidGzxaujGvqVdzjxf5bqCftyKY+UTTMB7JS89/1pezKO/Q+8wvT2TI0yoU3DMKHVSU6iUlY3AkAS1nrWDCYWA1krEWMAWiDgTWSMgUlzIlpFwvuJuyZXwFIFKIpzOOK1en+x1xmpVe+4ps/M+MkuSGJnRCC4YXB9lo/585bfmVUsqrAKxnDA8I4AMmmC0hhzOGEwB00esH9Zz8e1m834RbjmBkhNxiP6vHDrmCAaZaYi1n1v7dXp738ddZqa0KGGvfmrAdt/CZbjBWXzlyRRfGHt88N8MT9wFY7Us7VKRSg7O9GlsqYGdLIXgP1121I+OpXnDRHdyuZpbsxJjVSQpWCclKmJQ9pFBglpRSJomAqWmv0MDXwtDcMJAp+BGFq2KQYsJQ9Huh3/41Dzl1HxSARq93FHCZMFbovWLXjCnhI6AHZBpqc5/QbR/sdENFytce7Ppp5upEeekSRurhP+Lb/ug3Y2jpNxKly94hMktAm5IMKTCWAU9+zJCth4y3CCHXcJlOwyIWm21yXb4STDaCZ1rSPLH2Bvu2C/YQ//7znuL6Fd0WoIVdpTKXJz42P15hV10Mhis1c1f1md0Fy8b9fPG+q+OVxNSBRhc8ZsHiApylwUorIRprIMuTiv8z4cKVaV0hYUGIVkiXQ4hmSLcesu/2EIsBpDdApnpDDv8CEoMhscBodl0mfwR8KZ0gzZF1Ywf/SoKRzSDOwY/rNuP9uUYXfy1ftypglO9eWtUgUrXekrmyetSkvl9FqylxE4ivWwfLcsFdC6LbWjUog832xOLqllaXV9t2SUZaXTi3ezAZJ5GzJ3N5FzDeFRI9mc07A6ySwA2CE0urUF5FUiQhpS0J49RQ9yjYV1GB/4U08hFws6p1troPRLIcidUfdbxcHqAGOA6pYqZIiQyYbAVjDYDbCMbXCVc0AW7dYj4ocV/ZFUeu4X1I90gagvoRLf+87uQNl7/tSrdFZLJpIeBK+geImJWQkkHINIRwmCsAkYgxtyVLugomShgTMt0kZQLSlRAiDVkhITYkId1WyGoBIco1aKYciIGdIeesgmzsBbluIeSJj+s58k0ZTTreuG0/uVUBI1W1ftYE2mM8jCRAy2Kjyobd+O6mNNZvfwv+i8HlXbK1sifSvNrm8c7cinWyLd6VMbu7xa1qzqxO4LyLBOvCGKohUQnBysBo7Y0OB4PB+ZjnPRPmOLq0Siw1eifKrfw6mbxHsxdTxM3VPPe+yZY01zF5nS61foamIf2NDpIoI/OoapBZsbL65TPYROid/HLk6rOxvDZXyxxiFqqr10u6zY26FypYobbVdfV5ajgvP21SmTbvtD9Klr0HKxUOuZjPbr20aLiwMP+lnggUr6Fcw6QszUtxZ8mlmBffW1eDMTky/Urr8al76rq4XzRKiRop3TrhoEYKd42Q7jrhOGuyWacWqUxNS1OmkWWd1kw6kxbSW/yTQCKblK02kwkJ0ZxlMiGYcAUTMgaZtJtcR0JUuhCuC+E4EM0JuCs6w1UAOQgSV+XkmU2Zk9/kO1sdMDbOnnCClOwByeRKKXF39ahJ10YbVOno0n0rG+viXUsEujPBezLGegsXfTh4HyZZDylkD0antUlUMrBySXrLnOwUiKlqSHrj0pdkc0o5z4ziI1wIMQpN9RBihpV6vknGm4hRNAugTOkE1axStooc8nldHczuQmKsLm8Ah+qL94JWOOZLoAaaUTVDeftlNhE+QCC/jB6squS9awFa5Z4JkMtEMm8FYVRnszlVmbz6UTtoSVbZYAKVQyQ7PwFdB7NP9QoVXAuht7d6+Te9l0nFp1rRu57pviPc8i4o+Wx2MBT9quaqXAB28/oqVy4Fxt7w0gpg0gl7+aqsGZ4qGY9/lVDsWV1osi/tkX0Luzrz0N39Akm0YKCz0APPQEpxwVhKSlnPGKsTUtRIR9RIIdesRo+113e6uef2rR988qMVv56damiuyWRaW9GUTrkMrisgkjakEGUiVmFlU2sbnLIyOCGAfBxkSAsj+TeJeB3Ma6sDxkL1llMGHipS1rGMyb6Q6A3BukOgE5R+jmkLnz+PNvsuM2tYiMN0sOc3y8c2k/q0KZZvXBndss5o3XEUkkvnwG74OsKEtl2e9+L74v7yCWji1Xk9/oOWB3F0y30dGgkEwv8uOQ5TSnVMkCGZ2eLCxiszNnMaIOUGIeU615Fr4IgFaz9fMzXT4NZx28rYaSuTSDRkurXAmROHO5w051sAc9zqgdF9aKffs1b+a9J3RyHFJx8B2QgTigAvFVkymEqUaxVK1385yLRAS0eIhrYCe/YTM02TpAQkMELeTHDPk30NohGQqUh5FJnymZXHMXxx3rc2q+YxlvsgiUi5i+UR1ClCBAtaS6IEt+CKF1ZehfI18CJEJs2yRtQVfhbm2hgdNAER9wh5MfsSpSHjpWjdaS+wdAtKF7+dI+9RYlxkrQus/GZbRHDQJ9rm+Izaghp4Nf5ZejreSB4GlykbjPpcWvcz7JhZGGh9cgO+sE7mxqrrsDA+PHj/qOZ7cWTLg6GeUTRD4LP1S9b9JF3XsiZt8VSpY7c2JxozdiMyS5fCGT0T7ubOGrdqYEw/OmC3WGNinnClct+Jgk1uAhSnCG2Sh0KT9Ute+6bza7e4aoR4ui0PGUMLRQhoDEjx5LyNrU8gxptIv7GJtFsp/4G2EjbvheRn7+VcSc2F0v8uyqqR2mE4eUKh5KM3wFPk7/31VCSaarFcNvAemJM8EKutvqiUdTiq6T7wwu6YRVtwXmJv3F15OVK8DF3dL3DN+h/n1Yu63kk7Tyx/f8WfrCRrjgurWTK7pU42prEOmcGD4JiGyw531zf44FYNjM7kHU9mGf6oJN9eY7T4SuygnX32Za7GhUZ7VEHvqxA9lhcARjsd6LOOfKJg6AWV+42hIywg4gfF7cDMIEW+0h+a7eB9z12LgEGR0RFisKbay9N1hfSSAV0LJ+abdvKXq+KNp97xgDpfS9WeiBvpUJ/+muYnkxrr9SCY9CH2JrUeN795cu3XOmh/iJIKJJbMhVW3us1nzaIEY2MTMFTXMLy05I+x3JXAf9Nf3DyJQOmnTcU5vWKMv5fLjsOUygsRlyncsvqIXN2M14SUi5fPXXluvJQ1Omm3IcOtxngy0WyvrEv3BTLYzHWNWzUwtt65ww/jLn9QEDCaKBiwEV1909Jn8KO8GRoeqznbrX6wLXTK3StkVzRFvVw6+fBTeK5EmYtZp0JMJ1zW8DQKrwy5t3NukhD+hhPaz+IHL9ItEF1L/PIWneO0QYU2uXhGg8A6X2BUBj0YEn/1GxE4D4msyhwkhVYle3qA0Dv+4qDsTLRhxtXpcRI5zYKYsGMODbNvc22Q7bUzrOZa8Ib1hlwabqFC7VK4x8Iek+EeD/VSpA/yx3d0/CkzDQG9t6rnl8m7YtiZaqweuLf6Uvyg8T7skpkXeC+YI4tJ+fnn81b83OWsgUlrQ0yI2qxrN6WbmlpTnZAefifoCJICy/03SAvbyGqrBUbyPUxt6D8+LmJ3amAsNk2LgYffatH32gLAQgAZGi5eosWms5mnDzXR8hXLn7zSPF922sCilD2FaG9RGMkfJpX9wfrtDayaC1m3RN23xlwDlHSFXP8R5Nt/Arjt7XjRrDywDkdTi2KMlQAffhHQZWeIF84DpAO+ywmQiQrPckxT2N/5VoCf1X8KufQlr55ha63GM822Wbch4PtcCvHGNZDrFxVHcMq1/wHgIy4E3CzEa78Daj/xDMvR/or2abElAUBJN10WNw1k/LCaxSCxEE60u7y0IaIXXZK83il2v1Ce7aUV6XAhVi6dv/pKxniNbcu1krs16Ra7wSpraUqvRurxx+FcRdrIzfSzVQLjF8/0LpULM/0qZfx7JeXJmzVe+G4o+X57bfdNeJDkGsznN20xCZ+NRlmFv6eOtgSHffWizLNt2DbSregH65C/ALESiDf/AvH5zHzGyyy1DdkHTJNr5IRDT0Sk3W+H3Qq+y5GQzevh3rs/2K7HwDpIez+JFy6E/PRfHt8mNkZfuQJKxcyyzWFcDpVGgg0aB2vMH3VaC5+EePkXsE57A6wy2BbbZreIT56DeOF8nZ/6FBjK8QpYp/8HLF6uvI3dx44BBM1F3WdR4ZvtdgKsg3V8Y+fRo4F1tJ2DGJX/fI6r+e/7eftSR2jZES6scc+BdR8M8fnrcKf9UJW3raU1l4MpqvsuWDSQuUd8zZEYxnuz4Uy5xmSLhcZVWxDsv5v/np9DWPKSQqxa/uHqaxnnG6SUqzmz1ieYqM3EE42OW9f64C3IbgPGb3BV+OLvKE0vLqt0m53ybj26HF7WKXGzIB//Dn/aY4TRhIo8b8UB2rJMcQzShlNvshP40B+CJavgzv0H0LwmkmAhRuc9YieA8t5qosMmj9sqsEQ5ECsFq9oOfMRZGmhWzgGaVwP0fKwcLFain7dLIT5+FuKNP3lMqwAL8EY+6z4U9slTlbjs/udPkB9OhfWj6WAl2u1DNq7SaRA75RYYidWKqVqQGz6B+9gP9G+FWTofk1cRteSH3gq+sz7fy33tj5CpGlU3PvgUINkJ4oOHgHSt1o1W7wA2+ESwRKVidO67t0O8c6PO23TXNFtTuOD7/Rp8+E91Hm/8GfLd2zSr9T4KchTZlWC7nwbrIL0t17n/IMiaxV7ZuUeFiwwiagdKhPpaJe5lIBzYp78K1nVniMX/gvvPM2kLe2EQz0s60jcl3WDtcwmQqoNMNwKpWv03XQ+01kDWL1eLInNaIZ1WQDiA6xi6QlKH5FQfG8n/iigsik0qBibE6s8/WnujZfO1rovVUsq1Nhc1djbe4LgNLdsNQGZzNsBsVYyRxOc1s5Bsaiov4yzbqUvP6sPKqkomuT4wBh6x5rocFbLDQyb8pM8Pciu0b7jweaOaaDQhTnocvO9IiA+fhvPCxZ4uDUD1AMTO1MfPZB86CnLVewGoqGAwBZTnvkKe9d0H9okPKZFZkmjmZIBsi/7nZsG676Ymslj9AeTaBWBOC2SmFcg0AdlGyEwKsuYTyDV01Ehupc/l6Rl8mAV73D/BegyBbK2Dc/d+sI67D7z3cD3xnbQCAaqnEt/pn3TAynuoeso18+E8eoTB5nLtFtL22iWwTnkesnk1xMuXQ9Z+ohYT6+C/gg08FHBaIeY/Cla9Hfh2YyEzjRCLnoCYdw/QsAygxUehdAH6511jJZ1hETjFyyBXzIb4/FXwXY/yyu2V381CiixYWXewLgP14vLpTA0+6z+EePcOSGJqGuVDIE8AZB9xK1i/vVR5Vds4aUgnpVgzXWexUsjapZBLXoTMpnR/ZBohs9Q3zQqAZZ23xT+AzVw+Kt8uuyB22nRISnvtIr0gJjuBlXWB3LAEYtFUWPv+XAGiyjvTAmQaIFMaRClPd/Ydqj455pj/zWSNftNG4c+fEwFLVg72YclJCrl2xeK1t0DytczCSjCsdaS7oYzH62W8saXvjUizbaJ0sZXlq70uT4S1ZgCSLXVl5Yg51V26Vx9eVpW8MQDG3Lje9IwLEUR/BBFK0mTlcdhH3wk+YB/F3sS7d4OVdVK6OVT0gjX0FK2PW/8J7ZEGEhUaTKaekQcmoYLacbBEJ0iaWG5Ki4WK7nCgtDPi57wDWDbcWXdCLHgCiJcCsSRYvBIgYGhaBbn8zQLOf0YuUsA64ApYo87VmNO4GuK/98PaXx9a6L76B4gPHlQTk0RPWAnIT54D67ITrCNuV6DhPD0ekkT56I6fvJkmgdJuQOt6NaH5/leC9dhdM8QuO4OVds4VjAw0NZ9Ctm7Q4LvybYi3/wzJSDTNbW1U4rHPIGlFIda472UqTfHW9bAO+A34sNM73P/is9fgPDEOMPz/Qi+rRXAK+Hb7dTjN6IPurL/BfY0izhmBQCJmJdZ7BGKnPglZsxTZe8eqvuc7HAL7uLvUGHMeP1UvTKQ+GHsVeN8Reux9+gpYCY29LhAeMLZb0I2nk3lJMinWLl+y/jYKSk9nF4HJNSIrakqteJ1b1tjctxLp/1nGKB8bPBCuHAQpi8aPa7eTog/45jO1rBuj1XVBLlmZjGOJtBt3Um4ZHGdEMmH9lHbG+5+8Po9cMBlgVKj10yjozWAnED/jZQVQSnSNWGwL1pNAzVvh5cq5cB4bFwBjSOw0zSjVA2Af9hc1AVi8RInRsElUToDFEjnQI0bnZgE3o1lMthViyb/hvnylLpsPHqbMQNvKuuyK2OkvBEYN2VqD7B3DwYefDZaogniboqE5YBX9YJ/5uqqW89y5kKvngX/nNCXquXNuU2JbSBzxK+Qp9iSBunpAX6DwhtYxD4JvN0axaLF0plI38O+OV/VQrE1kYe14OFj3QSAdo/PcOQCPhZSFwRY7SlYIFYZRZa1CM3LwwaeCb7e/Bm0Sa0lHyWkxs8Gq+oFV9dELQs2nqlxixbtwFePXuswQ41UXBPiw8WBdd1GirFJfWDEwuwSs1x5gSTIm6Y9ib9TGavGkfPW0cF67HuLtSYEDkKnH87+zHQ5C7IR7FMATawSxQiphSTXEp6/CeeInavFDNoXY+JfAuuwAZ/rlcOdOzhmolH7T15WEtQPqqsf88vWI+Xp5s28LmhKlrFu3vOH5eNKqY3G7JlZi11rxWGOs1G7hiVjGSjBhKck+7Nmw0XgQfYGpEBkL2GkffqmwZF+LKK222z465M9w5cVqj7HpEqbcIjyBxHfV8xCo0IAwLZ0+EwjSMxuFGBhZn10JmRWQGQGRykJkSM/yDXy4hfhPZ6pJIVtrwUq7gFX2gkw1wJ17H9Bap9lOayPsH9wAVlIF57Ub4M6ZrEUwEktVDNZ2PiVdYA0frydGlpgjibQEABQrinR8HmWykmBq4nMNnrEyuO/cCqSKn8Kq2p/biJ3zpmKxxApJj5W9bQ8l9lm7/wjW3hfCfeV3kGs/QOzsWWoyOdN/AT5gP7AdD4Xzr4shl7wQ7LQMgYmBKvaJT4GVddWTlvJ4+FDYR98Lvv1BEIunQ3zwAFDWA/b3rldA4D5/gWLJfNg54AP2V7pS59lzizNs4cA66DrwPqNUu0rhQrxzG8RHTytWb+09AeKDRz0Rlqk2tPf7Jaz9LlEDNHPLd4GWdZ6xyke2In2j+s3XK2rDGuszArEfPQEWU0Fu1Mf98F9wpp2r+4PAkwA5VqbGi0xt0NHjinz4bkcjdvStECvmwvn3FWCl3cAHHwtryLFwFz4N8eGziB11qxKjlZhN8X/XLAQavoBM1UEseRli0TPhyCTtjbUvcV86AulaB3aJDavMhl1qgyUssBhX/2B5BjvfDchD17Z8gUO+JV5TBTu2qAdyOEKBh++AvXBi3e17VGRY9iIwdgwDSE9Cr3wEiSeYFHd0n7mwYKT1rwcYH9h1nJT8YSMoV0GfsHC7FytKIe4U2UDviSAaGAVEVkJkXIi0A2Q1MJq6k0JOLB0dA4XSCd4lJiZcMDcDa9+JsMdeDtm4Bumbh+UsiVIgfv5b4J0GwPnPJDiveae8+vvvPKZVzFxEYiMxFPvAn2uWSOxDKdU99kkskUDTyWgdFgR4lx1VEdN3HQK5blFBCddnDFR+a+S5kM3rEDvmFpVG5ubdwfvvA/u4fyiwdT98Fu7L/4f4+f9VE9B58TLw7Q4E3/lwBfDOi5dCLHzUK1euxXILn0Rs/Fs5dtZSg+zfvwP76HvAdzhYMyLSmxK7SlJgcAoBS0HYaZktA7MTEB8RMBJjzG1xC/WrcBA75gHwHccG3ZN94VeQn0xH7IdTFaMia7vzxGkQa96nOOCwD7wc1t4XqD5M37wH0Oody+I78kf87fP0cb5es6IX4uOfA6vonjesss9eCnfu/XpBUM+TTloTJ27nC1YaDHSfxw67GrJuBdyPXlDMnPUdAWvHMXDnPgCxej5iR1wHsfQNuHMfBMq6qrbjuxwG3nMwnNdvgfPqtR4wdnzaB0+amxk6YIqRjkRrTVYBokX/SmzwhAUe46qeKq57QF4L2vQjiuNCMyJsc881NgVrZ2hdgL83zWbHA6xroflNIr4Q7gk9Zy56O3pfFW3D2xdV2sK2K/e+obbhrUs6WXGMEILIOErHAAAgAElEQVQNqBx1w10dBQzzOfnQoGkyI8Pn5vpwvykJtvdOIJ5JFTSOVisFjKkcMLaXxJe/T8Cko+4TxtnDfozYkddDppuRuW0fSIv0g+VAohLxo28G6zwAYvm7EJ+/qXVp8XKIms/hzrymbT0j8cLv/hix718H6WaQuedoyJYNSomvxGYCRkFHfngiavchSJw9XQPj5CMhV7Ud41NLt5rxxM94GtLJIPvYaYidcDdYvBRi1ftwnrkQrKInYqdM8RjjZRDzH4F99GTwgQcpcMw8cITyGwxEt0gDWwf+BqzrrkqsJQNP5o6hiNH7Ox4Cd+49cF75NVjlAMTPelOD8x17KAOCfdhNsIacAPHhM8g+d64WcYM5Y0weSQB/IVjvYbB2OlTlnn1mAsSCJ2GNOg/2mMu16JhqQPaJ8RCfv4HYIX+ANepM1YbpG4dqXa5qD49ntDVIfANQsjPi46eBd90RYsV/wXsP1Zb9T9+AtcO+yviSuf8UiOUUsFYdzKD/UsT0eDGNk1SMnA8+RvUBklVg8QogSeqUcjjvPUxCP+wxl8KZfQ/ceY9p4F/2NuzRl8P6zgnITr8S7ux/dNAi/uVng3AkUrUOrFILdmkMPGnBImCMW+A2qRMIGDsC0JsOHHXTObKk4Sz+yYCxST1e/uDSgsDYOHviLULKC82bDJhROWrSQZvSRPKBXQ6Dw6YJgUTeqlogQf+ZYnmZ99v8TqsvRdPMEjBqUZoYY6H0o8wv90yuI/LZYW4zYTRNThNw2KlK56P+VfcHq+6riTuJyaQLa2cciGWzkL77CCXqFdt0Rm1kDToa8RPuUCKi+8E0rTMk0VfpHMuV0UWJcMpFpwQsUaqB8f4TFBDnPiHhRF32daykx0uc85LKI33zSFijLwPvNRSZR05F4uyZYCWVQTKZB4+F/GK2Knfs2Mlw339YibrayTxaaa0/IVUQ2+4AxE56BLK1HpnbCRj/AT7we5Ak7jev1+JmdX8tCtct021JTChRAZes/c94wFhk4JCVn5X2QuICHZIzO+0CBagkVtt7XajAUTZ+gezTF0N89h/YR/wF9vAfK/AiYITTkktZScse8EaiuvnAycp7In7a4+DdBkLWLkfm4TOQuOAllUbmiYtgDT0G1i4HQbbUIn3PCZBfzM9593AGnsgBY0hOKusK3mUn5c4k0y1K9UBSAS2MSncqXMQOvRr23ucg+8pfwUo7wd7zTGSmTYC16+Gwdj0Umacugjv/iSKRIwsqsUKt2pakVGh+CUcgVedqxkjidIkHjDELzGOMxXCxmERXDEuimKAKzlm2cRZ/MvURO8WrCHVmA4USlJAlYJjEXPmX7jMXri40fJhii9xaAYo9aH6krK18vroru+qqDii+8pN279v1IubImzuiNivo8UpJRtlzm3KsjreXY4wColUDY9SFOn+y5gNEGDz8X4WQTReS7/p9JE65O3iNDAbMd3amePHL5yg9I4m/1sAD1XNi+Xtw3rxNsUrli9ZSqwHAlF9yKQbfeL+9YB90GcgVhXXdAcyy4Mx9HLJ+mU4r06z0m7HRExUIuO89BueNWyDrV+jJrvwNCwCW0Y0K3PuM0MYh8pGzbCXeypoliP/4SfBee0B89qpya3HnP6aNEF0GQjathnSaQ04nofbWMrtus377IDZuigLCzK0EjHeB73QoxLK34C6aBlbSBfYBv1LGF2fG75Uu1tr9VPA+w+Au+iecZ84L+eapRI3thWoZq+yLxLlvaWB86ly4BNhUAgLmIScp0VoxbikQG/corJ0OVm2Yvml3lZ+pw1KqIaVCNJmpNsCwXsOQOPUesMqeCujTdx2tdrskJ+q8Mw+fBffzt5G8aAZYeTcNjg+cAbGEDFgcFLmdE40INq7nwIrv9n3Ej7lZq06U6oDGOY1t7RLkLn9P6Y7t4eOQefYyWP33hLX7sUg/MA72AZfAGjASaWKp5IIUDK6oySTXL21PPH+QROdMGM6IC6TqXc0YCRiTNniSxGjNGEFHqpljMIquHWZD5qDV/aPdStkvNzwcmwUmf+JKcWfPLgvnsMfhytGj7XprQ//qlz8g61rRD2ucM+E44eIeOgNcG6XYUgb5Ghjuqhw56Y22Xm7vnnvPznfCwVlqS6y5KBWw7oUw0A/p5CtUI3UPdY25eitgJJc6ATframDMeCdJRhi5and1zQSIIp0dvBs5vCkoF9Mg1XMI0LIesrUB9l5nIbbv2Sr97L9+j+ysycp1Bs0bEDvkN4gdcJG65372JpxX/gJ36dtaFCbLYRBsthDhot0lxD457GE/RPwHeveI8/5UOHMeUVZQsorb+5yjxTgp4cx/VgMiufvEyuG88w+4S8idxq+AHz3Hm5jCQfz4v4F16g/33fthj/kleOf+yL78JwUa8cOv0oD79l1w/vNnZfW2Rp4Fe8xlkKveR2bKOL0FzmyfCA4r6bHfnoj/8CllrU3fMhixo++EtfNhcN+7D9kXL1dW4sS570BmWpB9bgJYshL23heDVfeDu3Aask+fF1Y7KCdrhY66X0lHWdEfifP0MM48+VOIj2m3Dj3iwP7BLeB9hmuDFG1R7KH9QGXTeqRu2UNbtf0Atyq8qpd+kI/eTxXb+1y9UMUSui73joNY+jZ47+8g+bOXVXbpyePgfvIy+Pb7ITH+UTA7rnSp2eeuRvY/f8uJ0iRSGztz/Ca0Bh4CRscjrPwv4if/A7xzP2Rn3gixar7yOLCGjYM95Eikp5yL2P4XgvcegtTNByB+8p3gPXZF6u+HQ6x8L5h50V0weSzNuJD/rIdaoWgo+pruZgaXGGODgE1MUTFGW4vSpGMkw4vaiu4fuFbA2u/TGdN7wpzDxrz3iZUqji7A/fysj0//Mnuxg+Eq5/2iDNmGDBtx51d2Jq2krXlryl8RjhyV7+cQgVUTGf1o0d4Yz9vLHwHZoGECxkjiNAGjA6QzoUVSRxQxNMn6FI0gzmA09mJQypBsEyGhweomgNIuiB/1V9hDj1RMIjP9j0qsip94q9qJ0HrtborRWbsdgfhRfwKr0lvgRN0KiKWzkH3tZsg1C4MA3N44038qeiNJohkBrEWGFy/Qge+a47nlKCfibAoyTY7dzcqxWzuC0/e00kHRJCkgSOvqxkpQ8qt5ynKenf5HWMNOVuIhiWlUvviJf4M96Ailn8s89CPIbDOs7fZD7NCrVFu7i19B5vGf0GF6hm+e15IGQPIdRiN+ysMK+NI3D0HsyNtg7XI43PfuR/ZflyoxOnHeO5DZFoiPXoQ15JigO5y5DyA7/Vdg3m4OXRfj+AhvceGdBiJxzqsaGJ8gYHzeD+etfDVjB+efZOrMfRDZ5y4J3Jo0kCr1sbJeB2OZRNjD/ojYfufoR9JNECs+gFyzCJJYe2ln2KN+qO5lX/orBInOrQ2wdjsUsf1+Grh0Zd9+COkpF4KXeuqWaLxK10H8Rw/CHnwEUveeivhxN4BX9oQz7ymIlfPgLnoB9sjTwAeMgjN3CuJHXwekm9B67RAkfz4LvKoXWm/YE3LDZ4EVMjqcQ9ZJv74eMQlNR/90yGKRpbz+VTpGAkYlSlvgSQMYycikHCh8v82INUcNdgMFQ9gQsckYZaWvnOM95tQdwC5YV9DaHEGdoj/b0Xp1NJniz7XevdMOiayc5Qp0UZn5QTr9KClm/UNHcuYmUl5gAq+hAv9h3/1HWfgIFCPAqBo6V8agHP71cFSynAnbfC8qeUSov5oEe56O2H7nKh0PsYv0Uz+H885kWLsdhuQZjypdUMs1g8G67QS56gOgvCeSP31KDVy1Y6XuC7TesJdiACFA9McCsZqBo/VuidYGSNoO5oGe2u2gdqF4/oEkT5COjqzWtnYLYdKBILHY1/3lKYf0BXvoMUiMu0ul1fLXkUj+5EHwnrsh+/odyDz3f0p8jR9yBZz50xTzSZz9HJzXb1NuKLF9ztELwtQL4c5/MvChCw00+pGoQOLM6WCdt1dVFcvegVizSIE3+Q6SzyUZqqzvjPO2txEI/UHrGxtWI/3YjyHXfeT5J1KCBYYyjyFxyiPg2+mzT2T9SmSe/xXkZ68q/RwZf2KjL/UAima6C3fFbLiz71QGGO1W5qVN45ZEaXKKpbHgT9ZkJ5T87FWgtBqp+36ExFHXgnffqc2J4342G86cx5E4/jrd55O+pxzplfHFrIb/3XGUCG71+y7SUy5A/Khr1KJFxh3JY8i+eA3cRc+p7ZKJs/6pnpOuA+fNu5B98x+KyZJhT0kk/sfre/UnSjSKld58zhw7/nej7ASM6UapdYtKlPZ1jCROkyit9alF9YzGfAt8iw0cDaauAZqWjVomxZ7s3E8/+bLI9bUDIxXQuX1H8iF6gjxBQt64QekLLQkGapkoEXonPLOVhEMOvWR8oX8kSqfDBDgiUbfbfnkrqxeJL9pwNMFLLvgXWFlnOB88B9Z1R/BOfZCZfg3E8jkouejfevfFuiXg3QciM/MWiDUfIXnyrQqAMtP/BPez1yE+fyeY5OGy5n5R2rH9zgNL0j5pMq5UALQThYwvcdobnQTI2Vs5EpO/nPZvdBZNR2rySdq/0fuE6kcjULhInvcvWNuNgvv5u2i9ZYya+Fb/YZBNG+DMI7CzdNrxUmVp5VU9VWqpxy6E1W+4EtPJpUc7ufvCldHUUiDxw4dg7UqGlkY1YWlrmwIv2srmLwwBpyWLU1w7S7uO3iMsXDhv3AbnndsVTciBmEpF/Zc49m8hlhnUuXGNcnshVqe2zSlLvrc9UKE0bRZIAyIDd8V7cOdP1fVQHg++OJ1rQWvH0aqdnQ+no+SC6eCd+mtH73gy5Mfov+F+9Bpabz0C9t5nQCz7L8SqBVpCiOsAEXkfK4bSKxaq3VNKd632p3O0/HkkxLpPtIph6NGIfe9y8OreSsep+j1RCrFyPlIPnQGxfknIt7TYwO/I/MifEzo18zrFJ0g1SdjEFAkck1bIXYcCJwWxNc2zfkIFi+KCeTN8jzZDAfKH9gWfPtLupO7AA98IMFI5sjdvfxOAnwUBPyMNaVazrXLnkZxIWymrNLnrBMBIq+TXUc3IEKKgCANGqd7m1X2R/NFdSg/XesuhyrhQdqk+CCnz4l8R/94vlOWz5c97IXHsn2EP+h5Ewxq0Xr+vUsq397H6D0fJRS+qx8joQqxDMUjSlZHxJdUImW5Q+6RlayMSx/wR9q4Hwf3kdbT+jazeOd+/PIpCi/n2+8EefjLcj2fCeW8KEifehtieWiQs9hH1q9Dy51F6H7Cn38ub5T4zJ3eFk25HbOQpSE25UDGf5Kn/AO+1a3tVz92ntr1xL22sCoy5xuiQLuLH/x32d46HWL1IuUbZI37UQReRXDbpx86ES47RKlQj7RPXfoehcajiOHr0R9FK2tViwR52EpKn3KwSa73xEIiWWu1mk01BrP7QA3CPkZKlPmYwX1+soeBrvQajdOJrehFReuKEyq/56sGKxpZe8h+wCu2qR+MoNXmcWoSTZzzkAWUD0lMugrPgaWXo+SY+tLakm0SOLXqMkZy7lbuOdxQ6laXQnI6SU7/MhXBCJcXY3dZFn+poIV/B5+tAjILFkn/vXSpSiXdcIYeoBwosTb6Pc4frFVm61Pj0GCMpf2UrsQsyAhRgLcbxoL7A5OupcirksPycC1yWn6L/LlmDS3/xhlrds7MeRfqRs1UorbLfLVKTsvX2YxA/+mpYfYYi+940pKddirLLZumdMPNfQCsNau98rvyjMnWFrZ6DUfpLvR0v9fBFELWfKdZAaShXHfJzI3ZF3xNlsHY6UCnr3c/nomXSgYox6pS0+5H5Ca4Qg1LRc7jaoZI4+Vbw/t/V7h4UtcXbbkgiqVy3BOl/XQuxZkFuEVLJ5tLWUWw8h1zyv+09FPEDL0DqYTJQ0WTlsLbfG9aAEWDlxB7bXAIhm2uQfeV6r4za4T8YV1638e33QfywK5C69xQV4Yj3GwVr6NHgXQbobZvEeok9q10oxIJt75/e1kdMtvX2AzWLVZsHSJQ29ZjeOPaNMV4ZVPbky7rXaUiedKOSCJqu3A2yaa0qIvO2uAftTu+ppjbkW6/tyOUoccx1iB9wLrJznoCz6EUkx92m+pDGS/aNu8F33A/x0efDefdxpJ/9DWQTHbolQe5DJec8Cd5zF6QeOAvu/GfUTp5ceF9/IvpNZ/aXP0V1LMyctGzuS89d1d9yM4SMoHSagzK+EFv0RWmbaUd2ZZXOjbzo3PfVZ8EjxlyPQofF2GKeYiPYZZ8W39bVYVDRD35jwEiZNV/Xb0Qixl93BWhTbwc/hci9iYi5+8qNQjFGjzUq44tpHY1mGV2XzJN7zYlpPtdGsel8j/OegT1wb8imGqQeOh9IlMDabk/ER+ugDK33nq4mSsn4+zWjvPFg8H7fRfKkG9Qq33Lb0RBLXvPdsyP2SQ/gO/VH+ZXzNA44eqeLzFIg1FbtlEx/lb9bg2KmVp/dwXsMhLtqEVr+NDLHGINN3/4uhNxADwtGXhBcK+HhlTezVVQdan9COo+FFhxR5gzwtoTSrKB3yBldJeHFqNT+MLl9owHAhhcpVRAF3JH+MIcGgR3lYerWaPX0YzIqZmvMArKSKpDSoio5XetAHb7xxRCjA5OngYYhC6NE/IDzkTj2GrWQNF0xEGjx521kTBOKBm46EcUbAeOJNyO+7+lovf+ncOY8BmvnMUiefBN41+08RKMtjwJoqVPO8MQslThN/ygqUHUvZP59PZx5Uw3G3PbCk4OHqDhb7Hd4LhG7TjVD6xb9fwmufBjVzhfl4to+/OgnpDpjO899jzY7WDybzboHlfxq+X86CCgdeqz9knUomY4/lP1Lvz9IsCuUz6H3WiHY8Z0WfEujryA2VxDTwqwajtgiGV8IGGm/NDl4k1U6cCQwGVKYlIcPlw+vf9EhlA8furS83zCUnj8VrLQarfefDWunAxDf+0ehxmm5/Vg4H81E2S9ehfvpW0i/+Fe1wpeMuw2Ztx+A++mb2o3BeMuEBHWnpBolZz4MpBqQnnEzxOfvqhBgjMKRKUtw7qPmfef+yulcttRBNHwRWODNsz18C6F5Ho5ieKZ1sJBjqcGW8vqz4Nwzw3x7NTPdYPIKX0TU8t1ofC8DD1uD1T6MxSrVQrAfPO9bYNUFj1P5MX2D8kWsqH5Zi4E3xckkR3irBLL2cyNqQ35sygAqC5WbMSROuR3pJ3+hw4mprVVxZd22B+4D1nV7ZcBj5bQNkBz8adtk+Py3ltuPg/vRyx778+Ubz5JfcKzlH6fgPxaMEc9dR6fmzxndzrRmppoZrCRXOkZb7XrxQDGWE6VDwytvjfOIQEAnfTlHP8j1PJkU++WyiR1HoI49+Y0Do7yhb4mTBVmptUj9ZT6RiWcaX1zSBRnAGMqmEAn9MuXI+QuBd+qL2N6nI/381bCHnYjS8fcoVkeg5Lz7BFLTLtfmTRLjyMjgR+GhkdSRiDx+OUmUVaPDi5i9UeUvhFi5vavmfA8tH1HSRg+aLgOh0WQ2cqTBDWlUgTO5SxlO04GwZu4aK4ZqJuKFQLUdRtTGbd/xOCiHiooSnEgTRtgQEhdoIL9Z1QFaHsFVeftRf1QjFuk9o5DF9EyKAXtxPGkskFqAouwkCJRpF1aVMmw5C6d7W0U3aqDohzdhvvjAaCu2yLUPY0IDo7JKk7/mpqKP1yycs8X1aB3W7dL1/pkRm1C5wq9satG+VAFar+m1vw02wxHKzVN93J12h6juDN7UCL58MVgTiQHGwAhNDDMsj/+YjsRMrDEkSmc0Y2yrooUE87YEhsKCvOeKpAaSACNLaawEvKKH2gusDCJkfS0AfoXwJupkWIi1RjtBY4tmeUEZjUEdGt8+WQsxKd1KodPjvIzz5kYAbsaREb5jut/aClC07kmLvl5PBCDoiUeBGO31kgeIXnVCTK/QPG1v3hbtrzZHsdniOaaYl5c/sEJKzvDxaiH+71Ok0O4ZjwkZB05pQ60uQ6QkoaHhA1cUZMwxFTX6mnOh0DgvNFfMNizWbH6VPOcGtDYzaGD0wJGs7krHaACjP9iCAhs5hQoeLoHFIQQThycvX6WtkF/x51sBRqpD5g+97hISP6XGFD37wdljn1zVhID14VzwZfoAJhPY2upInzH6ojQFkWAeMAYJFZtFHen5jjR+W7O0vRlcKP3QCPceaKsORXu0HQbV7vIRKZw3C0K7morm7TVu4HiaS0tH7MpRSK3jy2evHWn6dp8phDBFXsp/tI2p4gN+gZhZ/ltRcA4t+iZItlcJ1fdt9KU5NqLjpNgYb29cRt9r73lflG4hpsgDxmgpUZopcPSt0ib2hbiP0Q7RvlDqacYeif/6i1Pba65Nvf+tAWPT/3XvEUvyBeT4LZNlWq/TpTvcgYOB0jJVH+v9WeDL29zSGKp3IEordx2pwo75wNheX0bHUxSQ/d+FxlZHMLWtMekDf1vMpth4b69eZrmLMQF1XWVOu4C8H74hQiWQO6XP45TaUZ+e9Qvti9SBf5oBfjkiGGY79K6y49DqaJBKz0Ibqlu08MYKWbQN2hjd6p22Ot1IP1eTcII5K6wpFhqJdnR2bQwwFpjpHV0nOzpWollsypgnUbq1hcM2gJHHmLcl0NsrHR34HZTZbQv1TjoztPSPNcs3Ffjae6+jXddeOht9X/62c2Vaxpa4UnYNtUcsDnfEAZBduyuLoPXOTLD1RgAMf39mgV5W4yuwSoeBcaML2MEXOsLDOphU6LGNSndTR7yZowdyoTnq6/iKjRLf7cQDRUVkzH/tVdwHV2U00yCrPXeIURieP/5uqejq5E+s9vLpyP0oEBbpgDb7JdpOHVaiGYy5DY1jR6qxuTxDRvLWZgJG2vHClI7Rimu2GPgxmsBoLp7FFizveQtoyDp8YMW1q8kv6Wv5fGvA2Hx5tzMtjn/QRgJzfKufsRjcAw4FKqqAbAbWay+CNdbled3ltR+NLwpUSzvjlPHFAcsa26C8JizEvtpadTsy/wq93xG86ggT9J8pNHcVczN1qF6PtsmiCrIh32iam/pRybc9SZlA0WQXxepWcCSb9TAy6kgbRvG9LWbcXnp590N0yQsGFzzkHQLVluRfTPlnFFrt1S8wNovN+I1qVzMf73sU3Iv1ayGmGF2bouKvn5ZmjB4okvElrv/5sRiVp5XXNu0x3mh9KZSjI3BxxbXrtPf81/D5VoBR/hY8k+k6Kyvk8KKdX1UNMeZw7XOXSYPNmw2+fKnh8qDfDDWavyVQnRwpINNuDhgLjYaCANEBqtAubTDQvhgKb2xnbhSF3NjEizwfHfX+Y+YsNl7VkWg6kHexBztax0LPFSlTB0qT5w9UrBgdLV6QZ97sMhvUG70daS+zEsXqXiidQqhVbJX1N+60lU575TDua8ZIbjqenjHhidHEGGmn6JexStPeIs4Wzt+wfo8Rd+IrC3oTrV6Hxs5X+VDTJVUHWbb1b0e07WAutx8IOdIwyqRagYZ68E8+BL6gwKXhUmmdl9DbXsmXMeOCF2CMAaLSl+jgLbocR0ZkdJkrsOypSwa78Db06kyDm5El3SxPG2kGluNIx+R7dURi0kfr3N5yba4+HahzUJz2qFlBW2sbM69Q3gX6L+d76aVl0J5wfxRwQ2m3zJvmutKhuRONqGO+ZI4hf9AXpXPGOI2CXHRs5bVfcfaQ1zTGBb9dyYruOzUpxthMjJGAkURpDouMLqRnJMqnfPN1gYJ1MpK9/lm4UygGheOIoytvqKN9jl/551thjM0/r35RCBwSuG8YSBV1ixO7DQV2HxbykmdPPw7W0qwNAJHO1g7etCPEA0Y6+6SDzWb2S+F4dW0v1x1hFOFncr/ChKcjKRWrlF/y/DSieYedSvIdqcPt4TuO+PmGW9Usf87ZN1w/cy4Xw1gzVf128RiY/spYjCxG38yvj48MujTR9tA1Ldxjha621WvF26TYiMj1b+F0275aCAML1ye/1n7KbY1Vc0NE/kiQ5EuD1iYtSivWGCfG6OkXaTugxxgDA5Y3IMwRQ76tCmw95NX5eH6vKkAPe6Pkr7X7f5m4i34rN8ye+EdIwSua669iY+5NfePA2PCziv0si7/qio7vZpc9egGDhgCdOgPNTWDTnyuMCurYFR2sVjNGB5y2zKnWNro5mEkFhoC/9Sg4klA/83GP/fDgnrfA4TH0qV+E4Z9PxYilT8D2z1cJXCgKyJN5oqPvh+kvlx4tM5/zv7crn3qVMV1FzLoGLVWorv5N754aeQbMRN1C/PshhPENB5EjH6M+qN6AjkYsVkkVCHgaKoc3IbRrR1SpaoBX0fhZHVhoCrWzaorotCsA737bh9rdbG+vfyPNG4Y+T7wIrQyFdBNmFGcvwbzjM83dRZF0g6YIPM/DiuGgqAXu5y0URh1VW+XGghKlPWBUbNEAxoAxlpVD7rob0LMPUFau31+zGuxVHdw37xPpRosR/5GHV93UoA812sSPfOxEq2G7Pp8B6McYFnGJn200MNKu2LVjBl8Bxn4CyL7dZywoo814HSkTGR2bL6qY4YKNDnZMmMt9Macmv7M8uVStJN7ECzCPnhF0DKYEhTxS4JjRJ/aZm5t0dv6JKvqXz14KSR76nsSTw6/B2zuMC1WzqmUVjpp3NYau0FGh/dTCGw8NB2gDdHLP5FxhwvPGZzFmljmeZVsUXVoi49D5zbnJmnPtzokq+m5OwR+wIH81VuZgcxIauzz0i8Lz2CHlhzq+SfW5vq7/MrjSu0fXKLykMjoztadFvxN+V8UG8zaEUBGD5veu5drULLpn96ZgNPosOKXX1LvDJJ0RoL8zhbbaI1I9R9cBLumMWf+7vk42ALquvkum0qB3PViMUBlzDSkw6HNjKddXuUnmj6Yw7JutnQtgEu13nz371/2ezrmPm3n74zyXSi4YRM79KuBgxujNjZXoBlpznIWFXHPkewOGROkoY/R8GHsD+/wAABucSURBVFUUPPI6OHEcUKLPIwo+ixYA71LovSJqi9woUWW2OWaVrmrYh44t6AgGFXqmftYECh31YHCP4bmNBsa1Y4dMkcBJfiKJDOtc/foH7cfKAlB7QenRMfCpjg6YnQdI5n5LP/1CBTTX7CiwqR1SZJH29ktzP0hBCIAjPhFmAMzIObf+dP37mIfRlOiC9RXbwaXzgI3P7sufwwmzL0PSMYIGm2gbraxZljAa6g0i5pY5owH8r7YlUZIQZJlDayp0YLkKpapOryegAhw6WUEyRsZ/VzCWVYGzGMvScdCS0z04YCwrmHrWEf67HA4kpcOFpANS6Oh6AkDun3ziez4GJ0To4328+cppFkU6L1Qvg1/Qa9625LxQAR1acY2+iIroqkjGGhME3aLzuCRhKEG3Bk9IySm8AZNCOQ1JAZtLWLQzmUnYELC4pO+SwhPFoP/SM+o3h9SnmUgZk3SN4o8JWAS8+tBvLSVFu98HAX8BC4edCW1Nymd3+fipr5htHx2Lhd6JElx/Yvlp5es4cjhSYPs76RhbmizYcdIvMs8iTTtY9QmByir9vcOB3n1Cc0k+Ow1s/froxq/gGbN/6Ts1rhDih1V3ND+8KcAo559f3tgS/1ACfkEcbmH3jQLGNQcPPh6CPeG12Ycc7JLuMz54oSMFkhNR0pQqf8+VcpdgNSgACgUVgtFOLvSeVyi9dVRvC6SAtQoYTZSN0kNTtDAzD6homEc6PIHPuo3AGzudjoV9Dg50n10al+K0189Bz/qP2m8OXxqKgDUxKwZGgOaCSYpImiHwAkNGgGckZMayZLLKcreXHM11sP+bgUX7RDPCoueYSyDImHRIzUrbplQoNg6a6WFG5iMOU+cwqXv6EpEm9Vtdo3vK95o8U9TZPSpJdd3rBvVXNavnjmi+5z/nNwpBrHnNZIfRhgu3vE4/UMDkwW74bfKAiUYeFN47/nUCRg+RVU/4bpT0HD2j/qqDlbyFnMDUg5zgvtbSqKWDnvU4sGKcHqMlMLWYgC0JVIWkqItxLhBnAjEpBJ0NmGASCehTNeNcihiBrQQSBL5Mg2oArCFcizZStBGD8d3+sGz7iY1LyAdGHxR1dDfPj9H3U917HyCbBdatA0jlVVoKLPaCb5vspxDJMOa0zbC0Nd28e7fJ2Og90w2zJt4pIc8ykPeqqj0n/W6jgHH12CFEMY9gwPPdEqnj2AuL24rpFWrn+rNLf8OA39OsjwzhQPGthVb/E9m4X2ANKdRVKh4jBWAmcZrgROrjU/XHTD0navqiRTh3X+AsZoZhWNp1OJ4cdS3WVO2sUo87zThh1qXY4/NnNbL48CIgWZKtI320YCwNsLS00CoZUi7jadholUBGcmJujBidQ/GiiZ35sQY0sAn0yKaPtaQsXReLT81YVoMXkUmLutSSHqPzJqpQXE+zNw10mv7RZJacUWPpe/4z6j0tDWnA01oHDZ7+tZwUl2tQxbsM8KUSEcE0G9UvQ0hSz+lh1LMeYG8sUwyNqQhomkCn2sADPaYDIPpDgwRq4ssKgujQQ2/I+HIitVYAlKo1KLShHlZ+7RmtbNRaOuiPar3gPXVqLEG757/uxaZQ95nWClCHqzw8xqrst8RSIYidyhiXMsEEkkyKJHNRYgkkpZRJLmWJbJX9KdyiytyD5lwFw+ojv9JRBUtunvhVy7VsWJTOCdO5J3OGHOF6xhdijN4/Yosq5okPjF7SbUNuIRkgjCBaXyKvq7yr9bIIuLT5s37Wxb8G2NXGQ29Ujlx5IGOPuxsFjGvGDFnLGLrEhLNjp5kfLu1oIRrPiA9iFp+VldB7/Tbp0/6K5QORYoykY8ySHESEK9fdZtaFiCjdN3MK5eqHCvRC+pEaK4Mknh3xa8wdmgsvtseiKRjzn+tQ0lqraQjN/Z1j9yLGUwQy68p3Kuve/EmTJhpCcpoPNJ3ImOfp3bgHWEpbpvV4ssJJ71LlusfV27HJTZa1wtPzqbWAJAoveoTS21GaaocfAZQPah7AabDTQMaZSz7xckPlrmUPDf7bOQctvfHRoeueXk7vkXJbPavCxitKqQBSKXO4vu9SUCB/xvjPqUb0LBIUstG7bxn3Ff7471Ei3kd/s9RpBRszTOhAP/N5oldueNYH91XN1X1trfF/e3VkLleHNyjAI9BS36mzci2pAFA/o6LvUsQ3RpK2pQBTarDTayp1sgJDyodkdQW66h61jMUYl8wR4MpQS897ek71vgZogliS8VVa6rr3jA+uTLCY/DhzjmKlvjHIDzfJPUUqFc4LY0lo68Uh1opYb6dRVKKOEreO9kk2zZBJaaOLb3ghl2S180XHPw6oTi5NM/eOdr/uVovJtHDdfarvyc5tr4xS/taun1X/R8bwS0Pp8BG33f0rht2idtNsHDCOHUKHEn/aY8YHHQ4ZJk9EvKE8/qoA2ysnc0UUq1Hx1kSnQqgW7T2/JbwDi7QBRusa1bZC5oVlUs95Da7S0AnpPdakqyC2SX+9397ZUvq+vmakoL772+AW7XQEnj/oWqQT+iD6ZKoOw+Y/gt0Wv4AeNYsE286etLz7qOTbA04btrjb6BGjP7nxsX0+u2uRMhkxRpFGKWsFaASQJP4qwCMxWDJlT+qdbbnEYWzeukTiX8rsQUyPnieW6AGpAlHJSFkm6JvUpgR11f+uAM8DRmoZx7Jw28iXftMQ7zWcSTc7aMOLt5308c/+TXilwMsDKfW+B2gK2ChXPz6SoANJlQtFbkT7z3MPTP1QkfSO953AMhxBMjesbbI6ej/NwxjMgU/66uhE8J91BRi9T799TWxagJn3FVgLMFdIRmV3XeoC/WE+2HrMkNLzQdTi9A79ttSSRGBqS+8aMU+PUVIa5IFhWSo6GCdIVODnSjpFlERzbkmLCSa5YpuOBk0Swwm7lDFIU1Ddk3RPA6syJtEt6m7pIGEtzVzu6TZzZ197veF3ivJz9XXYEezRyK1BS8Xp9b4zLpVTNt1XbLZAfGCzD2ieNDfQ6sKU+ExitHbVocp6+kWz13wdfyEcCDqjDWOM9z4H/tvQlN6n3+PwTpMrDJH1syY8Rqaf4K7EJzHGDyoddUOw93qjgHH1mCGLOLC++yvz928Plf37tT+J/55x/IYOVwuAxHdmLbIomKuUD0SFvGECNud9UX+IzamtgdqfUekaSX5R2OOdc+Qw7c7jgV14t4ZWAPqBW4N+8VvK+xvs9PJ/A2go74nnxlyLxQNGh5pHhWZQTDCn9ko6jWsunrnPry3XcTgnzkZ6QEYSSMAg9TUlXYlymdmx0nEuWZOIn5/lzLE0eGrA84Dvk96Hdtll3YtrbQ+k6D49p80KZEohxSXtGtBgR3/p923DX/5VTbzvsVTomGj9+IhPr75kZN1Ta+i3gywVSHWJ7ernY2TXNT5kdTA3XobuW/khZ0LPuvnM0NcKk/Uia9i5VLoZIEumJe8T5KUKlitUNmU8Q+n4t/1n6Lx6Lx3KIks2de+TFWDqMTrNlMCR8rT0NdqUwATNco91kgnLLwsBsaWBVz8H5nDJYtqur8BTid2UJgGra3HvpIHgGgEkKVGUSOyCu0zqZyg9BgJPrhwS6LuUlgJaYXHhyJLYisxNkkptgqH/3R/kAUKaSmddgdA88Pex+xMwoBSeyT4ATg2WCjg1+IPYoioggSKBIQGjJ0YrWuwFGgmxUcM7KIotUTwohj1KGcHl9dX3ZH/RFj7J9y/r1JROnS8kjmMMq1wbP+r03Ul15jsbBYxrxg6+k2xJPWbM92Kqtw2PG35of8+22LOOgDrmJzSbom5vCjULMEn/utFBeRY3490cu/NZo+fTqEDSi1Sv5FWv7N4qpWUq739B6ED9UACSBggGZaBONtQgBJif9dkHb3znLHzaZz8IP+S/l50t0mu7NS15+ZCPr31mQO27tcRpCbwc4UrLUjpFQeOLmI4StMBElkH2TbdOdCwsqk2WPgtXAx39s+k+gJk7/GyHFC+3f7DkqkXSAk0ZGXc0YKnfHgBJi6nrpByOW5DXj/jPFQ3xnqdR8eKyZeapSy64eOem15tM5XHCZjLlX/AOpUiQzdr/JIFkDLI1BSTt8HV1LcbU8Tv0DDlntJAY29rquInCLhZEUIjAm6PLShPpKyN0Co1ZRq3gfYg+0VeiCyXeX5YFS9LZONGh6j9E17OS0X16znyQ2eG8MmlweiZtaxClpiCPMDVGfFW2C0bvBddtSQDHFAgToFkaGDUYx4xrksG/t7LHWNaaPDnbecM1TufGLwgYHQJJR/IYPaP1iJyAkyiYSyCZlqUla9NTpEQ8b1umyRBDQYINQIwCZh6g5vSH1MOv7nUJRvz3PpS2bvAS0fNHhQTzWKFmiNroooFT6x8UgG0M8kTBw3w3gpqW0pCIEzo96E5rG53avrsxxcOaMYP3BWOvS5sP7fni+/PbSrruVOzALfutrIvuPqaZUnHBkHLG7jU/bYU5eahaPGcFjL7oS6xRue94Ry6TPKpYYthXJADFAmwwaCDtHOf1fg5D1WDwixN5P2uXYE3nndGa7Cw+Hjj60qrWxYtHLpvyBTFAy4bIusTamAKtWIyipGUVoMU8NihdNe0lTaS+TnrKChsnu3bCIWAjgJMeCMks5F9Hz/nrOfOO+FWXzNqsjwxKXZ9lssR7rhlAaYxJ9TcO9feGnV6/qCXW5bK4aH7gwiWHX97FWRoo/GQcsjwJKTOQDSTzpyFLyY3H+2Rb4TZ31uA2cANcDIbEib5xO2/h6ajSaJPHc6FjyfEY+OLVsJMOeIyAxAfRJrBupWA1JWANLng1gLo6fb5fUIAqgHnMk5M7bOTTnAYrBzkmA82kyi4H+Q4wNBOE608L+QrEJeMecLY6GlRpgaAYJ6VxsJQjWToGVuKClSzvcyRrLbkWahWQNbKq4YzmLms/JLAlIM4yybNZcALYhB1j/neWFaWJdZkZkqzbxuQJ1Fc+MSkCgGqO+tvO6BkFoDkUNcH23UGn4vkD/4B95/4NY9/8c7ASBrxCsUmyQHvH5xAYWp5u0TtRN9qYphTtz/eQ378xx5Q6IDy8cj3DyLcKtdmss2/XKSBV1SZ9NgoYKYe1Y4e8CIaa7i/PP6VYjqtORLfSGJ/pSDYoqLDBqtR7oZbwfCV8tZ/RsXmWk+hqYbLMYJXzwJEU/8pQ4jl8EyB6orYyisg4Ym4vMJRA8Do49uqANKoiFANKowzR4Cn6t7E7QQE7c5vL+V4yzuticQgCKwK1uIAgpiLJM86CTNIZ7zaTIgNJrCpZwoRIM9lLNu1puTi4pqriavJHKEtByjiTFOO8ItEgp+xyz4CPq0bfd8Vr2x9YlYAkp9LqZI651dDvUv2b1vfOLZC0XIkWSNEMefegx3ocvvCkNT0qIft28t4j09poOGxMDgg3aYRtwS+RYWPxzxC3O+dA0a4CsxrCIMnLwKgd/aquawLr4f2gezWtYJ1LIOkvnX9Y1wryRVAjhZeCNabBqlClQDW2rO8vmMsvzzWbXO12qxmbqmioYXEwAtbyOJTvAgFrmktO7NgSoqykxn1Pu/gYjR5gm/7iy0DGj9DX4BkjDQLM1kQ1VncehLcHn44Ptz9UZdB9w4c47/HDQqKgr3P3nbiVvtJnkL6Bx2eMJiaYUldUujTHUPSd6Pjy9Y1MLnFSYv9uT2HVpgzBjQbGdWN230VAvMcYO637jA8eL5Rp3SnsSRfsuA5FWtmUUrfzjm+dVuzQY4+kdyRuoxmlbl07vSOYzC2wbuJzSN4cBkQTBA2wDAFn9LrPcv3JwZBNlcQGpWKx+pJSJmRKg1pZBRfEUirjdVIkIKtLIDes1y917ge5dh3glkLuWo8rHeCJmnIolu5UhrUS13xnye8E7GGXvTLgyHRnyMEAFiwEUp0gh/eCfHwhZLdBtN0IAlfpU1a+hmb/n0nSJyzeeVwMvwPDwgijHJT7PVOtMcCcVWAUTmpBLRgG6eZK1ITfsxvBSpcNIWdlpfNVHy4fkXssUL52vAWsphzM8sC1IQNWjWpkRLqsc0v6EylREurcEMAV6CKfTNAtg00GPz0gmnzow/i0dy6gS2mqBmc+cyK61S1WcykXvIQMODpwr69L9A06PmhGycTXNXAsJmd2elSO2ZT0NxoYKZO1Y4eeLiFvZVwc1v2lhfqAY+Oz4URcyRi7SslY5smQHruLxppV/WGIy37DmWKAfz94zPui/pisUeXpxcnzxWpKyDsFU62IVCa3AjzVP1RuaddDJlfoa9oRTRt7DVk5d2qeN4qiwOmnaFy3ORYtT8qR2RLIHmWQTi2kU5EDp/RqSAIxerXxY0iaRDMPzBVt3y/wQKw3cifeX+V7LepynvnUso/AsGDysf1zk2lTRsO2d76xFigo9nsjr/bgoYOzQr5vFMa17MyQLpmPCYUwZ2cNpslasERP/Z3GUB+wN7MSOpRfCB1zkysqhkafDc05rwD0zufdR+DOI55UV8pa1+P0F09Drw2eNi0kDXoqJ0/fqOaOZ2wJVGL+6Yv+tI+gUO5YHC8tE7wjPeTPf/XXn5IeaxSQ13d7DG0aYop1+CYBIyW2ZuyQ3wH4OYCf9Jgxf6qZQe0xqJZxzIRk3/GP9NA+w74C10DBApYU9VxQUx8BTZ7j93rOzh9OO6oj0SuaYoq+8THVByxLmiX6CCC5BojVEWLmUNoExADho02pfcT88EjaNU+XmQaCzdHsuji+8xD8+/GFYCcOgsRVADXe7/KHbx6Tk+ehk+vg9/ZduKhQJ/7kqRU720x8BMamTj6m33Hf2MzeltHX2gJrxw5ZLoG+QSZMXt3j5QVXmplGwXXdcdg/buFZR6IiEJl9pAvp78OGFOM83WDs5nlqQOLB0XcikW3CoXOvQ0XLGm/06kmiR32uRFqjpOenvu7r6M0a5EzRsrknZKoLwLNg8QawkvXKouWtFQHSezOr6L5ZJaVrr5IPbVvuX/kIPBls47prk4FRgeOYIbcBOE8yXNNDzP8dm5nTR607ChU8jjMZMCKI4rBxZdvkp42AyH6P+b3n15e5dbseL6VNqmCHlS3/J4vXu8qpWrvA5FTw+iySnGomNwpC5TOh3hsT5DG0hkvc3eVJLNjUyjhn4xjCWPsuhBYfP70zpi07g0lMBvDS5GP7H7Kp+Wx7b/NqgTVjhrwFhr38UjHgje4z5u/XXinXHYVdEMNPLaB3ofhV5txgMUXlgp040WGvniXPeXJkJP9JY0ulvzVSbRNVPmOhkpGXrN4PRN60yoEu9/GO7VYX1C4kmoQ1u54opXEYNs/CLl85h8WaOrDH1khcO5z8lzv4x/+3d7WxTZVR+Dn9WBk4BjLWDdmmyBC2zg9C4g+/YIUpxAxKVIjGIKUgiBKJP4zEECDRxBh/kCEJbN0w/jAGYkdggsC6KUJUVJB1w8wfaiewdW5B0cDW9R7z9mN00G39uGs3ec/P3vOec97nNufe956vybUYkIIzHHY3uexY2G/l7VxQvFkheh+MCwro1dyGpi8Tkzjyqz0Lix5lRXMy4ON4V46zOeLb2MhbMryGXht2XmNsz7RDxFBuIWutexcYGwH8WG3JH7Qj+vCaJMdoQsBjNp1lxoNhNnUbnS4Ru/nfUffCGZm9yngHAY+H5eKLfV7TMy+6s6H5VLI3ndAbY8hYj7n4KWaqgnhKEY4R086pzqajo/Ej/y+LZxom9o5rBAefxoQyY73reLKBj1afdy0+01di0COytdZ9HAzRzaKz2pLnT42SNLYR4Geh9XSZPARkMOMKCK1E+Cq73rVlbO9saOuDgd1dIPF/7qeuNEU3b3LjuahLkNXASBXHKAzxzC+6gzUa0ZVikz/7HvwbgQ5B4c97DPgu74vmiG88Yi0XFaW1G1GY29AS95EzGjDaF5aUaBSuYKA/tKFVaE5WY9PP0axPNg/bMKeP8LK+Eq8PpntNrdvFjGJxbJmQNn5SxZIpIuVQkkRgTCIgSiH/LDV9qADrb2yATxqdzeJtMmmkmmMMWdxuLplB4PVgrAaQFfqdwJdEWhgBfzHoKqCkgWkSCCLl6z4Rp0g36HMyjpwdkZGIHWbTWQw8mgjT/s02XJ8SS5egpN0ZkcxrwzZinNHZMUjLcsBa2+YGc57/AUPaR2qW3XU6mTZKXRIBtREQzrGz1HSCgfBUm+U3B3nV1hsuT3XHGBL+6/y7x2VQxpNM/JgCiNrqB4JVVAP3w+gE+DS0dMrX11szrbE1rijScCB1mIv3gGld2FNIYdZsyGlo2jvc2lRcF8cpbyZa9T24nz4WtRSRyepwi5TIQOcK0KZqS15FKuyVOiUCaiLQZS4u6lPIFQrcMqEup971tJo6hpI1Yo4xktKuxTMn9vWMm8qKL12rV7qv6HxdhTH0dEwEFM8Ck5UJ9qAD+VYL2pLlPO9MROZIru2x4RkwrAY7lgylx+po2wZQAUi5zhpNXU359MMjaZeULREIIbC61r0CjPVareatqvLp38SDzKX5s7J02rSlYCXdpyiHc8PaGd4UgOoyOl39J9B4dMWyJqmOMRbD1ObtNM+exay1KMyNOQ0twaESamtRRx6/BoP3Gs4zY7vBjrhatqtjiZQiERgcAavDLYZQlfm/4hB9YF+WJ/obRk2dpXPm+qA5RoFKSXHiqTc6m/oDL+1m0xlizAtc47+NzubMqIUnyHjbOMYEcUrq8l4b9hBhpY6QS3v9zWgkSQRGHQJWh1t89vI7NQKO2y35wklGTZ5SU2N4IJSAq41TXJOf2w9fMFAqar8DrTQZJ4wNrqTl6UrHGPVtTA6jdy22M2MrAe/oq/B2crRKLRKB2BGwOtzioS16WAi6XG3JnxaLlI5Sk+iJ4m9PxODNOsKp9sv8U3YWilmnEbOlZgTliT7nZVn1TSdikZ8Ir3SMiaCn4lp+ERO8BohKolUEdOv6cC/tiz9zX0XTpCiJQEQErI62VoALQxcV+B7aZ7nnXLRweUpNFxiY7XeMGlomBjURaVcCLKaQ3hh/ybzV2NAcPpslWhVx80nHGDd06izkddB7FYiB1TsAFPilEjamVWK3OhqkFInAyCCw5qB7NyvYECbdXm3Jt0WrLdiMpmYI/otEeCO73vVptDLV4pOOUS0kY5TjXYs3WfGXfC0CBb7TBOmTtCo8H6M4yS4RSDoCLx1qK9T4+Dw40Pzc39Bcy3M/Ki+IulCjw1zygsh7DpY/iubevzPoay376to7cMTU0hI+CSNpe5SOMWlQD1TktaGOcUsqzg/6HjwxVN5iisyVaiUCERFYc/CPVayw3T9AQxDzgerlBTcGTY1R3KRjTNGN67NhnQLsCakn4KguHSuoArKkL0X3RKqNDwGrw11GoPcU4gM1S/Pe7R+dG5+4UbFKOsYU3QZ+BTneXlxk4DIBO/RVqByNTTdSBI9UKxFIKQLSMaYQ/t7VeFj/D76n/ZGn5aXQNKlaInBbI/Af7NFDa4Ye3CIAAAAASUVORK5CYII="},16722:function(_n,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ye}});const Me=xe=>typeof xe=="object"&&xe!=null&&xe.nodeType===1,me=(xe,ge)=>(!ge||xe!=="hidden")&&xe!=="visible"&&xe!=="clip",Be=(xe,ge)=>{if(xe.clientHeight<xe.scrollHeight||xe.clientWidth<xe.scrollWidth){const le=getComputedStyle(xe,null);return me(le.overflowY,ge)||me(le.overflowX,ge)||(ve=>{const de=(ce=>{if(!ce.ownerDocument||!ce.ownerDocument.defaultView)return null;try{return ce.ownerDocument.defaultView.frameElement}catch(z){return null}})(ve);return!!de&&(de.clientHeight<ve.scrollHeight||de.clientWidth<ve.scrollWidth)})(xe)}return!1},ke=(xe,ge,le,ve,de,ce,z,ee)=>ce<xe&&z>ge||ce>xe&&z<ge?0:ce<=xe&&ee<=le||z>=ge&&ee>=le?ce-xe-ve:z>ge&&ee<le||ce<xe&&ee>le?z-ge+de:0,Ce=xe=>{const ge=xe.parentElement;return ge==null?xe.getRootNode().host||null:ge},Le=(xe,ge)=>{var le,ve,de,ce;if(typeof document=="undefined")return[];const{scrollMode:z,block:ee,inline:oe,boundary:ie,skipOverflowHiddenElements:se}=ge,ue=typeof ie=="function"?ie:Pt=>Pt!==ie;if(!Me(xe))throw new TypeError("Invalid target");const Se=document.scrollingElement||document.documentElement,we=[];let Pe=xe;for(;Me(Pe)&&ue(Pe);){if(Pe=Ce(Pe),Pe===Se){we.push(Pe);break}Pe!=null&&Pe===document.body&&Be(Pe)&&!Be(document.documentElement)||Pe!=null&&Be(Pe,se)&&we.push(Pe)}const Ae=(ve=(le=window.visualViewport)==null?void 0:le.width)!=null?ve:innerWidth,De=(ce=(de=window.visualViewport)==null?void 0:de.height)!=null?ce:innerHeight,{scrollX:ze,scrollY:Ze}=window,{height:Xe,width:Ge,top:ft,right:at,bottom:Ct,left:et}=xe.getBoundingClientRect(),{top:yt,right:st,bottom:zt,left:lt}=(Pt=>{const gt=window.getComputedStyle(Pt);return{top:parseFloat(gt.scrollMarginTop)||0,right:parseFloat(gt.scrollMarginRight)||0,bottom:parseFloat(gt.scrollMarginBottom)||0,left:parseFloat(gt.scrollMarginLeft)||0}})(xe);let tt=ee==="start"||ee==="nearest"?ft-yt:ee==="end"?Ct+zt:ft+Xe/2-yt+zt,ut=oe==="center"?et+Ge/2-lt+st:oe==="end"?at+st:et-lt;const mt=[];for(let Pt=0;Pt<we.length;Pt++){const gt=we[Pt],{height:Ft,width:Ht,top:hn,right:Jt,bottom:bn,left:Wt}=gt.getBoundingClientRect();if(z==="if-needed"&&ft>=0&&et>=0&&Ct<=De&&at<=Ae&&(gt===Se&&!Be(gt)||ft>=hn&&Ct<=bn&&et>=Wt&&at<=Jt))return mt;const Kt=getComputedStyle(gt),Xt=parseInt(Kt.borderLeftWidth,10),$t=parseInt(Kt.borderTopWidth,10),kt=parseInt(Kt.borderRightWidth,10),pt=parseInt(Kt.borderBottomWidth,10);let Bt=0,xt=0;const vt="offsetWidth"in gt?gt.offsetWidth-gt.clientWidth-Xt-kt:0,nt="offsetHeight"in gt?gt.offsetHeight-gt.clientHeight-$t-pt:0,He="offsetWidth"in gt?gt.offsetWidth===0?0:Ht/gt.offsetWidth:0,Ie="offsetHeight"in gt?gt.offsetHeight===0?0:Ft/gt.offsetHeight:0;if(Se===gt)Bt=ee==="start"?tt:ee==="end"?tt-De:ee==="nearest"?ke(Ze,Ze+De,De,$t,pt,Ze+tt,Ze+tt+Xe,Xe):tt-De/2,xt=oe==="start"?ut:oe==="center"?ut-Ae/2:oe==="end"?ut-Ae:ke(ze,ze+Ae,Ae,Xt,kt,ze+ut,ze+ut+Ge,Ge),Bt=Math.max(0,Bt+Ze),xt=Math.max(0,xt+ze);else{Bt=ee==="start"?tt-hn-$t:ee==="end"?tt-bn+pt+nt:ee==="nearest"?ke(hn,bn,Ft,$t,pt+nt,tt,tt+Xe,Xe):tt-(hn+Ft/2)+nt/2,xt=oe==="start"?ut-Wt-Xt:oe==="center"?ut-(Wt+Ht/2)+vt/2:oe==="end"?ut-Jt+kt+vt:ke(Wt,Jt,Ht,Xt,kt+vt,ut,ut+Ge,Ge);const{scrollLeft:We,scrollTop:Oe}=gt;Bt=Ie===0?0:Math.max(0,Math.min(Oe+Bt/Ie,gt.scrollHeight-Ft/Ie+nt)),xt=He===0?0:Math.max(0,Math.min(We+xt/He,gt.scrollWidth-Ht/He+vt)),tt+=Oe-Bt,ut+=We-xt}mt.push({el:gt,top:Bt,left:xt})}return mt},he=xe=>xe===!1?{block:"end",inline:"nearest"}:(ge=>ge===Object(ge)&&Object.keys(ge).length!==0)(xe)?xe:{block:"start",inline:"nearest"};function ye(xe,ge){if(!xe.isConnected||!(de=>{let ce=de;for(;ce&&ce.parentNode;){if(ce.parentNode===document)return!0;ce=ce.parentNode instanceof ShadowRoot?ce.parentNode.host:ce.parentNode}return!1})(xe))return;const le=(de=>{const ce=window.getComputedStyle(de);return{top:parseFloat(ce.scrollMarginTop)||0,right:parseFloat(ce.scrollMarginRight)||0,bottom:parseFloat(ce.scrollMarginBottom)||0,left:parseFloat(ce.scrollMarginLeft)||0}})(xe);if((de=>typeof de=="object"&&typeof de.behavior=="function")(ge))return ge.behavior(Le(xe,ge));const ve=typeof ge=="boolean"||ge==null?void 0:ge.behavior;for(const{el:de,top:ce,left:z}of Le(xe,he(ge))){const ee=ce-le.top+le.bottom,oe=z-le.left+le.right;de.scroll({top:ee,left:oe,behavior:ve})}}}}]);
|