|
|
(self.webpackChunk=self.webpackChunk||[]).push([[7460],{35323:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Se}});var Me=Ee(5891),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,Pe=Ee(88853),Le=function(ge,le){return me.createElement(Pe.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),Se=he},19155:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Se}});var Me=Ee(5891),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,Pe=Ee(88853),Le=function(ge,le){return me.createElement(Pe.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),Se=he},10402:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Se}});var Me=Ee(5891),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,Pe=Ee(88853),Le=function(ge,le){return me.createElement(Pe.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),Se=he},3837:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Se}});var Me=Ee(5891),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,Pe=Ee(88853),Le=function(ge,le){return me.createElement(Pe.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),Se=he},93343:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Se}});var Me=Ee(5891),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,Pe=Ee(88853),Le=function(ge,le){return me.createElement(Pe.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),Se=he},80205:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Se}});var Me=Ee(5891),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,Pe=Ee(88853),Le=function(ge,le){return me.createElement(Pe.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),Se=he},61441:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Se}});var Me=Ee(5891),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,Pe=Ee(88853),Le=function(ge,le){return me.createElement(Pe.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),Se=he},30631:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Se}});var Me=Ee(5891),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,Pe=Ee(88853),Le=function(ge,le){return me.createElement(Pe.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),Se=he},43971:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Se}});var Me=Ee(5891),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,Pe=Ee(88853),Le=function(ge,le){return me.createElement(Pe.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),Se=he},58358:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Se}});var Me=Ee(5891),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,Pe=Ee(88853),Le=function(ge,le){return me.createElement(Pe.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),Se=he},52249:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Se}});var Me=Ee(5891),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,Pe=Ee(88853),Le=function(ge,le){return me.createElement(Pe.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),Se=he},44757:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Se}});var Me=Ee(5891),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,Pe=Ee(88853),Le=function(ge,le){return me.createElement(Pe.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),Se=he},16537:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Se}});var Me=Ee(5891),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,Pe=Ee(88853),Le=function(ge,le){return me.createElement(Pe.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),Se=he},77042:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Se}});var Me=Ee(5891),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,Pe=Ee(88853),Le=function(ge,le){return me.createElement(Pe.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),Se=he},5527:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Se}});var Me=Ee(5891),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,Pe=Ee(88853),Le=function(ge,le){return me.createElement(Pe.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),Se=he},15962:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Se}});var Me=Ee(5891),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,Pe=Ee(88853),Le=function(ge,le){return me.createElement(Pe.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),Se=he},86902:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Se}});var Me=Ee(5891),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,Pe=Ee(88853),Le=function(ge,le){return me.createElement(Pe.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),Se=he},53878:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Se}});var Me=Ee(5891),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,Pe=Ee(88853),Le=function(ge,le){return me.createElement(Pe.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),Se=he},21970:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Se}});var Me=Ee(5891),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,Pe=Ee(88853),Le=function(ge,le){return me.createElement(Pe.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),Se=he},79906:function(){"use strict"},93938:function(Ln,tn){"use strict";tn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},78925:function(Ln,tn){"use strict";tn.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"}},7543:function(){"use strict"},27972:function(Ln,tn,Ee){"use strict";var Me=Ee(59301),me=Object.defineProperty,Be=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Pe=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))Pe.call(ge,le)&&Le(xe,le,ge[le]);return xe};const Se=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"})));tn.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBmaWxsLW9wYWNpdHk9Ii4wMSIgZmlsbD0iI0ZGRiIgZD0iTTAgMGgzMHYzMEgweiIvPjxwYXRoIGQ9Ik02Ljg2NiAyNi45MjhoLTEuMjhhMi41NjEgMi41NjEgMCAwIDEtMi41NjItMi41NjFWNS41ODVhMi41NjEgMi41NjEgMCAwIDEgMi41NjEtMi41NmgxLjI4djQuMjY4YTIuNTYxIDIuNTYxIDAgMCAwIDIuNTYyIDIuNTZoMy44NDJhMi41NjEgMi41NjEgMCAwIDAgMi41Ni0yLjU2VjMuMDI0aDIuOTE1bDguMTg0IDguMTg0djEzLjE1OWEyLjU2MSAyLjU2MSAwIDAgMS0yLjU2MSAyLjU2MWgtMS4yOHYtNS45NzZjMC0uOTQzLS43NjUtMS43MDctMS43MDgtMS43MDdIOC41NzNjLS45NDMgMC0xLjcwNy43NjQtMS43MDcgMS43MDd2NS45NzZaIiBmaWxsPSIjQjZEMEZDIi8+PHBhdGggZD0iTTguNTczIDMuMDI0aDUuNTV2NC4yNjlhLjg1NC44NTQgMCAwIDEtLjg1NC44NTNIOS40MjdhLjg1NC44NTQgMCAwIDEtLjg1NC0uODUzVjMuMDI0Wk04LjU3MyAyNi45Mjh2LTUuOTc2SDIxLjM4djUuOTc2eiIgZmlsbD0iIzE4OTBGRiIvPjwvZz48L3N2Zz4="},15547:function(Ln,tn,Ee){"use strict";var Me=Ee(59301),me=Object.defineProperty,Be=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Pe=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))Pe.call(ge,le)&&Le(xe,le,ge[le]);return xe};const Se=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"})));tn.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMzAgMTVjMCA4LjI4NC02LjcxNiAxNS0xNSAxNS04LjI4NCAwLTE1LTYuNzE2LTE1LTE1QzAgNi43MTYgNi43MTYgMCAxNSAwYzguMjg0IDAgMTUgNi43MTYgMTUgMTVaIiBmaWxsPSIjQkFGRkYwIi8+PHBhdGggZD0iTTI1LjUgMTVjMCA1LjgtNC43IDEwLjUtMTAuNSAxMC41UzQuNSAyMC44IDQuNSAxNSA5LjIgNC41IDE1IDQuNSAyNS41IDkuMiAyNS41IDE1WiIgZmlsbD0iIzQ0RDdCNiIvPjxwYXRoIGQ9Ik0xMy41IDlhMS41IDEuNSAwIDAgMSAxLjUgMS41djQuMzc5bDMuNTYgMy41NmExLjUgMS41IDAgMCAxLTIuMTIgMi4xMjJsLTQtNEExLjUgMS41IDAgMCAxIDEyIDE1LjV2LTVBMS41IDEuNSAwIDAgMSAxMy41IDlaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg=="},37404:function(){"use strict";function Ln(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(Ln.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(Ln.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(Ln.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(Ln.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 Ln))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 tn=[];function Ee(ce,z){var ee=tn.pop();return ee===void 0?new go.Point(ce,z):(ee.x=ce,ee.y=z,ee)}function Me(){var ce=tn.pop();return ce===void 0?new go.Point:ce}function me(ce){tn.push(ce)}function Be(ce,z,ee,oe,ie,se,ue,ye,we){we||(we=new go.Point);var be=ce-ee,Ae=ie-ue,De=NaN,ze=NaN;if(be===0)if(Ae===0)ce===ee&&(De=ce,ze=z);else{var Ze=(se-ye)/Ae,Ye=se-Ze*ie;De=ce,ze=Ze*De+Ye}else if(Ae===0){var Ge=(z-oe)/be,ft=z-Ge*ce;De=ie,ze=Ge*De+ft}else{var Ge=(z-oe)/be,Ze=(se-ye)/Ae,ft=z-Ge*ce,Ye=se-Ze*ie;De=(Ye-ft)/(Ge-Ze),ze=Ge*De+ft}return we.x=De,we.y=ze,we}function ke(ce,z,ee,oe,ie,se,ue,ye,we,be,Ae,De,ze,Ze){var Ye=1-we,Ge=we,ft=ce*Ye+ee*Ge,at=z*Ye+oe*Ge,Pt=ee*Ye+ie*Ge,tt=oe*Ye+se*Ge,vt=ie*Ye+ue*Ge,st=se*Ye+ye*Ge,jt=ft*Ye+Pt*Ge,lt=at*Ye+tt*Ge,et=Pt*Ye+vt*Ge,ut=tt*Ye+st*Ge,mt=jt*Ye+et*Ge,_t=lt*Ye+ut*Ge;be.x=ft,be.y=at,Ae.x=jt,Ae.y=lt,De.x=mt,De.y=_t,ze.x=et,ze.y=ut,Ze.x=vt,Ze.y=st}var Pe=new go.Spot(.156,.156),Le=new go.Spot(.844,.844),he=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Ln("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=Pe,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 Ln("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 Ln("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 Ln("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 Ln("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 Ln("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 Se=[];function xe(){var ce=Se.pop();return ce===void 0?[]:ce}function ge(ce){ce.length=0,Se.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 ye=z[ue],we=z[ue+1],be=z[(oe+ue-1)%ie],Ae=z[(oe+ue+se)%ie];ee[ue*2]=ye,ee[ue*2+1]=Be(ye.x,ye.y,be.x,be.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 Ln("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new Ln("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 Ln("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 ye=Math.max(ie-oe,0);return ye>0&&(ue.add(new go.PathSegment(go.PathSegment.Move,z/2+ye,z/2)),ue.add(new go.PathSegment(go.PathSegment.Arc,0,-360,ie,ie,ye,ye).close())),se.spot1=Pe,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 Ln("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Ln("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,ye=Math.min(z,ee)/2;return new go.Geometry().add(new go.PathFigure(ye,ye).add(new go.PathSegment(go.PathSegment.Arc,se,ue,ye,ye,ye,ye).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 Ln("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 Ln("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 Ln("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,ye=Math.atan2(ee,z),we=oe-Math.min(Math.cos(ye)*oe/2,se),be=oe-Math.min(Math.sin(ye)*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,be)),Ae.add(new go.PathSegment(go.PathSegment.Line,.8*z,ue)),Ae.add(new go.PathSegment(go.PathSegment.Line,z,ee-be)),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-be)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*z,ue)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,be).close()),ie}}),go.Shape.setFigureParameter("ThinX",0,new Ln("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 Ln("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 Ln("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,ye=0,we=se*he;return ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5+se+ye)*ee,(.5-se+ue)*z,(.5+we+ye)*ee,(.5-we+ue)*z,(.5+se+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+ue)*z,(.5+ye)*ee,(.5+we+ue)*z,(.5+se+ye)*ee,(.5+se+ue)*z,(.5+we+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-se+ye)*ee,(1-.5+se+ue)*z,(.5-we+ye)*ee,(.5+we+ue)*z,(.5-se+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.65*z,.36771243*ee,(.5-we+ue)*z,(.5-se+ye)*ee,(.5-se+ue+.05)*z,(.5-we+ye-.02)*ee)),se=.2,ue=0,ye=-.3,we=se*he,ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+ue)*z,(.5+ye)*ee,(.5+we+ue)*z,(.5+se+ye)*ee,(.5+se+ue)*z,(.5+we+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-se+ye)*ee,(1-.5+se+ue)*z,(.5-we+ye)*ee,(.5+we+ue)*z,(.5-se+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+ue)*z,(.5+ye)*ee,(.5-we+ue)*z,(.5-se+ye)*ee,(.5-se+ue)*z,(.5-we+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-we+ue)*z,(.5+se+ye)*ee,(.5-se+ue)*z,(.5+we+ye)*ee,(.5-we+ue)*z,(.5+se+ye)*ee)),se=.2,ue=-.3,ye=0,we=se*he,ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-se+ye)*ee,(1-.5+se+ue-.05)*z,(.5-we+ye-.02)*ee,(.5+we+ue)*z,(.5-se+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+ue)*z,(.5+ye)*ee,(.5-we+ue)*z,(.5-se+ye)*ee,(.5-se+ue)*z,(.5-we+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5+se+ye)*ee,(.5-se+ue)*z,(.5+we+ye)*ee,(.5-we+ue)*z,(.5+se+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.6*ee,(.5+we+ue)*z,(.5+se+ye)*ee,(.5+se+ue)*z,(.5+we+ye)*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,ye=.25;return ie.add(new go.PathSegment(go.PathSegment.Move,(ue+se)*z,ye*ee)),ie.add(new go.PathSegment(go.PathSegment.Arc,0,-360,z*ue,ee*ye,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)),ye=.75,ie=new go.PathFigure((ue+se)*z,ye*ee,!0),oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,0,360,z*ue,ee*ye,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,ye=.5,we=new go.PathFigure(ue*z,(ye-se)*ee);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue-se)*z,ye*ee,(ue-ie)*z,(ye-se)*ee,(ue-se)*z,(ye-ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye+se)*ee,(ue-se)*z,(ye+ie)*ee,(ue-ie)*z,(ye+se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,ye*ee,(ue+ie)*z,(ye+se)*ee,(ue+se)*z,(ye+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye-se)*ee,(ue+se)*z,(ye-ie)*ee,(ue+ie)*z,(ye-se)*ee)),se=.4,ie=he*.4;var be=Me(),Ae=Me(),De=Me(),ze=Me();ke(ue,ye-se,ue+ie,ye-se,ue+se,ye-ie,ue+se,ye,.42,be,Ae,De,ze,ze);var Ze=Me(),Ye=Me(),Ge=Me();ke(ue,ye-se,ue+ie,ye-se,ue+se,ye-ie,ue+se,ye,.58,ze,ze,Ge,Ze,Ye);var ft=Me(),at=Me(),Pt=Me();ke(ue,ye+se,ue-ie,ye+se,ue-se,ye+ie,ue-se,ye,.42,ft,at,Pt,ze,ze);var tt=Me(),vt=Me(),st=Me();return ke(ue,ye+se,ue-ie,ye+se,ue-se,ye+ie,ue-se,ye,.58,ze,ze,st,tt,vt),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,ye*ee,tt.x*z,tt.y*ee,vt.x*z,vt.y*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye-se)*ee,(ue-se)*z,(ye-ie)*ee,(ue-ie)*z,(ye-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,De.x*z,De.y*ee,be.x*z,be.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,Pt.x*z,Pt.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,ye*ee,Ze.x*z,Ze.y*ee,Ye.x*z,Ye.y*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye+se)*ee,(ue+se)*z,(ye+ie)*ee,(ue+ie)*z,(ye+se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,Pt.x*z,Pt.y*ee,ft.x*z,ft.y*ee,at.x*z,at.y*ee).close()),me(be),me(Ae),me(De),me(ze),me(Ze),me(Ye),me(Ge),me(ft),me(at),me(Pt),me(tt),me(vt),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 Ln("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,ye=.5,we=Me(),be=Me(),Ae=Me(),De=Me(),ze=new go.PathFigure((ue-se)*z,ye*ee,!1);oe.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye-se)*ee,(ue-se)*z,(ye-ie)*ee,(ue-ie)*z,(ye-se)*ee)),ke(ue,ye-se,ue+ie,ye-se,ue+se,ye-ie,ue+se,ye,.44,Ae,De,be,we,we),ze.add(new go.PathSegment(go.PathSegment.Bezier,be.x*z,be.y*ee,Ae.x*z,Ae.y*ee,De.x*z,De.y*ee));var Ze=Ee(be.x,be.y);ke(ue,ye-se,ue+ie,ye-se,ue+se,ye-ie,ue+se,ye,.56,we,we,be,Ae,De);var Ye=Ee(be.x,be.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,(Ye.x*.1+.9)*z,.15*ee)),ze.add(new go.PathSegment(go.PathSegment.Line,(Ye.x*.1+.9)*z,(Ye.y*.1+.05*.9)*ee)),ze.add(new go.PathSegment(go.PathSegment.Line,Ye.x*z,Ye.y*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,ye*ee,Ae.x*z,Ae.y*ee,De.x*z,De.y*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye+se)*ee,(ue+se)*z,(ye+ie)*ee,(ue+ie)*z,(ye+se)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(ue-se)*z,ye*ee,(ue-ie)*z,(ye+se)*ee,(ue-se)*z,(ye+ie)*ee)),se=.35,ie=he*.35;var Ge=new go.PathFigure(ue*z,(ye-se)*ee,!1);oe.add(Ge),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(ue-se)*z,ye*ee,(ue-ie)*z,(ye-se)*ee,(ue-se)*z,(ye-ie)*ee)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye+se)*ee,(ue-se)*z,(ye+ie)*ee,(ue-ie)*z,(ye+se)*ee)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,ye*ee,(ue+ie)*z,(ye+se)*ee,(ue+se)*z,(ye+ie)*ee)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye-se)*ee,(ue+se)*z,(ye-ie)*ee,(ue+ie)*z,(ye-se)*ee));var ft=new go.PathFigure((ue-se)*z,ye*ee,!1);return oe.add(ft),me(we),me(be),me(Ae),me(De),me(Ze),me(Ye),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,ye=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+ye+se)*z,(.5+ie+ue)*ee,(.5+ie+se)*z,(.5+ye+ue)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5+se)*z,(.5-ie+ue)*ee,(1-.5+ie+se)*z,(.5-ye+ue)*ee,(.5+ye+se)*z,(.5-ie+ue)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+se)*z,(.5+ue)*ee,(.5-ye+se)*z,(.5-ie+ue)*ee,(.5-ie+se)*z,(.5-ye+ue)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.475+se)*z,(.5+ie+ue)*ee,(.5-ie+se)*z,(.5+ye+ue)*ee,(.5-ye+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,ye=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+ye+ue)*ee,(.5+ye+se)*z,(.5+ie+ue)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+se)*z,(.5+ue)*ee,(.5-ye+se)*z,(.5+ie+ue)*ee,(.5-ie+se)*z,(.5+ye+ue)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5+se)*z,(.5-ie+ue)*ee,(.5-ie+se)*z,(.5-ye+ue)*ee,(.5-ye+se)*z,(.5-ie+ue)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+se)*z,(.5+ue)*ee,(.5+ye+se)*z,(.5-ie+ue)*ee,(1-.5+ie+se)*z,(.5-ye+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 Ln("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Ln("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,ye=(.5+ie/2)*ee,we=new go.Geometry,be=new go.PathFigure(0,ue,!0);we.add(be),be.add(new go.PathSegment(go.PathSegment.Line,se,ue)),be.add(new go.PathSegment(go.PathSegment.Line,se,0)),be.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,se,ee)),be.add(new go.PathSegment(go.PathSegment.Line,se,ye)),be.add(new go.PathSegment(go.PathSegment.Line,0,ye).close()),we.spot1=new go.Spot(0,ue/ee);var Ae=Be(0,ye/ee,1,ye/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 Ln("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Ln("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,ye=ue+ie,we=new go.Geometry,be=new go.PathFigure(0,ue,!0);we.add(be),be.add(new go.PathSegment(go.PathSegment.Line,se,ue)),be.add(new go.PathSegment(go.PathSegment.Line,se,0)),be.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,se,ee)),be.add(new go.PathSegment(go.PathSegment.Line,se,ye)),be.add(new go.PathSegment(go.PathSegment.Line,0,ye).close()),we.spot1=new go.Spot(0,ue/ee);var Ae=Be(0,ye/ee,1,ye/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 Ln("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,ye=new go.PathFigure(z,.5*ee,!0);ue.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,se)),ye.add(new go.PathSegment(go.PathSegment.Line,.3*z,se)),ye.add(new go.PathSegment(go.PathSegment.Line,.3*z,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),ye.add(new go.PathSegment(go.PathSegment.Line,.3*z,ie)),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),ye.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 Ln("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Ln("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,ye=(ee-ie)/2,we=ye+ie;(oe>ee||ie>ee)&&(ie>oe?(oe=oe*ee/ie,se=(ee-oe)/2,ue=se+oe,ye=0,we=ee):(se=0,ue=ee,ye=0,we=ee));var be=new go.Geometry,Ae=new go.PathFigure(z,.5*ee,!0);be.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,ye)),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,ye).close());var De=Be(0,.5,.3,ye/ee,0,se/ee,1,se/ee,Me());return be.spot1=new go.Spot(De.x,De.y),De=Be(.7,we/ee,1,.5,0,ue/ee,1,ue/ee,De),be.spot2=new go.Spot(De.x,De.y),me(De),be}),go.Shape.setFigureParameter("IBeamArrow",0,new Ln("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,ye=new go.PathFigure(z,.5*ee,!0);ue.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,se)),ye.add(new go.PathSegment(go.PathSegment.Line,.2*z,se)),ye.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,0,0)),ye.add(new go.PathSegment(go.PathSegment.Line,.2*z,0)),ye.add(new go.PathSegment(go.PathSegment.Line,.2*z,ie)),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),ye.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 Ln("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Ln("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,ye=(ee-ie)/2,we=ye+ie;(oe>ee||ie>ee)&&(ie>oe?(oe=oe*ee/ie,se=(ee-oe)/2,ue=se+oe,ye=0,we=ee):(se=0,ue=ee,ye=0,we=ee));var be=new go.Geometry,Ae=new go.PathFigure(z,.5*ee,!0);be.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,ye)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*z,ye)),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,ye).close()),be.spot1=new go.Spot(0,se/ee);var De=Be(.7,we/ee,1,.5,0,ue/ee,1,ue/ee,Me());return be.spot2=new go.Spot(De.x,De.y),me(De),be}),go.Shape.setFigureParameter("Pointer",0,new Ln("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 Ln("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 Ln("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,ye=new go.PathFigure(z,.5*ee,!0);ue.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,se)),ye.add(new go.PathSegment(go.PathSegment.Line,0,se)),ye.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,0,ie)),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),ye.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 Ln("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,ye=new go.PathFigure(z,.5*ee,!0);ue.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,se)),ye.add(new go.PathSegment(go.PathSegment.Line,0,se)),ye.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,0,ie)),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),ye.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 Ln("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 ye=new go.PathFigure(z,oe,!1);return ie.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,2*oe,1*z,2*oe-he*oe,(.5+se)*z,2*oe)),ye.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 ye=new go.PathFigure(0,ee-oe,!1);return ie.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee-2*oe,0,ee-oe-he*oe,(.5-se)*z,ee-2*oe)),ye.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 ye=new go.PathFigure(oe,0,!1);return ie.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,2*oe,.5*ee,oe+he*oe,0,2*oe,(.5-se)*ee)),ye.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 ye=new go.PathFigure(z-oe,0,!1);return ie.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,z-2*oe,.5*ee,z-oe-he*oe,0,z-2*oe,(.5-se)*ee)),ye.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,ye=he*se,we=.5,be=.1,Ae=new go.PathFigure(we*z,(be+se)*ee,!0);oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(we-ie)*z,be*ee,(we-ue)*z,(be+se)*ee,(we-ie)*z,(be+ye)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(be-se)*ee,(we-ie)*z,(be-ye)*ee,(we-ue)*z,(be-se)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(we+ie)*z,be*ee,(we+ue)*z,(be-se)*ee,(we+ie)*z,(be-ye)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(be+se)*ee,(we+ie)*z,(be+ye)*ee,(we+ue)*z,(be+se)*ee));var De=.05,ze=he*De;we=.05,be=.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,be=.25,Ze.add(new go.PathSegment(go.PathSegment.Bezier,(we+De)*z,be*ee,(we+ze)*z,(be-De)*ee,(we+De)*z,(be-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,be=.35,Ze.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(be-De)*ee,(we+De)*z,(be-ze)*ee,(we+ze)*z,(be-De)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(we-De)*z,be*ee,(we-ze)*z,(be-De)*ee,(we-De)*z,(be-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,be=.7,Ze.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(be-De)*ee,(we+De)*z,(be-ze)*ee,(we+ze)*z,(be-De)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(we-De)*z,be*ee,(we-ze)*z,(be-De)*ee,(we-De)*z,(be-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,be=.35,Ze.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(be-De)*ee,(we+De)*z,(be-ze)*ee,(we+ze)*z,(be-De)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(we-De)*z,be*ee,(we-ze)*z,(be-De)*ee,(we-De)*z,(be-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,be=.25,Ze.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(be-De)*ee,(we-De)*z,(be-ze)*ee,(we-ze)*z,(be-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 Ln("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 ye=new go.PathFigure(z,.1*ee,!1);return oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,z,(.1+se)*ee,(.5+ie)*z,.2*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-ie)*z,.2*ee,0,(.1+se)*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,z,.2*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,z,(.2+se)*ee,(.5+ie)*z,.3*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-ie)*z,.3*ee,0,(.2+se)*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,z,.3*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.4*ee,z,(.3+se)*ee,(.5+ie)*z,.4*ee)),ye.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 ye=new go.PathFigure(z,.1*ee,!1);return oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,z,(.1+se)*ee,(.5+ie)*z,.2*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-ie)*z,.2*ee,0,(.1+se)*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,z,.2*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,z,(.2+se)*ee,(.5+ie)*z,.3*ee)),ye.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 ye=new go.PathFigure(0,ie*ee,!1);return oe.add(ye),ye.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 ye=new go.PathFigure(ie*z,0,!1);return oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),ye.add(new go.PathSegment(go.PathSegment.Move,0,se*ee)),ye.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,ye=.5,we=new go.PathFigure(z,ye*ee,!0);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,ye*z,ee,z,(ye+ue)*ee,(ye+ue)*z,ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,ye*ee,(ye-ue)*z,ee,0,(ye+ue)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ye*z,0,0,(ye-ue)*ee,(ye-ue)*z,0)),we.add(new go.PathSegment(go.PathSegment.Bezier,z,ye*ee,(ye+ue)*z,0,z,(ye-ue)*ee));var be=new go.PathFigure((se+ie)*z,(se+ie)*ee,!1);return oe.add(be),be.add(new go.PathSegment(go.PathSegment.Line,se*z,se*ee)),be.add(new go.PathSegment(go.PathSegment.Move,se*z,(se+ie)*ee)),be.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 ye=new go.PathFigure(.5*ie*z,ie*ee,!1);return oe.add(ye),ye.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 ye=new go.PathFigure(z,.5*ee,!1);return oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,.5*z,ee)),ye.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 ye=new go.PathFigure(z,se*ee,!1);oe.add(ye),ye.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,ye=.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 be=new go.PathFigure((ue+se)*z,ye*ee,!0);return oe.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye+se)*ee,(ue+se)*z,(ye+ie)*ee,(ue+ie)*z,(ye+se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(ue-se)*z,ye*ee,(ue-ie)*z,(ye+se)*ee,(ue-se)*z,(ye+ie)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye-se)*ee,(ue-se)*z,(ye-ie)*ee,(ue-ie)*z,(ye-se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,ye*ee,(ue+ie)*z,(ye-se)*ee,(ue+se)*z,(ye-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,ye=.1,we=.9,be=.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+ye)*z,be*ee,!0);return oe.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(be+ye)*ee,(we+ye)*z,(be+ue)*ee,(we+ue)*z,(be+ye)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,(we-ye)*z,be*ee,(we-ue)*z,(be+ye)*ee,(we-ye)*z,(be+ue)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(be-ye)*ee,(we-ye)*z,(be-ue)*ee,(we-ue)*z,(be-ye)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,(we+ye)*z,be*ee,(we+ue)*z,(be-ye)*ee,(we+ye)*z,(be-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,ye=.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,(ye+se)*ee,(ue+se)*z,(ye+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,(ye-ie)*ee,.7*z,(ye-se)*ee)),ie=.1,se=he*.1,ue=.9,ye=.5;var be=new go.PathFigure((ue-ie)*z,ye*ee,!0);return oe.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye-ie)*ee,(ue-ie)*z,(ye-se)*ee,(ue-se)*z,(ye-ie)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,ye*ee,(ue+se)*z,(ye-ie)*ee,(ue+ie)*z,(ye-se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye+ie)*ee,(ue+ie)*z,(ye+se)*ee,(ue+se)*z,(ye+ie)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,ye*ee,(ue-se)*z,(ye+ie)*ee,(ue-ie)*z,(ye+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,ye=.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,(ye-ie)*ee,.8*z,(ye-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.8*z,(ye+se)*ee,(ue+se+se)*z,(ye+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,ye=.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 be=new go.PathFigure(.8*z,.5*ee,!0);oe.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,ee,.7*z,(ye+se)*ee,(ue+se)*z,(ye+ie)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*ee,.45*z,.25*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(ue+se)*z,(ye-ie)*ee,.7*z,(ye-se)*ee)),ie=.1,se=he*.1,ue=.9,ye=.5;var Ae=new go.PathFigure((ue-ie)*z,ye*ee,!0);return oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye-ie)*ee,(ue-ie)*z,(ye-se)*ee,(ue-se)*z,(ye-ie)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,ye*ee,(ue+se)*z,(ye-ie)*ee,(ue+ie)*z,(ye-se)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye+ie)*ee,(ue+ie)*z,(ye+se)*ee,(ue+se)*z,(ye+ie)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,ye*ee,(ue-se)*z,(ye+ie)*ee,(ue-ie)*z,(ye+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,ye=.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 be=new go.PathFigure(.2*z,0,!0);return oe.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(ue+se)*z,(ye-ie)*ee,.9*z,(ye-se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,ee,.9*z,(ye+se)*ee,(ue+se)*z,(ye+ie)*ee)),be.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,ye=.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,ye=.5,we=new go.PathFigure((ue-se)*z,ye*ee,!1);return oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye-se)*ee,(ue-se)*z,(ye-ie)*ee,(ue-ie)*z,(ye-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,ye*ee,(ue+ie)*z,(ye-se)*ee,(ue+se)*z,(ye-ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye+se)*ee,(ue+se)*z,(ye+ie)*ee,(ue+ie)*z,(ye+se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue-se)*z,ye*ee,(ue-ie)*z,(ye+se)*ee,(ue-se)*z,(ye+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Move,(ue-se+.1)*z,ye*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se-.1)*z,ye*ee,ue*z,(ye-se)*ee,ue*z,(ye+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,ye=.8,we=0,be=.5,Ae=(ie-z)/2,De=(se-ee)/2,ze=new go.PathFigure(we*z+Ae,(be+ye)*ee+De,!0);oe.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,(we-ye)*z+Ae,be*ee+De,(we-ue)*z+Ae,(be+ye)*ee+De,(we-ye)*z+Ae,(be+ue)*ee+De)),ze.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(be-ye)*ee+De,(we-ye)*z+Ae,(be-ue)*ee+De,(we-ue)*z+Ae,(be-ye)*ee+De)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(we-ye+ue*.5)*z+Ae,be*ee+De,we*z+Ae,(be-ye)*ee+De,(we-ye+ue*.5)*z+Ae,(be-ue)*ee+De)),ze.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(be+ye)*ee+De,(we-ye+ue*.5)*z+Ae,(be+ue)*ee+De,we*z+Ae,(be+ye)*ee+De).close()),ue=he*.4,ye=.4,we=.2,be=.5;var Ze=new go.PathFigure(we*z+Ae,(be+ye)*ee+De,!0);oe.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(we-ye)*z+Ae,be*ee+De,(we-ue)*z+Ae,(be+ye)*ee+De,(we-ye)*z+Ae,(be+ue)*ee+De)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(be-ye)*ee+De,(we-ye)*z+Ae,(be-ue)*ee+De,(we-ue)*z+Ae,(be-ye)*ee+De)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(we-ye+ue*.5)*z+Ae,be*ee+De,we*z+Ae,(be-ye)*ee+De,(we-ye+ue*.5)*z+Ae,(be-ue)*ee+De)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(be+ye)*ee+De,(we-ye+ue*.5)*z+Ae,(be+ue)*ee+De,we*z+Ae,(be+ye)*ee+De).close()),ue=he*.2,ye=.2,we=.5,be=.5;var Ye=new go.PathFigure((we-ye)*z+Ae,be*ee+De,!0);oe.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(be-ye)*ee+De,(we-ye)*z+Ae,(be-ue)*ee+De,(we-ue)*z+Ae,(be-ye)*ee+De)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(we+ye)*z+Ae,be*ee+De,(we+ue)*z+Ae,(be-ye)*ee+De,(we+ye)*z+Ae,(be-ue)*ee+De)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(be+ye)*ee+De,(we+ye)*z+Ae,(be+ue)*ee+De,(we+ue)*z+Ae,(be+ye)*ee+De)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(we-ye)*z+Ae,be*ee+De,(we-ue)*z+Ae,(be+ye)*ee+De,(we-ye)*z+Ae,(be+ue)*ee+De)),ue=he*.4,ye=.4,we=.8,be=.5;var Ge=new go.PathFigure(we*z+Ae,(be-ye)*ee+De,!0);oe.add(Ge),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(we+ye)*z+Ae,be*ee+De,(we+ue)*z+Ae,(be-ye)*ee+De,(we+ye)*z+Ae,(be-ue)*ee+De)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(be+ye)*ee+De,(we+ye)*z+Ae,(be+ue)*ee+De,(we+ue)*z+Ae,(be+ye)*ee+De)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(we+ye-ue*.5)*z+Ae,be*ee+De,we*z+Ae,(be+ye)*ee+De,(we+ye-ue*.5)*z+Ae,(be+ue)*ee+De)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(be-ye)*ee+De,(we+ye-ue*.5)*z+Ae,(be-ue)*ee+De,we*z+Ae,(be-ye)*ee+De).close()),ue=he*.8,ye=.8,we=1,be=.5;var ft=new go.PathFigure(we*z+Ae,(be-ye)*ee+De,!0);return oe.add(ft),ft.add(new go.PathSegment(go.PathSegment.Bezier,(we+ye)*z+Ae,be*ee+De,(we+ue)*z+Ae,(be-ye)*ee+De,(we+ye)*z+Ae,(be-ue)*ee+De)),ft.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(be+ye)*ee+De,(we+ye)*z+Ae,(be+ue)*ee+De,(we+ue)*z+Ae,(be+ye)*ee+De)),ft.add(new go.PathSegment(go.PathSegment.Bezier,(we+ye-ue*.5)*z+Ae,be*ee+De,we*z+Ae,(be+ye)*ee+De,(we+ye-ue*.5)*z+Ae,(be+ue)*ee+De)),ft.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(be-ye)*ee+De,(we+ye-ue*.5)*z+Ae,(be-ue)*ee+De,we*z+Ae,(be-ye)*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 ye=new go.PathFigure(0,.5*ee,!1);return oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,.75*z,.5*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.75*z,.6*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,.25*z,.5*ee)),ye.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,ye=.5,we=Me(),be=Me(),Ae=Me(),De=Me();ke(ue,ye-se,ue+ie,ye-se,ue+se,ye-ie,ue+se,ye,.5,we,we,be,Ae,De);var ze=Ee(be.x,be.y),Ze=new go.PathFigure(be.x*z,be.y*ee,!0);oe.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,ye*ee,Ae.x*z,Ae.y*ee,De.x*z,De.y*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye+se)*ee,(ue+se)*z,(ye+ie)*ee,(ue+ie)*z,(ye+se)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ue-se)*z,ye*ee,(ue-ie)*z,(ye+se)*ee,(ue-se)*z,(ye+ie)*ee)),ke(ue-se,ye,ue-se,ye-ie,ue-ie,ye-se,ue,ye-se,.5,Ae,De,be,we,we),Ze.add(new go.PathSegment(go.PathSegment.Bezier,be.x*z,be.y*ee,Ae.x*z,Ae.y*ee,De.x*z,De.y*ee)),ie=he*.3,se=.3,ke(ue-se,ye,ue-se,ye-ie,ue-ie,ye-se,ue,ye-se,.5,Ae,De,be,we,we),Ze.add(new go.PathSegment(go.PathSegment.Line,be.x*z,be.y*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ue-se)*z,ye*ee,De.x*z,De.y*ee,Ae.x*z,Ae.y*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye+se)*ee,(ue-se)*z,(ye+ie)*ee,(ue-ie)*z,(ye+se)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,ye*ee,(ue+ie)*z,(ye+se)*ee,(ue+se)*z,(ye+ie)*ee)),ke(ue,ye-se,ue+ie,ye-se,ue+se,ye-ie,ue+se,ye,.5,we,we,be,Ae,De),Ze.add(new go.PathSegment(go.PathSegment.Bezier,be.x*z,be.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(be),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,ye,we){ue.add(new go.PathSegment(go.PathSegment.Move,(.3+ye)*z,(.8+we)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.5+ye)*z,(.5+we)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.1+ye)*z,(.5+we)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.3+ye)*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,ye=ie*he,we=.4*Math.SQRT2/2+.5,be=.5-.5*Math.SQRT2/2,Ae=1,De=.5,ze=.5,Ze=0,Ye=new go.PathFigure(we*z,(1-be)*ee,!1);return oe.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,De*ee,Ae*z,.7*ee,Ae*z,De*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(ze+se)*z,(Ze+se)*ee,(.5+ie+se)*z,(.5-ye+se)*ee,(.5+ye+se)*z,(.5-ie+se)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+se)*z,(.5+ue)*ee,(.5-ye+se)*z,(.5-ie+ue)*ee,(.5-ie+se)*z,(.5-ye+ue)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(.35+se)*z,.9*ee,(.5-ie+se)*z,(.5+ye+ue)*ee,(.5-ye+se)*z,.9*ee)),Ye.add(new go.PathSegment(go.PathSegment.Move,(.25+se)*z,.8*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,(.35+se)*z,.9*ee)),Ye.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,ye=.5,we=ue,be=Math.PI/4,Ae=4*(1-Math.cos(be))/(3*Math.sin(be)),De=Ae*.5,ze=ue,Ze=ue,Ye=Ae*ze,Ge=Ae*Ze;se.add(new go.PathSegment(go.PathSegment.Bezier,(ye-ze)*z,we*ee,(ye-(Ye+ze)/2)*z,(we+(Ze+Ge)/2)*ee,(ye-ze)*z,(we+Ge)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,ye*z,(we-Ze)*ee,(ye-ze)*z,(we-Ge)*ee,(ye-Ye)*z,(we-Ze)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(ye+ze)*z,we*ee,(ye+Ye)*z,(we-Ze)*ee,(ye+ze)*z,(we-Ge)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*z,(1-.595)*ee,(ye+ze)*z,(we+Ge)*ee,(ye+(Ye+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 ye=new go.PathFigure(ie*z,0,!1);return oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ie*z,.15*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,ie*z,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,ie*z,.85*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,0,ie*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.15*z,ie*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,z,ie*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.85*z,ie*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,ie*z,ie*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.58*z,.1*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,ie*z,ie*ee)),ye.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,ye=he*.1,we=.2,be=.9,Ae=new go.PathFigure((we-ue)*z,be*ee,!0);oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(be-ue)*ee,(we-ue)*z,(be-ye)*ee,(we-ye)*z,(be-ue)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(we+ue)*z,be*ee,(we+ye)*z,(be-ue)*ee,(we+ue)*z,(be-ye)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(be+ue)*ee,(we+ue)*z,(be+ye)*ee,(we+ye)*z,(be+ue)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(we-ue)*z,be*ee,(we-ye)*z,(be+ue)*ee,(we-ue)*z,(be+ye)*ee).close()),ue=.1,ye=he*.1,we=.8,be=.9;var De=new go.PathFigure((we-ue)*z,be*ee,!0);return oe.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(be-ue)*ee,(we-ue)*z,(be-ye)*ee,(we-ye)*z,(be-ue)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,(we+ue)*z,be*ee,(we+ye)*z,(be-ue)*ee,(we+ue)*z,(be-ye)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(be+ue)*ee,(we+ue)*z,(be+ye)*ee,(we+ye)*z,(be+ue)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,(we-ue)*z,be*ee,(we-ye)*z,(be+ue)*ee,(we-ue)*z,(be+ye)*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 ye=new go.PathFigure(.5*z,.7*ee,!1);oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee));var we=.1,be=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-be)*ee,(Ae-be)*z,(De-we)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+we)*z,De*ee,(Ae+be)*z,(De-we)*ee,(Ae+we)*z,(De-be)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(De+we)*ee,(Ae+we)*z,(De+be)*ee,(Ae+be)*z,(De+we)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ae-we)*z,De*ee,(Ae-be)*z,(De+we)*ee,(Ae-we)*z,(De+be)*ee)),we=.1,be=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-be)*ee,(Ae-be)*z,(De-we)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+we)*z,De*ee,(Ae+be)*z,(De-we)*ee,(Ae+we)*z,(De-be)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(De+we)*ee,(Ae+we)*z,(De+be)*ee,(Ae+be)*z,(De+we)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ae-we)*z,De*ee,(Ae-be)*z,(De+we)*ee,(Ae-we)*z,(De+be)*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,ye=new go.PathFigure((ze-Ae)*z,Ze*ee,!0);oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,ze*z,(Ze-Ae)*ee,(ze-Ae)*z,(Ze-De)*ee,(ze-De)*z,(Ze-Ae)*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,(ze+Ae)*z,Ze*ee,(ze+De)*z,(Ze-Ae)*ee,(ze+Ae)*z,(Ze-De)*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ze*z,(Ze+Ae)*ee,(ze+Ae)*z,(Ze+De)*ee,(ze+De)*z,(Ze+Ae)*ee)),ye.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,be=new go.PathFigure((ze-Ae)*z,Ze*ee,!0);oe.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,ze*z,(Ze-Ae)*ee,(ze-Ae)*z,(Ze-De)*ee,(ze-De)*z,(Ze-Ae)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(ze+Ae)*z,Ze*ee,(ze+De)*z,(Ze-Ae)*ee,(ze+Ae)*z,(Ze-De)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,ze*z,(Ze+Ae)*ee,(ze+Ae)*z,(Ze+De)*ee,(ze+De)*z,(Ze+Ae)*ee)),be.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,Ye=new go.PathFigure((ze-Ae)*z,Ze*ee,!0);oe.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Bezier,ze*z,(Ze-Ae)*ee,(ze-Ae)*z,(Ze-De)*ee,(ze-De)*z,(Ze-Ae)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(ze+Ae)*z,Ze*ee,(ze+De)*z,(Ze-Ae)*ee,(ze+Ae)*z,(Ze-De)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,ze*z,(Ze+Ae)*ee,(ze+Ae)*z,(Ze+De)*ee,(ze+De)*z,(Ze+Ae)*ee)),Ye.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 ye=.05,we=he*.05,be=.35,Ae=.775,De=new go.PathFigure((be-ye)*z,Ae*ee,!0);return oe.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,be*z,(Ae-ye)*ee,(be-ye)*z,(Ae-we)*ee,(be-we)*z,(Ae-ye)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,(be+ye)*z,Ae*ee,(be+we)*z,(Ae-ye)*ee,(be+ye)*z,(Ae-we)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,be*z,(Ae+ye)*ee,(be+ye)*z,(Ae+we)*ee,(be+we)*z,(Ae+ye)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,(be-ye)*z,Ae*ee,(be-we)*z,(Ae+ye)*ee,(be-ye)*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,ye=.7,we=new go.PathFigure((ue-ie)*z,ye*ee,!0);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye-ie)*ee,(ue-ie)*z,(ye-se)*ee,(ue-se)*z,(ye-ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,ye*ee,(ue+se)*z,(ye-ie)*ee,(ue+ie)*z,(ye-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye+ie)*ee,(ue+ie)*z,(ye+se)*ee,(ue+se)*z,(ye+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,ye*ee,(ue-se)*z,(ye+ie)*ee,(ue-ie)*z,(ye+se)*ee));var be=new go.PathFigure(0,.7*ee,!1);return oe.add(be),be.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,ye=.5,we=new go.PathFigure((ue-ie)*z,ye*ee,!0);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye-ie)*ee,(ue-ie)*z,(ye-se)*ee,(ue-se)*z,(ye-ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,ye*ee,(ue+se)*z,(ye-ie)*ee,(ue+ie)*z,(ye-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye+ie)*ee,(ue+ie)*z,(ye+se)*ee,(ue+se)*z,(ye+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,ye*ee,(ue-se)*z,(ye+ie)*ee,(ue-ie)*z,(ye+se)*ee));var be=new go.PathFigure(.15*z,.5*ee,!1);return oe.add(be),be.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,ye=.5,we=new go.PathFigure((ue-ie)*z,ye*ee,!1);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye-ie)*ee,(ue-ie)*z,(ye-se)*ee,(ue-se)*z,(ye-ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,ye*ee,(ue+se)*z,(ye-ie)*ee,(ue+ie)*z,(ye-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye+ie)*ee,(ue+ie)*z,(ye+se)*ee,(ue+se)*z,(ye+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,ye*ee,(ue-se)*z,(ye+ie)*ee,(ue-ie)*z,(ye+se)*ee).close()),ie=.05,se=he*.05,ue=.5,ye=.8;var be=new go.PathFigure((ue-ie)*z,ye*ee,!1);return oe.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye-ie)*ee,(ue-ie)*z,(ye-se)*ee,(ue-se)*z,(ye-ie)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,ye*ee,(ue+se)*z,(ye-ie)*ee,(ue+ie)*z,(ye-se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ye+ie)*ee,(ue+ie)*z,(ye+se)*ee,(ue+se)*z,(ye+ie)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,ye*ee,(ue-se)*z,(ye+ie)*ee,(ue-ie)*z,(ye+se)*ee).close()),be.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,.75*z,.475*ee,.75*z,.225*ee)),be.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 ye=new go.PathFigure(.678*z,.85*ee,!1);oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.678*z,.45*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.874*z,.45*ee)),ye.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 ye=new go.PathFigure(z*.612,ee,!0);oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,z*.612,ee*(1-.184*3))),ye.add(new go.PathSegment(go.PathSegment.Line,z*.796,ee*(1-.184*4))),ye.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 ye=new go.PathFigure(z*.055,.18*ee,!0);oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.18)),ye.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.21)),ye.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 ye=new go.PathFigure(z*(.11+.24133333*1+.028*1),ee*.1,!1);oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),ee*.1)),ye.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),ee*.8)),ye.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 ye=new go.PathFigure(z*.83,0,!1);oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,z*.83,ee*.3)),ye.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*.3)),ye.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 be=new go.PathFigure(z*.78,ee*.05,!1);return oe.add(be),be.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.05)),be.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.25)),be.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,ye=new go.PathFigure(oe,0,!0);return ue.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,z-oe,0)),ye.add(new go.PathSegment(go.PathSegment.Bezier,z,oe,z-ie,0,z,ie)),ye.add(new go.PathSegment(go.PathSegment.Line,z,se-oe)),ye.add(new go.PathSegment(go.PathSegment.Bezier,z-oe,se,z,se-ie,z-ie,se)),ye.add(new go.PathSegment(go.PathSegment.Line,z*.7,se)),ye.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,z*.55,se)),ye.add(new go.PathSegment(go.PathSegment.Line,oe,se)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,se-oe,ie,se,0,se-ie)),ye.add(new go.PathSegment(go.PathSegment.Line,0,oe)),ye.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")},98598:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var Ln={},tn="5.0",Ee={},Me=null,me=!1,Be=!1,ke=null,Pe=!1,Le=null,he=null,Se=0;Se<arguments.length;Se++){var xe=arguments[Se];if(xe!==null)switch(typeof xe){case"number":tn=xe.toFixed(1);break;case"string":xe.match(new RegExp("^[0-9]\\.[0-9]+$"))?tn=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,ye=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};Ln.setHTML5Codebase=function(gt,Bt){he=gt,ut(gt,Bt)},Ln.setJavaCodebase=Ln.setJavaCodebaseVersion=Ln.isCompiledInstalled=Ln.setPreCompiledScriptPath=Ln.setPreCompiledResourcePath=function(){},Ln.setHTML5CodebaseVersion=function(gt,Bt){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,et(gt,Bt)},Ln.getHTML5CodebaseVersion=function(){return ce},Ln.getParameters=function(){return Ee},Ln.setFontsCSSURL=function(gt){ue=gt},Ln.setGiacJSURL=function(gt){},Ln.setJNLPFile=function(gt){ge=gt},Ln.setJNLPBaseDir=function(gt){},Ln.inject=function(){function gt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Bt="auto",Ht=Ee.id,hn,Qt=!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)$/)?Bt=Wt:Ht=arguments[bn]):typeof Wt=="boolean"?Qt=Wt:Wt instanceof HTMLElement&&(hn=Wt)}Kt();function Kt(){if(!Pe){setTimeout(Kt,200);return}Bt=jt(Bt);var Jt=hn||document.getElementById(Ht);if(!Jt){console.log("possibly bug on ajax loading? ");return}if(Ln.removeExistingApplet(Jt,!1),Ee.width===void 0&&Jt.clientWidth&&(Ee.width=Jt.clientWidth),Ee.height===void 0&&Jt.clientHeight&&(Ee.height=Jt.clientHeight),!(Ee.width&&Ee.height)&&Bt==="html5"&&(delete Ee.width,delete Ee.height),de=Bt,Bt==="screenshot")at(Jt,Ee);else{var dn=!1;Ee.hasOwnProperty("playButton")&&Ee.playButton||Ee.hasOwnProperty("clickToLoad")&&Ee.clickToLoad?dn=!0:Ee.hasOwnProperty("playButtonAutoDecide")&&Ee.playButtonAutoDecide&&(dn=(!be()||gt())&&Ae()),dn?(de="screenshot",tt(Jt,Ee,Qt,Bt)):ft(Jt,Ee,Qt)}}};function be(){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}Ln.getViews=function(){return Me},Ln.isJavaInstalled=function(){return!1};var De=function(gt){var Bt=function(bn){var Wt=JSON.parse(bn),Kt=function(Lt){return Lt.type=="G"||Lt.type=="E"},Jt=Wt.elements?Wt.elements.filter(Kt)[0]:Wt;if(!Jt||!Jt.url){Ht();return}Ee.fileName=Jt.url,ze(Jt.settings||{}),Me.is3D=!0;var dn="https://www.geogebra.org/images/";Ln.setPreviewImage(oe||Jt.previewUrl,dn+"GeoGebra_loading.png",dn+"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",Qt="/materials/"+Ee.material_id+"?scope=basic";Ze("https://"+hn+"/api/proxy.php?path="+encodeURIComponent(Qt),Bt,Ht)};function ze(gt){var Bt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Ht){gt[Ht]=!!gt[Ht]}),Bt.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,Bt,Ht){var hn=new XMLHttpRequest;hn.open("GET",gt),hn.onload=function(){Bt(hn.responseText)},hn.onerror=Ht,hn.send()}Ln.isHTML5Installed=function(){return!0},Ln.getLoadedAppletType=function(){return de},Ln.setPreviewImage=function(gt,Bt,Ht){oe=gt,ie=Bt,se=Ht},Ln.removeExistingApplet=function(gt,Bt){var Ht;typeof gt=="string"&&(gt=document.getElementById(gt)),de=null;var hn=null;for(Ht=0;Ht<gt.childNodes.length;Ht++){var Qt=gt.childNodes[Ht],bn=Qt.className;bn==="applet_screenshot"?Bt?(Qt.style.display="block",de="screenshot"):Qt.style.display="none":bn!=="applet_scaler prerender"&&(gt.removeChild(Qt),hn=bn&&bn.indexOf("appletParameters")!=-1?Qt.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)},Ln.refreshHitPoints=function(){if(we(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var gt=Ln.getAppletObject();return gt&&typeof gt.recalculateEnvironments=="function"?(gt.recalculateEnvironments(),!0):!1},Ln.startAnimation=function(){var gt=Ln.getAppletObject();return gt&&typeof gt.startAnimation=="function"?(gt.startAnimation(),!0):!1},Ln.stopAnimation=function(){var gt=Ln.getAppletObject();return gt&&typeof gt.stopAnimation=="function"?(gt.stopAnimation(),!0):!1},Ln.getAppletObject=function(){var gt=Ee.id!==void 0?Ee.id:"ggbApplet";return window[gt]},Ln.resize=function(){};var Ye=function(gt,Bt,Ht){var hn=document.createElement("param");hn.setAttribute("name",Bt),hn.setAttribute("value",Ht),gt.appendChild(hn)},Ge=function(gt){return gt&>!=="false"},ft=function(gt,Bt,Ht){we(ce)<=4.2&&(Ht=!0);var hn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==ce||ggbHTML5LoadedCodebaseIsWebSimple&&!ee)&&(hn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Qt=document.createElement("div");Qt.classList.add("appletParameters","notranslate");var bn=Bt.width,Wt=Bt.height;if(Bt.disableAutoScale=Bt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Bt.disableAutoScale,Bt.width!==void 0)if(we(ce)<=4.4)Ge(Bt.showToolBar)&&(Bt.height-=7),Ge(Bt.showAlgebraInput)&&(Bt.height-=37),Bt.width<605&&Ge(Bt.showToolBar)&&(Bt.width=605,bn=605);else{var Kt=100;(Ge(Bt.showToolBar)||Ge(Bt.showMenuBar))&&(Bt.hasOwnProperty("customToolBar")&&(Bt.customToolbar=Bt.customToolBar),Kt=Ge(Bt.showMenuBar)?245:155),bn<Kt&&(Bt.width=Kt,bn=Kt)}Qt.style.border="none",Qt.style.display="inline-block";for(var Jt in Bt)Bt.hasOwnProperty(Jt)&&Jt!=="appletOnLoad"&&Qt.setAttribute("data-param-"+Jt,Bt[Jt]);ue&&Qt.setAttribute("data-param-fontscssurl",ue),Ln.resize=function(){GGBAppletUtils.responsiveResize(gt,Bt)},window.addEventListener("resize",function(Ne){Ln.resize()});var dn=typeof Bt.appletOnLoad=="function"?Bt.appletOnLoad:function(){};if(!Ht&&Bt.width!==void 0){Bt.hasOwnProperty("showSplash")||Qt.setAttribute("data-param-showSplash","false");var Lt=gt.querySelector(".applet_scaler.prerender"),pt=Lt!==null;if(pt)var Rt=Lt.querySelector(".ggb_preview");else{var Rt=st(bn,Wt,Bt.borderColor,!1);Lt=document.createElement("div"),Lt.className="applet_scaler",Lt.style.position="relative",Lt.style.display="block",Lt.style.width=bn+"px",Lt.style.height=Wt+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Lt,"66%"),we(ce)>=5?(Bt.appletOnLoad=function(Ne){var $e=gt.querySelector(".ggb_preview");$e&&$e.parentNode.removeChild($e),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Lt),window.GGBT_wsf_view&&$(window).trigger("resize"),dn(Ne)},pt||Lt.appendChild(Rt)):Qt.appendChild(Rt),Lt.appendChild(Qt),pt||gt.appendChild(Lt),setTimeout(function(){Ln.resize()},1)}else{var St=document.createElement("div");St.className="applet_scaler",St.style.position="relative",St.style.display="block",St.appendChild(Qt),gt.appendChild(St),Bt.appletOnLoad=function(Ne){Ln.resize(),dn(Ne)}}function yt(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){yt(dt.article,dt.params)}),html5AppletsToProcess=null)},we(ce)<5&&(Ne.className+=" geogebraweb")):yt(Ne,$e)}if(hn){scriptLoadStarted=!0;for(var He=0;He<Qt.childNodes.length;He++){var Ie=Qt.childNodes[He].tagName;Ie==="TABLE"&&(Qt.removeChild(Qt.childNodes[He]),He--)}if(ggbHTML5LoadedScript!==null){var We=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');We!=null&&We.parentNode.removeChild(We)}var Oe=document.createElement("script"),Ce=function(){nt(Qt,Bt)};Oe.src=le+z,ggbHTML5LoadedCodebaseIsWebSimple=ee,ggbHTML5LoadedCodebaseVersion=ce,ggbHTML5LoadedScript=Oe.src,mt("GeoGebra HTML5 codebase loaded: '"+le+"'.",Bt),!he&&(!Le||Le=="5.0")?(ee?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Ce()):le.requirejs?__webpack_require__.e(7374).then(function(){var Ne=[__webpack_require__(97374)];Ce.apply(null,Ne)}.bind(this)).catch(__webpack_require__.oe):(Oe.onload=Ce,gt.appendChild(Oe))}else nt(Qt,Bt);Bt.height=Wt,Bt.width=bn},at=function(gt,Bt,Ht){var hn=st(Bt.width,Bt.height,Bt.borderColor,Ht),Qt=document.createElement("div");Qt.style.position="relative",Qt.style.display="block",Qt.style.width=Bt.width+"px",Qt.style.height=Bt.height+"px",Qt.className="applet_screenshot applet_scaler"+(Ht?" applet_screenshot_play":""),Qt.appendChild(hn);var bn=GGBAppletUtils.getScale(Bt,gt,Ht);Ht?(gt.appendChild(vt()),window.GGBT_wsf_view||(gt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Qt,"66%"),gt.appendChild(Qt),bn!==1&&!isNaN(bn)&&(GGBAppletUtils.scaleElement(Qt,bn),Qt.style.width=Bt.width+"px",Qt.style.height=Bt.height+"px",Qt.parentNode.style.width=Bt.width*bn+"px",Qt.parentNode.style.height=Bt.height*bn+"px"),Ln.resize=function(){Pt(gt,hn,Qt,Ht)},window.addEventListener("resize",function(Wt){Ln.resize()}),Ln.resize()};function Pt(gt,Bt,Ht,hn){if(gt.contains(Bt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(gt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(gt)}var Qt=GGBAppletUtils.getScale(Ee,gt,hn);Ht.parentNode!==null&&(!isNaN(Qt)&&Qt!==1?(GGBAppletUtils.scaleElement(Ht,Qt),Ht.parentNode.style.width=Ee.width*Qt+"px",Ht.parentNode.style.height=Ee.height*Qt+"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()}}Ln.onExitFullscreen=function(gt,Bt){Bt.appendChild(gt)};var tt=function(gt,Bt,Ht,hn){at(gt,Bt,!0);for(var Qt=function(){var Kt=[];for(Wt=0;Wt<gt.childNodes.length;Wt++)Kt.push(gt.childNodes[Wt]);if(window.GGBT_wsf_view){var Jt=window.GGBT_wsf_view.renderFullScreen(gt,Bt.id),dn=document.getElementById("fullscreencontainer"),Lt=jQuery(gt).find(".fullscreencontent");Lt.length>0?(Jt.remove(),Lt.attr("id","fullscreencontent").show(),jQuery(dn).append(Lt),window.dispatchEvent(new Event("resize"))):ft(Jt,Bt,!1),window.GGBT_wsf_view.launchFullScreen(dn)}else de=hn,ft(gt,Bt,!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",Qt,!1),bn[Wt].addEventListener("ontouchstart",Qt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(gt),Ae()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},vt=function(){var gt=document.createElement("div");if(gt.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Bt='.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=Bt:Ht.appendChild(document.createTextNode(Bt)),document.getElementsByTagName("head")[0].appendChild(Ht)}return gt},st=function(gt,Bt,Ht,hn){var Qt=document.createElement("div");Qt.className="ggb_preview",Qt.style.position="absolute",Qt.style.zIndex="90",Qt.style.width=gt-2+"px",Qt.style.height=Bt-2+"px",Qt.style.top="0px",Qt.style.left="0px",Qt.style.overflow="hidden",Qt.style.backgroundColor="white";var bn="lightgrey";Ht!==void 0&&(Ht==="none"?bn="transparent":bn=Ht),Qt.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,Jt,dn;if(!hn){Kt=document.createElement("img"),Kt.style.position="absolute",Kt.style.zIndex="1001",Kt.style.opacity=1,Wt.style.opacity=.3,Jt=360,Jt>gt/4*3&&(Jt=gt/4*3),dn=Jt/5.8,Kt.setAttribute("src",ie),Kt.setAttribute("width",Jt),Kt.setAttribute("height",dn);var Lt=(gt-Jt)/2,pt=(Bt-dn)/2;Kt.style.left=Lt+"px",Kt.style.top=pt+"px",Qt.appendChild(Kt)}}return Qt.appendChild(Wt),Qt},jt=function(gt){return gt=gt.toLowerCase(),gt==="html5"||gt==="screenshot"?gt:"html5"},lt=["web","webSimple","web3d","tablet","tablet3d","phone"],et=function(gt,Bt){if(ce=gt,Bt){ut(ce,!0);return}var Ht=!me;if(Ht){var hn=we(ce);!isNaN(hn)&&hn<4.4&&(Ht=!1)}var Qt,bn;window.location.protocol.substr(0,4)==="http"?Qt=window.location.protocol:Qt="http:";var Wt=ce.indexOf("//");Wt>0?bn=ce:Wt===0?bn=Qt+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,Bt){if(gt.requirejs){le=gt;return}gt.slice(-1)!=="/"&&(gt+="/"),le=gt,Bt===null&&(Bt=gt.indexOf("http")===-1),ve=Bt,z="web.nocache.js",ee=!1;var Ht=le.split("/");Ht.length>1&&(!Bt&&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."),et("5.0",Bt))},mt=function(gt,Bt){window.console&&window.console.log&&(!Bt||typeof Bt.showLogging=="undefined"||Bt.showLogging&&Bt.showLogging!=="false")&&console.log(gt)};Ee.material_id!==void 0?De(_t):_t();function _t(){var gt=tn;Le!==null?gt=Le:parseFloat(gt)<5&&(gt="5.0"),et(gt,!1),he!==null&&ut(he,ve),Pe=!0}return Ln},GGBAppletUtils=function(){"use strict";function Ln(){return window.GGBT_wsf_edit!==void 0}function tn(Pe,Le){Le!=1?(Pe.style.transformOrigin="0% 0% 0px",Pe.style.webkitTransformOrigin="0% 0% 0px",Pe.style.transform="scale("+Le+","+Le+")",Pe.style.webkitTransform="scale("+Le+","+Le+")",Pe.style.maxWidth="initial",Pe.querySelector(".ggb_preview")!==null&&(Pe.querySelector(".ggb_preview").style.maxWidth="initial"),Pe.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Pe.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Pe.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Pe.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Pe.style.transform="none",Pe.style.webkitTransform="none")}function Ee(Pe,Le,he,Se,xe,ge){var le=null;if(ge!=null&&ge!="")for(var ve=Pe.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(Se?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),Pe){var ue=Pe.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(Pe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var ye=Pe.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ee=40,se=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ee=0,se=40)}}return Pe&&((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(Pe,Le,he,Se,xe){if(Pe.isScreenshoGenerator)return 1;var ge=Se!==void 0&&Se,le=Pe.noScaleMargin!=null&&Pe.noScaleMargin,ve=function(ye){return ye&&ye!=="false"},de=ve(Pe.autoHeight),ce=Ee(Le,Pe.width,he,de,ge&&window.GGBT_wsf_view||le,xe),z=parseInt(ce.width),ee=Pe.width,oe=Pe.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(Pe,Le,he){var Se=1,xe,ge=!1;if(Pe.hasOwnProperty("allowUpscale")&&(ge=Pe.allowUpscale),Pe.hasOwnProperty("scale")&&(Se=parseFloat(Pe.scale),(isNaN(Se)||Se===null||Se===0)&&(Se=1),Se>1&&(ge=!0)),Le&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ge=!0),!(Pe.hasOwnProperty("disableAutoScale")&&Pe.disableAutoScale))xe=Me(Pe,Le,ge,he,Pe.scaleContainerClass);else return Se;return ge&&(!Pe.hasOwnProperty("scale")||Se===1)?xe:Math.min(Se,xe)}function Be(Pe){var Le=Math.min(window.innerWidth,document.documentElement.clientWidth),he=Math.min(window.innerHeight,document.documentElement.clientHeight),Se=Pe.getBoundingClientRect(),xe=(Le-Se.width)/2,ge=(he-Se.height)/2;ge<0&&(ge=0),Pe.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(xe<40?Pe.style.left="40px":Pe.style.left=xe+"px",Pe.style.top=ge+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ge<40?Pe.style.top="40px":Pe.style.top=ge+"px",Pe.style.left=xe+"px")}function ke(Pe,Le){var he=Pe.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(Pe)}if(he.parentElement&&/fullscreen/.test(he.parentElement.className))return;var Se=me(Le,Pe);Ln()&&he.setAttribute("data-param-scale",Se);for(var xe=null,ge=0;ge<Pe.childNodes.length;ge++)if(Pe.childNodes[ge].className!==void 0&&Pe.childNodes[ge].className.match(/^applet_scaler/)){xe=Pe.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(Se)&&Se!==1?(xe.parentNode.style.width=Le.width*Se+"px",xe.parentNode.style.height=Le.height*Se+"px",tn(xe,Se)):(tn(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(Pe),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(he).parents(".content-added-content"))}}return{responsiveResize:ke,isFlexibleWorksheetEditor:Ln,positionCenter:Be,getScale:me,scaleElement:tn}}();__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 Ln=n.location.search;return Ln.indexOf(J)!=-1||Ln.indexOf(K)!=-1}function q(Ln,tn){}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(Ln){var tn=s[L].bindings;s[L].bindings=function(){for(var Ee=tn?tn():{},Me=Ln[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 Ln=o.createElement(Q);if(Ln.id=L,Ln.style.cssText=R+S,Ln.tabIndex=-1,o.body.appendChild(Ln),t=Ln.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var tn=document.compatMode==U?V:W;t.write(tn+X),t.close()}}}function w(Ln){function tn(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),Pe&&clearInterval(Pe)}}o.addEventListener&&o.addEventListener(Z,ke,!1);var Pe=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)}tn(function(){Ee(Ln)})}webModule.__startLoadingFragment=function(Ln){return C(Ln)},webModule.__installRunAsyncCode=function(Ln){var tn=u(),Ee=tn.body,Me=tn.createElement(_);Me.language=ab,Me.text=Ln,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(Ln){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Ln){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Ln){var tn=c[Ln];return tn==null?null:tn},r=d,webModule.__errFn=e}function B(){function Ln(Pe){var Le=Pe.lastIndexOf(rb);Le==-1&&(Le=Pe.length);var he=Pe.indexOf(sb);he==-1&&(he=Pe.length);var Se=Pe.lastIndexOf(tb,Math.min(he,Le));return Se>=O?Pe.substring(O,Se+P):W}function tn(Pe){if(!Pe.match(/^\w+:\/\//)){var Le=o.createElement(ub);Le.src=Pe+vb,Pe=Ln(Le.src)}return Pe}function Ee(){var Pe=__gwt_getMetaProperty(wb);return Pe!=null?Pe:W}function Me(){for(var Pe=o.getElementsByTagName(_),Le=O;Le<Pe.length;++Le)if(Pe[Le].src.indexOf(xb)!=-1)return Ln(Pe[Le].src);return W}function me(){var Pe=o.getElementsByTagName(yb);return Pe.length>O?Pe[Pe.length-P].href:W}function Be(){var Pe=o.location;return Pe.href==Pe.protocol+zb+Pe.host+Pe.pathname+Pe.search+Pe.hash}var ke=Ee();return ke==W&&(ke=Me()),ke==W&&(ke=me()),ke==W&&Be()&&(ke=Ln(o.location.href)),ke=tn(ke),ke}function C(Ln){return Ln.match(/^\//)||Ln.match(/^[a-zA-Z]+:\/\//)?Ln:webModule.__moduleBase+Ln}function D(){var Ln=[],tn=O,Ee=[],Me=[];function me(Pe){var Le=Me[Pe](),he=Ee[Pe];if(Le in he)return Le;var Se=[];for(var xe in he)Se[he[xe]]=xe;throw r&&r(Pe,Se,Le),null}if(__gwt_isKnownPropertyValue=function(Pe,Le){return Le in Ee[Pe]},webModule.__getPropMap=function(){var Pe={};for(var Le in Ee)Ee.hasOwnProperty(Le)&&(Pe[Le]=me(Le));return Pe},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&&(tn=parseInt(Be.substring(ke+P),$),Be=Be.substring(O,ke))}catch(Pe){}return webModule.__softPermutationId=tn,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})()},58788:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Ax:function(){return ke},Ds:function(){return Pe},KI:function(){return he},SI:function(){return Be},f1:function(){return me}});var Me=Ee(10148);function me(Se){let xe=!0;if(Se.length>0){for(let ge=0;ge<Se.length;ge++)if(Se[ge].compile_success==0||!Se[ge].compile_success){xe=!1;break}}else xe=!1;return xe}function Be(Se,xe=""){let ge=[];for(let le=0;le<Se.length;le++){let ve=Se[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(Se,xe,ge){for(let le=0;le<Se.length;le++){let ve=Se[le];if(ve.key===xe){ve.children=ge;break}ve.children&&ke(ve.children,xe,ge)}return Se}function Pe(Se,xe,ge){let le;return function(){let ve=this,de=arguments,ce=function(){le=null,ge||Se.apply(ve,de)},z=ge&&!le;clearTimeout(le),le=setTimeout(ce,xe),z&&Se.apply(ve,de)}}const Le=!0,he=Me.Z.API_SERVER},65983:function(Ln,tn,Ee){"use strict";Ee.d(tn,{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),Pe=Ee(71418);var Le=function(Oe,Ce){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,Ce)};function he(Oe,Ce){function Ne(){this.constructor=Oe}Le(Oe,Ce),Oe.prototype=Ce===null?Object.create(Ce):(Ne.prototype=Ce.prototype,new Ne)}function Se(Oe,Ce,Ne,$e){return new(Ne||(Ne=Promise))(function(dt,Je){function Tt(rn){try{yn($e.next(rn))}catch(pn){Je(pn)}}function qt(rn){try{yn($e.throw(rn))}catch(pn){Je(pn)}}function yn(rn){var pn;rn.done?dt(rn.value):(pn=rn.value,pn instanceof Ne?pn:new Ne(function(Fn){Fn(pn)})).then(Tt,qt)}yn(($e=$e.apply(Oe,Ce||[])).next())})}function xe(Oe,Ce){var Ne,$e,dt,Je,Tt={label:0,sent:function(){if(1&dt[0])throw dt[1];return dt[1]},trys:[],ops:[]};return Je={next:qt(0),throw:qt(1),return:qt(2)},typeof Symbol=="function"&&(Je[Symbol.iterator]=function(){return this}),Je;function qt(yn){return function(rn){return function(pn){if(Ne)throw new TypeError("Generator is already executing.");for(;Tt;)try{if(Ne=1,$e&&(dt=2&pn[0]?$e.return:pn[0]?$e.throw||((dt=$e.return)&&dt.call($e),0):$e.next)&&!(dt=dt.call($e,pn[1])).done)return dt;switch($e=0,dt&&(pn=[2&pn[0],dt.value]),pn[0]){case 0:case 1:dt=pn;break;case 4:return Tt.label++,{value:pn[1],done:!1};case 5:Tt.label++,$e=pn[1],pn=[0];continue;case 7:pn=Tt.ops.pop(),Tt.trys.pop();continue;default:if(dt=Tt.trys,!((dt=dt.length>0&&dt[dt.length-1])||pn[0]!==6&&pn[0]!==2)){Tt=0;continue}if(pn[0]===3&&(!dt||pn[1]>dt[0]&&pn[1]<dt[3])){Tt.label=pn[1];break}if(pn[0]===6&&Tt.label<dt[1]){Tt.label=dt[1],dt=pn;break}if(dt&&Tt.label<dt[2]){Tt.label=dt[2],Tt.ops.push(pn);break}dt[2]&&Tt.ops.pop(),Tt.trys.pop();continue}pn=Ce.call(Oe,Tt)}catch(Fn){pn=[6,Fn],$e=0}finally{Ne=dt=0}if(5&pn[0])throw pn[1];return{value:pn[0]?pn[1]:void 0,done:!0}}([yn,rn])}}}function ge(){for(var Oe=0,Ce=0,Ne=arguments.length;Ce<Ne;Ce++)Oe+=arguments[Ce].length;var $e=Array(Oe),dt=0;for(Ce=0;Ce<Ne;Ce++)for(var Je=arguments[Ce],Tt=0,qt=Je.length;Tt<qt;Tt++,dt++)$e[dt]=Je[Tt];return $e}var le=function(){function Oe(){}return Oe.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Oe.setAttributes=function(Ce,Ne){for(var $e=0,dt=Ne;$e<dt.length;$e++){var Je=dt[$e],Tt=Je[0],qt=Je[1];Ce.setAttribute(Tt,qt)}},Oe.createRect=function(Ce,Ne,$e){var dt=document.createElementNS("http://www.w3.org/2000/svg","rect");return dt.setAttribute("width",Ce.toString()),dt.setAttribute("height",Ne.toString()),$e&&Oe.setAttributes(dt,$e),dt},Oe.createLine=function(Ce,Ne,$e,dt,Je){var Tt=document.createElementNS("http://www.w3.org/2000/svg","line");return Tt.setAttribute("x1",Ce.toString()),Tt.setAttribute("y1",Ne.toString()),Tt.setAttribute("x2",$e.toString()),Tt.setAttribute("y2",dt.toString()),Je&&Oe.setAttributes(Tt,Je),Tt},Oe.createPolygon=function(Ce,Ne){var $e=document.createElementNS("http://www.w3.org/2000/svg","polygon");return $e.setAttribute("points",Ce),Ne&&Oe.setAttributes($e,Ne),$e},Oe.createCircle=function(Ce,Ne){var $e=document.createElementNS("http://www.w3.org/2000/svg","circle");return $e.setAttribute("cx",(Ce/2).toString()),$e.setAttribute("cy",(Ce/2).toString()),$e.setAttribute("r",Ce.toString()),Ne&&Oe.setAttributes($e,Ne),$e},Oe.createEllipse=function(Ce,Ne,$e){var dt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return dt.setAttribute("cx",(Ce/2).toString()),dt.setAttribute("cy",(Ne/2).toString()),dt.setAttribute("rx",(Ce/2).toString()),dt.setAttribute("ry",(Ne/2).toString()),$e&&Oe.setAttributes(dt,$e),dt},Oe.createGroup=function(Ce){var Ne=document.createElementNS("http://www.w3.org/2000/svg","g");return Ce&&Oe.setAttributes(Ne,Ce),Ne},Oe.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Oe.createMarker=function(Ce,Ne,$e,dt,Je,Tt,qt){var yn=document.createElementNS("http://www.w3.org/2000/svg","marker");return Oe.setAttributes(yn,[["id",Ce],["orient",Ne],["markerWidth",$e.toString()],["markerHeight",dt.toString()],["refX",Je.toString()],["refY",Tt.toString()]]),yn.appendChild(qt),yn},Oe.createText=function(Ce){var Ne=document.createElementNS("http://www.w3.org/2000/svg","text");return Ne.setAttribute("x","0"),Ne.setAttribute("y","0"),Ce&&Oe.setAttributes(Ne,Ce),Ne},Oe.createTSpan=function(Ce,Ne){var $e=document.createElementNS("http://www.w3.org/2000/svg","tspan");return $e.textContent=Ce,Ne&&Oe.setAttributes($e,Ne),$e},Oe.createImage=function(Ce){var Ne=document.createElementNS("http://www.w3.org/2000/svg","image");return Ce&&Oe.setAttributes(Ne,Ce),Ne},Oe.createPoint=function(Ce,Ne){var $e=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return $e.x=Ce,$e.y=Ne,$e},Oe.createPath=function(Ce,Ne){var $e=document.createElementNS("http://www.w3.org/2000/svg","path");return $e.setAttribute("d",Ce),Ne&&Oe.setAttributes($e,Ne),$e},Oe}(),ve=function(){function Oe(){}return Oe.addKey=function(Ce){Oe.key=Ce},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(Ce,Ne,$e){var dt=this;return new Promise(function(Je){var Tt=$e!==void 0?$e:document.createElement("canvas");Ce===null&&(dt.markersOnly=!0,dt.naturalSize=!1);var qt=document.createElementNS("http://www.w3.org/2000/svg","svg");qt.setAttribute("xmlns","http://www.w3.org/2000/svg"),qt.setAttribute("width",Ne.width.baseVal.valueAsString),qt.setAttribute("height",Ne.height.baseVal.valueAsString),qt.setAttribute("viewBox","0 0 "+Ne.viewBox.baseVal.width.toString()+" "+Ne.viewBox.baseVal.height.toString()),qt.innerHTML=Ne.innerHTML,dt.naturalSize===!0?(qt.width.baseVal.value=Ce.naturalWidth,qt.height.baseVal.value=Ce.naturalHeight):dt.width!==void 0&&dt.height!==void 0&&(qt.width.baseVal.value=dt.width,qt.height.baseVal.value=dt.height),Tt.width=qt.width.baseVal.value,Tt.height=qt.height.baseVal.value;var yn=qt.outerHTML,rn=Tt.getContext("2d");dt.markersOnly!==!0&&rn.drawImage(Ce,0,0,Tt.width,Tt.height);var pn=window.URL,Fn=new Image(Tt.width,Tt.height);Fn.setAttribute("crossOrigin","anonymous");var kn=new Blob([yn],{type:"image/svg+xml"}),oi=pn.createObjectURL(kn);Fn.onload=function(){rn.drawImage(Fn,0,0),pn.revokeObjectURL(oi);var ri=Tt.toDataURL(dt.imageType,dt.imageQuality);Je(ri)},Fn.src=oi})},Oe}(),ce=function(){},z=function(){function Oe(Ce){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Ce+"_"}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(Ce){return this.styleSheet===void 0&&this.addStyleSheet(),Ce.name=""+this.classNamePrefix+Ce.localName,this.classes.push(Ce),this.styleSheet.sheet.insertRule("."+Ce.name+" {"+Ce.style+"}",this.styleSheet.sheet.cssRules.length),Ce},Oe.prototype.addRule=function(Ce){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Ce),this.styleSheet.sheet.insertRule(Ce.selector+" {"+Ce.style+"}",this.styleSheet.sheet.cssRules.length)},Oe.prototype.addStyleSheet=function(){var Ce;this.styleSheet=document.createElement("style"),((Ce=this.styleSheetRoot)!==null&&Ce!==void 0?Ce: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 Ce;this.styleSheet&&(((Ce=this.styleSheetRoot)!==null&&Ce!==void 0?Ce:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Oe}(),ee=function(Oe,Ce){this.selector=Oe,this.style=Ce},oe=function(Oe,Ce){this.localName=Oe,this.style=Ce},ie=function(){function Oe(Ce,Ne,$e,dt,Je){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Ce,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(Ce){var Ne=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Ce,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 Tt=document.createElement("div");Tt.className=""+Ne.toolbarButtonStyleClass.name,Tt.setAttribute("data-type-name",Je.typeName),Tt.innerHTML=Je.icon,Tt.addEventListener("click",function(){Ne.markerToolbarButtonClicked(Tt,Je)}),Ne.buttons.push(Tt),Ne.markerButtons.push(Tt)}),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(Ce){this.buttonClickListeners.push(Ce)},Oe.prototype.removeButtonClickListener=function(Ce){this.buttonClickListeners.indexOf(Ce)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Ce),1)},Oe.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Oe.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Ce=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<Ce||Ne===Ce&&this.markerButtons.length-1===Ce?this.markerButtonBlock.appendChild(this.markerButtons[Ne]):(Ne===Ce&&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 Ce=this;this.buttons.forEach(function(Ne){Ne.className=Ne.className.replace(Ce.uiStyleSettings.toolbarButtonStyleColorsClassName?Ce.uiStyleSettings.toolbarButtonStyleColorsClassName:Ce.toolbarButtonStyleColorsClass.name,"").trim(),Ne.className=Ne.className.replace(Ce.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Ce.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Ce.toolbarActiveButtonStyleColorsClass.name,"").trim(),Ne.className+=" "+(Ce.uiStyleSettings.toolbarButtonStyleColorsClassName?Ce.uiStyleSettings.toolbarButtonStyleColorsClassName:Ce.toolbarButtonStyleColorsClass.name)})},Oe.prototype.addActionButton=function(Ce,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}Ce.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 Ce=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new oe("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Ce)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Ce)+`px;
|
|
|
padding: `+Ce+`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(Ce,Ne){this.setActiveButton(Ce),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function($e){return $e("marker",Ne)}),this.markerButtonOverflowBlock.style.display="none"},Oe.prototype.actionToolbarButtonClicked=function(Ce,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(Ce){this.resetButtonStyles(),Ce.className=Ce.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Ce.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Oe.prototype.setActiveMarkerButton=function(Ce){var Ne=this.markerButtons.find(function($e){return $e.getAttribute("data-type-name")===Ce});Ne&&this.setActiveButton(Ne)},Oe.prototype.setCurrentMarker=function(Ce){var Ne=this;this.currentMarker=Ce,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(Ce,Ne,$e,dt){this.panels=[],this.panelButtons=[],this.markerjsContainer=Ce,this.displayMode=Ne,this.uiStyleSettings=$e,this.styles=dt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Oe.prototype.addStyles=function(){var Ce;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: `+((Ce=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Ce!==void 0?Ce: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(Ce){var Ne;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Ce,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(Ce){var Ne,$e,dt=this;this.panels=Ce,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 Tt;Je.uiStyleSettings=dt.uiStyleSettings;var qt=document.createElement("div");qt.className=dt.toolboxButtonStyleClass.name+" "+((Tt=dt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Tt!==void 0?Tt:dt.toolboxButtonStyleColorsClass.name),qt.innerHTML=Je.icon,qt.title=Je.title,qt.addEventListener("click",function(){dt.panelButtonClick(Je)}),dt.panelButtons.push(qt),dt.buttonRow.appendChild(qt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Oe.prototype.panelButtonClick=function(Ce){var Ne=this,$e=-1;if(Ce!==this.activePanel){$e=this.panels.indexOf(Ce),this.panelRow.innerHTML="";var dt=Ce.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=Ce}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,Tt){var qt,yn;Je.className=Ne.toolboxButtonStyleClass.name+" "+(Tt===$e?""+((qt=Ne.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&qt!==void 0?qt:Ne.toolboxActiveButtonStyleColorsClass.name):""+((yn=Ne.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&yn!==void 0?yn:Ne.toolboxButtonStyleColorsClass.name))})},Oe}(),ue=function(Oe,Ce){this.title=Oe,this.icon=Ce},ye=function(Oe){function Ce(Ne,$e,dt,Je){var Tt=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 Tt.colors=[],Tt.addTransparent=!1,Tt.colorBoxes=[],Tt.colors=$e,Tt.currentColor=dt,Tt.setCurrentColor=Tt.setCurrentColor.bind(Tt),Tt.getColorBox=Tt.getColorBox.bind(Tt),Tt}return he(Ce,Oe),Ce.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},Ce.prototype.getColorBox=function(Ne){var $e=this,dt=this.uiStyleSettings.toolbarHeight/4,Je=this.uiStyleSettings.toolbarHeight-dt,Tt=document.createElement("div");Tt.style.display="inline-block",Tt.style.boxSizing="content-box",Tt.style.width=Je-2+"px",Tt.style.height=Je-2+"px",Tt.style.padding="1px",Tt.style.marginRight="2px",Tt.style.marginBottom="2px",Tt.style.borderWidth="2px",Tt.style.borderStyle="solid",Tt.style.borderRadius=(Je+2)/2+"px",Tt.style.borderColor=Ne===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Tt.addEventListener("click",function(){$e.setCurrentColor(Ne,Tt)});var qt=document.createElement("div");return qt.style.display="inline-block",qt.style.width=Je-2+"px",qt.style.height=Je-2+"px",qt.style.backgroundColor=Ne,qt.style.borderRadius=Je/2+"px",Ne==="transparent"&&(qt.style.fill=this.uiStyleSettings.toolboxAccentColor,qt.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>`),Tt.appendChild(qt),Tt},Ce.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)},Ce}(ue),we=function(){function Oe(Ce,Ne,$e){this._state="new",this._isSelected=!1,this._container=Ce,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(Ce){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(Ce,Ne){},Oe.prototype.dblClick=function(Ce,Ne){},Oe.prototype.manipulate=function(Ce){},Oe.prototype.pointerUp=function(Ce){this.stateChanged()},Oe.prototype.dispose=function(){},Oe.prototype.addMarkerVisualToContainer=function(Ce){this.container.childNodes.length>0?this.container.insertBefore(Ce,this.container.childNodes[0]):this.container.appendChild(Ce)},Oe.prototype.getState=function(){return{typeName:Oe.typeName,state:this.state,notes:this.notes}},Oe.prototype.restoreState=function(Ce){this._state=Ce.state,this.notes=Ce.notes},Oe.prototype.scale=function(Ce,Ne){},Oe.prototype.colorChanged=function(Ce){this.onColorChanged&&this.onColorChanged(Ce),this.stateChanged()},Oe.prototype.fillColorChanged=function(Ce){this.onFillColorChanged&&this.onFillColorChanged(Ce),this.stateChanged()},Oe.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Ce=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Ce.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Ce)&&this.onStateChanged(this)}},Oe.typeName="MarkerBase",Oe}(),be=function(){function Oe(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Oe.prototype.findGripByVisual=function(Ce){return this.topLeft.ownsTarget(Ce)?this.topLeft:this.topCenter.ownsTarget(Ce)?this.topCenter:this.topRight.ownsTarget(Ce)?this.topRight:this.centerLeft.ownsTarget(Ce)?this.centerLeft:this.centerRight.ownsTarget(Ce)?this.centerRight:this.bottomLeft.ownsTarget(Ce)?this.bottomLeft:this.bottomCenter.ownsTarget(Ce)?this.bottomCenter:this.bottomRight.ownsTarget(Ce)?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(Ce){return Ce===this.visual||Ce===this.visual.childNodes[0]||Ce===this.visual.childNodes[1]},Oe}(),De=function(){function Oe(){}return Oe.toITransformMatrix=function(Ce){return{a:Ce.a,b:Ce.b,c:Ce.c,d:Ce.d,e:Ce.e,f:Ce.f}},Oe.toSVGMatrix=function(Ce,Ne){return Ce.a=Ne.a,Ce.b=Ne.b,Ce.c=Ne.c,Ce.d=Ne.d,Ce.e=Ne.e,Ce.f=Ne.f,Ce},Oe}(),ze=function(Oe){function Ce(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(Ce,Oe),Object.defineProperty(Ce.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.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}),Ce.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))},Ce.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 Tt=this.container.transform.baseVal.getItem(0);Tt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Tt,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Ce.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)},Ce.prototype.moveVisual=function(Ne){this.visual.style.transform="translate("+Ne.x+"px, "+Ne.y+"px)"},Ce.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)},Ce.prototype.resize=function(Ne){var $e=this.manipulationStartLeft,dt=this.manipulationStartWidth,Je=this.manipulationStartTop,Tt=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,Tt=this.manipulationStartHeight+this.manipulationStartTop-Je;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Tt=this.manipulationStartHeight+Ne.y-this.manipulationStartY}dt>=0?(this.left=$e,this.width=dt):(this.left=$e+dt,this.width=-dt),Tt>=0?(this.top=Je,this.height=Tt):(this.top=Je+Tt,this.height=-Tt),this.setSize()},Ce.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Ce.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()}},Ce.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)},Ce.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}},Ce.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}},Ce.prototype.select=function(){Oe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Ce.prototype.deselect=function(){Oe.prototype.deselect.call(this),this.controlBox.style.display="none"},Ce.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 be,this.addControlGrips(),this.controlBox.style.display="none"},Ce.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()},Ce.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()},Ce.prototype.createGrip=function(){var Ne=new Ae;return Ne.visual.transform.baseVal.appendItem(le.createTransform()),this.controlBox.appendChild(Ne.visual),Ne},Ce.prototype.positionGrips=function(){var Ne=this.controlGrips.topLeft.GRIP_SIZE,$e=-Ne/2,dt=$e,Je=(this.width+this.CB_DISTANCE)/2-Ne/2,Tt=(this.height+this.CB_DISTANCE)/2-Ne/2,qt=this.height+this.CB_DISTANCE-Ne/2,yn=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,yn,dt),this.positionGrip(this.controlGrips.centerLeft.visual,$e,Tt),this.positionGrip(this.controlGrips.centerRight.visual,yn,Tt),this.positionGrip(this.controlGrips.bottomLeft.visual,$e,qt),this.positionGrip(this.controlGrips.bottomCenter.visual,Je,qt),this.positionGrip(this.controlGrips.bottomRight.visual,yn,qt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Je,dt-3*this.CB_DISTANCE)},Ce.prototype.positionGrip=function(Ne,$e,dt){var Je=Ne.transform.baseVal.getItem(0);Je.setTranslate($e,dt),Ne.transform.baseVal.replaceItem(Je,0)},Ce.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Ce.prototype.showControlBox=function(){this.controlBox.style.display=""},Ce.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))},Ce.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))},Ce.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()},Ce}(we),Ze=function(Oe){function Ce(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(Ce,Oe),Ce.prototype.ownsTarget=function(Ne){return!(!Oe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual)},Ce.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)},Ce.prototype.pointerDown=function(Ne,$e){Oe.prototype.pointerDown.call(this,Ne,$e),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},Ce.prototype.manipulate=function(Ne){Oe.prototype.manipulate.call(this,Ne)},Ce.prototype.resize=function(Ne){Oe.prototype.resize.call(this,Ne),this.setSize()},Ce.prototype.setSize=function(){Oe.prototype.setSize.call(this),le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Ce.prototype.pointerUp=function(Ne){Oe.prototype.pointerUp.call(this,Ne),this.setSize()},Ce.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.visual&&le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ne),this.stateChanged()},Ce.prototype.setFillColor=function(Ne){this.fillColor=Ne,this.visual&&le.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Ce.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.visual&&le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ce.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.visual&&le.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Ce.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))},Ce.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()},Ce.prototype.scale=function(Ne,$e){Oe.prototype.scale.call(this,Ne,$e),this.setSize()},Ce.title="Rectangle marker",Ce}(ze),Ye=function(Oe){function Ce(Ne,$e,dt,Je){var Tt=Oe.call(this,Ne,Je||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Tt.widths=[],Tt.widthBoxes=[],Tt.widths=$e,Tt.currentWidth=dt,Tt.setCurrentWidth=Tt.setCurrentWidth.bind(Tt),Tt}return he(Ce,Oe),Ce.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 Tt=document.createElement("div");Tt.innerText=dt.toString(),Tt.style.marginRight="5px",Je.appendChild(Tt);var qt=document.createElement("div");qt.style.minHeight="20px",qt.style.flexGrow="2",qt.style.display="flex",qt.style.alignItems="center";var yn=document.createElement("hr");yn.style.minWidth="20px",yn.style.border="0px",yn.style.borderTop=dt+"px solid "+Ne.uiStyleSettings.toolboxColor,yn.style.flexGrow="2",qt.appendChild(yn),Je.appendChild(qt),Ne.widthBoxes.push(Je)}),$e},Ce.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)},Ce}(ue),Ge=function(Oe){function Ce(Ne,$e,dt,Je){var Tt=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 Tt.styles=[],Tt.styleBoxes=[],Tt.styles=$e,Tt.currentStyle=dt,Tt.setCurrentStyle=Tt.setCurrentStyle.bind(Tt),Tt}return he(Ce,Oe),Ce.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 Tt=document.createElement("div");Tt.style.minHeight="20px",Tt.style.flexGrow="2",Tt.style.overflow="hidden";var qt=`<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>`;Tt.innerHTML=qt,Je.appendChild(Tt),Ne.styleBoxes.push(Je)}),$e},Ce.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)},Ce}(ue),ft=function(Oe){function Ce(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 ye("Line color",dt.defaultColorSet,dt.defaultColor),Je.strokePanel.onColorChanged=Je.setStrokeColor,Je.strokeWidthPanel=new Ye("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(Ce,Oe),Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Ne=Oe.prototype.getState.call(this);return Ne.typeName=Ce.typeName,Ne},Ce.typeName="FrameMarker",Ce.title="Frame marker",Ce.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Ce}(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"},Pt=function(Oe){function Ce(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(Ce,Oe),Ce.prototype.ownsTarget=function(Ne){return!!Oe.prototype.ownsTarget.call(this,Ne)||!(!this.grip1.ownsTarget(Ne)&&!this.grip2.ownsTarget(Ne))},Ce.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")},Ce.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)},Ce.prototype.adjustVisual=function(){},Ce.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)},Ce.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()},Ce.prototype.select=function(){Oe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Ce.prototype.deselect=function(){Oe.prototype.deselect.call(this),this.controlBox.style.display="none"},Ce.prototype.setupControlBox=function(){this.controlBox=le.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Ce.prototype.adjustControlBox=function(){this.positionGrips()},Ce.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Ce.prototype.createGrip=function(){var Ne=new Ae;return Ne.visual.transform.baseVal.appendItem(le.createTransform()),this.controlBox.appendChild(Ne.visual),Ne},Ce.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)},Ce.prototype.positionGrip=function(Ne,$e,dt){var Je=Ne.transform.baseVal.getItem(0);Je.setTranslate($e,dt),Ne.transform.baseVal.replaceItem(Je,0)},Ce.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Oe.prototype.getState.call(this))},Ce.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},Ce.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()},Ce}(we),tt=function(Oe){function Ce(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 ye("Line color",dt.defaultColorSet,dt.defaultColor),Je.strokePanel.onColorChanged=Je.setStrokeColor,Je.strokeWidthPanel=new Ye("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(Ce,Oe),Ce.prototype.ownsTarget=function(Ne){return!(!Oe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.selectorLine&&Ne!==this.visibleLine)},Ce.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)},Ce.prototype.pointerDown=function(Ne,$e){Oe.prototype.pointerDown.call(this,Ne,$e),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Ce.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()]]))},Ce.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.adjustVisual(),this.colorChanged(Ne)},Ce.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.adjustVisual()},Ce.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Ne=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Oe.prototype.getState.call(this));return Ne.typeName=Ce.typeName,Ne},Ce.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()},Ce.typeName="LineMarker",Ce.title="Line marker",Ce.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Ce}(Pt),vt=function(Oe){function Ce(Ne,$e,dt,Je){var Tt=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 Tt.fonts=[],Tt.fontBoxes=[],Tt.fonts=$e,Tt.currentFont=dt,Tt.setCurrentFont=Tt.setCurrentFont.bind(Tt),Tt}return he(Ce,Oe),Ce.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 Tt=document.createElement("div");Tt.style.display="flex",Tt.style.minHeight="20px",Tt.style.flexGrow="2",Tt.style.fontFamily=dt,Tt.style.overflow="hidden";var qt=document.createElement("div");qt.style.whiteSpace="nowrap",qt.style.overflow="hidden",qt.style.textOverflow="ellipsis",qt.innerHTML="The quick brown fox jumps over the lazy dog",Tt.appendChild(qt),Je.appendChild(Tt),Ne.fontBoxes.push(Je)}),$e},Ce.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)},Ce}(ue),st=function(Oe){function Ce(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 ye("Color",dt.defaultColorSet,dt.defaultColor),Je.colorPanel.onColorChanged=Je.setColor,Je.fontFamilyPanel=new vt("Font",dt.defaultFontFamilies,dt.defaultFontFamily),Je.fontFamilyPanel.onFontChanged=Je.setFont,Je}return he(Ce,Oe),Ce.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},Ce.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()},Ce.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")},Ce.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)}},Ce.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},Ce.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}},Ce.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))},Ce.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)},Ce.prototype.resize=function(Ne){Oe.prototype.resize.call(this,Ne),this.isMoved=!0,this.setSize(),this.sizeText()},Ce.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()]]))},Ce.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},Ce.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")},Ce.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"}},Ce.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()},Ce.prototype.select=function(){Oe.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Ce.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Oe.prototype.deselect.call(this)},Ce.prototype.dblClick=function(Ne,$e){Oe.prototype.dblClick.call(this,Ne,$e),this.showTextEditor()},Ce.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)},Ce.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()},Ce.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Ce.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Ce.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=Ce.typeName,Ne},Ce.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()},Ce.prototype.scale=function(Ne,$e){Oe.prototype.scale.call(this,Ne,$e),this.setSize(),this.sizeText(),this.positionTextEditor()},Ce.typeName="TextMarker",Ce.title="Text marker",Ce.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>',Ce}(ze),jt=function(Oe){function Ce(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 ye("Color",dt.defaultColorSet,dt.defaultColor),Je.colorPanel.onColorChanged=Je.setColor,Je.lineWidthPanel=new Ye("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),Je.lineWidthPanel.onWidthChanged=Je.setLineWidth,Je}return he(Ce,Oe),Ce.prototype.ownsTarget=function(Ne){return!(!Oe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.drawingImage)},Ce.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)},Ce.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)},Ce.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)},Ce.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()]])},Ce.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)},Ce.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)},Ce.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Oe.prototype.select.call(this)},Ce.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Oe.prototype.deselect.call(this)},Ce.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],Tt=$e[2],qt=$e[3],yn=!1,rn=0;rn<this.canvasElement.height;rn++)for(var pn=0;pn<this.canvasElement.width;pn++)Ne.data[rn*this.canvasElement.width*4+4*pn+3]>0&&(yn=!0,rn<Je&&(Je=rn),pn<dt&&(dt=pn),rn>qt&&(qt=rn),pn>Tt&&(Tt=pn));if(yn){this.left=dt/this.pixelRatio,this.top=Je/this.pixelRatio,this.width=(Tt-dt)/this.pixelRatio,this.height=(qt-Je)/this.pixelRatio;var Fn=document.createElement("canvas");Fn.width=Tt-dt,Fn.height=qt-Je,Fn.getContext("2d").putImageData(this.canvasContext.getImageData(dt,Je,Tt-dt,qt-Je),0,0),this.drawingImgUrl=Fn.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Ce.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})},Ce.prototype.setColor=function(Ne){this.color=Ne,this.colorChanged(Ne)},Ce.prototype.setLineWidth=function(Ne){this.lineWidth=Ne},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Ne=Object.assign({drawingImgUrl:this.drawingImgUrl},Oe.prototype.getState.call(this));return Ne.typeName=Ce.typeName,Ne},Ce.prototype.restoreState=function(Ne){this.createVisual(),Oe.prototype.restoreState.call(this,Ne),this.drawingImgUrl=Ne.drawingImgUrl,this.setDrawingImage()},Ce.prototype.scale=function(Ne,$e){Oe.prototype.scale.call(this,Ne,$e),this.setDrawingImage()},Ce.typeName="FreehandMarker",Ce.title="Freehand marker",Ce.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>',Ce}(ze),lt=function(Oe){function Ce(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(Ce,Oe),Ce.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(qt){var yn="both";switch(qt){case 0:yn="both";break;case 1:yn="start";break;case 2:yn="end";break;case 3:yn="none"}var rn=document.createElement("div");if(rn.style.display="flex",rn.style.flexGrow="2",rn.style.alignItems="center",rn.style.justifyContent="space-between",rn.style.padding="5px",rn.style.borderWidth="2px",rn.style.borderStyle="solid",rn.style.borderColor=yn===Je.currentType?Je.uiStyleSettings.toolboxAccentColor:"transparent",rn.addEventListener("click",function(){Ne.setCurrentType(yn,rn)}),$e.appendChild(rn),yn==="both"||yn==="start"){var pn=document.createElement("div");pn.style.display="flex",pn.style.alignItems="center",pn.style.minHeight="20px",pn.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>`,pn.style.marginLeft="5px",rn.appendChild(pn)}var Fn=document.createElement("div");Fn.style.display="flex",Fn.style.alignItems="center",Fn.style.minHeight="20px",Fn.style.flexGrow="2";var kn=document.createElement("hr");if(kn.style.minWidth="20px",kn.style.border="0px",kn.style.borderTop="3px solid "+(Je.uiStyleSettings!==void 0?Je.uiStyleSettings.toolboxColor:"#eeeeee"),kn.style.flexGrow="2",Fn.appendChild(kn),rn.appendChild(Fn),yn==="both"||yn==="end"){var oi=document.createElement("div");oi.style.display="flex",oi.style.alignItems="center",oi.style.minHeight="20px",oi.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>`,oi.style.marginRight="5px",rn.appendChild(oi)}Je.typeBoxes.push(rn)},Je=this,Tt=0;Tt<4;Tt++)dt(Tt);return $e},Ce.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)},Ce}(ue),et=function(Oe){function Ce(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(Ce,Oe),Ce.prototype.ownsTarget=function(Ne){return!(!Oe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.arrow1&&Ne!==this.arrow2)},Ce.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)},Ce.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)},Ce.prototype.pointerDown=function(Ne,$e){Oe.prototype.pointerDown.call(this,Ne,$e),this.state==="creating"&&this.createTips()},Ce.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)}},Ce.prototype.setArrowType=function(Ne){this.arrowType=Ne,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Ne=Object.assign({arrowType:this.arrowType},Oe.prototype.getState.call(this));return Ne.typeName=Ce.typeName,Ne},Ce.prototype.restoreState=function(Ne){Oe.prototype.restoreState.call(this,Ne);var $e=Ne;this.arrowType=$e.arrowType,this.createTips(),this.adjustVisual()},Ce.typeName="ArrowMarker",Ce.title="Arrow marker",Ce.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Ce}(tt),ut=function(Oe){function Ce(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.fillColor=dt.defaultFillColor,Je.strokeWidth=0,Je.fillPanel=new ye("Color",dt.defaultColorSet,dt.defaultFillColor),Je.fillPanel.onColorChanged=Je.setFillColor,Je}return he(Ce,Oe),Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Ne=Oe.prototype.getState.call(this);return Ne.typeName=Ce.typeName,Ne},Ce.typeName="CoverMarker",Ce.title="Cover marker",Ce.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Ce}(Ze),mt=function(Oe){function Ce(Ne,$e,dt,Je){var Tt=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 Tt.opacities=[],Tt.opacityBoxes=[],Tt.opacities=$e,Tt.currentOpacity=dt,Tt.setCurrentOpacity=Tt.setCurrentOpacity.bind(Tt),Tt}return he(Ce,Oe),Ce.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 Tt=document.createElement("div");Tt.innerText=100*dt+"%",Je.appendChild(Tt),Ne.opacityBoxes.push(Je)}),$e},Ce.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)},Ce}(ue),_t=function(Oe){function Ce(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 ye("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(Ce,Oe),Ce.prototype.setOpacity=function(Ne){this.opacity=Ne,this.visual&&le.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Ne=Oe.prototype.getState.call(this);return Ne.typeName=Ce.typeName,Ne},Ce.typeName="HighlightMarker",Ce.title="Highlight marker",Ce.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>',Ce}(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>',Bt='<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 Ce(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 ye("Text color",dt.defaultColorSet,Je.color,gt),Je.colorPanel.onColorChanged=Je.setColor,Je.bgColorPanel=new ye("Fill color",dt.defaultColorSet,Je.bgColor,Bt),Je.bgColorPanel.onColorChanged=Je.setBgColor,Je.fontFamilyPanel=new vt("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(Ce,Oe),Ce.prototype.ownsTarget=function(Ne){return Oe.prototype.ownsTarget.call(this,Ne)||this.tipGrip.ownsTarget(Ne)||this.tip===Ne},Ce.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)},Ce.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)},Ce.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()}},Ce.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)},Ce.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)},Ce.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},Ce.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})},Ce.prototype.resize=function(Ne){Oe.prototype.resize.call(this,Ne),this.positionTip()},Ce.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(Ce.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Ce.prototype.select=function(){this.positionTip(),Oe.prototype.select.call(this)},Ce.prototype.getState=function(){var Ne=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Oe.prototype.getState.call(this));return Ne.typeName=Ce.typeName,Ne},Ce.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()},Ce.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()},Ce.typeName="CalloutMarker",Ce.title="Callout marker",Ce.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>',Ce}(st),hn=function(Oe){function Ce(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 ye("Line color",ge(dt.defaultColorSet,["transparent"]),dt.defaultColor),Je.strokePanel.onColorChanged=Je.setStrokeColor,Je.fillPanel=new ye("Fill color",ge(dt.defaultColorSet,["transparent"]),Je.fillColor,Bt),Je.fillPanel.onColorChanged=Je.setFillColor,Je.strokeWidthPanel=new Ye("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(Ce,Oe),Ce.prototype.ownsTarget=function(Ne){return!(!Oe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual)},Ce.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)},Ce.prototype.pointerDown=function(Ne,$e){Oe.prototype.pointerDown.call(this,Ne,$e),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},Ce.prototype.manipulate=function(Ne){Oe.prototype.manipulate.call(this,Ne)},Ce.prototype.resize=function(Ne){Oe.prototype.resize.call(this,Ne),this.setSize()},Ce.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()]])},Ce.prototype.pointerUp=function(Ne){Oe.prototype.pointerUp.call(this,Ne),this.setSize()},Ce.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.visual&&le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ne),this.stateChanged()},Ce.prototype.setFillColor=function(Ne){this.fillColor=Ne,this.visual&&le.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Ne),this.stateChanged()},Ce.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.visual&&le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ce.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.visual&&le.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Ce.prototype.setOpacity=function(Ne){this.opacity=Ne,this.visual&&le.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Ce.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=Ce.typeName,Ne},Ce.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()},Ce.prototype.scale=function(Ne,$e){Oe.prototype.scale.call(this,Ne,$e),this.setSize()},Ce.typeName="EllipseMarker",Ce.title="Ellipse marker",Ce.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>',Ce}(ze),Qt=function(Oe){function Ce(Ne,$e,dt){return Oe.call(this,Ne,$e,dt)||this}return he(Ce,Oe),Object.defineProperty(Ce.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Ce.prototype.ownsTarget=function(Ne){return!(!Oe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.tip1&&Ne!==this.tip2)},Ce.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)},Ce.prototype.pointerDown=function(Ne,$e){Oe.prototype.pointerDown.call(this,Ne,$e),this.state==="creating"&&this.createTips()},Ce.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(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Ne=Oe.prototype.getState.call(this);return Ne.typeName=Ce.typeName,Ne},Ce.prototype.restoreState=function(Ne){Oe.prototype.restoreState.call(this,Ne),this.createTips(),this.adjustVisual()},Ce.typeName="MeasurementMarker",Ce.title="Measurement marker",Ce.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>',Ce}(tt),bn=function(Oe){function Ce(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.strokePanel.colors=dt.defaultColorSet,Je.fillColor="transparent",Je}return he(Ce,Oe),Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Ne=Oe.prototype.getState.call(this);return Ne.typeName=Ce.typeName,Ne},Ce.typeName="EllipseFrameMarker",Ce.title="Ellipse frame marker",Ce.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>',Ce}(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(Ce){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Ce)||(this.undoStack.push(Ce),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Ce)&&this.redoStack.splice(0,this.redoStack.length))},Oe.prototype.replaceLastUndoStep=function(Ce){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Ce)},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 Ce=this.undoStack.pop();return Ce!==void 0&&this.redoStack.push(Ce),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 Ce(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 ye("Line color",dt.defaultColorSet,dt.defaultColor),Je.strokePanel.onColorChanged=Je.setStrokeColor,Je.strokeWidthPanel=new Ye("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(Ce,Oe),Ce.prototype.ownsTarget=function(Ne){return!(!Oe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.selectorCurve&&Ne!==this.visibleCurve&&!this.curveGrip.ownsTarget(Ne))},Ce.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Ce.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)},Ce.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")},Ce.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()]]))},Ce.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)},Ce.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Oe.prototype.addControlGrips.call(this)},Ce.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()))},Ce.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)},Ce.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)},Ce.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.adjustVisual(),this.colorChanged(Ne)},Ce.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.adjustVisual()},Ce.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.adjustVisual()},Ce.prototype.scale=function(Ne,$e){this.curveX=this.curveX*Ne,this.curveY=this.curveY*$e,Oe.prototype.scale.call(this,Ne,$e)},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ce.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=Ce.typeName,Ne},Ce.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()},Ce.typeName="CurveMarker",Ce.title="Curve marker",Ce.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>',Ce}(Pt),Jt=function(Oe){function Ce(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 ye("Line color",ge(dt.defaultColorSet,["transparent"]),Je.strokeColor),Je.strokePanel.onColorChanged=Je.setStrokeColor,Je.fillPanel=new ye("Fill color",ge(dt.defaultColorSet,["transparent"]),Je.fillColor,Bt),Je.fillPanel.onColorChanged=Je.setFillColor,Je.strokeWidthPanel=new Ye("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 vt("Font",dt.defaultFontFamilies,dt.defaultFontFamily),Je.fontFamilyPanel.onFontChanged=Je.setFont,Je.textColorPanel=new ye("Text color",dt.defaultColorSet,Je.textColor,gt),Je.textColorPanel.onColorChanged=Je.setTextColor,Je}return he(Ce,Oe),Ce.prototype.ownsTarget=function(Ne){return!(!Oe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.frame&&Ne!==this.captionBg&&Ne!==this.captionElement)},Ce.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()},Ce.prototype.setCaptionText=function(Ne){this.captionText=Ne,this.captionElement.textContent=this.captionText,this.sizeCaption()},Ce.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")},Ce.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)},Ce.prototype.resize=function(Ne){Oe.prototype.resize.call(this,Ne),this.setSize()},Ce.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')"]])},Ce.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()},Ce.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"))},Ce.prototype.finishTextEditing=function(Ne){this.setCaptionText(Ne.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Ce.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()},Ce.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()},Ce.prototype.setSize=function(){Oe.prototype.setSize.call(this),le.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Ce.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},Ce.prototype.dblClick=function(Ne,$e){Oe.prototype.dblClick.call(this,Ne,$e),this.showTextEditor()},Ce.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.frame&&le.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Ne),this.stateChanged()},Ce.prototype.setFillColor=function(Ne){this.fillColor=Ne,this.captionBg&&le.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Ne),this.stateChanged()},Ce.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.frame&&le.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ce.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.frame&&le.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Ce.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},Ce.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()},Ce.prototype.scale=function(Ne,$e){Oe.prototype.scale.call(this,Ne,$e),this.setSize()},Ce.typeName="CaptionFrameMarker",Ce.title="Caption frame marker",Ce.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>',Ce}(ze),dn=function(){function Oe(Ce,Ne){Ne===void 0&&(Ne=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Ce,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}(),Lt=function(Oe){function Ce(Ne,$e,dt){var Je=Oe.call(this,Ne,!1)||this;return Je.dataUrl=$e,Je.state=dt,Je}return he(Ce,Oe),Ce}(dn),pt=function(Oe){function Ce(Ne,$e,dt){dt===void 0&&(dt=!1);var Je=Oe.call(this,Ne,dt)||this;return Je.marker=$e,Je}return he(Ce,Oe),Ce}(dn),Rt=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(Ce,Ne){this[Ce].push(Ne)},Oe.prototype.removeEventListener=function(Ce,Ne){var $e=this[Ce].indexOf(Ne);$e>-1&&this[Ce].splice($e,1)},Oe}(),St=function(){function Oe(Ce){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 Rt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Oe.instanceCounter++,this.styles=new z(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Ce,this.targetRoot=document.body,this.width=Ce.clientWidth,this.height=Ce.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,jt,et,st,bn,hn,_t,Ht,Qt,ut,tt,Kt,Jt]},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ft,jt,et,st,hn,_t,Ht]},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ft,jt,et,st,_t]},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Ce){var Ne=this;this._availableMarkerTypes.splice(0),Ce.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(Ce){this._zoomLevel=Ce,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 Ce=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 dn(Ce))})},Oe.prototype.render=function(){return Se(this,void 0,void 0,function(){var Ce;return xe(this,function(Ne){switch(Ne.label){case 0:return this.setCurrentMarker(),(Ce=new de).naturalSize=this.renderAtNaturalSize,Ce.imageType=this.renderImageType,Ce.imageQuality=this.renderImageQuality,Ce.markersOnly=this.renderMarkersOnly,Ce.width=this.renderWidth,Ce.height=this.renderHeight,[4,Ce.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Ne.sent(),[4,Ce.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Ne.sent()]}})})},Oe.prototype.close=function(Ce){var Ne=this;if(Ce===void 0&&(Ce=!1),this.isOpen){var $e=!1;Ce||this.eventListeners.beforeclose.forEach(function(dt){var Je=new dn(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 dn(Ne))}),this.detachEvents(),this._isOpen=!1)}},Oe.prototype.addMarkersToToolbar=function(){for(var Ce,Ne=[],$e=0;$e<arguments.length;$e++)Ne[$e]=arguments[$e];(Ce=this._availableMarkerTypes).push.apply(Ce,Ne)},Oe.prototype.addRenderEventListener=function(Ce){this.addEventListener("render",function(Ne){Ce(Ne.dataUrl,Ne.state)})},Oe.prototype.removeRenderEventListener=function(Ce){},Oe.prototype.addCloseEventListener=function(Ce){this.addEventListener("close",function(){Ce()})},Oe.prototype.removeCloseEventListener=function(Ce){},Oe.prototype.setupResizeObserver=function(){var Ce=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Ce.resize(Ce.target.clientWidth,Ce.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Ce.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Oe.prototype.onPopupTargetResize=function(){var Ce=1*this.target.clientWidth/this.target.clientHeight,Ne=this.editorCanvas.clientWidth/Ce>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Ce:this.editorCanvas.clientWidth,$e=Ne<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Ce;this.resize(Ne,$e)},Oe.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Oe.prototype.resize=function(Ce,Ne){this._isResizing=!0;var $e=Ce/this.imageWidth,dt=Ne/this.imageHeight;this.imageWidth=Math.round(Ce),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(Ce,Ne){var $e,dt=this;this._currentMarker&&this._currentMarker instanceof st?this._currentMarker.scale(Ce,Ne):($e=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Je){Je!==dt._currentMarker&&Je.scale(Ce,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 Ce=this.editingTarget.getBoundingClientRect(),Ne=this.editorCanvas.getBoundingClientRect();this.left=Ce.left-Ne.left,this.top=Ce.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 Ce,Ne=[],$e=0;$e<arguments.length;$e++)Ne[$e]=arguments[$e];this.defs=le.createDefs(),this.addDefsToImage(),(Ce=this.defs).append.apply(Ce,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 Ce=document.createElement("a");Ce.href="https://markerjs.com/",Ce.target="_blank",Ce.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>',Ce.title="Powered by marker.js",Ce.style.display="grid",Ce.style.alignItems="center",Ce.style.justifyItems="center",Ce.style.padding="3px",Ce.style.width="20px",Ce.style.height="20px",this.logoUI.appendChild(Ce),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 Ce=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=Ce+"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(Ce){this.markerImage.removeChild(Ce.container),this.markers.indexOf(Ce)>-1&&this.markers.splice(this.markers.indexOf(Ce),1),Ce.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(Ce,Ne){if(Ce==="marker"&&Ne!==void 0)this.createNewMarker(Ne);else if(Ce==="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 Ce=this;if(this._currentMarker!==void 0){var Ne=!1;if(this.eventListeners.markerbeforedelete.forEach(function(dt){var Je=new pt(Ce,Ce._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(Ce,$e))})}}},Oe.prototype.clear=function(){var Ce=this,Ne=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Tt){var qt=new pt(Ce,void 0,!0);Tt(qt),qt.defaultPrevented&&(Ne=!0)}),!Ne)){this.setCurrentMarker();for(var $e=function(Tt){var qt=dt.markers[Tt];dt.setCurrentMarker(dt.markers[Tt]),dt._currentMarker.dispose(),dt.markerImage.removeChild(dt._currentMarker.container),dt.markers.splice(dt.markers.indexOf(dt._currentMarker),1),dt.eventListeners.markerdelete.forEach(function(yn){return yn(new pt(Ce,qt))})},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 Ce;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=(Ce=this._currentMarker.notes)!==null&&Ce!==void 0?Ce:"",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 Ce=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 dn(Ce))})}else this.undoRedoManager.replaceLastUndoStep(Ne),this.eventListeners.statechange.forEach(function(Je){return Je(new dn(Ce))})}},Oe.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Oe.prototype.undoStep=function(){var Ce=this,Ne=this.undoRedoManager.undo();Ne!==void 0&&(this.restoreState(Ne),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function($e){return $e(new dn(Ce))}))},Oe.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Oe.prototype.redoStep=function(){var Ce=this,Ne=this.undoRedoManager.redo();Ne!==void 0&&(this.restoreState(Ne),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function($e){return $e(new dn(Ce))}))},Oe.prototype.stepZoom=function(){var Ce=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Ce<this.zoomSteps.length-1?this.zoomSteps[Ce+1]:this.zoomSteps[0]},Oe.prototype.panTo=function(Ce){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Ce.x,top:this.prevPanPoint.y-Ce.y}),this.prevPanPoint=Ce},Oe.prototype.startRenderAndClose=function(){return Se(this,void 0,void 0,function(){var Ce,Ne,$e=this;return xe(this,function(dt){switch(dt.label){case 0:return[4,this.render()];case 1:return Ce=dt.sent(),Ne=this.getState(),this.eventListeners.render.forEach(function(Je){return Je(new Lt($e,Ce,Ne))}),this.close(!0),[2]}})})},Oe.prototype.getState=function(Ce){Ce===!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(Ce){var Ne=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Ce.markers.forEach(function($e){var dt=Ne._availableMarkerTypes.find(function(Tt){return Tt.typeName===$e.typeName});if(dt!==void 0){var Je=Ne.addNewMarker(dt);Je.restoreState($e),Ne.markers.push(Je)}}),Ce.width&&Ce.height&&(Ce.width!==this.imageWidth||Ce.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Ce.width,this.imageHeight/Ce.height),this.eventListeners.restorestate.forEach(function($e){return $e(new dn(Ne))})},Oe.prototype.addNewMarker=function(Ce){var Ne=le.createGroup();return this.markerImage.appendChild(Ne),new Ce(Ne,this.overlayContainer,this.settings)},Oe.prototype.createNewMarker=function(Ce){var Ne,$e=this;(Ne=typeof Ce=="string"?this._availableMarkerTypes.find(function(dt){return dt.typeName===Ce}):Ce)&&(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(Ce){var Ne=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Ce),this.setCurrentMarker(Ce),Ce instanceof jt&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(jt):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function($e){return $e(new pt(Ne,Ne._currentMarker))})},Oe.prototype.colorChanged=function(Ce){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Ce,this.settings.defaultStrokeColor=Ce)},Oe.prototype.fillColorChanged=function(Ce){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Ce)},Oe.prototype.markerStateChanged=function(Ce){var Ne=this;this.eventListeners.markerchange.forEach(function($e){return $e(new pt(Ne,Ce))})},Oe.prototype.setCurrentMarker=function(Ce){var Ne=this;this._currentMarker!==Ce&&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=Ce,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(Ce){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Ce.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(Ce.target)});Ne!==void 0?(this.setCurrentMarker(Ne),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Ce.clientX,Ce.clientY),Ce.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Ce.clientX,y:Ce.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Ce.clientX,Ce.clientY))},Oe.prototype.onDblClick=function(Ce){if(this._isFocused||this.focus(),this.mode==="select"){var Ne=this.markers.find(function($e){return $e.ownsTarget(Ce.target)});Ne!==void 0&&Ne!==this._currentMarker&&this.setCurrentMarker(Ne),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Ce.clientX,Ce.clientY),Ce.target):this.setCurrentMarker()}},Oe.prototype.onPointerMove=function(Ce){this.touchPoints!==1&&Ce.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Ce.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Ce.clientX,Ce.clientY)):this.zoomLevel>1&&this.panTo({x:Ce.clientX,y:Ce.clientY}))},Oe.prototype.onPointerUp=function(Ce){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Ce.clientX,Ce.clientY)),this.isDragging=!1,this.addUndoStep()},Oe.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Oe.prototype.onKeyUp=function(Ce){this._currentMarker===void 0||this.notesArea!==void 0||Ce.key!=="Delete"&&Ce.key!=="Backspace"||this.deleteSelectedMarker()},Oe.prototype.clientToLocalCoordinates=function(Ce,Ne){var $e=this.markerImage.getBoundingClientRect();return{x:(Ce-$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 Ce=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Ce+"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(Ce){ve.addKey(Ce)},Oe.prototype.addEventListener=function(Ce,Ne){this.eventListeners.addEventListener(Ce,Ne)},Oe.prototype.removeEventListener=function(Ce,Ne){this.eventListeners.removeEventListener(Ce,Ne)},Oe.prototype.renderState=function(Ce){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Ce),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Oe.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Oe.prototype.focus=function(){var Ce=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 dn(Ce))}))},Oe.prototype.blur=function(){var Ce=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Ne){return Ne(new dn(Ce))}))},Oe.instanceCounter=0,Oe}(),yt=Ee(70635),nt=Ee(58130),He=(Oe,Ce,Ne)=>new Promise(($e,dt)=>{var Je=yn=>{try{qt(Ne.next(yn))}catch(rn){dt(rn)}},Tt=yn=>{try{qt(Ne.throw(yn))}catch(rn){dt(rn)}},qt=yn=>yn.done?$e(yn.value):Promise.resolve(yn.value).then(Je,Tt);qt((Ne=Ne.apply(Oe,Ce)).next())}),We=({data:Oe,className:Ce,fullWidth:Ne,style:$e={},onClose:dt,onOk:Je,showFullTools:Tt,noAssociationId:qt})=>{const yn=(0,Me.useRef)(null),rn=(0,Me.useRef)(null),pn=(0,Me.useRef)(null),Fn=(0,Me.useRef)(null),[kn,oi]=(0,Me.useState)(!1),[ri,Ti]=(0,Me.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,Me.useEffect)(()=>{pn.current||(pn.current=document.createElement("style"),document.head.appendChild(pn.current)),Oe!=null&&Oe.visible?(document.body.setAttribute("data-custom","y-hidden"),pn.current.innerHTML=" html { overflow-y: hidden; }",Oe!=null&&Oe.src&&mi()):(document.body.removeAttribute("data-custom"),pn.current&&(document.head.removeChild(pn.current),pn.current=null))},[Oe==null?void 0:Oe.visible]);const mi=()=>He(void 0,null,function*(){oi(!0),Ti("\u6B63\u5728\u52A0\u8F7D\u4E2D");const er=yield(0,nt.ZJ)(Oe==null?void 0:Oe.src);yn.current.src="",yn.current.src=er,yn.current.onload=function(){fr()},oi(!1),Ti("")}),Qi=er=>He(void 0,null,function*(){oi(!0),Ti("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Mr=yield(0,yt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Oe.title,file:er.dataUrl}});Mr!=null&&Mr.id&&!qt?(yield(0,yt.ZP)(`/api/attachments/${Oe.id}/add_subitem.json`,{method:"post",body:{subitem_id:Mr==null?void 0:Mr.id,settings:JSON.stringify(er.state)}})).status===0&&Je():Mr!=null&&Mr.id&&Je(Mr),oi(!1),Ti("")}),ir=()=>{const er=document.querySelector('a[href="https://markerjs.com/"]');er&&er.parentNode&&(er.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(qr=>{const di=document.querySelector(qr.name);di&&di.setAttribute("title",qr.title)})},fr=()=>{rn.current=new St(yn.current),rn.current.targetRoot=Fn.current,rn.current.addEventListener("render",Qi),rn.current.addEventListener("beforeclose",dt),Tt&&(rn.current.availableMarkerTypes=rn.current.ALL_MARKER_TYPES,rn.current.uiStyleSettings.redoButtonVisible=!0,rn.current.uiStyleSettings.notesButtonVisible=!0,rn.current.uiStyleSettings.zoomButtonVisible=!0,rn.current.uiStyleSettings.zoomOutButtonVisible=!0,rn.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=rn.current.uiStyleSettings,rn.current.show(),Oe!=null&&Oe.snapshotData&&rn.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(Pe.Z,{spinning:kn,tip:ri,style:{position:"absolute"}},Me.createElement("div",{ref:Fn,className:ke()(me.imageDimensions,Ce,Ne?me.fullWidth:""),style:$e},Me.createElement("img",{className:me.img,ref:yn}))))}},75890:function(Ln,tn,Ee){"use strict";var Me=Ee(59301),me=Ee(95237),Be=Ee(43604),ke=Ee(99313),Pe=Ee(3113),Le=Ee(25711),he=Ee(93938),Se=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=ye=>{z.current.setValue(z.current.getValue()+" "+ye.value+" ")},se=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:xe.createElement(me.Z,{className:he.Z.lists,gutter:[10,10]},ee.map((ye,we)=>xe.createElement(Be.Z,{flex:"110px",className:he.Z.item},xe.createElement("div",null,xe.createElement(Le.Z,{value:`$$${ye.value}$$`}),ye.name),xe.createElement("div",{className:he.Z.children},ye.children.map((be,Ae)=>xe.createElement("div",{key:Ae},xe.createElement("h1",null,be.name),xe.createElement(me.Z,{gutter:[10,10]},be.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((ye,we)=>xe.createElement(Be.Z,{flex:"110px",className:he.Z.item},xe.createElement("div",null,xe.createElement(Le.Z,{value:"`$$"+ye.value+"$$`"}),ye.name),xe.createElement("div",{className:he.Z.children},ye.children.map((be,Ae)=>xe.createElement("div",{key:Ae},be.name&&xe.createElement("h1",null,be.name),xe.createElement(me.Z,{gutter:[10,10]},be.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 ye=document.createElement("div");ye.innerHTML=z.current.getValue();var we=ye.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(Pe.ZP,{size:"large",onClick:ue,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});tn.Z=ge},97267:function(Ln,tn,Ee){"use strict";var Me=Ee(59301),me=Ee(93314),Be=Ee(3113),ke=Object.defineProperty,Pe=Object.defineProperties,Le=Object.getOwnPropertyDescriptors,he=Object.getOwnPropertySymbols,Se=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={}))Se.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)=>Pe(ce,Le(z));const de=({img:ce,buttonProps:z={},styles:ee={},customText:oe,ButtonText:ie,ButtonClick:se,Buttonclass:ue,ButtonTwo:ye,imgStyles:we,loading:be=!1})=>Me.createElement("section",{className:"tc animated fadeIn",style:le(le({},{color:"#999",margin:"100px auto",visibility:be?"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),ye&&ye);tn.Z=de},79646:function(Ln,tn,Ee){"use strict";Ee.d(tn,{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(63093),Pe=Ee(48551),Le=Ee(6848),he=Ee(58130),Se=Ee(79124),xe=Ee(97267),ge=Ee(10148),le=Ee(63486),ve=Ee(59301),de=Object.defineProperty,ce=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,oe=(ye,we,be)=>we in ye?de(ye,we,{enumerable:!0,configurable:!0,writable:!0,value:be}):ye[we]=be,ie=(ye,we)=>{for(var be in we||(we={}))z.call(we,be)&&oe(ye,be,we[be]);if(ce)for(var be of ce(we))ee.call(we,be)&&oe(ye,be,we[be]);return ye},se=(ye,we,be)=>new Promise((Ae,De)=>{var ze=Ge=>{try{Ye(be.next(Ge))}catch(ft){De(ft)}},Ze=Ge=>{try{Ye(be.throw(Ge))}catch(ft){De(ft)}},Ye=Ge=>Ge.done?Ae(Ge.value):Promise.resolve(Ge.value).then(ze,Ze);Ye((be=be.apply(ye,we)).next())}),ue=({editOffice:ye="view",data:we,theme:be,type:Ae,filename:De,monacoEditor:ze,className:Ze,style:Ye,close:Ge,onClose:ft,hasMask:at,disabledDownload:Pt,onImgDimensions:tt,showNodata:vt,recordInfo:st})=>{const[jt,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"),[et,ut]=(0,Me.useState)(""),[mt,_t]=(0,Me.useState)(),gt=window.ENV==="build"?"/react/build":"",Bt=location.host.startsWith("localhost")?ge.Z.PROXY_SERVER:ge.Z.API_SERVER,hn=10*(1024*1024),Qt=(0,Me.useRef)();we!=null&&we.startsWith("/api")&&Ae!=="txt"&&(we=ge.Z.API_SERVER+we);const bn=dn=>dn.substring(dn.lastIndexOf("/")+1).split(".").pop();De&&ze&&(ze.filename=De),(0,Me.useEffect)(()=>{var dn,Lt;const pt=(Lt=(dn=document.cookie)==null?void 0:dn.replace(/\s/g,""))==null?void 0:Lt.split(";");pt==null||pt.map(Rt=>{let St=Rt.split("=");St[0]==="_educoder_session"&&ut(St[1])})},[]),(0,Me.useEffect)(()=>{Ae==="office"&&(we.indexOf("bigfilescdn.")>-1||we.indexOf("bigfiles1")>-1?_t({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 dn=we;we.startsWith("http")||(dn=location.origin+dn);let Lt=new URL(dn).pathname.split("/").pop();const pt=yield(0,Se.gJ)({attachment_id:Lt});pt.url=Bt+pt.url,_t(pt)}),Kt=()=>{if(we.startsWith("http")||we.startsWith("blob:")){Jt();return}(0,he.Sv)(De||"educoder",we,De)},Jt=()=>{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({},Ye||{}),className:`${at&&me.bgBlack} ${Ae?me.wrp:"hide"}`},Ge&&ve.createElement("div",{className:me.close,ref:Qt},!!tt&&ve.createElement(Le.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Qt.current},ve.createElement("span",{onClick:()=>{ft(),tt()}},ve.createElement("i",{className:"icon-yulanpizhu"}))),!Pt&&ve.createElement(Le.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Qt.current},ve.createElement("span",{onClick:Jt},ve.createElement("i",{className:"icon-quxiaozhiding"}))),ve.createElement(Le.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Qt.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(Pe.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=${Bt+(mt.callbackUrl||"")}&fileType=${mt.fileType}&title=${mt.title||""}&model=${ye}&officeServer=${ge.Z.ONLYOFFICE}&disabledDownload=${!!Pt}`}),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=${!!Pt}`}),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,vt?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:Pt},"\u4E0B\u8F7D")}):ve.createElement(Be.ZP,{type:"primary",size:"middle",onClick:Kt,disabled:Pt},ve.createElement(ke.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},25711:function(Ln,tn,Ee){"use strict";Ee.d(tn,{z:function(){return Ae},Z:function(){return De}});var Me=Ee(59301),me=Ee(1751),Be=Ee(31087),ke=Ee(64018),Pe=Ee(37312),Le=Ee(10148),he=Ee(58130),Se=Ee(15342),xe=Ee(1012),ge=Ee(79646),le=Ee(59301),de=({html:ze})=>{const Ze=(0,Me.useRef)(null),Ye=(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"});Ye.current=document.createElement("div"),Ye.current.className="markdown-body",Ye.current.innerHTML=ze,ft.appendChild(Ye.current);const at=document.createElement("style");return at.textContent=Ge,ft.appendChild(at),()=>{ft.innerHTML=""}},[]),(0,Me.useEffect)(()=>{Ye.current&&(Ye.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,Ye)=>Ze in ze?ce(ze,Ze,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):ze[Ze]=Ye,se=(ze,Ze)=>{for(var Ye in Ze||(Ze={}))ee.call(Ze,Ye)&&ie(ze,Ye,Ze[Ye]);if(z)for(var Ye of z(Ze))oe.call(Ze,Ye)&&ie(ze,Ye,Ze[Ye]);return ze};const ue="@\u2581\u2581@",ye="@\u2581@",we=/<pre[^>]*>/g;function be(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 Ye=/(?: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(Ye,(Pt,tt,vt,st,jt,lt,et)=>{const ut=tt||st||lt,mt=vt||jt||et||"?";return Le.Z.API_SERVER+"/api/attachments/"+ut+mt+"&t="+(0,he.Jn)(ut,Date.now())+(Pt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(ze=ze.replace(at,(Pt,tt,vt,st,jt,lt,et)=>{const ut=tt||st||lt,mt=vt||jt||et||"?";return Le.Z.API_SERVER+"/attachments/download/"+ut+mt+"&t="+(0,he.Jn)(ut,Date.now())+(Pt.indexOf(")")>-1?")":"&")}).replace(Ye,(Pt,tt,vt,st,jt,lt,et)=>{const ut=tt||st||lt,mt=vt||jt||et||"?";return Le.Z.API_SERVER+"/api/attachments/"+ut+mt+"&t="+(0,he.Jn)(ut,Date.now())+(Pt.indexOf(")")>-1?")":"&")}).replace(Ge,(Pt,tt,vt,st,jt)=>{const lt=tt||st,et=vt||jt||"";return'"'+Le.Z.API_SERVER+"/api/attachments/"+lt+et+lt+et+"&t="+(0,he.Jn)(lt,Date.now())}).replace(ft,(Pt,tt,vt,st,jt)=>{const lt=tt||st,et=vt||jt||"";return"("+Le.Z.API_SERVER+"/files/uploads/"+lt+et+lt+et+"&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:Ye,showLines:Ge,style:ft={},stylesPrev:at={},highlightKeywords:Pt,showProgramFill:tt,isProgramFill:vt,disabledFill:st=!1,programFillValue:jt,onFillChange:lt=mt=>{},onFillBlur:et=()=>{},onFillFocus:ut=()=>{}})=>{let mt=String(ze);const[_t,gt]=(0,Me.useState)(""),[Bt,Ht]=(0,Me.useState)("office"),[hn,Qt]=(0,Me.useState)([]),bn=(0,Me.useRef)("a"+(0,xe.Z)()),Wt={},Kt=(Oe,Ce,Ne)=>{const $e=document.createElement(Oe===ye?"input":"textarea");$e.style.width="100%",$e.style.height=Oe===ye?"40px":"151px",$e.rows=5,$e.spellcheck=!1,$e.name="edu-program-fill",$e.placeholder="\u8BF7\u8F93\u5165",$e.dataset.id=Ce;const dt=Object.keys(Wt).length;return Wt[dt]=$e,`<span class="edu-program-fill-wrap ${Oe===ye?"":"show"}" style="width:${Oe===ye?"400px":"100%"}" title=${Ne||""}><span>${$e.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Jt(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 dn=Oe=>Oe.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Ce,Ne){let $e=Ne.replace(/(\n|\r)/g,"").split("}"),dt=[];return $e.map(Je=>{Je!=""&&dt.push(`.${bn.current} ${Je}`)}),`<style>${dt.join("}")}</style>`}),Lt=(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,Tt=/\(\/attachments\/download\//g;mt=mt.replace(Tt,"("+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(tt){let $e=-1;return mt=mt.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(dt,Je,Tt){var qt;return++$e,Kt(dt,$e,(qt=jt==null?void 0:jt[$e])==null?void 0:qt.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${dn(mt||"")}</pre>`}let Oe=dn(mt);Oe=(0,Be.ZP)(Oe);const Ce=(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:Tt}=Ce[dt];return(0,Se.renderToString)(be(Tt)||"",{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,Ye)return Ne.innerText;if(Pt){const $e=Pt.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return yt(Ne,$e),Ne.innerHTML}return setTimeout(()=>Ie(),500),Ne.innerHTML},[mt,Pt]);(0,Me.useEffect)(()=>{nt.current&&nt.current.querySelectorAll(["input","textarea"]).forEach(Ce=>{Ce.oninput=pt,Ce.onblur=Rt,Ce.onfocus=St})},[hn]),(0,Me.useEffect)(()=>{var Oe,Ce,Ne,$e,dt;if(jt!=null&&jt.length)try{const Je=nt.current.querySelectorAll(".edu-program-fill-score"),Tt=nt.current.querySelectorAll('[name="edu-program-fill"]');for(const[qt,yn]of Tt.entries())yn.value=((Oe=jt==null?void 0:jt[qt])==null?void 0:Oe.value)||"",((Ce=jt==null?void 0:jt[qt])==null?void 0:Ce.type)==="warning"?yn.className="program-fill-warning":((Ne=jt==null?void 0:jt[qt])==null?void 0:Ne.type)==="success"?yn.className="program-fill-success":yn.className="";for(const[qt,yn]of Je.entries())yn.innerHTML=($e=jt==null?void 0:jt[qt])!=null&&$e.score?`${(dt=jt==null?void 0:jt[qt])==null?void 0:dt.score}\u5206`:"";Qt(jt)}catch(Je){console.log(Je,"error")}},[jt]);const pt=Oe=>{hn[Oe.target.dataset.id]=hn[Oe.target.dataset.id]||{},hn[Oe.target.dataset.id].value=Oe.target.value,Qt([...hn]),lt(hn,Oe.target.dataset.id)},Rt=Oe=>{hn[Oe.target.dataset.id]=hn[Oe.target.dataset.id]||{},hn[Oe.target.dataset.id].value=Oe.target.value,Qt([...hn]),et(hn,Oe.target.dataset.id)},St=Oe=>{hn[Oe.target.dataset.id]=hn[Oe.target.dataset.id]||{},hn[Oe.target.dataset.id].value=Oe.target.value,Qt([...hn]),ut(hn,Oe.target.dataset.id)};function yt(Oe,Ce){return Oe.childNodes.forEach(Ne=>{var $e;if(Ne.childNodes.length>0)yt(Ne,Ce);else if(Ne.nodeName!=="IMG")if(Ne.innerHTML)Ne.innerHTML=($e=Ne.innerHTML)==null?void 0:$e.replace(new RegExp(Ce,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const dt=document.createElement("span");dt.innerHTML=Ne.textContent.replace(new RegExp(Ce,"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 Ce=Oe.target;if(Ce.tagName.toUpperCase()==="A"){let Ne=Ce.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 Ce=(Oe=nt.current)==null?void 0:Oe.querySelectorAll("video");Ce==null||Ce.forEach(Ne=>{if(Ne.oncontextmenu=()=>!1,Ne.src.indexOf(".m3u8")>-1&&!Ne.canPlayType("application/vnd.apple.mpegurl")){if(Pe.ZP.isSupported()){var $e=new Pe.ZP;$e.loadSource(Ne.src),$e.attachMedia(Ne)}}})};(0,Me.useEffect)(()=>{if(nt.current&&Lt&&Lt.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)()}},[Lt,nt.current,He]),(0,Me.useEffect)(()=>{var Oe;const Ce=Ne=>{Ne.preventDefault(),Ne.clipboardData.setData("text",window.getSelection().toString())};return(Oe=nt.current)==null||Oe.addEventListener("copy",Ce),()=>{var Ne;(Ne=nt.current)==null||Ne.removeEventListener("copy",Ce)}},[nt.current]);const We=Oe=>/<style[\s\S]*?>/i.test(Oe||"");return Me.createElement(Me.Fragment,null,Ye&&Me.createElement("div",{ref:nt},Lt),!Ye&&!We(Lt)&&Me.createElement("div",{ref:nt,style:se({},ft),className:`${Ze||""} ${st?"disabled-fill":""} markdown-body ${bn.current}`,dangerouslySetInnerHTML:{__html:Lt}}),!Ye&&We(Lt)&&Me.createElement(de,{html:Lt}),Me.createElement(ge.Z,{close:!0,data:_t,type:_t!=null&&_t.length?Bt:"",style:se({},at),onClose:()=>gt("")}))}},26089:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return ke}});var Me=Ee(42203),me={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},Be=Ee(59301),ke=({message:Pe,className:Le,children:he,style:Se={}})=>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)),Pe?Be.createElement("p",{style:Se},Pe):null,he,Be.createElement(Me.Outlet,null))},69003:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return ke}});var Me=Ee(59301),me=Ee(86766),Be=Ee(59301),ke=({defaultX:Pe="40%",leftChild:Le,rightChild:he,className:Se,hideResize:xe=!1})=>{const[ge,le]=(0,Me.useState)(Pe),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`:Pe,z=`calc(100% - ${xe?"0px":"4px"} - ${ce})`;return Be.createElement("div",{className:`split-panel-container ${Se}`},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))}},44722:function(Ln,tn,Ee){"use strict";Ee.d(tn,{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:Se={},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:Se},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)))},5649:function(Ln,tn,Ee){"use strict";var Me=Ee(59301);const me=ke=>String(ke).length===1?`0${ke}`:ke,Be=({className:ke="",onChange:Pe,defaultValue:Le=0})=>{const[he,Se]=(0,Me.useState)(Le);(0,Me.useEffect)(()=>{const ve=setTimeout(()=>{Se(he+1e3)},1e3);return Pe(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))};tn.Z=Be},25039:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return z}});var Me=Ee(59301),me=Ee(8591),Be=Ee(38854),ke=Ee(93726),Pe=Ee(37312),Le=Ee(2119),he=Ee(56102),Se=Ee(39171),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 ye=Ae=>{try{be(ie.next(Ae))}catch(De){ue(De)}},we=Ae=>{try{be(ie.throw(Ae))}catch(De){ue(De)}},be=Ae=>Ae.done?se(Ae.value):Promise.resolve(Ae.value).then(ye,we);be((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:ye=null,startTime:we,handlePause:be=()=>{},handlePlay:Ae=()=>{},handlePlayEnded:De=()=>{},autoPlay:ze=!1,onPlayEnded:Ze=()=>{},isShowWaterMark:Ye=!0},Ge)=>{var ft;oe=oe==null?void 0:oe.replace("http://","https://");const Pt=((ft=oe==null?void 0:oe.split("."))==null?void 0:ft.pop())==="flv",tt=(0,Me.useRef)(),vt=(0,Me.useRef)(),st=(0,Me.useRef)(),jt=(0,Me.useRef)(),lt=(0,Me.useRef)(),et=(0,Me.useRef)(),ut=(0,Me.useRef)(),mt=(0,Me.useRef)(),_t=(0,Me.useRef)(),gt=(0,Me.useRef)(),Bt=(0,Me.useRef)(),Ht=(0,Me.useRef)(),hn=(0,Me.useRef)(),Qt=(0,Me.useRef)(),bn=navigator.userAgent.toLowerCase().match(ce),Wt=bn?bn[0]:"pc",Kt=(0,Me.useRef)(!1),Jt=(0,Le.eY)();let dn=0,Lt=0,pt=0,Rt=null,St=!1,yt=20,nt=1,He=!1,Ie=!1,We=[];(0,Me.useImperativeHandle)(Ge,()=>({getLastUpdatedTime:()=>tt.current.currentTime,getDuration:()=>tt.current.duration})),me.ZP.config({maxCount:1,getContainer:()=>st.current});const Oe=(0,Me.useCallback)((qt,yn=!1)=>{let rn={point:tt.current.currentTime};Rt?(rn.log_id=Rt,rn.watch_duration=de(We),rn.total_duration=Lt):(ye?(rn.video_id=parseInt(se,10),rn.course_id=ye):rn.video_id=se,rn.duration=dn,rn.device=Wt),yn&&(rn.ed="1");function pn(){return ge(this,null,function*(){He=!0,Rt=yield ue==null?void 0:ue(rn),He=!1,qt&&qt()})}pn()},[se,ye]);(0,Me.useEffect)(()=>{tt.current&&(jt.current.style.display="none",lt.current.style.display="block"),me.ZP.destroy();let qt=null;return ke.Z.isSupported&&Pt&&oe&&(oe==null?void 0:oe.indexOf(".m3u8"))<0?(qt=ke.Z.createPlayer({type:"flv",volume:.8,cors:!0,url:oe,muted:!1}),tt.current&&(qt.attachMediaElement(tt.current),qt.load())):tt.current.setAttribute("src",oe),Ne(),()=>{qt&&(qt.unload(),qt.pause(),qt.destroy(),qt=null)}},[tt,Pt,oe]);function Ce(){tt.current.paused?(jt.current.style.display="none",lt.current.style.display="block"):(jt.current.style.display="block",lt.current.style.display="none")}function Ne(){Bt.current.style.display="none",hn.current.style.display="none",Ht.current.style.display="none",tt.current.muted||tt.current.volume===0?Bt.current.style.display="block":tt.current.volume>0&&tt.current.volume<=.5?hn.current.style.display="block":Ht.current.style.display="block"}(0,Me.useEffect)(()=>{const qt=document.getElementById("play"),yn=document.querySelectorAll(".playback-icons use");function rn(){Ae(),we&&!Kt.current&&(tt.current.currentTime=we),Kt.current=!0,We.push(tt.current.currentTime),St||(St=!0,ie&&Oe())}function pn(){return ge(this,null,function*(){Ce(),We.push(tt.current.currentTime),ie&&Oe(()=>{Rt=null,pt=0,St=!1,He=!1,Ie=!1,We=[],Lt=0,nt=1},!0),Ze()})}function Fn(){et.current.value=Math.round(tt.current.currentTime),ut.current.value=Math.round(tt.current.currentTime)}function kn(){const di=le(Math.round(tt.current.currentTime));_t.current.innerText=`${di.hour>0?di.hour+":":""}${di.minutes}:${di.seconds}`,_t.current.setAttribute("datetime",`${di.hour>0?" "+di.hour+" ":""}${di.minutes}m ${di.seconds}s`)}function oi(){var di,xr,zi,rt,zr,hr,vo;const co=Math.round((di=tt.current)==null?void 0:di.duration);(zi=(xr=et.current)==null?void 0:xr.setAttribute)==null||zi.call(xr,"max",co),(zr=(rt=ut.current)==null?void 0:rt.setAttribute)==null||zr.call(rt,"max",co);const yo=le(co);mt.current&&(mt.current.innerText=`${yo.hour>0?yo.hour+":":""}${yo.minutes}:${yo.seconds}`,(vo=(hr=mt.current).setAttribute)==null||vo.call(hr,"datetime",`${yo.hour>0?" "+yo.hour+" ":""}${yo.minutes}m ${yo.seconds}s`))}function ri(){try{const di=Math.round(tt.current.duration);et.current.setAttribute("max",di),ut.current.setAttribute("max",di);const xr=le(di);mt.current.innerText=`${xr.hour>0?xr.hour+":":""}${xr.minutes}:${xr.seconds}`,mt.current.setAttribute("datetime",`${xr.hour>0?" "+xr.hour+" ":""}${xr.minutes}m ${xr.seconds}s`),Fn(),kn();const{width:zi,height:rt,x:zr,y:hr}=vt.current.getBoundingClientRect();if(zr<0||hr<0||!zi)return;if(!Ie){let vo=tt.current.currentTime,co=vo-pt;Math.abs(co)<10?(Lt+=Math.abs(co),pt=vo,He||Lt-nt*yt>=0&&(nt++,We.push(pt),ie&&Oe())):(pt=vo,ie&&Oe())}}catch(di){console.log(di)}}function Ti(){Ie=!0}function mi(){tt.current.playing&&We.push(tt.current.currentTime,pt),pt=tt.current.currentTime,Ie=!1}function Qi(){dn=tt.current.duration,dn<=20&&(yt=dn/3),tt.current.addEventListener("play",rn)}function ir(di){di.preventDefault(),(0,Se.vp)()?(tt.current.style.width="100%",tt.current.style.height="100%"):tt.current.style.cssText=""}function fr(){be()}function er(di){if(!ee){me.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");return}const xr=di.target.dataset.seek?di.target.dataset.seek:di.target.value;tt.current.currentTime=xr,ut.current.value=xr,et.current.value=xr}function Mr(di){const xr=Math.round(di.offsetX/di.target.clientWidth*parseInt(di.target.getAttribute("max"),10));et.current.setAttribute("data-seek",xr);const zi=le(xr);gt.current.textContent=`${zi.hour>0?zi.hour+":":""}${zi.minutes}:${zi.seconds}`;const rt=tt.current.getBoundingClientRect();gt.current.style.left=`${di.pageX-rt.left}px`}function qr(di){switch(di.code){case"Space":di.preventDefault(),Je();break;case"ArrowRight":if(di.preventDefault(),!ee){me.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(tt.current.currentTime>=tt.current.duration)break;tt.current.currentTime=parseInt(tt.current.currentTime)+5,Fn();break;case"ArrowLeft":if(di.preventDefault(),!ee){me.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(tt.current.currentTime===0)break;tt.current.currentTime=parseInt(tt.current.currentTime)-5,Fn();break;case"ArrowUp":di.preventDefault(),tt.current.volume<1&&(tt.current.volume=(parseInt(tt.current.volume*10)+1)/10);break;case"ArrowDown":di.preventDefault(),tt.current.volume>0&&(tt.current.volume=(parseInt(tt.current.volume*10)-1)/10);break}}return st.current.addEventListener((0,Se.gH)(),ir),tt.current.addEventListener("canplay",Qi),tt.current.addEventListener("ended",pn),tt.current.addEventListener("seeking",Ti),tt.current.addEventListener("seeked",mi),tt.current.addEventListener("loadedmetadata",oi),et.current.addEventListener("mousemove",Mr),et.current.addEventListener("input",er),tt.current.addEventListener("timeupdate",ri),tt.current.addEventListener("pause",fr),tt.current.addEventListener("volumechange",Ne),document.addEventListener("keydown",qr),()=>{var di,xr,zi,rt,zr,hr,vo,co,yo,eo,lo,ln;(di=tt.current)==null||di.removeEventListener("canplay",Qi),(xr=tt.current)==null||xr.removeEventListener("play",rn),(zi=tt.current)==null||zi.removeEventListener("ended",pn),(rt=tt.current)==null||rt.removeEventListener("seeking",Ti),(zr=tt.current)==null||zr.removeEventListener("seeked",mi),(hr=et.current)==null||hr.removeEventListener("mousemove",Mr),(vo=et.current)==null||vo.removeEventListener("input",er),(co=tt.current)==null||co.removeEventListener("timeupdate",ri),(yo=tt.current)==null||yo.removeEventListener("pause",fr),(eo=tt.current)==null||eo.removeEventListener("loadedmetadata",oi),(lo=tt.current)==null||lo.removeEventListener("volumechange",Ne),document.removeEventListener("keydown",qr),(ln=tt.current)!=null&&ln.playing&&(We.push(pt,tt.current.currentTime),ie&&Oe())}},[tt,oe]),(0,Me.useEffect)(()=>{if(tt.current.onended=()=>{De(tt)},tt.current.oncontextmenu=()=>!1,(oe==null?void 0:oe.indexOf(".m3u8"))>-1){if(tt.current.canPlayType("application/vnd.apple.mpegurl"))tt.current.src=oe;else if(Pe.ZP.isSupported()){var qt=new Pe.ZP;qt.loadSource(oe),qt.attachMedia(tt.current)}}},[oe]);const[$e,dt]=(0,Me.useState)(1),Je=()=>{tt.current.paused||tt.current.ended?tt.current.play():tt.current.pause(),Ce()};function Tt(){tt.current.muted=!tt.current.muted,tt.current.muted?(Qt.current.setAttribute("data-volume",volume.value),Qt.current.value=0):Qt.current.value=Qt.current.dataset.volume}return Me.createElement("div",{style:{position:"relative"},ref:st},Me.createElement("div",{ref:vt,className:`${xe.watermark} animated_alternate animate__animated_10s animate__infinite animate__stepstart ${xe.animate__loop}`},Ye&&Jt?Jt.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:tt,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:jt,style:{display:"none"},href:"#pause"}))),Me.createElement("div",{className:xe.time},Me.createElement("time",{id:"time-elapsed",ref:_t},"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:qt=>qt.parentNode,menu:{items:[{key:"1",label:Me.createElement("span",{onClick:()=>{dt(1),tt.current.playbackRate=1}},"1.0x")},{key:"2",label:Me.createElement("span",{onClick:()=>{dt(1.5),tt.current.playbackRate=1.5}},"1.5x")},{key:"3",label:Me.createElement("span",{onClick:()=>{dt(2),tt.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:Tt},Me.createElement("i",{ref:Bt,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:Qt,style:{display:"none"},onClick:Ne})),Me.createElement("button",{"data-title":"\u5168\u5C4F/\u9000\u51FA\u5168\u5C4F",className:xe["fullscreen-button"],onClick:()=>{(0,Se.vp)()?(0,Se.BU)():(0,Se.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:et,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"})))))})},2307:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Pn}});var Me=Ee(59301),me=Ee(86766),Be=Ee(30631),ke=Ee(92310),Pe=Ee.n(ke),Le=Ee(5891),he=Ee(57259),Se=Ee(80962),xe=Ee(29043),ge=Ee(80665),le=Ee(19149),ve=Ee(21783),de=Ee(35788),ce=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"],z=Me.createContext(null),ee=0;function oe(zt,Yt){var Cn=Me.useState(function(){return ee+=1,String(ee)}),An=(0,xe.Z)(Cn,1),Vt=An[0],an=Me.useContext(z),Bn={data:Yt,canPreview:zt};return Me.useEffect(function(){if(an)return an.register(Vt,Bn)},[]),Me.useEffect(function(){an&&an.register(Vt,Bn)},[zt,Yt]),Vt}function ie(zt){return new Promise(function(Yt){var Cn=document.createElement("img");Cn.onerror=function(){return Yt(!1)},Cn.onload=function(){return Yt(!0)},Cn.src=zt})}function se(zt){var Yt=zt.src,Cn=zt.isCustomPlaceholder,An=zt.fallback,Vt=(0,Me.useState)(Cn?"loading":"normal"),an=(0,xe.Z)(Vt,2),Bn=an[0],Nn=an[1],qn=(0,Me.useRef)(!1),Gn=Bn==="error";(0,Me.useEffect)(function(){ie(Yt).then(function(Mi){Mi||Nn("error")})},[Yt]),(0,Me.useEffect)(function(){Cn&&!qn.current?Nn("loading"):Gn&&Nn("normal")},[Yt]);var Jn=function(){Nn("normal")},Rn=function(zn){qn.current=!1,Bn==="loading"&&zn!=null&&zn.complete&&(zn.naturalWidth||zn.naturalHeight)&&(qn.current=!0,Jn())},li=Gn&&An?{src:An}:{onLoad:Jn,src:Yt};return[Rn,li,Bn]}var ue=Ee(86923),ye=Ee(8178),we=Ee(85108),be=Ee(51395);function Ae(zt,Yt,Cn,An){var Vt=Yt+Cn,an=(Cn-An)/2;if(Cn>An){if(Yt>0)return(0,Se.Z)({},zt,an);if(Yt<0&&Vt<An)return(0,Se.Z)({},zt,-an)}else if(Yt<0||Vt>An)return(0,Se.Z)({},zt,Yt<0?an:-an);return{}}function De(zt,Yt,Cn,An){var Vt=(0,ve.g1)(),an=Vt.width,Bn=Vt.height,Nn=null;return zt<=an&&Yt<=Bn?Nn={x:0,y:0}:(zt>an||Yt>Bn)&&(Nn=(0,he.Z)((0,he.Z)({},Ae("x",Cn,zt,an)),Ae("y",An,Yt,Bn))),Nn}var ze=Ee(51346),Ze=Ee(23073),Ye={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function Ge(zt,Yt,Cn,An){var Vt=(0,Me.useRef)(null),an=(0,Me.useRef)([]),Bn=(0,Me.useState)(Ye),Nn=(0,xe.Z)(Bn,2),qn=Nn[0],Gn=Nn[1],Jn=function(zn){Gn(Ye),An&&!(0,ze.Z)(Ye,qn)&&An({transform:Ye,action:zn})},Rn=function(zn,si){Vt.current===null&&(an.current=[],Vt.current=(0,Ze.Z)(function(){Gn(function(Hi){var ur=Hi;return an.current.forEach(function(Ai){ur=(0,he.Z)((0,he.Z)({},ur),Ai)}),Vt.current=null,An==null||An({transform:ur,action:si}),ur})})),an.current.push((0,he.Z)((0,he.Z)({},qn),zn))},li=function(zn,si,Hi,ur){var Ai=zt.current,un=Ai.width,ai=Ai.height,wi=Ai.offsetWidth,fi=Ai.offsetHeight,Wi=Ai.offsetLeft,Ni=Ai.offsetTop,lr=zn,Fi=qn.scale*zn;Fi>Cn?(lr=Cn/qn.scale,Fi=Cn):Fi<Yt&&(lr=Yt/qn.scale,Fi=Yt);var $i=Hi!=null?Hi:innerWidth/2,Lr=ur!=null?ur:innerHeight/2,On=lr-1,Kr=On*un*.5,In=On*ai*.5,br=On*($i-qn.x-Wi),xo=On*(Lr-qn.y-Ni),Cr=qn.x-(br-Kr),Fo=qn.y-(xo-In);if(zn<1&&Fi===1){var oo=wi*Fi,Ki=fi*Fi,Ji=(0,ve.g1)(),pr=Ji.width,kr=Ji.height;oo<=pr&&Ki<=kr&&(Cr=0,Fo=0)}Rn({x:Cr,y:Fo,scale:Fi},si)};return{transform:qn,resetTransform:Jn,updateTransform:Rn,dispatchZoomChange:li}}var ft=Ee(43403),at=Ee(43469),Pt=function(Yt){var Cn=Yt.visible,An=Yt.maskTransitionName,Vt=Yt.getContainer,an=Yt.prefixCls,Bn=Yt.rootClassName,Nn=Yt.icons,qn=Yt.countRender,Gn=Yt.showSwitch,Jn=Yt.showProgress,Rn=Yt.current,li=Yt.transform,Mi=Yt.count,zn=Yt.scale,si=Yt.minScale,Hi=Yt.maxScale,ur=Yt.closeIcon,Ai=Yt.onSwitchLeft,un=Yt.onSwitchRight,ai=Yt.onClose,wi=Yt.onZoomIn,fi=Yt.onZoomOut,Wi=Yt.onRotateRight,Ni=Yt.onRotateLeft,lr=Yt.onFlipX,Fi=Yt.onFlipY,$i=Yt.toolbarRender,Lr=(0,Me.useContext)(z),On=Nn.rotateLeft,Kr=Nn.rotateRight,In=Nn.zoomIn,br=Nn.zoomOut,xo=Nn.close,Cr=Nn.left,Fo=Nn.right,oo=Nn.flipX,Ki=Nn.flipY,Ji="".concat(an,"-operations-operation");Me.useEffect(function(){var kt=function(_o){_o.keyCode===we.Z.ESC&&ai()};return Cn&&window.addEventListener("keydown",kt),function(){window.removeEventListener("keydown",kt)}},[Cn]);var pr=[{icon:Ki,onClick:Fi,type:"flipY"},{icon:oo,onClick:lr,type:"flipX"},{icon:On,onClick:Ni,type:"rotateLeft"},{icon:Kr,onClick:Wi,type:"rotateRight"},{icon:br,onClick:fi,type:"zoomOut",disabled:zn===si},{icon:In,onClick:wi,type:"zoomIn",disabled:zn===Hi}],kr=pr.map(function(kt){var Pr,_o=kt.icon,Oo=kt.onClick,wo=kt.type,yr=kt.disabled;return Me.createElement("div",{className:Pe()(Ji,(Pr={},(0,Se.Z)(Pr,"".concat(an,"-operations-operation-").concat(wo),!0),(0,Se.Z)(Pr,"".concat(an,"-operations-operation-disabled"),!!yr),Pr)),onClick:Oo,key:wo},_o)}),hi=Me.createElement("div",{className:"".concat(an,"-operations")},kr);return Me.createElement(at.default,{visible:Cn,motionName:An},function(kt){var Pr=kt.className,_o=kt.style;return Me.createElement(ft.Z,{open:!0,getContainer:Vt!=null?Vt:document.body},Me.createElement("div",{className:Pe()("".concat(an,"-operations-wrapper"),Pr,Bn),style:_o},ur===null?null:Me.createElement("button",{className:"".concat(an,"-close"),onClick:ai},ur||xo),Gn&&Me.createElement(Me.Fragment,null,Me.createElement("div",{className:Pe()("".concat(an,"-switch-left"),(0,Se.Z)({},"".concat(an,"-switch-left-disabled"),Rn===0)),onClick:Ai},Cr),Me.createElement("div",{className:Pe()("".concat(an,"-switch-right"),(0,Se.Z)({},"".concat(an,"-switch-right-disabled"),Rn===Mi-1)),onClick:un},Fo)),Me.createElement("div",{className:"".concat(an,"-footer")},Jn&&Me.createElement("div",{className:"".concat(an,"-progress")},qn?qn(Rn+1,Mi):"".concat(Rn+1," / ").concat(Mi)),$i?$i(hi,(0,he.Z)({icons:{flipYIcon:kr[0],flipXIcon:kr[1],rotateLeftIcon:kr[2],rotateRightIcon:kr[3],zoomOutIcon:kr[4],zoomInIcon:kr[5]},actions:{onFlipY:Fi,onFlipX:lr,onRotateLeft:Ni,onRotateRight:Wi,onZoomOut:fi,onZoomIn:wi},transform:li},Lr?{current:Rn,total:Mi}:{})):hi)))})},tt=Pt,vt=1,st=1,jt=["fallback","src","imgRef"],lt=["prefixCls","src","alt","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"],et=function(Yt){var Cn=Yt.fallback,An=Yt.src,Vt=Yt.imgRef,an=(0,le.Z)(Yt,jt),Bn=se({src:An,fallback:Cn}),Nn=(0,xe.Z)(Bn,2),qn=Nn[0],Gn=Nn[1];return Me.createElement("img",(0,Le.Z)({ref:function(Rn){Vt.current=Rn,qn(Rn)}},an,Gn))},ut=function(Yt){var Cn=Yt.prefixCls,An=Yt.src,Vt=Yt.alt,an=Yt.fallback,Bn=Yt.movable,Nn=Bn===void 0?!0:Bn,qn=Yt.onClose,Gn=Yt.visible,Jn=Yt.icons,Rn=Jn===void 0?{}:Jn,li=Yt.rootClassName,Mi=Yt.closeIcon,zn=Yt.getContainer,si=Yt.current,Hi=si===void 0?0:si,ur=Yt.count,Ai=ur===void 0?1:ur,un=Yt.countRender,ai=Yt.scaleStep,wi=ai===void 0?.5:ai,fi=Yt.minScale,Wi=fi===void 0?1:fi,Ni=Yt.maxScale,lr=Ni===void 0?50:Ni,Fi=Yt.transitionName,$i=Fi===void 0?"zoom":Fi,Lr=Yt.maskTransitionName,On=Lr===void 0?"fade":Lr,Kr=Yt.imageRender,In=Yt.imgCommonProps,br=Yt.toolbarRender,xo=Yt.onTransform,Cr=Yt.onChange,Fo=(0,le.Z)(Yt,lt),oo=(0,Me.useRef)(),Ki=(0,Me.useRef)({deltaX:0,deltaY:0,transformX:0,transformY:0}),Ji=(0,Me.useState)(!1),pr=(0,xe.Z)(Ji,2),kr=pr[0],hi=pr[1],kt=(0,Me.useContext)(z),Pr=kt&&Ai>1,_o=kt&&Ai>=1,Oo=Ge(oo,Wi,lr,xo),wo=Oo.transform,yr=Oo.resetTransform,tr=Oo.updateTransform,Hr=Oo.dispatchZoomChange,Po=(0,Me.useState)(!0),Tr=(0,xe.Z)(Po,2),Io=Tr[0],qi=Tr[1],Ui=wo.rotate,rr=wo.scale,Yn=wo.x,Vr=wo.y,Eo=Pe()((0,Se.Z)({},"".concat(Cn,"-moving"),kr));(0,Me.useEffect)(function(){Io||qi(!0)},[Io]);var rs=function(){yr("close")},Lo=function(){Hr(vt+wi,"zoomIn")},is=function(){Hr(vt/(vt+wi),"zoomOut")},ms=function(){tr({rotate:Ui+90},"rotateRight")},Ls=function(){tr({rotate:Ui-90},"rotateLeft")},ws=function(){tr({flipX:!wo.flipX},"flipX")},ta=function(){tr({flipY:!wo.flipY},"flipY")},aa=function(_r){_r==null||_r.preventDefault(),_r==null||_r.stopPropagation(),Hi>0&&(qi(!1),yr("prev"),Cr==null||Cr(Hi-1,Hi))},Tn=function(_r){_r==null||_r.preventDefault(),_r==null||_r.stopPropagation(),Hi<Ai-1&&(qi(!1),yr("next"),Cr==null||Cr(Hi+1,Hi))},Os=function(){if(Gn&&kr){hi(!1);var _r=Ki.current,na=_r.transformX,Rr=_r.transformY,no=Yn!==na&&Vr!==Rr;if(!no)return;var $r=oo.current.offsetWidth*rr,Ei=oo.current.offsetHeight*rr,ls=oo.current.getBoundingClientRect(),Ms=ls.left,ba=ls.top,za=Ui%180!==0,Ja=De(za?Ei:$r,za?$r:Ei,Ms,ba);Ja&&tr((0,he.Z)({},Ja),"dragRebound")}},hl=function(_r){!Nn||_r.button!==0||(_r.preventDefault(),_r.stopPropagation(),Ki.current={deltaX:_r.pageX-wo.x,deltaY:_r.pageY-wo.y,transformX:wo.x,transformY:wo.y},hi(!0))},dl=function(_r){Gn&&kr&&tr({x:_r.pageX-Ki.current.deltaX,y:_r.pageY-Ki.current.deltaY},"move")},vs=function(_r){if(!(!Gn||_r.deltaY==0)){var na=Math.abs(_r.deltaY/100),Rr=Math.min(na,st),no=vt+Rr*wi;_r.deltaY>0&&(no=vt/no),Hr(no,"wheel",_r.clientX,_r.clientY)}},ja=function(_r){!Gn||!Pr||(_r.keyCode===we.Z.LEFT?aa():_r.keyCode===we.Z.RIGHT&&Tn())},lu=function(_r){Gn&&(rr!==1?tr({x:0,y:0,scale:1},"doubleClick"):Hr(vt+wi,"doubleClick",_r.clientX,_r.clientY))};(0,Me.useEffect)(function(){var uo,_r,na,Rr;if(Nn){na=(0,ye.Z)(window,"mouseup",Os,!1),Rr=(0,ye.Z)(window,"mousemove",dl,!1);try{window.top!==window.self&&(uo=(0,ye.Z)(window.top,"mouseup",Os,!1),_r=(0,ye.Z)(window.top,"mousemove",dl,!1))}catch(no){(0,be.Kp)(!1,"[rc-image] ".concat(no))}}return function(){var no,$r,Ei,ls;(no=na)===null||no===void 0||no.remove(),($r=Rr)===null||$r===void 0||$r.remove(),(Ei=uo)===null||Ei===void 0||Ei.remove(),(ls=_r)===null||ls===void 0||ls.remove()}},[Gn,kr,Yn,Vr,Ui,Nn]),(0,Me.useEffect)(function(){var uo=(0,ye.Z)(window,"keydown",ja,!1);return function(){uo.remove()}},[Gn,Pr,Hi]);var Vl=Me.createElement(et,(0,Le.Z)({},In,{width:Yt.width,height:Yt.height,imgRef:oo,className:"".concat(Cn,"-img"),alt:Vt,style:{transform:"translate3d(".concat(wo.x,"px, ").concat(wo.y,"px, 0) scale3d(").concat(wo.flipX?"-":"").concat(rr,", ").concat(wo.flipY?"-":"").concat(rr,", 1) rotate(").concat(Ui,"deg)"),transitionDuration:!Io&&"0s"},fallback:an,src:An,onWheel:vs,onMouseDown:hl,onDoubleClick:lu}));return Me.createElement(Me.Fragment,null,Me.createElement(ue.Z,(0,Le.Z)({transitionName:$i,maskTransitionName:On,closable:!1,keyboard:!0,prefixCls:Cn,onClose:qn,visible:Gn,wrapClassName:Eo,rootClassName:li,getContainer:zn},Fo,{afterClose:rs}),Me.createElement("div",{className:"".concat(Cn,"-img-wrapper")},Kr?Kr(Vl,(0,he.Z)({transform:wo},kt?{current:Hi}:{})):Vl)),Me.createElement(tt,{visible:Gn,transform:wo,maskTransitionName:On,closeIcon:Mi,getContainer:zn,prefixCls:Cn,rootClassName:li,icons:Rn,countRender:un,showSwitch:Pr,showProgress:_o,current:Hi,count:Ai,scale:rr,minScale:Wi,maxScale:lr,toolbarRender:br,onSwitchLeft:aa,onSwitchRight:Tn,onZoomIn:Lo,onZoomOut:is,onRotateRight:ms,onRotateLeft:Ls,onFlipX:ws,onFlipY:ta,onClose:qn}))},mt=ut,_t=Ee(26390);function gt(zt){var Yt=Me.useState({}),Cn=(0,xe.Z)(Yt,2),An=Cn[0],Vt=Cn[1],an=Me.useCallback(function(Nn,qn){return Vt(function(Gn){return(0,he.Z)((0,he.Z)({},Gn),{},(0,Se.Z)({},Nn,qn))}),function(){Vt(function(Gn){var Jn=(0,he.Z)({},Gn);return delete Jn[Nn],Jn})}},[]),Bn=Me.useMemo(function(){return zt?zt.map(function(Nn){if(typeof Nn=="string")return{data:{src:Nn}};var qn={};return Object.keys(Nn).forEach(function(Gn){["src"].concat((0,_t.Z)(ce)).includes(Gn)&&(qn[Gn]=Nn[Gn])}),{data:qn}}):Object.keys(An).reduce(function(Nn,qn){var Gn=An[qn],Jn=Gn.canPreview,Rn=Gn.data;return Jn&&Nn.push({data:Rn,id:qn}),Nn},[])},[zt,An]);return[Bn,an]}var Bt=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],Ht=["src"],hn=function(Yt){var Cn,An=Yt.previewPrefixCls,Vt=An===void 0?"rc-image-preview":An,an=Yt.children,Bn=Yt.icons,Nn=Bn===void 0?{}:Bn,qn=Yt.items,Gn=Yt.preview,Jn=Yt.fallback,Rn=(0,ge.Z)(Gn)==="object"?Gn:{},li=Rn.visible,Mi=Rn.onVisibleChange,zn=Rn.getContainer,si=Rn.current,Hi=Rn.movable,ur=Rn.minScale,Ai=Rn.maxScale,un=Rn.countRender,ai=Rn.closeIcon,wi=Rn.onChange,fi=Rn.onTransform,Wi=Rn.toolbarRender,Ni=Rn.imageRender,lr=(0,le.Z)(Rn,Bt),Fi=gt(qn),$i=(0,xe.Z)(Fi,2),Lr=$i[0],On=$i[1],Kr=(0,de.Z)(0,{value:si}),In=(0,xe.Z)(Kr,2),br=In[0],xo=In[1],Cr=(0,Me.useState)(!1),Fo=(0,xe.Z)(Cr,2),oo=Fo[0],Ki=Fo[1],Ji=((Cn=Lr[br])===null||Cn===void 0?void 0:Cn.data)||{},pr=Ji.src,kr=(0,le.Z)(Ji,Ht),hi=(0,de.Z)(!!li,{value:li,onChange:function(Ui,rr){Mi==null||Mi(Ui,rr,br)}}),kt=(0,xe.Z)(hi,2),Pr=kt[0],_o=kt[1],Oo=(0,Me.useState)(null),wo=(0,xe.Z)(Oo,2),yr=wo[0],tr=wo[1],Hr=Me.useCallback(function(qi,Ui,rr){var Yn=Lr.findIndex(function(Vr){return Vr.id===qi});_o(!0),tr({x:Ui,y:rr}),xo(Yn<0?0:Yn),Ki(!0)},[Lr]);Me.useEffect(function(){Pr?oo||xo(0):Ki(!1)},[Pr]);var Po=function(Ui,rr){xo(Ui),wi==null||wi(Ui,rr)},Tr=function(){_o(!1),tr(null)},Io=Me.useMemo(function(){return{register:On,onPreview:Hr}},[On,Hr]);return Me.createElement(z.Provider,{value:Io},an,Me.createElement(mt,(0,Le.Z)({"aria-hidden":!Pr,movable:Hi,visible:Pr,prefixCls:Vt,closeIcon:ai,onClose:Tr,mousePosition:yr,imgCommonProps:kr,src:pr,fallback:Jn,icons:Nn,minScale:ur,maxScale:Ai,getContainer:zn,current:br,count:Lr.length,countRender:un,onTransform:fi,toolbarRender:Wi,imageRender:Ni,onChange:Po},lr)))},Qt=hn,bn=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],Wt=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],Kt=function(Yt){var Cn=Yt.src,An=Yt.alt,Vt=Yt.onPreviewClose,an=Yt.prefixCls,Bn=an===void 0?"rc-image":an,Nn=Yt.previewPrefixCls,qn=Nn===void 0?"".concat(Bn,"-preview"):Nn,Gn=Yt.placeholder,Jn=Yt.fallback,Rn=Yt.width,li=Yt.height,Mi=Yt.style,zn=Yt.preview,si=zn===void 0?!0:zn,Hi=Yt.className,ur=Yt.onClick,Ai=Yt.onError,un=Yt.wrapperClassName,ai=Yt.wrapperStyle,wi=Yt.rootClassName,fi=(0,le.Z)(Yt,bn),Wi=Gn&&Gn!==!0,Ni=(0,ge.Z)(si)==="object"?si:{},lr=Ni.src,Fi=Ni.visible,$i=Fi===void 0?void 0:Fi,Lr=Ni.onVisibleChange,On=Lr===void 0?Vt:Lr,Kr=Ni.getContainer,In=Kr===void 0?void 0:Kr,br=Ni.mask,xo=Ni.maskClassName,Cr=Ni.movable,Fo=Ni.icons,oo=Ni.scaleStep,Ki=Ni.minScale,Ji=Ni.maxScale,pr=Ni.imageRender,kr=Ni.toolbarRender,hi=(0,le.Z)(Ni,Wt),kt=lr!=null?lr:Cn,Pr=(0,de.Z)(!!$i,{value:$i,onChange:On}),_o=(0,xe.Z)(Pr,2),Oo=_o[0],wo=_o[1],yr=se({src:Cn,isCustomPlaceholder:Wi,fallback:Jn}),tr=(0,xe.Z)(yr,3),Hr=tr[0],Po=tr[1],Tr=tr[2],Io=(0,Me.useState)(null),qi=(0,xe.Z)(Io,2),Ui=qi[0],rr=qi[1],Yn=(0,Me.useContext)(z),Vr=!!si,Eo=function(){wo(!1),rr(null)},rs=Pe()(Bn,un,wi,(0,Se.Z)({},"".concat(Bn,"-error"),Tr==="error")),Lo=(0,Me.useMemo)(function(){var ws={};return ce.forEach(function(ta){Yt[ta]!==void 0&&(ws[ta]=Yt[ta])}),ws},ce.map(function(ws){return Yt[ws]})),is=(0,Me.useMemo)(function(){return(0,he.Z)((0,he.Z)({},Lo),{},{src:kt})},[kt,Lo]),ms=oe(Vr,is),Ls=function(ta){var aa=(0,ve.os)(ta.target),Tn=aa.left,Os=aa.top;Yn?Yn.onPreview(ms,Tn,Os):(rr({x:Tn,y:Os}),wo(!0)),ur==null||ur(ta)};return Me.createElement(Me.Fragment,null,Me.createElement("div",(0,Le.Z)({},fi,{className:rs,onClick:Vr?Ls:ur,style:(0,he.Z)({width:Rn,height:li},ai)}),Me.createElement("img",(0,Le.Z)({},Lo,{className:Pe()("".concat(Bn,"-img"),(0,Se.Z)({},"".concat(Bn,"-img-placeholder"),Gn===!0),Hi),style:(0,he.Z)({height:li},Mi),ref:Hr},Po,{width:Rn,height:li,onError:Ai})),Tr==="loading"&&Me.createElement("div",{"aria-hidden":"true",className:"".concat(Bn,"-placeholder")},Gn),br&&Vr&&Me.createElement("div",{className:Pe()("".concat(Bn,"-mask"),xo),style:{display:(Mi==null?void 0:Mi.display)==="none"?"none":void 0}},br)),!Yn&&Vr&&Me.createElement(mt,(0,Le.Z)({"aria-hidden":!Oo,visible:Oo,prefixCls:qn,onClose:Eo,mousePosition:Ui,src:kt,alt:An,fallback:Jn,getContainer:In,icons:Fo,movable:Cr,scaleStep:oo,minScale:Ki,maxScale:Ji,rootClassName:wi,imageRender:pr,imgCommonProps:Lo,toolbarRender:kr},hi)))};Kt.PreviewGroup=Qt,Kt.displayName="Image";var Jt=Kt,dn=Jt,Lt=Ee(62892),pt=Ee(36355),Rt=Ee(31724),St=Ee(72119),yt=Ee(16537),nt=Ee(53878),He={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"},Ie=He,We=Ee(88853),Oe=function(Yt,Cn){return Me.createElement(We.Z,(0,Le.Z)({},Yt,{ref:Cn,icon:Ie}))},Ce=Me.forwardRef(Oe),Ne=Ce,$e={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"},dt=$e,Je=function(Yt,Cn){return Me.createElement(We.Z,(0,Le.Z)({},Yt,{ref:Cn,icon:dt}))},Tt=Me.forwardRef(Je),qt=Tt,yn={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"},rn=yn,pn=function(Yt,Cn){return Me.createElement(We.Z,(0,Le.Z)({},Yt,{ref:Cn,icon:rn}))},Fn=Me.forwardRef(pn),kn=Fn,oi={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"},ri=oi,Ti=function(Yt,Cn){return Me.createElement(We.Z,(0,Le.Z)({},Yt,{ref:Cn,icon:ri}))},mi=Me.forwardRef(Ti),Qi=mi,ir={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"},fr=ir,er=function(Yt,Cn){return Me.createElement(We.Z,(0,Le.Z)({},Yt,{ref:Cn,icon:fr}))},Mr=Me.forwardRef(er),qr=Mr,di=Ee(64993),xr=Ee(73819),zi=Ee(17313),rt=Ee(29878),zr=Ee(1950),hr=Ee(83116),vo=Ee(37613);const co=zt=>({position:zt||"absolute",inset:0}),yo=zt=>{const{iconCls:Yt,motionDurationSlow:Cn,paddingXXS:An,marginXXS:Vt,prefixCls:an,colorTextLightSolid:Bn}=zt;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:Bn,background:new di.C("#000").setAlpha(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${Cn}`,[`.${an}-mask-info`]:Object.assign(Object.assign({},zi.vS),{padding:`0 ${An}px`,[Yt]:{marginInlineEnd:Vt,svg:{verticalAlign:"baseline"}}})}},eo=zt=>{const{previewCls:Yt,modalMaskBg:Cn,paddingSM:An,marginXL:Vt,margin:an,paddingLG:Bn,previewOperationColorDisabled:Nn,previewOperationHoverColor:qn,motionDurationSlow:Gn,iconCls:Jn,colorTextLightSolid:Rn}=zt,li=new di.C(Cn).setAlpha(.1),Mi=li.clone().setAlpha(.2);return{[`${Yt}-footer`]:{position:"fixed",bottom:Vt,left:{_skip_check_:!0,value:0},width:"100%",display:"flex",flexDirection:"column",alignItems:"center",color:zt.previewOperationColor},[`${Yt}-progress`]:{marginBottom:an},[`${Yt}-close`]:{position:"fixed",top:Vt,right:{_skip_check_:!0,value:Vt},display:"flex",color:Rn,backgroundColor:li.toRgbString(),borderRadius:"50%",padding:An,outline:0,border:0,cursor:"pointer",transition:`all ${Gn}`,"&:hover":{backgroundColor:Mi.toRgbString()},[`& > ${Jn}`]:{fontSize:zt.previewOperationSize}},[`${Yt}-operations`]:{display:"flex",alignItems:"center",padding:`0 ${Bn}px`,backgroundColor:li.toRgbString(),borderRadius:100,"&-operation":{marginInlineStart:An,padding:An,cursor:"pointer",transition:`all ${Gn}`,userSelect:"none",[`&:not(${Yt}-operations-operation-disabled):hover > ${Jn}`]:{color:qn},"&-disabled":{color:Nn,cursor:"not-allowed"},"&:first-of-type":{marginInlineStart:0},[`& > ${Jn}`]:{fontSize:zt.previewOperationSize}}}}},lo=zt=>{const{modalMaskBg:Yt,iconCls:Cn,previewOperationColorDisabled:An,previewCls:Vt,zIndexPopup:an,motionDurationSlow:Bn}=zt,Nn=new di.C(Yt).setAlpha(.1),qn=Nn.clone().setAlpha(.2);return{[`${Vt}-switch-left, ${Vt}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:an+1,display:"flex",alignItems:"center",justifyContent:"center",width:zt.imagePreviewSwitchSize,height:zt.imagePreviewSwitchSize,marginTop:-zt.imagePreviewSwitchSize/2,color:zt.previewOperationColor,background:Nn.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${Bn}`,userSelect:"none","&:hover":{background:qn.toRgbString()},"&-disabled":{"&, &:hover":{color:An,background:"transparent",cursor:"not-allowed",[`> ${Cn}`]:{cursor:"not-allowed"}}},[`> ${Cn}`]:{fontSize:zt.previewOperationSize}},[`${Vt}-switch-left`]:{insetInlineStart:zt.marginSM},[`${Vt}-switch-right`]:{insetInlineEnd:zt.marginSM}}},ln=zt=>{const{motionEaseOut:Yt,previewCls:Cn,motionDurationSlow:An,componentCls:Vt}=zt;return[{[`${Vt}-preview-root`]:{[Cn]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${Cn}-body`]:Object.assign(Object.assign({},co()),{overflow:"hidden"}),[`${Cn}-img`]:{maxWidth:"100%",maxHeight:"70%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${An} ${Yt} 0s`,userSelect:"none","&-wrapper":Object.assign(Object.assign({},co()),{transition:`transform ${An} ${Yt} 0s`,display:"flex",justifyContent:"center",alignItems:"center","& > *":{pointerEvents:"auto"},"&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${Cn}-moving`]:{[`${Cn}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${Vt}-preview-root`]:{[`${Cn}-wrap`]:{zIndex:zt.zIndexPopup}}},{[`${Vt}-preview-operations-wrapper`]:{position:"fixed",zIndex:zt.zIndexPopup+1},"&":[eo(zt),lo(zt)]}]},Ke=zt=>{const{componentCls:Yt}=zt;return{[Yt]:{position:"relative",display:"inline-block",[`${Yt}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${Yt}-img-placeholder`]:{backgroundColor:zt.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${Yt}-mask`]:Object.assign({},yo(zt)),[`${Yt}-mask:hover`]:{opacity:1},[`${Yt}-placeholder`]:Object.assign({},co())}}},qe=zt=>{const{previewCls:Yt}=zt;return{[`${Yt}-root`]:(0,rt._y)(zt,"zoom"),"&":(0,zr.J$)(zt,!0)}};var Xe=(0,hr.Z)("Image",zt=>{const Yt=`${zt.componentCls}-preview`,Cn=(0,vo.TS)(zt,{previewCls:Yt,modalMaskBg:new di.C("#000").setAlpha(.45).toRgbString(),imagePreviewSwitchSize:zt.controlHeightLG});return[Ke(Cn),ln(Cn),(0,xr.QA)((0,vo.TS)(Cn,{componentCls:Yt})),qe(Cn)]},zt=>({zIndexPopup:zt.zIndexPopupBase+80,previewOperationColor:new di.C(zt.colorTextLightSolid).setAlpha(.65).toRgbString(),previewOperationHoverColor:new di.C(zt.colorTextLightSolid).setAlpha(.85).toRgbString(),previewOperationColorDisabled:new di.C(zt.colorTextLightSolid).setAlpha(.25).toRgbString(),previewOperationSize:zt.fontSizeIcon*1.5})),wt=function(zt,Yt){var Cn={};for(var An in zt)Object.prototype.hasOwnProperty.call(zt,An)&&Yt.indexOf(An)<0&&(Cn[An]=zt[An]);if(zt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Vt=0,An=Object.getOwnPropertySymbols(zt);Vt<An.length;Vt++)Yt.indexOf(An[Vt])<0&&Object.prototype.propertyIsEnumerable.call(zt,An[Vt])&&(Cn[An[Vt]]=zt[An[Vt]]);return Cn};const At={rotateLeft:Me.createElement(Ne,null),rotateRight:Me.createElement(qt,null),zoomIn:Me.createElement(Qi,null),zoomOut:Me.createElement(qr,null),close:Me.createElement(St.Z,null),left:Me.createElement(yt.Z,null),right:Me.createElement(nt.Z,null),flipX:Me.createElement(kn,null),flipY:Me.createElement(kn,{rotate:90})};var bt=zt=>{var{previewPrefixCls:Yt,preview:Cn}=zt,An=wt(zt,["previewPrefixCls","preview"]);const{getPrefixCls:Vt}=Me.useContext(pt.E_),an=Vt("image",Yt),Bn=`${an}-preview`,Nn=Vt(),[qn,Gn]=Xe(an),Jn=Me.useMemo(()=>{var Rn;if(Cn===!1)return Cn;const li=typeof Cn=="object"?Cn:{},Mi=Pe()(Gn,(Rn=li.rootClassName)!==null&&Rn!==void 0?Rn:"");return Object.assign(Object.assign({},li),{transitionName:(0,Lt.m)(Nn,"zoom",li.transitionName),maskTransitionName:(0,Lt.m)(Nn,"fade",li.maskTransitionName),rootClassName:Mi})},[Cn]);return qn(Me.createElement(dn.PreviewGroup,Object.assign({preview:Jn,previewPrefixCls:Bn,icons:At},An)))},gn=function(zt,Yt){var Cn={};for(var An in zt)Object.prototype.hasOwnProperty.call(zt,An)&&Yt.indexOf(An)<0&&(Cn[An]=zt[An]);if(zt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Vt=0,An=Object.getOwnPropertySymbols(zt);Vt<An.length;Vt++)Yt.indexOf(An[Vt])<0&&Object.prototype.propertyIsEnumerable.call(zt,An[Vt])&&(Cn[An[Vt]]=zt[An[Vt]]);return Cn};const En=zt=>{const{prefixCls:Yt,preview:Cn,className:An,rootClassName:Vt,style:an}=zt,Bn=gn(zt,["prefixCls","preview","className","rootClassName","style"]),{getPrefixCls:Nn,locale:qn=Rt.Z,getPopupContainer:Gn,image:Jn}=Me.useContext(pt.E_),Rn=Nn("image",Yt),li=Nn(),Mi=qn.Image||Rt.Z.Image,[zn,si]=Xe(Rn),Hi=Pe()(Vt,si),ur=Pe()(An,si,Jn==null?void 0:Jn.className),Ai=Me.useMemo(()=>{if(Cn===!1)return Cn;const ai=typeof Cn=="object"?Cn:{},{getContainer:wi}=ai,fi=gn(ai,["getContainer"]);return Object.assign(Object.assign({mask:Me.createElement("div",{className:`${Rn}-mask-info`},Me.createElement(Be.Z,null),Mi==null?void 0:Mi.preview),icons:At},fi),{getContainer:wi||Gn,transitionName:(0,Lt.m)(li,"zoom",ai.transitionName),maskTransitionName:(0,Lt.m)(li,"fade",ai.maskTransitionName)})},[Cn,Mi]),un=Object.assign(Object.assign({},Jn==null?void 0:Jn.style),an);return zn(Me.createElement(dn,Object.assign({prefixCls:Rn,preview:Ai,rootClassName:Hi,className:ur,style:un},Bn)))};En.PreviewGroup=bt;var Un=En,Pn=()=>{const[zt,Yt]=(0,Me.useState)(""),[Cn,An]=(0,Me.useState)(0);let[Vt,an]=(0,Me.useState)(),[Bn,Nn]=(0,Me.useState)();const[qn,Gn]=(0,Me.useState)(!1),Jn=(0,Me.useRef)("");(0,Me.useEffect)(()=>me.Z.subscribe("preview-image",wi=>{Yt(wi),console.log(Ai.current),document.body.style.overflow="hidden"}),[]),(0,Me.useEffect)(()=>(document.addEventListener("keydown",Rn),()=>{document.removeEventListener("keydown",Rn)}),[]),(0,Me.useEffect)(()=>{Jn.current=zt},[zt]);function Rn(ai){ai.keyCode==27&&Jn.current&&li()}function li(){document.body.style.overflow="auto",an(void 0),Nn(void 0),An(0),Yt("")}function Mi(){An(Cn+90)}function zn(){Vt=Ai.current.width*1.1,Bn=Ai.current.height*1.1,Nn(Bn),an(Vt)}function si(){Vt=Ai.current.width/1.1,Bn=Ai.current.height/1.1,Nn(Bn),an(Vt)}const Hi=(0,Me.useRef)(),ur=(0,Me.useRef)(),Ai=(0,Me.useRef)(),un=ai=>{(ai.nativeEvent.target===Hi.current||ai.nativeEvent.target===ur.current)&&li()};return Me.createElement(Me.Fragment,null,zt?Me.createElement("div",null,Me.createElement("div",{className:"preview-wrp-group",ref:ur},Me.createElement(Un,{className:"image-preview",src:zt,style:{display:"none"},preview:{visible:!0,src:zt,movable:!1,onVisibleChange:ai=>{Yt("")}},alt:"\u9884\u89C8\u5927\u56FE"}))):null)}},36866:function(Ln,tn,Ee){"use strict";Ee.d(tn,{h:function(){return ye},Z:function(){return ue}});var Me=Ee(59301),me=Ee(57809),Be=Ee(78241),ke=Ee(3113),Pe=Ee(89780),Le=Ee.n(Pe),he=Ee(79906),Se=Object.defineProperty,xe=Object.defineProperties,ge=Object.getOwnPropertyDescriptors,le=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,ce=(we,be,Ae)=>be in we?Se(we,be,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):we[be]=Ae,z=(we,be)=>{for(var Ae in be||(be={}))ve.call(be,Ae)&&ce(we,Ae,be[Ae]);if(le)for(var Ae of le(be))de.call(be,Ae)&&ce(we,Ae,be[Ae]);return we},ee=(we,be)=>xe(we,ge(be));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:be})=>{const[Ae,De]=(0,Me.useState)("python");function ze(Ye){De(se[Ye][1])}function Ze(Ye){we(Ye)}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:Ye=>Ye.parentNode,onChange:ze},Object.keys(se).map(Ye=>Me.createElement(oe,{key:Ye,value:Ye},se[Ye][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(ye,{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:be},"\u53D6\u6D88")))};function ye({value:we,onChange:be,mode:Ae,options:De={}}){const ze=(0,Me.useRef)(),[Ze,Ye]=(0,Me.useState)();return(0,Me.useEffect)(()=>{if(Ze){let Ge=function(ft){const at=ft.getValue();be&&be(at)};return Ze.on("change",Ge),()=>{Ze.off("change",Ge)}}},[Ze,be]),(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));Ye(Ge)}},[ze.current,Ze]),Me.createElement("div",{className:"my-codemirror-container"},Me.createElement("textarea",{ref:ze}))}},23469:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return lo}});var Me=Ee(59301),me=Ee(89780),Be=Ee.n(me),ke=Ee(76374),Pe=Ee(79906),Le=Ee(6313),he=Ee(25717),Se=Ee(99498),xe=Ee(25419),ge=Ee(67549),le=Ee(25711),ve=({value:ln="",className:Ke,showTextOnly:qe,showLines:Xe,style:wt={}})=>{const At=(0,Me.useMemo)(()=>"",[ln]);return Me.createElement(Me.Fragment,null,Me.createElement("div",{dangerouslySetInnerHTML:{__html:At}}))},de=Ee(59301),ce=Object.defineProperty,z=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,ue=(ln,Ke,qe)=>Ke in ln?ce(ln,Ke,{enumerable:!0,configurable:!0,writable:!0,value:qe}):ln[Ke]=qe,ye=(ln,Ke)=>{for(var qe in Ke||(Ke={}))ie.call(Ke,qe)&&ue(ln,qe,Ke[qe]);if(oe)for(var qe of oe(Ke))se.call(Ke,qe)&&ue(ln,qe,Ke[qe]);return ln},we=(ln,Ke)=>z(ln,ee(Ke));let be=[{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:ln,title:Ke,icon:qe,actionName:Xe,className:wt="",children:At}){function Nt(){ln(Xe)}return de.createElement("a",{title:Ke,className:wt,onClick:Nt},de.createElement("i",{className:`${qe}`}),At)}var De=({watch:ln,showNullButton:Ke,showNullProgramButton:qe,onActionCallback:Xe,fullScreen:wt,insertTemp:At,hidetoolBar:Nt,extraUse:bt})=>{const gn=[...be,{title:`${ln?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${ln?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return de.createElement("ul",{className:"markdown-toolbar-container"},!Nt&&gn.map((En,Un)=>de.createElement("li",{key:Un},En.actionName?de.createElement(Ae,we(ye({},En),{onActionCallback:Xe})):de.createElement("span",{className:"v-line"}))),Ke?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:Xe},de.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,qe?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:Xe},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:Xe},de.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,At&&de.createElement("li",null,de.createElement(Ae,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${At}`,onActionCallback:Xe},de.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),bt&&de.createElement("li",null,bt),de.createElement("li",{className:"btn-full-screen"},de.createElement(Ae,{icon:`${wt?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:wt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Xe})))},ze=Ee(50474),Ze=Ee(78241),Ye=Ee(92832),Ge=Ee(3113),ft=Object.defineProperty,at=Object.defineProperties,Pt=Object.getOwnPropertyDescriptors,tt=Object.getOwnPropertySymbols,vt=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable,jt=(ln,Ke,qe)=>Ke in ln?ft(ln,Ke,{enumerable:!0,configurable:!0,writable:!0,value:qe}):ln[Ke]=qe,lt=(ln,Ke)=>{for(var qe in Ke||(Ke={}))vt.call(Ke,qe)&&jt(ln,qe,Ke[qe]);if(tt)for(var qe of tt(Ke))st.call(Ke,qe)&&jt(ln,qe,Ke[qe]);return ln},et=(ln,Ke)=>at(ln,Pt(Ke));const ut={labelCol:{span:4},wrapperCol:{span:20}};var mt=({callback:ln,onCancel:Ke})=>{function qe(Xe){ln(Xe)}return Me.createElement(Ze.default,et(lt({},ut),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:qe,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(Ye.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(Ye.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:Ke},"\u53D6\u6D88")))},_t=Ee(36866),gt=Ee(56701),Bt=Ee(43418),Ht=Ee(95237),hn=Ee(65983),Qt=Ee(59301),bn=({callback:ln,onCancel:Ke})=>{const qe=document.createElement("canvas"),Xe=qe.getContext("2d");qe.width=1e3,qe.height=800,Xe.fillStyle="#ffffff",Xe.fillRect(0,0,qe.width,qe.height);const wt=qe.toDataURL("image/png");return Qt.createElement(Bt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Qt.createElement(Ht.Z,{style:{height:"100vh"}},Qt.createElement(hn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:wt,visible:!0,title:String(Date.now())},onOk:At=>{ln({src:At.url})},onClose:Ke})))},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 ln=this.diagram;return!(ln===null||ln.isReadOnly||ln.isModelReadOnly||ln.selection.count<2)},Kt.prototype.alignLeft=function(){var ln=this.diagram;ln.startTransaction("aligning left");var Ke=1/0;ln.selection.each(function(qe){qe instanceof go.Link||(Ke=Math.min(qe.position.x,Ke))}),ln.selection.each(function(qe){qe instanceof go.Link||qe.move(new go.Point(Ke,qe.position.y))}),ln.commitTransaction("aligning left")},Kt.prototype.alignRight=function(){var ln=this.diagram;ln.startTransaction("aligning right");var Ke=-1/0;ln.selection.each(function(qe){if(!(qe instanceof go.Link)){var Xe=qe.actualBounds.x+qe.actualBounds.width;Ke=Math.max(Xe,Ke)}}),ln.selection.each(function(qe){qe instanceof go.Link||qe.move(new go.Point(Ke-qe.actualBounds.width,qe.position.y))}),ln.commitTransaction("aligning right")},Kt.prototype.alignTop=function(){var ln=this.diagram;ln.startTransaction("alignTop");var Ke=1/0;ln.selection.each(function(qe){qe instanceof go.Link||(Ke=Math.min(qe.position.y,Ke))}),ln.selection.each(function(qe){qe instanceof go.Link||qe.move(new go.Point(qe.position.x,Ke))}),ln.commitTransaction("alignTop")},Kt.prototype.alignBottom=function(){var ln=this.diagram;ln.startTransaction("aligning bottom");var Ke=-1/0;ln.selection.each(function(qe){if(!(qe instanceof go.Link)){var Xe=qe.actualBounds.y+qe.actualBounds.height;Ke=Math.max(Xe,Ke)}}),ln.selection.each(function(qe){qe instanceof go.Link||qe.move(new go.Point(qe.actualBounds.x,Ke-qe.actualBounds.height))}),ln.commitTransaction("aligning bottom")},Kt.prototype.alignCenterX=function(){var ln=this.diagram,Ke=ln.selection.first();if(Ke){ln.startTransaction("aligning Center X");var qe=Ke.actualBounds.x+Ke.actualBounds.width/2;ln.selection.each(function(Xe){Xe instanceof go.Link||Xe.move(new go.Point(qe-Xe.actualBounds.width/2,Xe.actualBounds.y))}),ln.commitTransaction("aligning Center X")}},Kt.prototype.alignCenterY=function(){var ln=this.diagram,Ke=ln.selection.first();if(Ke){ln.startTransaction("aligning Center Y");var qe=Ke.actualBounds.y+Ke.actualBounds.height/2;ln.selection.each(function(Xe){Xe instanceof go.Link||Xe.move(new go.Point(Xe.actualBounds.x,qe-Xe.actualBounds.height/2))}),ln.commitTransaction("aligning Center Y")}},Kt.prototype.alignColumn=function(ln){var Ke=this.diagram;Ke.startTransaction("align Column"),ln===void 0&&(ln=0),ln=parseFloat(ln);var qe=new Array;Ke.selection.each(function(bt){bt instanceof go.Link||qe.push(bt)});for(var Xe=0;Xe<qe.length-1;Xe++){var wt=qe[Xe],At=wt.actualBounds.y+wt.actualBounds.height+ln,Nt=qe[Xe+1];Nt.move(new go.Point(wt.actualBounds.x,At))}Ke.commitTransaction("align Column")},Kt.prototype.alignRow=function(ln){ln===void 0&&(ln=0),ln=parseFloat(ln);var Ke=this.diagram;Ke.startTransaction("align Row");var qe=new Array;Ke.selection.each(function(bt){bt instanceof go.Link||qe.push(bt)});for(var Xe=0;Xe<qe.length-1;Xe++){var wt=qe[Xe],At=wt.actualBounds.x+wt.actualBounds.width+ln,Nt=qe[Xe+1];Nt.move(new go.Point(At,wt.actualBounds.y))}Ke.commitTransaction("align Row")},Kt.prototype.canRotate=function(ln){var Ke=this.diagram;return!(Ke===null||Ke.isReadOnly||Ke.isModelReadOnly||Ke.selection.count<1)},Kt.prototype.rotate=function(ln){ln===void 0&&(ln=90);var Ke=this.diagram;Ke.startTransaction("rotate "+ln.toString());var Ke=this.diagram;Ke.selection.each(function(qe){qe instanceof go.Link||qe instanceof go.Group||(qe.angle+=ln)}),Ke.commitTransaction("rotate "+ln.toString())},Kt.prototype.pullToFront=function(){var ln=this.diagram;ln.startTransaction("pullToFront");var Ke=new go.Map;ln.selection.each(function(qe){Ke.set(qe.layer,0)}),Ke.iteratorKeys.each(function(qe){var Xe=0;qe.parts.each(function(wt){if(!wt.isSelected){var At=wt.zOrder;isNaN(At)?wt.zOrder=0:Xe=Math.max(Xe,At)}}),Ke.set(qe,Xe)}),ln.selection.each(function(qe){Kt._assignZOrder(qe,Ke.get(qe.layer)+1)}),ln.commitTransaction("pullToFront")},Kt.prototype.pushToBack=function(){var ln=this.diagram;ln.startTransaction("pushToBack");var Ke=new go.Map;ln.selection.each(function(qe){Ke.set(qe.layer,0)}),Ke.iteratorKeys.each(function(qe){var Xe=0;qe.parts.each(function(wt){if(!wt.isSelected){var At=wt.zOrder;isNaN(At)?wt.zOrder=0:Xe=Math.min(Xe,At)}}),Ke.set(qe,Xe)}),ln.selection.each(function(qe){Kt._assignZOrder(qe,Ke.get(qe.layer)-1-Kt._findGroupDepth(qe))}),ln.commitTransaction("pushToBack")},Kt._assignZOrder=function(ln,Ke,qe){qe===void 0&&(qe=ln),ln.layer===qe.layer&&(ln.zOrder=Ke),ln instanceof go.Group&&ln.memberParts.each(function(Xe){Kt._assignZOrder(Xe,Ke+1,qe)})},Kt._findGroupDepth=function(ln){if(ln instanceof go.Group){var Ke=0;return ln.memberParts.each(function(qe){Ke=Math.max(Ke,Kt._findGroupDepth(qe))}),Ke+1}else return 0},Kt.prototype.doKeyDown=function(){var ln=this.diagram;if(ln!==null){var Ke=ln.lastInput;if(Ke.key==="Up"||Ke.key==="Down"||Ke.key==="Left"||Ke.key==="Right"){var qe=this.arrowKeyBehavior;if(qe==="none")return;if(qe==="select"){this._arrowKeySelect();return}else if(qe==="move"){this._arrowKeyMove();return}else if(qe==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},Kt.prototype._getAllParts=function(){var ln=new Array;return this.diagram.nodes.each(function(Ke){ln.push(Ke)}),this.diagram.parts.each(function(Ke){ln.push(Ke)}),ln},Kt.prototype._arrowKeyMove=function(){var ln=this.diagram,Ke=ln.lastInput,qe=0,Xe=0;if(Ke.control||Ke.meta)qe=1,Xe=1;else if(ln.grid!==null){var wt=ln.grid.gridCellSize;Xe=wt.width,qe=wt.height}ln.startTransaction("arrowKeyMove"),ln.selection.each(function(At){Ke.key==="Up"?At.move(new go.Point(At.actualBounds.x,At.actualBounds.y-qe)):Ke.key==="Down"?At.move(new go.Point(At.actualBounds.x,At.actualBounds.y+qe)):Ke.key==="Left"?At.move(new go.Point(At.actualBounds.x-Xe,At.actualBounds.y)):Ke.key==="Right"&&At.move(new go.Point(At.actualBounds.x+Xe,At.actualBounds.y))}),ln.commitTransaction("arrowKeyMove")},Kt.prototype._arrowKeySelect=function(){var ln=this.diagram,Ke=ln.lastInput,qe=null;Ke.key==="Up"?qe=this._findNearestPartTowards(270):Ke.key==="Down"?qe=this._findNearestPartTowards(90):Ke.key==="Left"?qe=this._findNearestPartTowards(180):Ke.key==="Right"&&(qe=this._findNearestPartTowards(0)),qe!==null&&(Ke.shift?qe.isSelected=!0:Ke.control||Ke.meta?qe.isSelected=!qe.isSelected:ln.select(qe))},Kt.prototype._findNearestPartTowards=function(ln){var Ke=this.diagram.selection.first();if(Ke===null)return null;for(var qe=Ke.actualBounds.center,Xe=this._getAllParts(),wt=1/0,At=Ke,Nt=0;Nt<Xe.length;Nt++){var bt=Xe[Nt];if(bt!==Ke&&bt.canSelect()){var gn=bt.actualBounds.center,En=qe.directionPoint(gn),Un=this._angleCloseness(En,ln);if(Un<=45){var Pn=qe.distanceSquaredPoint(gn);Pn*=1+Math.sin(Un*Math.PI/180),Pn<wt&&(wt=Pn,At=bt)}}}return At},Kt.prototype._angleCloseness=function(ln,Ke){return Math.min(Math.abs(Ke-ln),Math.min(Math.abs(Ke+360-ln),Math.abs(Ke-360-ln)))},Kt.prototype._arrowKeyTree=function(){var ln=this.diagram,Ke=ln.selection.first();if(Ke instanceof go.Node){var qe=ln.lastInput;if(qe.key==="Right"){if(!Ke.isTreeLeaf)if(!Ke.isTreeExpanded)ln.commandHandler.canExpandTree(Ke)&&ln.commandHandler.expandTree(Ke);else{var Xe=this._sortTreeChildrenByY(Ke).first();Xe!==null&&ln.select(Xe)}}else if(qe.key==="Left")if(!Ke.isTreeLeaf&&Ke.isTreeExpanded)ln.commandHandler.canCollapseTree(Ke)&&ln.commandHandler.collapseTree(Ke);else{var wt=Ke.findTreeParentNode();wt!==null&&ln.select(wt)}else if(qe.key==="Up"){var wt=Ke.findTreeParentNode();if(wt!==null){var At=this._sortTreeChildrenByY(wt),Nt=At.indexOf(Ke);if(Nt>0){for(var bt=At.elt(Nt-1);bt!==null&&bt.isTreeExpanded&&!bt.isTreeLeaf;){var gn=this._sortTreeChildrenByY(bt);bt=gn.last()}bt!==null&&ln.select(bt)}else ln.select(wt)}}else if(qe.key==="Down")if(Ke.isTreeExpanded&&!Ke.isTreeLeaf){var Xe=this._sortTreeChildrenByY(Ke).first();Xe!==null&&ln.select(Xe)}else for(;Ke!==null;){var wt=Ke.findTreeParentNode();if(wt===null)break;var At=this._sortTreeChildrenByY(wt),Nt=At.indexOf(Ke);if(Nt<At.length-1){ln.select(At.elt(Nt+1));break}else Ke=wt}var En=ln.selection.first();En!==null&&ln.scrollToRect(En.actualBounds)}},Kt.prototype._sortTreeChildrenByY=function(ln){var Ke=new go.List().addAll(ln.findTreeChildrenNodes());return Ke.sort(function(qe,Xe){var wt=qe.location,At=Xe.location;return wt.y<At.y?-1:wt.y>At.y?1:wt.x<At.x?-1:wt.x>At.x?1:0}),Ke},Kt.prototype.copyToClipboard=function(ln){go.CommandHandler.prototype.copyToClipboard.call(this,ln),this._lastPasteOffset.set(this.pasteOffset)},Kt.prototype.pasteFromClipboard=function(){var ln=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(ln,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),ln},Object.defineProperty(Kt.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(ln){if(ln!=="move"&&ln!=="select"&&ln!=="scroll"&&ln!=="tree"&&ln!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+ln);this._arrowKeyBehavior=ln}}),Object.defineProperty(Kt.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(ln){if(!(ln instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+ln);this._pasteOffset.set(ln)}});var Jt=Kt,dn=Ee(37404),Lt=Ee(43604),pt=Ee(70635),Rt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},St=Ee(59301),yt=(ln,Ke,qe)=>new Promise((Xe,wt)=>{var At=gn=>{try{bt(qe.next(gn))}catch(En){wt(En)}},Nt=gn=>{try{bt(qe.throw(gn))}catch(En){wt(En)}},bt=gn=>gn.done?Xe(gn.value):Promise.resolve(gn.value).then(At,Nt);bt((qe=qe.apply(ln,Ke)).next())});function nt({onCancel:ln,callback:Ke}){let qe=(0,Me.useRef)(),Xe=(0,Me.useRef)(),wt=(0,Me.useRef)(),At=(0,Me.useRef)(!1);const Nt=(0,Me.useRef)(!1),[bt,gn]=(0,Me.useState)(0);function En(){const Pn=Wt.bx.make,zt={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"};qe.current=new Wt.S0(Xe.current,{padding:20,grid:Pn(Wt.s_,"Grid",Pn(Wt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Pn(Wt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:un=>{var ai=un.diagram.commandHandler.addTopLevelParts(un.diagram.selection,!0);ai||un.diagram.currentTool.doCancel()},commandHandler:Pn(Jt),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:un=>{var ai=un.subject;ai.location=ai.location.copy().snapToGridPoint(un.diagram.grid.gridOrigin,un.diagram.grid.gridCellSize),setTimeout(()=>{un.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:un=>{var ai=un.subject;setTimeout(()=>{un.diagram.commandHandler.editTextBlock()})},LinkRelinked:un=>{var ai=un.parameter.part;ai.invalidateConnectedLinks();var wi=un.subject;un.diagram.toolManager.linkingTool.isForwards?wi.toNode.invalidateConnectedLinks():wi.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),qe.current.nodeTemplate=Pn(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),Pn(Wt.bn,{name:"SHAPE",fill:zt.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")),Pn(Wt.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Pn(Wt.al,{margin:1,textAlign:"center",overflow:Wt.al.OverflowEllipsis,editable:!0},new Wt.KX("text").makeTwoWay(),new Wt.KX("stroke","color"))),qe.current.nodeTemplate.toolTip=Pn("ToolTip",Pn(Wt.s_,"Vertical",{maxSize:new Wt.$u(200,NaN)},Pn(Wt.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Wt.KX("text")),Pn(Wt.al,{font:"10pt sans-serif",textAlign:"center"},new Wt.KX("text","details"))));function Yt(un,ai){var wi=(fi,Wi)=>{fi.handled=!0,fi.diagram.model.commit(Ni=>{var lr=Wi.part.adornedPart,Fi=new Wt.E9().setRectSpot(lr.actualBounds,un);Fi.subtract(lr.location),Fi.scale(2,2),Fi.x+=Math.sign(Fi.x)*130,Fi.y+=Math.sign(Fi.y)*130,Fi.add(lr.location),Fi.snapToGridPoint(fi.diagram.grid.gridOrigin,fi.diagram.grid.gridCellSize);var $i=Ni.copyNodeData(lr.data);Ni.setGroupKeyForNodeData($i,Ni.getGroupKeyForNodeData(lr.data)),Ni.addNodeData($i);var Lr={from:lr.key,to:Ni.getKeyForNodeData($i)};Ni.addLinkData(Lr);var On=fi.diagram.findNodeForData($i);On.location=Fi,fi.diagram.select(On),setTimeout(()=>{fi.diagram.commandHandler.editTextBlock()},20)})};return Pn(Wt.bn,{figure:ai,alignment:un,alignmentFocus:un.opposite(),width:un.equals(Wt.z6.Top)||un.equals(Wt.z6.Bottom)?25:18,height:un.equals(Wt.z6.Top)||un.equals(Wt.z6.Bottom)?18:25,fill:"orange",stroke:zt.white,strokeWidth:4,mouseEnter:(fi,Wi)=>Wi.fill="dodgerblue",mouseLeave:(fi,Wi)=>Wi.fill="orange",isActionable:!0,click:wi,contextClick:wi})}function Cn(un){return Pn(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:(ai,wi)=>wi.fill="dodgerblue",mouseLeave:(ai,wi)=>wi.fill="orange",click:(ai,wi)=>{ai.diagram.commandHandler.showContextMenu(wi.part.adornedPart)}},un||{})}qe.current.nodeTemplate.selectionAdornmentTemplate=Pn(Wt.uz,"Spot",Pn(Wt.Vm,{padding:10}),Yt(Wt.z6.Top,"TriangleUp"),Yt(Wt.z6.Left,"TriangleLeft"),Yt(Wt.z6.Right,"TriangleRight"),Yt(Wt.z6.Bottom,"TriangleDown"),Cn({alignment:new Wt.z6(.75,0)}));function An(un,ai){return(wi,fi)=>{wi.handled=!0,wi.diagram.model.commit(Wi=>{Wi.set(fi.part.adornedPart.data,un,ai)})}}function Vt(un,ai){return ai||(ai="color"),Pn(Wt.bn,{width:16,height:16,stroke:"lightgray",fill:un,margin:1,background:"transparent",mouseEnter:(wi,fi)=>fi.stroke="dodgerblue",mouseLeave:(wi,fi)=>fi.stroke="lightgray",click:An(ai,un),contextClick:An(ai,un)})}function an(){return[Pn("ContextMenuButton",Pn(Wt.s_,"Horizontal",Vt(zt.white,"fill"),Vt(zt.beige,"fill"),Vt(zt.extralightblue,"fill"),Vt(zt.extralightred,"fill"))),Pn("ContextMenuButton",Pn(Wt.s_,"Horizontal",Vt(zt.lightgray,"fill"),Vt(zt.lightgreen,"fill"),Vt(zt.lightblue,"fill"),Vt(zt.lightred,"fill")))]}function Bn(){return[Pn("ContextMenuButton",Pn(Wt.s_,"Horizontal",Vt(zt.black),Vt(zt.green),Vt(zt.blue),Vt(zt.red))),Pn("ContextMenuButton",Pn(Wt.s_,"Horizontal",Vt(zt.white),Vt(zt.magenta),Vt(zt.purple),Vt(zt.orange)))]}function Nn(un,ai){return ai||(ai="thickness"),Pn(Wt.bn,"LineH",{width:16,height:16,strokeWidth:un,margin:1,background:"transparent",mouseEnter:(wi,fi)=>fi.background="dodgerblue",mouseLeave:(wi,fi)=>fi.background="transparent",click:An(ai,un),contextClick:An(ai,un)})}function qn(un,ai){return ai||(ai="dash"),Pn(Wt.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:un,margin:1,background:"transparent",mouseEnter:(wi,fi)=>fi.background="dodgerblue",mouseLeave:(wi,fi)=>fi.background="transparent",click:An(ai,un),contextClick:An(ai,un)})}function Gn(){return[Pn("ContextMenuButton",Pn(Wt.s_,"Horizontal",Nn(1),Nn(2),Nn(3),Nn(4))),Pn("ContextMenuButton",Pn(Wt.s_,"Horizontal",qn(null),qn([2,4]),qn([4,4])))]}function Jn(un,ai){return ai||(ai="figure"),Pn(Wt.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:un,margin:1,background:"transparent",mouseEnter:(wi,fi)=>fi.fill="dodgerblue",mouseLeave:(wi,fi)=>fi.fill="lightgray",click:An(ai,un),contextClick:An(ai,un)})}qe.current.nodeTemplate.contextMenu=Pn("ContextMenu",Pn("ContextMenuButton",Pn(Wt.s_,"Horizontal",Jn("Rectangle"),Jn("RoundedRectangle"),Jn("Ellipse"),Jn("Diamond"))),Pn("ContextMenuButton",Pn(Wt.s_,"Horizontal",Jn("Parallelogram2"),Jn("ManualOperation"),Jn("Procedure"),Jn("Cylinder1"))),Pn("ContextMenuButton",Pn(Wt.s_,"Horizontal",Jn("Terminator"),Jn("CreateRequest"),Jn("Document"),Jn("TriangleDown"))),an(),Bn(),Gn()),qe.current.groupTemplate=Pn(Wt.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Wt.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(un,ai)=>{var wi=ai.addMembers(ai.diagram.selection,!0);wi||ai.diagram.currentTool.doCancel()},avoidable:!1},new Wt.KX("location","loc",Wt.E9.parse).makeTwoWay(Wt.E9.stringify),Pn(Wt.s_,"Auto",{name:"BODY"},Pn(Wt.bn,{parameter1:10,fill:zt.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")),Pn(Wt.Vm,{background:"transparent",margin:20})),Pn(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"))),qe.current.groupTemplate.selectionAdornmentTemplate=Pn(Wt.uz,"Spot",Pn(Wt.s_,"Auto",Pn(Wt.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Pn(Wt.Vm,{margin:1.5})),Cn({alignment:Wt.z6.TopRight,alignmentFocus:Wt.z6.BottomRight})),qe.current.groupTemplate.contextMenu=Pn("ContextMenu",an(),Bn(),Gn()),qe.current.linkTemplate=Pn(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",un=>un>=1?10:0),new Wt.KX("toShortLength","dir",un=>un>=1?10:0),new Wt.KX("points").makeTwoWay(),Pn(Wt.bn,{strokeWidth:2},new Wt.KX("stroke","color"),new Wt.KX("strokeWidth","thickness"),new Wt.KX("strokeDashArray","dash")),Pn(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",un=>un===1)),Pn(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",un=>un>=1),new Wt.KX("width","thickness",un=>7+3*un),new Wt.KX("height","thickness",un=>7+3*un),new Wt.KX("segmentOffset","thickness",un=>new Wt.E9(-15,4+1.5*un))),Pn(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",un=>un===2),new Wt.KX("width","thickness",un=>7+3*un),new Wt.KX("height","thickness",un=>7+3*un),new Wt.KX("segmentOffset","thickness",un=>new Wt.E9(-15,4+1.5*un))),Pn(Wt.al,{alignmentFocus:new Wt.z6(0,1,-4,0),editable:!0},new Wt.KX("text").makeTwoWay(),new Wt.KX("stroke","color"))),qe.current.linkTemplate.selectionAdornmentTemplate=Pn(Wt.uz,Pn(Wt.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Rn(2)},new Wt.KX("pathPattern","thickness",Rn)),Cn({alignmentFocus:new Wt.z6(0,0,-6,-4)}));function Rn(un){return Pn(Wt.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(un+4).toString()+" H3"})}function li(un){var ai="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return un===0?ai="M0 0 M16 16 M0 8 L16 8":un===2&&(ai="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Pn(Wt.bn,{geometryString:ai,margin:2,background:"transparent",mouseEnter:(wi,fi)=>fi.background="dodgerblue",mouseLeave:(wi,fi)=>fi.background="transparent",click:An("dir",un),contextClick:An("dir",un)})}function Mi(un){var ai=(wi,fi)=>{wi.handled=!0,wi.diagram.model.commit(Wi=>{var Ni=fi.part.adornedPart;Wi.set(Ni.data,un?"toSpot":"fromSpot",Wt.z6.stringify(Wt.z6.AllSides)),(un?Ni.toNode:Ni.fromNode).invalidateConnectedLinks()})};return Pn(Wt.bn,{width:12,height:12,fill:"transparent",mouseEnter:(wi,fi)=>fi.background="dodgerblue",mouseLeave:(wi,fi)=>fi.background="transparent",click:ai,contextClick:ai})}function zn(un,ai){var wi=0,fi=Wt.z6.RightSide;un.equals(Wt.z6.Top)?(wi=270,fi=Wt.z6.TopSide):un.equals(Wt.z6.Left)?(wi=180,fi=Wt.z6.LeftSide):un.equals(Wt.z6.Bottom)&&(wi=90,fi=Wt.z6.BottomSide),ai||(wi-=180);var Wi=(Ni,lr)=>{Ni.handled=!0,Ni.diagram.model.commit(Fi=>{var $i=lr.part.adornedPart;Fi.set($i.data,ai?"toSpot":"fromSpot",Wt.z6.stringify(fi)),(ai?$i.toNode:$i.fromNode).invalidateConnectedLinks()})};return Pn(Wt.bn,{alignment:un,alignmentFocus:un.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:wi,background:"transparent",mouseEnter:(Ni,lr)=>lr.background="dodgerblue",mouseLeave:(Ni,lr)=>lr.background="transparent",click:Wi,contextClick:Wi})}qe.current.linkTemplate.contextMenu=Pn("ContextMenu",Bn(),Gn(),Pn("ContextMenuButton",Pn(Wt.s_,"Horizontal",li(0),li(1),li(2))),Pn("ContextMenuButton",Pn(Wt.s_,"Horizontal",Pn(Wt.s_,"Spot",Mi(!1),zn(Wt.z6.Top,!1),zn(Wt.z6.Left,!1),zn(Wt.z6.Right,!1),zn(Wt.z6.Bottom,!1)),Pn(Wt.s_,"Spot",{margin:new Wt.Zt(0,0,0,2)},Mi(!0),zn(Wt.z6.Top,!0),zn(Wt.z6.Left,!0),zn(Wt.z6.Right,!0),zn(Wt.z6.Bottom,!0)))));const si=`{ "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 Hi=["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 ur(un){return console.log("shapeName:",un),Hi.indexOf(un)>=0}var Ai=new Wt.YI(wt.current,{maxSelectionCount:1,linkTemplate:Pn(Wt.rU,{locationSpot:Wt.z6.Center,selectionAdornmentTemplate:Pn(Wt.uz,"Link",{locationSpot:Wt.z6.Center},Pn(Wt.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Pn(Wt.bn,{toArrow:"Standard",stroke:null}))},{routing:Wt.rU.AvoidsNodes,curve:Wt.rU.JumpOver,corner:5,toShortLength:4},new Wt.KX("points"),Pn(Wt.bn,{isPanelMain:!0,strokeWidth:2}),Pn(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(un=>({text:"\u672A\u547D\u540D",size:"100 100",figure:un.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return qe.current.addDiagramListener("TextEdited",function(un){var ai;const wi=un.subject.part;var fi=(ai=document.activeElement)==null?void 0:ai.value;typeof fi=="string"&&fi.trim()===""&&qe.current.model.commit(function(Wi){Wi.set(wi.data,"text","\u672A\u547D\u540D"),qe.current.commandHandler.stopCommand()},"increment")}),Ai.nodeTemplate=Pn(Wt.NB,"Auto",{locationSpot:Wt.z6.Center},new Wt.KX("location","location",Wt.E9.parse).makeTwoWay(Wt.E9.stringify),Pn(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")),Pn(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(()=>{qe.current.grid=Pn(Wt.s_,"Grid",Pn(Wt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Pn(Wt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),qe.current.grid.visible=!0,qe.current.grid.gridCellStroke="darkgray",qe.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=qe.current,qe.current}const Un=()=>yt(this,null,function*(){var Pn=qe.current.makeImage();const zt=yield(0,pt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:Pn.src}});Ke({src:zt.url})});return(0,Me.useEffect)(()=>(setTimeout(()=>{En()},500),gn(bt+1),()=>{qe.current=null}),[]),St.createElement("div",{ref:Nt,className:At.current?`${Rt.maxH60} body-overflow-initial`:"body-overflow-initial"},St.createElement(Bt.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!bt,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:St.createElement(Ht.Z,null,St.createElement(Lt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),St.createElement(Lt.Z,{onClick:()=>{var Pn,zt,Yt=qe.current.selection.first();if(At.current=!At.current,document.activeElement&&Yt){let Cn=(zt=(Pn=document.activeElement)==null?void 0:Pn.value)==null?void 0:zt.trim();typeof Cn=="string"&&qe.current.model.commit(function(An){An.set(Yt.data,"text",Cn||"\u672A\u547D\u540D"),qe.current.commandHandler.stopCommand()},"increment")}gn(bt+1)}},St.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:ln},St.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:Rt.flowChartWrp},St.createElement("div",{style:{display:"flex",height:"100%"}},St.createElement("div",{style:{width:"300px",height:"100%"}},St.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),St.createElement("div",{style:{height:"calc(100% - 50px)"},className:Rt.myPaletteDiv,ref:wt})),St.createElement("div",{style:{flex:1,position:"relative"}},St.createElement("div",{ref:Xe,style:{height:"80vh"}}))),St.createElement("div",{className:"tr"},St.createElement(Ge.ZP,{size:"large",onClick:Un,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var He=nt,Ie=Ee(5112),We=Ee(88897);const Oe=Ie.ZP.Group,Ce={margin:"0 8px"};var Ne=({callback:ln,onCancel:Ke})=>{function qe(Xe){ln(Xe)}return Me.createElement(Ze.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:qe},Me.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},Me.createElement("span",{style:Ce},"\u5355\u5143\u683C\u6570\uFF1A"),Me.createElement("span",{style:Ce},"\u884C\u6570"),Me.createElement(Ze.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},Me.createElement(We.Z,null)),Me.createElement("span",{style:Ce},"\u5217\u6570"),Me.createElement(Ze.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},Me.createElement(We.Z,null))),Me.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},Me.createElement("span",{style:Ce},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),Me.createElement(Ze.default.Item,{name:"align"},Me.createElement(Oe,null,Me.createElement(Ie.ZP,{value:"default"},Me.createElement("i",{className:"fa fa-align-justify"})),Me.createElement(Ie.ZP,{value:"left"},Me.createElement("i",{className:"fa fa-align-left"})),Me.createElement(Ie.ZP,{value:"center"},Me.createElement("i",{className:"fa fa-align-center"})),Me.createElement(Ie.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:Ke},"\u53D6\u6D88")))},$e=Ee(78673),dt=Ee(98598),Je=Ee.n(dt),qt=(0,Me.forwardRef)(({use3d:ln,width:Ke,height:qe,callback:Xe,showSaveButton:wt},At)=>{const Nt=(0,Me.useRef)(),bt=(0,Me.useRef)(),[gn,En]=(0,Me.useState)(!1),Un=(0,Me.useRef)({id:Nt,appName:"graphing",width:Ke||1e3,height:qe||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)(()=>{bt.current=new(Je())(Un.current,!0),window.onload=function(){bt.current.inject("applet_container")}},[]);const Pn=()=>{var zt=window.ggbApplet.getPNGBase64(1,!0,72);return Xe&&Xe(zt),zt};return(0,Me.useEffect)(()=>{Un.current.appName=gn?"3D":"graphing",bt.current.inject("applet_container")},[gn]),(0,Me.useEffect)(()=>{En(ln)},[ln]),(0,Me.useImperativeHandle)(At,()=>({getImgData:Pn})),Me.createElement(Me.Fragment,null,Me.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Nt}),Me.createElement(Ht.Z,{align:"middle"},Me.createElement(Lt.Z,{flex:1},Me.createElement($e.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:gn,onChange:zt=>En(zt)})),Me.createElement(Lt.Z,null,Me.createElement(Ge.ZP,{size:"large",onClick:Pn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),yn=Ee(75890),rn=Ee(8591);const pn="link",Fn="upload-image",kn="add-flowchart",oi="draw-image",ri="add-flowchart",Ti="code-block",mi="add-table",Qi="------------",ir={default:Qi,left:`:${Qi}`,center:`:${Qi}:`,right:`${Qi}:`};var fr=Ee(91300);function er(){}let Mr=0;const qr=1e4,di="\u2581",xr="@\u2581\u2581@",zi="@\u2581@",rt=`
|
|
|
**\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`,zr=["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 hr(ln){return/^\d+$/.test(ln)?`${ln}px`:ln}const co=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",yo={[co+"-B"]:"bold",[co+"-I"]:"italic"},eo={[pn]:"\u6DFB\u52A0\u94FE\u63A5",[Ti]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Fn]:"\u6DFB\u52A0\u56FE\u7247",[oi]:"\u6DFB\u52A0\u753B\u56FE",[kn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[mi]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var lo=({defaultValue:ln="",onChange:Ke,width:qe="100%",height:Xe=400,miniToolbar:wt=!1,isFocus:At=!1,watch:Nt,insertTemp:bt,mode:gn="markdown",id:En="markdown-editor-id",showResizeBar:Un=!1,noStorage:Pn=!1,showNullButton:zt=!1,showNullProgramButton:Yt=!1,hidetoolBar:Cn=!1,fullScreen:An=!1,onBlur:Vt,onCMBeforeChange:an,onFullScreen:Bn,className:Nn="",disablePaste:qn=!1,disabled:Gn=!1,disabledFill:Jn=!1,placeholder:Rn="",values:li="",extraUse:Mi})=>{const[zn,si]=(0,Me.useState)(null),[Hi,ur]=(0,Me.useState)(ln),[Ai,un]=(0,Me.useState)(Nt),[ai,wi]=(0,Me.useState)(An),[fi,Wi]=(0,Me.useState)(""),[Ni,lr]=(0,Me.useState)(0),[Fi,$i]=(0,Me.useState)(Xe),[Lr,On]=(0,Me.useState)(!1),[Kr,In]=(0,Me.useState)(0),[br,xo]=(0,Me.useState)(0),Cr=(0,Me.useRef)(),Fo=(0,Me.useRef)(),oo=(0,Me.useRef)(),Ki=(0,Me.useRef)();(0,Me.useEffect)(()=>{const qi=window.scrollY||window.pageYOffset;ur(li),zn==null||zn.setValue(li),window.scrollTo(0,qi)},[li]),(0,Me.useEffect)(()=>{Bn==null||Bn(ai)},[ai]),(0,Me.useEffect)(()=>{if(Cr.current){let qi=function(rr,Yn){var Vr;if(qn){Yn.preventDefault();return}const Eo=Yn.clipboardData;if(Eo){const rs=Eo.types.toString(),Lo=Eo.items;if(rs==="Files"||Eo.types.indexOf("Files")>-1){if(Yn.preventDefault(),gn=="stex")return;try{let is=Lo[1];((Vr=Lo[0])==null?void 0:Vr.kind)==="file"&&(is=Lo[0]);const ms=is.getAsFile(),Ls=ms.name.split(".").pop();(0,gt.I)(ms,ws=>{var ta,aa,Tn;ws.id?((ta=ms==null?void 0:ms.type)==null?void 0:ta.indexOf("image"))>-1?Ui.replaceSelection(``):((aa=ms==null?void 0:ms.type)==null?void 0:aa.indexOf("video"))>-1?Ui.replaceSelection(`<video width="100%" controls src="/api/attachments/${ws.id}"></video>`):((Tn=ms==null?void 0:ms.type)==null?void 0:Tn.indexOf("pdf"))>-1?Ui.replaceSelection(`<a href="/api/attachments/${ws.id}?type=${ms.type}&disposition=inline" target="_blank">${ms.name}</a>`):zr.includes(Ls)?Ui.replaceSelection(`<a href="/api/attachments/${ws.id}?type=office&disposition=inline" target="_blank">${ms.name}</a>`):Ui.replaceSelection(`[${ms.name}](/api/attachments/${ws.id}?type=${ws.content_type})`):(ws==null?void 0:ws.status)===401&&(document.location.href="/user/login")})}catch(is){rn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Ui=Be().fromTextArea(Cr.current,{mode:gn,lineNumbers:!wt,lineWrapping:!0,value:ln,autoCloseTags:!0,autoCloseBrackets:!0});return Ui.on("keyup",function(rr,Yn){Yn.keyCode===8&&(rr.getValue()==""?Ui.setOption("placeholder",Rn):Ui.setOption("placeholder",null))}),Ui.on("keydown",function(rr,Yn){if(Yn.keyCode===8){var Vr=pr(rr);Vr&&Yn.preventDefault()}}),At&&Ui.focus(),Ui.on("paste",qi),Gn&&Ui.on("beforeChange",function(rr,Yn){(Yn.origin==="paste"||Yn.origin==="+input")&&Yn.cancel()}),si(Ui),()=>{Ui.off("paste",qi)}}},[]);const Ji=(0,Me.useCallback)(()=>{if(Fo.current)try{}catch(qi){console.log(qi,"---- to set md editor body height")}},[Fi,Fo,ai]);(0,Me.useEffect)(()=>{function qi(){let Ui=new ke.Z(rr=>{for(let Yn of rr)(Yn.target.offsetHeight>0||Yn.target.offsetWidth>0)&&(Ji(),zn.setSize("100%","100%"),zn.refresh())});return Ui.observe(Cr.current.parentElement),Ui}if(zn){const Ui=qi();return()=>{var rr,Yn;(rr=Cr.current)!=null&&rr.parentElement&&Ui.unobserve((Yn=Cr.current)==null?void 0:Yn.parentElement)}}},[zn,Ji]),(0,Me.useEffect)(()=>{if(zn){let qi=[];for(const[Ui,rr]of Object.entries(yo)){let Yn={[Ui]:()=>{kr(rr)}};qi.push(Yn),zn.addKeyMap(Yn)}return()=>{for(let Ui of qi)zn.removeKeyMap(Ui)}}},[zn]),(0,Me.useEffect)(()=>{An!==ai&&wi(An)},[An]),(0,fr.Z)(()=>{if(!Pn&&Ni>0){let qi=new Date().getTime(),Ui=window.sessionStorage.getItem(En);qi>=Ni+qr&&(!Ui||Ui!==Hi)&&(window.sessionStorage.setItem(En,Hi),On(!0))}},qr),(0,Me.useEffect)(()=>{un(Nt)},[zn,Nt]),(0,Me.useEffect)(()=>{zn&&At&&zn.focus()},[zn,At]),(0,Me.useEffect)(()=>{if(Ai&&zn){let qi=function(rr){let Yn=rr.target;if(Ki.current){let Vr=Yn.scrollTop/Yn.scrollHeight;Ki.current.scrollTop=Ki.current.scrollHeight*Vr}};const Ui=zn.getScrollerElement();return Ui.addEventListener("scroll",qi),()=>{Ui.removeEventListener("scroll",qi)}}},[zn,Ai]),(0,Me.useEffect)(()=>{if(zn&&an){let qi=function(Ui,rr){an(Ui,rr)};return zn.on("beforeChange",qi),()=>{zn.off("beforeChange",qi)}}},[zn,an]),(0,Me.useEffect)(()=>{if(zn&&Vt){let qi=function(){Vt(zn.getValue())};return zn.on("blur",qi),()=>{zn.off("blur",qi)}}},[zn,Vt]);function pr(qi,Ui){var rr=qi.getDoc(),Yn=rr.getCursor(),Vr=rr.getLine(Yn.line),Eo=Vr.charAt(Yn.ch-1),rs=Vr.lastIndexOf("@\u2581@",Yn.ch),Lo=Vr.lastIndexOf("@\u2581\u2581@",Yn.ch),is=rs>Lo?rs:Lo,ms=rs>Lo?3:4;if(xr.indexOf(Eo)===-1)return null;if(console.log("change1:",Ui,qi,Vr,Yn,is,rs,Lo,Eo),is>=0&&Yn.ch-is<5){var Ls=is+ms;return rr.replaceRange("",{line:Yn.line,ch:is},{line:Yn.line,ch:Ls}),{line:Yn.line,ch:Ls}}return null}(0,Me.useEffect)(()=>{if(zn){let qi=function(Ui,rr){const Yn=Ui.getValue();ur(Yn),lr(new Date().getTime()),Ui.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ke&&(Yt?Ke(Yn,tr(Yn)):Ke(Yn))};return zn.on("change",qi),()=>{zn.off("change",qi)}}},[zn,Ke]),(0,Me.useEffect)(()=>{if(zn)if(ln==null)zn.setValue(""),ur("");else{const qi=window.scrollY||window.pageYOffset;ln!==zn.getValue()&&(zn.setValue(ln),ur(ln),zn.setCursor(Gn?1:zn.lineCount(),0),window.scrollTo(0,qi))}},[zn,ln]);const kr=(0,Me.useCallback)(qi=>{const Ui=zn.getCursor(),rr=zn.getSelection();let Yn=rr.split(`
|
|
|
`);switch(qi){case"bold":return zn.replaceSelection("**"+rr+"**"),rr===""&&zn.setCursor(Ui.line,Ui.ch+2),zn.focus();case"italic":return zn.replaceSelection("*"+rr+"*"),rr===""&&zn.setCursor(Ui.line,Ui.ch+1),zn.focus();case"code":return zn.replaceSelection("`"+rr+"`"),rr===""&&zn.setCursor(Ui.line,Ui.ch+1),zn.focus();case"inline-latex":return Wi("inline-latex"),zn.focus();case"latex":return zn.replaceSelection("```latex\n"+rr+"\n```"),zn.setCursor(Ui.line+1,rr.length+1),zn.focus();case"line-break":return zn.replaceSelection(`<br/>
|
|
|
`),zn.focus();case"list-ul":return rr===""?zn.replaceSelection("- "+rr):zn.replaceSelection(Yn.map(Vr=>Vr===""?"":`- ${Vr}`).join(`
|
|
|
`)),zn.focus();case"list-ol":return rr===""?zn.replaceSelection("1. "+rr):zn.replaceSelection(Yn.map((Vr,Eo)=>Vr===""?"":`${Eo+1}. ${Vr}`).join(`
|
|
|
`)),zn.focus();case"add-null-ch":return rr===""&&zn.setCursor(Ui.line,Ui.ch),zn.replaceSelection(di),zn.focus();case"add-signal":return rr===""&&zn.setCursor(Ui.line,Ui.ch),zn.replaceSelection(zi),zn.focus();case"add-multiple":return rr===""&&zn.setCursor(Ui.line,Ui.ch),zn.replaceSelection(xr),zn.focus();case"inster-template-1":return rr===""&&zn.setCursor(Ui.line,Ui.ch),zn.replaceSelection(rt),zn.focus();case"eraser":return zn.setValue(""),zn.focus();case"trigger-watch":return un(!Ai),zn.focus();case"trigger-full-screen":return wi(!ai),zn.focus();case pn:Wi(pn);return;case Ti:Wi(Ti);return;case Fn:Wi(Fn);return;case oi:Wi(oi);return;case"maths-latex":Wi("maths-latex");return;case kn:Wi(kn);return;case mi:Wi(mi);return;default:throw new Error}},[zn,Ai,ai]),hi=(0,Me.useCallback)((qi,Ui)=>{var rr,Yn,Vr,Eo,rs,Lo;switch(Wi(""),fi){case pn:const{title:ta,link:aa}=qi;return zn.replaceSelection(`[${ta}](${aa})`),zn.focus();case Ti:const{language:Tn,content:Os}=qi;return zn.replaceSelection(["```"+Tn,Os,"```"].join(`
|
|
|
`)),zn.focus();case"maths-latex":for(var is=atob(qi),ms=new Uint8Array(is.length),Ls=0;Ls<is.length;Ls++)ms[Ls]=is.charCodeAt(Ls);var ws=new Blob([ms],{type:"image/png"});(0,gt.I)(ws,na=>{na.id?zn.replaceSelection(``):(na==null?void 0:na.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":zn.replaceSelection("`$$"+qi+"$$`");break;case Fn:case oi:case ri:const{src:hl,alt:dl}=qi,vs=Ui,ja=(Vr=(Yn=(rr=vs==null?void 0:vs.name)==null?void 0:rr.split("."))==null?void 0:Yn.pop)==null?void 0:Vr.call(Yn);return((Eo=vs==null?void 0:vs.type)==null?void 0:Eo.indexOf("image"))>-1||!(vs!=null&&vs.type)?dl?zn.replaceSelection(``):zn.replaceSelection(``):((rs=vs==null?void 0:vs.type)==null?void 0:rs.indexOf("video"))>-1?zn.replaceSelection(`<video width="100%" controls src="${hl}"></video>`):((Lo=vs==null?void 0:vs.type)==null?void 0:Lo.indexOf("pdf"))>-1?zn.replaceSelection(`<a href="${hl}?type=${vs.type}&disposition=inline" target="_blank">${vs.name}</a>`):zr.includes(ja)?zn.replaceSelection(`<a href="${hl}?type=office&disposition=inline" target="_blank">${vs.name}</a>`):zn.replaceSelection(`[${vs.name}](${hl})`),zn.focus();case mi:const{row:lu,col:Vl,align:uo}=qi;let _r=`
|
|
|
`;for(let na=0;na<lu;na++){let Rr=[],no=[];for(let $r=0;$r<Vl;$r++)na===1&&no.push(ir[uo]),Rr.push(" ");na===1&&(_r+=`| ${no.join(" | ")} |
|
|
|
`),_r+=`| ${Rr.join(Vl===1?"":" | ")} |
|
|
|
`}return zn.replaceSelection(_r+`
|
|
|
`),zn.focus();default:throw new Error}},[zn,fi]),kt=(0,Me.useMemo)(()=>{switch(fi){case pn:return Me.createElement(mt,{callback:hi,onCancel:Pr});case Ti:return Me.createElement(_t.Z,{callback:hi,onCancel:Pr});case Fn:return Me.createElement(gt.Z,{callback:hi,onCancel:Pr});case kn:return Me.createElement(He,{callback:hi,onCancel:Pr});case mi:return Me.createElement(Ne,{callback:hi,onCancel:Pr});case"maths-latex":return Me.createElement(qt,{showSaveButton:!0,callback:hi});case"inline-latex":return Me.createElement(yn.Z,{showSaveButton:!0,callback:hi});default:return null}},[fi]);function Pr(){Wi("")}(0,Me.useEffect)(()=>{if(oo.current){let qi=function(rs){Vr=!0,Eo=rs.pageY},Ui=function(){Vr=!1},rr=function(rs){if(Vr){let Lo=rs.pageY-Eo;Lo<0&&(Lo=0),Lo>300&&(Lo=300);let is=Xe+Lo+"px";$i(is)}},Yn=oo.current,Vr=!1,Eo=0;return Yn.addEventListener("mousedown",qi),document.addEventListener("mousemove",rr),document.addEventListener("mouseup",Ui),()=>{Yn.removeEventListener("mousedown",qi),document.removeEventListener("mousemove",rr),document.removeEventListener("mouseup",Ui)}}},[zn,oo]),(0,Me.useEffect)(()=>{$i(Xe)},[Xe]);const _o=hr(qe),Oo=hr(Fi),wo={width:_o,height:Oo},yr=(0,Me.useMemo)(()=>{if(Ni){let qi=new Date(Ni),Ui=qi.getHours(),rr=qi.getMinutes(),Yn=qi.getSeconds();return Ui=Ui<10?"0"+Ui:Ui,rr=rr<10?"0"+rr:rr,Yn=Yn<10?"0"+Yn:Yn,`${Ui}:${rr}:${Yn}`}return 0},[Ni]),tr=qi=>{const Ui=[];if(Yt){let rr=-1;qi=qi.replace(/(@▁▁@|@▁@)/g,function(Yn,Vr,Eo){Ui.push({multiLine:Yn!==zi})})}return Ui};function Hr(){window.sessionStorage.removeItem(En),On(!1),lr(0)}function Po(){On(!1),lr(0),zn.setValue(window.sessionStorage.getItem(En))}(0,Me.useEffect)(()=>{eo[fi]&&fi!==oi&&fi!==kn&&setTimeout(()=>{const qi=document.getElementsByClassName("markdown-popup-form")[0],Ui=window.innerWidth/2-qi.offsetWidth/2,rr=window.innerHeight/2-qi.offsetHeight/2;In(Ui),xo(rr)},0)},[fi]);const Tr=qi=>{qi.preventDefault();const Ui=qi.clientX-Kr,rr=qi.clientY-br;document.body.onmousemove=Yn=>{let Vr=Yn.clientX-Ui,Eo=Yn.clientY-rr;const rs=document.getElementsByClassName("markdown-popup-form")[0],Lo=window.innerWidth-rs.offsetWidth,is=window.innerHeight-rs.offsetHeight;Vr=Math.max(0,Math.min(Vr,Lo)),Eo=Math.max(0,Math.min(Eo,is)),Io(Yn.clientX,Yn.clientY,Ui,rr)&&(In(Vr),xo(Eo))},document.body.onmouseup=function(){document.body.onmousemove=null}},Io=(qi,Ui,rr,Yn)=>{const Vr=document.body.clientHeight,Eo=document.body.clientWidth;return qi<20&&rr>qi||qi>Eo-20&&rr<qi||Ui<20&&Yn>Ui||Ui>Vr-20&&Yn<Ui?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return Me.createElement(Me.Fragment,null,Me.createElement("div",{className:"markdown-editor-wrapper",ref:Fo},Me.createElement("div",{className:`markdown-editor-container ${Nn} ${Ai?"on-preview":""} ${wt?"mini":""} ${ai?"full-screen":""}`,style:wo},Me.createElement(De,{insertTemp:bt,watch:Ai,fullScreen:ai,showNullButton:zt,showNullProgramButton:Yt,onActionCallback:kr,hidetoolBar:Cn,extraUse:Mi}),Me.createElement("div",{className:"markdown-editor-body"},Me.createElement("div",{className:"codemirror-container"},Me.createElement("textarea",{ref:Cr,placeholder:Rn})),Ai?Me.createElement("div",{ref:Ki,className:"preview-container"},gn==="stex"&&Me.createElement(ve,{value:Hi}),gn!=="stex"&&Me.createElement(le.Z,{disabledFill:Jn,showProgramFill:Yt,value:Hi})):null))),Un?Me.createElement("a",{ref:oo,className:"editor-resize"}):null,fi===oi&&Me.createElement(bn,{callback:hi,onCancel:Pr}),fi===kn&&Me.createElement(He,{callback:hi,onCancel:Pr}),Me.createElement(ze.Z,null,eo[fi]&&fi!==oi&&fi!==kn?Me.createElement(Bt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Kr,top:br},title:Me.createElement("div",{style:{cursor:"move"},onMouseDown:Tr},eo[fi]),open:!0,onCancel:Pr,footer:null,destroyOnClose:!0,width:fi===kn?"1200px":null,height:fi===kn?"80vh":null,className:"markdown-popup-form"},kt):null))}},56701:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return ue},I:function(){return we}});var Me=Ee(78241),me=Ee(8591),Be=Ee(92832),ke=Ee(3113),Pe=Ee(58788),Le=Ee(59301),he=Ee(59301),Se=Object.defineProperty,xe=Object.defineProperties,ge=Object.getOwnPropertyDescriptors,le=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,ce=(be,Ae,De)=>Ae in be?Se(be,Ae,{enumerable:!0,configurable:!0,writable:!0,value:De}):be[Ae]=De,z=(be,Ae)=>{for(var De in Ae||(Ae={}))ve.call(Ae,De)&&ce(be,De,Ae[De]);if(le)for(var De of le(Ae))de.call(Ae,De)&&ce(be,De,Ae[De]);return be},ee=(be,Ae)=>xe(be,ge(Ae));const{useForm:oe}=Me.default,ie={width:280,marginRight:10},se={labelCol:{span:5},wrapperCol:{span:19}};var ue=({callback:be,onCancel:Ae})=>{const[De]=oe();let ze=(0,Le.useRef)();function Ze(ft){be(ft,ze.current)}function Ye(ft,at){if(ft.status===-1){me.ZP.error(ft.message);return}De.setFieldsValue({src:`/api/attachments/${ft.id}`,type:at.type})}function Ge(ft){let at=ft.target.files[0];ze.current=at,we(at,Ye)}return he.createElement(Me.default,ee(z({form:De},se),{className:"upload-image-panel",onFinish:Ze,style:{width:470,overflow:"hidden"}}),he.createElement(Me.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},he.createElement("div",{className:"flex-container"},he.createElement(Me.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},he.createElement(Be.default,{style:ie})),he.createElement(ye,{onFileChange:Ge}))),he.createElement(Me.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},he.createElement(Be.default,{style:{width:264}})),he.createElement(Me.default.Item,{style:{textAlign:"right"}},he.createElement(ke.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),he.createElement(ke.ZP,{type:"default",onClick:Ae},"\u53D6\u6D88")))};function ye({onFileChange:be}){return he.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",he.createElement("input",{type:"file",onChange:be}))}function we(be,Ae){if(!be)throw new String("\u6CA1\u6709\u6587\u4EF6");let De=new FormData;De.append("editormd-image-file",be),De.append("file_param_name","editormd-image-file"),De.append("byxhr","true");var ze=new window.XMLHttpRequest;ze.withCredentials=!0,ze.addEventListener("load",function(Ze){Ae(JSON.parse(Ze.target.responseText),be)},!1),ze.addEventListener("error",function(Ze){console.error(Ze)},!1),ze.open("POST",`${Pe.KI}/api/attachments.json`),ze.send(De)}},50474:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Be}});var Me=Ee(59301),me=Ee(4676);class Be extends Me.Component{constructor(Pe){super(Pe);const Le=window.document;this.node=Le.createElement("div"),Le.body.appendChild(this.node)}render(){const{children:Pe}=this.props;return(0,me.createPortal)(Pe,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},48551:function(Ln,tn,Ee){"use strict";Ee.d(tn,{SV:function(){return nt},ZP:function(){return yt}});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"]},Pe={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 Se=Ee(86061),xe=Ee.n(Se),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,Ce)=>{var Ne=Je=>{try{dt(We.next(Je))}catch(Tt){Ce(Tt)}},$e=Je=>{try{dt(We.throw(Je))}catch(Tt){Ce(Tt)}},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"]}},ye=(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})),be=(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,Ce){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 Ce.map(Je=>{dt.push(ie(oe({},Je),{range:$e}))}),dt}var De=He=>{ue.languages.map(Ce=>(He.languages.registerDocumentFormattingEditProvider(Ce,{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}]})}}),Ce));const Ie=Pe.quickKey.map(Ce=>({label:Ce.label,kind:He.languages.CompletionItemKind.Method,insertText:Ce.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet})),We=Le.quickKey.map(Ce=>({label:Ce.label,kind:He.languages.CompletionItemKind.Method,insertText:Ce.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Oe=ke.quickKey.map(Ce=>({label:Ce.label,kind:He.languages.CompletionItemKind.Method,insertText:Ce.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet}));He.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Ce,Ne){var $e=Ce.getWordUntilPosition(Ne),dt={startLineNumber:Ne.lineNumber,endLineNumber:Ne.lineNumber,startColumn:$e.startColumn,endColumn:$e.endColumn},Je=Ce.getLineContent(Ne.lineNumber).substring($e.startColumn-2,$e.endColumn);return{suggestions:[...Pe.keywords.map(Tt=>({label:Tt,kind:He.languages.CompletionItemKind.Function,documentation:Tt,insertText:Tt,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt})),...Pe.quickKey.map(Tt=>({label:Tt.label,kind:He.languages.CompletionItemKind.Function,documentation:Tt.content,insertText:Je.startsWith("#")?Tt.content.replace(/#/,""):Tt.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt}))]}}}),He.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Ce,Ne){var $e=Ce.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(Ce,Ne){var $e=Ce.getWordUntilPosition(Ne),dt={startLineNumber:Ne.lineNumber,endLineNumber:Ne.lineNumber,startColumn:$e.startColumn,endColumn:$e.endColumn},Je=Ce.getLineContent(Ne.lineNumber).substring($e.startColumn-2,$e.endColumn);return{suggestions:[...ke.keywords.map(Tt=>({label:Tt,kind:He.languages.CompletionItemKind.Function,documentation:Tt,insertText:Tt,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt})),...ke.quickKey.map(Tt=>({label:Tt.label,kind:He.languages.CompletionItemKind.Function,documentation:Tt.content,insertText:Je.startsWith("#")?Tt.content.replace(/#/,""):Tt.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt}))]}}}),He.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Ce,Ne){var $e=Ce.getWordUntilPosition(Ne),dt={startLineNumber:Ne.lineNumber,endLineNumber:Ne.lineNumber,startColumn:$e.startColumn,endColumn:$e.endColumn},Je=Ce.getLineContent(Ne.lineNumber).substring($e.startColumn-2,$e.endColumn);return{suggestions:[...he.keywords.map(Tt=>({label:Tt,kind:He.languages.CompletionItemKind.Function,documentation:Tt,insertText:Tt,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt})),...he.quickKey.map(Tt=>({label:Tt.label,kind:He.languages.CompletionItemKind.Function,documentation:Tt.content,insertText:Je.startsWith("#")?Tt.content.replace(/#/,""):Tt.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt}))]}}}),He.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Ce,Ne){var $e=Ce.getWordUntilPosition(Ne),dt={startLineNumber:Ne.lineNumber,endLineNumber:Ne.lineNumber,startColumn:$e.startColumn,endColumn:$e.endColumn},Je=Ce.getLineContent(Ne.lineNumber).substring($e.startColumn-2,$e.endColumn);return{suggestions:[...Le.keywords.map(Tt=>({label:Tt,kind:He.languages.CompletionItemKind.Function,documentation:Tt,insertText:Tt,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt})),...Le.quickKey.map(Tt=>({label:Tt.label,kind:He.languages.CompletionItemKind.Function,documentation:Tt.content,insertText:Je.startsWith("#")?Tt.content.replace(/#/,""):Tt.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,Ye=(He,Ie,We)=>Ie in He?Ze(He,Ie,{enumerable:!0,configurable:!0,writable:!0,value:We}):He[Ie]=We,Ge=(He,Ie,We)=>Ye(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 Pt=ft,tt=Ee(96236),vt=Ee(8591),st=Ee(6848),jt=Ee(89392),lt=Ee(86766),et=Ee(56102),ut=Object.defineProperty,mt=Object.defineProperties,_t=Object.getOwnPropertyDescriptors,gt=Object.getOwnPropertySymbols,Bt=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,Qt=(He,Ie)=>{for(var We in Ie||(Ie={}))Bt.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,_t(Ie)),Wt=(He,Ie)=>{var We={};for(var Oe in He)Bt.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,Ce)=>{var Ne=Je=>{try{dt(We.next(Je))}catch(Tt){Ce(Tt)}},$e=Je=>{try{dt(We.throw(Je))}catch(Tt){Ce(Tt)}},dt=Je=>Je.done?Oe(Je.value):Promise.resolve(Je.value).then(Ne,$e);dt((We=We.apply(He,Ie)).next())});function Jt(He){return/^\d+$/.test(He)?`${He}px`:He}function dn(){}let Lt=!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 Rt(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 St=null;var yt=He=>{var Ie=He,{width:We="100%",height:Oe="100%",value:Ce,language:Ne="javascript",style:$e={},options:dt={},overrideServices:Je={},theme:Tt="vs-dark",onEditBlur:qt,isCopy:yn=!1,onSave:rn,autoHeight:pn=!1,forbidCopy:Fn=!1,onChange:kn=dn,editorDidMount:oi=dn,onFocus:ri=dn,onBreakPoint:Ti=dn,breakPointValue:mi=[],filename:Qi="educoder.txt",errorLine:ir,errorContent:fr="",highlightLine:er,openBreakPoint:Mr=!1,placeholder:qr=""}=Ie,di=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"]);const xr=(0,Me.useRef)(),zi=(0,Me.useRef)({}),rt=(0,Me.useRef)(),zr=(0,Me.useRef)(),hr=(0,Me.useRef)([]),vo=(0,Me.useRef)(!1),co=(0,Me.useRef)(),yo=(0,Me.useRef)(),eo=(0,Me.useRef)(!1),[lo,ln]=(0,Me.useState)(!1);function Ke(){let Vt;return xr.current&&(Vt=new me.Z(an=>{for(let Bn of an)(Bn.target.offsetHeight>0||Bn.target.offsetWidth>0)&&zi.current.instance.layout()}),Vt.observe(xr.current)),Vt}function qe(){vt.ZP.warning({content:decodeURIComponent(ze),key:"monaco-editor-tip"})}const Xe=()=>{let Vt=zi.current.instance;if(Ce!=null&&Vt&&lo){const an=Vt.getModel();an&&Ce!==an.getValue()&&(Lt=!0,an.setValue(Ce),Vt.layout(),Lt=!1)}};(0,Me.useEffect)(()=>{const Vt=lt.Z.subscribe("formatDocument",an=>{var Bn;let Nn=zi.current.instance;(Bn=Nn==null?void 0:Nn.getAction)==null||Bn.call(Nn,"editor.action.formatDocument").run()});return window.updateMonacoValue=an=>{kn(an)},Vt},[]),(0,Me.useEffect)(()=>{var Vt;let an=zi.current.instance;zr.current&&clearTimeout(zr.current),zr.current=setTimeout(()=>{Xe()},500),Ce&&(Ce!=null&&Ce.length)&&((Vt=an==null?void 0:an.updateOptions)==null||Vt.call(an,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ce.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ce,lo,zi.current]),(0,Me.useEffect)(()=>{if(ir&&zi.current&&zi.current.instance){let an=zi.current.instance;an.changeViewZones(function(Bn){var Nn=document.createElement("div");Nn.style.padding="10px 20px",Nn.style.width="calc(100% - 20px)",Nn.className="my-error-line-wrp",Nn.innerHTML=fr,Bn.addZone({afterLineNumber:ir||11,heightInLines:3,domNode:Nn})});var Vt={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}};an.addOverlayWidget(Vt),an.revealPositionInCenter({lineNumber:20,column:1})}},[ir,zi.current,lo]);const wt=(Vt="",an)=>{if(!Vt||Vt.trim()==="")return!0;const Nn=zi.current.instance.getModel().getLineTokens(an);let qn=!1;for(let Gn=0;Gn<2;Gn++)Nn.getStandardTokenType(Gn)===1&&(qn=!0);return qn};(0,Me.useEffect)(()=>{var Vt;const an=(Vt=zi.current)==null?void 0:Vt.instance;if(an&&lo&&Fn){const Bn=an.onDidBlurEditorWidget(()=>{eo.current=!1}),Nn=an.onDidFocusEditorText(()=>{eo.current=!0});return()=>{Bn.dispose(),Nn.dispose()}}},[zi.current,lo,Fn]),(0,Me.useEffect)(()=>{var Vt;if((Vt=zi.current)!=null&&Vt.instance&&lo&&Mr){let an=zi.current.instance,Bn=an.getModel();if(!Bn)return;(()=>{var Ai;let un=[],ai=[];const wi=Bn.getAllDecorations();for(let Wi of wi)Wi.options.className==="highlighted-line"&&(un.push((Ai=Wi==null?void 0:Wi.range)==null?void 0:Ai.startLineNumber),ai.push(Wi==null?void 0:Wi.id));if(er===un[0])return;Bn.deltaDecorations(ai,[]);const fi=Bn.getLineCount();er&&er<=fi&&(an.deltaDecorations([],[{range:new St.Range(er,1,er,Bn.getLineMaxColumn(er)),options:{isWholeLine:!0,className:"highlighted-line"}}]),an.revealLineInCenter(er))})();const qn=(Ai=!1)=>{var un;let ai=[],wi=[];const fi=Bn.getAllDecorations();for(let Wi of fi)Wi.options.linesDecorationsClassName==="breakpoints-select"&&(ai.push((un=Wi==null?void 0:Wi.range)==null?void 0:un.startLineNumber),wi.push(Wi==null?void 0:Wi.id));if(Ai)return{lines:ai,ids:wi};Ti(ai)},Gn=Ai=>Kt(void 0,null,function*(){let un={range:new St.Range(Ai,1,Ai,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Bn.deltaDecorations([],[un]),qn()}),Jn=Ai=>Kt(void 0,null,function*(){let un=[];const ai=an.getLineDecorations(Ai);for(let wi of ai)wi.options.linesDecorationsClassName==="breakpoints-select"&&un.push(wi.id);yield Bn.deltaDecorations(un,[]),qn()}),Rn=Ai=>{let un=an.getLineDecorations(Ai);for(let ai of un)if(ai.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,jt.isEqual)(mi,qn(!0).lines)){Bn.deltaDecorations(qn(!0).ids,[]);const Ai=mi.map(un=>({range:new St.Range(un,1,un,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Bn.deltaDecorations([],Ai)}const li=an.onDidChangeModelContent(Ai=>{let un=an.getPosition();if(un){let ai=un.lineNumber;clearTimeout(yo.current),yo.current=setTimeout(()=>{wt(Bn.getLineContent(ai),ai)?Jn(ai):Rn(ai)?(Jn(ai),Gn(ai)):qn()},100)}}),Mi=an.onMouseDown(Ai=>{var un,ai,wi;if(Ai.target.detail&&((wi=(ai=(un=Ai.target)==null?void 0:un.element)==null?void 0:ai.className)!=null&&wi.includes("line-numbers"))){let fi=Ai.target.position.lineNumber;if(wt(Bn.getLineContent(fi),fi))return;Rn(fi)?Jn(fi):Gn(fi)}}),zn=Ai=>{let un={range:new St.Range(Ai,1,Ai,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};hr.current=an.deltaDecorations(hr.current,[un])},si=()=>{hr.current=an.deltaDecorations(hr.current,[])},Hi=an.onMouseMove(Ai=>{var un,ai,wi;if(si(),Ai.target.detail&&((wi=(ai=(un=Ai.target)==null?void 0:un.element)==null?void 0:ai.className)!=null&&wi.includes("line-numbers"))){let fi=Ai.target.position.lineNumber;if(wt(Bn.getLineContent(fi),fi))return;zn(fi)}}),ur=an.onMouseLeave(()=>{si()});return()=>{li.dispose(),Mi.dispose(),Hi.dispose(),ur.dispose()}}},[zi.current,lo,mi,er,Mr,Ne]),(0,Me.useEffect)(()=>{var Vt;(Vt=zi.current)!=null&&Vt.instance&&Mr&&zi.current.instance.setPosition({lineNumber:0,column:0})},[er]);function At(){let Vt=zi.current.instance;if(Vt){const an=Vt.getSelection(),Bn=zi.current.pastePos||{},Nn=new St.Range(Bn.startLineNumber||an.endLineNumber,Bn.startColumn||an.endColumn,Bn.endLineNumber||an.endLineNumber,Bn.endColumn||an.endColumn);setTimeout(()=>{Vt.executeEdits("",[{range:Nn,text:""}])},300)}}function Nt(Vt){(window.navigator.platform.match("Mac")?Vt.metaKey:Vt.ctrlKey)&&Vt.keyCode==83&&(Vt.preventDefault(),rn())}const bt=()=>{if(pn&&zi.current.instance){const Vt=zi.current.instance.getContentHeight();Cn(Vt<Oe?Oe:Vt)}else Cn(Oe)};function gn(Vt){var an=document.createEvent("MouseEvents");an.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Vt.dispatchEvent(an)}const En=Vt=>{if(!eo.current)return;const{keyCode:an,ctrlKey:Bn,metaKey:Nn,target:qn,type:Gn}=Vt;return(Gn==="paste"||(an===67||an===86)&&(Nn||Bn))&&qn.nodeName==="TEXTAREA"&&(qe(),Vt.preventDefault()),!1};function Un(Vt,an){var Bn=window.URL||window.webkitURL||window,Nn=new Blob([an]),qn=document.createElementNS("http://www.w3.org/1999/xhtml","a");qn.href=Bn.createObjectURL(Nn),qn.download=Vt,gn(qn)}(0,Me.useEffect)(()=>{bt()},[bt]),(0,Me.useEffect)(()=>{xr.current&&!lo&&Promise.all([Ee.e(8909),Ee.e(1810)]).then(Ee.bind(Ee,71448)).then(Vt=>{try{St=Vt,zi.current.instance=St.editor.create(xr.current,{value:Ce,language:Rt(Ne),theme:Tt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},Je);const an=zi.current.instance;let qn=[...tt.BH._menuItems].find(li=>li[0]._debugName=="EditorContext")[1],Gn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Jn=(li,Mi)=>{var zn,si;let Hi=li._first;do Mi.includes((si=(zn=Hi.element)==null?void 0:zn.command)==null?void 0:si.id)&&li._remove(Hi);while(Hi=Hi.next)};if(oi(an,St),setTimeout(()=>{bt(),zi.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Un(Qi||"educoder.txt",an.getValue())}})},500),zi.current.subscription=an.onDidChangeModelContent(li=>{vo.current?clearTimeout(co.current):(bt(),kn(an.getValue(),li)),co.current=setTimeout(()=>{vo.current=!1},500)}),window.Monaco||De(St,Rt(Ne)),Fn&&(Jn(qn,Gn),xr.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",En),window.removeEventListener("paste",En),window.addEventListener("keydown",En),window.addEventListener("paste",En)),window.Monaco=St,qt&&an.onDidBlurEditorWidget(()=>{qt(an.getValue())}),ri&&an.onDidFocusEditorText(()=>{ri(an.getValue())}),Fn)try{an.onDidPaste(li=>{const Mi=an.getSelection(),zn=zi.current.pastePos||{},si=new St.Range(zn.startLineNumber||Mi.endLineNumber,zn.startColumn||Mi.endColumn,zn.endLineNumber||Mi.endLineNumber,zn.endColumn||Mi.endColumn);an.executeEdits("",[{range:li.range,text:""}])})}catch(li){}let Rn=Ke();return qr&&typeof qr=="string"&&new Pt(qr,an,St),ln(!0),()=>{const li=zi.current.instance;li.dispose();const Mi=li.getModel();Mi&&Mi.dispose(),zi.current.subscription&&zi.current.subscription.dispose(),Rn.unobserve(xr.current)}}catch(an){}})},[]),(0,Me.useEffect)(()=>{if(zi.current.instance&&lo)return document.addEventListener("keydown",Nt,!1),()=>{document.removeEventListener("keydown",Nt)}},[rn,lo]),(0,Me.useEffect)(()=>{let Vt=zi.current.instance;if(Vt&&lo){let an=Rt(Ne);St.editor.setModelLanguage(Vt.getModel(),an)}},[Ne,lo]),(0,Me.useEffect)(()=>{zi.current.instance&&lo&&St.editor.setTheme(Tt)},[Tt,lo]),(0,Me.useEffect)(()=>{let Vt=zi.current.instance;rt.current=dt,Vt&&lo&&(Vt.updateOptions(Qt({},dt)),setTimeout(()=>{Vt.getModel().updateOptions(Qt({},dt))},200))},[JSON.stringify(dt),lo]),(0,Me.useEffect)(()=>{let Vt=zi.current.instance;Vt&&lo&&Vt.layout()},[We,Oe,lo]);const[Pn,zt]=(0,Me.useState)(Jt(We)),[Yt,Cn]=(0,Me.useState)(Jt(Oe)),An=bn(Qt({},$e),{width:Pn,height:Yt,position:"relative"});return Me.createElement("div",{className:"my-monaco-editor",ref:xr,style:An},yn&&Me.createElement(et.CopyToClipboard,{text:Ce,onCopy:()=>vt.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:Ce,options:Ne={}}){const $e=(0,Me.useRef)(),[dt,Je]=(0,Me.useState)(null);function Tt(pn){let Fn;return $e.current&&(Fn=new me.Z(kn=>{for(let oi of kn)(oi.target.offsetHeight>0||oi.target.offsetWidth>0)&&pn.layout()}),Fn.observe($e.current)),Fn}(0,Me.useEffect)(()=>($e.current&&Promise.all([Ee.e(8909),Ee.e(9404)]).then(Ee.bind(Ee,2550)).then(pn=>{St=pn;const Fn=St.editor.createDiffEditor($e.current,bn(Qt({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(Fn);let kn=Tt(Fn);return()=>{Fn.dispose();const oi=Fn.getModel();oi&&oi.dispose(),kn.unobserve($e.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,Me.useEffect)(()=>{dt&&dt.setModel({original:St.editor.createModel(We,Ce),modified:St.editor.createModel(Oe,Ce)})},[We,Oe,Ce,dt]);const qt=Jt(He),yn=Jt(Ie),rn={width:qt,height:yn};return Me.createElement("div",{className:"my-diff-editor",ref:$e,style:rn})}},26403:function(Ln,tn,Ee){"use strict";var Me=Ee(7543),me=Ee(57809),Be=Ee(78673),ke=Ee(59301);const Pe=me.default.Option;tn.Z=({isTheoretical:Le,onFontSizeChange:he,cmFontSize:Se,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(Pe,{value:"vs"},"\u767D\u8272\u80CC\u666F"),ke.createElement(Pe,{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:Se,onChange:he},ke.createElement(Pe,{value:12},"12px"),ke.createElement(Pe,{value:14},"14px"),ke.createElement(Pe,{value:16},"16px"),ke.createElement(Pe,{value:18},"18px"),ke.createElement(Pe,{value:20},"20px"),ke.createElement(Pe,{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")))))}},91300:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return me}});var Me=Ee(59301);function me(Be,ke){const Pe=(0,Me.useRef)();(0,Me.useEffect)(()=>{Pe.current=Be}),(0,Me.useEffect)(()=>{function Le(){Pe.current()}if(ke!==null){let he=setInterval(Le,ke);return()=>clearInterval(he)}},[ke])}},90593:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Im:function(){return Ze},ZP:function(){return tt},gZ:function(){return at}});var Me=Ee(59301),me=Ee(92832),Be=Ee(3113),ke=Ee(18290),Pe=Ee(88551),Le=Ee(81699),he=Ee(24334),Se=Ee(26089),xe=Ee(25711),ge=Ee(58130),le=Ee(44722),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,ye=Object.prototype.propertyIsEnumerable,we=(vt,st,jt)=>st in vt?ee(vt,st,{enumerable:!0,configurable:!0,writable:!0,value:jt}):vt[st]=jt,be=(vt,st)=>{for(var jt in st||(st={}))ue.call(st,jt)&&we(vt,jt,st[jt]);if(se)for(var jt of se(st))ye.call(st,jt)&&we(vt,jt,st[jt]);return vt},Ae=(vt,st)=>oe(vt,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 Ye=(vt=>(vt[vt.SET_VISIBLE=0]="SET_VISIBLE",vt[vt.SET_TABINDEX=1]="SET_TABINDEX",vt))(Ye||{});function Ge(vt,st){switch(st.type){case 0:return Ae(be({},vt),{visible:st.payload});case 1:return Ae(be({},vt),{tabIndex:st.payload});default:throw new Error}}function ft({value:vt,className:st}){const[jt,lt]=(0,Me.useState)(!1),et=(0,Me.useRef)(),ut=(0,Me.useRef)();return(0,Me.useEffect)(()=>{jt&&(ut.current.reset(),ut.current.write((0,ge.pp)(vt||"")))},[vt,jt]),(0,Me.useEffect)(()=>{var mt,_t,gt,Bt;if(et.current){ut.current=new ve.Terminal({fontSize:14,disableStdin:!0}),ut.current.open(et.current);const Ht=et.current.offsetWidth-14,hn=((Bt=(gt=(_t=(mt=ut.current)==null?void 0:mt._core)==null?void 0:_t._renderService)==null?void 0:gt.dimensions)==null?void 0:Bt.actualCellWidth)||9.5,Qt=Math.ceil(Ht/hn);ut.current.resize(Qt,8),lt(!0)}},[]),z.createElement("div",{ref:et,className:ce()("XtermText-valueRef",st)})}function at(vt){const{status:st,error_msg:jt,output:lt,input:et,expected_output:ut,is_file:mt,input_file_url:_t,output_file_url:gt,expected_output_file_url:Bt}=vt;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:et}),mt&&z.createElement("div",{style:hn},z.createElement("a",{onClick:()=>(0,ge.LR)(_t,et)},et)),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)(Bt,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:et,style:hn}),mt&&z.createElement("div",{style:hn},z.createElement("a",{onClick:()=>(0,ge.LR)(_t,et)},et)),z.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),z.createElement("pre",{className:"error"},he.Base64.decode(jt)));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:et,style:hn}),mt&&z.createElement("div",{style:hn},z.createElement("a",{onClick:()=>(0,ge.LR)(_t,et)},et)),z.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),z.createElement("pre",{className:"error"},he.Base64.decode(jt)));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 Pt(vt){const{status:st,error_msg:jt,execute_time:lt,output:et,input:ut,expected_output:mt,is_file:_t,input_file_url:gt,output_file_url:Bt,expected_output_file_url:Ht}=vt;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(et)));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",et&&he.Base64.decode(et)),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(jt)));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(jt)));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 tt=({id:vt,is_file:st,input:jt,debuging:lt,submitting:et,executingMessage:ut,debugResult:mt,onChangeInput:_t,onDebugCode:gt,onSubmitCode:Bt})=>{const[Ht,hn]=(0,Me.useReducer)(Ge,ze),{visible:Qt,tabIndex:bn}=Ht;(0,Me.useEffect)(()=>{hn({type:0,payload:!1})},[vt]);function Wt(Lt){let pt=Lt.target.id;hn({type:1,payload:pt})}function Kt(){hn({type:0,payload:!Qt})}const Jt=(0,Me.useMemo)(()=>{if(mt){const{status:Lt}=mt;return z.createElement(z.Fragment,null,Pt(mt))}return null},[mt]);function dn(){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 ${Qt?"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?"":jt,onChange:_t}),rightNode:lt?z.createElement(Se.Z,{message:"\u4EE3\u7801\u6267\u884C\u4E2D..."}):mt?Jt: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 ${Qt?"up":""}`,onClick:Kt},Qt?z.createElement(ke.Z,null):z.createElement(Pe.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:dn},"\u8C03\u8BD5\u4EE3\u7801"),z.createElement(Be.ZP,{type:"primary",className:"custom-ant-disabled",loading:et,disabled:et,onClick:()=>{hn({type:0,payload:!1}),Bt()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},80677:function(Ln,tn,Ee){"use strict";Ee.r(tn),Ee.d(tn,{default:function(){return Ft}});var Me=Ee(59301),me=Ee(52249),Be=Ee(15962),ke=Ee(42203),Pe=Ee(31797),Le=Ee(8591),he=Ee(43418),Se=Ee(71418),xe=Ee(57809),ge=Ee(3039),le=Ee(69003),ve=Ee(10148),de=Ee(80205),ce=Ee(43428),z=Ee(48551),ee=Ee(50474),oe=Ee(49371),ie=Ee(26403),se=Ee(59301),ue=Object.defineProperty,ye=Object.defineProperties,we=Object.getOwnPropertyDescriptors,be=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,ze=(ht,Ct,Et)=>Ct in ht?ue(ht,Ct,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[Ct]=Et,Ze=(ht,Ct)=>{for(var Et in Ct||(Ct={}))Ae.call(Ct,Et)&&ze(ht,Et,Ct[Et]);if(be)for(var Et of be(Ct))De.call(Ct,Et)&&ze(ht,Et,Ct[Et]);return ht},Ye=(ht,Ct)=>ye(ht,we(Ct));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,Ct){switch(Ct.type){case 3:return Ye(Ze({},ht),{showEditorSetting:Ct.payload});case 1:return Ye(Ze({},ht),{theme:Ct.payload});case 0:return Ye(Ze({},ht),{fontSize:Ct.payload});case 2:return Ye(Ze({},ht),{tabToSpace:Ct.payload});default:throw new Error}}var Pt=({isLoading:ht,value:Ct,onChange:Et,language:wn,onUpdateCode:fn,ActionBarRender:sn=Sn=>se.createElement(tt,{onShowCodeSetting:Sn})})=>{const[Sn,xn]=(0,Me.useReducer)(at,Ge),{theme:_n,fontSize:Hn,showEditorSetting:ti,tabToSpace:Kn}=Sn,bi=(0,Me.useRef)(),Vn=(0,Me.useRef)(),vi={onFontSizeChange:Gi=>{xn({type:0,payload:Gi}),(0,oe.t)("cmFontSize",Gi)},tabToSpace:Kn,cmFontSize:Hn,className:"oj",cmCodeMode:_n,onTabToSpace:Gi=>{xn({type:2,payload:Gi}),(0,oe.t)("cmTabToSpace",Gi)},onCodeModeChange:Gi=>{xn({type:1,payload:Gi}),(0,oe.t)("cmCodeMode",Gi)}};function ui(){xn({type:3,payload:!1})}function Ri(){xn({type:3,payload:!0})}const Di={value:Ct,language:wn,theme:_n,height:"calc(100% - 56px)",options:{fontSize:Hn,insertSpaces:Kn},onChange:Gi=>{Et(Gi),Vn.current=Gi,clearTimeout(bi.current),bi.current=setTimeout(()=>{fn(Vn.current)},1e4)},onEditBlur:Gi=>{Vn.current&&fn(Vn.current)}};return se.createElement(Me.Fragment,null,se.createElement("div",{className:"code-panel-container"},sn(Ri),!ht&&se.createElement(z.ZP,Ze({},Di))),se.createElement(ee.Z,null,se.createElement(ce.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:ti,onClose:ui},se.createElement(ie.Z,Ze({},vi)))))};function tt({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 vt=Ee(24334),st=Ee(78925),jt=Ee(90593),lt=Ee(92832),et=Ee(78241),ut=Ee(3113);const{TextArea:mt}=lt.default,_t=5e3;var gt=({callback:ht,onCancel:Ct,notes:Et})=>{function wn(fn){ht(fn)}return Me.createElement(et.default,{className:"note-form-panel",onFinish:wn,initialValues:{notes:Et}},Me.createElement(et.default.Item,{name:"notes",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9"},{max:_t,message:`\u7B14\u8BB0\u6700\u5927\u5B57\u6570\u4E3A${_t}`}]},Me.createElement(mt,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),Me.createElement(et.default.Item,{style:{textAlign:"right"}},Me.createElement(ut.ZP,{type:"ghost",onClick:Ct,style:{marginRight:10}}," \u53D6\u6D88 "),Me.createElement(ut.ZP,{type:"primary",htmlType:"submit"}," \u63D0\u4EA4 ")))},Bt={"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(2595),Qt=Ee(25700),bn=Ee(50023),Wt=Ee(3837),Kt=Ee(81699),Jt=Ee(58130),dn=Ee(61186),Lt=Ee.n(dn);const{Column:pt}=hn.default;var Rt=({submitResult:ht,submitting:Ct,submitRecords:Et,page:wn,onPageChange:fn,topicId:sn})=>{const{status:Sn,id:xn,input:_n,output:Hn,expected_output:ti,is_file:Kn,input_file_url:bi,output_file_url:Vn,expected_output_file_url:vi,error_msg:ui}=ht||{},{records:Ri,records_count:Di}=Et||{},Gi=(0,ke.useParams)();function Oi(){Kn?navigator.clipboard.writeText(vt.Base64.decode(ui)).then(()=>{Le.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(vt.Base64.decode(Hn)).then(()=>{Le.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return Me.createElement(Se.Z,{spinning:Ct,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"},jt.Im[Sn])),Me.createElement("li",{className:Ht.error},Me.createElement("a",{onClick:Oi},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",Me.createElement(Wt.Z,null)," ")),Me.createElement("li",null,Me.createElement(ke.Link,{to:`/problems/${sn}/record-detail/${xn}?backId=${Gi==null?void 0:Gi.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,!Kn&&_n,Kn&&Me.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,Jt.LR)(bi,_n)},_n)),Me.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),Me.createElement("pre",null,(Sn===4||Sn===5)&&vt.Base64.decode(ui),Sn!=4&&Sn!=5&&(Kn?Me.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,Jt.LR)(Vn,Hn)},Hn):vt.Base64.decode(Hn))),Me.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),Me.createElement("pre",null,!Kn&&vt.Base64.decode(ti),Kn&&Me.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,Jt.LR)(vi,ti)},ti))):null):null,(Ri==null?void 0:Ri.length)>0?Me.createElement(hn.default,{dataSource:Ri,rowKey:"id",pagination:!1},Me.createElement(pt,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:(Ii,cr)=>Me.createElement("span",null," ",Lt()(Ii).format("YYYY-MM-DD HH:mm:ss"))}),Me.createElement(pt,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:(Ii,cr)=>{var ei;return Me.createElement(ke.Link,{className:Ii===0?"c-green":"c-red",to:`/problems/${sn}/record-detail/${cr.id}?backId=${Gi==null?void 0:Gi.save_identifier}`},(ei=jt.Im[Ii])==null?void 0:ei.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,Di>15?Me.createElement(Qt.Z,{className:Ht.pagination,current:wn,pageSize:15,total:Di,onChange:fn}):null)},St=Ee(97267),yt=Ee(12563),nt=Ee(81327),He={desc:"desc___X8_hx",info:"info___C1DPv","commit-info":"commit-info____9yQm"},Ie=Ee(25711),We=Ee(59301);const Oe={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u9002\u4E2D",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}};var Ce=({hack:ht,onTriggerPraise:Ct,toDiscuss:Et})=>{const{language:wn,difficulty:fn,time_limit:sn,username:Sn,user_path:xn,user_praise:_n,comments_count:Hn,praises_count:ti,description:Kn,pass_count:bi,submit_count:Vn}=ht,vi=(0,ke.useLocation)();console.log(ht.language,"language");const ui=Oe[fn];return We.createElement(We.Fragment,null,We.createElement("ul",{className:He.info},We.createElement("li",null,"\u96BE\u5EA6\uFF1A",We.createElement(yt.default,{color:ui==null?void 0:ui.color},ui==null?void 0:ui.name)),We.createElement("li",null,"\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",We.createElement("b",null,sn,"\u79D2"))),We.createElement(Ie.Z,{value:Kn,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,bi))),We.createElement("li",null,We.createElement(nt.Z,{size:4},We.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",We.createElement("b",null,Vn))," "),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,Hn))," ")))},Ne=Ee(86766),$e=Object.defineProperty,dt=Object.getOwnPropertySymbols,Je=Object.prototype.hasOwnProperty,Tt=Object.prototype.propertyIsEnumerable,qt=(ht,Ct,Et)=>Ct in ht?$e(ht,Ct,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[Ct]=Et,yn=(ht,Ct)=>{for(var Et in Ct||(Ct={}))Je.call(Ct,Et)&&qt(ht,Et,Ct[Et]);if(dt)for(var Et of dt(Ct))Tt.call(Ct,Et)&&qt(ht,Et,Ct[Et]);return ht};const rn=ht=>React.createElement("svg",yn({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 pn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjEwMCUiIGlkPSJhIj48c3RvcCBzdG9wLWNvbG9yPSIjRUVGN0ZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0MxRTJGRiIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSJ1cmwoI2EpIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHJ4PSI4Ii8+PGcgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNMTYuMDU3IDIwLjc4NEg4LjIzOEExLjIyIDEuMjIgMCAwIDAgNyAyMS45NzR2Ni44MTFhMS4yMiAxLjIyIDAgMCAwIDEuMjM4IDEuMTloNy44MTlhMS4yMTMgMS4yMTMgMCAwIDAgMS4yMzgtMS4xOXYtNi44MTFhMS4yMTMgMS4yMTMgMCAwIDAtLjM3Ni0uODQ3IDEuMjAzIDEuMjAzIDAgMCAwLS44NjItLjMzMnYtLjAxWm0tMS4yNSA2Ljc2OUg5LjQyM1YyMy4xMmg1LjM4NHY0LjQzM1oiIGZpbGw9IiM0Q0FDRkYiLz48cGF0aCBkPSJNMTYuMDU3IDEwLjAwNWExLjIyIDEuMjIgMCAwIDEgMS4yMzggMS4xODl2Ni44MTJhMS4yMTMgMS4yMTMgMCAwIDEtLjM3Ni44NDZjLS4yMzIuMjIyLS41NDIuMzQtLjg2Mi4zMzJIOC4yMzhBMS4yMTMgMS4yMTMgMCAwIDEgNyAxOC4wMDV2LTYuODExYTEuMjIgMS4yMiAwIDAgMSAxLjIzOC0xLjE5Wm0tMS4yMzkgMi40MUg5LjQzNHY0LjQwMWg1LjM4NHYtNC40WiIgZmlsbD0iIzk0Q0RGRiIvPjxwYXRoIGQ9Ik0yMC40MTggMTIuNjMyaDExLjE4OWExLjIxMyAxLjIxMyAwIDAgMCAxLjIzOC0xLjE3OSAxLjIyNCAxLjIyNCAwIDAgMC0uMzcxLS44NTcgMS4yMTQgMS4yMTQgMCAwIDAtLjg2Ny0uMzQzSDIwLjQxOGExLjIwMyAxLjIwMyAwIDAgMC0uODY2LjMzNmMtLjIzMy4yMjMtLjM2Ny41My0uMzcyLjg1NC4wMDUuMzIzLjE0LjYzLjM3Mi44NTQuMjMyLjIyMy41NDQuMzQ0Ljg2Ni4zMzVaTTMxLjU3NSAxNi4wMjdoLTExLjE5YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTE5LjU1N2MtLjIzNy4zODQtLjIzNy44NyAwIDEuMjU0LjIzOC4zODQuNjcyLjYgMS4xMi41NTdoMTEuMTg5Yy40NDguMDQzLjg4Mi0uMTczIDEuMTE5LS41NTcuMjM3LS4zODQuMjM3LS44NyAwLTEuMjU0YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTItLjU1N1pNMzEuNTc1IDIxLjU5NWgtMTEuMTlhMS4xODMgMS4xODMgMCAwIDAtMS4xMTkuNTU3Yy0uMjM3LjM4NC0uMjM3Ljg3IDAgMS4yNTQuMjM4LjM4NC42NzIuNiAxLjEyLjU1N2gxMS4xODljLjQ0OC4wNDMuODgyLS4xNzMgMS4xMTktLjU1Ny4yMzctLjM4NC4yMzctLjg3IDAtMS4yNTRhMS4xODMgMS4xODMgMCAwIDAtMS4xMi0uNTU3Wk0zMS41NzUgMjcuMTYzaC0xMS4xOWExLjE4MyAxLjE4MyAwIDAgMC0xLjExOS41NTdjLS4yMzcuMzg0LS4yMzcuODcgMCAxLjI1NC4yMzguMzg0LjY3Mi42IDEuMTIuNTU3aDExLjE4OWMuNDQ4LjA0My44ODItLjE3MyAxLjExOS0uNTU3LjIzNy0uMzg0LjIzNy0uODcgMC0xLjI1NGExLjE4MyAxLjE4MyAwIDAgMC0xLjEyLS41NTdaIiBmaWxsPSIjMTg5MEZGIi8+PC9nPjwvZz48L3N2Zz4=",Fn=Ee(70635);function kn(ht){return(0,Fn.U2)("comments.json",ht)}function oi(ht){return(0,Fn.v_)(`/discusses/${ht}/plus.json`,{container_type:"Discuss",type:1})}function ri(ht){return(0,Fn.v_)("comments/reply.json",ht)}function Ti(ht){return(0,Fn.v_)("comments.json",ht)}function mi(ht){return(0,Fn.v_)(`comments/${ht==null?void 0:ht.id}/hidden.json`,ht)}function Qi(ht){return(0,Fn.IV)(`comments/${ht==null?void 0:ht.id}.json`)}var ir=Ee(75584),fr=Ee(2119);function er({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 Mr({data:ht,index:Ct,parentDiscussIndex:Et,user:wn,onSetActionType:fn}){const{author:sn,can_delete:Sn,content:xn,id:_n,time:Hn}=ht;function ti(){fn({id:_n,index:Ct,type:"delete-discuss",parentDiscussIndex:Et,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}const Kn=wn.admin||Sn||sn.user_id===wn.user_id;return Me.createElement("div",{className:"discuss-item-container second-discuss "},Me.createElement(er,{author:sn}),Me.createElement("section",null,Me.createElement("div",{className:"discuss-info"},Me.createElement("a",{href:`/users/${sn.login}`,target:"_blank"},sn.name),Me.createElement("span",{className:"grey"},Hn),Me.createElement("div",{className:"btn-group",style:{marginBottom:0}},Kn?Me.createElement("a",{onClick:ti,title:"\u5220\u9664"},Me.createElement("i",{className:"iconfont icon-shanchu"})):null)),Me.createElement(Ie.Z,{className:"discuss-content",value:xn})))}var qr=({user:ht,data:Ct,index:Et,onPlusDiscuss:wn,onSetActionType:fn,activeDiscussIndex:sn,onReplyDiscuss:Sn,onSetActiveDiscussIndex:xn})=>{const{content:_n,children:Hn,hidden:ti,id:Kn,praise_count:bi,time:Vn,user_praise:vi,can_delete:ui,author:Ri}=Ct;console.log(ui&&(!Hn||Hn.length==0),"children22");function Di(){xn(Kn)}function Gi(){wn(Kn,!vi,Et)}function Oi(){fn({id:Kn,index:Et,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function Ii(){fn({id:Kn,index:Et,params:{hidden:ti?"0":"1"},type:"hidden-discuss",message:ti?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}const cr=ht.admin||ht.user_id===Ri.user_id;return Me.createElement("div",{className:"discuss-item-container",key:Kn},Me.createElement(er,{author:Ri}),Me.createElement("section",null,Me.createElement("div",{className:"discuss-info"},Me.createElement("a",{href:`/users/${Ri.login}`,target:"_blank"}," ",Ri.name," "),Me.createElement("span",{className:"grey"},Vn)),Me.createElement(Ie.Z,{className:"discuss-content",value:_n}),Hn&&Hn.length>0?Me.createElement("div",{className:"reply-discuss-container"},Hn.map((ei,ji)=>Me.createElement(Mr,{key:ei.id,data:ei,index:ji,user:ht,onSetActionType:fn,parentDiscussIndex:Et}))):null,Me.createElement("div",{className:"btn-group"},(0,fr.Ny)()?Me.createElement("a",{onClick:Ii,title:ti?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},Me.createElement("i",{className:ti?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,ui&&(!Hn||Hn.length==0)?Me.createElement("a",{onClick:Oi,title:"\u5220\u9664"},Me.createElement("i",{className:"iconfont icon-shanchu"})):null,Me.createElement("a",{onClick:Di,title:"\u56DE\u590D"}," ",Me.createElement("i",{className:"iconfont icon-huifu1"})," "),Me.createElement("a",{onClick:Gi,className:vi?"c-orange":""},Me.createElement("i",{className:vi?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),Me.createElement("span",null,bi||""))),Me.createElement(ir.Z,{id:Kn,activeDiscussIndex:sn,onReplyDiscuss:Sn})))},di=Ee(2307),xr=Ee(23469),zi=(ht,Ct,Et)=>new Promise((wn,fn)=>{var sn=_n=>{try{xn(Et.next(_n))}catch(Hn){fn(Hn)}},Sn=_n=>{try{xn(Et.throw(_n))}catch(Hn){fn(Hn)}},xn=_n=>_n.done?wn(_n.value):Promise.resolve(_n.value).then(sn,Sn);xn((Et=Et.apply(ht,Ct)).next())}),rt=({user_praise:ht,praise_count:Ct,praisePlus:Et,onCreateDiscuss:wn,discuss_count:fn})=>{const[sn,Sn]=(0,Me.useState)(!1),[xn,_n]=(0,Me.useState)("");function Hn(Vn){_n(Vn)}function ti(){Sn(!0)}function Kn(){Sn(!1)}function bi(){return zi(this,null,function*(){wn(xn),_n(""),Sn(!1)})}return Me.createElement("div",{className:`dis-input-editor-container ${sn?"active":""} `},Me.createElement("div",{className:sn?"text-area hide":"text-area"},Me.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:ti}),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"} `}),Ct?Me.createElement("span",null,Ct):"")),sn?Me.createElement("div",{className:"input-mask",onClick:Kn}):null,Me.createElement("div",{className:sn?"md-container":"md-container hide"},Me.createElement(xr.Z,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:xn,height:240,onChange:Hn}),Me.createElement("div",{className:"tip-container",onClick:Kn},Me.createElement("a",{className:"btn-send",onClick:bi}," \u53D1\u9001 "))))},zr=Object.defineProperty,hr=Object.defineProperties,vo=Object.getOwnPropertyDescriptors,co=Object.getOwnPropertySymbols,yo=Object.prototype.hasOwnProperty,eo=Object.prototype.propertyIsEnumerable,lo=(ht,Ct,Et)=>Ct in ht?zr(ht,Ct,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[Ct]=Et,ln=(ht,Ct)=>{for(var Et in Ct||(Ct={}))yo.call(Ct,Et)&&lo(ht,Et,Ct[Et]);if(co)for(var Et of co(Ct))eo.call(Ct,Et)&&lo(ht,Et,Ct[Et]);return ht},Ke=(ht,Ct)=>hr(ht,vo(Ct)),qe=(ht,Ct,Et)=>new Promise((wn,fn)=>{var sn=_n=>{try{xn(Et.next(_n))}catch(Hn){fn(Hn)}},Sn=_n=>{try{xn(Et.throw(_n))}catch(Hn){fn(Hn)}},xn=_n=>_n.done?wn(_n.value):Promise.resolve(_n.value).then(sn,Sn);xn((Et=Et.apply(ht,Ct)).next())});const Xe={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null};var wt=(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))(wt||{});function At(ht,Ct){switch(Ct.type){case 6:return Ke(ln({},ht),{loading:!0});case 0:return ln(ln({},ht),Ct.payload);case 1:return ln(ln({},ht),Ct.payload);case 4:return ln(ln({},ht),Ct.payload);case 3:return ln(ln({},ht),Ct.payload);case 5:return ln(ln({},ht),Ct.payload);case 2:return ln(ln({},ht),Ct.payload);default:throw new Error}}var Nt=({user:ht,identifier:Ct,hack:Et,onTriggerPraise:wn,setDiscussTotal:fn})=>{const[sn,Sn]=(0,Me.useReducer)(At,Xe),{loading:xn,page:_n,data:Hn,count:ti,actionType:Kn,activeDiscussIndex:bi}=sn;console.log("---",sn);const Vn=(0,Me.useCallback)(()=>qe(void 0,null,function*(){Sn({type:6});const ei=yield kn({container_type:"Practice",container_identifier:Ct,limit:10,page:_n}),{comments:ji,disscuss_count:Li}=ei;Sn({type:0,payload:{data:ji,count:Li,loading:!1}}),fn(Li)}),[_n,Ct]);(0,Me.useEffect)(()=>{Vn()},[Ct,_n]);function vi(ei){Sn({type:5,payload:{page:ei}})}function ui(ei){Sn({type:4,payload:{actionType:ei}})}function Ri(ei){Sn(bi===ei?{type:2,payload:{activeDiscussIndex:null}}:{type:2,payload:{activeDiscussIndex:ei}})}function Di(ei,ji,Li){return qe(this,null,function*(){try{const Ci=yield oi(ei);Hn[Li].user_praise=ji,Hn[Li].praise_count=Ci.praise_count,Sn({type:3,payload:{data:[...Hn]}})}catch(Ci){console.log(Ci)}})}function Gi(){return qe(this,null,function*(){const{id:ei,params:ji,type:Li,index:Ci,parentDiscussIndex:Yi}=Kn;Li==="hidden-discuss"&&(console.log(ji,"params"),yield mi(ln({id:ei,container_type:"Practice",container_identifier:Ct},ji)),Yi?Hn[Yi].children[Ci].hidden=ji.hidden==1:Hn[Ci].hidden=ji.hidden==1,Sn({type:4,payload:{actionType:null,data:[...Hn]}})),Li==="delete-discuss"&&(yield Qi({id:ei,container_type:"Practice",container_identifier:Ct}),Sn({type:4,payload:{actionType:null}}),yield Vn())})}function Oi(){Sn({type:4,payload:{actionType:null}})}function Ii(ei,ji){return qe(this,null,function*(){try{yield ri({container_type:"Practice",container_identifier:Ct,comments:{content:ji,parent_id:ei}}),Vn()}catch(Li){console.log(Li)}})}function cr(ei){return qe(this,null,function*(){Sn({type:6}),yield Ti({comments:{content:ei},container_type:"Practice",container_identifier:Ct}),Vn()})}return Me.createElement(Me.Fragment,null,Me.createElement("div",{className:"discuss-panel"},Hn.length===0?Me.createElement(St.Z,null):Me.createElement(Se.Z,{spinning:xn},Hn.map((ei,ji)=>Me.createElement(qr,{onReplyDiscuss:Ii,onPlusDiscuss:Di,onSetActiveDiscussIndex:Ri,onSetActionType:ui,data:ei,index:ji,user:ht,activeDiscussIndex:bi}))),ti>10?Me.createElement("div",{className:"pagination-container mt10 mb10"},Me.createElement(Qt.Z,{showQuickJumper:!0,onChange:vi,current:_n,total:ti,showTotal:ei=>Me.createElement("span",{style:{color:"#656F87"}},"\u5171",Me.createElement("span",{className:"c-light-primary"},ei),"\u6761\u6570\u636E")})):null),Me.createElement(rt,{user_praise:Et.user_praise,praise_count:Et.praises_count,praisePlus:wn,discuss_count:Et.comments_count,onCreateDiscuss:cr}),Me.createElement(ee.Z,null,Me.createElement(he.default,{centered:!0,title:"\u63D0\u793A",open:!!Kn,onOk:Gi,onCancel:Oi},Me.createElement("p",null,Kn?Kn.message:"")),Me.createElement(di.Z,null)))},bt={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"},gn={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"},En=Object.defineProperty,Un=Object.getOwnPropertySymbols,Pn=Object.prototype.hasOwnProperty,zt=Object.prototype.propertyIsEnumerable,Yt=(ht,Ct,Et)=>Ct in ht?En(ht,Ct,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[Ct]=Et,Cn=(ht,Ct)=>{for(var Et in Ct||(Ct={}))Pn.call(Ct,Et)&&Yt(ht,Et,Ct[Et]);if(Un)for(var Et of Un(Ct))zt.call(Ct,Et)&&Yt(ht,Et,Ct[Et]);return ht};const An=ht=>React.createElement("svg",Cn({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 Vt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExIDBhMSAxIDAgMCAxIDEgMXY4YTEgMSAwIDAgMS0xIDFIMWExIDEgMCAwIDEtMS0xVjFhMSAxIDAgMCAxIDEtMWgxMFpNNC40IDIuNGEuNC40IDAgMCAwLS40LjR2NC40YS40LjQgMCAwIDAgLjY0LjMybDIuNzItMi4wNGEuNi42IDAgMCAwIDAtLjk2TDQuNjQgMi40OGEuNC40IDAgMCAwLS4yNC0uMDhaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",an=Object.defineProperty,Bn=Object.getOwnPropertySymbols,Nn=Object.prototype.hasOwnProperty,qn=Object.prototype.propertyIsEnumerable,Gn=(ht,Ct,Et)=>Ct in ht?an(ht,Ct,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[Ct]=Et,Jn=(ht,Ct)=>{for(var Et in Ct||(Ct={}))Nn.call(Ct,Et)&&Gn(ht,Et,Ct[Et]);if(Bn)for(var Et of Bn(Ct))qn.call(Ct,Et)&&Gn(ht,Et,Ct[Et]);return ht};const Rn=ht=>React.createElement("svg",Jn({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 li="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjOTk5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQ0NDIi8+PC9nPjwvc3ZnPg==",Mi=Object.defineProperty,zn=Object.getOwnPropertySymbols,si=Object.prototype.hasOwnProperty,Hi=Object.prototype.propertyIsEnumerable,ur=(ht,Ct,Et)=>Ct in ht?Mi(ht,Ct,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[Ct]=Et,Ai=(ht,Ct)=>{for(var Et in Ct||(Ct={}))si.call(Ct,Et)&&ur(ht,Et,Ct[Et]);if(zn)for(var Et of zn(Ct))Hi.call(Ct,Et)&&ur(ht,Et,Ct[Et]);return ht};const un=ht=>React.createElement("svg",Ai({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 ai="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjMDE1MmQ5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQjZEMEZDIi8+PC9nPjwvc3ZnPg==",wi=Object.defineProperty,fi=Object.getOwnPropertySymbols,Wi=Object.prototype.hasOwnProperty,Ni=Object.prototype.propertyIsEnumerable,lr=(ht,Ct,Et)=>Ct in ht?wi(ht,Ct,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[Ct]=Et,Fi=(ht,Ct)=>{for(var Et in Ct||(Ct={}))Wi.call(Ct,Et)&&lr(ht,Et,Ct[Et]);if(fi)for(var Et of fi(Ct))Ni.call(Ct,Et)&&lr(ht,Et,Ct[Et]);return ht};const $i=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 Lr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNC43MTcuMDFoOC44NGMxLjU3MSAwIDIuMzU3Ljc3NyAyLjM1NyAyLjMzMnY1LjI1YzAgMS41NTYtLjc4NiAyLjMzNC0yLjM1NyAyLjMzNGgtOC44NGMtMS41NzIgMC0yLjM1Ny0uNzc4LTIuMzU3LTIuMzM0di01LjI1QzIuMzYuNzg3IDMuMTQ1LjAxIDQuNzE3LjAxWiIgZmlsbD0iIzk5OSIvPjxwYXRoIGQ9Ik0yLjM2IDIuMzQyaDguODRhMi4zNyAyLjM3IDAgMCAxIDEuNjY2LjY4NGMuNDQyLjQzNy42OSAxLjAzLjY5IDEuNjV2NS4yNWMwIDEuMjg4LTEuMDU1IDIuMzMzLTIuMzU3IDIuMzMzSDcuOTRsLTEuMTYgMS4xNTMtMS4xNjctMS4xNTNIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NXYtNS4yNWMwLS42Mi4yNDgtMS4yMTMuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4NFoiIGZpbGw9IiNCNkQwRkMiLz48cGF0aCBkPSJNMi4zNiAyLjkyNmg4Ljg0YzEuMzAxIDAgMi4zNTcgMS4wNDQgMi4zNTcgMi4zMzN2NS4yNWMwIC42MTktLjI0OSAxLjIxMi0uNjkgMS42NWEyLjM3IDIuMzcgMCAwIDEtMS42NjguNjgzSDcuOTRsLTEuMTYgMS4xNTQtMS4xNjctMS4xNTRIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NVY1LjI2YzAtLjYxOS4yNDgtMS4yMTIuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4M1oiIGZpbGw9IiNDQ0MiLz48cGF0aCBkPSJNMy41MzggNS44NDJoNi40ODNjLjM5MyAwIC41ODkuMTk1LjU4OS41ODQgMCAuMzg5LS4xOTYuNTgzLS41OS41ODNIMy41MzljLS4zOTMgMC0uNTktLjE5NC0uNTktLjU4MyAwLS4zOS4xOTctLjU4NC41OS0uNTg0Wk0zLjUzOCA4Ljc2aDQuNzE1Yy4zOTMgMCAuNTkuMTk0LjU5LjU4MiAwIC4zOS0uMTk3LjU4NC0uNTkuNTg0SDMuNTM4Yy0uMzkzIDAtLjU5LS4xOTUtLjU5LS41ODQgMC0uMzg4LjE5Ny0uNTgzLjU5LS41ODNaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==",On=Object.defineProperty,Kr=Object.getOwnPropertySymbols,In=Object.prototype.hasOwnProperty,br=Object.prototype.propertyIsEnumerable,xo=(ht,Ct,Et)=>Ct in ht?On(ht,Ct,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[Ct]=Et,Cr=(ht,Ct)=>{for(var Et in Ct||(Ct={}))In.call(Ct,Et)&&xo(ht,Et,Ct[Et]);if(Kr)for(var Et of Kr(Ct))br.call(Ct,Et)&&xo(ht,Et,Ct[Et]);return ht};const Fo=ht=>React.createElement("svg",Cr({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 oo="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNy45NjUgMTEuOTYxQzIuNTkzIDExLjk2MSAwIDYuOTI2IDAgNS45ODEgMCA1LjAzNSAyLjYyMyAwIDcuOTY1IDBzNy45NjUgNC45ODQgNy45NjUgNS45OGMwIC45OTctMi41OTMgNS45ODEtNy45NjUgNS45ODFabTAtMi4yMDhjMS4yOTYgMCAyLjQ5NC0uNzIgMy4xNDItMS44ODZhMy45MDIgMy45MDIgMCAwIDAgMC0zLjc3M2MtLjY0OC0xLjE2Ny0xLjg0Ni0xLjg4Ni0zLjE0Mi0xLjg4Ni0yLjAwNCAwLTMuNjI5IDEuNjktMy42MjkgMy43NzNzMS42MjUgMy43NzIgMy42MjkgMy43NzJaIiBmaWxsPSIjQ0NDIi8+PHBhdGggZD0iTTcuOTY1IDguMjhjLTEuMjIyIDAtMi4yMTMtMS4wMjktMi4yMTMtMi4zIDAtMS4yNy45OTEtMi4zIDIuMjEzLTIuM3MyLjIxMiAxLjAzIDIuMjEyIDIuM2MwIDEuMjcxLS45OSAyLjMtMi4yMTIgMi4zWiIgZmlsbD0iIzk5OSIvPjwvZz48L3N2Zz4=",Ji=({style:ht={},onClick:Ct,onAssist:Et,onHide:wn,data:fn,active:sn,showLine:Sn})=>Me.createElement(Me.Fragment,null,Me.createElement("div",{className:sn===(fn==null?void 0:fn.id)?`${gn.list} ${gn.active}`:gn.list,style:ht,onClick:()=>Ct(fn)},(fn==null?void 0:fn.video)&&Me.createElement("div",{className:gn.left},Me.createElement("img",{src:fn==null?void 0:fn.video_cover}),Me.createElement("div",null,Me.createElement("img",{src:Vt}),Me.createElement("span",null,fn==null?void 0:fn.video_duration)),Me.createElement("div",{className:gn.mask})),Me.createElement("div",{className:gn.right},Me.createElement("div",{className:gn.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:gn.title},fn==null?void 0:fn.name),(fn==null?void 0:fn.is_authority)&&Me.createElement("div",{className:gn.b},"\u5B98\u65B9"),(fn==null?void 0:fn.is_excellent)&&Me.createElement("div",{className:gn.a},"\u7CBE\u9009")),Me.createElement("div",{className:gn.des},Me.createElement(Ie.Z,{showLines:2,showTextOnly:!0,value:(fn==null?void 0:fn.content)||"\u6682\u65E0\u5185\u5BB9"})),Me.createElement("div",{className:gn.tag},Me.createElement("span",{className:"current",onClick:xn=>{xn.stopPropagation(),Et(fn)}},Me.createElement("img",{src:fn!=null&&fn.user_liker?ai:li}),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:Lr}),Me.createElement("span",null,fn==null?void 0:fn.discusses_count)),Me.createElement("span",null,Me.createElement("img",{src:oo}),Me.createElement("span",null,fn==null?void 0:fn.viewed_count)),(0,fr.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:gn.line})),pr={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"},kr=Ee(6848),hi=Ee(72917),kt=Object.defineProperty,Pr=Object.getOwnPropertySymbols,_o=Object.prototype.hasOwnProperty,Oo=Object.prototype.propertyIsEnumerable,wo=(ht,Ct,Et)=>Ct in ht?kt(ht,Ct,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[Ct]=Et,yr=(ht,Ct)=>{for(var Et in Ct||(Ct={}))_o.call(Ct,Et)&&wo(ht,Et,Ct[Et]);if(Pr)for(var Et of Pr(Ct))Oo.call(Ct,Et)&&wo(ht,Et,Ct[Et]);return ht};const tr=ht=>React.createElement("svg",yr({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 Hr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNiAwQzEuMTc1IDAgLjc2OC4xNy40NjguNDc0QTEuNjMgMS42MyAwIDAgMCAwIDEuNjIydjMuMjQzaDMuMjM3TDcuMzc4IDBIMS42Wm03Ljg3NiAwTDUuMzM4IDQuODY1aDUuOUwxNS4zNzEgMEg5LjQ3NlptNy45OTggMC00LjEzNyA0Ljg2NWg1Ljg5NkwyMy4zNzIgMGgtNS44OThabTggMC00LjEzOCA0Ljg2NWg2LjY2VjEuNjIyYTEuNjI5IDEuNjI5IDAgMCAwLS40NjctMS4xNDhBMS41ODUgMS41ODUgMCAwIDAgMjYuMzk3IDBoLS45MjRaTTAgNi40ODd2MTcuODM3YzAgLjQzLjE2Ny44NDQuNDY4IDEuMTQ4LjMuMzA1LjcwNy40NzUgMS4xMzIuNDc0aDE4LjYxYTYuNTE1IDYuNTE1IDAgMCAxIDEuNjUyLTYuMjE4IDYuMzEgNi4zMSAwIDAgMSA2LjEzNC0xLjY3NVY2LjQ4N0gwWm0xMS45OTggNS42NzUgNi40IDQuMDU2LTYuNCA0LjA1NXYtOC4xMVptMTQuMzk5IDYuNDg3Yy0zLjA5Mi4wMDItNS41OTcgMi41NDQtNS41OTUgNS42NzguMDAxIDMuMTM0IDIuNTA4IDUuNjc0IDUuNiA1LjY3M0MyOS40OTQgMzAgMzIgMjcuNDU4IDMyIDI0LjMyNGMwLTEuNTA2LS41OS0yLjk1LTEuNjQxLTQuMDE0YTUuNTYxIDUuNTYxIDAgMCAwLTMuOTYyLTEuNjYxWm0wIDIuMDI3Yy4yMi4wMDMuNDI4LjEuNTc0LjI2Ni42NjMuNiAxLjMyNyAxLjM1MiAxLjk5IDIuMDAyYS44LjggMCAwIDEgMCAxLjE0Ljc4OC43ODggMCAwIDEtMS4xMjUgMGwtLjYzOC0uNjQ2djMuNzI0YS44MTQuODE0IDAgMCAxLS4zOTIuNzI0Ljc5Ljc5IDAgMCAxLS44MTUgMCAuODE0LjgxNCAwIDAgMS0uMzkyLS43MjR2LTMuNzI0bC0uNjM3LjY0NmEuNzkuNzkgMCAwIDEtLjc3My4yMTUuODAzLjgwMyAwIDAgMS0uNTY3LS41NzUuODE2LjgxNiAwIDAgMSAuMjEyLS43ODNjLjY1MS0uNjY0IDEuMzMzLTEuMzg4IDEuOTktMi4wMDJhLjc3OC43NzggMCAwIDEgLjU3NS0uMjY2bC0uMDAyLjAwM1oiIGZpbGw9IiMwMTUyZDkiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",Po=Object.defineProperty,Tr=Object.getOwnPropertySymbols,Io=Object.prototype.hasOwnProperty,qi=Object.prototype.propertyIsEnumerable,Ui=(ht,Ct,Et)=>Ct in ht?Po(ht,Ct,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[Ct]=Et,rr=(ht,Ct)=>{for(var Et in Ct||(Ct={}))Io.call(Ct,Et)&&Ui(ht,Et,Ct[Et]);if(Tr)for(var Et of Tr(Ct))qi.call(Ct,Et)&&Ui(ht,Et,Ct[Et]);return ht};const Yn=ht=>React.createElement("svg",rr({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 Vr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1IDBjOC4yODUgMCAxNSA2LjcxNyAxNSAxNSAwIDguMjg1LTYuNzE1IDE1LTE1IDE1LTguMjgzIDAtMTUtNi43MTUtMTUtMTVDMCA2LjcxNyA2LjcxNyAwIDE1IDBabTEwLjA0MSA3LjV2LjAxYTQ3LjkzNCA0Ny45MzQgMCAwIDAtMTEuMjMyIDkuMzg2bC00LjM3Mi0zLjN2LS4wMDJMNy41IDE1LjA4bDcuNTUzIDcuNDJBNDQuNjI1IDQ0LjYyNSAwIDAgMSAyNS41IDguNTVsLS40NTktMS4wNVoiIGZpbGw9IiM0NEQ3QjYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",Eo=Object.defineProperty,rs=Object.getOwnPropertySymbols,Lo=Object.prototype.hasOwnProperty,is=Object.prototype.propertyIsEnumerable,ms=(ht,Ct,Et)=>Ct in ht?Eo(ht,Ct,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[Ct]=Et,Ls=(ht,Ct)=>{for(var Et in Ct||(Ct={}))Lo.call(Ct,Et)&&ms(ht,Et,Ct[Et]);if(rs)for(var Et of rs(Ct))is.call(Ct,Et)&&ms(ht,Et,Ct[Et]);return ht};const ws=ht=>React.createElement("svg",Ls({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 ta="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZmlsbD0iI0FGQkFDQiIgZD0iTTkuOTkuMDJDNC40ODIuMDIuMDIgNC40ODIuMDIgOS45OWMwIDUuNTA2IDQuNDYzIDkuOTcgOS45NyA5Ljk3IDUuNTA2IDAgOS45Ny00LjQ2NCA5Ljk3LTkuOTcgMC01LjUwNy00LjQ2NC05Ljk3LTkuOTctOS45N1ptMS42MzYgMTMuNjljLS43NDQgMS4xOS0xLjQ4OCAyLjA4My0yLjgyNyAyLjA4My0uODkzLS4xNDktMS4xOS0uNzQ0LTEuMDQyLTEuNDg4bDEuNjM3LTUuNTA2YzAtLjE0OSAwLS4yOTgtLjE0OS0uMjk4LS4xNDggMC0uNDQ2IDAtLjU5NS4yOThsLTEuMDQyIDEuMTl2LS43NDRjLjc0NS0xLjE5IDEuOTM1LTIuMDgzIDIuODI4LTIuMDgzLjc0NC4xNDkgMS4xOS43NDQgMS4wNDIgMS40ODhMOS44NCAxNC4zMDVjMCAuMTQ5IDAgLjI5OC4xNDguMjk4LjE1IDAgLjQ0Ny0uMTUuNTk2LS4yOThsMS4wNDEtMS4zNHYuNzQ1Wm0tLjI5Ny03LjI5MmMtLjU5NiAwLTEuMTktLjQ0Ni0xLjE5LTEuMTkgMC0uNzQ1LjQ0Ni0xLjE5MSAxLjE5LTEuMTkxLjU5NSAwIDEuMTkuNDQ2IDEuMTkgMS4xOSAwIC43NDUtLjU5NSAxLjE5MS0xLjE5IDEuMTkxWiIvPjwvc3ZnPg==",aa=Object.defineProperty,Tn=Object.getOwnPropertySymbols,Os=Object.prototype.hasOwnProperty,hl=Object.prototype.propertyIsEnumerable,dl=(ht,Ct,Et)=>Ct in ht?aa(ht,Ct,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[Ct]=Et,vs=(ht,Ct)=>{for(var Et in Ct||(Ct={}))Os.call(Ct,Et)&&dl(ht,Et,Ct[Et]);if(Tn)for(var Et of Tn(Ct))hl.call(Ct,Et)&&dl(ht,Et,Ct[Et]);return ht},ja=(ht,Ct,Et)=>new Promise((wn,fn)=>{var sn=_n=>{try{xn(Et.next(_n))}catch(Hn){fn(Hn)}},Sn=_n=>{try{xn(Et.throw(_n))}catch(Hn){fn(Hn)}},xn=_n=>_n.done?wn(_n.value):Promise.resolve(_n.value).then(sn,Sn);xn((Et=Et.apply(ht,Ct)).next())});const lu=(ht,Ct)=>{var Et,wn,fn;const{uploadInfo:sn={}}=Ct.payload;switch(Ct.type){case"addVideo":return{videoList:[...ht.videoList,{name:sn.file.name,size:sn.file.size,type:sn.file.type,fileHash:sn.fileHash,state:sn.state,video_id:sn.videoId,attachment_id:"",article_id:-1,loaded:0,title:""}]};case"removeVideo":return{videoList:ht.videoList.filter(Sn=>Sn.name!==Ct.payload.name)};case"replaceVideo":return{videoList:Ct.payload};case"removeAll":return[];case"updateProgress":return{videoList:ht.videoList.map(Sn=>Sn.name===Ct.payload.uploadInfo.file.name?vs(vs({},Sn),{loaded:Ct.payload.progressPercent,video_id:sn.videoId,fileHash:sn.fileHash}):Sn)};case"updateTitle":return{videoList:(Et=ht.videoList)==null?void 0:Et.map(Sn=>Sn.name===Ct.payload.item.name?vs(vs({},Sn),{title:Ct.payload.title}):Sn)};case"updateImg":return{videoList:(wn=ht.videoList)==null?void 0:wn.map(Sn=>Sn.name===Ct.payload.item.name?vs(vs({},Sn),{attachment_id:Ct.payload.attachment_id}):Sn)};case"updateImg":return{videoList:(fn=ht.videoList)==null?void 0:fn.map(Sn=>Sn.name===Ct.payload.item.name?vs(vs({},Sn),{attachment_id:Ct.payload.attachment_id}):Sn)};default:return[]}};var uo=({onClose:ht,onOk:Ct,identifier:Et,active:wn})=>{var fn,sn;const[Sn]=et.default.useForm(),[xn,_n]=(0,Me.useState)({}),[Hn,ti]=(0,Me.useState)(!1),[Kn,bi]=(0,Me.useState)(!1),[Vn,vi]=(0,Me.useReducer)(lu,{videoList:[]}),ui=(0,fr.eY)(),Ri=(0,ke.useParams)(),Di=(0,Me.useRef)();(0,Me.useEffect)(()=>{wn&&Gi()},[wn]);const Gi=()=>ja(void 0,null,function*(){var Zi,vr,or,So,Mo,es,so,Or,Do,Dr;const Yr=yield(0,ge.M3)(Et,{active:wn});if((Yr==null?void 0:Yr.status)===0){const ts={name:(Zi=Yr==null?void 0:Yr.data)==null?void 0:Zi.name,content:(vr=Yr==null?void 0:Yr.data)==null?void 0:vr.content};Sn.setFieldsValue(ts),_n(ts),(So=(or=Yr==null?void 0:Yr.data)==null?void 0:or.videos)!=null&&So[0]&&vi({type:"replaceVideo",payload:[{video_id:(so=(es=(Mo=Yr==null?void 0:Yr.data)==null?void 0:Mo.videos)==null?void 0:es[0])==null?void 0:so.video_id,name:(Dr=(Do=(Or=Yr==null?void 0:Yr.data)==null?void 0:Or.videos)==null?void 0:Do[0])==null?void 0:Dr.title,loaded:100}]})}}),Oi=(Zi,vr)=>{_n(vs({},vr))},Ii=Zi=>ja(void 0,null,function*(){const vr={videos:Vn.videoList,articles:Zi};bi(!0);let or;wn?(vr.active=wn,or=yield(0,ge.gu)(Et,vr)):or=yield(0,ge.bx)(Et,vr),(or==null?void 0:or.status)===0&&(console.log(wn||(or==null?void 0:or.id),44),Ct(wn||(or==null?void 0:or.id))),bi(!1)}),cr=()=>{const Zi=document.getElementById("fileUpload");Zi.value=""},ei=Zi=>{var vr='{"Vod":{}}';if(ti(!0),Di.current){Di.current.addFile(Zi,null,null,null,vr);return}(0,hi.o)(ui==null?void 0:ui.login,"",{create:!Di,addFileSuccess:or=>{vi({type:"addVideo",payload:{uploadInfo:or}})},onUploadProgress:(or,So,Mo)=>{const es=Math.ceil(Mo*100);vi({type:"updateProgress",payload:{uploadInfo:or,progressPercent:es}}),cr()},onUploadFailed:or=>{Le.ZP.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:or=>{ti(!1)},onUploadSucceed:or=>{ti(!1)},onUploadError:or=>{ti(!1)},gotUploader:or=>{or.addFile(Zi,null,null,null,vr),Di.current=or}})},ji=Zi=>{var vr;const So=Zi.target.files[0];if(!So){cr();return}let Mo=So.name.toLowerCase();if(Mo&&Mo.indexOf(".avi")==-1&&Mo.indexOf(".flv")==-1&&Mo.indexOf(".f4v")==-1&&Mo.indexOf(".m4v")==-1&&Mo.indexOf(".mov")==-1&&Mo.indexOf(".mp4")==-1&&Mo.indexOf(".rmvb")==-1&&Mo.indexOf(".swf")==-1&&Mo.indexOf(".webm")==-1&&Mo.indexOf(".wmv")==-1){Le.ZP.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),cr();return}if(So.size>1024*1024*1024){Le.ZP.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC71024M"),cr();return}if((vr=Vn.videoList)!=null&&vr.find(es=>es.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"),cr();return}ei(So)},Li=(Zi,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:()=>{cr(),vi({type:"removeVideo",payload:{name:Zi}})}})},Ci=()=>Me.createElement("label",{htmlFor:"fileUpload",className:pr.main},Me.createElement("img",{src:Hr,alt:""}),Me.createElement("span",null,"\u4E0A\u4F20\u89C6\u9891")),Yi=Zi=>Me.createElement("div",{className:pr.mainLoading},Me.createElement("div",{className:pr.proWarp},Me.createElement("div",{className:pr.pro},Me.createElement("div",{style:{width:Zi}})),Me.createElement("span",null,Zi||0,"%")),Me.createElement("aside",null,"\u4E0A\u4F20\u4E2D"),Me.createElement("div",{className:pr.tip},Me.createElement(kr.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:ta,alt:""})))),gi=Zi=>Me.createElement("div",{className:pr.mainSucceed},Me.createElement("img",{src:Vr,alt:""}),Me.createElement("span",null,"\u4E0A\u4F20\u6210\u529F"),Me.createElement("div",{className:pr.tip},Me.createElement(kr.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:ta,alt:""}))),Me.createElement("div",{className:pr.del,onClick:()=>Li(Zi.name,Zi.loaded==100)},Me.createElement("i",{className:"iconfont icon-shanchu7 mr5"}),"\u5220\u9664\u89C6\u9891")),dr=()=>{var Zi;return Me.createElement(Me.Fragment,null,(Zi=Vn.videoList)==null?void 0:Zi.map((vr,or)=>Me.createElement(Me.Fragment,{key:or},vr.loaded==100?gi(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=Vn.videoList)==null?void 0:fn.length;return Me.createElement("div",{className:pr.listForm},Me.createElement("header",null,wn?"\u7F16\u8F91":"\u53D1\u5E03","\u9898\u89E3"),Me.createElement("section",{className:pr.scroll,id:"sss"},Me.createElement("div",{className:pr.formWrap}," ",Me.createElement(et.default,{form:Sn,scrollToFirstError:!0,layout:"vertical",onValuesChange:Oi,onFinish:Ii},Me.createElement(et.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:`${((sn=xn.name)==null?void 0:sn.length)||0}/60`})),Me.createElement(et.default.Item,{name:"content",label:"\u5185\u5BB9:"},Me.createElement(xr.Z,{defaultValue:xn.content||"",watch:!0})))),Me.createElement("div",{className:pr.upload},Pi?dr():Ci(),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:pr.btns},Me.createElement(ut.ZP,{onClick:Xi,type:"primary",ghost:!0},"\u5173\u95ED"),Me.createElement(ut.ZP,{loading:Kn,disabled:Hn,onClick:()=>Sn.submit(),type:"primary"},"\u53D1\u5E03\u9898\u89E3")))},_r={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"},na=Ee(78485),Rr=Object.defineProperty,no=Object.getOwnPropertySymbols,$r=Object.prototype.hasOwnProperty,Ei=Object.prototype.propertyIsEnumerable,ls=(ht,Ct,Et)=>Ct in ht?Rr(ht,Ct,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[Ct]=Et,Ms=(ht,Ct)=>{for(var Et in Ct||(Ct={}))$r.call(Ct,Et)&&ls(ht,Et,Ct[Et]);if(no)for(var Et of no(Ct))Ei.call(Ct,Et)&&ls(ht,Et,Ct[Et]);return ht};const ba=ht=>React.createElement("svg",Ms({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 za="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNNi4zODUuMjU3Yy42MTYtLjM0MyAxLjYxNi0uMzQyIDIuMjMgMGw1LjI3IDIuOTRDMTQuNTAxIDMuNTM4IDE1IDQuMzggMTUgNS4wNzF2NS44NTZjMCAuNjkyLS41MDEgMS41MzMtMS4xMTUgMS44NzZsLTUuMjcgMi45MzljLS42MTYuMzQzLTEuNjE2LjM0Mi0yLjIzIDBsLTUuMjctMi45NEMuNDk5IDEyLjQ2MiAwIDExLjYyMiAwIDEwLjkyOVY1LjA3MkMwIDQuMzguNTAxIDMuNTQgMS4xMTUgMy4xOTZabTEuNDIzIDMuODE3Yy0uMTY5LS4zNDEtLjQ0Ni0uMzQxLS42MTUgMEw2LjM4IDUuNzE3Yy0uMTY5LjM0MS0uNjE2LjY2NS0uOTk0LjcybC0xLjgyLjI2NGMtLjM3OC4wNTUtLjQ2NC4zMTctLjE5LjU4M2wxLjMxNyAxLjI3OGMuMjczLjI2Ni40NDQuNzkuMzggMS4xNjVsLS4zMSAxLjgwNmMtLjA2Ni4zNzYuMTU4LjUzOC40OTYuMzZsMS42MjgtLjg1M2MuMzM4LS4xNzcuODktLjE3NyAxLjIzIDBsMS42MjcuODUzYy4zMzcuMTc3LjU2MS4wMTUuNDk3LS4zNmwtLjMxLTEuODA2Yy0uMDY1LS4zNzUuMTA1LS44OTkuMzc5LTEuMTY1bDEuMzE2LTEuMjc4Yy4yNzQtLjI2Ni4xODgtLjUyOS0uMTktLjU4M2wtMS44MTktLjI2NGMtLjM3Ny0uMDU0LS44MjUtLjM3OC0uOTk0LS43MloiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48dXNlIGZpbGw9IiM4REM5RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI2EiLz48Y2lyY2xlIGN4PSItMS41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLTIuNSIgY3k9Ii00LjUiIHI9IjEyLjUiIGZpbGw9IiNFRUY3RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgbWFzaz0idXJsKCNiKSIvPjwvZz48L3N2Zz4=",Ja=Object.defineProperty,Si=Object.getOwnPropertySymbols,fs=Object.prototype.hasOwnProperty,$s=Object.prototype.propertyIsEnumerable,Qa=(ht,Ct,Et)=>Ct in ht?Ja(ht,Ct,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[Ct]=Et,wl=(ht,Ct)=>{for(var Et in Ct||(Ct={}))fs.call(Ct,Et)&&Qa(ht,Et,Ct[Et]);if(Si)for(var Et of Si(Ct))$s.call(Ct,Et)&&Qa(ht,Et,Ct[Et]);return ht};const Il=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 Fr="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJtOCAwIDEuODU3IDEuMDczaDIuMTQ2bDEuMDcxIDEuODU0TDE0LjkzMSA0djIuMTQ0TDE2IDhsLTEuMDY5IDEuODU3VjEybC0xLjg1OCAxLjA3Mi0xLjA3MSAxLjg1Nkg5Ljg1N0w4IDE2bC0xLjg1NS0xLjA3M0g0bC0xLjA3Mi0xLjg1NkwxLjA3MiAxMlY5Ljg1N0wwIDhsMS4wNzItMS44NTZWNGwxLjg1Ny0xLjA3MyAxLjA3Mi0xLjg1NGgyLjE0NUw4IDBabTIuOTEgNi4zODVINC43OTZWMTJoMS4yNDZ2LS40NTFoNC4wMjZ2LjQzNWgxLjI0N1Y5LjE5Nkg2LjA0M3YtLjUxNWg0Ljg2NlY2LjM4NVptLS44NCAzLjY4MXYuNjEzSDYuMDQydi0uNjEzaDQuMDI2Wk05LjcwNSA3LjI0di41ODhINi4wNDN2LS41ODhoMy42NjNaTTguNjE1IDRsLTEuNDguMTM3Yy4wNTUuMTMzLjEyLjI4NC4xOTIuNDUzbC4wNzYuMTc1SDR2MS40MjZoMS4xOTV2LS40ODNoNS42MXYuNDgzSDEyVjQuNzY1SDguODgzYy0uMDc4LS4yMy0uMTQ4LS40My0uMjEtLjYwMkw4LjYxNiA0WiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzhEQzlGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9Ii41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLS41IiBjeT0iLTQuNSIgcj0iMTIuNSIgZmlsbD0iI0VFRjdGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PC9nPjwvc3ZnPg==",nc=Object.defineProperty,Aa=Object.getOwnPropertySymbols,Ha=Object.prototype.hasOwnProperty,Ta=Object.prototype.propertyIsEnumerable,$l=(ht,Ct,Et)=>Ct in ht?nc(ht,Ct,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[Ct]=Et,_u=(ht,Ct)=>{for(var Et in Ct||(Ct={}))Ha.call(Ct,Et)&&$l(ht,Et,Ct[Et]);if(Aa)for(var Et of Aa(Ct))Ta.call(Ct,Et)&&$l(ht,Et,Ct[Et]);return ht};const Ua=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 Ga="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),Dl={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,Ct,Et)=>new Promise((wn,fn)=>{var sn=_n=>{try{xn(Et.next(_n))}catch(Hn){fn(Hn)}},Sn=_n=>{try{xn(Et.throw(_n))}catch(Hn){fn(Hn)}},xn=_n=>_n.done?wn(_n.value):Promise.resolve(_n.value).then(sn,Sn);xn((Et=Et.apply(ht,Ct)).next())});const Gu=({id:ht,cb:Ct})=>{const[Et,wn]=(0,Me.useState)("");return Me.createElement("aside",{className:"mt10"},Me.createElement(xr.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"):Ct(ht,Et)})},"\u53D1\u9001"))))},Lu=({data:ht})=>{var Ct;return Me.createElement("div",{className:Dl.thirdlyLevelDiscuss},Me.createElement("span",{className:"c-grey-333"},Me.createElement("span",{className:"font 14 c-light-primary"},(Ct=ht==null?void 0:ht.author)==null?void 0:Ct.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:Ct,thirdlyReply:Et,setThirdlyReply:wn})=>{var fn,sn,Sn,xn;const _n=(0,fr.eY)();return console.log(_n,"user"),Me.createElement("div",{className:Dl.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:Dl.wrap},Me.createElement("div",{className:"font14",style:{marginBottom:6}},Me.createElement("span",{className:"c-grey-333"},(sn=ht==null?void 0:ht.author)==null?void 0:sn.name),(_n==null?void 0:_n.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(Hn=>Me.createElement(Lu,{key:Hn.id,data:Hn})),Et===(ht==null?void 0:ht.id)&&Me.createElement("div",null,Me.createElement(Gu,{id:ht==null?void 0:ht.id,cb:Ct}),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:Dl.line})))};var xc=({data:ht,onReplyDiscuss:Ct,secondReply:Et,setSecondReply:wn,thirdlyReply:fn,setThirdlyReply:sn,onPlusDiscuss:Sn})=>{var xn,_n,Hn,ti;const[Kn,bi]=(0,Me.useState)(!1);return console.log(ht,"data"),Me.createElement("div",{className:Dl.discussItem},Me.createElement("div",{className:Dl.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:Dl.wrap},Me.createElement("div",{className:"font14",style:{marginBottom:6}},Me.createElement("span",{className:"c-grey-333 mr30"},(_n=ht==null?void 0:ht.author)==null?void 0:_n.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:Dl.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 Vn;((Vn=ht==null?void 0:ht.children)==null?void 0:Vn.length)!==0&&(wn(null),bi(!Kn))},style:{color:Kn?"#0152d9":"#999999"}},Me.createElement("i",{className:"iconfont icon-xiaopinglun2 mr3"}),Me.createElement("span",null,Kn?"\u6536\u8D77\u8BC4\u8BBA":(Hn=ht==null?void 0:ht.children)==null?void 0:Hn.length)),Me.createElement("div",{onClick:()=>{bi(!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:(Vn,vi)=>{Ct(Vn,vi),bi(!0)}}),Kn&&Me.createElement("div",{className:Dl.secondLevelDiscuss},(ti=ht==null?void 0:ht.children)==null?void 0:ti.map(Vn=>Me.createElement(bl,{thirdlyReply:fn,setThirdlyReply:sn,key:Vn.id,data:Vn,onReplyDiscuss:Ct}))))))},uu=(ht,Ct,Et)=>new Promise((wn,fn)=>{var sn=_n=>{try{xn(Et.next(_n))}catch(Hn){fn(Hn)}},Sn=_n=>{try{xn(Et.throw(_n))}catch(Hn){fn(Hn)}},xn=_n=>_n.done?wn(_n.value):Promise.resolve(_n.value).then(sn,Sn);xn((Et=Et.apply(ht,Ct)).next())}),Uo=({identifier:ht,active:Ct,onOk:Et})=>{const[wn,fn]=(0,Me.useState)(""),[sn,Sn]=(0,Me.useState)(1),[xn,_n]=(0,Me.useState)([]),[Hn,ti]=(0,Me.useState)(0),[Kn,bi]=(0,Me.useState)(null),[Vn,vi]=(0,Me.useState)(null);(0,Me.useEffect)(()=>{ui(1),Sn(1)},[Ct]);const ui=Ii=>uu(void 0,null,function*(){const cr=yield kn({container_type:"QuestionSolutionArticle",container_identifier:Ct,limit:5,page:Ii});cr!=null&&cr.comments&&(_n((cr==null?void 0:cr.comments)||[]),Sn(Ii),ti(cr==null?void 0:cr.disscuss_count))}),Ri=()=>uu(void 0,null,function*(){if(wn===""){Le.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");return}const Ii=yield Ti({comments:{content:wn},container_type:"QuestionSolutionArticle",container_identifier:Ct});Ii!=null&&Ii.discuss&&(fn(""),ui(sn),Et())}),Di=(Ii,cr,ei)=>uu(void 0,null,function*(){const ji=yield ri({container_type:"QuestionSolutionArticle",container_identifier:Ct,comments:{content:cr,parent_id:Ii}});bi(null),vi(null),ui(sn)}),Gi=Ii=>uu(void 0,null,function*(){const cr=yield oi(Ii);ui(sn)}),Oi=Ii=>{Sn(Ii),ui(Ii)};return Me.createElement("div",{className:Uu.discuss},Me.createElement("aside",{className:Uu.reply,style:{borderWidth:Hn?1:0}},Me.createElement(xr.Z,{defaultValue:wn,id:"writeForumsReviewId",onChange:Ii=>{fn(Ii)},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:()=>Ri()},"\u53D1\u9001")))),xn==null?void 0:xn.map(Ii=>Me.createElement(xc,{secondReply:Kn,setSecondReply:bi,thirdlyReply:Vn,setThirdlyReply:vi,key:Ii.id,data:Ii,onReplyDiscuss:Di,onPlusDiscuss:Gi})),Me.createElement(Qt.Z,{className:Uu.pagination,showTotal:Ii=>Me.createElement("span",{style:{color:"#656F87"}},"\u5171",Me.createElement("span",{className:"c-light-primary"},Ii),"\u6761\u6570\u636E"),current:sn,onChange:Oi,total:Hn,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5}))},La=Ee(25039),ia=Object.defineProperty,Is=Object.getOwnPropertySymbols,bs=Object.prototype.hasOwnProperty,Ts=Object.prototype.propertyIsEnumerable,Gs=(ht,Ct,Et)=>Ct in ht?ia(ht,Ct,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[Ct]=Et,Ws=(ht,Ct)=>{for(var Et in Ct||(Ct={}))bs.call(Ct,Et)&&Gs(ht,Et,Ct[Et]);if(Is)for(var Et of Is(Ct))Ts.call(Ct,Et)&&Gs(ht,Et,Ct[Et]);return ht},Yl=(ht,Ct,Et)=>new Promise((wn,fn)=>{var sn=_n=>{try{xn(Et.next(_n))}catch(Hn){fn(Hn)}},Sn=_n=>{try{xn(Et.throw(_n))}catch(Hn){fn(Hn)}},xn=_n=>_n.done?wn(_n.value):Promise.resolve(_n.value).then(sn,Sn);xn((Et=Et.apply(ht,Ct)).next())}),Ds=({active:ht,identifier:Ct,onAssist:Et,onEdit:wn,onArticlesSkip:fn,onClose:sn,onOk:Sn,onDelete:xn,detailsIndex:_n,btnShowStatus:Hn})=>{var ti,Kn,bi,Vn,vi,ui,Ri,Di,Gi,Oi;const[Ii,cr]=(0,Me.useState)(!0),[ei,ji]=(0,Me.useState)({});(0,Me.useEffect)(()=>{ht&&Li()},[ht,_n]);const Li=(Xi=!0)=>Yl(void 0,null,function*(){Xi&&cr(!0);const Pi=yield(0,ge.wO)(Ct,{active:ht});(Pi==null?void 0:Pi.status)===0&&ji((Pi==null?void 0:Pi.data)||{}),cr(!1)}),Ci=Xi=>Yl(void 0,null,function*(){const Pi=yield(0,ge.qe)(Ct,Ws({active:ht},Xi));(Pi==null?void 0:Pi.status)===0&&(Li(!1),Sn())}),Yi=Xi=>Yl(void 0,null,function*(){(yield(0,ge.Rg)(Ct,{active:Xi==null?void 0:Xi.id})).status===0&&(Li(!1),Sn())}),gi=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)})},dr=()=>{Li(!1),Sn()};return Me.createElement("div",{className:_r.listDetails},Me.createElement(na.Z,{className:"pt20 pl20 pr20",loading:Ii,active:!0,paragraph:{rows:5}},Me.createElement("div",{className:_r.head},Me.createElement("div",{className:_r.name},Me.createElement("div",{title:ei==null?void 0:ei.name,className:_r.title},ei==null?void 0:ei.name),(ei==null?void 0:ei.is_authority)&&Me.createElement("div",{className:_r.b},"\u5B98\u65B9"),(ei==null?void 0:ei.is_excellent)&&Me.createElement("div",{className:_r.a},"\u7CBE\u9009")),Me.createElement("div",{className:_r.tag},Me.createElement("img",{src:ve.Z.IMG_SERVER+"/images/"+(ei==null?void 0:ei.image_url)}),Me.createElement("div",{className:"c-grey-333 ml5 mr20 font14"},ei==null?void 0:ei.username),Me.createElement("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12"},"\u53D1\u5E03\u4E8E",Lt()(ei==null?void 0:ei.created_at).format("YYYY-MM-DD")),Me.createElement("span",null,Me.createElement("img",{src:li}),Me.createElement("span",null,ei==null?void 0:ei.praises_count)),Me.createElement("span",null,Me.createElement("img",{src:Lr}),Me.createElement("span",null,ei==null?void 0:ei.discusses_count)),Me.createElement("span",null,Me.createElement("img",{src:oo}),Me.createElement("span",null,ei==null?void 0:ei.viewed_count)),Me.createElement("div",{className:_r.btn},((0,fr.Ny)()||(ei==null?void 0:ei.is_self))&&Me.createElement(Me.Fragment,null,Me.createElement(ut.ZP,{onClick:()=>gi(ei),type:"primary",ghost:!0},"\u5220\u9664"),Me.createElement(ut.ZP,{onClick:()=>wn(ei),type:"primary",ghost:!0},"\u7F16\u8F91")),(0,fr.Ny)()&&Me.createElement(ut.ZP,{onClick:()=>Ci({is_authority:!(ei!=null&&ei.is_authority)}),type:"primary"},Me.createElement("img",{src:Fr}),ei!=null&&ei.is_authority?"\u53D6\u6D88":"\u8BBE\u4E3A","\u5B98\u65B9"),(0,fr.Ny)()&&Me.createElement(ut.ZP,{onClick:()=>Ci({is_excellent:!(ei!=null&&ei.is_excellent)}),type:"primary"},Me.createElement("img",{src:za}),ei!=null&&ei.is_excellent?"\u53D6\u6D88":"\u8BBE\u4E3A","\u7CBE\u9009")))),Me.createElement("div",{className:_r.scroll},((Kn=(ti=ei==null?void 0:ei.videos)==null?void 0:ti[0])==null?void 0:Kn.id)&&Me.createElement("div",{className:_r.video},Me.createElement(Se.Z,{tip:"\u6B63\u5728\u8F6C\u7801\uFF0C\u8BF7\u7A0D\u7B49...",spinning:!((Vn=(bi=ei==null?void 0:ei.videos)==null?void 0:bi[0])!=null&&Vn.transcoded)},Me.createElement(La.Z,{poster:(ui=(vi=ei==null?void 0:ei.videos)==null?void 0:vi[0])==null?void 0:ui.cover_url,src:((Di=(Ri=ei==null?void 0:ei.videos)==null?void 0:Ri[0])==null?void 0:Di.play_url)||"",videoId:(Oi=(Gi=ei==null?void 0:ei.videos)==null?void 0:Gi[0])==null?void 0:Oi.id,logWatchHistory:()=>{}}))),Me.createElement(Ie.Z,{className:_r.html,value:(ei==null?void 0:ei.content)||""}),Me.createElement("div",{onClick:()=>Yi(ei),className:_r.g},Me.createElement("img",{className:"mr10",src:(ei!=null&&ei.user_liker,Ga)}),Me.createElement("span",null,ei==null?void 0:ei.praises_count)),Me.createElement(Uo,{onOk:dr,active:ht,identifier:Ct})),Me.createElement("div",{className:_r.btns},Me.createElement(ut.ZP,{onClick:()=>sn(),type:"primary",ghost:!0},"\u5173\u95ED"),Hn[0]&&Me.createElement(ut.ZP,{onClick:Xi=>fn(Xi,"prev"),style:{marginLeft:20},type:"primary"},"\u4E0A\u4E00\u9898\u89E3"),Hn[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,mr=Object.prototype.propertyIsEnumerable,bc=(ht,Ct,Et)=>Ct in ht?xh(ht,Ct,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[Ct]=Et,on=(ht,Ct)=>{for(var Et in Ct||(Ct={}))wc.call(Ct,Et)&&bc(ht,Et,Ct[Et]);if(nh)for(var Et of nh(Ct))mr.call(Ct,Et)&&bc(ht,Et,Ct[Et]);return ht};const Qn=ht=>React.createElement("svg",on({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(19155),Mu=Ee(35323),Tu=Object.defineProperty,Wu=Object.defineProperties,bh=Object.getOwnPropertyDescriptors,Cc=Object.getOwnPropertySymbols,Zs=Object.prototype.hasOwnProperty,Zr=Object.prototype.propertyIsEnumerable,Na=(ht,Ct,Et)=>Ct in ht?Tu(ht,Ct,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[Ct]=Et,Ks=(ht,Ct)=>{for(var Et in Ct||(Ct={}))Zs.call(Ct,Et)&&Na(ht,Et,Ct[Et]);if(Cc)for(var Et of Cc(Ct))Zr.call(Ct,Et)&&Na(ht,Et,Ct[Et]);return ht},_s=(ht,Ct)=>Wu(ht,bh(Ct)),bo=(ht,Ct,Et)=>new Promise((wn,fn)=>{var sn=_n=>{try{xn(Et.next(_n))}catch(Hn){fn(Hn)}},Sn=_n=>{try{xn(Et.throw(_n))}catch(Hn){fn(Hn)}},xn=_n=>_n.done?wn(_n.value):Promise.resolve(_n.value).then(sn,Sn);xn((Et=Et.apply(ht,Ct)).next())}),fl=({identifier:ht,tabStatus:Ct,setFilterListTotal:Et,setListStatus:wn})=>{const fn={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null};let[sn,Sn]=(0,Me.useState)(Ks({},fn));const[xn,_n]=(0,Me.useState)(!1),[Hn,ti]=(0,Me.useState)(0),[Kn,bi]=(0,Me.useState)(1),[Vn,vi]=(0,Me.useState)(null),[ui,Ri]=(0,Me.useState)([]),[Di,Gi]=(0,Me.useState)([!0,!0]),[Oi,Ii]=(0,Me.useState)(0),cr=(0,Me.useRef)(null);(0,Me.useEffect)(()=>{Zi()},[Ct]),(0,Me.useEffect)(()=>{ei()},[Vn]),(0,Me.useEffect)(()=>{Li(Ks({},fn)),Zi()},[ht]),(0,Me.useEffect)(()=>(window.addEventListener("resize",ji),wn(Oi),()=>{window.removeEventListener("resize",ji)}),[Oi]);const ei=()=>bo(void 0,null,function*(){if(!Vn){Gi([!0,!0]);return}const Dr=[!0,!0],Yr=ui==null?void 0:ui.findIndex(ts=>ts.id===Vn);Yr===0&&sn.page===1&&(Dr[0]=!1),(sn.page-1)*sn.limit+(Yr+1)===sn.total&&(Dr[1]=!1),Gi(Dr)}),ji=()=>{var Dr;if(Oi){const Yr=window.innerWidth-((Dr=cr.current)==null?void 0:Dr.clientWidth);ti(Yr)}},Li=Dr=>bo(void 0,null,function*(){var Yr,ts,Gr;_n(!0);const Ar=yield(0,ge.WH)(ht,Dr);return(Ar==null?void 0:Ar.status)===0&&(Ri(((Yr=Ar==null?void 0:Ar.data)==null?void 0:Yr.articles)||[]),Sn(_s(Ks({},Dr),{total:(ts=Ar==null?void 0:Ar.data)==null?void 0:ts.articles_count})),Et((Gr=Ar==null?void 0:Ar.data)==null?void 0:Gr.articles_count)),_n(!1),Ar}),Ci=()=>{(sn==null?void 0:sn.sort_direction)===null?sn.sort_direction="asc":(sn==null?void 0:sn.sort_direction)==="asc"?sn.sort_direction="desc":(sn==null?void 0:sn.sort_direction)==="desc"&&(sn.sort_direction=null),sn.page=1,Zi(),Sn(Ks({},sn)),Li(sn)},Yi=()=>{sn.page=1,sn.search=sn==null?void 0:sn.save_search,Zi(),Sn(Ks({},sn)),Li(sn)},gi=()=>{var Dr;const Yr=document.getElementsByClassName("btn-resize");Yr[0].style.visibility="hidden";const ts=window.innerWidth-((Dr=cr.current)==null?void 0:Dr.clientWidth);ti(ts)},dr=()=>{gi(),Ii(1)},Xi=Dr=>{gi(),vi(Dr==null?void 0:Dr.id),Ii(3)},Pi=Dr=>{gi(),vi(Dr==null?void 0:Dr.id),Ii(2)},Zi=()=>{const Dr=document.getElementsByClassName("btn-resize");Dr[0].style.visibility="visible",ti(0),Ii(0),vi(null)},vr=Dr=>{Ii(3),vi(Dr),sn.page=1,Sn(Ks({},sn)),Li(sn)},or=Dr=>{Ii(3),vi(Dr),Sn(Ks({},sn)),Li(sn)},So=Dr=>{Sn(Ks({},sn)),Li(sn)},Mo=Dr=>bo(void 0,null,function*(){(yield(0,ge.Rg)(ht,{active:Dr==null?void 0:Dr.id})).status===0&&(Li(sn),bi(Kn+1))}),es=Dr=>bo(void 0,null,function*(){(yield(0,ge.rL)(ht,{active:Dr==null?void 0:Dr.id})).status===0&&(Li(sn),bi(Kn+1))}),so=Dr=>bo(void 0,null,function*(){(yield(0,ge.de)(ht,{active:Dr==null?void 0:Dr.id})).status===0&&(Zi(),Li(sn))}),Or=Dr=>{sn.page=Dr,Sn(Ks({},sn)),Li(sn)},Do=(Dr,Yr)=>bo(void 0,null,function*(){var ts,Gr,Ar,Xr;const Er=ui==null?void 0:ui.findIndex(ao=>ao.id===Vn);if(console.log(Er,Yr,22),Yr==="prev"){if(Er===void 0){Le.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(Er===0){if(sn.page===1){Le.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(sn.page!==1){sn.page=sn.page-1,Sn(Ks({},sn));const ao=yield Li(sn);if((ao==null?void 0:ao.status)===0){const Nr=(Ar=ao==null?void 0:ao.data)==null?void 0:Ar.articles[((Gr=(ts=ao==null?void 0:ao.data)==null?void 0:ts.articles)==null?void 0:Gr.length)-1];vi(Nr==null?void 0:Nr.id),console.log(Dr.target,555)}}}else{const ao=ui[Er-1];vi(ao==null?void 0:ao.id)}}if(Yr==="next"){if(Er===void 0){Le.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if((sn.page-1)*sn.limit+(Er+1)===sn.total){Le.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(Er+1===sn.limit){sn.page=sn.page+1,Sn(Ks({},sn));const ao=yield Li(sn);if((ao==null?void 0:ao.status)===0){const Nr=(Xr=ao==null?void 0:ao.data)==null?void 0:Xr.articles[0];vi(Nr==null?void 0:Nr.id)}}else{const ao=ui[Er+1];vi(ao==null?void 0:ao.id)}}});return Me.createElement("div",{className:bt.wrap,ref:cr},Me.createElement("div",{className:bt.head},Me.createElement("div",{className:bt.sort,onClick:Ci},Me.createElement("span",null,"\u6700\u65B0"),Me.createElement("aside",null,Me.createElement(Qh.Z,{style:{color:(sn==null?void 0:sn.sort_direction)==="asc"?"#0152d9":"#bfbfbf"}}),Me.createElement(Mu.Z,{style:{color:(sn==null?void 0:sn.sort_direction)==="desc"?"#0152d9":"#bfbfbf"}}))),Me.createElement(lt.default.Search,{value:sn.save_search,className:bt["oj-width-input"],placeholder:"\u641C\u7D22\u9898\u89E3",onChange:Dr=>{sn.save_search=Dr.target.value,Sn(Ks({},sn))},onSearch:Yi}),Me.createElement("div",{onClick:dr,className:bt.btn},Me.createElement("img",{src:wh}),"\u5199\u9898\u89E3")),Me.createElement("div",{className:bt.listWarp},Me.createElement(Se.Z,{spinning:xn,className:"mt20"},ui==null?void 0:ui.map((Dr,Yr)=>{let ts=!0;return Yr+1===ui.length&&Yr!==0&&(ts=!1),Me.createElement(Ji,{active:Vn,key:Dr.id,data:Dr,showLine:ts,onClick:Xi,onAssist:Mo,onHide:es})}),(ui==null?void 0:ui.length)===0&&Me.createElement(St.Z,{customText:"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"}))),Me.createElement(Qt.Z,{className:bt.pagination,showTotal:Dr=>Me.createElement("span",{style:{color:"#656F87"}},"\u5171",Me.createElement("span",{className:"c-light-primary"},Dr),"\u6761\u6570\u636E"),total:sn.total,showSizeChanger:!1,current:sn==null?void 0:sn.page,onChange:Or,hideOnSinglePage:!0,showQuickJumper:!0}),Oi>0&&Me.createElement("div",{className:bt.fixedRight,style:{width:Hn}},Oi===1&&Me.createElement(uo,{identifier:ht,onClose:Zi,onOk:vr}),Oi===2&&Me.createElement(uo,{active:Vn,identifier:ht,onClose:Zi,onOk:or}),Oi===3&&Me.createElement(Ds,{btnShowStatus:Di,onArticlesSkip:Do,detailsIndex:Kn,active:Vn,identifier:ht,onClose:Zi,onOk:So,onEdit:Pi,onAssist:Mo,onDelete:so})))},ss={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,Ca=Object.defineProperties,Pc=Object.getOwnPropertyDescriptors,Go=Object.getOwnPropertySymbols,Wa=Object.prototype.hasOwnProperty,Vo=Object.prototype.propertyIsEnumerable,ps=(ht,Ct,Et)=>Ct in ht?Cl(ht,Ct,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[Ct]=Et,us=(ht,Ct)=>{for(var Et in Ct||(Ct={}))Wa.call(Ct,Et)&&ps(ht,Et,Ct[Et]);if(Go)for(var Et of Go(Ct))Vo.call(Ct,Et)&&ps(ht,Et,Ct[Et]);return ht},Rs=(ht,Ct)=>Ca(ht,Pc(Ct)),jo=(ht,Ct,Et)=>new Promise((wn,fn)=>{var sn=_n=>{try{xn(Et.next(_n))}catch(Hn){fn(Hn)}},Sn=_n=>{try{xn(Et.throw(_n))}catch(Hn){fn(Hn)}},xn=_n=>_n.done?wn(_n.value):Promise.resolve(_n.value).then(sn,Sn);xn((Et=Et.apply(ht,Ct)).next())}),Ur=({visible:ht,onVisible:Ct,value:Et,onChange:wn,setIndex:fn})=>{var sn;const Sn={page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null};let[xn,_n]=(0,Me.useState)(Sn);const[Hn,ti]=(0,Me.useState)([]),[Kn,bi]=(0,Me.useState)([]),[Vn,vi]=(0,Me.useState)(!1),ui=(0,Me.useRef)([]),Ri=(0,Me.useRef)(null),Di=(0,ke.useParams)();(0,Me.useEffect)(()=>(Di!=null&&Di.id&&(Ri.current=setInterval(()=>{Gi(30)},3e4)),()=>{clearInterval(Ri.current)}),[]);const Gi=gi=>jo(void 0,null,function*(){const dr=yield(0,ge.uc)(Di==null?void 0:Di.id,{practice_time:gi})});(0,Me.useEffect)(()=>{Li(xn),ei()},[]),(0,Me.useEffect)(()=>(window.addEventListener("click",Ii),()=>{window.removeEventListener("click",Ii)}),[Di==null?void 0:Di.save_identifier,ht]),(0,Me.useEffect)(()=>{const gi=ui.current.findIndex(vr=>vr.identifier===(Di==null?void 0:Di.save_identifier)),dr=ui.current[gi-1],Xi=ui.current[gi+1],Pi=document.getElementById("oj-prev"),Zi=document.getElementById("oj-next");dr?Pi.style.display="block":Pi.style.display="none",Xi?Zi.style.display="block":Zi.style.display="none"},[Di==null?void 0:Di.save_identifier,ui.current]);const Oi=(gi,dr)=>{if(gi.id===dr)return gi;for(let Xi=0,Pi=gi;Pi=Pi.parentNode;Xi++){if(Pi.id===dr)return Pi;if(Pi==document.documentElement)return!1}},Ii=gi=>jo(void 0,null,function*(){!Oi(gi.target,"oj-drawer")&&ht&&Ct(!1);const dr=ui.current.findIndex(Zi=>Zi.identifier===(Di==null?void 0:Di.save_identifier)),Xi=ui.current[dr-1],Pi=ui.current[dr+1];if(gi.target.id==="oj-prev"){if(!Xi||dr===-1){Le.ZP.warning("\u4E0A\u4E00\u9898\u4E0D\u5B58\u5728");return}gi.target.style.pointerEvents="none",gi.target.style.cursor="not-allowed",yield Ci(Xi==null?void 0:Xi.identifier),fn("0"),setTimeout(()=>{gi.target.style.pointerEvents="auto",gi.target.style.cursor="pointer"},400)}if(gi.target.id==="oj-next"||gi.target.id==="oj-modal-next"){if(!Pi||dr===-1){Le.ZP.warning("\u4E0B\u4E00\u9898\u4E0D\u5B58\u5728");return}gi.target.style.pointerEvents="none",gi.target.style.cursor="not-allowed",yield Ci(Pi==null?void 0:Pi.identifier),fn("0"),setTimeout(()=>{gi.target.style.pointerEvents="auto",gi.target.style.cursor="pointer"},400)}});(0,Me.useEffect)(()=>{wn(Di==null?void 0:Di.save_identifier);const gi=Kn.findIndex(dr=>dr.some(Xi=>Xi.identifier===(Di==null?void 0:Di.save_identifier)));_n(gi===-1?Rs(us({},xn),{page:1}):Rs(us({},xn),{page:gi+1}))},[Di==null?void 0:Di.save_identifier,Kn]);const cr=gi=>{xn.page=1,xn.tag_discipline_id=gi,_n(us({},xn)),Li(xn)},ei=()=>jo(void 0,null,function*(){const gi=yield(0,Fn.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});ti(gi.tag_disciplines||[])}),ji=gi=>{xn.page=1,xn.difficulty=typeof gi=="number"?gi:null,_n(us({},xn)),Li(xn)},Li=gi=>jo(void 0,null,function*(){var dr,Xi;vi(!0);const Pi=yield(0,ge.KC)(gi);if(Pi!=null&&Pi.practices_list){for(var Zi=(dr=Pi==null?void 0:Pi.practices_list)==null?void 0:dr.length,vr=[],or=0;or<Zi;or+=xn==null?void 0:xn.per_page)vr.push((Xi=Pi==null?void 0:Pi.practices_list)==null?void 0:Xi.slice(or,or+(xn==null?void 0:xn.per_page)));_n(Rs(us({},xn),{total:Pi==null?void 0:Pi.practices_count})),ui.current=(Pi==null?void 0:Pi.practices_list)||[],bi(vr)}vi(!1)}),Ci=(gi,dr)=>jo(void 0,null,function*(){const Xi=yield(0,Fn.ZP)(`/api/practices/${gi}/start`,{method:"get"});(Xi==null?void 0:Xi.status)===0&&ke.history.push(`/problems/${Xi==null?void 0:Xi.identifier}/oj/${gi}`)}),Yi=gi=>{xn.page=gi,_n(us({},xn))};return Me.createElement("div",{className:ss.wrap,id:"oj-drawer",style:{left:ht?0:-700}},Me.createElement("div",{className:ss.head},Me.createElement("div",{className:ss.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:gi=>{xn.save_search=gi.target.value,_n(us({},xn))},onSearch:()=>{xn.page=1,xn.search=xn.save_search,_n(us({},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:gi=>gi.parentNode,maxTagTextLength:2,maxTagCount:2,onChange:cr},Hn.map(gi=>Me.createElement(xe.default.Option,{key:gi.id,value:gi.id},gi.name))),Me.createElement(xe.default,{style:{width:70,marginLeft:10},allowClear:!0,placeholder:"\u96BE\u5EA6",getPopupContainer:gi=>gi.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:ss.content},Me.createElement(Se.Z,{spinning:Vn},(sn=Kn==null?void 0:Kn[xn.page-1])==null?void 0:sn.map(gi=>Me.createElement("div",{key:gi.identifier,className:ss.list,onClick:dr=>Ci(gi.identifier,dr)},Me.createElement("i",{style:{visibility:Et===gi.identifier?"visible":"hidden"},className:"iconfont icon-wancheng1 c-green-29b"}),Me.createElement("span",{style:{fontWeight:Et===gi.identifier?"bold":400,color:Et===gi.identifier?"#ffffff":"#bac4cd"},title:gi==null?void 0:gi.name},gi.name),(gi==null?void 0:gi.difficulty)===1&&Me.createElement("b",{style:{color:"#2FA34F"}},"\u7B80\u5355"),(gi==null?void 0:gi.difficulty)===2&&Me.createElement("b",{style:{color:"#0152d9"}},"\u9002\u4E2D"),(gi==null?void 0:gi.difficulty)===3&&Me.createElement("b",{style:{color:"#FA6400"}},"\u56F0\u96BE"))))),Me.createElement("div",{className:ss.footer},Me.createElement(Qt.Z,{showTotal:gi=>Me.createElement("span",{style:{color:"#656F87"}},"\u5171",Me.createElement("span",{className:"c-light-primary"},gi),"\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:Ct,topicId:Et,page:wn,onPageChange:fn,user:sn,submitRecords:Sn,submitting:xn,submitResult:_n})=>{const[Hn]=(0,ke.useSearchParams)(),ti=(0,ke.useLocation)(),[Kn,bi]=(0,Me.useState)(Hn.get("tab")||"0"),[Vn,vi]=(0,Me.useState)(0),[ui,Ri]=(0,Me.useState)(0),[Di,Gi]=(0,Me.useState)(0),[Oi,Ii]=(0,Me.useState)(),[cr,ei]=(0,Me.useState)(!1);function ji(Ci){const Yi=Ci.target.id;if(Kn==="3"&&Yi!==Kn&&(ui===1||ui===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:()=>{bi(Yi)}});return}bi(Yi)}(0,Me.useEffect)(()=>Ne.Z.subscribe("to-commit-info",()=>{bi("1")}),[]);function Li(){bi("2")}return Me.createElement("div",{className:Bt["left-panel"]},Me.createElement("ul",{className:`${Bt["s-navs"]} ${Bt["bg-white"]} ${Bt.b1}`},Me.createElement("li",{className:"mr40 current"},Me.createElement("img",{onClick:()=>ei(!0),src:pn})),Me.createElement("li",{className:Bt["oj-mr"]},Me.createElement("a",{className:Kn==="0"?Bt.active:"",id:"0",onClick:ji},"\u4EFB\u52A1\u63CF\u8FF0")),Me.createElement("li",{className:Bt["oj-mr"]},Me.createElement("a",{className:Kn==="3"?Bt.active:"",id:"3",onClick:ji},"\u9898\u89E3",Di?`(${Di})`:"")),Me.createElement("li",{className:Bt["oj-mr"]},Me.createElement("a",{className:Kn==="2"?Bt.active:"",id:"2",onClick:ji},"\u8BC4\u8BBA",Vn?`(${Vn})`:"")),Me.createElement("li",null,Me.createElement("a",{className:Kn==="1"?Bt.active:"",id:"1",onClick:ji},"\u63D0\u4EA4\u8BB0\u5F55"))),Me.createElement("div",{className:`${Bt["tab-panel-body"]} ${Kn==="0"?"":"hide"}`,style:{padding:"0 0 0 16px"}},Me.createElement(Ce,{hack:ht,onTriggerPraise:Ct,toDiscuss:Li})),Me.createElement("div",{className:`${Bt["tab-panel-body"]} ${Kn==="1"?"":"hide"}`},Sn!=null&&Sn.records_count?Me.createElement(Rt,{page:wn,onPageChange:fn,topicId:Et,submitting:xn,submitRecords:Sn,submitResult:_n}):Me.createElement(St.Z,null)),Me.createElement("div",{className:`${Bt["tab-panel-body"]} ${Kn==="2"?"":"hide"}`,style:{padding:0}},Me.createElement(Nt,{setDiscussTotal:vi,user:sn,identifier:ht.identifier,hack:ht,onTriggerPraise:Ct})),Me.createElement("div",{className:`${Bt["tab-panel-body"]} ${Kn==="3"?"":"hide"}`,style:{padding:0}},Me.createElement(fl,{setListStatus:Ri,setFilterListTotal:Gi,tabStatus:Kn,identifier:ht.identifier})),Me.createElement(Ur,{visible:cr,setIndex:bi,onVisible:Ci=>ei(Ci),value:Oi,onChange:Ci=>Ii(Ci)}))},Wo=Ee(5649),Nd=Ee(62522),ih=Ee(27972),rh=Ee(15547),Od=Ee(89392),Ch=Ee.n(Od),ic=Ee(56102),io=Ee(59301),qo=Object.defineProperty,ku=Object.defineProperties,qh=Object.getOwnPropertyDescriptors,Au=Object.getOwnPropertySymbols,ed=Object.prototype.hasOwnProperty,cu=Object.prototype.propertyIsEnumerable,Bl=(ht,Ct,Et)=>Ct in ht?qo(ht,Ct,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[Ct]=Et,hs=(ht,Ct)=>{for(var Et in Ct||(Ct={}))ed.call(Ct,Et)&&Bl(ht,Et,Ct[Et]);if(Au)for(var Et of Au(Ct))cu.call(Ct,Et)&&Bl(ht,Et,Ct[Et]);return ht},Bs=(ht,Ct)=>ku(ht,qh(Ct)),rc=(ht,Ct)=>{var Et={};for(var wn in ht)ed.call(ht,wn)&&Ct.indexOf(wn)<0&&(Et[wn]=ht[wn]);if(ht!=null&&Au)for(var wn of Au(ht))Ct.indexOf(wn)<0&&cu.call(ht,wn)&&(Et[wn]=ht[wn]);return Et},qa=(ht,Ct,Et)=>new Promise((wn,fn)=>{var sn=_n=>{try{xn(Et.next(_n))}catch(Hn){fn(Hn)}},Sn=_n=>{try{xn(Et.throw(_n))}catch(Hn){fn(Hn)}},xn=_n=>_n.done?wn(_n.value):Promise.resolve(_n.value).then(sn,Sn);xn((Et=Et.apply(ht,Ct)).next())});const{Countdown:Id}=Pe.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 ka(){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,Ct){switch(Ct.type){case 1:return hs(hs({},ht),Ct.payload);case 3:return Bs(hs({},ht),{data:Ct.payload});case 0:return Bs(hs({},ht),{loading:Ct.payload});case 11:return Bs(hs({},ht),{languageList:Ct.payload});case 12:return Bs(hs({},ht),{drawerData:Ct.payload});case 9:return Bs(hs({},ht),{showNote:Ct.payload});case 4:return Bs(hs({},ht),{debuging:Ct.payload});case 5:return Bs(hs({},ht),{submitting:Ct.payload});case 2:return Bs(hs({},ht),{submitRecords:Ct.payload});case 10:return Bs(hs({},ht),{submitRecordPage:Ct.payload});case 6:return Bs(hs({},ht),{executingMessage:Ct.payload});case 7:return hs(hs({},ht),Ct.payload);case 8:return hs(hs({},ht),Ct.payload);default:throw new Error}}var Ft=({children:ht})=>{var Ct,Et,wn,fn;const[sn,Sn]=(0,Me.useReducer)(gf,oc),{id:xn}=(0,ke.useParams)(),_n=(0,ke.useLocation)(),[Hn]=(0,ke.useSearchParams)(),{languageValue:ti,languageList:Kn,loading:bi,data:Vn,debugResult:vi,submitResult:ui,submitRecords:Ri,submitRecordPage:Di,showNote:Gi,debuging:Oi,submitting:Ii,executingMessage:cr}=sn,[ei,ji]=(0,Me.useState)("#FFF"),[Li,Ci]=(0,Me.useState)(null),[Yi,gi]=(0,Me.useState)({}),[dr,Xi]=(0,Me.useState)(!1),Pi=(0,Me.useRef)(null),Zi=(0,Me.useRef)(null),vr=Vn==null?void 0:Vn.user,or=Vn==null?void 0:Vn.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 Jr;if(dr){const Bo=document.getElementById("oj-next"),Cs=document.getElementById("oj-modal-next");((Jr=Bo==null?void 0:Bo.style)==null?void 0:Jr.display)==="none"?Cs.style.display="none":Cs.style.display="block"}},[dr]),(0,Me.useEffect)(()=>{function Jr(){return qa(this,null,function*(){var Bo,Cs,ko;const Yo=yield(0,ge.fu)(xn);if(Yo.status===401)document.location.href="/user/login";else{Yo.hack=Yo.practice,Yo.hack.code=vt.Base64.decode((Bo=Yo==null?void 0:Yo.hack)==null?void 0:Bo.code);const ys=`${vr==null?void 0:vr.login}-language`;localStorage.getItem(ys)&&(Yo.hack.language=localStorage.getItem(ys)),Zi.current=Ch().cloneDeep(Yo),Zi.current.language=(Cs=Yo==null?void 0:Yo.hack)==null?void 0:Cs.language,Sn({type:1,payload:{loading:!1,data:Yo}}),Sn({type:8,payload:{languageValue:(ko=Yo==null?void 0:Yo.hack)==null?void 0:ko.language}})}})}xn&&Jr()},[xn]),(0,Me.useEffect)(()=>{Sn({type:8,payload:{debugResult:void 0}}),es(),Xi(!1)},[xn]),(0,Me.useEffect)(()=>{clearTimeout(Pi.current)},[xn]),(0,Me.useEffect)(()=>{Mo()},[xn,Di]);const So=()=>{window.parent.postMessage("backExercise","*")};function Mo(){return qa(this,null,function*(){try{const Jr=yield(0,ge.zO)(xn,{limit:15,page:Di});Sn({type:2,payload:Jr})}catch(Jr){console.log(Jr)}})}function es(){return qa(this,null,function*(){try{const Jr=yield(0,ge.dd)(xn);Sn({type:11,payload:Jr==null?void 0:Jr.data})}catch(Jr){console.log(Jr)}})}function so(Jr){Sn({type:10,payload:Jr})}function Or(Jr){return qa(this,null,function*(){var Bo,Cs,ko;const Yo=((ko=(Cs=(Bo=window==null?void 0:window.location)==null?void 0:Bo.pathname)==null?void 0:Cs.split("/"))==null?void 0:ko[2])||xn;return yield(0,ge.n4)(Yo,Jr||{code:vt.Base64.encode(or.code),language:ti})})}function Do(){return qa(this,null,function*(){var Jr;if(!or.code||((Jr=or.code)==null?void 0:Jr.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(!Ii){Sn({type:5,payload:!0});try{if(Ne.Z.publish("to-commit-info"),(yield Or()).status===0){let Pl=function(){return qa(this,null,function*(){const{status:Xo,data:Jo}=yield(0,ge.rX)(xn,"submit"),Es=ka()-Ys>(Yo*ys+3)*1e3;if(Xo!==0&&!Es&&setTimeout(Pl,1e3),Es){he.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),Sn({type:5,payload:!1});return}if(Xo===0){Jo.status===2&&he.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"});const pa=yield(0,ge.zO)(xn,{limit:15,page:Di});Sn({type:8,payload:Bs(hs({},sn),{submitResult:Jo,submitting:!1,submitRecords:pa})}),(Jo==null?void 0:Jo.status)===0&&Xi(!0)}})},Cs={};if((yield(0,ge.bM)(xn,Cs)).status===-1&&Hn.get("exercisesId")){window.parent.location.href=`/classrooms/${Hn.get("coursesId")}/exercise/${Hn.get("exercisesId")}/detail`;return}const{time_limit:Yo,test_case_size:ys}=or,Ys=ka();Pl()}}catch(Bo){Sn({type:5,payload:!1})}}})}function Dr(){return qa(this,null,function*(){var Jr;if(!or.code||((Jr=or.code)==null?void 0:Jr.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}sn.debuging=!0,Sn({type:4,payload:!0});try{if((yield Or()).status===0){let Ys=function(){return qa(this,null,function*(){const{status:Pl,message:Xo,data:Jo}=yield(0,ge.rX)(xn,"debug"),Es=ka()-ys>(Cs+3)*1e3;if(Pl!==0&&!Es&&(Sn({type:6,payload:Xo}),setTimeout(Ys,1e3)),Es){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}),Jo.status===2&&he.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Sn({type:7,payload:Bs(hs({},sn),{debugResult:Jo,debuging:!1})}))})};const{time_limit:Cs}=or;let ko={input:encodeURIComponent(Vn.test_case.input)};if((yield(0,ge.MU)(xn,ko)).status===-1&&Hn.get("exercisesId")){window.parent.location.href=`/classrooms/${Hn.get("coursesId")}/exercise/${Hn.get("exercisesId")}/detail`;return}const ys=ka();Ys()}else Sn({type:4,payload:!1})}catch(Bo){console.log(Bo)}finally{}})}function Yr(Jr){var Bo;clearTimeout(Pi.current),Pi.current=setTimeout(()=>{var Cs;Or({code:vt.Base64.encode(Jr),language:(Cs=Zi==null?void 0:Zi.current)==null?void 0:Cs.language})},2e3),Sn({type:3,payload:Bs(hs({},Zi==null?void 0:Zi.current),{hack:Bs(hs({},(Bo=Zi==null?void 0:Zi.current)==null?void 0:Bo.hack),{code:Jr})})})}function ts(Jr){let Bo=Jr.target.value;Sn({type:3,payload:Bs(hs({},Vn),{test_case:{input:Bo}})})}const Gr=Jr=>qa(void 0,null,function*(){var Bo;if(Sn({type:0,payload:!0}),(yield Or()).status===0){Sn({type:8,payload:{languageValue:Jr}}),Zi.current.language=Jr;const ko=`${vr==null?void 0:vr.login}-language`;localStorage.setItem(ko,Jr);const Yo=yield(0,ge.dd)(xn);if(Yo.status===0){const ys=(Bo=Yo==null?void 0:Yo.data)==null?void 0:Bo.find(Ys=>Ys.language===Jr);Yr(vt.Base64.decode(ys.code))}setTimeout(()=>{Sn({type:0,payload:!1})},300)}});function Ar(){return qa(this,null,function*(){try{const Jr=yield(0,ge.H7)(xn,{language:ti});Jr.status===401?ke.history.replace("/login",{from:_n.pathname}):(Yr(vt.Base64.decode(Jr.code)),es())}catch(Jr){console.log(Jr)}})}function Xr(){he.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:io.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",io.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk(){return qa(this,null,function*(){const Jr=yield(0,ge.fi)(xn,{language:ti});Jr.status===401?ke.history.replace("/login",{from:_n.pathname}):Yr(vt.Base64.decode(Jr.code))})}})}function Er(){Sn({type:9,payload:!0})}function ao(){Sn({type:9,payload:!1})}function Nr(Jr){return qa(this,null,function*(){yield(0,ge.MK)(xn,Jr),Sn({type:1,payload:{showNote:!1,data:Bs(hs({},Vn),{hack:Bs(hs({},or),{notes:Jr.notes})})}})})}const ho={input:(Ct=Vn==null?void 0:Vn.test_case)==null?void 0:Ct.input,is_file:(Et=Vn==null?void 0:Vn.test_case)==null?void 0:Et.is_file,language:((wn=Zi.current)==null?void 0:wn.language)||(or==null?void 0:or.language),code:or==null?void 0:or.code,title:"main."+td[or==null?void 0:or.language],modify_code:or==null?void 0:or.modify_code,notes:or==null?void 0:or.notes,debugResult:vi,debuging:Oi,submitting:Ii,executingMessage:cr,id:xn,languageValue:ti,languageList:Kn,onChangeLanguage:Gr,onCancelNote:ao,onAddNote:Nr,showNote:Gi,onShowNote:Er,onSubmitCode:Do,onChangeCode:Yr,onChangeInput:ts,onDebugCode:Dr,onResetCode:Ar,onSyncCode:Xr,onUpdateCode:Or};function Zo(){return qa(this,null,function*(){const{praise_count:Jr}=yield(0,ge.vl)(or.id,{container_type:"Hack",type:1});let Bo=Bs(hs({},Vn),{hack:Bs(hs({},or),{praises_count:Jr,user_praise:!or.user_praise})});Sn({type:3,payload:Bo})})}const Ko={topicId:xn,submitResult:ui,submitRecords:Ri,submitting:Ii,page:Di,onPageChange:so,hack:or,user:Vn==null?void 0:Vn.user,onTriggerPraise:Zo};return console.log(Vn,Zi==null?void 0:Zi.current,"data--------"),io.createElement(io.Fragment,null,io.createElement(Se.Z,{className:"oj-custom-large-spin",size:"large",spinning:bi},Vn?io.createElement("div",{className:"oj-custom-warp"},io.createElement("header",{className:st.Z.header,style:{minWidth:1200}},io.createElement("div",null,io.createElement("img",{src:`${ve.Z.IMG_SERVER}/images/${vr.image_url}`,alt:"user",width:30}),io.createElement("span",null,vr.name)),io.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},io.createElement("div",null,or.name),io.createElement(Wo.Z,{onChange:Jr=>{},className:"font12 c-grey-999"})),io.createElement(ic.CopyToClipboard,{text:`${(fn=window.location)==null?void 0:fn.origin}/problems/${or.identifier}/share`,onCopy:()=>Le.ZP.success("\u590D\u5236\u9898\u76EE\u94FE\u63A5\u6210\u529F")},io.createElement("span",{className:st.Z.btn_back,style:{marginRight:10,cursor:"pointer"}}," ",io.createElement("i",{className:"iconfont icon-fenxiang1 font14 mr5"}),"\u5206\u4EAB\u9898\u76EE")),or.edit_privilege?io.createElement(ke.Link,{className:st.Z.btn_back,to:`/problems/${or.identifier}/ojedit`,style:{marginRight:10}}," ",io.createElement(me.Z,null)," \u7F16\u8F91"):null,io.createElement(ke.Link,{className:st.Z.btn_back,onClick:()=>{},to:"/problems"}," ",io.createElement(Be.Z,null),"\u9000\u51FA")),io.createElement(le.Z,{hideResize:!0,className:"my-problems oj-problems",leftChild:io.createElement(Ad,hs({},Ko)),rightChild:io.createElement(cn,hs({},ho))})):null),io.createElement(he.default,{centered:!0,closable:!1,width:680,footer:null,open:dr,className:"oj-modal"},io.createElement("section",{className:"oj-modal-content"},io.createElement("div",{className:"oj-modal-head"},io.createElement("img",{src:Nd,alt:""}),io.createElement("i",{onClick:()=>Xi(!1),className:"iconfont icon-guanbi1"})),io.createElement("aside",null,io.createElement("img",{className:"mr30",src:rh.Z}),"\u8FD0\u884C\u65F6\u95F4:\xA0",io.createElement("span",{style:{color:"#75d6ba",marginRight:100}},ui==null?void 0:ui.execute_time,"s"),"\u4F18\u4E8E",io.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(ui==null?void 0:ui.time_better_than)||100,"%"),"\u7684\u7528\u6237"),io.createElement("aside",{className:"mb50"},io.createElement("img",{src:ih.Z,className:"mr30"}),io.createElement("span",{className:"oj-modal-tt"},io.createElement("span",null,io.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),io.createElement("span",{className:"c-light-primary"},ui==null?void 0:ui.execute_memory,"mb")),io.createElement("span",null,io.createElement("span",null))),"\u4F18\u4E8E",io.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(ui==null?void 0:ui.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),io.createElement("div",{id:"oj-modal-next",className:"oj-modal-btn"},"\u8FDB\u5165\u4E0B\u4E00\u9898"))))};function Ut({languageValue:ht,languageList:Ct,onChangeLanguage:Et,title:wn,modify_code:fn,onSyncCode:sn,onShowCodeSetting:Sn,onResetCode:xn}){const _n=(0,ke.useLocation)(),Hn=()=>{he.default.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:io.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 io.createElement("div",{className:"action-bar"},io.createElement(xe.default,{className:"oj-select",value:ht,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:Et},Ct==null?void 0:Ct.map(ti=>io.createElement(xe.default.Option,{key:ti.language,value:ti.language},ti.language))),io.createElement("span",null),io.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:Hn},io.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),io.createElement("a",{onClick:Sn},io.createElement("i",{className:"iconfont icon-shezhi"})))}function cn(ht){var Ct=ht,{id:Et,input:wn,is_file:fn,showNote:sn,onShowNote:Sn,notes:xn,onCancelNote:_n,onAddNote:Hn,debugResult:ti,language:Kn,debuging:bi,submitting:Vn,executingMessage:vi,code:ui,onSubmitCode:Ri,onDebugCode:Di,onChangeCode:Gi,onChangeInput:Oi,onUpdateCode:Ii}=Ct,cr=rc(Ct,["id","input","is_file","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]);function ei(Li){return io.createElement(Ut,Bs(hs({},cr),{onShowCodeSetting:Li}))}const ji={id:Et,input:wn,debugResult:ti,debuging:bi,is_file:fn,submitting:Vn,executingMessage:vi,onDebugCode:Di,onChangeCode:Gi,onSubmitCode:Ri,onChangeInput:Oi};return io.createElement("div",{className:"right-panel"},io.createElement(Pt,{onUpdateCode:()=>{},language:Kn,value:ui,onChange:Gi,ActionBarRender:ei}),io.createElement("div",{className:`note-form-area ${sn?"active":""}`},io.createElement(gt,{onCancel:_n,notes:xn,callback:Hn})),io.createElement(jt.ZP,hs({},ji)))}},81699:function(Ln,tn,Ee){"use strict";Ee.d(tn,{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||{})},3039:function(Ln,tn,Ee){"use strict";Ee.d(tn,{H7:function(){return xe},KC:function(){return ce},M3:function(){return ie},MK:function(){return Se},MU:function(){return ke},Rg:function(){return ye},WH:function(){return z},X6:function(){return Le},bM:function(){return Be},bx:function(){return ee},dd:function(){return ve},de:function(){return be},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 Pe}});var Me=Ee(70635);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 Pe(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 Se(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 ye(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 be(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)}},75584:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return de}});var Me=Ee(59301),me=Ee(8591),Be=Ee(6848),ke=Ee(71418),Pe=Ee(95237),Le=Ee(43604),he=Ee(25700),Se=Ee(3113),xe=Ee(23469),ge=Ee(70635),le=Ee(25711),ve=(z,ee,oe)=>new Promise((ie,se)=>{var ue=be=>{try{we(oe.next(be))}catch(Ae){se(Ae)}},ye=be=>{try{we(oe.throw(be))}catch(Ae){se(Ae)}},we=be=>be.done?ie(be.value):Promise.resolve(be.value).then(ue,ye);we((oe=oe.apply(z,ee)).next())}),de=({id:z,activeDiscussIndex:ee,onReplyDiscuss:oe,adminOrOperator:ie})=>{const[se,ue]=(0,Me.useState)(""),[ye,we]=(0,Me.useState)(!1);function be(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:be,extraUse:ie&&Me.createElement(Be.Z,{color:"#fff",open:ye,destroyTooltipOnHide:!0,title:ce({id:z,isOpen:ye,activeDiscussIndex:ee,onChange:be,setIsOpen:we}),overlayStyle:{maxWidth:600}},Me.createElement("a",{title:ye?"\u5173\u95ED\u63A8\u8350":"\u6253\u5F00\u63A8\u8350",onClick:()=>we(!ye)},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,ye]=(0,Me.useState)(1);(0,Me.useEffect)(()=>{z!=null&&z.isOpen?we():(ye(1),se([]))},[z==null?void 0:z.isOpen]);const we=()=>ve(void 0,null,function*(){oe(!0);const be=yield(0,ge.ZP)(`/api/discusses/${z==null?void 0:z.id}/recommend_answer.json`,{method:"get"});(be==null?void 0:be.status)==0&&se(be==null?void 0:be.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(Pe.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:be=>{ye(be)}})),Me.createElement(Le.Z,null,Me.createElement(Se.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")))))}},72917:function(Ln,tn,Ee){"use strict";Ee.d(tn,{o:function(){return xe}});var Me=Ee(70635),me=Ee(93125),Be=Ee.n(me);let ke="",Pe,Le="";function he(ge){Se(ge)}function Se(ge){Pe=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),Pe.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;Pe.setUploadAuthAndAddress(le,oe,ie)}).catch(z=>{Pe.deleteFile(Pe._curIndex),Pe.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;Pe.setUploadAuthAndAddress(le,oe,ie,se)}}).catch(ee=>{Pe.deleteFile(Pe._curIndex),Pe.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;Pe.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(Pe)}function xe(ge,le,ve){ge&&(ke=ge),le&&(Le=le),he(ve)}},39171:function(Ln,tn,Ee){"use strict";Ee.d(tn,{BU:function(){return me},Dj:function(){return Me},gH:function(){return Be},vp:function(){return ke}});function Me(Pe){try{Pe.mozRequestFullScreen?Pe.mozRequestFullScreen():Pe.webkitRequestFullScreen&&Pe.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 Pe=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,Le=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",Pe),window.isFullScreen?window.isFullScreen:Pe!=null}},31087:function(Ln,tn,Ee){"use strict";Ee.d(tn,{AL:function(){return ye},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 Pe=1;function Le(ze,Ze){const Ye=ze.match(/^(\s+)(?:```)/);if(Ye===null)return Ze;const Ge=Ye[1];return Ze.split(`
|
|
|
`).map(ft=>{const at=ft.match(/^\s+/);if(at===null)return ft;const[Pt]=at;return Pt.length>=Ge.length?ft.slice(Ge.length):ft}).join(`
|
|
|
`)}let he=[],Se=["<ul>"];const xe=new(me()).Renderer,ge=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function le(){he.length=0,Se=["<ul>"]}const ve={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function de(ze,Ze,Ye,Ge){if(Ze>=ze.length||ze[Ze].level<=Ye)return Ze;var ft=ze[Ze];Ge.push("<li><a href='#"+Pe+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(Pt){Ge.push(Pt)}),Ge.push("</ul>")),Ge.push("</li>"),Ze=de(ze,Ze,Ye,Ge),Ze}function ce(){return de(he,0,0,Se),Se.push("</ul>"),Se.join("")}const z={heading(ze){const Ze=ge.exec(ze);if(Pe+=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 Ye=Ze[0];let Ge=Le(Ye,Ze[3]||"");const ft=Ze[2]?Ze[2].trim():Ze[2];if(["latex","katex","math"].indexOf(ft)>=0){const at=ie(),Pt=Ge;Ge=at,se[at]={type:"block",expression:Pt}}return{type:"code",raw:Ye,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 ye(){oe=0,se={}}function we(ze){return ze=ze.replace(ee,(Ze,Ye)=>{const Ge=ie();return se[Ge]={type:"inline",expression:Ye},Ge}),ze}const be=xe.listitem;xe.listitem=function(ze){return be(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,Ye){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}">${Ye?ze:(0,Be.escape)(ze,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(Ye?ze:(0,Be.escape)(ze,!0))+"</code></pre>"},xe.heading=function(ze,Ze,Ye){let Ge=this.options.headerPrefix+Ye.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return he.push({anchor:Ge,level:Ze,text:ze}),"<h"+Ze+' id="'+Pe+Ge+'">'+ze+"</h"+Ze+">"},me().setOptions({silent:!0,gfm:!0,pedantic:!1}),me().use({tokenizer:z,renderer:xe}),tn.ZP=me()},49371:function(Ln,tn,Ee){"use strict";Ee.d(tn,{G:function(){return Pe},t:function(){return ke}});var Me=Ee(7062),me=Ee.n(Me);const Be=null;function ke(Le,he){let Se=me().get("__ec");Se||(Se={}),Se[Le]=he,me().set("__ec",Se)}function Pe(Le,he){let Se=me().get("__ec");return Se?Se[Le]===void 0?he:Se[Le]:he}},93726:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return lo}});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 Xe=1;Xe<arguments.length;Xe++){let wt=arguments[Xe];if(wt!=null)for(let At in wt)wt.hasOwnProperty(At)&&(qe[At]=wt[At])}return qe},typeof self.Promise!="function"&&Ee(3867).polyfill()}}Me.install();var me=Me,Be=Ee(86204),ke=Ee.n(Be);class Pe{static e(Ke,qe){(!Ke||Pe.FORCE_GLOBAL_TAG)&&(Ke=Pe.GLOBAL_TAG);let Xe=`[${Ke}] > ${qe}`;Pe.ENABLE_CALLBACK&&Pe.emitter.emit("log","error",Xe),Pe.ENABLE_ERROR&&(console.error?console.error(Xe):console.warn?console.warn(Xe):console.log(Xe))}static i(Ke,qe){(!Ke||Pe.FORCE_GLOBAL_TAG)&&(Ke=Pe.GLOBAL_TAG);let Xe=`[${Ke}] > ${qe}`;Pe.ENABLE_CALLBACK&&Pe.emitter.emit("log","info",Xe),Pe.ENABLE_INFO&&(console.info?console.info(Xe):console.log(Xe))}static w(Ke,qe){(!Ke||Pe.FORCE_GLOBAL_TAG)&&(Ke=Pe.GLOBAL_TAG);let Xe=`[${Ke}] > ${qe}`;Pe.ENABLE_CALLBACK&&Pe.emitter.emit("log","warn",Xe),Pe.ENABLE_WARN&&(console.warn?console.warn(Xe):console.log(Xe))}static d(Ke,qe){(!Ke||Pe.FORCE_GLOBAL_TAG)&&(Ke=Pe.GLOBAL_TAG);let Xe=`[${Ke}] > ${qe}`;Pe.ENABLE_CALLBACK&&Pe.emitter.emit("log","debug",Xe),Pe.ENABLE_DEBUG&&(console.debug?console.debug(Xe):console.log(Xe))}static v(Ke,qe){(!Ke||Pe.FORCE_GLOBAL_TAG)&&(Ke=Pe.GLOBAL_TAG);let Xe=`[${Ke}] > ${qe}`;Pe.ENABLE_CALLBACK&&Pe.emitter.emit("log","verbose",Xe),Pe.ENABLE_VERBOSE&&console.log(Xe)}}Pe.GLOBAL_TAG="flv.js",Pe.FORCE_GLOBAL_TAG=!1,Pe.ENABLE_ERROR=!0,Pe.ENABLE_INFO=!0,Pe.ENABLE_WARN=!0,Pe.ENABLE_DEBUG=!0,Pe.ENABLE_VERBOSE=!0,Pe.ENABLE_CALLBACK=!1,Pe.emitter=new(ke());var Le=Pe;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 Se=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 ln=self.navigator.userAgent.toLowerCase(),Ke=/(edge)\/([\w.]+)/.exec(ln)||/(opr)[\/]([\w.]+)/.exec(ln)||/(chrome)[ \/]([\w.]+)/.exec(ln)||/(iemobile)[\/]([\w.]+)/.exec(ln)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(ln)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(ln)||/(webkit)[ \/]([\w.]+)/.exec(ln)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ln)||/(msie) ([\w.]+)/.exec(ln)||ln.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(ln)||ln.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(ln)||[],qe=/(ipad)/.exec(ln)||/(ipod)/.exec(ln)||/(windows phone)/.exec(ln)||/(iphone)/.exec(ln)||/(kindle)/.exec(ln)||/(android)/.exec(ln)||/(windows)/.exec(ln)||/(mac)/.exec(ln)||/(linux)/.exec(ln)||/(cros)/.exec(ln)||[],Xe={browser:Ke[5]||Ke[3]||Ke[1]||"",version:Ke[2]||Ke[4]||"0",majorVersion:Ke[4]||Ke[2]||"0",platform:qe[0]||""},wt={};if(Xe.browser){wt[Xe.browser]=!0;let At=Xe.majorVersion.split(".");wt.version={major:parseInt(Xe.majorVersion,10),string:Xe.version},At.length>1&&(wt.version.minor=parseInt(At[1],10)),At.length>2&&(wt.version.build=parseInt(At[2],10))}if(Xe.platform&&(wt[Xe.platform]=!0),(wt.chrome||wt.opr||wt.safari)&&(wt.webkit=!0),wt.rv||wt.iemobile){wt.rv&&delete wt.rv;let At="msie";Xe.browser=At,wt[At]=!0}if(wt.edge){delete wt.edge;let At="msedge";Xe.browser=At,wt[At]=!0}if(wt.opr){let At="opera";Xe.browser=At,wt[At]=!0}if(wt.safari&&wt.android){let At="android";Xe.browser=At,wt[At]=!0}wt.name=Xe.browser,wt.platform=Xe.platform;for(let At in ee)ee.hasOwnProperty(At)&&delete ee[At];Object.assign(ee,wt)}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 Xe=Ke.url;this._config.reuseRedirectedURL&&Ke.redirectedURL!=null&&(Xe=Ke.redirectedURL);let wt=this._seekHandler.getConfig(Xe,qe),At=new self.Headers;if(typeof wt.headers=="object"){let bt=wt.headers;for(let gn in bt)bt.hasOwnProperty(gn)&&At.append(gn,bt[gn])}let Nt={method:"GET",headers:At,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(let bt in this._config.headers)At.append(bt,this._config.headers[bt]);Ke.cors===!1&&(Nt.mode="same-origin"),Ke.withCredentials&&(Nt.credentials="include"),Ke.referrerPolicy&&(Nt.referrerPolicy=Ke.referrerPolicy),this._status=de.kConnecting,self.fetch(wt.url,Nt).then(bt=>{if(this._requestAbort){this._requestAbort=!1,this._status=de.kIdle;return}if(bt.ok&&bt.status>=200&&bt.status<=299){if(bt.url!==wt.url&&this._onURLRedirect){let En=this._seekHandler.removeURLParameters(bt.url);this._onURLRedirect(En)}let gn=bt.headers.get("Content-Length");return gn!=null&&(this._contentLength=parseInt(gn),this._contentLength!==0&&this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)),this._pump.call(this,bt.body.getReader())}else if(this._status=de.kError,this._onError)this._onError(ce.HTTP_STATUS_CODE_INVALID,{code:bt.status,msg:bt.statusText});else throw new xe("FetchStreamLoader: Http code invalid, "+bt.status+" "+bt.statusText)}).catch(bt=>{if(this._status=de.kError,this._onError)this._onError(ce.EXCEPTION,{code:-1,msg:bt.message});else throw bt})}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 Xe=ce.EARLY_EOF,wt={code:-1,msg:"Fetch stream meet Early-EOF"};if(this._onError)this._onError(Xe,wt);else throw new xe(wt.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 Xe=qe.value.buffer,wt=this._range.from+this._receivedLength;this._receivedLength+=Xe.byteLength,this._onDataArrival&&this._onDataArrival(Xe,wt,this._receivedLength),this._pump(Ke)}}).catch(qe=>{if(qe.code===11&&ie.msedge)return;this._status=de.kError;let Xe=0,wt=null;if((qe.code===19||qe.message==="network error")&&(this._contentLength===null||this._contentLength!==null&&this._receivedLength<this._contentLength)?(Xe=ce.EARLY_EOF,wt={code:qe.code,msg:"Fetch stream meet Early-EOF"}):(Xe=ce.EXCEPTION,wt={code:qe.code,msg:qe.message}),this._onError)this._onError(Xe,wt);else throw new xe(wt.msg)})}}var ue=se;class ye 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 Xe=Ke.url;this._config.reuseRedirectedURL&&Ke.redirectedURL!=null&&(Xe=Ke.redirectedURL);let wt=this._seekHandler.getConfig(Xe,qe);this._requestURL=wt.url;let At=this._xhr=new XMLHttpRequest;if(At.open("GET",wt.url,!0),At.responseType="moz-chunked-arraybuffer",At.onreadystatechange=this._onReadyStateChange.bind(this),At.onprogress=this._onProgress.bind(this),At.onloadend=this._onLoadEnd.bind(this),At.onerror=this._onXhrError.bind(this),Ke.withCredentials&&(At.withCredentials=!0),typeof wt.headers=="object"){let Nt=wt.headers;for(let bt in Nt)Nt.hasOwnProperty(bt)&&At.setRequestHeader(bt,Nt[bt])}if(typeof this._config.headers=="object"){let Nt=this._config.headers;for(let bt in Nt)Nt.hasOwnProperty(bt)&&At.setRequestHeader(bt,Nt[bt])}this._status=de.kConnecting,At.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 Xe=this._seekHandler.removeURLParameters(qe.responseURL);this._onURLRedirect(Xe)}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,Xe=this._range.from+this._receivedLength;this._receivedLength+=qe.byteLength,this._onDataArrival&&this._onDataArrival(qe,Xe,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,Xe=null;if(this._contentLength&&Ke.loaded<this._contentLength?(qe=ce.EARLY_EOF,Xe={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(qe=ce.EXCEPTION,Xe={code:-1,msg:Ke.constructor.name+" "+Ke.type}),this._onError)this._onError(qe,Xe);else throw new xe(Xe.msg)}}var we=ye;class be 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,Xe){this._dataSource=Ke,Xe?this._currentRange=qe:this._totalRange=qe;let wt=Ke.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?wt=this._currentRedirectedURL:Ke.redirectedURL!=null&&(wt=Ke.redirectedURL));let At=this._seekHandler.getConfig(wt,qe);this._currentRequestURL=At.url;let Nt=this._reader=new self.MSStreamReader;Nt.onprogress=this._msrOnProgress.bind(this),Nt.onload=this._msrOnLoad.bind(this),Nt.onerror=this._msrOnError.bind(this);let bt=this._xhr=new XMLHttpRequest;if(bt.open("GET",At.url,!0),bt.responseType="ms-stream",bt.onreadystatechange=this._xhrOnReadyStateChange.bind(this),bt.onerror=this._xhrOnError.bind(this),Ke.withCredentials&&(bt.withCredentials=!0),typeof At.headers=="object"){let gn=At.headers;for(let En in gn)gn.hasOwnProperty(En)&&bt.setRequestHeader(En,gn[En])}if(typeof this._config.headers=="object"){let gn=this._config.headers;for(let En in gn)gn.hasOwnProperty(En)&&bt.setRequestHeader(En,gn[En])}this._isReconnecting?this._isReconnecting=!1:this._status=LoaderStatus.kConnecting,bt.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 wt=this._seekHandler.removeURLParameters(qe.responseURL);qe.responseURL!==this._currentRequestURL&&wt!==this._currentRedirectedURL&&(this._currentRedirectedURL=wt,this._onURLRedirect&&this._onURLRedirect(wt))}let Xe=qe.getResponseHeader("Content-Length");if(Xe!=null&&this._contentLength==null){let wt=parseInt(Xe);wt>0&&(this._contentLength=wt,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 Xe=qe.response;this._reader.readAsArrayBuffer(Xe)}}_xhrOnError(Ke){this._status=LoaderStatus.kError;let qe=LoaderErrors.EXCEPTION,Xe={code:-1,msg:Ke.constructor.name+" "+Ke.type};if(this._onError)this._onError(qe,Xe);else throw new RuntimeException(Xe.msg)}_msrOnProgress(Ke){let Xe=Ke.target.result;if(Xe==null){this._doReconnectIfNeeded();return}let wt=Xe.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=Xe.byteLength;let At=this._totalRange.from+this._receivedLength;this._receivedLength+=wt.byteLength,this._onDataArrival&&this._onDataArrival(wt,At,this._receivedLength),Xe.byteLength>=this._bufferLimit&&(Log.v(this.TAG,`MSStream buffer exceeded max size near ${At+wt.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,Xe=null;if(this._contentLength&&this._receivedLength<this._contentLength?(qe=LoaderErrors.EARLY_EOF,Xe={code:-1,msg:"MSStream meet Early-Eof"}):(qe=LoaderErrors.EARLY_EOF,Xe={code:-1,msg:Ke.constructor.name+" "+Ke.type}),this._onError)this._onError(qe,Xe);else throw new RuntimeException(Xe.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 Se,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 Xe=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(Xe=!0,this._totalLength=this._dataSource.filesize),!this._totalLengthReceived&&!Xe?(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,Xe=qe+Ke;this._contentLength!=null&&Xe-this._range.from>=this._contentLength&&(Xe=this._range.from+this._contentLength-1),this._currentRequestRange={from:qe,to:Xe},this._internalOpen(this._dataSource,this._currentRequestRange)}_internalOpen(Ke,qe){this._lastTimeLoaded=0;let Xe=Ke.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?Xe=this._currentRedirectedURL:Ke.redirectedURL!=null&&(Xe=Ke.redirectedURL));let wt=this._seekHandler.getConfig(Xe,qe);this._currentRequestURL=wt.url;let At=this._xhr=new XMLHttpRequest;if(At.open("GET",wt.url,!0),At.responseType="arraybuffer",At.onreadystatechange=this._onReadyStateChange.bind(this),At.onprogress=this._onProgress.bind(this),At.onload=this._onLoad.bind(this),At.onerror=this._onXhrError.bind(this),Ke.withCredentials&&(At.withCredentials=!0),typeof wt.headers=="object"){let Nt=wt.headers;for(let bt in Nt)Nt.hasOwnProperty(bt)&&At.setRequestHeader(bt,Nt[bt])}if(typeof this._config.headers=="object"){let Nt=this._config.headers;for(let bt in Nt)Nt.hasOwnProperty(bt)&&At.setRequestHeader(bt,Nt[bt])}At.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 Xe=this._seekHandler.removeURLParameters(qe.responseURL);qe.responseURL!==this._currentRequestURL&&Xe!==this._currentRedirectedURL&&(this._currentRedirectedURL=Xe,this._onURLRedirect&&this._onURLRedirect(Xe))}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 Xe=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,Xe=!0;let wt=Ke.total;this._internalAbort(),wt!=null&wt!==0&&(this._totalLength=wt)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,Xe){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,Xe=qe.length-1,wt=0,At=0,Nt=Xe;if(Ke<qe[0])return qe[0];for(;At<=Nt;){if(wt=At+Math.floor((Nt-At)/2),wt===Xe||Ke>=qe[wt]&&Ke<qe[wt+1])return qe[wt];qe[wt]<Ke?At=wt+1:Nt=wt-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 Nt=this._normalizeSpeed(qe);this._currentSpeedNormalized!==Nt&&(this._currentSpeedNormalized=Nt,this._currentChunkSizeKB=Nt)}let Xe=Ke.target.response,wt=this._range.from+this._receivedLength;this._receivedLength+=Xe.byteLength;let At=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():At=!0,this._onDataArrival&&this._onDataArrival(Xe,wt,this._receivedLength),At&&(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,Xe=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(qe=ce.EARLY_EOF,Xe={code:-1,msg:"RangeLoader meet Early-Eof"}):(qe=ce.EXCEPTION,Xe={code:-1,msg:Ke.constructor.name+" "+Ke.type}),this._onError)this._onError(qe,Xe);else throw new xe(Xe.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 Xe={code:qe.code,msg:qe.message};if(this._onError)this._onError(ce.EXCEPTION,Xe);else throw new xe(Xe.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,Xe=this._receivedLength;this._receivedLength+=qe.byteLength,this._onDataArrival&&this._onDataArrival(qe,Xe,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 Ye=Ze;class Ge{constructor(Ke){this._zeroStart=Ke||!1}getConfig(Ke,qe){let Xe={};if(qe.from!==0||qe.to!==-1){let wt;qe.to!==-1?wt=`bytes=${qe.from.toString()}-${qe.to.toString()}`:wt=`bytes=${qe.from.toString()}-`,Xe.Range=wt}else this._zeroStart&&(Xe.Range="bytes=0-");return{url:Ke,headers:Xe}}removeURLParameters(Ke){return Ke}}var ft=Ge;class at{constructor(Ke,qe){this._startName=Ke,this._endName=qe}getConfig(Ke,qe){let Xe=Ke;if(qe.from!==0||qe.to!==-1){let wt=!0;Xe.indexOf("?")===-1&&(Xe+="?",wt=!1),wt&&(Xe+="&"),Xe+=`${this._startName}=${qe.from.toString()}`,qe.to!==-1&&(Xe+=`&${this._endName}=${qe.to.toString()}`)}return{url:Xe,headers:{}}}removeURLParameters(Ke){let qe=Ke.split("?")[0],Xe,wt=Ke.indexOf("?");wt!==-1&&(Xe=Ke.substring(wt+1));let At="";if(Xe!=null&&Xe.length>0){let Nt=Xe.split("&");for(let bt=0;bt<Nt.length;bt++){let gn=Nt[bt].split("="),En=bt>0;gn[0]!==this._startName&&gn[0]!==this._endName&&(En&&(At+="&"),At+=Nt[bt])}}return At.length===0?qe:qe+"?"+At}}var Pt=at;class tt{constructor(Ke,qe,Xe){this.TAG="IOController",this._config=qe,this._extraData=Xe,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 Se,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",Xe=Ke.seekParamEnd||"bend";this._seekHandler=new Pt(qe,Xe)}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=Ye;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 Xe={from:Ke,to:-1};this._currentRange={from:Xe.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,Xe),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 Xe=new ArrayBuffer(qe);if(this._stashUsed>0){let wt=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(Xe,0,qe).set(wt,0)}this._stashBuffer=Xe,this._bufferSize=qe}_normalizeSpeed(Ke){let qe=this._speedNormalizeList,Xe=qe.length-1,wt=0,At=0,Nt=Xe;if(Ke<qe[0])return qe[0];for(;At<=Nt;){if(wt=At+Math.floor((Nt-At)/2),wt===Xe||Ke>=qe[wt]&&Ke<qe[wt+1])return qe[wt];qe[wt]<Ke?At=wt+1:Nt=wt-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 Xe=qe*1024+1024*1024*1;this._bufferSize<Xe&&this._expandBuffer(Xe),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,Xe){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 wt=this._speedSampler.lastSecondKBps;if(wt!==0){let At=this._normalizeSpeed(wt);this._speedNormalized!==At&&(this._speedNormalized=At,this._adjustStashSize(At))}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 At=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){let Nt=this._stashBuffer.slice(0,this._stashUsed),bt=this._dispatchChunks(Nt,this._stashByteStart);if(bt<Nt.byteLength){if(bt>0){let gn=new Uint8Array(Nt,bt);At.set(gn,0),this._stashUsed=gn.byteLength,this._stashByteStart+=bt}}else this._stashUsed=0,this._stashByteStart+=bt;this._stashUsed+Ke.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+Ke.byteLength),At=new Uint8Array(this._stashBuffer,0,this._bufferSize)),At.set(new Uint8Array(Ke),this._stashUsed),this._stashUsed+=Ke.byteLength}else{let Nt=this._dispatchChunks(Ke,qe);if(Nt<Ke.byteLength){let bt=Ke.byteLength-Nt;bt>this._bufferSize&&(this._expandBuffer(bt),At=new Uint8Array(this._stashBuffer,0,this._bufferSize)),At.set(new Uint8Array(Ke,Nt),0),this._stashUsed+=bt,this._stashByteStart=qe+Nt}}}else if(this._stashUsed===0){let At=this._dispatchChunks(Ke,qe);if(At<Ke.byteLength){let Nt=Ke.byteLength-At;Nt>this._bufferSize&&this._expandBuffer(Nt),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(Ke,At),0),this._stashUsed+=Nt,this._stashByteStart=qe+At}}else{this._stashUsed+Ke.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+Ke.byteLength);let At=new Uint8Array(this._stashBuffer,0,this._bufferSize);At.set(new Uint8Array(Ke),this._stashUsed),this._stashUsed+=Ke.byteLength;let Nt=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(Nt<this._stashUsed&&Nt>0){let bt=new Uint8Array(this._stashBuffer,Nt);At.set(bt,0)}this._stashUsed-=Nt,this._stashByteStart+=Nt}}_flushStashBuffer(Ke){if(this._stashUsed>0){let qe=this._stashBuffer.slice(0,this._stashUsed),Xe=this._dispatchChunks(qe,this._stashByteStart),wt=qe.byteLength-Xe;if(Xe<qe.byteLength)if(Ke)Le.w(this.TAG,`${wt} bytes unconsumed data remain when flush buffer, dropped`);else{if(Xe>0){let At=new Uint8Array(this._stashBuffer,0,this._bufferSize),Nt=new Uint8Array(qe,Xe);At.set(Nt,0),this._stashUsed=Nt.byteLength,this._stashByteStart+=Xe}return 0}return this._stashUsed=0,this._stashByteStart=0,wt}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 Xe=this._currentRange.to+1;Xe<this._totalLength&&(Le.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(Xe,!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 vt=tt;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 jt(){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 vt({},jt()),qe=Ke.loaderType;return Ke.destroy(),qe=="fetch-stream-loader"||qe=="xhr-moz-chunked-loader"}static getNetworkLoaderTypeName(){let Ke=new vt({},jt()),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 et=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 _t{static get forceGlobalTag(){return Le.FORCE_GLOBAL_TAG}static set forceGlobalTag(Ke){Le.FORCE_GLOBAL_TAG=Ke,_t._notifyChange()}static get globalTag(){return Le.GLOBAL_TAG}static set globalTag(Ke){Le.GLOBAL_TAG=Ke,_t._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,_t._notifyChange()}static get enableDebug(){return Le.ENABLE_DEBUG}static set enableDebug(Ke){Le.ENABLE_DEBUG=Ke,_t._notifyChange()}static get enableVerbose(){return Le.ENABLE_VERBOSE}static set enableVerbose(Ke){Le.ENABLE_VERBOSE=Ke,_t._notifyChange()}static get enableInfo(){return Le.ENABLE_INFO}static set enableInfo(Ke){Le.ENABLE_INFO=Ke,_t._notifyChange()}static get enableWarn(){return Le.ENABLE_WARN}static set enableWarn(Ke){Le.ENABLE_WARN=Ke,_t._notifyChange()}static get enableError(){return Le.ENABLE_ERROR}static set enableError(Ke){Le.ENABLE_ERROR=Ke,_t._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=_t.emitter;if(Ke.listenerCount("change")>0){let qe=_t.getConfig();Ke.emit("change",qe)}}static registerListener(Ke){_t.emitter.addListener("change",Ke)}static removeListener(Ke){_t.emitter.removeListener("change",Ke)}static addLogListener(Ke){Le.emitter.addListener("log",Ke),Le.emitter.listenerCount("log")>0&&(Le.ENABLE_CALLBACK=!0,_t._notifyChange())}static removeLogListener(Ke){Le.emitter.removeListener("log",Ke),Le.emitter.listenerCount("log")===0&&(Le.ENABLE_CALLBACK=!1,_t._notifyChange())}}_t.emitter=new(ke());var gt=_t;class Bt{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,Xe=this._search(qe.times,Ke);return{index:Xe,milliseconds:qe.times[Xe],fileposition:qe.filepositions[Xe]}}_search(Ke,qe){let Xe=0,wt=Ke.length-1,At=0,Nt=0,bt=wt;for(qe<Ke[0]&&(Xe=0,Nt=bt+1);Nt<=bt;)if(At=Nt+Math.floor((bt-Nt)/2),At===wt||qe>=Ke[At]&&qe<Ke[At+1]){Xe=At;break}else Ke[At]<qe?Nt=At+1:bt=At-1;return Xe}}var Ht=Bt;function hn(ln,Ke,qe){let Xe=ln;if(Ke+qe<Xe.length){for(;qe--;)if((Xe[++Ke]&192)!==128)return!1;return!0}else return!1}function Qt(ln){let Ke=[],qe=ln,Xe=0,wt=ln.length;for(;Xe<wt;){if(qe[Xe]<128){Ke.push(String.fromCharCode(qe[Xe])),++Xe;continue}else if(!(qe[Xe]<192)){if(qe[Xe]<224){if(hn(qe,Xe,1)){let At=(qe[Xe]&31)<<6|qe[Xe+1]&63;if(At>=128){Ke.push(String.fromCharCode(At&65535)),Xe+=2;continue}}}else if(qe[Xe]<240){if(hn(qe,Xe,2)){let At=(qe[Xe]&15)<<12|(qe[Xe+1]&63)<<6|qe[Xe+2]&63;if(At>=2048&&(At&63488)!==55296){Ke.push(String.fromCharCode(At&65535)),Xe+=3;continue}}}else if(qe[Xe]<248&&hn(qe,Xe,3)){let At=(qe[Xe]&7)<<18|(qe[Xe+1]&63)<<12|(qe[Xe+2]&63)<<6|qe[Xe+3]&63;if(At>65536&&At<1114112){At-=65536,Ke.push(String.fromCharCode(At>>>10|55296)),Ke.push(String.fromCharCode(At&1023|56320)),Xe+=4;continue}}}Ke.push("\uFFFD"),++Xe}return Ke.join("")}var bn=Qt;let Wt=function(){let ln=new ArrayBuffer(2);return new DataView(ln).setInt16(0,256,!0),new Int16Array(ln)[0]===256}();class Kt{static parseScriptData(Ke,qe,Xe){let wt={};try{let At=Kt.parseValue(Ke,qe,Xe),Nt=Kt.parseValue(Ke,qe+At.size,Xe-At.size);wt[At.data]=Nt.data}catch(At){Le.e("AMF",At.toString())}return wt}static parseObject(Ke,qe,Xe){if(Xe<3)throw new ge("Data not enough when parse ScriptDataObject");let wt=Kt.parseString(Ke,qe,Xe),At=Kt.parseValue(Ke,qe+wt.size,Xe-wt.size),Nt=At.objectEnd;return{data:{name:wt.data,value:At.data},size:wt.size+At.size,objectEnd:Nt}}static parseVariable(Ke,qe,Xe){return Kt.parseObject(Ke,qe,Xe)}static parseString(Ke,qe,Xe){if(Xe<2)throw new ge("Data not enough when parse String");let At=new DataView(Ke,qe,Xe).getUint16(0,!Wt),Nt;return At>0?Nt=bn(new Uint8Array(Ke,qe+2,At)):Nt="",{data:Nt,size:2+At}}static parseLongString(Ke,qe,Xe){if(Xe<4)throw new ge("Data not enough when parse LongString");let At=new DataView(Ke,qe,Xe).getUint32(0,!Wt),Nt;return At>0?Nt=bn(new Uint8Array(Ke,qe+4,At)):Nt="",{data:Nt,size:4+At}}static parseDate(Ke,qe,Xe){if(Xe<10)throw new ge("Data size invalid when parse Date");let wt=new DataView(Ke,qe,Xe),At=wt.getFloat64(0,!Wt),Nt=wt.getInt16(8,!Wt);return At+=Nt*60*1e3,{data:new Date(At),size:10}}static parseValue(Ke,qe,Xe){if(Xe<1)throw new ge("Data not enough when parse Value");let wt=new DataView(Ke,qe,Xe),At=1,Nt=wt.getUint8(0),bt,gn=!1;try{switch(Nt){case 0:bt=wt.getFloat64(1,!Wt),At+=8;break;case 1:{bt=!!wt.getUint8(1),At+=1;break}case 2:{let En=Kt.parseString(Ke,qe+1,Xe-1);bt=En.data,At+=En.size;break}case 3:{bt={};let En=0;for((wt.getUint32(Xe-4,!Wt)&16777215)===9&&(En=3);At<Xe-4;){let Un=Kt.parseObject(Ke,qe+At,Xe-At-En);if(Un.objectEnd)break;bt[Un.data.name]=Un.data.value,At+=Un.size}At<=Xe-3&&(wt.getUint32(At-1,!Wt)&16777215)===9&&(At+=3);break}case 8:{bt={},At+=4;let En=0;for((wt.getUint32(Xe-4,!Wt)&16777215)===9&&(En=3);At<Xe-8;){let Un=Kt.parseVariable(Ke,qe+At,Xe-At-En);if(Un.objectEnd)break;bt[Un.data.name]=Un.data.value,At+=Un.size}At<=Xe-3&&(wt.getUint32(At-1,!Wt)&16777215)===9&&(At+=3);break}case 9:bt=void 0,At=1,gn=!0;break;case 10:{bt=[];let En=wt.getUint32(1,!Wt);At+=4;for(let Un=0;Un<En;Un++){let Pn=Kt.parseValue(Ke,qe+At,Xe-At);bt.push(Pn.data),At+=Pn.size}break}case 11:{let En=Kt.parseDate(Ke,qe+1,Xe-1);bt=En.data,At+=En.size;break}case 12:{let En=Kt.parseString(Ke,qe+1,Xe-1);bt=En.data,At+=En.size;break}default:At=Xe,Le.w("AMF","Unsupported AMF value type "+Nt)}}catch(En){Le.e("AMF",En.toString())}return{data:bt,size:At,objectEnd:gn}}}var Jt=Kt;class dn{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),Xe=new Uint8Array(4);Xe.set(this._buffer.subarray(this._buffer_index,this._buffer_index+qe)),this._current_word=new DataView(Xe.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 Nt=this._current_word>>>32-Ke;return this._current_word<<=Ke,this._current_word_bits_left-=Ke,Nt}let qe=this._current_word_bits_left?this._current_word:0;qe=qe>>>32-this._current_word_bits_left;let Xe=Ke-this._current_word_bits_left;this._fillCurrentWord();let wt=Math.min(Xe,this._current_word_bits_left),At=this._current_word>>>32-wt;return this._current_word<<=wt,this._current_word_bits_left-=wt,qe=qe<<wt|At,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 Lt=dn;class pt{static _ebsp2rbsp(Ke){let qe=Ke,Xe=qe.byteLength,wt=new Uint8Array(Xe),At=0;for(let Nt=0;Nt<Xe;Nt++)Nt>=2&&qe[Nt]===3&&qe[Nt-1]===0&&qe[Nt-2]===0||(wt[At]=qe[Nt],At++);return new Uint8Array(wt.buffer,0,At)}static parseSPS(Ke){let qe=pt._ebsp2rbsp(Ke),Xe=new Lt(qe);Xe.readByte();let wt=Xe.readByte();Xe.readByte();let At=Xe.readByte();Xe.readUEG();let Nt=pt.getProfileString(wt),bt=pt.getLevelString(At),gn=1,En=420,Un=[0,420,422,444],Pn=8;if((wt===100||wt===110||wt===122||wt===244||wt===44||wt===83||wt===86||wt===118||wt===128||wt===138||wt===144)&&(gn=Xe.readUEG(),gn===3&&Xe.readBits(1),gn<=3&&(En=Un[gn]),Pn=Xe.readUEG()+8,Xe.readUEG(),Xe.readBits(1),Xe.readBool())){let Wi=gn!==3?8:12;for(let Ni=0;Ni<Wi;Ni++)Xe.readBool()&&(Ni<6?pt._skipScalingList(Xe,16):pt._skipScalingList(Xe,64))}Xe.readUEG();let zt=Xe.readUEG();if(zt===0)Xe.readUEG();else if(zt===1){Xe.readBits(1),Xe.readSEG(),Xe.readSEG();let Wi=Xe.readUEG();for(let Ni=0;Ni<Wi;Ni++)Xe.readSEG()}let Yt=Xe.readUEG();Xe.readBits(1);let Cn=Xe.readUEG(),An=Xe.readUEG(),Vt=Xe.readBits(1);Vt===0&&Xe.readBits(1),Xe.readBits(1);let an=0,Bn=0,Nn=0,qn=0;Xe.readBool()&&(an=Xe.readUEG(),Bn=Xe.readUEG(),Nn=Xe.readUEG(),qn=Xe.readUEG());let Jn=1,Rn=1,li=0,Mi=!0,zn=0,si=0;if(Xe.readBool()){if(Xe.readBool()){let Wi=Xe.readByte(),Ni=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],lr=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];Wi>0&&Wi<16?(Jn=Ni[Wi-1],Rn=lr[Wi-1]):Wi===255&&(Jn=Xe.readByte()<<8|Xe.readByte(),Rn=Xe.readByte()<<8|Xe.readByte())}if(Xe.readBool()&&Xe.readBool(),Xe.readBool()&&(Xe.readBits(4),Xe.readBool()&&Xe.readBits(24)),Xe.readBool()&&(Xe.readUEG(),Xe.readUEG()),Xe.readBool()){let Wi=Xe.readBits(32),Ni=Xe.readBits(32);Mi=Xe.readBool(),zn=Ni,si=Wi*2,li=zn/si}}let ur=1;(Jn!==1||Rn!==1)&&(ur=Jn/Rn);let Ai=0,un=0;if(gn===0)Ai=1,un=2-Vt;else{let Wi=gn===3?1:2,Ni=gn===1?2:1;Ai=Wi,un=Ni*(2-Vt)}let ai=(Cn+1)*16,wi=(2-Vt)*((An+1)*16);ai-=(an+Bn)*Ai,wi-=(Nn+qn)*un;let fi=Math.ceil(ai*ur);return Xe.destroy(),Xe=null,{profile_string:Nt,level_string:bt,bit_depth:Pn,ref_frames:Yt,chroma_format:En,chroma_format_string:pt.getChromaFormatString(En),frame_rate:{fixed:Mi,fps:li,fps_den:si,fps_num:zn},sar_ratio:{width:Jn,height:Rn},codec_size:{width:ai,height:wi},present_size:{width:fi,height:wi}}}static _skipScalingList(Ke,qe){let Xe=8,wt=8,At=0;for(let Nt=0;Nt<qe;Nt++)wt!==0&&(At=Ke.readSEG(),wt=(Xe+At+256)%256),Xe=wt===0?Xe:wt}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 Rt=pt,yt={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};function nt(ln){return ln>>>8&255|(ln&255)<<8}function He(ln){return(ln&4278190080)>>>24|(ln&16711680)>>>8|(ln&65280)<<8|(ln&255)<<24}function Ie(ln,Ke){return ln[Ke]<<24|ln[Ke+1]<<16|ln[Ke+2]<<8|ln[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 Xe=new ArrayBuffer(2);return new DataView(Xe).setInt16(0,256,!0),new Int16Array(Xe)[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),Xe={match:!1};if(qe[0]!==70||qe[1]!==76||qe[2]!==86||qe[3]!==1)return Xe;let wt=(qe[4]&4)>>>2!==0,At=(qe[4]&1)!==0,Nt=Ie(qe,5);return Nt<9?Xe:{match:!0,consumed:Nt,dataOffset:Nt,hasAudioTrack:wt,hasVideoTrack:At}}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 Xe=0,wt=this._littleEndian;if(qe===0)if(Ke.byteLength>13)Xe=We.probe(Ke).dataOffset;else return 0;for(this._firstParse&&(this._firstParse=!1,qe+Xe!==this._dataOffset&&Le.w(this.TAG,"First time parsing but chunk byteStart invalid!"),new DataView(Ke,Xe).getUint32(0,!wt)!==0&&Le.w(this.TAG,"PrevTagSize0 !== 0 !!!"),Xe+=4);Xe<Ke.byteLength;){this._dispatch=!0;let At=new DataView(Ke,Xe);if(Xe+11+4>Ke.byteLength)break;let Nt=At.getUint8(0),bt=At.getUint32(0,!wt)&16777215;if(Xe+11+bt+4>Ke.byteLength)break;if(Nt!==8&&Nt!==9&&Nt!==18){Le.w(this.TAG,`Unsupported tag type ${Nt}, skipped`),Xe+=11+bt+4;continue}let gn=At.getUint8(4),En=At.getUint8(5),Un=At.getUint8(6),Pn=At.getUint8(7),zt=Un|En<<8|gn<<16|Pn<<24;(At.getUint32(7,!wt)&16777215)!==0&&Le.w(this.TAG,"Meet tag which has StreamID != 0!");let Cn=Xe+11;switch(Nt){case 8:this._parseAudioData(Ke,Cn,bt,zt);break;case 9:this._parseVideoData(Ke,Cn,bt,zt,qe+Xe);break;case 18:this._parseScriptData(Ke,Cn,bt);break}let An=At.getUint32(11+bt,!wt);An!==11+bt&&Le.w(this.TAG,`Invalid PrevTagSize ${An}`),Xe+=11+bt+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),Xe}_parseScriptData(Ke,qe,Xe){let wt=Jt.parseScriptData(Ke,qe,Xe);if(wt.hasOwnProperty("onMetaData")){if(wt.onMetaData==null||typeof wt.onMetaData!="object"){Le.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&Le.w(this.TAG,"Found another onMetaData tag!"),this._metadata=wt;let At=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},At)),typeof At.hasAudio=="boolean"&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=At.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),typeof At.hasVideo=="boolean"&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=At.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),typeof At.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=At.audiodatarate),typeof At.videodatarate=="number"&&(this._mediaInfo.videoDataRate=At.videodatarate),typeof At.width=="number"&&(this._mediaInfo.width=At.width),typeof At.height=="number"&&(this._mediaInfo.height=At.height),typeof At.duration=="number"){if(!this._durationOverrided){let Nt=Math.floor(At.duration*this._timescale);this._duration=Nt,this._mediaInfo.duration=Nt}}else this._mediaInfo.duration=0;if(typeof At.framerate=="number"){let Nt=Math.floor(At.framerate*1e3);if(Nt>0){let bt=Nt/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=bt,this._referenceFrameRate.fps_num=Nt,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=bt}}if(typeof At.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;let Nt=At.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(Nt),At.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=At,Le.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(wt).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},wt))}_parseKeyframesIndex(Ke){let qe=[],Xe=[];for(let wt=1;wt<Ke.times.length;wt++){let At=this._timestampBase+Math.floor(Ke.times[wt]*1e3);qe.push(At),Xe.push(Ke.filepositions[wt])}return{times:qe,filepositions:Xe}}_parseAudioData(Ke,qe,Xe,wt){if(Xe<=1){Le.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");return}if(this._hasAudioFlagOverrided===!0&&this._hasAudio===!1)return;let At=this._littleEndian,bt=new DataView(Ke,qe,Xe).getUint8(0),gn=bt>>>4;if(gn!==2&&gn!==10){this._onError(yt.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+gn);return}let En=0,Un=(bt&12)>>>2;if(Un>=0&&Un<=4)En=this._flvSoundRateTable[Un];else{this._onError(yt.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+Un);return}let Pn=(bt&2)>>>1,zt=bt&1,Yt=this._audioMetadata,Cn=this._audioTrack;if(Yt||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),Yt=this._audioMetadata={},Yt.type="audio",Yt.id=Cn.id,Yt.timescale=this._timescale,Yt.duration=this._duration,Yt.audioSampleRate=En,Yt.channelCount=zt===0?1:2),gn===10){let An=this._parseAACAudioData(Ke,qe+1,Xe-1);if(An==null)return;if(An.packetType===0){Yt.config&&Le.w(this.TAG,"Found another AudioSpecificConfig!");let Vt=An.data;Yt.audioSampleRate=Vt.samplingRate,Yt.channelCount=Vt.channelCount,Yt.codec=Vt.codec,Yt.originalCodec=Vt.originalCodec,Yt.config=Vt.config,Yt.refSampleDuration=1024/Yt.audioSampleRate*Yt.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",Yt);let an=this._mediaInfo;an.audioCodec=Yt.originalCodec,an.audioSampleRate=Yt.audioSampleRate,an.audioChannelCount=Yt.channelCount,an.hasVideo?an.videoCodec!=null&&(an.mimeType='video/x-flv; codecs="'+an.videoCodec+","+an.audioCodec+'"'):an.mimeType='video/x-flv; codecs="'+an.audioCodec+'"',an.isComplete()&&this._onMediaInfo(an)}else if(An.packetType===1){let Vt=this._timestampBase+wt,an={unit:An.data,length:An.data.byteLength,dts:Vt,pts:Vt};Cn.samples.push(an),Cn.length+=An.data.length}else Le.e(this.TAG,`Flv: Unsupported AAC data type ${An.packetType}`)}else if(gn===2){if(!Yt.codec){let Bn=this._parseMP3AudioData(Ke,qe+1,Xe-1,!0);if(Bn==null)return;Yt.audioSampleRate=Bn.samplingRate,Yt.channelCount=Bn.channelCount,Yt.codec=Bn.codec,Yt.originalCodec=Bn.originalCodec,Yt.refSampleDuration=1152/Yt.audioSampleRate*Yt.timescale,Le.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",Yt);let Nn=this._mediaInfo;Nn.audioCodec=Yt.codec,Nn.audioSampleRate=Yt.audioSampleRate,Nn.audioChannelCount=Yt.channelCount,Nn.audioDataRate=Bn.bitRate,Nn.hasVideo?Nn.videoCodec!=null&&(Nn.mimeType='video/x-flv; codecs="'+Nn.videoCodec+","+Nn.audioCodec+'"'):Nn.mimeType='video/x-flv; codecs="'+Nn.audioCodec+'"',Nn.isComplete()&&this._onMediaInfo(Nn)}let An=this._parseMP3AudioData(Ke,qe+1,Xe-1,!1);if(An==null)return;let Vt=this._timestampBase+wt,an={unit:An,length:An.byteLength,dts:Vt,pts:Vt};Cn.samples.push(an),Cn.length+=An.length}}_parseAACAudioData(Ke,qe,Xe){if(Xe<=1){Le.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}let wt={},At=new Uint8Array(Ke,qe,Xe);return wt.packetType=At[0],At[0]===0?wt.data=this._parseAACAudioSpecificConfig(Ke,qe+1,Xe-1):wt.data=At.subarray(1),wt}_parseAACAudioSpecificConfig(Ke,qe,Xe){let wt=new Uint8Array(Ke,qe,Xe),At=null,Nt=0,bt=0,gn=null,En=0,Un=null;if(Nt=bt=wt[0]>>>3,En=(wt[0]&7)<<1|wt[1]>>>7,En<0||En>=this._mpegSamplingRates.length){this._onError(yt.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}let Pn=this._mpegSamplingRates[En],zt=(wt[1]&120)>>>3;if(zt<0||zt>=8){this._onError(yt.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}Nt===5&&(Un=(wt[1]&7)<<1|wt[2]>>>7,gn=(wt[2]&124)>>>2);let Yt=self.navigator.userAgent.toLowerCase();return Yt.indexOf("firefox")!==-1?En>=6?(Nt=5,At=new Array(4),Un=En-3):(Nt=2,At=new Array(2),Un=En):Yt.indexOf("android")!==-1?(Nt=2,At=new Array(2),Un=En):(Nt=5,Un=En,At=new Array(4),En>=6?Un=En-3:zt===1&&(Nt=2,At=new Array(2),Un=En)),At[0]=Nt<<3,At[0]|=(En&15)>>>1,At[1]=(En&15)<<7,At[1]|=(zt&15)<<3,Nt===5&&(At[1]|=(Un&15)>>>1,At[2]=(Un&1)<<7,At[2]|=8,At[3]=0),{config:At,samplingRate:Pn,channelCount:zt,codec:"mp4a.40."+Nt,originalCodec:"mp4a.40."+bt}}_parseMP3AudioData(Ke,qe,Xe,wt){if(Xe<4){Le.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}let At=this._littleEndian,Nt=new Uint8Array(Ke,qe,Xe),bt=null;if(wt){if(Nt[0]!==255)return;let gn=Nt[1]>>>3&3,En=(Nt[1]&6)>>1,Un=(Nt[2]&240)>>>4,Pn=(Nt[2]&12)>>>2,Yt=(Nt[3]>>>6&3)!==3?2:1,Cn=0,An=0,Vt=34,an="mp3";switch(gn){case 0:Cn=this._mpegAudioV25SampleRateTable[Pn];break;case 2:Cn=this._mpegAudioV20SampleRateTable[Pn];break;case 3:Cn=this._mpegAudioV10SampleRateTable[Pn];break}switch(En){case 1:Vt=34,Un<this._mpegAudioL3BitRateTable.length&&(An=this._mpegAudioL3BitRateTable[Un]);break;case 2:Vt=33,Un<this._mpegAudioL2BitRateTable.length&&(An=this._mpegAudioL2BitRateTable[Un]);break;case 3:Vt=32,Un<this._mpegAudioL1BitRateTable.length&&(An=this._mpegAudioL1BitRateTable[Un]);break}bt={bitRate:An,samplingRate:Cn,channelCount:Yt,codec:an,originalCodec:an}}else bt=Nt;return bt}_parseVideoData(Ke,qe,Xe,wt,At){if(Xe<=1){Le.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");return}if(this._hasVideoFlagOverrided===!0&&this._hasVideo===!1)return;let Nt=new Uint8Array(Ke,qe,Xe)[0],bt=(Nt&240)>>>4,gn=Nt&15;if(gn!==7){this._onError(yt.CODEC_UNSUPPORTED,`Flv: Unsupported codec in video frame: ${gn}`);return}this._parseAVCVideoPacket(Ke,qe+1,Xe-1,wt,At,bt)}_parseAVCVideoPacket(Ke,qe,Xe,wt,At,Nt){if(Xe<4){Le.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}let bt=this._littleEndian,gn=new DataView(Ke,qe,Xe),En=gn.getUint8(0),Pn=(gn.getUint32(0,!bt)&16777215)<<8>>8;if(En===0)this._parseAVCDecoderConfigurationRecord(Ke,qe+4,Xe-4);else if(En===1)this._parseAVCVideoData(Ke,qe+4,Xe-4,wt,At,Nt,Pn);else if(En!==2){this._onError(yt.FORMAT_ERROR,`Flv: Invalid video packet type ${En}`);return}}_parseAVCDecoderConfigurationRecord(Ke,qe,Xe){if(Xe<7){Le.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}let wt=this._videoMetadata,At=this._videoTrack,Nt=this._littleEndian,bt=new DataView(Ke,qe,Xe);wt?typeof wt.avcc!="undefined"&&Le.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),wt=this._videoMetadata={},wt.type="video",wt.id=At.id,wt.timescale=this._timescale,wt.duration=this._duration);let gn=bt.getUint8(0),En=bt.getUint8(1),Un=bt.getUint8(2),Pn=bt.getUint8(3);if(gn!==1||En===0){this._onError(yt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(bt.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(yt.FORMAT_ERROR,`Flv: Strange NaluLengthSizeMinusOne: ${this._naluLengthSize-1}`);return}let zt=bt.getUint8(5)&31;if(zt===0){this._onError(yt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else zt>1&&Le.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ${zt}`);let Yt=6;for(let An=0;An<zt;An++){let Vt=bt.getUint16(Yt,!Nt);if(Yt+=2,Vt===0)continue;let an=new Uint8Array(Ke,qe+Yt,Vt);Yt+=Vt;let Bn=Rt.parseSPS(an);if(An!==0)continue;wt.codecWidth=Bn.codec_size.width,wt.codecHeight=Bn.codec_size.height,wt.presentWidth=Bn.present_size.width,wt.presentHeight=Bn.present_size.height,wt.profile=Bn.profile_string,wt.level=Bn.level_string,wt.bitDepth=Bn.bit_depth,wt.chromaFormat=Bn.chroma_format,wt.sarRatio=Bn.sar_ratio,wt.frameRate=Bn.frame_rate,(Bn.frame_rate.fixed===!1||Bn.frame_rate.fps_num===0||Bn.frame_rate.fps_den===0)&&(wt.frameRate=this._referenceFrameRate);let Nn=wt.frameRate.fps_den,qn=wt.frameRate.fps_num;wt.refSampleDuration=wt.timescale*(Nn/qn);let Gn=an.subarray(1,4),Jn="avc1.";for(let li=0;li<3;li++){let Mi=Gn[li].toString(16);Mi.length<2&&(Mi="0"+Mi),Jn+=Mi}wt.codec=Jn;let Rn=this._mediaInfo;Rn.width=wt.codecWidth,Rn.height=wt.codecHeight,Rn.fps=wt.frameRate.fps,Rn.profile=wt.profile,Rn.level=wt.level,Rn.refFrames=Bn.ref_frames,Rn.chromaFormat=Bn.chroma_format_string,Rn.sarNum=wt.sarRatio.width,Rn.sarDen=wt.sarRatio.height,Rn.videoCodec=Jn,Rn.hasAudio?Rn.audioCodec!=null&&(Rn.mimeType='video/x-flv; codecs="'+Rn.videoCodec+","+Rn.audioCodec+'"'):Rn.mimeType='video/x-flv; codecs="'+Rn.videoCodec+'"',Rn.isComplete()&&this._onMediaInfo(Rn)}let Cn=bt.getUint8(Yt);if(Cn===0){this._onError(yt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");return}else Cn>1&&Le.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ${Cn}`);Yt++;for(let An=0;An<Cn;An++){let Vt=bt.getUint16(Yt,!Nt);Yt+=2,Vt!==0&&(Yt+=Vt)}wt.avcc=new Uint8Array(Xe),wt.avcc.set(new Uint8Array(Ke,qe,Xe),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",wt)}_parseAVCVideoData(Ke,qe,Xe,wt,At,Nt,bt){let gn=this._littleEndian,En=new DataView(Ke,qe,Xe),Un=[],Pn=0,zt=0;const Yt=this._naluLengthSize;let Cn=this._timestampBase+wt,An=Nt===1;for(;zt<Xe;){if(zt+4>=Xe){Le.w(this.TAG,`Malformed Nalu near timestamp ${Cn}, offset = ${zt}, dataSize = ${Xe}`);break}let Vt=En.getUint32(zt,!gn);if(Yt===3&&(Vt>>>=8),Vt>Xe-Yt){Le.w(this.TAG,`Malformed Nalus near timestamp ${Cn}, NaluSize > DataSize!`);return}let an=En.getUint8(zt+Yt)&31;an===5&&(An=!0);let Bn=new Uint8Array(Ke,qe+zt,Yt+Vt),Nn={type:an,data:Bn};Un.push(Nn),Pn+=Bn.byteLength,zt+=Yt+Vt}if(Un.length){let Vt=this._videoTrack,an={units:Un,length:Pn,isKeyframe:An,dts:Cn,cts:bt,pts:Cn+bt};An&&(an.fileposition=At),Vt.samples.push(an),Vt.length+=Pn}}}var Oe=We;class Ce{static init(){Ce.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 Ce.types)Ce.types.hasOwnProperty(qe)&&(Ce.types[qe]=[qe.charCodeAt(0),qe.charCodeAt(1),qe.charCodeAt(2),qe.charCodeAt(3)]);let Ke=Ce.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,Xe=null,wt=Array.prototype.slice.call(arguments,1),At=wt.length;for(let bt=0;bt<At;bt++)qe+=wt[bt].byteLength;Xe=new Uint8Array(qe),Xe[0]=qe>>>24&255,Xe[1]=qe>>>16&255,Xe[2]=qe>>>8&255,Xe[3]=qe&255,Xe.set(Ke,4);let Nt=8;for(let bt=0;bt<At;bt++)Xe.set(wt[bt],Nt),Nt+=wt[bt].byteLength;return Xe}static generateInitSegment(Ke){let qe=Ce.box(Ce.types.ftyp,Ce.constants.FTYP),Xe=Ce.moov(Ke),wt=new Uint8Array(qe.byteLength+Xe.byteLength);return wt.set(qe,0),wt.set(Xe,qe.byteLength),wt}static moov(Ke){let qe=Ce.mvhd(Ke.timescale,Ke.duration),Xe=Ce.trak(Ke),wt=Ce.mvex(Ke);return Ce.box(Ce.types.moov,qe,Xe,wt)}static mvhd(Ke,qe){return Ce.box(Ce.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 Ce.box(Ce.types.trak,Ce.tkhd(Ke),Ce.mdia(Ke))}static tkhd(Ke){let qe=Ke.id,Xe=Ke.duration,wt=Ke.presentWidth,At=Ke.presentHeight;return Ce.box(Ce.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,Xe>>>24&255,Xe>>>16&255,Xe>>>8&255,Xe&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,wt>>>8&255,wt&255,0,0,At>>>8&255,At&255,0,0]))}static mdia(Ke){return Ce.box(Ce.types.mdia,Ce.mdhd(Ke),Ce.hdlr(Ke),Ce.minf(Ke))}static mdhd(Ke){let qe=Ke.timescale,Xe=Ke.duration;return Ce.box(Ce.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,Xe>>>24&255,Xe>>>16&255,Xe>>>8&255,Xe&255,85,196,0,0]))}static hdlr(Ke){let qe=null;return Ke.type==="audio"?qe=Ce.constants.HDLR_AUDIO:qe=Ce.constants.HDLR_VIDEO,Ce.box(Ce.types.hdlr,qe)}static minf(Ke){let qe=null;return Ke.type==="audio"?qe=Ce.box(Ce.types.smhd,Ce.constants.SMHD):qe=Ce.box(Ce.types.vmhd,Ce.constants.VMHD),Ce.box(Ce.types.minf,qe,Ce.dinf(),Ce.stbl(Ke))}static dinf(){return Ce.box(Ce.types.dinf,Ce.box(Ce.types.dref,Ce.constants.DREF))}static stbl(Ke){return Ce.box(Ce.types.stbl,Ce.stsd(Ke),Ce.box(Ce.types.stts,Ce.constants.STTS),Ce.box(Ce.types.stsc,Ce.constants.STSC),Ce.box(Ce.types.stsz,Ce.constants.STSZ),Ce.box(Ce.types.stco,Ce.constants.STCO))}static stsd(Ke){return Ke.type==="audio"?Ke.codec==="mp3"?Ce.box(Ce.types.stsd,Ce.constants.STSD_PREFIX,Ce.mp3(Ke)):Ce.box(Ce.types.stsd,Ce.constants.STSD_PREFIX,Ce.mp4a(Ke)):Ce.box(Ce.types.stsd,Ce.constants.STSD_PREFIX,Ce.avc1(Ke))}static mp3(Ke){let qe=Ke.channelCount,Xe=Ke.audioSampleRate,wt=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,Xe>>>8&255,Xe&255,0,0]);return Ce.box(Ce.types[".mp3"],wt)}static mp4a(Ke){let qe=Ke.channelCount,Xe=Ke.audioSampleRate,wt=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,Xe>>>8&255,Xe&255,0,0]);return Ce.box(Ce.types.mp4a,wt,Ce.esds(Ke))}static esds(Ke){let qe=Ke.config||[],Xe=qe.length,wt=new Uint8Array([0,0,0,0,3,23+Xe,0,1,0,4,15+Xe,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([Xe]).concat(qe).concat([6,1,2]));return Ce.box(Ce.types.esds,wt)}static avc1(Ke){let qe=Ke.avcc,Xe=Ke.codecWidth,wt=Ke.codecHeight,At=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,Xe>>>8&255,Xe&255,wt>>>8&255,wt&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 Ce.box(Ce.types.avc1,At,Ce.box(Ce.types.avcC,qe))}static mvex(Ke){return Ce.box(Ce.types.mvex,Ce.trex(Ke))}static trex(Ke){let qe=Ke.id,Xe=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 Ce.box(Ce.types.trex,Xe)}static moof(Ke,qe){return Ce.box(Ce.types.moof,Ce.mfhd(Ke.sequenceNumber),Ce.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 Ce.box(Ce.types.mfhd,qe)}static traf(Ke,qe){let Xe=Ke.id,wt=Ce.box(Ce.types.tfhd,new Uint8Array([0,0,0,0,Xe>>>24&255,Xe>>>16&255,Xe>>>8&255,Xe&255])),At=Ce.box(Ce.types.tfdt,new Uint8Array([0,0,0,0,qe>>>24&255,qe>>>16&255,qe>>>8&255,qe&255])),Nt=Ce.sdtp(Ke),bt=Ce.trun(Ke,Nt.byteLength+16+16+8+16+8+8);return Ce.box(Ce.types.traf,wt,At,bt,Nt)}static sdtp(Ke){let qe=Ke.samples||[],Xe=qe.length,wt=new Uint8Array(4+Xe);for(let At=0;At<Xe;At++){let Nt=qe[At].flags;wt[At+4]=Nt.isLeading<<6|Nt.dependsOn<<4|Nt.isDependedOn<<2|Nt.hasRedundancy}return Ce.box(Ce.types.sdtp,wt)}static trun(Ke,qe){let Xe=Ke.samples||[],wt=Xe.length,At=12+16*wt,Nt=new Uint8Array(At);qe+=8+At,Nt.set([0,0,15,1,wt>>>24&255,wt>>>16&255,wt>>>8&255,wt&255,qe>>>24&255,qe>>>16&255,qe>>>8&255,qe&255],0);for(let bt=0;bt<wt;bt++){let gn=Xe[bt].duration,En=Xe[bt].size,Un=Xe[bt].flags,Pn=Xe[bt].cts;Nt.set([gn>>>24&255,gn>>>16&255,gn>>>8&255,gn&255,En>>>24&255,En>>>16&255,En>>>8&255,En&255,Un.isLeading<<2|Un.dependsOn,Un.isDependedOn<<6|Un.hasRedundancy<<4|Un.isNonSync,0,0,Pn>>>24&255,Pn>>>16&255,Pn>>>8&255,Pn&255],12+16*bt)}return Ce.box(Ce.types.trun,Nt)}static mdat(Ke){return Ce.box(Ce.types.mdat,Ke)}}Ce.init();var Ne=Ce;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,Xe,wt,At){this.dts=Ke,this.pts=qe,this.duration=Xe,this.originalDts=wt,this.isSyncPoint=At,this.fileposition=null}}class Tt{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 qt{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,Xe=0,wt=qe.length-1,At=0,Nt=0,bt=wt;for(Ke<qe[0].dts&&(Xe=0,Nt=bt+1);Nt<=bt;)if(At=Nt+Math.floor((bt-Nt)/2),At===wt||Ke>=qe[At].dts&&Ke<qe[At+1].dts){Xe=At;break}else qe[At].dts<Ke?Nt=At+1:bt=At-1;return this._list[Xe]}}class yn{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 Xe=qe.length-1,wt=0,At=0,Nt=Xe,bt=0;if(Ke<qe[0].originalBeginDts)return bt=-1,bt;for(;At<=Nt;)if(wt=At+Math.floor((Nt-At)/2),wt===Xe||Ke>qe[wt].lastSample.originalDts&&Ke<qe[wt+1].originalBeginDts){bt=wt;break}else qe[wt].originalBeginDts<Ke?At=wt+1:Nt=wt-1;return bt}_searchNearestSegmentAfter(Ke){return this._searchNearestSegmentBefore(Ke)+1}append(Ke){let qe=this._list,Xe=Ke,wt=this._lastAppendLocation,At=0;wt!==-1&&wt<qe.length&&Xe.originalBeginDts>=qe[wt].lastSample.originalDts&&(wt===qe.length-1||wt<qe.length-1&&Xe.originalBeginDts<qe[wt+1].originalBeginDts)?At=wt+1:qe.length>0&&(At=this._searchNearestSegmentBefore(Xe.originalBeginDts)+1),this._lastAppendLocation=At,this._list.splice(At,0,Xe)}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),Xe=this._list[qe].syncPoints;for(;Xe.length===0&&qe>0;)qe--,Xe=this._list[qe].syncPoints;return Xe.length>0?Xe[Xe.length-1]:null}}class rn{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 yn("audio"),this._videoSegmentInfoList=new yn("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 Xe=null,wt="mp4",At=qe.codec;if(Ke==="audio")this._audioMeta=qe,qe.codec==="mp3"&&this._mp3UseMpegAudio?(wt="mpeg",At="",Xe=new Uint8Array):Xe=Ne.generateInitSegment(qe);else if(Ke==="video")this._videoMeta=qe,Xe=Ne.generateInitSegment(qe);else return;if(!this._onInitSegment)throw new ge("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(Ke,{type:Ke,data:Xe.buffer,codec:At,container:`${Ke}/${wt}`,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,Xe={type:"video",id:1,sequenceNumber:0,samples:[],length:0};Ke!=null&&(Xe.samples.push(Ke),Xe.length=Ke.length);let wt={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};qe!=null&&(wt.samples.push(qe),wt.length=qe.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(Xe,!0),this._remuxAudio(wt,!0)}_remuxAudio(Ke,qe){if(this._audioMeta==null)return;let Xe=Ke,wt=Xe.samples,At,Nt=-1,bt=-1,gn=-1,En=this._audioMeta.refSampleDuration,Un=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,Pn=this._dtsBaseInited&&this._audioNextDts===void 0,zt=!1;if(!wt||wt.length===0||wt.length===1&&!qe)return;let Yt=0,Cn=null,An=0;Un?(Yt=0,An=Xe.length):(Yt=8,An=8+Xe.length);let Vt=null;if(wt.length>1&&(Vt=wt.pop(),An-=Vt.length),this._audioStashedLastSample!=null){let Rn=this._audioStashedLastSample;this._audioStashedLastSample=null,wt.unshift(Rn),An+=Rn.length}Vt!=null&&(this._audioStashedLastSample=Vt);let an=wt[0].dts-this._dtsBase;if(this._audioNextDts)At=an-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())At=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(zt=!0);else{let Rn=this._audioSegmentInfoList.getLastSampleBefore(an);if(Rn!=null){let li=an-(Rn.originalDts+Rn.duration);li<=3&&(li=0);let Mi=Rn.dts+Rn.duration+li;At=an-Mi}else At=0}if(zt){let Rn=an-At,li=this._videoSegmentInfoList.getLastSegmentBefore(an);if(li!=null&&li.beginDts<Rn){let Mi=dt.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(Mi){let zn=li.beginDts,si=Rn-li.beginDts;Le.v(this.TAG,`InsertPrefixSilentAudio: dts: ${zn}, duration: ${si}`),wt.unshift({unit:Mi,dts:zn,pts:zn}),An+=Mi.byteLength}}else zt=!1}let Bn=[];for(let Rn=0;Rn<wt.length;Rn++){let li=wt[Rn],Mi=li.unit,zn=li.dts-this._dtsBase,si=zn-At;Nt===-1&&(Nt=si);let Hi=0;Rn!==wt.length-1?Hi=wt[Rn+1].dts-this._dtsBase-At-si:Vt!=null?Hi=Vt.dts-this._dtsBase-At-si:Bn.length>=1?Hi=Bn[Bn.length-1].duration:Hi=Math.floor(En);let ur=!1,Ai=null;if(Hi>En*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!ie.safari){ur=!0;let un=Math.abs(Hi-En),ai=Math.ceil(un/En),wi=si+En;Le.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
|
|
|
dts: ${si+Hi} ms, expected: ${si+Math.round(En)} ms, delta: ${Math.round(un)} ms, generate: ${ai} frames`);let fi=dt.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);fi==null&&(Le.w(this.TAG,`Unable to generate silent frame for ${this._audioMeta.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`),fi=Mi),Ai=[];for(let Ni=0;Ni<ai;Ni++){let lr=Math.round(wi);if(Ai.length>0){let $i=Ai[Ai.length-1];$i.duration=lr-$i.dts}let Fi={dts:lr,pts:lr,cts:0,unit:fi,size:fi.byteLength,duration:0,originalDts:zn,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};Ai.push(Fi),An+=Fi.size,wi+=En}let Wi=Ai[Ai.length-1];Wi.duration=si+Hi-Wi.dts,Hi=Math.round(En)}Bn.push({dts:si,pts:si,cts:0,unit:li.unit,size:li.unit.byteLength,duration:Hi,originalDts:zn,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),ur&&Bn.push.apply(Bn,Ai)}Un?Cn=new Uint8Array(An):(Cn=new Uint8Array(An),Cn[0]=An>>>24&255,Cn[1]=An>>>16&255,Cn[2]=An>>>8&255,Cn[3]=An&255,Cn.set(Ne.types.mdat,4));for(let Rn=0;Rn<Bn.length;Rn++){let li=Bn[Rn].unit;Cn.set(li,Yt),Yt+=li.byteLength}let Nn=Bn[Bn.length-1];bt=Nn.dts+Nn.duration,this._audioNextDts=bt;let qn=new Tt;qn.beginDts=Nt,qn.endDts=bt,qn.beginPts=Nt,qn.endPts=bt,qn.originalBeginDts=Bn[0].originalDts,qn.originalEndDts=Nn.originalDts+Nn.duration,qn.firstSample=new Je(Bn[0].dts,Bn[0].pts,Bn[0].duration,Bn[0].originalDts,!1),qn.lastSample=new Je(Nn.dts,Nn.pts,Nn.duration,Nn.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(qn),Xe.samples=Bn,Xe.sequenceNumber++;let Gn=null;Un?Gn=new Uint8Array:Gn=Ne.moof(Xe,Nt),Xe.samples=[],Xe.length=0;let Jn={type:"audio",data:this._mergeBoxes(Gn,Cn).buffer,sampleCount:Bn.length,info:qn};Un&&Pn&&(Jn.timestampOffset=Nt),this._onMediaSegment("audio",Jn)}_remuxVideo(Ke,qe){if(this._videoMeta==null)return;let Xe=Ke,wt=Xe.samples,At,Nt=-1,bt=-1,gn=-1,En=-1;if(!wt||wt.length===0||wt.length===1&&!qe)return;let Un=8,Pn=null,zt=8+Ke.length,Yt=null;if(wt.length>1&&(Yt=wt.pop(),zt-=Yt.length),this._videoStashedLastSample!=null){let Nn=this._videoStashedLastSample;this._videoStashedLastSample=null,wt.unshift(Nn),zt+=Nn.length}Yt!=null&&(this._videoStashedLastSample=Yt);let Cn=wt[0].dts-this._dtsBase;if(this._videoNextDts)At=Cn-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())At=0;else{let Nn=this._videoSegmentInfoList.getLastSampleBefore(Cn);if(Nn!=null){let qn=Cn-(Nn.originalDts+Nn.duration);qn<=3&&(qn=0);let Gn=Nn.dts+Nn.duration+qn;At=Cn-Gn}else At=0}let An=new Tt,Vt=[];for(let Nn=0;Nn<wt.length;Nn++){let qn=wt[Nn],Gn=qn.dts-this._dtsBase,Jn=qn.isKeyframe,Rn=Gn-At,li=qn.cts,Mi=Rn+li;Nt===-1&&(Nt=Rn,gn=Mi);let zn=0;if(Nn!==wt.length-1?zn=wt[Nn+1].dts-this._dtsBase-At-Rn:Yt!=null?zn=Yt.dts-this._dtsBase-At-Rn:Vt.length>=1?zn=Vt[Vt.length-1].duration:zn=Math.floor(this._videoMeta.refSampleDuration),Jn){let si=new Je(Rn,Mi,zn,qn.dts,!0);si.fileposition=qn.fileposition,An.appendSyncPoint(si)}Vt.push({dts:Rn,pts:Mi,cts:li,units:qn.units,size:qn.length,isKeyframe:Jn,duration:zn,originalDts:Gn,flags:{isLeading:0,dependsOn:Jn?2:1,isDependedOn:Jn?1:0,hasRedundancy:0,isNonSync:Jn?0:1}})}Pn=new Uint8Array(zt),Pn[0]=zt>>>24&255,Pn[1]=zt>>>16&255,Pn[2]=zt>>>8&255,Pn[3]=zt&255,Pn.set(Ne.types.mdat,4);for(let Nn=0;Nn<Vt.length;Nn++){let qn=Vt[Nn].units;for(;qn.length;){let Jn=qn.shift().data;Pn.set(Jn,Un),Un+=Jn.byteLength}}let an=Vt[Vt.length-1];if(bt=an.dts+an.duration,En=an.pts+an.duration,this._videoNextDts=bt,An.beginDts=Nt,An.endDts=bt,An.beginPts=gn,An.endPts=En,An.originalBeginDts=Vt[0].originalDts,An.originalEndDts=an.originalDts+an.duration,An.firstSample=new Je(Vt[0].dts,Vt[0].pts,Vt[0].duration,Vt[0].originalDts,Vt[0].isKeyframe),An.lastSample=new Je(an.dts,an.pts,an.duration,an.originalDts,an.isKeyframe),this._isLive||this._videoSegmentInfoList.append(An),Xe.samples=Vt,Xe.sequenceNumber++,this._forceFirstIDR){let Nn=Vt[0].flags;Nn.dependsOn=2,Nn.isNonSync=0}let Bn=Ne.moof(Xe,Nt);Xe.samples=[],Xe.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(Bn,Pn).buffer,sampleCount:Vt.length,info:An})}_mergeBoxes(Ke,qe){let Xe=new Uint8Array(Ke.byteLength+qe.byteLength);return Xe.set(Ke,0),Xe.set(qe,Ke.byteLength),Xe}}var pn=rn,kn={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 oi{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 Xe=0;this._mediaDataSource.segments.forEach(wt=>{wt.timestampBase=Xe,Xe+=wt.duration,wt.cors=Ke.cors,wt.withCredentials=Ke.withCredentials,qe.referrerPolicy&&(wt.referrerPolicy=qe.referrerPolicy)}),!isNaN(Xe)&&this._mediaDataSource.duration!==Xe&&(this._mediaDataSource.duration=Xe),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 Xe=this._mediaDataSource.segments[Ke],wt=this._ioctl=new vt(Xe,this._config,Ke);wt.onError=this._onIOException.bind(this),wt.onSeeked=this._onIOSeeked.bind(this),wt.onComplete=this._onIOComplete.bind(this),wt.onRedirect=this._onIORedirect.bind(this),wt.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),qe?this._demuxer.bindDataSource(this._ioctl):wt.onDataArrival=this._onInitChunkArrival.bind(this),wt.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 Xe=this._mediaInfo.segments[qe];if(Xe==null)this._pendingSeekTime=Ke;else{let wt=Xe.getNearestKeyframe(Ke);this._remuxer.seek(wt.milliseconds),this._ioctl.seek(wt.fileposition),this._pendingResolveSeekPoint=wt.milliseconds}}else{let Xe=this._mediaInfo.segments[qe];if(Xe==null)this._pendingSeekTime=Ke,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(qe);else{let wt=Xe.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,wt.fileposition),this._pendingResolveSeekPoint=wt.milliseconds,this._reportSegmentMediaInfo(qe)}}this._enableStatisticsReporter()}_searchSegmentIndexContains(Ke){let qe=this._mediaDataSource.segments,Xe=qe.length-1;for(let wt=0;wt<qe.length;wt++)if(Ke<qe[wt].timestampBase){Xe=wt-1;break}return Xe}_onInitChunkArrival(Ke,qe){let Xe=null,wt=0;if(qe>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,wt=this._demuxer.parseChunks(Ke,qe);else if((Xe=Oe.probe(Ke)).match){this._demuxer=new Oe(Xe,this._config),this._remuxer||(this._remuxer=new pn(this._config));let At=this._mediaDataSource;At.duration!=null&&!isNaN(At.duration)&&(this._demuxer.overridedDuration=At.duration),typeof At.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=At.hasAudio),typeof At.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=At.hasVideo),this._demuxer.timestampBase=At.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),wt=this._demuxer.parseChunks(Ke,qe)}else Xe=null,Le.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(()=>{this._internalAbort()}),this._emitter.emit(kn.DEMUX_ERROR,yt.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),wt=0;return wt}_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 Xe=this._pendingSeekTime;this._pendingSeekTime=null,this.seek(Xe)})}_onMetaDataArrived(Ke){this._emitter.emit(kn.METADATA_ARRIVED,Ke)}_onScriptDataArrived(Ke){this._emitter.emit(kn.SCRIPTDATA_ARRIVED,Ke)}_onIOSeeked(){this._remuxer.insertDiscontinuity()}_onIOComplete(Ke){let Xe=Ke+1;Xe<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(Xe)):(this._remuxer.flushStashedSamples(),this._emitter.emit(kn.LOADING_COMPLETE),this._disableStatisticsReporter())}_onIORedirect(Ke){let qe=this._ioctl.extraData;this._mediaDataSource.segments[qe].redirectedURL=Ke}_onIORecoveredEarlyEof(){this._emitter.emit(kn.RECOVERED_EARLY_EOF)}_onIOException(Ke,qe){Le.e(this.TAG,`IOException: type = ${Ke}, code = ${qe.code}, msg = ${qe.msg}`),this._emitter.emit(kn.IO_ERROR,Ke,qe),this._disableStatisticsReporter()}_onDemuxException(Ke,qe){Le.e(this.TAG,`DemuxException: type = ${Ke}, info = ${qe}`),this._emitter.emit(kn.DEMUX_ERROR,Ke,qe)}_onRemuxerInitSegmentArrival(Ke,qe){this._emitter.emit(kn.INIT_SEGMENT,Ke,qe)}_onRemuxerMediaSegmentArrival(Ke,qe){if(this._pendingSeekTime==null&&(this._emitter.emit(kn.MEDIA_SEGMENT,Ke,qe),this._pendingResolveSeekPoint!=null&&Ke==="video")){let Xe=qe.info.syncPoints,wt=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,ie.safari&&Xe.length>0&&Xe[0].originalDts===wt&&(wt=Xe[0].pts),this._emitter.emit(kn.RECOMMEND_SEEKPOINT,wt)}}_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],Xe=Object.assign({},qe);Xe.duration=this._mediaInfo.duration,Xe.segmentCount=this._mediaInfo.segmentCount,delete Xe.segments,delete Xe.keyframesIndex,this._emitter.emit(kn.MEDIA_INFO,Xe)}_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(kn.STATISTICS_INFO,Ke)}}var ri=oi,mi=function(ln){let Ke="TransmuxingWorker",qe=null,Xe=An.bind(this);me.install(),ln.addEventListener("message",function(Vt){switch(Vt.data.cmd){case"init":qe=new ri(Vt.data.param[0],Vt.data.param[1]),qe.on(kn.IO_ERROR,zt.bind(this)),qe.on(kn.DEMUX_ERROR,Yt.bind(this)),qe.on(kn.INIT_SEGMENT,wt.bind(this)),qe.on(kn.MEDIA_SEGMENT,At.bind(this)),qe.on(kn.LOADING_COMPLETE,Nt.bind(this)),qe.on(kn.RECOVERED_EARLY_EOF,bt.bind(this)),qe.on(kn.MEDIA_INFO,gn.bind(this)),qe.on(kn.METADATA_ARRIVED,En.bind(this)),qe.on(kn.SCRIPTDATA_ARRIVED,Un.bind(this)),qe.on(kn.STATISTICS_INFO,Pn.bind(this)),qe.on(kn.RECOMMEND_SEEKPOINT,Cn.bind(this));break;case"destroy":qe&&(qe.destroy(),qe=null),ln.postMessage({msg:"destroyed"});break;case"start":qe.start();break;case"stop":qe.stop();break;case"seek":qe.seek(Vt.data.param);break;case"pause":qe.pause();break;case"resume":qe.resume();break;case"logging_config":{let an=Vt.data.param;gt.applyConfig(an),an.enableCallback===!0?gt.addLogListener(Xe):gt.removeLogListener(Xe);break}}});function wt(Vt,an){let Bn={msg:kn.INIT_SEGMENT,data:{type:Vt,data:an}};ln.postMessage(Bn,[an.data])}function At(Vt,an){let Bn={msg:kn.MEDIA_SEGMENT,data:{type:Vt,data:an}};ln.postMessage(Bn,[an.data])}function Nt(){let Vt={msg:kn.LOADING_COMPLETE};ln.postMessage(Vt)}function bt(){let Vt={msg:kn.RECOVERED_EARLY_EOF};ln.postMessage(Vt)}function gn(Vt){let an={msg:kn.MEDIA_INFO,data:Vt};ln.postMessage(an)}function En(Vt){let an={msg:kn.METADATA_ARRIVED,data:Vt};ln.postMessage(an)}function Un(Vt){let an={msg:kn.SCRIPTDATA_ARRIVED,data:Vt};ln.postMessage(an)}function Pn(Vt){let an={msg:kn.STATISTICS_INFO,data:Vt};ln.postMessage(an)}function zt(Vt,an){ln.postMessage({msg:kn.IO_ERROR,data:{type:Vt,info:an}})}function Yt(Vt,an){ln.postMessage({msg:kn.DEMUX_ERROR,data:{type:Vt,info:an}})}function Cn(Vt){ln.postMessage({msg:kn.RECOMMEND_SEEKPOINT,data:Vt})}function An(Vt,an){ln.postMessage({msg:"logcat_callback",data:{type:Vt,logcat:an}})}};class Qi{constructor(Ke,qe){if(this.TAG="Transmuxer",this._emitter=new(ke()),qe.enableWorker&&typeof Worker!="undefined")try{let Xe=Ee(82059);this._worker=Xe(mi),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(Xe){Le.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new ri(Ke,qe)}else this._controller=new ri(Ke,qe);if(this._controller){let Xe=this._controller;Xe.on(kn.IO_ERROR,this._onIOError.bind(this)),Xe.on(kn.DEMUX_ERROR,this._onDemuxError.bind(this)),Xe.on(kn.INIT_SEGMENT,this._onInitSegment.bind(this)),Xe.on(kn.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),Xe.on(kn.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),Xe.on(kn.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),Xe.on(kn.MEDIA_INFO,this._onMediaInfo.bind(this)),Xe.on(kn.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),Xe.on(kn.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),Xe.on(kn.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),Xe.on(kn.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(kn.INIT_SEGMENT,Ke,qe)})}_onMediaSegment(Ke,qe){Promise.resolve().then(()=>{this._emitter.emit(kn.MEDIA_SEGMENT,Ke,qe)})}_onLoadingComplete(){Promise.resolve().then(()=>{this._emitter.emit(kn.LOADING_COMPLETE)})}_onRecoveredEarlyEof(){Promise.resolve().then(()=>{this._emitter.emit(kn.RECOVERED_EARLY_EOF)})}_onMediaInfo(Ke){Promise.resolve().then(()=>{this._emitter.emit(kn.MEDIA_INFO,Ke)})}_onMetaDataArrived(Ke){Promise.resolve().then(()=>{this._emitter.emit(kn.METADATA_ARRIVED,Ke)})}_onScriptDataArrived(Ke){Promise.resolve().then(()=>{this._emitter.emit(kn.SCRIPTDATA_ARRIVED,Ke)})}_onStatisticsInfo(Ke){Promise.resolve().then(()=>{this._emitter.emit(kn.STATISTICS_INFO,Ke)})}_onIOError(Ke,qe){Promise.resolve().then(()=>{this._emitter.emit(kn.IO_ERROR,Ke,qe)})}_onDemuxError(Ke,qe){Promise.resolve().then(()=>{this._emitter.emit(kn.DEMUX_ERROR,Ke,qe)})}_onRecommendSeekpoint(Ke){Promise.resolve().then(()=>{this._emitter.emit(kn.RECOMMEND_SEEKPOINT,Ke)})}_onLoggingConfigChanged(Ke){this._worker&&this._worker.postMessage({cmd:"logging_config",param:Ke})}_onWorkerMessage(Ke){let qe=Ke.data,Xe=qe.data;if(qe.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(qe.msg){case kn.INIT_SEGMENT:case kn.MEDIA_SEGMENT:this._emitter.emit(qe.msg,Xe.type,Xe.data);break;case kn.LOADING_COMPLETE:case kn.RECOVERED_EARLY_EOF:this._emitter.emit(qe.msg);break;case kn.MEDIA_INFO:Object.setPrototypeOf(Xe,Ht.prototype),this._emitter.emit(qe.msg,Xe);break;case kn.METADATA_ARRIVED:case kn.SCRIPTDATA_ARRIVED:case kn.STATISTICS_INFO:this._emitter.emit(qe.msg,Xe);break;case kn.IO_ERROR:case kn.DEMUX_ERROR:this._emitter.emit(qe.msg,Xe.type,Xe.info);break;case kn.RECOMMEND_SEEKPOINT:this._emitter.emit(qe.msg,Xe);break;case"logcat_callback":Le.emitter.emit("log",Xe.type,Xe.logcat);break;default:break}}}var ir=Qi,er={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};class Mr{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 qt}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 Xe=this._pendingSegments[qe];Xe.splice(0,Xe.length),this._pendingSegments[qe]=null,this._pendingRemoveRanges[qe]=null,this._lastInitSegments[qe]=null;let wt=this._sourceBuffers[qe];if(wt){if(Ke.readyState!=="closed"){try{Ke.removeSourceBuffer(wt)}catch(At){Le.e(this.TAG,At.message)}wt.removeEventListener("error",this.e.onSourceBufferError),wt.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 Xe=Ke,wt=`${Xe.container}`;Xe.codec&&Xe.codec.length>0&&(wt+=`;codecs=${Xe.codec}`);let At=!1;if(Le.v(this.TAG,"Received Initialization Segment, mimeType: "+wt),this._lastInitSegments[Xe.type]=Xe,wt!==this._mimeTypes[Xe.type]){if(this._mimeTypes[Xe.type])Le.v(this.TAG,`Notice: ${Xe.type} mimeType changed, origin: ${this._mimeTypes[Xe.type]}, target: ${wt}`);else{At=!0;try{let Nt=this._sourceBuffers[Xe.type]=this._mediaSource.addSourceBuffer(wt);Nt.addEventListener("error",this.e.onSourceBufferError),Nt.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(Nt){Le.e(this.TAG,Nt.message),this._emitter.emit(er.ERROR,{code:Nt.code,msg:Nt.message});return}}this._mimeTypes[Xe.type]=wt}qe||this._pendingSegments[Xe.type].push(Xe),At||this._sourceBuffers[Xe.type]&&!this._sourceBuffers[Xe.type].updating&&this._doAppendSegments(),ie.safari&&Xe.container==="audio/mpeg"&&Xe.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=Xe.mediaDuration/1e3,this._updateMediaSourceDuration())}appendMediaSegment(Ke){let qe=Ke;this._pendingSegments[qe.type].push(qe),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();let Xe=this._sourceBuffers[qe.type];Xe&&!Xe.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}seek(Ke){for(let qe in this._sourceBuffers){if(!this._sourceBuffers[qe])continue;let Xe=this._sourceBuffers[qe];if(this._mediaSource.readyState==="open")try{Xe.abort()}catch(At){Le.e(this.TAG,At.message)}this._idrList.clear();let wt=this._pendingSegments[qe];if(wt.splice(0,wt.length),this._mediaSource.readyState!=="closed"){for(let At=0;At<Xe.buffered.length;At++){let Nt=Xe.buffered.start(At),bt=Xe.buffered.end(At);this._pendingRemoveRanges[qe].push({start:Nt,end:bt})}if(Xe.updating||this._doRemoveRanges(),ie.safari){let At=this._lastInitSegments[qe];At&&(this._pendingSegments[qe].push(At),Xe.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 Xe=this._sourceBuffers[qe];if(Xe){let wt=Xe.buffered;if(wt.length>=1&&Ke-wt.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}_doCleanupSourceBuffer(){let Ke=this._mediaElement.currentTime;for(let qe in this._sourceBuffers){let Xe=this._sourceBuffers[qe];if(Xe){let wt=Xe.buffered,At=!1;for(let Nt=0;Nt<wt.length;Nt++){let bt=wt.start(Nt),gn=wt.end(Nt);if(bt<=Ke&&Ke<gn+3){if(Ke-bt>=this._config.autoCleanupMaxBackwardDuration){At=!0;let En=Ke-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[qe].push({start:bt,end:En})}}else gn<Ke&&(At=!0,this._pendingRemoveRanges[qe].push({start:bt,end:gn}))}At&&!Xe.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,Xe=this._pendingMediaDuration;Xe>0&&(isNaN(qe)||Xe>qe)&&(Le.v(this.TAG,`Update MediaSource duration from ${qe} to ${Xe}`),this._mediaSource.duration=Xe),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],Xe=this._pendingRemoveRanges[Ke];for(;Xe.length&&!qe.updating;){let wt=Xe.shift();qe.remove(wt.start,wt.end)}}}_doAppendSegments(){let Ke=this._pendingSegments;for(let qe in Ke)if(!(!this._sourceBuffers[qe]||this._sourceBuffers[qe].updating)&&Ke[qe].length>0){let Xe=Ke[qe].shift();if(Xe.timestampOffset){let wt=this._sourceBuffers[qe].timestampOffset,At=Xe.timestampOffset/1e3;Math.abs(wt-At)>.1&&(Le.v(this.TAG,`Update MPEG audio timestampOffset from ${wt} to ${At}`),this._sourceBuffers[qe].timestampOffset=At),delete Xe.timestampOffset}if(!Xe.data||Xe.data.byteLength===0)continue;try{this._sourceBuffers[qe].appendBuffer(Xe.data),this._isBufferFull=!1,qe==="video"&&Xe.hasOwnProperty("info")&&this._idrList.appendArray(Xe.info.syncPoints)}catch(wt){this._pendingSegments[qe].unshift(Xe),wt.code===22?(this._isBufferFull||this._emitter.emit(er.BUFFER_FULL),this._isBufferFull=!0):(Le.e(this.TAG,wt.message),this._emitter.emit(er.ERROR,{code:wt.code,msg:wt.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(er.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(er.UPDATE_END)}_onSourceBufferError(Ke){Le.e(this.TAG,`SourceBuffer Error: ${Ke}`)}}var qr=Mr;const di={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},xr={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:yt.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:yt.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:yt.CODEC_UNSUPPORTED};class zi{constructor(Ke,qe){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(ke()),this._config=jt(),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 Xe=ie.chrome&&(ie.version.major<50||ie.version.major===50&&ie.version.build<2661);this._alwaysSeekKeyframe=!!(Xe||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 qr(this._config),this._msectl.on(er.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(er.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(er.SOURCE_OPEN,()=>{this._mseSourceOpened=!0,this._hasPendingLoad&&(this._hasPendingLoad=!1,this.load())}),this._msectl.on(er.ERROR,qe=>{this._emitter.emit(mt.ERROR,di.MEDIA_ERROR,xr.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(kn.INIT_SEGMENT,(Ke,qe)=>{this._msectl.appendInitSegment(qe)}),this._transmuxer.on(kn.MEDIA_SEGMENT,(Ke,qe)=>{if(this._msectl.appendMediaSegment(qe),this._config.lazyLoad&&!this._config.isLive){let Xe=this._mediaElement.currentTime;qe.info.endDts>=(Xe+this._config.lazyLoadMaxDuration)*1e3&&this._progressChecker==null&&(Le.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}),this._transmuxer.on(kn.LOADING_COMPLETE,()=>{this._msectl.endOfStream(),this._emitter.emit(mt.LOADING_COMPLETE)}),this._transmuxer.on(kn.RECOVERED_EARLY_EOF,()=>{this._emitter.emit(mt.RECOVERED_EARLY_EOF)}),this._transmuxer.on(kn.IO_ERROR,(Ke,qe)=>{this._emitter.emit(mt.ERROR,di.NETWORK_ERROR,Ke,qe)}),this._transmuxer.on(kn.DEMUX_ERROR,(Ke,qe)=>{this._emitter.emit(mt.ERROR,di.MEDIA_ERROR,Ke,{code:-1,msg:qe})}),this._transmuxer.on(kn.MEDIA_INFO,Ke=>{this._mediaInfo=Ke,this._emitter.emit(mt.MEDIA_INFO,Object.assign({},Ke))}),this._transmuxer.on(kn.METADATA_ARRIVED,Ke=>{this._emitter.emit(mt.METADATA_ARRIVED,Ke)}),this._transmuxer.on(kn.SCRIPTDATA_ARRIVED,Ke=>{this._emitter.emit(mt.SCRIPTDATA_ARRIVED,Ke)}),this._transmuxer.on(kn.STATISTICS_INFO,Ke=>{this._statisticsInfo=this._fillStatisticsInfo(Ke),this._emitter.emit(mt.STATISTICS_INFO,Object.assign({},this._statisticsInfo))}),this._transmuxer.on(kn.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,Xe=0,wt=0;if(this._mediaElement.getVideoPlaybackQuality){let At=this._mediaElement.getVideoPlaybackQuality();Xe=At.totalVideoFrames,wt=At.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(Xe=this._mediaElement.webkitDecodedFrameCount,wt=this._mediaElement.webkitDroppedFrameCount):qe=!1;return qe&&(Ke.decodedFrames=Xe,Ke.droppedFrames=wt),Ke}_onmseUpdateEnd(){if(!this._config.lazyLoad||this._config.isLive)return;let Ke=this._mediaElement.buffered,qe=this._mediaElement.currentTime,Xe=0,wt=0;for(let At=0;At<Ke.length;At++){let Nt=Ke.start(At),bt=Ke.end(At);if(Nt<=qe&&qe<bt){Xe=Nt,wt=bt;break}}wt>=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,Xe=!1;for(let wt=0;wt<qe.length;wt++){let At=qe.start(wt),Nt=qe.end(wt);if(Ke>=At&&Ke<Nt){Ke>=Nt-this._config.lazyLoadRecoverDuration&&(Xe=!0);break}}Xe&&(window.clearInterval(this._progressChecker),this._progressChecker=null,Xe&&(Le.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}_isTimepointBuffered(Ke){let qe=this._mediaElement.buffered;for(let Xe=0;Xe<qe.length;Xe++){let wt=qe.start(Xe),At=qe.end(Xe);if(Ke>=wt&&Ke<At)return!0}return!1}_internalSeek(Ke){let qe=this._isTimepointBuffered(Ke),Xe=!1,wt=0;if(Ke<1&&this._mediaElement.buffered.length>0){let At=this._mediaElement.buffered.start(0);(At<1&&Ke<At||ie.safari)&&(Xe=!0,wt=ie.safari?.1:At)}if(Xe)this._requestSetTime=!0,this._mediaElement.currentTime=wt;else if(qe){if(!this._alwaysSeekKeyframe)this._requestSetTime=!0,this._mediaElement.currentTime=Ke;else{let At=this._msectl.getNearestKeyframe(Math.floor(Ke*1e3));this._requestSetTime=!0,At!=null?this._mediaElement.currentTime=At.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 Xe=qe.buffered;Xe.length>0&&qe.currentTime<Xe.start(0)&&(Le.w(this.TAG,`Playback seems stuck at ${qe.currentTime}, seek to ${Xe.start(0)}`),this._requestSetTime=!0,this._mediaElement.currentTime=Xe.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,Xe=this._mediaElement.buffered;if(this._requestSetTime){this._requestSetTime=!1;return}if(qe<1&&Xe.length>0){let wt=Xe.start(0);if(wt<1&&qe<wt||ie.safari){this._requestSetTime=!0,this._mediaElement.currentTime=ie.safari?.1:wt;return}}if(this._isTimepointBuffered(qe)){if(this._alwaysSeekKeyframe){let wt=this._msectl.getNearestKeyframe(Math.floor(qe*1e3));wt!=null&&(this._requestSetTime=!0,this._mediaElement.currentTime=wt.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 rt=zi;class zr{constructor(Ke,qe){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new(ke()),this._config=jt(),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,Xe=0,wt=0;if(this._mediaElement.getVideoPlaybackQuality){let At=this._mediaElement.getVideoPlaybackQuality();Xe=At.totalVideoFrames,wt=At.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(Xe=this._mediaElement.webkitDecodedFrameCount,wt=this._mediaElement.webkitDroppedFrameCount):qe=!1;return qe&&(Ke.decodedFrames=Xe,Ke.droppedFrames=wt),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 hr=zr;me.install();function vo(ln,Ke){let qe=ln;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 rt(qe,Ke);default:return new hr(qe,Ke)}}function co(){return et.supportMSEH264Playback()}function yo(){return et.getFeatureList()}let eo={};eo.createPlayer=vo,eo.isSupported=co,eo.getFeatureList=yo,eo.BaseLoader=z,eo.LoaderStatus=de,eo.LoaderErrors=ce,eo.Events=mt,eo.ErrorTypes=di,eo.ErrorDetails=xr,eo.FlvPlayer=rt,eo.NativePlayer=hr,eo.LoggingControl=gt,Object.defineProperty(eo,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var lo=eo},93125:function(Ln,tn,Ee){(function(Me){if(1)window.OSS=Me(),Ln.exports=Me();else var me})(function(){var Me;return function(){function me(Be,ke,Pe){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,Pe)}return ke[xe].exports}for(var he=void 0,Se=0;Se<Pe.length;Se++)Le(Pe[Se]);return Le}return me}()({1:[function(me,Be,ke){"use strict";var Pe=me("./browser/client");Pe.Buffer=me("buffer").Buffer,Pe.co=me("co"),Pe.urllib=me("../shims/xhr"),Pe.version=me("./browser/version").version,Be.exports=Pe},{"../shims/xhr":244,"./browser/client":2,"./browser/version":5,buffer:38,co:41}],2:[function(me,Be,ke){(function(Pe,Le){"use strict";function he(et){return et&&et.__esModule?et:{default:et}}function Se(et,ut){return et[ut]||et[ut.toLowerCase()]}function xe(et,ut){var mt=ze.parse(et);if(!mt.protocol){var _t=ut?"https://":"http://";mt=ze.parse(_t+et)}if(mt.protocol!=="http:"&&mt.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return mt}function ge(et,ut,mt){var _t=mt?"https://":"http://",gt=ut?"-internal.aliyuncs.com":".aliyuncs.com";return et.substr(0,14)==="vpc100-oss-cn-"&&(gt=".aliyuncs.com"),ze.parse(_t+et+gt)}function le(){return document&&document.location&&document.location.protocol==="https:"}function ve(et,ut){if(!(this instanceof ve))return new ve(et,ut);et&&et.inited?this.options=et:this.options=ve.initOptions(et),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=ft,this.agent=this.options.agent||jt),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"),ye=me("mime"),we=me("xml2js"),be=me("humanize-ms"),Ae=me("agentkeepalive"),De=me("merge-descriptors"),ze=me("url"),Ze=me("is-type-of"),Ye=me("platform"),Ge=me("utility"),ft=me("urllib"),at=me("./version"),Pt=me("dateformat"),tt=me("bowser"),vt=me("../common/signUtils"),st=me("../common/utils"),jt=new Ae;Be.exports=ve,ve.initOptions=function(et){if(!et||!et.accessKeyId||!et.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)(et).forEach(function(_t){et[_t]!==void 0&&(mt[_t]=et[_t])}),mt.accessKeyId=mt.accessKeyId.trim(),mt.accessKeySecret=mt.accessKeySecret.trim(),mt.timeout&&(mt.timeout=be(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(et){return oe("authorization stringToSign: %s",et),vt.computeSignature(this.options.accessKeySecret,et)},lt.authorization=function(et,ut,mt,_t){var gt=vt.buildCanonicalString(et.toUpperCase(),ut,{headers:_t,parameters:mt});return vt.authorization(this.options.accessKeyId,this.options.accessKeySecret,gt)},lt.createRequest=function(et){var ut={"x-oss-date":Pt(+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(et.headers).to(ut),Se(ut,"Content-Type")||(et.mime===ye.default_type&&(et.mime=""),et.mime&&et.mime.indexOf("/")>0?ut["Content-Type"]=et.mime:ut["Content-Type"]=ye.getType(et.mime||se.extname(et.object||""))||"application/octet-stream"),et.content&&(ut["Content-Md5"]=ie.createHash("md5").update(new Le(et.content,"utf8")).digest("base64"),ut["Content-Length"]||(ut["Content-Length"]=et.content.length));var mt=this._getResource(et);ut.authorization=this.authorization(et.method,mt,et.subres,ut);var _t=this._getReqUrl(et);oe("request %s %s, with headers %j, !!stream: %s",et.method,_t,ut,!!et.stream);var gt=et.timeout||this.options.timeout;return{url:_t,params:{agent:this.agent,method:et.method,content:et.content,stream:et.stream,headers:ut,timeout:gt,writeStream:et.writeStream,customResponse:et.customResponse,ctx:et.ctx||this.ctx}}},lt.request=ce.default.mark(function et(ut){var mt,_t,gt,Bt;return ce.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return mt=this.createRequest(ut),_t=void 0,gt=void 0,Ht.prev=3,Ht.next=6,this.urllib.request(mt.url,mt.params);case 6:_t=Ht.sent,oe("response %s %s, got %s, headers: %j",ut.method,mt.url,_t.status,_t.headers),Ht.next=13;break;case 10:Ht.prev=10,Ht.t0=Ht.catch(3),gt=Ht.t0;case 13:if(Bt=void 0,!_t||!ut.successStatuses||ut.successStatuses.indexOf(_t.status)!==-1){Ht.next=26;break}return Ht.next=17,this.requestError(_t);case 17:if(Bt=Ht.sent,Bt.code!=="RequestTimeTooSkewed"){Ht.next=23;break}return this.options.amendTimeSkewed=+new Date(Bt.serverTime)-new Date,Ht.next=22,this.request(ut);case 22:return Ht.abrupt("return",Ht.sent);case 23:Bt.params=ut,Ht.next=30;break;case 26:if(!gt){Ht.next=30;break}return Ht.next=29,this.requestError(gt);case 29:Bt=Ht.sent;case 30:if(!Bt){Ht.next=32;break}throw Bt;case 32:if(!ut.xmlResponse){Ht.next=36;break}return Ht.next=35,this.parseXML(_t.data);case 35:_t.data=Ht.sent;case 36:return Ht.abrupt("return",_t);case 37:case"end":return Ht.stop()}},et,this,[[3,10]])}),lt._getResource=function(et){var ut="/";return et.bucket&&(ut+=et.bucket+"/"),et.object&&(ut+=et.object),ut},lt._isIP=function(et){return st._isIP(et)},lt._escape=function(et){return Ge.encodeURIComponent(et).replace(/%2F/g,"/")},lt._getReqUrl=function(et){var ut={};ue(this.options.endpoint).to(ut);var mt=this._isIP(ut.hostname),_t=this.options.cname;!et.bucket||_t||mt||(ut.host=et.bucket+"."+ut.host);var gt="/";et.bucket&&mt&&(gt+=et.bucket+"/"),et.object&&(gt+=this._escape(et.object).replace(/\+/g,"%2B")),ut.pathname=gt;var Bt={};if(et.query&&De(Bt,et.query),et.subres){var Ht={};Ze.string(et.subres)?Ht[et.subres]="":Ze.array(et.subres)?et.subres.forEach(function(hn){Ht[hn]=""}):Ht=et.subres,De(Bt,Ht)}return ut.query=Bt,ze.format(ut)},lt._getUserAgent=function(){var et=Pe&&Pe.browser?"js":"nodejs",ut="aliyun-sdk-"+et+"/"+at.version,mt=Ye.description;return!mt&&Pe&&(mt="Node.js "+Pe.version.slice(1)+" on "+Pe.platform+" "+Pe.arch),this._checkUserAgent(ut+" "+mt)},lt._checkUserAgent=function(et){return et.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},lt.checkBrowserAndVersion=function(et,ut){return tt.name===et&&tt.version.split(".")[0]===ut},lt.parseXML=function(et){return function(ut){Le.isBuffer(et)&&(et=et.toString()),we.parseString(et,{explicitRoot:!1,explicitArray:!1},ut)}},lt.requestError=ce.default.mark(function et(ut){var mt,_t,gt,Bt;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 _t=String(ut.data),oe("request response error data: %s",_t),gt=void 0,Ht.prev=8,Ht.next=11,this.parseXML(_t)||{};case 11:gt=Ht.sent,Ht.next=21;break;case 14:return Ht.prev=14,Ht.t0=Ht.catch(8),oe(_t),Ht.t0.message+=`
|
|
|
raw xml: `+_t,Ht.t0.status=ut.status,Ht.t0.requestId=ut.headers["x-oss-request-id"],Ht.abrupt("return",Ht.t0);case 21:Bt=gt.Message||"unknow request error, status: "+ut.status,gt.Condition&&(Bt+=" (condition: "+gt.Condition+")"),mt=new Error(Bt),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()}},et,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(Pe){"use strict";function Le(ue){return ue&&ue.__esModule?ue:{default:ue}}function he(ue,ye){if(!(this instanceof he))return new he(ue,ye);se.call(this,ye),this.file=ue,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}var Se=me("babel-runtime/core-js/array/from"),xe=Le(Se),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(ye,we,be){var Ae,De,ze,Ze,Ye,Ge,ft,at,Pt;return le.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:if(this.resetCancelFlag(),be=be||{},!be.checkpoint||!be.checkpoint.uploadId){tt.next=6;break}return tt.next=5,this._resumeMultipart(be.checkpoint,be);case 5:return tt.abrupt("return",tt.sent);case 6:return Ae=102400,be.mime||(ve.file(we)?be.mime=z.getType(ce.extname(we.name)):ve.blob(we)?be.mime=we.type:be.mime=z.getType(ce.extname(we))),be.headers=be.headers||{},this._convertMetaToHeaders(be.meta,be.headers),tt.next=12,this._getFileSize(we);case 12:if(!((De=tt.sent)<Ae)){tt.next=25;break}return ze=this._createStream(we,0,De),be.contentLength=De,tt.next=18,this.putStream(ye,ze,be);case 18:if(Ze=tt.sent,!be||!be.progress){tt.next=22;break}return tt.next=22,be.progress(1);case 22:return Ye={res:Ze.res,bucket:this.options.bucket,name:ye,etag:Ze.res.headers.etag},(be.headers&&be.headers["x-oss-callback"]||be.callback)&&(Ye.data=Ze.data),tt.abrupt("return",Ye);case 25:if(!(be.partSize&&be.partSize<Ae)){tt.next=27;break}throw new Error("partSize must not be smaller than "+Ae);case 27:return tt.next=29,this.initMultipartUpload(ye,be);case 29:if(Ge=tt.sent,ft=Ge.uploadId,at=this._getPartSize(De,be.partSize),Pt={file:we,name:ye,fileSize:De,partSize:at,uploadId:ft,doneParts:[]},!be||!be.progress){tt.next=36;break}return tt.next=36,be.progress(0,Pt,Ge.res);case 36:return tt.next=38,this._resumeMultipart(Pt,be);case 38:return tt.abrupt("return",tt.sent);case 39:case"end":return tt.stop()}},ue,this)}),oe._resumeMultipart=le.default.mark(function ue(ye,we){var be,Ae,De,ze,Ze,Ye,Ge,ft,at,Pt,tt,vt,st,jt,lt,et,ut,mt,_t,gt,Bt;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(be=ye.file,Ae=ye.fileSize,De=ye.partSize,ze=ye.uploadId,Ze=ye.doneParts,Ye=ye.name,Ge=[],Ze.length>0&&ee(Ze).to(Ge),ft=this._divideParts(Ae,De),at=ft.length,Pt=!1,tt=le.default.mark(function hn(Qt,bn){var Wt,Kt,Jt;return le.default.wrap(function(dn){for(;;)switch(dn.prev=dn.next){case 0:if(Qt.isCancel()){dn.next=21;break}return dn.prev=1,Wt=ft[bn-1],Kt={stream:Qt._createStream(be,Wt.start,Wt.end),size:Wt.end-Wt.start},dn.next=6,Qt._uploadPart(Ye,ze,bn,Kt);case 6:if(Jt=dn.sent,Qt.isCancel()||Pt){dn.next=13;break}if(ye.doneParts.push({number:bn,etag:Jt.res.headers.etag}),Ge.push({number:bn,etag:Jt.res.headers.etag}),!we||!we.progress){dn.next=13;break}return dn.next=13,we.progress(Ze.length/at,ye,Jt.res);case 13:dn.next=21;break;case 15:if(dn.prev=15,dn.t0=dn.catch(1),Qt.isCancel()){dn.next=21;break}throw Qt.cancel(),dn.t0.partNum=bn,dn.t0;case 21:case"end":return dn.stop()}},hn,this,[[1,15]])}),vt=(0,xe.default)(new Array(at),function(hn,Qt){return Qt+1}),st=Ge.map(function(hn){return hn.number}),jt=vt.filter(function(hn){return st.indexOf(hn)<0}),lt=5,et=we.parallel||lt,!this.checkBrowserAndVersion("Internet Explorer","10")&&et!==1){Ht.next=26;break}ut=0;case 16:if(!(ut<jt.length)){Ht.next=24;break}if(!this.isCancel()){Ht.next=19;break}throw this._makeCancelEvent();case 19:return Ht.next=21,tt(this,jt[ut]);case 21:ut++,Ht.next=16;break;case 24:Ht.next=40;break;case 26:for(mt=[],_t=0;_t<jt.length;_t++)mt.push(tt(this,jt[_t]));return Ht.next=30,this._thunkPool(mt,et);case 30:if(gt=Ht.sent,Pt=!0,!(gt&>.length>0)){Ht.next=37;break}throw this.resetCancelFlag(),Bt=gt[0],Bt.message="Failed to upload some parts with error: "+Bt.toString()+" part_num: "+Bt.partNum,Bt;case 37:if(!this.isCancel()){Ht.next=40;break}throw mt=null,this._makeCancelEvent();case 40:return Ht.next=42,this.completeMultipartUpload(Ye,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(ye){var we;return le.default.wrap(function(be){for(;;)switch(be.prev=be.next){case 0:if(!ve.buffer(ye)){be.next=4;break}return be.abrupt("return",ye.length);case 4:if(!ve.blob(ye)&&!ve.file(ye)){be.next=6;break}return be.abrupt("return",ye.size);case 6:if(!ve.string(ye)){be.next=11;break}return be.next=9,this._statFile(ye);case 9:return we=be.sent,be.abrupt("return",we.size);case 11:throw new Error("_getFileSize requires Buffer/File/String.");case 12:case"end":return be.stop()}},ue,this)});var ie=me("stream"),se=ie.Readable;de.inherits(he,se),he.prototype.readFileAndPush=function(ue){if(this.fileBuffer)for(var ye=!0;ye&&this.fileBuffer&&this.start<this.fileBuffer.length;){var we=this.start,be=we+ue;be=be>this.fileBuffer.length?this.fileBuffer.length:be,this.start=be,ye=this.push(this.fileBuffer.slice(we,be))}},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 ye=this;this.reader.onload=function(we){ye.fileBuffer=new Pe(new Uint8Array(we.target.result)),ye.file=null,ye.readFileAndPush(ue)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(ue)},oe._createStream=function(ue,ye,we){if(ve.blob(ue)||ve.file(ue))return new he(ue.slice(ye,we));throw new Error("_createStream requires File/String.")},oe._getPartSize=function(ue,ye){return ye?Math.max(Math.ceil(ue/1e4),ye):1048576},oe._divideParts=function(ue,ye){for(var we=Math.ceil(ue/ye),be=[],Ae=0;Ae<we;Ae++){var De=ye*Ae,ze=Math.min(De+ye,ue);be.push({start:De,end:ze})}return be},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 Pe(ye){return ye&&ye.__esModule?ye:{default:ye}}var Le=me("babel-runtime/core-js/object/keys"),he=Pe(Le),Se=me("babel-runtime/regenerator"),xe=Pe(Se),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 ye(we,be,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,be,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()}},ye,this)}),ue.put=xe.default.mark(function ye(we,be,Ae){var De,ze,Ze,Ye,Ge,ft;return xe.default.wrap(function(at){for(;;)switch(at.prev=at.next){case 0:if(De=void 0,Ae=Ae||{},!de.buffer(be)){at.next=6;break}De=be,at.next=18;break;case 6:if(!de.blob(be)&&!de.file(be)){at.next=17;break}return Ae.mime||(de.file(be)?Ae.mime=oe.getType(ee.extname(be.name)):Ae.mime=be.type),ze=this._createStream(be,0,be.size),at.next=11,this._getFileSize(be);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",Ye=this._objectRequestParams(Ze,we,Ae),ie.encodeCallback(Ye,Ae),Ye.mime=Ae.mime,Ye.content=De,Ye.successStatuses=[200],at.next=28,this.request(Ye);case 28:return Ge=at.sent,ft={name:we,url:this._objectUrl(we),res:Ge.res},Ye.headers&&Ye.headers["x-oss-callback"]&&(ft.data=JSON.parse(Ge.data.toString())),at.abrupt("return",ft);case 32:case"end":return at.stop()}},ye,this)}),ue.putStream=xe.default.mark(function ye(we,be,Ae){var De,ze,Ze,Ye;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=be,ze.successStatuses=[200],Ge.next=12,this.request(ze);case 12:return Ze=Ge.sent,Ye={name:we,url:this._objectUrl(we),res:Ze.res},ze.headers&&ze.headers["x-oss-callback"]&&(Ye.data=JSON.parse(Ze.data.toString())),Ge.abrupt("return",Ye);case 16:case"end":return Ge.stop()}},ye,this)}),ue.head=xe.default.mark(function ye(we,be){var Ae,De,ze;return xe.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:return Ae=this._objectRequestParams("HEAD",we,be),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(Ye){Ye.indexOf("x-oss-meta-")===0&&(ze.meta||(ze.meta={}),ze.meta[Ye.substring(11)]=De.headers[Ye])}),Ze.abrupt("return",ze);case 8:case"end":return Ze.stop()}},ye,this)}),ue.get=xe.default.mark(function ye(we,be,Ae){var De,ze,Ze,Ye;return xe.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:return De=null,ze=!1,de.writableStream(be)?De=be:de.string(be)?(De=ve.createWriteStream(be),ze=!0):Ae=be,Ae=Ae||{},Ae.process&&(Ae.subres=Ae.subres||{},Ae.subres["x-oss-process"]=Ae.process),Ze=void 0,Ge.prev=6,Ye=this._objectRequestParams("GET",we,Ae),Ye.writeStream=De,Ye.successStatuses=[200,206,304],Ge.next=12,this.request(Ye);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,be),Ge.next=23,this._deleteFileSafe(be);case 23:throw Ge.t0;case 24:return Ge.abrupt("return",{res:Ze.res,content:Ze.data});case 25:case"end":return Ge.stop()}},ye,this,[[6,16]])}),ue.getStream=xe.default.mark(function ye(we,be){var Ae,De;return xe.default.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return be=be||{},Ae=this._objectRequestParams("GET",we,be),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()}},ye,this)}),ue.delete=xe.default.mark(function ye(we,be){var Ae,De;return xe.default.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return Ae=this._objectRequestParams("DELETE",we,be),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()}},ye,this)}),ue.deleteMulti=xe.default.mark(function ye(we,be){var Ae,De,ze,Ze,Ye,Ge;return xe.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:for(be=be||{},Ae=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<Delete>
|
|
|
`,be.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),be.subres="delete",ze=this._objectRequestParams("POST","",be),ze.mime="xml",ze.content=Ae,ze.xmlResponse=!0,ze.successStatuses=[200],ft.next=14,this.request(ze);case 14:return Ze=ft.sent,Ye=Ze.data,Ge=Ye&&Ye.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()}},ye,this)}),ue.copy=xe.default.mark(function ye(we,be,Ae){var De,ze,Ze;return xe.default.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.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),be=be[0]!=="/"?"/"+this.options.bucket+"/"+encodeURIComponent(be):"/"+encodeURIComponent(be.slice(1)),Ae.headers["x-oss-copy-source"]=be,De=this._objectRequestParams("PUT",we,Ae),De.xmlResponse=!0,De.successStatuses=[200,304],Ye.next=12,this.request(De);case 12:return ze=Ye.sent,Ze=ze.data,Ze&&(Ze={etag:Ze.ETag,lastModified:Ze.LastModified}),Ye.abrupt("return",{data:Ze,res:ze.res});case 16:case"end":return Ye.stop()}},ye,this)}),ue.putMeta=xe.default.mark(function ye(we,be,Ae){return xe.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return De.next=2,this.copy(we,we,{meta:be||{},timeout:Ae&&Ae.timeout,ctx:Ae&&Ae.ctx});case 2:return De.abrupt("return",De.sent);case 3:case"end":return De.stop()}},ye,this)}),ue.list=xe.default.mark(function ye(we,be){var Ae,De,ze,Ze,Ye;return xe.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:return Ae=this._objectRequestParams("GET","",be),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}}})),Ye=De.data.CommonPrefixes||null,Ye&&(Array.isArray(Ye)||(Ye=[Ye]),Ye=Ye.map(function(ft){return ft.Prefix})),Ge.abrupt("return",{res:De.res,objects:ze,prefixes:Ye,nextMarker:De.data.NextMarker||null,isTruncated:De.data.IsTruncated==="true"});case 13:case"end":return Ge.stop()}},ye,this)}),ue.putACL=xe.default.mark(function ye(we,be,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"]=be,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()}},ye,this)}),ue.getACL=xe.default.mark(function ye(we,be){var Ae,De;return xe.default.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return be=be||{},be.subres="acl",we=this._objectName(we),Ae=this._objectRequestParams("GET",we,be),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()}},ye,this)}),ue.restore=xe.default.mark(function ye(we,be){var Ae,De;return xe.default.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return be=be||{},be.subres="restore",Ae=this._objectRequestParams("POST",we,be),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()}},ye,this)}),ue.signatureUrl=function(ye,we){we=we||{},ye=this._objectName(ye),we.method=we.method||"GET";var be=le.timestamp()+(we.expires||1800),Ae={bucket:this.options.bucket,object:ye},De=this._getResource(Ae);this.options.stsToken&&(we["security-token"]=this.options.stsToken);var ze=se._signatureForURL(this.options.accessKeySecret,we,De,be),Ze=ce.parse(this._getReqUrl(Ae));return Ze.query={OSSAccessKeyId:this.options.accessKeyId,Expires:be,Signature:ze.Signature},z(ze.subResource).to(Ze.query),Ze.format()},ue.getObjectUrl=function(ye,we){return we?we[we.length-1]!=="/"&&(we+="/"):we=this.options.endpoint.format(),we+this._escape(this._objectName(ye))},ue._objectUrl=function(ye){return this._getReqUrl({bucket:this.options.bucket,object:ye})},ue.generateObjectUrl=function(ye,we){if(we)we[we.length-1]!=="/"&&(we+="/");else{we=this.options.endpoint.format();var be=ce.parse(we),Ae=this.options.bucket;be.hostname=Ae+"."+be.hostname,be.host=Ae+"."+be.host,we=be.format()}return we+this._escape(this._objectName(ye))},ue._objectRequestParams=function(ye,we,be){if(!this.options.bucket)throw new Error("Please create a bucket first");be=be||{},we=this._objectName(we);var Ae={object:we,bucket:this.options.bucket,method:ye,subres:be&&be.subres,timeout:be&&be.timeout,ctx:be&&be.ctx};return be.headers&&(Ae.headers={},z(be.headers).to(Ae.headers)),Ae},ue._objectName=function(ye){return ye.replace(/^\/+/,"")},ue._statFile=function(ye){return function(we){ve.stat(ye,we)}},ue._convertMetaToHeaders=function(ye,we){ye&&(0,he.default)(ye).forEach(function(be){we["x-oss-meta-"+be]=ye[be]})},ue._deleteFileSafe=function(ye){return function(we){ve.exists(ye,function(be){be?ve.unlink(ye,function(Ae){Ae&&ge("unlink %j error: %s",ye,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 Pe(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 Se(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(ye){he(ie[ye])?this[ye]=ce.wrap(ie[ye]).bind(ie):this[ye]=ie[ye]},this)}function xe(ee){if(!(this instanceof xe))return new xe(ee);Se.call(this,z,ee)}var ge=me("babel-runtime/core-js/object/get-prototype-of"),le=Pe(ge),ve=me("babel-runtime/core-js/object/keys"),de=Pe(ve),ce=me("co"),z=me("./client");Be.exports=xe,xe.STS=function ee(oe){if(!(this instanceof ee))return new ee(oe);Se.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(Pe){"use strict";function Le(le){return le&&le.__esModule?le:{default:le}}var he=me("babel-runtime/core-js/object/keys"),Se=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 Pe((0,ge.default)(de)).toString("base64");if(le.headers["x-oss-callback"]=ce,ve.callback.customValue){var z={};(0,Se.default)(ve.callback.customValue).forEach(function(ee){z["x:"+ee]=ve.callback.customValue[ee]}),le.headers["x-oss-callback-var"]=new Pe((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 Pe=me("babel-runtime/regenerator"),Le=function(ge){return ge&&ge.__esModule?ge:{default:ge}}(Pe),he=me("copy-to"),Se=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,ye,we;return Le.default.wrap(function(be){for(;;)switch(be.prev=be.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),Se.encodeCallback(ue,se),ue.mime="xml",ue.content=ee,ue.headers&&ue.headers["x-oss-callback"]||(ue.xmlResponse=!0),ue.successStatuses=[200],be.next=16,this.request(ue);case 16:return ye=be.sent,we={res:ye.res,bucket:ue.bucket,name:le,etag:ye.res.headers.etag},ue.headers&&ue.headers["x-oss-callback"]&&(we.data=JSON.parse(ye.data.toString())),be.abrupt("return",we);case 20:case"end":return be.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(Pe){"use strict";function Le(de){return de&&de.__esModule?de:{default:de}}var he=me("babel-runtime/core-js/json/stringify"),Se=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(ye){var we=ye.toLowerCase();we.indexOf("x-oss-")===0&&(se[we]=String(oe[ye]).trim())}),(0,ge.default)(se).sort().forEach(function(ye){ie.push(ye+":"+se[ye])}),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 Pe(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 be="response-"+we.toLowerCase();ie[be]=ce.response[we]}),(0,ge.default)(ce).forEach(function(we){var be=we.toLowerCase(),Ae=ce[we];be.indexOf("x-oss-")===0?oe[be]=Ae:be.indexOf("content-md5")===0||be.indexOf("content-type")===0?oe[we]=Ae:be!=="expires"&&be!=="response"&&be!=="process"&&be!=="method"&&(ie[be]=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 Pe((0,Se.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 Pe((0,Se.default)(ue)).toString("base64")}}var ye=this.buildCanonicalString(ce.method,z,{headers:oe,parameters:ie},ee.toString());return{Signature:this.computeSignature(de,ye),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 Pe=me("babel-runtime/regenerator"),Le=function(le){return le&&le.__esModule?le:{default:le}}(Pe),he=me("co"),Se=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,be.next();case 4:return ze=Ze.sent,Ze.next=7,ze();case 7:Ze.next=1;break;case 9:Ae+=1,Ae===ie&&(be.fns=[],be.buffer=[],se(oe));case 11:case"end":return Ze.stop()}},we,this)}function ye(ze){console.error(ze.stack)}for(var we=Le.default.mark(ue),be=new Se,Ae=0,De=0;De<ie;De++)he(ue).catch(ye);return function(ze,Ze){return function(Ye){be.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=Ye,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),Ye(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()}},ye,this)}function ue(Ae){oe.push(Ae),de(le,ie)}for(var ye=Le.default.mark(se),we=new ce(ve,ie),be=0;be<le.length;be++)he(se(be)).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(Pe){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(Pe)||he.test(Pe)}},{}],12:[function(me,Be,ke){function Pe(){}Be.exports=Pe,Be.exports.HttpsAgent=Pe},{}],13:[function(me,Be,ke){Be.exports=me("./register")().Promise},{"./register":15}],14:[function(me,Be,ke){"use strict";var Pe=null;Be.exports=function(Le,he){return function(Se,xe){Se=Se||null,xe=xe||{};var ge=xe.global!==!1;if(Pe===null&&ge&&(Pe=Le["@@any-promise/REGISTRATION"]||null),Pe!==null&&Se!==null&&Pe.implementation!==Se)throw new Error('any-promise already defined as "'+Pe.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return Pe===null&&(Pe=Se!==null&&xe.Promise!==void 0?{Promise:xe.Promise,implementation:Se}:he(Se),ge&&(Le["@@any-promise/REGISTRATION"]=Pe)),Pe}}},{}],15:[function(me,Be,ke){"use strict";function Pe(){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,Pe)},{"./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(Pe,Le){if(!(Pe instanceof Le))throw new TypeError("Cannot call a class as a function")}},{}],31:[function(me,Be,ke){"use strict";ke.__esModule=!0;var Pe=me("../core-js/object/define-property"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Pe);ke.default=function(){function he(Se,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)(Se,le.key,le)}}return function(Se,xe,ge){return xe&&he(Se.prototype,xe),ge&&he(Se,ge),Se}}()},{"../core-js/object/define-property":20}],32:[function(me,Be,ke){"use strict";function Pe(le){return le&&le.__esModule?le:{default:le}}ke.__esModule=!0;var Le=me("../core-js/symbol/iterator"),he=Pe(Le),Se=me("../core-js/symbol"),xe=Pe(Se),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 Pe(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=Pe(ie),ue=se[0],ye=se[1];return 3*(ue+ye)/4-ye}function he(ie,se,ue){return 3*(se+ue)/4-ue}function Se(ie){for(var se,ue=Pe(ie),ye=ue[0],we=ue[1],be=new ce(he(ie,ye,we)),Ae=0,De=we>0?ye-4:ye,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)],be[Ae++]=se>>16&255,be[Ae++]=se>>8&255,be[Ae++]=255&se;return we===2&&(se=de[ie.charCodeAt(ze)]<<2|de[ie.charCodeAt(ze+1)]>>4,be[Ae++]=255&se),we===1&&(se=de[ie.charCodeAt(ze)]<<10|de[ie.charCodeAt(ze+1)]<<4|de[ie.charCodeAt(ze+2)]>>2,be[Ae++]=se>>8&255,be[Ae++]=255&se),be}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 ye,we=[],be=se;be<ue;be+=3)ye=(ie[be]<<16&16711680)+(ie[be+1]<<8&65280)+(255&ie[be+2]),we.push(xe(ye));return we.join("")}function le(ie){for(var se,ue=ie.length,ye=ue%3,we=[],be=0,Ae=ue-ye;be<Ae;be+=16383)we.push(ge(ie,be,be+16383>Ae?Ae:be+16383));return ye===1?(se=ie[ue-1],we.push(ve[se>>2]+ve[se<<4&63]+"==")):ye===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=Se,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(Pe,Le,he){Be!==void 0&&Be.exports?Be.exports=he():typeof Me=="function"&&Me.amd?Me("bowser",he):Pe.bowser=he()})(this,0,function(){function Pe(de){function ce(et){var ut=de.match(et);return ut&&ut.length>1&&ut[1]||""}function z(et){var ut=de.match(et);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),ye=!ue&&/nexus\s*[0-9]+/i.test(de),we=/CrOS/.test(de),be=/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),Ye=(/SamsungBrowser/i.test(de),!Ze&&/windows/i.test(de)),Ge=!oe&&!be&&/macintosh/i.test(de),ft=!se&&!Ae&&!De&&!ze&&/linux/i.test(de),at=z(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),Pt=ce(/version\/(\d+(\.\d+)?)/i),tt=/tablet/i.test(de)&&!/tablet pc/i.test(de),vt=!tt&&/[^-]mobi/i.test(de),st=/xbox/i.test(de);/opera/i.test(de)?ee={name:"Opera",opera:le,version:Pt||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)||Pt}:/SamsungBrowser/i.test(de)?ee={name:"Samsung Internet for Android",samsungBrowser:le,version:Pt||ce(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(de)?ee={name:"Opera Coast",coast:le,version:Pt||ce(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(de)?ee={name:"Yandex Browser",yandexbrowser:le,version:Pt||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)||Pt}: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")):be?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:Pt||ce(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:ze?(ee={name:"WebOS",osname:"WebOS",webos:le,version:Pt||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)||Pt}:/qupzilla/i.test(de)?ee={name:"QupZilla",qupzilla:le,version:ce(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||Pt}:/chromium/i.test(de)?ee={name:"Chromium",chromium:le,version:ce(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||Pt}:/chrome|crios|crmo/i.test(de)?ee={name:"Chrome",chrome:le,version:ce(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:se?ee={name:"Android",version:Pt}:/safari|applewebkit/i.test(de)?(ee={name:"Safari",safari:le},Pt&&(ee.version=Pt)):oe?(ee={name:oe=="iphone"?"iPhone":oe=="ipad"?"iPad":"iPod"},Pt&&(ee.version=Pt)):ee=/googlebot/i.test(de)?{name:"Googlebot",googlebot:le,version:ce(/googlebot\/(\d+(\.\d+))/i)||Pt}:{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&&Pt&&(ee.version=Pt)):!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"):Ye?(ee.windows=le,ee.osname="Windows"):ft&&(ee.linux=le,ee.osname="Linux"):(ee.android=le,ee.osname="Android");var jt="";ee.windows?jt=function(et){switch(et){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?jt=ce(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):ee.mac?(jt=ce(/Mac OS X (\d+([_\.\s]\d+)*)/i),jt=jt.replace(/[_\s]/g,".")):oe?(jt=ce(/os (\d+([_\s]\d+)*) like mac os x/i),jt=jt.replace(/[_\s]/g,".")):se?jt=ce(/android[ \/-](\d+(\.\d+)*)/i):ee.webos?jt=ce(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):ee.blackberry?jt=ce(/rim\stablet\sos\s(\d+(\.\d+)*)/i):ee.bada?jt=ce(/bada\/(\d+(\.\d+)*)/i):ee.tizen&&(jt=ce(/tizen[\/\s](\d+(\.\d+)*)/i)),jt&&(ee.osversion=jt);var lt=!ee.windows&&jt.split(".")[0];return tt||ye||oe=="ipad"||se&&(lt==3||lt>=4&&!vt)||ee.silk?ee.tablet=le:(vt||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 Se(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=Pe(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 Se([oe,de[ie]])<0}return ce}function ge(de,ce,z){return!xe(de,ce,z)}var le=!0,ve=Pe(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=Se,ve.check=ge,ve._detect=Pe,ve.detect=Pe,ve})},{}],36:[function(me,Be,ke){},{}],37:[function(me,Be,ke){function Pe(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 Se(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(/[-_]/,""),Pe(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=Se;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(Pe){"use strict";function Le(){return Se.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function he(He,Ie){if(Le()<Ie)throw new RangeError("Invalid typed array length");return Se.TYPED_ARRAY_SUPPORT?(He=new Uint8Array(Ie),He.__proto__=Se.prototype):(He===null&&(He=new Se(Ie)),He.length=Ie),He}function Se(He,Ie,We){if(!(Se.TYPED_ARRAY_SUPPORT||this instanceof Se))return new Se(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)),!Se.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"),!Se.isEncoding(We))throw new TypeError('"encoding" must be a valid string encoding');var Oe=0|se(Ie,We);He=he(He,Oe);var Ce=He.write(Ie,We);return Ce!==Oe&&(He=He.slice(0,Ce)),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),Se.TYPED_ARRAY_SUPPORT?(He=Ie,He.__proto__=Se.prototype):He=ce(He,Ie),He}function ee(He,Ie){if(Se.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"||Lt(Ie.length)?he(He,0):ce(He,Ie);if(Ie.type==="Buffer"&&St(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),Se.alloc(+He)}function se(He,Ie){if(Se.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 Jt(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 tt(this,Ie,We);case"latin1":case"binary":return vt(this,Ie,We);case"base64":return ft(this,Ie,We);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return jt(this,Ie,We);default:if(Oe)throw new TypeError("Unknown encoding: "+He);He=(He+"").toLowerCase(),Oe=!0}}function ye(He,Ie,We){var Oe=He[Ie];He[Ie]=He[We],He[We]=Oe}function we(He,Ie,We,Oe,Ce){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=Ce?0:He.length-1),We<0&&(We=He.length+We),We>=He.length){if(Ce)return-1;We=He.length-1}else if(We<0){if(!Ce)return-1;We=0}if(typeof Ie=="string"&&(Ie=Se.from(Ie,Oe)),Se.isBuffer(Ie))return Ie.length===0?-1:be(He,Ie,We,Oe,Ce);if(typeof Ie=="number")return Ie&=255,Se.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Ce?Uint8Array.prototype.indexOf.call(He,Ie,We):Uint8Array.prototype.lastIndexOf.call(He,Ie,We):be(He,[Ie],We,Oe,Ce);throw new TypeError("val must be string, number or Buffer")}function be(He,Ie,We,Oe,Ce){function Ne(pn,Fn){return $e===1?pn[Fn]:pn.readUInt16BE(Fn*$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 Tt;if(Ce){var qt=-1;for(Tt=We;Tt<dt;Tt++)if(Ne(He,Tt)===Ne(Ie,qt===-1?0:Tt-qt)){if(qt===-1&&(qt=Tt),Tt-qt+1===Je)return qt*$e}else qt!==-1&&(Tt-=Tt-qt),qt=-1}else for(We+Je>dt&&(We=dt-Je),Tt=We;Tt>=0;Tt--){for(var yn=!0,rn=0;rn<Je;rn++)if(Ne(He,Tt+rn)!==Ne(Ie,rn)){yn=!1;break}if(yn)return Tt}return-1}function Ae(He,Ie,We,Oe){We=Number(We)||0;var Ce=He.length-We;Oe?(Oe=Number(Oe))>Ce&&(Oe=Ce):Oe=Ce;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 dn(bn(Ie,He.length-We),He,We,Oe)}function ze(He,Ie,We,Oe){return dn(Wt(Ie),He,We,Oe)}function Ze(He,Ie,We,Oe){return ze(He,Ie,We,Oe)}function Ye(He,Ie,We,Oe){return dn(Jt(Ie),He,We,Oe)}function Ge(He,Ie,We,Oe){return dn(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=[],Ce=Ie;Ce<We;){var Ne=He[Ce],$e=null,dt=Ne>239?4:Ne>223?3:Ne>191?2:1;if(Ce+dt<=We){var Je,Tt,qt,yn;switch(dt){case 1:Ne<128&&($e=Ne);break;case 2:Je=He[Ce+1],(192&Je)==128&&(yn=(31&Ne)<<6|63&Je)>127&&($e=yn);break;case 3:Je=He[Ce+1],Tt=He[Ce+2],(192&Je)==128&&(192&Tt)==128&&(yn=(15&Ne)<<12|(63&Je)<<6|63&Tt)>2047&&(yn<55296||yn>57343)&&($e=yn);break;case 4:Je=He[Ce+1],Tt=He[Ce+2],qt=He[Ce+3],(192&Je)==128&&(192&Tt)==128&&(192&qt)==128&&(yn=(15&Ne)<<18|(63&Je)<<12|(63&Tt)<<6|63&qt)>65535&&yn<1114112&&($e=yn)}}$e===null?($e=65533,dt=1):$e>65535&&($e-=65536,Oe.push($e>>>10&1023|55296),$e=56320|1023&$e),Oe.push($e),Ce+=dt}return Pt(Oe)}function Pt(He){var Ie=He.length;if(Ie<=yt)return String.fromCharCode.apply(String,He);for(var We="",Oe=0;Oe<Ie;)We+=String.fromCharCode.apply(String,He.slice(Oe,Oe+=yt));return We}function tt(He,Ie,We){var Oe="";We=Math.min(He.length,We);for(var Ce=Ie;Ce<We;++Ce)Oe+=String.fromCharCode(127&He[Ce]);return Oe}function vt(He,Ie,We){var Oe="";We=Math.min(He.length,We);for(var Ce=Ie;Ce<We;++Ce)Oe+=String.fromCharCode(He[Ce]);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 Ce="",Ne=Ie;Ne<We;++Ne)Ce+=Qt(He[Ne]);return Ce}function jt(He,Ie,We){for(var Oe=He.slice(Ie,We),Ce="",Ne=0;Ne<Oe.length;Ne+=2)Ce+=String.fromCharCode(Oe[Ne]+256*Oe[Ne+1]);return Ce}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 et(He,Ie,We,Oe,Ce,Ne){if(!Se.isBuffer(He))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ie>Ce||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 Ce=0,Ne=Math.min(He.length-We,2);Ce<Ne;++Ce)He[We+Ce]=(Ie&255<<8*(Oe?Ce:1-Ce))>>>8*(Oe?Ce:1-Ce)}function mt(He,Ie,We,Oe){Ie<0&&(Ie=4294967295+Ie+1);for(var Ce=0,Ne=Math.min(He.length-We,4);Ce<Ne;++Ce)He[We+Ce]=Ie>>>8*(Oe?Ce:3-Ce)&255}function _t(He,Ie,We,Oe,Ce,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,Ce){return Ce||_t(He,Ie,We,4,34028234663852886e22,-34028234663852886e22),Rt.write(He,Ie,We,Oe,23,4),We+4}function Bt(He,Ie,We,Oe,Ce){return Ce||_t(He,Ie,We,8,17976931348623157e292,-17976931348623157e292),Rt.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 Qt(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,Ce=null,Ne=[],$e=0;$e<Oe;++$e){if((We=He.charCodeAt($e))>55295&&We<57344){if(!Ce){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}Ce=We;continue}if(We<56320){(Ie-=3)>-1&&Ne.push(239,191,189),Ce=We;continue}We=65536+(Ce-55296<<10|We-56320)}else Ce&&(Ie-=3)>-1&&Ne.push(239,191,189);if(Ce=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,Ce,Ne=[],$e=0;$e<He.length&&!((Ie-=2)<0);++$e)We=He.charCodeAt($e),Oe=We>>8,Ce=We%256,Ne.push(Ce),Ne.push(Oe);return Ne}function Jt(He){return pt.toByteArray(Ht(He))}function dn(He,Ie,We,Oe){for(var Ce=0;Ce<Oe&&!(Ce+We>=Ie.length||Ce>=He.length);++Ce)Ie[Ce+We]=He[Ce];return Ce}function Lt(He){return He!==He}var pt=me("base64-js"),Rt=me("ieee754"),St=me("isarray");ke.Buffer=Se,ke.SlowBuffer=ie,ke.INSPECT_MAX_BYTES=50,Se.TYPED_ARRAY_SUPPORT=Pe.TYPED_ARRAY_SUPPORT!==void 0?Pe.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(),Se.poolSize=8192,Se._augment=function(He){return He.__proto__=Se.prototype,He},Se.from=function(He,Ie,We){return xe(null,He,Ie,We)},Se.TYPED_ARRAY_SUPPORT&&(Se.prototype.__proto__=Uint8Array.prototype,Se.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&Se[Symbol.species]===Se&&Object.defineProperty(Se,Symbol.species,{value:null,configurable:!0})),Se.alloc=function(He,Ie,We){return le(null,He,Ie,We)},Se.allocUnsafe=function(He){return ve(null,He)},Se.allocUnsafeSlow=function(He){return ve(null,He)},Se.isBuffer=function(He){return!(He==null||!He._isBuffer)},Se.compare=function(He,Ie){if(!Se.isBuffer(He)||!Se.isBuffer(Ie))throw new TypeError("Arguments must be Buffers");if(He===Ie)return 0;for(var We=He.length,Oe=Ie.length,Ce=0,Ne=Math.min(We,Oe);Ce<Ne;++Ce)if(He[Ce]!==Ie[Ce]){We=He[Ce],Oe=Ie[Ce];break}return We<Oe?-1:Oe<We?1:0},Se.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}},Se.concat=function(He,Ie){if(!St(He))throw new TypeError('"list" argument must be an Array of Buffers');if(He.length===0)return Se.alloc(0);var We;if(Ie===void 0)for(Ie=0,We=0;We<He.length;++We)Ie+=He[We].length;var Oe=Se.allocUnsafe(Ie),Ce=0;for(We=0;We<He.length;++We){var Ne=He[We];if(!Se.isBuffer(Ne))throw new TypeError('"list" argument must be an Array of Buffers');Ne.copy(Oe,Ce),Ce+=Ne.length}return Oe},Se.byteLength=se,Se.prototype._isBuffer=!0,Se.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)ye(this,Ie,Ie+1);return this},Se.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)ye(this,Ie,Ie+3),ye(this,Ie+1,Ie+2);return this},Se.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)ye(this,Ie,Ie+7),ye(this,Ie+1,Ie+6),ye(this,Ie+2,Ie+5),ye(this,Ie+3,Ie+4);return this},Se.prototype.toString=function(){var He=0|this.length;return He===0?"":arguments.length===0?at(this,0,He):ue.apply(this,arguments)},Se.prototype.equals=function(He){if(!Se.isBuffer(He))throw new TypeError("Argument must be a Buffer");return this===He||Se.compare(this,He)===0},Se.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+">"},Se.prototype.compare=function(He,Ie,We,Oe,Ce){if(!Se.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),Ce===void 0&&(Ce=this.length),Ie<0||We>He.length||Oe<0||Ce>this.length)throw new RangeError("out of range index");if(Oe>=Ce&&Ie>=We)return 0;if(Oe>=Ce)return-1;if(Ie>=We)return 1;if(Ie>>>=0,We>>>=0,Oe>>>=0,Ce>>>=0,this===He)return 0;for(var Ne=Ce-Oe,$e=We-Ie,dt=Math.min(Ne,$e),Je=this.slice(Oe,Ce),Tt=He.slice(Ie,We),qt=0;qt<dt;++qt)if(Je[qt]!==Tt[qt]){Ne=Je[qt],$e=Tt[qt];break}return Ne<$e?-1:$e<Ne?1:0},Se.prototype.includes=function(He,Ie,We){return this.indexOf(He,Ie,We)!==-1},Se.prototype.indexOf=function(He,Ie,We){return we(this,He,Ie,We,!0)},Se.prototype.lastIndexOf=function(He,Ie,We){return we(this,He,Ie,We,!1)},Se.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 Ce=this.length-Ie;if((We===void 0||We>Ce)&&(We=Ce),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 Ye(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}},Se.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var yt=4096;Se.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(Se.TYPED_ARRAY_SUPPORT)Oe=this.subarray(He,Ie),Oe.__proto__=Se.prototype;else{var Ce=Ie-He;Oe=new Se(Ce,void 0);for(var Ne=0;Ne<Ce;++Ne)Oe[Ne]=this[Ne+He]}return Oe},Se.prototype.readUIntLE=function(He,Ie,We){He|=0,Ie|=0,We||lt(He,Ie,this.length);for(var Oe=this[He],Ce=1,Ne=0;++Ne<Ie&&(Ce*=256);)Oe+=this[He+Ne]*Ce;return Oe},Se.prototype.readUIntBE=function(He,Ie,We){He|=0,Ie|=0,We||lt(He,Ie,this.length);for(var Oe=this[He+--Ie],Ce=1;Ie>0&&(Ce*=256);)Oe+=this[He+--Ie]*Ce;return Oe},Se.prototype.readUInt8=function(He,Ie){return Ie||lt(He,1,this.length),this[He]},Se.prototype.readUInt16LE=function(He,Ie){return Ie||lt(He,2,this.length),this[He]|this[He+1]<<8},Se.prototype.readUInt16BE=function(He,Ie){return Ie||lt(He,2,this.length),this[He]<<8|this[He+1]},Se.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]},Se.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])},Se.prototype.readIntLE=function(He,Ie,We){He|=0,Ie|=0,We||lt(He,Ie,this.length);for(var Oe=this[He],Ce=1,Ne=0;++Ne<Ie&&(Ce*=256);)Oe+=this[He+Ne]*Ce;return Ce*=128,Oe>=Ce&&(Oe-=Math.pow(2,8*Ie)),Oe},Se.prototype.readIntBE=function(He,Ie,We){He|=0,Ie|=0,We||lt(He,Ie,this.length);for(var Oe=Ie,Ce=1,Ne=this[He+--Oe];Oe>0&&(Ce*=256);)Ne+=this[He+--Oe]*Ce;return Ce*=128,Ne>=Ce&&(Ne-=Math.pow(2,8*Ie)),Ne},Se.prototype.readInt8=function(He,Ie){return Ie||lt(He,1,this.length),128&this[He]?-1*(255-this[He]+1):this[He]},Se.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},Se.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},Se.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},Se.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]},Se.prototype.readFloatLE=function(He,Ie){return Ie||lt(He,4,this.length),Rt.read(this,He,!0,23,4)},Se.prototype.readFloatBE=function(He,Ie){return Ie||lt(He,4,this.length),Rt.read(this,He,!1,23,4)},Se.prototype.readDoubleLE=function(He,Ie){return Ie||lt(He,8,this.length),Rt.read(this,He,!0,52,8)},Se.prototype.readDoubleBE=function(He,Ie){return Ie||lt(He,8,this.length),Rt.read(this,He,!1,52,8)},Se.prototype.writeUIntLE=function(He,Ie,We,Oe){He=+He,Ie|=0,We|=0,!Oe&&et(this,He,Ie,We,Math.pow(2,8*We)-1,0);var Ce=1,Ne=0;for(this[Ie]=255&He;++Ne<We&&(Ce*=256);)this[Ie+Ne]=He/Ce&255;return Ie+We},Se.prototype.writeUIntBE=function(He,Ie,We,Oe){He=+He,Ie|=0,We|=0,!Oe&&et(this,He,Ie,We,Math.pow(2,8*We)-1,0);var Ce=We-1,Ne=1;for(this[Ie+Ce]=255&He;--Ce>=0&&(Ne*=256);)this[Ie+Ce]=He/Ne&255;return Ie+We},Se.prototype.writeUInt8=function(He,Ie,We){return He=+He,Ie|=0,We||et(this,He,Ie,1,255,0),Se.TYPED_ARRAY_SUPPORT||(He=Math.floor(He)),this[Ie]=255&He,Ie+1},Se.prototype.writeUInt16LE=function(He,Ie,We){return He=+He,Ie|=0,We||et(this,He,Ie,2,65535,0),Se.TYPED_ARRAY_SUPPORT?(this[Ie]=255&He,this[Ie+1]=He>>>8):ut(this,He,Ie,!0),Ie+2},Se.prototype.writeUInt16BE=function(He,Ie,We){return He=+He,Ie|=0,We||et(this,He,Ie,2,65535,0),Se.TYPED_ARRAY_SUPPORT?(this[Ie]=He>>>8,this[Ie+1]=255&He):ut(this,He,Ie,!1),Ie+2},Se.prototype.writeUInt32LE=function(He,Ie,We){return He=+He,Ie|=0,We||et(this,He,Ie,4,4294967295,0),Se.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},Se.prototype.writeUInt32BE=function(He,Ie,We){return He=+He,Ie|=0,We||et(this,He,Ie,4,4294967295,0),Se.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},Se.prototype.writeIntLE=function(He,Ie,We,Oe){if(He=+He,Ie|=0,!Oe){var Ce=Math.pow(2,8*We-1);et(this,He,Ie,We,Ce-1,-Ce)}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},Se.prototype.writeIntBE=function(He,Ie,We,Oe){if(He=+He,Ie|=0,!Oe){var Ce=Math.pow(2,8*We-1);et(this,He,Ie,We,Ce-1,-Ce)}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},Se.prototype.writeInt8=function(He,Ie,We){return He=+He,Ie|=0,We||et(this,He,Ie,1,127,-128),Se.TYPED_ARRAY_SUPPORT||(He=Math.floor(He)),He<0&&(He=255+He+1),this[Ie]=255&He,Ie+1},Se.prototype.writeInt16LE=function(He,Ie,We){return He=+He,Ie|=0,We||et(this,He,Ie,2,32767,-32768),Se.TYPED_ARRAY_SUPPORT?(this[Ie]=255&He,this[Ie+1]=He>>>8):ut(this,He,Ie,!0),Ie+2},Se.prototype.writeInt16BE=function(He,Ie,We){return He=+He,Ie|=0,We||et(this,He,Ie,2,32767,-32768),Se.TYPED_ARRAY_SUPPORT?(this[Ie]=He>>>8,this[Ie+1]=255&He):ut(this,He,Ie,!1),Ie+2},Se.prototype.writeInt32LE=function(He,Ie,We){return He=+He,Ie|=0,We||et(this,He,Ie,4,2147483647,-2147483648),Se.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},Se.prototype.writeInt32BE=function(He,Ie,We){return He=+He,Ie|=0,We||et(this,He,Ie,4,2147483647,-2147483648),He<0&&(He=4294967295+He+1),Se.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},Se.prototype.writeFloatLE=function(He,Ie,We){return gt(this,He,Ie,!0,We)},Se.prototype.writeFloatBE=function(He,Ie,We){return gt(this,He,Ie,!1,We)},Se.prototype.writeDoubleLE=function(He,Ie,We){return Bt(this,He,Ie,!0,We)},Se.prototype.writeDoubleBE=function(He,Ie,We){return Bt(this,He,Ie,!1,We)},Se.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 Ce,Ne=Oe-We;if(this===He&&We<Ie&&Ie<Oe)for(Ce=Ne-1;Ce>=0;--Ce)He[Ce+Ie]=this[Ce+We];else if(Ne<1e3||!Se.TYPED_ARRAY_SUPPORT)for(Ce=0;Ce<Ne;++Ce)He[Ce+Ie]=this[Ce+We];else Uint8Array.prototype.set.call(He,this.subarray(We,We+Ne),Ie);return Ne},Se.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 Ce=He.charCodeAt(0);Ce<256&&(He=Ce)}if(Oe!==void 0&&typeof Oe!="string")throw new TypeError("encoding must be a string");if(typeof Oe=="string"&&!Se.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=Se.isBuffer(He)?He:bn(new Se(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 Pe=function(){this.buffer=[],this.fns=[]};Pe.prototype.push=function(he,Se){if(this.fns.length)return this.fns.shift()(null,he);var xe={data:he,priority:Se},ge=Le(this.buffer,xe,function(le){return le.priority});this.buffer.splice(ge,0,xe)},Pe.prototype.next=function(){var he=this;return function(Se){if(he.buffer.length)return Se(null,he.buffer.pop().data);he.fns.push(Se)}};var Le=function(he,Se,xe){Se=xe(Se);for(var ge=0,le=he?he.length:ge;ge<le;){var ve=ge+le>>>1;xe(he[ve])<Se?ge=ve+1:le=ve}return ge};Be.exports=Pe},{}],41:[function(me,Be,ke){function Pe(z){var ee=this,oe=ce.call(arguments,1);return new Promise(function(ie,se){function ue(be){var Ae;try{Ae=z.next(be)}catch(De){return se(De)}we(Ae)}function ye(be){var Ae;try{Ae=z.throw(be)}catch(De){return se(De)}we(Ae)}function we(be){if(be.done)return ie(be.value);var Ae=Le.call(ee,be.value);return Ae&&ge(Ae)?Ae.then(ue,ye):ye(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(be.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)?Pe.call(this,z):typeof z=="function"?he.call(this,z):Array.isArray(z)?Se.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 Se(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],ye=Le.call(this,z[ue]);ye&&ge(ye)?function(we,be){ee[be]=void 0,ie.push(we.then(function(Ae){ee[be]=Ae}))}(ye,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=Pe.default=Pe.co=Pe,Pe.wrap=function(z){function ee(){return Pe.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 Pe(Se,xe){if(!(this instanceof Pe))return new Pe(Se,xe);this.src=Se,this._withAccess=xe}function Le(Se,xe){return Se[xe]===void 0&&Se.__lookupGetter__(xe)===void 0&&Se.__lookupSetter__(xe)===void 0}var he=Array.prototype.slice;Be.exports=Pe,Pe.prototype.withAccess=function(Se){return this._withAccess=Se!==!1,this},Pe.prototype.pick=function(Se){return Array.isArray(Se)||(Se=he.call(arguments)),Se.length&&(this.keys=Se),this},Pe.prototype.to=function(Se){if(Se=Se||{},!this.src)return Se;var xe=this.keys||Object.keys(this.src);if(!this._withAccess){for(var ge=0;ge<xe.length;ge++)le=xe[ge],Se[le]===void 0&&(Se[le]=this.src[le]);return Se}for(var ge=0;ge<xe.length;ge++){var le=xe[ge];if(Le(Se,le)){var ve=this.src.__lookupGetter__(le),de=this.src.__lookupSetter__(le);ve&&Se.__defineGetter__(le,ve),de&&Se.__defineSetter__(le,de),ve||de||(Se[le]=this.src[le])}}return Se},Pe.prototype.toCover=function(Se){for(var xe=this.keys||Object.keys(this.src),ge=0;ge<xe.length;ge++){var le=xe[ge];delete Se[le];var ve=this.src.__lookupGetter__(le),de=this.src.__lookupSetter__(le);ve&&Se.__defineGetter__(le,ve),de&&Se.__defineSetter__(le,de),ve||de||(Se[le]=this.src[le])}},Pe.prototype.override=Pe.prototype.toCover,Pe.prototype.and=function(Se){var xe={};return this.to(xe),this.src=Se,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 Pe=me("../../modules/_core"),Le=Pe.JSON||(Pe.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 Pe=me("../../modules/_core").Object;Be.exports=function(Le,he){return Pe.create(Le,he)}},{"../../modules/_core":65,"../../modules/es6.object.create":137}],48:[function(me,Be,ke){me("../../modules/es6.object.define-property");var Pe=me("../../modules/_core").Object;Be.exports=function(Le,he,Se){return Pe.defineProperty(Le,he,Se)}},{"../../modules/_core":65,"../../modules/es6.object.define-property":138}],49:[function(me,Be,ke){me("../../modules/es6.object.get-own-property-names");var Pe=me("../../modules/_core").Object;Be.exports=function(Le){return Pe.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(Pe){if(typeof Pe!="function")throw TypeError(Pe+" is not a function!");return Pe}},{}],59:[function(me,Be,ke){Be.exports=function(){}},{}],60:[function(me,Be,ke){Be.exports=function(Pe,Le,he,Se){if(!(Pe instanceof Le)||Se!==void 0&&Se in Pe)throw TypeError(he+": incorrect invocation!");return Pe}},{}],61:[function(me,Be,ke){var Pe=me("./_is-object");Be.exports=function(Le){if(!Pe(Le))throw TypeError(Le+" is not an object!");return Le}},{"./_is-object":85}],62:[function(me,Be,ke){var Pe=me("./_to-iobject"),Le=me("./_to-length"),he=me("./_to-absolute-index");Be.exports=function(Se){return function(xe,ge,le){var ve,de=Pe(xe),ce=Le(de.length),z=he(le,ce);if(Se&&ge!=ge){for(;ce>z;)if((ve=de[z++])!=ve)return!0}else for(;ce>z;z++)if((Se||z in de)&&de[z]===ge)return Se||z||0;return!Se&&-1}}},{"./_to-absolute-index":121,"./_to-iobject":123,"./_to-length":124}],63:[function(me,Be,ke){var Pe=me("./_cof"),Le=me("./_wks")("toStringTag"),he=Pe(function(){return arguments}())=="Arguments",Se=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=Se(ge=Object(xe),Le))=="string"?le:he?Pe(ge):(ve=Pe(ge))=="Object"&&typeof ge.callee=="function"?"Arguments":ve}},{"./_cof":64,"./_wks":131}],64:[function(me,Be,ke){var Pe={}.toString;Be.exports=function(Le){return Pe.call(Le).slice(8,-1)}},{}],65:[function(me,Be,ke){var Pe=Be.exports={version:"2.5.7"};typeof __e=="number"&&(__e=Pe)},{}],66:[function(me,Be,ke){"use strict";var Pe=me("./_object-dp"),Le=me("./_property-desc");Be.exports=function(he,Se,xe){Se in he?Pe.f(he,Se,Le(0,xe)):he[Se]=xe}},{"./_object-dp":98,"./_property-desc":111}],67:[function(me,Be,ke){var Pe=me("./_a-function");Be.exports=function(Le,he,Se){if(Pe(Le),he===void 0)return Le;switch(Se){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(Pe){if(Pe==null)throw TypeError("Can't call method on "+Pe);return Pe}},{}],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 Pe=me("./_is-object"),Le=me("./_global").document,he=Pe(Le)&&Pe(Le.createElement);Be.exports=function(Se){return he?Le.createElement(Se):{}}},{"./_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 Pe=me("./_object-keys"),Le=me("./_object-gops"),he=me("./_object-pie");Be.exports=function(Se){var xe=Pe(Se),ge=Le.f;if(ge)for(var le,ve=ge(Se),de=he.f,ce=0;ve.length>ce;)de.call(Se,le=ve[ce++])&&xe.push(le);return xe}},{"./_object-gops":103,"./_object-keys":106,"./_object-pie":107}],73:[function(me,Be,ke){var Pe=me("./_global"),Le=me("./_core"),he=me("./_ctx"),Se=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,ye=le&ge.B,we=le&ge.W,be=ie?Le:Le[ve]||(Le[ve]={}),Ae=be.prototype,De=ie?Pe:se?Pe[ve]:(Pe[ve]||{}).prototype;ie&&(de=ve);for(ce in de)(z=!oe&&De&&De[ce]!==void 0)&&xe(be,ce)||(ee=z?De[ce]:de[ce],be[ce]=ie&&typeof De[ce]!="function"?de[ce]:ye&&z?he(ee,Pe):we&&De[ce]==ee?function(ze){var Ze=function(Ye,Ge,ft){if(this instanceof ze){switch(arguments.length){case 0:return new ze;case 1:return new ze(Ye);case 2:return new ze(Ye,Ge)}return new ze(Ye,Ge,ft)}return ze.apply(this,arguments)};return Ze.prototype=ze.prototype,Ze}(ee):ue&&typeof ee=="function"?he(Function.call,ee):ee,ue&&((be.virtual||(be.virtual={}))[ce]=ee,le&ge.R&&Ae&&!Ae[ce]&&Se(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(Pe){try{return!!Pe()}catch(Le){return!0}}},{}],75:[function(me,Be,de){var Pe=me("./_ctx"),Le=me("./_iter-call"),he=me("./_is-array-iter"),Se=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,ye,we,be=ie?function(){return ce}:ge(ce),Ae=Pe(ee,oe,z?2:1),De=0;if(typeof be!="function")throw TypeError(ce+" is not iterable!");if(he(be)){for(se=xe(ce.length);se>De;De++)if((we=z?Ae(Se(ue=ce[De])[0],ue[1]):Ae(ce[De]))===le||we===ve)return we}else for(ye=be.call(ce);!(ue=ye.next()).done;)if((we=Le(ye,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 Pe=Be.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=Pe)},{}],77:[function(me,Be,ke){var Pe={}.hasOwnProperty;Be.exports=function(Le,he){return Pe.call(Le,he)}},{}],78:[function(me,Be,ke){var Pe=me("./_object-dp"),Le=me("./_property-desc");Be.exports=me("./_descriptors")?function(he,Se,xe){return Pe.f(he,Se,Le(1,xe))}:function(he,Se,xe){return he[Se]=xe,he}},{"./_descriptors":69,"./_object-dp":98,"./_property-desc":111}],79:[function(me,Be,ke){var Pe=me("./_global").document;Be.exports=Pe&&Pe.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(Pe,Le,he){var Se=he===void 0;switch(Le.length){case 0:return Se?Pe():Pe.call(he);case 1:return Se?Pe(Le[0]):Pe.call(he,Le[0]);case 2:return Se?Pe(Le[0],Le[1]):Pe.call(he,Le[0],Le[1]);case 3:return Se?Pe(Le[0],Le[1],Le[2]):Pe.call(he,Le[0],Le[1],Le[2]);case 4:return Se?Pe(Le[0],Le[1],Le[2],Le[3]):Pe.call(he,Le[0],Le[1],Le[2],Le[3])}return Pe.apply(he,Le)}},{}],82:[function(me,Be,ke){var Pe=me("./_cof");Be.exports=Object("z").propertyIsEnumerable(0)?Object:function(Le){return Pe(Le)=="String"?Le.split(""):Object(Le)}},{"./_cof":64}],83:[function(me,Be,ke){var Pe=me("./_iterators"),Le=me("./_wks")("iterator"),he=Array.prototype;Be.exports=function(Se){return Se!==void 0&&(Pe.Array===Se||he[Le]===Se)}},{"./_iterators":91,"./_wks":131}],84:[function(me,Be,ke){var Pe=me("./_cof");Be.exports=Array.isArray||function(Le){return Pe(Le)=="Array"}},{"./_cof":64}],85:[function(me,Be,ke){Be.exports=function(Pe){return typeof Pe=="object"?Pe!==null:typeof Pe=="function"}},{}],86:[function(me,Be,ke){var Pe=me("./_an-object");Be.exports=function(Le,he,Se,xe){try{return xe?he(Pe(Se)[0],Se[1]):he(Se)}catch(le){var ge=Le.return;throw ge!==void 0&&Pe(ge.call(Le)),le}}},{"./_an-object":61}],87:[function(me,Be,ke){"use strict";var Pe=me("./_object-create"),Le=me("./_property-desc"),he=me("./_set-to-string-tag"),Se={};me("./_hide")(Se,me("./_wks")("iterator"),function(){return this}),Be.exports=function(xe,ge,le){xe.prototype=Pe(Se,{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 Pe=me("./_library"),Le=me("./_export"),he=me("./_redefine"),Se=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,ye,we){ge(ie,oe,se);var be,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",Ye=ue=="values",Ge=!1,ft=ee.prototype,at=ft[de]||ft["@@iterator"]||ue&&ft[ue],Pt=at||ze(ue),tt=ue?Ye?ze("entries"):Pt:void 0,vt=oe=="Array"&&ft.entries||at;if(vt&&(De=ve(vt.call(new ee)))!==Object.prototype&&De.next&&(le(De,Ze,!0),Pe||typeof De[de]=="function"||Se(De,de,z)),Ye&&at&&at.name!=="values"&&(Ge=!0,Pt=function(){return at.call(this)}),Pe&&!we||!ce&&!Ge&&ft[de]||Se(ft,de,Pt),xe[oe]=Pt,xe[Ze]=z,ue)if(be={values:Ye?Pt:ze("values"),keys:ye?Pt:ze("keys"),entries:tt},we)for(Ae in be)Ae in ft||he(ft,Ae,be[Ae]);else Le(Le.P+Le.F*(ce||Ge),oe,be);return be}},{"./_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 Pe=me("./_wks")("iterator"),Le=!1;try{var he=[7][Pe]();he.return=function(){Le=!0},Array.from(he,function(){throw 2})}catch(Se){}Be.exports=function(Se,xe){if(!xe&&!Le)return!1;var ge=!1;try{var le=[7],ve=le[Pe]();ve.next=function(){return{done:ge=!0}},le[Pe]=function(){return ve},Se(le)}catch(de){}return ge}},{"./_wks":131}],90:[function(me,Be,ke){Be.exports=function(Pe,Le){return{value:Le,done:!!Pe}}},{}],91:[function(me,Be,ke){Be.exports={}},{}],92:[function(me,Be,ke){Be.exports=!0},{}],93:[function(me,Be,ke){var Pe=me("./_uid")("meta"),Le=me("./_is-object"),he=me("./_has"),Se=me("./_object-dp").f,xe=0,ge=Object.isExtensible||function(){return!0},le=!me("./_fails")(function(){return ge(Object.preventExtensions({}))}),ve=function(oe){Se(oe,Pe,{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,Pe)){if(!ge(oe))return"F";if(!ie)return"E";ve(oe)}return oe[Pe].i},ce=function(oe,ie){if(!he(oe,Pe)){if(!ge(oe))return!0;if(!ie)return!1;ve(oe)}return oe[Pe].w},z=function(oe){return le&&ee.NEED&&ge(oe)&&!he(oe,Pe)&&ve(oe),oe},ee=Be.exports={KEY:Pe,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 Pe=me("./_global"),Le=me("./_task").set,he=Pe.MutationObserver||Pe.WebKitMutationObserver,Se=Pe.process,xe=Pe.Promise,ge=me("./_cof")(Se)=="process";Be.exports=function(){var le,ve,de,ce=function(){var ie,se;for(ge&&(ie=Se.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(){Se.nextTick(ce)};else if(!he||Pe.navigator&&Pe.navigator.standalone)if(xe&&xe.resolve){var z=xe.resolve(void 0);de=function(){z.then(ce)}}else de=function(){Le.call(Pe,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 Pe(he){var Se,xe;this.promise=new he(function(ge,le){if(Se!==void 0||xe!==void 0)throw TypeError("Bad Promise constructor");Se=ge,xe=le}),this.resolve=Le(Se),this.reject=Le(xe)}var Le=me("./_a-function");Be.exports.f=function(he){return new Pe(he)}},{"./_a-function":58}],96:[function(me,Be,ke){"use strict";var Pe=me("./_object-keys"),Le=me("./_object-gops"),he=me("./_object-pie"),Se=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=Se(le),ce=arguments.length,z=1,ee=Le.f,oe=he.f;ce>z;)for(var ie,se=xe(arguments[z++]),ue=ee?Pe(se).concat(ee(se)):Pe(se),ye=ue.length,we=0;ye>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 Pe=me("./_an-object"),Le=me("./_object-dps"),he=me("./_enum-bug-keys"),Se=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=Pe(le),de=new xe,xe.prototype=null,de[Se]=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 Pe=me("./_an-object"),Le=me("./_ie8-dom-define"),he=me("./_to-primitive"),Se=Object.defineProperty;ke.f=me("./_descriptors")?Object.defineProperty:function(xe,ge,le){if(Pe(xe),ge=he(ge,!0),Pe(le),Le)try{return Se(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 Pe=me("./_object-dp"),Le=me("./_an-object"),he=me("./_object-keys");Be.exports=me("./_descriptors")?Object.defineProperties:function(Se,xe){Le(Se);for(var ge,le=he(xe),ve=le.length,de=0;ve>de;)Pe.f(Se,ge=le[de++],xe[ge]);return Se}},{"./_an-object":61,"./_descriptors":69,"./_object-dp":98,"./_object-keys":106}],100:[function(me,Be,ke){var Pe=me("./_object-pie"),Le=me("./_property-desc"),he=me("./_to-iobject"),Se=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=Se(de,!0),ge)try{return le(ve,de)}catch(ce){}if(xe(ve,de))return Le(!Pe.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 Pe=me("./_to-iobject"),Le=me("./_object-gopn").f,he={}.toString,Se=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],xe=function(ge){try{return Le(ge)}catch(le){return Se.slice()}};Be.exports.f=function(ge){return Se&&he.call(ge)=="[object Window]"?xe(ge):Le(Pe(ge))}},{"./_object-gopn":102,"./_to-iobject":123}],102:[function(me,Be,ke){var Pe=me("./_object-keys-internal"),Le=me("./_enum-bug-keys").concat("length","prototype");ke.f=Object.getOwnPropertyNames||function(he){return Pe(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 Pe=me("./_has"),Le=me("./_to-object"),he=me("./_shared-key")("IE_PROTO"),Se=Object.prototype;Be.exports=Object.getPrototypeOf||function(xe){return xe=Le(xe),Pe(xe,he)?xe[he]:typeof xe.constructor=="function"&&xe instanceof xe.constructor?xe.constructor.prototype:xe instanceof Object?Se:null}},{"./_has":77,"./_shared-key":116,"./_to-object":125}],105:[function(me,Be,ke){var Pe=me("./_has"),Le=me("./_to-iobject"),he=me("./_array-includes")(!1),Se=me("./_shared-key")("IE_PROTO");Be.exports=function(xe,ge){var le,ve=Le(xe),de=0,ce=[];for(le in ve)le!=Se&&Pe(ve,le)&&ce.push(le);for(;ge.length>de;)Pe(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 Pe=me("./_object-keys-internal"),Le=me("./_enum-bug-keys");Be.exports=Object.keys||function(he){return Pe(he,Le)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],107:[function(me,Be,ke){ke.f={}.propertyIsEnumerable},{}],108:[function(me,Be,ke){var Pe=me("./_export"),Le=me("./_core"),he=me("./_fails");Be.exports=function(Se,xe){var ge=(Le.Object||{})[Se]||Object[Se],le={};le[Se]=xe(ge),Pe(Pe.S+Pe.F*he(function(){ge(1)}),"Object",le)}},{"./_core":65,"./_export":73,"./_fails":74}],109:[function(me,Be,ke){Be.exports=function(Pe){try{return{e:!1,v:Pe()}}catch(Le){return{e:!0,v:Le}}}},{}],110:[function(me,Be,ke){var Pe=me("./_an-object"),Le=me("./_is-object"),he=me("./_new-promise-capability");Be.exports=function(Se,xe){if(Pe(Se),Le(xe)&&xe.constructor===Se)return xe;var ge=he.f(Se);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(Pe,Le){return{enumerable:!(1&Pe),configurable:!(2&Pe),writable:!(4&Pe),value:Le}}},{}],112:[function(me,Be,ke){var Pe=me("./_hide");Be.exports=function(Le,he,Se){for(var xe in he)Se&&Le[xe]?Le[xe]=he[xe]:Pe(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 Pe=me("./_global"),Le=me("./_core"),he=me("./_object-dp"),Se=me("./_descriptors"),xe=me("./_wks")("species");Be.exports=function(ge){var le=typeof Le[ge]=="function"?Le[ge]:Pe[ge];Se&&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 Pe=me("./_object-dp").f,Le=me("./_has"),he=me("./_wks")("toStringTag");Be.exports=function(Se,xe,ge){Se&&!Le(Se=ge?Se:Se.prototype,he)&&Pe(Se,he,{configurable:!0,value:xe})}},{"./_has":77,"./_object-dp":98,"./_wks":131}],116:[function(me,Be,ke){var Pe=me("./_shared")("keys"),Le=me("./_uid");Be.exports=function(he){return Pe[he]||(Pe[he]=Le(he))}},{"./_shared":117,"./_uid":127}],117:[function(me,Be,ke){var Pe=me("./_core"),Le=me("./_global"),he=Le["__core-js_shared__"]||(Le["__core-js_shared__"]={});(Be.exports=function(Se,xe){return he[Se]||(he[Se]=xe!==void 0?xe:{})})("versions",[]).push({version:Pe.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 Pe=me("./_an-object"),Le=me("./_a-function"),he=me("./_wks")("species");Be.exports=function(Se,xe){var ge,le=Pe(Se).constructor;return le===void 0||(ge=Pe(le)[he])==null?xe:Le(ge)}},{"./_a-function":58,"./_an-object":61,"./_wks":131}],119:[function(me,Be,ke){var Pe=me("./_to-integer"),Le=me("./_defined");Be.exports=function(he){return function(Se,xe){var ge,le,ve=String(Le(Se)),de=Pe(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 Pe,Le,he,Se=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 be=se[we];delete se[we],be()}},ye=function(we){ue.call(we.data)};ce&&z||(ce=function(we){for(var be=[],Ae=1;arguments.length>Ae;)be.push(arguments[Ae++]);return se[++ie]=function(){xe(typeof we=="function"?we:Function(we),be)},Pe(ie),ie},z=function(we){delete se[we]},me("./_cof")(de)=="process"?Pe=function(we){de.nextTick(Se(ue,we,1))}:oe&&oe.now?Pe=function(we){oe.now(Se(ue,we,1))}:ee?(Le=new ee,he=Le.port2,Le.port1.onmessage=ye,Pe=Se(he.postMessage,he,1)):ve.addEventListener&&typeof postMessage=="function"&&!ve.importScripts?(Pe=function(we){ve.postMessage(we+"","*")},ve.addEventListener("message",ye,!1)):Pe="onreadystatechange"in le("script")?function(we){ge.appendChild(le("script")).onreadystatechange=function(){ge.removeChild(this),ue.call(we)}}:function(we){setTimeout(Se(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 Pe=me("./_to-integer"),Le=Math.max,he=Math.min;Be.exports=function(Se,xe){return Se=Pe(Se),Se<0?Le(Se+xe,0):he(Se,xe)}},{"./_to-integer":122}],122:[function(me,Be,ke){var Pe=Math.ceil,Le=Math.floor;Be.exports=function(he){return isNaN(he=+he)?0:(he>0?Le:Pe)(he)}},{}],123:[function(me,Be,ke){var Pe=me("./_iobject"),Le=me("./_defined");Be.exports=function(he){return Pe(Le(he))}},{"./_defined":68,"./_iobject":82}],124:[function(me,Be,ke){var Pe=me("./_to-integer"),Le=Math.min;Be.exports=function(he){return he>0?Le(Pe(he),9007199254740991):0}},{"./_to-integer":122}],125:[function(me,Be,ke){var Pe=me("./_defined");Be.exports=function(Le){return Object(Pe(Le))}},{"./_defined":68}],126:[function(me,Be,ke){var Pe=me("./_is-object");Be.exports=function(Le,he){if(!Pe(Le))return Le;var Se,xe;if(he&&typeof(Se=Le.toString)=="function"&&!Pe(xe=Se.call(Le))||typeof(Se=Le.valueOf)=="function"&&!Pe(xe=Se.call(Le))||!he&&typeof(Se=Le.toString)=="function"&&!Pe(xe=Se.call(Le)))return xe;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":85}],127:[function(me,Be,ke){var Pe=0,Le=Math.random();Be.exports=function(he){return"Symbol(".concat(he===void 0?"":he,")_",(++Pe+Le).toString(36))}},{}],128:[function(me,Be,ke){var Pe=me("./_global"),Le=Pe.navigator;Be.exports=Le&&Le.userAgent||""},{"./_global":76}],129:[function(me,Be,ke){var Pe=me("./_global"),Le=me("./_core"),he=me("./_library"),Se=me("./_wks-ext"),xe=me("./_object-dp").f;Be.exports=function(ge){var le=Le.Symbol||(Le.Symbol=he?{}:Pe.Symbol||{});ge.charAt(0)=="_"||ge in le||xe(le,ge,{value:Se.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 Pe=me("./_shared")("wks"),Le=me("./_uid"),he=me("./_global").Symbol,Se=typeof he=="function";(Be.exports=function(xe){return Pe[xe]||(Pe[xe]=Se&&he[xe]||(Se?he:Le)("Symbol."+xe))}).store=Pe},{"./_global":76,"./_shared":117,"./_uid":127}],132:[function(me,Be,ke){var Pe=me("./_classof"),Le=me("./_wks")("iterator"),he=me("./_iterators");Be.exports=me("./_core").getIteratorMethod=function(Se){if(Se!=null)return Se[Le]||Se["@@iterator"]||he[Pe(Se)]}},{"./_classof":63,"./_core":65,"./_iterators":91,"./_wks":131}],133:[function(me,Be,ke){"use strict";var Pe=me("./_ctx"),Le=me("./_export"),he=me("./_to-object"),Se=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,ye=ue>1?arguments[1]:void 0,we=ye!==void 0,be=0,Ae=ve(ie);if(we&&(ye=Pe(ye,ue>2?arguments[2]:void 0,2)),Ae==null||se==Array&&xe(Ae))for(ce=ge(ie.length),z=new se(ce);ce>be;be++)le(z,be,we?ye(ie[be],be):ie[be]);else for(oe=Ae.call(ie),z=new se;!(ee=oe.next()).done;be++)le(z,be,we?Se(oe,ye,[ee.value,be],!0):ee.value);return z.length=be,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 Pe=me("./_add-to-unscopables"),Le=me("./_iter-step"),he=me("./_iterators"),Se=me("./_to-iobject");Be.exports=me("./_iter-define")(Array,"Array",function(xe,ge){this._t=Se(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,Pe("keys"),Pe("values"),Pe("entries")},{"./_add-to-unscopables":59,"./_iter-define":88,"./_iter-step":90,"./_iterators":91,"./_to-iobject":123}],135:[function(me,Be,ke){"use strict";var Pe=me("./_is-object"),Le=me("./_object-gpo"),he=me("./_wks")("hasInstance"),Se=Function.prototype;he in Se||me("./_object-dp").f(Se,he,{value:function(xe){if(typeof this!="function"||!Pe(xe))return!1;if(!Pe(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 Pe=me("./_export");Pe(Pe.S+Pe.F,"Object",{assign:me("./_object-assign")})},{"./_export":73,"./_object-assign":96}],137:[function(me,Be,ke){var Pe=me("./_export");Pe(Pe.S,"Object",{create:me("./_object-create")})},{"./_export":73,"./_object-create":97}],138:[function(me,Be,ke){var Pe=me("./_export");Pe(Pe.S+Pe.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 Pe=me("./_to-object"),Le=me("./_object-gpo");me("./_object-sap")("getPrototypeOf",function(){return function(he){return Le(Pe(he))}})},{"./_object-gpo":104,"./_object-sap":108,"./_to-object":125}],141:[function(me,Be,ke){var Pe=me("./_to-object"),Le=me("./_object-keys");me("./_object-sap")("keys",function(){return function(he){return Le(Pe(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 Pe,Le,he,Se,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")(),ye=me("./_new-promise-capability"),we=me("./_perform"),be=me("./_user-agent"),Ae=me("./_promise-resolve"),De=ge.TypeError,ze=ge.process,Ze=ze&&ze.versions,Ye=Ze&&Ze.v8||"",Ge=ge.Promise,ft=ve(ze)=="process",at=function(){},Pt=Le=ye.f,tt=!!function(){try{var _t=Ge.resolve(1),gt=(_t.constructor={})[me("./_wks")("species")]=function(Bt){Bt(at,at)};return(ft||typeof PromiseRejectionEvent=="function")&&_t.then(at)instanceof gt&&Ye.indexOf("6.6")!==0&&be.indexOf("Chrome/66")===-1}catch(Bt){}}(),vt=function(_t){var gt;return!(!ce(_t)||typeof(gt=_t.then)!="function")&>},st=function(_t,gt){if(!_t._n){_t._n=!0;var Bt=_t._c;ue(function(){for(var Ht=_t._v,hn=_t._s==1,Qt=0;Bt.length>Qt;)(function(bn){var Wt,Kt,Jt,dn=hn?bn.ok:bn.fail,Lt=bn.resolve,pt=bn.reject,Rt=bn.domain;try{dn?(hn||(_t._h==2&&et(_t),_t._h=1),dn===!0?Wt=Ht:(Rt&&Rt.enter(),Wt=dn(Ht),Rt&&(Rt.exit(),Jt=!0)),Wt===bn.promise?pt(De("Promise-chain cycle")):(Kt=vt(Wt))?Kt.call(Wt,Lt,pt):Lt(Wt)):pt(Ht)}catch(St){Rt&&!Jt&&Rt.exit(),pt(St)}})(Bt[Qt++]);_t._c=[],_t._n=!1,gt&&!_t._h&&jt(_t)})}},jt=function(_t){se.call(ge,function(){var gt,Bt,Ht,hn=_t._v,Qt=lt(_t);if(Qt&&(gt=we(function(){ft?ze.emit("unhandledRejection",hn,_t):(Bt=ge.onunhandledrejection)?Bt({promise:_t,reason:hn}):(Ht=ge.console)&&Ht.error&&Ht.error("Unhandled promise rejection",hn)}),_t._h=ft||lt(_t)?2:1),_t._a=void 0,Qt&>.e)throw gt.v})},lt=function(_t){return _t._h!==1&&(_t._a||_t._c).length===0},et=function(_t){se.call(ge,function(){var gt;ft?ze.emit("rejectionHandled",_t):(gt=ge.onrejectionhandled)&>({promise:_t,reason:_t._v})})},ut=function(_t){var gt=this;gt._d||(gt._d=!0,gt=gt._w||gt,gt._v=_t,gt._s=2,gt._a||(gt._a=gt._c.slice()),st(gt,!0))},mt=function(_t){var gt,Bt=this;if(!Bt._d){Bt._d=!0,Bt=Bt._w||Bt;try{if(Bt===_t)throw De("Promise can't be resolved itself");(gt=vt(_t))?ue(function(){var Ht={_w:Bt,_d:!1};try{gt.call(_t,le(mt,Ht,1),le(ut,Ht,1))}catch(hn){ut.call(Ht,hn)}}):(Bt._v=_t,Bt._s=1,st(Bt,!1))}catch(Ht){ut.call({_w:Bt,_d:!1},Ht)}}};tt||(Ge=function(_t){ee(this,Ge,"Promise","_h"),z(_t),Pe.call(this);try{_t(le(mt,this,1),le(ut,this,1))}catch(gt){ut.call(this,gt)}},Pe=function(_t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},Pe.prototype=me("./_redefine-all")(Ge.prototype,{then:function(_t,gt){var Bt=Pt(ie(this,Ge));return Bt.ok=typeof _t!="function"||_t,Bt.fail=typeof gt=="function"&>,Bt.domain=ft?ze.domain:void 0,this._c.push(Bt),this._a&&this._a.push(Bt),this._s&&st(this,!1),Bt.promise},catch:function(_t){return this.then(void 0,_t)}}),he=function(){var _t=new Pe;this.promise=_t,this.resolve=le(mt,_t,1),this.reject=le(ut,_t,1)},ye.f=Pt=function(_t){return _t===Ge||_t===Se?new he(_t):Le(_t)}),de(de.G+de.W+de.F*!tt,{Promise:Ge}),me("./_set-to-string-tag")(Ge,"Promise"),me("./_set-species")("Promise"),Se=me("./_core").Promise,de(de.S+de.F*!tt,"Promise",{reject:function(_t){var gt=Pt(this);return(0,gt.reject)(_t),gt.promise}}),de(de.S+de.F*(xe||!tt),"Promise",{resolve:function(_t){return Ae(xe&&this===Se?Ge:this,_t)}}),de(de.S+de.F*!(tt&&me("./_iter-detect")(function(_t){Ge.all(_t).catch(at)})),"Promise",{all:function(_t){var gt=this,Bt=Pt(gt),Ht=Bt.resolve,hn=Bt.reject,Qt=we(function(){var bn=[],Wt=0,Kt=1;oe(_t,!1,function(Jt){var dn=Wt++,Lt=!1;bn.push(void 0),Kt++,gt.resolve(Jt).then(function(pt){Lt||(Lt=!0,bn[dn]=pt,--Kt||Ht(bn))},hn)}),--Kt||Ht(bn)});return Qt.e&&hn(Qt.v),Bt.promise},race:function(_t){var gt=this,Bt=Pt(gt),Ht=Bt.reject,hn=we(function(){oe(_t,!1,function(Qt){gt.resolve(Qt).then(Bt.resolve,Ht)})});return hn.e&&Ht(hn.v),Bt.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 Pe=me("./_export"),Le=me("./_to-absolute-index"),he=String.fromCharCode,Se=String.fromCodePoint;Pe(Pe.S+Pe.F*(!!Se&&Se.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 Pe=me("./_string-at")(!0);me("./_iter-define")(String,"String",function(Le){this._t=String(Le),this._i=0},function(){var Le,he=this._t,Se=this._i;return Se>=he.length?{value:void 0,done:!0}:(Le=Pe(he,Se),this._i+=Le.length,{value:Le,done:!1})})},{"./_iter-define":88,"./_string-at":119}],146:[function(me,Be,ke){"use strict";var Pe=me("./_global"),Le=me("./_has"),he=me("./_descriptors"),Se=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"),ye=me("./_is-object"),we=me("./_to-iobject"),be=me("./_to-primitive"),Ae=me("./_property-desc"),De=me("./_object-create"),ze=me("./_object-gopn-ext"),Ze=me("./_object-gopd"),Ye=me("./_object-dp"),Ge=me("./_object-keys"),ft=Ze.f,at=Ye.f,Pt=ze.f,tt=Pe.Symbol,vt=Pe.JSON,st=vt&&vt.stringify,jt=z("_hidden"),lt=z("toPrimitive"),et={}.propertyIsEnumerable,ut=ve("symbol-registry"),mt=ve("symbols"),_t=ve("op-symbols"),gt=Object.prototype,Bt=typeof tt=="function",Ht=Pe.QObject,hn=!Ht||!Ht.prototype||!Ht.prototype.findChild,Qt=he&&le(function(){return De(at({},"a",{get:function(){return at(this,"a",{value:7}).a}})).a!=7})?function(We,Oe,Ce){var Ne=ft(gt,Oe);Ne&&delete gt[Oe],at(We,Oe,Ce),Ne&&We!==gt&&at(gt,Oe,Ne)}:at,bn=function(We){var Oe=mt[We]=De(tt.prototype);return Oe._k=We,Oe},Wt=Bt&&typeof tt.iterator=="symbol"?function(We){return typeof We=="symbol"}:function(We){return We instanceof tt},Kt=function(We,Oe,Ce){return We===gt&&Kt(_t,Oe,Ce),ue(We),Oe=be(Oe,!0),ue(Ce),Le(mt,Oe)?(Ce.enumerable?(Le(We,jt)&&We[jt][Oe]&&(We[jt][Oe]=!1),Ce=De(Ce,{enumerable:Ae(0,!1)})):(Le(We,jt)||at(We,jt,Ae(1,{})),We[jt][Oe]=!0),Qt(We,Oe,Ce)):at(We,Oe,Ce)},Jt=function(We,Oe){ue(We);for(var Ce,Ne=ie(Oe=we(Oe)),$e=0,dt=Ne.length;dt>$e;)Kt(We,Ce=Ne[$e++],Oe[Ce]);return We},dn=function(We,Oe){return Oe===void 0?De(We):Jt(De(We),Oe)},Lt=function(We){var Oe=et.call(this,We=be(We,!0));return!(this===gt&&Le(mt,We)&&!Le(_t,We))&&(!(Oe||!Le(this,We)||!Le(mt,We)||Le(this,jt)&&this[jt][We])||Oe)},pt=function(We,Oe){if(We=we(We),Oe=be(Oe,!0),We!==gt||!Le(mt,Oe)||Le(_t,Oe)){var Ce=ft(We,Oe);return!Ce||!Le(mt,Oe)||Le(We,jt)&&We[jt][Oe]||(Ce.enumerable=!0),Ce}},Rt=function(We){for(var Oe,Ce=Pt(we(We)),Ne=[],$e=0;Ce.length>$e;)Le(mt,Oe=Ce[$e++])||Oe==jt||Oe==ge||Ne.push(Oe);return Ne},St=function(We){for(var Oe,Ce=We===gt,Ne=Pt(Ce?_t:we(We)),$e=[],dt=0;Ne.length>dt;)!Le(mt,Oe=Ne[dt++])||Ce&&!Le(gt,Oe)||$e.push(mt[Oe]);return $e};Bt||(tt=function(){if(this instanceof tt)throw TypeError("Symbol is not a constructor!");var We=ce(arguments.length>0?arguments[0]:void 0),Oe=function(Ce){this===gt&&Oe.call(_t,Ce),Le(this,jt)&&Le(this[jt],We)&&(this[jt][We]=!1),Qt(this,We,Ae(1,Ce))};return he&&hn&&Qt(gt,We,{configurable:!0,set:Oe}),bn(We)},xe(tt.prototype,"toString",function(){return this._k}),Ze.f=pt,Ye.f=Kt,me("./_object-gopn").f=ze.f=Rt,me("./_object-pie").f=Lt,me("./_object-gops").f=St,he&&!me("./_library")&&xe(gt,"propertyIsEnumerable",Lt,!0),ee.f=function(We){return bn(z(We))}),Se(Se.G+Se.W+Se.F*!Bt,{Symbol:tt});for(var yt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;yt.length>nt;)z(yt[nt++]);for(var He=Ge(z.store),Ie=0;He.length>Ie;)oe(He[Ie++]);Se(Se.S+Se.F*!Bt,"Symbol",{for:function(We){return Le(ut,We+="")?ut[We]:ut[We]=tt(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}}),Se(Se.S+Se.F*!Bt,"Object",{create:dn,defineProperty:Kt,defineProperties:Jt,getOwnPropertyDescriptor:pt,getOwnPropertyNames:Rt,getOwnPropertySymbols:St}),vt&&Se(Se.S+Se.F*(!Bt||le(function(){var We=tt();return st([We])!="[null]"||st({a:We})!="{}"||st(Object(We))!="{}"})),"JSON",{stringify:function(We){for(var Oe,Ce,Ne=[We],$e=1;arguments.length>$e;)Ne.push(arguments[$e++]);if(Ce=Oe=Ne[1],(ye(Oe)||We!==void 0)&&!Wt(We))return se(Oe)||(Oe=function(dt,Je){if(typeof Ce=="function"&&(Je=Ce.call(this,dt,Je)),!Wt(Je))return Je}),Ne[1]=Oe,st.apply(vt,Ne)}}),tt.prototype[lt]||me("./_hide")(tt.prototype,lt,tt.prototype.valueOf),de(tt,"Symbol"),de(Math,"Math",!0),de(Pe.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 Pe=me("./_export"),Le=me("./_core"),he=me("./_global"),Se=me("./_species-constructor"),xe=me("./_promise-resolve");Pe(Pe.P+Pe.R,"Promise",{finally:function(ge){var le=Se(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 Pe=me("./_export"),Le=me("./_new-promise-capability"),he=me("./_perform");Pe(Pe.S,"Promise",{try:function(Se){var xe=Le.f(this),ge=he(Se);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 Pe=me("./_global"),Le=me("./_hide"),he=me("./_iterators"),Se=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=Pe[le],de=ve&&ve.prototype;de&&!de[Se]&&Le(de,Se,le),he[le]=he.Array}},{"./_global":76,"./_hide":78,"./_iterators":91,"./_wks":131,"./es6.array.iterator":134}],152:[function(me,Be,ke){var Pe=me("./_export"),Le=me("./_task");Pe(Pe.G+Pe.B,{setImmediate:Le.set,clearImmediate:Le.clear})},{"./_export":73,"./_task":120}],153:[function(me,Be,ke){(function(Pe){"use strict";function Le(be){return Array.isArray?Array.isArray(be):ue(be)==="[object Array]"}function he(be){return typeof be=="boolean"}function Se(be){return be===null}function xe(be){return be==null}function ge(be){return typeof be=="number"}function le(be){return typeof be=="string"}function ve(be){return(be===void 0?"undefined":(0,we.default)(be))==="symbol"}function de(be){return be===void 0}function ce(be){return ue(be)==="[object RegExp]"}function z(be){return(be===void 0?"undefined":(0,we.default)(be))==="object"&&be!==null}function ee(be){return ue(be)==="[object Date]"}function oe(be){return ue(be)==="[object Error]"||be instanceof Error}function ie(be){return typeof be=="function"}function se(be){return be===null||typeof be=="boolean"||typeof be=="number"||typeof be=="string"||(be===void 0?"undefined":(0,we.default)(be))==="symbol"||be===void 0}function ue(be){return Object.prototype.toString.call(be)}var ye=me("babel-runtime/helpers/typeof"),we=function(be){return be&&be.__esModule?be:{default:be}}(ye);ke.isArray=Le,ke.isBoolean=he,ke.isNull=Se,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=Pe.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 Pe=me("babel-runtime/helpers/typeof"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Pe);(function(he){function Se(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 ye=ie?"getUTC":"get",we=ee[ye+"Date"](),be=ee[ye+"Day"](),Ae=ee[ye+"Month"](),De=ee[ye+"FullYear"](),ze=ee[ye+"Hours"](),Ze=ee[ye+"Minutes"](),Ye=ee[ye+"Seconds"](),Ge=ee[ye+"Milliseconds"](),ft=ie?0:ee.getTimezoneOffset(),at=xe(ee),Pt=ge(ee),tt={d:we,dd:Se(we),ddd:ve.i18n.dayNames[be],dddd:ve.i18n.dayNames[be+7],m:Ae+1,mm:Se(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:Se(ze%12||12),H:ze,HH:Se(ze),M:Ze,MM:Se(Ze),s:Ye,ss:Se(Ye),l:Se(Ge,3),L:Se(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?"-":"+")+Se(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:Pt};return oe.replace(de,function(vt){return vt in tt?tt[vt]:vt.slice(1,vt.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(Pe){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 Se(){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&&Pe!==void 0&&"env"in Pe&&(le=Pe.env.DEBUG),le}ke=Be.exports=me("./debug"),ke.log=Se,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 Pe(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,ye){if(ue==="%%")return ue;se++;var we=ke.formatters[ye];if(typeof we=="function"){var be=oe[se];ue=we.call(ce,be),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=Pe(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 Se(){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=Se,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 Pe(he){var Se=""+he,xe=Le.exec(Se);if(!xe)return Se;var ge,le="",ve=0,de=0;for(ve=xe.index;ve<Se.length;ve++){switch(Se.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+=Se.substring(de,ve)),de=ve+1,le+=ge}return de!==ve?le+Se.substring(de,ve):le}var Le=/["'&<>]/;Be.exports=Pe},{}],158:[function(me,Be,ke){function Pe(){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 Se(ge){return typeof ge=="object"&&ge!==null}function xe(ge){return ge===void 0}Be.exports=Pe,Pe.EventEmitter=Pe,Pe.prototype._events=void 0,Pe.prototype._maxListeners=void 0,Pe.defaultMaxListeners=10,Pe.prototype.setMaxListeners=function(ge){if(!he(ge)||ge<0||isNaN(ge))throw TypeError("n must be a positive number");return this._maxListeners=ge,this},Pe.prototype.emit=function(ge){var le,ve,de,ce,z,ee;if(this._events||(this._events={}),ge==="error"&&(!this._events.error||Se(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(Se(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},Pe.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]?Se(this._events[ge])?this._events[ge].push(le):this._events[ge]=[this._events[ge],le]:this._events[ge]=le,Se(this._events[ge])&&!this._events[ge].warned&&(ve=xe(this._maxListeners)?Pe.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},Pe.prototype.on=Pe.prototype.addListener,Pe.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},Pe.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(Se(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},Pe.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},Pe.prototype.listeners=function(ge){return this._events&&this._events[ge]?Le(this._events[ge])?[this._events[ge]]:this._events[ge].slice():[]},Pe.prototype.listenerCount=function(ge){if(this._events){var le=this._events[ge];if(Le(le))return 1;if(le)return le.length}return 0},Pe.listenerCount=function(ge,le){return ge.listenerCount(le)}},{}],159:[function(me,Be,ke){var Pe=me("http"),Le=Be.exports;for(var he in Pe)Pe.hasOwnProperty(he)&&(Le[he]=Pe[he]);Le.request=function(Se,xe){return Se||(Se={}),Se.scheme="https",Se.protocol="https:",Pe.request.call(this,Se,xe)}},{http:196}],160:[function(me,Be,ke){"use strict";var Pe=me("util"),Le=me("ms");Be.exports=function(he){if(typeof he=="number")return he;var Se=Le(he);if(Se===void 0){var xe=new Error(Pe.format("humanize-ms(%j) result undefined",he));console.warn(xe.stack)}return Se}},{ms:169,util:207}],161:[function(me,Be,ke){ke.read=function(Pe,Le,he,Se,xe){var ge,le,ve=8*xe-Se-1,de=(1<<ve)-1,ce=de>>1,z=-7,ee=he?xe-1:0,oe=he?-1:1,ie=Pe[Le+ee];for(ee+=oe,ge=ie&(1<<-z)-1,ie>>=-z,z+=ve;z>0;ge=256*ge+Pe[Le+ee],ee+=oe,z-=8);for(le=ge&(1<<-z)-1,ge>>=-z,z+=Se;z>0;le=256*le+Pe[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,Se),ge-=ce}return(ie?-1:1)*le*Math.pow(2,ge-Se)},ke.write=function(Pe,Le,he,Se,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=Se?0:ge-1,se=Se?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;Pe[he+ie]=255&ve,ie+=se,ve/=256,xe-=8);for(le=le<<xe|ve,ce+=xe;ce>0;Pe[he+ie]=255&le,ie+=se,le/=256,ce-=8);Pe[he+ie-se]|=128*ue}},{}],162:[function(me,Be,ke){typeof Object.create=="function"?Be.exports=function(Pe,Le){Pe.super_=Le,Pe.prototype=Object.create(Le.prototype,{constructor:{value:Pe,enumerable:!1,writable:!0,configurable:!0}})}:Be.exports=function(Pe,Le){Pe.super_=Le;var he=function(){};he.prototype=Le.prototype,Pe.prototype=new he,Pe.prototype.constructor=Pe}},{}],163:[function(me,Be,ke){function Pe(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"&&Pe(he.slice(0,0))}Be.exports=function(he){return he!=null&&(Pe(he)||Le(he)||!!he._isBuffer)}},{}],164:[function(me,Be,ke){(function(Pe){function Le(xe){return Se.call(xe).replace(/^[^{]*{\s*/,"").replace(/\s*}[^}]*$/,"")}function he(xe){return typeof xe=="function"&&(/^class(\s|\{\}$)/.test(Se.call(xe))||/^.*classCallCheck\(/.test(Le(xe)))}var Se=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}):Pe.isClass=he})(this)},{}],165:[function(me,Be,ke){"use strict";function Pe(ge){var le=ge.slice(2);return le=le[0].toLowerCase()+le.slice(1)}var Le=me("core-util-is"),he=me("isstream"),Se=me("is-class");Object.keys(Le).map(function(ge){ke[Pe(ge)]=Le[ge]}),ke.stream=he,ke.readableStream=he.isReadable,ke.writableStream=he.isWritable,ke.duplexStream=he.isDuplex,ke.class=Se,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 Pe={}.toString;Be.exports=Array.isArray||function(Le){return Pe.call(Le)=="[object Array]"}},{}],167:[function(me,Be,ke){function Pe(ge){return ge instanceof xe.Stream}function Le(ge){return Pe(ge)&&typeof ge._read=="function"&&typeof ge._readableState=="object"}function he(ge){return Pe(ge)&&typeof ge._write=="function"&&typeof ge._writableState=="object"}function Se(ge){return Le(ge)&&he(ge)}var xe=me("stream");Be.exports=Pe,Be.exports.isReadable=Le,Be.exports.isWritable=he,Be.exports.isDuplex=Se},{stream:195}],168:[function(me,Be,ke){"use strict";function Pe(he,Se,xe){if(!he)throw new TypeError("argument dest is required");if(!Se)throw new TypeError("argument src is required");return xe===void 0&&(xe=!0),Object.getOwnPropertyNames(Se).forEach(function(ge){if(xe||!Le.call(he,ge)){var le=Object.getOwnPropertyDescriptor(Se,ge);Object.defineProperty(he,ge,le)}}),he}Be.exports=Pe;var Le=Object.prototype.hasOwnProperty},{}],169:[function(me,Be,ke){function Pe(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 Se(ce,ve,"day")||Se(ce,le,"hour")||Se(ce,ge,"minute")||Se(ce,xe,"second")||ce+" ms"}function Se(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 Pe(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(Pe){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 Se(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]:Pe.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(Se(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(Se(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(Se(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 ye=se.length-1;ye>=0&&se[ye]==="";ye--);return ue>ye?[]:se.slice(ue,ye-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(Pe){(function(){"use strict";function Le(Ye){return Ye=String(Ye),Ye.charAt(0).toUpperCase()+Ye.slice(1)}function he(Ye,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(Ye)&&!/^Windows Phone /i.test(Ye)&&(at=at[/[\d.]+$/.exec(Ye)])&&(Ye="Windows "+at),Ye=String(Ye),Ge&&ft&&(Ye=Ye.replace(RegExp(Ge,"i"),ft)),Ye=xe(Ye.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 Se(Ye,Ge){var ft=-1,at=Ye?Ye.length:0;if(typeof at=="number"&&at>-1&&at<=we)for(;++ft<at;)Ge(Ye[ft],ft,Ye);else ge(Ye,Ge)}function xe(Ye){return Ye=z(Ye),/^(?:webOS|i(?:OS|P))/.test(Ye)?Ye:Le(Ye)}function ge(Ye,Ge){for(var ft in Ye)De.call(Ye,ft)&&Ge(Ye[ft],ft,Ye)}function le(Ye){return Ye==null?Le(Ye):ze.call(Ye).slice(8,-1)}function ve(Ye,Ge){var ft=Ye!=null?typeof Ye[Ge]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(ft)||ft=="object"&&!Ye[Ge])}function de(Ye){return String(Ye).replace(/([ -])(?!$)/g,"$1?")}function ce(Ye,Ge){var ft=null;return Se(Ye,function(at,Pt){ft=Ge(ft,at,Pt,Ye)}),ft}function z(Ye){return String(Ye).replace(/^ +| +$/g,"")}function ee(Ye){function Ge(We){return ce(We,function(Oe,Ce){var Ne=Ce.pattern||de(Ce);return!Oe&&(Oe=RegExp("\\b"+Ne+" *\\d+[.\\w_]*","i").exec(Ye)||RegExp("\\b"+Ne+" *\\w+-[\\w]*","i").exec(Ye)||RegExp("\\b"+Ne+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(Ye))&&((Oe=String(Ce.label&&!RegExp(Ne,"i").test(Ce.label)?Ce.label:Oe).split("/"))[1]&&!/[\d.]+/.test(Oe[0])&&(Oe[0]+=" "+Oe[1]),Ce=Ce.label||Ce,Oe=xe(Oe[0].replace(RegExp(Ne,"i"),Ce).replace(RegExp("; *(?:"+Ce+"[_-])?","i")," ").replace(RegExp("("+Ce+")[-_.]?(\\w)","i"),"$1 $2"))),Oe})}function ft(){return this.description||""}var at=ie,Pt=Ye&&typeof Ye=="object"&&le(Ye)!="String";Pt&&(at=Ye,Ye=null);var tt=at.navigator||{},vt=tt.userAgent||"";Ye||(Ye=vt);var st,jt,lt=Pt?!!tt.likeChrome:/\bChrome\b/.test(Ye)&&!/internal|\n/i.test(ze.toString()),et=Pt?"Object":"ScriptBridgingProxyObject",ut=Pt?"Object":"Environment",mt=Pt&&at.java?"JavaPackage":le(at.java),_t=Pt?"Object":"RuntimeObject",gt=/\bJava/.test(mt)&&at.java,Bt=gt&&le(at.environment)==ut,Ht=gt?"a":"\u4F2A",hn=gt?"b":"\u5C3E",Qt=at.document||{},bn=at.operamini||at.opera,Wt=be.test(Wt=Pt&&bn?bn["[[Class]]"]:le(bn))?Wt:bn=null,Kt=Ye,Jt=[],dn=null,Lt=Ye==vt,pt=Lt&&bn&&typeof bn.version=="function"&&bn.version(),Rt=function(We){return ce(We,function(Oe,Ce){return Oe||RegExp("\\b"+(Ce.pattern||de(Ce))+"\\b","i").exec(Ye)&&(Ce.label||Ce)})}([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),St=function(We){return ce(We,function(Oe,Ce){return Oe||RegExp("\\b"+(Ce.pattern||de(Ce))+"\\b","i").exec(Ye)&&(Ce.label||Ce)})}(["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"]),yt=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,Ce,Ne){return Oe||(Ce[yt]||Ce[/^[a-z]+(?: +[a-z]+\b)*/i.exec(yt)]||RegExp("\\b"+de(Ne)+"(?:\\b|\\w*\\d)","i").exec(Ye))&&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,Ce){var Ne=Ce.pattern||de(Ce);return!Oe&&(Oe=RegExp("\\b"+Ne+"(?:/[\\d.]+|[ \\w.]*)","i").exec(Ye))&&(Oe=he(Oe,Ne,Ce.label||Ce)),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(Rt&&(Rt=[Rt]),nt&&!yt&&(yt=Ge([nt])),(st=/\bGoogle TV\b/.exec(yt))&&(yt=st[0]),/\bSimulator\b/i.test(Ye)&&(yt=(yt?yt+" ":"")+"Simulator"),St=="Opera Mini"&&/\bOPiOS\b/.test(Ye)&&Jt.push("running in Turbo/Uncompressed mode"),St=="IE"&&/\blike iPhone OS\b/.test(Ye)?(st=ee(Ye.replace(/like iPhone OS/,"")),nt=st.manufacturer,yt=st.product):/^iP/.test(yt)?(St||(St="Safari"),He="iOS"+((st=/ OS ([\d_]+)/i.exec(Ye))?" "+st[1].replace(/_/g,"."):"")):St!="Konqueror"||/buntu/i.test(He)?nt&&nt!="Google"&&(/Chrome/.test(St)&&!/\bMobile Safari\b/i.test(Ye)||/\bVita\b/.test(yt))||/\bAndroid\b/.test(He)&&/^Chrome/.test(St)&&/\bVersion\//i.test(Ye)?(St="Android Browser",He=/\bAndroid\b/.test(He)?He:"Android"):St=="Silk"?(/\bMobi/i.test(Ye)||(He="Android",Jt.unshift("desktop mode")),/Accelerated *= *true/i.test(Ye)&&Jt.unshift("accelerated")):St=="PaleMoon"&&(st=/\bFirefox\/([\d.]+)\b/.exec(Ye))?Jt.push("identifying as Firefox "+st[1]):St=="Firefox"&&(st=/\b(Mobile|Tablet|TV)\b/i.exec(Ye))?(He||(He="Firefox OS"),yt||(yt=st[1])):!St||(st=!/\bMinefield\b/i.test(Ye)&&/\b(?:Firefox|Safari)\b/.exec(St))?(St&&!yt&&/[\/,]|^[^(]+?\)/.test(Ye.slice(Ye.indexOf(st+"/")+8))&&(St=null),(st=yt||nt||He)&&(yt||nt||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(He))&&(St=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(He)?He:st)+" Browser")):St=="Electron"&&(st=(/\bChrome\/([\d.]+)\b/.exec(Ye)||0)[1])&&Jt.push("Chromium "+st):He="Kubuntu",pt||(pt=function(We){return ce(We,function(Oe,Ce){return Oe||(RegExp(Ce+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(Ye)||0)[1]||null})}(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",de(St),"(?:Firefox|Minefield|NetFront)"])),(st=Rt=="iCab"&&parseFloat(pt)>3&&"WebKit"||/\bOpera\b/.test(St)&&(/\bOPR\b/.test(Ye)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(Ye)&&!/^(?:Trident|EdgeHTML)$/.test(Rt)&&"WebKit"||!Rt&&/\bMSIE\b/i.test(Ye)&&(He=="Mac OS"?"Tasman":"Trident")||Rt=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(St)&&"NetFront")&&(Rt=[st]),St=="IE"&&(st=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(Ye)||0)[1])?(St+=" Mobile",He="Windows Phone "+(/\+$/.test(st)?st:st+".x"),Jt.unshift("desktop mode")):/\bWPDesktop\b/i.test(Ye)?(St="IE Mobile",He="Windows Phone 8.x",Jt.unshift("desktop mode"),pt||(pt=(/\brv:([\d.]+)/.exec(Ye)||0)[1])):St!="IE"&&Rt=="Trident"&&(st=/\brv:([\d.]+)/.exec(Ye))&&(St&&Jt.push("identifying as "+St+(pt?" "+pt:"")),St="IE",pt=st[1]),Lt){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")),Bt){try{pt=at.require("ringo/engine").version.join("."),St="RingoJS"}catch(We){(st=at.system)&&st.global.system==at.system&&(St="Narwhal",He||(He=st[0].os||null))}St||(St="Rhino")}else typeof at.process=="object"&&!at.process.browser&&(st=at.process)&&(typeof st.versions=="object"&&(typeof st.versions.electron=="string"?(Jt.push("Node "+st.versions.node),St="Electron",pt=st.versions.electron):typeof st.versions.nw=="string"&&(Jt.push("Chromium "+pt,"Node "+st.versions.node),St="NW.js",pt=st.versions.nw)),St||(St="Node.js",Kt=st.arch,He=st.platform,pt=/[\d.]+/.exec(st.version),pt=pt?pt[0]:null));else le(st=at.runtime)==et?(St="Adobe AIR",He=st.flash.system.Capabilities.os):le(st=at.phantom)==_t?(St="PhantomJS",pt=(st=st.version||null)&&st.major+"."+st.minor+"."+st.patch):typeof Qt.documentMode=="number"&&(st=/\bTrident\/(\d+)/i.exec(Ye))?(pt=[pt,Qt.documentMode],(st=+st[1]+4)!=pt[1]&&(Jt.push("IE "+pt[1]+" mode"),Rt&&(Rt[1]=""),pt[1]=st),pt=St=="IE"?String(pt[1].toFixed(1)):pt[0]):typeof Qt.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(St)&&(Jt.push("masking as "+St+" "+pt),St="IE",pt="11.0",Rt=["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(Ye+";"+(Lt&&tt.appMinorVersion))||/\bMinefield\b/i.test(Ye)&&"a")&&(dn=/b/i.test(st)?"beta":"alpha",pt=pt.replace(RegExp(st+"\\+?$"),"")+(dn=="beta"?hn:Ht)+(/\d+\+?/.exec(st)||"")),St=="Fennec"||St=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(He))St="Firefox Mobile";else if(St=="Maxthon"&&pt)pt=pt.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(yt))yt=="Xbox 360"&&(He=null),yt=="Xbox 360"&&/\bIEMobile\b/.test(Ye)&&Jt.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(St)&&(!St||yt||/Browser|Mobi/.test(St))||He!="Windows CE"&&!/Mobi/i.test(Ye))if(St=="IE"&&Lt)try{at.external===null&&Jt.unshift("platform preview")}catch(We){Jt.unshift("embedded")}else(/\bBlackBerry\b/.test(yt)||/\bBB10\b/.test(Ye))&&(st=(RegExp(yt.replace(/ +/g," *")+"/([.\\d]+)","i").exec(Ye)||0)[1]||pt)?(st=[st,/BB10/.test(Ye)],He=(st[1]?(yt=null,nt="BlackBerry"):"Device Software")+" "+st[0],pt=null):this!=ge&&yt!="Wii"&&(Lt&&bn||/Opera/.test(St)&&/\b(?:MSIE|Firefox)\b/i.test(Ye)||St=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(He)||St=="IE"&&(He&&!/^Win/.test(He)&&pt>5.5||/\bWindows XP\b/.test(He)&&pt>8||pt==8&&!/\bTrident\b/.test(Ye)))&&!be.test(st=ee.call(ge,Ye.replace(be,"")+";"))&&st.name&&(st="ing as "+st.name+((st=st.version)?" "+st:""),be.test(St)?(/\bIE\b/.test(st)&&He=="Mac OS"&&(He=null),st="identify"+st):(st="mask"+st,St=Wt?xe(Wt.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(st)&&(He=null),Lt||(pt=null)),Rt=["Presto"],Jt.push(st));else St+=" Mobile";(st=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(Ye)||0)[1])&&(st=[parseFloat(st.replace(/\.(\d)$/,".0$1")),st],St=="Safari"&&st[1].slice(-1)=="+"?(St="WebKit Nightly",dn="alpha",pt=st[1].slice(0,-1)):pt!=st[1]&&pt!=(st[2]=(/\bSafari\/([\d.]+\+?)/i.exec(Ye)||0)[1])||(pt=null),st[1]=(/\bChrome\/([\d.]+)/i.exec(Ye)||0)[1],st[0]==537.36&&st[2]==537.36&&parseFloat(st[1])>=28&&Rt=="WebKit"&&(Rt=["Blink"]),Lt&&(lt||st[1])?(Rt&&(Rt[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:Rt!="Blink"?"27":"28")):(Rt&&(Rt[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"),Rt&&(Rt[1]+=" "+(st+=typeof st=="number"?".x":/[.+]/.test(st)?"":"+")),St=="Safari"&&(!pt||parseInt(pt)>45)&&(pt=st)),St=="Opera"&&(st=/\bzbov|zvav$/.exec(He))?(St+=" ",Jt.unshift("desktop mode"),st=="zvav"?(St+="Mini",pt=null):St+="Mobile",He=He.replace(RegExp(" *"+st+"$"),"")):St=="Safari"&&/\bChrome\b/.exec(Rt&&Rt[1])&&(Jt.unshift("desktop mode"),St="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&&Ye.indexOf("/"+st+"-")>-1&&(He=z(He.replace(st,""))),Rt&&!/\b(?:Avant|Nook)\b/.test(St)&&(/Browser|Lunascape|Maxthon/.test(St)||St!="Safari"&&/^iOS/.test(He)&&/\bSafari\b/.test(Rt[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(St)&&Rt[1])&&(st=Rt[Rt.length-1])&&Jt.push(st),Jt.length&&(Jt=["("+Jt.join("; ")+")"]),nt&&yt&&yt.indexOf(nt)<0&&Jt.push("on "+nt),yt&&Jt.push((/^on /.test(Jt[Jt.length-1])?"":"on ")+yt),He&&(st=/ ([\d.+]+)$/.exec(He),jt=st&&He.charAt(He.length-st[0].length-1)=="/",He={architecture:32,family:st&&!jt?He.replace(st[0],""):He,version:st?st[1]:null,toString:function(){var We=this.version;return this.family+(We&&!jt?" "+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),"")),St&&(/\bWOW64\b/i.test(Ye)||Lt&&/\w(?:86|32)$/.test(tt.cpuClass||tt.platform)&&!/\bWin64; x64\b/i.test(Ye))&&Jt.unshift("32-bit")):He&&/^OS X/.test(He.family)&&St=="Chrome"&&parseFloat(pt)>=39&&(He.architecture=64),Ye||(Ye=null);var Ie={};return Ie.description=Ye,Ie.layout=Rt&&Rt[0],Ie.manufacturer=nt,Ie.name=St,Ie.prerelease=dn,Ie.product=yt,Ie.ua=Ye,Ie.version=St&&pt,Ie.os=He||{architecture:null,family:null,version:null,toString:function(){return"null"}},Ie.parse=ee,Ie.toString=ft,Ie.version&&Jt.unshift(pt),Ie.name&&Jt.unshift(St),He&&St&&(He!=String(He).split(" ")[0]||He!=St.split(" ")[0]&&!yt)&&Jt.push(yt?"("+He+")":"on "+He),Jt.length&&(Ie.description=Jt.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,ye=se&&ue&&typeof Pe=="object"&&Pe;!ye||ye.global!==ye&&ye.window!==ye&&ye.self!==ye||(ie=ye);var we=Math.pow(2,53)-1,be=/\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(Ye,Ge){se[Ge]=Ye}):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(Pe){"use strict";function Le(he,Se,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 Pe.nextTick(he);case 2:return Pe.nextTick(function(){he.call(null,Se)});case 3:return Pe.nextTick(function(){he.call(null,Se,xe)});case 4:return Pe.nextTick(function(){he.call(null,Se,xe,ge)});default:for(le=new Array(de-1),ve=0;ve<le.length;)le[ve++]=arguments[ve];return Pe.nextTick(function(){he.apply(null,le)})}}!Pe.version||Pe.version.indexOf("v0.")===0||Pe.version.indexOf("v1.")===0&&Pe.version.indexOf("v1.8.")!==0?Be.exports={nextTick:Le}:Be.exports=Pe}).call(this,me("_process"))},{_process:173}],173:[function(me,Be,ke){function Pe(){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===Pe||!de)&&setTimeout)return de=setTimeout,setTimeout(ue,0);try{return de(ue,0)}catch(ye){try{return de.call(null,ue,0)}catch(we){return de.call(this,ue,0)}}}function Se(ue){if(ce===clearTimeout)return clearTimeout(ue);if((ce===Le||!ce)&&clearTimeout)return ce=clearTimeout,clearTimeout(ue);try{return ce(ue)}catch(ye){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 ye=oe.length;ye;){for(ee=oe,oe=[];++se<ye;)ee&&ee[se].run();se=-1,ye=oe.length}ee=null,ie=!1,Se(ue)}}function le(ue,ye){this.fun=ue,this.array=ye}function ve(){}var de,ce,z=Be.exports={};(function(){try{de=typeof setTimeout=="function"?setTimeout:Pe}catch(ue){de=Pe}try{ce=typeof clearTimeout=="function"?clearTimeout:Le}catch(ue){ce=Le}})();var ee,oe=[],ie=!1,se=-1;z.nextTick=function(ue){var ye=new Array(arguments.length-1);if(arguments.length>1)for(var we=1;we<arguments.length;we++)ye[we-1]=arguments[we];oe.push(new le(ue,ye)),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(Pe){(function(Le){function he(mt){throw new RangeError(jt[mt])}function Se(mt,_t){for(var gt=mt.length,Bt=[];gt--;)Bt[gt]=_t(mt[gt]);return Bt}function xe(mt,_t){var gt=mt.split("@"),Bt="";return gt.length>1&&(Bt=gt[0]+"@",mt=gt[1]),mt=mt.replace(st,"."),Bt+Se(mt.split("."),_t).join(".")}function ge(mt){for(var _t,gt,Bt=[],Ht=0,hn=mt.length;Ht<hn;)_t=mt.charCodeAt(Ht++),_t>=55296&&_t<=56319&&Ht<hn?(gt=mt.charCodeAt(Ht++),(64512>)==56320?Bt.push(((1023&_t)<<10)+(1023>)+65536):(Bt.push(_t),Ht--)):Bt.push(_t);return Bt}function le(mt){return Se(mt,function(_t){var gt="";return _t>65535&&(_t-=65536,gt+=ut(_t>>>10&1023|55296),_t=56320|1023&_t),gt+=ut(_t)}).join("")}function ve(mt){return mt-48<10?mt-22:mt-65<26?mt-65:mt-97<26?mt-97:De}function de(mt,_t){return mt+22+75*(mt<26)-((_t!=0)<<5)}function ce(mt,_t,gt){var Bt=0;for(mt=gt?et(mt/Ge):mt>>1,mt+=et(mt/_t);mt>lt*Ze>>1;Bt+=De)mt=et(mt/lt);return et(Bt+(lt+1)*mt/(mt+Ye))}function z(mt){var _t,gt,Bt,Ht,hn,Qt,bn,Wt,Kt,Jt,dn=[],Lt=mt.length,pt=0,Rt=at,St=ft;for(gt=mt.lastIndexOf(Pt),gt<0&&(gt=0),Bt=0;Bt<gt;++Bt)mt.charCodeAt(Bt)>=128&&he("not-basic"),dn.push(mt.charCodeAt(Bt));for(Ht=gt>0?gt+1:0;Ht<Lt;){for(hn=pt,Qt=1,bn=De;Ht>=Lt&&he("invalid-input"),Wt=ve(mt.charCodeAt(Ht++)),(Wt>=De||Wt>et((Ae-pt)/Qt))&&he("overflow"),pt+=Wt*Qt,Kt=bn<=St?ze:bn>=St+Ze?Ze:bn-St,!(Wt<Kt);bn+=De)Jt=De-Kt,Qt>et(Ae/Jt)&&he("overflow"),Qt*=Jt;_t=dn.length+1,St=ce(pt-hn,_t,hn==0),et(pt/_t)>Ae-Rt&&he("overflow"),Rt+=et(pt/_t),pt%=_t,dn.splice(pt++,0,Rt)}return le(dn)}function ee(mt){var _t,gt,Bt,Ht,hn,Qt,bn,Wt,Kt,Jt,dn,Lt,pt,Rt,St,yt=[];for(mt=ge(mt),Lt=mt.length,_t=at,gt=0,hn=ft,Qt=0;Qt<Lt;++Qt)(dn=mt[Qt])<128&&yt.push(ut(dn));for(Bt=Ht=yt.length,Ht&&yt.push(Pt);Bt<Lt;){for(bn=Ae,Qt=0;Qt<Lt;++Qt)(dn=mt[Qt])>=_t&&dn<bn&&(bn=dn);for(pt=Bt+1,bn-_t>et((Ae-gt)/pt)&&he("overflow"),gt+=(bn-_t)*pt,_t=bn,Qt=0;Qt<Lt;++Qt)if(dn=mt[Qt],dn<_t&&++gt>Ae&&he("overflow"),dn==_t){for(Wt=gt,Kt=De;Jt=Kt<=hn?ze:Kt>=hn+Ze?Ze:Kt-hn,!(Wt<Jt);Kt+=De)St=Wt-Jt,Rt=De-Jt,yt.push(ut(de(Jt+St%Rt,0))),Wt=et(St/Rt);yt.push(ut(de(Wt,0))),hn=ce(gt,pt,Bt==Ht),gt=0,++Bt}++gt,++_t}return yt.join("")}function oe(mt){return xe(mt,function(_t){return tt.test(_t)?z(_t.slice(4).toLowerCase()):_t})}function ie(mt){return xe(mt,function(_t){return vt.test(_t)?"xn--"+ee(_t):_t})}var se=typeof ke=="object"&&ke&&!ke.nodeType&&ke,ue=typeof Be=="object"&&Be&&!Be.nodeType&&Be,ye=typeof Pe=="object"&&Pe;ye.global!==ye&&ye.window!==ye&&ye.self!==ye||(Le=ye);var we,be,Ae=2147483647,De=36,ze=1,Ze=26,Ye=38,Ge=700,ft=72,at=128,Pt="-",tt=/^xn--/,vt=/[^\x20-\x7E]/,st=/[\x2E\u3002\uFF0E\uFF61]/g,jt={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,et=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(be in we)we.hasOwnProperty(be)&&(se[be]=we[be]);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 Pe(he,Se){return Object.prototype.hasOwnProperty.call(he,Se)}Be.exports=function(he,Se,xe,ge){Se=Se||"&",xe=xe||"=";var le={};if(typeof he!="string"||he.length===0)return le;var ve=/\+/g;he=he.split(Se);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"),ye=ue.indexOf(xe);ye>=0?(ee=ue.substr(0,ye),oe=ue.substr(ye+1)):(ee=ue,oe=""),ie=decodeURIComponent(ee),se=decodeURIComponent(oe),Pe(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 Pe(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"?Pe(Se(xe),function(de){var ce=encodeURIComponent(Le(de))+le;return he(xe[de])?Pe(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]"},Se=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 Pe(ie){if(!(this instanceof Pe))return new Pe(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 Se=me("babel-runtime/core-js/object/keys"),xe=function(ie){return ie&&ie.__esModule?ie:{default:ie}}(Se),ge=me("process-nextick-args"),le=xe.default||function(ie){var se=[];for(var ue in ie)se.push(ue);return se};Be.exports=Pe;var ve=me("core-util-is");ve.inherits=me("inherits");var de=me("./_stream_readable"),ce=me("./_stream_writable");ve.inherits(Pe,de);for(var z=le(ce.prototype),ee=0;ee<z.length;ee++){var oe=z[ee];Pe.prototype[oe]||(Pe.prototype[oe]=ce.prototype[oe])}Object.defineProperty(Pe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(Pe.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)}}),Pe.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 Pe(Se){if(!(this instanceof Pe))return new Pe(Se);Le.call(this,Se)}Be.exports=Pe;var Le=me("./_stream_transform"),he=me("core-util-is");he.inherits=me("inherits"),he.inherits(Pe,Le),Pe.prototype._transform=function(Se,xe,ge){ge(null,Se)}},{"./_stream_transform":182,"core-util-is":153,inherits:162}],181:[function(me,Be,ke){(function(Pe,Le){"use strict";function he(Lt){return gt.from(Lt)}function Se(Lt){return gt.isBuffer(Lt)||Lt instanceof Bt}function xe(Lt,pt,Rt){if(typeof Lt.prependListener=="function")return Lt.prependListener(pt,Rt);Lt._events&&Lt._events[pt]?ut(Lt._events[pt])?Lt._events[pt].unshift(Rt):Lt._events[pt]=[Rt,Lt._events[pt]]:Lt.on(pt,Rt)}function ge(Lt,pt){et=et||me("./_stream_duplex"),Lt=Lt||{};var Rt=pt instanceof et;this.objectMode=!!Lt.objectMode,Rt&&(this.objectMode=this.objectMode||!!Lt.readableObjectMode);var St=Lt.highWaterMark,yt=Lt.readableHighWaterMark,nt=this.objectMode?16:16384;this.highWaterMark=St||St===0?St:Rt&&(yt||yt===0)?yt: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=Lt.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Lt.encoding&&(bn||(bn=me("string_decoder/").StringDecoder),this.decoder=new bn(Lt.encoding),this.encoding=Lt.encoding)}function le(Lt){if(et=et||me("./_stream_duplex"),!(this instanceof le))return new le(Lt);this._readableState=new ge(Lt,this),this.readable=!0,Lt&&(typeof Lt.read=="function"&&(this._read=Lt.read),typeof Lt.destroy=="function"&&(this._destroy=Lt.destroy)),_t.call(this)}function ve(Lt,pt,Rt,St,yt){var nt=Lt._readableState;if(pt===null)nt.reading=!1,ie(Lt,nt);else{var He;yt||(He=ce(nt,pt)),He?Lt.emit("error",He):nt.objectMode||pt&&pt.length>0?(typeof pt=="string"||nt.objectMode||(0,jt.default)(pt)===gt.prototype||(pt=he(pt)),St?nt.endEmitted?Lt.emit("error",new Error("stream.unshift() after end event")):de(Lt,nt,pt,!0):nt.ended?Lt.emit("error",new Error("stream.push() after EOF")):(nt.reading=!1,nt.decoder&&!Rt?(pt=nt.decoder.write(pt),nt.objectMode||pt.length!==0?de(Lt,nt,pt,!1):ye(Lt,nt)):de(Lt,nt,pt,!1))):St||(nt.reading=!1)}return z(nt)}function de(Lt,pt,Rt,St){pt.flowing&&pt.length===0&&!pt.sync?(Lt.emit("data",Rt),Lt.read(0)):(pt.length+=pt.objectMode?1:Rt.length,St?pt.buffer.unshift(Rt):pt.buffer.push(Rt),pt.needReadable&&se(Lt)),ye(Lt,pt)}function ce(Lt,pt){var Rt;return Se(pt)||typeof pt=="string"||pt===void 0||Lt.objectMode||(Rt=new TypeError("Invalid non-string/buffer chunk")),Rt}function z(Lt){return!Lt.ended&&(Lt.needReadable||Lt.length<Lt.highWaterMark||Lt.length===0)}function ee(Lt){return Lt>=dn?Lt=dn:(Lt--,Lt|=Lt>>>1,Lt|=Lt>>>2,Lt|=Lt>>>4,Lt|=Lt>>>8,Lt|=Lt>>>16,Lt++),Lt}function oe(Lt,pt){return Lt<=0||pt.length===0&&pt.ended?0:pt.objectMode?1:Lt!==Lt?pt.flowing&&pt.length?pt.buffer.head.data.length:pt.length:(Lt>pt.highWaterMark&&(pt.highWaterMark=ee(Lt)),Lt<=pt.length?Lt:pt.ended?pt.length:(pt.needReadable=!0,0))}function ie(Lt,pt){if(!pt.ended){if(pt.decoder){var Rt=pt.decoder.end();Rt&&Rt.length&&(pt.buffer.push(Rt),pt.length+=pt.objectMode?1:Rt.length)}pt.ended=!0,se(Lt)}}function se(Lt){var pt=Lt._readableState;pt.needReadable=!1,pt.emittedReadable||(Qt("emitReadable",pt.flowing),pt.emittedReadable=!0,pt.sync?lt.nextTick(ue,Lt):ue(Lt))}function ue(Lt){Qt("emit readable"),Lt.emit("readable"),Ze(Lt)}function ye(Lt,pt){pt.readingMore||(pt.readingMore=!0,lt.nextTick(we,Lt,pt))}function we(Lt,pt){for(var Rt=pt.length;!pt.reading&&!pt.flowing&&!pt.ended&&pt.length<pt.highWaterMark&&(Qt("maybeReadMore read 0"),Lt.read(0),Rt!==pt.length);)Rt=pt.length;pt.readingMore=!1}function be(Lt){return function(){var pt=Lt._readableState;Qt("pipeOnDrain",pt.awaitDrain),pt.awaitDrain&&pt.awaitDrain--,pt.awaitDrain===0&&mt(Lt,"data")&&(pt.flowing=!0,Ze(Lt))}}function Ae(Lt){Qt("readable nexttick read 0"),Lt.read(0)}function De(Lt,pt){pt.resumeScheduled||(pt.resumeScheduled=!0,lt.nextTick(ze,Lt,pt))}function ze(Lt,pt){pt.reading||(Qt("resume read 0"),Lt.read(0)),pt.resumeScheduled=!1,pt.awaitDrain=0,Lt.emit("resume"),Ze(Lt),pt.flowing&&!pt.reading&&Lt.read(0)}function Ze(Lt){var pt=Lt._readableState;for(Qt("flow",pt.flowing);pt.flowing&&Lt.read()!==null;);}function Ye(Lt,pt){if(pt.length===0)return null;var Rt;return pt.objectMode?Rt=pt.buffer.shift():!Lt||Lt>=pt.length?(Rt=pt.decoder?pt.buffer.join(""):pt.buffer.length===1?pt.buffer.head.data:pt.buffer.concat(pt.length),pt.buffer.clear()):Rt=Ge(Lt,pt.buffer,pt.decoder),Rt}function Ge(Lt,pt,Rt){var St;return Lt<pt.head.data.length?(St=pt.head.data.slice(0,Lt),pt.head.data=pt.head.data.slice(Lt)):St=Lt===pt.head.data.length?pt.shift():Rt?ft(Lt,pt):at(Lt,pt),St}function ft(Lt,pt){var Rt=pt.head,St=1,yt=Rt.data;for(Lt-=yt.length;Rt=Rt.next;){var nt=Rt.data,He=Lt>nt.length?nt.length:Lt;if(He===nt.length?yt+=nt:yt+=nt.slice(0,Lt),(Lt-=He)===0){He===nt.length?(++St,Rt.next?pt.head=Rt.next:pt.head=pt.tail=null):(pt.head=Rt,Rt.data=nt.slice(He));break}++St}return pt.length-=St,yt}function at(Lt,pt){var Rt=gt.allocUnsafe(Lt),St=pt.head,yt=1;for(St.data.copy(Rt),Lt-=St.data.length;St=St.next;){var nt=St.data,He=Lt>nt.length?nt.length:Lt;if(nt.copy(Rt,Rt.length-Lt,0,He),(Lt-=He)===0){He===nt.length?(++yt,St.next?pt.head=St.next:pt.head=pt.tail=null):(pt.head=St,St.data=nt.slice(He));break}++yt}return pt.length-=yt,Rt}function Pt(Lt){var pt=Lt._readableState;if(pt.length>0)throw new Error('"endReadable()" called on non-empty stream');pt.endEmitted||(pt.ended=!0,lt.nextTick(tt,pt,Lt))}function tt(Lt,pt){Lt.endEmitted||Lt.length!==0||(Lt.endEmitted=!0,pt.readable=!1,pt.emit("end"))}function vt(Lt,pt){for(var Rt=0,St=Lt.length;Rt<St;Rt++)if(Lt[Rt]===pt)return Rt;return-1}var st=me("babel-runtime/core-js/object/get-prototype-of"),jt=function(Lt){return Lt&&Lt.__esModule?Lt:{default:Lt}}(st),lt=me("process-nextick-args");Be.exports=le;var et,ut=me("isarray");le.ReadableState=ge;var mt=(me("events").EventEmitter,function(Lt,pt){return Lt.listeners(pt).length}),_t=me("./internal/streams/stream"),gt=me("safe-buffer").Buffer,Bt=Le.Uint8Array||function(){},Ht=me("core-util-is");Ht.inherits=me("inherits");var hn=me("util"),Qt=void 0;Qt=hn&&hn.debuglog?hn.debuglog("stream"):function(){};var bn,Wt=me("./internal/streams/BufferList"),Kt=me("./internal/streams/destroy");Ht.inherits(le,_t);var Jt=["error","close","destroy","pause","resume"];Object.defineProperty(le.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(Lt){this._readableState&&(this._readableState.destroyed=Lt)}}),le.prototype.destroy=Kt.destroy,le.prototype._undestroy=Kt.undestroy,le.prototype._destroy=function(Lt,pt){this.push(null),pt(Lt)},le.prototype.push=function(Lt,pt){var Rt,St=this._readableState;return St.objectMode?Rt=!0:typeof Lt=="string"&&(pt=pt||St.defaultEncoding,pt!==St.encoding&&(Lt=gt.from(Lt,pt),pt=""),Rt=!0),ve(this,Lt,pt,!1,Rt)},le.prototype.unshift=function(Lt){return ve(this,Lt,null,!0,!1)},le.prototype.isPaused=function(){return this._readableState.flowing===!1},le.prototype.setEncoding=function(Lt){return bn||(bn=me("string_decoder/").StringDecoder),this._readableState.decoder=new bn(Lt),this._readableState.encoding=Lt,this};var dn=8388608;le.prototype.read=function(Lt){Qt("read",Lt),Lt=parseInt(Lt,10);var pt=this._readableState,Rt=Lt;if(Lt!==0&&(pt.emittedReadable=!1),Lt===0&&pt.needReadable&&(pt.length>=pt.highWaterMark||pt.ended))return Qt("read: emitReadable",pt.length,pt.ended),pt.length===0&&pt.ended?Pt(this):se(this),null;if((Lt=oe(Lt,pt))===0&&pt.ended)return pt.length===0&&Pt(this),null;var St=pt.needReadable;Qt("need readable",St),(pt.length===0||pt.length-Lt<pt.highWaterMark)&&(St=!0,Qt("length less than watermark",St)),pt.ended||pt.reading?(St=!1,Qt("reading or ended",St)):St&&(Qt("do read"),pt.reading=!0,pt.sync=!0,pt.length===0&&(pt.needReadable=!0),this._read(pt.highWaterMark),pt.sync=!1,pt.reading||(Lt=oe(Rt,pt)));var yt;return yt=Lt>0?Ye(Lt,pt):null,yt===null?(pt.needReadable=!0,Lt=0):pt.length-=Lt,pt.length===0&&(pt.ended||(pt.needReadable=!0),Rt!==Lt&&pt.ended&&Pt(this)),yt!==null&&this.emit("data",yt),yt},le.prototype._read=function(Lt){this.emit("error",new Error("_read() is not implemented"))},le.prototype.pipe=function(Lt,pt){function Rt(yn,rn){Qt("onunpipe"),yn===Ce&&rn&&rn.hasUnpiped===!1&&(rn.hasUnpiped=!0,yt())}function St(){Qt("onend"),Lt.end()}function yt(){Qt("cleanup"),Lt.removeListener("close",Ie),Lt.removeListener("finish",We),Lt.removeListener("drain",Je),Lt.removeListener("error",He),Lt.removeListener("unpipe",Rt),Ce.removeListener("end",St),Ce.removeListener("end",Oe),Ce.removeListener("data",nt),Tt=!0,!Ne.awaitDrain||Lt._writableState&&!Lt._writableState.needDrain||Je()}function nt(yn){Qt("ondata"),qt=!1,Lt.write(yn)!==!1||qt||((Ne.pipesCount===1&&Ne.pipes===Lt||Ne.pipesCount>1&&vt(Ne.pipes,Lt)!==-1)&&!Tt&&(Qt("false write response, pause",Ce._readableState.awaitDrain),Ce._readableState.awaitDrain++,qt=!0),Ce.pause())}function He(yn){Qt("onerror",yn),Oe(),Lt.removeListener("error",He),mt(Lt,"error")===0&&Lt.emit("error",yn)}function Ie(){Lt.removeListener("finish",We),Oe()}function We(){Qt("onfinish"),Lt.removeListener("close",Ie),Oe()}function Oe(){Qt("unpipe"),Ce.unpipe(Lt)}var Ce=this,Ne=this._readableState;switch(Ne.pipesCount){case 0:Ne.pipes=Lt;break;case 1:Ne.pipes=[Ne.pipes,Lt];break;default:Ne.pipes.push(Lt)}Ne.pipesCount+=1,Qt("pipe count=%d opts=%j",Ne.pipesCount,pt);var $e=(!pt||pt.end!==!1)&&Lt!==Pe.stdout&&Lt!==Pe.stderr,dt=$e?St:Oe;Ne.endEmitted?lt.nextTick(dt):Ce.once("end",dt),Lt.on("unpipe",Rt);var Je=be(Ce);Lt.on("drain",Je);var Tt=!1,qt=!1;return Ce.on("data",nt),xe(Lt,"error",He),Lt.once("close",Ie),Lt.once("finish",We),Lt.emit("pipe",Ce),Ne.flowing||(Qt("pipe resume"),Ce.resume()),Lt},le.prototype.unpipe=function(Lt){var pt=this._readableState,Rt={hasUnpiped:!1};if(pt.pipesCount===0)return this;if(pt.pipesCount===1)return Lt&&Lt!==pt.pipes?this:(Lt||(Lt=pt.pipes),pt.pipes=null,pt.pipesCount=0,pt.flowing=!1,Lt&&Lt.emit("unpipe",this,Rt),this);if(!Lt){var St=pt.pipes,yt=pt.pipesCount;pt.pipes=null,pt.pipesCount=0,pt.flowing=!1;for(var nt=0;nt<yt;nt++)St[nt].emit("unpipe",this,Rt);return this}var He=vt(pt.pipes,Lt);return He===-1?this:(pt.pipes.splice(He,1),pt.pipesCount-=1,pt.pipesCount===1&&(pt.pipes=pt.pipes[0]),Lt.emit("unpipe",this,Rt),this)},le.prototype.on=function(Lt,pt){var Rt=_t.prototype.on.call(this,Lt,pt);if(Lt==="data")this._readableState.flowing!==!1&&this.resume();else if(Lt==="readable"){var St=this._readableState;St.endEmitted||St.readableListening||(St.readableListening=St.needReadable=!0,St.emittedReadable=!1,St.reading?St.length&&se(this):lt.nextTick(Ae,this))}return Rt},le.prototype.addListener=le.prototype.on,le.prototype.resume=function(){var Lt=this._readableState;return Lt.flowing||(Qt("resume"),Lt.flowing=!0,De(this,Lt)),this},le.prototype.pause=function(){return Qt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Qt("pause"),this._readableState.flowing=!1,this.emit("pause")),this},le.prototype.wrap=function(Lt){var pt=this,Rt=this._readableState,St=!1;Lt.on("end",function(){if(Qt("wrapped end"),Rt.decoder&&!Rt.ended){var He=Rt.decoder.end();He&&He.length&&pt.push(He)}pt.push(null)}),Lt.on("data",function(He){Qt("wrapped data"),Rt.decoder&&(He=Rt.decoder.write(He)),(!Rt.objectMode||He!=null)&&(Rt.objectMode||He&&He.length)&&(pt.push(He)||(St=!0,Lt.pause()))});for(var yt in Lt)this[yt]===void 0&&typeof Lt[yt]=="function"&&(this[yt]=function(He){return function(){return Lt[He].apply(Lt,arguments)}}(yt));for(var nt=0;nt<Jt.length;nt++)Lt.on(Jt[nt],this.emit.bind(this,Jt[nt]));return this._read=function(He){Qt("wrapped _read",He),St&&(St=!1,Lt.resume())},this},Object.defineProperty(le.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),le._fromList=Ye}).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 Pe(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:Pe.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){Se(le,ve,de)}):Se(this,null,null)}function Se(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(Pe,Le){"use strict";function he(Kt){return Kt&&Kt.__esModule?Kt:{default:Kt}}function Se(Kt){var Jt=this;this.next=null,this.entry=null,this.finish=function(){ft(Jt,Kt)}}function xe(Kt){return hn.from(Kt)}function ge(Kt){return hn.isBuffer(Kt)||Kt instanceof Qt}function le(){}function ve(Kt,Jt){mt=mt||me("./_stream_duplex"),Kt=Kt||{};var dn=Jt instanceof mt;this.objectMode=!!Kt.objectMode,dn&&(this.objectMode=this.objectMode||!!Kt.writableObjectMode);var Lt=Kt.highWaterMark,pt=Kt.writableHighWaterMark,Rt=this.objectMode?16:16384;this.highWaterMark=Lt||Lt===0?Lt:dn&&(pt||pt===0)?pt:Rt,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 St=Kt.decodeStrings===!1;this.decodeStrings=!St,this.defaultEncoding=Kt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(yt){ye(Jt,yt)},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 Se(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,Jt){var dn=new Error("write after end");Kt.emit("error",dn),ut.nextTick(Jt,dn)}function z(Kt,Jt,dn,Lt){var pt=!0,Rt=!1;return dn===null?Rt=new TypeError("May not write null values to stream"):typeof dn=="string"||dn===void 0||Jt.objectMode||(Rt=new TypeError("Invalid non-string/buffer chunk")),Rt&&(Kt.emit("error",Rt),ut.nextTick(Lt,Rt),pt=!1),pt}function ee(Kt,Jt,dn){return Kt.objectMode||Kt.decodeStrings===!1||typeof Jt!="string"||(Jt=hn.from(Jt,dn)),Jt}function oe(Kt,Jt,dn,Lt,pt,Rt){if(!dn){var St=ee(Jt,Lt,pt);Lt!==St&&(dn=!0,pt="buffer",Lt=St)}var yt=Jt.objectMode?1:Lt.length;Jt.length+=yt;var nt=Jt.length<Jt.highWaterMark;if(nt||(Jt.needDrain=!0),Jt.writing||Jt.corked){var He=Jt.lastBufferedRequest;Jt.lastBufferedRequest={chunk:Lt,encoding:pt,isBuf:dn,callback:Rt,next:null},He?He.next=Jt.lastBufferedRequest:Jt.bufferedRequest=Jt.lastBufferedRequest,Jt.bufferedRequestCount+=1}else ie(Kt,Jt,!1,yt,Lt,pt,Rt);return nt}function ie(Kt,Jt,dn,Lt,pt,Rt,St){Jt.writelen=Lt,Jt.writecb=St,Jt.writing=!0,Jt.sync=!0,dn?Kt._writev(pt,Jt.onwrite):Kt._write(pt,Rt,Jt.onwrite),Jt.sync=!1}function se(Kt,Jt,dn,Lt,pt){--Jt.pendingcb,dn?(ut.nextTick(pt,Lt),ut.nextTick(Ye,Kt,Jt),Kt._writableState.errorEmitted=!0,Kt.emit("error",Lt)):(pt(Lt),Kt._writableState.errorEmitted=!0,Kt.emit("error",Lt),Ye(Kt,Jt))}function ue(Kt){Kt.writing=!1,Kt.writecb=null,Kt.length-=Kt.writelen,Kt.writelen=0}function ye(Kt,Jt){var dn=Kt._writableState,Lt=dn.sync,pt=dn.writecb;if(ue(dn),Jt)se(Kt,dn,Lt,Jt,pt);else{var Rt=De(dn);Rt||dn.corked||dn.bufferProcessing||!dn.bufferedRequest||Ae(Kt,dn),Lt?_t(we,Kt,dn,Rt,pt):we(Kt,dn,Rt,pt)}}function we(Kt,Jt,dn,Lt){dn||be(Kt,Jt),Jt.pendingcb--,Lt(),Ye(Kt,Jt)}function be(Kt,Jt){Jt.length===0&&Jt.needDrain&&(Jt.needDrain=!1,Kt.emit("drain"))}function Ae(Kt,Jt){Jt.bufferProcessing=!0;var dn=Jt.bufferedRequest;if(Kt._writev&&dn&&dn.next){var Lt=Jt.bufferedRequestCount,pt=new Array(Lt),Rt=Jt.corkedRequestsFree;Rt.entry=dn;for(var St=0,yt=!0;dn;)pt[St]=dn,dn.isBuf||(yt=!1),dn=dn.next,St+=1;pt.allBuffers=yt,ie(Kt,Jt,!0,Jt.length,pt,"",Rt.finish),Jt.pendingcb++,Jt.lastBufferedRequest=null,Rt.next?(Jt.corkedRequestsFree=Rt.next,Rt.next=null):Jt.corkedRequestsFree=new Se(Jt),Jt.bufferedRequestCount=0}else{for(;dn;){var nt=dn.chunk,He=dn.encoding,Ie=dn.callback;if(ie(Kt,Jt,!1,Jt.objectMode?1:nt.length,nt,He,Ie),dn=dn.next,Jt.bufferedRequestCount--,Jt.writing)break}dn===null&&(Jt.lastBufferedRequest=null)}Jt.bufferedRequest=dn,Jt.bufferProcessing=!1}function De(Kt){return Kt.ending&&Kt.length===0&&Kt.bufferedRequest===null&&!Kt.finished&&!Kt.writing}function ze(Kt,Jt){Kt._final(function(dn){Jt.pendingcb--,dn&&Kt.emit("error",dn),Jt.prefinished=!0,Kt.emit("prefinish"),Ye(Kt,Jt)})}function Ze(Kt,Jt){Jt.prefinished||Jt.finalCalled||(typeof Kt._final=="function"?(Jt.pendingcb++,Jt.finalCalled=!0,ut.nextTick(ze,Kt,Jt)):(Jt.prefinished=!0,Kt.emit("prefinish")))}function Ye(Kt,Jt){var dn=De(Jt);return dn&&(Ze(Kt,Jt),Jt.pendingcb===0&&(Jt.finished=!0,Kt.emit("finish"))),dn}function Ge(Kt,Jt,dn){Jt.ending=!0,Ye(Kt,Jt),dn&&(Jt.finished?ut.nextTick(dn):Kt.once("finish",dn)),Jt.ended=!0,Kt.writable=!1}function ft(Kt,Jt,dn){var Lt=Kt.entry;for(Kt.entry=null;Lt;){var pt=Lt.callback;Jt.pendingcb--,pt(dn),Lt=Lt.next}Jt.corkedRequestsFree?Jt.corkedRequestsFree.next=Kt:Jt.corkedRequestsFree=Kt}var at=me("babel-runtime/core-js/object/define-property"),Pt=he(at),tt=me("babel-runtime/core-js/symbol/has-instance"),vt=he(tt),st=me("babel-runtime/core-js/symbol"),jt=he(st),lt=me("babel-runtime/core-js/set-immediate"),et=he(lt),ut=me("process-nextick-args");Be.exports=de;var mt,_t=!Pe.browser&&["v0.10","v0.9."].indexOf(Pe.version.slice(0,5))>-1?et.default:ut.nextTick;de.WritableState=ve;var gt=me("core-util-is");gt.inherits=me("inherits");var Bt={deprecate:me("util-deprecate")},Ht=me("./internal/streams/stream"),hn=me("safe-buffer").Buffer,Qt=Le.Uint8Array||function(){},bn=me("./internal/streams/destroy");gt.inherits(de,Ht),ve.prototype.getBuffer=function(){for(var Kt=this.bufferedRequest,Jt=[];Kt;)Jt.push(Kt),Kt=Kt.next;return Jt},function(){try{Object.defineProperty(ve.prototype,"buffer",{get:Bt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(Kt){}}();var Wt;typeof jt.default=="function"&&vt.default&&typeof Function.prototype[vt.default]=="function"?(Wt=Function.prototype[vt.default],(0,Pt.default)(de,vt.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,Jt,dn){var Lt=this._writableState,pt=!1,Rt=!Lt.objectMode&&ge(Kt);return Rt&&!hn.isBuffer(Kt)&&(Kt=xe(Kt)),typeof Jt=="function"&&(dn=Jt,Jt=null),Rt?Jt="buffer":Jt||(Jt=Lt.defaultEncoding),typeof dn!="function"&&(dn=le),Lt.ended?ce(this,dn):(Rt||z(this,Lt,Kt,dn))&&(Lt.pendingcb++,pt=oe(this,Lt,Rt,Kt,Jt,dn)),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,Jt,dn){dn(new Error("_write() is not implemented"))},de.prototype._writev=null,de.prototype.end=function(Kt,Jt,dn){var Lt=this._writableState;typeof Kt=="function"?(dn=Kt,Kt=null,Jt=null):typeof Jt=="function"&&(dn=Jt,Jt=null),Kt!=null&&this.write(Kt,Jt),Lt.corked&&(Lt.corked=1,this.uncork()),Lt.ending||Lt.finished||Ge(this,Lt,dn)},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,Jt){this.end(),Jt(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 Pe(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,Se=me("util");Be.exports=function(){function xe(){Pe(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}(),Se&&Se.inspect&&Se.inspect.custom&&(Be.exports.prototype[Se.inspect.custom]=function(){var xe=Se.inspect({length:this.length});return this.constructor.name+" "+xe})},{"safe-buffer":193,util:36}],185:[function(me,Be,ke){"use strict";function Pe(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||Se.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?(Se.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 Se=me("process-nextick-args");Be.exports={destroy:Pe,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 Pe=function(){return this}()||Function("return this")(),Le=Pe.regeneratorRuntime&&Object.getOwnPropertyNames(Pe).indexOf("regeneratorRuntime")>=0,he=Le&&Pe.regeneratorRuntime;if(Pe.regeneratorRuntime=void 0,Be.exports=me("./runtime"),Le)Pe.regeneratorRuntime=he;else try{delete Pe.regeneratorRuntime}catch(Se){Pe.regeneratorRuntime=void 0}},{"./runtime":192}],192:[function(me,Be,ke){(function(Pe){"use strict";function Le(et,ut,mt,_t){var gt=ut&&ut.prototype instanceof Se?ut:Se,Bt=Object.create(gt.prototype),Ht=new oe(_t||[]);return Bt._invoke=de(et,mt,Ht),Bt}function he(et,ut,mt){try{return{type:"normal",arg:et.call(ut,mt)}}catch(_t){return{type:"throw",arg:_t}}}function Se(){}function xe(){}function ge(){}function le(et){["next","throw","return"].forEach(function(ut){et[ut]=function(mt){return this._invoke(ut,mt)}})}function ve(et){function ut(gt,Bt,Ht,hn){var Qt=he(et[gt],et,Bt);if(Qt.type!=="throw"){var bn=Qt.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(Qt.arg)}function mt(gt,Bt){function Ht(){return new Promise(function(hn,Qt){ut(gt,Bt,hn,Qt)})}return _t=_t?_t.then(Ht,Ht):Ht()}var _t;this._invoke=mt}function de(et,ut,mt){var _t=Ge;return function(gt,Bt){if(_t===at)throw new Error("Generator is already running");if(_t===Pt){if(gt==="throw")throw Bt;return se()}for(mt.method=gt,mt.arg=Bt;;){var Ht=mt.delegate;if(Ht){var hn=ce(Ht,mt);if(hn){if(hn===tt)continue;return hn}}if(mt.method==="next")mt.sent=mt._sent=mt.arg;else if(mt.method==="throw"){if(_t===Ge)throw _t=Pt,mt.arg;mt.dispatchException(mt.arg)}else mt.method==="return"&&mt.abrupt("return",mt.arg);_t=at;var Qt=he(et,ut,mt);if(Qt.type==="normal"){if(_t=mt.done?Pt:ft,Qt.arg===tt)continue;return{value:Qt.arg,done:mt.done}}Qt.type==="throw"&&(_t=Pt,mt.method="throw",mt.arg=Qt.arg)}}}function ce(et,ut){var mt=et.iterator[ut.method];if(mt===ue){if(ut.delegate=null,ut.method==="throw"){if(et.iterator.return&&(ut.method="return",ut.arg=ue,ce(et,ut),ut.method==="throw"))return tt;ut.method="throw",ut.arg=new TypeError("The iterator does not provide a 'throw' method")}return tt}var _t=he(mt,et.iterator,ut.arg);if(_t.type==="throw")return ut.method="throw",ut.arg=_t.arg,ut.delegate=null,tt;var gt=_t.arg;return gt?gt.done?(ut[et.resultName]=gt.value,ut.next=et.nextLoc,ut.method!=="return"&&(ut.method="next",ut.arg=ue),ut.delegate=null,tt):gt:(ut.method="throw",ut.arg=new TypeError("iterator result is not an object"),ut.delegate=null,tt)}function z(et){var ut={tryLoc:et[0]};1 in et&&(ut.catchLoc=et[1]),2 in et&&(ut.finallyLoc=et[2],ut.afterLoc=et[3]),this.tryEntries.push(ut)}function ee(et){var ut=et.completion||{};ut.type="normal",delete ut.arg,et.completion=ut}function oe(et){this.tryEntries=[{tryLoc:"root"}],et.forEach(z,this),this.reset(!0)}function ie(et){if(et){var ut=et[Ae];if(ut)return ut.call(et);if(typeof et.next=="function")return et;if(!isNaN(et.length)){var mt=-1,_t=function gt(){for(;++mt<et.length;)if(we.call(et,mt))return gt.value=et[mt],gt.done=!1,gt;return gt.value=ue,gt.done=!0,gt};return _t.next=_t}}return{next:se}}function se(){return{value:ue,done:!0}}var ue,ye=Object.prototype,we=ye.hasOwnProperty,be=typeof Symbol=="function"?Symbol:{},Ae=be.iterator||"@@iterator",De=be.asyncIterator||"@@asyncIterator",ze=be.toStringTag||"@@toStringTag",Ze=typeof Be=="object",Ye=Pe.regeneratorRuntime;if(Ye)return void(Ze&&(Be.exports=Ye));Ye=Pe.regeneratorRuntime=Ze?Be.exports:{},Ye.wrap=Le;var Ge="suspendedStart",ft="suspendedYield",at="executing",Pt="completed",tt={},vt={};vt[Ae]=function(){return this};var st=Object.getPrototypeOf,jt=st&&st(st(ie([])));jt&&jt!==ye&&we.call(jt,Ae)&&(vt=jt);var lt=ge.prototype=Se.prototype=Object.create(vt);xe.prototype=lt.constructor=ge,ge.constructor=xe,ge[ze]=xe.displayName="GeneratorFunction",Ye.isGeneratorFunction=function(et){var ut=typeof et=="function"&&et.constructor;return!!ut&&(ut===xe||(ut.displayName||ut.name)==="GeneratorFunction")},Ye.mark=function(et){return Object.setPrototypeOf?Object.setPrototypeOf(et,ge):(et.__proto__=ge,ze in et||(et[ze]="GeneratorFunction")),et.prototype=Object.create(lt),et},Ye.awrap=function(et){return{__await:et}},le(ve.prototype),ve.prototype[De]=function(){return this},Ye.AsyncIterator=ve,Ye.async=function(et,ut,mt,_t){var gt=new ve(Le(et,ut,mt,_t));return Ye.isGeneratorFunction(ut)?gt:gt.next().then(function(Bt){return Bt.done?Bt.value:gt.next()})},le(lt),lt[ze]="Generator",lt[Ae]=function(){return this},lt.toString=function(){return"[object Generator]"},Ye.keys=function(et){var ut=[];for(var mt in et)ut.push(mt);return ut.reverse(),function _t(){for(;ut.length;){var gt=ut.pop();if(gt in et)return _t.value=gt,_t.done=!1,_t}return _t.done=!0,_t}},Ye.values=ie,oe.prototype={constructor:oe,reset:function(et){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),!et)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 et=this.tryEntries[0],ut=et.completion;if(ut.type==="throw")throw ut.arg;return this.rval},dispatchException:function(et){function ut(Qt,bn){return Bt.type="throw",Bt.arg=et,mt.next=Qt,bn&&(mt.method="next",mt.arg=ue),!!bn}if(this.done)throw et;for(var mt=this,_t=this.tryEntries.length-1;_t>=0;--_t){var gt=this.tryEntries[_t],Bt=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(et,ut){for(var mt=this.tryEntries.length-1;mt>=0;--mt){var _t=this.tryEntries[mt];if(_t.tryLoc<=this.prev&&we.call(_t,"finallyLoc")&&this.prev<_t.finallyLoc){var gt=_t;break}}gt&&(et==="break"||et==="continue")&>.tryLoc<=ut&&ut<=gt.finallyLoc&&(gt=null);var Bt=gt?gt.completion:{};return Bt.type=et,Bt.arg=ut,gt?(this.method="next",this.next=gt.finallyLoc,tt):this.complete(Bt)},complete:function(et,ut){if(et.type==="throw")throw et.arg;return et.type==="break"||et.type==="continue"?this.next=et.arg:et.type==="return"?(this.rval=this.arg=et.arg,this.method="return",this.next="end"):et.type==="normal"&&ut&&(this.next=ut),tt},finish:function(et){for(var ut=this.tryEntries.length-1;ut>=0;--ut){var mt=this.tryEntries[ut];if(mt.finallyLoc===et)return this.complete(mt.completion,mt.afterLoc),ee(mt),tt}},catch:function(et){for(var ut=this.tryEntries.length-1;ut>=0;--ut){var mt=this.tryEntries[ut];if(mt.tryLoc===et){var _t=mt.completion;if(_t.type==="throw"){var gt=_t.arg;ee(mt)}return gt}}throw new Error("illegal catch attempt")},delegateYield:function(et,ut,mt){return this.delegate={iterator:ie(et),resultName:ut,nextLoc:mt},this.method==="next"&&(this.arg=ue),tt}}})(function(){return this}()||Function("return this")())},{}],193:[function(me,Be,ke){function Pe(xe,ge){for(var le in xe)ge[le]=xe[le]}function Le(xe,ge,le){return Se(xe,ge,le)}var he=me("buffer"),Se=he.Buffer;Se.from&&Se.alloc&&Se.allocUnsafe&&Se.allocUnsafeSlow?Be.exports=he:(Pe(he,ke),ke.Buffer=Le),Pe(Se,Le),Le.from=function(xe,ge,le){if(typeof xe=="number")throw new TypeError("Argument must not be a number");return Se(xe,ge,le)},Le.alloc=function(xe,ge,le){if(typeof xe!="number")throw new TypeError("Argument must be a number");var ve=Se(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 Se(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(Pe){"use strict";function Le(se){return se&&se.__esModule?se:{default:se}}var he=me("babel-runtime/core-js/string/from-code-point"),Se=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,Ce){if(!(this instanceof ue))return new ue(Oe,Ce);var Ne=this;we(Ne),Ne.q=Ne.c="",Ne.bufferCheckPosition=se.MAX_BUFFER_LENGTH,Ne.opt=Ce||{},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)(Rt)),Ne.trackPosition=Ne.opt.position!==!1,Ne.trackPosition&&(Ne.position=Ne.line=Ne.column=0),at(Ne,"onready")}function ye(Oe){for(var Ce=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>Ce)switch(bn[$e]){case"textNode":tt(Oe);break;case"cdata":Pt(Oe,"oncdata",Oe.cdata),Oe.cdata="";break;case"script":Pt(Oe,"onscript",Oe.script),Oe.script="";break;default:st(Oe,"Max buffer length exceeded: "+bn[$e])}Ne=Math.max(Ne,Je)}var Tt=se.MAX_BUFFER_LENGTH-Ne;Oe.bufferCheckPosition=Tt+Oe.position}function we(Oe){for(var Ce=0,Ne=bn.length;Ce<Ne;Ce++)Oe[bn[Ce]]=""}function be(Oe){tt(Oe),Oe.cdata!==""&&(Pt(Oe,"oncdata",Oe.cdata),Oe.cdata=""),Oe.script!==""&&(Pt(Oe,"onscript",Oe.script),Oe.script="")}function Ae(Oe,Ce){return new De(Oe,Ce)}function De(Oe,Ce){if(!(this instanceof De))return new De(Oe,Ce);Wt.apply(this),this._parser=new ue(Oe,Ce),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 Ye(Oe){return Oe===">"||ze(Oe)}function Ge(Oe,Ce){return Oe.test(Ce)}function ft(Oe,Ce){return!Ge(Oe,Ce)}function at(Oe,Ce,Ne){Oe[Ce]&&Oe[Ce](Ne)}function Pt(Oe,Ce,Ne){Oe.textNode&&tt(Oe),at(Oe,Ce,Ne)}function tt(Oe){Oe.textNode=vt(Oe.opt,Oe.textNode),Oe.textNode&&at(Oe,"ontext",Oe.textNode),Oe.textNode=""}function vt(Oe,Ce){return Oe.trim&&(Ce=Ce.trim()),Oe.normalize&&(Ce=Ce.replace(/\s+/g," ")),Ce}function st(Oe,Ce){return tt(Oe),Oe.trackPosition&&(Ce+=`
|
|
|
Line: `+Oe.line+`
|
|
|
Column: `+Oe.column+`
|
|
|
Char: `+Oe.c),Ce=new Error(Ce),Oe.error=Ce,at(Oe,"onerror",Ce),Oe}function jt(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"),tt(Oe),Oe.c="",Oe.closed=!0,at(Oe,"onend"),ue.call(Oe,Oe.strict,Oe.opt),Oe}function lt(Oe,Ce){if((Oe===void 0?"undefined":(0,ve.default)(Oe))!=="object"||!(Oe instanceof ue))throw new Error("bad call to strictFail");Oe.strict&&st(Oe,Ce)}function et(Oe){Oe.strict||(Oe.tagName=Oe.tagName[Oe.looseCase]());var Ce=Oe.tags[Oe.tags.length-1]||Oe,Ne=Oe.tag={name:Oe.tagName,attributes:{}};Oe.opt.xmlns&&(Ne.ns=Ce.ns),Oe.attribList.length=0,Pt(Oe,"onopentagstart",Ne)}function ut(Oe,Ce){var Ne=Oe.indexOf(":"),$e=Ne<0?["",Oe]:Oe.split(":"),dt=$e[0],Je=$e[1];return Ce&&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 Ce=ut(Oe.attribName,!0),Ne=Ce.prefix,$e=Ce.local;if(Ne==="xmlns")if($e==="xml"&&Oe.attribValue!==Lt)lt(Oe,"xml: prefix must be bound to "+Lt+`
|
|
|
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,Pt(Oe,"onattribute",{name:Oe.attribName,value:Oe.attribValue});Oe.attribName=Oe.attribValue=""}function _t(Oe,Ce){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(Ti){Pt(Oe,"onopennamespace",{prefix:Ti,uri:Ne.ns[Ti]})});for(var Je=0,Tt=Oe.attribList.length;Je<Tt;Je++){var qt=Oe.attribList[Je],yn=qt[0],rn=qt[1],pn=ut(yn,!0),Fn=pn.prefix,kn=pn.local,oi=Fn===""?"":Ne.ns[Fn]||"",ri={name:yn,value:rn,prefix:Fn,local:kn,uri:oi};Fn&&Fn!=="xmlns"&&!oi&&(lt(Oe,"Unbound namespace prefix: "+(0,ge.default)(Fn)),ri.uri=Fn),Oe.tag.attributes[yn]=ri,Pt(Oe,"onattribute",ri)}Oe.attribList.length=0}Oe.tag.isSelfClosing=!!Ce,Oe.sawRoot=!0,Oe.tags.push(Oe.tag),Pt(Oe,"onopentag",Oe.tag),Ce||(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);Pt(Oe,"onscript",Oe.script),Oe.script=""}var Ce=Oe.tags.length,Ne=Oe.tagName;Oe.strict||(Ne=Ne[Oe.looseCase]());for(var $e=Ne;Ce--&&Oe.tags[Ce].name!==$e;)lt(Oe,"Unexpected close tag");if(Ce<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-- >Ce;){var Je=Oe.tag=Oe.tags.pop();Oe.tagName=Oe.tag.name,Pt(Oe,"onclosetag",Oe.tagName);var Tt={};for(var qt in Je.ns)Tt[qt]=Je.ns[qt];var yn=Oe.tags[Oe.tags.length-1]||Oe;Oe.opt.xmlns&&Je.ns!==yn.ns&&(0,ee.default)(Je.ns).forEach(function(rn){var pn=Je.ns[rn];Pt(Oe,"onclosenamespace",{prefix:rn,uri:pn})})}Ce===0&&(Oe.closedRoot=!0),Oe.tagName=Oe.attribValue=Oe.attribName="",Oe.attribList.length=0,Oe.state=Ie.TEXT}function Bt(Oe){var Ce,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),Ce=parseInt(Ne,16),dt=Ce.toString(16)):(Ne=Ne.slice(1),Ce=parseInt(Ne,10),dt=Ce.toString(10))),Ne=Ne.replace(/^0+/,""),isNaN(Ce)||dt.toLowerCase()!==Ne?(lt(Oe,"Invalid character entity"),"&"+Oe.entity+";"):(0,Se.default)(Ce))}function Ht(Oe,Ce){Ce==="<"?(Oe.state=Ie.OPEN_WAKA,Oe.startTagPosition=Oe.position):ze(Ce)||(lt(Oe,"Non-whitespace before first tag."),Oe.textNode=Ce,Oe.state=Ie.TEXT)}function hn(Oe,Ce){var Ne="";return Ce<Oe.length&&(Ne=Oe.charAt(Ce)),Ne}function Qt(Oe){var Ce=this;if(this.error)throw this.error;if(Ce.closed)return st(Ce,"Cannot write after close. Assign an onready handler.");if(Oe===null)return jt(Ce);(Oe===void 0?"undefined":(0,ve.default)(Oe))==="object"&&(Oe=Oe.toString());for(var Ne=0,$e="";$e=hn(Oe,Ne++),Ce.c=$e,!!$e;)switch(Ce.trackPosition&&(Ce.position++,$e===`
|
|
|
`?(Ce.line++,Ce.column=0):Ce.column++),Ce.state){case Ie.BEGIN:if(Ce.state=Ie.BEGIN_WHITESPACE,$e==="\uFEFF")continue;Ht(Ce,$e);continue;case Ie.BEGIN_WHITESPACE:Ht(Ce,$e);continue;case Ie.TEXT:if(Ce.sawRoot&&!Ce.closedRoot){for(var dt=Ne-1;$e&&$e!=="<"&&$e!=="&";)($e=hn(Oe,Ne++))&&Ce.trackPosition&&(Ce.position++,$e===`
|
|
|
`?(Ce.line++,Ce.column=0):Ce.column++);Ce.textNode+=Oe.substring(dt,Ne-1)}$e!=="<"||Ce.sawRoot&&Ce.closedRoot&&!Ce.strict?(ze($e)||Ce.sawRoot&&!Ce.closedRoot||lt(Ce,"Text data outside of root node."),$e==="&"?Ce.state=Ie.TEXT_ENTITY:Ce.textNode+=$e):(Ce.state=Ie.OPEN_WAKA,Ce.startTagPosition=Ce.position);continue;case Ie.SCRIPT:$e==="<"?Ce.state=Ie.SCRIPT_ENDING:Ce.script+=$e;continue;case Ie.SCRIPT_ENDING:$e==="/"?Ce.state=Ie.CLOSE_TAG:(Ce.script+="<"+$e,Ce.state=Ie.SCRIPT);continue;case Ie.OPEN_WAKA:if($e==="!")Ce.state=Ie.SGML_DECL,Ce.sgmlDecl="";else if(!ze($e))if(Ge(St,$e))Ce.state=Ie.OPEN_TAG,Ce.tagName=$e;else if($e==="/")Ce.state=Ie.CLOSE_TAG,Ce.tagName="";else if($e==="?")Ce.state=Ie.PROC_INST,Ce.procInstName=Ce.procInstBody="";else{if(lt(Ce,"Unencoded <"),Ce.startTagPosition+1<Ce.position){var Je=Ce.position-Ce.startTagPosition;$e=new Array(Je).join(" ")+$e}Ce.textNode+="<"+$e,Ce.state=Ie.TEXT}continue;case Ie.SGML_DECL:(Ce.sgmlDecl+$e).toUpperCase()===Jt?(Pt(Ce,"onopencdata"),Ce.state=Ie.CDATA,Ce.sgmlDecl="",Ce.cdata=""):Ce.sgmlDecl+$e==="--"?(Ce.state=Ie.COMMENT,Ce.comment="",Ce.sgmlDecl=""):(Ce.sgmlDecl+$e).toUpperCase()===dn?(Ce.state=Ie.DOCTYPE,(Ce.doctype||Ce.sawRoot)&<(Ce,"Inappropriately located doctype declaration"),Ce.doctype="",Ce.sgmlDecl=""):$e===">"?(Pt(Ce,"onsgmldeclaration",Ce.sgmlDecl),Ce.sgmlDecl="",Ce.state=Ie.TEXT):(Ze($e)&&(Ce.state=Ie.SGML_DECL_QUOTED),Ce.sgmlDecl+=$e);continue;case Ie.SGML_DECL_QUOTED:$e===Ce.q&&(Ce.state=Ie.SGML_DECL,Ce.q=""),Ce.sgmlDecl+=$e;continue;case Ie.DOCTYPE:$e===">"?(Ce.state=Ie.TEXT,Pt(Ce,"ondoctype",Ce.doctype),Ce.doctype=!0):(Ce.doctype+=$e,$e==="["?Ce.state=Ie.DOCTYPE_DTD:Ze($e)&&(Ce.state=Ie.DOCTYPE_QUOTED,Ce.q=$e));continue;case Ie.DOCTYPE_QUOTED:Ce.doctype+=$e,$e===Ce.q&&(Ce.q="",Ce.state=Ie.DOCTYPE);continue;case Ie.DOCTYPE_DTD:Ce.doctype+=$e,$e==="]"?Ce.state=Ie.DOCTYPE:Ze($e)&&(Ce.state=Ie.DOCTYPE_DTD_QUOTED,Ce.q=$e);continue;case Ie.DOCTYPE_DTD_QUOTED:Ce.doctype+=$e,$e===Ce.q&&(Ce.state=Ie.DOCTYPE_DTD,Ce.q="");continue;case Ie.COMMENT:$e==="-"?Ce.state=Ie.COMMENT_ENDING:Ce.comment+=$e;continue;case Ie.COMMENT_ENDING:$e==="-"?(Ce.state=Ie.COMMENT_ENDED,Ce.comment=vt(Ce.opt,Ce.comment),Ce.comment&&Pt(Ce,"oncomment",Ce.comment),Ce.comment=""):(Ce.comment+="-"+$e,Ce.state=Ie.COMMENT);continue;case Ie.COMMENT_ENDED:$e!==">"?(lt(Ce,"Malformed comment"),Ce.comment+="--"+$e,Ce.state=Ie.COMMENT):Ce.state=Ie.TEXT;continue;case Ie.CDATA:$e==="]"?Ce.state=Ie.CDATA_ENDING:Ce.cdata+=$e;continue;case Ie.CDATA_ENDING:$e==="]"?Ce.state=Ie.CDATA_ENDING_2:(Ce.cdata+="]"+$e,Ce.state=Ie.CDATA);continue;case Ie.CDATA_ENDING_2:$e===">"?(Ce.cdata&&Pt(Ce,"oncdata",Ce.cdata),Pt(Ce,"onclosecdata"),Ce.cdata="",Ce.state=Ie.TEXT):$e==="]"?Ce.cdata+="]":(Ce.cdata+="]]"+$e,Ce.state=Ie.CDATA);continue;case Ie.PROC_INST:$e==="?"?Ce.state=Ie.PROC_INST_ENDING:ze($e)?Ce.state=Ie.PROC_INST_BODY:Ce.procInstName+=$e;continue;case Ie.PROC_INST_BODY:if(!Ce.procInstBody&&ze($e))continue;$e==="?"?Ce.state=Ie.PROC_INST_ENDING:Ce.procInstBody+=$e;continue;case Ie.PROC_INST_ENDING:$e===">"?(Pt(Ce,"onprocessinginstruction",{name:Ce.procInstName,body:Ce.procInstBody}),Ce.procInstName=Ce.procInstBody="",Ce.state=Ie.TEXT):(Ce.procInstBody+="?"+$e,Ce.state=Ie.PROC_INST_BODY);continue;case Ie.OPEN_TAG:Ge(yt,$e)?Ce.tagName+=$e:(et(Ce),$e===">"?_t(Ce):$e==="/"?Ce.state=Ie.OPEN_TAG_SLASH:(ze($e)||lt(Ce,"Invalid character in tag name"),Ce.state=Ie.ATTRIB));continue;case Ie.OPEN_TAG_SLASH:$e===">"?(_t(Ce,!0),gt(Ce)):(lt(Ce,"Forward-slash in opening tag not followed by >"),Ce.state=Ie.ATTRIB);continue;case Ie.ATTRIB:if(ze($e))continue;$e===">"?_t(Ce):$e==="/"?Ce.state=Ie.OPEN_TAG_SLASH:Ge(St,$e)?(Ce.attribName=$e,Ce.attribValue="",Ce.state=Ie.ATTRIB_NAME):lt(Ce,"Invalid attribute name");continue;case Ie.ATTRIB_NAME:$e==="="?Ce.state=Ie.ATTRIB_VALUE:$e===">"?(lt(Ce,"Attribute without value"),Ce.attribValue=Ce.attribName,mt(Ce),_t(Ce)):ze($e)?Ce.state=Ie.ATTRIB_NAME_SAW_WHITE:Ge(yt,$e)?Ce.attribName+=$e:lt(Ce,"Invalid attribute name");continue;case Ie.ATTRIB_NAME_SAW_WHITE:if($e==="=")Ce.state=Ie.ATTRIB_VALUE;else{if(ze($e))continue;lt(Ce,"Attribute without value"),Ce.tag.attributes[Ce.attribName]="",Ce.attribValue="",Pt(Ce,"onattribute",{name:Ce.attribName,value:""}),Ce.attribName="",$e===">"?_t(Ce):Ge(St,$e)?(Ce.attribName=$e,Ce.state=Ie.ATTRIB_NAME):(lt(Ce,"Invalid attribute name"),Ce.state=Ie.ATTRIB)}continue;case Ie.ATTRIB_VALUE:if(ze($e))continue;Ze($e)?(Ce.q=$e,Ce.state=Ie.ATTRIB_VALUE_QUOTED):(lt(Ce,"Unquoted attribute value"),Ce.state=Ie.ATTRIB_VALUE_UNQUOTED,Ce.attribValue=$e);continue;case Ie.ATTRIB_VALUE_QUOTED:if($e!==Ce.q){$e==="&"?Ce.state=Ie.ATTRIB_VALUE_ENTITY_Q:Ce.attribValue+=$e;continue}mt(Ce),Ce.q="",Ce.state=Ie.ATTRIB_VALUE_CLOSED;continue;case Ie.ATTRIB_VALUE_CLOSED:ze($e)?Ce.state=Ie.ATTRIB:$e===">"?_t(Ce):$e==="/"?Ce.state=Ie.OPEN_TAG_SLASH:Ge(St,$e)?(lt(Ce,"No whitespace between attributes"),Ce.attribName=$e,Ce.attribValue="",Ce.state=Ie.ATTRIB_NAME):lt(Ce,"Invalid attribute name");continue;case Ie.ATTRIB_VALUE_UNQUOTED:if(!Ye($e)){$e==="&"?Ce.state=Ie.ATTRIB_VALUE_ENTITY_U:Ce.attribValue+=$e;continue}mt(Ce),$e===">"?_t(Ce):Ce.state=Ie.ATTRIB;continue;case Ie.CLOSE_TAG:if(Ce.tagName)$e===">"?gt(Ce):Ge(yt,$e)?Ce.tagName+=$e:Ce.script?(Ce.script+="</"+Ce.tagName,Ce.tagName="",Ce.state=Ie.SCRIPT):(ze($e)||lt(Ce,"Invalid tagname in closing tag"),Ce.state=Ie.CLOSE_TAG_SAW_WHITE);else{if(ze($e))continue;ft(St,$e)?Ce.script?(Ce.script+="</"+$e,Ce.state=Ie.SCRIPT):lt(Ce,"Invalid tagname in closing tag."):Ce.tagName=$e}continue;case Ie.CLOSE_TAG_SAW_WHITE:if(ze($e))continue;$e===">"?gt(Ce):lt(Ce,"Invalid characters in closing tag");continue;case Ie.TEXT_ENTITY:case Ie.ATTRIB_VALUE_ENTITY_Q:case Ie.ATTRIB_VALUE_ENTITY_U:var Tt,qt;switch(Ce.state){case Ie.TEXT_ENTITY:Tt=Ie.TEXT,qt="textNode";break;case Ie.ATTRIB_VALUE_ENTITY_Q:Tt=Ie.ATTRIB_VALUE_QUOTED,qt="attribValue";break;case Ie.ATTRIB_VALUE_ENTITY_U:Tt=Ie.ATTRIB_VALUE_UNQUOTED,qt="attribValue"}$e===";"?(Ce[qt]+=Bt(Ce),Ce.entity="",Ce.state=Tt):Ge(Ce.entity.length?He:nt,$e)?Ce.entity+=$e:(lt(Ce,"Invalid character in entity name"),Ce[qt]+="&"+Ce.entity+$e,Ce.entity="",Ce.state=Tt);continue;default:throw new Error(Ce,"Unknown state: "+Ce.state)}return Ce.position>=Ce.bufferCheckPosition&&ye(Ce),Ce}se.parser=function(Oe,Ce){return new ue(Oe,Ce)},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 Ce(){}return Ce.prototype=Oe,new Ce}),ee.default||(Object.keys=function(Oe){var Ce=[];for(var Ne in Oe)Oe.hasOwnProperty(Ne)&&Ce.push(Ne);return Ce}),ue.prototype={end:function(){jt(this)},write:Qt,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){be(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 Pe=="function"&&typeof Pe.isBuffer=="function"&&Pe.isBuffer(Oe)){if(!this._decoder){var Ce=me("string_decoder").StringDecoder;this._decoder=new Ce("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,Ce){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,Ce)};var Jt="[CDATA[",dn="DOCTYPE",Lt="http://www.w3.org/XML/1998/namespace",pt="http://www.w3.org/2000/xmlns/",Rt={xml:Lt,xmlns:pt},St=/[:_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]/,yt=/[:_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 Ce=se.ENTITIES[Oe],Ne=typeof Ce=="number"?String.fromCharCode(Ce):Ce;se.ENTITIES[Oe]=Ne});for(var We in se.STATE)se.STATE[se.STATE[We]]=We;Ie=se.STATE,Se.default||function(){var Oe=String.fromCharCode,Ce=Math.floor,Ne=function(){var $e,dt,Je=[],Tt=-1,qt=arguments.length;if(!qt)return"";for(var yn="";++Tt<qt;){var rn=Number(arguments[Tt]);if(!isFinite(rn)||rn<0||rn>1114111||Ce(rn)!==rn)throw RangeError("Invalid code point: "+rn);rn<=65535?Je.push(rn):(rn-=65536,$e=55296+(rn>>10),dt=rn%1024+56320,Je.push($e,dt)),(Tt+1===qt||Je.length>16384)&&(yn+=Oe.apply(null,Je),Je.length=0)}return yn};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 Pe(){Le.call(this)}Be.exports=Pe;var Le=me("events").EventEmitter;me("inherits")(Pe,Le),Pe.Readable=me("readable-stream/readable.js"),Pe.Writable=me("readable-stream/writable.js"),Pe.Duplex=me("readable-stream/duplex.js"),Pe.Transform=me("readable-stream/transform.js"),Pe.PassThrough=me("readable-stream/passthrough.js"),Pe.Stream=Pe,Pe.prototype.pipe=function(he,Se){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||Se&&Se.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(Pe){var Le=me("./lib/request"),he=me("./lib/response"),Se=me("xtend"),xe=me("builtin-status-codes"),ge=me("url"),le=ke;le.request=function(ve,de){ve=typeof ve=="string"?ge.parse(ve):Se(ve);var ce=Pe.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(Pe){"use strict";function Le(){if(xe!==void 0)return xe;if(Pe.XMLHttpRequest){xe=new Pe.XMLHttpRequest;try{xe.open("GET",Pe.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 Se(ve){return typeof ve=="function"}ke.fetch=Se(Pe.fetch)&&Se(Pe.ReadableStream),ke.writableStream=Se(Pe.WritableStream),ke.abortController=Se(Pe.AbortController),ke.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),ke.blobConstructor=!0}catch(ve){}var xe,ge=Pe.ArrayBuffer!==void 0,le=ge&&Se(Pe.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()&&Se(Le().overrideMimeType),ke.vbArray=Se(Pe.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(Pe,Le,he){"use strict";function Se(ye,we){return ve.fetch&&we?"fetch":ve.mozchunkedarraybuffer?"moz-chunked-arraybuffer":ve.msstream?"ms-stream":ve.arraybuffer&&ye?"arraybuffer":ve.vbArray&&ye?"text:vbarray":"text"}function xe(ye){try{var we=ye.status;return we!==null&&we!==0}catch(be){return!1}}var ge=me("babel-runtime/core-js/object/keys"),le=function(ye){return ye&&ye.__esModule?ye:{default:ye}}(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(ye){var we=this;z.Writable.call(we),we._opts=ye,we._body=[],we._headers={},ye.auth&&we.setHeader("Authorization","Basic "+new he(ye.auth).toString("base64")),(0,le.default)(ye.headers).forEach(function(De){we.setHeader(De,ye.headers[De])});var be,Ae=!0;if(ye.mode==="disable-fetch"||"requestTimeout"in ye&&!ve.abortController)Ae=!1,be=!0;else if(ye.mode==="prefer-streaming")be=!1;else if(ye.mode==="allow-wrong-content-type")be=!ve.overrideMimeType;else{if(ye.mode&&ye.mode!=="default"&&ye.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");be=!0}we._mode=Se(be,Ae),we._fetchTimer=null,we.on("finish",function(){we._onFinish()})};de(se,z.Writable),se.prototype.setHeader=function(ye,we){var be=this,Ae=ye.toLowerCase();ue.indexOf(Ae)===-1&&(be._headers[Ae]={name:ye,value:we})},se.prototype.getHeader=function(ye){var we=this._headers[ye.toLowerCase()];return we?we.value:null},se.prototype.removeHeader=function(ye){delete this._headers[ye.toLowerCase()]},se.prototype._onFinish=function(){var ye=this;if(!ye._destroyed){var we=ye._opts,be=ye._headers,Ae=null;we.method!=="GET"&&we.method!=="HEAD"&&(Ae=ve.arraybuffer?ee(he.concat(ye._body)):ve.blobConstructor?new Le.Blob(ye._body.map(function(Ge){return ee(Ge)}),{type:(be["content-type"]||{}).value||""}):he.concat(ye._body).toString());var De=[];if((0,le.default)(be).forEach(function(Ge){var ft=be[Ge].name,at=be[Ge].value;Array.isArray(at)?at.forEach(function(Pt){De.push([ft,Pt])}):De.push([ft,at])}),ye._mode==="fetch"){var ze=null;if(ve.abortController){var Ze=new AbortController;ze=Ze.signal,ye._fetchAbortController=Ze,"requestTimeout"in we&&we.requestTimeout!==0&&(ye._fetchTimer=Le.setTimeout(function(){ye.emit("requestTimeout"),ye._fetchAbortController&&ye._fetchAbortController.abort()},we.requestTimeout))}Le.fetch(ye._opts.url,{method:ye._opts.method,headers:De,body:Ae||void 0,mode:"cors",credentials:we.withCredentials?"include":"same-origin",signal:ze}).then(function(Ge){ye._fetchResponse=Ge,ye._connect()},function(Ge){Le.clearTimeout(ye._fetchTimer),ye._destroyed||ye.emit("error",Ge)})}else{var Ye=ye._xhr=new Le.XMLHttpRequest;try{Ye.open(ye._opts.method,ye._opts.url,!0)}catch(Ge){return void Pe.nextTick(function(){ye.emit("error",Ge)})}"responseType"in Ye&&(Ye.responseType=ye._mode.split(":")[0]),"withCredentials"in Ye&&(Ye.withCredentials=!!we.withCredentials),ye._mode==="text"&&"overrideMimeType"in Ye&&Ye.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in we&&(Ye.timeout=we.requestTimeout,Ye.ontimeout=function(){ye.emit("requestTimeout")}),De.forEach(function(Ge){Ye.setRequestHeader(Ge[0],Ge[1])}),ye._response=null,Ye.onreadystatechange=function(){switch(Ye.readyState){case ie.LOADING:case ie.DONE:ye._onXHRProgress()}},ye._mode==="moz-chunked-arraybuffer"&&(Ye.onprogress=function(){ye._onXHRProgress()}),Ye.onerror=function(){ye._destroyed||ye.emit("error",new Error("XHR error"))};try{Ye.send(Ae)}catch(Ge){return void Pe.nextTick(function(){ye.emit("error",Ge)})}}}},se.prototype._onXHRProgress=function(){var ye=this;xe(ye._xhr)&&!ye._destroyed&&(ye._response||ye._connect(),ye._response._onXHRProgress())},se.prototype._connect=function(){var ye=this;ye._destroyed||(ye._response=new oe(ye._xhr,ye._fetchResponse,ye._mode,ye._fetchTimer),ye._response.on("error",function(we){ye.emit("error",we)}),ye.emit("response",ye._response))},se.prototype._write=function(ye,we,be){this._body.push(ye),be()},se.prototype.abort=se.prototype.destroy=function(){var ye=this;ye._destroyed=!0,Le.clearTimeout(ye._fetchTimer),ye._response&&(ye._response._destroyed=!0),ye._xhr?ye._xhr.abort():ye._fetchAbortController&&ye._fetchAbortController.abort()},se.prototype.end=function(ye,we,be){var Ae=this;typeof ye=="function"&&(be=ye,ye=void 0),z.Writable.prototype.end.call(Ae,ye,we,be)},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(Pe,Le,he){"use strict";var Se=me("babel-runtime/core-js/promise"),xe=function(z){return z&&z.__esModule?z:{default:z}}(Se),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(){Pe.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 ye=ee.body.getReader();(function Ae(){ye.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 be=we.match(/;\s*charset=([^;])(;|$)/);be&&(se._charset=be[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 ye=new Le.MSStreamReader;ye.onprogress=function(){ye.result.byteLength>z._pos&&(z.push(new he(new Uint8Array(ye.result.slice(z._pos)))),z._pos=ye.result.byteLength)},ye.onload=function(){z.push(null)},ye.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 Pe(we){if(!we)return"utf8";for(var be;;)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(be)return;we=(""+we).toLowerCase(),be=!0}}function Le(we){var be=Pe(we);if(typeof be!="string"&&(ue.isEncoding===ye||!ye(we)))throw new Error("Unknown encoding: "+we);return be||we}function he(we){this.encoding=Le(we);var be;switch(this.encoding){case"utf16le":this.text=ce,this.end=z,be=4;break;case"utf8":this.fillLast=le,be=4;break;case"base64":this.text=ee,this.end=oe,be=3;break;default:return this.write=ie,void(this.end=se)}this.lastNeed=0,this.lastTotal=0,this.lastChar=ue.allocUnsafe(be)}function Se(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,be,Ae){var De=be.length-1;if(De<Ae)return 0;var ze=Se(be[De]);return ze>=0?(ze>0&&(we.lastNeed=ze-1),ze):--De<Ae||ze===-2?0:(ze=Se(be[De]))>=0?(ze>0&&(we.lastNeed=ze-2),ze):--De<Ae||ze===-2?0:(ze=Se(be[De]),ze>=0?(ze>0&&(ze===2?ze=0:we.lastNeed=ze-3),ze):0)}function ge(we,be,Ae){if((192&be[0])!=128)return we.lastNeed=0,"\u951F\uFFFD";if(we.lastNeed>1&&be.length>1){if((192&be[1])!=128)return we.lastNeed=1,"\u951F\uFFFD";if(we.lastNeed>2&&be.length>2&&(192&be[2])!=128)return we.lastNeed=2,"\u951F\uFFFD"}}function le(we){var be=this.lastTotal-this.lastNeed,Ae=ge(this,we,be);return Ae!==void 0?Ae:this.lastNeed<=we.length?(we.copy(this.lastChar,be,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(we.copy(this.lastChar,be,0,we.length),void(this.lastNeed-=we.length))}function ve(we,be){var Ae=xe(this,we,be);if(!this.lastNeed)return we.toString("utf8",be);this.lastTotal=Ae;var De=we.length-(Ae-this.lastNeed);return we.copy(this.lastChar,0,De),we.toString("utf8",be,De)}function de(we){var be=we&&we.length?this.write(we):"";return this.lastNeed?be+"\u951F\uFFFD":be}function ce(we,be){if((we.length-be)%2==0){var Ae=we.toString("utf16le",be);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",be,we.length-1)}function z(we){var be=we&&we.length?this.write(we):"";if(this.lastNeed){var Ae=this.lastTotal-this.lastNeed;return be+this.lastChar.toString("utf16le",0,Ae)}return be}function ee(we,be){var Ae=(we.length-be)%3;return Ae===0?we.toString("base64",be):(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",be,we.length-Ae))}function oe(we){var be=we&&we.length?this.write(we):"";return this.lastNeed?be+this.lastChar.toString("base64",0,3-this.lastNeed):be}function ie(we){return we.toString(this.encoding)}function se(we){return we&&we.length?this.write(we):""}var ue=me("safe-buffer").Buffer,ye=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 be,Ae;if(this.lastNeed){if((be=this.fillLast(we))===void 0)return"";Ae=this.lastNeed,this.lastNeed=0}else Ae=0;return Ae<we.length?be?be+this.text(we,Ae):this.text(we,Ae):be||""},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(Pe,Le){function he(de,ce){this._id=de,this._clearFn=ce}var Se=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 Pe=="function"?Pe:function(de){var ce=ve++,z=!(arguments.length<2)&&ge.call(arguments,1);return le[ce]=!0,Se(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 Pe=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(Pe.isBuffer(Le)){for(var he=new Uint8Array(Le.length),Se=Le.length,xe=0;xe<Se;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 Pe(){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,Ye){if(ze&&le.isObject(ze)&&ze instanceof Pe)return ze;var Ge=new Pe;return Ge.parse(ze,Ze,Ye),Ge}function he(ze){return le.isString(ze)&&(ze=Le(ze)),ze instanceof Pe?ze.format():Pe.prototype.format.call(ze)}function Se(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=Se,ke.resolveObject=xe,ke.format=he,ke.Url=Pe;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}$/,ye=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,we={javascript:!0,"javascript:":!0},be={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");Pe.prototype.parse=function(ze,Ze,Ye){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),Pt=/\\/g;at[0]=at[0].replace(Pt,"/"),ze=at.join(ft);var tt=ze;if(tt=tt.trim(),!Ye&&ze.split("#").length===1){var vt=ce.exec(tt);if(vt)return this.path=tt,this.href=tt,this.pathname=vt[1],vt[2]?(this.search=vt[2],this.query=Ze?De.parse(this.search.substr(1)):this.search.substr(1)):Ze&&(this.search="",this.query={}),this}var st=ve.exec(tt);if(st){st=st[0];var jt=st.toLowerCase();this.protocol=jt,tt=tt.substr(st.length)}if(Ye||st||tt.match(/^\/\/[^@\/]+@[^@\/]+/)){var lt=tt.substr(0,2)==="//";!lt||st&&be[st]||(tt=tt.substr(2),this.slashes=!0)}if(!be[st]&&(lt||st&&!Ae[st])){for(var et=-1,ut=0;ut<se.length;ut++){var mt=tt.indexOf(se[ut]);mt!==-1&&(et===-1||mt<et)&&(et=mt)}var _t,gt;gt=et===-1?tt.lastIndexOf("@"):tt.lastIndexOf("@",et),gt!==-1&&(_t=tt.slice(0,gt),tt=tt.slice(gt+1),this.auth=decodeURIComponent(_t)),et=-1;for(var ut=0;ut<ie.length;ut++){var mt=tt.indexOf(ie[ut]);mt!==-1&&(et===-1||mt<et)&&(et=mt)}et===-1&&(et=tt.length),this.host=tt.slice(0,et),tt=tt.slice(et),this.parseHost(),this.hostname=this.hostname||"";var Bt=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Bt)for(var Ht=this.hostname.split(/\./),ut=0,hn=Ht.length;ut<hn;ut++){var Qt=Ht[ut];if(Qt&&!Qt.match(ue)){for(var bn="",Wt=0,Kt=Qt.length;Wt<Kt;Wt++)Qt.charCodeAt(Wt)>127?bn+="x":bn+=Qt[Wt];if(!bn.match(ue)){var Jt=Ht.slice(0,ut),dn=Ht.slice(ut+1),Lt=Qt.match(ye);Lt&&(Jt.push(Lt[1]),dn.unshift(Lt[2])),dn.length&&(tt="/"+dn.join(".")+tt),this.hostname=Jt.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),Bt||(this.hostname=ge.toASCII(this.hostname));var pt=this.port?":"+this.port:"",Rt=this.hostname||"";this.host=Rt+pt,this.href+=this.host,Bt&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),tt[0]!=="/"&&(tt="/"+tt))}if(!we[jt])for(var ut=0,hn=oe.length;ut<hn;ut++){var St=oe[ut];if(tt.indexOf(St)!==-1){var yt=encodeURIComponent(St);yt===St&&(yt=escape(St)),tt=tt.split(St).join(yt)}}var nt=tt.indexOf("#");nt!==-1&&(this.hash=tt.substr(nt),tt=tt.slice(0,nt));var He=tt.indexOf("?");if(He!==-1?(this.search=tt.substr(He),this.query=tt.substr(He+1),Ze&&(this.query=De.parse(this.query)),tt=tt.slice(0,He)):Ze&&(this.search="",this.query={}),tt&&(this.pathname=tt),Ae[jt]&&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},Pe.prototype.format=function(){var ze=this.auth||"";ze&&(ze=encodeURIComponent(ze),ze=ze.replace(/%3A/i,":"),ze+="@");var Ze=this.protocol||"",Ye=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 Pt=this.search||at&&"?"+at||"";return Ze&&Ze.substr(-1)!==":"&&(Ze+=":"),this.slashes||(!Ze||Ae[Ze])&&ft!==!1?(ft="//"+(ft||""),Ye&&Ye.charAt(0)!=="/"&&(Ye="/"+Ye)):ft||(ft=""),Ge&&Ge.charAt(0)!=="#"&&(Ge="#"+Ge),Pt&&Pt.charAt(0)!=="?"&&(Pt="?"+Pt),Ye=Ye.replace(/[?#]/g,function(tt){return encodeURIComponent(tt)}),Pt=Pt.replace("#","%23"),Ze+ft+Ye+Pt+Ge},Pe.prototype.resolve=function(ze){return this.resolveObject(Le(ze,!1,!0)).format()},Pe.prototype.resolveObject=function(ze){if(le.isString(ze)){var Ze=new Pe;Ze.parse(ze,!1,!0),ze=Ze}for(var Ye=new Pe,Ge=Object.keys(this),ft=0;ft<Ge.length;ft++){var at=Ge[ft];Ye[at]=this[at]}if(Ye.hash=ze.hash,ze.href==="")return Ye.href=Ye.format(),Ye;if(ze.slashes&&!ze.protocol){for(var Pt=Object.keys(ze),tt=0;tt<Pt.length;tt++){var vt=Pt[tt];vt!=="protocol"&&(Ye[vt]=ze[vt])}return Ae[Ye.protocol]&&Ye.hostname&&!Ye.pathname&&(Ye.path=Ye.pathname="/"),Ye.href=Ye.format(),Ye}if(ze.protocol&&ze.protocol!==Ye.protocol){if(!Ae[ze.protocol]){for(var st=Object.keys(ze),jt=0;jt<st.length;jt++){var lt=st[jt];Ye[lt]=ze[lt]}return Ye.href=Ye.format(),Ye}if(Ye.protocol=ze.protocol,ze.host||be[ze.protocol])Ye.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(""),Ye.pathname=hn.join("/")}if(Ye.search=ze.search,Ye.query=ze.query,Ye.host=ze.host||"",Ye.auth=ze.auth,Ye.hostname=ze.hostname||ze.host,Ye.port=ze.port,Ye.pathname||Ye.search){var et=Ye.pathname||"",ut=Ye.search||"";Ye.path=et+ut}return Ye.slashes=Ye.slashes||ze.slashes,Ye.href=Ye.format(),Ye}var mt=Ye.pathname&&Ye.pathname.charAt(0)==="/",_t=ze.host||ze.pathname&&ze.pathname.charAt(0)==="/",gt=_t||mt||Ye.host&&ze.pathname,Bt=gt,Ht=Ye.pathname&&Ye.pathname.split("/")||[],hn=ze.pathname&&ze.pathname.split("/")||[],Qt=Ye.protocol&&!Ae[Ye.protocol];if(Qt&&(Ye.hostname="",Ye.port=null,Ye.host&&(Ht[0]===""?Ht[0]=Ye.host:Ht.unshift(Ye.host)),Ye.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]==="")),_t)Ye.host=ze.host||ze.host===""?ze.host:Ye.host,Ye.hostname=ze.hostname||ze.hostname===""?ze.hostname:Ye.hostname,Ye.search=ze.search,Ye.query=ze.query,Ht=hn;else if(hn.length)Ht||(Ht=[]),Ht.pop(),Ht=Ht.concat(hn),Ye.search=ze.search,Ye.query=ze.query;else if(!le.isNullOrUndefined(ze.search)){if(Qt){Ye.hostname=Ye.host=Ht.shift();var bn=!!(Ye.host&&Ye.host.indexOf("@")>0)&&Ye.host.split("@");bn&&(Ye.auth=bn.shift(),Ye.host=Ye.hostname=bn.shift())}return Ye.search=ze.search,Ye.query=ze.query,le.isNull(Ye.pathname)&&le.isNull(Ye.search)||(Ye.path=(Ye.pathname?Ye.pathname:"")+(Ye.search?Ye.search:"")),Ye.href=Ye.format(),Ye}if(!Ht.length)return Ye.pathname=null,Ye.search?Ye.path="/"+Ye.search:Ye.path=null,Ye.href=Ye.format(),Ye;for(var Wt=Ht.slice(-1)[0],Kt=(Ye.host||ze.host||Ht.length>1)&&(Wt==="."||Wt==="..")||Wt==="",Jt=0,dn=Ht.length;dn>=0;dn--)Wt=Ht[dn],Wt==="."?Ht.splice(dn,1):Wt===".."?(Ht.splice(dn,1),Jt++):Jt&&(Ht.splice(dn,1),Jt--);if(!gt&&!Bt)for(;Jt--;Jt)Ht.unshift("..");!gt||Ht[0]===""||Ht[0]&&Ht[0].charAt(0)==="/"||Ht.unshift(""),Kt&&Ht.join("/").substr(-1)!=="/"&&Ht.push("");var Lt=Ht[0]===""||Ht[0]&&Ht[0].charAt(0)==="/";if(Qt){Ye.hostname=Ye.host=Lt?"":Ht.length?Ht.shift():"";var bn=!!(Ye.host&&Ye.host.indexOf("@")>0)&&Ye.host.split("@");bn&&(Ye.auth=bn.shift(),Ye.host=Ye.hostname=bn.shift())}return gt=gt||Ye.host&&Ht.length,gt&&!Lt&&Ht.unshift(""),Ht.length?Ye.pathname=Ht.join("/"):(Ye.pathname=null,Ye.path=null),le.isNull(Ye.pathname)&&le.isNull(Ye.search)||(Ye.path=(Ye.pathname?Ye.pathname:"")+(Ye.search?Ye.search:"")),Ye.auth=ze.auth||Ye.auth,Ye.slashes=Ye.slashes||ze.slashes,Ye.href=Ye.format(),Ye},Pe.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(Pe){return typeof Pe=="string"},isObject:function(Pe){return typeof Pe=="object"&&Pe!==null},isNull:function(Pe){return Pe===null},isNullOrUndefined:function(Pe){return Pe==null}}},{}],205:[function(me,Be,ke){(function(Pe){function Le(Se,xe){function ge(){if(!le){if(he("throwDeprecation"))throw new Error(xe);he("traceDeprecation")?console.trace(xe):console.warn(xe),le=!0}return Se.apply(this,arguments)}if(he("noDeprecation"))return Se;var le=!1;return ge}function he(Se){try{if(!Pe.localStorage)return!1}catch(ge){return!1}var xe=Pe.localStorage[Se];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(Pe){return Pe&&typeof Pe=="object"&&typeof Pe.copy=="function"&&typeof Pe.fill=="function"&&typeof Pe.readUInt8=="function"}},{}],207:[function(me,Be,ke){(function(Pe,Le){function he(ut,mt){var _t={seen:[],stylize:xe};return arguments.length>=3&&(_t.depth=arguments[2]),arguments.length>=4&&(_t.colors=arguments[3]),ie(mt)?_t.showHidden=mt:mt&&ke._extend(_t,mt),Ae(_t.showHidden)&&(_t.showHidden=!1),Ae(_t.depth)&&(_t.depth=2),Ae(_t.colors)&&(_t.colors=!1),Ae(_t.customInspect)&&(_t.customInspect=!0),_t.colors&&(_t.stylize=Se),le(_t,ut,_t.depth)}function Se(ut,mt){var _t=he.styles[mt];return _t?"\x1B["+he.colors[_t][0]+"m"+ut+"\x1B["+he.colors[_t][1]+"m":ut}function xe(ut,mt){return ut}function ge(ut){var mt={};return ut.forEach(function(_t,gt){mt[_t]=!0}),mt}function le(ut,mt,_t){if(ut.customInspect&&mt&&Ge(mt.inspect)&&mt.inspect!==ke.inspect&&(!mt.constructor||mt.constructor.prototype!==mt)){var gt=mt.inspect(_t,ut);return we(gt)||(gt=le(ut,gt,_t)),gt}var Bt=ve(ut,mt);if(Bt)return Bt;var Ht=Object.keys(mt),hn=ge(Ht);if(ut.showHidden&&(Ht=Object.getOwnPropertyNames(mt)),Ye(mt)&&(Ht.indexOf("message")>=0||Ht.indexOf("description")>=0))return de(mt);if(Ht.length===0){if(Ge(mt)){var Qt=mt.name?": "+mt.name:"";return ut.stylize("[Function"+Qt+"]","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(Ye(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)),Ye(mt)&&(bn=" "+de(mt)),Ht.length===0&&(!Wt||mt.length==0))return Kt[0]+bn+Kt[1];if(_t<0)return De(mt)?ut.stylize(RegExp.prototype.toString.call(mt),"regexp"):ut.stylize("[Object]","special");ut.seen.push(mt);var Jt;return Jt=Wt?ce(ut,mt,_t,hn,Ht):Ht.map(function(dn){return z(ut,mt,_t,hn,dn,Wt)}),ut.seen.pop(),ee(Jt,bn,Kt)}function ve(ut,mt){if(Ae(mt))return ut.stylize("undefined","undefined");if(we(mt)){var _t="'"+JSON.stringify(mt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ut.stylize(_t,"string")}return ye(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,_t,gt,Bt){for(var Ht=[],hn=0,Qt=mt.length;hn<Qt;++hn)vt(mt,String(hn))?Ht.push(z(ut,mt,_t,gt,String(hn),!0)):Ht.push("");return Bt.forEach(function(bn){bn.match(/^\d+$/)||Ht.push(z(ut,mt,_t,gt,bn,!0))}),Ht}function z(ut,mt,_t,gt,Bt,Ht){var hn,Qt,bn;if(bn=Object.getOwnPropertyDescriptor(mt,Bt)||{value:mt[Bt]},bn.get?Qt=bn.set?ut.stylize("[Getter/Setter]","special"):ut.stylize("[Getter]","special"):bn.set&&(Qt=ut.stylize("[Setter]","special")),vt(gt,Bt)||(hn="["+Bt+"]"),Qt||(ut.seen.indexOf(bn.value)<0?(Qt=se(_t)?le(ut,bn.value,null):le(ut,bn.value,_t-1),Qt.indexOf(`
|
|
|
`)>-1&&(Qt=Ht?Qt.split(`
|
|
|
`).map(function(Wt){return" "+Wt}).join(`
|
|
|
`).substr(2):`
|
|
|
`+Qt.split(`
|
|
|
`).map(function(Wt){return" "+Wt}).join(`
|
|
|
`))):Qt=ut.stylize("[Circular]","special")),Ae(hn)){if(Ht&&Bt.match(/^\d+$/))return Qt;hn=JSON.stringify(""+Bt),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+": "+Qt}function ee(ut,mt,_t){var gt=0;return ut.reduce(function(Bt,Ht){return gt++,Ht.indexOf(`
|
|
|
`)>=0&>++,Bt+Ht.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?_t[0]+(mt===""?"":mt+`
|
|
|
`)+" "+ut.join(`,
|
|
|
`)+" "+_t[1]:_t[0]+mt+" "+ut.join(", ")+" "+_t[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 ye(ut){return typeof ut=="number"}function we(ut){return typeof ut=="string"}function be(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 Ye(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 Pt(ut){return ut<10?"0"+ut.toString(10):ut.toString(10)}function tt(){var ut=new Date,mt=[Pt(ut.getHours()),Pt(ut.getMinutes()),Pt(ut.getSeconds())].join(":");return[ut.getDate(),et[ut.getMonth()],mt].join(" ")}function vt(ut,mt){return Object.prototype.hasOwnProperty.call(ut,mt)}var st=/%[sdj%]/g;ke.format=function(ut){if(!we(ut)){for(var mt=[],_t=0;_t<arguments.length;_t++)mt.push(he(arguments[_t]));return mt.join(" ")}for(var _t=1,gt=arguments,Bt=gt.length,Ht=String(ut).replace(st,function(bn){if(bn==="%%")return"%";if(_t>=Bt)return bn;switch(bn){case"%s":return String(gt[_t++]);case"%d":return Number(gt[_t++]);case"%j":try{return JSON.stringify(gt[_t++])}catch(Wt){return"[Circular]"}default:return bn}}),hn=gt[_t];_t<Bt;hn=gt[++_t])se(hn)||!ze(hn)?Ht+=" "+hn:Ht+=" "+he(hn);return Ht},ke.deprecate=function(ut,mt){function _t(){if(!gt){if(Pe.throwDeprecation)throw new Error(mt);Pe.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(Pe.noDeprecation===!0)return ut;var gt=!1;return _t};var jt,lt={};ke.debuglog=function(ut){if(Ae(jt)&&(jt=Pe.env.NODE_DEBUG||""),ut=ut.toUpperCase(),!lt[ut])if(new RegExp("\\b"+ut+"\\b","i").test(jt)){var mt=Pe.pid;lt[ut]=function(){var _t=ke.format.apply(ke,arguments);console.error("%s %d: %s",ut,mt,_t)}}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=ye,ke.isString=we,ke.isSymbol=be,ke.isUndefined=Ae,ke.isRegExp=De,ke.isObject=ze,ke.isDate=Ze,ke.isError=Ye,ke.isFunction=Ge,ke.isPrimitive=ft,ke.isBuffer=me("./support/isBuffer");var et=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];ke.log=function(){console.log("%s - %s",tt(),ke.format.apply(ke,arguments))},ke.inherits=me("inherits"),ke._extend=function(ut,mt){if(!mt||!ze(mt))return ut;for(var _t=Object.keys(mt),gt=_t.length;gt--;)ut[_t[gt]]=mt[_t[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(Pe){return Pe[0]==="\uFEFF"?Pe.substring(1):Pe}}).call(void 0)},{}],209:[function(me,Be,ke){"use strict";function Pe(ge){return ge&&ge.__esModule?ge:{default:ge}}var Le=me("babel-runtime/helpers/typeof"),he=Pe(Le),Se=me("babel-runtime/core-js/object/keys"),xe=Pe(Se);(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,ye,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(be){return function(Ae,De){var ze,Ze,Ye,Ge,ft,at;if((De===void 0?"undefined":(0,he.default)(De))!=="object")be.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)Ye=Ze[ft],Ae=ue(Ae.ele(ft),Ye).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=be.options.cdata&&de(Ze)?Ae.raw(ce(Ze)):Ae.txt(Ze);else if(Array.isArray(Ze))for(Ge in Ze)z.call(Ze,Ge)&&(Ye=Ze[Ge],Ae=typeof Ye=="string"?be.options.cdata&&de(Ye)?Ae.ele(ft).raw(ce(Ye)).up():Ae.ele(ft,Ye).up():ue(Ae.ele(ft),Ye).up());else(Ze===void 0?"undefined":(0,he.default)(Ze))==="object"?Ae=ue(Ae.ele(ft),Ze).up():typeof Ze=="string"&&be.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),ye=ge.create(we,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),ue(ye,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 Pe(ve){return ve&&ve.__esModule?ve:{default:ve}}var Le=me("babel-runtime/core-js/object/get-own-property-names"),he=Pe(Le),Se=me("babel-runtime/core-js/object/keys"),xe=Pe(Se),ge=me("babel-runtime/helpers/typeof"),le=Pe(ge);(function(){var ve,de,ce,z,ee,oe,ie,se,ue=function(be,Ae){return function(){return be.apply(Ae,arguments)}},ye=function(be,Ae){function De(){this.constructor=be}for(var ze in Ae)we.call(Ae,ze)&&(be[ze]=Ae[ze]);return De.prototype=Ae.prototype,be.prototype=new De,be.__super__=Ae.prototype,be},we={}.hasOwnProperty;ie=me("sax"),ce=me("events"),ve=me("./bom"),oe=me("./processors"),se=me("timers").setImmediate,de=me("./defaults").defaults,z=function(be){return(be===void 0?"undefined":(0,le.default)(be))==="object"&&be!=null&&(0,xe.default)(be).length===0},ee=function(be,Ae,De){var ze,Ze,Ye;for(ze=0,Ze=be.length;ze<Ze;ze++)Ye=be[ze],Ae=Ye(Ae,De);return Ae},ke.Parser=function(be){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,Ye;if(!(this instanceof ke.Parser))return new ke.Parser(De);this.options={},Ze=de[.2];for(ze in Ze)we.call(Ze,ze)&&(Ye=Ze[ze],this.options[ze]=Ye);for(ze in De)we.call(De,ze)&&(Ye=De[ze],this.options[ze]=Ye);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 ye(Ae,be),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,Ye;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,Ye=[],De=this.options.attrkey,ze=this.options.charkey,this.saxParser.onopentag=function(Ge){return function(ft){var at,Pt,tt,vt,st;if(tt={},tt[ze]="",!Ge.options.ignoreAttrs){st=ft.attributes;for(at in st)we.call(st,at)&&(De in tt||Ge.options.mergeAttrs||(tt[De]={}),Pt=Ge.options.attrValueProcessors?ee(Ge.options.attrValueProcessors,ft.attributes[at],at):ft.attributes[at],vt=Ge.options.attrNameProcessors?ee(Ge.options.attrNameProcessors,at):at,Ge.options.mergeAttrs?Ge.assignOrPush(tt,vt,Pt):tt[De][vt]=Pt)}return tt["#name"]=Ge.options.tagNameProcessors?ee(Ge.options.tagNameProcessors,ft.name):ft.name,Ge.options.xmlns&&(tt[Ge.options.xmlnskey]={uri:ft.uri,local:ft.local}),Ye.push(tt)}}(this),this.saxParser.onclosetag=function(Ge){return function(){var ft,at,Pt,tt,vt,st,jt,lt,et,ut;if(st=Ye.pop(),vt=st["#name"],Ge.options.explicitChildren&&Ge.options.preserveChildrenOrder||delete st["#name"],st.cdata===!0&&(ft=st.cdata,delete st.cdata),et=Ye[Ye.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],vt):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,_t,gt;for(gt=[],mt=0,_t=Ye.length;mt<_t;mt++)tt=Ye[mt],gt.push(tt["#name"]);return gt}().concat(vt).join("/"),function(){var mt;try{st=Ge.options.validator(ut,et&&et[vt],st)}catch(_t){return mt=_t,Ge.emit("error",mt)}}()),Ge.options.explicitChildren&&!Ge.options.mergeAttrs&&(st===void 0?"undefined":(0,le.default)(st))==="object")if(Ge.options.preserveChildrenOrder){if(et){et[Ge.options.childkey]=et[Ge.options.childkey]||[],jt={};for(Pt in st)we.call(st,Pt)&&(jt[Pt]=st[Pt]);et[Ge.options.childkey].push(jt),delete st["#name"],(0,xe.default)(st).length===1&&ze in st&&!Ge.EXPLICIT_CHARKEY&&(st=st[ze])}}else tt={},Ge.options.attrkey in st&&(tt[Ge.options.attrkey]=st[Ge.options.attrkey],delete st[Ge.options.attrkey]),!Ge.options.charsAsChildren&&Ge.options.charkey in st&&(tt[Ge.options.charkey]=st[Ge.options.charkey],delete st[Ge.options.charkey]),(0,he.default)(st).length>0&&(tt[Ge.options.childkey]=st),st=tt;return Ye.length>0?Ge.assignOrPush(et,vt,st):(Ge.options.explicitRoot&&(lt=st,st={},st[vt]=lt),Ge.resultObject=st,Ge.saxParser.ended=!0,Ge.emit("end",Ge.resultObject))}}(this),Ze=function(Ge){return function(ft){var at,Pt;if(Pt=Ye[Ye.length-1])return Pt[ze]+=ft,Ge.options.explicitChildren&&Ge.options.preserveChildrenOrder&&Ge.options.charsAsChildren&&(Ge.options.includeWhiteChars||ft.replace(/\\n/g,"").trim()!=="")&&(Pt[Ge.options.childkey]=Pt[Ge.options.childkey]||[],at={"#name":"__text__"},at[ze]=ft,Ge.options.normalize&&(at[ze]=at[ze].replace(/\s{2,}/g," ").trim()),Pt[Ge.options.childkey].push(at)),Pt}}(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(Ye){return this.reset(),ze(null,Ye)}),this.on("error",function(Ye){return this.reset(),ze(Ye)}));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(Ye){if(Ze=Ye,!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(be,Ae,De){var ze,Ze,Ye;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={}),Ye=new ke.Parser(Ze),Ye.parseString(be,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 Pe;Pe=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(Pe,"")},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 Pe,Le,he,Se,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"),Pe=me("./builder"),he=me("./parser"),Se=me("./processors"),ke.defaults=Le.defaults,ke.processors=Se,ke.ValidationError=function(le){function ve(de){this.message=de}return xe(ve,le),ve}(Error),ke.Builder=Pe.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 Pe(ve){return ve&&ve.__esModule?ve:{default:ve}}var Le=me("babel-runtime/core-js/object/get-prototype-of"),he=Pe(Le),Se=me("babel-runtime/helpers/typeof"),xe=Pe(Se),ge=me("babel-runtime/core-js/object/assign"),le=Pe(ge);(function(){var ve,de,ce,z,ee,oe,ie=[].slice,se={}.hasOwnProperty;ve=function(){var ue,ye,we,be,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((be=Ae[ue])!=null)for(ye in be)se.call(be,ye)&&(De[ye]=be[ye]);return De},z=function(ue){return!!ue&&Object.prototype.toString.call(ue)==="[object Function]"},ee=function(ue){var ye;return!!ue&&((ye=ue===void 0?"undefined":(0,xe.default)(ue))==="function"||ye==="object")},de=function(ue){return z(Array.isArray)?Array.isArray(ue):Object.prototype.toString.call(ue)==="[object Array]"},ce=function(ue){var ye;if(de(ue))return!ue.length;for(ye in ue)if(se.call(ue,ye))return!1;return!0},oe=function(ue){var ye,we;return ee(ue)&&(we=(0,he.default)(ue))&&(ye=we.constructor)&&typeof ye=="function"&&ye instanceof ye&&Function.prototype.toString.call(ye)===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 Pe=me("babel-runtime/core-js/object/create"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Pe);(function(){Be.exports=function(){function he(Se,xe,ge){if(this.options=Se.options,this.stringify=Se.stringify,xe==null)throw new Error("Missing attribute name of element "+Se.name);if(ge==null)throw new Error("Missing attribute value for attribute "+xe+" of element "+Se.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(Se){return this.options.writer.set(Se).attribute(this)},he}()}).call(void 0)},{"babel-runtime/core-js/object/create":19}],216:[function(me,Be,ke){"use strict";var Pe=me("babel-runtime/core-js/object/create"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Pe);(function(){var he,Se=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 Se(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 Pe=me("babel-runtime/core-js/object/create"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Pe);(function(){var he,Se=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 Se(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 Pe,Le=function(Se,xe){function ge(){this.constructor=Se}for(var le in xe)he.call(xe,le)&&(Se[le]=xe[le]);return ge.prototype=xe.prototype,Se.prototype=new ge,Se.__super__=xe.prototype,Se},he={}.hasOwnProperty;Pe=me("./XMLNode"),Be.exports=function(Se){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,Se),xe.prototype.toString=function(ge){return this.options.writer.set(ge).dtdAttList(this)},xe}(Pe)}).call(void 0)},{"./XMLNode":227}],219:[function(me,Be,ke){"use strict";(function(){var Pe,Le=function(Se,xe){function ge(){this.constructor=Se}for(var le in xe)he.call(xe,le)&&(Se[le]=xe[le]);return ge.prototype=xe.prototype,Se.prototype=new ge,Se.__super__=xe.prototype,Se},he={}.hasOwnProperty;Pe=me("./XMLNode"),Be.exports=function(Se){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,Se),xe.prototype.toString=function(ge){return this.options.writer.set(ge).dtdElement(this)},xe}(Pe)}).call(void 0)},{"./XMLNode":227}],220:[function(me,Be,ke){"use strict";(function(){var Pe,Le,he=function(xe,ge){function le(){this.constructor=xe}for(var ve in ge)Se.call(ge,ve)&&(xe[ve]=ge[ve]);return le.prototype=ge.prototype,xe.prototype=new le,xe.__super__=ge.prototype,xe},Se={}.hasOwnProperty;Le=me("./Utility").isObject,Pe=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}(Pe)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],221:[function(me,Be,ke){"use strict";(function(){var Pe,Le=function(Se,xe){function ge(){this.constructor=Se}for(var le in xe)he.call(xe,le)&&(Se[le]=xe[le]);return ge.prototype=xe.prototype,Se.prototype=new ge,Se.__super__=xe.prototype,Se},he={}.hasOwnProperty;Pe=me("./XMLNode"),Be.exports=function(Se){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,Se),xe.prototype.toString=function(ge){return this.options.writer.set(ge).dtdNotation(this)},xe}(Pe)}).call(void 0)},{"./XMLNode":227}],222:[function(me,Be,ke){"use strict";(function(){var Pe,Le,he=function(xe,ge){function le(){this.constructor=xe}for(var ve in ge)Se.call(ge,ve)&&(xe[ve]=ge[ve]);return le.prototype=ge.prototype,xe.prototype=new le,xe.__super__=ge.prototype,xe},Se={}.hasOwnProperty;Le=me("./Utility").isObject,Pe=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}(Pe)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],223:[function(me,Be,ke){"use strict";(function(){var Pe,Le,he,Se,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"),Pe=me("./XMLDTDAttList"),he=me("./XMLDTDEntity"),Le=me("./XMLDTDElement"),Se=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 Pe(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 Se(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 Pe,Le,he,Se,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;Se=me("./Utility").isPlainObject,Pe=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?Se(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}(Pe)}).call(void 0)},{"./Utility":214,"./XMLNode":227,"./XMLStringWriter":231,"./XMLStringifier":232}],225:[function(me,Be,ke){"use strict";(function(){var Pe,Le,he,Se,xe,ge,le,ve,de,ce,z,ee,oe,ie,se,ue,ye,we,be,Ae={}.hasOwnProperty;be=me("./Utility"),ye=be.isObject,ue=be.isFunction,we=be.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"),Se=me("./XMLDTDAttList"),ge=me("./XMLDTDEntity"),xe=me("./XMLDTDElement"),le=me("./XMLDTDNotation"),Pe=me("./XMLAttribute"),ie=me("./XMLStringifier"),oe=me("./XMLStringWriter"),Be.exports=function(){function De(ze,Ze,Ye){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=Ye||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,Ye){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(),ye(Ze)||(Ge=[Ze,Ye],Ye=Ge[0],Ze=Ge[1]),this.currentNode=new ce(this,ze,Ze),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,Ye!=null&&this.text(Ye),this},De.prototype.element=function(ze,Ze,Ye){return this.currentNode&&this.currentNode instanceof de?this.dtdElement.apply(this,arguments):this.node(ze,Ze,Ye)},De.prototype.attribute=function(ze,Ze){var Ye,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()),ye(ze))for(Ye in ze)Ae.call(ze,Ye)&&(Ge=ze[Ye],this.attribute(Ye,Ge));else ue(Ze)&&(Ze=Ze.apply()),this.options.skipNullAttributes&&Ze==null||(this.currentNode.attributes[ze]=new Pe(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 Ye,Ge,ft,at,Pt;if(this.openCurrent(),ze!=null&&(ze=ze.valueOf()),Ze!=null&&(Ze=Ze.valueOf()),Array.isArray(ze))for(Ye=0,at=ze.length;Ye<at;Ye++)Ge=ze[Ye],this.instruction(Ge);else if(ye(ze))for(Ge in ze)Ae.call(ze,Ge)&&(ft=ze[Ge],this.instruction(Ge,ft));else ue(Ze)&&(Ze=Ze.apply()),Pt=new z(this,ze,Ze),this.onData(this.writer.processingInstruction(Pt,this.currentLevel+1));return this},De.prototype.declaration=function(ze,Ze,Ye){var Ge;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node");return Ge=new ve(this,ze,Ze,Ye),this.onData(this.writer.declaration(Ge,this.currentLevel+1)),this},De.prototype.doctype=function(ze,Ze,Ye){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,Ye),this.currentNode.rootNodeName=ze,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},De.prototype.dtdElement=function(ze,Ze){var Ye;return this.openCurrent(),Ye=new xe(this,ze,Ze),this.onData(this.writer.dtdElement(Ye,this.currentLevel+1)),this},De.prototype.attList=function(ze,Ze,Ye,Ge,ft){var at;return this.openCurrent(),at=new Se(this,ze,Ze,Ye,Ge,ft),this.onData(this.writer.dtdAttList(at,this.currentLevel+1)),this},De.prototype.entity=function(ze,Ze){var Ye;return this.openCurrent(),Ye=new ge(this,!1,ze,Ze),this.onData(this.writer.dtdEntity(Ye,this.currentLevel+1)),this},De.prototype.pEntity=function(ze,Ze){var Ye;return this.openCurrent(),Ye=new ge(this,!0,ze,Ze),this.onData(this.writer.dtdEntity(Ye,this.currentLevel+1)),this},De.prototype.notation=function(ze,Ze){var Ye;return this.openCurrent(),Ye=new le(this,ze,Ze),this.onData(this.writer.dtdNotation(Ye,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,Ye){return this.node(ze,Ze,Ye)},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,Ye){return this.declaration(ze,Ze,Ye)},De.prototype.dtd=function(ze,Ze,Ye){return this.doctype(ze,Ze,Ye)},De.prototype.e=function(ze,Ze,Ye){return this.element(ze,Ze,Ye)},De.prototype.n=function(ze,Ze,Ye){return this.node(ze,Ze,Ye)},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 Pe=me("babel-runtime/core-js/object/create"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Pe);(function(){var he,Se,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,Se=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 ye;return ye=ue.clone(),ye.parent=ie,ie.children.push(ye)}),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}(Se)}).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 Pe,Le,he,Se,xe,ge,le,ve,de,ce,z,ee,oe={}.hasOwnProperty;ee=me("./Utility"),z=ee.isObject,ce=ee.isFunction,de=ee.isEmpty,xe=null,Pe=null,Le=null,he=null,Se=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"),Pe=me("./XMLCData"),Le=me("./XMLComment"),he=me("./XMLDeclaration"),Se=me("./XMLDocType"),le=me("./XMLRaw"),ve=me("./XMLText"),ge=me("./XMLProcessingInstruction"))}return ie.prototype.element=function(se,ue,ye){var we,be,Ae,De,ze,Ze,Ye,Ge,ft,at;if(Ze=null,ue==null&&(ue={}),ue=ue.valueOf(),z(ue)||(ft=[ue,ye],ye=ft[0],ue=ft[1]),se!=null&&(se=se.valueOf()),Array.isArray(se))for(Ae=0,Ye=se.length;Ae<Ye;Ae++)be=se[Ae],Ze=this.element(be);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++)be=at[De],we={},we[ze]=be,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(ye):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&se.indexOf(this.stringify.convertCDataKey)===0?this.cdata(ye):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&se.indexOf(this.stringify.convertCommentKey)===0?this.comment(ye):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&se.indexOf(this.stringify.convertRawKey)===0?this.raw(ye):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&se.indexOf(this.stringify.convertPIKey)===0?this.instruction(se.substr(this.stringify.convertPIKey.length),ye):this.node(se,ue,ye);if(Ze==null)throw new Error("Could not create any elements with: "+se);return Ze},ie.prototype.insertBefore=function(se,ue,ye){var we,be,Ae;if(this.isRoot)throw new Error("Cannot insert elements at root level");return be=this.parent.children.indexOf(this),Ae=this.parent.children.splice(be),we=this.parent.element(se,ue,ye),Array.prototype.push.apply(this.parent.children,Ae),we},ie.prototype.insertAfter=function(se,ue,ye){var we,be,Ae;if(this.isRoot)throw new Error("Cannot insert elements at root level");return be=this.parent.children.indexOf(this),Ae=this.parent.children.splice(be+1),we=this.parent.element(se,ue,ye),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,ye){var we,be;return se!=null&&(se=se.valueOf()),ue||(ue={}),ue=ue.valueOf(),z(ue)||(be=[ue,ye],ye=be[0],ue=be[1]),we=new xe(this,se,ue),ye!=null&&we.text(ye),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 Pe(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,ye;return ue=this.parent.children.indexOf(this),ye=this.parent.children.splice(ue),this.parent.comment(se),Array.prototype.push.apply(this.parent.children,ye),this},ie.prototype.commentAfter=function(se){var ue,ye;return ue=this.parent.children.indexOf(this),ye=this.parent.children.splice(ue+1),this.parent.comment(se),Array.prototype.push.apply(this.parent.children,ye),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 ye,we,be,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++)ye=se[Ae],this.instruction(ye);else if(z(se))for(ye in se)oe.call(se,ye)&&(we=se[ye],this.instruction(ye,we));else ce(ue)&&(ue=ue.apply()),be=new ge(this,se,ue),this.children.push(be);return this},ie.prototype.instructionBefore=function(se,ue){var ye,we;return ye=this.parent.children.indexOf(this),we=this.parent.children.splice(ye),this.parent.instruction(se,ue),Array.prototype.push.apply(this.parent.children,we),this},ie.prototype.instructionAfter=function(se,ue){var ye,we;return ye=this.parent.children.indexOf(this),we=this.parent.children.splice(ye+1),this.parent.instruction(se,ue),Array.prototype.push.apply(this.parent.children,we),this},ie.prototype.declaration=function(se,ue,ye){var we,be;return we=this.document(),be=new he(we,se,ue,ye),we.children[0]instanceof he?we.children[0]=be:we.children.unshift(be),we.root()||we},ie.prototype.doctype=function(se,ue){var ye,we,be,Ae,De,ze,Ze,Ye,Ge,ft;for(we=this.document(),be=new Se(we,se,ue),Ge=we.children,Ae=De=0,Ze=Ge.length;De<Ze;Ae=++De)if((ye=Ge[Ae])instanceof Se)return we.children[Ae]=be,be;for(ft=we.children,Ae=ze=0,Ye=ft.length;ze<Ye;Ae=++ze)if(ye=ft[Ae],ye.isRoot)return we.children.splice(Ae,0,be),be;return we.children.push(be),be},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,ye){return this.element(se,ue,ye)},ie.prototype.nod=function(se,ue,ye){return this.node(se,ue,ye)},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,ye){return this.declaration(se,ue,ye)},ie.prototype.dtd=function(se,ue){return this.doctype(se,ue)},ie.prototype.e=function(se,ue,ye){return this.element(se,ue,ye)},ie.prototype.n=function(se,ue,ye){return this.node(se,ue,ye)},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 Pe=me("babel-runtime/core-js/object/create"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Pe);(function(){var he,Se=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 Se(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 Pe=me("babel-runtime/core-js/object/create"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Pe);(function(){var he,Se=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 Se(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 Pe,Le,he,Se,xe,ge,le,ve,de,ce,z,ee,oe,ie=function(ue,ye){function we(){this.constructor=ue}for(var be in ye)se.call(ye,be)&&(ue[be]=ye[be]);return we.prototype=ye.prototype,ue.prototype=new we,ue.__super__=ye.prototype,ue},se={}.hasOwnProperty;le=me("./XMLDeclaration"),ve=me("./XMLDocType"),Pe=me("./XMLCData"),Le=me("./XMLComment"),de=me("./XMLElement"),z=me("./XMLRaw"),ee=me("./XMLText"),ce=me("./XMLProcessingInstruction"),he=me("./XMLDTDAttList"),Se=me("./XMLDTDElement"),xe=me("./XMLDTDEntity"),ge=me("./XMLDTDNotation"),oe=me("./XMLWriterBase"),Be.exports=function(ue){function ye(we,be){ye.__super__.constructor.call(this,be),this.stream=we}return ie(ye,ue),ye.prototype.document=function(we){var be,Ae,De,ze,Ze,Ye,Ge,ft;for(Ye=we.children,Ae=0,ze=Ye.length;Ae<ze;Ae++)be=Ye[Ae],be.isLastRootNode=!1;for(we.children[we.children.length-1].isLastRootNode=!0,Ge=we.children,ft=[],De=0,Ze=Ge.length;De<Ze;De++)switch(be=Ge[De],!1){case!(be instanceof le):ft.push(this.declaration(be));break;case!(be instanceof ve):ft.push(this.docType(be));break;case!(be instanceof Le):ft.push(this.comment(be));break;case!(be instanceof ce):ft.push(this.processingInstruction(be));break;default:ft.push(this.element(be))}return ft},ye.prototype.attribute=function(we){return this.stream.write(" "+we.name+'="'+we.value+'"')},ye.prototype.cdata=function(we,be){return this.stream.write(this.space(be)+"<![CDATA["+we.text+"]]>"+this.endline(we))},ye.prototype.comment=function(we,be){return this.stream.write(this.space(be)+"<!-- "+we.text+" -->"+this.endline(we))},ye.prototype.declaration=function(we,be){return this.stream.write(this.space(be)),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))},ye.prototype.docType=function(we,be){var Ae,De,ze,Ze;if(be||(be=0),this.stream.write(this.space(be)),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,be+1);break;case!(Ae instanceof Se):this.dtdElement(Ae,be+1);break;case!(Ae instanceof xe):this.dtdEntity(Ae,be+1);break;case!(Ae instanceof ge):this.dtdNotation(Ae,be+1);break;case!(Ae instanceof Pe):this.cdata(Ae,be+1);break;case!(Ae instanceof Le):this.comment(Ae,be+1);break;case!(Ae instanceof ce):this.processingInstruction(Ae,be+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))},ye.prototype.element=function(we,be){var Ae,De,ze,Ze,Ye,Ge,ft,at;be||(be=0),at=this.space(be),this.stream.write(at+"<"+we.name),Ge=we.attributes;for(Ye in Ge)se.call(Ge,Ye)&&(Ae=Ge[Ye],this.attribute(Ae));if(we.children.length===0||we.children.every(function(Pt){return Pt.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 Pe):this.cdata(De,be+1);break;case!(De instanceof Le):this.comment(De,be+1);break;case!(De instanceof de):this.element(De,be+1);break;case!(De instanceof z):this.raw(De,be+1);break;case!(De instanceof ee):this.text(De,be+1);break;case!(De instanceof ce):this.processingInstruction(De,be+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))},ye.prototype.processingInstruction=function(we,be){return this.stream.write(this.space(be)+"<?"+we.target),we.value&&this.stream.write(" "+we.value),this.stream.write(this.spacebeforeslash+"?>"+this.endline(we))},ye.prototype.raw=function(we,be){return this.stream.write(this.space(be)+we.value+this.endline(we))},ye.prototype.text=function(we,be){return this.stream.write(this.space(be)+we.value+this.endline(we))},ye.prototype.dtdAttList=function(we,be){return this.stream.write(this.space(be)+"<!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))},ye.prototype.dtdElement=function(we,be){return this.stream.write(this.space(be)+"<!ELEMENT "+we.name+" "+we.value),this.stream.write(this.spacebeforeslash+">"+this.endline(we))},ye.prototype.dtdEntity=function(we,be){return this.stream.write(this.space(be)+"<!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))},ye.prototype.dtdNotation=function(we,be){return this.stream.write(this.space(be)+"<!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))},ye.prototype.endline=function(we){return we.isLastRootNode?"":this.newline},ye}(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 Pe,Le,he,Se,xe,ge,le,ve,de,ce,z,ee,oe,ie=function(ue,ye){function we(){this.constructor=ue}for(var be in ye)se.call(ye,be)&&(ue[be]=ye[be]);return we.prototype=ye.prototype,ue.prototype=new we,ue.__super__=ye.prototype,ue},se={}.hasOwnProperty;le=me("./XMLDeclaration"),ve=me("./XMLDocType"),Pe=me("./XMLCData"),Le=me("./XMLComment"),de=me("./XMLElement"),z=me("./XMLRaw"),ee=me("./XMLText"),ce=me("./XMLProcessingInstruction"),he=me("./XMLDTDAttList"),Se=me("./XMLDTDElement"),xe=me("./XMLDTDEntity"),ge=me("./XMLDTDNotation"),oe=me("./XMLWriterBase"),Be.exports=function(ue){function ye(we){ye.__super__.constructor.call(this,we)}return ie(ye,ue),ye.prototype.document=function(we){var be,Ae,De,ze,Ze;for(this.textispresent=!1,ze="",Ze=we.children,Ae=0,De=Ze.length;Ae<De;Ae++)be=Ze[Ae],ze+=function(){switch(!1){case!(be instanceof le):return this.declaration(be);case!(be instanceof ve):return this.docType(be);case!(be instanceof Le):return this.comment(be);case!(be instanceof ce):return this.processingInstruction(be);default:return this.element(be,0)}}.call(this);return this.pretty&&ze.slice(-this.newline.length)===this.newline&&(ze=ze.slice(0,-this.newline.length)),ze},ye.prototype.attribute=function(we){return" "+we.name+'="'+we.value+'"'},ye.prototype.cdata=function(we,be){return this.space(be)+"<![CDATA["+we.text+"]]>"+this.newline},ye.prototype.comment=function(we,be){return this.space(be)+"<!-- "+we.text+" -->"+this.newline},ye.prototype.declaration=function(we,be){var Ae;return Ae=this.space(be),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},ye.prototype.docType=function(we,be){var Ae,De,ze,Ze,Ye;if(be||(be=0),Ze=this.space(be),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,Ye=we.children,De=0,ze=Ye.length;De<ze;De++)Ae=Ye[De],Ze+=function(){switch(!1){case!(Ae instanceof he):return this.dtdAttList(Ae,be+1);case!(Ae instanceof Se):return this.dtdElement(Ae,be+1);case!(Ae instanceof xe):return this.dtdEntity(Ae,be+1);case!(Ae instanceof ge):return this.dtdNotation(Ae,be+1);case!(Ae instanceof Pe):return this.cdata(Ae,be+1);case!(Ae instanceof Le):return this.comment(Ae,be+1);case!(Ae instanceof ce):return this.processingInstruction(Ae,be+1);default:throw new Error("Unknown DTD node type: "+Ae.constructor.name)}}.call(this);Ze+="]"}return Ze+=this.spacebeforeslash+">",Ze+=this.newline},ye.prototype.element=function(we,be){var Ae,De,ze,Ze,Ye,Ge,ft,at,Pt,tt,vt,st,jt;be||(be=0),jt=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),st=this.space(be),at="",at+=st+"<"+we.name,Pt=we.attributes;for(ft in Pt)se.call(Pt,ft)&&(Ae=Pt[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(tt=we.children,ze=0,Ye=tt.length;ze<Ye;ze++)if(De=tt[ze],De.value!=null){this.textispresent++,jt=!0;break}}for(this.textispresent&&(this.newline="",this.pretty=!1,st=this.space(be)),at+=">"+this.newline,vt=we.children,Ze=0,Ge=vt.length;Ze<Ge;Ze++)De=vt[Ze],at+=function(){switch(!1){case!(De instanceof Pe):return this.cdata(De,be+1);case!(De instanceof Le):return this.comment(De,be+1);case!(De instanceof de):return this.element(De,be+1);case!(De instanceof z):return this.raw(De,be+1);case!(De instanceof ee):return this.text(De,be+1);case!(De instanceof ce):return this.processingInstruction(De,be+1);default:throw new Error("Unknown XML node type: "+De.constructor.name)}}.call(this);jt&&this.textispresent--,this.textispresent||(this.newline=this.newlinedefault,this.pretty=this.prettydefault),at+=st+"</"+we.name+">"+this.newline}return at},ye.prototype.processingInstruction=function(we,be){var Ae;return Ae=this.space(be)+"<?"+we.target,we.value&&(Ae+=" "+we.value),Ae+=this.spacebeforeslash+"?>"+this.newline},ye.prototype.raw=function(we,be){return this.space(be)+we.value+this.newline},ye.prototype.text=function(we,be){return this.space(be)+we.value+this.newline},ye.prototype.dtdAttList=function(we,be){var Ae;return Ae=this.space(be)+"<!ATTLIST "+we.elementName+" "+we.attributeName+" "+we.attributeType,we.defaultValueType!=="#DEFAULT"&&(Ae+=" "+we.defaultValueType),we.defaultValue&&(Ae+=' "'+we.defaultValue+'"'),Ae+=this.spacebeforeslash+">"+this.newline},ye.prototype.dtdElement=function(we,be){return this.space(be)+"<!ELEMENT "+we.name+" "+we.value+this.spacebeforeslash+">"+this.newline},ye.prototype.dtdEntity=function(we,be){var Ae;return Ae=this.space(be)+"<!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},ye.prototype.dtdNotation=function(we,be){var Ae;return Ae=this.space(be)+"<!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},ye.prototype.openNode=function(we,be){var Ae,De,ze,Ze;if(be||(be=0),we instanceof de){ze=this.space(be)+"<"+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(be)+"<!DOCTYPE "+we.rootNodeName,we.pubID&&we.sysID?ze+=' PUBLIC "'+we.pubID+'" "'+we.sysID+'"':we.sysID&&(ze+=' SYSTEM "'+we.sysID+'"'),ze+=(we.children?" [":">")+this.newline},ye.prototype.closeNode=function(we,be){switch(be||(be=0),!1){case!(we instanceof de):return this.space(be)+"</"+we.name+">"+this.newline;case!(we instanceof ve):return this.space(be)+"]>"+this.newline}},ye}(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 Pe=function(he,Se){return function(){return he.apply(Se,arguments)}},Le={}.hasOwnProperty;Be.exports=function(){function he(Se){this.assertLegalChar=Pe(this.assertLegalChar,this);var xe,ge,le;Se||(Se={}),this.noDoubleEncoding=Se.noDoubleEncoding,ge=Se.stringify||{};for(xe in ge)Le.call(ge,xe)&&(le=ge[xe],this[xe]=le)}return he.prototype.eleName=function(Se){return Se=""+Se||"",this.assertLegalChar(Se)},he.prototype.eleText=function(Se){return Se=""+Se||"",this.assertLegalChar(this.elEscape(Se))},he.prototype.cdata=function(Se){return Se=""+Se||"",Se=Se.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(Se)},he.prototype.comment=function(Se){if(Se=""+Se||"",Se.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+Se);return this.assertLegalChar(Se)},he.prototype.raw=function(Se){return""+Se||""},he.prototype.attName=function(Se){return Se=""+Se||""},he.prototype.attValue=function(Se){return Se=""+Se||"",this.attEscape(Se)},he.prototype.insTarget=function(Se){return""+Se||""},he.prototype.insValue=function(Se){if(Se=""+Se||"",Se.match(/\?>/))throw new Error("Invalid processing instruction value: "+Se);return Se},he.prototype.xmlVersion=function(Se){if(Se=""+Se||"",!Se.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+Se);return Se},he.prototype.xmlEncoding=function(Se){if(Se=""+Se||"",!Se.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+Se);return Se},he.prototype.xmlStandalone=function(Se){return Se?"yes":"no"},he.prototype.dtdPubID=function(Se){return""+Se||""},he.prototype.dtdSysID=function(Se){return""+Se||""},he.prototype.dtdElementValue=function(Se){return""+Se||""},he.prototype.dtdAttType=function(Se){return""+Se||""},he.prototype.dtdAttDefault=function(Se){return Se!=null?""+Se||"":Se},he.prototype.dtdEntityValue=function(Se){return""+Se||""},he.prototype.dtdNData=function(Se){return""+Se||""},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(Se){var xe;if(xe=Se.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+Se+" at index "+xe.index);return Se},he.prototype.elEscape=function(Se){var xe;return xe=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,Se.replace(xe,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
")},he.prototype.attEscape=function(Se){var xe;return xe=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,Se.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 Pe=me("babel-runtime/core-js/object/create"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Pe);(function(){var he,Se=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 Se(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 Pe={}.hasOwnProperty;Be.exports=function(){function Le(he){var Se,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(Se in z)Pe.call(z,Se)&&(ee=z[Se],this[Se]=ee)}return Le.prototype.set=function(he){var Se,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(Se in xe)Pe.call(xe,Se)&&(ge=xe[Se],this[Se]=ge);return this},Le.prototype.space=function(he){var Se;return this.pretty?(Se=(he||0)+this.offset+1,Se>0?new Array(Se).join(this.indent):""):""},Le}()}).call(void 0)},{}],235:[function(me,Be,ke){"use strict";(function(){var Pe,Le,he,Se,xe,ge,le;le=me("./Utility"),xe=le.assign,ge=le.isFunction,Pe=me("./XMLDocument"),Le=me("./XMLDocumentCB"),Se=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 Pe(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 Pe(ve)},Be.exports.stringWriter=function(ve){return new Se(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 Pe(){for(var he={},Se=0;Se<arguments.length;Se++){var xe=arguments[Se];for(var ge in xe)Le.call(xe,ge)&&(he[ge]=xe[ge])}return he}Be.exports=Pe;var Le=Object.prototype.hasOwnProperty},{}],237:[function(me,Be,ke){"use strict";function Pe(z,ee,oe){Se.isBuffer(ee)||(ee=new Se(ee)),Se.isBuffer(oe)||(oe=new Se(oe)),ee.length>de?ee=z(ee):ee.length<de&&(ee=Se.concat([ee,ce],de));for(var ie=new Se(de),se=new Se(de),ue=0;ue<de;ue++)ie[ue]=54^ee[ue],se[ue]=92^ee[ue];var ye=z(Se.concat([ie,oe]));return z(Se.concat([se,ye]))}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 Se.isBuffer(ue)||(ue=new Se(ue)),ie.push(ue),se+=ue.length,this},digest:function(ue){var ye=Se.concat(ie),we=ee?Pe(oe,ee,ye):oe(ye);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 Se=me("buffer").Buffer,xe=me("./sha"),ge=me("./sha256"),le=me("./md5"),ve={sha1:xe,sha256:ge,md5:le},de=64,ce=new Se(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 Pe(ve,de){if(ve.length%xe!=0){var ce=ve.length+(xe-ve.length%xe);ve=Se.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 Se(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 Se.isBuffer(ve)||(ve=new Se(ve)),Le(de(Pe(ve,z),ve.length*le),ce,z)}var Se=me("buffer").Buffer,xe=4,ge=new Se(xe);ge.fill(0);var le=8;Be.exports={hash:he}},{buffer:38}],239:[function(me,Be,ke){"use strict";function Pe(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 ye=ee,we=oe,be=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=Se(ee,oe,ie,se,ce[ue+1],5,-165796510),se=Se(se,ee,oe,ie,ce[ue+6],9,-1069501632),ie=Se(ie,se,ee,oe,ce[ue+11],14,643717713),oe=Se(oe,ie,se,ee,ce[ue+0],20,-373897302),ee=Se(ee,oe,ie,se,ce[ue+5],5,-701558691),se=Se(se,ee,oe,ie,ce[ue+10],9,38016083),ie=Se(ie,se,ee,oe,ce[ue+15],14,-660478335),oe=Se(oe,ie,se,ee,ce[ue+4],20,-405537848),ee=Se(ee,oe,ie,se,ce[ue+9],5,568446438),se=Se(se,ee,oe,ie,ce[ue+14],9,-1019803690),ie=Se(ie,se,ee,oe,ce[ue+3],14,-187363961),oe=Se(oe,ie,se,ee,ce[ue+8],20,1163531501),ee=Se(ee,oe,ie,se,ce[ue+13],5,-1444681467),se=Se(se,ee,oe,ie,ce[ue+2],9,-51403784),ie=Se(ie,se,ee,oe,ce[ue+7],14,1735328473),oe=Se(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,ye),oe=le(oe,we),ie=le(ie,be),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 Se(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,Pe,16)}},{"./helpers":238}],240:[function(me,Be,ke){"use strict";function Pe(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,ye=z,we=ee,be=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=Se(Se(xe(ce,5),Le(De,z,ee,oe)),Se(Se(ie,de[De]),he(De)));ie=oe,oe=ee,ee=xe(z,30),z=ce,ce=ze}ce=Se(ce,ue),z=Se(z,ye),ee=Se(ee,we),oe=Se(oe,be),ie=Se(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 Se(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,Pe,20,!0)}},{"./helpers":238}],241:[function(me,Be,ke){"use strict";var Pe=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},Se=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)^Se(ee,3)},ce=function(ee){return he(ee,17)^he(ee,19)^Se(ee,10)},z=function(ee,oe){var ie,se,ue,ye,we,be,Ae,De,ze,Ze,Ye,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),Pt=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],ye=at[3],we=at[4],be=at[5],Ae=at[6],De=at[7];for(var Ze=0;Ze<64;Ze++)Pt[Ze]=Ze<16?ee[Ze+ze]:Le(Le(Le(ce(Pt[Ze-2]),Pt[Ze-7]),de(Pt[Ze-15])),Pt[Ze-16]),Ye=Le(Le(Le(Le(De,ve(we)),xe(we,be,Ae)),ft[Ze]),Pt[Ze]),Ge=Le(le(ie),ge(ie,se,ue)),De=Ae,Ae=be,be=we,we=Le(ye,Ye),ye=ue,ue=se,se=ie,ie=Le(Ye,Ge);at[0]=Le(ie,at[0]),at[1]=Le(se,at[1]),at[2]=Le(ue,at[2]),at[3]=Le(ye,at[3]),at[4]=Le(we,at[4]),at[5]=Le(be,at[5]),at[6]=Le(Ae,at[6]),at[7]=Le(De,at[7])}return at};Be.exports=function(ee){return Pe.hash(ee,z,32,!0)}},{"./helpers":238}],242:[function(me,Be,ke){(function(Pe){"use strict";function Le(z){return z&&z.__esModule?z:{default:z}}var he=me("babel-runtime/core-js/object/create"),Se=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:Pe!==void 0?Pe:typeof self!="undefined"?self:this,ee.mime=z()}})(function(){return function z(ee,oe,ie){function se(we,be){if(!oe[we]){if(!ee[we]){var Ae=typeof me=="function"&&me;if(!be&&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 Ye=ee[we][1][Ze];return se(Ye||Ze)},ze,ze.exports,z,ee,oe,ie)}return oe[we].exports}for(var ue=typeof me=="function"&&me,ye=0;ye<ie.length;ye++)se(ie[ye]);return se}({1:[function(z,ee,oe){var ie=function(){function se(){(0,ge.default)(this,se),this._types=(0,Se.default)(null),this._extensions=(0,Se.default)(null);for(var ue=0;ue<arguments.length;ue++)this.define(arguments[ue])}return(0,ve.default)(se,[{key:"define",value:function(ue,ye){for(var we in ue){for(var be=ue[we],Ae=0;Ae<be.length;Ae++){var De=be[Ae];if(!ye&&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}!ye&&this._extensions[we]||(this._extensions[we]=be[0])}}},{key:"getType",value:function(ue){ue=String(ue);var ye=ue.replace(/^.*[\/\\]/,"").toLowerCase(),we=ye.replace(/^.*\./,"").toLowerCase(),be=ye.length<ue.length;return(we.length<ye.length-1||!be)&&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(Pe){try{return encodeURIComponent(Pe)}catch(Le){return Pe}},ke.escape=me("escape-html"),ke.timestamp=function(Pe){if(Pe){var Le=Pe;return typeof Le=="string"&&(Le=Number(Le)),String(Pe).length===10&&(Le*=1e3),new Date(Le)}return Math.round(Date.now()/1e3)}},{"escape-html":157}],244:[function(me,Be,ke){(function(Pe,Le){"use strict";function he(De){return De&&De.__esModule?De:{default:De}}function Se(De,ze){return De===void 0?ze:De}function xe(De,ze){return function(Ze,Ye,Ge){if(Ze)return ze(Ze);De({data:Ye,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"),ye=0,we=Math.pow(2,31)-10,be=/^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(Ye,Ge){ke.requestWithCallback(De,ze,xe(Ye,Ge))}))},ke.requestWithCallback=function(De,ze,Ze){function Ye(){yt&&(clearTimeout(yt),yt=null)}function Ge(){nt&&(clearTimeout(nt),nt=null)}function ft(pn,Fn,kn){if(Ge(),!Ze)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),lt,Pe.pid,Qt.method,De),void(pn&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),lt,Pe.pid,pn.name,pn.message,pn.stack));var oi=Ze;Ze=null;var ri={};if(kn&&(Ce=kn.statusCode,ri=kn.headers),Ce===401&&ri["www-authenticate"]&&(!ze.headers||!ze.headers.Authorization)&&ze.digestAuth){var Ti=ri["www-authenticate"];if(Ti.indexOf("Digest ")>=0)return se("Request#%d %s: got digest auth header WWW-Authenticate: %s",lt,De,Ti),ze.headers=ze.headers||{},ze.headers.Authorization=digestAuthHeader(Qt.method,Qt.path,Ti,ze.digestAuth),se("Request#%d %s: auth with digest header: %s",lt,De,ze.headers.Authorization),kn.headers["set-cookie"]&&(ze.headers.Cookie=kn.headers["set-cookie"].join(";")),ke.requestWithCallback(De,ze,oi)}var mi=Date.now()-mt;Je&&(Je.contentDownload=mi),se("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",mi,Oe,Ce,Qt.method,Qt.host,Qt.path,We,Je);var Qi={status:Ce,statusCode:Ce,headers:ri,size:Oe,aborted:Ne,rt:mi,keepAliveSocket:We,data:Fn,requestUrls:ze.requestUrls,timing:Je,remoteAddress:$e,remotePort:dt};if(pn){var ir="";Ht&&typeof Ht.getCurrentStatus=="function"&&(ir=", agent status: "+(0,ve.default)(Ht.getCurrentStatus())),pn.message+=", "+Qt.method+" "+De+" "+Ce+" (connected: "+Ie+", keepalive socket: "+We+ir+`)
|
|
|
headers: `+(0,ve.default)(ri),pn.data=Fn,pn.path=Qt.path,pn.status=Ce,pn.headers=ri,pn.res=Qi}oi(pn,Fn,ze.streaming?kn:Qi),ze.emitter&&(et.url=De,et.socket=rn&&rn.connection,et.options=Qt,et.size=Rt,ze.emitter.emit("response",{requestId:lt,error:pn,ctx:ze.ctx,req:et,res:Qi}))}function at(pn){var Fn=null;if(ze.followRedirect&&statuses.redirect[pn.statusCode]){ze._followRedirectCount=(ze._followRedirectCount||0)+1;var kn=pn.headers.location;if(kn){if(!(ze._followRedirectCount>ze.maxRedirects)){var oi=ze.formatRedirectUrl?ze.formatRedirectUrl(De,kn):ee.resolve(De,kn);se("Request#%d %s: `redirected` from %s to %s",lt,Qt.path,De,oi),Ge(),ze.headers&&ze.headers.Host&&be.test(kn)&&(ze.headers.Host=null);var ri=Ze;return Ze=null,ke.requestWithCallback(oi,ze,ri),{redirect:!0,error:null}}Fn=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+De),Fn.name="MaxRedirectError"}else Fn=new Error("Got statusCode "+pn.statusCode+" but cannot resolve next location from headers"),Fn.name="FollowRedirectError"}return{redirect:!1,error:Fn}}function Pt(pn,Fn,kn){return kn(null,Fn,pn.headers["content-encoding"])}function tt(pn){if(Je&&(Je.waiting=Date.now()-mt),se("Request#%d %s `req response` event emit: status %d, headers: %j",lt,De,pn.statusCode,pn.headers),ze.streaming){var Fn=at(pn);return Fn.redirect?void pn.resume():Fn.error?(pn.resume(),ft(Fn.error,null,pn)):ft(null,null,pn)}if(pn.on("close",function(){se("Request#%d %s: `res close` event emit, total size %d",lt,De,Oe)}),pn.on("error",function(){se("Request#%d %s: `res error` event emit, total size %d",lt,De,Oe)}),pn.on("aborted",function(){Ne=!0,se("Request#%d %s: `res aborted` event emit, total size %d",lt,De,Oe)}),Tt){var Fn=at(pn);return Fn.redirect?void pn.resume():Fn.error?(pn.resume(),Tt.end(),ft(Fn.error,null,pn)):(ze.consumeWriteStream===!1?pn.on("end",ft.bind(null,null,null,pn)):isNode010||isNode012?first([[Tt,"close"],[pn,"aborted"]],function(ri,Ti,mi){se("Request#%d %s: writeStream or res %s event emitted",lt,De,mi),ft(He||null,null,pn)}):Tt.on("close",function(){se("Request#%d %s: writeStream close event emitted",lt,De),ft(He||null,null,pn)}),pn.pipe(Tt))}var kn=[];pn.on("data",function(oi){se("Request#%d %s: `res data` event emit, size %d",lt,De,oi.length),Oe+=oi.length,kn.push(oi)}),pn.on("end",function(){var oi=Le.concat(kn,Oe);if(se("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",lt,De,Oe,pn._dumped),He)return ft(He,oi,pn);var ri=at(pn);if(ri.error)return ft(ri.error,oi,pn);ri.redirect||Pt(pn,oi,function(Ti,mi,Qi){if(Ti)return ft(Ti,oi,pn);if(!Qi&&Ae.indexOf(ze.dataType)>=0){try{mi=decodeBodyByCharset(mi,pn)}catch(fr){return se("decodeBodyByCharset error: %s",fr),ft(null,mi,pn)}if(ze.dataType==="json")if(Oe===0)mi=null;else{var ir=parseJSON(mi,hn);ir.error?Ti=ir.error:mi=ir.data}}Ne&&se("Request#%d %s: Remote socket was terminated before `response.end()` was called",lt,De),ft(Ti,mi,pn)})})}function vt(){se("Response timer ticking, timeout: %d",yn),nt=setTimeout(function(){nt=null;var pn="Response timeout for "+yn+"ms";He=new Error(pn),He.name="ResponseTimeoutError",He.requestId=lt,se("ResponseTimeout: Request#%d %s %s: %s, connected: %s",lt,De,He.name,pn,Ie),st()},yn)}function st(){se("Request#%d %s abort, connected: %s",lt,De,Ie),rn.socket||(He.noSocket=!0,ft(He)),rn.abort()}if(!De||typeof De!="string"&&(De===void 0?"undefined":(0,ce.default)(De))!=="object"){var jt=z.format("expect request url to be a string or a http request options, but got %j",De);throw new Error(jt)}arguments.length===2&&typeof ze=="function"&&(Ze=ze,ze=null),ze=ze||{},ye>=we&&(ye=0);var lt=++ye;ze.requestUrls=ze.requestUrls||[];var et={requestId:lt,url:De,args:ze,ctx:ze.ctx};ze.emitter&&ze.emitter.emit("request",et),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"?(be.test(De)||(De="http://"+De),ut=ee.parse(De)):ut=De;var _t=(ze.type||ze.method||ut.method||"GET").toUpperCase(),gt=ut.port||80,Bt=oe,Ht=Se(ze.agent,ke.agent),hn=ze.fixJSONCtlChars;ut.protocol==="https:"&&(Bt=ie,Ht=Se(ze.httpsAgent,ke.httpsAgent),ut.port||(gt=443));var Qt={host:ut.hostname||ut.host||"localhost",path:ut.path||"/",method:_t,port:gt,agent:Ht,headers:ze.headers||{},lookup:ze.lookup};Array.isArray(ze.timeout)?Qt.requestTimeout=ze.timeout[ze.timeout.length-1]:ze.timeout!==void 0&&(Qt.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)&&(Qt[Kt]=ze[Kt])}Qt.rejectUnauthorized!==!1||Qt.hasOwnProperty("secureOptions")||(Qt.secureOptions=me("constants").SSL_OP_NO_TLSv1_2);var Jt=ze.auth||ut.auth;Jt&&(Qt.auth=Jt);var dn=ze.content||ze.data,Lt=_t==="GET"||_t==="HEAD"||ze.dataAsQueryString;if(!ze.content&&dn&&typeof dn!="string"&&!Le.isBuffer(dn))if(Lt)dn=ze.nestedQuerystring?qs.stringify(dn):querystring.stringify(dn);else{var pt=Qt.headers["Content-Type"]||Qt.headers["content-type"];pt||(pt=ze.contentType==="json"?"application/json":"application/x-www-form-urlencoded",Qt.headers["Content-Type"]=pt),dn=parseContentType(pt).type==="application/json"?(0,ve.default)(dn):ze.nestedQuerystring?qs.stringify(dn):querystring.stringify(dn)}Lt&&dn&&(Qt.path+=(ut.query?"&":"?")+dn,dn=null);var Rt=0;if(dn){var St=dn.length;Le.isBuffer(dn)||(St=Le.byteLength(dn)),Rt=Qt.headers["Content-Length"]=St}ze.dataType==="json"&&(Qt.headers.Accept="application/json"),typeof ze.beforeRequest=="function"&&ze.beforeRequest(Qt);var yt=null,nt=null,He=null,Ie=!1,We=!1,Oe=0,Ce=-1,Ne=!1,$e="",dt="",Je=null;ze.timing&&(Je={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),Qt.headers["User-Agent"]||Qt.headers["user-agent"]||(Qt.headers["User-Agent"]=navigator.userAgent),ze.gzip&&(Qt.headers["Accept-Encoding"]||Qt.headers["accept-encoding"]||(Qt.headers["Accept-Encoding"]="gzip"));var Tt=ze.writeStream;se("Request#%d %s %s with headers %j, options.path: %s",lt,_t,De,Qt.headers,Qt.path),ze.requestUrls.push(De);var qt,yn;Array.isArray(ze.timeout)?(qt=ue(ze.timeout[0]),yn=ue(ze.timeout[1])):qt=yn=ue(ze.timeout),se("ConnectTimeout: %d, ResponseTimeout: %d",qt,yn);var rn;try{rn=Bt.request(Qt,tt)}catch(pn){return ft(pn)}return typeof window=="undefined"?function(){se("Connect timer ticking, timeout: %d",qt),yt=setTimeout(function(){yt=null,Ce===-1&&(Ce=-2);var pn="Connect timeout for "+qt+"ms",Fn="ConnectionTimeoutError";rn.socket||(Fn="SocketAssignTimeoutError",pn+=", working sockets is full"),He=new Error(pn),He.name=Fn,He.requestId=lt,se("ConnectTimeout: Request#%d %s %s: %s, connected: %s",lt,De,He.name,pn,Ie),st()},qt)}():rn.on("requestTimeout",function(){Ce===-1&&(Ce=-2);var pn="Connect timeout for "+qt+"ms";He=new Error(pn),He.name="ConnectionTimeoutError",He.requestId=lt,st()}),Je&&rn.on("finish",function(){Je.requestSent=Date.now()-mt}),rn.once("socket",function(pn){Je&&(Je.queuing=Date.now()-mt),isNode010&&pn.socket&&(pn=pn.socket);var Fn=pn.readyState;if(Fn==="opening")return pn.once("lookup",function(kn,oi,ri){se("Request#%d %s lookup: %s, %s, %s",lt,De,kn,oi,ri),Je&&(Je.dnslookup=Date.now()-mt),oi&&($e=oi)}),void pn.once("connect",function(){Je&&(Je.connected=Date.now()-mt),Ye(),vt(),se("Request#%d %s new socket connected",lt,De),Ie=!0,$e||($e=pn.remoteAddress),dt=pn.remotePort});se("Request#%d %s reuse socket connected, readyState: %s",lt,De,Fn),Ie=!0,We=!0,$e||($e=pn.remoteAddress),dt=pn.remotePort,Ye(),vt()}),rn.on("error",function(pn){pn.name!=="Error"&&pn.name!=="TypeError"||(pn.name=Ie?"ResponseError":"RequestError"),pn.message+=' (req "error")',se("Request#%d %s `req error` event emit, %s: %s",lt,De,pn.name,pn.message),ft(He||pn)}),Tt&&Tt.once("error",function(pn){pn.message+=' (writeStream "error")',He=pn,se("Request#%d %s `writeStream error` event emit, %s: %s",lt,De,pn.name,pn.message),st()}),ze.stream?(ze.stream.pipe(rn),ze.stream.once("error",function(pn){pn.message+=' (stream "error")',He=pn,se("Request#%d %s `readStream error` event emit, %s: %s",lt,De,pn.name,pn.message),st()})):rn.end(dn),rn.requestId=lt,rn}}).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 Pe=Be[ke]={i:ke,l:!1,exports:{}};return Me[ke].call(Pe.exports,Pe,Pe.exports,me),Pe.l=!0,Pe.exports}var Be={};me.m=Me,me.c=Be,me.d=function(ke,Pe,Le){me.o(ke,Pe)||Object.defineProperty(ke,Pe,{configurable:!1,enumerable:!0,get:Le})},me.n=function(ke){var Pe=ke&&ke.__esModule?function(){return ke.default}:function(){return ke};return me.d(Pe,"a",Pe),Pe},me.o=function(ke,Pe){return Object.prototype.hasOwnProperty.call(ke,Pe)},me.p="",me(me.s=12)}([function(Me,me,Be){(function(ke,Pe){Me.exports=me=Pe()})(0,function(){var ke=ke||function(Pe,Le){var he=Object.create||function(){function ie(){}return function(se){var ue;return ie.prototype=se,ue=new ie,ie.prototype=null,ue}}(),Se={},xe=Se.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,ye=this.sigBytes,we=ie.sigBytes;if(this.clamp(),ye%4)for(var be=0;be<we;be++){var Ae=ue[be>>>2]>>>24-be%4*8&255;se[ye+be>>>2]|=Ae<<24-(ye+be)%4*8}else for(var be=0;be<we;be+=4)se[ye+be>>>2]=ue[be>>>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=Pe.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=[],ye=0;ye<ie;ye+=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)*(Pe.random()>.5?1:-1)}}(4294967296*(se||Pe.random()));se=987654071*we(),ue.push(4294967296*we()|0)}return new le.init(ue,ie)}}),ve=Se.enc={},de=ve.Hex={stringify:function(ie){for(var se=ie.words,ue=ie.sigBytes,ye=[],we=0;we<ue;we++){var be=se[we>>>2]>>>24-we%4*8&255;ye.push((be>>>4).toString(16)),ye.push((15&be).toString(16))}return ye.join("")},parse:function(ie){for(var se=ie.length,ue=[],ye=0;ye<se;ye+=2)ue[ye>>>3]|=parseInt(ie.substr(ye,2),16)<<24-ye%8*4;return new le.init(ue,se/2)}},ce=ve.Latin1={stringify:function(ie){for(var se=ie.words,ue=ie.sigBytes,ye=[],we=0;we<ue;we++){var be=se[we>>>2]>>>24-we%4*8&255;ye.push(String.fromCharCode(be))}return ye.join("")},parse:function(ie){for(var se=ie.length,ue=[],ye=0;ye<se;ye++)ue[ye>>>2]|=(255&ie.charCodeAt(ye))<<24-ye%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,ye=se.sigBytes,we=this.blockSize,be=4*we,Ae=ye/be;Ae=ie?Pe.ceil(Ae):Pe.max((0|Ae)-this._minBufferSize,0);var De=Ae*we,ze=Pe.min(4*De,ye);if(De){for(var Ze=0;Ze<De;Ze+=we)this._doProcessBlock(ue,Ze);var Ye=ue.splice(0,De);se.sigBytes-=ze}return new le.init(Ye,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)}}}),Se.algo={});return Se}(Math);return ke})},function(Me,me,Be){"use strict";function ke(he,Se){if(!(he instanceof Se))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Pe=function(){function he(Se,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(Se,le.key,le)}}return function(Se,xe,ge){return xe&&he(Se.prototype,xe),ge&&he(Se,ge),Se}}(),Le=function(){function he(){ke(this,he)}return Pe(he,null,[{key:"detectIEVersion",value:function(){for(var Se=4,xe=document.createElement("div"),ge=xe.getElementsByTagName("i");xe.innerHTML="<!--[if gt IE "+Se+"]><i></i><![endif]-->",ge[0];)Se++;return Se>4&&Se}},{key:"extend",value:function(Se,xe){for(var ge in xe)Object.prototype.hasOwnProperty.call(xe,ge)&&xe[ge]&&(Se[ge]=xe[ge])}},{key:"isArray",value:function(Se){return Object.prototype.toString.call(arg)==="[object Array]"}},{key:"getFileType",value:function(Se){return Se=Se.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(Se)?"video":/.mp3|.wav|.ape|.cda|.au|.midi|.mac|.aac|.ac3|.acm|.amr|.caf|.flac|.m4a|.ra|.wma/.test(Se)?"audio":/.bmp|.jpg|.jpeg|.png/.test(Se)?"img":"other"}},{key:"isImage",value:function(Se){return Se=Se.toLowerCase(),!!/.jpg|.jpeg|.png/.test(Se)}},{key:"ISODateString",value:function(Se){function xe(ge){return ge<10?"0"+ge:ge}return Se.getUTCFullYear()+"-"+xe(Se.getUTCMonth()+1)+"-"+xe(Se.getUTCDate())+"T"+xe(Se.getUTCHours())+":"+xe(Se.getUTCMinutes())+":"+xe(Se.getUTCSeconds())+"Z"}},{key:"isIntNum",value:function(Se){return!!/^\d+$/.test(Se)}}]),he}();me.default=Le},function(Me,me,Be){(function(ke,Pe){Me.exports=me=Pe(Be(0))})(0,function(ke){return function(Pe){function Le(oe,ie,se,ue,ye,we,be){var Ae=oe+(ie&se|~ie&ue)+ye+be;return(Ae<<we|Ae>>>32-we)+ie}function he(oe,ie,se,ue,ye,we,be){var Ae=oe+(ie&ue|se&~ue)+ye+be;return(Ae<<we|Ae>>>32-we)+ie}function Se(oe,ie,se,ue,ye,we,be){var Ae=oe+(ie^se^ue)+ye+be;return(Ae<<we|Ae>>>32-we)+ie}function xe(oe,ie,se,ue,ye,we,be){var Ae=oe+(se^(ie|~ue))+ye+be;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*Pe.abs(Pe.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,ye=oe[ue];oe[ue]=16711935&(ye<<8|ye>>>24)|4278255360&(ye<<24|ye>>>8)}var we=this._hash.words,be=oe[ie+0],Ae=oe[ie+1],De=oe[ie+2],ze=oe[ie+3],Ze=oe[ie+4],Ye=oe[ie+5],Ge=oe[ie+6],ft=oe[ie+7],at=oe[ie+8],Pt=oe[ie+9],tt=oe[ie+10],vt=oe[ie+11],st=oe[ie+12],jt=oe[ie+13],lt=oe[ie+14],et=oe[ie+15],ut=we[0],mt=we[1],_t=we[2],gt=we[3];ut=Le(ut,mt,_t,gt,be,7,z[0]),gt=Le(gt,ut,mt,_t,Ae,12,z[1]),_t=Le(_t,gt,ut,mt,De,17,z[2]),mt=Le(mt,_t,gt,ut,ze,22,z[3]),ut=Le(ut,mt,_t,gt,Ze,7,z[4]),gt=Le(gt,ut,mt,_t,Ye,12,z[5]),_t=Le(_t,gt,ut,mt,Ge,17,z[6]),mt=Le(mt,_t,gt,ut,ft,22,z[7]),ut=Le(ut,mt,_t,gt,at,7,z[8]),gt=Le(gt,ut,mt,_t,Pt,12,z[9]),_t=Le(_t,gt,ut,mt,tt,17,z[10]),mt=Le(mt,_t,gt,ut,vt,22,z[11]),ut=Le(ut,mt,_t,gt,st,7,z[12]),gt=Le(gt,ut,mt,_t,jt,12,z[13]),_t=Le(_t,gt,ut,mt,lt,17,z[14]),mt=Le(mt,_t,gt,ut,et,22,z[15]),ut=he(ut,mt,_t,gt,Ae,5,z[16]),gt=he(gt,ut,mt,_t,Ge,9,z[17]),_t=he(_t,gt,ut,mt,vt,14,z[18]),mt=he(mt,_t,gt,ut,be,20,z[19]),ut=he(ut,mt,_t,gt,Ye,5,z[20]),gt=he(gt,ut,mt,_t,tt,9,z[21]),_t=he(_t,gt,ut,mt,et,14,z[22]),mt=he(mt,_t,gt,ut,Ze,20,z[23]),ut=he(ut,mt,_t,gt,Pt,5,z[24]),gt=he(gt,ut,mt,_t,lt,9,z[25]),_t=he(_t,gt,ut,mt,ze,14,z[26]),mt=he(mt,_t,gt,ut,at,20,z[27]),ut=he(ut,mt,_t,gt,jt,5,z[28]),gt=he(gt,ut,mt,_t,De,9,z[29]),_t=he(_t,gt,ut,mt,ft,14,z[30]),mt=he(mt,_t,gt,ut,st,20,z[31]),ut=Se(ut,mt,_t,gt,Ye,4,z[32]),gt=Se(gt,ut,mt,_t,at,11,z[33]),_t=Se(_t,gt,ut,mt,vt,16,z[34]),mt=Se(mt,_t,gt,ut,lt,23,z[35]),ut=Se(ut,mt,_t,gt,Ae,4,z[36]),gt=Se(gt,ut,mt,_t,Ze,11,z[37]),_t=Se(_t,gt,ut,mt,ft,16,z[38]),mt=Se(mt,_t,gt,ut,tt,23,z[39]),ut=Se(ut,mt,_t,gt,jt,4,z[40]),gt=Se(gt,ut,mt,_t,be,11,z[41]),_t=Se(_t,gt,ut,mt,ze,16,z[42]),mt=Se(mt,_t,gt,ut,Ge,23,z[43]),ut=Se(ut,mt,_t,gt,Pt,4,z[44]),gt=Se(gt,ut,mt,_t,st,11,z[45]),_t=Se(_t,gt,ut,mt,et,16,z[46]),mt=Se(mt,_t,gt,ut,De,23,z[47]),ut=xe(ut,mt,_t,gt,be,6,z[48]),gt=xe(gt,ut,mt,_t,ft,10,z[49]),_t=xe(_t,gt,ut,mt,lt,15,z[50]),mt=xe(mt,_t,gt,ut,Ye,21,z[51]),ut=xe(ut,mt,_t,gt,st,6,z[52]),gt=xe(gt,ut,mt,_t,ze,10,z[53]),_t=xe(_t,gt,ut,mt,tt,15,z[54]),mt=xe(mt,_t,gt,ut,Ae,21,z[55]),ut=xe(ut,mt,_t,gt,at,6,z[56]),gt=xe(gt,ut,mt,_t,et,10,z[57]),_t=xe(_t,gt,ut,mt,Ge,15,z[58]),mt=xe(mt,_t,gt,ut,jt,21,z[59]),ut=xe(ut,mt,_t,gt,Ze,6,z[60]),gt=xe(gt,ut,mt,_t,vt,10,z[61]),_t=xe(_t,gt,ut,mt,De,15,z[62]),mt=xe(mt,_t,gt,ut,Pt,21,z[63]),we[0]=we[0]+ut|0,we[1]=we[1]+mt|0,we[2]=we[2]+_t|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 ye=Pe.floor(se/4294967296),we=se;ie[15+(ue+64>>>9<<4)]=16711935&(ye<<8|ye>>>24)|4278255360&(ye<<24|ye>>>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 be=this._hash,Ae=be.words,De=0;De<4;De++){var ze=Ae[De];Ae[De]=16711935&(ze<<8|ze>>>24)|4278255360&(ze<<24|ze>>>8)}return be},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 Pe(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),Se=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){Pe(this,ee);var ie=ce.default.os.name,se=ce.default.os.version||"",ue=ce.default.browser.name,ye=ce.default.browser.version||"",we=window.location.href,be="";we&&(be=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=Se.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:ye,uat:navigator.userAgent,app_n:be,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=Se.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 ye=se.join("&");this.initParam.args=encodeURIComponent(ye==""?"0":ye);var we=[];for(var ue in this.initParam)we.push(ue+"="+this.initParam[ue]);var be=we.join("&");AliyunUpload&&AliyunUpload.__logTestCallback__?AliyunUpload.__logTestCallback__(be):new Image(0,0).src="https://videocloud.cn-hangzhou.log.aliyuncs.com/logstores/upload/track?"+be}}],[{key:"getUuid",value:function(){var oe=ge.default.get("p_h5_upload_u");return oe||(oe=Se.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=Se.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,Se){if(!(he instanceof Se))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Pe=function(){function he(Se,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(Se,le.key,le)}}return function(Se,xe,ge){return xe&&he(Se.prototype,xe),ge&&he(Se,ge),Se}}(),Le=function(){function he(){ke(this,he)}return Pe(he,null,[{key:"create",value:function(Se,xe){var ge,le="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),ve=[];if(xe=xe||le.length,Se)for(ge=0;ge<Se;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 Pe=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},Se=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_]+)/),ye=de.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),we=/Win\d{2}|Windows/.test(ce),be=de.match(/Windows Phone ([\d.]+)/),Ae=ye&&de.match(/TouchPad/),De=de.match(/Kindle\/([\d.]+)/),ze=de.match(/Silk\/([\d._]+)/),Ze=de.match(/(BlackBerry).*Version\/([\d.]+)/),Ye=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.]+)/),Pt=de.match(/Firefox\/([\d.]+)/),tt=de.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),vt=de.match(/MSIE\s([\d.]+)/)||de.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),st=!at&&de.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),jt=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),be&&(le.wp=!0,le.version=be[1]),ye&&(le.webos=!0,le.version=ye[2]),Ae&&(le.touchpad=!0),Ze&&(le.blackberry=!0,le.version=Ze[2]),Ye&&(le.bb10=!0,le.version=Ye[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]),Pt&&(ve.firefox=!0,ve.version=Pt[1]),tt&&(le.firefoxos=!0,le.version=tt[1]),vt&&(ve.ie=!0,ve.version=vt[1]),jt&&(oe||le.ios||we||ee)&&(ve.safari=!0,le.ios||(ve.version=jt[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/)||Pt&&de.match(/Tablet/)||vt&&!de.match(/Phone/)&&de.match(/Touch/)),le.phone=!(le.tablet||le.ipod||!(ee||ue||ye||Ze||Ye||at&&de.match(/Android/)||at&&de.match(/CriOS\/([\d.]+)/)||Pt&&de.match(/Mobile/)||vt&&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=Se(ve),{os:le,browser:ve}}(),ge=function(){function le(){ke(this,le)}return Pe(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=Se()),ve}}]),le}();me.default=ge},function(Me,me,Be){"use strict";function ke(he,Se){if(!(he instanceof Se))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Pe=function(){function he(Se,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(Se,le.key,le)}}return function(Se,xe,ge){return xe&&he(Se.prototype,xe),ge&&he(Se,ge),Se}}(),Le=function(){function he(){ke(this,he)}return Pe(he,null,[{key:"get",value:function(Se,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",Se,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 Pe=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),Se=(Be(10),function(){function xe(){ke(this,xe)}return Pe(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=Se},function(Me,me,Be){(function(ke,Pe){Me.exports=me=Pe(Be(0))})(0,function(ke){return ke.enc.Utf8})},function(Me,me,Be){(function(ke,Pe){Me.exports=me=Pe(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,Pe,Le=Be(14),he=function(xe){return xe&&xe.__esModule?xe:{default:xe}}(Le),Se={Vod:he.default};ke=[],(Pe=function(){return Se}.apply(me,ke))!==void 0&&(Me.exports=Pe),window.AliyunUpload=Se,Ln.exports=AliyunUpload},function(Me,me,Be){"use strict";function ke(Ye){return Ye&&Ye.__esModule?Ye:{default:Ye}}function Pe(Ye,Ge){if(!(Ye instanceof Ge))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Le=function(){function Ye(Ge,ft){for(var at=0;at<ft.length;at++){var Pt=ft[at];Pt.enumerable=Pt.enumerable||!1,Pt.configurable=!0,"value"in Pt&&(Pt.writable=!0),Object.defineProperty(Ge,Pt.key,Pt)}}return function(Ge,ft,at){return ft&&Ye(Ge.prototype,ft),at&&Ye(Ge,at),Ge}}(),he=Be(15),Se=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),ye=Be(26),we=ke(ye),be=Be(31),Ae=ke(be),De=Be(32),ze=ke(De),Ze=(Be(2),function(){function Ye(Ge){Pe(this,Ye),this.options=Ge,this.options.partSize=this.options.partSize||Se.UPLOADDEFAULT.PARTSIZE,this.options.parallel=this.options.parallel||Se.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(Ye,[{key:"init",value:function(Ge,ft,at,Pt){return this._retryCount=0,!(at&&!Pt||!at&&Pt)&&!(Ge&&!ft||!Ge&&ft)&&(this._ossCreditor.accessKeyId=Ge,this._ossCreditor.accessKeySecret=ft,this._ossCreditor.securityToken=at,this._ossCreditor.expireTime=Pt,!0)}},{key:"addFile",value:function(Ge,ft,at,Pt,tt,vt){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(et){console.log(et)}for(var st=(this.options,0);st<this._uploadList.length;st++)if(this._uploadList[st].file==Ge)return!1;var jt=new Object;if(jt.file=Ge,jt._endpoint=ft,jt._bucket=at,jt._object=Pt,jt.state=he.UPLOADSTATE.INIT,jt.isImage=ie.default.isImage(Ge.name),!jt.isImage&&this.options.enableUploadProgress){var lt=this;ze.default.getMd5(Ge,function(et){jt.fileHash=et;var ut=lt._getCheckoutpoint(jt);lt.options.localCheckpoint||ut||lt._getCheckoutpointFromCloud(jt,function(mt){if(mt.UploadPoint){var _t=JSON.parse(mt.UploadPoint);_t.loaded!=1&&(jt.checkpoint=_t.checkpoint,jt.loaded=_t.loaded,jt.videoId=mt.VideoId,lt._saveCheckoutpoint(jt,_t.checkpoint))}},function(mt){try{if((mt=JSON.parse(mt))&&mt.Code=="InvalidParameter"&&mt.Message.indexOf("UserId")>0){lt._invalidUserId=!0;var _t=mt.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(_t)}}catch(gt){console.log(gt)}})})}tt&&(jt.videoInfo=tt?JSON.parse(tt).Vod:{},jt.userData=ve.default.encode(tt)),jt.ri=ue.default.create(),this._uploadList.push(jt),this._reportLog("20001",jt,{ql:this._uploadList.length});try{this.options.addFileSuccess&&this.options.addFileSuccess(jt)}catch(et){console.log(et)}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,Pt=0;Pt<this._uploadList.length;Pt++)ft.uploadList[Pt].state==he.UPLOADSTATE.SUCCESS&&at++,this._uploadList[Pt].state==Ge&&(ft.uploadList.splice(Pt,1),Pt--);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,Pt){if(this.options,!(Ge&&ft&&at&&Pt)||this._state!=he.VODSTATE.EXPIRE||this._curIndex==-1)return!1;var tt="";return this._uploadList.length>this._curIndex&&(tt=this._uploadList[this._curIndex]),tt&&(this.init(Ge,ft,at,Pt),this._state=he.VODSTATE.START,this._ossUpload=null,this._uploadCore(tt,tt.retry),tt.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 Pt=this._uploadList[this._curIndex];Pt.object?this._refreshSTSTokenUpload(Pt,Ge,ft,at):this.setSTSToken(Pt,Ge,ft,at)}}},{key:"setSTSTokenDirectlyUpload",value:function(Ge,ft,at,Pt,tt){if(!(ft&&at&&Pt&&tt))return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken and expiration should not be empty."),!1;this._ut="oss";var vt=Ge;this.init(ft,at,Pt,tt),vt.endpoint=vt._endpoint,vt.bucket=vt._bucket,vt.object=vt._object,this._ossUpload=null,this._uploadCore(vt,Ge.retry),Ge.retry=!1}},{key:"setSTSToken",value:function(Ge,ft,at,Pt){if(!ft||!at||!Pt)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;this._ut="vod",this._uploadWay="sts";var tt=Ge.videoInfo,vt={accessKeyId:ft,securityToken:Pt,accessKeySecret:at,fileName:Ge.file.name,title:tt.Title,requestId:Ge.ri,region:this.options.region};tt.ImageType&&(vt.imageType=tt.ImageType),tt.ImageExt&&(vt.imageExt=tt.ImageExt),tt.FileSize&&(vt.fileSize=tt.FileSize),tt.Description&&(vt.description=tt.Description),tt.CateId&&(vt.cateId=tt.CateId),tt.Tags&&(vt.tags=tt.Tags),tt.TemplateGroupId&&(vt.templateGroupId=tt.TemplateGroupId),tt.StorageLocation&&(vt.storageLocation=tt.StorageLocation),tt.CoverURL&&(vt.coverUrl=tt.CoverURL),tt.TransCodeMode&&(vt.transCodeMode=tt.TransCodeMode),tt.UserData&&(vt.userData=tt.UserData);var st=this,jt="getUploadAuth";Ge.videoId?(vt.videoId=Ge.videoId,jt="refreshUploadAuth"):Ge.isImage&&(jt="getImageUploadAuth"),we.default[jt](vt,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,Pt){if(!Ge||!ft||!at)return!1;var tt=JSON.parse(ve.default.decode(ft));if(!(tt.AccessKeyId&&tt.AccessKeySecret&&tt.SecurityToken&&tt.Expiration))return console.error("uploadauth is invalid"),!1;var vt={},st=Ge;if(at){if(vt=JSON.parse(ve.default.decode(at)),!vt.Endpoint||!vt.Bucket||!vt.FileName)return console.error("uploadAddress is invalid"),!1}else vt.Endpoint=st.endpoint,vt.Bucket=st.bucket,vt.FileName=st.object;this._ut="vod",this._uploadWay="vod",this.options.region=tt.Region||this.options.region,this.init(tt.AccessKeyId,tt.AccessKeySecret,tt.SecurityToken,tt.Expiration),st.endpoint=st._endpoint?st._endpoint:vt.Endpoint,st.bucket=st._bucket?st._bucket:vt.Bucket,st.object=st._object?st._object:vt.FileName,st.region=this.options.region,Pt&&(st.videoId=Pt),this._ossUpload=null,this._uploadCore(st,Ge.retry),Ge.retry=!1}},{key:"_refreshSTSTokenUpload",value:function(Ge,ft,at,Pt){if(!ft||!at||!Pt)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;var tt={accessKeyId:ft,securityToken:Pt,accessKeySecret:at,videoId:Ge.object,requestId:Ge.ri,region:this.options.region},vt=this,st="refreshUploadAuth";Ge.isImage&&(st="getImageUploadAuth"),we.default[st](tt,function(jt){vt.setUploadAuthAndAddress(Ge,jt.UploadAuth,UploadAddress),vt._state=he.VODSTATE.START},function(jt){vt._error(Ge,{name:jt.Code,code:jt.Code,message:jt.Message,requestId:jt.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 Pt=this._getCheckoutpoint(Ge);Pt&&Pt.state!=he.UPLOADSTATE.UPLOADING&&(Ge.checkpoint=Pt,Ge.videoId=Pt.videoId),at.onUploadstarted(Ge)}catch(tt){console.log(tt)}}},{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,et){ft._error.call(ft,lt,et)},oncomplete:function(lt,et){ft._complete.call(ft,lt,et)},onprogress:function(lt,et,ut){ft._progress.call(ft,lt,et,ut)}})}var at=ie.default.getFileType(Ge.file.name),Pt=this._getCheckoutpoint(Ge),tt="",vt="";Pt&&Pt.checkpoint&&(vt=Pt.state,tt=Pt.videoId,Pt=Pt.checkpoint),Pt&&tt==Ge.videoId&&vt!=he.UPLOADSTATE.UPLOADING&&(Pt.file=Ge.file,Ge.checkpoint=Pt,Pt.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 jt={headers:{"x-oss-notification":Ge.userData?Ge.userData:""},partSize:st,parallel:this.options.parallel};this._ossUpload.upload(Ge,jt)}},{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(Pt){console.log(Pt)}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(Pt){console.log(Pt)}}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],Pt=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(vt){console.log(vt)}if(at&&this._changeState(Ge,Pt),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 tt=this;this._state=he.VODSTATE.START,setTimeout(function(){tt.nextUpload()},100)}}},{key:"_complete",value:function(Ge,ft){if(Ge.state=he.UPLOADSTATE.SUCCESS,this.options.onUploadSucceed)try{this.options.onUploadSucceed(Ge)}catch(tt){console.log(tt)}var at=0;ft&&ft.res&&ft.res.headers&&(at=ft.res.headers["x-oss-request-id"]),this._removeCheckoutpoint(Ge);var Pt=this;setTimeout(function(){Pt.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(et){console.log(et)}var Pt=ft.checkpoint,tt=0;Pt&&(Ge.checkpoint=Pt,this._saveCheckoutpoint(Ge,Pt,he.UPLOADSTATE.UPLOADING),tt=Pt.uploadId),this._retryCount=0;var vt=this._getPortNumber(Pt),st=0;if(at&&at.headers&&(st=at.headers["x-oss-request-id"]),ft.loaded!=0&&this._reportLog("20007",Ge,{pn:vt,requestId:st}),ft.loaded!=1&&this._reportLog("20005",Ge,{UploadId:tt,pn:vt+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 jt={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(jt,function(){},function(et){if((et=JSON.parse(et))&&et.Code=="InvalidParameter"&&et.Message.indexOf("UserId")>0){lt._invalidUserId=!0;var ut=et.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(ut)}})}catch(et){console.log(et)}}}},{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(Pt){}return""}},{key:"_saveCheckoutpoint",value:function(Ge,ft,at){if(ft){var Pt=this._getCheckoutpointKey(Ge),tt=Ge.file,vt={fileName:tt.name,lastModified:tt.lastModified,size:tt.size,object:Ge.object,videoId:Ge.videoId,bucket:Ge.bucket,endpoint:Ge.endpoint,checkpoint:ft,loaded:Ge.loaded,state:at};ce.default.set(Pt,JSON.stringify(vt))}}},{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 Pt={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(Pt,function(tt){ft(tt)},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}}]),Ye}());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 Pe(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),Se=Be(17),xe=(ke(Se),Be(1)),ge=(ke(xe),function(){function le(ve,de){if(Pe(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,Se){if(!(he instanceof Se))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Pe=function(){function he(Se,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(Se,le.key,le)}}return function(Se,xe,ge){return xe&&he(Se.prototype,xe),ge&&he(Se,ge),Se}}(),Le=function(){function he(){ke(this,he)}return Pe(he,null,[{key:"format",value:function(Se){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:Se,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 Pe(Se,xe){if(!(Se instanceof xe))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Le=function(){function Se(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&&Se(xe.prototype,ge),le&&Se(xe,le),xe}}(),he=function(){function Se(){Pe(this,Se)}return Le(Se,null,[{key:"encode",value:function(xe){return new ke(xe).toString("base64")}},{key:"decode",value:function(xe){return new ke(xe,"base64").toString()}}]),Se}();me.default=he}).call(me,Be(19).Buffer)},function(Me,me,Be){"use strict";(function(ke){function Pe(){return he.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Le(nt,He){if(Pe()<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 Se(this,nt,He,Ie)}function Se(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"||dn(He.length)?Le(nt,0):de(nt,He);if(He.type==="Buffer"&&Rt(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>=Pe())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Pe().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 Qt(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 Qt(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 vt(this,He,Ie);case"utf8":case"utf-8":return ft(this,He,Ie);case"ascii":return Pt(this,He,Ie);case"latin1":case"binary":return tt(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 ye(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 Ce(rn,pn){return Ne===1?rn[pn]:rn.readUInt16BE(pn*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 Tt=-1;for(Je=Ie;Je<$e;Je++)if(Ce(nt,Je)===Ce(He,Tt===-1?0:Je-Tt)){if(Tt===-1&&(Tt=Je),Je-Tt+1===dt)return Tt*Ne}else Tt!==-1&&(Je-=Je-Tt),Tt=-1}else for(Ie+dt>$e&&(Ie=$e-dt),Je=Ie;Je>=0;Je--){for(var qt=!0,yn=0;yn<dt;yn++)if(Ce(nt,Je+yn)!==Ce(He,yn)){qt=!1;break}if(qt)return Je}return-1}function be(nt,He,Ie,We){Ie=Number(Ie)||0;var Oe=nt.length-Ie;We?(We=Number(We))>Oe&&(We=Oe):We=Oe;var Ce=He.length;if(Ce%2!=0)throw new TypeError("Invalid hex string");We>Ce/2&&(We=Ce/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 Jt(Qt(He,nt.length-Ie),nt,Ie,We)}function De(nt,He,Ie,We){return Jt(bn(He),nt,Ie,We)}function ze(nt,He,Ie,We){return De(nt,He,Ie,We)}function Ze(nt,He,Ie,We){return Jt(Kt(He),nt,Ie,We)}function Ye(nt,He,Ie,We){return Jt(Wt(He,nt.length-Ie),nt,Ie,We)}function Ge(nt,He,Ie){return He===0&&Ie===nt.length?Lt.fromByteArray(nt):Lt.fromByteArray(nt.slice(He,Ie))}function ft(nt,He,Ie){Ie=Math.min(nt.length,Ie);for(var We=[],Oe=He;Oe<Ie;){var Ce=nt[Oe],Ne=null,$e=Ce>239?4:Ce>223?3:Ce>191?2:1;if(Oe+$e<=Ie){var dt,Je,Tt,qt;switch($e){case 1:Ce<128&&(Ne=Ce);break;case 2:dt=nt[Oe+1],(192&dt)==128&&(qt=(31&Ce)<<6|63&dt)>127&&(Ne=qt);break;case 3:dt=nt[Oe+1],Je=nt[Oe+2],(192&dt)==128&&(192&Je)==128&&(qt=(15&Ce)<<12|(63&dt)<<6|63&Je)>2047&&(qt<55296||qt>57343)&&(Ne=qt);break;case 4:dt=nt[Oe+1],Je=nt[Oe+2],Tt=nt[Oe+3],(192&dt)==128&&(192&Je)==128&&(192&Tt)==128&&(qt=(15&Ce)<<18|(63&dt)<<12|(63&Je)<<6|63&Tt)>65535&&qt<1114112&&(Ne=qt)}}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<=St)return String.fromCharCode.apply(String,nt);for(var Ie="",We=0;We<He;)Ie+=String.fromCharCode.apply(String,nt.slice(We,We+=St));return Ie}function Pt(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 tt(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 vt(nt,He,Ie){var We=nt.length;(!He||He<0)&&(He=0),(!Ie||Ie<0||Ie>We)&&(Ie=We);for(var Oe="",Ce=He;Ce<Ie;++Ce)Oe+=hn(nt[Ce]);return Oe}function st(nt,He,Ie){for(var We=nt.slice(He,Ie),Oe="",Ce=0;Ce<We.length;Ce+=2)Oe+=String.fromCharCode(We[Ce]+256*We[Ce+1]);return Oe}function jt(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,Ce){if(!he.isBuffer(nt))throw new TypeError('"buffer" argument must be a Buffer instance');if(He>Oe||He<Ce)throw new RangeError('"value" argument is out of bounds');if(Ie+We>nt.length)throw new RangeError("Index out of range")}function et(nt,He,Ie,We){He<0&&(He=65535+He+1);for(var Oe=0,Ce=Math.min(nt.length-Ie,2);Oe<Ce;++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,Ce=Math.min(nt.length-Ie,4);Oe<Ce;++Oe)nt[Ie+Oe]=He>>>8*(We?Oe:3-Oe)&255}function mt(nt,He,Ie,We,Oe,Ce){if(Ie+We>nt.length)throw new RangeError("Index out of range");if(Ie<0)throw new RangeError("Index out of range")}function _t(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 Bt(nt){if(nt=Ht(nt).replace(yt,""),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 Qt(nt,He){He=He||1/0;for(var Ie,We=nt.length,Oe=null,Ce=[],Ne=0;Ne<We;++Ne){if((Ie=nt.charCodeAt(Ne))>55295&&Ie<57344){if(!Oe){if(Ie>56319){(He-=3)>-1&&Ce.push(239,191,189);continue}if(Ne+1===We){(He-=3)>-1&&Ce.push(239,191,189);continue}Oe=Ie;continue}if(Ie<56320){(He-=3)>-1&&Ce.push(239,191,189),Oe=Ie;continue}Ie=65536+(Oe-55296<<10|Ie-56320)}else Oe&&(He-=3)>-1&&Ce.push(239,191,189);if(Oe=null,Ie<128){if((He-=1)<0)break;Ce.push(Ie)}else if(Ie<2048){if((He-=2)<0)break;Ce.push(Ie>>6|192,63&Ie|128)}else if(Ie<65536){if((He-=3)<0)break;Ce.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;Ce.push(Ie>>18|240,Ie>>12&63|128,Ie>>6&63|128,63&Ie|128)}}return Ce}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,Ce=[],Ne=0;Ne<nt.length&&!((He-=2)<0);++Ne)Ie=nt.charCodeAt(Ne),We=Ie>>8,Oe=Ie%256,Ce.push(Oe),Ce.push(We);return Ce}function Kt(nt){return Lt.toByteArray(Bt(nt))}function Jt(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 dn(nt){return nt!==nt}var Lt=Be(21),pt=Be(22),Rt=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=Pe(),he.poolSize=8192,he._augment=function(nt){return nt.__proto__=he.prototype,nt},he.from=function(nt,He,Ie){return Se(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,Ce=Math.min(Ie,We);Oe<Ce;++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(!Rt(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 Ce=nt[Ie];if(!he.isBuffer(Ce))throw new TypeError('"list" argument must be an Array of Buffers');Ce.copy(We,Oe),Oe+=Ce.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 Ce=Oe-We,Ne=Ie-He,$e=Math.min(Ce,Ne),dt=this.slice(We,Oe),Je=nt.slice(He,Ie),Tt=0;Tt<$e;++Tt)if(dt[Tt]!==Je[Tt]){Ce=dt[Tt],Ne=Je[Tt];break}return Ce<Ne?-1:Ne<Ce?1:0},he.prototype.includes=function(nt,He,Ie){return this.indexOf(nt,He,Ie)!==-1},he.prototype.indexOf=function(nt,He,Ie){return ye(this,nt,He,Ie,!0)},he.prototype.lastIndexOf=function(nt,He,Ie){return ye(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 Ce=!1;;)switch(We){case"hex":return be(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 Ye(this,nt,He,Ie);default:if(Ce)throw new TypeError("Unknown encoding: "+We);We=(""+We).toLowerCase(),Ce=!0}},he.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var St=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 Ce=0;Ce<Oe;++Ce)We[Ce]=this[Ce+nt]}return We},he.prototype.readUIntLE=function(nt,He,Ie){nt|=0,He|=0,Ie||jt(nt,He,this.length);for(var We=this[nt],Oe=1,Ce=0;++Ce<He&&(Oe*=256);)We+=this[nt+Ce]*Oe;return We},he.prototype.readUIntBE=function(nt,He,Ie){nt|=0,He|=0,Ie||jt(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||jt(nt,1,this.length),this[nt]},he.prototype.readUInt16LE=function(nt,He){return He||jt(nt,2,this.length),this[nt]|this[nt+1]<<8},he.prototype.readUInt16BE=function(nt,He){return He||jt(nt,2,this.length),this[nt]<<8|this[nt+1]},he.prototype.readUInt32LE=function(nt,He){return He||jt(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||jt(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||jt(nt,He,this.length);for(var We=this[nt],Oe=1,Ce=0;++Ce<He&&(Oe*=256);)We+=this[nt+Ce]*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||jt(nt,He,this.length);for(var We=He,Oe=1,Ce=this[nt+--We];We>0&&(Oe*=256);)Ce+=this[nt+--We]*Oe;return Oe*=128,Ce>=Oe&&(Ce-=Math.pow(2,8*He)),Ce},he.prototype.readInt8=function(nt,He){return He||jt(nt,1,this.length),128&this[nt]?-1*(255-this[nt]+1):this[nt]},he.prototype.readInt16LE=function(nt,He){He||jt(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||jt(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||jt(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||jt(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||jt(nt,4,this.length),pt.read(this,nt,!0,23,4)},he.prototype.readFloatBE=function(nt,He){return He||jt(nt,4,this.length),pt.read(this,nt,!1,23,4)},he.prototype.readDoubleLE=function(nt,He){return He||jt(nt,8,this.length),pt.read(this,nt,!0,52,8)},he.prototype.readDoubleBE=function(nt,He){return He||jt(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,Ce=0;for(this[He]=255&nt;++Ce<Ie&&(Oe*=256);)this[He+Ce]=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,Ce=1;for(this[He+Oe]=255&nt;--Oe>=0&&(Ce*=256);)this[He+Oe]=nt/Ce&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):et(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):et(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 Ce=0,Ne=1,$e=0;for(this[He]=255&nt;++Ce<Ie&&(Ne*=256);)nt<0&&$e===0&&this[He+Ce-1]!==0&&($e=1),this[He+Ce]=(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 Ce=Ie-1,Ne=1,$e=0;for(this[He+Ce]=255&nt;--Ce>=0&&(Ne*=256);)nt<0&&$e===0&&this[He+Ce+1]!==0&&($e=1),this[He+Ce]=(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):et(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):et(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 _t(this,nt,He,!0,Ie)},he.prototype.writeFloatBE=function(nt,He,Ie){return _t(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,Ce=We-Ie;if(this===nt&&Ie<He&&He<We)for(Oe=Ce-1;Oe>=0;--Oe)nt[Oe+He]=this[Oe+Ie];else if(Ce<1e3||!he.TYPED_ARRAY_SUPPORT)for(Oe=0;Oe<Ce;++Oe)nt[Oe+He]=this[Oe+Ie];else Uint8Array.prototype.set.call(nt,this.subarray(Ie,Ie+Ce),He);return Ce},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 Ce;if(typeof nt=="number")for(Ce=He;Ce<Ie;++Ce)this[Ce]=nt;else{var Ne=he.isBuffer(nt)?nt:Qt(new he(nt,We).toString()),$e=Ne.length;for(Ce=0;Ce<Ie-He;++Ce)this[Ce+He]=Ne[Ce%$e]}return this};var yt=/[^+\/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 Pe(ee){return 3*ee.length/4-ke(ee)}function Le(ee){var oe,ie,se,ue,ye,we=ee.length;ue=ke(ee),ye=new ve(3*we/4-ue),ie=ue>0?we-4:we;var be=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)],ye[be++]=se>>16&255,ye[be++]=se>>8&255,ye[be++]=255&se;return ue===2?(se=le[ee.charCodeAt(oe)]<<2|le[ee.charCodeAt(oe+1)]>>4,ye[be++]=255&se):ue===1&&(se=le[ee.charCodeAt(oe)]<<10|le[ee.charCodeAt(oe+1)]<<4|le[ee.charCodeAt(oe+2)]>>2,ye[be++]=se>>8&255,ye[be++]=255&se),ye}function he(ee){return ge[ee>>18&63]+ge[ee>>12&63]+ge[ee>>6&63]+ge[63&ee]}function Se(ee,oe,ie){for(var se,ue=[],ye=oe;ye<ie;ye+=3)se=(ee[ye]<<16)+(ee[ye+1]<<8)+ee[ye+2],ue.push(he(se));return ue.join("")}function xe(ee){for(var oe,ie=ee.length,se=ie%3,ue="",ye=[],we=0,be=ie-se;we<be;we+=16383)ye.push(Se(ee,we,we+16383>be?be: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+="="),ye.push(ue),ye.join("")}me.byteLength=Pe,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,Pe,Le,he){var Se,xe,ge=8*he-Le-1,le=(1<<ge)-1,ve=le>>1,de=-7,ce=Pe?he-1:0,z=Pe?-1:1,ee=Be[ke+ce];for(ce+=z,Se=ee&(1<<-de)-1,ee>>=-de,de+=ge;de>0;Se=256*Se+Be[ke+ce],ce+=z,de-=8);for(xe=Se&(1<<-de)-1,Se>>=-de,de+=Le;de>0;xe=256*xe+Be[ke+ce],ce+=z,de-=8);if(Se===0)Se=1-ve;else{if(Se===le)return xe?NaN:1/0*(ee?-1:1);xe+=Math.pow(2,Le),Se-=ve}return(ee?-1:1)*xe*Math.pow(2,Se-Le)},me.write=function(Be,ke,Pe,Le,he,Se){var xe,ge,le,ve=8*Se-he-1,de=(1<<ve)-1,ce=de>>1,z=he===23?Math.pow(2,-24)-Math.pow(2,-77):0,ee=Le?0:Se-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[Pe+ee]=255&ge,ee+=oe,ge/=256,he-=8);for(xe=xe<<he|ge,ve+=he;ve>0;Be[Pe+ee]=255&xe,ee+=oe,xe/=256,ve-=8);Be[Pe+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,Se){if(!(he instanceof Se))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Pe=function(){function he(Se,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(Se,le.key,le)}}return function(Se,xe,ge){return xe&&he(Se.prototype,xe),ge&&he(Se,ge),Se}}(),Le=function(){function he(){ke(this,he)}return Pe(he,null,[{key:"set",value:function(Se,xe){try{window.localStorage&&localStorage.setItem(Se,xe)}catch(ge){window[Se+"_localStorage"]=xe}}},{key:"get",value:function(Se){try{if(window.localStorage)return localStorage.getItem(Se)}catch(xe){return window[Se+"_localStorage"]}return""}},{key:"remove",value:function(Se){try{window.localStorage&&localStorage.removeItem(Se)}catch(xe){delete window[Se+"_localStorage"]}}}]),he}();me.default=Le},function(Me,me,Be){"use strict";function ke(he,Se){if(!(he instanceof Se))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Pe=function(){function he(Se,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(Se,le.key,le)}}return function(Se,xe,ge){return xe&&he(Se.prototype,xe),ge&&he(Se,ge),Se}}(),Le=function(){function he(){ke(this,he)}return Pe(he,null,[{key:"get",value:function(Se){for(var xe=Se+"",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(Se,xe,ge){var le=new Date;le.setTime(le.getTime()+24*ge*60*60*1e3);var ve="expires="+le.toGMTString();document.cookie=Se+"="+escape(xe)+"; "+ve}}]),he}();me.default=Le},function(Me,me,Be){"use strict";function ke(ve){return ve&&ve.__esModule?ve:{default:ve}}function Pe(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),Se=ke(he),xe=Be(9),ge=ke(xe),le=function(){function ve(){Pe(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;Se.default.get(se,function(ye){var ye=JSON.parse(ye);ce&&ce(ye)},function(ue){if(z){var ye=JSON.parse(ue);z(ye)}})}},{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;Se.default.get(se,function(ue){try{ue=JSON.parse(ue)}catch(ye){if(z)return void z({Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"})}ce&&ce(ue)},function(ue){if(z){var ye={Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"};try{ye=JSON.parse(ue)}catch(we){}z(ye)}})}},{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;Se.default.get(se,function(ue){ue=JSON.parse(ue),ce&&ce(ue)},function(ue){if(z){var ye=JSON.parse(ue);z(ye)}})}}]),ve}();me.default=le},function(Me,me,Be){(function(ke,Pe,Le){Me.exports=me=Pe(Be(0),Be(28),Be(29))})(0,function(ke){return ke.HmacSHA1})},function(Me,me,Be){(function(ke,Pe){Me.exports=me=Pe(Be(0))})(0,function(ke){return function(){var Pe=ke,Le=Pe.lib,he=Le.WordArray,Se=Le.Hasher,xe=Pe.algo,ge=[],le=xe.SHA1=Se.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 ye=ge[ue-3]^ge[ue-8]^ge[ue-14]^ge[ue-16];ge[ue]=ye<<1|ye>>>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=Se.clone.call(this);return ve._hash=this._hash.clone(),ve}});Pe.SHA1=Se._createHelper(le),Pe.HmacSHA1=Se._createHmacHelper(le)}(),ke.SHA1})},function(Me,me,Be){(function(ke,Pe){Me.exports=me=Pe(Be(0))})(0,function(ke){(function(){var Pe=ke,Le=Pe.lib,he=Le.Base,Se=Pe.enc,xe=Se.Utf8,ge=Pe.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,Pe){Me.exports=me=Pe(Be(0))})(0,function(ke){return function(){function Pe(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 Se.create(de,ce)}var Le=ke,he=Le.lib,Se=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 ye=de.charAt(64);if(ye)for(;ce.length%4;)ce.push(ye);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 Pe(ge,le,de)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),ke.enc.Base64})},function(Me,me,Be){"use strict";function ke(be){return be&&be.__esModule?be:{default:be}}function Pe(be,Ae){if(!(be instanceof Ae))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Le=function(){function be(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&&be(Ae.prototype,De),ze&&be(Ae,ze),Ae}}(),he=Be(8),Se=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),ye=Be(10),we=function(){function be(){Pe(this,be)}return Le(be,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(ye.parse(Ze)).toString(ue)}},{key:"upload",value:function(Ae,De,ze){var Ze=ee.default.ISODateString(new Date),Ye=Math.floor(new Date().valueOf()/1e3),Ge=ve.default.getClientId();Ge=ve.default.setClientId(Ge);var ft=be.getAuthInfo(Ae.userId,Ge,Ye),at=ie.default.randomUUID(),Pt={Source:"WebSDK",BusinessType:"UploadVideo",Action:"ReportUploadProgress",TerminalType:"H5",DeviceModel:ge.default.browser.name+(ge.default.browser.version||""),AppVersion:ce.default.version,AuthTimestamp:Ye,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&&(Pt.ClientId=Ge);var tt=ie.default.makeUTF8sort(Pt,"=","&")+"&Signature="+ie.default.aliyunEncodeURI(ie.default.makeChangeSiga(Pt,Ae.accessKeySecret)),vt="https://vod."+Ae.region+".aliyuncs.com/?"+tt;Se.default.get(vt,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),Ye=Math.floor(new Date().valueOf()/1e3),Ge=ve.default.getClientId(),ft=be.getAuthInfo(Ae.userId,Ge,Ye),at=ie.default.randomUUID(),Pt={Source:"WebSDK",BusinessType:"UploadVideo",Action:"GetUploadProgress",TerminalType:"H5",DeviceModel:ge.default.browser.name+(ge.default.browser.version||""),AppVersion:ce.default.version,AuthTimestamp:Ye,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&&(Pt.ClientId=Ge);var tt=ie.default.makeUTF8sort(Pt,"=","&")+"&Signature="+ie.default.aliyunEncodeURI(ie.default.makeChangeSiga(Pt,Ae.accessKeySecret)),vt="https://vod."+Ae.region+".aliyuncs.com/?"+tt;Se.default.get(vt,function(st){var jt={},lt=Ge;st=st?JSON.parse(st):{},st.UploadProgress&&st.UploadProgress.UploadProgressList&&st.UploadProgress.UploadProgressList.length>0&&(jt=st.UploadProgress.UploadProgressList[0],lt=jt.ClientId),ve.default.setClientId(lt),De&&De(jt)},function(st){st&&(ze(st),console.log(st))})}}]),be}();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 Pe=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),Se=(Be(11),function(){function xe(){ke(this,xe)}return Pe(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=Se},function(Me,me,Be){(function(ke,Pe){Me.exports=me=Pe(Be(0))})(0,function(ke){return ke.enc.Latin1})}])},50371:function(Ln,tn){"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 Pe=Be[ke];Pe!==void 0&&(Me[ke]=Pe)})}return Me}tn.Z=Ee},13845:function(Ln,tn,Ee){"use strict";Ee.d(tn,{F:function(){return Me},Z:function(){return me}});function Me(Be){return Be!=null&&Be===Be.window}function me(Be,ke){var Pe,Le;if(typeof window=="undefined")return 0;const he=ke?"scrollTop":"scrollLeft";let Se=0;return Me(Be)?Se=Be[ke?"pageYOffset":"pageXOffset"]:Be instanceof Document?Se=Be.documentElement[he]:(Be instanceof HTMLElement||Be)&&(Se=Be[he]),Be&&!Me(Be)&&typeof Se!="number"&&(Se=(Le=((Pe=Be.ownerDocument)!==null&&Pe!==void 0?Pe:Be).documentElement)===null||Le===void 0?void 0:Le[he]),Se}},56762:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return me}});var Me=Ee(59301);function me(){const[,Be]=Me.useReducer(ke=>ke+1,0);return Be}},68031:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return ke}});var Me=Ee(23073);function me(Pe,Le,he,Se){const xe=he-Le;return Pe/=Se/2,Pe<1?xe/2*Pe*Pe*Pe+Le:xe/2*((Pe-=2)*Pe*Pe+2)+Le}var Be=Ee(13845);function ke(Pe){let Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:he=()=>window,callback:Se,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,Pe,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 Se=="function"&&Se()};(0,Me.Z)(de)}},24905:function(Ln,tn,Ee){"use strict";Ee.d(tn,{default:function(){return Ae}});var Me=Ee(92310),me=Ee.n(Me),Be=Ee(5630),ke=Ee(59301),Pe=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 Ye in De)Object.prototype.hasOwnProperty.call(De,Ye)&&ze.indexOf(Ye)<0&&(Ze[Ye]=De[Ye]);if(De!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ge=0,Ye=Object.getOwnPropertySymbols(De);Ge<Ye.length;Ge++)ze.indexOf(Ye[Ge])<0&&Object.prototype.propertyIsEnumerable.call(De,Ye[Ge])&&(Ze[Ye[Ge]]=De[Ye[Ge]]);return Ze};const ce=(De,ze)=>{var Ze;const{prefixCls:Ye,className:Ge,rootClassName:ft,children:at,indeterminate:Pt=!1,style:tt,onMouseEnter:vt,onMouseLeave:st,skipGroup:jt=!1,disabled:lt}=De,et=de(De,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:ut,direction:mt,checkbox:_t}=ke.useContext(Pe.E_),gt=ke.useContext(xe),{isFormItemInput:Bt}=ke.useContext(he.aM),Ht=ke.useContext(Le.Z),hn=(Ze=(gt==null?void 0:gt.disabled)||lt)!==null&&Ze!==void 0?Ze:Ht,Qt=ke.useRef(et.value);ke.useEffect(()=>{gt==null||gt.registerValue(et.value)},[]),ke.useEffect(()=>{if(!jt)return et.value!==Qt.current&&(gt==null||gt.cancelValue(Qt.current),gt==null||gt.registerValue(et.value),Qt.current=et.value),()=>gt==null?void 0:gt.cancelValue(et.value)},[et.value]);const bn=ut("checkbox",Ye),[Wt,Kt]=(0,ge.ZP)(bn),Jt=Object.assign({},et);gt&&!jt&&(Jt.onChange=function(){et.onChange&&et.onChange.apply(et,arguments),gt.toggleOption&>.toggleOption({label:at,value:et.value})},Jt.name=gt.name,Jt.checked=gt.value.includes(et.value));const dn=me()(`${bn}-wrapper`,{[`${bn}-rtl`]:mt==="rtl",[`${bn}-wrapper-checked`]:Jt.checked,[`${bn}-wrapper-disabled`]:hn,[`${bn}-wrapper-in-form-item`]:Bt},_t==null?void 0:_t.className,Ge,ft,Kt),Lt=me()({[`${bn}-indeterminate`]:Pt},ve.A,Kt),pt=Pt?"mixed":void 0;return Wt(ke.createElement(le.Z,{component:"Checkbox",disabled:hn},ke.createElement("label",{className:dn,style:Object.assign(Object.assign({},_t==null?void 0:_t.style),tt),onMouseEnter:vt,onMouseLeave:st},ke.createElement(Be.Z,Object.assign({"aria-checked":pt},Jt,{prefixCls:bn,className:Lt,disabled:hn,ref:ze})),at!==void 0&&ke.createElement("span",null,at))))};var ee=ke.forwardRef(ce),oe=Ee(26390),ie=Ee(64002),se=function(De,ze){var Ze={};for(var Ye in De)Object.prototype.hasOwnProperty.call(De,Ye)&&ze.indexOf(Ye)<0&&(Ze[Ye]=De[Ye]);if(De!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ge=0,Ye=Object.getOwnPropertySymbols(De);Ge<Ye.length;Ge++)ze.indexOf(Ye[Ge])<0&&Object.prototype.propertyIsEnumerable.call(De,Ye[Ge])&&(Ze[Ye[Ge]]=De[Ye[Ge]]);return Ze};const ue=(De,ze)=>{const{defaultValue:Ze,children:Ye,options:Ge=[],prefixCls:ft,className:at,rootClassName:Pt,style:tt,onChange:vt}=De,st=se(De,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:jt,direction:lt}=ke.useContext(Pe.E_),[et,ut]=ke.useState(st.value||Ze||[]),[mt,_t]=ke.useState([]);ke.useEffect(()=>{"value"in st&&ut(st.value||[])},[st.value]);const gt=ke.useMemo(()=>Ge.map(Rt=>typeof Rt=="string"||typeof Rt=="number"?{label:Rt,value:Rt}:Rt),[Ge]),Bt=Rt=>{_t(St=>St.filter(yt=>yt!==Rt))},Ht=Rt=>{_t(St=>[].concat((0,oe.Z)(St),[Rt]))},hn=Rt=>{const St=et.indexOf(Rt.value),yt=(0,oe.Z)(et);St===-1?yt.push(Rt.value):yt.splice(St,1),"value"in st||ut(yt),vt==null||vt(yt.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}))},Qt=jt("checkbox",ft),bn=`${Qt}-group`,[Wt,Kt]=(0,ge.ZP)(Qt),Jt=(0,ie.Z)(st,["value","disabled"]),dn=Ge.length?gt.map(Rt=>ke.createElement(ee,{prefixCls:Qt,key:Rt.value.toString(),disabled:"disabled"in Rt?Rt.disabled:st.disabled,value:Rt.value,checked:et.includes(Rt.value),onChange:Rt.onChange,className:`${bn}-item`,style:Rt.style,title:Rt.title},Rt.label)):Ye,Lt={toggleOption:hn,value:et,disabled:st.disabled,name:st.name,registerValue:Ht,cancelValue:Bt},pt=me()(bn,{[`${bn}-rtl`]:lt==="rtl"},at,Pt,Kt);return Wt(ke.createElement("div",Object.assign({className:pt,style:tt},Jt,{ref:ze}),ke.createElement(xe.Provider,{value:Lt},dn)))},ye=ke.forwardRef(ue);var we=ke.memo(ye);const be=ee;be.Group=we,be.__ANT_CHECKBOX=!0;var Ae=be},98447:function(Ln,tn,Ee){"use strict";Ee.d(tn,{C2:function(){return Pe}});var Me=Ee(17313),me=Ee(37613),Be=Ee(83116);const ke=Le=>{const{checkboxCls:he}=Le,Se=`${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}}),[Se]: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'"},[`& + ${Se}`]:{marginInlineStart:0},[`&${Se}-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}})},{[`
|
|
|
${Se}:not(${Se}-disabled),
|
|
|
${he}:not(${he}-disabled)
|
|
|
`]:{[`&:hover ${he}-inner`]:{borderColor:Le.colorPrimary}},[`${Se}:not(${Se}-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}`}}},[`
|
|
|
${Se}-checked:not(${Se}-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:'""'}}}}},{[`${Se}-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 Pe(Le,he){const Se=(0,me.TS)(he,{checkboxCls:`.${Le}`,checkboxSize:he.controlInteractiveSize});return[ke(Se)]}tn.ZP=(0,Be.Z)("Checkbox",(Le,he)=>{let{prefixCls:Se}=he;return[Pe(Se,Le)]})},93891:function(Ln,tn,Ee){"use strict";var Me=Ee(59301),me=Ee(36355),Be=Ee(64165);const ke=Pe=>{const{componentName:Le}=Pe,{getPrefixCls:he}=(0,Me.useContext)(me.E_),Se=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:`${Se}-small`});default:return Me.createElement(Be.Z,null)}};tn.Z=ke},43428:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Wt}});var Me=Ee(92310),me=Ee.n(Me),Be=Ee(57259),ke=Ee(29043),Pe=Ee(43403),Le=Ee(28800),he=Ee(59301),Se=he.createContext(null),xe=he.createContext({}),ge=Se,le=Ee(80962),ve=Ee(5891),de=Ee(43469),ce=Ee(85108),z=Ee(36994),ee=Ee(80764),oe=function(Jt){var dn=Jt.prefixCls,Lt=Jt.className,pt=Jt.style,Rt=Jt.children,St=Jt.containerRef,yt=Jt.id,nt=Jt.onMouseEnter,He=Jt.onMouseOver,Ie=Jt.onMouseLeave,We=Jt.onClick,Oe=Jt.onKeyDown,Ce=Jt.onKeyUp,Ne={onMouseEnter:nt,onMouseOver:He,onMouseLeave:Ie,onClick:We,onKeyDown:Oe,onKeyUp:Ce},$e=he.useContext(xe),dt=$e.panel,Je=(0,ee.useComposeRef)(dt,St);return he.createElement(he.Fragment,null,he.createElement("div",(0,ve.Z)({id:yt,className:me()("".concat(dn,"-content"),Lt),style:(0,Be.Z)({},pt),"aria-modal":"true",role:"dialog",ref:Je},Ne),Rt))},ie=oe,se=Ee(51395);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 ye(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 be(Kt,Jt){var dn,Lt,pt,Rt,St=Kt.prefixCls,yt=Kt.open,nt=Kt.placement,He=Kt.inline,Ie=Kt.push,We=Kt.forceRender,Oe=Kt.autoFocus,Ce=Kt.keyboard,Ne=Kt.rootClassName,$e=Kt.rootStyle,dt=Kt.zIndex,Je=Kt.className,Tt=Kt.id,qt=Kt.style,yn=Kt.motion,rn=Kt.width,pn=Kt.height,Fn=Kt.children,kn=Kt.contentWrapperStyle,oi=Kt.mask,ri=Kt.maskClosable,Ti=Kt.maskMotion,mi=Kt.maskClassName,Qi=Kt.maskStyle,ir=Kt.afterOpenChange,fr=Kt.onClose,er=Kt.onMouseEnter,Mr=Kt.onMouseOver,qr=Kt.onMouseLeave,di=Kt.onClick,xr=Kt.onKeyDown,zi=Kt.onKeyUp,rt=he.useRef(),zr=he.useRef(),hr=he.useRef();he.useImperativeHandle(Jt,function(){return rt.current});var vo=function(Pn){var zt=Pn.keyCode,Yt=Pn.shiftKey;switch(zt){case ce.Z.TAB:{if(zt===ce.Z.TAB){if(!Yt&&document.activeElement===hr.current){var Cn;(Cn=zr.current)===null||Cn===void 0||Cn.focus({preventScroll:!0})}else if(Yt&&document.activeElement===zr.current){var An;(An=hr.current)===null||An===void 0||An.focus({preventScroll:!0})}}break}case ce.Z.ESC:{fr&&Ce&&(Pn.stopPropagation(),fr(Pn));break}}};he.useEffect(function(){if(yt&&Oe){var Un;(Un=rt.current)===null||Un===void 0||Un.focus({preventScroll:!0})}},[yt]);var co=he.useState(!1),yo=(0,ke.Z)(co,2),eo=yo[0],lo=yo[1],ln=he.useContext(ge),Ke;Ie===!1?Ke={distance:0}:Ie===!0?Ke={}:Ke=Ie||{};var qe=(dn=(Lt=(pt=Ke)===null||pt===void 0?void 0:pt.distance)!==null&&Lt!==void 0?Lt:ln==null?void 0:ln.pushDistance)!==null&&dn!==void 0?dn:180,Xe=he.useMemo(function(){return{pushDistance:qe,push:function(){lo(!0)},pull:function(){lo(!1)}}},[qe]);he.useEffect(function(){if(yt){var Un;ln==null||(Un=ln.push)===null||Un===void 0||Un.call(ln)}else{var Pn;ln==null||(Pn=ln.pull)===null||Pn===void 0||Pn.call(ln)}},[yt]),he.useEffect(function(){return function(){var Un;ln==null||(Un=ln.pull)===null||Un===void 0||Un.call(ln)}},[]);var wt=oi&&he.createElement(de.default,(0,ve.Z)({key:"mask"},Ti,{visible:yt}),function(Un,Pn){var zt=Un.className,Yt=Un.style;return he.createElement("div",{className:me()("".concat(St,"-mask"),zt,mi),style:(0,Be.Z)((0,Be.Z)({},Yt),Qi),onClick:ri&&yt?fr:void 0,ref:Pn})}),At=typeof yn=="function"?yn(nt):yn,Nt={};if(eo&&qe)switch(nt){case"top":Nt.transform="translateY(".concat(qe,"px)");break;case"bottom":Nt.transform="translateY(".concat(-qe,"px)");break;case"left":Nt.transform="translateX(".concat(qe,"px)");break;default:Nt.transform="translateX(".concat(-qe,"px)");break}nt==="left"||nt==="right"?Nt.width=ue(rn):Nt.height=ue(pn);var bt={onMouseEnter:er,onMouseOver:Mr,onMouseLeave:qr,onClick:di,onKeyDown:xr,onKeyUp:zi},gn=he.createElement(de.default,(0,ve.Z)({key:"panel"},At,{visible:yt,forceRender:We,onVisibleChanged:function(Pn){ir==null||ir(Pn)},removeOnLeave:!1,leavedClassName:"".concat(St,"-content-wrapper-hidden")}),function(Un,Pn){var zt=Un.className,Yt=Un.style;return he.createElement("div",(0,ve.Z)({className:me()("".concat(St,"-content-wrapper"),zt),style:(0,Be.Z)((0,Be.Z)((0,Be.Z)({},Nt),Yt),kn)},(0,z.Z)(Kt,{data:!0})),he.createElement(ie,(0,ve.Z)({id:Tt,containerRef:Pn,prefixCls:St,className:Je,style:qt},bt),Fn))}),En=(0,Be.Z)({},$e);return dt&&(En.zIndex=dt),he.createElement(ge.Provider,{value:Xe},he.createElement("div",{className:me()(St,"".concat(St,"-").concat(nt),Ne,(Rt={},(0,le.Z)(Rt,"".concat(St,"-open"),yt),(0,le.Z)(Rt,"".concat(St,"-inline"),He),Rt)),style:En,tabIndex:-1,ref:rt,onKeyDown:vo},wt,he.createElement("div",{tabIndex:0,ref:zr,style:we,"aria-hidden":"true","data-sentinel":"start"}),gn,he.createElement("div",{tabIndex:0,ref:hr,style:we,"aria-hidden":"true","data-sentinel":"end"})))}var Ae=he.forwardRef(be),De=Ae,ze=function(Jt){var dn=Jt.open,Lt=dn===void 0?!1:dn,pt=Jt.prefixCls,Rt=pt===void 0?"rc-drawer":pt,St=Jt.placement,yt=St===void 0?"right":St,nt=Jt.autoFocus,He=nt===void 0?!0:nt,Ie=Jt.keyboard,We=Ie===void 0?!0:Ie,Oe=Jt.width,Ce=Oe===void 0?378:Oe,Ne=Jt.mask,$e=Ne===void 0?!0:Ne,dt=Jt.maskClosable,Je=dt===void 0?!0:dt,Tt=Jt.getContainer,qt=Jt.forceRender,yn=Jt.afterOpenChange,rn=Jt.destroyOnClose,pn=Jt.onMouseEnter,Fn=Jt.onMouseOver,kn=Jt.onMouseLeave,oi=Jt.onClick,ri=Jt.onKeyDown,Ti=Jt.onKeyUp,mi=Jt.panelRef,Qi=he.useState(!1),ir=(0,ke.Z)(Qi,2),fr=ir[0],er=ir[1],Mr=he.useState(!1),qr=(0,ke.Z)(Mr,2),di=qr[0],xr=qr[1];(0,Le.Z)(function(){xr(!0)},[]);var zi=di?Lt:!1,rt=he.useRef(),zr=he.useRef();(0,Le.Z)(function(){zi&&(zr.current=document.activeElement)},[zi]);var hr=function(lo){var ln;if(er(lo),yn==null||yn(lo),!lo&&zr.current&&!((ln=rt.current)!==null&&ln!==void 0&&ln.contains(zr.current))){var Ke;(Ke=zr.current)===null||Ke===void 0||Ke.focus({preventScroll:!0})}},vo=he.useMemo(function(){return{panel:mi}},[mi]);if(!qt&&!fr&&!zi&&rn)return null;var co={onMouseEnter:pn,onMouseOver:Fn,onMouseLeave:kn,onClick:oi,onKeyDown:ri,onKeyUp:Ti},yo=(0,Be.Z)((0,Be.Z)({},Jt),{},{open:zi,prefixCls:Rt,placement:yt,autoFocus:He,keyboard:We,width:Ce,mask:$e,maskClosable:Je,inline:Tt===!1,afterOpenChange:hr,ref:rt},co);return he.createElement(xe.Provider,{value:vo},he.createElement(Pe.Z,{open:zi||qt||fr,autoDestroy:!1,getContainer:Tt,autoLock:$e&&(zi||fr)},he.createElement(De,yo)))},Ze=ze,Ye=Ze,Ge=Ee(62892),ft=Ee(36355),at=Ee(32441),Pt=Ee(47729),vt=Kt=>{const{prefixCls:Jt,title:dn,footer:Lt,extra:pt,closeIcon:Rt,closable:St,onClose:yt,headerStyle:nt,drawerStyle:He,bodyStyle:Ie,footerStyle:We,children:Oe}=Kt,Ce=he.useCallback(Tt=>he.createElement("button",{type:"button",onClick:yt,"aria-label":"Close",className:`${Jt}-close`},Tt),[yt]),[Ne,$e]=(0,Pt.Z)(St,Rt,Ce,void 0,!0),dt=he.useMemo(()=>!dn&&!Ne?null:he.createElement("div",{style:nt,className:me()(`${Jt}-header`,{[`${Jt}-header-close-only`]:Ne&&!dn&&!pt})},he.createElement("div",{className:`${Jt}-header-title`},$e,dn&&he.createElement("div",{className:`${Jt}-title`},dn)),pt&&he.createElement("div",{className:`${Jt}-extra`},pt)),[Ne,$e,pt,nt,Jt,dn]),Je=he.useMemo(()=>{if(!Lt)return null;const Tt=`${Jt}-footer`;return he.createElement("div",{className:Tt,style:We},Lt)},[Lt,We,Jt]);return he.createElement("div",{className:`${Jt}-wrapper-body`,style:He},dt,he.createElement("div",{className:`${Jt}-body`,style:Ie},Oe),Je)},st=Ee(33234),jt=Ee(83116),lt=Ee(37613),ut=Kt=>{const{componentCls:Jt,motionDurationSlow:dn}=Kt,Lt={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${dn}`}}};return{[Jt]:{[`${Jt}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${dn}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${Jt}-panel-motion`]:{"&-left":[Lt,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[Lt,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[Lt,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[Lt,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}};const mt=Kt=>{const{componentCls:Jt,zIndexPopup:dn,colorBgMask:Lt,colorBgElevated:pt,motionDurationSlow:Rt,motionDurationMid:St,padding:yt,paddingLG:nt,fontSizeLG:He,lineHeightLG:Ie,lineWidth:We,lineType:Oe,colorSplit:Ce,marginSM:Ne,colorIcon:$e,colorIconHover:dt,colorText:Je,fontWeightStrong:Tt,footerPaddingBlock:qt,footerPaddingInline:yn}=Kt,rn=`${Jt}-content-wrapper`;return{[Jt]:{position:"fixed",inset:0,zIndex:dn,pointerEvents:"none","&-pure":{position:"relative",background:pt,[`&${Jt}-left`]:{boxShadow:Kt.boxShadowDrawerLeft},[`&${Jt}-right`]:{boxShadow:Kt.boxShadowDrawerRight},[`&${Jt}-top`]:{boxShadow:Kt.boxShadowDrawerUp},[`&${Jt}-bottom`]:{boxShadow:Kt.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${Jt}-mask`]:{position:"absolute",inset:0,zIndex:dn,background:Lt,pointerEvents:"auto"},[rn]:{position:"absolute",zIndex:dn,maxWidth:"100vw",transition:`all ${Rt}`,"&-hidden":{display:"none"}},[`&-left > ${rn}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:Kt.boxShadowDrawerLeft},[`&-right > ${rn}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:Kt.boxShadowDrawerRight},[`&-top > ${rn}`]:{top:0,insetInline:0,boxShadow:Kt.boxShadowDrawerUp},[`&-bottom > ${rn}`]:{bottom:0,insetInline:0,boxShadow:Kt.boxShadowDrawerDown},[`${Jt}-content`]:{width:"100%",height:"100%",overflow:"auto",background:pt,pointerEvents:"auto"},[`${Jt}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${Jt}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${yt}px ${nt}px`,fontSize:He,lineHeight:Ie,borderBottom:`${We}px ${Oe} ${Ce}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${Jt}-extra`]:{flex:"none"},[`${Jt}-close`]:{display:"inline-block",marginInlineEnd:Ne,color:$e,fontWeight:Tt,fontSize:He,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${St}`,textRendering:"auto","&:focus, &:hover":{color:dt,textDecoration:"none"}},[`${Jt}-title`]:{flex:1,margin:0,color:Je,fontWeight:Kt.fontWeightStrong,fontSize:He,lineHeight:Ie},[`${Jt}-body`]:{flex:1,minWidth:0,minHeight:0,padding:nt,overflow:"auto"},[`${Jt}-footer`]:{flexShrink:0,padding:`${qt}px ${yn}px`,borderTop:`${We}px ${Oe} ${Ce}`},"&-rtl":{direction:"rtl"}}}};var _t=(0,jt.Z)("Drawer",Kt=>{const Jt=(0,lt.TS)(Kt,{});return[mt(Jt),ut(Jt)]},Kt=>({zIndexPopup:Kt.zIndexPopupBase,footerPaddingBlock:Kt.paddingXS,footerPaddingInline:Kt.padding})),gt=Ee(11575),Bt=function(Kt,Jt){var dn={};for(var Lt in Kt)Object.prototype.hasOwnProperty.call(Kt,Lt)&&Jt.indexOf(Lt)<0&&(dn[Lt]=Kt[Lt]);if(Kt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pt=0,Lt=Object.getOwnPropertySymbols(Kt);pt<Lt.length;pt++)Jt.indexOf(Lt[pt])<0&&Object.prototype.propertyIsEnumerable.call(Kt,Lt[pt])&&(dn[Lt[pt]]=Kt[Lt[pt]]);return dn};const Ht=null,hn={distance:180},Qt=Kt=>{var Jt;const{rootClassName:dn,width:Lt,height:pt,size:Rt="default",mask:St=!0,push:yt=hn,open:nt,afterOpenChange:He,onClose:Ie,prefixCls:We,getContainer:Oe,style:Ce,className:Ne,visible:$e,afterVisibleChange:dt}=Kt,Je=Bt(Kt,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange"]),{getPopupContainer:Tt,getPrefixCls:qt,direction:yn,drawer:rn}=he.useContext(ft.E_),pn=qt("drawer",We),[Fn,kn]=_t(pn),oi=Oe===void 0&&Tt?()=>Tt(document.body):Oe,ri=me()({"no-mask":!St,[`${pn}-rtl`]:yn==="rtl"},dn,kn),Ti=he.useMemo(()=>Lt!=null?Lt:Rt==="large"?736:378,[Lt,Rt]),mi=he.useMemo(()=>pt!=null?pt:Rt==="large"?736:378,[pt,Rt]),Qi={motionName:(0,Ge.m)(pn,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},ir=er=>({motionName:(0,Ge.m)(pn,`panel-motion-${er}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),fr=(0,gt.H)();return Fn(he.createElement(st.BR,null,he.createElement(at.Ux,{status:!0,override:!0},he.createElement(Ye,Object.assign({prefixCls:pn,onClose:Ie,maskMotion:Qi,motion:ir},Je,{open:nt!=null?nt:$e,mask:St,push:yt,width:Ti,height:mi,style:Object.assign(Object.assign({},rn==null?void 0:rn.style),Ce),className:me()(rn==null?void 0:rn.className,Ne),rootClassName:ri,getContainer:oi,afterOpenChange:He!=null?He:dt,panelRef:fr}),he.createElement(vt,Object.assign({prefixCls:pn},Je,{onClose:Ie}))))))},bn=Kt=>{const{prefixCls:Jt,style:dn,className:Lt,placement:pt="right"}=Kt,Rt=Bt(Kt,["prefixCls","style","className","placement"]),{getPrefixCls:St}=he.useContext(ft.E_),yt=St("drawer",Jt),[nt,He]=_t(yt),Ie=me()(yt,`${yt}-pure`,`${yt}-${pt}`,He,Lt);return nt(he.createElement("div",{className:Ie,style:dn},he.createElement(vt,Object.assign({prefixCls:yt},Rt))))};Qt._InternalPanelDoNotUseOrYouWillBeFired=bn;var Wt=Qt},91857:function(Ln,tn,Ee){"use strict";var Me=Ee(59301),me=Ee(53878),Be=Ee(92310),ke=Ee.n(Be),Pe=Ee(31561),Le=Ee(80764),he=Ee(35788),Se=Ee(64002),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:be,arrow:Ae,prefixCls:De,children:ze,trigger:Ze,disabled:Ye,dropdownRender:Ge,getPopupContainer:ft,overlayClassName:at,rootClassName:Pt,open:tt,onOpenChange:vt,visible:st,onVisibleChange:jt,mouseEnterDelay:lt=.15,mouseLeaveDelay:et=.1,autoAdjustOverflow:ut=!0,placement:mt="",overlay:_t,transitionName:gt}=we,{getPopupContainer:Bt,getPrefixCls:Ht,direction:hn}=Me.useContext(ve.E_),Qt=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,Jt]=(0,ee.Z)(Wt),[,dn]=(0,z.Z)(),Lt=Me.Children.only(ze),pt=(0,le.Tm)(Lt,{className:ke()(`${Wt}-trigger`,{[`${Wt}-rtl`]:hn==="rtl"},Lt.props.className),disabled:Ye}),Rt=Ye?[]:Ze;let St;Rt&&Rt.includes("contextMenu")&&(St=!0);const[yt,nt]=(0,he.Z)(!1,{value:tt!=null?tt:st}),He=(0,Le.useEvent)(Ne=>{vt==null||vt(Ne),jt==null||jt(Ne),nt(Ne)}),Ie=ke()(at,Pt,Jt,{[`${Wt}-rtl`]:hn==="rtl"}),We=(0,xe.Z)({arrowPointAtCenter:typeof Ae=="object"&&Ae.pointAtCenter,autoAdjustOverflow:ut,offset:dn.marginXXS,arrowWidth:Ae?dn.sizePopupArrow:0,borderRadius:dn.borderRadius}),Oe=Me.useCallback(()=>{nt(!1)},[]),Ce=()=>{let Ne;return be!=null&&be.items?Ne=Me.createElement(de.default,Object.assign({},be)):typeof _t=="function"?Ne=_t():Ne=_t,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(Pe.Z,Object.assign({alignPoint:St},(0,Se.Z)(we,["rootClassName"]),{mouseEnterDelay:lt,mouseLeaveDelay:et,visible:yt,builtinPlacements:We,arrow:!!Ae,overlayClassName:Ie,prefixCls:Wt,getPopupContainer:ft||Bt,transitionName:Qt,trigger:Rt,overlay:Ce,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),ye=we=>Me.createElement(ue,Object.assign({},we),Me.createElement("span",null));ie._InternalPanelDoNotUseOrYouWillBeFired=ye,tn.Z=ie},38854:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return z}});var Me=Ee(91857),me=Ee(92310),Be=Ee.n(me),ke=Ee(59301),Pe=Ee(19362),Le=Ee(3113),he=Ee(36355),Se=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:ye="default",danger:we,disabled:be,loading:Ae,onClick:De,htmlType:ze,children:Ze,className:Ye,menu:Ge,arrow:ft,autoFocus:at,overlay:Pt,trigger:tt,align:vt,open:st,onOpenChange:jt,placement:lt,getPopupContainer:et,href:ut,icon:mt=ke.createElement(Pe.Z,null),title:_t,buttonsRender:gt=Ce=>Ce,mouseEnterDelay:Bt,mouseLeaveDelay:Ht,overlayClassName:hn,overlayStyle:Qt,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"]),Jt=ie("dropdown",ue),dn=`${Jt}-button`,[Lt,pt]=(0,ge.Z)(Jt),Rt={menu:Ge,arrow:ft,autoFocus:at,align:vt,disabled:be,trigger:be?[]:tt,onOpenChange:jt,getPopupContainer:et||oe,mouseEnterDelay:Bt,mouseLeaveDelay:Ht,overlayClassName:hn,overlayStyle:Qt,destroyPopupOnHide:bn,dropdownRender:Wt},{compactSize:St,compactItemClassnames:yt}=(0,xe.ri)(Jt,se),nt=Be()(dn,yt,Ye,pt);"overlay"in ee&&(Rt.overlay=Pt),"open"in ee&&(Rt.open=st),"placement"in ee?Rt.placement=lt:Rt.placement=se==="rtl"?"bottomLeft":"bottomRight";const He=ke.createElement(Le.ZP,{type:ye,danger:we,disabled:be,loading:Ae,onClick:De,htmlType:ze,href:ut,title:_t},Ze),Ie=ke.createElement(Le.ZP,{type:ye,danger:we,icon:mt}),[We,Oe]=gt([He,Ie]);return Lt(ke.createElement(Se.Z.Compact,Object.assign({className:nt,size:St,block:!0},Kt),We,ke.createElement(Me.Z,Object.assign({},Rt),Oe)))};ve.__ANT_BUTTON=!0;var de=ve;const ce=Me.Z;ce.Button=de;var z=ce},47211:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return le}});var Me=Ee(17313),me=Ee(13826),Be=Ee(92899),ke=Ee(29878),Pe=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:ye,fontSize:we,dropdownEdgeChildPadding:be,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,Pe.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:be,listStyleType:"none",backgroundColor:Ze,backgroundClip:"padding-box",borderRadius:ve.borderRadiusLG,outline:"none",boxShadow:ve.boxShadowSecondary},(0,Me.Qy)(ve)),{[`${ce}-item-group-title`]:{padding:`${ye}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:`${ye}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:ye,borderRadiusLG:we}=ve,be=(oe-ie*se)/2,{dropdownArrowOffset:Ae}=(0,Pe.fS)({contentRadius:we}),De=(0,he.TS)(ve,{menuCls:`${ye}-menu`,rootPrefixCls:ce,dropdownArrowDistance:ee/2+z,dropdownArrowOffset:Ae,dropdownPaddingVertical:be,dropdownEdgeChildPadding:ue});return[ge(De),xe(De)]},ve=>({zIndexPopup:ve.zIndexPopupBase+50}))},64165:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return ue}});var Me=Ee(92310),me=Ee.n(Me),Be=Ee(59301),ke=Ee(36355),Pe=Ee(9763),Le=Ee(64993),he=Ee(88088),xe=()=>{const[,ye]=(0,he.Z)(),be=new Le.C(ye.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return Be.createElement("svg",{style:be,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[,ye]=(0,he.Z)(),{colorFill:we,colorFillTertiary:be,colorFillQuaternary:Ae,colorBgContainer:De}=ye,{borderColor:ze,shadowColor:Ze,contentColor:Ye}=(0,Be.useMemo)(()=>({borderColor:new Le.C(we).onBackground(De).toHexShortString(),shadowColor:new Le.C(be).onBackground(De).toHexShortString(),contentColor:new Le.C(Ae).onBackground(De).toHexShortString()}),[we,be,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:Ye}))))},ve=Ee(83116),de=Ee(37613);const ce=ye=>{const{componentCls:we,margin:be,marginXS:Ae,marginXL:De,fontSize:ze,lineHeight:Ze}=ye;return{[we]:{marginInline:Ae,fontSize:ze,lineHeight:Ze,textAlign:"center",[`${we}-image`]:{height:ye.emptyImgHeight,marginBottom:Ae,opacity:ye.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${we}-description`]:{color:ye.colorText},[`${we}-footer`]:{marginTop:be},"&-normal":{marginBlock:De,color:ye.colorTextDisabled,[`${we}-description`]:{color:ye.colorTextDisabled},[`${we}-image`]:{height:ye.emptyImgHeightMD}},"&-small":{marginBlock:Ae,color:ye.colorTextDisabled,[`${we}-image`]:{height:ye.emptyImgHeightSM}}}}};var z=(0,ve.Z)("Empty",ye=>{const{componentCls:we,controlHeightLG:be}=ye,Ae=(0,de.TS)(ye,{emptyImgCls:`${we}-img`,emptyImgHeight:be*2.5,emptyImgHeightMD:be,emptyImgHeightSM:be*.875});return[ce(Ae)]}),ee=function(ye,we){var be={};for(var Ae in ye)Object.prototype.hasOwnProperty.call(ye,Ae)&&we.indexOf(Ae)<0&&(be[Ae]=ye[Ae]);if(ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var De=0,Ae=Object.getOwnPropertySymbols(ye);De<Ae.length;De++)we.indexOf(Ae[De])<0&&Object.prototype.propertyIsEnumerable.call(ye,Ae[De])&&(be[Ae[De]]=ye[Ae[De]]);return be};const oe=Be.createElement(xe,null),ie=Be.createElement(le,null),se=ye=>{var{className:we,rootClassName:be,prefixCls:Ae,image:De=oe,description:ze,children:Ze,imageStyle:Ye,style:Ge}=ye,ft=ee(ye,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:at,direction:Pt,empty:tt}=Be.useContext(ke.E_),vt=at("empty",Ae),[st,jt]=z(vt),[lt]=(0,Pe.Z)("Empty"),et=typeof ze!="undefined"?ze:lt==null?void 0:lt.description,ut=typeof et=="string"?et:"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()(jt,vt,tt==null?void 0:tt.className,{[`${vt}-normal`]:De===ie,[`${vt}-rtl`]:Pt==="rtl"},we,be),style:Object.assign(Object.assign({},tt==null?void 0:tt.style),Ge)},ft),Be.createElement("div",{className:`${vt}-image`,style:Ye},mt),et&&Be.createElement("div",{className:`${vt}-description`},et),Ze&&Be.createElement("div",{className:`${vt}-footer`},Ze)))};se.PRESENTED_IMAGE_DEFAULT=oe,se.PRESENTED_IMAGE_SIMPLE=ie;var ue=se},78241:function(Ln,tn,Ee){"use strict";Ee.d(tn,{default:function(){return qe}});var Me=Ee(26390),me=Ee(92310),Be=Ee.n(me),ke=Ee(43469),Pe=Ee(59301),Le=Ee(62892),he=Ee(32441);function Se(Xe){const[wt,At]=Pe.useState(Xe);return Pe.useEffect(()=>{const Nt=setTimeout(()=>{At(Xe)},Xe.length?0:10);return()=>{clearTimeout(Nt)}},[Xe]),wt}var xe=Ee(17313),ge=Ee(29878),le=Ee(8378),ve=Ee(37613),de=Ee(83116),z=Xe=>{const{componentCls:wt}=Xe,At=`${wt}-show-help`,Nt=`${wt}-show-help-item`;return{[At]:{transition:`opacity ${Xe.motionDurationSlow} ${Xe.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Nt]:{overflow:"hidden",transition:`height ${Xe.motionDurationSlow} ${Xe.motionEaseInOut},
|
|
|
opacity ${Xe.motionDurationSlow} ${Xe.motionEaseInOut},
|
|
|
transform ${Xe.motionDurationSlow} ${Xe.motionEaseInOut} !important`,[`&${Nt}-appear, &${Nt}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Nt}-leave-active`]:{transform:"translateY(-5px)"}}}}};const ee=Xe=>({legend:{display:"block",width:"100%",marginBottom:Xe.marginLG,padding:0,color:Xe.colorTextDescription,fontSize:Xe.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${Xe.lineWidth}px ${Xe.lineType} ${Xe.colorBorder}`},label:{fontSize:Xe.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 ${Xe.controlOutlineWidth}px ${Xe.controlOutline}`},output:{display:"block",paddingTop:15,color:Xe.colorText,fontSize:Xe.fontSize,lineHeight:Xe.lineHeight}}),oe=(Xe,wt)=>{const{formItemCls:At}=Xe;return{[At]:{[`${At}-label > label`]:{height:wt},[`${At}-control-input`]:{minHeight:wt}}}},ie=Xe=>{const{componentCls:wt}=Xe;return{[Xe.componentCls]:Object.assign(Object.assign(Object.assign({},(0,xe.Wf)(Xe)),ee(Xe)),{[`${wt}-text`]:{display:"inline-block",paddingInlineEnd:Xe.paddingSM},"&-small":Object.assign({},oe(Xe,Xe.controlHeightSM)),"&-large":Object.assign({},oe(Xe,Xe.controlHeightLG))})}},se=Xe=>{const{formItemCls:wt,iconCls:At,componentCls:Nt,rootPrefixCls:bt,labelRequiredMarkColor:gn,labelColor:En,labelFontSize:Un,labelHeight:Pn,labelColonMarginInlineStart:zt,labelColonMarginInlineEnd:Yt,itemMarginBottom:Cn}=Xe;return{[wt]:Object.assign(Object.assign({},(0,xe.Wf)(Xe)),{marginBottom:Cn,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${bt}-row`]:{display:"none"},"&-has-warning":{[`${wt}-split`]:{color:Xe.colorError}},"&-has-error":{[`${wt}-split`]:{color:Xe.colorWarning}},[`${wt}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${Xe.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:Pn,color:En,fontSize:Un,[`> ${At}`]:{fontSize:Xe.fontSize,verticalAlign:"top"},[`&${wt}-required:not(${wt}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:Xe.marginXXS,color:gn,fontSize:Xe.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${Nt}-hide-required-mark &`]:{display:"none"}},[`${wt}-optional`]:{display:"inline-block",marginInlineStart:Xe.marginXXS,color:Xe.colorTextDescription,[`${Nt}-hide-required-mark &`]:{display:"none"}},[`${wt}-tooltip`]:{color:Xe.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Xe.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:zt,marginInlineEnd:Yt},[`&${wt}-no-colon::after`]:{content:'"\\a0"'}}},[`${wt}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${bt}-col-'"]):not([class*="' ${bt}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Xe.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[wt]:{"&-explain, &-extra":{clear:"both",color:Xe.colorTextDescription,fontSize:Xe.fontSize,lineHeight:Xe.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Xe.controlHeightSM,transition:`color ${Xe.motionDurationMid} ${Xe.motionEaseOut}`},"&-explain":{"&-error":{color:Xe.colorError},"&-warning":{color:Xe.colorWarning}}},[`&-with-help ${wt}-explain`]:{height:"auto",opacity:1},[`${wt}-feedback-icon`]:{fontSize:Xe.fontSize,textAlign:"center",visibility:"visible",animationName:ge.kr,animationDuration:Xe.motionDurationMid,animationTimingFunction:Xe.motionEaseOutBack,pointerEvents:"none","&-success":{color:Xe.colorSuccess},"&-error":{color:Xe.colorError},"&-warning":{color:Xe.colorWarning},"&-validating":{color:Xe.colorPrimary}}})}},ue=Xe=>{const{componentCls:wt,formItemCls:At}=Xe;return{[`${wt}-horizontal`]:{[`${At}-label`]:{flexGrow:0},[`${At}-control`]:{flex:"1 1 0",minWidth:0},[`${At}-label[class$='-24'], ${At}-label[class*='-24 ']`]:{[`& + ${At}-control`]:{minWidth:"unset"}}}}},ye=Xe=>{const{componentCls:wt,formItemCls:At}=Xe;return{[`${wt}-inline`]:{display:"flex",flexWrap:"wrap",[At]:{flex:"none",marginInlineEnd:Xe.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${At}-label,
|
|
|
> ${At}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${At}-label`]:{flex:"none"},[`${wt}-text`]:{display:"inline-block"},[`${At}-has-feedback`]:{display:"inline-block"}}}}},we=Xe=>({padding:Xe.verticalLabelPadding,margin:Xe.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),be=Xe=>{const{componentCls:wt,formItemCls:At,rootPrefixCls:Nt}=Xe;return{[`${At} ${At}-label`]:we(Xe),[wt]:{[At]:{flexWrap:"wrap",[`${At}-label, ${At}-control`]:{[`&:not([class*=" ${Nt}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Ae=Xe=>{const{componentCls:wt,formItemCls:At,rootPrefixCls:Nt}=Xe;return{[`${wt}-vertical`]:{[At]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${wt}-item-control`]:{width:"100%"}}},[`${wt}-vertical ${At}-label,
|
|
|
.${Nt}-col-24${At}-label,
|
|
|
.${Nt}-col-xl-24${At}-label`]:we(Xe),[`@media (max-width: ${Xe.screenXSMax}px)`]:[be(Xe),{[wt]:{[`.${Nt}-col-xs-24${At}-label`]:we(Xe)}}],[`@media (max-width: ${Xe.screenSMMax}px)`]:{[wt]:{[`.${Nt}-col-sm-24${At}-label`]:we(Xe)}},[`@media (max-width: ${Xe.screenMDMax}px)`]:{[wt]:{[`.${Nt}-col-md-24${At}-label`]:we(Xe)}},[`@media (max-width: ${Xe.screenLGMax}px)`]:{[wt]:{[`.${Nt}-col-lg-24${At}-label`]:we(Xe)}}}},De=(Xe,wt)=>(0,ve.TS)(Xe,{formItemCls:`${Xe.componentCls}-item`,rootPrefixCls:wt});var ze=(0,de.Z)("Form",(Xe,wt)=>{let{rootPrefixCls:At}=wt;const Nt=De(Xe,At);return[ie(Nt),se(Nt),z(Nt),ue(Nt),ye(Nt),Ae(Nt),(0,le.Z)(Nt),ge.kr]},Xe=>({labelRequiredMarkColor:Xe.colorError,labelColor:Xe.colorTextHeading,labelFontSize:Xe.fontSize,labelHeight:Xe.controlHeight,labelColonMarginInlineStart:Xe.marginXXS/2,labelColonMarginInlineEnd:Xe.marginXS,itemMarginBottom:Xe.marginLG,verticalLabelPadding:`0 0 ${Xe.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const Ze=[];function Ye(Xe,wt,At){let Nt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Xe=="string"?Xe:`${wt}-${Nt}`,error:Xe,errorStatus:At}}var ft=Xe=>{let{help:wt,helpStatus:At,errors:Nt=Ze,warnings:bt=Ze,className:gn,fieldId:En,onVisibleChanged:Un}=Xe;const{prefixCls:Pn}=Pe.useContext(he.Rk),zt=`${Pn}-item-explain`,[,Yt]=ze(Pn),Cn=(0,Pe.useMemo)(()=>(0,Le.Z)(Pn),[Pn]),An=Se(Nt),Vt=Se(bt),an=Pe.useMemo(()=>wt!=null?[Ye(wt,"help",At)]:[].concat((0,Me.Z)(An.map((Nn,qn)=>Ye(Nn,"error","error",qn))),(0,Me.Z)(Vt.map((Nn,qn)=>Ye(Nn,"warning","warning",qn)))),[wt,At,An,Vt]),Bn={};return En&&(Bn.id=`${En}_help`),Pe.createElement(ke.default,{motionDeadline:Cn.motionDeadline,motionName:`${Pn}-show-help`,visible:!!an.length,onVisibleChanged:Un},Nn=>{const{className:qn,style:Gn}=Nn;return Pe.createElement("div",Object.assign({},Bn,{className:Be()(zt,qn,gn,Yt),style:Gn,role:"alert"}),Pe.createElement(ke.CSSMotionList,Object.assign({keys:an},(0,Le.Z)(Pn),{motionName:`${Pn}-show-help-item`,component:!1}),Jn=>{const{key:Rn,error:li,errorStatus:Mi,className:zn,style:si}=Jn;return Pe.createElement("div",{key:Rn,className:Be()(zn,{[`${zt}-${Mi}`]:Mi}),style:si},li)}))})},at=Ee(95013),Pt=Ee(36355),tt=Ee(1684),vt=Ee(52946),st=Ee(19716),jt=Ee(16722);const lt=["parentNode"],et="form_item";function ut(Xe){return Xe===void 0||Xe===!1?[]:Array.isArray(Xe)?Xe:[Xe]}function mt(Xe,wt){if(!Xe.length)return;const At=Xe.join("_");return wt?`${wt}_${At}`:lt.includes(At)?`${et}_${At}`:At}function _t(Xe,wt,At,Nt,bt,gn){let En=Nt;return gn!==void 0?En=gn:At.validating?En="validating":Xe.length?En="error":wt.length?En="warning":(At.touched||bt&&At.validated)&&(En="success"),En}function gt(Xe){return ut(Xe).join("_")}function Bt(Xe){const[wt]=(0,at.useForm)(),At=Pe.useRef({}),Nt=Pe.useMemo(()=>Xe!=null?Xe:Object.assign(Object.assign({},wt),{__INTERNAL__:{itemRef:bt=>gn=>{const En=gt(bt);gn?At.current[En]=gn:delete At.current[En]}},scrollToField:function(bt){let gn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const En=ut(bt),Un=mt(En,Nt.__INTERNAL__.name),Pn=Un?document.getElementById(Un):null;Pn&&(0,jt.Z)(Pn,Object.assign({scrollMode:"if-needed",block:"nearest"},gn))},getFieldInstance:bt=>{const gn=gt(bt);return At.current[gn]}}),[Xe,wt]);return[Nt]}var Ht=Ee(28726),hn=function(Xe,wt){var At={};for(var Nt in Xe)Object.prototype.hasOwnProperty.call(Xe,Nt)&&wt.indexOf(Nt)<0&&(At[Nt]=Xe[Nt]);if(Xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var bt=0,Nt=Object.getOwnPropertySymbols(Xe);bt<Nt.length;bt++)wt.indexOf(Nt[bt])<0&&Object.prototype.propertyIsEnumerable.call(Xe,Nt[bt])&&(At[Nt[bt]]=Xe[Nt[bt]]);return At};const Qt=(Xe,wt)=>{const At=Pe.useContext(tt.Z),{getPrefixCls:Nt,direction:bt,form:gn}=Pe.useContext(Pt.E_),{prefixCls:En,className:Un,rootClassName:Pn,size:zt,disabled:Yt=At,form:Cn,colon:An,labelAlign:Vt,labelWrap:an,labelCol:Bn,wrapperCol:Nn,hideRequiredMark:qn,layout:Gn="horizontal",scrollToFirstError:Jn,requiredMark:Rn,onFinishFailed:li,name:Mi,style:zn,feedbackIcons:si}=Xe,Hi=hn(Xe,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),ur=(0,st.Z)(zt),Ai=Pe.useContext(Ht.Z),un=(0,Pe.useMemo)(()=>Rn!==void 0?Rn:gn&&gn.requiredMark!==void 0?gn.requiredMark:!qn,[qn,Rn,gn]),ai=An!=null?An:gn==null?void 0:gn.colon,wi=Nt("form",En),[fi,Wi]=ze(wi),Ni=Be()(wi,`${wi}-${Gn}`,{[`${wi}-hide-required-mark`]:un===!1,[`${wi}-rtl`]:bt==="rtl",[`${wi}-${ur}`]:ur},Wi,gn==null?void 0:gn.className,Un,Pn),[lr]=Bt(Cn),{__INTERNAL__:Fi}=lr;Fi.name=Mi;const $i=(0,Pe.useMemo)(()=>({name:Mi,labelAlign:Vt,labelCol:Bn,labelWrap:an,wrapperCol:Nn,vertical:Gn==="vertical",colon:ai,requiredMark:un,itemRef:Fi.itemRef,form:lr,feedbackIcons:si}),[Mi,Vt,Bn,Nn,Gn,ai,un,lr,si]);Pe.useImperativeHandle(wt,()=>lr);const Lr=(Kr,In)=>{if(Kr){let br={block:"nearest"};typeof Kr=="object"&&(br=Kr),lr.scrollToField(In,br)}},On=Kr=>{if(li==null||li(Kr),Kr.errorFields.length){const In=Kr.errorFields[0].name;if(Jn!==void 0){Lr(Jn,In);return}gn&&gn.scrollToFirstError!==void 0&&Lr(gn.scrollToFirstError,In)}};return fi(Pe.createElement(tt.n,{disabled:Yt},Pe.createElement(vt.q,{size:ur},Pe.createElement(he.RV,Object.assign({},{validateMessages:Ai}),Pe.createElement(he.q3.Provider,{value:$i},Pe.createElement(at.default,Object.assign({id:Mi},Hi,{name:Mi,onFinishFailed:On,form:lr,style:Object.assign(Object.assign({},gn==null?void 0:gn.style),zn),className:Ni})))))))};var Wt=Pe.forwardRef(Qt),Kt=Ee(12383),Jt=Ee(20475),dn=Ee(92343),Lt=Ee(38298);function pt(Xe){if(typeof Xe=="function")return Xe;const wt=(0,Lt.Z)(Xe);return wt.length<=1?wt[0]:wt}const Rt=()=>{const{status:Xe,errors:wt=[],warnings:At=[]}=(0,Pe.useContext)(he.aM);return{status:Xe,errors:wt,warnings:At}};Rt.Context=he.aM;var St=Rt,yt=Ee(23073);function nt(Xe){const[wt,At]=Pe.useState(Xe),Nt=(0,Pe.useRef)(null),bt=(0,Pe.useRef)([]),gn=(0,Pe.useRef)(!1);Pe.useEffect(()=>(gn.current=!1,()=>{gn.current=!0,yt.Z.cancel(Nt.current),Nt.current=null}),[]);function En(Un){gn.current||(Nt.current===null&&(bt.current=[],Nt.current=(0,yt.Z)(()=>{Nt.current=null,At(Pn=>{let zt=Pn;return bt.current.forEach(Yt=>{zt=Yt(zt)}),zt})})),bt.current.push(Un))}return[wt,En]}function He(){const{itemRef:Xe}=Pe.useContext(he.q3),wt=Pe.useRef({});function At(Nt,bt){const gn=bt&&typeof bt=="object"&&bt.ref,En=Nt.join("_");return(wt.current.name!==En||wt.current.originRef!==gn)&&(wt.current.name=En,wt.current.originRef=gn,wt.current.ref=(0,Jt.sQ)(Xe(Nt),gn)),wt.current.ref}return At}var Ie=Ee(48886),We=Ee(28800),Oe=Ee(64002),Ce=Ee(27382),Ne=Ee(37028);const $e=Xe=>{const{formItemCls:wt}=Xe;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${wt}-control`]:{display:"flex"}}}};var dt=(0,de.b)(["Form","item-item"],(Xe,wt)=>{let{rootPrefixCls:At}=wt;const Nt=De(Xe,At);return[$e(Nt)]}),Tt=Xe=>{const{prefixCls:wt,status:At,wrapperCol:Nt,children:bt,errors:gn,warnings:En,_internalItemRender:Un,extra:Pn,help:zt,fieldId:Yt,marginBottom:Cn,onErrorVisibleChanged:An}=Xe,Vt=`${wt}-item`,an=Pe.useContext(he.q3),Bn=Nt||an.wrapperCol||{},Nn=Be()(`${Vt}-control`,Bn.className),qn=Pe.useMemo(()=>Object.assign({},an),[an]);delete qn.labelCol,delete qn.wrapperCol;const Gn=Pe.createElement("div",{className:`${Vt}-control-input`},Pe.createElement("div",{className:`${Vt}-control-input-content`},bt)),Jn=Pe.useMemo(()=>({prefixCls:wt,status:At}),[wt,At]),Rn=Cn!==null||gn.length||En.length?Pe.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},Pe.createElement(he.Rk.Provider,{value:Jn},Pe.createElement(ft,{fieldId:Yt,errors:gn,warnings:En,help:zt,helpStatus:At,className:`${Vt}-explain-connected`,onVisibleChanged:An})),!!Cn&&Pe.createElement("div",{style:{width:0,height:Cn}})):null,li={};Yt&&(li.id=`${Yt}_extra`);const Mi=Pn?Pe.createElement("div",Object.assign({},li,{className:`${Vt}-extra`}),Pn):null,zn=Un&&Un.mark==="pro_table_render"&&Un.render?Un.render(Xe,{input:Gn,errorList:Rn,extra:Mi}):Pe.createElement(Pe.Fragment,null,Gn,Rn,Mi);return Pe.createElement(he.q3.Provider,{value:qn},Pe.createElement(Ne.Z,Object.assign({},Bn,{className:Nn}),zn),Pe.createElement(dt,{prefixCls:wt}))},qt=Ee(86902),yn=Ee(31724),rn=Ee(9763),pn=Ee(6848),Fn=function(Xe,wt){var At={};for(var Nt in Xe)Object.prototype.hasOwnProperty.call(Xe,Nt)&&wt.indexOf(Nt)<0&&(At[Nt]=Xe[Nt]);if(Xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var bt=0,Nt=Object.getOwnPropertySymbols(Xe);bt<Nt.length;bt++)wt.indexOf(Nt[bt])<0&&Object.prototype.propertyIsEnumerable.call(Xe,Nt[bt])&&(At[Nt[bt]]=Xe[Nt[bt]]);return At};function kn(Xe){return Xe?typeof Xe=="object"&&!Pe.isValidElement(Xe)?Xe:{title:Xe}:null}var ri=Xe=>{let{prefixCls:wt,label:At,htmlFor:Nt,labelCol:bt,labelAlign:gn,colon:En,required:Un,requiredMark:Pn,tooltip:zt}=Xe;var Yt;const[Cn]=(0,rn.Z)("Form"),{vertical:An,labelAlign:Vt,labelCol:an,labelWrap:Bn,colon:Nn}=Pe.useContext(he.q3);if(!At)return null;const qn=bt||an||{},Gn=gn||Vt,Jn=`${wt}-item-label`,Rn=Be()(Jn,Gn==="left"&&`${Jn}-left`,qn.className,{[`${Jn}-wrap`]:!!Bn});let li=At;const Mi=En===!0||Nn!==!1&&En!==!1;Mi&&!An&&typeof At=="string"&&At.trim()!==""&&(li=At.replace(/[:|:]\s*$/,""));const si=kn(zt);if(si){const{icon:un=Pe.createElement(qt.Z,null)}=si,ai=Fn(si,["icon"]),wi=Pe.createElement(pn.Z,Object.assign({},ai),Pe.cloneElement(un,{className:`${wt}-item-tooltip`,title:""}));li=Pe.createElement(Pe.Fragment,null,li,wi)}const Hi=Pn==="optional",ur=typeof Pn=="function";ur?li=Pn(li,{required:!!Un}):Hi&&!Un&&(li=Pe.createElement(Pe.Fragment,null,li,Pe.createElement("span",{className:`${wt}-item-optional`,title:""},(Cn==null?void 0:Cn.optional)||((Yt=yn.Z.Form)===null||Yt===void 0?void 0:Yt.optional))));const Ai=Be()({[`${wt}-item-required`]:Un,[`${wt}-item-required-mark-optional`]:Hi||ur,[`${wt}-item-no-colon`]:!Mi});return Pe.createElement(Ne.Z,Object.assign({},qn,{className:Rn}),Pe.createElement("label",{htmlFor:Nt,className:Ai,title:typeof At=="string"?At:""},li))},Ti=Ee(79999),mi=Ee(33130),Qi=Ee(85404),ir=Ee(50023);const fr={success:Ti.Z,warning:Qi.Z,error:mi.Z,validating:ir.Z};function er(Xe){let{children:wt,errors:At,warnings:Nt,hasFeedback:bt,validateStatus:gn,prefixCls:En,meta:Un,noStyle:Pn}=Xe;const zt=`${En}-item`,{feedbackIcons:Yt}=Pe.useContext(he.q3),Cn=_t(At,Nt,Un,null,!!bt,gn),{isFormItemInput:An,status:Vt}=Pe.useContext(he.aM),an=Pe.useMemo(()=>{var Bn;let Nn;if(bt){const Jn=bt!==!0&&bt.icons||Yt,Rn=Cn&&((Bn=Jn==null?void 0:Jn({status:Cn,errors:At,warnings:Nt}))===null||Bn===void 0?void 0:Bn[Cn]),li=Cn&&fr[Cn];Nn=Rn!==!1&&li?Pe.createElement("span",{className:Be()(`${zt}-feedback-icon`,`${zt}-feedback-icon-${Cn}`)},Rn||Pe.createElement(li,null)):null}let qn=!0,Gn=Cn||"";return Pn&&(qn=An,Gn=(Cn!=null?Cn:Vt)||""),{status:Gn,errors:At,warnings:Nt,hasFeedback:!!bt,feedbackIcon:Nn,isFormItemInput:qn}},[Cn,bt,Pn,An,Vt]);return Pe.createElement(he.aM.Provider,{value:an},wt)}var Mr=function(Xe,wt){var At={};for(var Nt in Xe)Object.prototype.hasOwnProperty.call(Xe,Nt)&&wt.indexOf(Nt)<0&&(At[Nt]=Xe[Nt]);if(Xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var bt=0,Nt=Object.getOwnPropertySymbols(Xe);bt<Nt.length;bt++)wt.indexOf(Nt[bt])<0&&Object.prototype.propertyIsEnumerable.call(Xe,Nt[bt])&&(At[Nt[bt]]=Xe[Nt[bt]]);return At};function qr(Xe){const{prefixCls:wt,className:At,rootClassName:Nt,style:bt,help:gn,errors:En,warnings:Un,validateStatus:Pn,meta:zt,hasFeedback:Yt,hidden:Cn,children:An,fieldId:Vt,required:an,isRequired:Bn,onSubItemMetaChange:Nn}=Xe,qn=Mr(Xe,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Gn=`${wt}-item`,{requiredMark:Jn}=Pe.useContext(he.q3),Rn=Pe.useRef(null),li=Se(En),Mi=Se(Un),zn=gn!=null,si=!!(zn||En.length||Un.length),Hi=!!Rn.current&&(0,Ie.Z)(Rn.current),[ur,Ai]=Pe.useState(null);(0,We.Z)(()=>{if(si&&Rn.current){const Wi=getComputedStyle(Rn.current);Ai(parseInt(Wi.marginBottom,10))}},[si,Hi]);const un=Wi=>{Wi||Ai(null)},wi=function(){let Wi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Ni=Wi?li:zt.errors,lr=Wi?Mi:zt.warnings;return _t(Ni,lr,zt,"",!!Yt,Pn)}(),fi=Be()(Gn,At,Nt,{[`${Gn}-with-help`]:zn||li.length||Mi.length,[`${Gn}-has-feedback`]:wi&&Yt,[`${Gn}-has-success`]:wi==="success",[`${Gn}-has-warning`]:wi==="warning",[`${Gn}-has-error`]:wi==="error",[`${Gn}-is-validating`]:wi==="validating",[`${Gn}-hidden`]:Cn});return Pe.createElement("div",{className:fi,style:bt,ref:Rn},Pe.createElement(Ce.Z,Object.assign({className:`${Gn}-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"])),Pe.createElement(ri,Object.assign({htmlFor:Vt},Xe,{requiredMark:Jn,required:an!=null?an:Bn,prefixCls:wt})),Pe.createElement(Tt,Object.assign({},Xe,zt,{errors:li,warnings:Mi,prefixCls:wt,status:wi,help:gn,marginBottom:ur,onErrorVisibleChanged:un}),Pe.createElement(he.qI.Provider,{value:Nn},Pe.createElement(er,{prefixCls:wt,meta:zt,errors:zt.errors,warnings:zt.warnings,hasFeedback:Yt,validateStatus:wi},An)))),!!ur&&Pe.createElement("div",{className:`${Gn}-margin-offset`,style:{marginBottom:-ur}}))}const di="__SPLIT__",xr=null,zi=Pe.memo(Xe=>{let{children:wt}=Xe;return wt},(Xe,wt)=>Xe.value===wt.value&&Xe.update===wt.update&&Xe.childProps.length===wt.childProps.length&&Xe.childProps.every((At,Nt)=>At===wt.childProps[Nt]));function rt(Xe){return Xe!=null}function zr(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function hr(Xe){const{name:wt,noStyle:At,className:Nt,dependencies:bt,prefixCls:gn,shouldUpdate:En,rules:Un,children:Pn,required:zt,label:Yt,messageVariables:Cn,trigger:An="onChange",validateTrigger:Vt,hidden:an,help:Bn}=Xe,{getPrefixCls:Nn}=Pe.useContext(Pt.E_),{name:qn}=Pe.useContext(he.q3),Gn=pt(Pn),Jn=typeof Gn=="function",Rn=Pe.useContext(he.qI),{validateTrigger:li}=Pe.useContext(at.FieldContext),Mi=Vt!==void 0?Vt:li,zn=rt(wt),si=Nn("form",gn),[Hi,ur]=ze(si),Ai=Pe.useContext(at.ListContext),un=Pe.useRef(),[ai,wi]=nt({}),[fi,Wi]=(0,Kt.Z)(()=>zr()),Ni=In=>{const br=Ai==null?void 0:Ai.getKey(In.name);if(Wi(In.destroy?zr():In,!0),At&&Bn!==!1&&Rn){let xo=In.name;if(In.destroy)xo=un.current||xo;else if(br!==void 0){const[Cr,Fo]=br;xo=[Cr].concat((0,Me.Z)(Fo)),un.current=xo}Rn(In,xo)}},lr=(In,br)=>{wi(xo=>{const Cr=Object.assign({},xo),oo=[].concat((0,Me.Z)(In.name.slice(0,-1)),(0,Me.Z)(br)).join(di);return In.destroy?delete Cr[oo]:Cr[oo]=In,Cr})},[Fi,$i]=Pe.useMemo(()=>{const In=(0,Me.Z)(fi.errors),br=(0,Me.Z)(fi.warnings);return Object.values(ai).forEach(xo=>{In.push.apply(In,(0,Me.Z)(xo.errors||[])),br.push.apply(br,(0,Me.Z)(xo.warnings||[]))}),[In,br]},[ai,fi.errors,fi.warnings]),Lr=He();function On(In,br,xo){return At&&!an?Pe.createElement(er,{prefixCls:si,hasFeedback:Xe.hasFeedback,validateStatus:Xe.validateStatus,meta:fi,errors:Fi,warnings:$i,noStyle:!0},In):Pe.createElement(qr,Object.assign({key:"row"},Xe,{className:Be()(Nt,ur),prefixCls:si,fieldId:br,isRequired:xo,errors:Fi,warnings:$i,meta:fi,onSubItemMetaChange:lr}),In)}if(!zn&&!Jn&&!bt)return Hi(On(Gn));let Kr={};return typeof Yt=="string"?Kr.label=Yt:wt&&(Kr.label=String(wt)),Cn&&(Kr=Object.assign(Object.assign({},Kr),Cn)),Hi(Pe.createElement(at.Field,Object.assign({},Xe,{messageVariables:Kr,trigger:An,validateTrigger:Mi,onMetaChange:Ni}),(In,br,xo)=>{const Cr=ut(wt).length&&br?br.name:[],Fo=mt(Cr,qn),oo=zt!==void 0?zt:!!(Un&&Un.some(pr=>{if(pr&&typeof pr=="object"&&pr.required&&!pr.warningOnly)return!0;if(typeof pr=="function"){const kr=pr(xo);return kr&&kr.required&&!kr.warningOnly}return!1})),Ki=Object.assign({},In);let Ji=null;if(Array.isArray(Gn)&&zn)Ji=Gn;else if(!(Jn&&(!(En||bt)||zn))){if(!(bt&&!Jn&&!zn))if((0,dn.l$)(Gn)){const pr=Object.assign(Object.assign({},Gn.props),Ki);if(pr.id||(pr.id=Fo),Bn||Fi.length>0||$i.length>0||Xe.extra){const kt=[];(Bn||Fi.length>0)&&kt.push(`${Fo}_help`),Xe.extra&&kt.push(`${Fo}_extra`),pr["aria-describedby"]=kt.join(" ")}Fi.length>0&&(pr["aria-invalid"]="true"),oo&&(pr["aria-required"]="true"),(0,Jt.Yr)(Gn)&&(pr.ref=Lr(Cr,Gn)),new Set([].concat((0,Me.Z)(ut(An)),(0,Me.Z)(ut(Mi)))).forEach(kt=>{pr[kt]=function(){for(var Pr,_o,Oo,wo,yr,tr=arguments.length,Hr=new Array(tr),Po=0;Po<tr;Po++)Hr[Po]=arguments[Po];(Oo=Ki[kt])===null||Oo===void 0||(Pr=Oo).call.apply(Pr,[Ki].concat(Hr)),(yr=(wo=Gn.props)[kt])===null||yr===void 0||(_o=yr).call.apply(_o,[wo].concat(Hr))}});const hi=[pr["aria-required"],pr["aria-invalid"],pr["aria-describedby"]];Ji=Pe.createElement(zi,{value:Ki[Xe.valuePropName||"value"],update:Gn,childProps:hi},(0,dn.Tm)(Gn,pr))}else Jn&&(En||bt)&&!zn?Ji=Gn(xo):Ji=Gn}return On(Ji,Fo,oo)}))}const vo=hr;vo.useStatus=St;var co=vo,yo=function(Xe,wt){var At={};for(var Nt in Xe)Object.prototype.hasOwnProperty.call(Xe,Nt)&&wt.indexOf(Nt)<0&&(At[Nt]=Xe[Nt]);if(Xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var bt=0,Nt=Object.getOwnPropertySymbols(Xe);bt<Nt.length;bt++)wt.indexOf(Nt[bt])<0&&Object.prototype.propertyIsEnumerable.call(Xe,Nt[bt])&&(At[Nt[bt]]=Xe[Nt[bt]]);return At},lo=Xe=>{var{prefixCls:wt,children:At}=Xe,Nt=yo(Xe,["prefixCls","children"]);const{getPrefixCls:bt}=Pe.useContext(Pt.E_),gn=bt("form",wt),En=Pe.useMemo(()=>({prefixCls:gn,status:"error"}),[gn]);return Pe.createElement(at.List,Object.assign({},Nt),(Un,Pn,zt)=>Pe.createElement(he.Rk.Provider,{value:En},At(Un.map(Yt=>Object.assign(Object.assign({},Yt),{fieldKey:Yt.key})),Pn,{errors:zt.errors,warnings:zt.warnings})))};function ln(){const{form:Xe}=(0,Pe.useContext)(he.q3);return Xe}const Ke=Wt;Ke.Item=co,Ke.List=lo,Ke.ErrorList=ft,Ke.useForm=Bt,Ke.useFormInstance=ln,Ke.useWatch=at.useWatch,Ke.Provider=he.RV,Ke.create=()=>{};var qe=Ke},8628:function(Ln,tn,Ee){"use strict";var Me=Ee(59301),me=Ee(28800),Be=Ee(56762),ke=Ee(69507);function Pe(){let Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const he=(0,Me.useRef)({}),Se=(0,Be.Z)(),xe=(0,ke.ZP)();return(0,me.Z)(()=>{const ge=xe.subscribe(le=>{he.current=le,Le&&Se()});return()=>xe.unsubscribe(ge)},[]),he.current}tn.Z=Pe},9432:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return se},n:function(){return oe}});var Me=Ee(33130),me=Ee(92310),Be=Ee.n(me),ke=Ee(93681),Pe=Ee(20475),Le=Ee(59301),he=Ee(19080),Se=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,ye){var we={};for(var be in ue)Object.prototype.hasOwnProperty.call(ue,be)&&ye.indexOf(be)<0&&(we[be]=ue[be]);if(ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ae=0,be=Object.getOwnPropertySymbols(ue);Ae<be.length;Ae++)ye.indexOf(be[Ae])<0&&Object.prototype.propertyIsEnumerable.call(ue,be[Ae])&&(we[be[Ae]]=ue[be[Ae]]);return we};function oe(ue,ye){if(!ue)return;ue.focus(ye);const{cursor:we}=ye||{};if(we){const be=ue.value.length;switch(we){case"start":ue.setSelectionRange(0,0);break;case"end":ue.setSelectionRange(be,be);break;default:ue.setSelectionRange(0,be);break}}}var se=(0,Le.forwardRef)((ue,ye)=>{var we;const{prefixCls:be,bordered:Ae=!0,status:De,size:ze,disabled:Ze,onBlur:Ye,onFocus:Ge,suffix:ft,allowClear:at,addonAfter:Pt,addonBefore:tt,className:vt,style:st,styles:jt,rootClassName:lt,onChange:et,classNames:ut}=ue,mt=ee(ue,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:_t,direction:gt,input:Bt}=Le.useContext(Se.E_),Ht=_t("input",be),hn=(0,Le.useRef)(null),[Qt,bn]=(0,ce.ZP)(Ht),{compactSize:Wt,compactItemClassnames:Kt}=(0,ve.ri)(Ht,gt),Jt=(0,ge.Z)(dt=>{var Je;return(Je=ze!=null?ze:Wt)!==null&&Je!==void 0?Je:dt}),dn=Le.useContext(xe.Z),Lt=Ze!=null?Ze:dn,{status:pt,hasFeedback:Rt,feedbackIcon:St}=(0,Le.useContext)(le.aM),yt=(0,he.F)(pt,De),nt=z(ue)||!!Rt,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(),Ye==null||Ye(dt)},Oe=dt=>{Ie(),Ge==null||Ge(dt)},Ce=dt=>{Ie(),et==null||et(dt)},Ne=(Rt||ft)&&Le.createElement(Le.Fragment,null,ft,Rt&&St);let $e;return typeof at=="object"&&(at!=null&&at.clearIcon)?$e=at:at&&($e={clearIcon:Le.createElement(Me.Z,null)}),Qt(Le.createElement(ke.default,Object.assign({ref:(0,Pe.sQ)(ye,hn),prefixCls:Ht,autoComplete:Bt==null?void 0:Bt.autoComplete},mt,{disabled:Lt,onBlur:We,onFocus:Oe,style:Object.assign(Object.assign({},Bt==null?void 0:Bt.style),st),styles:Object.assign(Object.assign({},Bt==null?void 0:Bt.styles),jt),suffix:Ne,allowClear:$e,className:Be()(vt,lt,Kt,Bt==null?void 0:Bt.className),onChange:Ce,addonAfter:Pt&&Le.createElement(ve.BR,null,Le.createElement(le.Ux,{override:!0,status:!0},Pt)),addonBefore:tt&&Le.createElement(ve.BR,null,Le.createElement(le.Ux,{override:!0,status:!0},tt)),classNames:Object.assign(Object.assign(Object.assign({},ut),Bt==null?void 0:Bt.classNames),{input:Be()({[`${Ht}-sm`]:Jt==="small",[`${Ht}-lg`]:Jt==="large",[`${Ht}-rtl`]:gt==="rtl",[`${Ht}-borderless`]:!Ae},!nt&&(0,he.Z)(Ht,yt),ut==null?void 0:ut.input,(we=Bt==null?void 0:Bt.classNames)===null||we===void 0?void 0:we.input,bn)}),classes:{affixWrapper:Be()({[`${Ht}-affix-wrapper-sm`]:Jt==="small",[`${Ht}-affix-wrapper-lg`]:Jt==="large",[`${Ht}-affix-wrapper-rtl`]:gt==="rtl",[`${Ht}-affix-wrapper-borderless`]:!Ae},(0,he.Z)(`${Ht}-affix-wrapper`,yt,Rt),bn),wrapper:Be()({[`${Ht}-group-rtl`]:gt==="rtl"},bn),group:Be()({[`${Ht}-group-wrapper-sm`]:Jt==="small",[`${Ht}-group-wrapper-lg`]:Jt==="large",[`${Ht}-group-wrapper-rtl`]:gt==="rtl",[`${Ht}-group-wrapper-disabled`]:Lt},(0,he.Z)(`${Ht}-group-wrapper`,yt,Rt),bn)}})))})},1643:function(Ln,tn,Ee){"use strict";var Me=Ee(33130),me=Ee(92310),Be=Ee.n(me),ke=Ee(9296),Pe=Ee(59301),Le=Ee(19080),he=Ee(36355),Se=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,Pe.forwardRef)((z,ee)=>{const{prefixCls:oe,bordered:ie=!0,size:se,disabled:ue,status:ye,allowClear:we,showCount:be,classNames:Ae,rootClassName:De,className:ze}=z,Ze=de(z,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:Ye,direction:Ge}=Pe.useContext(he.E_),ft=(0,xe.Z)(se),at=Pe.useContext(Se.Z),Pt=ue!=null?ue:at,{status:tt,hasFeedback:vt,feedbackIcon:st}=Pe.useContext(ge.aM),jt=(0,Le.F)(tt,ye),lt=Pe.useRef(null);Pe.useImperativeHandle(ee,()=>{var gt;return{resizableTextArea:(gt=lt.current)===null||gt===void 0?void 0:gt.resizableTextArea,focus:Bt=>{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,Bt)},blur:()=>{var Bt;return(Bt=lt.current)===null||Bt===void 0?void 0:Bt.blur()}}});const et=Ye("input",oe);let ut;typeof we=="object"&&(we!=null&&we.clearIcon)?ut=we:we&&(ut={clearIcon:Pe.createElement(Me.Z,null)});const[mt,_t]=(0,ve.ZP)(et);return mt(Pe.createElement(ke.default,Object.assign({},Ze,{disabled:Pt,allowClear:ut,className:Be()(ze,De),classes:{affixWrapper:Be()(`${et}-textarea-affix-wrapper`,{[`${et}-affix-wrapper-rtl`]:Ge==="rtl",[`${et}-affix-wrapper-borderless`]:!ie,[`${et}-affix-wrapper-sm`]:ft==="small",[`${et}-affix-wrapper-lg`]:ft==="large",[`${et}-textarea-show-count`]:be},(0,Le.Z)(`${et}-affix-wrapper`,jt),_t)},classNames:Object.assign(Object.assign({},Ae),{textarea:Be()({[`${et}-borderless`]:!ie,[`${et}-sm`]:ft==="small",[`${et}-lg`]:ft==="large"},(0,Le.Z)(et,jt),_t,Ae==null?void 0:Ae.textarea)}),prefixCls:et,suffix:vt&&Pe.createElement("span",{className:`${et}-textarea-suffix`},st),showCount:be,ref:lt})))});tn.Z=ce},59412:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return me}});var Me=Ee(59301);function me(Be,ke){const Pe=(0,Me.useRef)([]),Le=()=>{Pe.current.push(setTimeout(()=>{var he,Se,xe,ge;!((he=Be.current)===null||he===void 0)&&he.input&&((Se=Be.current)===null||Se===void 0?void 0:Se.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(),()=>Pe.current.forEach(he=>{he&&clearTimeout(he)})),[]),Le}},92832:function(Ln,tn,Ee){"use strict";Ee.d(tn,{default:function(){return ft}});var Me=Ee(92310),me=Ee.n(Me),Be=Ee(59301),ke=Ee(36355),Pe=Ee(32441),Le=Ee(9937),Se=at=>{const{getPrefixCls:Pt,direction:tt}=(0,Be.useContext)(ke.E_),{prefixCls:vt,className:st}=at,jt=Pt("input-group",vt),lt=Pt("input"),[et,ut]=(0,Le.ZP)(lt),mt=me()(jt,{[`${jt}-lg`]:at.size==="large",[`${jt}-sm`]:at.size==="small",[`${jt}-compact`]:at.compact,[`${jt}-rtl`]:tt==="rtl"},ut,st),_t=(0,Be.useContext)(Pe.aM),gt=(0,Be.useMemo)(()=>Object.assign(Object.assign({},_t),{isFormItemInput:!1}),[_t]);return et(Be.createElement("span",{className:mt,style:at.style,onMouseEnter:at.onMouseEnter,onMouseLeave:at.onMouseLeave,onFocus:at.onFocus,onBlur:at.onBlur},Be.createElement(Pe.aM.Provider,{value:gt},at.children)))},xe=Ee(9432),ge=Ee(61441),le=Ee(30631),ve=Ee(64002),de=Ee(20475),ce=Ee(59412),z=function(at,Pt){var tt={};for(var vt in at)Object.prototype.hasOwnProperty.call(at,vt)&&Pt.indexOf(vt)<0&&(tt[vt]=at[vt]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var st=0,vt=Object.getOwnPropertySymbols(at);st<vt.length;st++)Pt.indexOf(vt[st])<0&&Object.prototype.propertyIsEnumerable.call(at,vt[st])&&(tt[vt[st]]=at[vt[st]]);return tt};const ee=at=>at?Be.createElement(le.Z,null):Be.createElement(ge.Z,null),oe={click:"onClick",hover:"onMouseOver"};var se=Be.forwardRef((at,Pt)=>{const{visibilityToggle:tt=!0}=at,vt=typeof tt=="object"&&tt.visible!==void 0,[st,jt]=(0,Be.useState)(()=>vt?tt.visible:!1),lt=(0,Be.useRef)(null);Be.useEffect(()=>{vt&&jt(tt.visible)},[vt,tt]);const et=(0,ce.Z)(lt),ut=()=>{const{disabled:Lt}=at;Lt||(st&&et(),jt(pt=>{var Rt;const St=!pt;return typeof tt=="object"&&((Rt=tt.onVisibleChange)===null||Rt===void 0||Rt.call(tt,St)),St}))},mt=Lt=>{const{action:pt="click",iconRender:Rt=ee}=at,St=oe[pt]||"",yt=Rt(st),nt={[St]:ut,className:`${Lt}-icon`,key:"passwordIcon",onMouseDown:He=>{He.preventDefault()},onMouseUp:He=>{He.preventDefault()}};return Be.cloneElement(Be.isValidElement(yt)?yt:Be.createElement("span",null,yt),nt)},{className:_t,prefixCls:gt,inputPrefixCls:Bt,size:Ht}=at,hn=z(at,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Qt}=Be.useContext(ke.E_),bn=Qt("input",Bt),Wt=Qt("input-password",gt),Kt=tt&&mt(Wt),Jt=me()(Wt,_t,{[`${Wt}-${Ht}`]:!!Ht}),dn=Object.assign(Object.assign({},(0,ve.Z)(hn,["suffix","iconRender","visibilityToggle"])),{type:st?"text":"password",className:Jt,prefixCls:bn,suffix:Kt});return Ht&&(dn.size=Ht),Be.createElement(xe.Z,Object.assign({ref:(0,de.sQ)(Pt,lt)},dn))}),ue=Ee(21970),ye=Ee(92343),we=Ee(3113),be=Ee(19716),Ae=Ee(33234),De=function(at,Pt){var tt={};for(var vt in at)Object.prototype.hasOwnProperty.call(at,vt)&&Pt.indexOf(vt)<0&&(tt[vt]=at[vt]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var st=0,vt=Object.getOwnPropertySymbols(at);st<vt.length;st++)Pt.indexOf(vt[st])<0&&Object.prototype.propertyIsEnumerable.call(at,vt[st])&&(tt[vt[st]]=at[vt[st]]);return tt},Ze=Be.forwardRef((at,Pt)=>{const{prefixCls:tt,inputPrefixCls:vt,className:st,size:jt,suffix:lt,enterButton:et=!1,addonAfter:ut,loading:mt,disabled:_t,onSearch:gt,onChange:Bt,onCompositionStart:Ht,onCompositionEnd:hn}=at,Qt=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),Jt=bn("input-search",tt),dn=bn("input",vt),{compactSize:Lt}=(0,Ae.ri)(Jt,Wt),pt=(0,be.Z)(Tt=>{var qt;return(qt=jt!=null?jt:Lt)!==null&&qt!==void 0?qt:Tt}),Rt=Be.useRef(null),St=Tt=>{Tt&&Tt.target&&Tt.type==="click"&>&>(Tt.target.value,Tt,{source:"clear"}),Bt&&Bt(Tt)},yt=Tt=>{var qt;document.activeElement===((qt=Rt.current)===null||qt===void 0?void 0:qt.input)&&Tt.preventDefault()},nt=Tt=>{var qt,yn;gt&>((yn=(qt=Rt.current)===null||qt===void 0?void 0:qt.input)===null||yn===void 0?void 0:yn.value,Tt,{source:"input"})},He=Tt=>{Kt.current||mt||nt(Tt)},Ie=typeof et=="boolean"?Be.createElement(ue.Z,null):null,We=`${Jt}-button`;let Oe;const Ce=et||{},Ne=Ce.type&&Ce.type.__ANT_BUTTON===!0;Ne||Ce.type==="button"?Oe=(0,ye.Tm)(Ce,Object.assign({onMouseDown:yt,onClick:Tt=>{var qt,yn;(yn=(qt=Ce==null?void 0:Ce.props)===null||qt===void 0?void 0:qt.onClick)===null||yn===void 0||yn.call(qt,Tt),nt(Tt)},key:"enterButton"},Ne?{className:We,size:pt}:{})):Oe=Be.createElement(we.ZP,{className:We,type:et?"primary":void 0,size:pt,disabled:_t,key:"enterButton",onMouseDown:yt,onClick:nt,loading:mt,icon:Ie},et),ut&&(Oe=[Oe,(0,ye.Tm)(ut,{key:"addonAfter"})]);const $e=me()(Jt,{[`${Jt}-rtl`]:Wt==="rtl",[`${Jt}-${pt}`]:!!pt,[`${Jt}-with-button`]:!!et},st),dt=Tt=>{Kt.current=!0,Ht==null||Ht(Tt)},Je=Tt=>{Kt.current=!1,hn==null||hn(Tt)};return Be.createElement(xe.Z,Object.assign({ref:(0,de.sQ)(Rt,Pt),onPressEnter:He},Qt,{size:pt,onCompositionStart:dt,onCompositionEnd:Je,prefixCls:dn,addonAfter:Oe,suffix:lt,onChange:St,className:$e,disabled:_t}))}),Ye=Ee(1643);const Ge=xe.Z;Ge.Group=Se,Ge.Search=Ze,Ge.TextArea=Ye.Z,Ge.Password=se;var ft=Ge},99580:function(Ln,tn,Ee){"use strict";Ee.d(tn,{D:function(){return ue},Z:function(){return be}});var Me=Ee(5891),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,Pe=Ee(88853),Le=function(De,ze){return me.createElement(Pe.Z,(0,Me.Z)({},De,{ref:ze,icon:ke}))},he=me.forwardRef(Le),Se=he,xe=Ee(16537),ge=Ee(53878),le=Ee(92310),ve=Ee.n(le),de=Ee(64002),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 Ye=0,Ze=Object.getOwnPropertySymbols(Ae);Ye<Ze.length;Ye++)De.indexOf(Ze[Ye])<0&&Object.prototype.propertyIsEnumerable.call(Ae,Ze[Ye])&&(ze[Ze[Ye]]=Ae[Ze[Ye]]);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({}),ye=(()=>{let Ae=0;return function(){let De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return Ae+=1,`${De}${Ae}`}})();var be=me.forwardRef((Ae,De)=>{const{prefixCls:ze,className:Ze,trigger:Ye,children:Ge,defaultCollapsed:ft=!1,theme:at="dark",style:Pt={},collapsible:tt=!1,reverseArrow:vt=!1,width:st=200,collapsedWidth:jt=80,zeroWidthTriggerStyle:lt,breakpoint:et,onCollapse:ut,onBreakpoint:mt}=Ae,_t=ie(Ae,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:gt}=(0,me.useContext)(oe.Gs),[Bt,Ht]=(0,me.useState)("collapsed"in Ae?Ae.collapsed:ft),[hn,Qt]=(0,me.useState)(!1);(0,me.useEffect)(()=>{"collapsed"in Ae&&Ht(Ae.collapsed)},[Ae.collapsed]);const bn=(pt,Rt)=>{"collapsed"in Ae||Ht(pt),ut==null||ut(pt,Rt)},Wt=(0,me.useRef)();Wt.current=pt=>{Qt(pt.matches),mt==null||mt(pt.matches),Bt!==pt.matches&&bn(pt.matches,"responsive")},(0,me.useEffect)(()=>{function pt(St){return Wt.current(St)}let Rt;if(typeof window!="undefined"){const{matchMedia:St}=window;if(St&&et&&et in se){Rt=St(`(max-width: ${se[et]})`);try{Rt.addEventListener("change",pt)}catch(yt){Rt.addListener(pt)}pt(Rt)}}return()=>{try{Rt==null||Rt.removeEventListener("change",pt)}catch(St){Rt==null||Rt.removeListener(pt)}}},[et]),(0,me.useEffect)(()=>{const pt=ye("ant-sider-");return gt.addSider(pt),()=>gt.removeSider(pt)},[]);const Kt=()=>{bn(!Bt,"clickTrigger")},{getPrefixCls:Jt}=(0,me.useContext)(ee.E_),dn=()=>{const pt=Jt("layout-sider",ze),Rt=(0,de.Z)(_t,["collapsed"]),St=Bt?jt:st,yt=z(St)?`${St}px`:String(St),nt=parseFloat(String(jt||0))===0?me.createElement("span",{onClick:Kt,className:ve()(`${pt}-zero-width-trigger`,`${pt}-zero-width-trigger-${vt?"right":"left"}`),style:lt},Ye||me.createElement(Se,null)):null,We={expanded:vt?me.createElement(ge.Z,null):me.createElement(xe.Z,null),collapsed:vt?me.createElement(xe.Z,null):me.createElement(ge.Z,null)}[Bt?"collapsed":"expanded"],Oe=Ye!==null?nt||me.createElement("div",{className:`${pt}-trigger`,onClick:Kt,style:{width:yt}},Ye||We):null,Ce=Object.assign(Object.assign({},Pt),{flex:`0 0 ${yt}`,maxWidth:yt,minWidth:yt,width:yt}),Ne=ve()(pt,`${pt}-${at}`,{[`${pt}-collapsed`]:!!Bt,[`${pt}-has-trigger`]:tt&&Ye!==null&&!nt,[`${pt}-below`]:!!hn,[`${pt}-zero-width`]:parseFloat(yt)===0},Ze);return me.createElement("aside",Object.assign({className:Ne},Rt,{style:Ce,ref:De}),me.createElement("div",{className:`${pt}-children`},Ge),tt||hn&&nt?Oe:null)},Lt=me.useMemo(()=>({siderCollapsed:Bt}),[Bt]);return me.createElement(ue.Provider,{value:Lt},dn())})},84966:function(Ln,tn,Ee){"use strict";Ee.d(tn,{VY:function(){return ue},$_:function(){return se},h4:function(){return ie},Gs:function(){return de},ZP:function(){return ye}});var Me=Ee(26390),me=Ee(92310),Be=Ee.n(me),ke=Ee(64002),Pe=Ee(59301),Le=Ee(36355),he=Ee(83116),xe=we=>{const{componentCls:be,bodyBg:Ae,lightSiderBg:De,lightTriggerBg:ze,lightTriggerColor:Ze}=we;return{[`${be}-sider-light`]:{background:De,[`${be}-sider-trigger`]:{color:Ze,background:ze},[`${be}-sider-zero-width-trigger`]:{color:Ze,background:ze,border:`1px solid ${Ae}`,borderInlineStart:0}}}};const ge=we=>{const{antCls:be,componentCls:Ae,colorText:De,triggerColor:ze,footerBg:Ze,triggerBg:Ye,headerHeight:Ge,headerPadding:ft,headerColor:at,footerPadding:Pt,triggerHeight:tt,zeroTriggerHeight:vt,zeroTriggerWidth:st,motionDurationMid:jt,motionDurationSlow:lt,fontSize:et,borderRadius:ut,bodyBg:mt,headerBg:_t,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 ${jt}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${be}-menu${be}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:tt},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:tt,color:ze,lineHeight:`${tt}px`,textAlign:"center",background:Ye,cursor:"pointer",transition:`all ${jt}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:Ge,insetInlineEnd:-st,zIndex:1,width:st,height:vt,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:_t,[`${be}-menu`]:{lineHeight:"inherit"}},[`${Ae}-footer`]:{padding:Pt,color:De,fontSize:et,background:Ze},[`${Ae}-content`]:{flex:"auto",minHeight:0}}};var le=(0,he.Z)("Layout",we=>[ge(we)],we=>{const{colorBgLayout:be,controlHeight:Ae,controlHeightLG:De,colorText:ze,controlHeightSM:Ze,marginXXS:Ye,colorTextLightSolid:Ge,colorBgContainer:ft}=we,at=De*1.25;return{colorBgHeader:"#001529",colorBgBody:be,colorBgTrigger:"#002140",bodyBg:be,headerBg:"#001529",headerHeight:Ae*2,headerPadding:`0 ${at}px`,headerColor:ze,footerPadding:`${Ze}px ${at}px`,footerBg:be,siderBg:"#001529",triggerHeight:De+Ye*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,be){var Ae={};for(var De in we)Object.prototype.hasOwnProperty.call(we,De)&&be.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++)be.indexOf(De[ze])<0&&Object.prototype.propertyIsEnumerable.call(we,De[ze])&&(Ae[De[ze]]=we[De[ze]]);return Ae};const de=Pe.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function ce(we){let{suffixCls:be,tagName:Ae,displayName:De}=we;return ze=>Pe.forwardRef((Ye,Ge)=>Pe.createElement(ze,Object.assign({ref:Ge,suffixCls:be,tagName:Ae},Ye)))}const z=Pe.forwardRef((we,be)=>{const{prefixCls:Ae,suffixCls:De,className:ze,tagName:Ze}=we,Ye=ve(we,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:Ge}=Pe.useContext(Le.E_),ft=Ge("layout",Ae),[at,Pt]=le(ft),tt=De?`${ft}-${De}`:ft;return at(Pe.createElement(Ze,Object.assign({className:Be()(Ae||tt,ze,Pt),ref:be},Ye)))}),ee=Pe.forwardRef((we,be)=>{const{direction:Ae}=Pe.useContext(Le.E_),[De,ze]=Pe.useState([]),{prefixCls:Ze,className:Ye,rootClassName:Ge,children:ft,hasSider:at,tagName:Pt,style:tt}=we,vt=ve(we,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),st=(0,ke.Z)(vt,["suffixCls"]),{getPrefixCls:jt,layout:lt}=Pe.useContext(Le.E_),et=jt("layout",Ze),[ut,mt]=le(et),_t=Be()(et,{[`${et}-has-sider`]:typeof at=="boolean"?at:De.length>0,[`${et}-rtl`]:Ae==="rtl"},lt==null?void 0:lt.className,Ye,Ge,mt),gt=Pe.useMemo(()=>({siderHook:{addSider:Bt=>{ze(Ht=>[].concat((0,Me.Z)(Ht),[Bt]))},removeSider:Bt=>{ze(Ht=>Ht.filter(hn=>hn!==Bt))}}}),[]);return ut(Pe.createElement(de.Provider,{value:gt},Pe.createElement(Pt,Object.assign({ref:be,className:_t,style:Object.assign(Object.assign({},lt==null?void 0:lt.style),tt)},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 ye=oe},40875:function(Ln,tn,Ee){"use strict";Ee.d(tn,{J:function(){return Le}});var Me=Ee(59301),me=Ee(33234),Be=Ee(80764),ke=function(he,Se){var xe={};for(var ge in he)Object.prototype.hasOwnProperty.call(he,ge)&&Se.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++)Se.indexOf(ge[le])<0&&Object.prototype.propertyIsEnumerable.call(he,ge[le])&&(xe[ge[le]]=he[ge[le]]);return xe};const Pe=Me.createContext(null),Le=Me.forwardRef((he,Se)=>{const{children:xe}=he,ge=ke(he,["children"]),le=Me.useContext(Pe),ve=Me.useMemo(()=>Object.assign(Object.assign({},le),ge),[le,ge.prefixCls,ge.mode,ge.selectable]);return Me.createElement(Pe.Provider,{value:ve},Me.createElement(me.BR,null,(0,Be.supportNodeRef)(xe)?Me.cloneElement(xe,{ref:Se}):xe))});tn.Z=Pe},20834:function(Ln,tn,Ee){"use strict";Ee.d(tn,{default:function(){return Lt}});var Me=Ee(22798),me=Ee(59301),Be=Ee(99580),ke=Ee(92310),Pe=Ee.n(ke),Le=Ee(36355),he=function(pt,Rt){var St={};for(var yt in pt)Object.prototype.hasOwnProperty.call(pt,yt)&&Rt.indexOf(yt)<0&&(St[yt]=pt[yt]);if(pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,yt=Object.getOwnPropertySymbols(pt);nt<yt.length;nt++)Rt.indexOf(yt[nt])<0&&Object.prototype.propertyIsEnumerable.call(pt,yt[nt])&&(St[yt[nt]]=pt[yt[nt]]);return St},xe=pt=>{const{prefixCls:Rt,className:St,dashed:yt}=pt,nt=he(pt,["prefixCls","className","dashed"]),{getPrefixCls:He}=me.useContext(Le.E_),Ie=He("menu",Rt),We=Pe()({[`${Ie}-item-divider-dashed`]:!!yt},St);return me.createElement(Me.iz,Object.assign({className:We},nt))},ge=Ee(38298),le=Ee(64002),ve=Ee(6848),de=Ee(92343),z=(0,me.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),oe=pt=>{var Rt;const{className:St,children:yt,icon:nt,title:He,danger:Ie}=pt,{prefixCls:We,firstLevel:Oe,direction:Ce,disableMenuItemTitleTooltip:Ne,inlineCollapsed:$e}=me.useContext(z),dt=pn=>{const Fn=me.createElement("span",{className:`${We}-title-content`},yt);return(!nt||(0,de.l$)(yt)&&yt.type==="span")&&yt&&pn&&Oe&&typeof yt=="string"?me.createElement("div",{className:`${We}-inline-collapsed-noicon`},yt.charAt(0)):Fn},{siderCollapsed:Je}=me.useContext(Be.D);let Tt=He;typeof He=="undefined"?Tt=Oe?yt:"":He===!1&&(Tt="");const qt={title:Tt};!Je&&!$e&&(qt.title=null,qt.open=!1);const yn=(0,ge.Z)(yt).length;let rn=me.createElement(Me.ck,Object.assign({},(0,le.Z)(pt,["title","icon","danger"]),{className:Pe()({[`${We}-item-danger`]:Ie,[`${We}-item-only-child`]:(nt?yn+1:yn)===1},St),title:typeof He=="string"?He:void 0}),(0,de.Tm)(nt,{className:Pe()((0,de.l$)(nt)?(Rt=nt.props)===null||Rt===void 0?void 0:Rt.className:"",`${We}-item-icon`)}),dt($e));return Ne||(rn=me.createElement(ve.Z,Object.assign({},qt,{placement:Ce==="rtl"?"left":"right",overlayClassName:`${We}-inline-collapsed-tooltip`}),rn)),rn},se=pt=>{var Rt;const{popupClassName:St,icon:yt,title:nt,theme:He}=pt,Ie=me.useContext(z),{prefixCls:We,inlineCollapsed:Oe,theme:Ce}=Ie,Ne=(0,Me.Xl)();let $e;if(!yt)$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)(yt,{className:Pe()((0,de.l$)(yt)?(Rt=yt.props)===null||Rt===void 0?void 0:Rt.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:Pe()(We,St,`${We}-${He||Ce}`)})))},ue=Ee(19362),ye=Ee(80764),we=Ee(62892),be=Ee(40875),Ae=function(pt,Rt){var St={};for(var yt in pt)Object.prototype.hasOwnProperty.call(pt,yt)&&Rt.indexOf(yt)<0&&(St[yt]=pt[yt]);if(pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,yt=Object.getOwnPropertySymbols(pt);nt<yt.length;nt++)Rt.indexOf(yt[nt])<0&&Object.prototype.propertyIsEnumerable.call(pt,yt[nt])&&(St[yt[nt]]=pt[yt[nt]]);return St};function De(pt){return(pt||[]).map((Rt,St)=>{if(Rt&&typeof Rt=="object"){const yt=Rt,{label:nt,children:He,key:Ie,type:We}=yt,Oe=Ae(yt,["label","children","key","type"]),Ce=Ie!=null?Ie:`tmp-${St}`;return He||We==="group"?We==="group"?me.createElement(Me.BW,Object.assign({key:Ce},Oe,{title:nt}),De(He)):me.createElement(se,Object.assign({key:Ce},Oe,{title:nt}),De(He)):We==="divider"?me.createElement(xe,Object.assign({key:Ce},Oe)):me.createElement(oe,Object.assign({key:Ce},Oe),nt)}return null}).filter(Rt=>Rt)}function ze(pt){return me.useMemo(()=>pt&&De(pt),[pt])}var Ze=Ee(64993),Ye=Ee(17313),Ge=Ee(8378),ft=Ee(13826),at=Ee(29878),Pt=Ee(83116),tt=Ee(37613),st=pt=>{const{componentCls:Rt,motionDurationSlow:St,horizontalLineHeight:yt,colorSplit:nt,lineWidth:He,lineType:Ie,itemPaddingInline:We}=pt;return{[`${Rt}-horizontal`]:{lineHeight:yt,border:0,borderBottom:`${He}px ${Ie} ${nt}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Rt}-item, ${Rt}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:We},[`> ${Rt}-item:hover,
|
|
|
> ${Rt}-item-active,
|
|
|
> ${Rt}-submenu ${Rt}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Rt}-item, ${Rt}-submenu-title`]:{transition:[`border-color ${St}`,`background ${St}`].join(",")},[`${Rt}-submenu-arrow`]:{display:"none"}}}},lt=pt=>{let{componentCls:Rt,menuArrowOffset:St}=pt;return{[`${Rt}-rtl`]:{direction:"rtl"},[`${Rt}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Rt}-rtl${Rt}-vertical,
|
|
|
${Rt}-submenu-rtl ${Rt}-vertical`]:{[`${Rt}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${St})`},"&::after":{transform:`rotate(45deg) translateY(${St})`}}}}};const et=pt=>Object.assign({},(0,Ye.oN)(pt));var mt=(pt,Rt)=>{const{componentCls:St,itemColor:yt,itemSelectedColor:nt,groupTitleColor:He,itemBg:Ie,subMenuItemBg:We,itemSelectedBg:Oe,activeBarHeight:Ce,activeBarWidth:Ne,activeBarBorderWidth:$e,motionDurationSlow:dt,motionEaseInOut:Je,motionEaseOut:Tt,itemPaddingInline:qt,motionDurationMid:yn,itemHoverColor:rn,lineType:pn,colorSplit:Fn,itemDisabledColor:kn,dangerItemColor:oi,dangerItemHoverColor:ri,dangerItemSelectedColor:Ti,dangerItemActiveBg:mi,dangerItemSelectedBg:Qi,itemHoverBg:ir,itemActiveBg:fr,menuSubMenuBg:er,horizontalItemSelectedColor:Mr,horizontalItemSelectedBg:qr,horizontalItemBorderRadius:di,horizontalItemHoverBg:xr,popupBg:zi}=pt;return{[`${St}-${Rt}, ${St}-${Rt} > ${St}`]:{color:yt,background:Ie,[`&${St}-root:focus-visible`]:Object.assign({},et(pt)),[`${St}-item-group-title`]:{color:He},[`${St}-submenu-selected`]:{[`> ${St}-submenu-title`]:{color:nt}},[`${St}-item-disabled, ${St}-submenu-disabled`]:{color:`${kn} !important`},[`${St}-item:not(${St}-item-selected):not(${St}-submenu-selected)`]:{[`&:hover, > ${St}-submenu-title:hover`]:{color:rn}},[`&:not(${St}-horizontal)`]:{[`${St}-item:not(${St}-item-selected)`]:{"&:hover":{backgroundColor:ir},"&:active":{backgroundColor:fr}},[`${St}-submenu-title`]:{"&:hover":{backgroundColor:ir},"&:active":{backgroundColor:fr}}},[`${St}-item-danger`]:{color:oi,[`&${St}-item:hover`]:{[`&:not(${St}-item-selected):not(${St}-submenu-selected)`]:{color:ri}},[`&${St}-item:active`]:{background:mi}},[`${St}-item a`]:{"&, &:hover":{color:"inherit"}},[`${St}-item-selected`]:{color:nt,[`&${St}-item-danger`]:{color:Ti},"a, a:hover":{color:"inherit"}},[`& ${St}-item-selected`]:{backgroundColor:Oe,[`&${St}-item-danger`]:{backgroundColor:Qi}},[`${St}-item, ${St}-submenu-title`]:{[`&:not(${St}-item-disabled):focus-visible`]:Object.assign({},et(pt))},[`&${St}-submenu > ${St}`]:{backgroundColor:er},[`&${St}-popup > ${St}`]:{backgroundColor:zi},[`&${St}-horizontal`]:Object.assign(Object.assign({},Rt==="dark"?{borderBottom:0}:{}),{[`> ${St}-item, > ${St}-submenu`]:{top:$e,marginTop:-$e,marginBottom:0,borderRadius:di,"&::after":{position:"absolute",insetInline:qt,bottom:0,borderBottom:`${Ce}px solid transparent`,transition:`border-color ${dt} ${Je}`,content:'""'},"&:hover, &-active, &-open":{background:xr,"&::after":{borderBottomWidth:Ce,borderBottomColor:Mr}},"&-selected":{color:Mr,backgroundColor:qr,"&:hover":{backgroundColor:qr},"&::after":{borderBottomWidth:Ce,borderBottomColor:Mr}}}}),[`&${St}-root`]:{[`&${St}-inline, &${St}-vertical`]:{borderInlineEnd:`${$e}px ${pn} ${Fn}`}},[`&${St}-inline`]:{[`${St}-sub${St}-inline`]:{background:We},[`${St}-item, ${St}-submenu-title`]:$e&&Ne?{width:`calc(100% + ${$e}px)`}:{},[`${St}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${Ne}px solid ${nt}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${yn} ${Tt}`,`opacity ${yn} ${Tt}`].join(","),content:'""'},[`&${St}-item-danger`]:{"&::after":{borderInlineEndColor:Ti}}},[`${St}-selected, ${St}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${yn} ${Je}`,`opacity ${yn} ${Je}`].join(",")}}}}}};const _t=pt=>{const{componentCls:Rt,itemHeight:St,itemMarginInline:yt,padding:nt,menuArrowSize:He,marginXS:Ie,itemMarginBlock:We}=pt,Oe=nt+He+Ie;return{[`${Rt}-item`]:{position:"relative",overflow:"hidden"},[`${Rt}-item, ${Rt}-submenu-title`]:{height:St,lineHeight:`${St}px`,paddingInline:nt,overflow:"hidden",textOverflow:"ellipsis",marginInline:yt,marginBlock:We,width:`calc(100% - ${yt*2}px)`},[`> ${Rt}-item,
|
|
|
> ${Rt}-submenu > ${Rt}-submenu-title`]:{height:St,lineHeight:`${St}px`},[`${Rt}-item-group-list ${Rt}-submenu-title,
|
|
|
${Rt}-submenu-title`]:{paddingInlineEnd:Oe}}};var Bt=pt=>{const{componentCls:Rt,iconCls:St,itemHeight:yt,colorTextLightSolid:nt,dropdownWidth:He,controlHeightLG:Ie,motionDurationMid:We,motionEaseOut:Oe,paddingXL:Ce,itemMarginInline:Ne,fontSizeLG:$e,motionDurationSlow:dt,paddingXS:Je,boxShadowSecondary:Tt,collapsedWidth:qt,collapsedIconSize:yn}=pt,rn={height:yt,lineHeight:`${yt}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[Rt]:{"&-inline, &-vertical":Object.assign({[`&${Rt}-root`]:{boxShadow:"none"}},_t(pt))},[`${Rt}-submenu-popup`]:{[`${Rt}-vertical`]:Object.assign(Object.assign({},_t(pt)),{boxShadow:Tt})}},{[`${Rt}-submenu-popup ${Rt}-vertical${Rt}-sub`]:{minWidth:He,maxHeight:`calc(100vh - ${Ie*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Rt}-inline`]:{width:"100%",[`&${Rt}-root`]:{[`${Rt}-item, ${Rt}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${dt}`,`background ${dt}`,`padding ${We} ${Oe}`].join(","),[`> ${Rt}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Rt}-sub${Rt}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Rt}-submenu > ${Rt}-submenu-title`]:rn,[`& ${Rt}-item-group-title`]:{paddingInlineStart:Ce}},[`${Rt}-item`]:rn}},{[`${Rt}-inline-collapsed`]:{width:qt,[`&${Rt}-root`]:{[`${Rt}-item, ${Rt}-submenu ${Rt}-submenu-title`]:{[`> ${Rt}-inline-collapsed-noicon`]:{fontSize:$e,textAlign:"center"}}},[`> ${Rt}-item,
|
|
|
> ${Rt}-item-group > ${Rt}-item-group-list > ${Rt}-item,
|
|
|
> ${Rt}-item-group > ${Rt}-item-group-list > ${Rt}-submenu > ${Rt}-submenu-title,
|
|
|
> ${Rt}-submenu > ${Rt}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${$e/2}px - ${Ne}px)`,textOverflow:"clip",[`
|
|
|
${Rt}-submenu-arrow,
|
|
|
${Rt}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${Rt}-item-icon, ${St}`]:{margin:0,fontSize:yn,lineHeight:`${yt}px`,"+ span":{display:"inline-block",opacity:0}}},[`${Rt}-item-icon, ${St}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Rt}-item-icon, ${St}`]:{display:"none"},"a, a:hover":{color:nt}},[`${Rt}-item-group-title`]:Object.assign(Object.assign({},Ye.vS),{paddingInline:Je})}}]};const Ht=pt=>{const{componentCls:Rt,motionDurationSlow:St,motionDurationMid:yt,motionEaseInOut:nt,motionEaseOut:He,iconCls:Ie,iconSize:We,iconMarginInlineEnd:Oe}=pt;return{[`${Rt}-item, ${Rt}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${St}`,`background ${St}`,`padding ${St} ${nt}`].join(","),[`${Rt}-item-icon, ${Ie}`]:{minWidth:We,fontSize:We,transition:[`font-size ${yt} ${He}`,`margin ${St} ${nt}`,`color ${St}`].join(","),"+ span":{marginInlineStart:Oe,opacity:1,transition:[`opacity ${St} ${nt}`,`margin ${St}`,`color ${St}`].join(",")}},[`${Rt}-item-icon`]:Object.assign({},(0,Ye.Ro)()),[`&${Rt}-item-only-child`]:{[`> ${Ie}, > ${Rt}-item-icon`]:{marginInlineEnd:0}}},[`${Rt}-item-disabled, ${Rt}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${Rt}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},hn=pt=>{const{componentCls:Rt,motionDurationSlow:St,motionEaseInOut:yt,borderRadius:nt,menuArrowSize:He,menuArrowOffset:Ie}=pt;return{[`${Rt}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:pt.margin,width:He,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${St} ${yt}, opacity ${St}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:He*.6,height:He*.15,backgroundColor:"currentcolor",borderRadius:nt,transition:[`background ${St} ${yt}`,`transform ${St} ${yt}`,`top ${St} ${yt}`,`color ${St} ${yt}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${Ie})`},"&::after":{transform:`rotate(-45deg) translateY(${Ie})`}}}}},Qt=pt=>{const{antCls:Rt,componentCls:St,fontSize:yt,motionDurationSlow:nt,motionDurationMid:He,motionEaseInOut:Ie,paddingXS:We,padding:Oe,colorSplit:Ce,lineWidth:Ne,zIndexPopup:$e,borderRadiusLG:dt,subMenuItemBorderRadius:Je,menuArrowSize:Tt,menuArrowOffset:qt,lineType:yn,menuPanelMaskInset:rn,groupTitleLineHeight:pn,groupTitleFontSize:Fn}=pt;return[{"":{[`${St}`]:Object.assign(Object.assign({},(0,Ye.dF)()),{"&-hidden":{display:"none"}})},[`${St}-submenu-hidden`]:{display:"none"}},{[St]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Ye.Wf)(pt)),(0,Ye.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:yt,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",[`${St}-item`]:{flex:"none"}},[`${St}-item, ${St}-submenu, ${St}-submenu-title`]:{borderRadius:pt.itemBorderRadius},[`${St}-item-group-title`]:{padding:`${We}px ${Oe}px`,fontSize:Fn,lineHeight:pn,transition:`all ${nt}`},[`&-horizontal ${St}-submenu`]:{transition:[`border-color ${nt} ${Ie}`,`background ${nt} ${Ie}`].join(",")},[`${St}-submenu, ${St}-submenu-inline`]:{transition:[`border-color ${nt} ${Ie}`,`background ${nt} ${Ie}`,`padding ${He} ${Ie}`].join(",")},[`${St}-submenu ${St}-sub`]:{cursor:"initial",transition:[`background ${nt} ${Ie}`,`padding ${nt} ${Ie}`].join(",")},[`${St}-title-content`]:{transition:`color ${nt}`},[`${St}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${St}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:Ce,borderStyle:yn,borderWidth:0,borderTopWidth:Ne,marginBlock:Ne,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Ht(pt)),{[`${St}-item-group`]:{[`${St}-item-group-list`]:{margin:0,padding:0,[`${St}-item, ${St}-submenu-title`]:{paddingInline:`${yt*2}px ${Oe}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:$e,borderRadius:dt,boxShadow:"none",transformOrigin:"0 0",[`&${St}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${rn}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:rn},"\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},[`> ${St}`]:Object.assign(Object.assign(Object.assign({borderRadius:dt},Ht(pt)),hn(pt)),{[`${St}-item, ${St}-submenu > ${St}-submenu-title`]:{borderRadius:Je},[`${St}-submenu-title::after`]:{transition:`transform ${nt} ${Ie}`}})}}),hn(pt)),{[`&-inline-collapsed ${St}-submenu-arrow,
|
|
|
&-inline ${St}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${qt})`},"&::after":{transform:`rotate(45deg) translateX(-${qt})`}},[`${St}-submenu-open${St}-submenu-inline > ${St}-submenu-title > ${St}-submenu-arrow`]:{transform:`translateY(-${Tt*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${qt})`},"&::before":{transform:`rotate(45deg) translateX(${qt})`}}})},{[`${Rt}-layout-header`]:{[St]:{lineHeight:"inherit"}}}]};var bn=(pt,Rt)=>(0,Pt.Z)("Menu",yt=>{if(Rt===!1)return[];const{colorBgElevated:nt,colorPrimary:He,colorTextLightSolid:Ie,controlHeightLG:We,fontSize:Oe,darkItemColor:Ce,darkDangerItemColor:Ne,darkItemBg:$e,darkSubMenuItemBg:dt,darkItemSelectedColor:Je,darkItemSelectedBg:Tt,darkDangerItemSelectedBg:qt,darkItemHoverBg:yn,darkGroupTitleColor:rn,darkItemHoverColor:pn,darkItemDisabledColor:Fn,darkDangerItemHoverColor:kn,darkDangerItemSelectedColor:oi,darkDangerItemActiveBg:ri}=yt,Ti=Oe/7*5,mi=(0,tt.TS)(yt,{menuArrowSize:Ti,menuHorizontalHeight:We*1.15,menuArrowOffset:`${Ti*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:nt}),Qi=(0,tt.TS)(mi,{itemColor:Ce,itemHoverColor:pn,groupTitleColor:rn,itemSelectedColor:Je,itemBg:$e,popupBg:$e,subMenuItemBg:dt,itemActiveBg:"transparent",itemSelectedBg:Tt,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:yn,itemDisabledColor:Fn,dangerItemColor:Ne,dangerItemHoverColor:kn,dangerItemSelectedColor:oi,dangerItemActiveBg:ri,dangerItemSelectedBg:qt,menuSubMenuBg:dt,horizontalItemSelectedColor:Ie,horizontalItemSelectedBg:He});return[Qt(mi),st(mi),Bt(mi),mt(mi,"light"),mt(Qi,"dark"),lt(mi),(0,Ge.Z)(mi),(0,ft.oN)(mi,"slide-up"),(0,ft.oN)(mi,"slide-down"),(0,at._y)(mi,"zoom-big")]},yt=>{const{colorPrimary:nt,colorError:He,colorTextDisabled:Ie,colorErrorBg:We,colorText:Oe,colorTextDescription:Ce,colorBgContainer:Ne,colorFillAlter:$e,colorFillContent:dt,lineWidth:Je,lineWidthBold:Tt,controlItemBgActive:qt,colorBgTextHover:yn,controlHeightLG:rn,lineHeight:pn,colorBgElevated:Fn,marginXXS:kn,padding:oi,fontSize:ri,controlHeightSM:Ti,fontSizeLG:mi,colorTextLightSolid:Qi,colorErrorHover:ir}=yt,fr=new Ze.C(Qi).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:yt.zIndexPopupBase+50,radiusItem:yt.borderRadiusLG,itemBorderRadius:yt.borderRadiusLG,radiusSubMenuItem:yt.borderRadiusSM,subMenuItemBorderRadius:yt.borderRadiusSM,colorItemText:Oe,itemColor:Oe,colorItemTextHover:Oe,itemHoverColor:Oe,colorItemTextHoverHorizontal:nt,horizontalItemHoverColor:nt,colorGroupTitle:Ce,groupTitleColor:Ce,colorItemTextSelected:nt,itemSelectedColor:nt,colorItemTextSelectedHorizontal:nt,horizontalItemSelectedColor:nt,colorItemBg:Ne,itemBg:Ne,colorItemBgHover:yn,itemHoverBg:yn,colorItemBgActive:dt,itemActiveBg:qt,colorSubItemBg:$e,subMenuItemBg:$e,colorItemBgSelected:qt,itemSelectedBg:qt,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:Tt,activeBarHeight:Tt,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:yt.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:rn,groupTitleLineHeight:pn,collapsedWidth:rn*2,popupBg:Fn,itemMarginBlock:kn,itemPaddingInline:oi,horizontalLineHeight:`${rn*1.15}px`,iconSize:ri,iconMarginInlineEnd:Ti-ri,collapsedIconSize:mi,groupTitleFontSize:ri,darkItemDisabledColor:new Ze.C(Qi).setAlpha(.25).toRgbString(),darkItemColor:fr,darkDangerItemColor:He,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:Qi,darkItemSelectedBg:nt,darkDangerItemSelectedBg:He,darkItemHoverBg:"transparent",darkGroupTitleColor:fr,darkItemHoverColor:Qi,darkDangerItemHoverColor:ir,darkDangerItemSelectedColor:Qi,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,Rt){var St={};for(var yt in pt)Object.prototype.hasOwnProperty.call(pt,yt)&&Rt.indexOf(yt)<0&&(St[yt]=pt[yt]);if(pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,yt=Object.getOwnPropertySymbols(pt);nt<yt.length;nt++)Rt.indexOf(yt[nt])<0&&Object.prototype.propertyIsEnumerable.call(pt,yt[nt])&&(St[yt[nt]]=pt[yt[nt]]);return St},Jt=(0,me.forwardRef)((pt,Rt)=>{var St,yt;const nt=me.useContext(be.Z),He=nt||{},{getPrefixCls:Ie,getPopupContainer:We,direction:Oe,menu:Ce}=me.useContext(Le.E_),Ne=Ie(),{prefixCls:$e,className:dt,style:Je,theme:Tt="light",expandIcon:qt,_internalDisableMenuItemTitleTooltip:yn,inlineCollapsed:rn,siderCollapsed:pn,items:Fn,children:kn,rootClassName:oi,mode:ri,selectable:Ti,onClick:mi,overflowedIndicatorPopupClassName:Qi}=pt,ir=Wt(pt,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),fr=(0,le.Z)(ir,["collapsedWidth"]),er=ze(Fn)||kn;(St=He.validator)===null||St===void 0||St.call(He,{mode:ri});const Mr=(0,ye.useEvent)(function(){var eo;mi==null||mi.apply(void 0,arguments),(eo=He.onClick)===null||eo===void 0||eo.call(He)}),qr=He.mode||ri,di=Ti!=null?Ti:He.selectable,xr=me.useMemo(()=>pn!==void 0?pn:rn,[rn,pn]),zi={horizontal:{motionName:`${Ne}-slide-up`},inline:(0,we.Z)(Ne),other:{motionName:`${Ne}-zoom-big`}},rt=Ie("menu",$e||He.prefixCls),[zr,hr]=bn(rt,!nt),vo=Pe()(`${rt}-${Tt}`,Ce==null?void 0:Ce.className,dt);let co;if(typeof qt=="function")co=qt;else if(qt===null||qt===!1)co=null;else if(He.expandIcon===null||He.expandIcon===!1)co=null;else{const eo=qt!=null?qt:He.expandIcon;co=(0,de.Tm)(eo,{className:Pe()(`${rt}-submenu-expand-icon`,(0,de.l$)(eo)?(yt=eo.props)===null||yt===void 0?void 0:yt.className:"")})}const yo=me.useMemo(()=>({prefixCls:rt,inlineCollapsed:xr||!1,direction:Oe,firstLevel:!0,theme:Tt,mode:qr,disableMenuItemTitleTooltip:yn}),[rt,xr,Oe,yn,Tt]);return zr(me.createElement(be.Z.Provider,{value:null},me.createElement(z.Provider,{value:yo},me.createElement(Me.ZP,Object.assign({getPopupContainer:We,overflowedIndicator:me.createElement(ue.Z,null),overflowedIndicatorPopupClassName:Pe()(rt,`${rt}-${Tt}`,Qi),mode:qr,selectable:di,onClick:Mr},fr,{inlineCollapsed:xr,style:Object.assign(Object.assign({},Ce==null?void 0:Ce.style),Je),className:vo,prefixCls:rt,direction:Oe,defaultMotions:zi,expandIcon:co,ref:Rt,rootClassName:Pe()(oi,hr)}),er))))});const dn=(0,me.forwardRef)((pt,Rt)=>{const St=(0,me.useRef)(null),yt=me.useContext(Be.D);return(0,me.useImperativeHandle)(Rt,()=>({menu:St.current,focus:nt=>{var He;(He=St.current)===null||He===void 0||He.focus(nt)}})),me.createElement(Jt,Object.assign({ref:St},pt,yt))});dn.Item=oe,dn.SubMenu=se,dn.Divider=xe,dn.ItemGroup=Me.BW;var Lt=dn},25700:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return He}});var Me=Ee(5891),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,Pe=Ee(88853),Le=function(We,Oe){return me.createElement(Pe.Z,(0,Me.Z)({},We,{ref:Oe,icon:ke}))},he=me.forwardRef(Le),Se=he,xe=Ee(93343),ge=Ee(16537),le=Ee(53878),ve=Ee(92310),de=Ee.n(ve),ce=Ee(80962),z=Ee(57259),ee=Ee(79545),oe=Ee(68550),ie=Ee(17928),se=Ee(7711),ue=Ee(36994),ye={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},we=ye,be=Ee(91735),Ae=function(Ie){(0,ie.Z)(Oe,Ie);var We=(0,se.Z)(Oe);function Oe(){var Ce;(0,ee.Z)(this,Oe);for(var Ne=arguments.length,$e=new Array(Ne),dt=0;dt<Ne;dt++)$e[dt]=arguments[dt];return Ce=We.call.apply(We,[this].concat($e)),Ce.state={goInputText:""},Ce.getValidValue=function(){var Je=Ce.state.goInputText;return!Je||Number.isNaN(Je)?void 0:Number(Je)},Ce.buildOptionText=function(Je){return"".concat(Je," ").concat(Ce.props.locale.items_per_page)},Ce.changeSize=function(Je){Ce.props.changeSize(Number(Je))},Ce.handleChange=function(Je){Ce.setState({goInputText:Je.target.value})},Ce.handleBlur=function(Je){var Tt=Ce.props,qt=Tt.goButton,yn=Tt.quickGo,rn=Tt.rootPrefixCls,pn=Ce.state.goInputText;qt||pn===""||(Ce.setState({goInputText:""}),!(Je.relatedTarget&&(Je.relatedTarget.className.indexOf("".concat(rn,"-item-link"))>=0||Je.relatedTarget.className.indexOf("".concat(rn,"-item"))>=0))&&yn(Ce.getValidValue()))},Ce.go=function(Je){var Tt=Ce.state.goInputText;Tt!==""&&(Je.keyCode===we.ENTER||Je.type==="click")&&(Ce.setState({goInputText:""}),Ce.props.quickGo(Ce.getValidValue()))},Ce}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,Tt){var qt=Number.isNaN(Number(Je))?0:Number(Je),yn=Number.isNaN(Number(Tt))?0:Number(Tt);return qt-yn})}},{key:"render",value:function(){var Ne=this,$e=this.props,dt=$e.pageSize,Je=$e.locale,Tt=$e.rootPrefixCls,qt=$e.changeSize,yn=$e.quickGo,rn=$e.goButton,pn=$e.selectComponentClass,Fn=$e.buildOptionText,kn=$e.selectPrefixCls,oi=$e.disabled,ri=this.state.goInputText,Ti="".concat(Tt,"-options"),mi=pn,Qi=null,ir=null,fr=null;if(!qt&&!yn)return null;var er=this.getPageSizeOptions();if(qt&&mi){var Mr=er.map(function(qr,di){return me.createElement(mi.Option,{key:di,value:qr.toString()},(Fn||Ne.buildOptionText)(qr))});Qi=me.createElement(mi,{disabled:oi,prefixCls:kn,showSearch:!1,className:"".concat(Ti,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(dt||er[0]).toString(),onChange:this.changeSize,getPopupContainer:function(di){return di.parentNode},"aria-label":Je.page_size,defaultOpen:!1},Mr)}return yn&&(rn&&(fr=typeof rn=="boolean"?me.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:oi,className:"".concat(Ti,"-quick-jumper-button")},Je.jump_to_confirm):me.createElement("span",{onClick:this.go,onKeyUp:this.go},rn)),ir=me.createElement("div",{className:"".concat(Ti,"-quick-jumper")},Je.jump_to,me.createElement("input",{disabled:oi,type:"text",value:ri,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":Je.page}),Je.page,fr)),me.createElement("li",{className:"".concat(Ti)},Qi,ir)}}]),Oe}(me.Component);Ae.defaultProps={pageSizeOptions:["10","20","50","100"]};var De=Ae,ze=function(We){var Oe,Ce=We.rootPrefixCls,Ne=We.page,$e=We.active,dt=We.className,Je=We.showTitle,Tt=We.onClick,qt=We.onKeyPress,yn=We.itemRender,rn="".concat(Ce,"-item"),pn=de()(rn,"".concat(rn,"-").concat(Ne),(Oe={},(0,ce.Z)(Oe,"".concat(rn,"-active"),$e),(0,ce.Z)(Oe,"".concat(rn,"-disabled"),!Ne),(0,ce.Z)(Oe,We.className,dt),Oe)),Fn=function(){Tt(Ne)},kn=function(Ti){qt(Ti,Tt,Ne)},oi=yn(Ne,"page",me.createElement("a",{rel:"nofollow"},Ne));return oi?me.createElement("li",{title:Je?Ne.toString():null,className:pn,onClick:Fn,onKeyPress:kn,tabIndex:0},oi):null},Ze=ze;function Ye(){}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,Ce){return Ce};function at(Ie,We,Oe){var Ce=typeof Ie=="undefined"?We.pageSize:Ie;return Math.floor((Oe.total-1)/Ce)+1}var Pt=function(Ie){(0,ie.Z)(Oe,Ie);var We=(0,se.Z)(Oe);function Oe(Ce){var Ne;(0,ee.Z)(this,Oe),Ne=We.call(this,Ce),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(qt,yn){var rn=Ne.props.prefixCls,pn=qt||me.createElement("button",{type:"button","aria-label":yn,className:"".concat(rn,"-item-link")});return typeof qt=="function"&&(pn=me.createElement(qt,(0,z.Z)({},Ne.props))),pn},Ne.isValid=function(qt){var yn=Ne.props.total;return Ge(qt)&&qt!==Ne.state.current&&Ge(yn)&&yn>0},Ne.shouldDisplayQuickJumper=function(){var qt=Ne.props,yn=qt.showQuickJumper,rn=qt.total,pn=Ne.state.pageSize;return rn<=pn?!1:yn},Ne.handleKeyDown=function(qt){(qt.keyCode===we.ARROW_UP||qt.keyCode===we.ARROW_DOWN)&&qt.preventDefault()},Ne.handleKeyUp=function(qt){var yn=Ne.getValidValue(qt),rn=Ne.state.currentInputValue;yn!==rn&&Ne.setState({currentInputValue:yn}),qt.keyCode===we.ENTER?Ne.handleChange(yn):qt.keyCode===we.ARROW_UP?Ne.handleChange(yn-1):qt.keyCode===we.ARROW_DOWN&&Ne.handleChange(yn+1)},Ne.handleBlur=function(qt){var yn=Ne.getValidValue(qt);Ne.handleChange(yn)},Ne.changePageSize=function(qt){var yn=Ne.state.current,rn=at(qt,Ne.state,Ne.props);yn=yn>rn?rn:yn,rn===0&&(yn=Ne.state.current),typeof qt=="number"&&("pageSize"in Ne.props||Ne.setState({pageSize:qt}),"current"in Ne.props||Ne.setState({current:yn,currentInputValue:yn})),Ne.props.onShowSizeChange(yn,qt),"onChange"in Ne.props&&Ne.props.onChange&&Ne.props.onChange(yn,qt)},Ne.handleChange=function(qt){var yn=Ne.props,rn=yn.disabled,pn=yn.onChange,Fn=Ne.state,kn=Fn.pageSize,oi=Fn.current,ri=Fn.currentInputValue;if(Ne.isValid(qt)&&!rn){var Ti=at(void 0,Ne.state,Ne.props),mi=qt;return qt>Ti?mi=Ti:qt<1&&(mi=1),"current"in Ne.props||Ne.setState({current:mi}),mi!==ri&&Ne.setState({currentInputValue:mi}),pn(mi,kn),mi}return oi},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(qt,yn){if(qt.key==="Enter"||qt.charCode===13){for(var rn=arguments.length,pn=new Array(rn>2?rn-2:0),Fn=2;Fn<rn;Fn++)pn[Fn-2]=arguments[Fn];yn.apply(void 0,pn)}},Ne.runIfEnterPrev=function(qt){Ne.runIfEnter(qt,Ne.prev)},Ne.runIfEnterNext=function(qt){Ne.runIfEnter(qt,Ne.next)},Ne.runIfEnterJumpPrev=function(qt){Ne.runIfEnter(qt,Ne.jumpPrev)},Ne.runIfEnterJumpNext=function(qt){Ne.runIfEnter(qt,Ne.jumpNext)},Ne.handleGoTO=function(qt){(qt.keyCode===we.ENTER||qt.type==="click")&&Ne.handleChange(Ne.state.currentInputValue)},Ne.renderPrev=function(qt){var yn=Ne.props,rn=yn.prevIcon,pn=yn.itemRender,Fn=pn(qt,"prev",Ne.getItemIcon(rn,"prev page")),kn=!Ne.hasPrev();return(0,me.isValidElement)(Fn)?(0,me.cloneElement)(Fn,{disabled:kn}):Fn},Ne.renderNext=function(qt){var yn=Ne.props,rn=yn.nextIcon,pn=yn.itemRender,Fn=pn(qt,"next",Ne.getItemIcon(rn,"next page")),kn=!Ne.hasNext();return(0,me.isValidElement)(Fn)?(0,me.cloneElement)(Fn,{disabled:kn}):Fn};var $e=Ce.onChange!==Ye,dt="current"in Ce;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=Ce.defaultCurrent;"current"in Ce&&(Je=Ce.current);var Tt=Ce.defaultPageSize;return"pageSize"in Ce&&(Tt=Ce.pageSize),Je=Math.min(Je,at(Tt,void 0,Ce)),Ne.state={current:Je,currentInputValue:Je,pageSize:Tt},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 Tt;Je==null||(Tt=Je.blur)===null||Tt===void 0||Tt.call(Je)}}}},{key:"getValidValue",value:function(Ne){var $e=Ne.target.value,dt=at(void 0,this.state,this.props),Je=this.state.currentInputValue,Tt;return $e===""?Tt=$e:Number.isNaN(Number($e))?Tt=Je:$e>=dt?Tt=dt:Tt=Number($e),Tt}},{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,Tt=Ne.disabled,qt=Ne.hideOnSinglePage,yn=Ne.total,rn=Ne.locale,pn=Ne.showQuickJumper,Fn=Ne.showLessItems,kn=Ne.showTitle,oi=Ne.showTotal,ri=Ne.simple,Ti=Ne.itemRender,mi=Ne.showPrevNextJumpers,Qi=Ne.jumpPrevIcon,ir=Ne.jumpNextIcon,fr=Ne.selectComponentClass,er=Ne.selectPrefixCls,Mr=Ne.pageSizeOptions,qr=this.state,di=qr.current,xr=qr.pageSize,zi=qr.currentInputValue;if(qt===!0&&yn<=xr)return null;var rt=at(void 0,this.state,this.props),zr=[],hr=null,vo=null,co=null,yo=null,eo=null,lo=pn&&pn.goButton,ln=Fn?1:2,Ke=di-1>0?di-1:0,qe=di+1<rt?di+1:rt,Xe=(0,ue.Z)(this.props,{aria:!0,data:!0}),wt=oi&&me.createElement("li",{className:"".concat($e,"-total-text")},oi(yn,[yn===0?0:(di-1)*xr+1,di*xr>yn?yn:di*xr]));if(ri){lo&&(typeof lo=="boolean"?eo=me.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},rn.jump_to_confirm):eo=me.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},lo),eo=me.createElement("li",{title:kn?"".concat(rn.jump_to).concat(di,"/").concat(rt):null,className:"".concat($e,"-simple-pager")},eo));var At=this.renderPrev(Ke);return me.createElement("ul",(0,Me.Z)({className:de()($e,"".concat($e,"-simple"),(0,ce.Z)({},"".concat($e,"-disabled"),Tt),dt),style:Je,ref:this.paginationNode},Xe),wt,At?me.createElement("li",{title:kn?rn.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()},At):null,me.createElement("li",{title:kn?"".concat(di,"/").concat(rt):null,className:"".concat($e,"-simple-pager")},me.createElement("input",{type:"text",value:zi,disabled:Tt,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),me.createElement("span",{className:"".concat($e,"-slash")},"/"),rt),me.createElement("li",{title:kn?rn.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)),eo)}if(rt<=3+ln*2){var Nt={locale:rn,rootPrefixCls:$e,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:kn,itemRender:Ti};rt||zr.push(me.createElement(Ze,(0,Me.Z)({},Nt,{key:"noPager",page:1,className:"".concat($e,"-item-disabled")})));for(var bt=1;bt<=rt;bt+=1){var gn=di===bt;zr.push(me.createElement(Ze,(0,Me.Z)({},Nt,{key:bt,page:bt,active:gn})))}}else{var En=Fn?rn.prev_3:rn.prev_5,Un=Fn?rn.next_3:rn.next_5,Pn=Ti(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Qi,"prev page")),zt=Ti(this.getJumpNextPage(),"jump-next",this.getItemIcon(ir,"next page"));mi&&(hr=Pn?me.createElement("li",{title:kn?En: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"),!!Qi))},Pn):null,vo=zt?me.createElement("li",{title:kn?Un: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))},zt):null),yo=me.createElement(Ze,{locale:rn,last:!0,rootPrefixCls:$e,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:rt,page:rt,active:!1,showTitle:kn,itemRender:Ti}),co=me.createElement(Ze,{locale:rn,rootPrefixCls:$e,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:kn,itemRender:Ti});var Yt=Math.max(1,di-ln),Cn=Math.min(di+ln,rt);di-1<=ln&&(Cn=1+ln*2),rt-di<=ln&&(Yt=rt-ln*2);for(var An=Yt;An<=Cn;An+=1){var Vt=di===An;zr.push(me.createElement(Ze,{locale:rn,rootPrefixCls:$e,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:An,page:An,active:Vt,showTitle:kn,itemRender:Ti}))}di-1>=ln*2&&di!==3&&(zr[0]=(0,me.cloneElement)(zr[0],{className:"".concat($e,"-item-after-jump-prev")}),zr.unshift(hr)),rt-di>=ln*2&&di!==rt-2&&(zr[zr.length-1]=(0,me.cloneElement)(zr[zr.length-1],{className:"".concat($e,"-item-before-jump-next")}),zr.push(vo)),Yt!==1&&zr.unshift(co),Cn!==rt&&zr.push(yo)}var an=!this.hasPrev()||!rt,Bn=!this.hasNext()||!rt,Nn=this.renderPrev(Ke),qn=this.renderNext(qe);return me.createElement("ul",(0,Me.Z)({className:de()($e,dt,(0,ce.Z)({},"".concat($e,"-disabled"),Tt)),style:Je,ref:this.paginationNode},Xe),wt,Nn?me.createElement("li",{title:kn?rn.prev_page:null,onClick:this.prev,tabIndex:an?null:0,onKeyPress:this.runIfEnterPrev,className:de()("".concat($e,"-prev"),(0,ce.Z)({},"".concat($e,"-disabled"),an)),"aria-disabled":an},Nn):null,zr,qn?me.createElement("li",{title:kn?rn.next_page:null,onClick:this.next,tabIndex:Bn?null:0,onKeyPress:this.runIfEnterNext,className:de()("".concat($e,"-next"),(0,ce.Z)({},"".concat($e,"-disabled"),Bn)),"aria-disabled":Bn},qn):null,me.createElement(De,{disabled:Tt,locale:rn,rootPrefixCls:$e,selectComponentClass:fr,selectPrefixCls:er,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:di,pageSize:xr,pageSizeOptions:Mr,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:lo}))}}],[{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,Tt=at(Ne.pageSize,$e,Ne);Je=Je>Tt?Tt:Je,"current"in Ne||(dt.current=Je,dt.currentInputValue=Je),dt.pageSize=Ne.pageSize}return dt}}]),Oe}(me.Component);Pt.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:Ye,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:Ye,locale:be.Z,style:{},itemRender:ft,totalBoundaryShowSizeChanger:50};var tt=Pt,vt=Ee(22075),st=Ee(36355),jt=Ee(19716),lt=Ee(8628),et=Ee(9763),ut=Ee(57809);const mt=Ie=>me.createElement(ut.default,Object.assign({},Ie,{showSearch:!0,size:"small"})),_t=Ie=>me.createElement(ut.default,Object.assign({},Ie,{showSearch:!0,size:"middle"}));mt.Option=ut.default.Option,_t.Option=ut.default.Option;var gt=Ee(9937),Bt=Ee(17313),Ht=Ee(83116),hn=Ee(37613);const Qt=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})}}}},Jt=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}}}}},dn=Ie=>{const{componentCls:We}=Ie;return{[We]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Bt.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"}}),Jt(Ie)),Kt(Ie)),Wt(Ie)),bn(Ie)),Qt(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"}}},Lt=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,Bt.Qy)(Ie)),[`${We}-jump-prev, ${We}-jump-next`]:{"&:focus-visible":Object.assign({[`${We}-item-link-icon`]:{opacity:1},[`${We}-item-ellipsis`]:{opacity:0}},(0,Bt.oN)(Ie))},[`${We}-prev, ${We}-next`]:{[`&:focus-visible ${We}-item-link`]:Object.assign({},(0,Bt.oN)(Ie))}}}};var Rt=(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[dn(We),pt(We),Ie.wireframe&&Lt(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})),St=function(Ie,We){var Oe={};for(var Ce in Ie)Object.prototype.hasOwnProperty.call(Ie,Ce)&&We.indexOf(Ce)<0&&(Oe[Ce]=Ie[Ce]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ne=0,Ce=Object.getOwnPropertySymbols(Ie);Ne<Ce.length;Ne++)We.indexOf(Ce[Ne])<0&&Object.prototype.propertyIsEnumerable.call(Ie,Ce[Ne])&&(Oe[Ce[Ne]]=Ie[Ce[Ne]]);return Oe},nt=Ie=>{const{prefixCls:We,selectPrefixCls:Oe,className:Ce,rootClassName:Ne,style:$e,size:dt,locale:Je,selectComponentClass:Tt,responsive:qt,showSizeChanger:yn}=Ie,rn=St(Ie,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:pn}=(0,lt.Z)(qt),{getPrefixCls:Fn,direction:kn,pagination:oi={}}=me.useContext(st.E_),ri=Fn("pagination",We),[Ti,mi]=Rt(ri),Qi=yn!=null?yn:oi.showSizeChanger,ir=me.useMemo(()=>{const rt=me.createElement("span",{className:`${ri}-item-ellipsis`},"\u2022\u2022\u2022"),zr=me.createElement("button",{className:`${ri}-item-link`,type:"button",tabIndex:-1},kn==="rtl"?me.createElement(le.Z,null):me.createElement(ge.Z,null)),hr=me.createElement("button",{className:`${ri}-item-link`,type:"button",tabIndex:-1},kn==="rtl"?me.createElement(ge.Z,null):me.createElement(le.Z,null)),vo=me.createElement("a",{className:`${ri}-item-link`},me.createElement("div",{className:`${ri}-item-container`},kn==="rtl"?me.createElement(xe.Z,{className:`${ri}-item-link-icon`}):me.createElement(Se,{className:`${ri}-item-link-icon`}),rt)),co=me.createElement("a",{className:`${ri}-item-link`},me.createElement("div",{className:`${ri}-item-container`},kn==="rtl"?me.createElement(Se,{className:`${ri}-item-link-icon`}):me.createElement(xe.Z,{className:`${ri}-item-link-icon`}),rt));return{prevIcon:zr,nextIcon:hr,jumpPrevIcon:vo,jumpNextIcon:co}},[kn,ri]),[fr]=(0,et.Z)("Pagination",vt.Z),er=Object.assign(Object.assign({},fr),Je),Mr=(0,jt.Z)(dt),qr=Mr==="small"||!!(pn&&!Mr&&qt),di=Fn("select",Oe),xr=de()({[`${ri}-mini`]:qr,[`${ri}-rtl`]:kn==="rtl"},oi==null?void 0:oi.className,Ce,Ne,mi),zi=Object.assign(Object.assign({},oi==null?void 0:oi.style),$e);return Ti(me.createElement(tt,Object.assign({},ir,rn,{style:zi,prefixCls:ri,selectPrefixCls:di,className:xr,selectComponentClass:Tt||(qr?mt:_t),locale:er,showSizeChanger:Qi})))},He=nt},57809:function(Ln,tn,Ee){"use strict";var Me=Ee(92310),me=Ee.n(Me),Be=Ee(77861),ke=Ee(64002),Pe=Ee(59301),Le=Ee(53487),he=Ee(62892),Se=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 Ye=0,Ze=Object.getOwnPropertySymbols(Ae);Ye<Ze.length;Ye++)De.indexOf(Ze[Ye])<0&&Object.prototype.propertyIsEnumerable.call(Ae,Ze[Ye])&&(ze[Ze[Ye]]=Ae[Ze[Ye]]);return ze};const ue="SECRET_COMBOBOX_MODE_DO_NOT_USE",ye=(Ae,De)=>{var ze,{prefixCls:Ze,bordered:Ye=!0,className:Ge,rootClassName:ft,getPopupContainer:at,popupClassName:Pt,dropdownClassName:tt,listHeight:vt=256,placement:st,listItemHeight:jt=24,size:lt,disabled:et,notFoundContent:ut,status:mt,builtinPlacements:_t,dropdownMatchSelectWidth:gt,popupMatchSelectWidth:Bt,direction:Ht,style:hn,allowClear:Qt}=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:Jt,direction:dn,virtual:Lt,popupMatchSelectWidth:pt,popupOverflow:Rt,select:St}=Pe.useContext(xe.E_),yt=Kt("select",Ze),nt=Kt(),He=Ht!=null?Ht:dn,{compactSize:Ie,compactItemClassnames:We}=(0,ce.ri)(yt,He),[Oe,Ce]=(0,z.Z)(yt),Ne=Pe.useMemo(()=>{const{mode:zi}=bn;if(zi!=="combobox")return zi===ue?"combobox":zi},[bn.mode]),$e=Ne==="multiple"||Ne==="tags",dt=(0,oe.Z)(bn.suffixIcon,bn.showArrow),Je=(ze=Bt!=null?Bt:gt)!==null&&ze!==void 0?ze:pt,{status:Tt,hasFeedback:qt,isFormItemInput:yn,feedbackIcon:rn}=Pe.useContext(de.aM),pn=(0,Se.F)(Tt,mt);let Fn;ut!==void 0?Fn=ut:Ne==="combobox"?Fn=null:Fn=(Jt==null?void 0:Jt("Select"))||Pe.createElement(le.Z,{componentName:"Select"});const{suffixIcon:kn,itemIcon:oi,removeIcon:ri,clearIcon:Ti}=(0,ie.Z)(Object.assign(Object.assign({},bn),{multiple:$e,hasFeedback:qt,feedbackIcon:rn,showSuffixIcon:dt,prefixCls:yt,showArrow:bn.showArrow,componentName:"Select"})),mi=Qt===!0?{clearIcon:Ti}:Qt,Qi=(0,ke.Z)(bn,["suffixIcon","itemIcon"]),ir=me()(Pt||tt,{[`${yt}-dropdown-${He}`]:He==="rtl"},ft,Ce),fr=(0,ve.Z)(zi=>{var rt;return(rt=lt!=null?lt:Ie)!==null&&rt!==void 0?rt:zi}),er=Pe.useContext(ge.Z),Mr=et!=null?et:er,qr=me()({[`${yt}-lg`]:fr==="large",[`${yt}-sm`]:fr==="small",[`${yt}-rtl`]:He==="rtl",[`${yt}-borderless`]:!Ye,[`${yt}-in-form-item`]:yn},(0,Se.Z)(yt,pn,qt),We,St==null?void 0:St.className,Ge,ft,Ce),di=Pe.useMemo(()=>st!==void 0?st:He==="rtl"?"bottomRight":"bottomLeft",[st,He]),xr=(0,ee.Z)(_t,Rt);return Oe(Pe.createElement(Be.ZP,Object.assign({ref:De,virtual:Lt,showSearch:St==null?void 0:St.showSearch},Qi,{style:Object.assign(Object.assign({},St==null?void 0:St.style),hn),dropdownMatchSelectWidth:Je,builtinPlacements:xr,transitionName:(0,he.m)(nt,"slide-up",bn.transitionName),listHeight:vt,listItemHeight:jt,mode:Ne,prefixCls:yt,placement:di,direction:He,suffixIcon:kn,menuItemSelectedIcon:oi,removeIcon:ri,allowClear:mi,notFoundContent:Fn,className:qr,getPopupContainer:at||Wt,dropdownClassName:ir,disabled:Mr})))},we=Pe.forwardRef(ye),be=(0,Le.Z)(we);we.SECRET_COMBOBOX_MODE_DO_NOT_USE=ue,we.Option=Be.Wx,we.OptGroup=Be.Xo,we._InternalPanelDoNotUseOrYouWillBeFired=be,tn.default=we},14154:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return we}});var Me=Ee(17313),me=Ee(74207),Be=Ee(37613),ke=Ee(83116),Pe=Ee(13826),Le=Ee(92899);const he=be=>{const{optionHeight:Ae,optionFontSize:De,optionLineHeight:ze,optionPadding:Ze}=be;return{position:"relative",display:"block",minHeight:Ae,padding:Ze,color:be.colorText,fontWeight:"normal",fontSize:De,lineHeight:ze,boxSizing:"border-box"}};var xe=be=>{const{antCls:Ae,componentCls:De}=be,ze=`${De}-item`,Ze=`&${Ae}-slide-up-enter${Ae}-slide-up-enter-active`,Ye=`&${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)(be)),{position:"absolute",top:-9999,zIndex:be.zIndexPopup,boxSizing:"border-box",padding:be.paddingXXS,overflow:"hidden",fontSize:be.fontSize,fontVariant:"initial",backgroundColor:be.colorBgElevated,borderRadius:be.borderRadiusLG,outline:"none",boxShadow:be.boxShadowSecondary,[`
|
|
|
${Ze}${ft}bottomLeft,
|
|
|
${Ye}${ft}bottomLeft
|
|
|
`]:{animationName:Pe.fJ},[`
|
|
|
${Ze}${ft}topLeft,
|
|
|
${Ye}${ft}topLeft,
|
|
|
${Ze}${ft}topRight,
|
|
|
${Ye}${ft}topRight
|
|
|
`]:{animationName:Pe.Qt},[`${Ge}${ft}bottomLeft`]:{animationName:Pe.Uw},[`
|
|
|
${Ge}${ft}topLeft,
|
|
|
${Ge}${ft}topRight
|
|
|
`]:{animationName:Pe.ly},"&-hidden":{display:"none"},[`${ze}`]:Object.assign(Object.assign({},he(be)),{cursor:"pointer",transition:`background ${be.motionDurationSlow} ease`,borderRadius:be.borderRadiusSM,"&-group":{color:be.colorTextDescription,fontSize:be.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:be.optionActiveBg},[`&-selected:not(${ze}-option-disabled)`]:{color:be.optionSelectedColor,fontWeight:be.optionSelectedFontWeight,backgroundColor:be.optionSelectedBg,[`${ze}-option-state`]:{color:be.colorPrimary}},"&-disabled":{[`&${ze}-option-selected`]:{backgroundColor:be.colorBgContainerDisabled},color:be.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:be.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,Pe.oN)(be,"slide-up"),(0,Pe.oN)(be,"slide-down"),(0,Le.Fm)(be,"move-up"),(0,Le.Fm)(be,"move-down")]};const ge=2,le=be=>{let{controlHeightSM:Ae,controlHeight:De,lineWidth:ze}=be;const Ze=(De-Ae)/2-ze,Ye=Math.ceil(Ze/2);return[Ze,Ye]};function ve(be,Ae){const{componentCls:De,iconCls:ze}=be,Ze=`${De}-selection-overflow`,Ye=be.multipleSelectItemHeight,[Ge]=le(be),ft=Ae?`${De}-${Ae}`:"";return{[`${De}-multiple${ft}`]:{fontSize:be.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:be.borderRadius,[`${De}-show-search&`]:{cursor:"text"},[`${De}-disabled&`]:{background:be.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${ge}px 0`,lineHeight:`${Ye}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${De}-show-arrow ${De}-selector,
|
|
|
&${De}-allow-clear ${De}-selector
|
|
|
`]:{paddingInlineEnd:be.fontSizeIcon+be.controlPaddingHorizontal},[`${De}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:Ye,marginTop:ge,marginBottom:ge,lineHeight:`${Ye-be.lineWidth*2}px`,background:be.multipleItemBg,border:`${be.lineWidth}px ${be.lineType} ${be.multipleItemBorderColor}`,borderRadius:be.borderRadiusSM,cursor:"default",transition:`font-size ${be.motionDurationSlow}, line-height ${be.motionDurationSlow}, height ${be.motionDurationSlow}`,userSelect:"none",marginInlineEnd:ge*2,paddingInlineStart:be.paddingXS,paddingInlineEnd:be.paddingXS/2,[`${De}-disabled&`]:{color:be.multipleItemColorDisabled,borderColor:be.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:be.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,Me.Ro)()),{display:"inline-flex",alignItems:"center",color:be.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${ze}`]:{verticalAlign:"-0.2em"},"&:hover":{color:be.colorIconHover}})},[`${Ze}-item + ${Ze}-item`]:{[`${De}-selection-search`]:{marginInlineStart:0}},[`${De}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:be.inputPaddingHorizontalBase-Ge,"\n &-input,\n &-mirror\n ":{height:Ye,fontFamily:be.fontFamily,lineHeight:`${Ye}px`,transition:`all ${be.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:be.inputPaddingHorizontalBase,insetInlineEnd:be.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${be.motionDurationSlow}`}}}}var ce=be=>{const{componentCls:Ae}=be,De=(0,Be.TS)(be,{controlHeight:be.controlHeightSM,multipleSelectItemHeight:be.controlHeightXS,borderRadius:be.borderRadiusSM,borderRadiusSM:be.borderRadiusXS}),ze=(0,Be.TS)(be,{fontSize:be.fontSizeLG,controlHeight:be.controlHeightLG,multipleSelectItemHeight:be.multipleItemHeightLG,borderRadius:be.borderRadiusLG,borderRadiusSM:be.borderRadius}),[,Ze]=le(be);return[ve(be),ve(De,"sm"),{[`${Ae}-multiple${Ae}-sm`]:{[`${Ae}-selection-placeholder`]:{insetInline:be.controlPaddingHorizontalSM-be.lineWidth},[`${Ae}-selection-search`]:{marginInlineStart:Ze}}},ve(ze,"lg")]};function z(be,Ae){const{componentCls:De,inputPaddingHorizontalBase:ze,borderRadius:Ze}=be,Ye=be.controlHeight-be.lineWidth*2,Ge=Math.ceil(be.fontSize*1.25),ft=Ae?`${De}-${Ae}`:"";return{[`${De}-single${ft}`]:{fontSize:be.fontSize,[`${De}-selector`]:Object.assign(Object.assign({},(0,Me.Wf)(be)),{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:`${Ye}px`,transition:`all ${be.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${Ye}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:be.colorTextPlaceholder},[`&:not(${De}-customize-input)`]:{[`${De}-selector`]:{width:"100%",height:be.controlHeight,padding:`0 ${ze}px`,[`${De}-selection-search-input`]:{height:Ye},"&:after":{lineHeight:`${Ye}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(be){const{componentCls:Ae}=be,De=be.controlPaddingHorizontalSM-be.lineWidth;return[z(be),z((0,Be.TS)(be,{controlHeight:be.controlHeightSM,borderRadius:be.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+be.fontSize*1.5},[`
|
|
|
&${Ae}-show-arrow ${Ae}-selection-item,
|
|
|
&${Ae}-show-arrow ${Ae}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:be.fontSize*1.5}}}},z((0,Be.TS)(be,{controlHeight:be.singleItemHeightLG,fontSize:be.fontSizeLG,borderRadius:be.borderRadiusLG}),"lg")]}const oe=be=>{const{componentCls:Ae,selectorBg:De}=be;return{position:"relative",backgroundColor:De,border:`${be.lineWidth}px ${be.lineType} ${be.colorBorder}`,transition:`all ${be.motionDurationMid} ${be.motionEaseInOut}`,input:{cursor:"pointer"},[`${Ae}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${Ae}-disabled&`]:{color:be.colorTextDisabled,background:be.colorBgContainerDisabled,cursor:"not-allowed",[`${Ae}-multiple&`]:{background:be.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},ie=function(be,Ae){let De=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:ze,borderHoverColor:Ze,outlineColor:Ye,antCls:Ge}=Ae,ft=De?{[`${ze}-selector`]:{borderColor:Ze}}:{};return{[be]:{[`&: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 ${Ye}`,outline:0},[`&:hover ${ze}-selector`]:{borderColor:Ze}})}}},se=be=>{const{componentCls:Ae}=be;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=be=>{const{componentCls:Ae,inputPaddingHorizontalBase:De,iconCls:ze}=be;return{[Ae]:Object.assign(Object.assign({},(0,Me.Wf)(be)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${Ae}-customize-input) ${Ae}-selector`]:Object.assign(Object.assign({},oe(be)),se(be)),[`${Ae}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},Me.vS),[`${Ae}-selection-placeholder`]:Object.assign(Object.assign({},Me.vS),{flex:1,color:be.colorTextPlaceholder,pointerEvents:"none"}),[`${Ae}-arrow`]:Object.assign(Object.assign({},(0,Me.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:De,height:be.fontSizeIcon,marginTop:-be.fontSizeIcon/2,color:be.colorTextQuaternary,fontSize:be.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[ze]:{verticalAlign:"top",transition:`transform ${be.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:be.fontSizeIcon,height:be.fontSizeIcon,marginTop:-be.fontSizeIcon/2,color:be.colorTextQuaternary,fontSize:be.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:be.clearBg,cursor:"pointer",opacity:0,transition:`color ${be.motionDurationMid} ease, opacity ${be.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:be.colorTextTertiary}},"&:hover":{[`${Ae}-clear`]:{opacity:1}}}),[`${Ae}-has-feedback`]:{[`${Ae}-clear`]:{insetInlineEnd:De+be.fontSize+be.paddingXS}}}},ye=be=>{const{componentCls:Ae}=be;return[{[Ae]:{[`&-borderless ${Ae}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${Ae}-in-form-item`]:{width:"100%"}}},ue(be),ee(be),ce(be),xe(be),{[`${Ae}-rtl`]:{direction:"rtl"}},ie(Ae,(0,Be.TS)(be,{borderHoverColor:be.colorPrimaryHover,outlineColor:be.controlOutline})),ie(`${Ae}-status-error`,(0,Be.TS)(be,{borderHoverColor:be.colorErrorHover,outlineColor:be.colorErrorOutline}),!0),ie(`${Ae}-status-warning`,(0,Be.TS)(be,{borderHoverColor:be.colorWarningHover,outlineColor:be.colorWarningOutline}),!0),(0,me.c)(be,{borderElCls:`${Ae}-selector`,focusElCls:`${Ae}-focused`})]};var we=(0,ke.Z)("Select",(be,Ae)=>{let{rootPrefixCls:De}=Ae;const ze=(0,Be.TS)(be,{rootPrefixCls:De,inputPaddingHorizontalBase:be.paddingSM-1,multipleSelectItemHeight:be.multipleItemHeight});return[ye(ze)]},be=>{const{fontSize:Ae,lineHeight:De,controlHeight:ze,controlPaddingHorizontal:Ze,zIndexPopupBase:Ye,colorText:Ge,fontWeightStrong:ft,controlItemBgActive:at,controlItemBgHover:Pt,colorBgContainer:tt,colorFillSecondary:vt,controlHeightLG:st,controlHeightSM:jt,colorBgContainerDisabled:lt,colorTextDisabled:et}=be;return{zIndexPopup:Ye+50,optionSelectedColor:Ge,optionSelectedFontWeight:ft,optionSelectedBg:at,optionActiveBg:Pt,optionPadding:`${(ze-Ae*De)/2}px ${Ze}px`,optionFontSize:Ae,optionLineHeight:De,optionHeight:ze,selectorBg:tt,clearBg:tt,singleItemHeightLG:st,multipleItemBg:vt,multipleItemBorderColor:"transparent",multipleItemHeight:jt,multipleItemHeightLG:ze,multipleSelectorBgDisabled:lt,multipleItemColorDisabled:et,multipleItemBorderColorDisabled:"transparent"}})},58582:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return me}});const Me=Be=>{const Pe={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:Be==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},Pe),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},Pe),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},Pe),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},Pe),{points:["br","tr"],offset:[0,-4]})}};function me(Be,ke){return Be||Me(ke)}},84443:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Me}});function Me(me,Be){return Be!==void 0?Be:me!==null}},66339:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Se}});var Me=Ee(10402),me=Ee(33130),Be=Ee(72119),ke=Ee(18290),Pe=Ee(50023),Le=Ee(21970),he=Ee(59301);function Se(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:ye}=xe;const we=le!=null?le:he.createElement(me.Z,null),be=Ze=>ge===null&&!ee&&!ue?null:he.createElement(he.Fragment,null,ie!==!1&&Ze,ee&&se);let Ae=null;if(ge!==void 0)Ae=be(ge);else if(ce)Ae=be(he.createElement(Pe.Z,{spin:!0}));else{const Ze=`${oe}-suffix`;Ae=Ye=>{let{open:Ge,showSearch:ft}=Ye;return be(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}}},78485:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Rt}});var Me=Ee(92310),me=Ee.n(Me),Be=Ee(59301),ke=Ee(36355),Pe=Ee(64002),he=St=>{const{prefixCls:yt,className:nt,style:He,size:Ie,shape:We}=St,Oe=me()({[`${yt}-lg`]:Ie==="large",[`${yt}-sm`]:Ie==="small"}),Ce=me()({[`${yt}-circle`]:We==="circle",[`${yt}-square`]:We==="square",[`${yt}-round`]:We==="round"}),Ne=Be.useMemo(()=>typeof Ie=="number"?{width:Ie,height:Ie,lineHeight:`${Ie}px`}:{},[Ie]);return Be.createElement("span",{className:me()(yt,Oe,Ce,nt),style:Object.assign(Object.assign({},Ne),He)})},Se=Ee(9792),xe=Ee(83116),ge=Ee(37613);const le=new Se.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),ve=St=>({height:St,lineHeight:`${St}px`}),de=St=>Object.assign({width:St},ve(St)),ce=St=>({background:St.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:le,animationDuration:St.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),z=St=>Object.assign({width:St*5,minWidth:St*5},ve(St)),ee=St=>{const{skeletonAvatarCls:yt,gradientFromColor:nt,controlHeight:He,controlHeightLG:Ie,controlHeightSM:We}=St;return{[`${yt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:nt},de(He)),[`${yt}${yt}-circle`]:{borderRadius:"50%"},[`${yt}${yt}-lg`]:Object.assign({},de(Ie)),[`${yt}${yt}-sm`]:Object.assign({},de(We))}},oe=St=>{const{controlHeight:yt,borderRadiusSM:nt,skeletonInputCls:He,controlHeightLG:Ie,controlHeightSM:We,gradientFromColor:Oe}=St;return{[`${He}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Oe,borderRadius:nt},z(yt)),[`${He}-lg`]:Object.assign({},z(Ie)),[`${He}-sm`]:Object.assign({},z(We))}},ie=St=>Object.assign({width:St},ve(St)),se=St=>{const{skeletonImageCls:yt,imageSizeBase:nt,gradientFromColor:He,borderRadiusSM:Ie}=St;return{[`${yt}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:He,borderRadius:Ie},ie(nt*2)),{[`${yt}-path`]:{fill:"#bfbfbf"},[`${yt}-svg`]:Object.assign(Object.assign({},ie(nt)),{maxWidth:nt*4,maxHeight:nt*4}),[`${yt}-svg${yt}-svg-circle`]:{borderRadius:"50%"}}),[`${yt}${yt}-circle`]:{borderRadius:"50%"}}},ue=(St,yt,nt)=>{const{skeletonButtonCls:He}=St;return{[`${nt}${He}-circle`]:{width:yt,minWidth:yt,borderRadius:"50%"},[`${nt}${He}-round`]:{borderRadius:yt}}},ye=St=>Object.assign({width:St*2,minWidth:St*2},ve(St)),we=St=>{const{borderRadiusSM:yt,skeletonButtonCls:nt,controlHeight:He,controlHeightLG:Ie,controlHeightSM:We,gradientFromColor:Oe}=St;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${nt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Oe,borderRadius:yt,width:He*2,minWidth:He*2},ye(He))},ue(St,He,nt)),{[`${nt}-lg`]:Object.assign({},ye(Ie))}),ue(St,Ie,`${nt}-lg`)),{[`${nt}-sm`]:Object.assign({},ye(We))}),ue(St,We,`${nt}-sm`))},be=St=>{const{componentCls:yt,skeletonAvatarCls:nt,skeletonTitleCls:He,skeletonParagraphCls:Ie,skeletonButtonCls:We,skeletonInputCls:Oe,skeletonImageCls:Ce,controlHeight:Ne,controlHeightLG:$e,controlHeightSM:dt,gradientFromColor:Je,padding:Tt,marginSM:qt,borderRadius:yn,titleHeight:rn,blockRadius:pn,paragraphLiHeight:Fn,controlHeightXS:kn,paragraphMarginTop:oi}=St;return{[`${yt}`]:{display:"table",width:"100%",[`${yt}-header`]:{display:"table-cell",paddingInlineEnd:Tt,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))},[`${yt}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${He}`]:{width:"100%",height:rn,background:Je,borderRadius:pn,[`+ ${Ie}`]:{marginBlockStart:dt}},[`${Ie}`]:{padding:0,"> li":{width:"100%",height:Fn,listStyle:"none",background:Je,borderRadius:pn,"+ li":{marginBlockStart:kn}}},[`${Ie}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${yt}-content`]:{[`${He}, ${Ie} > li`]:{borderRadius:yn}}},[`${yt}-with-avatar ${yt}-content`]:{[`${He}`]:{marginBlockStart:qt,[`+ ${Ie}`]:{marginBlockStart:oi}}},[`${yt}${yt}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},we(St)),ee(St)),oe(St)),se(St)),[`${yt}${yt}-block`]:{width:"100%",[`${We}`]:{width:"100%"},[`${Oe}`]:{width:"100%"}},[`${yt}${yt}-active`]:{[`
|
|
|
${He},
|
|
|
${Ie} > li,
|
|
|
${nt},
|
|
|
${We},
|
|
|
${Oe},
|
|
|
${Ce}
|
|
|
`]:Object.assign({},ce(St))}}};var Ae=(0,xe.Z)("Skeleton",St=>{const{componentCls:yt}=St,nt=(0,ge.TS)(St,{skeletonAvatarCls:`${yt}-avatar`,skeletonTitleCls:`${yt}-title`,skeletonParagraphCls:`${yt}-paragraph`,skeletonButtonCls:`${yt}-button`,skeletonInputCls:`${yt}-input`,skeletonImageCls:`${yt}-image`,imageSizeBase:St.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${St.gradientFromColor} 25%, ${St.gradientToColor} 37%, ${St.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[be(nt)]},St=>{const{colorFillContent:yt,colorFill:nt}=St,He=yt,Ie=nt;return{color:He,colorGradientEnd:Ie,gradientFromColor:He,gradientToColor:Ie,titleHeight:St.controlHeight/2,blockRadius:St.borderRadiusSM,paragraphMarginTop:St.marginLG+St.marginXXS,paragraphLiHeight:St.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),ze=St=>{const{prefixCls:yt,className:nt,rootClassName:He,active:Ie,shape:We="circle",size:Oe="default"}=St,{getPrefixCls:Ce}=Be.useContext(ke.E_),Ne=Ce("skeleton",yt),[$e,dt]=Ae(Ne),Je=(0,Pe.Z)(St,["prefixCls","className"]),Tt=me()(Ne,`${Ne}-element`,{[`${Ne}-active`]:Ie},nt,He,dt);return $e(Be.createElement("div",{className:Tt},Be.createElement(he,Object.assign({prefixCls:`${Ne}-avatar`,shape:We,size:Oe},Je))))},Ye=St=>{const{prefixCls:yt,className:nt,rootClassName:He,active:Ie,block:We=!1,size:Oe="default"}=St,{getPrefixCls:Ce}=Be.useContext(ke.E_),Ne=Ce("skeleton",yt),[$e,dt]=Ae(Ne),Je=(0,Pe.Z)(St,["prefixCls"]),Tt=me()(Ne,`${Ne}-element`,{[`${Ne}-active`]:Ie,[`${Ne}-block`]:We},nt,He,dt);return $e(Be.createElement("div",{className:Tt},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=St=>{const{prefixCls:yt,className:nt,rootClassName:He,style:Ie,active:We}=St,{getPrefixCls:Oe}=Be.useContext(ke.E_),Ce=Oe("skeleton",yt),[Ne,$e]=Ae(Ce),dt=me()(Ce,`${Ce}-element`,{[`${Ce}-active`]:We},nt,He,$e);return Ne(Be.createElement("div",{className:dt},Be.createElement("div",{className:me()(`${Ce}-image`,nt),style:Ie},Be.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${Ce}-image-svg`},Be.createElement("path",{d:Ge,className:`${Ce}-image-path`})))))},tt=St=>{const{prefixCls:yt,className:nt,rootClassName:He,active:Ie,block:We,size:Oe="default"}=St,{getPrefixCls:Ce}=Be.useContext(ke.E_),Ne=Ce("skeleton",yt),[$e,dt]=Ae(Ne),Je=(0,Pe.Z)(St,["prefixCls"]),Tt=me()(Ne,`${Ne}-element`,{[`${Ne}-active`]:Ie,[`${Ne}-block`]:We},nt,He,dt);return $e(Be.createElement("div",{className:Tt},Be.createElement(he,Object.assign({prefixCls:`${Ne}-input`,size:Oe},Je))))},vt=Ee(5891),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"},jt=st,lt=Ee(88853),et=function(yt,nt){return Be.createElement(lt.Z,(0,vt.Z)({},yt,{ref:nt,icon:jt}))},ut=Be.forwardRef(et),mt=ut,gt=St=>{const{prefixCls:yt,className:nt,rootClassName:He,style:Ie,active:We,children:Oe}=St,{getPrefixCls:Ce}=Be.useContext(ke.E_),Ne=Ce("skeleton",yt),[$e,dt]=Ae(Ne),Je=me()(Ne,`${Ne}-element`,{[`${Ne}-active`]:We},dt,nt,He),Tt=Oe!=null?Oe:Be.createElement(mt,null);return $e(Be.createElement("div",{className:Je},Be.createElement("div",{className:me()(`${Ne}-image`,nt),style:Ie},Tt)))},Bt=Ee(26390),hn=St=>{const yt=Ce=>{const{width:Ne,rows:$e=2}=St;if(Array.isArray(Ne))return Ne[Ce];if($e-1===Ce)return Ne},{prefixCls:nt,className:He,style:Ie,rows:We}=St,Oe=(0,Bt.Z)(Array(We)).map((Ce,Ne)=>Be.createElement("li",{key:Ne,style:{width:yt(Ne)}}));return Be.createElement("ul",{className:me()(nt,He),style:Ie},Oe)},bn=St=>{let{prefixCls:yt,className:nt,width:He,style:Ie}=St;return Be.createElement("h3",{className:me()(yt,nt),style:Object.assign({width:He},Ie)})};function Wt(St){return St&&typeof St=="object"?St:{}}function Kt(St,yt){return St&&!yt?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function Jt(St,yt){return!St&&yt?{width:"38%"}:St&&yt?{width:"50%"}:{}}function dn(St,yt){const nt={};return(!St||!yt)&&(nt.width="61%"),!St&&yt?nt.rows=3:nt.rows=2,nt}const Lt=St=>{const{prefixCls:yt,loading:nt,className:He,rootClassName:Ie,style:We,children:Oe,avatar:Ce=!1,title:Ne=!0,paragraph:$e=!0,active:dt,round:Je}=St,{getPrefixCls:Tt,direction:qt,skeleton:yn}=Be.useContext(ke.E_),rn=Tt("skeleton",yt),[pn,Fn]=Ae(rn);if(nt||!("loading"in St)){const kn=!!Ce,oi=!!Ne,ri=!!$e;let Ti;if(kn){const ir=Object.assign(Object.assign({prefixCls:`${rn}-avatar`},Kt(oi,ri)),Wt(Ce));Ti=Be.createElement("div",{className:`${rn}-header`},Be.createElement(he,Object.assign({},ir)))}let mi;if(oi||ri){let ir;if(oi){const er=Object.assign(Object.assign({prefixCls:`${rn}-title`},Jt(kn,ri)),Wt(Ne));ir=Be.createElement(bn,Object.assign({},er))}let fr;if(ri){const er=Object.assign(Object.assign({prefixCls:`${rn}-paragraph`},dn(kn,oi)),Wt($e));fr=Be.createElement(hn,Object.assign({},er))}mi=Be.createElement("div",{className:`${rn}-content`},ir,fr)}const Qi=me()(rn,{[`${rn}-with-avatar`]:kn,[`${rn}-active`]:dt,[`${rn}-rtl`]:qt==="rtl",[`${rn}-round`]:Je},yn==null?void 0:yn.className,He,Ie,Fn);return pn(Be.createElement("div",{className:Qi,style:Object.assign(Object.assign({},yn==null?void 0:yn.style),We)},Ti,mi))}return typeof Oe!="undefined"?Oe:null};Lt.Button=Ye,Lt.Avatar=ze,Lt.Input=tt,Lt.Image=at,Lt.Node=gt;var pt=Lt,Rt=pt},81327:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return oe}});var Me=Ee(59301),me=Ee(92310),Be=Ee.n(me),ke=Ee(38298),Pe=Ee(36355),Le=Ee(33234);const he=Me.createContext({latestIndex:0}),Se=he.Provider;var ge=ie=>{let{className:se,index:ue,children:ye,split:we,style:be}=ie;const{latestIndex:Ae}=Me.useContext(he);return ye==null?null:Me.createElement(Me.Fragment,null,Me.createElement("div",{className:se,style:be},ye),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 ye in ie)Object.prototype.hasOwnProperty.call(ie,ye)&&se.indexOf(ye)<0&&(ue[ye]=ie[ye]);if(ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,ye=Object.getOwnPropertySymbols(ie);we<ye.length;we++)se.indexOf(ye[we])<0&&Object.prototype.propertyIsEnumerable.call(ie,ye[we])&&(ue[ye[we]]=ie[ye[we]]);return ue};const ee=Me.forwardRef((ie,se)=>{var ue,ye;const{getPrefixCls:we,space:be,direction:Ae}=Me.useContext(Pe.E_),{size:De=(be==null?void 0:be.size)||"small",align:ze,className:Ze,rootClassName:Ye,children:Ge,direction:ft="horizontal",prefixCls:at,split:Pt,style:tt,wrap:vt=!1,classNames:st,styles:jt}=ie,lt=ce(ie,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[et,ut]=Array.isArray(De)?De:[De,De],mt=ve(ut),_t=ve(et),gt=de(ut),Bt=de(et),Ht=(0,ke.Z)(Ge,{keepEmpty:!0}),hn=ze===void 0&&ft==="horizontal"?"center":ze,Qt=we("space",at),[bn,Wt]=(0,le.Z)(Qt),Kt=Be()(Qt,be==null?void 0:be.className,Wt,`${Qt}-${ft}`,{[`${Qt}-rtl`]:Ae==="rtl",[`${Qt}-align-${hn}`]:hn,[`${Qt}-gap-row-${ut}`]:mt,[`${Qt}-gap-col-${et}`]:_t},Ze,Ye),Jt=Be()(`${Qt}-item`,(ue=st==null?void 0:st.item)!==null&&ue!==void 0?ue:(ye=be==null?void 0:be.classNames)===null||ye===void 0?void 0:ye.item);let dn=0;const Lt=Ht.map((St,yt)=>{var nt,He;St!=null&&(dn=yt);const Ie=St&&St.key||`${Jt}-${yt}`;return Me.createElement(ge,{className:Jt,key:Ie,index:yt,split:Pt,style:(nt=jt==null?void 0:jt.item)!==null&&nt!==void 0?nt:(He=be==null?void 0:be.styles)===null||He===void 0?void 0:He.item},St)}),pt=Me.useMemo(()=>({latestIndex:dn}),[dn]);if(Ht.length===0)return null;const Rt={};return vt&&(Rt.flexWrap="wrap"),!_t&&Bt&&(Rt.columnGap=et),!mt&>&&(Rt.rowGap=ut),bn(Me.createElement("div",Object.assign({ref:se,className:Kt,style:Object.assign(Object.assign(Object.assign({},Rt),be==null?void 0:be.style),tt)},lt),Me.createElement(Se,{value:pt},Lt)))});ee.Compact=Le.ZP;var oe=ee},31797:function(Ln,tn,Ee){"use strict";Ee.d(tn,{default:function(){return Ae}});var Me=Ee(59301),me=Ee(56762),Be=Ee(92343),ke=Ee(92310),Pe=Ee.n(ke),Le=Ee(36355),he=Ee(78485),xe=De=>{const{value:ze,formatter:Ze,precision:Ye,decimalSeparator:Ge,groupSeparator:ft="",prefixCls:at}=De;let Pt;if(typeof Ze=="function")Pt=Ze(ze);else{const tt=String(ze),vt=tt.match(/^(-?)(\d*)(\.(\d+))?$/);if(!vt||tt==="-")Pt=tt;else{const st=vt[1];let jt=vt[2]||"0",lt=vt[4]||"";jt=jt.replace(/\B(?=(\d{3})+(?!\d))/g,ft),typeof Ye=="number"&&(lt=lt.padEnd(Ye,"0").slice(0,Ye>0?Ye:0)),lt&&(lt=`${Ge}${lt}`),Pt=[Me.createElement("span",{key:"int",className:`${at}-content-value-int`},st,jt),lt&&Me.createElement("span",{key:"decimal",className:`${at}-content-value-decimal`},lt)]}}return Me.createElement("span",{className:`${at}-content-value`},Pt)},ge=Ee(17313),le=Ee(83116),ve=Ee(37613);const de=De=>{const{componentCls:ze,marginXXS:Ze,padding:Ye,colorTextDescription:Ge,titleFontSize:ft,colorTextHeading:at,contentFontSize:Pt,fontFamily:tt}=De;return{[`${ze}`]:Object.assign(Object.assign({},(0,ge.Wf)(De)),{[`${ze}-title`]:{marginBottom:Ze,color:Ge,fontSize:ft},[`${ze}-skeleton`]:{paddingTop:Ye},[`${ze}-content`]:{color:at,fontSize:Pt,fontFamily:tt,[`${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:Ye,style:Ge,valueStyle:ft,value:at=0,title:Pt,valueRender:tt,prefix:vt,suffix:st,loading:jt=!1,onMouseEnter:lt,onMouseLeave:et,decimalSeparator:ut=".",groupSeparator:mt=","}=De,{getPrefixCls:_t,direction:gt,statistic:Bt}=Me.useContext(Le.E_),Ht=_t("statistic",ze),[hn,Qt]=ce(Ht),bn=Me.createElement(xe,Object.assign({decimalSeparator:ut,groupSeparator:mt,prefixCls:Ht},De,{value:at})),Wt=Pe()(Ht,{[`${Ht}-rtl`]:gt==="rtl"},Bt==null?void 0:Bt.className,Ze,Ye,Qt);return hn(Me.createElement("div",{className:Wt,style:Object.assign(Object.assign({},Bt==null?void 0:Bt.style),Ge),onMouseEnter:lt,onMouseLeave:et},Pt&&Me.createElement("div",{className:`${Ht}-title`},Pt),Me.createElement(he.Z,{paragraph:!1,loading:jt,className:`${Ht}-skeleton`},Me.createElement("div",{style:ft,className:`${Ht}-content`},vt&&Me.createElement("span",{className:`${Ht}-content-prefix`},vt),tt?tt(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 Ye=/\[[^\]]*]/g,Ge=(ze.match(Ye)||[]).map(tt=>tt.slice(1,-1)),ft=ze.replace(Ye,"[]"),at=oe.reduce((tt,vt)=>{let[st,jt]=vt;if(tt.includes(st)){const lt=Math.floor(Ze/jt);return Ze-=lt*jt,tt.replace(new RegExp(`${st}+`,"g"),et=>{const ut=et.length;return lt.toString().padStart(ut,"0")})}return tt},ft);let Pt=0;return at.replace(Ye,()=>{const tt=Ge[Pt];return Pt+=1,tt})}function se(De,ze){const{format:Ze=""}=ze,Ye=new Date(De).getTime(),Ge=Date.now(),ft=Math.max(Ye-Ge,0);return ie(ft,Ze)}const ue=1e3/30;function ye(De){return new Date(De).getTime()}const we=De=>{const{value:ze,format:Ze="HH:mm:ss",onChange:Ye,onFinish:Ge}=De,ft=(0,me.Z)(),at=Me.useRef(null),Pt=()=>{Ge==null||Ge(),at.current&&(clearInterval(at.current),at.current=null)},tt=()=>{const jt=ye(ze);jt>=Date.now()&&(at.current=setInterval(()=>{ft(),Ye==null||Ye(jt-Date.now()),jt<Date.now()&&Pt()},ue))};Me.useEffect(()=>(tt(),()=>{at.current&&(clearInterval(at.current),at.current=null)}),[ze]);const vt=(jt,lt)=>se(jt,Object.assign(Object.assign({},lt),{format:Ze})),st=jt=>(0,Be.Tm)(jt,{title:void 0});return Me.createElement(ee,Object.assign({},De,{valueRender:st,formatter:vt}))};var be=Me.memo(we);ee.Countdown=be;var Ae=ee},15969:function(Ln,tn,Ee){"use strict";Ee.d(tn,{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(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return ft}});var Me=Ee(50023),me=Ee(92310),Be=Ee.n(me),ke=Ee(5891),Pe=Ee(80962),Le=Ee(29043),he=Ee(19149),Se=Ee(59301),xe=Ee(35788),ge=Ee(85108),le=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],ve=Se.forwardRef(function(at,Pt){var tt,vt=at.prefixCls,st=vt===void 0?"rc-switch":vt,jt=at.className,lt=at.checked,et=at.defaultChecked,ut=at.disabled,mt=at.loadingIcon,_t=at.checkedChildren,gt=at.unCheckedChildren,Bt=at.onClick,Ht=at.onChange,hn=at.onKeyDown,Qt=(0,he.Z)(at,le),bn=(0,xe.Z)(!1,{value:lt,defaultValue:et}),Wt=(0,Le.Z)(bn,2),Kt=Wt[0],Jt=Wt[1];function dn(St,yt){var nt=Kt;return ut||(nt=St,Jt(nt),Ht==null||Ht(nt,yt)),nt}function Lt(St){St.which===ge.Z.LEFT?dn(!1,St):St.which===ge.Z.RIGHT&&dn(!0,St),hn==null||hn(St)}function pt(St){var yt=dn(!Kt,St);Bt==null||Bt(yt,St)}var Rt=Be()(st,jt,(tt={},(0,Pe.Z)(tt,"".concat(st,"-checked"),Kt),(0,Pe.Z)(tt,"".concat(st,"-disabled"),ut),tt));return Se.createElement("button",(0,ke.Z)({},Qt,{type:"button",role:"switch","aria-checked":Kt,disabled:ut,className:Rt,ref:Pt,onKeyDown:Lt,onClick:pt}),mt,Se.createElement("span",{className:"".concat(st,"-inner")},Se.createElement("span",{className:"".concat(st,"-inner-checked")},_t),Se.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),ye=Ee(37613);const we=at=>{const{componentCls:Pt,trackHeightSM:tt,trackPadding:vt,trackMinWidthSM:st,innerMinMarginSM:jt,innerMaxMarginSM:lt,handleSizeSM:et}=at,ut=`${Pt}-inner`;return{[Pt]:{[`&${Pt}-small`]:{minWidth:st,height:tt,lineHeight:`${tt}px`,[`${Pt}-inner`]:{paddingInlineStart:lt,paddingInlineEnd:jt,[`${ut}-checked`]:{marginInlineStart:`calc(-100% + ${et+vt*2}px - ${lt*2}px)`,marginInlineEnd:`calc(100% - ${et+vt*2}px + ${lt*2}px)`},[`${ut}-unchecked`]:{marginTop:-tt,marginInlineStart:0,marginInlineEnd:0}},[`${Pt}-handle`]:{width:et,height:et},[`${Pt}-loading-icon`]:{top:(et-at.switchLoadingIconSize)/2,fontSize:at.switchLoadingIconSize},[`&${Pt}-checked`]:{[`${Pt}-inner`]:{paddingInlineStart:jt,paddingInlineEnd:lt,[`${ut}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${ut}-unchecked`]:{marginInlineStart:`calc(100% - ${et+vt*2}px + ${lt*2}px)`,marginInlineEnd:`calc(-100% + ${et+vt*2}px - ${lt*2}px)`}},[`${Pt}-handle`]:{insetInlineStart:`calc(100% - ${et+vt}px)`}},[`&:not(${Pt}-disabled):active`]:{[`&:not(${Pt}-checked) ${ut}`]:{[`${ut}-unchecked`]:{marginInlineStart:at.marginXXS/2,marginInlineEnd:-at.marginXXS/2}},[`&${Pt}-checked ${ut}`]:{[`${ut}-checked`]:{marginInlineStart:-at.marginXXS/2,marginInlineEnd:at.marginXXS/2}}}}}}},be=at=>{const{componentCls:Pt,handleSize:tt}=at;return{[Pt]:{[`${Pt}-loading-icon${at.iconCls}`]:{position:"relative",top:(tt-at.fontSize)/2,color:at.switchLoadingIconColor,verticalAlign:"top"},[`&${Pt}-checked ${Pt}-loading-icon`]:{color:at.switchColor}}}},Ae=at=>{const{componentCls:Pt,motion:tt,trackPadding:vt,handleBg:st,handleShadow:jt,handleSize:lt}=at,et=`${Pt}-handle`;return{[Pt]:{[et]:{position:"absolute",top:vt,insetInlineStart:vt,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:jt,transition:`all ${at.switchDuration} ease-in-out`,content:'""'}},[`&${Pt}-checked ${et}`]:{insetInlineStart:`calc(100% - ${lt+vt}px)`},[`&:not(${Pt}-disabled):active`]:tt?{[`${et}::before`]:{insetInlineEnd:at.switchHandleActiveInset,insetInlineStart:0},[`&${Pt}-checked ${et}::before`]:{insetInlineEnd:0,insetInlineStart:at.switchHandleActiveInset}}:{}}}},De=at=>{const{componentCls:Pt,trackHeight:tt,trackPadding:vt,innerMinMargin:st,innerMaxMargin:jt,handleSize:lt}=at,et=`${Pt}-inner`;return{[Pt]:{[et]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:jt,paddingInlineEnd:st,transition:`padding-inline-start ${at.switchDuration} ease-in-out, padding-inline-end ${at.switchDuration} ease-in-out`,[`${et}-checked, ${et}-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"},[`${et}-checked`]:{marginInlineStart:`calc(-100% + ${lt+vt*2}px - ${jt*2}px)`,marginInlineEnd:`calc(100% - ${lt+vt*2}px + ${jt*2}px)`},[`${et}-unchecked`]:{marginTop:-tt,marginInlineStart:0,marginInlineEnd:0}},[`&${Pt}-checked ${et}`]:{paddingInlineStart:st,paddingInlineEnd:jt,[`${et}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${et}-unchecked`]:{marginInlineStart:`calc(100% - ${lt+vt*2}px + ${jt*2}px)`,marginInlineEnd:`calc(-100% + ${lt+vt*2}px - ${jt*2}px)`}},[`&:not(${Pt}-disabled):active`]:{[`&:not(${Pt}-checked) ${et}`]:{[`${et}-unchecked`]:{marginInlineStart:vt*2,marginInlineEnd:-vt*2}},[`&${Pt}-checked ${et}`]:{[`${et}-checked`]:{marginInlineStart:-vt*2,marginInlineEnd:vt*2}}}}}},ze=at=>{const{componentCls:Pt,trackHeight:tt,trackMinWidth:vt}=at;return{[Pt]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,se.Wf)(at)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:vt,height:tt,lineHeight:`${tt}px`,verticalAlign:"middle",background:at.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${at.motionDurationMid}`,userSelect:"none",[`&:hover:not(${Pt}-disabled)`]:{background:at.colorTextTertiary}}),(0,se.Qy)(at)),{[`&${Pt}-checked`]:{background:at.switchColor,[`&:hover:not(${Pt}-disabled)`]:{background:at.colorPrimaryHover}},[`&${Pt}-loading, &${Pt}-disabled`]:{cursor:"not-allowed",opacity:at.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${Pt}-rtl`]:{direction:"rtl"}})}};var Ze=(0,ue.Z)("Switch",at=>{const Pt=(0,ye.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(Pt),De(Pt),Ae(Pt),be(Pt),we(Pt)]},at=>{const{fontSize:Pt,lineHeight:tt,controlHeight:vt,colorWhite:st}=at,jt=Pt*tt,lt=vt/2,et=2,ut=jt-et*2,mt=lt-et*2;return{trackHeight:jt,trackHeightSM:lt,trackMinWidth:ut*2+et*4,trackMinWidthSM:mt*2+et*2,trackPadding:et,handleBg:st,handleSize:ut,handleSizeSM:mt,handleShadow:`0 2px 4px 0 ${new ie.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:ut/2,innerMaxMargin:ut+et+et*2,innerMinMarginSM:mt/2,innerMaxMarginSM:mt+et+et*2}}),Ye=function(at,Pt){var tt={};for(var vt in at)Object.prototype.hasOwnProperty.call(at,vt)&&Pt.indexOf(vt)<0&&(tt[vt]=at[vt]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var st=0,vt=Object.getOwnPropertySymbols(at);st<vt.length;st++)Pt.indexOf(vt[st])<0&&Object.prototype.propertyIsEnumerable.call(at,vt[st])&&(tt[vt[st]]=at[vt[st]]);return tt};const Ge=Se.forwardRef((at,Pt)=>{const{prefixCls:tt,size:vt,disabled:st,loading:jt,className:lt,rootClassName:et,style:ut}=at,mt=Ye(at,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:_t,direction:gt,switch:Bt}=Se.useContext(z.E_),Ht=Se.useContext(ee.Z),hn=(st!=null?st:Ht)||jt,Qt=_t("switch",tt),bn=Se.createElement("div",{className:`${Qt}-handle`},jt&&Se.createElement(Me.Z,{className:`${Qt}-loading-icon`})),[Wt,Kt]=Ze(Qt),Jt=(0,oe.Z)(vt),dn=Be()(Bt==null?void 0:Bt.className,{[`${Qt}-small`]:Jt==="small",[`${Qt}-loading`]:jt,[`${Qt}-rtl`]:gt==="rtl"},lt,et,Kt),Lt=Object.assign(Object.assign({},Bt==null?void 0:Bt.style),ut);return Wt(Se.createElement(ce.Z,{component:"Switch"},Se.createElement(de,Object.assign({},mt,{prefixCls:Qt,className:dn,style:Lt,disabled:hn,ref:Pt,loadingIcon:bn}))))});Ge.__ANT_SWITCH=!0;var ft=Ge},2595:function(Ln,tn,Ee){"use strict";Ee.d(tn,{default:function(){return gf}});var Me={},me="rc-table-internal-hook",Be=Ee(29043),ke=Ee(8107),Pe=Ee(28800),Le=Ee(51346),he=Ee(59301),Se=Ee(4676);function xe(Ft){var Ut=he.createContext(void 0),cn=function(Ct){var Et=Ct.value,wn=Ct.children,fn=he.useRef(Et);fn.current=Et;var sn=he.useState(function(){return{getValue:function(){return fn.current},listeners:new Set}}),Sn=(0,Be.Z)(sn,1),xn=Sn[0];return(0,Pe.Z)(function(){(0,Se.unstable_batchedUpdates)(function(){xn.listeners.forEach(function(_n){_n(Et)})})},[Et]),he.createElement(Ut.Provider,{value:xn},wn)};return{Context:Ut,Provider:cn,defaultValue:Ft}}function ge(Ft,Ut){var cn=(0,ke.Z)(typeof Ut=="function"?Ut:function(_n){if(Ut===void 0)return _n;if(!Array.isArray(Ut))return _n[Ut];var Hn={};return Ut.forEach(function(ti){Hn[ti]=_n[ti]}),Hn}),ht=he.useContext(Ft==null?void 0:Ft.Context),Ct=ht||{},Et=Ct.listeners,wn=Ct.getValue,fn=he.useRef();fn.current=cn(ht?wn():Ft==null?void 0:Ft.defaultValue);var sn=he.useState({}),Sn=(0,Be.Z)(sn,2),xn=Sn[1];return(0,Pe.Z)(function(){if(!ht)return;function _n(Hn){var ti=cn(Hn);(0,Le.Z)(fn.current,ti,!0)||xn({})}return Et.add(_n),function(){Et.delete(_n)}},[ht]),fn.current}var le=Ee(5891),ve=Ee(20475);function de(){var Ft=he.createContext(null);function Ut(){return he.useContext(Ft)}function cn(Ct,Et){var wn=(0,ve.Yr)(Ct),fn=function(Sn,xn){var _n=wn?{ref:xn}:{},Hn=he.useRef(0),ti=he.useRef(Sn),Kn=Ut();return Kn!==null?he.createElement(Ct,(0,le.Z)({},Sn,_n)):((!Et||Et(ti.current,Sn))&&(Hn.current+=1),ti.current=Sn,he.createElement(Ft.Provider,{value:Hn.current},he.createElement(Ct,(0,le.Z)({},Sn,_n))))};return wn?he.forwardRef(fn):fn}function ht(Ct,Et){var wn=(0,ve.Yr)(Ct),fn=function(Sn,xn){var _n=wn?{ref:xn}:{};return Ut(),he.createElement(Ct,(0,le.Z)({},Sn,_n))};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,ye=ie.useImmutableMark,we=xe(),be=we;function Ae(Ft,Ut){var cn=he.useRef(0);cn.current+=1;var ht=he.useRef(Ft),Ct=[];Object.keys(Ft||{}).map(function(wn){var fn;(Ft==null?void 0:Ft[wn])!==((fn=ht.current)===null||fn===void 0?void 0:fn[wn])&&Ct.push(wn)}),ht.current=Ft;var Et=he.useRef([]);return Ct.length&&(Et.current=Ct),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 Ft=Ae();return he.createElement("h1",null,"Render Times: ",Ft)});ze.displayName="RenderBlock";var Ze=Ee(80665),Ye=Ee(57259),Ge=Ee(80962),ft=Ee(92310),at=Ee.n(ft),Pt=Ee(79722),tt=Ee(69004),vt=Ee(51395),st=he.createContext({renderWithProps:!1}),jt=st,lt="RC_TABLE_KEY";function et(Ft){return Ft==null?[]:Array.isArray(Ft)?Ft:[Ft]}function ut(Ft){var Ut=[],cn={};return Ft.forEach(function(ht){for(var Ct=ht||{},Et=Ct.key,wn=Ct.dataIndex,fn=Et||et(wn).join("-")||lt;cn[fn];)fn="".concat(fn,"_next");cn[fn]=!0,Ut.push(fn)}),Ut}function mt(Ft){return Ft!=null}function _t(Ft){return Ft&&(0,Ze.Z)(Ft)==="object"&&!Array.isArray(Ft)&&!he.isValidElement(Ft)}function gt(Ft,Ut,cn,ht,Ct,Et){var wn=he.useContext(jt),fn=ye(),sn=(0,Pt.Z)(function(){if(mt(ht))return[ht];var Sn=Ut==null||Ut===""?[]:Array.isArray(Ut)?Ut:[Ut],xn=(0,tt.Z)(Ft,Sn),_n=xn,Hn=void 0;if(Ct){var ti=Ct(xn,Ft,cn);_t(ti)?(_n=ti.children,Hn=ti.props,wn.renderWithProps=!0):_n=ti}return[_n,Hn]},[fn,Ft,ht,Ut,Ct,cn],function(Sn,xn){if(Et){var _n=(0,Be.Z)(Sn,2),Hn=_n[1],ti=(0,Be.Z)(xn,2),Kn=ti[1];return Et(Kn,Hn)}return wn.renderWithProps?!0:!(0,Le.Z)(Sn,xn,!0)});return sn}function Bt(Ft,Ut,cn,ht){var Ct=Ft+Ut-1;return Ft<=ht&&Ct>=cn}function Ht(Ft,Ut){return ge(be,function(cn){var ht=Bt(Ft,Ut||1,cn.hoverStartRow,cn.hoverEndRow);return[ht,cn.onHover]})}var hn=function(Ut){var cn=Ut.ellipsis,ht=Ut.rowType,Ct=Ut.children,Et,wn=cn===!0?{showTitle:!0}:cn;return wn&&(wn.showTitle||ht==="header")&&(typeof Ct=="string"||typeof Ct=="number"?Et=Ct.toString():he.isValidElement(Ct)&&typeof Ct.props.children=="string"&&(Et=Ct.props.children)),Et};function Qt(Ft){var Ut,cn,ht,Ct,Et,wn,fn,sn,Sn=Ft.component,xn=Ft.children,_n=Ft.ellipsis,Hn=Ft.scope,ti=Ft.prefixCls,Kn=Ft.className,bi=Ft.align,Vn=Ft.record,vi=Ft.render,ui=Ft.dataIndex,Ri=Ft.renderIndex,Di=Ft.shouldCellUpdate,Gi=Ft.index,Oi=Ft.rowType,Ii=Ft.colSpan,cr=Ft.rowSpan,ei=Ft.fixLeft,ji=Ft.fixRight,Li=Ft.firstFixLeft,Ci=Ft.lastFixLeft,Yi=Ft.firstFixRight,gi=Ft.lastFixRight,dr=Ft.appendNode,Xi=Ft.additionalProps,Pi=Xi===void 0?{}:Xi,Zi=Ft.isSticky,vr="".concat(ti,"-cell"),or=ge(be,["supportSticky","allColumnsFixedLeft"]),So=or.supportSticky,Mo=or.allColumnsFixedLeft,es=gt(Vn,ui,Ri,xn,vi,Di),so=(0,Be.Z)(es,2),Or=so[0],Do=so[1],Dr={},Yr=typeof ei=="number"&&So,ts=typeof ji=="number"&&So;Yr&&(Dr.position="sticky",Dr.left=ei),ts&&(Dr.position="sticky",Dr.right=ji);var Gr=(Ut=(cn=(ht=Do==null?void 0:Do.colSpan)!==null&&ht!==void 0?ht:Pi.colSpan)!==null&&cn!==void 0?cn:Ii)!==null&&Ut!==void 0?Ut:1,Ar=(Ct=(Et=(wn=Do==null?void 0:Do.rowSpan)!==null&&wn!==void 0?wn:Pi.rowSpan)!==null&&Et!==void 0?Et:cr)!==null&&Ct!==void 0?Ct:1,Xr=Ht(Gi,Ar),Er=(0,Be.Z)(Xr,2),ao=Er[0],Nr=Er[1],ho=function(ys){var Ys;Vn&&Nr(Gi,Gi+Ar-1),Pi==null||(Ys=Pi.onMouseEnter)===null||Ys===void 0||Ys.call(Pi,ys)},Zo=function(ys){var Ys;Vn&&Nr(-1,-1),Pi==null||(Ys=Pi.onMouseLeave)===null||Ys===void 0||Ys.call(Pi,ys)};if(Gr===0||Ar===0)return null;var Ko=(fn=Pi.title)!==null&&fn!==void 0?fn:hn({rowType:Oi,ellipsis:_n,children:Or}),Jr=at()(vr,Kn,(sn={},(0,Ge.Z)(sn,"".concat(vr,"-fix-left"),Yr&&So),(0,Ge.Z)(sn,"".concat(vr,"-fix-left-first"),Li&&So),(0,Ge.Z)(sn,"".concat(vr,"-fix-left-last"),Ci&&So),(0,Ge.Z)(sn,"".concat(vr,"-fix-left-all"),Ci&&Mo&&So),(0,Ge.Z)(sn,"".concat(vr,"-fix-right"),ts&&So),(0,Ge.Z)(sn,"".concat(vr,"-fix-right-first"),Yi&&So),(0,Ge.Z)(sn,"".concat(vr,"-fix-right-last"),gi&&So),(0,Ge.Z)(sn,"".concat(vr,"-ellipsis"),_n),(0,Ge.Z)(sn,"".concat(vr,"-with-append"),dr),(0,Ge.Z)(sn,"".concat(vr,"-fix-sticky"),(Yr||ts)&&Zi&&So),(0,Ge.Z)(sn,"".concat(vr,"-row-hover"),!Do&&ao),sn),Pi.className,Do==null?void 0:Do.className),Bo={};bi&&(Bo.textAlign=bi);var Cs=(0,Ye.Z)((0,Ye.Z)((0,Ye.Z)((0,Ye.Z)({},Dr),Pi.style),Bo),Do==null?void 0:Do.style),ko=Or;return(0,Ze.Z)(ko)==="object"&&!Array.isArray(ko)&&!he.isValidElement(ko)&&(ko=null),_n&&(Ci||Yi)&&(ko=he.createElement("span",{className:"".concat(vr,"-content")},ko)),he.createElement(Sn,(0,le.Z)({},Do,Pi,{className:Jr,style:Cs,title:Ko,scope:Hn,onMouseEnter:ho,onMouseLeave:Zo,colSpan:Gr!==1?Gr:null,rowSpan:Ar!==1?Ar:null}),dr,ko)}var bn=he.memo(Qt);function Wt(Ft,Ut,cn,ht,Ct,Et){var wn=cn[Ft]||{},fn=cn[Ut]||{},sn,Sn;wn.fixed==="left"?sn=ht.left[Ct==="rtl"?Ut:Ft]:fn.fixed==="right"&&(Sn=ht.right[Ct==="rtl"?Ft:Ut]);var xn=!1,_n=!1,Hn=!1,ti=!1,Kn=cn[Ut+1],bi=cn[Ft-1],Vn=!(Et!=null&&Et.children);if(Ct==="rtl"){if(sn!==void 0){var vi=bi&&bi.fixed==="left";ti=!vi&&Vn}else if(Sn!==void 0){var ui=Kn&&Kn.fixed==="right";Hn=!ui&&Vn}}else if(sn!==void 0){var Ri=Kn&&Kn.fixed==="left";xn=!Ri&&Vn}else if(Sn!==void 0){var Di=bi&&bi.fixed==="right";_n=!Di&&Vn}return{fixLeft:sn,fixRight:Sn,lastFixLeft:xn,firstFixRight:_n,lastFixRight:Hn,firstFixLeft:ti,isSticky:ht.isSticky}}var Kt=he.createContext({}),Jt=Kt;function dn(Ft){var Ut=Ft.className,cn=Ft.index,ht=Ft.children,Ct=Ft.colSpan,Et=Ct===void 0?1:Ct,wn=Ft.rowSpan,fn=Ft.align,sn=ge(be,["prefixCls","direction"]),Sn=sn.prefixCls,xn=sn.direction,_n=he.useContext(Jt),Hn=_n.scrollColumnIndex,ti=_n.stickyOffsets,Kn=_n.flattenColumns,bi=_n.columns,Vn=cn+Et-1,vi=Vn+1===Hn?Et+1:Et,ui=Wt(cn,cn+vi-1,Kn,ti,xn,bi==null?void 0:bi[cn]);return he.createElement(bn,(0,le.Z)({className:Ut,index:cn,component:"td",prefixCls:Sn,record:null,dataIndex:null,align:fn,colSpan:vi,rowSpan:wn,render:function(){return ht}},ui))}var Lt=Ee(19149),pt=["children"];function Rt(Ft){var Ut=Ft.children,cn=(0,Lt.Z)(Ft,pt);return he.createElement("tr",cn,Ut)}function St(Ft){var Ut=Ft.children;return Ut}St.Row=Rt,St.Cell=dn;var yt=St;function nt(Ft){var Ut=Ft.children,cn=Ft.stickyOffsets,ht=Ft.flattenColumns,Ct=Ft.columns,Et=ge(be,"prefixCls"),wn=ht.length-1,fn=ht[wn],sn=he.useMemo(function(){return{stickyOffsets:cn,flattenColumns:ht,scrollColumnIndex:fn!=null&&fn.scrollbar?wn:null,columns:Ct}},[fn,ht,wn,cn,Ct]);return he.createElement(Jt.Provider,{value:sn},he.createElement("tfoot",{className:"".concat(Et,"-summary")},Ut))}var He=ue(nt),Ie=yt,We=Ee(80764),Oe=Ee(29301),Ce=Ee(48886),Ne=Ee(24387),$e=Ee(59055),dt=Ee(36994);function Je(Ft,Ut,cn,ht,Ct,Et,wn){Ft.push({record:Ut,indent:cn,index:wn});var fn=Et(Ut),sn=Ct==null?void 0:Ct.has(fn);if(Ut&&Array.isArray(Ut[ht])&&sn)for(var Sn=0;Sn<Ut[ht].length;Sn+=1)Je(Ft,Ut[ht][Sn],cn+1,ht,Ct,Et,Sn)}function Tt(Ft,Ut,cn,ht){var Ct=he.useMemo(function(){if(cn!=null&&cn.size){for(var Et=[],wn=0;wn<(Ft==null?void 0:Ft.length);wn+=1){var fn=Ft[wn];Je(Et,fn,0,Ut,cn,ht,wn)}return Et}return Ft==null?void 0:Ft.map(function(sn,Sn){return{record:sn,indent:0,index:Sn}})},[Ft,Ut,cn,ht]);return Ct}function qt(Ft){var Ut=Ft.prefixCls,cn=Ft.children,ht=Ft.component,Ct=Ft.cellComponent,Et=Ft.className,wn=Ft.expanded,fn=Ft.colSpan,sn=Ft.isEmpty,Sn=ge(be,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),xn=Sn.scrollbarSize,_n=Sn.fixHeader,Hn=Sn.fixColumn,ti=Sn.componentWidth,Kn=Sn.horizonScroll,bi=cn;return(sn?Kn&&ti:Hn)&&(bi=he.createElement("div",{style:{width:ti-(_n?xn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ut,"-expanded-row-fixed")},bi)),he.createElement(ht,{className:Et,style:{display:wn?null:"none"}},he.createElement(bn,{component:Ct,prefixCls:Ut,colSpan:fn},bi))}var yn=qt;function rn(Ft,Ut,cn,ht){var Ct=ge(be,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Et=Ct.flattenColumns,wn=Ct.expandableType,fn=Ct.expandedKeys,sn=Ct.childrenColumnName,Sn=Ct.onTriggerExpand,xn=Ct.rowExpandable,_n=Ct.onRow,Hn=Ct.expandRowByClick,ti=Ct.rowClassName,Kn=wn==="nest",bi=wn==="row"&&(!xn||xn(Ft)),Vn=bi||Kn,vi=fn&&fn.has(Ut),ui=sn&&Ft&&Ft[sn],Ri=(0,We.useEvent)(Sn),Di=_n==null?void 0:_n(Ft,cn),Gi=Di==null?void 0:Di.onClick,Oi=function(ji){Hn&&Vn&&Sn(Ft,ji);for(var Li=arguments.length,Ci=new Array(Li>1?Li-1:0),Yi=1;Yi<Li;Yi++)Ci[Yi-1]=arguments[Yi];Gi==null||Gi.apply(void 0,[ji].concat(Ci))},Ii;typeof ti=="string"?Ii=ti:typeof ti=="function"&&(Ii=ti(Ft,cn,ht));var cr=ut(Et);return(0,Ye.Z)((0,Ye.Z)({},Ct),{},{columnsKey:cr,nestExpandable:Kn,expanded:vi,hasNestChildren:ui,record:Ft,onTriggerExpand:Ri,rowSupportExpand:bi,expandable:Vn,rowProps:(0,Ye.Z)((0,Ye.Z)({},Di),{},{className:at()(Ii,Di==null?void 0:Di.className),onClick:Oi})})}function pn(Ft,Ut,cn,ht,Ct){var Et=Ft.record,wn=Ft.prefixCls,fn=Ft.columnsKey,sn=Ft.fixedInfoList,Sn=Ft.expandIconColumnIndex,xn=Ft.nestExpandable,_n=Ft.indentSize,Hn=Ft.expandIcon,ti=Ft.expanded,Kn=Ft.hasNestChildren,bi=Ft.onTriggerExpand,Vn=fn[cn],vi=sn[cn],ui;cn===(Sn||0)&&xn&&(ui=he.createElement(he.Fragment,null,he.createElement("span",{style:{paddingLeft:"".concat(_n*ht,"px")},className:"".concat(wn,"-row-indent indent-level-").concat(ht)}),Hn({prefixCls:wn,expanded:ti,expandable:Kn,record:Et,onExpand:bi})));var Ri;return Ut.onCell&&(Ri=Ut.onCell(Et,Ct)),{key:Vn,fixedInfo:vi,appendCellNode:ui,additionalCellProps:Ri||{}}}function Fn(Ft){var Ut=Ft.className,cn=Ft.style,ht=Ft.record,Ct=Ft.index,Et=Ft.renderIndex,wn=Ft.rowKey,fn=Ft.indent,sn=fn===void 0?0:fn,Sn=Ft.rowComponent,xn=Ft.cellComponent,_n=Ft.scopeCellComponent,Hn=rn(ht,wn,Ct,sn),ti=Hn.prefixCls,Kn=Hn.flattenColumns,bi=Hn.expandedRowClassName,Vn=Hn.expandedRowRender,vi=Hn.rowProps,ui=Hn.expanded,Ri=Hn.rowSupportExpand,Di=he.useState(!1),Gi=(0,Be.Z)(Di,2),Oi=Gi[0],Ii=Gi[1];he.useEffect(function(){ui&&Ii(!0)},[ui]);var cr=he.createElement(Sn,(0,le.Z)({},vi,{"data-row-key":wn,className:at()(Ut,"".concat(ti,"-row"),"".concat(ti,"-row-level-").concat(sn),vi==null?void 0:vi.className),style:(0,Ye.Z)((0,Ye.Z)({},cn),vi==null?void 0:vi.style)}),Kn.map(function(Ci,Yi){var gi=Ci.render,dr=Ci.dataIndex,Xi=Ci.className,Pi=pn(Hn,Ci,Yi,sn,Ct),Zi=Pi.key,vr=Pi.fixedInfo,or=Pi.appendCellNode,So=Pi.additionalCellProps;return he.createElement(bn,(0,le.Z)({className:Xi,ellipsis:Ci.ellipsis,align:Ci.align,scope:Ci.rowScope,component:Ci.rowScope?_n:xn,prefixCls:ti,key:Zi,record:ht,index:Ct,renderIndex:Et,dataIndex:dr,render:gi,shouldCellUpdate:Ci.shouldCellUpdate},vr,{appendNode:or,additionalProps:So}))})),ei;if(Ri&&(Oi||ui)){var ji=Vn(ht,Ct,sn+1,ui),Li=bi&&bi(ht,Ct,sn);ei=he.createElement(yn,{expanded:ui,className:at()("".concat(ti,"-expanded-row"),"".concat(ti,"-expanded-row-level-").concat(sn+1),Li),prefixCls:ti,component:Sn,cellComponent:xn,colSpan:Kn.length,isEmpty:!1},ji)}return he.createElement(he.Fragment,null,cr,ei)}Fn.displayName="BodyRow";var kn=ue(Fn);function oi(Ft){var Ut=Ft.columnKey,cn=Ft.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 ri(Ft){var Ut=Ft.prefixCls,cn=Ft.columnsKey,ht=Ft.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,sn=wn.size;ht(fn,sn.offsetWidth)})}},cn.map(function(Ct){return he.createElement(oi,{key:Ct,columnKey:Ct,onColumnResize:ht})})))}function Ti(Ft){var Ut=Ft.data,cn=Ft.measureColumnWidth,ht=ge(be,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),Ct=ht.prefixCls,Et=ht.getComponent,wn=ht.onColumnResize,fn=ht.flattenColumns,sn=ht.getRowKey,Sn=ht.expandedKeys,xn=ht.childrenColumnName,_n=ht.emptyNode,Hn=Tt(Ut,xn,Sn,sn),ti=he.useRef({renderWithProps:!1}),Kn=Et(["body","wrapper"],"tbody"),bi=Et(["body","row"],"tr"),Vn=Et(["body","cell"],"td"),vi=Et(["body","cell"],"th"),ui;Ut.length?ui=Hn.map(function(Di,Gi){var Oi=Di.record,Ii=Di.indent,cr=Di.index,ei=sn(Oi,Gi);return he.createElement(kn,{key:ei,rowKey:ei,record:Oi,index:Gi,renderIndex:cr,rowComponent:bi,cellComponent:Vn,scopeCellComponent:vi,getRowKey:sn,indent:Ii})}):ui=he.createElement(yn,{expanded:!0,className:"".concat(Ct,"-placeholder"),prefixCls:Ct,component:bi,cellComponent:Vn,colSpan:fn.length,isEmpty:!0},_n);var Ri=ut(fn);return he.createElement(jt.Provider,{value:ti.current},he.createElement(Kn,{className:"".concat(Ct,"-tbody")},cn&&he.createElement(ri,{prefixCls:Ct,columnsKey:Ri,onColumnResize:wn}),ui))}Ti.displayName="Body";var mi=ue(Ti),Qi=["expandable"],ir="RC_TABLE_INTERNAL_COL_DEFINE";function fr(Ft){var Ut=Ft.expandable,cn=(0,Lt.Z)(Ft,Qi),ht;return"expandable"in Ft?ht=(0,Ye.Z)((0,Ye.Z)({},cn),Ut):ht=cn,ht.showExpandColumn===!1&&(ht.expandIconColumnIndex=-1),ht}var er=["columnType"];function Mr(Ft){for(var Ut=Ft.colWidths,cn=Ft.columns,ht=Ft.columCount,Ct=[],Et=ht||cn.length,wn=!1,fn=Et-1;fn>=0;fn-=1){var sn=Ut[fn],Sn=cn&&cn[fn],xn=Sn&&Sn[ir];if(sn||xn||wn){var _n=xn||{},Hn=_n.columnType,ti=(0,Lt.Z)(_n,er);Ct.unshift(he.createElement("col",(0,le.Z)({key:fn,style:{width:sn}},ti))),wn=!0}}return he.createElement("colgroup",null,Ct)}var qr=Mr,di=Ee(26390),xr=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function zi(Ft,Ut){return(0,he.useMemo)(function(){for(var cn=[],ht=0;ht<Ut;ht+=1){var Ct=Ft[ht];if(Ct!==void 0)cn[ht]=Ct;else return null}return cn},[Ft.join("_"),Ut])}var rt=he.forwardRef(function(Ft,Ut){var cn=Ft.className,ht=Ft.noData,Ct=Ft.columns,Et=Ft.flattenColumns,wn=Ft.colWidths,fn=Ft.columCount,sn=Ft.stickyOffsets,Sn=Ft.direction,xn=Ft.fixHeader,_n=Ft.stickyTopOffset,Hn=Ft.stickyBottomOffset,ti=Ft.stickyClassName,Kn=Ft.onScroll,bi=Ft.maxContentScroll,Vn=Ft.children,vi=(0,Lt.Z)(Ft,xr),ui=ge(be,["prefixCls","scrollbarSize","isSticky"]),Ri=ui.prefixCls,Di=ui.scrollbarSize,Gi=ui.isSticky,Oi=Gi&&!xn?0:Di,Ii=he.useRef(null),cr=he.useCallback(function(Xi){(0,ve.mH)(Ut,Xi),(0,ve.mH)(Ii,Xi)},[]);he.useEffect(function(){var Xi;function Pi(Zi){var vr=Zi,or=vr.currentTarget,So=vr.deltaX;So&&(Kn({currentTarget:or,scrollLeft:or.scrollLeft+So}),Zi.preventDefault())}return(Xi=Ii.current)===null||Xi===void 0||Xi.addEventListener("wheel",Pi),function(){var Zi;(Zi=Ii.current)===null||Zi===void 0||Zi.removeEventListener("wheel",Pi)}},[]);var ei=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(Ri,"-cell-scrollbar")}}},Ci=(0,he.useMemo)(function(){return Oi?[].concat((0,di.Z)(Ct),[Li]):Ct},[Oi,Ct]),Yi=(0,he.useMemo)(function(){return Oi?[].concat((0,di.Z)(Et),[Li]):Et},[Oi,Et]),gi=(0,he.useMemo)(function(){var Xi=sn.right,Pi=sn.left;return(0,Ye.Z)((0,Ye.Z)({},sn),{},{left:Sn==="rtl"?[].concat((0,di.Z)(Pi.map(function(Zi){return Zi+Oi})),[0]):Pi,right:Sn==="rtl"?Xi:[].concat((0,di.Z)(Xi.map(function(Zi){return Zi+Oi})),[0]),isSticky:Gi})},[Oi,sn,Gi]),dr=zi(wn,fn);return he.createElement("div",{style:(0,Ye.Z)({overflow:"hidden"},Gi?{top:_n,bottom:Hn}:{}),ref:cr,className:at()(cn,(0,Ge.Z)({},ti,!!ti))},he.createElement("table",{style:{tableLayout:"fixed",visibility:ht||dr?null:"hidden"}},(!ht||!bi||ei)&&he.createElement(qr,{colWidths:dr?[].concat((0,di.Z)(dr),[Oi]):[],columCount:fn+1,columns:Yi}),Vn((0,Ye.Z)((0,Ye.Z)({},vi),{},{stickyOffsets:gi,columns:Ci,flattenColumns:Yi}))))});rt.displayName="FixedHolder";var zr=he.memo(rt);function hr(Ft){var Ut=Ft.cells,cn=Ft.stickyOffsets,ht=Ft.flattenColumns,Ct=Ft.rowComponent,Et=Ft.cellComponent,wn=Ft.tdCellComponent,fn=Ft.onHeaderRow,sn=Ft.index,Sn=ge(be,["prefixCls","direction"]),xn=Sn.prefixCls,_n=Sn.direction,Hn;fn&&(Hn=fn(Ut.map(function(Kn){return Kn.column}),sn));var ti=ut(Ut.map(function(Kn){return Kn.column}));return he.createElement(Ct,Hn,Ut.map(function(Kn,bi){var Vn=Kn.column,vi=Wt(Kn.colStart,Kn.colEnd,ht,cn,_n,Vn),ui;return Vn&&Vn.onHeaderCell&&(ui=Kn.column.onHeaderCell(Vn)),he.createElement(bn,(0,le.Z)({},Kn,{scope:Vn.title?Kn.colSpan>1?"colgroup":"col":null,ellipsis:Vn.ellipsis,align:Vn.align,component:Vn.title?Et:wn,prefixCls:xn,key:ti[bi]},vi,{additionalProps:ui,rowType:"header"}))}))}hr.displayName="HeaderRow";var vo=hr;function co(Ft){var Ut=[];function cn(wn,fn){var sn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ut[sn]=Ut[sn]||[];var Sn=fn,xn=wn.filter(Boolean).map(function(_n){var Hn={key:_n.key,className:_n.className||"",children:_n.title,column:_n,colStart:Sn},ti=1,Kn=_n.children;return Kn&&Kn.length>0&&(ti=cn(Kn,Sn,sn+1).reduce(function(bi,Vn){return bi+Vn},0),Hn.hasSubColumns=!0),"colSpan"in _n&&(ti=_n.colSpan),"rowSpan"in _n&&(Hn.rowSpan=_n.rowSpan),Hn.colSpan=ti,Hn.colEnd=Hn.colStart+ti-1,Ut[sn].push(Hn),Sn+=ti,ti});return xn}cn(Ft,0);for(var ht=Ut.length,Ct=function(fn){Ut[fn].forEach(function(sn){!("rowSpan"in sn)&&!sn.hasSubColumns&&(sn.rowSpan=ht-fn)})},Et=0;Et<ht;Et+=1)Ct(Et);return Ut}function yo(Ft){var Ut=Ft.stickyOffsets,cn=Ft.columns,ht=Ft.flattenColumns,Ct=Ft.onHeaderRow,Et=ge(be,["prefixCls","getComponent"]),wn=Et.prefixCls,fn=Et.getComponent,sn=he.useMemo(function(){return co(cn)},[cn]),Sn=fn(["header","wrapper"],"thead"),xn=fn(["header","row"],"tr"),_n=fn(["header","cell"],"th"),Hn=fn(["header","cell"],"td");return he.createElement(Sn,{className:"".concat(wn,"-thead")},sn.map(function(ti,Kn){var bi=he.createElement(vo,{key:Kn,flattenColumns:ht,cells:ti,stickyOffsets:Ut,rowComponent:xn,cellComponent:_n,tdCellComponent:Hn,onHeaderRow:Ct,index:Kn});return bi}))}var eo=ue(yo),lo=Ee(38298);function ln(Ft){var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof Ut=="number"?Ut:Ut.endsWith("%")?Ft*parseFloat(Ut)/100:null}function Ke(Ft,Ut){return he.useMemo(function(){if(Ut&&Ut>0){var cn=0,ht=0;Ft.forEach(function(Sn){var xn=ln(Ut,Sn.width);xn?cn+=xn:ht+=1});var Ct=Ut-cn,Et=ht,wn=Ct/ht,fn=0,sn=Ft.map(function(Sn){var xn=(0,Ye.Z)({},Sn),_n=ln(Ut,xn.width);if(_n)xn.width=_n;else{var Hn=Math.floor(wn);xn.width=Et===1?Ct:Hn,Ct-=Hn,Et-=1}return fn+=xn.width,xn});return[sn,fn]}return[Ft,Ut]},[Ft,Ut])}var qe=["children"],Xe=["fixed"];function wt(Ft){return(0,lo.Z)(Ft).filter(function(Ut){return he.isValidElement(Ut)}).map(function(Ut){var cn=Ut.key,ht=Ut.props,Ct=ht.children,Et=(0,Lt.Z)(ht,qe),wn=(0,Ye.Z)({key:cn},Et);return Ct&&(wn.children=wt(Ct)),wn})}function At(Ft){var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return Ft.filter(function(cn){return cn&&(0,Ze.Z)(cn)==="object"}).reduce(function(cn,ht,Ct){var Et=ht.fixed,wn=Et===!0?"left":Et,fn="".concat(Ut,"-").concat(Ct),sn=ht.children;return sn&&sn.length>0?[].concat((0,di.Z)(cn),(0,di.Z)(At(sn,fn).map(function(Sn){return(0,Ye.Z)({fixed:wn},Sn)}))):[].concat((0,di.Z)(cn),[(0,Ye.Z)((0,Ye.Z)({key:fn},ht),{},{fixed:wn})])},[])}function Nt(Ft){for(var Ut=!0,cn=0;cn<Ft.length;cn+=1){var ht=Ft[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 Ct=!0,Et=Ft.length-1;Et>=0;Et-=1){var wn=Ft[Et];if(Ct&&wn.fixed!=="right")Ct=!1;else if(!Ct&&wn.fixed==="right"){warning(!1,"Index ".concat(Et+1," of `columns` missing `fixed='right'` prop."));break}}}function bt(Ft){return Ft.map(function(Ut){var cn=Ut.fixed,ht=(0,Lt.Z)(Ut,Xe),Ct=cn;return cn==="left"?Ct="right":cn==="right"&&(Ct="left"),(0,Ye.Z)({fixed:Ct},ht)})}function gn(Ft,Ut){var cn=Ft.prefixCls,ht=Ft.columns,Ct=Ft.children,Et=Ft.expandable,wn=Ft.expandedKeys,fn=Ft.columnTitle,sn=Ft.getRowKey,Sn=Ft.onTriggerExpand,xn=Ft.expandIcon,_n=Ft.rowExpandable,Hn=Ft.expandIconColumnIndex,ti=Ft.direction,Kn=Ft.expandRowByClick,bi=Ft.columnWidth,Vn=Ft.fixed,vi=Ft.scrollWidth,ui=he.useMemo(function(){return ht||wt(Ct)},[ht,Ct]),Ri=he.useMemo(function(){if(Et){var ji,Li=ui.slice();if(!Li.includes(Me)){var Ci=Hn||0;Ci>=0&&Li.splice(Ci,0,Me)}var Yi=Li.indexOf(Me);Li=Li.filter(function(Pi,Zi){return Pi!==Me||Zi===Yi});var gi=ui[Yi],dr;(Vn==="left"||Vn)&&!Hn?dr="left":(Vn==="right"||Vn)&&Hn===ui.length?dr="right":dr=gi?gi.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",dr),(0,Ge.Z)(ji,"className","".concat(cn,"-row-expand-icon-cell")),(0,Ge.Z)(ji,"width",bi),(0,Ge.Z)(ji,"render",function(Zi,vr,or){var So=sn(vr,or),Mo=wn.has(So),es=_n?_n(vr):!0,so=xn({prefixCls:cn,expanded:Mo,expandable:es,record:vr,onExpand:Sn});return Kn?he.createElement("span",{onClick:function(Do){return Do.stopPropagation()}},so):so}),ji);return Li.map(function(Pi){return Pi===Me?Xi:Pi})}return ui.filter(function(Pi){return Pi!==Me})},[Et,ui,sn,wn,xn,ti]),Di=he.useMemo(function(){var ji=Ri;return Ut&&(ji=Ut(ji)),ji.length||(ji=[{render:function(){return null}}]),ji},[Ut,Ri,ti]),Gi=he.useMemo(function(){return ti==="rtl"?bt(At(Di)):At(Di)},[Di,ti,vi]),Oi=Ke(Gi,vi),Ii=(0,Be.Z)(Oi,2),cr=Ii[0],ei=Ii[1];return[Di,cr,ei]}var En=gn;function Un(Ft){var Ut,cn=Ft.prefixCls,ht=Ft.record,Ct=Ft.onExpand,Et=Ft.expanded,wn=Ft.expandable,fn="".concat(cn,"-row-expand-icon");if(!wn)return he.createElement("span",{className:at()(fn,"".concat(cn,"-row-spaced"))});var sn=function(xn){Ct(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:sn})}function Pn(Ft,Ut,cn){var ht=[];function Ct(Et){(Et||[]).forEach(function(wn,fn){ht.push(Ut(wn,fn)),Ct(wn[cn])})}return Ct(Ft),ht}function zt(Ft,Ut,cn){var ht=fr(Ft),Ct=ht.expandIcon,Et=ht.expandedRowKeys,wn=ht.defaultExpandedRowKeys,fn=ht.defaultExpandAllRows,sn=ht.expandedRowRender,Sn=ht.onExpand,xn=ht.onExpandedRowsChange,_n=ht.childrenColumnName,Hn=Ct||Un,ti=_n||"children",Kn=he.useMemo(function(){return sn?"row":Ft.expandable&&Ft.internalHooks===me&&Ft.expandable.__PARENT_RENDER_ICON__||Ut.some(function(Gi){return Gi&&(0,Ze.Z)(Gi)==="object"&&Gi[ti]})?"nest":!1},[!!sn,Ut]),bi=he.useState(function(){return wn||(fn?Pn(Ut,cn,ti):[])}),Vn=(0,Be.Z)(bi,2),vi=Vn[0],ui=Vn[1],Ri=he.useMemo(function(){return new Set(Et||vi||[])},[Et,vi]),Di=he.useCallback(function(Gi){var Oi=cn(Gi,Ut.indexOf(Gi)),Ii,cr=Ri.has(Oi);cr?(Ri.delete(Oi),Ii=(0,di.Z)(Ri)):Ii=[].concat((0,di.Z)(Ri),[Oi]),ui(Ii),Sn&&Sn(!cr,Gi),xn&&xn(Ii)},[cn,Ri,Ut,Sn,xn]);return[ht,Kn,Ri,Hn,ti,Di]}function Yt(Ft,Ut,cn,ht){var Ct=Ft.map(function(Et,wn){return Wt(wn,wn,Ft,Ut,cn,ht==null?void 0:ht[wn])});return(0,Pt.Z)(function(){return Ct},[Ct],function(Et,wn){return!(0,Le.Z)(Et,wn)})}function Cn(Ft){var Ut=(0,he.useRef)(Ft),cn=(0,he.useState)({}),ht=(0,Be.Z)(cn,2),Ct=ht[1],Et=(0,he.useRef)(null),wn=(0,he.useRef)([]);function fn(sn){wn.current.push(sn);var Sn=Promise.resolve();Et.current=Sn,Sn.then(function(){if(Et.current===Sn){var xn=wn.current,_n=Ut.current;wn.current=[],xn.forEach(function(Hn){Ut.current=Hn(Ut.current)}),Et.current=null,_n!==Ut.current&&Ct({})}})}return(0,he.useEffect)(function(){return function(){Et.current=null}},[]),[Ut.current,fn]}function An(Ft){var Ut=(0,he.useRef)(Ft||null),cn=(0,he.useRef)();function ht(){window.clearTimeout(cn.current)}function Ct(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},[]),[Ct,Et]}function Vt(){var Ft=he.useState(-1),Ut=(0,Be.Z)(Ft,2),cn=Ut[0],ht=Ut[1],Ct=he.useState(-1),Et=(0,Be.Z)(Ct,2),wn=Et[0],fn=Et[1],sn=he.useCallback(function(Sn,xn){ht(Sn),fn(xn)},[]);return[cn,wn,sn]}var an=Ee(87746),Bn=(0,an.Z)()?window:null;function Nn(Ft,Ut){var cn=(0,Ze.Z)(Ft)==="object"?Ft:{},ht=cn.offsetHeader,Ct=ht===void 0?0:ht,Et=cn.offsetSummary,wn=Et===void 0?0:Et,fn=cn.offsetScroll,sn=fn===void 0?0:fn,Sn=cn.getContainer,xn=Sn===void 0?function(){return Bn}:Sn,_n=xn()||Bn;return he.useMemo(function(){var Hn=!!Ft;return{isSticky:Hn,stickyClassName:Hn?"".concat(Ut,"-sticky-holder"):"",offsetHeader:Ct,offsetSummary:wn,offsetScroll:sn,container:_n}},[sn,Ct,wn,Ut,_n])}function qn(Ft,Ut,cn){var ht=(0,he.useMemo)(function(){for(var Ct=[],Et=[],wn=0,fn=0,sn=0;sn<Ut;sn+=1)if(cn==="rtl"){Et[sn]=fn,fn+=Ft[sn]||0;var Sn=Ut-sn-1;Ct[Sn]=wn,wn+=Ft[Sn]||0}else{Ct[sn]=wn,wn+=Ft[sn]||0;var xn=Ut-sn-1;Et[xn]=fn,fn+=Ft[xn]||0}return{left:Ct,right:Et}},[Ft,Ut,cn]);return ht}var Gn=qn;function Jn(Ft){var Ut=Ft.className,cn=Ft.children;return he.createElement("div",{className:Ut},cn)}var Rn=Jn,li=Ee(8178),Mi=Ee(21783),zn=function(Ut,cn){var ht,Ct,Et=Ut.scrollBodyRef,wn=Ut.onScroll,fn=Ut.offsetScroll,sn=Ut.container,Sn=ge(be,"prefixCls"),xn=((ht=Et.current)===null||ht===void 0?void 0:ht.scrollWidth)||0,_n=((Ct=Et.current)===null||Ct===void 0?void 0:Ct.clientWidth)||0,Hn=xn&&_n*(_n/xn),ti=he.useRef(),Kn=Cn({scrollLeft:0,isHiddenScrollBar:!1}),bi=(0,Be.Z)(Kn,2),Vn=bi[0],vi=bi[1],ui=he.useRef({delta:0,x:0}),Ri=he.useState(!1),Di=(0,Be.Z)(Ri,2),Gi=Di[0],Oi=Di[1],Ii=function(){Oi(!1)},cr=function(Yi){Yi.persist(),ui.current.delta=Yi.pageX-Vn.scrollLeft,ui.current.x=0,Oi(!0),Yi.preventDefault()},ei=function(Yi){var gi,dr=Yi||((gi=window)===null||gi===void 0?void 0:gi.event),Xi=dr.buttons;if(!Gi||Xi===0){Gi&&Oi(!1);return}var Pi=ui.current.x+Yi.pageX-ui.current.x-ui.current.delta;Pi<=0&&(Pi=0),Pi+Hn>=_n&&(Pi=_n-Hn),wn({scrollLeft:Pi/_n*(xn+2)}),ui.current.x=Yi.pageX},ji=function(){if(Et.current){var Yi=(0,Mi.os)(Et.current).top,gi=Yi+Et.current.offsetHeight,dr=sn===window?document.documentElement.scrollTop+window.innerHeight:(0,Mi.os)(sn).top+sn.clientHeight;gi-(0,$e.Z)()<=dr||Yi>=dr-fn?vi(function(Xi){return(0,Ye.Z)((0,Ye.Z)({},Xi),{},{isHiddenScrollBar:!0})}):vi(function(Xi){return(0,Ye.Z)((0,Ye.Z)({},Xi),{},{isHiddenScrollBar:!1})})}},Li=function(Yi){vi(function(gi){return(0,Ye.Z)((0,Ye.Z)({},gi),{},{scrollLeft:Yi/xn*_n||0})})};return he.useImperativeHandle(cn,function(){return{setScrollLeft:Li}}),he.useEffect(function(){var Ci=(0,li.Z)(document.body,"mouseup",Ii,!1),Yi=(0,li.Z)(document.body,"mousemove",ei,!1);return ji(),function(){Ci.remove(),Yi.remove()}},[Hn,Gi]),he.useEffect(function(){var Ci=(0,li.Z)(sn,"scroll",ji,!1),Yi=(0,li.Z)(window,"resize",ji,!1);return function(){Ci.remove(),Yi.remove()}},[sn]),he.useEffect(function(){Vn.isHiddenScrollBar||vi(function(Ci){var Yi=Et.current;return Yi?(0,Ye.Z)((0,Ye.Z)({},Ci),{},{scrollLeft:Yi.scrollLeft/Yi.scrollWidth*Yi.clientWidth}):Ci})},[Vn.isHiddenScrollBar]),xn<=_n||!Hn||Vn.isHiddenScrollBar?null:he.createElement("div",{style:{height:(0,$e.Z)(),width:_n,bottom:fn},className:"".concat(Sn,"-sticky-scroll")},he.createElement("div",{onMouseDown:cr,ref:ti,className:at()("".concat(Sn,"-sticky-scroll-bar"),(0,Ge.Z)({},"".concat(Sn,"-sticky-scroll-bar-active"),Gi)),style:{width:"".concat(Hn,"px"),transform:"translate3d(".concat(Vn.scrollLeft,"px, 0, 0)")}}))},si=he.forwardRef(zn);function Hi(Ft){return null}var ur=Hi;function Ai(Ft){return null}var un=Ai,ai="rc-table",wi=[],fi={};function Wi(){return"No Data"}function Ni(Ft){var Ut,cn=(0,Ye.Z)({rowKey:"key",prefixCls:ai,emptyText:Wi},Ft),ht=cn.prefixCls,Ct=cn.className,Et=cn.rowClassName,wn=cn.style,fn=cn.data,sn=cn.rowKey,Sn=cn.scroll,xn=cn.tableLayout,_n=cn.direction,Hn=cn.title,ti=cn.footer,Kn=cn.summary,bi=cn.caption,Vn=cn.id,vi=cn.showHeader,ui=cn.components,Ri=cn.emptyText,Di=cn.onRow,Gi=cn.onHeaderRow,Oi=cn.internalHooks,Ii=cn.transformColumns,cr=cn.internalRefs,ei=cn.tailor,ji=cn.sticky,Li=fn||wi,Ci=!!Li.length,Yi=Oi===me,gi=he.useCallback(function(cs,Vs){return(0,tt.Z)(ui,cs)||Vs},[ui]),dr=he.useMemo(function(){return typeof sn=="function"?sn:function(cs){var Vs=cs&&cs[sn];return Vs}},[sn]),Xi=gi(["body"]),Pi=Vt(),Zi=(0,Be.Z)(Pi,3),vr=Zi[0],or=Zi[1],So=Zi[2],Mo=zt(cn,Li,dr),es=(0,Be.Z)(Mo,6),so=es[0],Or=es[1],Do=es[2],Dr=es[3],Yr=es[4],ts=es[5],Gr=Sn==null?void 0:Sn.x,Ar=he.useState(0),Xr=(0,Be.Z)(Ar,2),Er=Xr[0],ao=Xr[1],Nr=En((0,Ye.Z)((0,Ye.Z)((0,Ye.Z)({},cn),so),{},{expandable:!!so.expandedRowRender,columnTitle:so.columnTitle,expandedKeys:Do,getRowKey:dr,onTriggerExpand:ts,expandIcon:Dr,expandIconColumnIndex:so.expandIconColumnIndex,direction:_n,scrollWidth:Yi&&ei&&typeof Gr=="number"?Gr:null}),Yi?Ii:null),ho=(0,Be.Z)(Nr,3),Zo=ho[0],Ko=ho[1],Jr=ho[2],Bo=Jr!=null?Jr:Gr,Cs=he.useMemo(function(){return{columns:Zo,flattenColumns:Ko}},[Zo,Ko]),ko=he.useRef(),Yo=he.useRef(),ys=he.useRef(),Ys=he.useRef(),Pl=he.useRef(),Xo=he.useState(!1),Jo=(0,Be.Z)(Xo,2),Ss=Jo[0],Es=Jo[1],pa=he.useState(!1),zo=(0,Be.Z)(pa,2),ks=zo[0],Pa=zo[1],_l=Cn(new Map),Xl=(0,Be.Z)(_l,2),Fl=Xl[0],hu=Xl[1],du=ut(Ko),Jl=du.map(function(cs){return Fl.get(cs)}),ds=he.useMemo(function(){return Jl},[Jl.join("_")]),Oa=Gn(ds,Ko.length,_n),ra=Sn&&mt(Sn.y),As=Sn&&mt(Bo)||!!so.fixed,Ql=As&&Ko.some(function(cs){var Vs=cs.fixed;return Vs}),_c=he.useRef(),fu=Nn(ji,ht),Zu=fu.isSticky,sc=fu.offsetHeader,jl=fu.offsetSummary,os=fu.offsetScroll,Fs=fu.stickyClassName,va=fu.container,js=he.useMemo(function(){return Kn==null?void 0:Kn(Li)},[Kn,Li]),ns=(ra||Zu)&&he.isValidElement(js)&&js.type===yt&&js.props.fixed,_a,El,Nu;ra&&(El={overflowY:"scroll",maxHeight:Sn.y}),As&&(_a={overflowX:"auto"},ra||(El={overflowY:"hidden"}),Nu={width:Bo===!0?"auto":Bo,minWidth:"100%"});var mf=he.useCallback(function(cs,Vs){(0,Ce.Z)(ko.current)&&hu(function(Za){if(Za.get(cs)!==Vs){var pu=new Map(Za);return pu.set(cs,Vs),pu}return Za})},[]),mn=An(null),Bc=(0,Be.Z)(mn,2),ac=Bc[0],vf=Bc[1];function Ph(cs,Vs){Vs&&(typeof Vs=="function"?Vs(cs):Vs.scrollLeft!==cs&&(Vs.scrollLeft=cs,Vs.scrollLeft!==cs&&setTimeout(function(){Vs.scrollLeft=cs},0)))}var oh=(0,ke.Z)(function(cs){var Vs=cs.currentTarget,Za=cs.scrollLeft,pu=_n==="rtl",gu=typeof Za=="number"?Za:Vs.scrollLeft,Wd=Vs||fi;if(!vf()||vf()===Wd){var zc;ac(Wd),Ph(gu,Yo.current),Ph(gu,ys.current),Ph(gu,Pl.current),Ph(gu,(zc=_c.current)===null||zc===void 0?void 0:zc.setScrollLeft)}var rd=Vs||Yo.current;if(rd){var Ou=rd.scrollWidth,Ec=rd.clientWidth;if(Ou===Ec){Es(!1),Pa(!1);return}pu?(Es(-gu<Ou-Ec),Pa(-gu>0)):(Es(gu>0),Pa(gu<Ou-Ec))}}),Rd=function(){As&&ys.current?oh({currentTarget:ys.current}):(Es(!1),Pa(!1))},Kp=function(Vs){var Za=Vs.width;Za!==Er&&(Rd(),ao(ko.current?ko.current.offsetWidth:Za))},Ia=he.useRef(!1);he.useEffect(function(){Ia.current&&Rd()},[As,fn,Zo.length]),he.useEffect(function(){Ia.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(){(!ei||!Yi)&&(ys.current instanceof Element?yf((0,$e.o)(ys.current).width):yf((0,$e.o)(Ys.current).width)),ql((0,Ne.G)("position","sticky"))},[]),he.useEffect(function(){Yi&&cr&&(cr.body.current=ys.current)});var _h=he.useCallback(function(cs){return he.createElement(he.Fragment,null,he.createElement(eo,cs),ns==="top"&&he.createElement(He,cs,js))},[ns,js]),xf=he.useCallback(function(cs){return he.createElement(He,cs,js)},[js]),Ku=gi(["table"],"table"),Fc=he.useMemo(function(){return xn||(Ql?Bo==="max-content"?"auto":"fixed":ra||Zu||Ko.some(function(cs){var Vs=cs.ellipsis;return Vs})?"fixed":"auto")},[ra,Ql,Ko,xn,Zu]),Eh,sh={colWidths:ds,columCount:Ko.length,stickyOffsets:Oa,onHeaderRow:Gi,fixHeader:ra,scroll:Sn},Ll=he.useMemo(function(){return Ci?null:typeof Ri=="function"?Ri():Ri},[Ci,Ri]),jd=he.createElement(mi,{data:Li,measureColumnWidth:ra||As||Zu}),zd=he.createElement(qr,{colWidths:Ko.map(function(cs){var Vs=cs.width;return Vs}),columns:Ko}),eu=bi!=null?he.createElement("caption",{className:"".concat(ht,"-caption")},bi):void 0,Lh=(0,dt.Z)(cn,{data:!0}),Hd=(0,dt.Z)(cn,{aria:!0});if(ra||Zu){var Ud;typeof Xi=="function"?(Ud=Xi(Li,{scrollbarSize:id,ref:ys,onScroll:oh}),sh.colWidths=Ko.map(function(cs,Vs){var Za=cs.width,pu=Vs===Ko.length-1?Za-id:Za;return typeof pu=="number"&&!Number.isNaN(pu)?pu:0})):Ud=he.createElement("div",{style:(0,Ye.Z)((0,Ye.Z)({},_a),El),onScroll:oh,ref:ys,className:at()("".concat(ht,"-body"))},he.createElement(Ku,(0,le.Z)({style:(0,Ye.Z)((0,Ye.Z)({},Nu),{},{tableLayout:Fc})},Hd),eu,zd,jd,!ns&&js&&he.createElement(He,{stickyOffsets:Oa,flattenColumns:Ko,columns:Zo},js)));var jc=(0,Ye.Z)((0,Ye.Z)((0,Ye.Z)({noData:!Li.length,maxContentScroll:As&&Bo==="max-content"},sh),Cs),{},{direction:_n,stickyClassName:Fs,onScroll:oh});Eh=he.createElement(he.Fragment,null,vi!==!1&&he.createElement(zr,(0,le.Z)({},jc,{stickyTopOffset:sc,className:"".concat(ht,"-header"),ref:Yo}),_h),Ud,ns&&ns!=="top"&&he.createElement(zr,(0,le.Z)({},jc,{stickyBottomOffset:jl,className:"".concat(ht,"-summary"),ref:Pl}),xf),Zu&&he.createElement(si,{ref:_c,offsetScroll:os,scrollBodyRef:ys,onScroll:oh,container:va}))}else Eh=he.createElement("div",{style:(0,Ye.Z)((0,Ye.Z)({},_a),El),className:at()("".concat(ht,"-content")),onScroll:oh,ref:ys},he.createElement(Ku,(0,le.Z)({style:(0,Ye.Z)((0,Ye.Z)({},Nu),{},{tableLayout:Fc})},Hd),eu,zd,vi!==!1&&he.createElement(eo,(0,le.Z)({},sh,Cs)),jd,js&&he.createElement(He,{stickyOffsets:Oa,flattenColumns:Ko,columns:Zo},js)));var pl=he.createElement("div",(0,le.Z)({className:at()(ht,Ct,(Ut={},(0,Ge.Z)(Ut,"".concat(ht,"-rtl"),_n==="rtl"),(0,Ge.Z)(Ut,"".concat(ht,"-ping-left"),Ss),(0,Ge.Z)(Ut,"".concat(ht,"-ping-right"),ks),(0,Ge.Z)(Ut,"".concat(ht,"-layout-fixed"),xn==="fixed"),(0,Ge.Z)(Ut,"".concat(ht,"-fixed-header"),ra),(0,Ge.Z)(Ut,"".concat(ht,"-fixed-column"),Ql),(0,Ge.Z)(Ut,"".concat(ht,"-scroll-horizontal"),As),(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:Vn,ref:ko},Lh),Hn&&he.createElement(Rn,{className:"".concat(ht,"-title")},Hn(Li)),he.createElement("div",{ref:Ys,className:"".concat(ht,"-container")},Eh),ti&&he.createElement(Rn,{className:"".concat(ht,"-footer")},ti(Li)));As&&(pl=he.createElement(Oe.Z,{onResize:Kp},pl));var Gd=Yt(Ko,Oa,_n,Zo),ya=he.useMemo(function(){return{scrollX:Bo,prefixCls:ht,getComponent:gi,scrollbarSize:id,direction:_n,fixedInfoList:Gd,isSticky:Zu,supportSticky:Fd,componentWidth:Er,fixHeader:ra,fixColumn:Ql,horizonScroll:As,tableLayout:Fc,rowClassName:Et,expandedRowClassName:so.expandedRowClassName,expandIcon:Dr,expandableType:Or,expandRowByClick:so.expandRowByClick,expandedRowRender:so.expandedRowRender,onTriggerExpand:ts,expandIconColumnIndex:so.expandIconColumnIndex,indentSize:so.indentSize,allColumnsFixedLeft:Ko.every(function(cs){return cs.fixed==="left"}),emptyNode:Ll,columns:Zo,flattenColumns:Ko,onColumnResize:mf,hoverStartRow:vr,hoverEndRow:or,onHover:So,rowExpandable:so.rowExpandable,onRow:Di,getRowKey:dr,expandedKeys:Do,childrenColumnName:Yr}},[Bo,ht,gi,id,_n,Gd,Zu,Fd,Er,ra,Ql,As,Fc,Et,so.expandedRowClassName,Dr,Or,so.expandRowByClick,so.expandedRowRender,ts,so.expandIconColumnIndex,so.indentSize,Ll,Zo,Ko,mf,vr,or,So,so.rowExpandable,Di,dr,Do,Yr]);return he.createElement(be.Provider,{value:ya},pl)}function lr(Ft){return se(Ni,Ft)}var Fi=lr();Fi.EXPAND_COLUMN=Me,Fi.INTERNAL_HOOKS=me,Fi.Column=ur,Fi.ColumnGroup=un,Fi.Summary=Ie;var $i=Fi,Lr=Ee(21881),On=xe(null),Kr=xe(null);function In(Ft,Ut,cn){var ht=Ut||1;return cn[Ft+ht]-(cn[Ft]||0)}function br(Ft){var Ut=Ft.rowInfo,cn=Ft.column,ht=Ft.colIndex,Ct=Ft.indent,Et=Ft.index,wn=Ft.renderIndex,fn=Ft.record,sn=Ft.style,Sn=Ft.className,xn=Ft.inverse,_n=Ft.getHeight,Hn=cn.render,ti=cn.dataIndex,Kn=cn.className,bi=cn.width,Vn=ge(Kr,["columnsOffset"]),vi=Vn.columnsOffset,ui=pn(Ut,cn,ht,Ct,Et),Ri=ui.key,Di=ui.fixedInfo,Gi=ui.appendCellNode,Oi=ui.additionalCellProps,Ii=Oi.style,cr=Oi.colSpan,ei=cr===void 0?1:cr,ji=Oi.rowSpan,Li=ji===void 0?1:ji,Ci=ht-1,Yi=In(Ci,ei,vi),gi=ei>1?bi-Yi:0,dr=(0,Ye.Z)((0,Ye.Z)((0,Ye.Z)({},Ii),sn),{},{flex:"0 0 ".concat(Yi,"px"),width:"".concat(Yi,"px"),marginRight:gi,pointerEvents:"auto"}),Xi=he.useMemo(function(){return xn?Li<=1:ei===0||Li===0||Li>1},[Li,ei,xn]);Xi?dr.visibility="hidden":xn&&(dr.height=_n==null?void 0:_n(Li));var Pi=Xi?function(){return null}:Hn,Zi={};return(Li===0||ei===0)&&(Zi.rowSpan=1,Zi.colSpan=1),he.createElement(bn,(0,le.Z)({className:at()(Kn,Sn),ellipsis:cn.ellipsis,align:cn.align,scope:cn.rowScope,component:"div",prefixCls:Ut.prefixCls,key:Ri,record:fn,index:Et,renderIndex:wn,dataIndex:ti,render:Pi,shouldCellUpdate:cn.shouldCellUpdate},Di,{appendNode:Gi,additionalProps:(0,Ye.Z)((0,Ye.Z)({},Oi),{},{style:dr},Zi)}))}var xo=br,Cr=["data","index","className","rowKey","style","extra","getHeight"],Fo=he.forwardRef(function(Ft,Ut){var cn=Ft.data,ht=Ft.index,Ct=Ft.className,Et=Ft.rowKey,wn=Ft.style,fn=Ft.extra,sn=Ft.getHeight,Sn=(0,Lt.Z)(Ft,Cr),xn=cn.record,_n=cn.indent,Hn=cn.index,ti=ge(be,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Kn=ti.scrollX,bi=ti.flattenColumns,Vn=ti.prefixCls,vi=ti.fixColumn,ui=ti.componentWidth,Ri=rn(xn,Et,ht,_n),Di=Ri.rowSupportExpand,Gi=Ri.expanded,Oi=Ri.rowProps,Ii=Ri.expandedRowRender,cr=Ri.expandedRowClassName,ei;if(Di&&Gi){var ji=Ii(xn,ht,_n+1,Gi),Li=cr==null?void 0:cr(xn,ht,_n),Ci={};vi&&(Ci={style:(0,Ge.Z)({},"--virtual-width","".concat(ui,"px"))});var Yi="".concat(Vn,"-expanded-row-cell");ei=he.createElement("div",{className:at()("".concat(Vn,"-expanded-row"),"".concat(Vn,"-expanded-row-level-").concat(_n+1),Li)},he.createElement(bn,{component:"div",prefixCls:Vn,className:at()(Yi,(0,Ge.Z)({},"".concat(Yi,"-fixed"),vi)),additionalProps:Ci},ji))}var gi=(0,Ye.Z)((0,Ye.Z)({},wn),{},{width:Kn});fn&&(gi.position="absolute",gi.pointerEvents="none");var dr=he.createElement("div",(0,le.Z)({},Oi,Sn,{ref:Di?null:Ut,className:at()(Ct,"".concat(Vn,"-row"),Oi==null?void 0:Oi.className,(0,Ge.Z)({},"".concat(Vn,"-row-extra"),fn)),style:(0,Ye.Z)((0,Ye.Z)({},gi),Oi==null?void 0:Oi.style)}),bi.map(function(Xi,Pi){return he.createElement(xo,{key:Pi,rowInfo:Ri,column:Xi,colIndex:Pi,indent:_n,index:ht,renderIndex:Hn,record:xn,inverse:fn,getHeight:sn})}));return Di?he.createElement("div",{ref:Ut},dr,ei):dr}),oo=ue(Fo),Ki=oo,Ji=he.forwardRef(function(Ft,Ut){var cn=Ft.data,ht=Ft.onScroll,Ct=ge(be,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),Et=Ct.flattenColumns,wn=Ct.onColumnResize,fn=Ct.getRowKey,sn=Ct.expandedKeys,Sn=Ct.prefixCls,xn=Ct.childrenColumnName,_n=Ct.emptyNode,Hn=Ct.scrollX,ti=ge(On),Kn=ti.scrollY,bi=ti.listItemHeight,Vn=he.useRef(),vi=Tt(cn,xn,sn,fn),ui=he.useMemo(function(){var ei=0;return Et.map(function(ji){var Li=ji.width,Ci=ji.key;return ei+=Li,[Ci,Li,ei]})},[Et]),Ri=he.useMemo(function(){return ui.map(function(ei){return ei[2]})},[ui]);he.useEffect(function(){ui.forEach(function(ei){var ji=(0,Be.Z)(ei,2),Li=ji[0],Ci=ji[1];wn(Li,Ci)})},[ui]),he.useImperativeHandle(Ut,function(){var ei={};return Object.defineProperty(ei,"scrollLeft",{get:function(){var Li;return((Li=Vn.current)===null||Li===void 0?void 0:Li.getScrollInfo().x)||0},set:function(Li){var Ci;(Ci=Vn.current)===null||Ci===void 0||Ci.scrollTo({left:Li})}}),ei});var Di=function(ji,Li){var Ci,Yi=(Ci=vi[Li])===null||Ci===void 0?void 0:Ci.record,gi=ji.onCell;if(gi){var dr,Xi=gi(Yi,Li);return(dr=Xi==null?void 0:Xi.rowSpan)!==null&&dr!==void 0?dr:1}return 1},Gi=function(ji){var Li=ji.start,Ci=ji.end,Yi=ji.getSize,gi=ji.offsetY;if(Ci<0)return null;for(var dr=Et.filter(function(Gr){return Di(Gr,Li)===0}),Xi=Li,Pi=function(Ar){if(dr=dr.filter(function(Xr){return Di(Xr,Ar)===0}),!dr.length)return Xi=Ar,"break"},Zi=Li;Zi>=0;Zi-=1){var vr=Pi(Zi);if(vr==="break")break}for(var or=Et.filter(function(Gr){return Di(Gr,Ci)!==1}),So=Ci,Mo=function(Ar){if(or=or.filter(function(Xr){return Di(Xr,Ar)!==1}),!or.length)return So=Math.max(Ar-1,Ci),"break"},es=Ci;es<vi.length;es+=1){var so=Mo(es);if(so==="break")break}for(var Or=[],Do=function(Ar){var Xr=vi[Ar];if(!Xr)return"continue";Et.some(function(Er){return Di(Er,Ar)>1})&&Or.push(Ar)},Dr=Xi;Dr<=So;Dr+=1)var Yr=Do(Dr);var ts=Or.map(function(Gr){var Ar=vi[Gr],Xr=fn(Ar.record,Gr),Er=function(ho){var Zo=Gr+ho-1,Ko=fn(vi[Zo].record,Zo),Jr=Yi(Xr,Ko);return Jr.bottom-Jr.top},ao=Yi(Xr);return he.createElement(Ki,{key:Gr,data:Ar,rowKey:Xr,index:Gr,style:{top:-gi+ao.top},extra:!0,getHeight:Er})});return ts},Oi=he.useMemo(function(){return{columnsOffset:Ri}},[Ri]),Ii="".concat(Sn,"-tbody"),cr;return vi.length?cr=he.createElement(Lr.Z,{fullHeight:!1,ref:Vn,className:at()(Ii,"".concat(Ii,"-virtual")),height:Kn,itemHeight:bi||24,data:vi,itemKey:function(ji){return fn(ji.record)},scrollWidth:Hn,onVirtualScroll:function(ji){var Li=ji.x;ht({scrollLeft:Li})},extraRender:Gi},function(ei,ji,Li){var Ci=fn(ei.record,ji);return he.createElement(Ki,(0,le.Z)({data:ei,rowKey:Ci,index:ji},Li))}):cr=he.createElement("div",{className:at()("".concat(Sn,"-placeholder"))},he.createElement(bn,{component:"div",prefixCls:Sn},_n)),he.createElement(Kr.Provider,{value:Oi},cr)}),pr=ue(Ji),kr=pr,hi=function(Ut,cn){var ht=cn.ref,Ct=cn.onScroll;return he.createElement(kr,{ref:ht,data:Ut,onScroll:Ct})},kt=100;function Pr(Ft){var Ut=Ft.columns,cn=Ft.scroll,ht=Ft.prefixCls,Ct=ht===void 0?ai:ht,Et=Ft.className,wn=Ft.listItemHeight,fn=cn||{},sn=fn.x,Sn=fn.y;typeof sn!="number"&&(sn=((Ut||[]).length+1)*kt),typeof Sn!="number"&&(Sn=500);var xn=he.useMemo(function(){return{scrollY:Sn,listItemHeight:wn}},[Sn,wn]);return he.createElement(On.Provider,{value:xn},he.createElement($i,(0,le.Z)({},Ft,{className:at()(Et,"".concat(Ct,"-virtual")),scroll:(0,Ye.Z)((0,Ye.Z)({},cn),{},{x:sn}),components:{body:hi},columns:Ut,internalHooks:me,tailor:!0})))}function _o(Ft){return se(Pr,Ft)}var Oo=_o(),wo=null;function yr(Ft){return null}var tr=yr;function Hr(Ft){return null}var Po=Hr,Tr=Ee(64002),Io=Ee(68031),qi=Ee(36355),Ui=Ee(93891),rr=Ee(19716),Yn=Ee(8628),Vr=Ee(31724),Eo=Ee(25700),rs=Ee(71418),Lo=Ee(88088);function is(Ft){return function(cn){let{prefixCls:ht,onExpand:Ct,record:Et,expanded:wn,expandable:fn}=cn;const sn=`${ht}-row-expand-icon`;return he.createElement("button",{type:"button",onClick:Sn=>{Ct(Et,Sn),Sn.stopPropagation()},className:at()(sn,{[`${sn}-spaced`]:!fn,[`${sn}-expanded`]:fn&&wn,[`${sn}-collapsed`]:fn&&!wn}),"aria-label":wn?Ft.collapse:Ft.expand,"aria-expanded":wn})}}var ms=is;function Ls(Ft,Ut){return"key"in Ft&&Ft.key!==void 0&&Ft.key!==null?Ft.key:Ft.dataIndex?Array.isArray(Ft.dataIndex)?Ft.dataIndex.join("."):Ft.dataIndex:Ut}function ws(Ft,Ut){return Ut?`${Ut}-${Ft}`:`${Ft}`}function ta(Ft,Ut){return typeof Ft=="function"?Ft(Ut):Ft}function aa(Ft,Ut){const cn=ta(Ft,Ut);return Object.prototype.toString.call(cn)==="[object Object]"?"":cn}var Tn={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"},Os=Tn,hl=Ee(88853),dl=function(Ut,cn){return he.createElement(hl.Z,(0,le.Z)({},Ut,{ref:cn,icon:Os}))},vs=he.forwardRef(dl),ja=vs,lu=Ee(56762);function Vl(Ft){const Ut=he.useRef(Ft),cn=(0,lu.Z)();return[()=>Ut.current,ht=>{Ut.current=ht,cn()}]}var uo=Ee(3113),_r=Ee(24905),na=Ee(38854),Rr=Ee(64165),no=Ee(20834),$r=Ee(40875),Ei=Ee(5112),ls=Ee(86914),Ms=Ee(21970),ba=Ee(92832);function za(Ft){let{value:Ut,onChange:cn,filterSearch:ht,tablePrefixCls:Ct,locale:Et}=Ft;return ht?he.createElement("div",{className:`${Ct}-filter-dropdown-search`},he.createElement(ba.default,{prefix:he.createElement(Ms.Z,null),placeholder:Et.filterSearchPlaceholder,onChange:cn,value:Ut,htmlSize:1,className:`${Ct}-filter-dropdown-search-input`})):null}var Ja=za,Si=Ee(85108);const fs=Ft=>{const{keyCode:Ut}=Ft;Ut===Si.Z.ENTER&&Ft.stopPropagation()};var Qa=he.forwardRef((Ft,Ut)=>he.createElement("div",{className:Ft.className,onClick:cn=>cn.stopPropagation(),onKeyDown:fs,ref:Ut},Ft.children));function wl(Ft){let Ut=[];return(Ft||[]).forEach(cn=>{let{value:ht,children:Ct}=cn;Ut.push(ht),Ct&&(Ut=[].concat((0,di.Z)(Ut),(0,di.Z)(wl(Ct))))}),Ut}function Il(Ft){return Ft.some(Ut=>{let{children:cn}=Ut;return cn})}function Fr(Ft,Ut){return typeof Ut=="string"||typeof Ut=="number"?Ut==null?void 0:Ut.toString().toLowerCase().includes(Ft.trim().toLowerCase()):!1}function nc(Ft){let{filters:Ut,prefixCls:cn,filteredKeys:ht,filterMultiple:Ct,searchValue:Et,filterSearch:wn}=Ft;return Ut.map((fn,sn)=>{const Sn=String(fn.value);if(fn.children)return{key:Sn||sn,label:fn.text,popupClassName:`${cn}-dropdown-submenu`,children:nc({filters:fn.children,prefixCls:cn,filteredKeys:ht,filterMultiple:Ct,searchValue:Et,filterSearch:wn})};const xn=Ct?_r.default:Ei.ZP,_n={key:fn.value!==void 0?Sn:sn,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)?_n:null:Fr(Et,fn.text)?_n:null:_n})}function Aa(Ft){var Ut,cn;const{tablePrefixCls:ht,prefixCls:Ct,column:Et,dropdownPrefixCls:wn,columnKey:fn,filterMultiple:sn,filterMode:Sn="menu",filterSearch:xn=!1,filterState:_n,triggerFilter:Hn,locale:ti,children:Kn,getPopupContainer:bi}=Ft,{filterDropdownOpen:Vn,onFilterDropdownOpenChange:vi,filterResetToDefaultFilteredValue:ui,defaultFilteredValue:Ri,filterDropdownVisible:Di,onFilterDropdownVisibleChange:Gi}=Et,[Oi,Ii]=he.useState(!1),cr=!!(_n&&(!((Ut=_n.filteredKeys)===null||Ut===void 0)&&Ut.length||_n.forceFiltered)),ei=Nr=>{Ii(Nr),vi==null||vi(Nr),Gi==null||Gi(Nr)},ji=(cn=Vn!=null?Vn:Di)!==null&&cn!==void 0?cn:Oi,Li=_n==null?void 0:_n.filteredKeys,[Ci,Yi]=Vl(Li||[]),gi=Nr=>{let{selectedKeys:ho}=Nr;Yi(ho)},dr=(Nr,ho)=>{let{node:Zo,checked:Ko}=ho;gi(sn?{selectedKeys:Nr}:{selectedKeys:Ko&&Zo.key?[Zo.key]:[]})};he.useEffect(()=>{Oi&&gi({selectedKeys:Li||[]})},[Li]);const[Xi,Pi]=he.useState([]),Zi=Nr=>{Pi(Nr)},[vr,or]=he.useState(""),So=Nr=>{const{value:ho}=Nr.target;or(ho)};he.useEffect(()=>{Oi||or("")},[Oi]);const Mo=Nr=>{const ho=Nr&&Nr.length?Nr:null;if(ho===null&&(!_n||!_n.filteredKeys)||(0,Le.Z)(ho,_n==null?void 0:_n.filteredKeys,!0))return null;Hn({column:Et,key:fn,filteredKeys:ho})},es=()=>{ei(!1),Mo(Ci())},so=function(){let{confirm:Nr,closeDropdown:ho}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};Nr&&Mo([]),ho&&ei(!1),or(""),Yi(ui?(Ri||[]).map(Zo=>String(Zo)):[])},Or=function(){let{closeDropdown:Nr}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};Nr&&ei(!1),Mo(Ci())},Do=Nr=>{Nr&&Li!==void 0&&Yi(Li||[]),ei(Nr),!Nr&&!Et.filterDropdown&&es()},Dr=at()({[`${wn}-menu-without-submenu`]:!Il(Et.filters||[])}),Yr=Nr=>{if(Nr.target.checked){const ho=wl(Et==null?void 0:Et.filters).map(Zo=>String(Zo));Yi(ho)}else Yi([])},ts=Nr=>{let{filters:ho}=Nr;return(ho||[]).map((Zo,Ko)=>{const Jr=String(Zo.value),Bo={title:Zo.text,key:Zo.value!==void 0?Jr:Ko};return Zo.children&&(Bo.children=ts({filters:Zo.children})),Bo})},Gr=Nr=>{var ho;return Object.assign(Object.assign({},Nr),{text:Nr.title,value:Nr.key,children:((ho=Nr.children)===null||ho===void 0?void 0:ho.map(Zo=>Gr(Zo)))||[]})};let Ar;if(typeof Et.filterDropdown=="function")Ar=Et.filterDropdown({prefixCls:`${wn}-custom`,setSelectedKeys:Nr=>gi({selectedKeys:Nr}),selectedKeys:Ci(),confirm:Or,clearFilters:so,filters:Et.filters,visible:ji,close:()=>{ei(!1)}});else if(Et.filterDropdown)Ar=Et.filterDropdown;else{const Nr=Ci()||[],ho=()=>(Et.filters||[]).length===0?he.createElement(Rr.Z,{image:Rr.Z.PRESENTED_IMAGE_SIMPLE,description:ti.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):Sn==="tree"?he.createElement(he.Fragment,null,he.createElement(Ja,{filterSearch:xn,value:vr,onChange:So,tablePrefixCls:ht,locale:ti}),he.createElement("div",{className:`${ht}-filter-dropdown-tree`},sn?he.createElement(_r.default,{checked:Nr.length===wl(Et.filters).length,indeterminate:Nr.length>0&&Nr.length<wl(Et.filters).length,className:`${ht}-filter-dropdown-checkall`,onChange:Yr},ti.filterCheckall):null,he.createElement(ls.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:sn,checkStrictly:!sn,className:`${wn}-menu`,onCheck:dr,checkedKeys:Nr,selectedKeys:Nr,showIcon:!1,treeData:ts({filters:Et.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:vr.trim()?Ko=>typeof xn=="function"?xn(vr,Gr(Ko)):Fr(vr,Ko.title):void 0}))):he.createElement(he.Fragment,null,he.createElement(Ja,{filterSearch:xn,value:vr,onChange:So,tablePrefixCls:ht,locale:ti}),he.createElement(no.default,{selectable:!0,multiple:sn,prefixCls:`${wn}-menu`,className:Dr,onSelect:gi,onDeselect:gi,selectedKeys:Nr,getPopupContainer:bi,openKeys:Xi,onOpenChange:Zi,items:nc({filters:Et.filters||[],filterSearch:xn,prefixCls:Ct,filteredKeys:Ci(),filterMultiple:sn,searchValue:vr})})),Zo=()=>ui?(0,Le.Z)((Ri||[]).map(Ko=>String(Ko)),Nr,!0):Nr.length===0;Ar=he.createElement(he.Fragment,null,ho(),he.createElement("div",{className:`${Ct}-dropdown-btns`},he.createElement(uo.ZP,{type:"link",size:"small",disabled:Zo(),onClick:()=>so()},ti.filterReset),he.createElement(uo.ZP,{type:"primary",size:"small",onClick:es},ti.filterConfirm)))}Et.filterDropdown&&(Ar=he.createElement($r.J,{selectable:void 0},Ar));const Xr=()=>he.createElement(Qa,{className:`${Ct}-dropdown`},Ar);let Er;typeof Et.filterIcon=="function"?Er=Et.filterIcon(cr):Et.filterIcon?Er=Et.filterIcon:Er=he.createElement(ja,null);const{direction:ao}=he.useContext(qi.E_);return he.createElement("div",{className:`${Ct}-column`},he.createElement("span",{className:`${ht}-column-title`},Kn),he.createElement(na.Z,{dropdownRender:Xr,trigger:["click"],open:ji,onOpenChange:Do,getPopupContainer:bi,placement:ao==="rtl"?"bottomLeft":"bottomRight"},he.createElement("span",{role:"button",tabIndex:-1,className:at()(`${Ct}-trigger`,{active:cr}),onClick:Nr=>{Nr.stopPropagation()}},Er)))}var Ha=Aa;function Ta(Ft,Ut,cn){let ht=[];return(Ft||[]).forEach((Ct,Et)=>{var wn;const fn=ws(Et,cn);if(Ct.filters||"filterDropdown"in Ct||"onFilter"in Ct)if("filteredValue"in Ct){let sn=Ct.filteredValue;"filterDropdown"in Ct||(sn=(wn=sn==null?void 0:sn.map(String))!==null&&wn!==void 0?wn:sn),ht.push({column:Ct,key:Ls(Ct,fn),filteredKeys:sn,forceFiltered:Ct.filtered})}else ht.push({column:Ct,key:Ls(Ct,fn),filteredKeys:Ut&&Ct.defaultFilteredValue?Ct.defaultFilteredValue:void 0,forceFiltered:Ct.filtered});"children"in Ct&&(ht=[].concat((0,di.Z)(ht),(0,di.Z)(Ta(Ct.children,Ut,fn))))}),ht}function $l(Ft,Ut,cn,ht,Ct,Et,wn,fn){return cn.map((sn,Sn)=>{const xn=ws(Sn,fn),{filterMultiple:_n=!0,filterMode:Hn,filterSearch:ti}=sn;let Kn=sn;if(Kn.filters||Kn.filterDropdown){const bi=Ls(Kn,xn),Vn=ht.find(vi=>{let{key:ui}=vi;return bi===ui});Kn=Object.assign(Object.assign({},Kn),{title:vi=>he.createElement(Ha,{tablePrefixCls:Ft,prefixCls:`${Ft}-filter`,dropdownPrefixCls:Ut,column:Kn,columnKey:bi,filterState:Vn,filterMultiple:_n,filterMode:Hn,filterSearch:ti,triggerFilter:Et,locale:Ct,getPopupContainer:wn},ta(sn.title,vi))})}return"children"in Kn&&(Kn=Object.assign(Object.assign({},Kn),{children:$l(Ft,Ut,Kn.children,ht,Ct,Et,wn,xn)})),Kn})}function _u(Ft){const Ut={};return Ft.forEach(cn=>{let{key:ht,filteredKeys:Ct,column:Et}=cn;const{filters:wn,filterDropdown:fn}=Et;if(fn)Ut[ht]=Ct||null;else if(Array.isArray(Ct)){const sn=wl(wn);Ut[ht]=sn.filter(Sn=>Ct.includes(String(Sn)))}else Ut[ht]=null}),Ut}function Ua(Ft,Ut){return Ut.reduce((cn,ht)=>{const{column:{onFilter:Ct,filters:Et},filteredKeys:wn}=ht;return Ct&&wn&&wn.length?cn.filter(fn=>wn.some(sn=>{const Sn=wl(Et),xn=Sn.findIndex(Hn=>String(Hn)===String(sn)),_n=xn!==-1?Sn[xn]:sn;return Ct(_n,fn)})):cn},Ft)}const Ga=Ft=>Ft.flatMap(Ut=>"children"in Ut?[Ut].concat((0,di.Z)(Ga(Ut.children||[]))):[Ut]);function Uu(Ft){let{prefixCls:Ut,dropdownPrefixCls:cn,mergedColumns:ht,onFilterChange:Ct,getPopupContainer:Et,locale:wn}=Ft;const fn=he.useMemo(()=>Ga(ht||[]),[ht]),[sn,Sn]=he.useState(()=>Ta(fn,!0)),xn=he.useMemo(()=>{const Kn=Ta(fn,!1);if(Kn.length===0)return Kn;let bi=!0,Vn=!0;if(Kn.forEach(vi=>{let{filteredKeys:ui}=vi;ui!==void 0?bi=!1:Vn=!1}),bi){const vi=(fn||[]).map((ui,Ri)=>Ls(ui,ws(Ri)));return sn.filter(ui=>{let{key:Ri}=ui;return vi.includes(Ri)}).map(ui=>{const Ri=fn[vi.findIndex(Di=>Di===ui.key)];return Object.assign(Object.assign({},ui),{column:Object.assign(Object.assign({},ui.column),Ri),forceFiltered:Ri.filtered})})}return Kn},[fn,sn]),_n=he.useMemo(()=>_u(xn),[xn]),Hn=Kn=>{const bi=xn.filter(Vn=>{let{key:vi}=Vn;return vi!==Kn.key});bi.push(Kn),Sn(bi),Ct(_u(bi),bi)};return[Kn=>$l(Ut,cn,Kn,xn,wn,Hn,Et),xn,_n]}var yc=Uu;function Eu(Ft,Ut,cn){const ht=he.useRef({});function Ct(Et){if(!ht.current||ht.current.data!==Ft||ht.current.childrenColumnName!==Ut||ht.current.getRowKey!==cn){let fn=function(sn){sn.forEach((Sn,xn)=>{const _n=cn(Sn,xn);wn.set(_n,Sn),Sn&&typeof Sn=="object"&&Ut in Sn&&fn(Sn[Ut]||[])})};const wn=new Map;fn(Ft),ht.current={data:Ft,childrenColumnName:Ut,kvMap:wn,getRowKey:cn}}return ht.current.kvMap.get(Et)}return[Ct]}var Dl=Ee(50371),Sc=function(Ft,Ut){var cn={};for(var ht in Ft)Object.prototype.hasOwnProperty.call(Ft,ht)&&Ut.indexOf(ht)<0&&(cn[ht]=Ft[ht]);if(Ft!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ct=0,ht=Object.getOwnPropertySymbols(Ft);Ct<ht.length;Ct++)Ut.indexOf(ht[Ct])<0&&Object.prototype.propertyIsEnumerable.call(Ft,ht[Ct])&&(cn[ht[Ct]]=Ft[ht[Ct]]);return cn};const Gu=10;function Lu(Ft,Ut){const cn={current:Ft.current,pageSize:Ft.pageSize};return Object.keys(Ut&&typeof Ut=="object"?Ut:{}).forEach(Ct=>{const Et=Ft[Ct];typeof Et!="function"&&(cn[Ct]=Et)}),cn}function bl(Ft,Ut,cn){const ht=cn&&typeof cn=="object"?cn:{},{total:Ct=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})),sn=(0,Dl.Z)(wn,Et,{total:Ct>0?Ct:Ft}),Sn=Math.ceil((Ct||Ft)/sn.pageSize);sn.current>Sn&&(sn.current=Sn||1);const xn=(Hn,ti)=>{fn({current:Hn!=null?Hn:1,pageSize:ti||sn.pageSize})},_n=(Hn,ti)=>{var Kn;cn&&((Kn=cn.onChange)===null||Kn===void 0||Kn.call(cn,Hn,ti)),xn(Hn,ti),Ut(Hn,ti||(sn==null?void 0:sn.pageSize))};return cn===!1?[{},()=>{}]:[Object.assign(Object.assign({},sn),{onChange:_n}),xn]}var th=bl,xc=Ee(18290),uu=Ee(35654),ro=Ee(90782),Uo=Ee(71430),La=Ee(35788);const ia={},Is="SELECT_ALL",bs="SELECT_INVERT",Ts="SELECT_NONE",Gs=[],Ws=(Ft,Ut)=>{let cn=[];return(Ut||[]).forEach(ht=>{cn.push(ht),ht&&typeof ht=="object"&&Ft in ht&&(cn=[].concat((0,di.Z)(cn),(0,di.Z)(Ws(Ft,ht[Ft]))))}),cn};var Rl=(Ft,Ut)=>{const{preserveSelectedRowKeys:cn,selectedRowKeys:ht,defaultSelectedRowKeys:Ct,getCheckboxProps:Et,onChange:wn,onSelect:fn,onSelectAll:sn,onSelectInvert:Sn,onSelectNone:xn,onSelectMultiple:_n,columnWidth:Hn,type:ti,selections:Kn,fixed:bi,renderCell:Vn,hideSelectAll:vi,checkStrictly:ui=!0}=Ut||{},{prefixCls:Ri,data:Di,pageData:Gi,getRecordByKey:Oi,getRowKey:Ii,expandType:cr,childrenColumnName:ei,locale:ji,getPopupContainer:Li}=Ft,[Ci,Yi]=(0,La.Z)(ht||Ct||Gs,{value:ht}),gi=he.useRef(new Map),dr=(0,he.useCallback)(Gr=>{if(cn){const Ar=new Map;Gr.forEach(Xr=>{let Er=Oi(Xr);!Er&&gi.current.has(Xr)&&(Er=gi.current.get(Xr)),Ar.set(Xr,Er)}),gi.current=Ar}},[Oi,cn]);he.useEffect(()=>{dr(Ci)},[Ci]);const{keyEntities:Xi}=(0,he.useMemo)(()=>{if(ui)return{keyEntities:null};let Gr=Di;if(cn){const Ar=new Set(Di.map((Er,ao)=>Ii(Er,ao))),Xr=Array.from(gi.current).reduce((Er,ao)=>{let[Nr,ho]=ao;return Ar.has(Nr)?Er:Er.concat(ho)},[]);Gr=[].concat((0,di.Z)(Gr),(0,di.Z)(Xr))}return(0,Uo.I8)(Gr,{externalGetKey:Ii,childrenPropName:ei})},[Di,Ii,ui,ei,cn]),Pi=(0,he.useMemo)(()=>Ws(ei,Gi),[ei,Gi]),Zi=(0,he.useMemo)(()=>{const Gr=new Map;return Pi.forEach((Ar,Xr)=>{const Er=Ii(Ar,Xr),ao=(Et?Et(Ar):null)||{};Gr.set(Er,ao)}),Gr},[Pi,Ii,Et]),vr=(0,he.useCallback)(Gr=>{var Ar;return!!(!((Ar=Zi.get(Ii(Gr)))===null||Ar===void 0)&&Ar.disabled)},[Zi,Ii]),[or,So]=(0,he.useMemo)(()=>{if(ui)return[Ci||[],[]];const{checkedKeys:Gr,halfCheckedKeys:Ar}=(0,ro.S)(Ci,!0,Xi,vr);return[Gr||[],Ar]},[Ci,ui,Xi,vr]),Mo=(0,he.useMemo)(()=>{const Gr=ti==="radio"?or.slice(0,1):or;return new Set(Gr)},[or,ti]),es=(0,he.useMemo)(()=>ti==="radio"?new Set:new Set(So),[So,ti]),[so,Or]=(0,he.useState)(null);he.useEffect(()=>{Ut||Yi(Gs)},[!!Ut]);const Do=(0,he.useCallback)((Gr,Ar)=>{let Xr,Er;dr(Gr),cn?(Xr=Gr,Er=Gr.map(ao=>gi.current.get(ao))):(Xr=[],Er=[],Gr.forEach(ao=>{const Nr=Oi(ao);Nr!==void 0&&(Xr.push(ao),Er.push(Nr))})),Yi(Xr),wn==null||wn(Xr,Er,{type:Ar})},[Yi,Oi,wn,cn]),Dr=(0,he.useCallback)((Gr,Ar,Xr,Er)=>{if(fn){const ao=Xr.map(Nr=>Oi(Nr));fn(Oi(Gr),Ar,ao,Er)}Do(Xr,"single")},[fn,Oi,Do]),Yr=(0,he.useMemo)(()=>!Kn||vi?null:(Kn===!0?[Is,bs,Ts]:Kn).map(Ar=>Ar===Is?{key:"all",text:ji.selectionAll,onSelect(){Do(Di.map((Xr,Er)=>Ii(Xr,Er)).filter(Xr=>{const Er=Zi.get(Xr);return!(Er!=null&&Er.disabled)||Mo.has(Xr)}),"all")}}:Ar===bs?{key:"invert",text:ji.selectInvert,onSelect(){const Xr=new Set(Mo);Gi.forEach((ao,Nr)=>{const ho=Ii(ao,Nr),Zo=Zi.get(ho);Zo!=null&&Zo.disabled||(Xr.has(ho)?Xr.delete(ho):Xr.add(ho))});const Er=Array.from(Xr);Sn&&Sn(Er),Do(Er,"invert")}}:Ar===Ts?{key:"none",text:ji.selectNone,onSelect(){xn==null||xn(),Do(Array.from(Mo).filter(Xr=>{const Er=Zi.get(Xr);return Er==null?void 0:Er.disabled}),"none")}}:Ar).map(Ar=>Object.assign(Object.assign({},Ar),{onSelect:function(){for(var Xr,Er,ao=arguments.length,Nr=new Array(ao),ho=0;ho<ao;ho++)Nr[ho]=arguments[ho];(Er=Ar.onSelect)===null||Er===void 0||(Xr=Er).call.apply(Xr,[Ar].concat(Nr)),Or(null)}})),[Kn,Mo,Gi,Ii,Sn,Do]);return[(0,he.useCallback)(Gr=>{var Ar;if(!Ut)return Gr.filter(Xo=>Xo!==ia);let Xr=(0,di.Z)(Gr);const Er=new Set(Mo),ao=Pi.map(Ii).filter(Xo=>!Zi.get(Xo).disabled),Nr=ao.every(Xo=>Er.has(Xo)),ho=ao.some(Xo=>Er.has(Xo)),Zo=()=>{const Xo=[];Nr?ao.forEach(Ss=>{Er.delete(Ss),Xo.push(Ss)}):ao.forEach(Ss=>{Er.has(Ss)||(Er.add(Ss),Xo.push(Ss))});const Jo=Array.from(Er);sn==null||sn(!Nr,Jo.map(Ss=>Oi(Ss)),Xo.map(Ss=>Oi(Ss))),Do(Jo,"all"),Or(null)};let Ko;if(ti!=="radio"){let Xo;if(Yr){const zo={getPopupContainer:Li,items:Yr.map((ks,Pa)=>{const{key:_l,text:Xl,onSelect:Fl}=ks;return{key:_l!=null?_l:Pa,onClick:()=>{Fl==null||Fl(ao)},label:Xl}})};Xo=he.createElement("div",{className:`${Ri}-selection-extra`},he.createElement(na.Z,{menu:zo,getPopupContainer:Li},he.createElement("span",null,he.createElement(xc.Z,null))))}const Jo=Pi.map((zo,ks)=>{const Pa=Ii(zo,ks),_l=Zi.get(Pa)||{};return Object.assign({checked:Er.has(Pa)},_l)}).filter(zo=>{let{disabled:ks}=zo;return ks}),Ss=!!Jo.length&&Jo.length===Pi.length,Es=Ss&&Jo.every(zo=>{let{checked:ks}=zo;return ks}),pa=Ss&&Jo.some(zo=>{let{checked:ks}=zo;return ks});Ko=!vi&&he.createElement("div",{className:`${Ri}-selection`},he.createElement(_r.default,{checked:Ss?Es:!!Pi.length&&Nr,indeterminate:Ss?!Es&&pa:!Nr&&ho,onChange:Zo,disabled:Pi.length===0||Ss,"aria-label":Xo?"Custom selection":"Select all",skipGroup:!0}),Xo)}let Jr;ti==="radio"?Jr=(Xo,Jo,Ss)=>{const Es=Ii(Jo,Ss),pa=Er.has(Es);return{node:he.createElement(Ei.ZP,Object.assign({},Zi.get(Es),{checked:pa,onClick:zo=>zo.stopPropagation(),onChange:zo=>{Er.has(Es)||Dr(Es,!0,[Es],zo.nativeEvent)}})),checked:pa}}:Jr=(Xo,Jo,Ss)=>{var Es;const pa=Ii(Jo,Ss),zo=Er.has(pa),ks=es.has(pa),Pa=Zi.get(pa);let _l;return cr==="nest"?_l=ks:_l=(Es=Pa==null?void 0:Pa.indeterminate)!==null&&Es!==void 0?Es:ks,{node:he.createElement(_r.default,Object.assign({},Pa,{indeterminate:_l,checked:zo,skipGroup:!0,onClick:Xl=>Xl.stopPropagation(),onChange:Xl=>{let{nativeEvent:Fl}=Xl;const{shiftKey:hu}=Fl;let du=-1,Jl=-1;if(hu&&ui){const ds=new Set([so,pa]);ao.some((Oa,ra)=>{if(ds.has(Oa))if(du===-1)du=ra;else return Jl=ra,!0;return!1})}if(Jl!==-1&&du!==Jl&&ui){const ds=ao.slice(du,Jl+1),Oa=[];zo?ds.forEach(As=>{Er.has(As)&&(Oa.push(As),Er.delete(As))}):ds.forEach(As=>{Er.has(As)||(Oa.push(As),Er.add(As))});const ra=Array.from(Er);_n==null||_n(!zo,ra.map(As=>Oi(As)),Oa.map(As=>Oi(As))),Do(ra,"multiple")}else{const ds=or;if(ui){const Oa=zo?(0,uu._5)(ds,pa):(0,uu.L0)(ds,pa);Dr(pa,!zo,Oa,Fl)}else{const Oa=(0,ro.S)([].concat((0,di.Z)(ds),[pa]),!0,Xi,vr),{checkedKeys:ra,halfCheckedKeys:As}=Oa;let Ql=ra;if(zo){const _c=new Set(ra);_c.delete(pa),Ql=(0,ro.S)(Array.from(_c),{checked:!1,halfCheckedKeys:As},Xi,vr).checkedKeys}Dr(pa,!zo,Ql,Fl)}}Or(zo?null:pa)}})),checked:zo}};const Bo=(Xo,Jo,Ss)=>{const{node:Es,checked:pa}=Jr(Xo,Jo,Ss);return Vn?Vn(pa,Jo,Ss,Es):Es};if(!Xr.includes(ia))if(Xr.findIndex(Xo=>{var Jo;return((Jo=Xo[ir])===null||Jo===void 0?void 0:Jo.columnType)==="EXPAND_COLUMN"})===0){const[Xo,...Jo]=Xr;Xr=[Xo,ia].concat((0,di.Z)(Jo))}else Xr=[ia].concat((0,di.Z)(Xr));const Cs=Xr.indexOf(ia);Xr=Xr.filter((Xo,Jo)=>Xo!==ia||Jo===Cs);const ko=Xr[Cs-1],Yo=Xr[Cs+1];let ys=bi;ys===void 0&&((Yo==null?void 0:Yo.fixed)!==void 0?ys=Yo.fixed:(ko==null?void 0:ko.fixed)!==void 0&&(ys=ko.fixed)),ys&&ko&&((Ar=ko[ir])===null||Ar===void 0?void 0:Ar.columnType)==="EXPAND_COLUMN"&&ko.fixed===void 0&&(ko.fixed=ys);const Ys=at()(`${Ri}-selection-col`,{[`${Ri}-selection-col-with-dropdown`]:Kn&&ti==="checkbox"}),Pl={fixed:ys,width:Hn,className:`${Ri}-selection-column`,title:Ut.columnTitle||Ko,render:Bo,onCell:Ut.onCell,[ir]:{className:Ys}};return Xr.map(Xo=>Xo===ia?Pl:Xo)},[Ii,Pi,Ut,or,Mo,es,Hn,Yr,cr,so,Zi,_n,Dr,vr]),Mo]},Ds=Ee(35323),xh=Ee(19155),nh=Ee(6848);const wc="ascend",mr="descend";function bc(Ft){return typeof Ft.sorter=="object"&&typeof Ft.sorter.multiple=="number"?Ft.sorter.multiple:!1}function on(Ft){return typeof Ft=="function"?Ft:Ft&&typeof Ft=="object"&&Ft.compare?Ft.compare:!1}function Qn(Ft,Ut){return Ut?Ft[Ft.indexOf(Ut)+1]:Ft[0]}function wh(Ft,Ut,cn){let ht=[];function Ct(Et,wn){ht.push({column:Et,key:Ls(Et,wn),multiplePriority:bc(Et),sortOrder:Et.sortOrder})}return(Ft||[]).forEach((Et,wn)=>{const fn=ws(wn,cn);Et.children?("sortOrder"in Et&&Ct(Et,fn),ht=[].concat((0,di.Z)(ht),(0,di.Z)(wh(Et.children,Ut,fn)))):Et.sorter&&("sortOrder"in Et?Ct(Et,fn):Ut&&Et.defaultSortOrder&&ht.push({column:Et,key:Ls(Et,fn),multiplePriority:bc(Et),sortOrder:Et.defaultSortOrder}))}),ht}function Qh(Ft,Ut,cn,ht,Ct,Et,wn,fn){return(Ut||[]).map((sn,Sn)=>{const xn=ws(Sn,fn);let _n=sn;if(_n.sorter){const Hn=_n.sortDirections||Ct,ti=_n.showSorterTooltip===void 0?wn:_n.showSorterTooltip,Kn=Ls(_n,xn),bi=cn.find(cr=>{let{key:ei}=cr;return ei===Kn}),Vn=bi?bi.sortOrder:null,vi=Qn(Hn,Vn);let ui;if(sn.sortIcon)ui=sn.sortIcon({sortOrder:Vn});else{const cr=Hn.includes(wc)&&he.createElement(xh.Z,{className:at()(`${Ft}-column-sorter-up`,{active:Vn===wc})}),ei=Hn.includes(mr)&&he.createElement(Ds.Z,{className:at()(`${Ft}-column-sorter-down`,{active:Vn===mr})});ui=he.createElement("span",{className:at()(`${Ft}-column-sorter`,{[`${Ft}-column-sorter-full`]:!!(cr&&ei)})},he.createElement("span",{className:`${Ft}-column-sorter-inner`,"aria-hidden":"true"},cr,ei))}const{cancelSort:Ri,triggerAsc:Di,triggerDesc:Gi}=Et||{};let Oi=Ri;vi===mr?Oi=Gi:vi===wc&&(Oi=Di);const Ii=typeof ti=="object"?ti:{title:Oi};_n=Object.assign(Object.assign({},_n),{className:at()(_n.className,{[`${Ft}-column-sort`]:Vn}),title:cr=>{const ei=he.createElement("div",{className:`${Ft}-column-sorters`},he.createElement("span",{className:`${Ft}-column-title`},ta(sn.title,cr)),ui);return ti?he.createElement(nh.Z,Object.assign({},Ii),ei):ei},onHeaderCell:cr=>{const ei=sn.onHeaderCell&&sn.onHeaderCell(cr)||{},ji=ei.onClick,Li=ei.onKeyDown;ei.onClick=gi=>{ht({column:sn,key:Kn,sortOrder:vi,multiplePriority:bc(sn)}),ji==null||ji(gi)},ei.onKeyDown=gi=>{gi.keyCode===Si.Z.ENTER&&(ht({column:sn,key:Kn,sortOrder:vi,multiplePriority:bc(sn)}),Li==null||Li(gi))};const Ci=aa(sn.title,{}),Yi=Ci==null?void 0:Ci.toString();return Vn?ei["aria-sort"]=Vn==="ascend"?"ascending":"descending":ei["aria-label"]=Yi||"",ei.className=at()(ei.className,`${Ft}-column-has-sorters`),ei.tabIndex=0,sn.ellipsis&&(ei.title=(Ci!=null?Ci:"").toString()),ei}})}return"children"in _n&&(_n=Object.assign(Object.assign({},_n),{children:Qh(Ft,_n.children,cn,ht,Ct,Et,wn,xn)})),_n})}function Mu(Ft){const{column:Ut,sortOrder:cn}=Ft;return{column:Ut,order:cn,field:Ut.dataIndex,columnKey:Ut.key}}function Tu(Ft){const Ut=Ft.filter(cn=>{let{sortOrder:ht}=cn;return ht}).map(Mu);return Ut.length===0&&Ft.length?Object.assign(Object.assign({},Mu(Ft[Ft.length-1])),{column:void 0}):Ut.length<=1?Ut[0]||{}:Ut}function Wu(Ft,Ut,cn){const ht=Ut.slice().sort((wn,fn)=>fn.multiplePriority-wn.multiplePriority),Ct=Ft.slice(),Et=ht.filter(wn=>{let{column:{sorter:fn},sortOrder:sn}=wn;return on(fn)&&sn});return Et.length?Ct.sort((wn,fn)=>{for(let sn=0;sn<Et.length;sn+=1){const Sn=Et[sn],{column:{sorter:xn},sortOrder:_n}=Sn,Hn=on(xn);if(Hn&&_n){const ti=Hn(wn,fn,_n);if(ti!==0)return _n===wc?ti:-ti}}return 0}).map(wn=>{const fn=wn[cn];return fn?Object.assign(Object.assign({},wn),{[cn]:Wu(fn,Ut,cn)}):wn}):Ct}function bh(Ft){let{prefixCls:Ut,mergedColumns:cn,onSorterChange:ht,sortDirections:Ct,tableLocale:Et,showSorterTooltip:wn}=Ft;const[fn,sn]=he.useState(wh(cn,!0)),Sn=he.useMemo(()=>{let Kn=!0;const bi=wh(cn,!1);if(!bi.length)return fn;const Vn=[];function vi(Ri){Kn?Vn.push(Ri):Vn.push(Object.assign(Object.assign({},Ri),{sortOrder:null}))}let ui=null;return bi.forEach(Ri=>{ui===null?(vi(Ri),Ri.sortOrder&&(Ri.multiplePriority===!1?Kn=!1:ui=!0)):(ui&&Ri.multiplePriority!==!1||(Kn=!1),vi(Ri))}),Vn},[cn,fn]),xn=he.useMemo(()=>{const Kn=Sn.map(bi=>{let{column:Vn,sortOrder:vi}=bi;return{column:Vn,order:vi}});return{sortColumns:Kn,sortColumn:Kn[0]&&Kn[0].column,sortOrder:Kn[0]&&Kn[0].order}},[Sn]);function _n(Kn){let bi;Kn.multiplePriority===!1||!Sn.length||Sn[0].multiplePriority===!1?bi=[Kn]:bi=[].concat((0,di.Z)(Sn.filter(Vn=>{let{key:vi}=Vn;return vi!==Kn.key})),[Kn]),sn(bi),ht(Tu(bi),bi)}return[Kn=>Qh(Ut,Kn,Sn,_n,Ct,Et,wn),Sn,xn,()=>Tu(Sn)]}function Cc(Ft,Ut){return Ft.map(cn=>{const ht=Object.assign({},cn);return ht.title=ta(cn.title,Ut),"children"in ht&&(ht.children=Cc(ht.children,Ut)),ht})}function Zs(Ft){return[he.useCallback(cn=>Cc(cn,Ft),[Ft])]}var Zr=lr((Ft,Ut)=>{const{_renderTimes:cn}=Ft,{_renderTimes:ht}=Ut;return cn!==ht}),Na=_o((Ft,Ut)=>{const{_renderTimes:cn}=Ft,{_renderTimes:ht}=Ut;return cn!==ht}),Ks=Ee(64993),_s=Ee(17313),bo=Ee(83116),fa=Ee(37613),ss=Ft=>{const{componentCls:Ut}=Ft,cn=`${Ft.lineWidth}px ${Ft.lineType} ${Ft.tableBorderColor}`,ht=(Ct,Et,wn)=>({[`&${Ut}-${Ct}`]:{[`> ${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+Ft.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:`-${Ft.tablePaddingVertical}px -${Ft.tablePaddingHorizontal+Ft.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:Ft.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",Ft.tablePaddingVerticalMiddle,Ft.tablePaddingHorizontalMiddle)),ht("small",Ft.tablePaddingVerticalSmall,Ft.tablePaddingHorizontalSmall)),{[`> ${Ut}-footer`]:{border:cn,borderTop:0}}),[`${Ut}-cell`]:{[`${Ut}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${Ft.lineWidth}px 0 ${Ft.lineWidth}px ${Ft.tableHeaderBg}`}},[`${Ut}-bordered ${Ut}-cell-scrollbar`]:{borderInlineEnd:cn}}}},Ca=Ft=>{const{componentCls:Ut}=Ft;return{[`${Ut}-wrapper`]:{[`${Ut}-cell-ellipsis`]:Object.assign(Object.assign({},_s.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=Ft=>{const{componentCls:Ut}=Ft;return{[`${Ut}-wrapper`]:{[`${Ut}-tbody > tr${Ut}-placeholder`]:{textAlign:"center",color:Ft.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:Ft.colorBgContainer}}}}},Wa=Ee(15969),ps=Ft=>{const{componentCls:Ut,antCls:cn,controlInteractiveSize:ht,motionDurationSlow:Ct,lineWidth:Et,paddingXS:wn,lineType:fn,tableBorderColor:sn,tableExpandIconBg:Sn,tableExpandColumnWidth:xn,borderRadius:_n,fontSize:Hn,fontSizeSM:ti,lineHeight:Kn,tablePaddingVertical:bi,tablePaddingHorizontal:Vn,tableExpandedRowBg:vi,paddingXXS:ui}=Ft,Ri=ht/2-Et,Di=Ri*2+Et*3,Gi=`${Et}px ${fn} ${sn}`,Oi=ui-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,Wa.N)(Ft)),{position:"relative",float:"left",boxSizing:"border-box",width:Di,height:Di,padding:0,color:"inherit",lineHeight:`${Di}px`,background:Sn,border:Gi,borderRadius:_n,transform:`scale(${ht/Di})`,transition:`all ${Ct}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${Ct} ease-out`,content:'""'},"&::before":{top:Ri,insetInlineEnd:Oi,insetInlineStart:Oi,height:Et},"&::after":{top:Oi,bottom:Oi,insetInlineStart:Ri,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:(Hn*Kn-Et*3)/2-Math.ceil((ti*1.4-Et*3)/2),marginInlineEnd:wn},[`tr${Ut}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:vi}},[`${cn}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${Ut}-expanded-row-fixed`]:{position:"relative",margin:`-${bi}px -${Vn}px`,padding:`${bi}px ${Vn}px`}}}},Rs=Ft=>{const{componentCls:Ut,antCls:cn,iconCls:ht,tableFilterDropdownWidth:Ct,tableFilterDropdownSearchWidth:Et,paddingXXS:wn,paddingXS:fn,colorText:sn,lineWidth:Sn,lineType:xn,tableBorderColor:_n,tableHeaderIconColor:Hn,fontSizeSM:ti,tablePaddingHorizontal:Kn,borderRadius:bi,motionDurationSlow:Vn,colorTextDescription:vi,colorPrimary:ui,tableHeaderFilterActiveBg:Ri,colorTextDisabled:Di,tableFilterDropdownBg:Gi,tableFilterDropdownHeight:Oi,controlItemBgHover:Ii,controlItemBgActive:cr,boxShadowSecondary:ei,filterDropdownMenuBg:ji}=Ft,Li=`${cn}-dropdown`,Ci=`${Ut}-filter-dropdown`,Yi=`${cn}-tree`,gi=`${Sn}px ${xn} ${_n}`;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 ${-Kn/2}px`,padding:`0 ${wn}px`,color:Hn,fontSize:ti,borderRadius:bi,cursor:"pointer",transition:`all ${Vn}`,"&:hover":{color:vi,background:Ri},"&.active":{color:ui}}}},{[`${cn}-dropdown`]:{[Ci]:Object.assign(Object.assign({},(0,_s.Wf)(Ft)),{minWidth:Ct,backgroundColor:Gi,borderRadius:bi,boxShadow:ei,overflow:"hidden",[`${Li}-menu`]:{maxHeight:Oi,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:ji,"&:empty::after":{display:"block",padding:`${fn}px 0`,color:Di,fontSize:ti,textAlign:"center",content:'"Not Found"'}},[`${Ci}-tree`]:{paddingBlock:`${fn}px 0`,paddingInline:fn,[Yi]:{padding:0},[`${Yi}-treenode ${Yi}-node-content-wrapper:hover`]:{backgroundColor:Ii},[`${Yi}-treenode-checkbox-checked ${Yi}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:cr}}},[`${Ci}-search`]:{padding:fn,borderBottom:gi,"&-input":{input:{minWidth:Et},[ht]:{color:Di}}},[`${Ci}-checkall`]:{width:"100%",marginBottom:wn,marginInlineStart:wn},[`${Ci}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${fn-Sn}px ${fn}px`,overflow:"hidden",borderTop:gi}})}},{[`${cn}-dropdown ${Ci}, ${Ci}-submenu`]:{[`${cn}-checkbox-wrapper + span`]:{paddingInlineStart:fn,color:sn},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},Rc=Ft=>{const{componentCls:Ut,lineWidth:cn,colorSplit:ht,motionDurationSlow:Ct,zIndexTableFixed:Et,tableBg:wn,zIndexTableSticky:fn}=Ft,sn=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 ${Ct}`,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 ${Ct}`,content:'""',pointerEvents:"none"},[`${Ut}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:fn+1,width:30,transition:`box-shadow ${Ct}`,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 ${sn}`}},[`
|
|
|
${Ut}-cell-fix-left-first::after,
|
|
|
${Ut}-cell-fix-left-last::after
|
|
|
`]:{boxShadow:`inset 10px 0 8px -8px ${sn}`},[`${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 ${sn}`}},[`
|
|
|
${Ut}-cell-fix-right-first::after,
|
|
|
${Ut}-cell-fix-right-last::after
|
|
|
`]:{boxShadow:`inset -10px 0 8px -8px ${sn}`}}}}},Ad=Ft=>{const{componentCls:Ut,antCls:cn}=Ft;return{[`${Ut}-wrapper`]:{[`${Ut}-pagination${cn}-pagination`]:{margin:`${Ft.margin}px 0`},[`${Ut}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:Ft.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},Nd=Ft=>{const{componentCls:Ut,tableRadius:cn}=Ft;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=Ft=>{const{componentCls:Ut}=Ft;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=Ft=>{const{componentCls:Ut,antCls:cn,iconCls:ht,fontSizeIcon:Ct,padding:Et,paddingXS:wn,tableHeaderIconColor:fn,tableHeaderIconColorHover:sn,tableSelectionColumnWidth:Sn}=Ft;return{[`${Ut}-wrapper`]:{[`${Ut}-selection-col`]:{width:Sn,[`&${Ut}-selection-col-with-dropdown`]:{width:Sn+Ct+Et/4}},[`${Ut}-bordered ${Ut}-selection-col`]:{width:Sn+wn*2,[`&${Ut}-selection-col-with-dropdown`]:{width:Sn+Ct+Et/4+wn*2}},[`
|
|
|
table tr th${Ut}-selection-column,
|
|
|
table tr td${Ut}-selection-column
|
|
|
`]:{paddingInlineEnd:Ft.paddingXS,paddingInlineStart:Ft.paddingXS,textAlign:"center",[`${cn}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${Ut}-selection-column${Ut}-cell-fix-left`]:{zIndex:Ft.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 ${Ft.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${Ft.tablePaddingHorizontal/4}px`,[ht]:{color:fn,fontSize:Ct,verticalAlign:"baseline","&:hover":{color:sn}}}}}},io=Ft=>{const{componentCls:Ut}=Ft,cn=(ht,Ct,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:`${Ct}px ${Et}px`},[`${Ut}-filter-trigger`]:{marginInlineEnd:`-${Et/2}px`},[`${Ut}-expanded-row-fixed`]:{margin:`-${Ct}px -${Et}px`},[`${Ut}-tbody`]:{[`${Ut}-wrapper:only-child ${Ut}`]:{marginBlock:`-${Ct}px`,marginInline:`${Ft.tableExpandColumnWidth-Et}px -${Et}px`}},[`${Ut}-selection-column`]:{paddingInlineStart:`${Et/4}px`}}});return{[`${Ut}-wrapper`]:Object.assign(Object.assign({},cn("middle",Ft.tablePaddingVerticalMiddle,Ft.tablePaddingHorizontalMiddle,Ft.tableFontSizeMiddle)),cn("small",Ft.tablePaddingVerticalSmall,Ft.tablePaddingHorizontalSmall,Ft.tableFontSizeSmall))}},ku=Ft=>{const{componentCls:Ut,marginXXS:cn,fontSizeIcon:ht,tableHeaderIconColor:Ct,tableHeaderIconColorHover:Et}=Ft;return{[`${Ut}-wrapper`]:{[`${Ut}-thead th${Ut}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${Ft.motionDurationSlow}`,"&:hover":{background:Ft.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:Ft.colorPrimary},[`
|
|
|
&${Ut}-cell-fix-left:hover,
|
|
|
&${Ut}-cell-fix-right:hover
|
|
|
`]:{background:Ft.tableFixedHeaderSortActiveBg}},[`${Ut}-thead th${Ut}-column-sort`]:{background:Ft.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${Ut}-column-sort`]:{background:Ft.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:Ct,fontSize:0,transition:`color ${Ft.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:ht,"&.active":{color:Ft.colorPrimary}},[`${Ut}-column-sorter-up + ${Ut}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${Ut}-column-sorters:hover ${Ut}-column-sorter`]:{color:Et}}}},Au=Ft=>{const{componentCls:Ut,opacityLoading:cn,tableScrollThumbBg:ht,tableScrollThumbBgHover:Ct,tableScrollThumbSize:Et,tableScrollBg:wn,zIndexTableSticky:fn,stickyScrollBarBorderRadius:sn}=Ft,Sn=`${Ft.lineWidth}px ${Ft.lineType} ${Ft.tableBorderColor}`;return{[`${Ut}-wrapper`]:{[`${Ut}-sticky`]:{"&-holder":{position:"sticky",zIndex:fn,background:Ft.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:sn,transition:`all ${Ft.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:Ct}}}}}}},cu=Ft=>{const{componentCls:Ut,lineWidth:cn,tableBorderColor:ht}=Ft,Ct=`${cn}px ${Ft.lineType} ${ht}`;return{[`${Ut}-wrapper`]:{[`${Ut}-summary`]:{position:"relative",zIndex:Ft.zIndexTableFixed,background:Ft.tableBg,"> tr":{"> th, > td":{borderBottom:Ct}}},[`div${Ut}-summary`]:{boxShadow:`0 -${cn}px 0 ${ht}`}}}},hs=Ft=>{const{componentCls:Ut}=Ft,cn=`${Ft.lineWidth}px ${Ft.lineType} ${Ft.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) - ${Ft.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:-Ft.lineWidth,borderInlineStart:cn}}}}}}};const Bs=Ft=>{const{componentCls:Ut,fontWeightStrong:cn,tablePaddingVertical:ht,tablePaddingHorizontal:Ct,lineWidth:Et,lineType:wn,tableBorderColor:fn,tableFontSize:sn,tableBg:Sn,tableRadius:xn,tableHeaderTextColor:_n,motionDurationMid:Hn,tableHeaderBg:ti,tableHeaderCellSplitColor:Kn,tableRowHoverBg:bi,tableSelectedRowBg:Vn,tableSelectedRowHoverBg:vi,tableFooterTextColor:ui,tableFooterBg:Ri,paddingContentVerticalLG:Di}=Ft,Gi=`${Et}px ${wn} ${fn}`;return{[`${Ut}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,_s.dF)()),{[Ut]:Object.assign(Object.assign({},(0,_s.Wf)(Ft)),{fontSize:sn,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:`${Di}px ${Ct}px`,overflowWrap:"break-word"},[`${Ut}-title`]:{padding:`${ht}px ${Ct}px`},[`${Ut}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:_n,fontWeight:cn,textAlign:"start",background:ti,borderBottom:Gi,transition:`background ${Hn} 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:Kn,transform:"translateY(-50%)",transition:`background-color ${Hn}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${Ut}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${Hn}, border-color ${Hn}`,borderBottom:Gi,[`
|
|
|
> ${Ut}-wrapper:only-child,
|
|
|
> ${Ut}-expanded-row-fixed > ${Ut}-wrapper:only-child
|
|
|
`]:{[Ut]:{marginBlock:`-${ht}px`,marginInline:`${Ft.tableExpandColumnWidth-Ct}px -${Ct}px`,[`${Ut}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:_n,fontWeight:cn,textAlign:"start",background:ti,borderBottom:Gi,transition:`background ${Hn} ease`},[`
|
|
|
&${Ut}-row:hover > th,
|
|
|
&${Ut}-row:hover > td,
|
|
|
> th${Ut}-cell-row-hover,
|
|
|
> td${Ut}-cell-row-hover
|
|
|
`]:{background:bi},[`&${Ut}-row-selected`]:{"> th, > td":{background:Vn},"&:hover > th, &:hover > td":{background:vi}}}},[`${Ut}-footer`]:{padding:`${ht}px ${Ct}px`,color:ui,background:Ri}})}};var rc=(0,bo.Z)("Table",Ft=>{const{colorTextHeading:Ut,colorSplit:cn,colorIcon:ht,colorIconHover:Ct,opacityLoading:Et,colorBgContainer:wn,controlInteractiveSize:fn,headerBg:sn,headerColor:Sn,headerSortActiveBg:xn,headerSortHoverBg:_n,bodySortBg:Hn,rowHoverBg:ti,rowSelectedBg:Kn,rowSelectedHoverBg:bi,rowExpandedBg:Vn,cellPaddingBlock:vi,cellPaddingInline:ui,cellPaddingBlockMD:Ri,cellPaddingInlineMD:Di,cellPaddingBlockSM:Gi,cellPaddingInlineSM:Oi,borderColor:Ii,footerBg:cr,footerColor:ei,headerBorderRadius:ji,cellFontSize:Li,cellFontSizeMD:Ci,cellFontSizeSM:Yi,headerSplitColor:gi,fixedHeaderSortActiveBg:dr,headerFilterHoverBg:Xi,filterDropdownBg:Pi,expandIconBg:Zi,selectionColumnWidth:vr,stickyScrollBarBg:or}=Ft,So=new Ks.C(ht),Mo=new Ks.C(Ct),es=2,so=(0,fa.TS)(Ft,{tableFontSize:Li,tableBg:wn,tableRadius:ji,tablePaddingVertical:vi,tablePaddingHorizontal:ui,tablePaddingVerticalMiddle:Ri,tablePaddingHorizontalMiddle:Di,tablePaddingVerticalSmall:Gi,tablePaddingHorizontalSmall:Oi,tableBorderColor:Ii,tableHeaderTextColor:Sn,tableHeaderBg:sn,tableFooterTextColor:ei,tableFooterBg:cr,tableHeaderCellSplitColor:gi,tableHeaderSortBg:xn,tableHeaderSortHoverBg:_n,tableHeaderIconColor:So.clone().setAlpha(So.getAlpha()*Et).toRgbString(),tableHeaderIconColorHover:Mo.clone().setAlpha(Mo.getAlpha()*Et).toRgbString(),tableBodySortBg:Hn,tableFixedHeaderSortActiveBg:dr,tableHeaderFilterActiveBg:Xi,tableFilterDropdownBg:Pi,tableRowHoverBg:ti,tableSelectedRowBg:Kn,tableSelectedRowHoverBg:bi,zIndexTableFixed:es,zIndexTableSticky:es+1,tableFontSizeMiddle:Ci,tableFontSizeSmall:Yi,tableSelectionColumnWidth:vr,tableExpandIconBg:Zi,tableExpandColumnWidth:fn+2*Ft.padding,tableExpandedRowBg:Vn,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:or,tableScrollThumbBgHover:Ut,tableScrollBg:cn});return[Bs(so),Ad(so),cu(so),ku(so),Rs(so),ss(so),Nd(so),ps(so),cu(so),Go(so),Ch(so),Rc(so),Au(so),Ca(so),io(so),rh(so),hs(so)]},Ft=>{const{colorFillAlter:Ut,colorBgContainer:cn,colorTextHeading:ht,colorFillSecondary:Ct,colorFillContent:Et,controlItemBgActive:wn,controlItemBgActiveHover:fn,padding:sn,paddingSM:Sn,paddingXS:xn,colorBorderSecondary:_n,borderRadiusLG:Hn,fontSize:ti,controlHeight:Kn,colorTextPlaceholder:bi}=Ft,Vn=new Ks.C(Ct).onBackground(cn).toHexShortString(),vi=new Ks.C(Et).onBackground(cn).toHexShortString(),ui=new Ks.C(Ut).onBackground(cn).toHexShortString();return{headerBg:ui,headerColor:ht,headerSortActiveBg:Vn,headerSortHoverBg:vi,bodySortBg:ui,rowHoverBg:ui,rowSelectedBg:wn,rowSelectedHoverBg:fn,rowExpandedBg:Ut,cellPaddingBlock:sn,cellPaddingInline:sn,cellPaddingBlockMD:Sn,cellPaddingInlineMD:xn,cellPaddingBlockSM:xn,cellPaddingInlineSM:xn,borderColor:_n,headerBorderRadius:Hn,footerBg:ui,footerColor:ht,cellFontSize:ti,cellFontSizeMD:ti,cellFontSizeSM:ti,headerSplitColor:_n,fixedHeaderSortActiveBg:Vn,headerFilterHoverBg:Et,filterDropdownMenuBg:cn,filterDropdownBg:cn,expandIconBg:cn,selectionColumnWidth:Kn,stickyScrollBarBg:bi,stickyScrollBarBorderRadius:100}});const qa=[],Id=(Ft,Ut)=>{const{prefixCls:cn,className:ht,rootClassName:Ct,style:Et,size:wn,bordered:fn,dropdownPrefixCls:sn,dataSource:Sn,pagination:xn,rowSelection:_n,rowKey:Hn="key",rowClassName:ti,columns:Kn,children:bi,childrenColumnName:Vn,onChange:vi,getPopupContainer:ui,loading:Ri,expandIcon:Di,expandable:Gi,expandedRowRender:Oi,expandIconColumnIndex:Ii,indentSize:cr,scroll:ei,sortDirections:ji,locale:Li,showSorterTooltip:Ci=!0,virtual:Yi}=Ft,gi=he.useMemo(()=>Kn||wt(bi),[Kn,bi]),dr=he.useMemo(()=>gi.some(os=>os.responsive),[gi]),Xi=(0,Yn.Z)(dr),Pi=he.useMemo(()=>{const os=new Set(Object.keys(Xi).filter(Fs=>Xi[Fs]));return gi.filter(Fs=>!Fs.responsive||Fs.responsive.some(va=>os.has(va)))},[gi,Xi]),Zi=(0,Tr.Z)(Ft,["className","style","columns"]),{locale:vr=Vr.Z,direction:or,table:So,renderEmpty:Mo,getPrefixCls:es,getPopupContainer:so}=he.useContext(qi.E_),Or=(0,rr.Z)(wn),Do=Object.assign(Object.assign({},vr.Table),Li),Dr=Sn||qa,Yr=es("table",cn),ts=es("dropdown",sn),Gr=Object.assign({childrenColumnName:Vn,expandIconColumnIndex:Ii},Gi),{childrenColumnName:Ar="children"}=Gr,Xr=he.useMemo(()=>Dr.some(os=>os==null?void 0:os[Ar])?"nest":Oi||Gi&&Gi.expandedRowRender?"row":null,[Dr]),Er={body:he.useRef()},ao=he.useMemo(()=>typeof Hn=="function"?Hn:os=>os==null?void 0:os[Hn],[Hn]),[Nr]=Eu(Dr,Ar,ao),ho={},Zo=function(os,Fs){let va=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var js,ns,_a;const El=Object.assign(Object.assign({},ho),os);va&&((js=ho.resetPagination)===null||js===void 0||js.call(ho),!((ns=El.pagination)===null||ns===void 0)&&ns.current&&(El.pagination.current=1),xn&&xn.onChange&&xn.onChange(1,(_a=El.pagination)===null||_a===void 0?void 0:_a.pageSize)),ei&&ei.scrollToFirstRowOnChange!==!1&&Er.body.current&&(0,Io.Z)(0,{getContainer:()=>Er.body.current}),vi==null||vi(El.pagination,El.filters,El.sorter,{currentDataSource:Ua(Wu(Dr,El.sorterStates,Ar),El.filterStates),action:Fs})},Ko=(os,Fs)=>{Zo({sorter:os,sorterStates:Fs},"sort",!1)},[Jr,Bo,Cs,ko]=bh({prefixCls:Yr,mergedColumns:Pi,onSorterChange:Ko,sortDirections:ji||["ascend","descend"],tableLocale:Do,showSorterTooltip:Ci}),Yo=he.useMemo(()=>Wu(Dr,Bo,Ar),[Dr,Bo]);ho.sorter=ko(),ho.sorterStates=Bo;const ys=(os,Fs)=>{Zo({filters:os,filterStates:Fs},"filter",!0)},[Ys,Pl,Xo]=yc({prefixCls:Yr,locale:Do,dropdownPrefixCls:ts,mergedColumns:Pi,onFilterChange:ys,getPopupContainer:ui||so}),Jo=Ua(Yo,Pl);ho.filters=Xo,ho.filterStates=Pl;const Ss=he.useMemo(()=>{const os={};return Object.keys(Xo).forEach(Fs=>{Xo[Fs]!==null&&(os[Fs]=Xo[Fs])}),Object.assign(Object.assign({},Cs),{filters:os})},[Cs,Xo]),[Es]=Zs(Ss),pa=(os,Fs)=>{Zo({pagination:Object.assign(Object.assign({},ho.pagination),{current:os,pageSize:Fs})},"paginate")},[zo,ks]=th(Jo.length,pa,xn);ho.pagination=xn===!1?{}:Lu(zo,xn),ho.resetPagination=ks;const Pa=he.useMemo(()=>{if(xn===!1||!zo.pageSize)return Jo;const{current:os=1,total:Fs,pageSize:va=Gu}=zo;return Jo.length<Fs?Jo.length>va?Jo.slice((os-1)*va,os*va):Jo:Jo.slice((os-1)*va,os*va)},[!!xn,Jo,zo&&zo.current,zo&&zo.pageSize,zo&&zo.total]),[_l,Xl]=Rl({prefixCls:Yr,data:Jo,pageData:Pa,getRowKey:ao,getRecordByKey:Nr,expandType:Xr,childrenColumnName:Ar,locale:Do,getPopupContainer:ui||so},_n),Fl=(os,Fs,va)=>{let js;return typeof ti=="function"?js=at()(ti(os,Fs,va)):js=at()(ti),at()({[`${Yr}-row-selected`]:Xl.has(ao(os,Fs))},js)};Gr.__PARENT_RENDER_ICON__=Gr.expandIcon,Gr.expandIcon=Gr.expandIcon||Di||ms(Do),Xr==="nest"&&Gr.expandIconColumnIndex===void 0?Gr.expandIconColumnIndex=_n?1:0:Gr.expandIconColumnIndex>0&&_n&&(Gr.expandIconColumnIndex-=1),typeof Gr.indentSize!="number"&&(Gr.indentSize=typeof cr=="number"?cr:15);const hu=he.useCallback(os=>Es(_l(Ys(Jr(os)))),[Jr,Ys,_l]);let du,Jl;if(xn!==!1&&(zo!=null&&zo.total)){let os;zo.size?os=zo.size:os=Or==="small"||Or==="middle"?"small":void 0;const Fs=ns=>he.createElement(Eo.Z,Object.assign({},zo,{className:at()(`${Yr}-pagination ${Yr}-pagination-${ns}`,zo.className),size:os})),va=or==="rtl"?"left":"right",{position:js}=zo;if(js!==null&&Array.isArray(js)){const ns=js.find(Nu=>Nu.includes("top")),_a=js.find(Nu=>Nu.includes("bottom")),El=js.every(Nu=>`${Nu}`=="none");!ns&&!_a&&!El&&(Jl=Fs(va)),ns&&(du=Fs(ns.toLowerCase().replace("top",""))),_a&&(Jl=Fs(_a.toLowerCase().replace("bottom","")))}else Jl=Fs(va)}let ds;typeof Ri=="boolean"?ds={spinning:Ri}:typeof Ri=="object"&&(ds=Object.assign({spinning:!0},Ri));const[Oa,ra]=rc(Yr),[,As]=(0,Lo.Z)(),Ql=at()(`${Yr}-wrapper`,So==null?void 0:So.className,{[`${Yr}-wrapper-rtl`]:or==="rtl"},ht,Ct,ra),_c=Object.assign(Object.assign({},So==null?void 0:So.style),Et),fu=Li&&Li.emptyText||(Mo==null?void 0:Mo("Table"))||he.createElement(Ui.Z,{componentName:"Table"}),Zu=Yi?Na:Zr,sc={},jl=he.useMemo(()=>{const{fontSize:os,lineHeight:Fs,padding:va,paddingXS:js,paddingSM:ns}=As,_a=Math.floor(os*Fs);switch(Or){case"large":return va*2+_a;case"small":return js*2+_a;default:return ns*2+_a}},[As,Or]);return Yi&&(sc.listItemHeight=jl),Oa(he.createElement("div",{ref:Ut,className:Ql,style:_c},he.createElement(rs.Z,Object.assign({spinning:!1},ds),du,he.createElement(Zu,Object.assign({},sc,Zi,{columns:Pi,direction:or,expandable:Gr,prefixCls:Yr,className:at()({[`${Yr}-middle`]:Or==="middle",[`${Yr}-small`]:Or==="small",[`${Yr}-bordered`]:fn,[`${Yr}-empty`]:Dr.length===0}),data:Pa,rowKey:ao,rowClassName:Fl,emptyText:fu,internalHooks:me,internalRefs:Er,transformColumns:hu})),Jl)))};var td=he.forwardRef(Id);const Dd=(Ft,Ut)=>{const cn=he.useRef(0);return cn.current+=1,he.createElement(td,Object.assign({},Ft,{ref:Ut,_renderTimes:cn.current}))},ka=he.forwardRef(Dd);ka.SELECTION_COLUMN=ia,ka.EXPAND_COLUMN=Me,ka.SELECTION_ALL=Is,ka.SELECTION_INVERT=bs,ka.SELECTION_NONE=Ts,ka.Column=tr,ka.ColumnGroup=Po,ka.Summary=Ie;var oc=ka,gf=oc},12563:function(Ln,tn,Ee){"use strict";Ee.d(tn,{default:function(){return Ye}});var Me=Ee(59301),me=Ee(72119),Be=Ee(92310),ke=Ee.n(Be),Pe=Ee(36785),Le=Ee(47729),he=Ee(14088),Se=Ee(36355),xe=Ee(17313),ge=Ee(37613),le=Ee(83116);const ve=Ge=>{const{paddingXXS:ft,lineWidth:at,tagPaddingHorizontal:Pt,componentCls:tt}=Ge,vt=Pt-at,st=ft-at;return{[tt]:Object.assign(Object.assign({},(0,xe.Wf)(Ge)),{display:"inline-block",height:"auto",marginInlineEnd:Ge.marginXS,paddingInline:vt,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",[`&${tt}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:Ge.defaultColor},[`${tt}-close-icon`]:{marginInlineStart:st,color:Ge.colorTextDescription,fontSize:Ge.tagIconSize,cursor:"pointer",transition:`all ${Ge.motionDurationMid}`,"&:hover":{color:Ge.colorTextHeading}},[`&${tt}-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(${tt}-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:vt}}),[`${tt}-borderless`]:{borderColor:"transparent",background:Ge.tagBorderlessBg}}},de=Ge=>{const{lineWidth:ft,fontSizeIcon:at}=Ge,Pt=Ge.fontSizeSM,tt=`${Ge.lineHeightSM*Pt}px`;return(0,ge.TS)(Ge,{tagFontSize:Pt,tagLineHeight:tt,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 Pt in Ge)Object.prototype.hasOwnProperty.call(Ge,Pt)&&ft.indexOf(Pt)<0&&(at[Pt]=Ge[Pt]);if(Ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var tt=0,Pt=Object.getOwnPropertySymbols(Ge);tt<Pt.length;tt++)ft.indexOf(Pt[tt])<0&&Object.prototype.propertyIsEnumerable.call(Ge,Pt[tt])&&(at[Pt[tt]]=Ge[Pt[tt]]);return at},ie=Ge=>{const{prefixCls:ft,style:at,className:Pt,checked:tt,onChange:vt,onClick:st}=Ge,jt=ee(Ge,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:lt,tag:et}=Me.useContext(Se.E_),ut=Ht=>{vt==null||vt(!tt),st==null||st(Ht)},mt=lt("tag",ft),[_t,gt]=z(mt),Bt=ke()(mt,`${mt}-checkable`,{[`${mt}-checkable-checked`]:tt},et==null?void 0:et.className,Pt,gt);return _t(Me.createElement("span",Object.assign({},jt,{style:Object.assign(Object.assign({},at),et==null?void 0:et.style),className:Bt,onClick:ut})))},se=Ee(45157);const ue=Ge=>(0,se.Z)(Ge,(ft,at)=>{let{textColor:Pt,lightBorderColor:tt,lightColor:vt,darkColor:st}=at;return{[`${Ge.componentCls}-${ft}`]:{color:Pt,background:vt,borderColor:tt,"&-inverse":{color:Ge.colorTextLightSolid,background:st,borderColor:st},[`&${Ge.componentCls}-borderless`]:{borderColor:"transparent"}}}});var ye=(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 be=(Ge,ft,at)=>{const Pt=we(at);return{[`${Ge.componentCls}-${ft}`]:{color:Ge[`color${at}`],background:Ge[`color${Pt}Bg`],borderColor:Ge[`color${Pt}Border`],[`&${Ge.componentCls}-borderless`]:{borderColor:"transparent"}}}};var Ae=(0,le.b)(["Tag","status"],Ge=>{const ft=de(Ge);return[be(ft,"success","Success"),be(ft,"processing","Info"),be(ft,"error","Error"),be(ft,"warning","Warning")]},ce),De=function(Ge,ft){var at={};for(var Pt in Ge)Object.prototype.hasOwnProperty.call(Ge,Pt)&&ft.indexOf(Pt)<0&&(at[Pt]=Ge[Pt]);if(Ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var tt=0,Pt=Object.getOwnPropertySymbols(Ge);tt<Pt.length;tt++)ft.indexOf(Pt[tt])<0&&Object.prototype.propertyIsEnumerable.call(Ge,Pt[tt])&&(at[Pt[tt]]=Ge[Pt[tt]]);return at};const ze=(Ge,ft)=>{const{prefixCls:at,className:Pt,rootClassName:tt,style:vt,children:st,icon:jt,color:lt,onClose:et,closeIcon:ut,closable:mt,bordered:_t=!0}=Ge,gt=De(Ge,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:Bt,direction:Ht,tag:hn}=Me.useContext(Se.E_),[Qt,bn]=Me.useState(!0);Me.useEffect(()=>{"visible"in gt&&bn(gt.visible)},[gt.visible]);const Wt=(0,Pe.o2)(lt),Kt=(0,Pe.yT)(lt),Jt=Wt||Kt,dn=Object.assign(Object.assign({backgroundColor:lt&&!Jt?lt:void 0},hn==null?void 0:hn.style),vt),Lt=Bt("tag",at),[pt,Rt]=z(Lt),St=ke()(Lt,hn==null?void 0:hn.className,{[`${Lt}-${lt}`]:Jt,[`${Lt}-has-color`]:lt&&!Jt,[`${Lt}-hidden`]:!Qt,[`${Lt}-rtl`]:Ht==="rtl",[`${Lt}-borderless`]:!_t},Pt,tt,Rt),yt=Ce=>{Ce.stopPropagation(),et==null||et(Ce),!Ce.defaultPrevented&&bn(!1)},[,nt]=(0,Le.Z)(mt,ut,Ce=>Ce===null?Me.createElement(me.Z,{className:`${Lt}-close-icon`,onClick:yt}):Me.createElement("span",{className:`${Lt}-close-icon`,onClick:yt},Ce),null,!1),He=typeof gt.onClick=="function"||st&&st.type==="a",Ie=jt||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:St,style:dn}),We,nt,Wt&&Me.createElement(ye,{key:"preset",prefixCls:Lt}),Kt&&Me.createElement(Ae,{key:"status",prefixCls:Lt}));return pt(He?Me.createElement(he.Z,{component:"Tag"},Oe):Oe)},Ze=Me.forwardRef(ze);Ze.CheckableTag=ie;var Ye=Ze},86914:function(Ln,tn,Ee){"use strict";Ee.d(tn,{default:function(){return lt}});var Me=Ee(99581),me=Ee(26390),Be=Ee(43971),ke=Ee(58358),Pe=Ee(5891),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"},Se=he,xe=Ee(88853),ge=function(ut,mt){return Le.createElement(xe.Z,(0,Pe.Z)({},ut,{ref:mt,icon:Se}))},le=Le.forwardRef(ge),ve=le,de=Ee(92310),ce=Ee.n(de),z=Ee(35654),ee=Ee(71430),oe=Ee(36355),ie=Ee(44757),se=Ee(62892),ue=Ee(20648);const ye=4;function we(et){const{dropPosition:ut,dropLevelOffset:mt,prefixCls:_t,indent:gt,direction:Bt="ltr"}=et,Ht=Bt==="ltr"?"left":"right",hn=Bt==="ltr"?"right":"left",Qt={[Ht]:-mt*gt+ye,[hn]:0};switch(ut){case-1:Qt.top=-3;break;case 1:Qt.bottom=-3;break;default:Qt.bottom=-3,Qt[Ht]=gt+ye;break}return Le.createElement("div",{style:Qt,className:`${_t}-drop-indicator`})}var be=Ee(48610),De=Le.forwardRef((et,ut)=>{const{getPrefixCls:mt,direction:_t,virtual:gt,tree:Bt}=Le.useContext(oe.E_),{prefixCls:Ht,className:hn,showIcon:Qt=!1,showLine:bn,switcherIcon:Wt,blockNode:Kt=!1,children:Jt,checkable:dn=!1,selectable:Lt=!0,draggable:pt,motion:Rt,style:St}=et,yt=mt("tree",Ht),nt=mt(),He=Rt!=null?Rt:Object.assign(Object.assign({},(0,se.Z)(nt)),{motionAppear:!1}),Ie=Object.assign(Object.assign({},et),{checkable:dn,selectable:Lt,showIcon:Qt,motion:He,blockNode:Kt,showLine:!!bn,dropIndicatorRender:we}),[We,Oe]=(0,ue.ZP)(yt),Ce=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(be.Z,{prefixCls:yt,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({},Bt==null?void 0:Bt.style),St),prefixCls:yt,className:ce()({[`${yt}-icon-hide`]:!Qt,[`${yt}-block-node`]:Kt,[`${yt}-unselectable`]:!Lt,[`${yt}-rtl`]:_t==="rtl"},Bt==null?void 0:Bt.className,hn,Oe),direction:_t,checkable:dn&&Le.createElement("span",{className:`${yt}-checkbox-inner`}),selectable:Lt,switcherIcon:Ne,draggable:Ce}),Jt))}),ze;(function(et){et[et.None=0]="None",et[et.Start=1]="Start",et[et.End=2]="End"})(ze||(ze={}));function Ze(et,ut){function mt(_t){const{key:gt,children:Bt}=_t;ut(gt,_t)!==!1&&Ze(Bt||[],ut)}et.forEach(mt)}function Ye(et){let{treeData:ut,expandedKeys:mt,startKey:_t,endKey:gt}=et;const Bt=[];let Ht=ze.None;if(_t&&_t===gt)return[_t];if(!_t||!gt)return[];function hn(Qt){return Qt===_t||Qt===gt}return Ze(ut,Qt=>{if(Ht===ze.End)return!1;if(hn(Qt)){if(Bt.push(Qt),Ht===ze.None)Ht=ze.Start;else if(Ht===ze.Start)return Ht=ze.End,!1}else Ht===ze.Start&&Bt.push(Qt);return mt.includes(Qt)}),Bt}function Ge(et,ut){const mt=(0,me.Z)(ut),_t=[];return Ze(et,(gt,Bt)=>{const Ht=mt.indexOf(gt);return Ht!==-1&&(_t.push(Bt),mt.splice(Ht,1)),!!mt.length}),_t}var ft=function(et,ut){var mt={};for(var _t in et)Object.prototype.hasOwnProperty.call(et,_t)&&ut.indexOf(_t)<0&&(mt[_t]=et[_t]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var gt=0,_t=Object.getOwnPropertySymbols(et);gt<_t.length;gt++)ut.indexOf(_t[gt])<0&&Object.prototype.propertyIsEnumerable.call(et,_t[gt])&&(mt[_t[gt]]=et[_t[gt]]);return mt};function at(et){const{isLeaf:ut,expanded:mt}=et;return ut?Le.createElement(Be.Z,null):mt?Le.createElement(ke.Z,null):Le.createElement(ve,null)}function Pt(et){let{treeData:ut,children:mt}=et;return ut||(0,ee.zn)(mt)}const tt=(et,ut)=>{var{defaultExpandAll:mt,defaultExpandParent:_t,defaultExpandedKeys:gt}=et,Bt=ft(et,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const Ht=Le.useRef(),hn=Le.useRef(),Qt=()=>{const{keyEntities:Ce}=(0,ee.I8)(Pt(Bt));let Ne;return mt?Ne=Object.keys(Ce):_t?Ne=(0,z.r7)(Bt.expandedKeys||gt||[],Ce):Ne=Bt.expandedKeys||gt,Ne},[bn,Wt]=Le.useState(Bt.selectedKeys||Bt.defaultSelectedKeys||[]),[Kt,Jt]=Le.useState(()=>Qt());Le.useEffect(()=>{"selectedKeys"in Bt&&Wt(Bt.selectedKeys)},[Bt.selectedKeys]),Le.useEffect(()=>{"expandedKeys"in Bt&&Jt(Bt.expandedKeys)},[Bt.expandedKeys]);const dn=(Ce,Ne)=>{var $e;return"expandedKeys"in Bt||Jt(Ce),($e=Bt.onExpand)===null||$e===void 0?void 0:$e.call(Bt,Ce,Ne)},Lt=(Ce,Ne)=>{var $e;const{multiple:dt}=Bt,{node:Je,nativeEvent:Tt}=Ne,{key:qt=""}=Je,yn=Pt(Bt),rn=Object.assign(Object.assign({},Ne),{selected:!0}),pn=(Tt==null?void 0:Tt.ctrlKey)||(Tt==null?void 0:Tt.metaKey),Fn=Tt==null?void 0:Tt.shiftKey;let kn;dt&&pn?(kn=Ce,Ht.current=qt,hn.current=kn,rn.selectedNodes=Ge(yn,kn)):dt&&Fn?(kn=Array.from(new Set([].concat((0,me.Z)(hn.current||[]),(0,me.Z)(Ye({treeData:yn,expandedKeys:Kt,startKey:qt,endKey:Ht.current}))))),rn.selectedNodes=Ge(yn,kn)):(kn=[qt],Ht.current=qt,hn.current=kn,rn.selectedNodes=Ge(yn,kn)),($e=Bt.onSelect)===null||$e===void 0||$e.call(Bt,kn,rn),"selectedKeys"in Bt||Wt(kn)},{getPrefixCls:pt,direction:Rt}=Le.useContext(oe.E_),{prefixCls:St,className:yt,showIcon:nt=!0,expandAction:He="click"}=Bt,Ie=ft(Bt,["prefixCls","className","showIcon","expandAction"]),We=pt("tree",St),Oe=ce()(`${We}-directory`,{[`${We}-directory-rtl`]:Rt==="rtl"},yt);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:Lt,onExpand:dn}))};var st=Le.forwardRef(tt);const jt=De;jt.DirectoryTree=st,jt.TreeNode=Me.O;var lt=jt},20648:function(Ln,tn,Ee){"use strict";Ee.d(tn,{TM:function(){return de},Yk:function(){return ve}});var Me=Ee(9792),me=Ee(98447),Be=Ee(17313),ke=Ee(8378),Pe=Ee(37613),Le=Ee(83116);const he=new Me.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),Se=(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:ye}=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({},Se(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:ye},[`&${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,Pe.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}};tn.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})})},48610:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return oe}});var Me=Ee(5891),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,Pe=Ee(88853),Le=function(se,ue){return me.createElement(Pe.Z,(0,Me.Z)({},se,{ref:ue,icon:ke}))},he=me.forwardRef(Le),Se=he,xe=Ee(43971),ge=Ee(50023),le=Ee(77042),ve=Ee(5527),de=Ee(92310),ce=Ee.n(de),z=Ee(92343),oe=ie=>{const{prefixCls:se,switcherIcon:ue,treeNodeProps:ye,showLine:we}=ie,{isLeaf:be,expanded:Ae,loading:De}=ye;if(De)return me.createElement(ge.Z,{className:`${se}-switcher-loading-icon`});let ze;if(we&&typeof we=="object"&&(ze=we.showLeafIcon),be){if(!we)return null;if(typeof ze!="boolean"&&ze){const Ge=typeof ze=="function"?ze(ye):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`,Ye=typeof ue=="function"?ue(ye):ue;return(0,z.l$)(Ye)?(0,z.Tm)(Ye,{className:ce()(Ye.props.className||"",Ze)}):Ye!==void 0?Ye:we?Ae?me.createElement(le.Z,{className:`${se}-switcher-line-icon`}):me.createElement(ve.Z,{className:`${se}-switcher-line-icon`}):me.createElement(Se,{className:Ze})}},99498:function(Ln,tn,Ee){(function(Me){Me(Ee(89780))})(function(Me){Me.defineOption("placeholder","",function(Se,xe,ge){var le=ge&&ge!=Me.Init;if(xe&&!le)Se.on("blur",Pe),Se.on("change",Le),Se.on("swapDoc",Le),Me.on(Se.getInputField(),"compositionupdate",Se.state.placeholderCompose=function(){ke(Se)}),Le(Se);else if(!xe&&le){Se.off("blur",Pe),Se.off("change",Le),Se.off("swapDoc",Le),Me.off(Se.getInputField(),"compositionupdate",Se.state.placeholderCompose),me(Se);var ve=Se.getWrapperElement();ve.className=ve.className.replace(" CodeMirror-empty","")}xe&&!Se.hasFocus()&&Pe(Se)});function me(Se){Se.state.placeholder&&(Se.state.placeholder.parentNode.removeChild(Se.state.placeholder),Se.state.placeholder=null)}function Be(Se){me(Se);var xe=Se.state.placeholder=document.createElement("pre");xe.style.cssText="height: 0; overflow: visible",xe.style.direction=Se.getOption("direction"),xe.className="CodeMirror-placeholder CodeMirror-line-like";var ge=Se.getOption("placeholder");typeof ge=="string"&&(ge=document.createTextNode(ge)),xe.appendChild(ge),Se.display.lineSpace.insertBefore(xe,Se.display.lineSpace.firstChild)}function ke(Se){setTimeout(function(){var xe=!1,ge=Se.getInputField();ge.nodeName=="TEXTAREA"?xe=!ge.value:Se.lineCount()==1&&(xe=!/[^\u200b]/.test(ge.querySelector(".CodeMirror-line").textContent)),xe?Be(Se):me(Se)},20)}function Pe(Se){he(Se)&&Be(Se)}function Le(Se){var xe=Se.getWrapperElement(),ge=he(Se);xe.className=xe.className.replace(" CodeMirror-empty","")+(ge?" CodeMirror-empty":""),ge?Be(Se):me(Se)}function he(Se){return Se.lineCount()===1&&Se.getLine(0)===""}})},25717:function(Ln,tn,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(Pe),z.state.closeBrackets=null),ee&&(Le(ke(ee,"pairs")),z.state.closeBrackets=ee,z.addKeyMap(Pe))});function ke(z,ee){return ee=="pairs"&&typeof z=="string"?z:typeof z=="object"&&z[ee]!=null?z[ee]:me[ee]}var Pe={Backspace:xe,Enter:ge};function Le(z){for(var ee=0;ee<z.length;ee++){var oe=z.charAt(ee),ie="'"+oe+"'";Pe[ie]||(Pe[ie]=he(oe))}}Le(me.pairs+"`");function he(z){return function(ee){return ve(ee,z)}}function Se(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=Se(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 ye=ie[se].head;z.replaceRange("",Be(ye.line,ye.ch-1),Be(ye.line,ye.ch+1),"+delete")}}function ge(z){var ee=Se(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 ye=z.lineSeparator()||`
|
|
|
`;z.replaceSelection(ye+ye,null),z.execCommand("goCharLeft"),ie=z.listSelections();for(var we=0;we<ie.length;we++){var be=ie[we].head.line;z.indentLine(be,null,!0),z.indentLine(be+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=Se(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"),ye=ke(oe,"triples"),we=ie.charAt(se+1)==ee,be=z.listSelections(),Ae=se%2==0,De,ze=0;ze<be.length;ze++){var Ze=be[ze],Ye=Ze.head,Ge,ft=z.getRange(Ye,Be(Ye.line,Ye.ch+1));if(Ae&&!Ze.empty())Ge="surround";else if((we||!Ae)&&ft==ee)we&&ce(z,Ye)?Ge="both":ye.indexOf(ee)>=0&&z.getRange(Ye,Be(Ye.line,Ye.ch+3))==ee+ee+ee?Ge="skipThree":Ge="skip";else if(we&&Ye.ch>1&&ye.indexOf(ee)>=0&&z.getRange(Be(Ye.line,Ye.ch-2),Ye)==ee+ee){if(Ye.ch>2&&/\bstring/.test(z.getTokenTypeAt(Be(Ye.line,Ye.ch-2))))return Me.Pass;Ge="addFour"}else if(we){var at=Ye.ch==0?" ":z.getRange(Be(Ye.line,Ye.ch-1),Ye);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 Pt=se%2?ie.charAt(se-1):ee,tt=se%2?ee:ie.charAt(se+1);z.operation(function(){if(De=="skip")z.execCommand("goCharRight");else if(De=="skipThree")for(var vt=0;vt<3;vt++)z.execCommand("goCharRight");else if(De=="surround"){for(var st=z.getSelections(),vt=0;vt<st.length;vt++)st[vt]=Pt+st[vt]+tt;z.replaceSelections(st,"around"),st=z.listSelections().slice();for(var vt=0;vt<st.length;vt++)st[vt]=le(st[vt]);z.setSelections(st)}else De=="both"?(z.replaceSelection(Pt+tt,null),z.triggerElectric(Pt+tt),z.execCommand("goCharLeft")):De=="addFour"&&(z.replaceSelection(Pt+Pt+Pt+Pt,"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(Ln,tn,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",ye=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 be=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||ye&&he(ye,be)>-1||Se(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,be)>-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 Ye=xe.listSelections().slice(0);Ye[de]={head:Ze.newPos,anchor:Ze.newPos},xe.setSelections(Ye),!ze&&Ze.indent&&(xe.indentLine(Ze.newPos.line,null,!0),xe.indentLine(Ze.newPos.line+1,null,!0))}}function Pe(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 ye,we=se.mode.name!="xml"&&xe.getMode().name=="htmlmixed";if(we&&se.mode.name=="javascript")ye=de+"script";else if(we&&se.mode.name=="css")ye=de+"style";else{var be=se.mode.xmlCurrentContext&&se.mode.xmlCurrentContext(ue);if(!be||be.length&&Se(xe,be,be[be.length-1],oe))return Me.Pass;ye=de+be[be.length-1]}xe.getLine(oe.line).charAt(ie.end)!=">"&&(ye+=">"),ve[ee]=ye}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:Pe(xe,!0)}Me.commands.closeTag=function(xe){return Pe(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 Se(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(Ln,tn,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",Pe=ke+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Le=new RegExp("<(/?)(["+ke+"]["+Pe+"]*)","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 Se(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(!Se(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(!Se(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(!Se(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(!Se(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),ye,we=oe.line,be=oe.ch-(ue?ue[0].length:0);if(!ue||!(ye=le(oe)))return;if(ye!="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,be),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 ye=oe.line,we=oe.ch,be=ve(oe);if(!be)return;if(be[1])se.push(be[2]);else{for(var Ae=se.length-1;Ae>=0;--Ae)if(se[Ae]==be[2]){se.length=Ae;break}if(Ae<0&&(!ie||ie==be[2]))return{tag:be[2],from:me(oe.line,oe.ch),to:me(ye,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 ye=le(se);if(!ye)return;if(!ue[1]&&ye!="selfClose"){var we=me(se.line,se.ch),be=z(se,ue[2]);return be&&Be(be.from,we)>0?{from:we,to:be.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 ye=le(ue),we=ye&&me(ue.line,ue.ch),be=ye&&ve(ue);if(!(!ye||!be||Be(ue,ie)>0)){var Ae={from:me(ue.line,ue.ch),to:we,tag:be[2]};return ye=="selfClose"?{open:Ae,close:null,at:"open"}:be[1]?{open:ee(ue,be[2]),close:Ae,at:"close"}:(ue=new he(oe,we.line,we.ch,se),{open:Ae,close:z(ue,be[2]),at:"open"})}}},Me.findEnclosingTag=function(oe,ie,se,ue){for(var ye=new he(oe,ie.line,ie.ch,se);;){var we=ee(ye,ue);if(!we)break;var be=new he(oe,ie.line,ie.ch,se),Ae=z(be,we.tag);if(Ae)return{open:we,close:Ae}}},Me.scanForClosingTag=function(oe,ie,se,ue){var ye=new he(oe,ie.line,ie.ch,ue?{from:0,to:ue}:null);return z(ye,se)}})},89780:function(Ln){(function(tn,Ee){Ln.exports=Ee()})(this,function(){"use strict";var tn=navigator.userAgent,Ee=navigator.platform,Me=/gecko\/\d/i.test(tn),me=/MSIE \d/.test(tn),Be=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(tn),ke=/Edge\/(\d+)/.exec(tn),Pe=me||Be||ke,Le=Pe&&(me?document.documentMode||6:+(ke||Be)[1]),he=!ke&&/WebKit\//.test(tn),Se=he&&/Qt\/\d+\.\d+/.test(tn),xe=!ke&&/Chrome\//.test(tn),ge=/Opera\//.test(tn),le=/Apple Computer/.test(navigator.vendor),ve=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(tn),de=/PhantomJS/.test(tn),ce=!ke&&/AppleWebKit/.test(tn)&&/Mobile\/\w+/.test(tn),z=/Android/.test(tn),ee=ce||z||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(tn),oe=ce||/Mac/.test(Ee),ie=/\bCrOS\b/.test(tn),se=/win/i.test(Ee),ue=ge&&tn.match(/Version\/(\d*\.\d*)/);ue&&(ue=Number(ue[1])),ue&&ue>=15&&(ge=!1,he=!0);var ye=oe&&(Se||ge&&(ue==null||ue<12.11)),we=Me||Pe&&Le>=9;function be(re){return new RegExp("(^|\\s)"+re+"(?:$|\\s)\\s*")}var Ae=function(re,pe){var Fe=re.className,Re=be(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 Ye(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 Pt(re,pe){var Fe=re.className;be(pe).test(Fe)||(re.className+=(Fe?" ":"")+pe)}function tt(re,pe){for(var Fe=re.split(" "),Re=0;Re<Fe.length;Re++)Fe[Re]&&!be(Fe[Re]).test(pe)&&(pe+=" "+Fe[Re]);return pe}var vt=function(re){re.select()};ce?vt=function(re){re.selectionStart=0,re.selectionEnd=re.value.length}:Pe&&(vt=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 jt(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,xt=Ue||0;;){var Dt=re.indexOf(" ",ot);if(Dt<0||Dt>=pe)return xt+(pe-ot);xt+=Dt-ot,xt+=Fe-xt%Fe,ot=Dt+1}}var et=function(){this.id=null,this.f=null,this.time=0,this.handler=st(this.onTimeout,this)};et.prototype.onTimeout=function(re){re.id=0,re.time<=+new Date?re.f():setTimeout(re.handler,re.time-+new Date)},et.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,_t={toString:function(){return"CodeMirror.Pass"}},gt={scroll:!1},Bt={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 xt=ot-Re;if(ot==re.length||Ue+xt>=pe)return Re+Math.min(xt,pe-Ue);if(Ue+=ot-Re,Ue+=Fe-Ue%Fe,Re=ot+1,Ue>=pe)return Re}}var Qt=[""];function bn(re){for(;Qt.length<=re;)Qt.push(Wt(Qt)+" ");return Qt[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 Jt(re,pe,Fe){for(var Re=0,Ue=Fe(pe);Re<re.length&&Fe(re[Re])<=Ue;)Re++;re.splice(Re,0,pe)}function dn(){}function Lt(re,pe){var Fe;return Object.create?Fe=Object.create(re):(dn.prototype=re,Fe=new dn),pe&&jt(pe,Fe),Fe}var pt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Rt(re){return/\w/.test(re)||re>"\x80"&&(re.toUpperCase()!=re.toLowerCase()||pt.test(re))}function St(re,pe){return pe?pe.source.indexOf("\\w")>-1&&Rt(re)?!0:pe.test(re):Rt(re)}function yt(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 xt=re[ot];(xt.from<Fe&&xt.to>pe||pe==Fe&&xt.to==pe)&&(Re(Math.max(xt.from,pe),Math.min(xt.to,Fe),xt.level==1?"rtl":"ltr",ot),Ue=!0)}Ue||Re(pe,Fe,"ltr")}var Ce=null;function Ne(re,pe,Fe){var Re;Ce=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:Ce=Ue),ot.from==pe&&(ot.from!=ot.to&&Fe!="before"?Re=Ue:Ce=Ue)}return Re!=null?Re:Ce}var $e=function(){var re="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",pe="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function Fe(Xt){return Xt<=247?re.charAt(Xt):1424<=Xt&&Xt<=1524?"R":1536<=Xt&&Xt<=1785?pe.charAt(Xt-1536):1774<=Xt&&Xt<=2220?"r":8192<=Xt&&Xt<=8203?"w":Xt==8204?"b":"L"}var Re=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Ue=/[stwN]/,ot=/[LRr]/,xt=/[Lb1n]/,Dt=/[1n]/;function Ot(Xt,Mn,nn){this.level=Xt,this.from=Mn,this.to=nn}return function(Xt,Mn){var nn=Mn=="ltr"?"L":"R";if(Xt.length==0||Mn=="ltr"&&!Re.test(Xt))return!1;for(var Wn=Xt.length,jn=[],yi=0;yi<Wn;++yi)jn.push(Fe(Xt.charCodeAt(yi)));for(var _i=0,Bi=nn;_i<Wn;++_i){var ar=jn[_i];ar=="m"?jn[_i]=Bi:Bi=ar}for(var Br=0,wr=nn;Br<Wn;++Br){var Wr=jn[Br];Wr=="1"&&wr=="r"?jn[Br]="n":ot.test(Wr)&&(wr=Wr,Wr=="r"&&(jn[Br]="R"))}for(var Co=1,Sr=jn[0];Co<Wn-1;++Co){var Ho=jn[Co];Ho=="+"&&Sr=="1"&&jn[Co+1]=="1"?jn[Co]="1":Ho==","&&Sr==jn[Co+1]&&(Sr=="1"||Sr=="n")&&(jn[Co]=Sr),Sr=Ho}for(var la=0;la<Wn;++la){var Va=jn[la];if(Va==",")jn[la]="N";else if(Va=="%"){var ga=void 0;for(ga=la+1;ga<Wn&&jn[ga]=="%";++ga);for(var nu=la&&jn[la-1]=="!"||ga<Wn&&jn[ga]=="1"?"1":"N",Ml=la;Ml<ga;++Ml)jn[Ml]=nu;la=ga-1}}for(var Ra=0,mu=nn;Ra<Wn;++Ra){var gl=jn[Ra];mu=="L"&&gl=="1"?jn[Ra]="L":ot.test(gl)&&(mu=gl)}for(var Ba=0;Ba<Wn;++Ba)if(Ue.test(jn[Ba])){var xs=void 0;for(xs=Ba+1;xs<Wn&&Ue.test(jn[xs]);++xs);for(var Sa=(Ba?jn[Ba-1]:nn)=="L",el=(xs<Wn?jn[xs]:nn)=="L",ml=Sa==el?Sa?"L":"R":nn,lc=Ba;lc<xs;++lc)jn[lc]=ml;Ba=xs-1}for(var ma=[],Vu,Ea=0;Ea<Wn;)if(xt.test(jn[Ea])){var Ef=Ea;for(++Ea;Ea<Wn&&xt.test(jn[Ea]);++Ea);ma.push(new Ot(0,Ef,Ea))}else{var Iu=Ea,vu=ma.length,iu=Mn=="rtl"?1:0;for(++Ea;Ea<Wn&&jn[Ea]!="L";++Ea);for(var Js=Iu;Js<Ea;)if(Dt.test(jn[Js])){Iu<Js&&(ma.splice(vu,0,new Ot(1,Iu,Js)),vu+=iu);var tl=Js;for(++Js;Js<Ea&&Dt.test(jn[Js]);++Js);ma.splice(vu,0,new Ot(2,tl,Js)),vu+=iu,Iu=Js}else++Js;Iu<Ea&&ma.splice(vu,0,new Ot(1,Iu,Ea))}return Mn=="ltr"&&(ma[0].level==1&&(Vu=Xt.match(/^\s+/))&&(ma[0].from=Vu[0].length,ma.unshift(new Ot(0,0,Vu[0].length))),Wt(ma).level==1&&(Vu=Xt.match(/\s+$/))&&(Wt(ma).to-=Vu[0].length,ma.push(new Ot(0,Wn-Vu[0].length,Wn)))),Mn=="rtl"?ma.reverse():ma}}();function dt(re,pe){var Fe=re.order;return Fe==null&&(Fe=re.order=$e(re.text,pe)),Fe}var Je=[],Tt=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 qt(re,pe){return re._handlers&&re._handlers[pe]||Je}function yn(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 rn(re,pe){var Fe=qt(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 pn(re,pe,Fe){return typeof pe=="string"&&(pe={type:pe,preventDefault:function(){this.defaultPrevented=!0}}),rn(re,Fe||pe.type,re,pe),mi(pe)||pe.codemirrorIgnore}function Fn(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 kn(re,pe){return qt(re,pe).length>0}function oi(re){re.prototype.on=function(pe,Fe){Tt(this,pe,Fe)},re.prototype.off=function(pe,Fe){yn(this,pe,Fe)}}function ri(re){re.preventDefault?re.preventDefault():re.returnValue=!1}function Ti(re){re.stopPropagation?re.stopPropagation():re.cancelBubble=!0}function mi(re){return re.defaultPrevented!=null?re.defaultPrevented:re.returnValue==!1}function Qi(re){ri(re),Ti(re)}function ir(re){return re.target||re.srcElement}function fr(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 er=function(){if(Pe&&Le<9)return!1;var re=Ze("div");return"draggable"in re||"dragDrop"in re}(),Mr;function qr(re){if(Mr==null){var pe=Ze("span","\u200B");ze(re,Ze("span",[pe,document.createTextNode("x")])),re.firstChild.offsetHeight!=0&&(Mr=pe.offsetWidth<=1&&pe.offsetHeight>2&&!(Pe&&Le<8))}var Fe=Mr?Ze("span","\u200B"):Ze("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return Fe.setAttribute("cm-text",""),Fe}var di;function xr(re){if(di!=null)return di;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:di=Re.right-Fe.right<3}var zi=`
|
|
|
|
|
|
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),xt=ot.indexOf("\r");xt!=-1?(Fe.push(ot.slice(0,xt)),pe+=xt+1):(Fe.push(ot),pe=Ue+1)}return Fe}:function(re){return re.split(/\r\n?|\n/)},rt=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},zr=function(){var re=Ze("div");return"oncopy"in re?!0:(re.setAttribute("oncopy","return;"),typeof re.oncopy=="function")}(),hr=null;function vo(re){if(hr!=null)return hr;var pe=ze(re,Ze("span","x")),Fe=pe.getBoundingClientRect(),Re=Ge(pe,0,1).getBoundingClientRect();return hr=Math.abs(Fe.left-Re.left)>1}var co={},yo={};function eo(re,pe){arguments.length>2&&(pe.dependencies=Array.prototype.slice.call(arguments,2)),co[re]=pe}function lo(re,pe){yo[re]=pe}function ln(re){if(typeof re=="string"&&yo.hasOwnProperty(re))re=yo[re];else if(re&&typeof re.name=="string"&&yo.hasOwnProperty(re.name)){var pe=yo[re.name];typeof pe=="string"&&(pe={name:pe}),re=Lt(pe,re),re.name=pe.name}else{if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(re))return ln("application/xml");if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(re))return ln("application/json")}return typeof re=="string"?{name:re}:re||{name:"null"}}function Ke(re,pe){pe=ln(pe);var Fe=co[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 xt in pe.modeProps)Re[xt]=pe.modeProps[xt];return Re}var qe={};function Xe(re,pe){var Fe=qe.hasOwnProperty(re)?qe[re]:qe[re]={};jt(pe,Fe)}function wt(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 At(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 Nt(re,pe,Fe){return re.startState?re.startState(pe,Fe):!0}var bt=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};bt.prototype.eol=function(){return this.pos>=this.string.length},bt.prototype.sol=function(){return this.pos==this.lineStart},bt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},bt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},bt.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},bt.prototype.eatWhile=function(re){for(var pe=this.pos;this.eat(re););return this.pos>pe},bt.prototype.eatSpace=function(){for(var re=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>re},bt.prototype.skipToEnd=function(){this.pos=this.string.length},bt.prototype.skipTo=function(re){var pe=this.string.indexOf(re,this.pos);if(pe>-1)return this.pos=pe,!0},bt.prototype.backUp=function(re){this.pos-=re},bt.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)},bt.prototype.indentation=function(){return lt(this.string,null,this.tabSize)-(this.lineStart?lt(this.string,this.lineStart,this.tabSize):0)},bt.prototype.match=function(re,pe,Fe){if(typeof re=="string"){var Re=function(xt){return Fe?xt.toLowerCase():xt},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)}},bt.prototype.current=function(){return this.string.slice(this.start,this.pos)},bt.prototype.hideFirstChars=function(re,pe){this.lineStart+=re;try{return pe()}finally{this.lineStart-=re}},bt.prototype.lookAhead=function(re){var pe=this.lineOracle;return pe&&pe.lookAhead(re)},bt.prototype.baseToken=function(){var re=this.lineOracle;return re&&re.baseToken(this.pos)};function gn(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 En(re,pe,Fe){var Re=[],Ue=pe.line;return re.iter(pe.line,Fe.line+1,function(ot){var xt=ot.text;Ue==Fe.line&&(xt=xt.slice(0,Fe.ch)),Ue==pe.line&&(xt=xt.slice(pe.ch)),Re.push(xt),++Ue}),Re}function Un(re,pe,Fe){var Re=[];return re.iter(pe,Fe,function(Ue){Re.push(Ue.text)}),Re}function Pn(re,pe){var Fe=pe-re.height;if(Fe)for(var Re=re;Re;Re=Re.parent)Re.height+=Fe}function zt(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 Yt(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 xt=0;xt<re.lines.length;++xt){var Dt=re.lines[xt],Ot=Dt.height;if(pe<Ot)break;pe-=Ot}return Fe+xt}function Cn(re,pe){return pe>=re.first&&pe<re.first+re.size}function An(re,pe){return String(re.lineNumberFormatter(pe+re.firstLineNumber))}function Vt(re,pe,Fe){if(Fe===void 0&&(Fe=null),!(this instanceof Vt))return new Vt(re,pe,Fe);this.line=re,this.ch=pe,this.sticky=Fe}function an(re,pe){return re.line-pe.line||re.ch-pe.ch}function Bn(re,pe){return re.sticky==pe.sticky&&an(re,pe)==0}function Nn(re){return Vt(re.line,re.ch)}function qn(re,pe){return an(re,pe)<0?pe:re}function Gn(re,pe){return an(re,pe)<0?re:pe}function Jn(re,pe){return Math.max(re.first,Math.min(pe,re.first+re.size-1))}function Rn(re,pe){if(pe.line<re.first)return Vt(re.first,0);var Fe=re.first+re.size-1;return pe.line>Fe?Vt(Fe,gn(re,Fe).text.length):li(pe,gn(re,pe.line).text.length)}function li(re,pe){var Fe=re.ch;return Fe==null||Fe>pe?Vt(re.line,pe):Fe<0?Vt(re.line,0):re}function Mi(re,pe){for(var Fe=[],Re=0;Re<pe.length;Re++)Fe[Re]=Rn(re,pe[Re]);return Fe}var zn=function(re,pe){this.state=re,this.lookAhead=pe},si=function(re,pe,Fe,Re){this.state=pe,this.doc=re,this.line=Fe,this.maxLookAhead=Re||0,this.baseTokens=null,this.baseTokenPos=1};si.prototype.lookAhead=function(re){var pe=this.doc.getLine(this.line+re);return pe!=null&&re>this.maxLookAhead&&(this.maxLookAhead=re),pe},si.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}},si.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},si.fromSaved=function(re,pe,Fe){return pe instanceof zn?new si(re,wt(re.mode,pe.state),Fe,pe.lookAhead):new si(re,wt(re.mode,pe),Fe)},si.prototype.save=function(re){var pe=re!==!1?wt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new zn(pe,this.maxLookAhead):pe};function Hi(re,pe,Fe,Re){var Ue=[re.state.modeGen],ot={};lr(re,pe.text,re.doc.mode,Fe,function(Xt,Mn){return Ue.push(Xt,Mn)},ot,Re);for(var xt=Fe.state,Dt=function(Xt){Fe.baseTokens=Ue;var Mn=re.state.overlays[Xt],nn=1,Wn=0;Fe.state=!0,lr(re,pe.text,Mn.mode,Fe,function(jn,yi){for(var _i=nn;Wn<jn;){var Bi=Ue[nn];Bi>jn&&Ue.splice(nn,1,jn,Ue[nn+1],Bi),nn+=2,Wn=Math.min(jn,Bi)}if(yi)if(Mn.opaque)Ue.splice(_i,nn-_i,jn,"overlay "+yi),nn=_i+2;else for(;_i<nn;_i+=2){var ar=Ue[_i+1];Ue[_i+1]=(ar?ar+" ":"")+"overlay "+yi}},ot),Fe.state=xt,Fe.baseTokens=null,Fe.baseTokenPos=1},Ot=0;Ot<re.state.overlays.length;++Ot)Dt(Ot);return{styles:Ue,classes:ot.bgClass||ot.textClass?ot:null}}function ur(re,pe,Fe){if(!pe.styles||pe.styles[0]!=re.state.modeGen){var Re=Ai(re,zt(pe)),Ue=pe.text.length>re.options.maxHighlightLength&&wt(re.doc.mode,Re.state),ot=Hi(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 Ai(re,pe,Fe){var Re=re.doc,Ue=re.display;if(!Re.mode.startState)return new si(Re,!0,pe);var ot=Fi(re,pe,Fe),xt=ot>Re.first&&gn(Re,ot-1).stateAfter,Dt=xt?si.fromSaved(Re,xt,ot):new si(Re,Nt(Re.mode),ot);return Re.iter(ot,pe,function(Ot){un(re,Ot.text,Dt);var Xt=Dt.line;Ot.stateAfter=Xt==pe-1||Xt%5==0||Xt>=Ue.viewFrom&&Xt<Ue.viewTo?Dt.save():null,Dt.nextLine()}),Fe&&(Re.modeFrontier=Dt.line),Dt}function un(re,pe,Fe,Re){var Ue=re.doc.mode,ot=new bt(pe,re.options.tabSize,Fe);for(ot.start=ot.pos=Re||0,pe==""&&ai(Ue,Fe.state);!ot.eol();)wi(Ue,ot,Fe.state),ot.start=ot.pos}function ai(re,pe){if(re.blankLine)return re.blankLine(pe);if(re.innerMode){var Fe=At(re,pe);if(Fe.mode.blankLine)return Fe.mode.blankLine(Fe.state)}}function wi(re,pe,Fe,Re){for(var Ue=0;Ue<10;Ue++){Re&&(Re[0]=At(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 fi=function(re,pe,Fe){this.start=re.start,this.end=re.pos,this.string=re.current(),this.type=pe||null,this.state=Fe};function Wi(re,pe,Fe,Re){var Ue=re.doc,ot=Ue.mode,xt;pe=Rn(Ue,pe);var Dt=gn(Ue,pe.line),Ot=Ai(re,pe.line,Fe),Xt=new bt(Dt.text,re.options.tabSize,Ot),Mn;for(Re&&(Mn=[]);(Re||Xt.pos<pe.ch)&&!Xt.eol();)Xt.start=Xt.pos,xt=wi(ot,Xt,Ot.state),Re&&Mn.push(new fi(Xt,xt,wt(Ue.mode,Ot.state)));return Re?Mn:new fi(Xt,xt,Ot.state)}function Ni(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 lr(re,pe,Fe,Re,Ue,ot,xt){var Dt=Fe.flattenSpans;Dt==null&&(Dt=re.options.flattenSpans);var Ot=0,Xt=null,Mn=new bt(pe,re.options.tabSize,Re),nn,Wn=re.options.addModeClass&&[null];for(pe==""&&Ni(ai(Fe,Re.state),ot);!Mn.eol();){if(Mn.pos>re.options.maxHighlightLength?(Dt=!1,xt&&un(re,pe,Re,Mn.pos),Mn.pos=pe.length,nn=null):nn=Ni(wi(Fe,Mn,Re.state,Wn),ot),Wn){var jn=Wn[0].name;jn&&(nn="m-"+(nn?jn+" "+nn:jn))}if(!Dt||Xt!=nn){for(;Ot<Mn.start;)Ot=Math.min(Mn.start,Ot+5e3),Ue(Ot,Xt);Xt=nn}Mn.start=Mn.pos}for(;Ot<Mn.pos;){var yi=Math.min(Mn.pos,Ot+5e3);Ue(yi,Xt),Ot=yi}}function Fi(re,pe,Fe){for(var Re,Ue,ot=re.doc,xt=Fe?-1:pe-(re.doc.mode.innerMode?1e3:100),Dt=pe;Dt>xt;--Dt){if(Dt<=ot.first)return ot.first;var Ot=gn(ot,Dt-1),Xt=Ot.stateAfter;if(Xt&&(!Fe||Dt+(Xt instanceof zn?Xt.lookAhead:0)<=ot.modeFrontier))return Dt;var Mn=lt(Ot.text,null,re.options.tabSize);(Ue==null||Re>Mn)&&(Ue=Dt-1,Re=Mn)}return Ue}function $i(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=gn(re,Re).stateAfter;if(Ue&&(!(Ue instanceof zn)||Re+Ue.lookAhead<pe)){Fe=Re+1;break}}re.highlightFrontier=Math.min(re.highlightFrontier,Fe)}}var Lr=!1,On=!1;function Kr(){Lr=!0}function In(){On=!0}function br(re,pe,Fe){this.marker=re,this.from=pe,this.to=Fe}function xo(re,pe){if(re)for(var Fe=0;Fe<re.length;++Fe){var Re=re[Fe];if(Re.marker==pe)return Re}}function Cr(re,pe){for(var Fe,Re=0;Re<re.length;++Re)re[Re]!=pe&&(Fe||(Fe=[])).push(re[Re]);return Fe}function Fo(re,pe){re.markedSpans=re.markedSpans?re.markedSpans.concat([pe]):[pe],pe.marker.attachLine(re)}function oo(re,pe,Fe){var Re;if(re)for(var Ue=0;Ue<re.length;++Ue){var ot=re[Ue],xt=ot.marker,Dt=ot.from==null||(xt.inclusiveLeft?ot.from<=pe:ot.from<pe);if(Dt||ot.from==pe&&xt.type=="bookmark"&&(!Fe||!ot.marker.insertLeft)){var Ot=ot.to==null||(xt.inclusiveRight?ot.to>=pe:ot.to>pe);(Re||(Re=[])).push(new br(xt,ot.from,Ot?null:ot.to))}}return Re}function Ki(re,pe,Fe){var Re;if(re)for(var Ue=0;Ue<re.length;++Ue){var ot=re[Ue],xt=ot.marker,Dt=ot.to==null||(xt.inclusiveRight?ot.to>=pe:ot.to>pe);if(Dt||ot.from==pe&&xt.type=="bookmark"&&(!Fe||ot.marker.insertLeft)){var Ot=ot.from==null||(xt.inclusiveLeft?ot.from<=pe:ot.from<pe);(Re||(Re=[])).push(new br(xt,Ot?null:ot.from-pe,ot.to==null?null:ot.to-pe))}}return Re}function Ji(re,pe){if(pe.full)return null;var Fe=Cn(re,pe.from.line)&&gn(re,pe.from.line).markedSpans,Re=Cn(re,pe.to.line)&&gn(re,pe.to.line).markedSpans;if(!Fe&&!Re)return null;var Ue=pe.from.ch,ot=pe.to.ch,xt=an(pe.from,pe.to)==0,Dt=oo(Fe,Ue,xt),Ot=Ki(Re,ot,xt),Xt=pe.text.length==1,Mn=Wt(pe.text).length+(Xt?Ue:0);if(Dt)for(var nn=0;nn<Dt.length;++nn){var Wn=Dt[nn];if(Wn.to==null){var jn=xo(Ot,Wn.marker);jn?Xt&&(Wn.to=jn.to==null?null:jn.to+Mn):Wn.to=Ue}}if(Ot)for(var yi=0;yi<Ot.length;++yi){var _i=Ot[yi];if(_i.to!=null&&(_i.to+=Mn),_i.from==null){var Bi=xo(Dt,_i.marker);Bi||(_i.from=Mn,Xt&&(Dt||(Dt=[])).push(_i))}else _i.from+=Mn,Xt&&(Dt||(Dt=[])).push(_i)}Dt&&(Dt=pr(Dt)),Ot&&Ot!=Dt&&(Ot=pr(Ot));var ar=[Dt];if(!Xt){var Br=pe.text.length-2,wr;if(Br>0&&Dt)for(var Wr=0;Wr<Dt.length;++Wr)Dt[Wr].to==null&&(wr||(wr=[])).push(new br(Dt[Wr].marker,null,null));for(var Co=0;Co<Br;++Co)ar.push(wr);ar.push(Ot)}return ar}function pr(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 kr(re,pe,Fe){var Re=null;if(re.iter(pe.line,Fe.line+1,function(jn){if(jn.markedSpans)for(var yi=0;yi<jn.markedSpans.length;++yi){var _i=jn.markedSpans[yi].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 xt=Re[ot],Dt=xt.find(0),Ot=0;Ot<Ue.length;++Ot){var Xt=Ue[Ot];if(!(an(Xt.to,Dt.from)<0||an(Xt.from,Dt.to)>0)){var Mn=[Ot,1],nn=an(Xt.from,Dt.from),Wn=an(Xt.to,Dt.to);(nn<0||!xt.inclusiveLeft&&!nn)&&Mn.push({from:Xt.from,to:Dt.from}),(Wn>0||!xt.inclusiveRight&&!Wn)&&Mn.push({from:Dt.to,to:Xt.to}),Ue.splice.apply(Ue,Mn),Ot+=Mn.length-3}}return Ue}function hi(re){var pe=re.markedSpans;if(pe){for(var Fe=0;Fe<pe.length;++Fe)pe[Fe].marker.detachLine(re);re.markedSpans=null}}function kt(re,pe){if(pe){for(var Fe=0;Fe<pe.length;++Fe)pe[Fe].marker.attachLine(re);re.markedSpans=pe}}function Pr(re){return re.inclusiveLeft?-1:0}function _o(re){return re.inclusiveRight?1:0}function Oo(re,pe){var Fe=re.lines.length-pe.lines.length;if(Fe!=0)return Fe;var Re=re.find(),Ue=pe.find(),ot=an(Re.from,Ue.from)||Pr(re)-Pr(pe);if(ot)return-ot;var xt=an(Re.to,Ue.to)||_o(re)-_o(pe);return xt||pe.id-re.id}function wo(re,pe){var Fe=On&&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||Oo(Re,Ue.marker)<0)&&(Re=Ue.marker);return Re}function yr(re){return wo(re,!0)}function tr(re){return wo(re,!1)}function Hr(re,pe){var Fe=On&&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||Oo(Re,ot.marker)<0)&&(Re=ot.marker)}return Re}function Po(re,pe,Fe,Re,Ue){var ot=gn(re,pe),xt=On&&ot.markedSpans;if(xt)for(var Dt=0;Dt<xt.length;++Dt){var Ot=xt[Dt];if(Ot.marker.collapsed){var Xt=Ot.marker.find(0),Mn=an(Xt.from,Fe)||Pr(Ot.marker)-Pr(Ue),nn=an(Xt.to,Re)||_o(Ot.marker)-_o(Ue);if(!(Mn>=0&&nn<=0||Mn<=0&&nn>=0)&&(Mn<=0&&(Ot.marker.inclusiveRight&&Ue.inclusiveLeft?an(Xt.to,Fe)>=0:an(Xt.to,Fe)>0)||Mn>=0&&(Ot.marker.inclusiveRight&&Ue.inclusiveLeft?an(Xt.from,Re)<=0:an(Xt.from,Re)<0)))return!0}}}function Tr(re){for(var pe;pe=yr(re);)re=pe.find(-1,!0).line;return re}function Io(re){for(var pe;pe=tr(re);)re=pe.find(1,!0).line;return re}function qi(re){for(var pe,Fe;pe=tr(re);)re=pe.find(1,!0).line,(Fe||(Fe=[])).push(re);return Fe}function Ui(re,pe){var Fe=gn(re,pe),Re=Tr(Fe);return Fe==Re?pe:zt(Re)}function rr(re,pe){if(pe>re.lastLine())return pe;var Fe=gn(re,pe),Re;if(!Yn(re,Fe))return pe;for(;Re=tr(Fe);)Fe=Re.find(1,!0).line;return zt(Fe)+1}function Yn(re,pe){var Fe=On&&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&&Vr(re,pe,Re))return!0}}}function Vr(re,pe,Fe){if(Fe.to==null){var Re=Fe.marker.find(1,!0);return Vr(re,Re.line,xo(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)&&Vr(re,pe,Ue))return!0}function Eo(re){re=Tr(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 xt=0;xt<ot.children.length;++xt){var Dt=ot.children[xt];if(Dt==Fe)break;pe+=Dt.height}return pe}function rs(re){if(re.height==0)return 0;for(var pe=re.text.length,Fe,Re=re;Fe=yr(Re);){var Ue=Fe.find(0,!0);Re=Ue.from.line,pe+=Ue.from.ch-Ue.to.ch}for(Re=re;Fe=tr(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 Lo(re){var pe=re.display,Fe=re.doc;pe.maxLine=gn(Fe,Fe.first),pe.maxLineLength=rs(pe.maxLine),pe.maxLineChanged=!0,Fe.iter(function(Re){var Ue=rs(Re);Ue>pe.maxLineLength&&(pe.maxLineLength=Ue,pe.maxLine=Re)})}var is=function(re,pe,Fe){this.text=re,kt(this,pe),this.height=Fe?Fe(this):1};is.prototype.lineNo=function(){return zt(this)},oi(is);function ms(re,pe,Fe,Re){re.text=pe,re.stateAfter&&(re.stateAfter=null),re.styles&&(re.styles=null),re.order!=null&&(re.order=null),hi(re),kt(re,Fe);var Ue=Re?Re(re):1;Ue!=re.height&&Pn(re,Ue)}function Ls(re){re.parent=null,hi(re)}var ws={},ta={};function aa(re,pe){if(!re||/^\s*$/.test(re))return null;var Fe=pe.addModeClass?ta:ws;return Fe[re]||(Fe[re]=re.replace(/\S+/g,"cm-$&"))}function Tn(re,pe){var Fe=Ye("span",null,null,he?"padding-right: .1px":null),Re={pre:Ye("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,xt=void 0;Re.pos=0,Re.addToken=hl,xr(re.display.measure)&&(xt=dt(ot,re.doc.direction))&&(Re.addToken=vs(Re.addToken,xt)),Re.map=[];var Dt=pe!=re.display.externalMeasured&&zt(ot);lu(ot,Re,ur(re,ot,Dt)),ot.styleClasses&&(ot.styleClasses.bgClass&&(Re.bgClass=tt(ot.styleClasses.bgClass,Re.bgClass||"")),ot.styleClasses.textClass&&(Re.textClass=tt(ot.styleClasses.textClass,Re.textClass||""))),Re.map.length==0&&Re.map.push(0,0,Re.content.appendChild(qr(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 Ot=Re.content.lastChild;(/\bcm-tab\b/.test(Ot.className)||Ot.querySelector&&Ot.querySelector(".cm-tab"))&&(Re.content.className="cm-tab-wrap-hack")}return rn(re,"renderLine",re,pe.line,Re.pre),Re.pre.className&&(Re.textClass=tt(Re.pre.className,Re.textClass||"")),Re}function Os(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 hl(re,pe,Fe,Re,Ue,ot,xt){if(pe){var Dt=re.splitSpaces?dl(pe,re.trailingSpace):pe,Ot=re.cm.state.specialChars,Xt=!1,Mn;if(!Ot.test(pe))re.col+=pe.length,Mn=document.createTextNode(Dt),re.map.push(re.pos,re.pos+pe.length,Mn),Pe&&Le<9&&(Xt=!0),re.pos+=pe.length;else{Mn=document.createDocumentFragment();for(var nn=0;;){Ot.lastIndex=nn;var Wn=Ot.exec(pe),jn=Wn?Wn.index-nn:pe.length-nn;if(jn){var yi=document.createTextNode(Dt.slice(nn,nn+jn));Pe&&Le<9?Mn.appendChild(Ze("span",[yi])):Mn.appendChild(yi),re.map.push(re.pos,re.pos+jn,yi),re.col+=jn,re.pos+=jn}if(!Wn)break;nn+=jn+1;var _i=void 0;if(Wn[0]==" "){var Bi=re.cm.options.tabSize,ar=Bi-re.col%Bi;_i=Mn.appendChild(Ze("span",bn(ar),"cm-tab")),_i.setAttribute("role","presentation"),_i.setAttribute("cm-text"," "),re.col+=ar}else Wn[0]=="\r"||Wn[0]==`
|
|
|
`?(_i=Mn.appendChild(Ze("span",Wn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),_i.setAttribute("cm-text",Wn[0]),re.col+=1):(_i=re.cm.options.specialCharPlaceholder(Wn[0]),_i.setAttribute("cm-text",Wn[0]),Pe&&Le<9?Mn.appendChild(Ze("span",[_i])):Mn.appendChild(_i),re.col+=1);re.map.push(re.pos,re.pos+1,_i),re.pos++}}if(re.trailingSpace=Dt.charCodeAt(pe.length-1)==32,Fe||Re||Ue||Xt||ot||xt){var Br=Fe||"";Re&&(Br+=Re),Ue&&(Br+=Ue);var wr=Ze("span",[Mn],Br,ot);if(xt)for(var Wr in xt)xt.hasOwnProperty(Wr)&&Wr!="style"&&Wr!="class"&&wr.setAttribute(Wr,xt[Wr]);return re.content.appendChild(wr)}re.content.appendChild(Mn)}}function dl(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 vs(re,pe){return function(Fe,Re,Ue,ot,xt,Dt,Ot){Ue=Ue?Ue+" cm-force-border":"cm-force-border";for(var Xt=Fe.pos,Mn=Xt+Re.length;;){for(var nn=void 0,Wn=0;Wn<pe.length&&(nn=pe[Wn],!(nn.to>Xt&&nn.from<=Xt));Wn++);if(nn.to>=Mn)return re(Fe,Re,Ue,ot,xt,Dt,Ot);re(Fe,Re.slice(0,nn.to-Xt),Ue,ot,null,Dt,Ot),ot=null,Re=Re.slice(nn.to-Xt),Xt=nn.to}}}function ja(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 lu(re,pe,Fe){var Re=re.markedSpans,Ue=re.text,ot=0;if(!Re){for(var xt=1;xt<Fe.length;xt+=2)pe.addToken(pe,Ue.slice(ot,ot=Fe[xt]),aa(Fe[xt+1],pe.cm.options));return}for(var Dt=Ue.length,Ot=0,Xt=1,Mn="",nn,Wn,jn=0,yi,_i,Bi,ar,Br;;){if(jn==Ot){yi=_i=Bi=Wn="",Br=null,ar=null,jn=1/0;for(var wr=[],Wr=void 0,Co=0;Co<Re.length;++Co){var Sr=Re[Co],Ho=Sr.marker;if(Ho.type=="bookmark"&&Sr.from==Ot&&Ho.widgetNode)wr.push(Ho);else if(Sr.from<=Ot&&(Sr.to==null||Sr.to>Ot||Ho.collapsed&&Sr.to==Ot&&Sr.from==Ot)){if(Sr.to!=null&&Sr.to!=Ot&&jn>Sr.to&&(jn=Sr.to,_i=""),Ho.className&&(yi+=" "+Ho.className),Ho.css&&(Wn=(Wn?Wn+";":"")+Ho.css),Ho.startStyle&&Sr.from==Ot&&(Bi+=" "+Ho.startStyle),Ho.endStyle&&Sr.to==jn&&(Wr||(Wr=[])).push(Ho.endStyle,Sr.to),Ho.title&&((Br||(Br={})).title=Ho.title),Ho.attributes)for(var la in Ho.attributes)(Br||(Br={}))[la]=Ho.attributes[la];Ho.collapsed&&(!ar||Oo(ar.marker,Ho)<0)&&(ar=Sr)}else Sr.from>Ot&&jn>Sr.from&&(jn=Sr.from)}if(Wr)for(var Va=0;Va<Wr.length;Va+=2)Wr[Va+1]==jn&&(_i+=" "+Wr[Va]);if(!ar||ar.from==Ot)for(var ga=0;ga<wr.length;++ga)ja(pe,0,wr[ga]);if(ar&&(ar.from||0)==Ot){if(ja(pe,(ar.to==null?Dt+1:ar.to)-Ot,ar.marker,ar.from==null),ar.to==null)return;ar.to==Ot&&(ar=!1)}}if(Ot>=Dt)break;for(var nu=Math.min(Dt,jn);;){if(Mn){var Ml=Ot+Mn.length;if(!ar){var Ra=Ml>nu?Mn.slice(0,nu-Ot):Mn;pe.addToken(pe,Ra,nn?nn+yi:yi,Bi,Ot+Ra.length==jn?_i:"",Wn,Br)}if(Ml>=nu){Mn=Mn.slice(nu-Ot),Ot=nu;break}Ot=Ml,Bi=""}Mn=Ue.slice(ot,ot=Fe[Xt++]),nn=aa(Fe[Xt++],pe.cm.options)}}}function Vl(re,pe,Fe){this.line=pe,this.rest=qi(pe),this.size=this.rest?zt(Wt(this.rest))-Fe+1:1,this.node=this.text=null,this.hidden=Yn(re,pe)}function uo(re,pe,Fe){for(var Re=[],Ue,ot=pe;ot<Fe;ot=Ue){var xt=new Vl(re.doc,gn(re.doc,ot),ot);Ue=ot+xt.size,Re.push(xt)}return Re}var _r=null;function na(re){_r?_r.ops.push(re):re.ownsGroup=_r={ops:[re],delayedCallbacks:[]}}function Rr(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 no(re,pe){var Fe=re.ownsGroup;if(Fe)try{Rr(Fe)}finally{_r=null,pe(Fe)}}var $r=null;function Ei(re,pe){var Fe=qt(re,pe);if(Fe.length){var Re=Array.prototype.slice.call(arguments,2),Ue;_r?Ue=_r.delayedCallbacks:$r?Ue=$r:(Ue=$r=[],setTimeout(ls,0));for(var ot=function(Dt){Ue.push(function(){return Fe[Dt].apply(null,Re)})},xt=0;xt<Fe.length;++xt)ot(xt)}}function ls(){var re=$r;$r=null;for(var pe=0;pe<re.length;++pe)re[pe]()}function Ms(re,pe,Fe,Re){for(var Ue=0;Ue<pe.changes.length;Ue++){var ot=pe.changes[Ue];ot=="text"?Si(re,pe):ot=="gutter"?$s(re,pe,Fe,Re):ot=="class"?fs(re,pe):ot=="widget"&&Qa(re,pe,Re)}pe.changes=null}function ba(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),Pe&&Le<8&&(re.node.style.zIndex=2)),re.node}function za(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=ba(pe);pe.background=Re.insertBefore(Ze("div",null,Fe),Re.firstChild),re.display.input.setUneditable(pe.background)}}function Ja(re,pe){var Fe=re.display.externalMeasured;return Fe&&Fe.line==pe.line?(re.display.externalMeasured=null,pe.measure=Fe.measure,Fe.built):Tn(re,pe)}function Si(re,pe){var Fe=pe.text.className,Re=Ja(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,fs(re,pe)):Fe&&(pe.text.className=Fe)}function fs(re,pe){za(re,pe),pe.line.wrapClass?ba(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 $s(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=ba(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 xt=ba(pe),Dt=pe.gutter=Ze("div",null,"CodeMirror-gutter-wrapper","left: "+(re.options.fixedGutter?Re.fixedPos:-Re.gutterTotalWidth)+"px");if(re.display.input.setUneditable(Dt),xt.insertBefore(Dt,pe.text),pe.line.gutterClass&&(Dt.className+=" "+pe.line.gutterClass),re.options.lineNumbers&&(!ot||!ot["CodeMirror-linenumbers"])&&(pe.lineNumber=Dt.appendChild(Ze("div",An(re.options,Fe),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+Re.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+re.display.lineNumInnerWidth+"px"))),ot)for(var Ot=0;Ot<re.display.gutterSpecs.length;++Ot){var Xt=re.display.gutterSpecs[Ot].className,Mn=ot.hasOwnProperty(Xt)&&ot[Xt];Mn&&Dt.appendChild(Ze("div",[Mn],"CodeMirror-gutter-elt","left: "+Re.gutterLeft[Xt]+"px; width: "+Re.gutterWidth[Xt]+"px"))}}}function Qa(re,pe,Fe){pe.alignable&&(pe.alignable=null);for(var Re=be("CodeMirror-linewidget"),Ue=pe.node.firstChild,ot=void 0;Ue;Ue=ot)ot=Ue.nextSibling,Re.test(Ue.className)&&pe.node.removeChild(Ue);Il(re,pe,Fe)}function wl(re,pe,Fe,Re){var Ue=Ja(re,pe);return pe.text=pe.node=Ue.pre,Ue.bgClass&&(pe.bgClass=Ue.bgClass),Ue.textClass&&(pe.textClass=Ue.textClass),fs(re,pe),$s(re,pe,Fe,Re),Il(re,pe,Re),pe.node}function Il(re,pe,Fe){if(Fr(re,pe.line,pe,Fe,!0),pe.rest)for(var Re=0;Re<pe.rest.length;Re++)Fr(re,pe.rest[Re],pe,Fe,!1)}function Fr(re,pe,Fe,Re,Ue){if(pe.widgets)for(var ot=ba(Fe),xt=0,Dt=pe.widgets;xt<Dt.length;++xt){var Ot=Dt[xt],Xt=Ze("div",[Ot.node],"CodeMirror-linewidget"+(Ot.className?" "+Ot.className:""));Ot.handleMouseEvents||Xt.setAttribute("cm-ignore-events","true"),nc(Ot,Xt,Fe,Re),re.display.input.setUneditable(Xt),Ue&&Ot.above?ot.insertBefore(Xt,Fe.gutter||Fe.text):ot.appendChild(Xt),Ei(Ot,"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 Aa(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 Ha(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 Ta(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 Ua(re){return mt-re.display.nativeBarWidth}function Ga(re){return re.display.scroller.clientWidth-Ua(re)-re.display.barWidth}function Uu(re){return re.display.scroller.clientHeight-Ua(re)-re.display.barHeight}function yc(re,pe,Fe){var Re=re.options.lineWrapping,Ue=Re&&Ga(re);if(!pe.measure.heights||Re&&pe.measure.width!=Ue){var ot=pe.measure.heights=[];if(Re){pe.measure.width=Ue;for(var xt=pe.text.firstChild.getClientRects(),Dt=0;Dt<xt.length-1;Dt++){var Ot=xt[Dt],Xt=xt[Dt+1];Math.abs(Ot.bottom-Xt.bottom)>2&&ot.push((Ot.bottom+Xt.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(zt(re.rest[Ue])>Fe)return{map:re.measure.maps[Ue],cache:re.measure.caches[Ue],before:!0}}function Dl(re,pe){pe=Tr(pe);var Fe=zt(pe),Re=re.display.externalMeasured=new Vl(re.doc,pe,Fe);Re.lineN=Fe;var Ue=Re.built=Tn(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[Ks(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=zt(pe),Re=Gu(re,Fe);Re&&!Re.text?Re=null:Re&&Re.changes&&(Ms(re,Re,Fe,bh(re)),re.curOp.forceUpdate=!0),Re||(Re=Dl(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||""),xt;return pe.cache.hasOwnProperty(ot)?xt=pe.cache[ot]:(pe.rect||(pe.rect=pe.view.text.getBoundingClientRect()),pe.hasHeights||(yc(re,pe.view,pe.rect),pe.hasHeights=!0),xt=ro(re,pe,Fe,Re),xt.bogus||(pe.cache[ot]=xt)),{left:xt.left,right:xt.right,top:Ue?xt.rtop:xt.top,bottom:Ue?xt.rbottom:xt.bottom}}var th={left:0,right:0,top:0,bottom:0};function xc(re,pe,Fe){for(var Re,Ue,ot,xt,Dt,Ot,Xt=0;Xt<re.length;Xt+=3)if(Dt=re[Xt],Ot=re[Xt+1],pe<Dt?(Ue=0,ot=1,xt="left"):pe<Ot?(Ue=pe-Dt,ot=Ue+1):(Xt==re.length-3||pe==Ot&&re[Xt+3]>pe)&&(ot=Ot-Dt,Ue=ot-1,pe>=Ot&&(xt="right")),Ue!=null){if(Re=re[Xt+2],Dt==Ot&&Fe==(Re.insertLeft?"left":"right")&&(xt=Fe),Fe=="left"&&Ue==0)for(;Xt&&re[Xt-2]==re[Xt-3]&&re[Xt-1].insertLeft;)Re=re[(Xt-=3)+2],xt="left";if(Fe=="right"&&Ue==Ot-Dt)for(;Xt<re.length-3&&re[Xt+3]==re[Xt+4]&&!re[Xt+5].insertLeft;)Re=re[(Xt+=3)+2],xt="right";break}return{node:Re,start:Ue,end:ot,collapse:xt,coverStart:Dt,coverEnd:Ot}}function uu(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 ro(re,pe,Fe,Re){var Ue=xc(pe.map,Fe,Re),ot=Ue.node,xt=Ue.start,Dt=Ue.end,Ot=Ue.collapse,Xt;if(ot.nodeType==3){for(var Mn=0;Mn<4;Mn++){for(;xt&&He(pe.line.text.charAt(Ue.coverStart+xt));)--xt;for(;Ue.coverStart+Dt<Ue.coverEnd&&He(pe.line.text.charAt(Ue.coverStart+Dt));)++Dt;if(Pe&&Le<9&&xt==0&&Dt==Ue.coverEnd-Ue.coverStart?Xt=ot.parentNode.getBoundingClientRect():Xt=uu(Ge(ot,xt,Dt).getClientRects(),Re),Xt.left||Xt.right||xt==0)break;Dt=xt,xt=xt-1,Ot="right"}Pe&&Le<11&&(Xt=Uo(re.display.measure,Xt))}else{xt>0&&(Ot=Re="right");var nn;re.options.lineWrapping&&(nn=ot.getClientRects()).length>1?Xt=nn[Re=="right"?nn.length-1:0]:Xt=ot.getBoundingClientRect()}if(Pe&&Le<9&&!xt&&(!Xt||!Xt.left&&!Xt.right)){var Wn=ot.parentNode.getClientRects()[0];Wn?Xt={left:Wn.left,right:Wn.left+Wu(re.display),top:Wn.top,bottom:Wn.bottom}:Xt=th}for(var jn=Xt.top-pe.rect.top,yi=Xt.bottom-pe.rect.top,_i=(jn+yi)/2,Bi=pe.view.measure.heights,ar=0;ar<Bi.length-1&&!(_i<Bi[ar]);ar++);var Br=ar?Bi[ar-1]:0,wr=Bi[ar],Wr={left:(Ot=="right"?Xt.right:Xt.left)-pe.rect.left,right:(Ot=="left"?Xt.left:Xt.right)-pe.rect.left,top:Br,bottom:wr};return!Xt.left&&!Xt.right&&(Wr.bogus=!0),re.options.singleCursorHeightPerLine||(Wr.rtop=jn,Wr.rbottom=yi),Wr}function Uo(re,pe){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!vo(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 La(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 ia(re){re.display.externalMeasure=null,De(re.display.lineMeasure);for(var pe=0;pe<re.display.view.length;pe++)La(re.display.view[pe])}function Is(re){ia(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 Ts(){return xe&&z?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Gs(re){var pe=0;if(re.widgets)for(var Fe=0;Fe<re.widgets.length;++Fe)re.widgets[Fe].above&&(pe+=Aa(re.widgets[Fe]));return pe}function Ws(re,pe,Fe,Re,Ue){if(!Ue){var ot=Gs(pe);Fe.top+=ot,Fe.bottom+=ot}if(Re=="line")return Fe;Re||(Re="local");var xt=Eo(pe);if(Re=="local"?xt+=Ta(re.display):xt-=re.display.viewOffset,Re=="page"||Re=="window"){var Dt=re.display.lineSpace.getBoundingClientRect();xt+=Dt.top+(Re=="window"?0:Ts());var Ot=Dt.left+(Re=="window"?0:bs());Fe.left+=Ot,Fe.right+=Ot}return Fe.top+=xt,Fe.bottom+=xt,Fe}function Yl(re,pe,Fe){if(Fe=="div")return pe;var Re=pe.left,Ue=pe.top;if(Fe=="page")Re-=bs(),Ue-=Ts();else if(Fe=="local"||!Fe){var ot=re.display.sizer.getBoundingClientRect();Re+=ot.left,Ue+=ot.top}var xt=re.display.lineSpace.getBoundingClientRect();return{left:Re-xt.left,top:Ue-xt.top}}function Rl(re,pe,Fe,Re,Ue){return Re||(Re=gn(re.doc,pe.line)),Ws(re,Re,Sc(re,Re,pe.ch,Ue),Fe)}function Ds(re,pe,Fe,Re,Ue,ot){Re=Re||gn(re.doc,pe.line),Ue||(Ue=Lu(re,Re));function xt(yi,_i){var Bi=bl(re,Ue,yi,_i?"right":"left",ot);return _i?Bi.left=Bi.right:Bi.right=Bi.left,Ws(re,Re,Bi,Fe)}var Dt=dt(Re,re.doc.direction),Ot=pe.ch,Xt=pe.sticky;if(Ot>=Re.text.length?(Ot=Re.text.length,Xt="before"):Ot<=0&&(Ot=0,Xt="after"),!Dt)return xt(Xt=="before"?Ot-1:Ot,Xt=="before");function Mn(yi,_i,Bi){var ar=Dt[_i],Br=ar.level==1;return xt(Bi?yi-1:yi,Br!=Bi)}var nn=Ne(Dt,Ot,Xt),Wn=Ce,jn=Mn(Ot,nn,Xt=="before");return Wn!=null&&(jn.other=Mn(Ot,Wn,Xt!="before")),jn}function xh(re,pe){var Fe=0;pe=Rn(re.doc,pe),re.options.lineWrapping||(Fe=Wu(re.display)*pe.ch);var Re=gn(re.doc,pe.line),Ue=Eo(Re)+Ta(re.display);return{left:Fe,right:Fe,top:Ue,bottom:Ue+Re.height}}function nh(re,pe,Fe,Re,Ue){var ot=Vt(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=Yt(Re,Fe),ot=Re.first+Re.size-1;if(Ue>ot)return nh(Re.first+Re.size-1,gn(Re,ot).text.length,null,1,1);pe<0&&(pe=0);for(var xt=gn(Re,Ue);;){var Dt=Qn(re,xt,Ue,pe,Fe),Ot=Hr(xt,Dt.ch+(Dt.xRel>0||Dt.outside>0?1:0));if(!Ot)return Dt;var Xt=Ot.find(1);if(Xt.line==Ue)return Xt;xt=gn(Re,Ue=Xt.line)}}function mr(re,pe,Fe,Re){Re-=Gs(pe);var Ue=pe.text.length,ot=We(function(xt){return bl(re,Fe,xt-1).bottom<=Re},Ue,0);return Ue=We(function(xt){return bl(re,Fe,xt).top>Re},ot,Ue),{begin:ot,end:Ue}}function bc(re,pe,Fe,Re){Fe||(Fe=Lu(re,pe));var Ue=Ws(re,pe,bl(re,Fe,Re),"line").top;return mr(re,pe,Fe,Ue)}function on(re,pe,Fe,Re){return re.bottom<=Fe?!1:re.top>Fe?!0:(Re?re.left:re.right)>pe}function Qn(re,pe,Fe,Re,Ue){Ue-=Eo(pe);var ot=Lu(re,pe),xt=Gs(pe),Dt=0,Ot=pe.text.length,Xt=!0,Mn=dt(pe,re.doc.direction);if(Mn){var nn=(re.options.lineWrapping?Qh:wh)(re,pe,Fe,ot,Mn,Re,Ue);Xt=nn.level!=1,Dt=Xt?nn.from:nn.to-1,Ot=Xt?nn.to:nn.from-1}var Wn=null,jn=null,yi=We(function(Co){var Sr=bl(re,ot,Co);return Sr.top+=xt,Sr.bottom+=xt,on(Sr,Re,Ue,!1)?(Sr.top<=Ue&&Sr.left<=Re&&(Wn=Co,jn=Sr),!0):!1},Dt,Ot),_i,Bi,ar=!1;if(jn){var Br=Re-jn.left<jn.right-Re,wr=Br==Xt;yi=Wn+(wr?0:1),Bi=wr?"after":"before",_i=Br?jn.left:jn.right}else{!Xt&&(yi==Ot||yi==Dt)&&yi++,Bi=yi==0?"after":yi==pe.text.length?"before":bl(re,ot,yi-(Xt?1:0)).bottom+xt<=Ue==Xt?"after":"before";var Wr=Ds(re,Vt(Fe,yi,Bi),"line",pe,ot);_i=Wr.left,ar=Ue<Wr.top?-1:Ue>=Wr.bottom?1:0}return yi=Ie(pe.text,yi,1),nh(Fe,yi,Bi,ar,Re-_i)}function wh(re,pe,Fe,Re,Ue,ot,xt){var Dt=We(function(nn){var Wn=Ue[nn],jn=Wn.level!=1;return on(Ds(re,Vt(Fe,jn?Wn.to:Wn.from,jn?"before":"after"),"line",pe,Re),ot,xt,!0)},0,Ue.length-1),Ot=Ue[Dt];if(Dt>0){var Xt=Ot.level!=1,Mn=Ds(re,Vt(Fe,Xt?Ot.from:Ot.to,Xt?"after":"before"),"line",pe,Re);on(Mn,ot,xt,!0)&&Mn.top>xt&&(Ot=Ue[Dt-1])}return Ot}function Qh(re,pe,Fe,Re,Ue,ot,xt){var Dt=mr(re,pe,Re,xt),Ot=Dt.begin,Xt=Dt.end;/\s/.test(pe.text.charAt(Xt-1))&&Xt--;for(var Mn=null,nn=null,Wn=0;Wn<Ue.length;Wn++){var jn=Ue[Wn];if(!(jn.from>=Xt||jn.to<=Ot)){var yi=jn.level!=1,_i=bl(re,Re,yi?Math.min(Xt,jn.to)-1:Math.max(Ot,jn.from)).right,Bi=_i<ot?ot-_i+1e9:_i-ot;(!Mn||nn>Bi)&&(Mn=jn,nn=Bi)}}return Mn||(Mn=Ue[Ue.length-1]),Mn.from<Ot&&(Mn={from:Ot,to:Mn.to,level:Mn.level}),Mn.to>Xt&&(Mn={from:Mn.from,to:Xt,level:Mn.level}),Mn}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,xt=0;ot;ot=ot.nextSibling,++xt){var Dt=re.display.gutterSpecs[xt].className;Fe[Dt]=ot.offsetLeft+ot.clientLeft+Ue,Re[Dt]=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 Zs(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(Yn(re.doc,Ue))return 0;var ot=0;if(Ue.widgets)for(var xt=0;xt<Ue.widgets.length;xt++)Ue.widgets[xt].height&&(ot+=Ue.widgets[xt].height);return Fe?ot+(Math.ceil(Ue.text.length/Re)||1)*pe:ot+pe}}function Zr(re){var pe=re.doc,Fe=Zs(re);pe.iter(function(Re){var Ue=Fe(Re);Ue!=Re.height&&Pn(Re,Ue)})}function Na(re,pe,Fe,Re){var Ue=re.display;if(!Fe&&ir(pe).getAttribute("cm-not-content")=="true")return null;var ot,xt,Dt=Ue.lineSpace.getBoundingClientRect();try{ot=pe.clientX-Dt.left,xt=pe.clientY-Dt.top}catch(nn){return null}var Ot=wc(re,ot,xt),Xt;if(Re&&Ot.xRel>0&&(Xt=gn(re.doc,Ot.line).text).length==Ot.ch){var Mn=lt(Xt,Xt.length,re.options.tabSize)-Xt.length;Ot=Vt(Ot.line,Math.max(0,Math.round((ot-_u(re.display).left)/Wu(re.display))-Mn))}return Ot}function Ks(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 _s(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)On&&Ui(re.doc,pe)<Ue.viewTo&&fa(re);else if(Fe<=Ue.viewFrom)On&&rr(re.doc,Fe+Re)>Ue.viewFrom?fa(re):(Ue.viewFrom+=Re,Ue.viewTo+=Re);else if(pe<=Ue.viewFrom&&Fe>=Ue.viewTo)fa(re);else if(pe<=Ue.viewFrom){var ot=fl(re,Fe,Fe+Re,1);ot?(Ue.view=Ue.view.slice(ot.index),Ue.viewFrom=ot.lineN,Ue.viewTo+=Re):fa(re)}else if(Fe>=Ue.viewTo){var xt=fl(re,pe,pe,-1);xt?(Ue.view=Ue.view.slice(0,xt.index),Ue.viewTo=xt.lineN):fa(re)}else{var Dt=fl(re,pe,pe,-1),Ot=fl(re,Fe,Fe+Re,1);Dt&&Ot?(Ue.view=Ue.view.slice(0,Dt.index).concat(uo(re,Dt.lineN,Ot.lineN)).concat(Ue.view.slice(Ot.index)),Ue.viewTo+=Re):fa(re)}var Xt=Ue.externalMeasured;Xt&&(Fe<Xt.lineN?Xt.lineN+=Re:pe<Xt.lineN+Xt.size&&(Ue.externalMeasured=null))}function bo(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[Ks(re,pe)];if(ot.node!=null){var xt=ot.changes||(ot.changes=[]);ut(xt,Fe)==-1&&xt.push(Fe)}}}function fa(re){re.display.viewFrom=re.display.viewTo=re.doc.first,re.display.view=[],re.display.viewOffset=0}function fl(re,pe,Fe,Re){var Ue=Ks(re,pe),ot,xt=re.display.view;if(!On||Fe==re.doc.first+re.doc.size)return{index:Ue,lineN:Fe};for(var Dt=re.display.viewFrom,Ot=0;Ot<Ue;Ot++)Dt+=xt[Ot].size;if(Dt!=pe){if(Re>0){if(Ue==xt.length-1)return null;ot=Dt+xt[Ue].size-pe,Ue++}else ot=Dt-pe;pe+=ot,Fe+=ot}for(;Ui(re.doc,Fe)!=Fe;){if(Ue==(Re<0?0:xt.length-1))return null;Fe+=Re*xt[Ue-(Re<0?1:0)].size,Ue+=Re}return{index:Ue,lineN:Fe}}function ss(re,pe,Fe){var Re=re.display,Ue=Re.view;Ue.length==0||pe>=Re.viewTo||Fe<=Re.viewFrom?(Re.view=uo(re,pe,Fe),Re.viewFrom=pe):(Re.viewFrom>pe?Re.view=uo(re,pe,Re.viewFrom).concat(Re.view):Re.viewFrom<pe&&(Re.view=Re.view.slice(Ks(re,pe))),Re.viewFrom=pe,Re.viewTo<Fe?Re.view=Re.view.concat(uo(re,Re.viewTo,Fe)):Re.viewTo>Fe&&(Re.view=Re.view.slice(0,Ks(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 Ca(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(),xt=0;xt<Fe.sel.ranges.length;xt++)if(!(!pe&&xt==Fe.sel.primIndex)){var Dt=Fe.sel.ranges[xt];if(!(Dt.from().line>=re.display.viewTo||Dt.to().line<re.display.viewFrom)){var Ot=Dt.empty();(Ot||re.options.showCursorWhenSelecting)&&Go(re,Dt.head,Ue),Ot||Vo(re,Dt,ot)}}return Re}function Go(re,pe,Fe){var Re=Ds(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 Wa(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(),xt=_u(re.display),Dt=xt.left,Ot=Math.max(Re.sizerWidth,Ga(re)-Re.sizer.offsetLeft)-xt.right,Xt=Ue.direction=="ltr";function Mn(wr,Wr,Co,Sr){Wr<0&&(Wr=0),Wr=Math.round(Wr),Sr=Math.round(Sr),ot.appendChild(Ze("div",null,"CodeMirror-selected","position: absolute; left: "+wr+`px;
|
|
|
top: `+Wr+"px; width: "+(Co==null?Ot-wr:Co)+`px;
|
|
|
height: `+(Sr-Wr)+"px"))}function nn(wr,Wr,Co){var Sr=gn(Ue,wr),Ho=Sr.text.length,la,Va;function ga(Ra,mu){return Rl(re,Vt(wr,Ra),"div",Sr,mu)}function nu(Ra,mu,gl){var Ba=bc(re,Sr,null,Ra),xs=mu=="ltr"==(gl=="after")?"left":"right",Sa=gl=="after"?Ba.begin:Ba.end-(/\s/.test(Sr.text.charAt(Ba.end-1))?2:1);return ga(Sa,xs)[xs]}var Ml=dt(Sr,Ue.direction);return Oe(Ml,Wr||0,Co==null?Ho:Co,function(Ra,mu,gl,Ba){var xs=gl=="ltr",Sa=ga(Ra,xs?"left":"right"),el=ga(mu-1,xs?"right":"left"),ml=Wr==null&&Ra==0,lc=Co==null&&mu==Ho,ma=Ba==0,Vu=!Ml||Ba==Ml.length-1;if(el.top-Sa.top<=3){var Ea=(Xt?ml:lc)&&ma,Ef=(Xt?lc:ml)&&Vu,Iu=Ea?Dt:(xs?Sa:el).left,vu=Ef?Ot:(xs?el:Sa).right;Mn(Iu,Sa.top,vu-Iu,Sa.bottom)}else{var iu,Js,tl,Hc;xs?(iu=Xt&&ml&&ma?Dt:Sa.left,Js=Xt?Ot:nu(Ra,gl,"before"),tl=Xt?Dt:nu(mu,gl,"after"),Hc=Xt&&lc&&Vu?Ot:el.right):(iu=Xt?nu(Ra,gl,"before"):Dt,Js=!Xt&&ml&&ma?Ot:Sa.right,tl=!Xt&&lc&&Vu?Dt:el.left,Hc=Xt?nu(mu,gl,"after"):Ot),Mn(iu,Sa.top,Js-iu,Sa.bottom),Sa.bottom<el.top&&Mn(Dt,Sa.bottom,null,el.top),Mn(tl,el.top,Hc-tl,el.bottom)}(!la||Wa(Sa,la)<0)&&(la=Sa),Wa(el,la)<0&&(la=el),(!Va||Wa(Sa,Va)<0)&&(Va=Sa),Wa(el,Va)<0&&(Va=el)}),{start:la,end:Va}}var Wn=pe.from(),jn=pe.to();if(Wn.line==jn.line)nn(Wn.line,Wn.ch,jn.ch);else{var yi=gn(Ue,Wn.line),_i=gn(Ue,jn.line),Bi=Tr(yi)==Tr(_i),ar=nn(Wn.line,Wn.ch,Bi?yi.text.length+1:null).end,Br=nn(jn.line,Bi?0:null,jn.ch).start;Bi&&(ar.top<Br.top-2?(Mn(ar.right,ar.top,null,ar.bottom),Mn(Dt,Br.top,Br.left,Br.bottom)):Mn(ar.right,ar.top,Br.left-ar.right,ar.bottom)),ar.bottom<Br.top&&Mn(Dt,ar.bottom,null,Br.top)}Fe.appendChild(ot)}function ps(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 us(re){re.state.focused||(re.display.input.focus(),jo(re))}function Rs(re){re.state.delayingBlurEvent=!0,setTimeout(function(){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1,Rc(re))},100)}function jo(re,pe){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1),re.options.readOnly!="nocursor"&&(re.state.focused||(rn(re,"focus",re,pe),re.state.focused=!0,Pt(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()),ps(re))}function Rc(re,pe){re.state.delayingBlurEvent||(re.state.focused&&(rn(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 Ur(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,xt=void 0,Dt=0;if(!Ue.hidden){if(Pe&&Le<8){var Ot=Ue.node.offsetTop+Ue.node.offsetHeight;xt=Ot-Fe,Fe=Ot}else{var Xt=Ue.node.getBoundingClientRect();xt=Xt.bottom-Xt.top,!ot&&Ue.text.firstChild&&(Dt=Ue.text.firstChild.getBoundingClientRect().right-Xt.left-1)}var Mn=Ue.line.height-xt;if((Mn>.005||Mn<-.005)&&(Pn(Ue.line,xt),Ad(Ue.line),Ue.rest))for(var nn=0;nn<Ue.rest.length;nn++)Ad(Ue.rest[nn]);if(Dt>re.display.sizerWidth){var Wn=Math.ceil(Dt/Wu(re.display));Wn>re.display.maxLineLength&&(re.display.maxLineLength=Wn,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-Ta(re));var Ue=Fe&&Fe.bottom!=null?Fe.bottom:Re+re.wrapper.clientHeight,ot=Yt(pe,Re),xt=Yt(pe,Ue);if(Fe&&Fe.ensure){var Dt=Fe.ensure.from.line,Ot=Fe.ensure.to.line;Dt<ot?(ot=Dt,xt=Yt(pe,Eo(gn(pe,Dt))+re.wrapper.clientHeight)):Math.min(Ot,pe.lastLine())>=xt&&(ot=Yt(pe,Eo(gn(pe,Ot))-re.wrapper.clientHeight),xt=Ot)}return{from:ot,to:Math.max(xt,ot+1)}}function Nd(re,pe){if(!pn(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-Ta(re.display))+`px;
|
|
|
height: `+(pe.bottom-pe.top+Ua(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?Vt(pe.line,pe.sticky=="before"?pe.ch-1:pe.ch,"after"):pe,Fe=pe.sticky=="before"?Vt(pe.line,pe.ch+1,"before"):pe);for(var ot=0;ot<5;ot++){var xt=!1,Dt=Ds(re,pe),Ot=!Fe||Fe==pe?Dt:Ds(re,Fe);Ue={left:Math.min(Dt.left,Ot.left),top:Math.min(Dt.top,Ot.top)-Re,right:Math.max(Dt.left,Ot.left),bottom:Math.max(Dt.bottom,Ot.bottom)+Re};var Xt=Od(re,Ue),Mn=re.doc.scrollTop,nn=re.doc.scrollLeft;if(Xt.scrollTop!=null&&(Au(re,Xt.scrollTop),Math.abs(re.doc.scrollTop-Mn)>1&&(xt=!0)),Xt.scrollLeft!=null&&(cu(re,Xt.scrollLeft),Math.abs(re.doc.scrollLeft-nn)>1&&(xt=!0)),!xt)break}return Ue}function rh(re,pe){var Fe=Od(re,pe);Fe.scrollTop!=null&&Au(re,Fe.scrollTop),Fe.scrollLeft!=null&&cu(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),xt={};pe.bottom-pe.top>ot&&(pe.bottom=pe.top+ot);var Dt=re.doc.height+$l(Fe),Ot=pe.top<Re,Xt=pe.bottom>Dt-Re;if(pe.top<Ue)xt.scrollTop=Ot?0:pe.top;else if(pe.bottom>Ue+ot){var Mn=Math.min(pe.top,(Xt?Dt:pe.bottom)-ot);Mn!=Ue&&(xt.scrollTop=Mn)}var nn=re.options.fixedGutter?0:Fe.gutters.offsetWidth,Wn=re.curOp&&re.curOp.scrollLeft!=null?re.curOp.scrollLeft:Fe.scroller.scrollLeft-nn,jn=Ga(re)-Fe.gutters.offsetWidth,yi=pe.right-pe.left>jn;return yi&&(pe.right=pe.left+jn),pe.left<10?xt.scrollLeft=0:pe.left<Wn?xt.scrollLeft=Math.max(0,pe.left+nn-(yi?0:10)):pe.right>jn+Wn-3&&(xt.scrollLeft=pe.right+(yi?0:10)-jn),xt}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 io(re,pe,Fe){(pe!=null||Fe!=null)&&ku(re),pe!=null&&(re.curOp.scrollLeft=pe),Fe!=null&&(re.curOp.scrollTop=Fe)}function qo(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});io(re,Ue.scrollLeft,Ue.scrollTop)}function Au(re,pe){Math.abs(re.doc.scrollTop-pe)<2||(Me||vi(re,{top:pe}),ed(re,pe,!0),Me&&vi(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 cu(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,Gi(re),re.display.scroller.scrollLeft!=pe&&(re.display.scroller.scrollLeft=pe),re.display.scrollbars.setScrollLeft(pe))}function Bl(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+Ua(re)+pe.barHeight,nativeBarWidth:pe.nativeBarWidth,gutterWidth:Fe}}var hs=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),Tt(Re,"scroll",function(){Re.clientHeight&&pe(Re.scrollTop,"vertical")}),Tt(Ue,"scroll",function(){Ue.clientWidth&&pe(Ue.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Pe&&Le<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};hs.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}},hs.prototype.setScrollLeft=function(re){this.horiz.scrollLeft!=re&&(this.horiz.scrollLeft=re),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},hs.prototype.setScrollTop=function(re){this.vert.scrollTop!=re&&(this.vert.scrollTop=re),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},hs.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 et,this.disableVert=new et},hs.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)},hs.prototype.clear=function(){var re=this.horiz.parentNode;re.removeChild(this.horiz),re.removeChild(this.vert)};var Bs=function(){};Bs.prototype.update=function(){return{bottom:0,right:0}},Bs.prototype.setScrollLeft=function(){},Bs.prototype.setScrollTop=function(){},Bs.prototype.clear=function(){};function rc(re,pe){pe||(pe=Bl(re));var Fe=re.display.barWidth,Re=re.display.barHeight;qa(re,pe);for(var Ue=0;Ue<4&&Fe!=re.display.barWidth||Re!=re.display.barHeight;Ue++)Fe!=re.display.barWidth&&re.options.lineWrapping&&Ur(re),qa(re,Bl(re)),Fe=re.display.barWidth,Re=re.display.barHeight}function qa(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:hs,null:Bs};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),Tt(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"?cu(re,pe):Au(re,pe)},re),re.display.scrollbars.addClass&&Pt(re.display.wrapper,re.display.scrollbars.addClass)}var Dd=0;function ka(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},na(re.curOp)}function oc(re){var pe=re.curOp;pe&&no(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++)Ft(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 xt=0;xt<pe.length;xt++)Ct(pe[xt])}function Ft(re){var pe=re.cm,Fe=pe.display;Hn(pe),re.updateMaxLine&&Lo(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 _n(pe,re.mustUpdate&&{top:re.scrollTop,ensure:re.scrollToPos},re.forceUpdate)}function Ut(re){re.updatedDisplay=re.mustUpdate&&bi(re.cm,re.update)}function cn(re){var pe=re.cm,Fe=pe.display;re.updatedDisplay&&Ur(pe),re.barMeasure=Bl(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+Ua(pe)+pe.display.barWidth),re.maxScrollLeft=Math.max(0,Fe.sizer.offsetLeft+re.adjustWidthTo-Ga(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&&cu(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&&Di(pe,re.barMeasure),re.selectionChanged&&ps(pe),pe.state.focused&&re.updateInput&&pe.display.input.reset(re.typing),Fe&&us(re.cm)}function Ct(re){var pe=re.cm,Fe=pe.display,Re=pe.doc;if(re.updatedDisplay&&Vn(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&&cu(pe,re.scrollLeft,!0,!0),re.scrollToPos){var Ue=ih(pe,Rn(Re,re.scrollToPos.from),Rn(Re,re.scrollToPos.to),re.scrollToPos.margin);Nd(pe,Ue)}var ot=re.maybeHiddenMarkers,xt=re.maybeUnhiddenMarkers;if(ot)for(var Dt=0;Dt<ot.length;++Dt)ot[Dt].lines.length||rn(ot[Dt],"hide");if(xt)for(var Ot=0;Ot<xt.length;++Ot)xt[Ot].lines.length&&rn(xt[Ot],"unhide");Fe.wrapper.offsetHeight&&(Re.scrollTop=pe.display.scroller.scrollTop),re.changeObjs&&rn(pe,"changes",pe,re.changeObjs),re.update&&re.update.finish()}function Et(re,pe){if(re.curOp)return pe();ka(re);try{return pe()}finally{oc(re)}}function wn(re,pe){return function(){if(re.curOp)return pe.apply(re,arguments);ka(re);try{return pe.apply(re,arguments)}finally{oc(re)}}}function fn(re){return function(){if(this.curOp)return re.apply(this,arguments);ka(this);try{return re.apply(this,arguments)}finally{oc(this)}}}function sn(re){return function(){var pe=this.cm;if(!pe||pe.curOp)return re.apply(this,arguments);ka(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=Ai(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 xt=ot.styles,Dt=ot.text.length>re.options.maxHighlightLength?wt(pe.mode,Re.state):null,Ot=Hi(re,ot,Re,!0);Dt&&(Re.state=Dt),ot.styles=Ot.styles;var Xt=ot.styleClasses,Mn=Ot.classes;Mn?ot.styleClasses=Mn:Xt&&(ot.styleClasses=null);for(var nn=!xt||xt.length!=ot.styles.length||Xt!=Mn&&(!Xt||!Mn||Xt.bgClass!=Mn.bgClass||Xt.textClass!=Mn.textClass),Wn=0;!nn&&Wn<xt.length;++Wn)nn=xt[Wn]!=ot.styles[Wn];nn&&Ue.push(Re.line),ot.stateAfter=Re.save(),Re.nextLine()}else ot.text.length<=re.options.maxHighlightLength&&un(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++)bo(re,Ue[ot],"text")})}}var _n=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=Ga(re),this.force=Fe,this.dims=bh(re),this.events=[]};_n.prototype.signal=function(re,pe){kn(re,pe)&&this.events.push(arguments)},_n.prototype.finish=function(){for(var re=0;re<this.events.length;re++)rn.apply(null,this.events[re])};function Hn(re){var pe=re.display;!pe.scrollbarsClipped&&pe.scroller.offsetWidth&&(pe.nativeBarWidth=pe.scroller.offsetWidth-pe.scroller.clientWidth,pe.heightForcer.style.height=Ua(re)+"px",pe.sizer.style.marginBottom=-pe.nativeBarWidth+"px",pe.sizer.style.borderRightWidth=Ua(re)+"px",pe.scrollbarsClipped=!0)}function ti(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 Kn(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 bi(re,pe){var Fe=re.display,Re=re.doc;if(pe.editorIsHidden)return fa(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;Oi(re)&&(fa(re),pe.dims=bh(re));var Ue=Re.first+Re.size,ot=Math.max(pe.visible.from-re.options.viewportMargin,Re.first),xt=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>xt&&Fe.viewTo-xt<20&&(xt=Math.min(Ue,Fe.viewTo)),On&&(ot=Ui(re.doc,ot),xt=rr(re.doc,xt));var Dt=ot!=Fe.viewFrom||xt!=Fe.viewTo||Fe.lastWrapHeight!=pe.wrapperHeight||Fe.lastWrapWidth!=pe.wrapperWidth;ss(re,ot,xt),Fe.viewOffset=Eo(gn(re.doc,Fe.viewFrom)),re.display.mover.style.top=Fe.viewOffset+"px";var Ot=Cl(re);if(!Dt&&Ot==0&&!pe.force&&Fe.renderedView==Fe.view&&(Fe.updateLineNumbers==null||Fe.updateLineNumbers>=Fe.viewTo))return!1;var Xt=ti(re);return Ot>4&&(Fe.lineDiv.style.display="none"),ui(re,Fe.updateLineNumbers,pe.dims),Ot>4&&(Fe.lineDiv.style.display=""),Fe.renderedView=Fe.view,Kn(Xt),De(Fe.cursorDiv),De(Fe.selectionDiv),Fe.gutters.style.height=Fe.sizer.style.minHeight=0,Dt&&(Fe.lastWrapHeight=pe.wrapperHeight,Fe.lastWrapWidth=pe.wrapperWidth,Sn(re,400)),Fe.updateLineNumbers=null,!0}function Vn(re,pe){for(var Fe=pe.viewport,Re=!0;;Re=!1){if(!Re||!re.options.lineWrapping||pe.oldDisplayWidth==Ga(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(!bi(re,pe))break;Ur(re);var Ue=Bl(re);Ca(re),rc(re,Ue),Di(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 vi(re,pe){var Fe=new _n(re,pe);if(bi(re,Fe)){Ur(re),Vn(re,Fe);var Re=Bl(re);Ca(re),rc(re,Re),Di(re,Re),Fe.finish()}}function ui(re,pe,Fe){var Re=re.display,Ue=re.options.lineNumbers,ot=Re.lineDiv,xt=ot.firstChild;function Dt(yi){var _i=yi.nextSibling;return he&&oe&&re.display.currentWheelTarget==yi?yi.style.display="none":yi.parentNode.removeChild(yi),_i}for(var Ot=Re.view,Xt=Re.viewFrom,Mn=0;Mn<Ot.length;Mn++){var nn=Ot[Mn];if(!nn.hidden)if(!nn.node||nn.node.parentNode!=ot){var Wn=wl(re,nn,Xt,Fe);ot.insertBefore(Wn,xt)}else{for(;xt!=nn.node;)xt=Dt(xt);var jn=Ue&&pe!=null&&pe<=Xt&&nn.lineNumber;nn.changes&&(ut(nn.changes,"gutter")>-1&&(jn=!1),Ms(re,nn,Xt,Fe)),jn&&(De(nn.lineNumber),nn.lineNumber.appendChild(document.createTextNode(An(re.options,Xt)))),xt=nn.node.nextSibling}Xt+=nn.size}for(;xt;)xt=Dt(xt)}function Ri(re){var pe=re.gutters.offsetWidth;re.sizer.style.marginLeft=pe+"px"}function Di(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+Ua(re)+"px"}function Gi(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",xt=0;xt<Fe.length;xt++)if(!Fe[xt].hidden){re.options.fixedGutter&&(Fe[xt].gutter&&(Fe[xt].gutter.style.left=ot),Fe[xt].gutterBackground&&(Fe[xt].gutterBackground.style.left=ot));var Dt=Fe[xt].alignable;if(Dt)for(var Ot=0;Ot<Dt.length;Ot++)Dt[Ot].style.left=ot}re.options.fixedGutter&&(pe.gutters.style.left=Re+Ue+"px")}}function Oi(re){if(!re.options.lineNumbers)return!1;var pe=re.doc,Fe=An(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,xt=Ue.offsetWidth-ot;return Re.lineGutter.style.width="",Re.lineNumInnerWidth=Math.max(ot,Re.lineGutter.offsetWidth-xt)+1,Re.lineNumWidth=Re.lineNumInnerWidth+xt,Re.lineNumChars=Re.lineNumInnerWidth?Fe.length:-1,Re.lineGutter.style.width=Re.lineNumWidth+"px",Ri(re.display),!0}return!1}function Ii(re,pe){for(var Fe=[],Re=!1,Ue=0;Ue<re.length;Ue++){var ot=re[Ue],xt=null;if(typeof ot!="string"&&(xt=ot.style,ot=ot.className),ot=="CodeMirror-linenumbers")if(pe)Re=!0;else continue;Fe.push({className:ot,style:xt})}return pe&&!Re&&Fe.push({className:"CodeMirror-linenumbers",style:null}),Fe}function cr(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,xt=Ue.style,Dt=pe.appendChild(Ze("div",null,"CodeMirror-gutter "+ot));xt&&(Dt.style.cssText=xt),ot=="CodeMirror-linenumbers"&&(re.lineGutter=Dt,Dt.style.width=(re.lineNumWidth||1)+"px")}pe.style.display=Fe.length?"":"none",Ri(re)}function ei(re){cr(re.display),_s(re),Gi(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=Ye("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=Ye("div",[Ue.measure,Ue.lineMeasure,Ue.selectionDiv,Ue.cursorDiv,Ue.lineDiv],null,"position: relative; outline: none");var ot=Ye("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"),Pe&&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=Ii(Re.gutters,Re.lineNumbers),cr(Ue),Fe.init(Ue)}var Li=0,Ci=null;Pe?Ci=-.53:Me?Ci=15:xe?Ci=-.7:le&&(Ci=-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 gi(re){var pe=Yi(re);return pe.x*=Ci,pe.y*=Ci,pe}function dr(re,pe){var Fe=Yi(pe),Re=Fe.x,Ue=Fe.y,ot=re.display,xt=ot.scroller,Dt=xt.scrollWidth>xt.clientWidth,Ot=xt.scrollHeight>xt.clientHeight;if(Re&&Dt||Ue&&Ot){if(Ue&&oe&&he){e:for(var Xt=pe.target,Mn=ot.view;Xt!=xt;Xt=Xt.parentNode)for(var nn=0;nn<Mn.length;nn++)if(Mn[nn].node==Xt){re.display.currentWheelTarget=Xt;break e}}if(Re&&!Me&&!ge&&Ci!=null){Ue&&Ot&&Au(re,Math.max(0,xt.scrollTop+Ue*Ci)),cu(re,Math.max(0,xt.scrollLeft+Re*Ci)),(!Ue||Ue&&Ot)&&ri(pe),ot.wheelStartX=null;return}if(Ue&&Ci!=null){var Wn=Ue*Ci,jn=re.doc.scrollTop,yi=jn+ot.wrapper.clientHeight;Wn<0?jn=Math.max(0,jn+Wn-50):yi=Math.min(re.doc.height,yi+Wn+50),vi(re,{top:jn,bottom:yi})}Li<20&&(ot.wheelStartX==null?(ot.wheelStartX=xt.scrollLeft,ot.wheelStartY=xt.scrollTop,ot.wheelDX=Re,ot.wheelDY=Ue,setTimeout(function(){if(ot.wheelStartX!=null){var _i=xt.scrollLeft-ot.wheelStartX,Bi=xt.scrollTop-ot.wheelStartY,ar=Bi&&ot.wheelDY&&Bi/ot.wheelDY||_i&&ot.wheelDX&&_i/ot.wheelDX;ot.wheelStartX=ot.wheelStartY=null,ar&&(Ci=(Ci*Li+ar)/(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(!Bn(Fe.anchor,Re.anchor)||!Bn(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(Nn(this.ranges[pe].anchor),Nn(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(an(pe,Re.from())>=0&&an(re,Re.to())<=0)return Fe}return-1};var Pi=function(re,pe){this.anchor=re,this.head=pe};Pi.prototype.from=function(){return Gn(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 Zi(re,pe,Fe){var Re=re&&re.options.selectionsMayTouch,Ue=pe[Fe];pe.sort(function(Wn,jn){return an(Wn.from(),jn.from())}),Fe=ut(pe,Ue);for(var ot=1;ot<pe.length;ot++){var xt=pe[ot],Dt=pe[ot-1],Ot=an(Dt.to(),xt.from());if(Re&&!xt.empty()?Ot>0:Ot>=0){var Xt=Gn(Dt.from(),xt.from()),Mn=qn(Dt.to(),xt.to()),nn=Dt.empty()?xt.from()==xt.head:Dt.from()==Dt.head;ot<=Fe&&--Fe,pe.splice(--ot,2,new Pi(nn?Mn:Xt,nn?Xt:Mn))}}return new Xi(pe,Fe)}function vr(re,pe){return new Xi([new Pi(re,pe||re)],0)}function or(re){return re.text?Vt(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(an(re,pe.from)<0)return re;if(an(re,pe.to)<=0)return or(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+=or(pe).ch-pe.to.ch),Vt(Fe,Re)}function Mo(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 Zi(re.cm,Fe,re.sel.primIndex)}function es(re,pe,Fe){return re.line==pe.line?Vt(Fe.line,re.ch-pe.ch+Fe.ch):Vt(Fe.line+(re.line-pe.line),re.ch)}function so(re,pe,Fe){for(var Re=[],Ue=Vt(re.first,0),ot=Ue,xt=0;xt<pe.length;xt++){var Dt=pe[xt],Ot=es(Dt.from,Ue,ot),Xt=es(or(Dt),Ue,ot);if(Ue=Dt.to,ot=Xt,Fe=="around"){var Mn=re.sel.ranges[xt],nn=an(Mn.head,Mn.anchor)<0;Re[xt]=new Pi(nn?Xt:Ot,nn?Ot:Xt)}else Re[xt]=new Pi(Ot,Ot)}return new Xi(Re,re.sel.primIndex)}function Or(re){re.doc.mode=Ke(re.options,re.doc.modeOption),Do(re)}function Do(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&&_s(re)}function Dr(re,pe){return pe.from.ch==0&&pe.to.ch==0&&Wt(pe.text)==""&&(!re.cm||re.cm.options.wholeLineUpdateBefore)}function Yr(re,pe,Fe,Re){function Ue(Br){return Fe?Fe[Br]:null}function ot(Br,wr,Wr){ms(Br,wr,Wr,Re),Ei(Br,"change",Br,pe)}function xt(Br,wr){for(var Wr=[],Co=Br;Co<wr;++Co)Wr.push(new is(Xt[Co],Ue(Co),Re));return Wr}var Dt=pe.from,Ot=pe.to,Xt=pe.text,Mn=gn(re,Dt.line),nn=gn(re,Ot.line),Wn=Wt(Xt),jn=Ue(Xt.length-1),yi=Ot.line-Dt.line;if(pe.full)re.insert(0,xt(0,Xt.length)),re.remove(Xt.length,re.size-Xt.length);else if(Dr(re,pe)){var _i=xt(0,Xt.length-1);ot(nn,nn.text,jn),yi&&re.remove(Dt.line,yi),_i.length&&re.insert(Dt.line,_i)}else if(Mn==nn)if(Xt.length==1)ot(Mn,Mn.text.slice(0,Dt.ch)+Wn+Mn.text.slice(Ot.ch),jn);else{var Bi=xt(1,Xt.length-1);Bi.push(new is(Wn+Mn.text.slice(Ot.ch),jn,Re)),ot(Mn,Mn.text.slice(0,Dt.ch)+Xt[0],Ue(0)),re.insert(Dt.line+1,Bi)}else if(Xt.length==1)ot(Mn,Mn.text.slice(0,Dt.ch)+Xt[0]+nn.text.slice(Ot.ch),Ue(0)),re.remove(Dt.line+1,yi);else{ot(Mn,Mn.text.slice(0,Dt.ch)+Xt[0],Ue(0)),ot(nn,Wn+nn.text.slice(Ot.ch),jn);var ar=xt(1,Xt.length-1);yi>1&&re.remove(Dt.line+1,yi-1),re.insert(Dt.line+1,ar)}Ei(re,"change",re,pe)}function ts(re,pe,Fe){function Re(Ue,ot,xt){if(Ue.linked)for(var Dt=0;Dt<Ue.linked.length;++Dt){var Ot=Ue.linked[Dt];if(Ot.doc!=ot){var Xt=xt&&Ot.sharedHist;Fe&&!Xt||(pe(Ot.doc,Xt),Re(Ot.doc,Ue,Xt))}}}Re(re,null,!0)}function Gr(re,pe){if(pe.cm)throw new Error("This document is already in use.");re.doc=pe,pe.cm=re,Zr(re),Or(re),Ar(re),re.options.lineWrapping||Lo(re),re.options.mode=pe.modeOption,_s(re)}function Ar(re){(re.doc.direction=="rtl"?Pt:Ae)(re.display.lineDiv,"CodeMirror-rtl")}function Xr(re){Et(re,function(){Ar(re),_s(re)})}function Er(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:Nn(pe.from),to:or(pe),text:En(re,pe.from,pe.to)};return Cs(re,Fe,pe.from.line,pe.to.line+1),ts(re,function(Re){return Cs(Re,Fe,pe.from.line,pe.to.line+1)},!0),Fe}function Nr(re){for(;re.length;){var pe=Wt(re);if(pe.ranges)re.pop();else break}}function ho(re,pe){if(pe)return Nr(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,xt,Dt;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)=="*"))&&(xt=ho(Ue,Ue.lastOp==Re)))Dt=Wt(xt.changes),an(pe.from,pe.to)==0&&an(pe.from,Dt.to)==0?Dt.to=or(pe):xt.changes.push(ao(re,pe));else{var Ot=Wt(Ue.done);for((!Ot||!Ot.ranges)&&Bo(re.sel,Ue.done),xt={changes:[ao(re,pe)],generation:Ue.generation},Ue.done.push(xt);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,Dt||rn(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 Jr(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:Bo(pe,Ue.done),Ue.lastSelTime=+new Date,Ue.lastSelOrigin=ot,Ue.lastSelOp=Fe,Re&&Re.clearRedo!==!1&&Nr(Ue.undone)}function Bo(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(xt){xt.markedSpans&&((Ue||(Ue=pe["spans_"+re.id]={}))[ot]=xt.markedSpans),++ot})}function ko(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 Yo(re,pe){var Fe=pe["spans_"+re.id];if(!Fe)return null;for(var Re=[],Ue=0;Ue<pe.text.length;++Ue)Re.push(ko(Fe[Ue]));return Re}function ys(re,pe){var Fe=Yo(re,pe),Re=Ji(re,pe);if(!Fe)return Re;if(!Re)return Fe;for(var Ue=0;Ue<Fe.length;++Ue){var ot=Fe[Ue],xt=Re[Ue];if(ot&&xt)e:for(var Dt=0;Dt<xt.length;++Dt){for(var Ot=xt[Dt],Xt=0;Xt<ot.length;++Xt)if(ot[Xt].marker==Ot.marker)continue e;ot.push(Ot)}else xt&&(Fe[Ue]=xt)}return Fe}function Ys(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 xt=ot.changes,Dt=[];Re.push({changes:Dt});for(var Ot=0;Ot<xt.length;++Ot){var Xt=xt[Ot],Mn=void 0;if(Dt.push({from:Xt.from,to:Xt.to,text:Xt.text}),pe)for(var nn in Xt)(Mn=nn.match(/^spans_(\d+)$/))&&ut(pe,Number(Mn[1]))>-1&&(Wt(Dt)[nn]=Xt[nn],delete Xt[nn])}}return Re}function Pl(re,pe,Fe,Re){if(Re){var Ue=re.anchor;if(Fe){var ot=an(pe,Ue)<0;ot!=an(Fe,Ue)<0?(Ue=pe,pe=Fe):ot!=an(pe,Fe)<0&&(pe=Fe)}return new Pi(Ue,pe)}else return new Pi(Fe||pe,pe)}function Xo(re,pe,Fe,Re,Ue){Ue==null&&(Ue=re.cm&&(re.cm.display.shift||re.extend)),ks(re,new Xi([Pl(re.sel.primary(),pe,Fe,Ue)],0),Re)}function Jo(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 xt=Zi(re.cm,Re,re.sel.primIndex);ks(re,xt,Fe)}function Ss(re,pe,Fe,Re){var Ue=re.sel.ranges.slice(0);Ue[pe]=Fe,ks(re,Zi(re.cm,Ue,re.sel.primIndex),Re)}function Es(re,pe,Fe,Re){ks(re,vr(pe,Fe),Re)}function pa(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(Rn(re,Ue[ot].anchor),Rn(re,Ue[ot].head))},origin:Fe&&Fe.origin};return rn(re,"beforeSelectionChange",re,Re),re.cm&&rn(re.cm,"beforeSelectionChange",re.cm,Re),Re.ranges!=pe.ranges?Zi(re.cm,Re.ranges,Re.ranges.length-1):pe}function zo(re,pe,Fe){var Re=re.history.done,Ue=Wt(Re);Ue&&Ue.ranges?(Re[Re.length-1]=pe,Pa(re,pe,Fe)):ks(re,pe,Fe)}function ks(re,pe,Fe){Pa(re,pe,Fe),Jr(re,re.sel,re.cm?re.cm.curOp.id:NaN,Fe)}function Pa(re,pe,Fe){(kn(re,"beforeSelectionChange")||re.cm&&kn(re.cm,"beforeSelectionChange"))&&(pe=pa(re,pe,Fe));var Re=Fe&&Fe.bias||(an(pe.primary().head,re.sel.primary().head)<0?-1:1);_l(re,Fl(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,Fn(re.cm)),Ei(re,"cursorActivity",re))}function Xl(re){_l(re,Fl(re,re.sel,null,!1))}function Fl(re,pe,Fe,Re){for(var Ue,ot=0;ot<pe.ranges.length;ot++){var xt=pe.ranges[ot],Dt=pe.ranges.length==re.sel.ranges.length&&re.sel.ranges[ot],Ot=du(re,xt.anchor,Dt&&Dt.anchor,Fe,Re),Xt=du(re,xt.head,Dt&&Dt.head,Fe,Re);(Ue||Ot!=xt.anchor||Xt!=xt.head)&&(Ue||(Ue=pe.ranges.slice(0,ot)),Ue[ot]=new Pi(Ot,Xt))}return Ue?Zi(re.cm,Ue,pe.primIndex):pe}function hu(re,pe,Fe,Re,Ue){var ot=gn(re,pe.line);if(ot.markedSpans)for(var xt=0;xt<ot.markedSpans.length;++xt){var Dt=ot.markedSpans[xt],Ot=Dt.marker,Xt="selectLeft"in Ot?!Ot.selectLeft:Ot.inclusiveLeft,Mn="selectRight"in Ot?!Ot.selectRight:Ot.inclusiveRight;if((Dt.from==null||(Xt?Dt.from<=pe.ch:Dt.from<pe.ch))&&(Dt.to==null||(Mn?Dt.to>=pe.ch:Dt.to>pe.ch))){if(Ue&&(rn(Ot,"beforeCursorEnter"),Ot.explicitlyCleared))if(ot.markedSpans){--xt;continue}else break;if(!Ot.atomic)continue;if(Fe){var nn=Ot.find(Re<0?1:-1),Wn=void 0;if((Re<0?Mn:Xt)&&(nn=Jl(re,nn,-Re,nn&&nn.line==pe.line?ot:null)),nn&&nn.line==pe.line&&(Wn=an(nn,Fe))&&(Re<0?Wn<0:Wn>0))return hu(re,nn,pe,Re,Ue)}var jn=Ot.find(Re<0?-1:1);return(Re<0?Xt:Mn)&&(jn=Jl(re,jn,Re,jn.line==pe.line?ot:null)),jn?hu(re,jn,pe,Re,Ue):null}}return pe}function du(re,pe,Fe,Re,Ue){var ot=Re||1,xt=hu(re,pe,Fe,ot,Ue)||!Ue&&hu(re,pe,Fe,ot,!0)||hu(re,pe,Fe,-ot,Ue)||!Ue&&hu(re,pe,Fe,-ot,!0);return xt||(re.cantEdit=!0,Vt(re.first,0))}function Jl(re,pe,Fe,Re){return Fe<0&&pe.ch==0?pe.line>re.first?Rn(re,Vt(pe.line-1)):null:Fe>0&&pe.ch==(Re||gn(re,pe.line)).text.length?pe.line<re.first+re.size-1?Vt(pe.line+1,0):null:new Vt(pe.line,pe.ch+Fe)}function ds(re){re.setSelection(Vt(re.firstLine(),0),Vt(re.lastLine()),gt)}function Oa(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,xt,Dt){Ue&&(Re.from=Rn(re,Ue)),ot&&(Re.to=Rn(re,ot)),xt&&(Re.text=xt),Dt!==void 0&&(Re.origin=Dt)}),rn(re,"beforeChange",re,Re),re.cm&&rn(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 ra(re,pe,Fe){if(re.cm){if(!re.cm.curOp)return wn(re.cm,ra)(re,pe,Fe);if(re.cm.state.suppressEdits)return}if(!((kn(re,"beforeChange")||re.cm&&kn(re.cm,"beforeChange"))&&(pe=Oa(re,pe,!0),!pe))){var Re=Lr&&!Fe&&kr(re,pe.from,pe.to);if(Re)for(var Ue=Re.length-1;Ue>=0;--Ue)As(re,{from:Re[Ue].from,to:Re[Ue].to,text:Ue?[""]:pe.text,origin:pe.origin});else As(re,pe)}}function As(re,pe){if(!(pe.text.length==1&&pe.text[0]==""&&an(pe.from,pe.to)==0)){var Fe=Mo(re,pe);Zo(re,pe,Fe,re.cm?re.cm.curOp.id:NaN),fu(re,pe,Fe,Ji(re,pe));var Re=[];ts(re,function(Ue,ot){!ot&&ut(Re,Ue.history)==-1&&(Fs(Ue.history,pe),Re.push(Ue.history)),fu(Ue,pe,null,Ji(Ue,pe))})}}function Ql(re,pe,Fe){var Re=re.cm&&re.cm.state.suppressEdits;if(!(Re&&!Fe)){for(var Ue=re.history,ot,xt=re.sel,Dt=pe=="undo"?Ue.done:Ue.undone,Ot=pe=="undo"?Ue.undone:Ue.done,Xt=0;Xt<Dt.length&&(ot=Dt[Xt],!(Fe?ot.ranges&&!ot.equals(re.sel):!ot.ranges));Xt++);if(Xt!=Dt.length){for(Ue.lastOrigin=Ue.lastSelOrigin=null;;)if(ot=Dt.pop(),ot.ranges){if(Bo(ot,Ot),Fe&&!ot.equals(re.sel)){ks(re,ot,{clearRedo:!1});return}xt=ot}else if(Re){Dt.push(ot);return}else break;var Mn=[];Bo(xt,Ot),Ot.push({changes:Mn,generation:Ue.generation}),Ue.generation=ot.generation||++Ue.maxGeneration;for(var nn=kn(re,"beforeChange")||re.cm&&kn(re.cm,"beforeChange"),Wn=function(_i){var Bi=ot.changes[_i];if(Bi.origin=pe,nn&&!Oa(re,Bi,!1))return Dt.length=0,{};Mn.push(ao(re,Bi));var ar=_i?Mo(re,Bi):Wt(Dt);fu(re,Bi,ar,ys(re,Bi)),!_i&&re.cm&&re.cm.scrollIntoView({from:Bi.from,to:or(Bi)});var Br=[];ts(re,function(wr,Wr){!Wr&&ut(Br,wr.history)==-1&&(Fs(wr.history,Bi),Br.push(wr.history)),fu(wr,Bi,null,ys(wr,Bi))})},jn=ot.changes.length-1;jn>=0;--jn){var yi=Wn(jn);if(yi)return yi.v}}}}function _c(re,pe){if(pe!=0&&(re.first+=pe,re.sel=new Xi(Kt(re.sel.ranges,function(Ue){return new Pi(Vt(Ue.anchor.line+pe,Ue.anchor.ch),Vt(Ue.head.line+pe,Ue.head.ch))}),re.sel.primIndex),re.cm)){_s(re.cm,re.first,re.first-pe,pe);for(var Fe=re.cm.display,Re=Fe.viewFrom;Re<Fe.viewTo;Re++)bo(re.cm,Re,"gutter")}}function fu(re,pe,Fe,Re){if(re.cm&&!re.cm.curOp)return wn(re.cm,fu)(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:Vt(re.first,0),to:Vt(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:Vt(ot,gn(re,ot).text.length),text:[pe.text[0]],origin:pe.origin}),pe.removed=En(re,pe.from,pe.to),Fe||(Fe=Mo(re,pe)),re.cm?Zu(re.cm,pe,Re):Yr(re,pe,Re),Pa(re,Fe,gt),re.cantEdit&&du(re,Vt(re.firstLine(),0))&&(re.cantEdit=!1)}}function Zu(re,pe,Fe){var Re=re.doc,Ue=re.display,ot=pe.from,xt=pe.to,Dt=!1,Ot=ot.line;re.options.lineWrapping||(Ot=zt(Tr(gn(Re,ot.line))),Re.iter(Ot,xt.line+1,function(jn){if(jn==Ue.maxLine)return Dt=!0,!0})),Re.sel.contains(pe.from,pe.to)>-1&&Fn(re),Yr(Re,pe,Fe,Zs(re)),re.options.lineWrapping||(Re.iter(Ot,ot.line+pe.text.length,function(jn){var yi=rs(jn);yi>Ue.maxLineLength&&(Ue.maxLine=jn,Ue.maxLineLength=yi,Ue.maxLineChanged=!0,Dt=!1)}),Dt&&(re.curOp.updateMaxLine=!0)),$i(Re,ot.line),Sn(re,400);var Xt=pe.text.length-(xt.line-ot.line)-1;pe.full?_s(re):ot.line==xt.line&&pe.text.length==1&&!Dr(re.doc,pe)?bo(re,ot.line,"text"):_s(re,ot.line,xt.line+1,Xt);var Mn=kn(re,"changes"),nn=kn(re,"change");if(nn||Mn){var Wn={from:ot,to:xt,text:pe.text,removed:pe.removed,origin:pe.origin};nn&&Ei(re,"change",re,Wn),Mn&&(re.curOp.changeObjs||(re.curOp.changeObjs=[])).push(Wn)}re.display.selForContextMenu=null}function sc(re,pe,Fe,Re,Ue){var ot;Re||(Re=Fe),an(Re,Fe)<0&&(ot=[Re,Fe],Fe=ot[0],Re=ot[1]),typeof pe=="string"&&(pe=re.splitLines(pe)),ra(re,{from:Fe,to:Re,text:pe,origin:Ue})}function jl(re,pe,Fe,Re){Fe<re.line?re.line+=Re:pe<re.line&&(re.line=pe,re.ch=0)}function os(re,pe,Fe,Re){for(var Ue=0;Ue<re.length;++Ue){var ot=re[Ue],xt=!0;if(ot.ranges){ot.copied||(ot=re[Ue]=ot.deepCopy(),ot.copied=!0);for(var Dt=0;Dt<ot.ranges.length;Dt++)jl(ot.ranges[Dt].anchor,pe,Fe,Re),jl(ot.ranges[Dt].head,pe,Fe,Re);continue}for(var Ot=0;Ot<ot.changes.length;++Ot){var Xt=ot.changes[Ot];if(Fe<Xt.from.line)Xt.from=Vt(Xt.from.line+Re,Xt.from.ch),Xt.to=Vt(Xt.to.line+Re,Xt.to.ch);else if(pe<=Xt.to.line){xt=!1;break}}xt||(re.splice(0,Ue+1),Ue=0)}}function Fs(re,pe){var Fe=pe.from.line,Re=pe.to.line,Ue=pe.text.length-(Re-Fe)-1;os(re.done,Fe,Re,Ue),os(re.undone,Fe,Re,Ue)}function va(re,pe,Fe,Re){var Ue=pe,ot=pe;return typeof pe=="number"?ot=gn(re,Jn(re,pe)):Ue=zt(pe),Ue==null?null:(Re(ot,Ue)&&re.cm&&bo(re.cm,Ue,Fe),ot)}function js(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}js.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,Ls(Ue),Ei(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 ns(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}ns.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),xt=Re.height;if(Re.removeInner(re,ot),this.height-=xt-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 js))){var Dt=[];this.collapse(Dt),this.children=[new js(Dt)],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 xt=Ue.lines.length%25+25,Dt=xt;Dt<Ue.lines.length;){var Ot=new js(Ue.lines.slice(Dt,Dt+=25));Ue.height-=Ot.height,this.children.splice(++Re,0,Ot),Ot.parent=this}Ue.lines=Ue.lines.slice(0,xt),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 ns(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 ns(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 xt=Math.min(pe,ot-re);if(Ue.iterN(re,xt,Fe))return!0;if((pe-=xt)==0)break;re=0}else re-=ot}}};var _a=function(re,pe,Fe){if(Fe)for(var Re in Fe)Fe.hasOwnProperty(Re)&&(this[Re]=Fe[Re]);this.doc=re,this.node=pe};_a.prototype.clear=function(){var re=this.doc.cm,pe=this.line.widgets,Fe=this.line,Re=zt(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=Aa(this);Pn(Fe,Math.max(0,Fe.height-ot)),re&&(Et(re,function(){El(re,Fe,-ot),bo(re,Re,"widget")}),Ei(re,"lineWidgetCleared",re,this,Re))}},_a.prototype.changed=function(){var re=this,pe=this.height,Fe=this.doc.cm,Re=this.line;this.height=null;var Ue=Aa(this)-pe;Ue&&(Yn(this.doc,Re)||Pn(Re,Re.height+Ue),Fe&&Et(Fe,function(){Fe.curOp.forceUpdate=!0,El(Fe,Re,Ue),Ei(Fe,"lineWidgetChanged",Fe,re,zt(Re))}))},oi(_a);function El(re,pe,Fe){Eo(pe)<(re.curOp&&re.curOp.scrollTop||re.doc.scrollTop)&&Ch(re,Fe)}function Nu(re,pe,Fe,Re){var Ue=new _a(re,Fe,Re),ot=re.cm;return ot&&Ue.noHScroll&&(ot.display.alignWidgets=!0),va(re,pe,"widget",function(xt){var Dt=xt.widgets||(xt.widgets=[]);if(Ue.insertAt==null?Dt.push(Ue):Dt.splice(Math.min(Dt.length-1,Math.max(0,Ue.insertAt)),0,Ue),Ue.line=xt,ot&&!Yn(re,xt)){var Ot=Eo(xt)<re.scrollTop;Pn(xt,xt.height+Aa(Ue)),Ot&&Ch(ot,Ue.height),ot.curOp.forceUpdate=!0}return!0}),ot&&Ei(ot,"lineWidgetAdded",ot,Ue,typeof pe=="number"?pe:zt(pe)),Ue}var mf=0,mn=function(re,pe){this.lines=[],this.type=pe,this.doc=re,this.id=++mf};mn.prototype.clear=function(){if(!this.explicitlyCleared){var re=this.doc.cm,pe=re&&!re.curOp;if(pe&&ka(re),kn(this,"clear")){var Fe=this.find();Fe&&Ei(this,"clear",Fe.from,Fe.to)}for(var Re=null,Ue=null,ot=0;ot<this.lines.length;++ot){var xt=this.lines[ot],Dt=xo(xt.markedSpans,this);re&&!this.collapsed?bo(re,zt(xt),"text"):re&&(Dt.to!=null&&(Ue=zt(xt)),Dt.from!=null&&(Re=zt(xt))),xt.markedSpans=Cr(xt.markedSpans,Dt),Dt.from==null&&this.collapsed&&!Yn(this.doc,xt)&&re&&Pn(xt,Tu(re.display))}if(re&&this.collapsed&&!re.options.lineWrapping)for(var Ot=0;Ot<this.lines.length;++Ot){var Xt=Tr(this.lines[Ot]),Mn=rs(Xt);Mn>re.display.maxLineLength&&(re.display.maxLine=Xt,re.display.maxLineLength=Mn,re.display.maxLineChanged=!0)}Re!=null&&re&&this.collapsed&&_s(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&&Ei(re,"markerCleared",re,this,Re,Ue),pe&&oc(re),this.parent&&this.parent.clear()}},mn.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],xt=xo(ot.markedSpans,this);if(xt.from!=null&&(Fe=Vt(pe?ot:zt(ot),xt.from),re==-1))return Fe;if(xt.to!=null&&(Re=Vt(pe?ot:zt(ot),xt.to),re==1))return Re}return Fe&&{from:Fe,to:Re}},mn.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=zt(pe.line),xt=Gu(Re,ot);if(xt&&(La(xt),Re.curOp.selectionChanged=Re.curOp.forceUpdate=!0),Re.curOp.updateMaxLine=!0,!Yn(Fe.doc,Ue)&&Fe.height!=null){var Dt=Fe.height;Fe.height=null;var Ot=Aa(Fe)-Dt;Ot&&Pn(Ue,Ue.height+Ot)}Ei(Re,"markerChanged",Re,re)})},mn.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)},mn.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)}},oi(mn);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 mn(re,Ue),xt=an(pe,Fe);if(Re&&jt(Re,ot,!1),xt>0||xt==0&&ot.clearWhenEmpty!==!1)return ot;if(ot.replacedWith&&(ot.collapsed=!0,ot.widgetNode=Ye("span",[ot.replacedWith],"CodeMirror-widget"),Re.handleMouseEvents||ot.widgetNode.setAttribute("cm-ignore-events","true"),Re.insertLeft&&(ot.widgetNode.insertLeft=!0)),ot.collapsed){if(Po(re,pe.line,pe,Fe,ot)||pe.line!=Fe.line&&Po(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 Dt=pe.line,Ot=re.cm,Xt;if(re.iter(Dt,Fe.line+1,function(nn){Ot&&ot.collapsed&&!Ot.options.lineWrapping&&Tr(nn)==Ot.display.maxLine&&(Xt=!0),ot.collapsed&&Dt!=pe.line&&Pn(nn,0),Fo(nn,new br(ot,Dt==pe.line?pe.ch:null,Dt==Fe.line?Fe.ch:null)),++Dt}),ot.collapsed&&re.iter(pe.line,Fe.line+1,function(nn){Yn(re,nn)&&Pn(nn,0)}),ot.clearOnEnter&&Tt(ot,"beforeCursorEnter",function(){return ot.clear()}),ot.readOnly&&(Kr(),(re.history.done.length||re.history.undone.length)&&re.clearHistory()),ot.collapsed&&(ot.id=++mf,ot.atomic=!0),Ot){if(Xt&&(Ot.curOp.updateMaxLine=!0),ot.collapsed)_s(Ot,pe.line,Fe.line+1);else if(ot.className||ot.startStyle||ot.endStyle||ot.css||ot.attributes||ot.title)for(var Mn=pe.line;Mn<=Fe.line;Mn++)bo(Ot,Mn,"text");ot.atomic&&Xl(Ot.doc),Ei(Ot,"markerAdded",Ot,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();Ei(this,"clear")}},ac.prototype.find=function(re,pe){return this.primary.find(re,pe)},oi(ac);function vf(re,pe,Fe,Re,Ue){Re=jt(Re),Re.shared=!1;var ot=[Bc(re,pe,Fe,Re,Ue)],xt=ot[0],Dt=Re.widgetNode;return ts(re,function(Ot){Dt&&(Re.widgetNode=Dt.cloneNode(!0)),ot.push(Bc(Ot,Rn(Ot,pe),Rn(Ot,Fe),Re,Ue));for(var Xt=0;Xt<Ot.linked.length;++Xt)if(Ot.linked[Xt].isParent)return;xt=Wt(ot)}),new ac(ot,xt)}function Ph(re){return re.findMarks(Vt(re.first,0),re.clipPos(Vt(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),xt=re.clipPos(Ue.to);if(an(ot,xt)){var Dt=Bc(re,ot,xt,Re.primary,Re.primary.type);Re.markers.push(Dt),Dt.parent=Re}}}function Rd(re){for(var pe=function(Re){var Ue=re[Re],ot=[Ue.primary.doc];ts(Ue.primary.doc,function(Ot){return ot.push(Ot)});for(var xt=0;xt<Ue.markers.length;xt++){var Dt=Ue.markers[xt];ut(ot,Dt.doc)==-1&&(Dt.parent=null,Ue.markers.splice(xt--,1))}},Fe=0;Fe<re.length;Fe++)pe(Fe)}var Kp=0,Ia=function(re,pe,Fe,Re,Ue){if(!(this instanceof Ia))return new Ia(re,pe,Fe,Re,Ue);Fe==null&&(Fe=0),ns.call(this,[new js([new is("",null)])]),this.first=Fe,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=Fe;var ot=Vt(Fe,0);this.sel=vr(ot),this.history=new Er(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)),Yr(this,{from:ot,to:ot,text:re}),ks(this,vr(ot),gt)};Ia.prototype=Lt(ns.prototype,{constructor:Ia,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=Un(this,this.first,this.first+this.size);return re===!1?pe:pe.join(re||this.lineSeparator())},setValue:sn(function(re){var pe=Vt(this.first,0),Fe=this.first+this.size-1;ra(this,{from:pe,to:Vt(Fe,gn(this,Fe).text.length),text:this.splitLines(re),origin:"setValue",full:!0},!0),this.cm&&io(this.cm,0,0),ks(this,vr(pe),gt)}),replaceRange:function(re,pe,Fe,Re){pe=Rn(this,pe),Fe=Fe?Rn(this,Fe):pe,sc(this,re,pe,Fe,Re)},getRange:function(re,pe,Fe){var Re=En(this,Rn(this,re),Rn(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(Cn(this,re))return gn(this,re)},getLineNumber:function(re){return zt(re)},getLineHandleVisualStart:function(re){return typeof re=="number"&&(re=gn(this,re)),Tr(re)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(re){return Rn(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:sn(function(re,pe,Fe){Es(this,Rn(this,typeof re=="number"?Vt(re,pe||0):re),null,Fe)}),setSelection:sn(function(re,pe,Fe){Es(this,Rn(this,re),Rn(this,pe||re),Fe)}),extendSelection:sn(function(re,pe,Fe){Xo(this,Rn(this,re),pe&&Rn(this,pe),Fe)}),extendSelections:sn(function(re,pe){Jo(this,Mi(this,re),pe)}),extendSelectionsBy:sn(function(re,pe){var Fe=Kt(this.sel.ranges,re);Jo(this,Mi(this,Fe),pe)}),setSelections:sn(function(re,pe,Fe){if(re.length){for(var Re=[],Ue=0;Ue<re.length;Ue++)Re[Ue]=new Pi(Rn(this,re[Ue].anchor),Rn(this,re[Ue].head));pe==null&&(pe=Math.min(re.length-1,this.sel.primIndex)),ks(this,Zi(this.cm,Re,pe),Fe)}}),addSelection:sn(function(re,pe,Fe){var Re=this.sel.ranges.slice(0);Re.push(new Pi(Rn(this,re),Rn(this,pe||re))),ks(this,Zi(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=En(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=En(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:sn(function(re,pe,Fe){for(var Re=[],Ue=this.sel,ot=0;ot<Ue.ranges.length;ot++){var xt=Ue.ranges[ot];Re[ot]={from:xt.from(),to:xt.to(),text:this.splitLines(re[ot]),origin:Fe}}for(var Dt=pe&&pe!="end"&&so(this,Re,pe),Ot=Re.length-1;Ot>=0;Ot--)ra(this,Re[Ot]);Dt?zo(this,Dt):this.cm&&ic(this.cm)}),undo:sn(function(){Ql(this,"undo")}),redo:sn(function(){Ql(this,"redo")}),undoSelection:sn(function(){Ql(this,"undo",!0)}),redoSelection:sn(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 Er(this.history.maxGeneration),ts(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:Ys(this.history.done),undone:Ys(this.history.undone)}},setHistory:function(re){var pe=this.history=new Er(this.history.maxGeneration);pe.done=Ys(re.done.slice(0),null,!0),pe.undone=Ys(re.undone.slice(0),null,!0)},setGutterMarker:sn(function(re,pe,Fe){return va(this,re,"gutter",function(Re){var Ue=Re.gutterMarkers||(Re.gutterMarkers={});return Ue[pe]=Fe,!Fe&&yt(Ue)&&(Re.gutterMarkers=null),!0})}),clearGutter:sn(function(re){var pe=this;this.iter(function(Fe){Fe.gutterMarkers&&Fe.gutterMarkers[re]&&va(pe,Fe,"gutter",function(){return Fe.gutterMarkers[re]=null,yt(Fe.gutterMarkers)&&(Fe.gutterMarkers=null),!0})})}),lineInfo:function(re){var pe;if(typeof re=="number"){if(!Cn(this,re)||(pe=re,re=gn(this,re),!re))return null}else if(pe=zt(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:sn(function(re,pe,Fe){return va(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(be(Fe).test(Re[Ue]))return!1;Re[Ue]+=" "+Fe}return!0})}),removeLineClass:sn(function(re,pe,Fe){return va(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 xt=ot.match(be(Fe));if(!xt)return!1;var Dt=xt.index+xt[0].length;Re[Ue]=ot.slice(0,xt.index)+(!xt.index||Dt==ot.length?"":" ")+ot.slice(Dt)||null}else return!1;return!0})}),addLineWidget:sn(function(re,pe,Fe){return Nu(this,re,pe,Fe)}),removeLineWidget:function(re){re.clear()},markText:function(re,pe,Fe){return Bc(this,Rn(this,re),Rn(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=Rn(this,re),Bc(this,re,re,Fe,"bookmark")},findMarksAt:function(re){re=Rn(this,re);var pe=[],Fe=gn(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=Rn(this,re),pe=Rn(this,pe);var Re=[],Ue=re.line;return this.iter(re.line,pe.line+1,function(ot){var xt=ot.markedSpans;if(xt)for(var Dt=0;Dt<xt.length;Dt++){var Ot=xt[Dt];!(Ot.to!=null&&Ue==re.line&&re.ch>=Ot.to||Ot.from==null&&Ue!=re.line||Ot.from!=null&&Ue==pe.line&&Ot.from>=pe.ch)&&(!Fe||Fe(Ot.marker))&&Re.push(Ot.marker.parent||Ot.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}),Rn(this,Vt(Fe,pe))},indexFromPos:function(re){re=Rn(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 Ia(Un(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 Ia(Un(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 gs&&(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];ts(re,function(Ue){return Re.push(Ue.id)},!0),re.history=new Er(null),re.history.done=Ys(this.history.done,Re),re.history.undone=Ys(this.history.undone,Re)}},iterLinkedDocs:function(re){ts(this,re)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(re){return this.lineSep?re.split(this.lineSep):zi(re)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:sn(function(re){re!="rtl"&&(re="ltr"),re!=this.direction&&(this.direction=re,this.iter(function(pe){return pe.order=null}),this.cm&&Xr(this.cm))})}),Ia.prototype.eachLine=Ia.prototype.iter;var nd=0;function Bd(re){var pe=this;if(Yf(pe),!(pn(pe,re)||Ha(pe.display,re))){ri(re),Pe&&(nd=+new Date);var Fe=Na(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),xt=0,Dt=function(){++xt==Ue&&wn(pe,function(){Fe=Rn(pe.doc,Fe);var jn={from:Fe,to:Fe,text:pe.doc.splitLines(ot.filter(function(yi){return yi!=null}).join(pe.doc.lineSeparator())),origin:"paste"};ra(pe.doc,jn),zo(pe.doc,vr(Rn(pe.doc,Fe),Rn(pe.doc,or(jn))))})()},Ot=function(jn,yi){if(pe.options.allowDropFileTypes&&ut(pe.options.allowDropFileTypes,jn.type)==-1){Dt();return}var _i=new FileReader;_i.onerror=function(){return Dt()},_i.onload=function(){var Bi=_i.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Bi)){Dt();return}ot[yi]=Bi,Dt()},_i.readAsText(jn)},Xt=0;Xt<Re.length;Xt++)Ot(Re[Xt],Xt);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 Mn=re.dataTransfer.getData("Text");if(Mn){var nn;if(pe.state.draggingText&&!pe.state.draggingText.copy&&(nn=pe.listSelections()),Pa(pe.doc,vr(Fe,Fe)),nn)for(var Wn=0;Wn<nn.length;++Wn)sc(pe.doc,"",nn[Wn].anchor,nn[Wn].head,"drag");pe.replaceSelection(Mn,"around","paste"),pe.display.input.focus()}}catch(jn){}}}}function id(re,pe){if(Pe&&(!re.state.draggingText||+new Date-nd<100)){Qi(pe);return}if(!(pn(re,pe)||Ha(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=Na(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;Tt(window,"resize",function(){re==null&&(re=setTimeout(function(){re=null,Sf(xf)},100))}),Tt(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,xt=0;xt<pe.length-1;xt++){var Dt=pe[xt];if(/^(cmd|meta|m)$/i.test(Dt))ot=!0;else if(/^a(lt)?$/i.test(Dt))Fe=!0;else if(/^(c|ctrl|control)$/i.test(Dt))Re=!0;else if(/^s(hift)?$/i.test(Dt))Ue=!0;else throw new Error("Unrecognized modifier name: "+Dt)}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 xt=void 0,Dt=void 0;ot==Ue.length-1?(Dt=Ue.join(" "),xt=Re):(Dt=Ue.slice(0,ot+1).join(" "),xt="...");var Ot=pe[Dt];if(!Ot)pe[Dt]=xt;else if(Ot!=xt)throw new Error("Inconsistent bindings for "+Dt)}delete re[Fe]}for(var Xt in pe)re[Xt]=pe[Xt];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 xt=eu(re,pe.fallthrough[ot],Fe,Re);if(xt)return xt}}}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),(ye?pe.metaKey:pe.ctrlKey)&&Re!="Ctrl"&&(re="Ctrl-"+re),(ye?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 pl(re,pe){for(var Fe=re.doc.sel.ranges,Re=[],Ue=0;Ue<Fe.length;Ue++){for(var ot=pe(Fe[Ue]);Re.length&&an(ot.from,Wt(Re).to)<=0;){var xt=Re.pop();if(an(xt.from,ot.from)<0){ot.from=xt.from;break}}Re.push(ot)}Et(re,function(){for(var Dt=Re.length-1;Dt>=0;Dt--)sc(re.doc,"",Re[Dt].from,Re[Dt].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 ya(re,pe,Fe){var Re=Gd(re,pe.ch,Fe);return Re==null?null:new Vt(pe.line,Re,Fe<0?"after":"before")}function cs(re,pe,Fe,Re,Ue){if(re){pe.doc.direction=="rtl"&&(Ue=-Ue);var ot=dt(Fe,pe.doc.direction);if(ot){var xt=Ue<0?Wt(ot):ot[0],Dt=Ue<0==(xt.level==1),Ot=Dt?"after":"before",Xt;if(xt.level>0||pe.doc.direction=="rtl"){var Mn=Lu(pe,Fe);Xt=Ue<0?Fe.text.length-1:0;var nn=bl(pe,Mn,Xt).top;Xt=We(function(Wn){return bl(pe,Mn,Wn).top==nn},Ue<0==(xt.level==1)?xt.from:xt.to-1,Xt),Ot=="before"&&(Xt=Gd(Fe,Xt,1))}else Xt=Ue<0?xt.to:xt.from;return new Vt(Re,Xt,Ot)}}return new Vt(Re,Ue<0?Fe.text.length:0,Ue<0?"before":"after")}function Vs(re,pe,Fe,Re){var Ue=dt(pe,re.doc.direction);if(!Ue)return ya(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),xt=Ue[ot];if(re.doc.direction=="ltr"&&xt.level%2==0&&(Re>0?xt.to>Fe.ch:xt.from<Fe.ch))return ya(pe,Fe,Re);var Dt=function(ar,Br){return Gd(pe,ar instanceof Vt?ar.ch:ar,Br)},Ot,Xt=function(ar){return re.options.lineWrapping?(Ot=Ot||Lu(re,pe),bc(re,pe,Ot,ar)):{begin:0,end:pe.text.length}},Mn=Xt(Fe.sticky=="before"?Dt(Fe,-1):Fe.ch);if(re.doc.direction=="rtl"||xt.level==1){var nn=xt.level==1==Re<0,Wn=Dt(Fe,nn?1:-1);if(Wn!=null&&(nn?Wn<=xt.to&&Wn<=Mn.end:Wn>=xt.from&&Wn>=Mn.begin)){var jn=nn?"before":"after";return new Vt(Fe.line,Wn,jn)}}var yi=function(ar,Br,wr){for(var Wr=function(la,Va){return Va?new Vt(Fe.line,Dt(la,1),"before"):new Vt(Fe.line,la,"after")};ar>=0&&ar<Ue.length;ar+=Br){var Co=Ue[ar],Sr=Br>0==(Co.level!=1),Ho=Sr?wr.begin:Dt(wr.end,-1);if(Co.from<=Ho&&Ho<Co.to||(Ho=Sr?Co.from:Dt(Co.to,-1),wr.begin<=Ho&&Ho<wr.end))return Wr(Ho,Sr)}},_i=yi(ot+Re,Re,Mn);if(_i)return _i;var Bi=Re>0?Mn.end:Dt(Mn.begin,-1);return Bi!=null&&!(Re>0&&Bi==pe.text.length)&&(_i=yi(Re>0?0:Ue.length-1,Re,Xt(Bi)),_i)?_i:null}var Za={selectAll:ds,singleSelection:function(re){return re.setSelection(re.getCursor("anchor"),re.getCursor("head"),gt)},killLine:function(re){return pl(re,function(pe){if(pe.empty()){var Fe=gn(re.doc,pe.head.line).text.length;return pe.head.ch==Fe&&pe.head.line<re.lastLine()?{from:pe.head,to:Vt(pe.head.line+1,0)}:{from:pe.head,to:Vt(pe.head.line,Fe)}}else return{from:pe.from(),to:pe.to()}})},deleteLine:function(re){return pl(re,function(pe){return{from:Vt(pe.from().line,0),to:Rn(re.doc,Vt(pe.to().line+1,0))}})},delLineLeft:function(re){return pl(re,function(pe){return{from:Vt(pe.from().line,0),to:pe.from()}})},delWrappedLineLeft:function(re){return pl(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 pl(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(Vt(re.firstLine(),0))},goDocEnd:function(re){return re.extendSelection(Vt(re.lastLine()))},goLineStart:function(re){return re.extendSelectionsBy(function(pe){return pu(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 gu(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(),xt=lt(re.getLine(ot.line),ot.ch,Re);pe.push(bn(Re-xt%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=gn(re.doc,Ue.line).text;if(ot){if(Ue.ch==ot.length&&(Ue=new Vt(Ue.line,Ue.ch-1)),Ue.ch>0)Ue=new Vt(Ue.line,Ue.ch+1),re.replaceRange(ot.charAt(Ue.ch-1)+ot.charAt(Ue.ch-2),Vt(Ue.line,Ue.ch-2),Ue,"+transpose");else if(Ue.line>re.doc.first){var xt=gn(re.doc,Ue.line-1).text;xt&&(Ue=new Vt(Ue.line,1),re.replaceRange(ot.charAt(0)+re.doc.lineSeparator()+xt.charAt(xt.length-1),Vt(Ue.line-1,xt.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 pu(re,pe){var Fe=gn(re.doc,pe),Re=Tr(Fe);return Re!=Fe&&(pe=zt(Re)),cs(!0,re,Re,pe,1)}function gu(re,pe){var Fe=gn(re.doc,pe),Re=Io(Fe);return Re!=Fe&&(pe=zt(Re)),cs(!0,re,Fe,pe,-1)}function Wd(re,pe){var Fe=pu(re,pe.line),Re=gn(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/)),xt=pe.line==Fe.line&&pe.ch<=ot&&pe.ch;return Vt(Fe.line,xt?0:ot,Fe.sticky)}return Fe}function zc(re,pe,Fe){if(typeof pe=="string"&&(pe=Za[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)!=_t}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 et;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"&&Ei(re,"keyHandled",re,pe,Fe),(Ue=="handled"||Ue=="multi")&&(ri(Fe),ps(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(),!pn(pe,re))){Pe&&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&&!zr&&(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;Pt(pe,"CodeMirror-crosshair");function Fe(Re){(Re.keyCode==18||!Re.altKey)&&(Ae(pe,"CodeMirror-crosshair"),yn(document,"keyup",Fe),yn(document,"mouseover",Fe))}Tt(document,"keyup",Fe),Tt(document,"mouseover",Fe)}function Yp(re){re.keyCode==16&&(this.doc.sel.shift=!1),pn(this,re)}function Lc(re){var pe=this;if(!(re.target&&re.target!=pe.display.input.getField())&&!(Ha(pe.display,re)||pn(pe,re)||re.ctrlKey&&!re.altKey||oe&&re.metaKey)){var Fe=re.keyCode,Re=re.charCode;if(ge&&Fe==od){od=null,ri(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&&an(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(!(pn(pe,re)||Fe.activeTouch&&Fe.input.supportsTouch())){if(Fe.input.ensurePolled(),Fe.shift=re.shiftKey,Ha(Fe,re)){he||(Fe.scroller.draggable=!1,setTimeout(function(){return Fe.scroller.draggable=!0},100));return}if(!tp(pe,re)){var Re=Na(pe,re),Ue=fr(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&&ri(re):Ue==2?(Re&&Xo(pe.doc,Re),setTimeout(function(){return Fe.input.focus()},20)):Ue==3&&(we?pe.display.input.onContextMenu(re):Rs(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(xt){if(typeof xt=="string"&&(xt=Za[xt]),!xt)return!1;var Dt=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),Dt=xt(re,Fe)!=_t}finally{re.state.suppressEdits=!1}return Dt})}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){Pe?setTimeout(st(us,re),0):re.curOp.focus=at();var Ue=qf(re,Fe,Re),ot=re.doc.sel,xt;re.options.dragDrop&&er&&!re.isReadOnly()&&Fe=="single"&&(xt=ot.contains(pe))>-1&&(an((xt=ot.ranges[xt]).from(),pe)<0||pe.xRel>0)&&(an(xt.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,xt=wn(re,function(Xt){he&&(Ue.scroller.draggable=!1),re.state.draggingText=!1,yn(Ue.wrapper.ownerDocument,"mouseup",xt),yn(Ue.wrapper.ownerDocument,"mousemove",Dt),yn(Ue.scroller,"dragstart",Ot),yn(Ue.scroller,"drop",xt),ot||(ri(Xt),Re.addNew||Xo(re.doc,Fe,null,null,Re.extend),he&&!le||Pe&&Le==9?setTimeout(function(){Ue.wrapper.ownerDocument.body.focus({preventScroll:!0}),Ue.input.focus()},20):Ue.input.focus())}),Dt=function(Xt){ot=ot||Math.abs(pe.clientX-Xt.clientX)+Math.abs(pe.clientY-Xt.clientY)>=10},Ot=function(){return ot=!0};he&&(Ue.scroller.draggable=!0),re.state.draggingText=xt,xt.copy=!Re.moveOnDrag,Ue.scroller.dragDrop&&Ue.scroller.dragDrop(),Tt(Ue.wrapper.ownerDocument,"mouseup",xt),Tt(Ue.wrapper.ownerDocument,"mousemove",Dt),Tt(Ue.scroller,"dragstart",Ot),Tt(Ue.scroller,"drop",xt),Rs(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(Vt(pe.line,0),Rn(re.doc,Vt(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;ri(pe);var xt,Dt,Ot=ot.sel,Xt=Ot.ranges;if(Re.addNew&&!Re.extend?(Dt=ot.sel.contains(Fe),Dt>-1?xt=Xt[Dt]:xt=new Pi(Fe,Fe)):(xt=ot.sel.primary(),Dt=ot.sel.primIndex),Re.unit=="rectangle")Re.addNew||(xt=new Pi(Fe,Fe)),Fe=Na(re,pe,!0,!0),Dt=-1;else{var Mn=eg(re,Fe,Re.unit);Re.extend?xt=Pl(xt,Mn.anchor,Mn.head,Re.extend):xt=Mn}Re.addNew?Dt==-1?(Dt=Xt.length,ks(ot,Zi(re,Xt.concat([xt]),Dt),{scroll:!1,origin:"*mouse"})):Xt.length>1&&Xt[Dt].empty()&&Re.unit=="char"&&!Re.extend?(ks(ot,Zi(re,Xt.slice(0,Dt).concat(Xt.slice(Dt+1)),0),{scroll:!1,origin:"*mouse"}),Ot=ot.sel):Ss(ot,Dt,xt,Bt):(Dt=0,ks(ot,new Xi([xt],0),Bt),Ot=ot.sel);var nn=Fe;function Wn(wr){if(an(nn,wr)!=0)if(nn=wr,Re.unit=="rectangle"){for(var Wr=[],Co=re.options.tabSize,Sr=lt(gn(ot,Fe.line).text,Fe.ch,Co),Ho=lt(gn(ot,wr.line).text,wr.ch,Co),la=Math.min(Sr,Ho),Va=Math.max(Sr,Ho),ga=Math.min(Fe.line,wr.line),nu=Math.min(re.lastLine(),Math.max(Fe.line,wr.line));ga<=nu;ga++){var Ml=gn(ot,ga).text,Ra=hn(Ml,la,Co);la==Va?Wr.push(new Pi(Vt(ga,Ra),Vt(ga,Ra))):Ml.length>Ra&&Wr.push(new Pi(Vt(ga,Ra),Vt(ga,hn(Ml,Va,Co))))}Wr.length||Wr.push(new Pi(Fe,Fe)),ks(ot,Zi(re,Ot.ranges.slice(0,Dt).concat(Wr),Dt),{origin:"*mouse",scroll:!1}),re.scrollIntoView(wr)}else{var mu=xt,gl=eg(re,wr,Re.unit),Ba=mu.anchor,xs;an(gl.anchor,Ba)>0?(xs=gl.head,Ba=Gn(mu.from(),gl.anchor)):(xs=gl.anchor,Ba=qn(mu.to(),gl.head));var Sa=Ot.ranges.slice(0);Sa[Dt]=am(re,new Pi(Rn(ot,Ba),xs)),ks(ot,Zi(re,Sa,Dt),Bt)}}var jn=Ue.wrapper.getBoundingClientRect(),yi=0;function _i(wr){var Wr=++yi,Co=Na(re,wr,!0,Re.unit=="rectangle");if(Co)if(an(Co,nn)!=0){re.curOp.focus=at(),Wn(Co);var Sr=Wo(Ue,ot);(Co.line>=Sr.to||Co.line<Sr.from)&&setTimeout(wn(re,function(){yi==Wr&&_i(wr)}),150)}else{var Ho=wr.clientY<jn.top?-20:wr.clientY>jn.bottom?20:0;Ho&&setTimeout(wn(re,function(){yi==Wr&&(Ue.scroller.scrollTop+=Ho,_i(wr))}),50)}}function Bi(wr){re.state.selectingText=!1,yi=1/0,wr&&(ri(wr),Ue.input.focus()),yn(Ue.wrapper.ownerDocument,"mousemove",ar),yn(Ue.wrapper.ownerDocument,"mouseup",Br),ot.history.lastSelOrigin=null}var ar=wn(re,function(wr){wr.buttons===0||!fr(wr)?Bi(wr):_i(wr)}),Br=wn(re,Bi);re.state.selectingText=Br,Tt(Ue.wrapper.ownerDocument,"mousemove",ar),Tt(Ue.wrapper.ownerDocument,"mouseup",Br)}function am(re,pe){var Fe=pe.anchor,Re=pe.head,Ue=gn(re.doc,Fe.line);if(an(Fe,Re)==0&&Fe.sticky==Re.sticky)return pe;var ot=dt(Ue);if(!ot)return pe;var xt=Ne(ot,Fe.ch,Fe.sticky),Dt=ot[xt];if(Dt.from!=Fe.ch&&Dt.to!=Fe.ch)return pe;var Ot=xt+(Dt.from==Fe.ch==(Dt.level!=1)?0:1);if(Ot==0||Ot==ot.length)return pe;var Xt;if(Re.line!=Fe.line)Xt=(Re.line-Fe.line)*(re.doc.direction=="ltr"?1:-1)>0;else{var Mn=Ne(ot,Re.ch,Re.sticky),nn=Mn-xt||(Re.ch-Fe.ch)*(Dt.level==1?-1:1);Mn==Ot-1||Mn==Ot?Xt=nn<0:Xt=nn>0}var Wn=ot[Ot+(Xt?-1:0)],jn=Xt==(Wn.level==1),yi=jn?Wn.from:Wn.to,_i=jn?"after":"before";return Fe.ch==yi&&Fe.sticky==_i?pe:new Pi(new Vt(Fe.line,yi,_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(Wn){return!1}if(Ue>=Math.floor(re.display.gutters.getBoundingClientRect().right))return!1;Re&&ri(pe);var xt=re.display,Dt=xt.lineDiv.getBoundingClientRect();if(ot>Dt.bottom||!kn(re,Fe))return mi(pe);ot-=Dt.top-xt.viewOffset;for(var Ot=0;Ot<re.display.gutterSpecs.length;++Ot){var Xt=xt.gutters.childNodes[Ot];if(Xt&&Xt.getBoundingClientRect().right>=Ue){var Mn=Yt(re.doc,ot),nn=re.display.gutterSpecs[Ot];return rn(re,Fe,re,Mn,nn.className,pe),mi(pe)}}}function tp(re,pe){return ep(re,pe,"gutterClick",!0)}function np(re,pe){Ha(re.display,pe)||lm(re,pe)||pn(re,pe,"contextmenu")||we||re.display.input.onContextMenu(pe)}function lm(re,pe){return kn(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-"),Is(re)}var Mh={toString:function(){return"CodeMirror.Init"}},tg={},wf={};function um(re){var pe=re.optionHandlers;function Fe(Re,Ue,ot,xt){re.defaults[Re]=Ue,ot&&(pe[Re]=xt?function(Dt,Ot,Xt){Xt!=Mh&&ot(Dt,Ot,Xt)}: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,Or(Re)},!0),Fe("indentUnit",2,Or,!0),Fe("indentWithTabs",!1),Fe("smartIndent",!0),Fe("tabSize",4,function(Re){Do(Re),Is(Re),_s(Re)},!0),Fe("lineSeparator",null,function(Re,Ue){if(Re.doc.lineSep=Ue,!!Ue){var ot=[],xt=Re.doc.first;Re.doc.iter(function(Ot){for(var Xt=0;;){var Mn=Ot.text.indexOf(Ue,Xt);if(Mn==-1)break;Xt=Mn+Ue.length,ot.push(Vt(xt,Mn))}xt++});for(var Dt=ot.length-1;Dt>=0;Dt--)sc(Re.doc,Ue,ot[Dt],Vt(ot[Dt].line,ot[Dt].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",Os,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),ei(Re)},!0),Fe("keyMap","default",function(Re,Ue,ot){var xt=jc(Ue),Dt=ot!=Mh&&jc(ot);Dt&&Dt.detach&&Dt.detach(Re,xt),xt.attach&&xt.attach(Re,Dt||null)}),Fe("extraKeys",null),Fe("configureMouse",null),Fe("lineWrapping",!1,cm,!0),Fe("gutters",[],function(Re,Ue){Re.display.gutterSpecs=Ii(Ue,Re.options.lineNumbers),ei(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=Ii(Re.options.gutters,Ue),ei(Re)},!0),Fe("firstLineNumber",1,ei,!0),Fe("lineNumberFormatter",function(Re){return Re},ei,!0),Fe("showCursorWhenSelecting",!1,Ca,!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,Ca,!0),Fe("singleCursorHeightPerLine",!0,Ca,!0),Fe("workTime",100),Fe("workDelay",100),Fe("flattenSpans",!0,Do,!0),Fe("addModeClass",!1,Do,!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,Do,!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?Tt:yn;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?(Pt(re.display.wrapper,"CodeMirror-wrap"),re.display.sizer.style.minWidth="",re.display.sizerWidth=null):(Ae(re.display.wrapper,"CodeMirror-wrap"),Lo(re)),Zr(re),_s(re),Is(re),setTimeout(function(){return rc(re)},100)}function gs(re,pe){var Fe=this;if(!(this instanceof gs))return new gs(re,pe);this.options=pe=pe?jt(pe):{},jt(tg,pe,!1);var Re=pe.value;typeof Re=="string"?Re=new Ia(Re,pe.mode,null,pe.lineSeparator,pe.direction):pe.mode&&(Re.modeOption=pe.mode),this.doc=Re;var Ue=new gs.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 et,keySeq:null,specialChars:null},pe.autofocus&&!ee&&ot.input.focus(),Pe&&Le<11&&setTimeout(function(){return Fe.display.input.reset(!0)},20),Kd(this),ql(),ka(this),this.curOp.forceUpdate=!0,Gr(this,Re),pe.autofocus&&!ee||this.hasFocus()?setTimeout(function(){Fe.hasFocus()&&!Fe.state.focused&&jo(Fe)},20):Rc(this);for(var xt in wf)wf.hasOwnProperty(xt)&&wf[xt](this,pe[xt],Mh);Oi(this),pe.finishInit&&pe.finishInit(this);for(var Dt=0;Dt<ad.length;++Dt)ad[Dt](this);oc(this),he&&pe.lineWrapping&&getComputedStyle(ot.lineDiv).textRendering=="optimizelegibility"&&(ot.lineDiv.style.textRendering="auto")}gs.defaults=tg,gs.optionHandlers=wf;function Kd(re){var pe=re.display;Tt(pe.scroller,"mousedown",wn(re,Mc)),Pe&&Le<11?Tt(pe.scroller,"dblclick",wn(re,function(Ot){if(!pn(re,Ot)){var Xt=Na(re,Ot);if(!(!Xt||tp(re,Ot)||Ha(re.display,Ot))){ri(Ot);var Mn=re.findWordAt(Xt);Xo(re.doc,Mn.anchor,Mn.head)}}})):Tt(pe.scroller,"dblclick",function(Ot){return pn(re,Ot)||ri(Ot)}),Tt(pe.scroller,"contextmenu",function(Ot){return np(re,Ot)}),Tt(pe.input.getField(),"contextmenu",function(Ot){pe.scroller.contains(Ot.target)||np(re,Ot)});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(Ot){if(Ot.touches.length!=1)return!1;var Xt=Ot.touches[0];return Xt.radiusX<=1&&Xt.radiusY<=1}function xt(Ot,Xt){if(Xt.left==null)return!0;var Mn=Xt.left-Ot.left,nn=Xt.top-Ot.top;return Mn*Mn+nn*nn>20*20}Tt(pe.scroller,"touchstart",function(Ot){if(!pn(re,Ot)&&!ot(Ot)&&!tp(re,Ot)){pe.input.ensurePolled(),clearTimeout(Fe);var Xt=+new Date;pe.activeTouch={start:Xt,moved:!1,prev:Xt-Re.end<=300?Re:null},Ot.touches.length==1&&(pe.activeTouch.left=Ot.touches[0].pageX,pe.activeTouch.top=Ot.touches[0].pageY)}}),Tt(pe.scroller,"touchmove",function(){pe.activeTouch&&(pe.activeTouch.moved=!0)}),Tt(pe.scroller,"touchend",function(Ot){var Xt=pe.activeTouch;if(Xt&&!Ha(pe,Ot)&&Xt.left!=null&&!Xt.moved&&new Date-Xt.start<300){var Mn=re.coordsChar(pe.activeTouch,"page"),nn;!Xt.prev||xt(Xt,Xt.prev)?nn=new Pi(Mn,Mn):!Xt.prev.prev||xt(Xt,Xt.prev.prev)?nn=re.findWordAt(Mn):nn=new Pi(Vt(Mn.line,0),Rn(re.doc,Vt(Mn.line+1,0))),re.setSelection(nn.anchor,nn.head),re.focus(),ri(Ot)}Ue()}),Tt(pe.scroller,"touchcancel",Ue),Tt(pe.scroller,"scroll",function(){pe.scroller.clientHeight&&(Au(re,pe.scroller.scrollTop),cu(re,pe.scroller.scrollLeft,!0),rn(re,"scroll",re))}),Tt(pe.scroller,"mousewheel",function(Ot){return dr(re,Ot)}),Tt(pe.scroller,"DOMMouseScroll",function(Ot){return dr(re,Ot)}),Tt(pe.wrapper,"scroll",function(){return pe.wrapper.scrollTop=pe.wrapper.scrollLeft=0}),pe.dragFunctions={enter:function(Ot){pn(re,Ot)||Qi(Ot)},over:function(Ot){pn(re,Ot)||(yf(re,Ot),Qi(Ot))},start:function(Ot){return id(re,Ot)},drop:wn(re,Bd),leave:function(Ot){pn(re,Ot)||Yf(re)}};var Dt=pe.input.getField();Tt(Dt,"keyup",function(Ot){return Yp.call(re,Ot)}),Tt(Dt,"keydown",wn(re,Vp)),Tt(Dt,"keypress",wn(re,Lc)),Tt(Dt,"focus",function(Ot){return jo(re,Ot)}),Tt(Dt,"blur",function(Ot){return Rc(re,Ot)})}var ad=[];gs.defineInitHook=function(re){return ad.push(re)};function Ka(re,pe,Fe,Re){var Ue=re.doc,ot;Fe==null&&(Fe="add"),Fe=="smart"&&(Ue.mode.indent?ot=Ai(re,pe).state:Fe="prev");var xt=re.options.tabSize,Dt=gn(Ue,pe),Ot=lt(Dt.text,null,xt);Dt.stateAfter&&(Dt.stateAfter=null);var Xt=Dt.text.match(/^\s*/)[0],Mn;if(!Re&&!/\S/.test(Dt.text))Mn=0,Fe="not";else if(Fe=="smart"&&(Mn=Ue.mode.indent(ot,Dt.text.slice(Xt.length),Dt.text),Mn==_t||Mn>150)){if(!Re)return;Fe="prev"}Fe=="prev"?pe>Ue.first?Mn=lt(gn(Ue,pe-1).text,null,xt):Mn=0:Fe=="add"?Mn=Ot+re.options.indentUnit:Fe=="subtract"?Mn=Ot-re.options.indentUnit:typeof Fe=="number"&&(Mn=Ot+Fe),Mn=Math.max(0,Mn);var nn="",Wn=0;if(re.options.indentWithTabs)for(var jn=Math.floor(Mn/xt);jn;--jn)Wn+=xt,nn+=" ";if(Wn<Mn&&(nn+=bn(Mn-Wn)),nn!=Xt)return sc(Ue,nn,Vt(pe,0),Vt(pe,Xt.length),"+input"),Dt.stateAfter=null,!0;for(var yi=0;yi<Ue.sel.ranges.length;yi++){var _i=Ue.sel.ranges[yi];if(_i.head.line==pe&&_i.head.ch<Xt.length){var Bi=Vt(pe,Xt.length);Ss(Ue,yi,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 xt=+new Date-200,Dt=Ue=="paste"||re.state.pasteIncoming>xt,Ot=zi(pe),Xt=null;if(Dt&&Re.ranges.length>1)if(tu&&tu.text.join(`
|
|
|
`)==pe){if(Re.ranges.length%tu.text.length==0){Xt=[];for(var Mn=0;Mn<tu.text.length;Mn++)Xt.push(ot.splitLines(tu.text[Mn]))}}else Ot.length==Re.ranges.length&&re.options.pasteLinesPerSelection&&(Xt=Kt(Ot,function(ar){return[ar]}));for(var nn=re.curOp.updateInput,Wn=Re.ranges.length-1;Wn>=0;Wn--){var jn=Re.ranges[Wn],yi=jn.from(),_i=jn.to();jn.empty()&&(Fe&&Fe>0?yi=Vt(yi.line,yi.ch-Fe):re.state.overwrite&&!Dt?_i=Vt(_i.line,Math.min(gn(ot,_i.line).text.length,_i.ch+Wt(Ot).length)):Dt&&tu&&tu.lineWise&&tu.text.join(`
|
|
|
`)==Ot.join(`
|
|
|
`)&&(yi=_i=Vt(yi.line,0)));var Bi={from:yi,to:_i,text:Xt?Xt[Wn%Xt.length]:Ot,origin:Ue||(Dt?"paste":re.state.cutIncoming>xt?"cut":"+input")};ra(re.doc,Bi),Ei(re,"inputRead",re,Bi)}pe&&!Dt&&ig(re,pe),ic(re),re.curOp.updateInput<2&&(re.curOp.updateInput=nn),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),xt=!1;if(ot.electricChars){for(var Dt=0;Dt<ot.electricChars.length;Dt++)if(pe.indexOf(ot.electricChars.charAt(Dt))>-1){xt=Ka(re,Ue.head.line,"smart");break}}else ot.electricInput&&ot.electricInput.test(gn(re.doc,Ue.head.line).text.slice(0,Ue.head.ch))&&(xt=Ka(re,Ue.head.line,"smart"));xt&&Ei(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:Vt(Ue,0),head:Vt(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,xt=ot[Re];ot[Re]==Ue&&Re!="mode"||(ot[Re]=Ue,pe.hasOwnProperty(Re)&&wn(this,pe[Re])(this,Ue,xt),rn(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.");Jt(this.state.overlays,{mode:ot,modeSpec:Re,opaque:Ue&&Ue.opaque,priority:Ue&&Ue.priority||0},function(xt){return xt.priority}),this.state.modeGen++,_s(this)}),removeOverlay:fn(function(Re){for(var Ue=this.state.overlays,ot=0;ot<Ue.length;++ot){var xt=Ue[ot].modeSpec;if(xt==Re||typeof Re=="string"&&xt.name==Re){Ue.splice(ot,1),this.state.modeGen++,_s(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"),Cn(this.doc,Re)&&Ka(this,Re,Ue,ot)}),indentSelection:fn(function(Re){for(var Ue=this.doc.sel.ranges,ot=-1,xt=0;xt<Ue.length;xt++){var Dt=Ue[xt];if(Dt.empty())Dt.head.line>ot&&(Ka(this,Dt.head.line,Re,!0),ot=Dt.head.line,xt==this.doc.sel.primIndex&&ic(this));else{var Ot=Dt.from(),Xt=Dt.to(),Mn=Math.max(ot,Ot.line);ot=Math.min(this.lastLine(),Xt.line-(Xt.ch?0:1))+1;for(var nn=Mn;nn<ot;++nn)Ka(this,nn,Re);var Wn=this.doc.sel.ranges;Ot.ch==0&&Ue.length==Wn.length&&Wn[xt].from().ch>0&&Ss(this.doc,xt,new Pi(Ot,Wn[xt].to()),gt)}}}),getTokenAt:function(Re,Ue){return Wi(this,Re,Ue)},getLineTokens:function(Re,Ue){return Wi(this,Vt(Re),Ue,!0)},getTokenTypeAt:function(Re){Re=Rn(this.doc,Re);var Ue=ur(this,gn(this.doc,Re.line)),ot=0,xt=(Ue.length-1)/2,Dt=Re.ch,Ot;if(Dt==0)Ot=Ue[2];else for(;;){var Xt=ot+xt>>1;if((Xt?Ue[Xt*2-1]:0)>=Dt)xt=Xt;else if(Ue[Xt*2+1]<Dt)ot=Xt+1;else{Ot=Ue[Xt*2+2];break}}var Mn=Ot?Ot.indexOf("overlay "):-1;return Mn<0?Ot:Mn==0?null:Ot.slice(0,Mn-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 xt=Fe[Ue],Dt=this.getModeAt(Re);if(typeof Dt[Ue]=="string")xt[Dt[Ue]]&&ot.push(xt[Dt[Ue]]);else if(Dt[Ue])for(var Ot=0;Ot<Dt[Ue].length;Ot++){var Xt=xt[Dt[Ue][Ot]];Xt&&ot.push(Xt)}else Dt.helperType&&xt[Dt.helperType]?ot.push(xt[Dt.helperType]):xt[Dt.name]&&ot.push(xt[Dt.name]);for(var Mn=0;Mn<xt._global.length;Mn++){var nn=xt._global[Mn];nn.pred(Dt,this)&&ut(ot,nn.val)==-1&&ot.push(nn.val)}return ot},getStateAfter:function(Re,Ue){var ot=this.doc;return Re=Jn(ot,Re==null?ot.first+ot.size-1:Re),Ai(this,Re+1,Ue).state},cursorCoords:function(Re,Ue){var ot,xt=this.doc.sel.primary();return Re==null?ot=xt.head:typeof Re=="object"?ot=Rn(this.doc,Re):ot=Re?xt.from():xt.to(),Ds(this,ot,Ue||"page")},charCoords:function(Re,Ue){return Rl(this,Rn(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,Yt(this.doc,Re+this.display.viewOffset)},heightAtLine:function(Re,Ue,ot){var xt=!1,Dt;if(typeof Re=="number"){var Ot=this.doc.first+this.doc.size-1;Re<this.doc.first?Re=this.doc.first:Re>Ot&&(Re=Ot,xt=!0),Dt=gn(this.doc,Re)}else Dt=Re;return Ws(this,Dt,{top:0,left:0},Ue||"page",ot||xt).top+(xt?this.doc.height-Eo(Dt):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,xt,Dt){var Ot=this.display;Re=Ds(this,Rn(this.doc,Re));var Xt=Re.bottom,Mn=Re.left;if(Ue.style.position="absolute",Ue.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Ue),Ot.sizer.appendChild(Ue),xt=="over")Xt=Re.top;else if(xt=="above"||xt=="near"){var nn=Math.max(Ot.wrapper.clientHeight,this.doc.height),Wn=Math.max(Ot.sizer.clientWidth,Ot.lineSpace.clientWidth);(xt=="above"||Re.bottom+Ue.offsetHeight>nn)&&Re.top>Ue.offsetHeight?Xt=Re.top-Ue.offsetHeight:Re.bottom+Ue.offsetHeight<=nn&&(Xt=Re.bottom),Mn+Ue.offsetWidth>Wn&&(Mn=Wn-Ue.offsetWidth)}Ue.style.top=Xt+"px",Ue.style.left=Ue.style.right="",Dt=="right"?(Mn=Ot.sizer.clientWidth-Ue.offsetWidth,Ue.style.right="0px"):(Dt=="left"?Mn=0:Dt=="middle"&&(Mn=(Ot.sizer.clientWidth-Ue.offsetWidth)/2),Ue.style.left=Mn+"px"),ot&&rh(this,{left:Mn,top:Xt,right:Mn+Ue.offsetWidth,bottom:Xt+Ue.offsetHeight})},triggerOnKeyDown:fn(Vp),triggerOnKeyPress:fn(Lc),triggerOnKeyUp:Yp,triggerOnMouseDown:fn(Mc),execCommand:function(Re){if(Za.hasOwnProperty(Re))return Za[Re].call(null,this)},triggerElectric:fn(function(Re){ig(this,Re)}),findPosH:function(Re,Ue,ot,xt){var Dt=1;Ue<0&&(Dt=-1,Ue=-Ue);for(var Ot=Rn(this.doc,Re),Xt=0;Xt<Ue&&(Ot=Cf(this.doc,Ot,Dt,ot,xt),!Ot.hitSide);++Xt);return Ot},moveH:fn(function(Re,Ue){var ot=this;this.extendSelectionsBy(function(xt){return ot.display.shift||ot.doc.extend||xt.empty()?Cf(ot.doc,xt.head,Re,Ue,ot.options.rtlMoveVisually):Re<0?xt.from():xt.to()},Ht)}),deleteH:fn(function(Re,Ue){var ot=this.doc.sel,xt=this.doc;ot.somethingSelected()?xt.replaceSelection("",null,"+delete"):pl(this,function(Dt){var Ot=Cf(xt,Dt.head,Re,Ue,!1);return Re<0?{from:Ot,to:Dt.head}:{from:Dt.head,to:Ot}})}),findPosV:function(Re,Ue,ot,xt){var Dt=1,Ot=xt;Ue<0&&(Dt=-1,Ue=-Ue);for(var Xt=Rn(this.doc,Re),Mn=0;Mn<Ue;++Mn){var nn=Ds(this,Xt,"div");if(Ot==null?Ot=nn.left:nn.left=Ot,Xt=kh(this,nn,Dt,ot),Xt.hitSide)break}return Xt},moveV:fn(function(Re,Ue){var ot=this,xt=this.doc,Dt=[],Ot=!this.display.shift&&!xt.extend&&xt.sel.somethingSelected();if(xt.extendSelectionsBy(function(Mn){if(Ot)return Re<0?Mn.from():Mn.to();var nn=Ds(ot,Mn.head,"div");Mn.goalColumn!=null&&(nn.left=Mn.goalColumn),Dt.push(nn.left);var Wn=kh(ot,nn,Re,Ue);return Ue=="page"&&Mn==xt.sel.primary()&&Ch(ot,Rl(ot,Wn,"div").top-nn.top),Wn},Ht),Dt.length)for(var Xt=0;Xt<xt.sel.ranges.length;Xt++)xt.sel.ranges[Xt].goalColumn=Dt[Xt]}),findWordAt:function(Re){var Ue=this.doc,ot=gn(Ue,Re.line).text,xt=Re.ch,Dt=Re.ch;if(ot){var Ot=this.getHelper(Re,"wordChars");(Re.sticky=="before"||Dt==ot.length)&&xt?--xt:++Dt;for(var Xt=ot.charAt(xt),Mn=St(Xt,Ot)?function(nn){return St(nn,Ot)}:/\s/.test(Xt)?function(nn){return/\s/.test(nn)}:function(nn){return!/\s/.test(nn)&&!St(nn)};xt>0&&Mn(ot.charAt(xt-1));)--xt;for(;Dt<ot.length&&Mn(ot.charAt(Dt));)++Dt}return new Pi(Vt(Re.line,xt),Vt(Re.line,Dt))},toggleOverwrite:function(Re){Re!=null&&Re==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Pt(this.display.cursorDiv,"CodeMirror-overwrite"):Ae(this.display.cursorDiv,"CodeMirror-overwrite"),rn(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){io(this,Re,Ue)}),getScrollInfo:function(){var Re=this.display.scroller;return{left:Re.scrollLeft,top:Re.scrollTop,height:Re.scrollHeight-Ua(this)-this.display.barHeight,width:Re.scrollWidth-Ua(this)-this.display.barWidth,clientHeight:Uu(this),clientWidth:Ga(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:Vt(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?qo(this,Re):qh(this,Re.from,Re.to,Re.margin)}),setSize:fn(function(Re,Ue){var ot=this,xt=function(Ot){return typeof Ot=="number"||/^\d+$/.test(String(Ot))?Ot+"px":Ot};Re!=null&&(this.display.wrapper.style.width=xt(Re)),Ue!=null&&(this.display.wrapper.style.height=xt(Ue)),this.options.lineWrapping&&ia(this);var Dt=this.display.viewFrom;this.doc.iter(Dt,this.display.viewTo,function(Ot){if(Ot.widgets){for(var Xt=0;Xt<Ot.widgets.length;Xt++)if(Ot.widgets[Xt].noHScroll){bo(ot,Dt,"widget");break}}++Dt}),this.curOp.forceUpdate=!0,rn(this,"refresh",this)}),operation:function(Re){return Et(this,Re)},startOperation:function(){return ka(this)},endOperation:function(){return oc(this)},refresh:fn(function(){var Re=this.display.cachedTextHeight;_s(this),this.curOp.forceUpdate=!0,Is(this),io(this,this.doc.scrollLeft,this.doc.scrollTop),Ri(this.display),(Re==null||Math.abs(Re-Tu(this.display))>.5||this.options.lineWrapping)&&Zr(this),rn(this,"refresh",this)}),swapDoc:fn(function(Re){var Ue=this.doc;return Ue.cm=null,this.state.selectingText&&this.state.selectingText(),Gr(this,Re),Is(this),this.display.input.reset(),io(this,Re.scrollLeft,Re.scrollTop),this.curOp.forceScroll=!0,Ei(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}},oi(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,xt){re.registerHelper(Re,Ue,xt),Fe[Re]._global.push({pred:ot,val:xt})}}function Cf(re,pe,Fe,Re,Ue){var ot=pe,xt=Fe,Dt=gn(re,pe.line),Ot=Ue&&re.direction=="rtl"?-Fe:Fe;function Xt(){var Br=pe.line+Ot;return Br<re.first||Br>=re.first+re.size?!1:(pe=new Vt(Br,pe.ch,pe.sticky),Dt=gn(re,Br))}function Mn(Br){var wr;if(Re=="codepoint"){var Wr=Dt.text.charCodeAt(pe.ch+(Re>0?0:-1));isNaN(Wr)?wr=null:wr=new Vt(pe.line,Math.max(0,Math.min(Dt.text.length,pe.ch+Fe*(Wr>=55296&&Wr<56320?2:1))),-Fe)}else Ue?wr=Vs(re.cm,Dt,pe,Fe):wr=ya(Dt,pe,Fe);if(wr==null)if(!Br&&Xt())pe=cs(Ue,re.cm,Dt,pe.line,Ot);else return!1;else pe=wr;return!0}if(Re=="char"||Re=="codepoint")Mn();else if(Re=="column")Mn(!0);else if(Re=="word"||Re=="group")for(var nn=null,Wn=Re=="group",jn=re.cm&&re.cm.getHelper(pe,"wordChars"),yi=!0;!(Fe<0&&!Mn(!yi));yi=!1){var _i=Dt.text.charAt(pe.ch)||`
|
|
|
`,Bi=St(_i,jn)?"w":Wn&&_i==`
|
|
|
`?"n":!Wn||/\s/.test(_i)?null:"p";if(Wn&&!yi&&!Bi&&(Bi="s"),nn&&nn!=Bi){Fe<0&&(Fe=1,Mn(),pe.sticky="after");break}if(Bi&&(nn=Bi),Fe>0&&!Mn(!yi))break}var ar=du(re,pe,ot,xt,!0);return Bn(ot,ar)&&(ar.hitSide=!0),ar}function kh(re,pe,Fe,Re){var Ue=re.doc,ot=pe.left,xt;if(Re=="page"){var Dt=Math.min(re.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Ot=Math.max(Dt-.5*Tu(re.display),3);xt=(Fe>0?pe.bottom:pe.top)+Fe*Ot}else Re=="line"&&(xt=Fe>0?pe.bottom+3:pe.top-3);for(var Xt;Xt=wc(re,ot,xt),!!Xt.outside;){if(Fe<0?xt<=0:xt>=Ue.height){Xt.hitSide=!0;break}xt+=Fe*5}return Xt}var Xs=function(re){this.cm=re,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new et,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Xs.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(Dt){for(var Ot=Dt.target;Ot;Ot=Ot.parentNode){if(Ot==Ue)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Ot.className))break}return!1}Tt(Ue,"paste",function(Dt){!ot(Dt)||pn(Re,Dt)||ng(Dt,Re)||Le<=11&&setTimeout(wn(Re,function(){return pe.updateFromDOM()}),20)}),Tt(Ue,"compositionstart",function(Dt){pe.composing={data:Dt.data,done:!1}}),Tt(Ue,"compositionupdate",function(Dt){pe.composing||(pe.composing={data:Dt.data,done:!1})}),Tt(Ue,"compositionend",function(Dt){pe.composing&&(Dt.data!=pe.composing.data&&pe.readFromDOMSoon(),pe.composing.done=!0)}),Tt(Ue,"touchstart",function(){return Fe.forceCompositionEnd()}),Tt(Ue,"input",function(){pe.composing||pe.readFromDOMSoon()});function xt(Dt){if(!(!ot(Dt)||pn(Re,Dt))){if(Re.somethingSelected())ld({lineWise:!1,text:Re.getSelections()}),Dt.type=="cut"&&Re.replaceSelection("",null,"cut");else if(Re.options.lineWiseCopyCut){var Ot=rg(Re);ld({lineWise:!0,text:Ot.text}),Dt.type=="cut"&&Re.operation(function(){Re.setSelections(Ot.ranges,0,gt),Re.replaceSelection("",null,"cut")})}else return;if(Dt.clipboardData){Dt.clipboardData.clearData();var Xt=tu.text.join(`
|
|
|
`);if(Dt.clipboardData.setData("Text",Xt),Dt.clipboardData.getData("Text")==Xt){Dt.preventDefault();return}}var Mn=sg(),nn=Mn.firstChild;Re.display.lineSpace.insertBefore(Mn,Re.display.lineSpace.firstChild),nn.value=tu.text.join(`
|
|
|
`);var Wn=document.activeElement;vt(nn),setTimeout(function(){Re.display.lineSpace.removeChild(Mn),Wn.focus(),Wn==Ue&&Fe.showPrimarySelection()},50)}}Tt(Ue,"copy",xt),Tt(Ue,"cut",xt)},Xs.prototype.screenReaderLabelChanged=function(re){re?this.div.setAttribute("aria-label",re):this.div.removeAttribute("aria-label")},Xs.prototype.prepareSelection=function(){var re=Pc(this.cm,!1);return re.focus=document.activeElement==this.div,re},Xs.prototype.showSelection=function(re,pe){!re||!this.cm.display.view.length||((re.focus||pe)&&this.showPrimarySelection(),this.showMultipleSelections(re))},Xs.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Xs.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),xt=Pf(pe,re.focusNode,re.focusOffset);if(!(ot&&!ot.bad&&xt&&!xt.bad&&an(Gn(ot,xt),Re)==0&&an(qn(ot,xt),Ue)==0)){var Dt=pe.display.view,Ot=Re.line>=pe.display.viewFrom&&op(pe,Re)||{node:Dt[0].measure.map[2],offset:0},Xt=Ue.line<pe.display.viewTo&&op(pe,Ue);if(!Xt){var Mn=Dt[Dt.length-1].measure,nn=Mn.maps?Mn.maps[Mn.maps.length-1]:Mn.map;Xt={node:nn[nn.length-1],offset:nn[nn.length-2]-nn[nn.length-3]}}if(!Ot||!Xt){re.removeAllRanges();return}var Wn=re.rangeCount&&re.getRangeAt(0),jn;try{jn=Ge(Ot.node,Ot.offset,Xt.offset,Xt.node)}catch(yi){}jn&&(!Me&&pe.state.focused?(re.collapse(Ot.node,Ot.offset),jn.collapsed||(re.removeAllRanges(),re.addRange(jn))):(re.removeAllRanges(),re.addRange(jn)),Wn&&re.anchorNode==null?re.addRange(Wn):Me&&this.startGracePeriod()),this.rememberSelection()}},Xs.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)},Xs.prototype.showMultipleSelections=function(re){ze(this.cm.display.cursorDiv,re.cursors),ze(this.cm.display.selectionDiv,re.selection)},Xs.prototype.rememberSelection=function(){var re=this.getSelection();this.lastAnchorNode=re.anchorNode,this.lastAnchorOffset=re.anchorOffset,this.lastFocusNode=re.focusNode,this.lastFocusOffset=re.focusOffset},Xs.prototype.selectionInEditor=function(){var re=this.getSelection();if(!re.rangeCount)return!1;var pe=re.getRangeAt(0).commonAncestorContainer;return ft(this.div,pe)},Xs.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Xs.prototype.blur=function(){this.div.blur()},Xs.prototype.getField=function(){return this.div},Xs.prototype.supportsTouch=function(){return!0},Xs.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)},Xs.prototype.selectionChanged=function(){var re=this.getSelection();return re.anchorNode!=this.lastAnchorNode||re.anchorOffset!=this.lastAnchorOffset||re.focusNode!=this.lastFocusNode||re.focusOffset!=this.lastFocusOffset},Xs.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(){ks(pe.doc,vr(Fe,Re),gt),(Fe.bad||Re.bad)&&(pe.curOp.selectionChanged=!0)})}}},Xs.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=Vt(Re.line-1,gn(re.doc,Re.line-1).length)),Ue.ch==gn(re.doc,Ue.line).text.length&&Ue.line<re.lastLine()&&(Ue=Vt(Ue.line+1,0)),Re.line<pe.viewFrom||Ue.line>pe.viewTo-1)return!1;var ot,xt,Dt;Re.line==pe.viewFrom||(ot=Ks(re,Re.line))==0?(xt=zt(pe.view[0].line),Dt=pe.view[0].node):(xt=zt(pe.view[ot].line),Dt=pe.view[ot-1].node.nextSibling);var Ot=Ks(re,Ue.line),Xt,Mn;if(Ot==pe.view.length-1?(Xt=pe.viewTo-1,Mn=pe.lineDiv.lastChild):(Xt=zt(pe.view[Ot+1].line)-1,Mn=pe.view[Ot+1].node.previousSibling),!Dt)return!1;for(var nn=re.doc.splitLines($d(re,Dt,Mn,xt,Xt)),Wn=En(re.doc,Vt(xt,0),Vt(Xt,gn(re.doc,Xt).text.length));nn.length>1&&Wn.length>1;)if(Wt(nn)==Wt(Wn))nn.pop(),Wn.pop(),Xt--;else if(nn[0]==Wn[0])nn.shift(),Wn.shift(),xt++;else break;for(var jn=0,yi=0,_i=nn[0],Bi=Wn[0],ar=Math.min(_i.length,Bi.length);jn<ar&&_i.charCodeAt(jn)==Bi.charCodeAt(jn);)++jn;for(var Br=Wt(nn),wr=Wt(Wn),Wr=Math.min(Br.length-(nn.length==1?jn:0),wr.length-(Wn.length==1?jn:0));yi<Wr&&Br.charCodeAt(Br.length-yi-1)==wr.charCodeAt(wr.length-yi-1);)++yi;if(nn.length==1&&Wn.length==1&&xt==Re.line)for(;jn&&jn>Re.ch&&Br.charCodeAt(Br.length-yi-1)==wr.charCodeAt(wr.length-yi-1);)jn--,yi++;nn[nn.length-1]=Br.slice(0,Br.length-yi).replace(/^\u200b+/,""),nn[0]=nn[0].slice(jn).replace(/\u200b+$/,"");var Co=Vt(xt,jn),Sr=Vt(Xt,Wn.length?Wt(Wn).length-yi:0);if(nn.length>1||nn[0]||an(Co,Sr))return sc(re.doc,nn,Co,Sr,"+input"),!0},Xs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Xs.prototype.reset=function(){this.forceCompositionEnd()},Xs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Xs.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))},Xs.prototype.updateFromDOM=function(){var re=this;(this.cm.isReadOnly()||!this.pollContent())&&Et(this.cm,function(){return _s(re.cm)})},Xs.prototype.setUneditable=function(re){re.contentEditable="false"},Xs.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))},Xs.prototype.readOnlyChanged=function(re){this.div.contentEditable=String(re!="nocursor")},Xs.prototype.onContextMenu=function(){},Xs.prototype.resetPosition=function(){},Xs.prototype.needsContentAttribute=!0;function op(re,pe){var Fe=Gu(re,pe.line);if(!Fe||Fe.hidden)return null;var Re=gn(re.doc,pe.line),Ue=Eu(Fe,Re,pe.line),ot=dt(Re,re.doc.direction),xt="left";if(ot){var Dt=Ne(ot,pe.ch);xt=Dt%2?"right":"left"}var Ot=xc(Ue.map,pe.ch,xt);return Ot.offset=Ot.collapse=="right"?Ot.end:Ot.start,Ot}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="",xt=!1,Dt=re.doc.lineSeparator(),Ot=!1;function Xt(jn){return function(yi){return yi.id==jn}}function Mn(){xt&&(ot+=Dt,Ot&&(ot+=Dt),xt=Ot=!1)}function nn(jn){jn&&(Mn(),ot+=jn)}function Wn(jn){if(jn.nodeType==1){var yi=jn.getAttribute("cm-text");if(yi){nn(yi);return}var _i=jn.getAttribute("cm-marker"),Bi;if(_i){var ar=re.findMarks(Vt(Re,0),Vt(Ue+1,0),Xt(+_i));ar.length&&(Bi=ar[0].find(0))&&nn(En(re.doc,Bi.from,Bi.to).join(Dt));return}if(jn.getAttribute("contenteditable")=="false")return;var Br=/^(pre|div|p|li|table|br)$/i.test(jn.nodeName);if(!/^br$/i.test(jn.nodeName)&&jn.textContent.length==0)return;Br&&Mn();for(var wr=0;wr<jn.childNodes.length;wr++)Wn(jn.childNodes[wr]);/^(pre|p)$/i.test(jn.nodeName)&&(Ot=!0),Br&&(xt=!0)}else jn.nodeType==3&&nn(jn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Wn(pe),pe!=Fe;)pe=pe.nextSibling,Ot=!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(Vt(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(Vt(zt(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(Vt(zt(ot),ot.text.length),Ue)}var xt=pe.nodeType==3?pe:null,Dt=pe;for(!xt&&pe.childNodes.length==1&&pe.firstChild.nodeType==3&&(xt=pe.firstChild,Fe&&(Fe=xt.nodeValue.length));Dt.parentNode!=Re;)Dt=Dt.parentNode;var Ot=re.measure,Xt=Ot.maps;function Mn(Bi,ar,Br){for(var wr=-1;wr<(Xt?Xt.length:0);wr++)for(var Wr=wr<0?Ot.map:Xt[wr],Co=0;Co<Wr.length;Co+=3){var Sr=Wr[Co+2];if(Sr==Bi||Sr==ar){var Ho=zt(wr<0?re.line:re.rest[wr]),la=Wr[Co]+Br;return(Br<0||Sr!=Bi)&&(la=Wr[Co+(Br?1:0)]),Vt(Ho,la)}}}var nn=Mn(xt,Dt,Fe);if(nn)return Vd(nn,Ue);for(var Wn=Dt.nextSibling,jn=xt?xt.nodeValue.length-Fe:0;Wn;Wn=Wn.nextSibling){if(nn=Mn(Wn,Wn.firstChild,0),nn)return Vd(Vt(nn.line,nn.ch-jn),Ue);jn+=Wn.textContent.length}for(var yi=Dt.previousSibling,_i=Fe;yi;yi=yi.previousSibling){if(nn=Mn(yi,yi.firstChild,-1),nn)return Vd(Vt(nn.line,nn.ch+_i),Ue);_i+=yi.textContent.length}}var Da=function(re){this.cm=re,this.prevInput="",this.pollingFast=!1,this.polling=new et,this.hasSelection=!1,this.composing=null};Da.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"),Tt(Ue,"input",function(){Pe&&Le>=9&&pe.hasSelection&&(pe.hasSelection=null),Fe.poll()}),Tt(Ue,"paste",function(xt){pn(Re,xt)||ng(xt,Re)||(Re.state.pasteIncoming=+new Date,Fe.fastPoll())});function ot(xt){if(!pn(Re,xt)){if(Re.somethingSelected())ld({lineWise:!1,text:Re.getSelections()});else if(Re.options.lineWiseCopyCut){var Dt=rg(Re);ld({lineWise:!0,text:Dt.text}),xt.type=="cut"?Re.setSelections(Dt.ranges,null,gt):(Fe.prevInput="",Ue.value=Dt.text.join(`
|
|
|
`),vt(Ue))}else return;xt.type=="cut"&&(Re.state.cutIncoming=+new Date)}}Tt(Ue,"cut",ot),Tt(Ue,"copy",ot),Tt(re.scroller,"paste",function(xt){if(!(Ha(re,xt)||pn(Re,xt))){if(!Ue.dispatchEvent){Re.state.pasteIncoming=+new Date,Fe.focus();return}var Dt=new Event("paste");Dt.clipboardData=xt.clipboardData,Ue.dispatchEvent(Dt)}}),Tt(re.lineSpace,"selectstart",function(xt){Ha(re,xt)||ri(xt)}),Tt(Ue,"compositionstart",function(){var xt=Re.getCursor("from");Fe.composing&&Fe.composing.range.clear(),Fe.composing={start:xt,range:Re.markText(xt,Re.getCursor("to"),{className:"CodeMirror-composing"})}}),Tt(Ue,"compositionend",function(){Fe.composing&&(Fe.poll(),Fe.composing.range.clear(),Fe.composing=null)})},Da.prototype.createField=function(re){this.wrapper=sg(),this.textarea=this.wrapper.firstChild},Da.prototype.screenReaderLabelChanged=function(re){re?this.textarea.setAttribute("aria-label",re):this.textarea.removeAttribute("aria-label")},Da.prototype.prepareSelection=function(){var re=this.cm,pe=re.display,Fe=re.doc,Re=Pc(re);if(re.options.moveInputWithCursor){var Ue=Ds(re,Fe.sel.primary().head,"div"),ot=pe.wrapper.getBoundingClientRect(),xt=pe.lineDiv.getBoundingClientRect();Re.teTop=Math.max(0,Math.min(pe.wrapper.clientHeight-10,Ue.top+xt.top-ot.top)),Re.teLeft=Math.max(0,Math.min(pe.wrapper.clientWidth-10,Ue.left+xt.left-ot.left))}return Re},Da.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")},Da.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&&vt(this.textarea),Pe&&Le>=9&&(this.hasSelection=Fe)}else re||(this.prevInput=this.textarea.value="",Pe&&Le>=9&&(this.hasSelection=null))}},Da.prototype.getField=function(){return this.textarea},Da.prototype.supportsTouch=function(){return!1},Da.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ee||at()!=this.textarea))try{this.textarea.focus()}catch(re){}},Da.prototype.blur=function(){this.textarea.blur()},Da.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Da.prototype.receivedFocus=function(){this.slowPoll()},Da.prototype.slowPoll=function(){var re=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){re.poll(),re.cm.state.focused&&re.slowPoll()})},Da.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)},Da.prototype.poll=function(){var re=this,pe=this.cm,Fe=this.textarea,Re=this.prevInput;if(this.contextMenuPending||!pe.state.focused||rt(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(Pe&&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 xt=0,Dt=Math.min(Re.length,Ue.length);xt<Dt&&Re.charCodeAt(xt)==Ue.charCodeAt(xt);)++xt;return Et(pe,function(){bf(pe,Ue.slice(xt),Re.length-xt,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},Da.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Da.prototype.onKeyPress=function(){Pe&&Le>=9&&(this.hasSelection=null),this.fastPoll()},Da.prototype.onContextMenu=function(re){var pe=this,Fe=pe.cm,Re=Fe.display,Ue=pe.textarea;pe.contextMenuPending&&pe.contextMenuPending();var ot=Na(Fe,re),xt=Re.scroller.scrollTop;if(!ot||ge)return;var Dt=Fe.options.resetSelectionOnContextMenu;Dt&&Fe.doc.sel.contains(ot)==-1&&wn(Fe,ks)(Fe.doc,vr(ot),gt);var Ot=Ue.style.cssText,Xt=pe.wrapper.style.cssText,Mn=pe.wrapper.offsetParent.getBoundingClientRect();pe.wrapper.style.cssText="position: static",Ue.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(re.clientY-Mn.top-5)+"px; left: "+(re.clientX-Mn.left-5)+`px;
|
|
|
z-index: 1000; background: `+(Pe?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var nn;he&&(nn=window.scrollY),Re.input.focus(),he&&window.scrollTo(null,nn),Re.input.reset(),Fe.somethingSelected()||(Ue.value=pe.prevInput=" "),pe.contextMenuPending=jn,Re.selForContextMenu=Fe.doc.sel,clearTimeout(Re.detectingSelectAll);function Wn(){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=Xt,Ue.style.cssText=Ot,Pe&&Le<9&&Re.scrollbars.setScrollTop(Re.scroller.scrollTop=xt),Ue.selectionStart!=null)){(!Pe||Pe&&Le<9)&&Wn();var _i=0,Bi=function(){Re.selForContextMenu==Fe.doc.sel&&Ue.selectionStart==0&&Ue.selectionEnd>0&&pe.prevInput=="\u200B"?wn(Fe,ds)(Fe):_i++<10?Re.detectingSelectAll=setTimeout(Bi,500):(Re.selForContextMenu=null,Re.input.reset())};Re.detectingSelectAll=setTimeout(Bi,200)}}if(Pe&&Le>=9&&Wn(),we){Qi(re);var yi=function(){yn(window,"mouseup",yi),setTimeout(jn,20)};Tt(window,"mouseup",yi)}else setTimeout(jn,50)},Da.prototype.readOnlyChanged=function(re){re||this.reset(),this.textarea.disabled=re=="nocursor",this.textarea.readOnly=!!re},Da.prototype.setUneditable=function(){},Da.prototype.needsContentAttribute=!1;function dm(re,pe){if(pe=pe?jt(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=Dt.getValue()}var Ue;if(re.form&&(Tt(re.form,"submit",Re),!pe.leaveSubmitMethodAlone)){var ot=re.form;Ue=ot.submit;try{var xt=ot.submit=function(){Re(),ot.submit=Ue,ot.submit(),ot.submit=xt}}catch(Ot){}}pe.finishInit=function(Ot){Ot.save=Re,Ot.getTextArea=function(){return re},Ot.toTextArea=function(){Ot.toTextArea=isNaN,Re(),re.parentNode.removeChild(Ot.getWrapperElement()),re.style.display="",re.form&&(yn(re.form,"submit",Re),!pe.leaveSubmitMethodAlone&&typeof re.form.submit=="function"&&(re.form.submit=Ue))}},re.style.display="none";var Dt=gs(function(Ot){return re.parentNode.insertBefore(Ot,re.nextSibling)},pe);return Dt}function Yd(re){re.off=yn,re.on=Tt,re.wheelEventPixels=gi,re.Doc=Ia,re.splitLines=zi,re.countColumn=lt,re.findColumn=hn,re.isWordChar=Rt,re.Pass=_t,re.signal=rn,re.Line=is,re.changeEnd=or,re.scrollbarModel=Id,re.Pos=Vt,re.cmpPos=an,re.modes=co,re.mimeModes=yo,re.resolveMode=ln,re.getMode=Ke,re.modeExtensions=qe,re.extendMode=Xe,re.copyState=wt,re.startState=Nt,re.innerMode=At,re.commands=Za,re.keyMap=Ll,re.keyName=Ud,re.isModifierKey=Lh,re.lookupKey=eu,re.normalizeKeyMap=zd,re.StringStream=bt,re.SharedTextMarker=ac,re.TextMarker=mn,re.LineWidget=_a,re.e_preventDefault=ri,re.e_stopPropagation=Ti,re.e_stop=Qi,re.addClass=Pt,re.contains=ft,re.rmClass=Ae,re.keyNames=Ku}um(gs),Th(gs);var ah="iter insert remove copy getEditor constructor".split(" ");for(var _f in Ia.prototype)Ia.prototype.hasOwnProperty(_f)&&ut(ah,_f)<0&&(gs.prototype[_f]=function(re){return function(){return re.apply(this.doc,arguments)}}(Ia.prototype[_f]));return oi(Ia),gs.inputStyles={textarea:Da,contenteditable:Xs},gs.defineMode=function(re){!gs.defaults.mode&&re!="null"&&(gs.defaults.mode=re),eo.apply(this,arguments)},gs.defineMIME=lo,gs.defineMode("null",function(){return{token:function(re){return re.skipToEnd()}}}),gs.defineMIME("text/plain","null"),gs.defineExtension=function(re,pe){gs.prototype[re]=pe},gs.defineDocExtension=function(re,pe){Ia.prototype[re]=pe},gs.fromTextArea=dm,Yd(gs),gs.version="5.58.2",gs})},25419:function(Ln,tn,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"),Pe=ke.name=="null";function Le(lt){if(Me.findModeByName){var et=Me.findModeByName(lt);et&&(lt=et.mime||et.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 Se in he)he.hasOwnProperty(Se)&&Be.tokenTypeOverrides[Se]&&(he[Se]=Be.tokenTypeOverrides[Se]);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,et,ut){return et.f=et.inline=ut,ut(lt,et)}function ue(lt,et,ut){return et.f=et.block=ut,ut(lt,et)}function ye(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 et=Pe;if(!et){var ut=Me.innerMode(ke,lt.htmlState);et=ut.mode.name=="xml"&&ut.state.tagStart===null&&!ut.state.context&&ut.state.tokenize.isInText}et&&(lt.f=Ye,lt.block=be,lt.htmlState=null)}return lt.trailingSpace=0,lt.trailingSpaceNewLine=!1,lt.prevLine=lt.thisLine,lt.thisLine={stream:null},null}function be(lt,et){var ut=lt.column()===et.indentation,mt=ye(et.prevLine.stream),_t=et.indentedCode,gt=et.prevLine.hr,Bt=et.list!==!1,Ht=(et.listStack[et.listStack.length-1]||0)+3;et.indentedCode=!1;var hn=et.indentation;if(et.indentationDiff===null&&(et.indentationDiff=et.indentation,Bt)){for(et.list=null;hn<et.listStack[et.listStack.length-1];)et.listStack.pop(),et.listStack.length?et.indentation=et.listStack[et.listStack.length-1]:et.list=!1;et.list!==!1&&(et.indentationDiff=hn-et.listStack[et.listStack.length-1])}var Qt=!mt&&!gt&&!et.prevLine.header&&(!Bt||!_t)&&!et.prevLine.fencedCodeEnd,bn=(et.list===!1||gt||mt)&&et.indentation<=Ht&<.match(xe),Wt=null;if(et.indentationDiff>=4&&(_t||et.prevLine.fencedCodeEnd||et.prevLine.header||mt))return lt.skipToEnd(),et.indentedCode=!0,he.code;if(lt.eatSpace())return null;if(ut&&et.indentation<=Ht&&(Wt=lt.match(ve))&&Wt[1].length<=6)return et.quote=0,et.header=Wt[1].length,et.thisLine.header=!0,Be.highlightFormatting&&(et.formatting="header"),et.f=et.inline,ze(et);if(et.indentation<=Ht&<.eat(">"))return et.quote=ut?1:et.quote+1,Be.highlightFormatting&&(et.formatting="quote"),lt.eatSpace(),ze(et);if(!bn&&!et.setext&&ut&&et.indentation<=Ht&&(Wt=lt.match(ge))){var Kt=Wt[1]?"ol":"ul";return et.indentation=hn+lt.current().length,et.list=!0,et.quote=0,et.listStack.push(et.indentation),et.em=!1,et.strong=!1,et.code=!1,et.strikethrough=!1,Be.taskLists&<.match(le,!1)&&(et.taskList=!0),et.f=et.inline,Be.highlightFormatting&&(et.formatting=["list","list-"+Kt]),ze(et)}else{if(ut&&et.indentation<=Ht&&(Wt=lt.match(z,!0)))return et.quote=0,et.fencedEndRE=new RegExp(Wt[1]+"+ *$"),et.localMode=Be.fencedCodeBlockHighlighting&&Le(Wt[2]||Be.fencedCodeBlockDefaultMode),et.localMode&&(et.localState=Me.startState(et.localMode)),et.f=et.block=De,Be.highlightFormatting&&(et.formatting="code-block"),et.code=-1,ze(et);if(et.setext||(!Qt||!Bt)&&!et.quote&&et.list===!1&&!et.code&&!bn&&!ee.test(lt.string)&&(Wt=lt.lookAhead(1))&&(Wt=Wt.match(de)))return et.setext?(et.header=et.setext,et.setext=0,lt.skipToEnd(),Be.highlightFormatting&&(et.formatting="header")):(et.header=Wt[0].charAt(0)=="="?1:2,et.setext=et.header),et.thisLine.header=!0,et.f=et.inline,ze(et);if(bn)return lt.skipToEnd(),et.hr=!0,et.thisLine.hr=!0,he.hr;if(lt.peek()==="[")return se(lt,et,tt)}return se(lt,et,et.inline)}function Ae(lt,et){var ut=ke.token(lt,et.htmlState);if(!Pe){var mt=Me.innerMode(ke,et.htmlState);(mt.mode.name=="xml"&&mt.state.tagStart===null&&!mt.state.context&&mt.state.tokenize.isInText||et.md_inside&<.current().indexOf(">")>-1)&&(et.f=Ye,et.block=be,et.htmlState=null)}return ut}function De(lt,et){var ut=et.listStack[et.listStack.length-1]||0,mt=et.indentation<ut,_t=ut+3;if(et.fencedEndRE&&et.indentation<=_t&&(mt||lt.match(et.fencedEndRE))){Be.highlightFormatting&&(et.formatting="code-block");var gt;return mt||(gt=ze(et)),et.localMode=et.localState=null,et.block=be,et.f=Ye,et.fencedEndRE=null,et.code=0,et.thisLine.fencedCodeEnd=!0,mt?ue(lt,et,et.block):gt}else return et.localMode?et.localMode.token(lt,et.localState):(lt.skipToEnd(),he.code)}function ze(lt){var et=[];if(lt.formatting){et.push(he.formatting),typeof lt.formatting=="string"&&(lt.formatting=[lt.formatting]);for(var ut=0;ut<lt.formatting.length;ut++)et.push(he.formatting+"-"+lt.formatting[ut]),lt.formatting[ut]==="header"&&et.push(he.formatting+"-"+lt.formatting[ut]+"-"+lt.header),lt.formatting[ut]==="quote"&&(!Be.maxBlockquoteDepth||Be.maxBlockquoteDepth>=lt.quote?et.push(he.formatting+"-"+lt.formatting[ut]+"-"+lt.quote):et.push("error"))}if(lt.taskOpen)return et.push("meta"),et.length?et.join(" "):null;if(lt.taskClosed)return et.push("property"),et.length?et.join(" "):null;if(lt.linkHref?et.push(he.linkHref,"url"):(lt.strong&&et.push(he.strong),lt.em&&et.push(he.em),lt.strikethrough&&et.push(he.strikethrough),lt.emoji&&et.push(he.emoji),lt.linkText&&et.push(he.linkText),lt.code&&et.push(he.code),lt.image&&et.push(he.image),lt.imageAltText&&et.push(he.imageAltText,"link"),lt.imageMarker&&et.push(he.imageMarker)),lt.header&&et.push(he.header,he.header+"-"+lt.header),lt.quote&&(et.push(he.quote),!Be.maxBlockquoteDepth||Be.maxBlockquoteDepth>=lt.quote?et.push(he.quote+"-"+lt.quote):et.push(he.quote+"-"+Be.maxBlockquoteDepth)),lt.list!==!1){var mt=(lt.listStack.length-1)%3;mt?mt===1?et.push(he.list2):et.push(he.list3):et.push(he.list1)}return lt.trailingSpaceNewLine?et.push("trailing-space-new-line"):lt.trailingSpace&&et.push("trailing-space-"+(lt.trailingSpace%2?"a":"b")),et.length?et.join(" "):null}function Ze(lt,et){if(lt.match(ce,!0))return ze(et)}function Ye(lt,et){var ut=et.text(lt,et);if(typeof ut!="undefined")return ut;if(et.list)return et.list=null,ze(et);if(et.taskList){var mt=lt.match(le,!0)[1]===" ";return mt?et.taskOpen=!0:et.taskClosed=!0,Be.highlightFormatting&&(et.formatting="task"),et.taskList=!1,ze(et)}if(et.taskOpen=!1,et.taskClosed=!1,et.header&<.match(/^#+$/,!0))return Be.highlightFormatting&&(et.formatting="header"),ze(et);var _t=lt.next();if(et.linkTitle){et.linkTitle=!1;var gt=_t;_t==="("&&(gt=")"),gt=(gt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Bt="^\\s*(?:[^"+gt+"\\\\]+|\\\\\\\\|\\\\.)"+gt;if(lt.match(new RegExp(Bt),!0))return he.linkHref}if(_t==="`"){var Ht=et.formatting;Be.highlightFormatting&&(et.formatting="code"),lt.eatWhile("`");var hn=lt.current().length;if(et.code==0&&(!et.quote||hn==1))return et.code=hn,ze(et);if(hn==et.code){var Qt=ze(et);return et.code=0,Qt}else return et.formatting=Ht,ze(et)}else if(et.code)return ze(et);if(_t==="\\"&&(lt.next(),Be.highlightFormatting)){var bn=ze(et),Wt=he.formatting+"-escape";return bn?bn+" "+Wt:Wt}if(_t==="!"&<.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return et.imageMarker=!0,et.image=!0,Be.highlightFormatting&&(et.formatting="image"),ze(et);if(_t==="["&&et.imageMarker&<.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return et.imageMarker=!1,et.imageAltText=!0,Be.highlightFormatting&&(et.formatting="image"),ze(et);if(_t==="]"&&et.imageAltText){Be.highlightFormatting&&(et.formatting="image");var bn=ze(et);return et.imageAltText=!1,et.image=!1,et.inline=et.f=ft,bn}if(_t==="["&&!et.image)return et.linkText&<.match(/^.*?\]/)||(et.linkText=!0,Be.highlightFormatting&&(et.formatting="link")),ze(et);if(_t==="]"&&et.linkText){Be.highlightFormatting&&(et.formatting="link");var bn=ze(et);return et.linkText=!1,et.inline=et.f=lt.match(/\(.*?\)| ?\[.*?\]/,!1)?ft:Ye,bn}if(_t==="<"&<.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){et.f=et.inline=Ge,Be.highlightFormatting&&(et.formatting="link");var bn=ze(et);return bn?bn+=" ":bn="",bn+he.linkInline}if(_t==="<"&<.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){et.f=et.inline=Ge,Be.highlightFormatting&&(et.formatting="link");var bn=ze(et);return bn?bn+=" ":bn="",bn+he.linkEmail}if(Be.xml&&_t==="<"&<.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 Jt=lt.string.substring(lt.start,Kt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Jt)&&(et.md_inside=!0)}return lt.backUp(1),et.htmlState=Me.startState(ke),ue(lt,et,Ae)}if(Be.xml&&_t==="<"&<.match(/^\/\w*?>/))return et.md_inside=!1,"tag";if(_t==="*"||_t==="_"){for(var dn=1,Lt=lt.pos==1?" ":lt.string.charAt(lt.pos-2);dn<3&<.eat(_t);)dn++;var pt=lt.peek()||" ",Rt=!/\s/.test(pt)&&(!oe.test(pt)||/\s/.test(Lt)||oe.test(Lt)),St=!/\s/.test(Lt)&&(!oe.test(Lt)||/\s/.test(pt)||oe.test(pt)),yt=null,nt=null;if(dn%2&&(!et.em&&Rt&&(_t==="*"||!St||oe.test(Lt))?yt=!0:et.em==_t&&St&&(_t==="*"||!Rt||oe.test(pt))&&(yt=!1)),dn>1&&(!et.strong&&Rt&&(_t==="*"||!St||oe.test(Lt))?nt=!0:et.strong==_t&&St&&(_t==="*"||!Rt||oe.test(pt))&&(nt=!1)),nt!=null||yt!=null){Be.highlightFormatting&&(et.formatting=yt==null?"strong":nt==null?"em":"strong em"),yt===!0&&(et.em=_t),nt===!0&&(et.strong=_t);var Qt=ze(et);return yt===!1&&(et.em=!1),nt===!1&&(et.strong=!1),Qt}}else if(_t===" "&&(lt.eat("*")||lt.eat("_"))){if(lt.peek()===" ")return ze(et);lt.backUp(1)}if(Be.strikethrough){if(_t==="~"&<.eatWhile(_t)){if(et.strikethrough){Be.highlightFormatting&&(et.formatting="strikethrough");var Qt=ze(et);return et.strikethrough=!1,Qt}else if(lt.match(/^[^\s]/,!1))return et.strikethrough=!0,Be.highlightFormatting&&(et.formatting="strikethrough"),ze(et)}else if(_t===" "&<.match(/^~~/,!0)){if(lt.peek()===" ")return ze(et);lt.backUp(2)}}if(Be.emoji&&_t===":"&<.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){et.emoji=!0,Be.highlightFormatting&&(et.formatting="emoji");var He=ze(et);return et.emoji=!1,He}return _t===" "&&(lt.match(/^ +$/,!1)?et.trailingSpace++:et.trailingSpace&&(et.trailingSpaceNewLine=!0)),ze(et)}function Ge(lt,et){var ut=lt.next();if(ut===">"){et.f=et.inline=Ye,Be.highlightFormatting&&(et.formatting="link");var mt=ze(et);return mt?mt+=" ":mt="",mt+he.linkInline}return lt.match(/^[^>]+/,!0),he.linkInline}function ft(lt,et){if(lt.eatSpace())return null;var ut=lt.next();return ut==="("||ut==="["?(et.f=et.inline=Pt(ut==="("?")":"]"),Be.highlightFormatting&&(et.formatting="link-string"),et.linkHref=!0,ze(et)):"error"}var at={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Pt(lt){return function(et,ut){var mt=et.next();if(mt===lt){ut.f=ut.inline=Ye,Be.highlightFormatting&&(ut.formatting="link-string");var _t=ze(ut);return ut.linkHref=!1,_t}return et.match(at[lt]),ut.linkHref=!0,ze(ut)}}function tt(lt,et){return lt.match(/^([^\]\\]|\\.)*\]:/,!1)?(et.f=vt,lt.next(),Be.highlightFormatting&&(et.formatting="link"),et.linkText=!0,ze(et)):se(lt,et,Ye)}function vt(lt,et){if(lt.match(/^\]:/,!0)){et.f=et.inline=st,Be.highlightFormatting&&(et.formatting="link");var ut=ze(et);return et.linkText=!1,ut}return lt.match(/^([^\]\\]|\\.)+/,!0),he.linkText}function st(lt,et){return lt.eatSpace()?null:(lt.match(/^[^\s]+/,!0),lt.peek()===void 0?et.linkTitle=!0:lt.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),et.f=et.inline=Ye,he.linkHref+" url")}var jt={startState:function(){return{f:be,prevLine:{stream:null},thisLine:{stream:null},block:be,htmlState:null,indentation:0,inline:Ye,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,et){if(et.formatting=!1,lt!=et.thisLine.stream){if(et.header=0,et.hr=!1,lt.match(/^\s*$/,!0))return we(et),null;if(et.prevLine=et.thisLine,et.thisLine={stream:lt},et.taskList=!1,et.trailingSpace=0,et.trailingSpaceNewLine=!1,!et.localState&&(et.f=et.block,et.f!=Ae)){var ut=lt.match(/^\s*/,!0)[0].replace(/\t/g,ie).length;if(et.indentation=ut,et.indentationDiff=null,ut>0)return null}}return et.f(lt,et)},innerMode:function(lt){return lt.block==Ae?{state:lt.htmlState,mode:ke}:lt.localState?{state:lt.localState,mode:lt.localMode}:{state:lt,mode:jt}},indent:function(lt,et,ut){return lt.block==Ae&&ke.indent?ke.indent(lt.htmlState,et,ut):lt.localState&<.localMode.indent?lt.localMode.indent(lt.localState,et,ut):Me.Pass},blankLine:we,getType:ze,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return jt},"xml"),Me.defineMIME("text/markdown","markdown"),Me.defineMIME("text/x-markdown","markdown")})},98101:function(Ln,tn,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 Pe=0;Pe<Me.modeInfo.length;Pe++){var Le=Me.modeInfo[Pe];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 Pe=0;Pe<Me.modeInfo.length;Pe++){var Le=Me.modeInfo[Pe];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 Pe=0;Pe<Me.modeInfo.length;Pe++){var Le=Me.modeInfo[Pe];if(Le.file&&Le.file.test(ke))return Le}var he=ke.lastIndexOf("."),Se=he>-1&&ke.substring(he+1,ke.length);if(Se)return Me.findModeByExtension(Se)},Me.findModeByName=function(ke){ke=ke.toLowerCase();for(var Pe=0;Pe<Me.modeInfo.length;Pe++){var Le=Me.modeInfo[Pe];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(Ln,tn,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 Pe(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 Se(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=Se("importmodule","tag",["string","builtin"]),xe.documentclass=Se("documentclass","tag",["","atom"]),xe.usepackage=Se("usepackage","tag",["atom"]),xe.begin=Se("begin","tag",["atom"]),xe.end=Se("end","tag",["atom"]),xe.label=Se("label","tag",["atom"]),xe.ref=Se("ref","tag",["atom"]),xe.eqref=Se("eqref","tag",["atom"]),xe.cite=Se("cite","tag",["atom"]),xe.bibitem=Se("bibitem","tag",["atom"]),xe.Bibitem=Se("Bibitem","tag",["atom"]),xe.RBibitem=Se("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=Pe(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=Pe(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(Ln,tn,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,Pe){var Le=ke.indentUnit,he={},Se=Pe.htmlMode?me:Be;for(var xe in Se)he[xe]=Se[xe];for(var xe in Pe)he[xe]=Pe[xe];var ge,le;function ve(Ge,ft){function at(vt){return ft.tokenize=vt,vt(Ge,ft)}var Pt=Ge.next();if(Pt=="<")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(Pt=="&"){var tt;return Ge.eat("#")?Ge.eat("x")?tt=Ge.eatWhile(/[a-fA-F\d]/)&&Ge.eat(";"):tt=Ge.eatWhile(/[\d]/)&&Ge.eat(";"):tt=Ge.eatWhile(/[\w\.\-:]/)&&Ge.eat(";"),tt?"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 Pt=ft.tokenize(Ge,ft);return Pt?Pt+" 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,Pt){for(;!at.eol();)if(at.next()==Ge){Pt.tokenize=de;break}return"string"};return ft.isInAttribute=!0,ft}function z(Ge,ft){return function(at,Pt){for(;!at.eol();){if(at.match(ft)){Pt.tokenize=ve;break}at.next()}return Ge}}function ee(Ge){return function(ft,at){for(var Pt;(Pt=ft.next())!=null;){if(Pt=="<")return at.tokenize=ee(Ge+1),at.tokenize(ft,at);if(Pt==">")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(),ye):Ge=="closeTag"?we:ue}function ye(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",ye)}function we(Ge,ft,at){if(Ge=="word"){var Pt=ft.current();return at.context&&at.context.tagName!=Pt&&he.implicitlyClosed.hasOwnProperty(at.context.tagName)&&ie(at),at.context&&at.context.tagName==Pt||he.matchClosing===!1?(le="tag",be):(le="tag error",Ae)}else return he.allowMissingTagName&&Ge=="endTag"?(le="tag bracket",be(Ge,ft,at)):(le="error",Ae)}function be(Ge,ft,at){return Ge!="endTag"?(le="error",be):(ie(at),ue)}function Ae(Ge,ft,at){return le="error",be(Ge,ft,at)}function De(Ge,ft,at){if(Ge=="word")return le="attribute",ze;if(Ge=="endTag"||Ge=="selfcloseTag"){var Pt=at.tagName,tt=at.tagStart;return at.tagName=at.tagStart=null,Ge=="selfcloseTag"||he.autoSelfClosers.hasOwnProperty(Pt)?se(at,Pt):(se(at,Pt),at.context=new oe(at,Pt,tt==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"?Ye:Ge=="word"&&he.allowUnquoted?(le="string",De):(le="error",De(Ge,ft,at))}function Ye(Ge,ft,at){return Ge=="string"?Ye: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 Pt=Ge.context;if(Ge.tokenize.isInAttribute)return Ge.tagStart==Ge.indented?Ge.stringStartCol+1:Ge.indented+Le;if(Pt&&Pt.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 tt=ft&&/^<(\/)?([\w_:\.-]*)/.exec(ft);if(tt&&tt[1])for(;Pt;)if(Pt.tagName==tt[2]){Pt=Pt.prev;break}else if(he.implicitlyClosed.hasOwnProperty(Pt.tagName))Pt=Pt.prev;else break;else if(tt)for(;Pt;){var vt=he.contextGrabbers[Pt.tagName];if(vt&&vt.hasOwnProperty(tt[2]))Pt=Pt.prev;else break}for(;Pt&&Pt.prev&&!Pt.startOfLine;)Pt=Pt.prev;return Pt?Pt.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(Ln,tn,Ee){var Me=Ee(97671);(function(me,Be){Ln.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 Pe=ke,Le=0,he=void 0,Se=void 0,xe=function(We,Oe){we[Le]=We,we[Le+1]=Oe,Le+=2,Le===2&&(Se?Se(be):De())};function ge(Ie){Se=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(be)}}function ie(){return typeof he!="undefined"?function(){he(be)}:ye()}function se(){var Ie=0,We=new ce(be),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=be,function(){return Ie.port2.postMessage(0)}}function ye(){var Ie=setTimeout;return function(){return Ie(be,1)}}var we=new Array(1e3);function be(){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 ye()}}var De=void 0;z?De=oe():ce?De=se():ee?De=ue():ve===void 0?De=Ae():De=ye();function ze(Ie,We){var Oe=this,Ce=new this.constructor(Ge);Ce[Ye]===void 0&&Kt(Ce);var Ne=Oe._state;if(Ne){var $e=arguments[Ne-1];xe(function(){return hn(Ne,Ce,$e,Oe._result)})}else Bt(Oe,Ce,Ie,We);return Ce}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 Ye=Math.random().toString(36).substring(2);function Ge(){}var ft=void 0,at=1,Pt=2;function tt(){return new TypeError("You cannot resolve a promise with itself")}function vt(){return new TypeError("A promises callback cannot return that same promise.")}function st(Ie,We,Oe,Ce){try{Ie.call(We,Oe,Ce)}catch(Ne){return Ne}}function jt(Ie,We,Oe){xe(function(Ce){var Ne=!1,$e=st(Oe,We,function(dt){Ne||(Ne=!0,We!==dt?ut(Ce,dt):_t(Ce,dt))},function(dt){Ne||(Ne=!0,gt(Ce,dt))},"Settle: "+(Ce._label||" unknown promise"));!Ne&&$e&&(Ne=!0,gt(Ce,$e))},Ie)}function lt(Ie,We){We._state===at?_t(Ie,We._result):We._state===Pt?gt(Ie,We._result):Bt(We,void 0,function(Oe){return ut(Ie,Oe)},function(Oe){return gt(Ie,Oe)})}function et(Ie,We,Oe){We.constructor===Ie.constructor&&Oe===ze&&We.constructor.resolve===Ze?lt(Ie,We):Oe===void 0?_t(Ie,We):Be(Oe)?jt(Ie,We,Oe):_t(Ie,We)}function ut(Ie,We){if(Ie===We)gt(Ie,tt());else if(me(We)){var Oe=void 0;try{Oe=We.then}catch(Ce){gt(Ie,Ce);return}et(Ie,We,Oe)}else _t(Ie,We)}function mt(Ie){Ie._onerror&&Ie._onerror(Ie._result),Ht(Ie)}function _t(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=Pt,Ie._result=We,xe(mt,Ie))}function Bt(Ie,We,Oe,Ce){var Ne=Ie._subscribers,$e=Ne.length;Ie._onerror=null,Ne[$e]=We,Ne[$e+at]=Oe,Ne[$e+Pt]=Ce,$e===0&&Ie._state&&xe(Ht,Ie)}function Ht(Ie){var We=Ie._subscribers,Oe=Ie._state;if(We.length!==0){for(var Ce=void 0,Ne=void 0,$e=Ie._result,dt=0;dt<We.length;dt+=3)Ce=We[dt],Ne=We[dt+Oe],Ce?hn(Oe,Ce,Ne,$e):Ne($e);Ie._subscribers.length=0}}function hn(Ie,We,Oe,Ce){var Ne=Be(Oe),$e=void 0,dt=void 0,Je=!0;if(Ne){try{$e=Oe(Ce)}catch(Tt){Je=!1,dt=Tt}if(We===$e){gt(We,vt());return}}else $e=Ce;We._state!==ft||(Ne&&Je?ut(We,$e):Je===!1?gt(We,dt):Ie===at?_t(We,$e):Ie===Pt&>(We,$e))}function Qt(Ie,We){try{We(function(Ce){ut(Ie,Ce)},function(Ce){gt(Ie,Ce)})}catch(Oe){gt(Ie,Oe)}}var bn=0;function Wt(){return bn++}function Kt(Ie){Ie[Ye]=bn++,Ie._state=void 0,Ie._result=void 0,Ie._subscribers=[]}function Jt(){return new Error("Array Methods must be provided an Array")}var dn=function(){function Ie(We,Oe){this._instanceConstructor=We,this.promise=new We(Ge),this.promise[Ye]||Kt(this.promise),Pe(Oe)?(this.length=Oe.length,this._remaining=Oe.length,this._result=new Array(this.length),this.length===0?_t(this.promise,this._result):(this.length=this.length||0,this._enumerate(Oe),this._remaining===0&&_t(this.promise,this._result))):gt(this.promise,Jt())}return Ie.prototype._enumerate=function(Oe){for(var Ce=0;this._state===ft&&Ce<Oe.length;Ce++)this._eachEntry(Oe[Ce],Ce)},Ie.prototype._eachEntry=function(Oe,Ce){var Ne=this._instanceConstructor,$e=Ne.resolve;if($e===Ze){var dt=void 0,Je=void 0,Tt=!1;try{dt=Oe.then}catch(yn){Tt=!0,Je=yn}if(dt===ze&&Oe._state!==ft)this._settledAt(Oe._state,Ce,Oe._result);else if(typeof dt!="function")this._remaining--,this._result[Ce]=Oe;else if(Ne===nt){var qt=new Ne(Ge);Tt?gt(qt,Je):et(qt,Oe,dt),this._willSettleAt(qt,Ce)}else this._willSettleAt(new Ne(function(yn){return yn(Oe)}),Ce)}else this._willSettleAt($e(Oe),Ce)},Ie.prototype._settledAt=function(Oe,Ce,Ne){var $e=this.promise;$e._state===ft&&(this._remaining--,Oe===Pt?gt($e,Ne):this._result[Ce]=Ne),this._remaining===0&&_t($e,this._result)},Ie.prototype._willSettleAt=function(Oe,Ce){var Ne=this;Bt(Oe,void 0,function($e){return Ne._settledAt(at,Ce,$e)},function($e){return Ne._settledAt(Pt,Ce,$e)})},Ie}();function Lt(Ie){return new dn(this,Ie).promise}function pt(Ie){var We=this;return Pe(Ie)?new We(function(Oe,Ce){for(var Ne=Ie.length,$e=0;$e<Ne;$e++)We.resolve(Ie[$e]).then(Oe,Ce)}):new We(function(Oe,Ce){return Ce(new TypeError("You must pass an array to race."))})}function Rt(Ie){var We=this,Oe=new We(Ge);return gt(Oe,Ie),Oe}function St(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function yt(){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[Ye]=Wt(),this._result=this._state=void 0,this._subscribers=[],Ge!==We&&(typeof We!="function"&&St(),this instanceof Ie?Qt(this,We):yt())}return Ie.prototype.catch=function(Oe){return this.then(null,Oe)},Ie.prototype.finally=function(Oe){var Ce=this,Ne=Ce.constructor;return Be(Oe)?Ce.then(function($e){return Ne.resolve(Oe()).then(function(){return $e})},function($e){return Ne.resolve(Oe()).then(function(){throw $e})}):Ce.then(Oe,Oe)},Ie}();nt.prototype.then=ze,nt.all=Lt,nt.race=pt,nt.resolve=Ze,nt.reject=Rt,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(Ce){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(Ce){}if(Oe==="[object Promise]"&&!We.cast)return}Ie.Promise=nt}return nt.polyfill=He,nt.Promise=nt,nt})},86204:function(Ln){"use strict";var tn=typeof Reflect=="object"?Reflect:null,Ee=tn&&typeof tn.apply=="function"?tn.apply:function(ue,ye,we){return Function.prototype.apply.call(ue,ye,we)},Me;tn&&typeof tn.ownKeys=="function"?Me=tn.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)}Ln.exports=ke,Ln.exports.once=ee,ke.EventEmitter=ke,ke.prototype._events=void 0,ke.prototype._eventsCount=0,ke.prototype._maxListeners=void 0;var Pe=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 Pe},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+".");Pe=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 ye=[],we=1;we<arguments.length;we++)ye.push(arguments[we]);var be=ue==="error",Ae=this._events;if(Ae!==void 0)be=be&&Ae.error===void 0;else if(!be)return!1;if(be){var De;if(ye.length>0&&(De=ye[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,ye);else for(var Ye=Ze.length,Ge=de(Ze,Ye),we=0;we<Ye;++we)Ee(Ge[we],this,ye);return!0};function Se(se,ue,ye,we){var be,Ae,De;if(Le(ye),Ae=se._events,Ae===void 0?(Ae=se._events=Object.create(null),se._eventsCount=0):(Ae.newListener!==void 0&&(se.emit("newListener",ue,ye.listener?ye.listener:ye),Ae=se._events),De=Ae[ue]),De===void 0)De=Ae[ue]=ye,++se._eventsCount;else if(typeof De=="function"?De=Ae[ue]=we?[ye,De]:[De,ye]:we?De.unshift(ye):De.push(ye),be=he(se),be>0&&De.length>be&&!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,ye){return Se(this,ue,ye,!1)},ke.prototype.on=ke.prototype.addListener,ke.prototype.prependListener=function(ue,ye){return Se(this,ue,ye,!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,ye){var we={fired:!1,wrapFn:void 0,target:se,type:ue,listener:ye},be=xe.bind(we);return be.listener=ye,we.wrapFn=be,be}ke.prototype.once=function(ue,ye){return Le(ye),this.on(ue,ge(this,ue,ye)),this},ke.prototype.prependOnceListener=function(ue,ye){return Le(ye),this.prependListener(ue,ge(this,ue,ye)),this},ke.prototype.removeListener=function(ue,ye){var we,be,Ae,De,ze;if(Le(ye),be=this._events,be===void 0)return this;if(we=be[ue],we===void 0)return this;if(we===ye||we.listener===ye)--this._eventsCount===0?this._events=Object.create(null):(delete be[ue],be.removeListener&&this.emit("removeListener",ue,we.listener||ye));else if(typeof we!="function"){for(Ae=-1,De=we.length-1;De>=0;De--)if(we[De]===ye||we[De].listener===ye){ze=we[De].listener,Ae=De;break}if(Ae<0)return this;Ae===0?we.shift():ce(we,Ae),we.length===1&&(be[ue]=we[0]),be.removeListener!==void 0&&this.emit("removeListener",ue,ze||ye)}return this},ke.prototype.off=ke.prototype.removeListener,ke.prototype.removeAllListeners=function(ue){var ye,we,be;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(be=0;be<Ae.length;++be)De=Ae[be],De!=="removeListener"&&this.removeAllListeners(De);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(ye=we[ue],typeof ye=="function")this.removeListener(ue,ye);else if(ye!==void 0)for(be=ye.length-1;be>=0;be--)this.removeListener(ue,ye[be]);return this};function le(se,ue,ye){var we=se._events;if(we===void 0)return[];var be=we[ue];return be===void 0?[]:typeof be=="function"?ye?[be.listener||be]:[be]:ye?z(be):de(be,be.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 ye=ue[se];if(typeof ye=="function")return 1;if(ye!==void 0)return ye.length}return 0}ke.prototype.eventNames=function(){return this._eventsCount>0?Me(this._events):[]};function de(se,ue){for(var ye=new Array(ue),we=0;we<ue;++we)ye[we]=se[we];return ye}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),ye=0;ye<ue.length;++ye)ue[ye]=se[ye].listener||se[ye];return ue}function ee(se,ue){return new Promise(function(ye,we){function be(De){se.removeListener(ue,Ae),we(De)}function Ae(){typeof se.removeListener=="function"&&se.removeListener("error",be),ye([].slice.call(arguments))}ie(se,ue,Ae,{once:!0}),ue!=="error"&&oe(se,be,{once:!0})})}function oe(se,ue,ye){typeof se.on=="function"&&ie(se,"error",ue,ye)}function ie(se,ue,ye,we){if(typeof se.on=="function")we.once?se.once(ue,ye):se.on(ue,ye);else if(typeof se.addEventListener=="function")se.addEventListener(ue,function be(Ae){we.once&&se.removeEventListener(ue,be),ye(Ae)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof se)}},12378:function(Ln,tn,Ee){"use strict";Ee.d(tn,{$u:function(){return xe},BD:function(){return dn},E9:function(){return Se},FF:function(){return Mr},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 yt},bn:function(){return St},bx:function(){return Lt},g2:function(){return Jt},h1:function(){return Ze},hD:function(){return oi},l4:function(){return Le},rU:function(){return Ce},s_:function(){return pt},uz:function(){return We},z6:function(){return ve}}),Ln=Ee.hmd(Ln),function(){var rt;function zr(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function hr(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:zr(a)}}function vo(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var co=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},yo;if(typeof Object.setPrototypeOf=="function")yo=Object.setPrototypeOf;else{var eo;e:{var lo={a:!0},ln={};try{ln.__proto__=lo,eo=ln.a;break e}catch(a){}eo=!1}yo=eo?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Ke=yo;function qe(a,y){if(a.prototype=co(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 Xe=typeof Ee.g!="undefined"&&Ee.g!=null?Ee.g:self,wt=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},At=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function Nt(a,y){if(y){var x=Xe;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&&At(x,a,{writable:!0,value:y})}}Nt("Object.assign",function(a){return a||wt}),Nt("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 bt=typeof globalThis=="object"&&globalThis||typeof Ee.g=="object"&&Ee.g.global===Ee.g&&Ee.g||typeof self=="object"&&self.self===self&&self||{};bt.requestAnimationFrame===void 0&&(bt.setImmediate===void 0?bt.requestAnimationFrame=function(a){bt.setTimeout(a,0)}:bt.requestAnimationFrame=bt.setImmediate);function gn(){}function En(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&bt.clearTimeout(x),x=Un(function(){x=-1,a.apply(b,E)},y)}}function Un(a,y){return bt.setTimeout(a,y)}function Pn(a){return bt.document.createElement(a)}function zt(a){throw Error(a)}function Yt(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),zt(a)}function Cn(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),zt(x+" is not in the range "+y+": "+a)}function An(a){bt.console&&bt.console.log(a)}function Vt(a){return typeof a=="object"&&a!==null}function an(a){return Array.isArray(a)||bt.NodeList&&a instanceof bt.NodeList||bt.HTMLCollection&&a instanceof bt.HTMLCollection}function Bn(a){return Array.prototype.slice.call(a)}function Nn(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):zt("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):zt("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Gn(){var a=Ai.pop();return a===void 0?[]:a}function Jn(a){a.length=0,Ai.push(a)}function Rn(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(Vt(a)&&a.constructor)return Rn(a.constructor);return typeof a}function li(a){var y=a;return Vt(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 Mi(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 zn(a,y,x){Object.defineProperty(Wo.prototype,a,{get:y,set:x})}function si(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 Hi=bt.navigator!==void 0&&0<bt.navigator.userAgent.indexOf("Trident/7"),ur=bt.navigator!==void 0&&bt.navigator.platform!==void 0&&bt.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Ai=[];Object.freeze([]),gn.className="Util",gn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",gn.adym="gojs.net",gn.vfo="28e645fdb266",gn.className="Util";function un(a,y,x){br(this),this.j=a,this.xa=y,this.o=x}un.prototype.toString=function(){return"EnumValue."+this.xa};function ai(a,y){return y==null||y===""?null:a[y]}Xe.Object.defineProperties(un.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),un.className="EnumValue";function wi(){this.ew=[]}wi.prototype.toString=function(){return this.ew.join("")},wi.prototype.add=function(a){a!==""&&this.ew.push(a)},wi.className="StringBuilder";function fi(){}fi.className="PropertyCollection";var Wi={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){bt.console&&bt.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 Ni(){}Ni.prototype.reset=function(){},Ni.prototype.next=function(){return!1},Ni.prototype.Ad=function(){return!1},Ni.prototype.first=function(){return null},Ni.prototype.any=function(){return!1},Ni.prototype.all=function(){return!0},Ni.prototype.each=function(){return this},Ni.prototype.map=function(){return this},Ni.prototype.filter=function(){return this},Ni.prototype.de=function(){},Ni.prototype.toString=function(){return"EmptyIterator"},Xe.Object.defineProperties(Ni.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Ni.prototype.first=Ni.prototype.first,Ni.prototype.hasNext=Ni.prototype.Ad,Ni.prototype.next=Ni.prototype.next,Ni.prototype.reset=Ni.prototype.reset;var lr=null;Ni.className="EmptyIterator",lr=new Ni;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):lr},Fi.prototype.de=function(){this.value=null},Fi.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Xe.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 $i(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}$i.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},$i.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},$i.prototype.Ad=function(){return this.next()},$i.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},$i.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},$i.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},$i.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},$i.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 On,a.s=x,a.xb(),a.iterator},$i.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 On,a.s=x,a.xb(),a.iterator},$i.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},$i.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Xe.Object.defineProperties($i.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}}}),$i.prototype.first=$i.prototype.first,$i.prototype.hasNext=$i.prototype.Ad,$i.prototype.next=$i.prototype.next,$i.prototype.reset=$i.prototype.reset,$i.className="ListIterator";function Lr(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}Lr.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},Lr.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)},Lr.prototype.Ad=function(){return this.next()},Lr.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},Lr.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},Lr.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},Lr.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},Lr.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 On,a.s=x,a.xb(),a.iterator},Lr.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 On,a.s=x,a.xb(),a.iterator},Lr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},Lr.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Xe.Object.defineProperties(Lr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),Lr.prototype.first=Lr.prototype.first,Lr.prototype.hasNext=Lr.prototype.Ad,Lr.prototype.next=Lr.prototype.next,Lr.prototype.reset=Lr.prototype.reset,Lr.className="ListIteratorBackwards";function On(a){br(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&zt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}rt=On.prototype,rt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},rt.freeze=function(){return this._isFrozen=!0,this},rt.ka=function(){return this._isFrozen=!1,this},rt.toString=function(){return"List()#"+Cr(this)},rt.add=function(a){return a===null?this:(this._isFrozen&&Yt(this,a),this.s.push(a),this.xb(),this)},rt.push=function(a){this.add(a)},rt.addAll=function(a){if(a===null)return this;this._isFrozen&&Yt(this);var y=this.s;if(an(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},rt.clear=function(){this._isFrozen&&Yt(this),this.s.length=0,this.xb()},rt.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},rt.has=function(a){return this.contains(a)},rt.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},rt.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Cn(a,"0 <= i < length",On,"elt:i"),y[a]},rt.get=function(a){return this.M(a)},rt.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Cn(a,"0 <= i < length",On,"setElt:i"),this._isFrozen&&Yt(this,a),x[a]=y},rt.set=function(a,y){this.cd(a,y)},rt.first=function(){var a=this.s;return a.length===0?null:a[0]},rt.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},rt.pop=function(){this._isFrozen&&Yt(this);var a=this.s;return 0<a.length?a.pop():null},On.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},On.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},On.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},On.prototype.map=function(a){for(var y=new On,x=[],b=this.s,E=b.length,te=0;te<E;te++)x.push(a(b[te]));return y.s=x,y.xb(),y},On.prototype.filter=function(a){for(var y=new On,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},rt=On.prototype,rt.Gb=function(a,y){0>a&&Cn(a,">= 0",On,"insertAt:i"),this._isFrozen&&Yt(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},rt.remove=function(a){if(a===null)return!1;this._isFrozen&&Yt(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)},rt.delete=function(a){return this.remove(a)},rt.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Cn(a,"0 <= i < length",On,"removeAt:i"),this._isFrozen&&Yt(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},rt.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&&Yt(this);for(var E=a,te=y+1;te<b;)x[E++]=x[te++];return x.length=b-(y-a+1),this.xb(),this},On.prototype.copy=function(){var a=new On,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},rt=On.prototype,rt.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},rt.Iv=function(){for(var a=new In,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},rt.sort=function(a){return this._isFrozen&&Yt(this),this.s.sort(a),this.xb(),this},rt.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&Yt(this);var te=x-y;if(1>=te)return this;if((0>y||y>=E-1)&&Cn(y,"0 <= from < length",On,"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},rt.reverse=function(){return this._isFrozen&&Yt(this),this.s.reverse(),this.xb(),this},Xe.Object.defineProperties(On.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 lr;var a=this.Sa;return a!==null?(a.reset(),a):new $i(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return lr;var a=this.Hg;return a!==null?(a.reset(),a):new Lr(this)}}}),On.prototype.reverse=On.prototype.reverse,On.prototype.sortRange=On.prototype.zi,On.prototype.sort=On.prototype.sort,On.prototype.toSet=On.prototype.Iv,On.prototype.toArray=On.prototype.Fa,On.prototype.removeRange=On.prototype.removeRange,On.prototype.removeAt=On.prototype.mb,On.prototype.delete=On.prototype.delete,On.prototype.remove=On.prototype.remove,On.prototype.insertAt=On.prototype.Gb,On.prototype.pop=On.prototype.pop,On.prototype.last=On.prototype.jc,On.prototype.first=On.prototype.first,On.prototype.set=On.prototype.set,On.prototype.setElt=On.prototype.cd,On.prototype.get=On.prototype.get,On.prototype.elt=On.prototype.M,On.prototype.indexOf=On.prototype.indexOf,On.prototype.has=On.prototype.has,On.prototype.contains=On.prototype.contains,On.prototype.clear=On.prototype.clear,On.prototype.addAll=On.prototype.addAll,On.prototype.push=On.prototype.push,On.prototype.add=On.prototype.add,On.prototype.thaw=On.prototype.ka,On.prototype.freeze=On.prototype.freeze,On.className="List";function Kr(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Kr.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Kr.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)},Kr.prototype.Ad=function(){return this.next()},Kr.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},Kr.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},Kr.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},Kr.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},Kr.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new On;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Kr.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new On;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Kr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Kr.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Xe.Object.defineProperties(Kr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Kr.prototype.first=Kr.prototype.first,Kr.prototype.hasNext=Kr.prototype.Ad,Kr.prototype.next=Kr.prototype.next,Kr.prototype.reset=Kr.prototype.reset,Kr.className="SetIterator";function In(a){br(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&zt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}rt=In.prototype,rt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},rt.freeze=function(){return this._isFrozen=!0,this},rt.ka=function(){return this._isFrozen=!1,this},rt.toString=function(){return"Set()#"+Cr(this)},rt.add=function(a){if(a===null)return this;this._isFrozen&&Yt(this,a);var y=a;return Vt(a)&&(y=xo(a)),this.Tb[y]===void 0&&(this.Sb++,a=new pr(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},rt.addAll=function(a){if(a===null)return this;if(this._isFrozen&&Yt(this),an(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},rt.contains=function(a){if(a===null)return!1;var y=a;return Vt(a)&&(y=Cr(a),y===void 0)?!1:this.Tb[y]!==void 0},rt.has=function(a){return this.contains(a)},rt.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},rt.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},rt.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},rt=In.prototype,rt.remove=function(a){if(a===null)return!1;this._isFrozen&&Yt(this,a);var y=a;if(Vt(a)&&(y=Cr(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},rt.delete=function(a){return this.remove(a)},rt.hp=function(a){if(a===null)return this;if(this._isFrozen&&Yt(this),an(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},rt.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&Yt(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},rt.clear=function(){this._isFrozen&&Yt(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 On,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function br(a){a.__gohashid=Fo++}function xo(a){var y=a.__gohashid;return y===void 0&&(y=Fo++,a.__gohashid=y),y}function Cr(a){return a.__gohashid}Xe.Object.defineProperties(In.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return lr;var a=this.Sa;return a!==null?(a.reset(),a):new Kr(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 Fo=1;In.className="Set",In.uniqueHash=br,In.hashIdUnique=xo,In.hashId=Cr;function oo(a){this.ma=a,this.qa=a.Ja,this.sa=null}oo.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},oo.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=this.key=a=y.key,!0):(this.de(),!1)},oo.prototype.Ad=function(){return this.next()},oo.prototype.first=function(){var a=this.ma;return this.qa=a.Ja,a=a.ea,a!==null?(this.sa=a,this.value=this.key=a=a.key):null},oo.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},oo.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},oo.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},oo.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new On;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},oo.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new On;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},oo.prototype.de=function(){this.value=this.key=null,this.qa=-1},oo.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Xe.Object.defineProperties(oo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),oo.prototype.first=oo.prototype.first,oo.prototype.hasNext=oo.prototype.Ad,oo.prototype.next=oo.prototype.next,oo.prototype.reset=oo.prototype.reset,oo.className="MapKeySetIterator";function Ki(a){In.call(this),br(this),this._isFrozen=!0,this.ma=a}qe(Ki,In),rt=Ki.prototype,rt.freeze=function(){return this},rt.ka=function(){return this},rt.toString=function(){return"MapKeySet("+this.ma.toString()+")"},rt.add=function(){zt("This Set is read-only: "+this.toString())},rt.contains=function(a){return this.ma.contains(a)},rt.has=function(a){return this.contains(a)},rt.remove=function(){zt("This Set is read-only: "+this.toString())},rt.delete=function(a){return this.remove(a)},rt.clear=function(){zt("This Set is read-only: "+this.toString())},rt.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Ki.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Ki.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Ki.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Ki.prototype.map=function(a){for(var y=new In,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Ki.prototype.filter=function(a){for(var y=new In,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},Ki.prototype.copy=function(){return new Ki(this.ma)},Ki.prototype.Iv=function(){var a=new In,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Ki.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,b;for(b in a)y[x]=a[b].key,x++;return y},Ki.prototype.Hv=function(){var a=new On,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Xe.Object.defineProperties(Ki.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?lr:new oo(this.ma)}}}),Ki.prototype.toList=Ki.prototype.Hv,Ki.prototype.toArray=Ki.prototype.Fa,Ki.prototype.toSet=Ki.prototype.Iv,Ki.prototype.first=Ki.prototype.first,Ki.prototype.clear=Ki.prototype.clear,Ki.prototype.delete=Ki.prototype.delete,Ki.prototype.remove=Ki.prototype.remove,Ki.prototype.has=Ki.prototype.has,Ki.prototype.contains=Ki.prototype.contains,Ki.prototype.add=Ki.prototype.add,Ki.prototype.thaw=Ki.prototype.ka,Ki.prototype.freeze=Ki.prototype.freeze,Ki.className="MapKeySet";function Ji(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Ji.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Ji.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)},Ji.prototype.Ad=function(){return this.next()},Ji.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},Ji.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},Ji.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},Ji.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},Ji.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new On;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Ji.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new On;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Ji.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Ji.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Xe.Object.defineProperties(Ji.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Ji.prototype.first=Ji.prototype.first,Ji.prototype.hasNext=Ji.prototype.Ad,Ji.prototype.next=Ji.prototype.next,Ji.prototype.reset=Ji.prototype.reset,Ji.className="MapValueSetIterator";function pr(a,y){this.key=a,this.value=y,this.ll=this.va=null}pr.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},pr.className="KeyValuePair";function kr(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}kr.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},kr.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)},kr.prototype.Ad=function(){return this.next()},kr.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},kr.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},kr.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},kr.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},kr.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new On;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},kr.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new On;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},kr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},kr.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Xe.Object.defineProperties(kr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),kr.prototype.first=kr.prototype.first,kr.prototype.hasNext=kr.prototype.Ad,kr.prototype.next=kr.prototype.next,kr.prototype.reset=kr.prototype.reset,kr.className="MapIterator";function hi(a){br(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"&&zt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}rt=hi.prototype,rt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},rt.freeze=function(){return this._isFrozen=!0,this},rt.ka=function(){return this._isFrozen=!1,this},rt.toString=function(){return"Map()#"+Cr(this)},rt.add=function(a,y){this._isFrozen&&Yt(this,a);var x=a;Vt(a)&&(x=xo(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new pr(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},rt.set=function(a,y){return this.add(a,y)},rt.addAll=function(a){if(a===null)return this;if(an(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 hi)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},rt.first=function(){return this.ea},hi.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},hi.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},hi.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},hi.prototype.map=function(a){for(var y=new hi,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},hi.prototype.filter=function(a){for(var y=new hi,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},rt=hi.prototype,rt.contains=function(a){var y=a;return Vt(a)&&(y=Cr(a),y===void 0)?!1:this.Tb[y]!==void 0},rt.has=function(a){return this.contains(a)},rt.I=function(a){var y=a;return Vt(a)&&(y=Cr(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},rt.get=function(a){return this.I(a)},rt.remove=function(a){if(a===null)return!1;this._isFrozen&&Yt(this,a);var y=a;if(Vt(a)&&(y=Cr(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},rt.delete=function(a){return this.remove(a)},rt.clear=function(){this._isFrozen&&Yt(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()},hi.prototype.copy=function(){var a=new hi,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},hi.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 pr(E.key,E.value),x++}return y},hi.prototype.Lf=function(){return new Ki(this)},Xe.Object.defineProperties(hi.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return lr;var a=this.Sa;return a!==null?(a.reset(),a):new kr(this)}},iteratorKeys:{get:function(){return 0>=this.count?lr:new oo(this)}},iteratorValues:{get:function(){if(0>=this.count)return lr;var a=this.jf;return a!==null?(a.reset(),a):new Ji(this)}}}),hi.prototype.toKeySet=hi.prototype.Lf,hi.prototype.toArray=hi.prototype.Fa,hi.prototype.clear=hi.prototype.clear,hi.prototype.delete=hi.prototype.delete,hi.prototype.remove=hi.prototype.remove,hi.prototype.get=hi.prototype.get,hi.prototype.getValue=hi.prototype.I,hi.prototype.has=hi.prototype.has,hi.prototype.contains=hi.prototype.contains,hi.prototype.first=hi.prototype.first,hi.prototype.addAll=hi.prototype.addAll,hi.prototype.set=hi.prototype.set,hi.prototype.add=hi.prototype.add,hi.prototype.thaw=hi.prototype.ka,hi.prototype.freeze=hi.prototype.freeze,hi.className="Map";function kt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):zt("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Pr,_o,Oo,wo,yr;kt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},kt.prototype.h=function(a,y){return this.x=a,this.y=y,this},kt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},kt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},kt.prototype.copy=function(){var a=new kt;return a.x=this.x,a.y=this.y,a},rt=kt.prototype,rt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},rt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},rt.freeze=function(){return this._isFrozen=!0,this},rt.ka=function(){return Object.isFrozen(this)&&zt("cannot thaw constant: "+this),this._isFrozen=!1,this};function tr(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 kt(x,E)}return new kt}function Hr(a){return a.x.toString()+" "+a.y.toString()}rt.toString=function(){return"Point("+this.x+","+this.y+")"},rt.D=function(a){return a instanceof kt?this.x===a.x&&this.y===a.y:!1},rt.hi=function(a,y){return this.x===a&&this.y===y},rt.Xa=function(a){return on.B(this.x,a.x)&&on.B(this.y,a.y)},rt.add=function(a){return this.x+=a.x,this.y+=a.y,this},rt.re=function(a){return this.x-=a.x,this.y-=a.y,this},rt.offset=function(a,y){return this.x+=a,this.y+=y,this},kt.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},rt=kt.prototype,rt.scale=function(a,y){return this.x*=a,this.y*=y,this},rt.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},rt.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},rt.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},rt.ab=function(a){return Po(a.x-this.x,a.y-this.y)},rt.direction=function(a,y){return Po(a-this.x,y-this.y)};function Po(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}rt.Ry=function(a,y){return on.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},rt.fA=function(a,y,x,b){return on.qh(a,y,x,b,this.x,this.y,this),this},rt.gA=function(a,y){return on.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},rt.uA=function(a,y,x,b){return on.No(this.x,this.y,a,y,x,b,this),this},rt.vA=function(a,y){return on.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},rt.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},rt.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},rt.transform=function(a){return a.Ga(this),this};function Tr(a,y){return y.Cd(a),a}function Io(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 qi(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function Ui(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)}rt.w=function(){return isFinite(this.x)&&isFinite(this.y)},kt.alloc=function(){var a=rr.pop();return a===void 0?new kt:a},kt.allocAt=function(a,y){var x=rr.pop();return x===void 0?new kt(a,y):(x.x=a,x.y=y,x)},kt.free=function(a){rr.push(a)},kt.prototype.isReal=kt.prototype.w,kt.prototype.setSpot=kt.prototype.yi,kt.prototype.setRectSpot=kt.prototype.xi,kt.prototype.snapToGridPoint=kt.prototype.vA,kt.prototype.snapToGrid=kt.prototype.uA,kt.prototype.projectOntoLineSegmentPoint=kt.prototype.gA,kt.prototype.projectOntoLineSegment=kt.prototype.fA,kt.intersectingLineSegments=function(a,y,x,b,E,te,ne,ae){return on.Rl(a,y,x,b,E,te,ne,ae)},kt.prototype.compareWithLineSegmentPoint=kt.prototype.Ry,kt.compareWithLineSegment=function(a,y,x,b,E,te){return on.Fl(a,y,x,b,E,te)},kt.prototype.direction=kt.prototype.direction,kt.prototype.directionPoint=kt.prototype.ab,kt.prototype.normalize=kt.prototype.normalize,kt.prototype.distanceSquared=kt.prototype.zd,kt.prototype.distanceSquaredPoint=kt.prototype.Bf,kt.prototype.scale=kt.prototype.scale,kt.prototype.rotate=kt.prototype.rotate,kt.prototype.offset=kt.prototype.offset,kt.prototype.subtract=kt.prototype.re,kt.prototype.add=kt.prototype.add,kt.prototype.equalsApprox=kt.prototype.Xa,kt.prototype.equalTo=kt.prototype.hi,kt.prototype.equals=kt.prototype.D,kt.prototype.set=kt.prototype.set,kt.prototype.setTo=kt.prototype.sg;var rr=[];kt.className="Point",kt.parse=tr,kt.stringify=Hr,kt.distanceLineSegmentSquared=Io,kt.distanceSquared=qi,kt.direction=Ui,kt.Origin=Pr=new kt(0,0).ja(),kt.InfiniteTopLeft=_o=new kt(-1/0,-1/0).ja(),kt.InfiniteBottomRight=Oo=new kt(1/0,1/0).ja(),kt.SixPoint=wo=new kt(6,6).ja(),kt.NoPoint=yr=new kt(NaN,NaN).ja(),kt.parse=tr,kt.stringify=Hr,kt.distanceLineSegmentSquared=Io,kt.distanceSquared=qi,kt.direction=Ui;function Yn(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):zt("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var Vr,Eo,rs,Lo,is,ms,Ls;Yn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},Yn.prototype.h=function(a,y){return this.width=a,this.height=y,this},Yn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},Yn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},Yn.prototype.copy=function(){var a=new Yn;return a.width=this.width,a.height=this.height,a},rt=Yn.prototype,rt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},rt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},rt.freeze=function(){return this._isFrozen=!0,this},rt.ka=function(){return Object.isFrozen(this)&&zt("cannot thaw constant: "+this),this._isFrozen=!1,this};function ws(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 Yn(x,E)}return new Yn}function ta(a){return a.width.toString()+" "+a.height.toString()}rt.toString=function(){return"Size("+this.width+","+this.height+")"},rt.D=function(a){return a instanceof Yn?this.width===a.width&&this.height===a.height:!1},rt.hi=function(a,y){return this.width===a&&this.height===y},rt.Xa=function(a){return on.B(this.width,a.width)&&on.B(this.height,a.height)},rt.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},rt.w=function(){return isFinite(this.width)&&isFinite(this.height)},Yn.alloc=function(){var a=aa.pop();return a===void 0?new Yn:a},Yn.free=function(a){aa.push(a)},Yn.prototype.isReal=Yn.prototype.w,Yn.prototype.inflate=Yn.prototype.Bc,Yn.prototype.equalsApprox=Yn.prototype.Xa,Yn.prototype.equalTo=Yn.prototype.hi,Yn.prototype.equals=Yn.prototype.D,Yn.prototype.set=Yn.prototype.set,Yn.prototype.setTo=Yn.prototype.sg;var aa=[];Yn.className="Size",Yn.parse=ws,Yn.stringify=ta,Yn.ZeroSize=Vr=new Yn(0,0).ja(),Yn.OneSize=Eo=new Yn(1,1).ja(),Yn.SixSize=rs=new Yn(6,6).ja(),Yn.EightSize=Lo=new Yn(8,8).ja(),Yn.TenSize=is=new Yn(10,10).ja(),Yn.InfiniteSize=ms=new Yn(1/0,1/0).ja(),Yn.NoSize=Ls=new Yn(NaN,NaN).ja(),Yn.parse=ws,Yn.stringify=ta;function Tn(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 kt?(x=a.x,a=a.y,y instanceof kt?(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 Yn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):zt("Incorrect second argument supplied to Rect constructor "+y)):zt("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}rt=Tn.prototype,rt.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},rt.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function Os(a,y,x){a.width=y,a.height=x}rt.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},rt.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},rt.dd=function(a){return this.x=a.x,this.y=a.y,this},rt.tA=function(a){return this.width=a.width,this.height=a.height,this},Tn.prototype.copy=function(){var a=new Tn;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},rt=Tn.prototype,rt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},rt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},rt.freeze=function(){return this._isFrozen=!0,this},rt.ka=function(){return Object.isFrozen(this)&&zt("cannot thaw constant: "+this),this._isFrozen=!1,this};function hl(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 Tn(x,E,te,ne)}return new Tn}function dl(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}rt.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},rt.D=function(a){return a instanceof Tn?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},rt.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},rt.Xa=function(a){return on.B(this.x,a.x)&&on.B(this.y,a.y)&&on.B(this.width,a.width)&&on.B(this.height,a.height)};function vs(a,y){return on.$(a.x,y.x)&&on.$(a.y,y.y)&&on.$(a.width,y.width)&&on.$(a.height,y.height)}rt.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},rt.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},rt.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},rt.offset=function(a,y){return this.x+=a,this.y+=y,this},rt.Bc=function(a,y){return ja(this,y,a,y,a)},rt.Co=function(a){return ja(this,a.top,a.right,a.bottom,a.left)},rt.Fv=function(a){return ja(this,-a.top,-a.right,-a.bottom,-a.left)},rt.Hz=function(a,y,x,b){return ja(this,a,y,x,b)};function ja(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}rt.Ex=function(a){return lu(this,a.x,a.y,a.width,a.height)},rt.Uu=function(a,y,x,b){return lu(this,a,y,x,b)};function lu(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}rt.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},rt.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 Vl(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))}rt.Ye=function(a){return uo(this,a.x,a.y,0,0)},rt.ed=function(a){return uo(this,a.x,a.y,a.width,a.height)},rt.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),uo(this,a,y,x,b)};function uo(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}rt.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 _r(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 na(a,y,x,b,E,te,ne,ae){return a>ne+E||E>x+a?!1:!(y>ae+te||te>b+y)}rt.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},rt.Mz=function(){return this.width===0&&this.height===0},Tn.alloc=function(){var a=$r.pop();return a===void 0?new Tn:a},Tn.allocAt=function(a,y,x,b){var E=$r.pop();return E===void 0?new Tn(a,y,x,b):E.h(a,y,x,b)},Tn.free=function(a){$r.push(a)},Xe.Object.defineProperties(Tn.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 kt(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new Yn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new kt(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}}}),Tn.prototype.isEmpty=Tn.prototype.Mz,Tn.prototype.isReal=Tn.prototype.w,Tn.intersectsLineSegment=function(a,y,x,b,E,te,ne,ae){return on.Fx(a,y,x,b,E,te,ne,ae)},Tn.prototype.setSpot=Tn.prototype.yi,Tn.prototype.union=Tn.prototype.Kv,Tn.prototype.unionRect=Tn.prototype.ed,Tn.prototype.unionPoint=Tn.prototype.Ye,Tn.prototype.intersects=Tn.prototype.Vu,Tn.prototype.intersectsRect=Tn.prototype.Yc,Tn.prototype.intersect=Tn.prototype.Uu,Tn.prototype.intersectRect=Tn.prototype.Ex,Tn.prototype.grow=Tn.prototype.Hz,Tn.prototype.subtractMargin=Tn.prototype.Fv,Tn.prototype.addMargin=Tn.prototype.Co,Tn.prototype.inflate=Tn.prototype.Bc,Tn.prototype.offset=Tn.prototype.offset,Tn.prototype.contains=Tn.prototype.contains,Tn.prototype.containsRect=Tn.prototype.Re,Tn.prototype.containsPoint=Tn.prototype.ca,Tn.prototype.equalsApprox=Tn.prototype.Xa,Tn.prototype.equalTo=Tn.prototype.hi,Tn.prototype.equals=Tn.prototype.D,Tn.prototype.setSize=Tn.prototype.tA,Tn.prototype.setPoint=Tn.prototype.dd,Tn.prototype.set=Tn.prototype.set,Tn.prototype.setTo=Tn.prototype.sg;var Rr=null,no=null,$r=[];Tn.className="Rect",Tn.parse=hl,Tn.stringify=dl,Tn.contains=_r,Tn.intersects=na,Tn.ZeroRect=Rr=new Tn(0,0,0,0).ja(),Tn.NoRect=no=new Tn(NaN,NaN,NaN,NaN).ja(),Tn.parse=hl,Tn.stringify=dl,Tn.contains=_r,Tn.intersects=na;function Ei(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):zt("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Ei.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Ei.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},Ei.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Ei.prototype.copy=function(){var a=new Ei;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},rt=Ei.prototype,rt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},rt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},rt.freeze=function(){return this._isFrozen=!0,this},rt.ka=function(){return Object.isFrozen(this)&&zt("cannot thaw constant: "+this),this._isFrozen=!1,this};function ls(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 Ei;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new Ei(x);for(var te=NaN;a[y]==="";)y++;if((b=a[y++])&&(te=parseFloat(b)),isNaN(te))return new Ei(x,E);for(var ne=NaN;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),isNaN(ne)?new Ei(x,E):new Ei(x,E,te,ne)}return new Ei}function Ms(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}rt.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},rt.D=function(a){return a instanceof Ei?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},rt.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},rt.Xa=function(a){return on.B(this.top,a.top)&&on.B(this.right,a.right)&&on.B(this.bottom,a.bottom)&&on.B(this.left,a.left)},rt.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Ei.alloc=function(){var a=Ja.pop();return a===void 0?new Ei:a},Ei.free=function(a){Ja.push(a)},Ei.prototype.isReal=Ei.prototype.w,Ei.prototype.equalsApprox=Ei.prototype.Xa,Ei.prototype.equalTo=Ei.prototype.hi,Ei.prototype.equals=Ei.prototype.D,Ei.prototype.set=Ei.prototype.set,Ei.prototype.setTo=Ei.prototype.sg;var ba=null,za=null,Ja=[];Ei.className="Margin",Ei.parse=ls,Ei.stringify=Ms,Ei.ZeroMargin=ba=new Ei(0,0,0,0).ja(),Ei.TwoMargin=za=new Ei(2,2,2,2).ja(),Ei.parse=ls,Ei.stringify=Ms;function Si(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 fs,$s,Qa,wl,Il,Fr,nc,Aa,Ha,Ta,$l,_u,Ua,Ga,Uu,yc,Eu,Dl,Sc,Gu,Lu,bl,th,xc,uu,ro,Uo,La,ia,Is,bs,Ts,Gs,Ws,Yl,Rl;Si.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Si.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},Si.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Si.prototype.copy=function(){var a=new Si;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},rt=Si.prototype,rt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},rt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},rt.freeze=function(){return this._isFrozen=!0,this},rt.ka=function(){return Object.isFrozen(this)&&zt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ds(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 fs;if(a==="TopLeft")return $s;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Qa;if(a==="TopRight")return wl;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Il;if(a==="Center")return Fr;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return nc;if(a==="BottomLeft")return Aa;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return Ha;if(a==="BottomRight")return Ta;if(a==="TopSide")return $l;if(a==="LeftSide")return _u;if(a==="RightSide")return Ua;if(a==="BottomSide")return Ga;if(a==="TopBottomSides")return Uu;if(a==="LeftRightSides")return yc;if(a==="TopLeftSides")return Eu;if(a==="TopRightSides")return Dl;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 uu;if(a==="Default")return ro;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 Si(x,E,te,ne)}return new Si}function nh(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}rt.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(fs)?"None":this.D($s)?"TopLeft":this.D(Qa)?"Top":this.D(wl)?"TopRight":this.D(Il)?"Left":this.D(Fr)?"Center":this.D(nc)?"Right":this.D(Aa)?"BottomLeft":this.D(Ha)?"Bottom":this.D(Ta)?"BottomRight":this.D($l)?"TopSide":this.D(_u)?"LeftSide":this.D(Ua)?"RightSide":this.D(Ga)?"BottomSide":this.D(Uu)?"TopBottomSides":this.D(yc)?"LeftRightSides":this.D(Eu)?"TopLeftSides":this.D(Dl)?"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(uu)?"AllSides":this.D(ro)?"Default":"None"},rt.D=function(a){return a instanceof Si?(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},rt.gv=function(){return new Si(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},rt.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Uo))a=_u;else if(a.D(La))a=Ua;else if(a.D(ia))a=$l;else if(a.D(Is))a=Ga;else return!1;return a=a.offsetY,(this.offsetY&a)===a},rt.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},rt.Mc=function(){return isNaN(this.x)||isNaN(this.y)},rt.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},rt.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},rt.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},Si.alloc=function(){var a=wc.pop();return a===void 0?new Si:a},Si.free=function(a){wc.push(a)},Si.prototype.isDefault=Si.prototype.Xb,Si.prototype.isNone=Si.prototype.ys,Si.prototype.isSide=Si.prototype.$c,Si.prototype.isNoSpot=Si.prototype.Mc,Si.prototype.isSpot=Si.prototype.sb,Si.prototype.includesSide=Si.prototype.Hf,Si.prototype.opposite=Si.prototype.gv,Si.prototype.equals=Si.prototype.D,Si.prototype.set=Si.prototype.set,Si.prototype.setTo=Si.prototype.sg;var wc=[];Si.className="Spot",Si.parse=xh,Si.stringify=nh,Si.None=fs=Ds(new Si(0,0,0,0),0).ja(),Si.Default=ro=Ds(new Si(0,0,-1,0),-1).ja(),Si.TopLeft=$s=new Si(0,0,0,0).ja(),Si.TopCenter=Qa=new Si(.5,0,0,0).ja(),Si.TopRight=wl=new Si(1,0,0,0).ja(),Si.LeftCenter=Il=new Si(0,.5,0,0).ja(),Si.Center=Fr=new Si(.5,.5,0,0).ja(),Si.RightCenter=nc=new Si(1,.5,0,0).ja(),Si.BottomLeft=Aa=new Si(0,1,0,0).ja(),Si.BottomCenter=Ha=new Si(.5,1,0,0).ja(),Si.BottomRight=Ta=new Si(1,1,0,0).ja(),Si.MiddleTop=bs=Qa,Si.MiddleLeft=Ts=Il,Si.MiddleRight=Gs=nc,Si.MiddleBottom=Ws=Ha,Si.Top=ia=Qa,Si.Left=Uo=Il,Si.Right=La=nc,Si.Bottom=Is=Ha,Si.TopSide=$l=Ds(new Si(0,0,1,1),1).ja(),Si.LeftSide=_u=Ds(new Si(0,0,1,2),1).ja(),Si.RightSide=Ua=Ds(new Si(0,0,1,4),1).ja(),Si.BottomSide=Ga=Ds(new Si(0,0,1,8),1).ja(),Si.TopBottomSides=Uu=Ds(new Si(0,0,1,9),1).ja(),Si.LeftRightSides=yc=Ds(new Si(0,0,1,6),1).ja(),Si.TopLeftSides=Eu=Ds(new Si(0,0,1,3),1).ja(),Si.TopRightSides=Dl=Ds(new Si(0,0,1,5),1).ja(),Si.BottomLeftSides=Sc=Ds(new Si(0,0,1,10),1).ja(),Si.BottomRightSides=Gu=Ds(new Si(0,0,1,12),1).ja(),Si.NotTopSide=Lu=Ds(new Si(0,0,1,14),1).ja(),Si.NotLeftSide=bl=Ds(new Si(0,0,1,13),1).ja(),Si.NotRightSide=th=Ds(new Si(0,0,1,11),1).ja(),Si.NotBottomSide=xc=Ds(new Si(0,0,1,7),1).ja(),Si.AllSides=uu=Ds(new Si(0,0,1,15),1).ja(),Yl=new Si(.156,.156).ja(),Rl=new Si(.844,.844).ja(),Si.parse=xh,Si.stringify=nh;function mr(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}mr.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},mr.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},mr.prototype.copy=function(){var a=new mr;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},mr.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},mr.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},mr.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},mr.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},mr.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},mr.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},mr.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},mr.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},rt=mr.prototype,rt.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},rt.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},rt.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)},rt.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))},rt.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))},rt.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,it=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,it),Ve=Math.max(Ve,it),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},mr.alloc=function(){var a=bc.pop();return a===void 0?new mr:a},mr.free=function(a){bc.push(a)},mr.prototype.transformRect=mr.prototype.pp,mr.prototype.transformPoint=mr.prototype.Ga,mr.prototype.scale=mr.prototype.scale,mr.prototype.translate=mr.prototype.translate,mr.prototype.rotate=mr.prototype.rotate,mr.prototype.invert=mr.prototype.Vj,mr.prototype.multiplyInverted=mr.prototype.bv,mr.prototype.multiply=mr.prototype.multiply,mr.prototype.reset=mr.prototype.reset,mr.prototype.isIdentity=mr.prototype.ws,mr.prototype.equals=mr.prototype.D,mr.prototype.setTransform=mr.prototype.setTransform,mr.prototype.set=mr.prototype.set;var bc=[];mr.className="Transform",mr.xF="54a702f3e53909c447824c6706603faf4c";var on={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=on.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);on.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(on.Yb(a,y,ne,ae,je,x,b)&&on.Yb(a,y,ne,ae,je,E,te))return on.Yb(a,y,ne,ae,je,_e,Te);var Ve=(a+x)/2,Qe=(y+b)/2,it=(x+E)/2,ct=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(Ve+it)/2,x=(Qe+ct)/2,it=(it+E)/2,ct=(ct+te)/2;var It=(b+it)/2,Mt=(x+ct)/2;return on.cs(a,y,Ve,Qe,b,x,It,Mt,fe,_e,Te,je)||on.cs(It,Mt,it,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 Ui(((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(on.Yb(a,y,ne,ae,fe,x,b)&&on.Yb(a,y,ne,ae,fe,E,te))uo(_e,a,y,0,0),uo(_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 it=(b+Ve)/2,ct=(x+Qe)/2;on.Dl(a,y,Te,je,b,x,it,ct,fe,_e),on.Dl(it,ct,Ve,Qe,E,te,ne,ae,fe,_e)}return _e},Qe:function(a,y,x,b,E,te,ne,ae,fe,_e){if(on.Yb(a,y,ne,ae,fe,x,b)&&on.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 it=(b+Ve)/2,ct=(x+Qe)/2;on.Qe(a,y,Te,je,b,x,it,ct,fe,_e),on.Qe(it,ct,Ve,Qe,E,te,ne,ae,fe,_e)}return _e},jv:function(a,y,x,b,E,te,ne,ae,fe,_e){if(on.Yb(a,y,E,te,_e,x,b))return on.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 on.jv(a,y,Te,je,Ve,Qe,ne,ae,fe,_e)||on.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(on.Yb(a,y,E,te,ne,x,b))uo(ae,a,y,0,0),uo(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;on.iv(a,y,fe,_e,Te,je,ne,ae),on.iv(Te,je,x,b,E,te,ne,ae)}return ae},ep:function(a,y,x,b,E,te,ne,ae){if(on.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;on.ep(a,y,fe,_e,Te,je,ne,ae),on.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(on.Yb(a,y,ne,ae,Ve,x,b)&&on.Yb(a,y,ne,ae,Ve,E,te))return!on.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 it=(a+x)/2,ct=(y+b)/2,It=(x+E)/2,Mt=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(it+It)/2,x=(ct+Mt)/2,It=(It+E)/2,Mt=(Mt+te)/2;var Gt=(b+It)/2,Zt=(x+Mt)/2,$t=1/0,en=!1,vn=0,ni=0;return on.Eo(a,y,it,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<$t&&($t=a,en=!0,vn=Qe.x,ni=Qe.y)),on.Eo(Gt,Zt,It,Mt,E,te,ne,ae,fe,_e,Te,je,Ve,Qe)&&(Qe.x-fe)*(Qe.x-fe)+(Qe.y-_e)*(Qe.y-_e)<$t&&(en=!0,vn=Qe.x,ni=Qe.y),en&&(Qe.x=vn,Qe.y=ni),en},Fo:function(a,y,x,b,E,te,ne,ae,fe,_e,Te,je,Ve){var Qe=0;if(on.Yb(a,y,ne,ae,Ve,x,b)&&on.Yb(a,y,ne,ae,Ve,E,te)){if(Ve=(a-ne)*(_e-je)-(y-ae)*(fe-Te),Ve===0)return Qe;var it=((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(it>=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,it<fe||it>a)return Qe;0<Ve?Qe++:0>Ve&&Qe--}else{it=(a+x)/2,ct=(y+b)/2;var It=(x+E)/2,Mt=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(it+It)/2,x=(ct+Mt)/2,It=(It+E)/2,Mt=(Mt+te)/2;var Gt=(b+It)/2,Zt=(x+Mt)/2;Qe+=on.Fo(a,y,it,ct,b,x,Gt,Zt,fe,_e,Te,je,Ve),Qe+=on.Fo(Gt,Zt,It,Mt,E,te,ne,ae,fe,_e,Te,je,Ve)}return Qe},qh:function(a,y,x,b,E,te,ne){return on.$(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)):on.$(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 on.B(a,x)&&on.B(y,b)?(fe.h(a,y),!1):on.$(E,ne)?on.$(a,x)?(on.qh(a,y,x,b,E,te,fe),!1):on.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,fe):(ae=(ae-te)/(ne-E),on.$(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),on.$(ae,ne)?(on.qh(a,y,x,b,E,te,fe),!1):(E=(ne*a-ae*E+te-y)/(ne-ae),on.$(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)):on.qh(a,y,x,b,E,ne*(E-a)+y,fe))))},MA:function(a,y,x,b,E){return on.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(It,Mt){var Gt=(It-a)*(It-a)+(Mt-y)*(Mt-y);Gt<je&&(je=Gt,fe.h(It,Mt))}var je=1/0;Te(fe.x,fe.y);var Ve=0,Qe=0,it=0,ct=0;if(E<ne?(Ve=E,Qe=ne):(Ve=ne,Qe=E),te<ae?(it=E,ct=ne):(it=ne,ct=E),Ve=(Qe-Ve)/2+_e,_e=(ct-it)/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(on.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 on.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)),on.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)),on.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 on.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):!!(_r(a,y,x,b,E,te)||_r(a,y,x,b,ne,ae)||on.Rl(a,y,fe,y,E,te,ne,ae)||on.Rl(fe,y,fe,_e,E,te,ne,ae)||on.Rl(fe,_e,a,_e,E,te,ne,ae)||on.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>=on.Fl(a,y,x,b,E,te)*on.Fl(a,y,x,b,ne,ae)&&0>=on.Fl(E,te,ne,ae,a,y)*on.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(on.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),on.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 fi,um:new fi,Mf:new fi,Nf:0,vm:100};on.za=on.AA;function Qn(a){br(this),this.l=2,a===void 0&&(a=Qn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===Qn.o?this.ee=new On:(Qn.V===null&&(Qn.V=new On().freeze()),this.ee=Qn.V),this.aq=this.ee.Ja,this.Ip=new Tn().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=$s,this.gg=Ta,this.Rk=this.Sk=NaN,this.Uf=Wn}Qn.prototype.copy=function(){var a=new Qn;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===Qn.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},Qn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},Qn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==Qn.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},Qn.prototype.ka=function(){if(Object.isFrozen(this)&&zt("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==Qn.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},Qn.prototype.Xa=function(a){if(!(a instanceof Qn))return!1;if(this.type!==a.type)return this.type===Qn.j&&a.type===Qn.o?wh(this,a):a.type===Qn.j&&this.type===Qn.o?wh(a,this):!1;if(this.type===Qn.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 on.B(this.startX,a.startX)&&on.B(this.startY,a.startY)&&on.B(this.endX,a.endX)&&on.B(this.endY,a.endY)};function wh(a,y){return a.type!==Qn.j||y.type!==Qn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&on.B(a.startX,y.startX)&&on.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===bo&&on.B(a.endX,y.endX)&&on.B(a.endY,y.endY))))}Qn.ia=function(a){return a.toString()},Qn.prototype.qb=function(a){a.classType===Qn&&(this.type=a)},Qn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Qn.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 Qn.u:var y=new Tn(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 Qn.F:if(y=new Tn(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 Qn.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()}},Qn.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},Qn.parse=function(a,y){function x(){return ct>=$t-1?!0:_e[ct+1].match(en)!==null}function b(){return ct++,_e[ct]}function E(nr){var Vi=parseFloat(b()),to=parseFloat(b());It===It.toLowerCase()&&(Vi=Zt.x+Vi,to=Zt.y+to),nr.h(Vi,to)}function te(){return E(Zt),Zt}function ne(){return E(Gt),Gt}function ae(){var nr=Mt.toLowerCase();return nr!=="c"&&nr!=="s"&&nr!=="q"&&nr!=="t"?Zt:new kt(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=Gn();for(var je="",Ve=!1,Qe=0;Qe<Te.length;Qe++){var it=Te[Qe];it!=="."||Ve?it==="."?(fe.push(je),je="."):je+=it:(Ve=!0,je+=it)}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,Jn(fe)}}var ct=-1,It="",Mt="";fe=new kt(0,0);var Gt=new kt(0,0),Zt=new kt(0,0),$t=_e.length;a=A1(null),Ve=je=Te=!1,Qe=!0,it=null;for(var en=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(ct>=$t-1);)if(Mt=It,It=b(),It!=="")switch(It.toUpperCase()){case"X":Qe=!0,je=Te=!1;break;case"M":for(it=te(),a.mc===null||Qe===!0?(Sp(a,it.x,it.y,Te,!je,Ve),Qe=!1):a.moveTo(it.x,it.y),fe.assign(Zt);!x();)it=te(),a.lineTo(it.x,it.y);break;case"L":for(;!x();)it=te(),a.lineTo(it.x,it.y);break;case"H":for(;!x();)Zt=new kt((It===It.toLowerCase()?Zt.x:0)+parseFloat(b()),Zt.y),a.lineTo(Zt.x,Zt.y);break;case"V":for(;!x();)Zt=new kt(Zt.x,(It===It.toLowerCase()?Zt.y:0)+parseFloat(b())),a.lineTo(Zt.x,Zt.y);break;case"C":for(;!x();){it=new kt,E(it);var vn=ne(),ni=te();Ih(a,it.x,it.y,vn.x,vn.y,ni.x,ni.y)}break;case"S":for(;!x();)it=ae(),vn=ne(),ni=te(),Ih(a,it.x,it.y,vn.x,vn.y,ni.x,ni.y);break;case"Q":for(;!x();)it=ne(),vn=te(),Um(a,it.x,it.y,vn.x,vn.y);break;case"T":for(;!x();)Gt=it=ae(),vn=te(),Um(a,it.x,it.y,vn.x,vn.y);break;case"B":for(;!x();){it=parseFloat(b()),vn=parseFloat(b()),ni=parseFloat(b());var pi=parseFloat(b()),ci=parseFloat(b()),$n=ci,Dn=!1;x()||($n=parseFloat(b()),x()||(Dn=parseFloat(b())!==0)),It===It.toLowerCase()&&(ni+=Zt.x,pi+=Zt.y),a.arcTo(it,vn,ni,pi,ci,$n,Dn)}break;case"A":for(;!x();)it=Math.abs(parseFloat(b())),vn=Math.abs(parseFloat(b())),ni=parseFloat(b()),ci=pi=!1,Dn=$n=0,$n=b(),$n.length===1?(pi=!!parseFloat($n),ci=!!parseFloat(b()),$n=parseFloat(b())):$n.length===2?(pi=!!parseFloat($n[0]),ci=!!parseFloat($n[1]),$n=parseFloat(b())):(pi=!!parseFloat($n[0]),ci=!!parseFloat($n[1]),$n=parseFloat($n.slice(2))),Dn=parseFloat(b()),It===It.toLowerCase()&&($n=Zt.x+$n,Dn=Zt.y+Dn),Zt.h($n,Dn),Cx(a,it,vn,ni,pi,ci,$n,Dn);break;case"Z":bx(a),Zt.assign(fe);break;case"F":for(it="",vn=1;_e[ct+vn];)if(_e[ct+vn]==="0")Ve=!0,vn++;else if(_e[ct+vn].match(/[Uu]/)!==null)vn++;else if(_e[ct+vn].match(en)===null)vn++;else{it=_e[ct+vn];break}it.match(/[Mm]/)?Te=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(it="",vn=1;_e[ct+vn];)if(_e[ct+vn].match(/[Ff]/)!==null)vn++;else if(_e[ct+vn].match(en)===null)vn++;else{it=_e[ct+vn];break}it.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},Qn.Ha=function(a,y){for(var x=a.length,b=kt.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}kt.free(b)},Qn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===Qn.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},Qn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===Qn.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),uo(a,0,0,0,0),a.freeze()},Qn.prototype.ix=function(){var a=new Tn;return Qh(this,a,!0),a};function Qh(a,y,x){switch(a.type){case Qn.j:case Qn.u:case Qn.F:x?y.h(a.od,a.pd,0,0):uo(y,a.od,a.pd,0,0),uo(y,a.Dc,a.Ec,0,0);break;case Qn.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):uo(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 bo:case _s:fe=je.endX,_e=je.endY,uo(y,fe,_e,0,0);break;case fa:on.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 fl:on.iv(fe,_e,je.point1X,je.point1Y,je.endX,je.endY,.5,y),fe=je.endX,_e=je.endY;break;case ss:case Cl:var Ve=je.type===ss?Na(je,te):Ks(je,te,fe,_e),Qe=Ve.length;if(Qe===0){fe=je.type===ss?je.centerX:je.endX,_e=je.type===ss?je.centerY:je.endY,uo(y,fe,_e,0,0);break}je=null;for(var it=0;it<Qe;it++)je=Ve[it],on.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:zt("Unknown Segment type: "+je.type)}}}break;default:zt("Unknown Geometry type: "+a.type)}}Qn.prototype.normalize=function(){this._isFrozen&&Yt(this);var a=this.ix();return this.offset(-a.x,-a.y),new kt(-a.x,-a.y)},Qn.prototype.offset=function(a,y){return this._isFrozen&&Yt(this),this.transform(1,0,0,1,a,y),this},Qn.prototype.scale=function(a,y){return this._isFrozen&&Yt(this),this.transform(a,0,0,y,0,0),this},Qn.prototype.rotate=function(a,y,x){this._isFrozen&&Yt(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=mr.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),mr.free(b),this},rt=Qn.prototype,rt.transform=function(a,y,x,b,E,te){switch(this.type){case Qn.j:case Qn.u:case Qn.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 Qn.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 it=je[Qe];switch(it.type){case bo:case _s:ne=it.endX,ae=it.endY,it.endX=ne*a+ae*x+E,it.endY=ne*y+ae*b+te;break;case fa:ne=it.point1X,ae=it.point1Y,it.point1X=ne*a+ae*x+E,it.point1Y=ne*y+ae*b+te,ne=it.point2X,ae=it.point2Y,it.point2X=ne*a+ae*x+E,it.point2Y=ne*y+ae*b+te,ne=it.endX,ae=it.endY,it.endX=ne*a+ae*x+E,it.endY=ne*y+ae*b+te;break;case fl:ne=it.point1X,ae=it.point1Y,it.point1X=ne*a+ae*x+E,it.point1Y=ne*y+ae*b+te,ne=it.endX,ae=it.endY,it.endX=ne*a+ae*x+E,it.endY=ne*y+ae*b+te;break;case ss:ne=it.centerX,ae=it.centerY,it.centerX=ne*a+ae*x+E,it.centerY=ne*y+ae*b+te,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),it.startAngle+=ne),0>a&&(it.startAngle=180-it.startAngle,it.sweepAngle=-it.sweepAngle),0>b&&(it.startAngle=-it.startAngle,it.sweepAngle=-it.sweepAngle),it.radiusX*=Math.sqrt(a*a+x*x),it.radiusY!==void 0&&(it.radiusY*=Math.sqrt(y*y+b*b));break;case Cl:if(ne=it.endX,ae=it.endY,it.endX=ne*a+ae*x+E,it.endY=ne*y+ae*b+te,it.radiusX===0||it.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),it.xAxisRotation+=ne),0>a&&(it.xAxisRotation=180-it.xAxisRotation,it.isClockwiseArc=!it.isClockwiseArc),0>b&&(it.xAxisRotation=-it.xAxisRotation,it.isClockwiseArc=!it.isClockwiseArc),it.radiusX*=Math.sqrt(a*a+x*x),it.radiusY*=Math.sqrt(y*y+b*b);break;default:zt("Unknown Segment type: "+it.type)}}}}return this._isInvalidBounds=!0,this},rt.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 Qn.j:return on.Yb(x,b,E,te,y,a.x,a.y);case Qn.u:var ne=Tn.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),Tn.free(ne),a;case Qn.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 Qn.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,it=0;it<Qe;it++){var ct=Ve[it],It=!ct.isEvenOdd;if(ct.isFilled){if(b&&ct.ca(te,y,x))return!0;var Mt=ct.segments;fe=ct.startX,_e=ct.startY;for(var Gt=fe,Zt=_e,$t=Mt.s,en=0;en<=Mt.length;en++){var vn=void 0;if(en!==Mt.length){vn=$t[en];var ni=vn.type;a=vn.endX,je=vn.endY}else ni=bo,a=Gt,je=Zt;switch(ni){case _s:if(Gt=Tu(te,y,ne,y,fe,_e,Gt,Zt),isNaN(Gt))return!0;ae+=Gt,Gt=a,Zt=je;break;case bo:if(fe=Tu(te,y,ne,y,fe,_e,a,je),isNaN(fe))return!0;ae+=fe;break;case fa:Te=on.Fo(fe,_e,vn.point1X,vn.point1Y,vn.point2X,vn.point2Y,a,je,ne,y,te,y,.5),ae+=Te;break;case fl:Te=on.Fo(fe,_e,(fe+2*vn.point1X)/3,(_e+2*vn.point1Y)/3,(2*vn.point1X+a)/3,(2*vn.point1Y+je)/3,a,je,ne,y,te,y,.5),ae+=Te;break;case ss:case Cl:ni=vn.type===ss?Na(vn,ct):Ks(vn,ct,fe,_e);var pi=ni.length;if(pi===0){if(fe=Tu(te,y,ne,y,fe,_e,vn.type===ss?vn.centerX:vn.endX,vn.type===ss?vn.centerY:vn.endY),isNaN(fe))return!0;ae+=fe;break}vn=null;for(var ci=0;ci<pi;ci++){if(vn=ni[ci],ci===0){if(Te=Tu(te,y,ne,y,fe,_e,vn[0],vn[1]),isNaN(Te))return!0;ae+=Te}Te=on.Fo(vn[0],vn[1],vn[2],vn[3],vn[4],vn[5],vn[6],vn[7],ne,y,te,y,.5),ae+=Te}vn!==null&&(a=vn[6],je=vn[7]);break;default:zt("Unknown Segment type: "+vn.type)}fe=a,_e=je}if(It){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(on.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}rt.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new kt),this.type===Qn.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},rt.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===Qn.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},rt.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===Qn.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},rt.xx=function(a){if(this.type===Qn.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=kt.alloc();return on.qh(y,x,b,E,te,a,ae),a=ae.x,te=ae.y,kt.free(ae),Math.sqrt(((a-y)*(a-y)+(te-x)*(te-x))/ne)}}else if(this.type===Qn.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=kt.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],it=Ve.length,ct=0;ct<it;ct+=2){var It=Ve[ct],Mt=Ve[ct+1];if(ct!==0){on.qh(_e,Te,It,Mt,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=It,Te=Mt}return kt.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===Qn.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===Qn.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===Qn.F){var te=new Zs;te.startX=a.endX,te.startY=(a.startY+a.endY)/2;var ne=new Zr(ss);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=Na(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];on.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 _s: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 bo:b.push(Ve.endX),b.push(Ve.endY),ne=Ve.endX,te=Ve.endY;break;case fa:on.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 fl:on.ep(ne,te,Ve.point1X,Ve.point1Y,Ve.endX,Ve.endY,.5,b),ne=Ve.endX,te=Ve.endY;break;case ss:var Qe=Na(Ve,E),it=Qe.length;if(it===0){b.push(Ve.centerX),b.push(Ve.centerY),ne=Ve.centerX,te=Ve.centerY;break}for(var ct=0;ct<it;ct++){var It=Qe[ct];on.Qe(ne,te,It[2],It[3],It[4],It[5],It[6],It[7],.5,b),ne=It[6],te=It[7]}break;case Cl:if(Qe=Ks(Ve,E,ne,te),it=Qe.length,ct=Ve.endX,It=Ve.endY,it===0){b.push(ct),b.push(It),ne=ct,te=It;break}for(ct=0;ct<it;ct++)It=Qe[ct],on.Qe(ne,te,It[2],It[3],It[4],It[5],It[6],It[7],.5,b),ne=It[6],te=It[7];break;default:zt("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(qi(x,b,ne,ae))),x=ne,b=ae}return y}rt.add=function(a){return this.ee.add(a),this},rt.pm=function(a,y,x,b,E,te,ne,ae){return this._isFrozen&&Yt(this),this.fg=new Si(a,y,E,te).freeze(),this.gg=new Si(x,b,ne,ae).freeze(),this},Xe.Object.defineProperties(Qn.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===Qn.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===Qn.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&&Yt(this,a),this.na=a,a===Qn.o?this.ee=new On:(Qn.V===null&&(Qn.V=new On().freeze()),this.ee=Qn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&Yt(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&Yt(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&Yt(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&Yt(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&Yt(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&Yt(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&Yt(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&Yt(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),Qn.prototype.setSpots=Qn.prototype.pm,Qn.prototype.add=Qn.prototype.add,Qn.prototype.getFractionForPoint=Qn.prototype.xx,Qn.prototype.getPointAndAngleAlongPath=Qn.prototype.Qu,Qn.prototype.getAngleAlongPath=Qn.prototype.wx,Qn.prototype.getPointAlongPath=Qn.prototype.Pu,Qn.prototype.containsPoint=Qn.prototype.ca,Qn.prototype.transform=Qn.prototype.transform,Qn.prototype.rotate=Qn.prototype.rotate,Qn.prototype.scale=Qn.prototype.scale,Qn.prototype.offset=Qn.prototype.offset,Qn.prototype.normalize=Qn.prototype.normalize,Qn.prototype.computeBoundsWithoutOrigin=Qn.prototype.ix,Qn.prototype.equalsApprox=Qn.prototype.Xa,Qn.className="Geometry",Qn.j=new un(Qn,"Line",0),Qn.u=new un(Qn,"Rectangle",1),Qn.F=new un(Qn,"Ellipse",2),Qn.o=new un(Qn,"Path",3),Qn.V=null,Qn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",Qn.className="Geometry",Qn.stringify=Qn.ia,Qn.fillPath=Qn.nb,Qn.parse=Qn.parse,Qn.Line=Qn.j,Qn.Rectangle=Qn.u,Qn.Ellipse=Qn.F,Qn.Path=Qn.o;function Zs(a,y,x,b,E){br(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 On,this.sr=this.pl.Ja,this.fw=null}Zs.prototype.copy=function(){var a=new Zs;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},rt=Zs.prototype,rt.Xa=function(a){if(!(a instanceof Zs&&on.B(this.startX,a.startX)&&on.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},rt.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},rt.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},rt.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},rt.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},rt.add=function(a){return this.pl.add(a),this},rt.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 _s:te=Te.endX,ne=Te.endY,b=Te.endX,E=Te.endY;break;case bo:if(on.Yb(b,E,Te.endX,Te.endY,x,a,y))return!0;b=Te.endX,E=Te.endY;break;case fa:if(on.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 fl:if(on.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 ss:case Cl:var je=Te.type===ss?Na(Te,this):Ks(Te,this,b,E),Ve=je.length,Qe=Te.type===ss?Te.centerX:Te.endX,it=Te.type===ss?Te.centerY:Te.endY;if(Ve===0){if(on.Yb(b,E,Qe,it,x,a,y))return!0;b=Qe,E=it;break}for(Qe=null,it=0;it<Ve;it++)if(Qe=je[it],it===0&&on.Yb(b,E,Qe[0],Qe[1],x,a,y)||on.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:zt("Unknown Segment type: "+Te.type)}if(Te.isClosed&&(b!==te||E!==ne)&&on.Yb(b,E,te,ne,x,a,y))return!0}return!1},Xe.Object.defineProperties(Zs.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&&Yt(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&Yt(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&Yt(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&Yt(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&Yt(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&Yt(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Zs.prototype.add=Zs.prototype.add,Zs.prototype.equalsApprox=Zs.prototype.Xa,Zs.className="PathFigure";function Zr(a,y,x,b,E,te,ne,ae){br(this),a===void 0&&(a=bo),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===ss&&(te=Math.max(te,0)),this.Wh=te,typeof ne=="number"?(a===ss&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}Zr.prototype.copy=function(){var a=new Zr;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},rt=Zr.prototype,rt.Xa=function(a){if(!(a instanceof Zr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case _s:case bo:return on.B(this.endX,a.endX)&&on.B(this.endY,a.endY);case fa:return on.B(this.endX,a.endX)&&on.B(this.endY,a.endY)&&on.B(this.point1X,a.point1X)&&on.B(this.point1Y,a.point1Y)&&on.B(this.point2X,a.point2X)&&on.B(this.point2Y,a.point2Y);case fl:return on.B(this.endX,a.endX)&&on.B(this.endY,a.endY)&&on.B(this.point1X,a.point1X)&&on.B(this.point1Y,a.point1Y);case ss:return on.B(this.startAngle,a.startAngle)&&on.B(this.sweepAngle,a.sweepAngle)&&on.B(this.centerX,a.centerX)&&on.B(this.centerY,a.centerY)&&on.B(this.radiusX,a.radiusX)&&on.B(this.radiusY,a.radiusY);case Cl:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&on.B(this.xAxisRotation,a.xAxisRotation)&&on.B(this.endX,a.endX)&&on.B(this.endY,a.endY)&&on.B(this.radiusX,a.radiusX)&&on.B(this.radiusY,a.radiusY);default:return!1}},rt.qb=function(a){a.classType===Zr&&(this.type=a)},rt.toString=function(a){switch(a===void 0&&(a=-1),this.type){case _s:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case bo:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case fa: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 fl: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 ss: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":"")},rt.freeze=function(){return this._isFrozen=!0,this},rt.ka=function(){return this._isFrozen=!1,this},rt.close=function(){return this.isClosed=!0,this};function Na(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=on.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var ne=mr.alloc();ne.reset(),x<b?ne.scale(1,b/x):ne.scale(x/b,1),Qn.Ha(te,ne),mr.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 Ks(a,y,x,b){function E(ct,It,Mt,Gt){return(ct*Gt<It*Mt?-1:1)*Math.acos((ct*Mt+It*Gt)/(Math.sqrt(ct*ct+It*It)*Math.sqrt(Mt*Mt+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 it=Qe*Qe/(y*y)+ne*ne/(te*te);return 1<it&&(y*=Math.sqrt(it),te*=Math.sqrt(it)),it=(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(it)&&(it=0),ae=it*y*ne/te,it=it*-te*Qe/y,isNaN(ae)&&(ae=0),isNaN(it)&&(it=0),x=(x+_e)/2+je*ae-Ve*it,b=(b+Te)/2+Ve*ae+je*it,Te=E(1,0,(Qe-ae)/y,(ne-it)/te),je=(Qe-ae)/y,_e=(ne-it)/te,Qe=(-Qe-ae)/y,ae=(-ne-it)/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=on.jx(0,0,y>te?y:te,Te,Te+ne,!0),te=mr.alloc(),te.reset(),te.translate(x,b),te.rotate(a.Ne,0,0),te.scale(fe,Qe),Qn.Ha(y,te),mr.free(te),a.ae=y,a.ae}Xe.Object.defineProperties(Zr.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&&Yt(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Yt(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&Yt(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Yt(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Yt(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&Yt(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&Yt(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Yt(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Yt(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Cn(a,">= zero",Zr,"radiusX"),this._isFrozen&&Yt(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Cn(a,">= zero",Zr,"radiusY"),this._isFrozen&&Yt(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Yt(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&&Yt(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&&Yt(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&&Yt(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&&Yt(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Zr.prototype.equalsApprox=Zr.prototype.Xa;var _s=new un(Zr,"Move",0),bo=new un(Zr,"Line",1),fa=new un(Zr,"Bezier",2),fl=new un(Zr,"QuadraticBezier",3),ss=new un(Zr,"Arc",4),Cl=new un(Zr,"SvgArc",4);Zr.className="PathSegment",Zr.Move=_s,Zr.Line=bo,Zr.Bezier=fa,Zr.QuadraticBezier=fl,Zr.Arc=ss,Zr.SvgArc=Cl;function Ca(){this.H=null,this.xu=new kt(0,0).freeze(),this.mt=new kt(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}Ca.prototype.copy=function(){var a=new Ca;return this.clone(a)},Ca.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},Ca.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},Ca.prototype.So=function(a,y){var x=this.diagram;return x===null||Hd(x,a,y),y},Ca.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Hd(x,a,y),y.assign(x.Ps(y))),y},Xe.Object.defineProperties(Ca.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}}}),Ca.prototype.getMultiTouchDocumentPoint=Ca.prototype.Bz,Ca.prototype.getMultiTouchViewPoint=Ca.prototype.So,Ca.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},Xe.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=Vt(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=Vt(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=Vt(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=Vt(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===Wa?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===Wa?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=li(this.object)),this.oldValue!==null&&(a+=" old: "+li(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+li(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))},Xe.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===Wa&&(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 Wa=new un(Go,"Transaction",-1),Vo=new un(Go,"Property",0),ps=new un(Go,"Insert",1),us=new un(Go,"Remove",2);Go.className="ChangedEvent",Go.Transaction=Wa,Go.Property=Vo,Go.Insert=ps,Go.Remove=us;function Rs(){this.o=new On().freeze(),this.xa="",this.j=!1}Rs.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},Rs.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()},Rs.prototype.canUndo=function(){return this.isComplete},Rs.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()}},Rs.prototype.canRedo=function(){return this.isComplete},Rs.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()}},Rs.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new hi,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 hi,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()}},Xe.Object.defineProperties(Rs.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}}}),Rs.prototype.optimize=Rs.prototype.ak,Rs.prototype.redo=Rs.prototype.redo,Rs.prototype.canRedo=Rs.prototype.canRedo,Rs.prototype.undo=Rs.prototype.undo,Rs.prototype.canUndo=Rs.prototype.canUndo,Rs.prototype.clear=Rs.prototype.clear,Rs.className="Transaction";function jo(){this.Pt=new In,this.Jd=!1,this.u=new On().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new On().freeze(),this.hl=new On,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}jo.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},jo.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},jo.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},rt=jo.prototype,rt.Xw=function(a){this.Pt.add(a)},rt.Rx=function(a){this.Pt.remove(a)},rt.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},rt.eb=function(a){return a===void 0&&(a=""),Rc(this,!0,a)},rt.Kf=function(){return Rc(this,!1,"")};function Rc(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&An("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}rt.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()}},jo.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},jo.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){An("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},jo.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},jo.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){An("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},jo.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new Go;for(b.change=Wa,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},jo.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Rs);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||An("Change not within a transaction: "+x.toString()))}},jo.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},Xe.Object.defineProperties(jo.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}}}),jo.prototype.handleChanged=jo.prototype.Tu,jo.prototype.redo=jo.prototype.redo,jo.prototype.undo=jo.prototype.undo,jo.prototype.canUndo=jo.prototype.canUndo,jo.prototype.discardHistoryAfterIndex=jo.prototype.lx,jo.prototype.rollbackTransaction=jo.prototype.Kf,jo.prototype.commitTransaction=jo.prototype.eb,jo.prototype.startTransaction=jo.prototype.Ea,jo.prototype.removeModel=jo.prototype.Rx,jo.prototype.addModel=jo.prototype.Xw,jo.prototype.clear=jo.prototype.clear,jo.className="UndoManager";function Ur(){br(this),this.H=ac,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new Ca,this.Zr=-1}Ur.prototype.toString=function(){return this.name!==""?this.name+" Tool":Rn(this.constructor)},Ur.prototype.updateAdornments=function(){},Ur.prototype.canStart=function(){return this.isEnabled},Ur.prototype.doStart=function(){},Ur.prototype.doActivate=function(){this.isActive=!0},Ur.prototype.doDeactivate=function(){this.isActive=!1},Ur.prototype.doStop=function(){},Ur.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Ur.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Ur.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Ur.prototype.doMouseMove=function(){},Ur.prototype.doMouseUp=function(){this.stopTool()},Ur.prototype.doMouseWheel=function(){},Ur.prototype.canStartMultiTouch=function(){return!0},Ur.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,kt.allocAt(NaN,NaN)),b=y.So(1,kt.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}kt.free(x),kt.free(b)},Ur.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,kt.allocAt(NaN,NaN)),b=y.So(1,kt.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 kt((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}kt.free(x),kt.free(b)},Ur.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Ur.prototype.doKeyUp=function(){},Ur.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Ur.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Ur.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(ur?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||(ur?y.meta:y.control)||y.shift||a.clearSelection()}},Ur.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)}}}Ur.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}},Ur.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Ur.prototype.doCurrentObjectChanged=function(){},Ur.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)}}},Ur.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Ur.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=Un(function(){x.doWaitAfter(b)},a)},Ur.prototype.cancelWaitAfter=function(){this.Zr!==-1&&bt.clearTimeout(this.Zr),this.Zr=-1},Ur.prototype.doWaitAfter=function(){},Ur.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},Ur.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},Xe.Object.defineProperties(Ur.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof mn&&(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}}}),Ur.prototype.startTransaction=Ur.prototype.Ea,Ur.className="Tool";function Wo(){Ur.call(this),this.name="ToolManager",this.hb=new On,this.ob=new On,this.Hb=new On,this.F=this.V=850,this.o=new Yn(2,2).ja(),this.Ha=5e3,this.ia=ih,this.u=Ch,this.Mp=this.j=null,this.zj=-1}qe(Wo,Ur),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===io){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===io){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&&(bt.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=Un(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&&(bt.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)},Xe.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 un(Wo,"WheelScroll",0),rh=new un(Wo,"WheelZoom",1),Od=new un(Wo,"WheelNone",2),Ch=new un(Wo,"GestureZoom",3),ic=new un(Wo,"GestureCancel",4),io=new un(Wo,"GestureNone",5);Wo.className="ToolManager",Wo.WheelScroll=ih,Wo.WheelZoom=rh,Wo.WheelNone=Od,Wo.GestureZoom=Ch,Wo.GestureCancel=ic,Wo.GestureNone=io;function qo(){Ur.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 kt(NaN,NaN),this.Fr=new kt,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(qo,Ur),qo.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},qo.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},qo.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,(ur?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},qo.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&&Ia(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,Ct=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 Xn?(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 Kn,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}qo.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},qo.prototype.Pd=function(a){return a===void 0?new ah(Pr):this.isGridSnapEnabled?new ah(new kt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new ah(a.copy())},qo.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);hs(E),Bl(E),Au(E),E.diagram.ug()}y.clear()}hs(this),this.tl.h(NaN,NaN),Ct!==null&&(Ct.currentCursor=""),ht=Ct=null,Bl(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),nd(a,!0)},qo.prototype.stopTransaction=function(){var a=this.diagram,y=Ur.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;Bl(a),rc(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}qo.prototype.doCancel=function(){Bl(this),rc(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},qo.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},qo.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function cu(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 hi,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 Xn&&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 Bl(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 Xn&&(x.value.point=new kt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function hs(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 Bs(a,y,x){var b=a.diagram,E=a.startPoint,te=kt.alloc();te.assign(b.lastInput.documentPoint),a.moveParts(y,te.re(E),x),kt.free(te),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&(Ia(b),b.hk())}qo.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 Xn&&b.suspendsRouting){var E=x.value.point;a.draggedParts.add(b,a.Pd()),Bh(b,-E.x,-E.y)}y.bd()}}function qa(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),ka(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 sr)){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)}qo.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})},qo.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 ki&&!(a instanceof sr)&&(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=kt.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(Fr,a);fe=y.Bf(fe),fe<te&&(ne=ae,te=fe)}}return kt.free(a),ne}function ka(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)):bi(E,ne,te,fe,ae):bi(E,null,null,null,null)}}}}qo.prototype.doDragOver=function(){};function oc(a,y){var x=a.diagram;a.dragsLink&&ka(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 ii&&te.linksConnected.each(function(ae){ae.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||ht!==null){for(a=Tn.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof ii&&Ft(x,b,a);Tn.free(a)}}}function gf(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof sr||(x=a.mouseDrop,x!==null&&x(y))}function Ft(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 Xn},!0,function(E){return E instanceof Xn},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}qo.prototype.doDropOnto=function(){},qo.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()?(cu(this,!1),Qf(a,this.copiedParts),Bs(this,this.copiedParts,!1),od(a,this.copiedParts)):this.mayMove()?(Bl(this),Bs(this,this.draggedParts,!0)):this.mayDragOut()?(cu(this,!1),Bs(this,this.copiedParts,!1)):Bl(this),qa(this,a.lastInput.documentPoint))}},qo.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?(Bl(this),cu(this,!0),Qf(a,this.copiedParts),Bs(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,Bl(this),this.mayMove()&&(Bs(this,this.draggedParts,!0),qa(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)}}},qo.prototype.simulatedMouseMove=function(a,y,x){if(ht===null)return!1;var b=ht.diagram;x instanceof mn||(x=null);var E=Ct;return x!==E&&(E!==null&&E!==b&&(E.ug(),ht.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),Ct=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)},qo.prototype.simulatedMouseUp=function(a,y,x){if(ht===null)return!1;var b=Ct,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;Ct=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 kt),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 ii&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}qo.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(ur?!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())},qo.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())},qo.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())},qo.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},qo.prototype.Az=function(){return ht},qo.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)},qo.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),pl(a),a.animationManager.Cc(),a=ht,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},qo.prototype.doSimulatedDragLeave=function(){var a=ht;a!==null&&a.doSimulatedDragOut(),this.doCancel()},qo.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),Bs(this,this.copiedParts,!1),qa(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},qo.prototype.doSimulatedDrop=function(){var a=this.diagram,y=ht;if(y!==null){var x=y.diagram;if(y.Ym=!0,Bl(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),cn(this,y.draggedParts.Lf(),!0,a.lastInput),Bs(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=Tn.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,Tn.free(te),te=a.Fr,ne=new hi,ae=kt.alloc(),fe=y.iterator;fe.next();)_e=fe.value,_e instanceof Xn&&_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))));kt.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)}}}qo.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},qo.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new kt},Xe.Object.defineProperties(qo.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}}}),qo.prototype.getDraggingSource=qo.prototype.Az;var ht=null,Ct=null;qo.className="DraggingTool",ku=new On,zn("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Wo.prototype.doCancel=function(){ht!==null&&ht.doCancel(),Ur.prototype.doCancel.call(this)};function Et(){Ur.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Xn,y=new gr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new gr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new ii,y=new gr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Eo,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new ii,y=new gr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Eo,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 hi,this.Of=this.gj=this.Pf=null}qe(Et,Ur),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=Yn.alloc();ne.width=y.naturalBounds.width*te,ne.height=y.naturalBounds.height*te,b.desiredSize=ne,Yn.free(ne),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Fr,te=kt.alloc(),x.location=y.ga(Fr,te),kt.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=Eo,y.fromSpot=fs,y.toSpot=fs),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 ii){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 ii))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof ii)&&(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 ii){var fe=ne.ga(Fr,kt.alloc()),_e=x.x-fe.x,Te=x.y-fe.y;kt.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 ii&&(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 ii))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof ii))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=sn(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 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&&ne.toNode===x&&(ne=ne.fromNode,ne!==x&&sn(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}Xe.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=_n,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 ii)))return null;var x=this.direction;if(x===_n||x===Hn){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===_n||x===ti)&&(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 ii&&(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 ii&&(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 ii&&(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 Xn)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(){},Xe.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 _n=new un(xn,"Either",0),Hn=new un(xn,"ForwardsOnly",0),ti=new un(xn,"BackwardsOnly",0);xn.className="LinkingTool",xn.Either=_n,xn.ForwardsOnly=Hn,xn.BackwardsOnly=ti;function Kn(){Et.call(this),this.name="Relinking";var a=new gr;a.figure="Diamond",a.desiredSize=Lo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new gr,a.figure="Diamond",a.desiredSize=Lo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new Tn}qe(Kn,Et),Kn.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Xn){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)}},Kn.prototype.makeAdornment=function(a,y){var x=new Qr;return x.type=Zn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Kn.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},Kn.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 Xn))return;this.handle=y,this.isForwards=x===null||x.category==="RelinkTo",this.originalLink=x.adornedPart}this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.originalFromPort=this.originalLink.fromPort,this.originalFromNode=this.originalLink.fromNode,this.originalToPort=this.originalLink.toPort,this.originalToNode=this.originalLink.toNode,this.Ew.set(this.originalLink.actualBounds),this.originalLink!==null&&0<this.originalLink.pointsCount&&(this.originalLink.fromNode===null&&(this.temporaryFromPort!==null&&(this.temporaryFromPort.desiredSize=Vr),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=Vr),this.temporaryToNode!==null&&(this.temporaryToNode.location=this.originalLink.i(this.originalLink.pointsCount-1)))),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode,this.temporaryFromPort,!1),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0),a.add(this.temporaryFromNode),a.add(this.temporaryToNode),this.temporaryLink!==null&&(this.temporaryFromNode!==null&&(this.temporaryLink.fromNode=this.temporaryFromNode),this.temporaryToNode!==null&&(this.temporaryLink.toNode=this.temporaryToNode),this.copyLinkProperties(this.originalLink,this.temporaryLink),this.temporaryLink.bb(),a.add(this.temporaryLink)),this.isActive=!0},Kn.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=rl),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}},Kn.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()},Kn.prototype.doStop=function(){Et.prototype.doStop.call(this),this.handle=null},Kn.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 ii&&(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()}}},Kn.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},Kn.prototype.doNoRelink=function(){};function bi(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)}Xe.Object.defineProperties(Kn.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}}}),Kn.className="RelinkingTool",zn("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),zn("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function Vn(){Ur.call(this),this.name="LinkReshaping";var a=new gr;a.figure="Rectangle",a.desiredSize=rs,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new gr,a.figure="Diamond",a.desiredSize=Lo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new kt,this.Yq=new On}qe(Vn,Ur),Vn.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:ui},Vn.prototype.om=function(a,y){a.reshapingBehavior=y},Vn.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Xn){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)}},Vn.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=Zn.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);on.B(fe.x,_e.x)&&on.B(fe.y,_e.y)&&(_e=y.i(x-1)),on.B(fe.x,_e.x)?(this.om(ae,Di),ae.cursor="n-resize"):on.B(fe.y,_e.y)&&(this.om(ae,Ri),ae.cursor="w-resize")}else ne===te-1&&b?(fe=y.i(te-1),_e=y.i(te),on.B(fe.x,_e.x)&&on.B(fe.y,_e.y)&&(fe=y.i(te+1)),on.B(fe.x,_e.x)?(this.om(ae,Di),ae.cursor="n-resize"):on.B(fe.y,_e.y)&&(this.om(ae,Ri),ae.cursor="w-resize")):ne!==te&&(this.om(ae,Gi),ae.cursor="move");E.add(ae)}E.adornedObject=a}return E},Vn.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},Vn.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},Vn.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},Vn.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 Xn){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}}},Vn.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},Vn.prototype.stopTransaction=function(){var a=this.diagram,y=Ur.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Vn.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},Vn.prototype.getResegmentingPoint=function(){return this.handle.ga(Fr)},Vn.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},Vn.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&&(vi(this,ne,b,E,te,!0)||vi(this,ne,b,E,te,!1))){var ae=y.points.copy();vi(this,ne,b,E,te,!0)?(ae.cd(x-2,new kt(ne.x,(te.y+ne.y)/2)),ae.cd(x+1,new kt(te.x,(te.y+ne.y)/2))):(ae.cd(x-2,new kt((te.x+ne.x)/2,ne.y)),ae.cd(x+1,new kt((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&&(vi(this,b,E,te,ne,!0)||vi(this,b,E,te,ne,!1))&&(ae=y.points.copy(),vi(this,b,E,te,ne,!0)?(ae.cd(x-1,new kt(b.x,(b.y+ne.y)/2)),ae.cd(x+2,new kt(ne.x,(b.y+ne.y)/2))):(ae.cd(x-1,new kt((b.x+ne.x)/2,b.y)),ae.cd(x+2,new kt((b.x+ne.x)/2,ne.y))),ae.mb(x+1),ae.mb(x),y.points=ae,y.Wb())}}else ne=kt.alloc(),on.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()),kt.free(ne)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function vi(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}Vn.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===Di?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===Ri&&(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===Di?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===Ri&&(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);on.B(te.x,E.x)&&on.B(E.y,ne.y)?(on.B(te.x,y.i(b-2).x)&&!on.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),on.B(ne.y,y.i(b+2).y)&&!on.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)):on.B(te.y,E.y)&&on.B(E.x,ne.x)?(on.B(te.y,y.i(b-2).y)&&!on.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),on.B(ne.x,y.i(b+2).x)&&!on.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):on.B(te.x,E.x)&&on.B(E.x,ne.x)?(on.B(te.x,y.i(b-2).x)&&!on.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),on.B(ne.x,y.i(b+2).x)&&!on.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):on.B(te.y,E.y)&&on.B(E.y,ne.y)&&(on.B(te.y,y.i(b-2).y)&&!on.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),on.B(ne.y,y.i(b+2).y)&&!on.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(Fr,kt.alloc()),b=y.getLinkPointFromPoint(b,E,te,a,!0,kt.alloc()),y.L(0,b.x,b.y),kt.free(te),kt.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(Fr,kt.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,kt.alloc()),y.L(y.pointsCount-1,a.x,a.y),kt.free(x),kt.free(a));y.zf()},Vn.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case Gi:return a;case Di:return new kt(y.i(x).x,a.y);case Ri:return new kt(a.x,y.i(x).y);default:case ui:return y.i(x)}},Xe.Object.defineProperties(Vn.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}}}),Vn.prototype.setReshapingBehavior=Vn.prototype.om,Vn.prototype.getReshapingBehavior=Vn.prototype.Ru;var ui=new un(Vn,"None",0),Ri=new un(Vn,"Horizontal",1),Di=new un(Vn,"Vertical",2),Gi=new un(Vn,"All",3);Vn.className="LinkReshapingTool",Vn.None=ui,Vn.Horizontal=Ri,Vn.Vertical=Di,Vn.All=Gi,zn("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function Oi(){Ur.call(this),this.name="Resizing",this.o=new Yn(1,1).freeze(),this.j=new Yn(9999,9999).freeze(),this.yg=new Yn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new gr;a.alignmentFocus=Fr,a.figure="Rectangle",a.desiredSize=rs,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new kt,this.Dw=new Yn,this.Tn=new kt,this.rt=new Yn(0,0),this.qt=new Yn(1/0,1/0),this.pt=new Yn(1,1)}qe(Oi,Ur),Oi.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Xn)){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)}},Oi.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Qr,y.type=Zn.Spot,y.locationSpot=Fr;var x=new il;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,$s)),y.add(this.makeHandle(a,wl)),y.add(this.makeHandle(a,Ta)),y.add(this.makeHandle(a,Aa)),y.add(this.makeHandle(a,bs)),y.add(this.makeHandle(a,Gs)),y.add(this.makeHandle(a,Ws)),y.add(this.makeHandle(a,Ts))}else if(Ru(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Oi.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},Oi.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))e:{var x=a.alignment;if(x.Mc()&&(x=Fr),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 Zn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},Oi.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowResize&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},Oi.prototype.doActivate=function(){var a=this.diagram;this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle!==null&&(this.adornedObject=this.handle.part.adornedObject,this.adornedObject!==null&&(a.isMouseCaptured=!0,a.animationManager.Cc(),this.Ea(this.name),this.Xq.set(this.adornedObject.ga(this.handle.alignment.gv())),this.Tn.set(this.adornedObject.part.location),this.Dw.set(this.adornedObject.desiredSize),this.pt=this.computeCellSize(),this.rt=this.computeMinSize(),this.qt=this.computeMaxSize(),this.isActive=!0))},Oi.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},Oi.prototype.stopTransaction=function(){var a=this.diagram,y=Ur.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Oi.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Oi.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,kt.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),a.bd(),kt.free(E)}},Oi.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,kt.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),kt.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},Oi.prototype.resize=function(a){var y=this.diagram,x=this.adornedObject;if(x!==null){if(x.desiredSize=a.size,a=x.part,a.Va(),x=x.ga(this.handle.alignment.gv()),a instanceof sr){var b=new On;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()}},Oi.prototype.computeResize=function(a,y,x,b,E,te){y.Mc()&&(y=Fr);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=kt.alloc(),on.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))),kt.free(Ve),a},Oi.prototype.computeReshape=function(){var a=jn;return this.adornedObject instanceof gr&&(a=_v(this.adornedObject)),!(a===yi||this.diagram.lastInput.shift)},Oi.prototype.computeMinSize=function(){var a=this.adornedObject.minSize.copy(),y=this.minSize;return!isNaN(y.width)&&y.width>a.width&&(a.width=y.width),!isNaN(y.height)&&y.height>a.height&&(a.height=y.height),a},Oi.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),y=this.maxSize;return!isNaN(y.width)&&y.width<a.width&&(a.width=y.width),!isNaN(y.height)&&y.height<a.height&&(a.height=y.height),a},Oi.prototype.computeCellSize=function(){var a=new Yn(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},Xe.Object.defineProperties(Oi.prototype,{handleArchetype:{get:function(){return this.F},set:function(a){this.F=a}},handle:{get:function(){return this.u},set:function(a){if(a!==null&&!(a.part instanceof 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}}}),Oi.className="ResizingTool",zn("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Ii(){Ur.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new kt,this.ue=null;var a=new gr;a.figure="Ellipse",a.desiredSize=Lo,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new kt(NaN,NaN),this.u=0,this.F=50}qe(Ii,Ur),Ii.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)}},Ii.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new Qr,y.type=Zn.Position,y.locationSpot=Fr;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},Ii.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},Ii.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)},Ii.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(Fr)},Ii.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)},Ii.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new kt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Ii.prototype.stopTransaction=function(){var a=this.diagram,y=Ur.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ii.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Ii.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Ii.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()},Ii.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()}},Ii.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},Xe.Object.defineProperties(Ii.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}}}),Ii.className="RotatingTool",zn("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function cr(){Ur.call(this),this.name="ClickSelecting"}qe(cr,Ur),cr.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},cr.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},cr.className="ClickSelectingTool";function ei(){Ur.call(this),this.name="Action",this.pk=null}qe(ei,Ur),ei.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},ei.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()},ei.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))}},ei.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()},ei.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())},ei.prototype.doStop=function(){this.pk=null},ei.className="ActionTool";function ji(){Ur.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new kt(0,0)}qe(ji,Ur),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 ki)x.Zc()&&(Ru(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);Vt(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var te=kt.allocAt(a.x,a.y);this.isGridSnapEnabled&&Jf(this.diagram,b,a,te),b.location=te,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),kt.free(te)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},Xe.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(){Ur.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new ki;a.layerName="Tool",a.selectable=!1;var y=new gr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}qe(Li,Ur),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=Yn.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),Yn.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 Tn(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),ur?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 On,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)}},Xe.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 Ci(){Ur.call(this),this.name="Panning",this.Xt=new kt,this.xy=new kt,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(bt.document,"scroll",a.Kw,!1),a.stopTool()}}qe(Ci,Ur),Ci.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())},Ci.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(bt.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},Ci.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},Ci.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},Ci.prototype.doMouseMove=function(){this.move()},Ci.prototype.doMouseUp=function(){this.move(),this.stopTool()},Ci.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)}},Xe.Object.defineProperties(Ci.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),Ci.className="PanningTool",zn("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),zn("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),zn("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),zn("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),zn("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}Xe.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 gi(a,y,x){this.text=a,this.hx=y,this.visible=x}gi.className="ContextMenuButtonInfo";function dr(){Ur.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new kt,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}qe(dr,Ur);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=Pn("div");var x=Pn("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=Pn("style");bt.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",bt.document.body&&(bt.document.body.appendChild(y),bt.document.body.appendChild(x)),so=y,es=x,Mo=!0}function Pi(a){return a.preventDefault(),!1}dr.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)},dr.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},dr.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},dr.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof mn||(a instanceof nn?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},dr.prototype.doActivate=function(){},dr.prototype.doMouseDown=function(){if(Ur.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)&&Zi(this)},dr.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())}Zi(this)};function Zi(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())}dr.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 nn?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()}}dr.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},dr.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},dr.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}},dr.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 or(a){var y=new On;return y.add(new gi("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new gi("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new gi("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new gi("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new gi("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new gi("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new gi("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new gi("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new gi("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new gi("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new gi("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new gi("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new gi("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}dr.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=or(this)),so.innerHTML="",es.addEventListener("pointerdown",this.tu,!1);var y=this,x=Pn("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=Pn("li"),te.className="goCXli";var ne=Pn("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",es.style.display="block"},dr.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===So){so.style.display="none",es.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(es,"pointerdown",this.tu,!1),this.currentContextMenu=null}},Xe.Object.defineProperties(dr.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 Mo===!1&&So===null&&gs&&Xi(this),So},set:function(a){a===null&&(Mo=!0),So=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var So=null,Mo=!1,es=null,so=null;dr.className="ContextMenuTool",zn("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function Or(){Ur.call(this),this.name="TextEditing",this.Zh=new Ao,this.ia=null,this.V=Er,this.vj=null,this.qa=Nr,this.u=1,this.F=!0,this.o=null,this.j=new Yi,this.kt=null,Do(this,this.j)}qe(Or,Ur);function Do(a,y){if(gs){var x=Pn("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(Ar)):E==="Tab"?(a.acceptText(Gr),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Nr){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!==Nr){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 Ao&&te instanceof Or)if(te.state===Jr)x.style.border="3px solid red",x.focus();else{var ne=b.ga(Fr),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)}}}Or.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||Cs&&Cs!==this&&(Cs.acceptText(ts),Cs&&Cs!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Ao&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===Er&&!y.isSelected||this.starting===ao&&2>a.lastInput.clickCount)):!1},Or.prototype.doStart=function(){Cs=this,this.textBlock!==null&&this.doActivate()},Or.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 Ao&&(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 Tn(this.textBlock.ga($s),this.textBlock.ga(Ta));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},Or.prototype.doCancel=function(){this.stopTool()},Or.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Or.prototype.doMouseDown=function(){this.isActive&&this.acceptText(ts)},Or.prototype.acceptText=function(a){switch(a){case ts:this.qa===Bo?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===ho||this.qa===Jr||this.qa===Zo)&&(this.qa=Ko,Dr(this));break;case Yr:case Ar:case Gr:(Ar!==a||this.textBlock.isMultiline!==!0)&&(this.qa===ho||this.qa===Jr||this.qa===Zo)&&(this.qa=Ko,Dr(this))}};function Dr(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=Bo,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=Jr,a.doError(E,te))}}Or.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)},Or.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Or.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Nr,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},Or.prototype.doStop=function(){Cs=null},Or.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)))},Or.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Xe.Object.defineProperties(Or.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)}}}),Or.prototype.measureTemporaryTextBlock=Or.prototype.Lx;var Yr=new un(Or,"LostFocus",0),ts=new un(Or,"MouseDown",1),Gr=new un(Or,"Tab",2),Ar=new un(Or,"Enter",3),Xr=new un(Or,"SingleClick",0),Er=new un(Or,"SingleClickSelected",1),ao=new un(Or,"DoubleClick",2),Nr=new un(Or,"StateNone",0),ho=new un(Or,"StateActive",1),Zo=new un(Or,"StateEditing",2),Ko=new un(Or,"StateValidating",3),Jr=new un(Or,"StateInvalid",4),Bo=new un(Or,"StateValidated",5),Cs=null;Or.className="TextEditingTool",Or.LostFocus=Yr,Or.MouseDown=ts,Or.Tab=Gr,Or.Enter=Ar,Or.SingleClick=Xr,Or.SingleClickSelected=Er,Or.DoubleClick=ao,Or.StateNone=Nr,Or.StateActive=ho,Or.StateEditing=Zo,Or.StateValidating=Ko,Or.StateInvalid=Jr,Or.StateValidated=Bo,zn("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function ko(a){Fl||(_l(),Fl=!0),this.H=ac,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=hu,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new In,this.ce=new ds,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)}ko.prototype.Xe=function(a){this.H=a},ko.prototype.canStart=function(){return!0};function Yo(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),ya(a.H),a.zb=!0)}function ys(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===hu?(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===du&&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(),Oa(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==Ka&&b!==null&&(delete b.start.scale,delete b.end.scale),bt.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Ia(x),Bd(x),a.zb=!1,y.start(),y.bc&&(Ss(a),x.Ya(),_c(y,0),pl(x,!0),Es(a),x.R("AnimationStarting",a)))}))}}function Ys(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function Pl(a,y,x,b){a.isTicking||Ys(a)||y instanceof Xn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}rt=ko.prototype,rt.fv=function(a){return this.ce.fv(a)},rt.Xu=function(a){return this.ce.Xu(a)};function Xo(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 nn&&fe.diagram!==null||fe instanceof mn){ae=!0;break e}}ae=!1}ae?Ql(ne,!1):ne.Xk=!0}}E.pu.clear(),E.bc!==!1&&(Ss(E),pl(E.H),Es(E)),bt.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),bt.requestAnimationFrame(function(){x()}))}function Jo(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function Ss(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 Es(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}rt.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(),Oa(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),Oa(y,this.H)},rt.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))},rt.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),ks(this,a))},rt.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),ra(this.ce,y,"position",y.position,y.position),ks(this,a))};function pa(a,y,x){!a.zb||y.D(x)||Ys(a)||(a.H.pi||(y=x.copy()),ra(a.ce,a.H,"position",y,x))}function zo(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function ks(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function Pa(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 kt(te(ne,b.x,E.x-b.x,ae),te(ne,b.y,E.y-b.y,ae))}var y=new hi;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 kt(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 kt(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 kt(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 kt(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 Tn(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=Pa(b,E,ne,ae,te)}),y.add("stroke",function(x,b,E,te,ne,ae){x.stroke=Pa(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=Pa(b,E,ne,ae,te)}),y.add("areaBackground",function(x,b,E,te,ne,ae){x.areaBackground=Pa(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}Xe.Object.defineProperties(ko.prototype,{animationReasons:{get:function(){return this.Zd}},isEnabled:{get:function(){return this.Jd},set:function(a){(this.Jd=a)&&this.Ei.each(function(y){y.isAnimating||y.runCount!==1/0||y.start()})}},duration:{get:function(){return this.Dg},set:function(a){1>a&&Cn(a,">= 1",ko,"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}}}),ko.prototype.stopAnimation=ko.prototype.Cc;var Xl=null,Fl=!1,hu=new un(ko,"Default",1),du=new un(ko,"AnimateLocations",2),Jl=new un(ko,"None",3);ko.className="AnimationManager",ko.defineAnimationEffect=function(a,y){Fl||(_l(),Fl=!0),Xl.add(a,y)},ko.Default=hu,ko.AnimateLocations=du,ko.None=Jl;function ds(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=fu,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Pr,this.vc=new hi,this.Tt=new hi,this.yl=new In,this.Ut=new In,this.dw=Th,a&&Object.assign(this,a)}ds.prototype.suspend=function(){this.Xk=!0},ds.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),Ss(this.Yd),pl(this.H),Es(this.Yd),this.H.redraw()};function Oa(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}rt=ds.prototype,rt.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 mn?a=x:x instanceof nn&&(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===hu&&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),Ss(y),this.yl.each(function(b){b.data=null,a.add(b)}),Es(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Xo(y,this),this)},rt.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},rt.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof mn?this.H=a:a instanceof nn&&a.diagram!==null&&(this.H=a.diagram)),a instanceof ki){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return ra(this,a,y,x,b,E),this};function ra(a,y,x,b,E,te){var ne=a.vc;if(y instanceof mn&&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]=As(b)),_e[x]=As(E)}else fe={},_e={},fe[x]=As(b),_e[x]=As(E),ae=fe.position,y instanceof nn&&ae instanceof kt&&!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 kt&&!ne.w()&&ne.assign(a.o),te&&x.indexOf("position:")===0&&y instanceof ki?ae.Ku.location=As(y.location):te&&(ae.Ku[x]=As(b))}function As(a){return a instanceof kt||a instanceof Yn?a.copy():a}rt.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},rt.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),Ss(x),_c(a,E),pl(a.H,!0),Es(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 nn&&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)}}}rt.stop=function(){return this.bc?(this.Ml(!0),this):this},rt.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,Ss(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 ki&&(ne.location=Te.location),ae.nv&&ne instanceof ki&&ne.Zb(!1)}if(y.As.clear(),nd(y,!1),y.Ya(),y.N(),pl(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()}pl(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Es(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),Oa(this,null),x.Ml(this),y.$b())}},rt.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof sr&&(b=y.placeholder),b!==null?(x=b.ga($s),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new kt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof sr)for(a=a.memberParts;a.next();)b=a.value,b instanceof ii&&this.Cj(b,y)},rt.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof sr&&(x=y.placeholder),x!==null){var b=x.ga($s);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 sr)for(a=a.memberParts;a.next();)b=a.value,b instanceof ii&&this.Aj(b,y)}},rt.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Xe.Object.defineProperties(ds.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Cn(a,">= 1",ds,"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:zt("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}}}),ds.prototype.getTemporaryState=ds.prototype.Ez,ds.prototype.stop=ds.prototype.stop,ds.prototype.add=ds.prototype.add,ds.prototype.addTemporaryPart=ds.prototype.Iy;function fu(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}ds.className="Animation",ds.EaseLinear=function(a,y,x,b){return x*a/b+y},ds.EaseInOutQuad=fu,ds.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},ds.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},ds.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},ds.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 jl(a,y,x){this.xd=null,this.rf=a,this.so=x||Fs,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=va))}jl.prototype.copy=function(){var a=new jl(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 os(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))}Xe.Object.defineProperties(jl.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 Fs=new un(jl,"Default",1),va=new un(jl,"Immediate",2),js=new un(jl,"Bundled",3);jl.className="AnimationTrigger",jl.Default=Fs,jl.Immediate=va,jl.Bundled=js;function ns(a){br(this),this.H=null,this.Pa=new On,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)}rt=ns.prototype,rt.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,Ba(x)}a.clear(),this.Zq.length=0},rt.Xe=function(a){this.H=a},rt.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 sr?E++:fe instanceof ii?b++:fe instanceof Xn?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&&Cr(b)&&(ae+=" #"+Cr(b)),x instanceof ii?ae+=" "+li(b):x instanceof Xn&&(ae+=" "+li(x.fromNode)+" "+li(x.toNode));return y+" "+this.Pa.count+": "+ae},rt.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=kt.alloc(),te=this.Pa.s,ne=te.length;ne--;){var ae=te[ne];if((b!==!0||hd(ae)!==!1)&&ae.isVisible()&&(E.assign(a),Tr(E,ae.oe),ae=ae.ic(E,y,x),ae!==null&&(y!==null&&(ae=y(ae)),ae!==null&&(x===null||x(ae)))))return kt.free(E),ae}return kt.free(E),null},rt.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof On||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=kt.alloc(),ne=this.Pa.s,ae=ne.length;ae--;){var fe=ne[ae];if((E!==!0||hd(fe)!==!1)&&fe.isVisible()){te.assign(a),Tr(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 kt.free(te),b},rt.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 On||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},rt.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},rt.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 On||E instanceof In)&&(te=E),E=!0),te instanceof On||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=kt.alloc(),fe=kt.alloc(),_e=this.Pa.s,Te=_e.length;Te--;){var je=_e[Te];if((ne!==!0||hd(je)!==!1)&&je.isVisible()){ae.assign(a),Tr(ae,je.oe),fe.h(a.x+y,a.y),Tr(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 kt.free(ae),kt.free(fe),te},rt.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=Gn();for(var E=Gn(),te=0;te<b;te++){var ne=x[te];if(ne.vw=te,ne instanceof Xn){if(ne.fd===!1)continue}else if(ne instanceof Qr&&ne.adornedPart!==null)continue;var ae=ne.actualBounds;ne.isVisible()&&Vl(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]);Jn(a),Jn(E)}}};function _a(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}rt.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=_a(this,a);var te=this.Zq;te.length=0;for(var ne=y.scale,ae=Tn.alloc(),fe=0;fe<b;fe++)this.Oj(a,x[fe],y,te,ne,ae,!0);if(Tn.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=_a(a,y),ae=a.Zq;ae.length=0;for(var fe=x.scale,_e=Tn.alloc(),Te=0;Te<te;Te++){var je=E[Te];b.contains(je)&&a.Oj(y,je,x,ae,fe,_e,!1)}Tn.free(_e),y.globalAlpha=ne}}}rt.Oj=function(a,y,x,b,E,te,ne){if(ne&&!hd(y))a.Hs(y);else{if(b!==null&&y instanceof Xn&&(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 zl?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&&(xs(y,a,y.areaBackground,!0,!0,te,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(xs(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),xs(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))}},rt.g=function(a,y,x,b,E){var te=this.diagram;te!==null&&te.cb(Vo,a,this,y,x,b,E)},rt.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&Ba(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},rt.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,Ba(y),a};function Nu(a,y,x){if(y=mf(a,y,x),x instanceof sr&&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}Xe.Object.defineProperties(ns.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===""&&zt("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&zt("Layer.name is already present in this diagram: "+a);for(this.xa=a,this.g("name",y,a),a=this.Pa.iterator;a.next();)a.value.layerName=this.xa}}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&Cn(a,"0 <= value <= 1",ns,"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))}}}),ns.prototype.findObjectsNear=ns.prototype.og,ns.prototype.findObjectsIn=ns.prototype.Cf,ns.prototype.findObjectsAt=ns.prototype.ji,ns.prototype.findObjectAt=ns.prototype.ic,ns.className="Layer";function mn(a,y){if(hm||(Da(),hm=!0),br(this),ac=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,gs){var x=this,b=function(){x.removeEventListener(bt.document,"DOMContentLoaded",b,!1),x.setRTL()};bt.document.body!==null?this.setRTL():x.addEventListener(bt.document,"DOMContentLoaded",b,!1)}this.ol=null,rp.add("Model",po);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 Qo,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"||bt.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 ko,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new On,a.pj=new hi,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new kt(NaN,NaN).freeze(),a.du=new kt(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new kt(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new mr,a.zu=new kt(NaN,NaN).freeze(),a.ut=new Tn(NaN,NaN,NaN,NaN).freeze(),a.rj=new Ei(0,0,0,0).freeze(),a.sj=Th,a.nu=!1,a.Zt=null,a.fu=null,a.yh=Ka,a.zk=ro,a.Fg=Ka,a.pq=ro,a.yt=$s,a.Bt=$s,a.Fc=!0,a.pn=!1,a.De=new In,a.Eh=new hi,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Ei(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new Ca,a.bq.diagram=a,a.Qg=new Ca,a.Qg.diagram=a,a.cj=new Ca,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 hi,a.Xn=new On,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 Ei(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 Yn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new kt,bounds:new Tn,Py:new Yn,bA:new Yn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new Tn(NaN,NaN,NaN,NaN).freeze(),a.wo=new Yn(NaN,NaN).freeze(),a.Sp=new Tn(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new hi;var y=new ii,x=new Ao;x.bind(new zs("text","",li)),y.add(x),a.ny=y,a.Lg.add("",y),y=new ii,x=new Ao,x.stroke="brown",x.bind(new zs("text","",li)),y.add(x),a.Lg.add("Comment",y),y=new ii,y.selectable=!1,y.avoidable=!1,x=new gr,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new Yn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new hi,y=new sr,y.selectionObjectName="GROUPPANEL",y.type=Zn.Vertical,x=new Ao,x.font="bold 12pt sans-serif",x.bind(new zs("text","",li)),y.add(x),x=new Zn(Zn.Auto),x.name="GROUPPANEL";var b=new gr;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new il,b.padding=new Ei(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new hi,y=new Xn,x=new gr,x.isPanelMain=!0,y.add(x),x=new gr,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Xn,x=new gr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Qr,y.type=Zn.Auto,x=new gr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new il,x.margin=new Ei(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new Qr,y.type=Zn.Link,x=new gr,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 po,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=yr,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 kt,a.zy=500,a.wp=new kt,a.wq=!1}mn.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(),Ai=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),te}function oh(){return null}mn.prototype.reset=function(){this.clear(),this.vb=!0,vf(this),Mc(this),this.Wg=!0,id(this),this.layout=new Qo,this.Wg=!1,this.model=hy(),this.model.undoManager=new jo,this.vb=this.rn=!1,this.N()},mn.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=bt.document.body);var y=Pn("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},mn.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=bt.document.body);var y=0;if(gs){var x=cm;y=Bc,x===null&&(x=cm=Pn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Bc=Pn("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||ur||(y=11)}this.Db=y,this.Gw=!0},mn.prototype.qb=function(a){a.classType===mn&&(this.autoScale=a)},mn.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(gs){if(y!=null||zt("Diagram setup requires an argument DIV."),a.Ka!==null&&zt("Diagram has already completed setup."),typeof y=="string"?a.Ka=bt.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:zt("No DIV or DIV id supplied: "+y),a.Ka===null&&zt("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&zt("Invalid div id; div already has a Diagram associated with it."),!a.ol&&bt.ResizeObserver){var x=En(function(){a.$b()},250);a.ol=new bt.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}bt.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=bt.go;var E=new Du(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",bt.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,gs){E=Pn("div");var te=Pn("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=En(function(){a.Yh=null,a.N()},300),a.Ov=En(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=bt.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=bt.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 mn&&_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)}}mn.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},mn.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(bt,"resize",a.Ov,!1)}function Ia(a){30<a.Sq&&(a.Yh=1)}function nd(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),Wi&&Wi.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}mn.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:bt.devicePixelRatio||1},mn.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},mn.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},mn.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},mn.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},mn.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},mn.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},mn.prototype.doFocus=function(){this.focus()},mn.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=bt.scrollX||bt.pageXOffset,y=bt.scrollY||bt.pageYOffset;this.ta.focus(),bt.scrollTo(a,y)}},mn.prototype.Oy=function(){this.H.R("GainedFocus")},mn.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===Ka&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function id(a){var y=new ns;y.name="Background",a.Al(y),y=new ns,y.name="",a.Al(y),y=new ns,y.name="Foreground",a.Al(y),y=new ns,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new ns,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new ns,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 Zn(Zn.Grid);y.name="GRID";var x=new gr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new gr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new gr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new gr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new gr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new gr,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new ki,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)}mn.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,it=E.right,ct=E.bottom;E=this.scale;var It=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":It=It+a.scrollWidth-a.clientWidth;break;case"reverse":It=a.scrollWidth-It-a.clientWidth}var Mt=It;Ve<fe||Qe<_e?(It=kt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Mt&&(It.x=Mt/E+ne,this.ju=Mt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(It.y=a.scrollTop/E+ae,this.lu=a.scrollTop),this.position=It,kt.free(It),this.Ee=this.qr=!1):(It=kt.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<je&&(this.position=It.h(Mt+ne,this.position.y)),Te>it&&(this.position=It.h(-(y.scrollWidth-this.Aa)+Mt-this.Aa/E+Te,this.position.y))),a.vy&&this.allowVerticalScroll&&(ae<b&&(this.position=It.h(this.position.x,a.scrollTop+ae)),te>ct&&(this.position=It.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+te))),kt.free(It),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,Te=b.right,it=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<=it&&(x.style.width="1px"),Qe>=_e&&ae>=b&&te<=ct&&(x.style.height="1px"))}},mn.prototype.computeBounds=function(a){return a===void 0&&(a=new Tn),ya(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}mn.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(an(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof Xn||(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 Xn||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new Tn(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=kt.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=Tn.allocAt(0,0,b.width,b.height);var E=kt.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,Tn.free(b),kt.free(E),kt.free(x)}x=a.yh,y&&a.Fg!==Ka&&(x=a.Fg);var te=x!==Ka?_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()?Fr:fe),xf(a,a.documentBounds,E,ne,ae,y),y=a.scale,a.scale=te,a.vb=!1,te=a.viewportBounds,on.B(te.x,x)&&on.B(te.y,b)&&on.B(te.width,E)&&on.B(te.height,ne)||a.onViewportBoundsChanged(new Tn(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}mn.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},rt=mn.prototype,rt.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 kt(a.x,a.y)}},rt.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new kt(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))},rt.zz=function(a){if(a instanceof nn){this.eq=a;var y=kt.alloc();this.fq=this.op(a.ga($s,y)),kt.free(y)}else this.eq=null,this.fq=yr};function xf(a,y,x,b,E,te){var ne=kt.allocAt(a.pa.x,a.pa.y),ae=ne.x,fe=ne.y;if(a.eq!==null){var _e=kt.alloc();_e=a.eq.ga($s,_e),ae=_e.x-a.fq.x/a.scale,fe=_e.y-a.fq.y/a.scale,E=fs,kt.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),pa(a.Yd,a.pa,ne),a.pa.h(ne.x,ne.y),Mc(a),kt.free(ne)}rt.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 ki)return a}else if(a=Ku(this,a,function(x){return x.part}),a instanceof ki)return a;return null},rt.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),ya(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),ya(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}rt.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 ki&&b.canSelect()}:null,x)};function Fc(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof On||E instanceof In||(E=new In),ya(a),a=a.Wa.iteratorBackwards;a.next();){var te=a.value;te.visible&&!te.isTemporary&&te.ji(y,x,b,E)}return E}rt.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof On||b instanceof In||(b=new In),ya(this);for(var E=this.Wa.iteratorBackwards;E.next();){var te=E.value;te.visible&&te.ji(a,y,x,b)}return b},rt.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 ki&&(!x||E.canSelect())},y,b)},rt.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof On||E instanceof In||(E=new In),ya(this);for(var te=this.Wa.iteratorBackwards;te.next();){var ne=te.value;ne.visible&&ne.Cf(a,y,x,b,E)}return E},rt.Nu=function(a,y,x,b,E,te){var ne=new In;ya(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 On||E instanceof In||(E=new In),ya(a),a=a.Wa.iteratorBackwards;a.next();){var ne=a.value;ne.visible&&!ne.isTemporary&&ne.Cf(y,te,x,b,E)}return E}rt.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 ki&&(!b||te.canSelect())},x,E)},rt.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 On||E instanceof In)&&(te=E),E=!0),te instanceof On||te instanceof In||(te=new In),ya(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 On||E instanceof In)&&(te=E),E=!0),te instanceof On||te instanceof In||(te=new In),ya(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}mn.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),ur&&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,ur&&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)}mn.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)},mn.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)},mn.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)},mn.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)},mn.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new kt(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?Tr(new kt(y,a),this.Ab):new kt(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=kt.allocAt(ne,ae),a.Ab.Cd(y),x.documentPoint.assign(y),kt.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))}}mn.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function Ud(a){a.ld||ya(a),a.Va()}mn.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},rt=mn.prototype,rt.Pz=function(){return this.kg},rt.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,pl(this),this.hf=!1,this.du=new kt(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&Un(function(){b.ld=!1,Yo(y,"Model"),a(b)},1)},rt.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;bt.requestAnimationFrame(function(){y.kg&&y.bd()})}},rt.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),pl(this))};function jc(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||zc(a)||(y&&ya(a),x&&ql(a,!1))}function pl(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];Js(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)),ya(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,ya(a),a.ou||Ud(a),jc(a,!0,!1),ne=!1,te?(x=Tn.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),Tn.free(x)):x.Ok&&x.Qw&&(a.Fg!==Ka?a.scale=_h(a,a.Fg):a.yh!==Ka?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"),ya(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function Gd(a){if(a.Fg!==Ka)a.scale=_h(a,a.Fg);else if(a.yh!==Ka)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 ya(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 sr&&b.U&65536&&(b.U=b.U^65536)})}}rt.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof sr||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof sr&&x.isVisible()&&cs(this,x);for(a.reset();a.next();)x=a.value,x instanceof Xn&&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 cs(a,y){for(var x=Gn(),b=Gn(),E=y.memberParts;E.next();){var te=E.value;te.isVisible()&&(te instanceof sr?(iu(te)||tl(te)||cd(te))&&cs(a,te):te instanceof Xn?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(Jn(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();Jn(b)}rt.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},rt.gc=function(a){if(this.Ka!==null){if(this.ta===null&&zt("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){gu(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),Za(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&&(mr.prototype.Cd=mr.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(te=this.animationManager,!te.zb&&(!te.isAnimating||te.isTicking)&&(x=new Date,gu(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),Za(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&&(mr.prototype.Cd=mr.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=Wi&&Wi.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 Vs(a,y,x,b,E,te,ne,ae,fe,_e){if(a.Ka!==null){a.ta===null&&zt("No canvas specified"),ne===void 0&&(ne=null),ae===void 0&&(ae=null),fe===void 0&&(fe=!1),_e===void 0&&(_e=!1),gu(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 Tn(te.x,te.y,b.width/E,b.height/E),it=Qe.copy();it.Co(x),Lc(a,it),ya(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 It=mr.alloc();It.reset(),It.translate(x.left,x.top),It.scale(E),te.x===0&&te.y===0||It.translate(-te.x,-te.y),y.setTransform(It.m11,It.m12,It.m21,It.m22,It.dx,It.dy),y.yc(),y instanceof zl&&Yy(y,It.m11,It.m12,It.m21,It.m22,It.dx,It.dy),mr.free(It),Za(a,y),y.globalAlpha=a.pb;var Mt=a.Qj("Grid");if(ne){var Gt=new In,Zt=ne.iterator;for(Zt.reset();Zt.next();){var $t=Zt.value;$t instanceof ki&&(_e||$t.layer!==Mt)&&($t.Gj(),Gt.add($t))}for(_e=0;_e<Ve;_e++)El(je[_e],y,a,Gt,fe);Gt.each(function(vn){return vn.Gj()})}else for(Gt=0;Gt<Ve;Gt++){var en=je[Gt];en===Mt?_e&&en.gc(y,a,!0):en.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 zl&&(a.ib.Nj.PA(),a.redraw())}}}rt.Gf=function(a){return this.Rg[a]},rt.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},rt.Tx=function(){this.Rg=new fi,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(ur||Hi),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function Za(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}rt.Ql=function(a){return this.on[a]},rt.sA=function(a,y){this.on[a]=y},rt.Sx=function(){this.on=new fi,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},rt.set=function(a){return Object.assign(this,a),this},rt.Du=function(a){return this.nm(a)},rt.nm=function(a){return pu(this,a),this};function pu(a,y){var x=a instanceof Zn,b=a instanceof mn,E;for(E in y){E===""&&zt("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])),Vt(te)?ne=E.substr(ae+1):zt("Unable to find object named: "+fe+" in "+a.toString()+" when trying to set property: "+E)}}if(ne[0]!=="_"&&!Mi(te,ne))if(b&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(b&&ne==="Changed"){a.Pe(y[ne]);continue}else if(b&&Mi(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 zt('Trying to set undefined property "'+ne+'" on object: '+te.toString());te[ne]=y[E],ne[0]==="_"&&te instanceof nn&&te.Vw(ne)}}rt.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new hi,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},rt.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")},mn.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=Tn.alloc(),Qp(this,this.computeBounds(b)),Tn.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=Gn(),a=Gn(),Qe=Math.abs(te),Ve=Math.abs(y);var it=Te===0?0:E-Qe;Te=kt.allocAt(it,0),Qe=kt.allocAt(Qe+it,ae),a.push(new Tn(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),Tr(Te,ct),Tr(Qe,ct),b.push(new Tn(Math.min(Te.x,Qe.x),Math.min(Te.y,Qe.y),Math.abs(Te.x-Qe.x),Math.abs(Te.y-Qe.y))),it=je===0?0:ae-Ve,Te.h(0,it),Qe.h(E,Ve+it),a.push(new Tn(Math.min(Te.x,Qe.x),Math.min(Te.y,Qe.y),Math.abs(Te.x-Qe.x),Math.abs(Te.y-Qe.y))),Tr(Te,ct),Tr(Qe,ct),b.push(new Tn(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 Tn(Math.min(Te.x,Qe.x),Math.min(Te.y,Qe.y),Math.abs(Te.x-Qe.x),Math.abs(Te.y-Qe.y))),Tr(Te,ct),Tr(Qe,ct),b.push(new Tn(Math.min(Te.x,Qe.x),Math.min(Te.y,Qe.y),Math.abs(Te.x-Qe.x),Math.abs(Te.y-Qe.y)))),kt.free(Te),kt.free(Qe),jc(this,!1,!0),this.Ka===null&&zt("No div specified"),this.ta===null&&zt("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(gu(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),Za(this,E),E.globalAlpha=this.pb,ae=0;ae<te;ae++)if(ne=y[ae],fe=b,ne.visible&&ne.pb!==0){_e=_a(ne,E),je=ne.Zq,je.length=0,Te=this.scale,Ve=Tn.alloc(),Qe=ne.Pa.s,ct=Qe.length,it=fe.length;for(var It=0;It<ct;It++){var Mt=Qe[It],Gt=nf(Mt,Mt.actualBounds);e:{for(var Zt=2/Te,$t=4/Te,en=0;en<it;en++){var vn=fe[en];if(vn.width!==0&&vn.height!==0&&Gt.Vu(vn.x-Zt,vn.y-Zt,vn.width+$t,vn.height+$t)){Gt=!0;break e}}Gt=!1}Gt&&ne.Oj(E,Mt,this,je,Te,Ve,!0)}Tn.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()}Jn(b),Jn(a),this.ld=!1}}else this.bd();x&&(Ia(this),this.bd(),nd(this,!0))}else x?(Ia(this),this.bd(),nd(this,!0)):this.bd()}};function gu(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 it=a.ku,ct=a.hu;if(a.Ee=!1,!(te||a.gf||a.Be||a.mn||a.nn))return!0;var It=a.documentBounds,Mt=0,Gt=0,Zt=0,$t=0,en=Te.width,vn=Te.height,ni=a.rj;a.contentAlignment.sb()?(It.width>en&&(Mt=ni.left,Gt=ni.right),It.height>vn&&(Zt=ni.top,$t=ni.bottom)):(Mt=ni.left,Gt=ni.right,Zt=ni.top,$t=ni.bottom);var pi=It.width+Mt+Gt,ci=It.height+Zt+$t;ni=a.scale;var $n=pi>fe/ni,Dn=ci>_e/ni;if(!(te||a.gf||a.Be||$n||Dn))return!0;Mt=It.x-Mt,fe=Te.x,Gt=It.right+Gt,_e=Te.right+ne,Zt=It.y-Zt;var nr=Te.y;It=It.bottom+$t,Te=Te.bottom+ae;var Vi="1px";if($t="1px",a.scrollMode===Th&&($n||Dn)&&($n&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&($n=1,Mt+1<fe&&($n=Math.max((fe-Mt)*ni+a.Aa,$n)),Gt>_e+1&&($n=Math.max((Gt-_e)*ni+a.Aa,$n)),en+ne+1<pi&&($n=Math.max((pi-en)*ni+a.Aa,$n)),Vi=$n.toString()+"px"),Dn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&($n=1,Zt+1<nr&&($n=Math.max((nr-Zt)*ni+a.ya,$n)),It>Te+1&&($n=Math.max((It-Te)*ni+a.ya,$n)),vn+ae+1<ci&&($n=Math.max((ci-vn)*ni+a.ya,$n)),$t=$n.toString()+"px")),$n=Vi!=="1px",Dn=$t!=="1px",$n&&Dn||!$n&&!Dn||(Dn&&(_e-=a.Db),$n&&(Te-=a.Db),pi<en+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,Mt+1<fe&&(ne=Math.max((fe-Mt)*ni+a.Aa,ne)),Gt>_e+1&&(ne=Math.max((Gt-_e)*ni+a.Aa,ne)),en+1<pi&&(ne=Math.max((pi-en)*ni+a.Aa,ne)),Vi=ne.toString()+"px"),$n=Vi!=="1px",ne=a.ya,$n!==a.Be&&(ne=$n?a.ya-a.Db:a.ya+a.Db),ci<vn+ae||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(ae=1,Zt+1<nr&&(ae=Math.max((nr-Zt)*ni+ne,ae)),It>Te+1&&(ae=Math.max((It-Te)*ni+ne,ae)),vn+1<ci&&(ae=Math.max((ci-vn)*ni+ne,ae)),$t=ae.toString()+"px"),Dn=$t!=="1px"),a.qr&&$n===a.Be&&Dn===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if($n!==a.Be&&(Vi==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),te=!0),a.Be=$n,ct.style.width=Vi,Dn!==a.gf&&($t==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),te=!0,a.tn&&(ae=kt.alloc(),Dn?(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)),kt.free(ae))),te&&Mc(a),a.gf=Dn,ct.style.height=$t,a.gu=!0,te&&(a.pn=!0),y=it.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(en+1<pi?y=(a.position.x-Mt)*ni:Mt+1<fe?y=it.scrollWidth-it.clientWidth:Gt>_e+1&&(y=a.position.x*ni)),a.tn)switch(a.bu){case"negative":y=-(it.scrollWidth-y-it.clientWidth);break;case"reverse":y=it.scrollWidth-y-it.clientWidth}return it.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(vn+1<ci?it.scrollTop=(a.position.y-Zt)*ni:Zt+1<nr?it.scrollTop=it.scrollHeight-it.clientHeight:It>Te+1&&(it.scrollTop=a.position.y*ni)),fe=a.Aa,_e=a.ya,it.style.width=fe+(a.gf?a.Db:0)+"px",it.style.height=_e+(a.Be?a.Db:0)+"px",x!==fe||b!==_e||a.animationManager.zb?(x=Tn.allocAt(E,je,Ve,Qe),a.onViewportBoundsChanged(x,a.viewportBounds,ni,te),Tn.free(x),!1):!0}rt=mn.prototype,rt.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&zt("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&&zt('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(ps,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},rt.oi=function(a){this.partManager.oi(a);var y=this;qd(a,function(x){Zd(y,x)}),(a instanceof Qr||a instanceof sr&&a.placeholder!==null)&&a.v(),a.data!==null&&qd(a,function(x){ly(y.partManager,x)}),tl(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()},rt.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()},rt.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(us,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}rt.Is=function(a,y){if(y===void 0&&(y=!1),an(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)},rt.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},mn.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 hi;if(a!==null)if(an(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 ii){if(y.add(x,a.Pd(E,x,x.location)),x instanceof sr&&(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 Xn)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=kt.alloc(),ne=kt.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=Gn(),fe=Gn(),_e=y.iterator,Te=kt.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 kt),Ve.shifted.assign(Te.re(Qe)))}else _e.key instanceof Xn&&fe.push(_e.sa)}for(kt.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 kt),je.node.location=te.add(je.Su.shifted);for(E=kt.alloc(),_e=kt.alloc(),je=fe.length,Ve=0;Ve<je;Ve++){var it=fe[Ve];if(Qe=it.key,Qe instanceof Xn)if(Qe.suspendsRouting){Qe.Tg=null,Te=Qe.fromNode;var ct=Qe.toNode;if(a.draggedLink!==null&&b.dragsLink)if(ct=it.value.point,Qe.dragComputation===null)y.add(Qe,a.Pd(b,Qe,ne)),Bh(Qe,ne.x-ct.x,ne.y-ct.y);else{it=kt.allocAt(0,0),(Te=Qe.i(0))&&Te.w()&&it.assign(Te);var It=Te=kt.alloc().assign(it).add(ne);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(It=kt.alloc(),Jf(a,Qe,Te,It,b)),Te.assign(Qe.dragComputation(Qe,Te,It)).re(it),y.add(Qe,a.Pd(b,Qe,Te)),Bh(Qe,Te.x-ct.x,Te.y-ct.y),kt.free(it),kt.free(Te),It!==Te&&kt.free(It)}else Te!==null&&(E.assign(Te.location),It=y.I(Te),It!==null&&E.re(It.point)),ct!==null&&(_e.assign(ct.location),It=y.I(ct),It!==null&&_e.re(It.point)),Te!==null&&ct!==null?E.Xa(_e)?(Te=it.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()):(it=it.value.point,Te=Te!==null?E:ct!==null?_e:ne,y.add(Qe,a.Pd(b,Qe,Te)),Bh(Qe,Te.x-it.x,Te.y-it.y))}else(Qe.fromNode===null||Qe.toNode===null)&&(Te=it.value.point,y.add(Qe,a.Pd(b,Qe,ne)),Bh(Qe,ne.x-Te.x,ne.y-Te.y))}kt.free(te),kt.free(ne),kt.free(E),kt.free(_e),Jn(ae),Jn(fe),x||(ya(a),od(a,y))}}mn.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new kt),b.assign(y),a===null)return b;var E=y,te=x.isGridSnapEnabled;te&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=kt.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&&kt.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=kt.allocAt(0,0),te.yi(0,0,a,y,E),on.No(x.x,x.y,ae+te.x,ne+te.y,a,y,b),kt.free(te)}}function Qf(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Xn&&(y.suspendsRouting=!0)}function od(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Xn&&(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}rt=mn.prototype,rt.Pd=function(a,y,x){if(x===void 0)return new ah(Pr);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new ah(new kt(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&&zt("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&zt("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&zt("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&zt("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&&zt("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}rt.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(ps,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},rt.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(us,"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(ps,"layers",this,null,a,null,te),this.N(),0>b&&this.Ya(),this},rt.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(us,"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(ps,"layers",this,null,a,null,te+1),this.N(),0>b&&this.Ya(),this},rt.kA=function(a){if(a.diagram!==this&&zt("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(us,"layers",this,a,null,x,null),this.N(),this.Ya()}}},rt.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},rt.Yw=function(a){return this.pf===null&&(this.pf=new On),this.pf.add(a),this.model.Pe(a),this},rt.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},rt.Pe=function(a){return this.zg===null&&(this.zg=new On),this.zg.add(a),this},rt.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},rt.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==Wa&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},rt.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)},rt.g=function(a,y,x,b,E){this.cb(Vo,a,this,y,x,b,E)},mn.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 nn){var te=E.part;te!==null&&te.Wb()}this.isModified=!0}else if(b===ps){var ne=a.object,ae=a.newParam,fe=a.newValue;if(ne instanceof Zn)if(typeof ae=="number"&&fe instanceof nn){y?ne.pc(ae):ne.Gb(ae,fe);var _e=ne.part;_e!==null&&_e.Wb()}else typeof ae=="number"&&fe instanceof Qs&&(fe.isRow?h1(ne,ae,y?void 0:fe):d1(ne,ae,y?void 0:fe));else if(ne instanceof ns){var Te=a.oldParam===!0;typeof ae=="number"&&fe instanceof ki&&(y?(fe.isSelected=!1,fe.isHighlighted=!1,fe.Wb(),ne.pc(Te?ae:-1,fe,Te)):ne.oi(ae,fe,Te))}else ne instanceof mn?typeof ae=="number"&&fe instanceof ns&&(y?this.Wa.mb(ae):(fe.Xe(this),this.Wa.Gb(ae,fe))):zt("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===us){var je=a.object,Ve=a.oldParam,Qe=a.oldValue;if(je instanceof Zn)typeof Ve=="number"&&Qe instanceof nn?y?je.Gb(Ve,Qe):je.pc(Ve):typeof Ve=="number"&&Qe instanceof Qs&&(Qe.isRow?h1(je,Ve,y?Qe:void 0):d1(je,Ve,y?Qe:void 0));else if(je instanceof ns){var it=a.newParam===!0;typeof Ve=="number"&&Qe instanceof ki&&(y?0>je.Pa.indexOf(Qe)&&je.oi(Ve,Qe,it):(Qe.isSelected=!1,Qe.isHighlighted=!1,Qe.Wb(),je.pc(it?Ve:-1,Qe,it)))}else je instanceof mn?typeof Ve=="number"&&Qe instanceof ns&&(y?(Qe.Xe(this),this.Wa.Gb(Ve,Qe)):this.Wa.mb(Ve)):zt("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==Wa&&zt("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},mn.prototype.Ea=function(a){return this.undoManager.Ea(a)},mn.prototype.eb=function(a){return this.undoManager.eb(a)},mn.prototype.Kf=function(){return this.undoManager.Kf()},mn.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}},mn.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},mn.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&&(Ys(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(Ua)&&(ae=te-1):ae=_e.sb()?_e.x*(te-1):te/2),isNaN(fe)&&(_e.$c()?_e.Hf($l)?fe=0:_e.Hf(Ga)&&(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=kt.allocAt(a.pa.x+ae/y-ae/x,a.pa.y+fe/y-fe/x),a.position=te,kt.free(te),a.Ca=x,Mc(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),ql(a,!1),b.zb&&(Ys(b)||b.ce.add(b.H,"scale",y,a.Ca))}}mn.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!==Ka||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=Yn.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/on.vx(te,Te):E=E*Te/on.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=Tn.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){Tn.free(y);return}E=y.width,te=y.height,a=y.x,ne=y.y,Tn.free(y)}x.width=E+2*b.width,x.height=te+2*b.height,y=kt.alloc(),on.No(a,ne,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),Yn.free(b),x.part.location=y,kt.free(y)}}mn.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)}},mn.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))},mn.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),an(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof ki||zt("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 ki||zt("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},mn.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()}},rt=mn.prototype,rt.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},rt.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 ki||zt("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},rt.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,te=kt.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)),kt.free(te);return}zt("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):zt("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),kt.free(te)},rt.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)},rt.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},rt.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)},rt.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 Tn(te,Qe,Ve-te,y-Qe)},rt.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),Tr(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 po}mn.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===Wa&&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===Wa){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),ya(this));var te=this.animationManager;b==="RolledBackTransaction"&&te.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||ys(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(),Jo(this.animationManager)),!this.Rt&&ne&&this.lastInput.targetDiagram){this.Rt=!0;var ae=this;Un(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 yl){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 yl){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}}}}}mn.prototype.Wd=function(){this.partManager.Wd()},mn.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},mn.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},mn.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},mn.prototype.Vb=function(a){return this.partManager.Vb(a)},mn.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},rt=mn.prototype,rt.Lc=function(a){return this.partManager.Lc(a)},rt.ii=function(a){return this.partManager.ii(a)},rt.Kc=function(a){return this.partManager.Kc(a)},rt.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:vo(hr(y)))},rt.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:vo(hr(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())}rt.Va=function(){if(this.Zi){var a=Tn.alloc();Qp(this,this.computeBounds(a)),Tn.free(a)}},rt.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},rt.qz=function(){return this.ai.iterator},rt.Uz=function(a){ya(this),a&&qf(this,!0),this.ld?qp(this,!1):(this.Jk=!0,pl(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||Yo(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),ya(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||ys(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),cs(a,y),E.isValidLayout=!0):a.xh=!0)}}rt.yz=function(){for(var a=new On,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 On;x.add(E,ne),x.add(te,ne),b.add(E,E),b.add(te,E)}var x=new hi,b=new hi;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;zt("Unknown DiagramEvent name: "+y)}rt.Bj=function(a,y){return a=ep(this,a),a!==null&&a.add(y),this},rt.am=function(a,y){a=ep(this,a),a!==null&&a.remove(y)},rt.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}rt.Yj=function(a,y){return np(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},mn.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=Tn.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)}Tn.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=Tn.alloc(),te=x.memberParts;te.next();)ne=te.value,ne instanceof ii&&ip(a,ne,b,y);Tn.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 sr)for(y=y.memberParts;y.next();)E=y.value,E instanceof ii&&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)}mn.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=Un(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=Tn.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Qp(a,y),Tn.free(y),a.Fc=!0,a.bd(),tg(a))}},a.vp))}mn.prototype.ug=function(){this.vk!==-1&&(bt.clearTimeout(this.vk),this.vk=-1)},mn.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=Tn.allocAt(0,0,b.width*E,b.height*E);var te=kt.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(Pr)||(y=new kt(y.x+te.x/E,y.y+te.y/E)),Tn.free(b),kt.free(te),y},rt=mn.prototype,rt.Cs=function(){return null},rt.av=function(){return null},rt.bs=function(a,y){this.pj.add(a,y)},rt.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof sr&&(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):bt.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 bt.requestAnimationFrame(function(){b()}),null}rt.Wz=function(a){return gs?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},rt.Jx=function(a){return a===void 0&&(a={}),wf(this,this.Xz,a)},rt.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"&&zt('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"&&zt("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 Yn(1/0,1/0):new Yn(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,it=y.showTemporary;it===void 0&&(it=!je),y=y.showGrid,y===void 0&&(y=it),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof _e=="number"?_e=new Ei(_e):_e instanceof Ei||zt("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,Vs(a,b.context,_e,new Yn(je.width,je.height),a.Ca,a.pa,fe,Te,it,y),b.context):(a.Xm=!1,Vs(a,ct,_e,new Yn(je.width,je.height),a.Ca,a.pa,fe,Te,it,y),a.Xm=!0,je.context);var It=a.Pp,Mt=a.documentBounds.copy();if(Mt.Fv(a.yb),it)for(var Gt=a.Wa.s,Zt=Gt.length,$t=0;$t<Zt;$t++){var en=Gt[$t];if(en.visible&&en.isTemporary){en=en.Pa.s;for(var vn=en.length,ni=0;ni<vn;ni++){var pi=en[ni];pi.isInDocumentBounds&&pi.isVisible()&&(pi=pi.actualBounds,pi.w()&&Mt.ed(pi))}}}if(Gt=new kt(Mt.x,Mt.y),fe!==null){for(Zt=new Tn(0,0,0,0),$t=!0,en=fe.iterator,en.reset();en.next();)vn=en.value,vn instanceof ki&&(ni=vn.layer,ni!==null&&!ni.visible||ni!==null&&!it&&ni.isTemporary||!vn.isVisible()||(vn=vn.actualBounds,vn.w()&&($t?($t=!1,Zt.assign(vn)):Zt.ed(vn))));Mt.width=Zt.width,Mt.height=Zt.height,Gt.x=Zt.x,Gt.y=Zt.y}return ae!==null&&ae.w()&&(Gt=ae,te||(te=It)),Zt=ae=0,_e!==null&&(ae=_e.left+_e.right,Zt=_e.top+_e.bottom),$t=en=0,E!==null&&(en=E.width,$t=E.height,isFinite(en)&&(en=Math.max(0,en-ae)),isFinite($t)&&($t=Math.max(0,$t-Zt))),E!==null&&te!==null?(te==="NaN"&&(te=It),E.w()?(E=en,Mt=$t):isNaN($t)?(E=en,Mt=Mt.height*te):(E=Mt.width*te,Mt=$t)):E!==null?E.w()?(te=Math.min(en/Mt.width,$t/Mt.height),E=en,Mt=$t):isNaN($t)?(te=en/Mt.width,E=en,Mt=Mt.height*te):(te=$t/Mt.height,E=Mt.width*te,Mt=$t):te!==null?te==="NaN"&&ne.w()?(te=Math.min((ne.width-ae)/Mt.width,(ne.height-Zt)/Mt.height),te>It?(te=It,E=Mt.width,Mt=Mt.height):(E=ne.width,Mt=ne.height)):(E=Mt.width*te,Mt=Mt.height*te):(te=It,E=Mt.width,Mt=Mt.height),_e!==null?(E+=ae,Mt+=Zt):_e=new Ei(0),ne!==null&&(It=ne.width,ne=ne.height,isNaN(It)&&(It=2e3),isNaN(ne)&&(ne=2e3),isFinite(It)&&(E=Math.min(E,It)),isFinite(ne)&&(Mt=Math.min(Mt,ne))),je.width=Math.ceil(E),je.height=Math.ceil(Mt),x==="SVG"?b===null?null:(b.resize(je.width,je.height,je.width,je.height),b.ownerDocument=Ve,b.hs=Qe,Vs(a,b.context,_e,new Yn(Math.ceil(E),Math.ceil(Mt)),te,Gt,fe,Te,it,y),b.context):(a.Xm=!1,Vs(a,ct,_e,new Yn(Math.ceil(E),Math.ceil(Mt)),te,Gt,fe,Te,it,y),a.Xm=!0,je.context)}Xe.Object.defineProperties(mn.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,bt.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,bt.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(bt,"resize",this.Ov,!1),this.removeEventListener(bt,"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)&&Cn(a,"0 <= value <= 1",mn,"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&&Cn(a,">= 0",mn,"scrollHorizontalLineChange"),this.iu=a,this.g("scrollHorizontalLineChange",y,a))}},scrollVerticalLineChange:{get:function(){return this.mu},set:function(a){var y=this.mu;y!==a&&(0>a&&Cn(a,">= 0",mn,"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 Cn(a,">= 0",mn,"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&&zt("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,Yo(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(bt,"pointermove",this.dk,!0),this.addEventListener(bt,"pointerdown",this.ui,!0),this.addEventListener(bt,"pointerup",this.fk,!0),this.addEventListener(bt,"pointerout",this.ek,!0),this.addEventListener(bt,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(bt,"wheel",this.$j,!0),this.addEventListener(bt,"selectstart",this.preventDefault,!1)):(this.removeEventListener(bt,"pointermove",this.dk,!0),this.removeEventListener(bt,"pointerdown",this.ui,!0),this.removeEventListener(bt,"pointerup",this.fk,!0),this.removeEventListener(bt,"pointerout",this.ek,!0),this.removeEventListener(bt,"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(bt,"wheel",this.$j,!0),this.removeEventListener(bt,"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=kt.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),pa(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)}kt.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!==Zn.Grid&&zt("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||zt("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 Ei(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!==Ka&&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()||zt("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()||zt("initialViewportSpot must be a specific Spot: "+a),this.yt=a,this.g("initialDocumentSpot",y,a))}},minScale:{get:function(){return this.Ot},set:function(a){var y=this.Ot;y!==a&&(0<a?(this.Ot=a,this.g("minScale",y,a),a>this.scale&&(this.scale=a)):Cn(a,"> 0",mn,"minScale"))}},maxScale:{get:function(){return this.Mt},set:function(a){var y=this.Mt;y!==a&&(0<a?(this.Mt=a,this.g("maxScale",y,a),a<this.scale&&(this.scale=a)):Cn(a,"> 0",mn,"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 Ei(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&&zt("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!==Xs&&a!==op&&zt("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 Yn(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 Ei(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Xe.Object.defineProperties(mn,{licenseKey:{get:function(){return ag.jc()},set:function(a){ag.add(a.replace(/\s/g,""))}},version:{get:function(){return Vd}}}),mn.prototype.makeImageData=mn.prototype.Jx,mn.prototype.makeImage=mn.prototype.Wz,mn.prototype.cacheGroupExternalLinks=mn.prototype.Fu,mn.prototype.addRenderer=mn.prototype.bs,mn.prototype.makeSVG=mn.prototype.av,mn.prototype.makeSvg=mn.prototype.Cs,mn.prototype.stopAutoScroll=mn.prototype.ug,mn.prototype.doAutoScroll=mn.prototype.gs,mn.prototype.isUnoccupied=mn.prototype.Yj,mn.prototype.raiseDiagramEvent=mn.prototype.R,mn.prototype.removeDiagramListener=mn.prototype.am,mn.prototype.addDiagramListener=mn.prototype.Bj,mn.prototype.findTreeRoots=mn.prototype.yz,mn.prototype.layoutDiagram=mn.prototype.Uz,mn.prototype.findTopLevelGroups=mn.prototype.qz,mn.prototype.findTopLevelNodesAndLinks=mn.prototype.rz,mn.prototype.ensureBounds=mn.prototype.Va,mn.prototype.findLinksByExample=mn.prototype.ls,mn.prototype.findNodesByExample=mn.prototype.ms,mn.prototype.findLinkForData=mn.prototype.Kc,mn.prototype.findNodeForData=mn.prototype.ii,mn.prototype.findPartForData=mn.prototype.Lc,mn.prototype.findLinkForKey=mn.prototype.findLinkForKey,mn.prototype.findNodeForKey=mn.prototype.Vb,mn.prototype.findPartForKey=mn.prototype.findPartForKey,mn.prototype.rebuildParts=mn.prototype.Wd,mn.prototype.transformViewToDoc=mn.prototype.Ps,mn.prototype.transformRectDocToView=mn.prototype.zA,mn.prototype.transformDocToView=mn.prototype.op,mn.prototype.centerRect=mn.prototype.es,mn.prototype.scrollToRect=mn.prototype.tv,mn.prototype.scroll=mn.prototype.scroll,mn.prototype.highlightCollection=mn.prototype.Jz,mn.prototype.highlight=mn.prototype.Iz,mn.prototype.selectCollection=mn.prototype.rA,mn.prototype.select=mn.prototype.select,mn.prototype.updateAllRelationshipsFromData=mn.prototype.rp,mn.prototype.updateAllTargetBindings=mn.prototype.updateAllTargetBindings,mn.prototype.commit=mn.prototype.commit,mn.prototype.rollbackTransaction=mn.prototype.Kf,mn.prototype.commitTransaction=mn.prototype.eb,mn.prototype.startTransaction=mn.prototype.Ea,mn.prototype.raiseChanged=mn.prototype.g,mn.prototype.raiseChangedEvent=mn.prototype.cb,mn.prototype.removeChangedListener=mn.prototype.ik,mn.prototype.addChangedListener=mn.prototype.Pe,mn.prototype.removeModelChangedListener=mn.prototype.mA,mn.prototype.addModelChangedListener=mn.prototype.Yw,mn.prototype.findLayer=mn.prototype.Qj,mn.prototype.removeLayer=mn.prototype.kA,mn.prototype.addLayerAfter=mn.prototype.Cy,mn.prototype.addLayerBefore=mn.prototype.Ww,mn.prototype.addLayer=mn.prototype.Al,mn.prototype.moveParts=mn.prototype.moveParts,mn.prototype.copyParts=mn.prototype.Kj,mn.prototype.removeParts=mn.prototype.Is,mn.prototype.remove=mn.prototype.remove,mn.prototype.add=mn.prototype.add,mn.prototype.clearDelayedGeometries=mn.prototype.bx,mn.prototype.setProperties=mn.prototype.nm,mn.prototype.attach=mn.prototype.Du,mn.prototype.set=mn.prototype.set,mn.prototype.resetInputOptions=mn.prototype.Sx,mn.prototype.setInputOption=mn.prototype.sA,mn.prototype.getInputOption=mn.prototype.Ql,mn.prototype.resetRenderingHints=mn.prototype.Tx,mn.prototype.setRenderingHint=mn.prototype.Xx,mn.prototype.getRenderingHint=mn.prototype.Gf,mn.prototype.maybeUpdate=mn.prototype.bd,mn.prototype.requestUpdate=mn.prototype.$b,mn.prototype.delayInitialization=mn.prototype.Xy,mn.prototype.isUpdateRequested=mn.prototype.Pz,mn.prototype.invalidateDocumentBounds=mn.prototype.Ya,mn.prototype.findObjectsNear=mn.prototype.og,mn.prototype.findPartsNear=mn.prototype.mz,mn.prototype.findObjectsIn=mn.prototype.Cf,mn.prototype.findPartsIn=mn.prototype.ux,mn.prototype.findObjectsAt=mn.prototype.ji,mn.prototype.findPartsAt=mn.prototype.lz,mn.prototype.findObjectAt=mn.prototype.ic,mn.prototype.findPartAt=mn.prototype.Ol,mn.prototype.focusObject=mn.prototype.zz,mn.prototype.alignDocument=mn.prototype.Jy,mn.prototype.zoomToRect=mn.prototype.BA,mn.prototype.zoomToFit=mn.prototype.zoomToFit,mn.prototype.diagramScroll=mn.prototype.kx,mn.prototype.focus=mn.prototype.focus;var rp=new hi,cm=null,gs=bt.document!==void 0,Kd=null,ad="",Ka=new un(mn,"None",0),tu=new un(mn,"Uniform",1),ld=new un(mn,"UniformToFill",2),bf=new un(mn,"CycleAll",10),ng=new un(mn,"CycleNotDirected",11),ig=new un(mn,"CycleNotDirectedFast",12),rg=new un(mn,"CycleNotUndirected",13),og=new un(mn,"CycleDestinationTree",14),sg=new un(mn,"CycleSourceTree",15),Th=new un(mn,"DocumentScroll",1),Cf=new un(mn,"InfiniteScroll",2),kh=new un(mn,"TreeParentCollapsed",21),Xs=new un(mn,"AllParentsCollapsed",22),op=new un(mn,"AnyParentsCollapsed",23),ag=new On,Vd="2.3.10",$d="image",Pf=null,hm=!1;function Da(){if(gs){var a=bt.document.createElement("canvas"),y=a.getContext("2d"),x=si("7ca11abfd022028846");y[x]=si("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",gn.Dx+"4ae6247590da4bb21c324ba3a84e385776",mr.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",on.za],E=1;5>E;E++)y[si("7ca11abfd7330390")](si(b[E-1]),10,15*E);for(y[x]=si("39f046ebb36e4b"),x=1;5>x;x++)y[si("7ca11abfd7330390")](si(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(mr.prototype.Cd=mr.prototype.Eu),Pf=a}}mn.className="Diagram",mn.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=bt.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof mn?y.H:null},mn.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},mn.useDOM=function(a){gs=a?bt.document!==void 0:!1},mn.isUsingDOM=function(){return gs},mn.None=Ka,mn.Uniform=tu,mn.UniformToFill=ld,mn.CycleAll=bf,mn.CycleNotDirected=ng,mn.CycleNotDirectedFast=ig,mn.CycleNotUndirected=rg,mn.CycleDestinationTree=og,mn.CycleSourceTree=sg,mn.DocumentScroll=Th,mn.InfiniteScroll=Cf,mn.TreeParentCollapsed=kh,mn.AllParentsCollapsed=Xs,mn.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=bt[si("76a715b2f73f148a")][si("72ba13b5")]||"";if(a.Rc=!0,gs){var b=mn[si("76a115b6ed251eaf4692")];if(b)for(var E=ag.iterator;E.next()&&(b=E.value,b=si(b).split(si("39e9")),!(6>b.length));){var te=si(b[1]).split(".");if(b[4]!=="7da71ca0")break;var ne=si(gn[si("6cae19")]).split(".");if(te[0]>ne[0]||te[0]===ne[0]&&te[1]>=ne[1]){var ae=bt[si("74a900bae4370f8b51")][si("6fbb13a1c2311e8a57")].toLowerCase();if(ne=ae[si("73a612b6fb191d")](si("3aad1ab6e022098b4dc4")),te=si(b[2]),-1<ne&&(ae=ae[si("73a612b6fb191d")](te.toLowerCase()+"/"),a.Rc=!(-1<ae&&ae<ne),!a.Rc))break;for(ne=x[si("76ad18b4f73e")],ae=x[si("73a612b6fb191d")](si("35e7"))+2;ae<ne;ae++)y+=x[ae];if(ne=y[si("73a612b6fb191d")](te),0>ne&&te!==si("7da71ca0ad381e90")&&(ne=y[si("73a612b6fb191d")](si("76a715b2ef3e149757"))),0>ne&&(ne=y[si("73a612b6fb191d")](si("76a715b2ef3e149757"))),0>ne&&(ne=y[si("73a612b6fb191d")](si("2bfa41fdb3784bca12"))),0>ne&&(ne=x[si("73a612b6fb191d")](si("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[si("73a612b6fb191d")](si("35"))||y[si("73a612b6fb191d")](si("35"))===-1),!a.Rc||x[si("73a612b6fb191d")](si("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[si("73a612b6fb191d")](te)),!a.Rc)||(ne=bt[si("76a715b2f73f148a")][si("69ad17a1e03e")],ae=ne[si("73a612b6fb191d")](si("7fb002b6ed25128b4da25b2e")),-1<ae&&(a.Rc=!(ne[si("73a612b6fb191d")](te)>ae),!a.Rc)))break;if(te[0]==="#"){ne=bt.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[si("79a417a0f0181a8946")]=b,bt.document[si("78a712aa")]){bt.document[si("78a712aa")][si("7bb806b6ed32388c4a875b")](ne),fe=bt.getComputedStyle(ne).getPropertyValue(si("78a704b7e62456904c9b12701b6532a8"));var _e=bt.getComputedStyle(ne).getPropertyValue(si("75b817b0ea2202"));if(bt.document[si("78a712aa")][si("68ad1bbcf533388c4a875b")](ne),fe){if(ne=bt[si("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(si("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[si("76ad18b4f73e")],E=x[si("73a612b6fb191d")](si("35e7"))+2;E<Te;E++)y+=x[E];x=y[si("73a612b6fb191d")](si("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[si("73a612b6fb191d")](si("35")))}}}return 0<a.Rc&&a!==a.wy}dm.className="DiagramHelper";function ah(a){this.j=a===void 0?new kt:a,this.o=new kt}Xe.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 Yn(NaN,NaN).freeze(),this.gridSnapCellSpot=$s,this.gridSnapOrigin=new kt(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"||bt.Element&&a instanceof Element)var x=mn.call(this,a)||this;else x=mn.call(this)||this,y=a;return Re(x),y&&x.nm(y),x}qe(Fe,mn);function Re(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=Qa,a.layout=new xa}Fe.prototype.reset=function(){mn.prototype.reset.call(this),Re(this)},Fe.className="Palette";function Ue(a,y){if(typeof a=="string"||bt.Element&&a instanceof Element)var x=mn.call(this,a)||this;else x=mn.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 ki;var E=new gr;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 Ei(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Dt,x.toolManager.mouseMoveTools),x.click=function(){var te=b.observed;if(te!==null){var ne=te.viewportBounds,ae=b.lastInput.documentPoint;te.position=new kt(ae.x-ne.width/2,ae.y-ne.height/2)}},x.Pf=function(){b.Ya(),xt(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&&xt(b)},x.autoScale=tu,x.vb=!1,y&&Object.assign(x,y),x}qe(Ue,mn),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(gu(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}}}mn.prototype.redraw.call(this)},Ue.prototype.gc=function(){if(this.Ka===null&&zt("No div specified"),this.ta===null&&zt("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){gu(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=Tn.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Lc(y,E),Tn.free(E),ya(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=_a(ae,E),_e.gc(E,fe),E.globalAlpha=ae);else{for(var Te=_a(ae,E),je=fe.scale,Ve=Tn.alloc(),Qe=ae.Pa.s,it=Qe.length,ct=0;ct<it;ct++){var It=Qe[ct];(b||It!==_e)&&ae.Oj(E,It,fe,null,je,Ve,!1)}Tn.free(Ve),E.globalAlpha=Te}}}}}function xt(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=Yn.alloc();E.h(x.width,x.height),b.desiredSize=E,Yn.free(E),a=2/a.scale,b instanceof gr&&(b.strokeWidth=a),y.location=new kt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}Ue.prototype.computeBounds=function(){var a=this.observed;if(a===null)return Rr;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(),xt(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))},Xe.Object.defineProperties(Ue.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof Ue&&zt("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),xt(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),xt(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 Dt(){qo.call(this),this.j=null}qe(Dt,qo),Dt.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 kt(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new kt(a.x-this.j.x,a.y-this.j.y)),!0)},Dt.prototype.doActivate=function(){this.j=null,qo.prototype.doActivate.call(this)},Dt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Dt.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 kt(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new kt(a.x-this.j.x,a.y-this.j.y)}}},Dt.className="OverviewDraggingTool";function Ot(){br(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=Rr,this.hb=!0,this.cg=null,this.ob=200}Ot.prototype.toString=function(){return"CommandHandler"},Ot.prototype.Xe=function(a){this.H=a},Ot.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=ur?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()},Ot.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Ot.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Wo&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Ot.prototype.canStopCommand=function(){return!0},Ot.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=""}},Ot.prototype.canSelectAll=function(){return this.diagram.allowSelect},Ot.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=""}},Ot.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Ot.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)},Ot.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Ot.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Ot.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Ot.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 On,x.addAll(te),Kd=x,ad=y.model.dataFormat}}y.R("ClipboardChanged",x)},Ot.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},Ot.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 kt(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=""}},Ot.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)},Ot.prototype.undo=function(){this.diagram.undoManager.undo()},Ot.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Ot.prototype.redo=function(){this.diagram.undoManager.redo()},Ot.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Ot.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===Ka&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Ot.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==Ka?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Ot.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===Ka&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Ot.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==Ka?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Ot.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Ot.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Ot.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,b=a.scale;Yo(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=Rr):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),ys(y)},Ot.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Ot.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;Yo(x,"Scroll To Part");var b=this.scrollToPartPause;if(0<b){var E=Xt(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 ii&&fe.isTreeExpanded&&(!(fe instanceof sr)||fe.isSubGraphExpanded);)fe=E.pop();0<E.length?(fe instanceof ki&&y.tv(fe.actualBounds),fe instanceof ii&&!fe.isTreeExpanded&&(fe.isTreeExpanded=!0),fe instanceof sr&&!fe.isSubGraphExpanded&&(fe.isSubGraphExpanded=!0)):(fe instanceof ki&&y.es(fe.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){Un(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 Xt(a,y,x){if(y.isVisible())return x;if(y instanceof Qr)Xt(a,y.adornedPart,x);else if(y instanceof Xn){var b=y.fromNode;b!==null&&Xt(a,b,x),y=y.toNode,y!==null&&Xt(a,y,x)}else y instanceof ii&&(b=y.labeledLink,b!==null&&Xt(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),Xt(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),Xt(a,y,x));return x}Ot.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof ki)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Ot.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),Yo(y.animationManager,"Collapse Tree");var x=new On;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 ii&&E.isTreeExpanded&&(E.collapseTree(),x.add(E))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},Ot.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof ii&&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 ii&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Ot.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),Yo(y.animationManager,"Expand Tree");var x=new On;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 ii&&!E.isTreeExpanded&&(E.expandTree(),x.add(E))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},Ot.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof ii)||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 ii&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Ot.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 On,te=a.selection.iterator;te.next();){var ne=te.value;ne.Zc()&&ne.canGroup()&&E.add(ne)}for(var ae=new On,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 sr)Ru(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Qe=y.copyNodeData(x);Vt(Qe)&&(y.xf(Qe),b=a.ii(Qe))}if(b!==null){je!==null&&this.isValidMember(je,b)&&(b.containingGroup=je);for(var it=ae.iterator;it.next();){var ct=it.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=""}}}},Ot.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 Mn(a){var y=Gn();for(a=a.iterator;a.next();){var x=a.value;x instanceof Xn||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 Jn(y),a}Ot.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Xn)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},Ot.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 On;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var te=E.value;te instanceof sr&&te.canUngroup()&&b.add(te)}var ne=new On;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 Xn)){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=""}},Ot.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 sr))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof sr&&y.canUngroup())return!0;return!1},Ot.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=Mn(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.containingGroup=null:x=!1)}return x},Ot.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),Yo(y.animationManager,"Collapse SubGraph");var x=new On;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 sr&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Ot.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof sr&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof sr&&y.isSubGraphExpanded)return!0;return!1},Ot.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),Yo(y.animationManager,"Expand SubGraph");var x=new On;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 sr&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Ot.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof sr&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof sr&&!y.isSubGraphExpanded)return!0;return!1},Ot.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 Ao&&te.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},Ot.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 Ao))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 Ao&&x.editable}),a!==null))return!0;return!1},Ot.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 nn?E=a.ga(Fr):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new kt(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)}},Ot.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)},Ot.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 hi,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 Xn&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},Xe.Object.defineProperties(Ot.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||zt("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}}}),Ot.className="CommandHandler",oh=function(){return new Ot};function nn(){br(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new kt(NaN,NaN).freeze(),this.jd=Ls,this.Ab=new mr,this.wh=new mr,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=ba,this.uc=new Tn(NaN,NaN,NaN,NaN).freeze(),this.Ib=new Tn(NaN,NaN,NaN,NaN).freeze(),this.dc=new Tn(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=ro,this.Ag=this.io=0,this.V=this.tb=this.Dh=this.A=this.Ua=null,this.Uc=!1,this.jo=this.Ng=null}var Wn,jn,yi,_i,Bi,ar,Br,wr,Wr,Co;nn.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=Bn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},nn.prototype.Vw=function(a){var y=this.Dh;if(an(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},nn.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},nn.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},nn.prototype.copy=function(){return this.clone()},rt=nn.prototype,rt.qb=function(a){a.classType===Xn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:zt("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===nn&&(this.stretch=a)},rt.toString=function(){return Rn(this.constructor)+"#"+Cr(this)},rt.th=function(){this.A!==null&&(this.A.nc=!0)};function Sr(a){a.A===null?a.A=new Lf:a.A.nc&&(a.A=a.A.copy())}rt.Xc=function(){if(this.ba===null){var a=new lg;a.Xi=fs,a.yj=fs,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},rt.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&&Ea(this)&&Ho(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 hi),ne=te.undoManager.transactionLevel===0,a.startCondition===va?ne=!0:a.startCondition===js&&(ne=!1),ne?(te=new ds,os(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()):(Yo(te.animationManager,"Trigger"),te.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof Zn&&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 Zn&&qd(ae,function(fe){fe.data!==null&&fe.l&16777216&&fe.La(y)})};function Ho(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))}}rt.ks=function(a){return this.bindingId===a?this:null},rt.g=function(a,y,x){this.cb(Vo,a,this,y,x)},rt.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 mr);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),te.pp(E)}};function la(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}rt.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?Io(a.x,a.y,0,0,0,b.height)<=y||Io(a.x,a.y,0,b.height,b.width,b.height)<=y||Io(a.x,a.y,b.width,b.height,b.width,0)<=y||Io(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},rt.se=function(){return!0},rt.ca=function(a){var y=kt.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return kt.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=_r(x.x-ne*fe,x.y-ne*fe,x.width+te*fe,x.height+te*fe,y.x,y.y),kt.free(y),a}return E=!1,(this instanceof Qr||this instanceof gr?_r(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)),kt.free(y),E},rt.gh=function(a){var y=this.naturalBounds;return _r(0,0,y.width,y.height,a.x,a.y)},rt.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=Tn.allocAt(0,0,y.width,y.height);var x=this.transform,b=!1,E=kt.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)))),kt.free(E),Tn.free(y),b},rt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=kt.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)))),kt.free(E),b},rt.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=kt.allocAt(0,0),E=kt.allocAt(0,x.height),te=kt.allocAt(x.width,x.height),ne=kt.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=Tn.allocAt(0,0,x.width,x.height);var fe=kt.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)))),kt.free(fe),Tn.free(x),!ae&&(on.us(a,b,E)||on.us(a,E,te)||on.us(a,te,ne)||on.us(a,ne,b))&&(ae=!0)}return kt.free(b),kt.free(E),kt.free(te),kt.free(ne),ae},rt.ga=function(a,y){if(y===void 0&&(y=new kt),a instanceof Si){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},rt.mi=function(a){a===void 0&&(a=new Tn);var y=this.naturalBounds,x=this.oe,b=kt.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),uo(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),uo(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),uo(a,b.x,b.y,0,0),kt.free(b),a},rt.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},rt.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},rt.qs=function(a,y){return y===void 0&&(y=new kt),y.assign(a),this.oe.Cd(y),y},rt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},rt.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,on.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=on.Ff(0,0,b.width,b.height,ne,a,y,x,E),E.transform(te),x)},nn.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 Zn;switch(ml(this,!0)){case jn:ne=E=0,ae&&(y=a=1/0);break;case Wn: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()||zt("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Js(this,!1)}},nn.prototype.Wl=function(){},nn.prototype.Dd=function(){return!1},nn.prototype.arrange=function(a,y,x,b,E){this.Uk();var te=Tn.alloc();te.assign(this.Ib),this.Ib.ka(),tl(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 Ao&&(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()||zt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(te,this.Ib),Hc(this,!1),Tn.free(te)},rt=nn.prototype,rt.eh=function(){};function Va(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=ml(a,!0),x===b&&te===E&&(y=jn),y){case jn:(x>b||te>E)&&(Js(a,!0),a.measure(x>b?b:x,te>E?E:te,0,0));break;case Wn:Js(a,!0),a.measure(b,E,0,0);break;case _i:Js(a,!0),a.measure(b,te,0,0);break;case Bi:Js(a,!0),a.measure(x,E,0,0)}}}rt.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(),vs(a,y)||(x.oh(),this.Pn(x)))},rt.Pn=function(a){this.portId!==null&&(jv(a,!0),a instanceof ii&&W1(a,this))},rt.gc=function(a,y){if(!mu(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 Zn&&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&&(xs(this,a,_e,!0,!0,fe,ae),_e instanceof fo&&_e.type===Su?(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&&(xs(this,a,Te,!0,!1,fe,ae),Te instanceof fo&&Te.type===Su?(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&&Sa(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 it=Ve.m11,ct=Ve.m21,It=Ve.dx,Mt=Ve.m12,Gt=Ve.m22,Zt=Ve.dy,$t,en=$t=0;Ve=$t*it+en*ct+It;var vn=$t*Mt+en*Gt+Zt;$t=Qe.width+je,en=0;var ni=$t*it+en*ct+It;$t=$t*Mt+en*Gt+Zt,en=Math.min(Ve,ni);var pi=Math.min(vn,$t),ci=Math.max(Ve+0,ni)-en,$n=Math.max(vn+0,$t)-pi;Ve=en,vn=pi,$t=Qe.width+je,en=Qe.height+je,ni=$t*it+en*ct+It,$t=$t*Mt+en*Gt+Zt,en=Math.min(Ve,ni),pi=Math.min(vn,$t),ci=Math.max(Ve+ci,ni)-en,$n=Math.max(vn+$n,$t)-pi,Ve=en,vn=pi,$t=0,en=Qe.height+je,ni=$t*it+en*ct+It,$t=$t*Mt+en*Gt+Zt,en=Math.min(Ve,ni),pi=Math.min(vn,$t),ci=Math.max(Ve+ci,ni)-en,$n=Math.max(vn+$n,$t)-pi,Ve=en,vn=pi,je=y.viewportBounds,Qe=je.x,it=je.y,Ve=!(Ve>je.width+Qe||Qe>ci+Ve||vn>je.height+it||it>$n+vn)}if(Ve){if(Ve=(this.l&256)!==0,a.clipInsteadOfFill&&(Ve=!1),this instanceof Ao&&(a.font=this.font),Ve){if(vn=ae.se()?ae.naturalBounds:ae.actualBounds,ci=Math.max(ne.x,vn.x),$n=Math.max(ne.y,vn.y),je=Math.min(ne.right,vn.right)-ci,Qe=Math.min(ne.bottom,vn.bottom)-$n,it=this.tb,it!==null&&(ci=it.x,$n=it.y,je=it.width,Qe=it.height),ci>ne.width+ne.x||ne.x>vn.width+vn.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(ci,$n,je,Qe),a.clip()}if(Te){if(!_e.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}fe&&(vn=_e.shadowOffset,a.Ev(vn.x*y.scale*this.scale*y.Mb,vn.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&&ga(this,ae)&&this.shadowVisible===null&&Uc(a),this.Ma!==null&&(a.yc(),Ml(this,a,_e,ne)),fe&&(this.Ma!==null||this.areaBackground!==null||ga(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 Zn)),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 ga(a,y){return y===null?!1:(Oh(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Zn.Auto||y.type===Zn.Spot)&&y.Pb()!==a)}rt.Dv=function(){};function nu(a,y,x,b){xs(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof fo&&a.areaBackground.type===Su?(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;xs(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof fo&&a.Ma.type===Su?(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 Ra(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===Zn.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 mu(a,y,x){if(!(y instanceof zl))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&&Ra(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 Ao&&(y.font=a.font),y.yd=null;var ne=a.transform;te=a instanceof Zn;var ae=a instanceof Zn?Oh(a):!1;a.l&4096&&Sa(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&&ga(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||ga(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),gl(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&&Ra(a,b,ae),ne!==null&&ne(a,ae)),!0)}rt.$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"+Fo++,ae=a.Ud("clipPath",{id:te}),y=a.Ud("rect",{x:y,y:E,width:ne,height:x}),this instanceof Zn&&(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"),gl(a,b)};function gl(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function Ba(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=hr(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()}}rt.hh=function(){},rt.lv=function(){this.Uc=!0},rt.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 Zn?Oh(this):!1;if(!(this instanceof Zn&&E))if(this instanceof yl){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 Zn)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof gr){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 Zn))&&(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},rt.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 xs(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,it=0,ct=0,It=0;if(It=ct=0,E?(ct=ne.x,It=ne.y):b||(ct-=_e/2,It-=_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,it=x.end.y*fe+x.end.offsetY,je+=ct,Qe+=ct,Ve+=It,it+=It,x.type===ch)Te=y.createLinearGradient(je,Ve,Qe,it);else if(x.type===Su)It=isNaN(x.endRadius)?Math.max(ae,fe)/2:x.endRadius,isNaN(x.startRadius)?(ct=0,It=Math.max(ae,fe)/2):ct=x.startRadius,Te=y.createRadialGradient(je,Ve,ct,Qe,it,It);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 Mt=a.diagram;Mt!==null&&x.yk===-1&&Un(function(){Mt.redraw()},600)}}b?y.fillStyle=Te:y.strokeStyle=Te}}}rt.rg=function(a){if(a instanceof Zn)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},rt.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},rt.If=function(){for(var a=this instanceof Zn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Sa(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),vu(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,vu(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,vu(a,!1)))}rt.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=kt.alloc();te.yi(y,x,b,E,Fr),a.rotate(this.Kb,te.x,te.y),kt.free(te)}},rt.v=function(a){if(!iu(this)){a===void 0&&(a=!1),Js(this,!0),Hc(this,!0);var y=this.panel;y===null||a||y.v()}},rt.Uj=function(){iu(this)||(Js(this,!0),Hc(this,!0))};function el(a){if(!tl(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof ii&&a.Bd(),y.$b())),Hc(a,!0)}}rt.Uk=function(){!(this.l&2048)&&(Iu(this,!0),vu(this,!0))},rt.Wu=function(){vu(this,!0)},rt.N=function(){var a=this.part;a!==null&&a.N()};function ml(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===Zn.Table?lc(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===Zn.Auto&&b.Pb()===a?ma(a,Wn,y):x===ar?b!==null?b.type===Zn.Spot&&b.Pb()===a?ma(a,Wn,y):(x=b.defaultStretch,x===ar?ma(a,jn,y):ma(a,x,y)):ma(a,jn,y):ma(a,x,y)}function lc(a,y,x,b){var E=a.stretch;if(E!==ar)return ma(a,E,b);var te=E=null;switch(y.stretch){case Bi:te=!0;break;case Wn:te=!0}switch(x.stretch){case _i:E=!0;break;case Wn:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===_i||y===Wn),te===null&&(te=y===Bi||y===Wn),E===!0&&te===!0?ma(a,Wn,b):E===!0?ma(a,_i,b):te===!0?ma(a,Bi,b):ma(a,jn,b)}function ma(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===Wn)return Bi}else{if(y===Bi)return jn;if(y===Wn)return _i}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Bi)return jn;if(y===Wn)return _i}else{if(y===_i)return jn;if(y===Wn)return Bi}return y}function Vu(a,y){a.l=y?a.l|512:a.l&-513}function Ea(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 vu(a,y){a.l=y?a.l|4096:a.l&-4097}function iu(a){return(a.l&8192)!==0}function Js(a,y){a.l=y?a.l|8192:a.l&-8193}function tl(a){return(a.l&16384)!==0}function Hc(a,y){a.l=y?a.l|16384:a.l&-16385}rt.Gj=function(){this.svg=null},rt.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},rt.Av=function(){},rt.zv=function(a){return this.pa=a,el(this),!0},rt.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},rt.kq=function(){return 0};function Xd(a){var y=a.part;if(y instanceof ii&&(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 Zn?a instanceof ii?a.Bd():a.qm(a,function(x){Xd(x)}):Xd(a))}rt.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new zs(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&f1(a)&&zt("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new On),this.localBindings.add(E),this},rt.set=function(a){return Object.assign(this,a),this},rt.Du=function(a){return iv(this,a),this},rt.apply=function(a){return a(this),this},rt.nm=function(a){return pu(this,a),this},rt.pz=function(){return this.ih()},rt.ih=function(){for(var a=this instanceof Zn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},rt.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new hi),this.animationTriggers.add(a.propertyName,a),this};function yu(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=Bn(arguments),b=te(x),Vt(b)||zt('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=bt.go[a]}if(b===null&&(E!=null&&E.constructor||zt("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 mn&&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?zt("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 Ao)a.text=y;else if(a instanceof gr)a.figure=y;else if(a instanceof yl)a.source=y;else if(a instanceof Zn)y=$u.I(y),y!==null&&(a.type=y);else if(a instanceof fo){var x=ai(fo,y);x!==null?a.type=x:zt("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof Qn?(y=ai(Qn,y),y!==null&&(a.type=y)):a instanceof Zr&&(y=ai(Zr,y),y!==null&&(a.type=y));else if(y instanceof nn)a instanceof Zn||zt("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Qs){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 Qs?Am(b,y):zt("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof un)typeof a.qb=="function"&&a.qb(y);else if(y instanceof oa)a.type=y;else if(y instanceof zs)a instanceof nn||a instanceof Qs?a.bind(y):zt("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof jl)a instanceof nn?a.Jv(y):zt("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Zs)a instanceof Qn&&a.type===Qn.o?a.figures.add(y):zt("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Zr)a instanceof Zs?a.segments.add(y):zt("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof Qo)a instanceof mn||a instanceof sr?a.layout=y:zt("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 fi;for(var E in y)b=parseFloat(E),isNaN(b)?x[E]=y[E]:a.addColorStop(b,y[E]);pu(a,x)}else if(a instanceof Qs){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&zt("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)&&zt("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new fi;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);pu(a,E)}else pu(a,y);else zt('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}Xe.Object.defineProperties(nn.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&&(Sr(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&&(Sr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:rl},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===rl&&(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:Pr},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:ar},set:function(a){var y=this.stretch;y!==a&&(Sr(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&&(Sr(this),this.A.xa=a,this.part!==null&&(this.part.Rh=null),this.g("name",y,a))}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&Cn(a,"0 <= value <= 1",nn,"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(),Sr(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 ki)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 kt(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&&zt("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 gr&&this.qc(),this.g("desiredSize",b,a),Ea(this)&&(a=this.part,a!==null&&(Ho(this,a,"width"),Ho(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 Yn(a,this.jd.height).freeze(),this.v(),this instanceof gr&&this.qc(),this.g("desiredSize",y,a),Ea(this)&&(a=this.part,a!==null&&Ho(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 Yn(this.jd.width,a).freeze(),this.v(),this instanceof gr&&this.qc(),this.g("desiredSize",y,a),Ea(this)&&(a=this.part,a!==null&&Ho(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:Vr},set:function(a){var y=this.minSize;y.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),Sr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:ms},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(),Sr(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 Ei(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&&Sa(this),this.Ab}},oe:{get:function(){return this.l&4096&&Sa(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(Sr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:jn},set:function(a){this.reshapingBehavior!==a&&(Sr(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()&&zt("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),el(this),this.g("alignment",y,a))}},column:{get:function(){return this.Ag},set:function(a){a=Math.round(a);var y=this.Ag;y!==a&&(0>a&&Cn(a,">= 0",nn,"column"),this.Ag=a,this.v(),this.g("column",y,a),this.svg!==null&&this.svg.remove())}},columnSpan:{get:function(){return this.A!==null?this.A.ob:1},set:function(a){a=Math.round(a);var y=this.columnSpan;y!==a&&(1>a&&Cn(a,">= 1",nn,"columnSpan"),Sr(this),this.A.ob=a,this.v(),this.g("columnSpan",y,a))}},row:{get:function(){return this.io},set:function(a){a=Math.round(a);var y=this.io;y!==a&&(0>a&&Cn(a,">= 0",nn,"row"),this.io=a,this.v(),this.g("row",y,a),this.svg!==null&&this.svg.remove())}},rowSpan:{get:function(){return this.A!==null?this.A.Bi:1},set:function(a){a=Math.round(a);var y=this.rowSpan;y!==a&&(1>a&&Cn(a,">= 1",nn,"rowSpan"),Sr(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&&(Sr(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 ii||zt("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:fs},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&&Cn(a,">= 0",nn,"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&&Cn(a,">= 0",nn,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:fs},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&&Cn(a,">= 0",nn,"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&&Cn(a,">= 0",nn,"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&&(Sr(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&&(Sr(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&&(Sr(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&&(Sr(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&&(Sr(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&&(Sr(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&&(Sr(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&&(Sr(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&&(Sr(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&&(Sr(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&&(Sr(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&&(Sr(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&&(Sr(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&&(Sr(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&&(Sr(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&&(Sr(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&&(Sr(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&&(Sr(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),nn.prototype.trigger=nn.prototype.Jv,nn.prototype.findBindingPanel=nn.prototype.ih,nn.prototype.findTemplateBinder=nn.prototype.pz,nn.prototype.setProperties=nn.prototype.nm,nn.prototype.apply=nn.prototype.apply,nn.prototype.attach=nn.prototype.Du,nn.prototype.set=nn.prototype.set,nn.prototype.isEnabledObject=nn.prototype.If,nn.prototype.isVisibleObject=nn.prototype.Ed,nn.prototype.isContainedBy=nn.prototype.rg,nn.prototype.getNearestIntersectionPoint=nn.prototype.rs,nn.prototype.getLocalPoint=nn.prototype.qs,nn.prototype.getDocumentScale=nn.prototype.Df,nn.prototype.getDocumentAngle=nn.prototype.li,nn.prototype.getDocumentBounds=nn.prototype.mi,nn.prototype.getDocumentPoint=nn.prototype.ga,nn.prototype.intersectsRect=nn.prototype.Yc,nn.prototype.containedInRect=nn.prototype.fh,nn.prototype.containsRect=nn.prototype.Re,nn.prototype.containsPoint=nn.prototype.ca,nn.prototype.raiseChanged=nn.prototype.g,nn.prototype.raiseChangedEvent=nn.prototype.cb,nn.prototype.addCopyProperty=nn.prototype.Vw;var sp=null;nn.className="GraphObject",sp=new hi,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=yu(Zn,Zn.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof Zn){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"},yu(gr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Si(0,0,2.76142374915397,2.761423749153969),spot2:new Si(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 Zn&&(x=b.fb("ButtonBorder"),x instanceof gr)){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 Zn&&(x=b.fb("ButtonBorder"),x instanceof gr&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof Zn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof gr){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 Zn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof gr){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 Zn&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof gr){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 Zn&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof gr))){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=yu("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},yu(gr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Lo},new zs("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new zs("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 ii){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=yu("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},yu(gr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Lo},new zs("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 sr){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 yu(Qr,Zn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new kt(0,3),shadowBlur:5},yu(gr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Si(0,0,4,6),spot2:new Si(1,1,-4,-4)}))}),Ah("ContextMenu",function(){return yu(Qr,Zn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new kt(0,3),shadowBlur:5},new zs("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Ah("ContextMenuButton",function(){var a=yu("Button");a.stretch=_i;var y=a.fb("ButtonBorder");return y instanceof gr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new Si(0,0,2,3),y.spot2=new Si(1,1,-2,-2)),a}),Ah("PanelExpanderButton",function(a){var y=fm(a,"COLLAPSIBLE"),x=yu("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},yu(gr,{name:"ButtonIcon",strokeWidth:2},new zs("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof gr&&(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=yu("Button",{desiredSize:new Yn(14,14)},yu(gr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Wn,geometryStretch:yi,visible:!1},y!==""?new zs("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof Zn){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=yu("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Ei(0,1,0,0)});var y=yu(Zn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Ei(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}),nn.None=jn=new un(nn,"None",0),nn.Default=ar=new un(nn,"Default",0),nn.Vertical=Bi=new un(nn,"Vertical",4),nn.Horizontal=_i=new un(nn,"Horizontal",5),nn.Fill=Wn=new un(nn,"Fill",3),nn.Uniform=yi=new un(nn,"Uniform",1),nn.UniformToFill=Br=new un(nn,"UniformToFill",2),nn.FlipVertical=wr=new un(nn,"FlipVertical",1),nn.FlipHorizontal=Wr=new un(nn,"FlipHorizontal",2),nn.FlipBoth=Co=new un(nn,"FlipBoth",3),nn.make=yu,nn.getBuilders=function(){var a=new hi,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},nn.defineBuilder=Ah,nn.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 nn))return y&&b.set(y),b;zt('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},nn.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=Vr,this.o=ms,this.hg=ar,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=Pr,this.rr=rl,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=ro,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?bt.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 zl(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),Vt(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},Xe.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 zl(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=Fo++,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+")")}rt=zl.prototype,rt.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,it=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,it,a-Te,y-je]),this.path.push(["A",x,x,0,1,it,Ve,Qe])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),it,a+x*Math.cos(E),y+x*Math.sin(E)])},rt.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},rt.Se=function(a){this.addPath(this.path,this.rb,a||0)},rt.bezierCurveTo=function(a,y,x,b,E,te){this.path.push(["C",a,y,x,b,E,te])},rt.clearRect=function(){},rt.clip=function(){this.Yl.clipPath=!0},rt.closePath=function(){this.path.push(["z"])},rt.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},rt.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"+Fo++,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+")"},rt.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)}rt.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},on.$(b,ae)&&on.$(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)},rt.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),rv(this,this.Yl)},rt.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},rt.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)},rt.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))},rt.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])},rt.lineTo=function(a,y){this.path.push(["L",a,y])},rt.moveTo=function(a,y){this.path.push(["M",a,y])},rt.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},rt.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"])},rt.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},rt.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())},rt.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]+")"}rt.scale=function(a,y){this.rb.scale(a,y)},rt.translate=function(a,y){this.rb.translate(a,y)},rt.transform=function(){},rt.yc=function(){},rt.stroke=function(){qy(this,this.Yl)},rt.jk=function(){this.clipInsteadOfFill||this.stroke()},rt.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},rt.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"+Fo++,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+")"}rt.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var te=Bn(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}rt.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}rt.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},rt.fs=function(){this.Ct=!1},rt.Vc=function(){},rt.Wx=function(){},zl.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},zl.prototype.getImageData=function(){return null},zl.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()))}zl.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},zl.className="SVGContext",mn.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Tc(this,bt.document));var y=new Tc(this,bt.document,!0);a===void 0&&(a=new fi);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)},mn.prototype.makeSvg=mn.prototype.Cs,mn.prototype.av=function(a){return this.Cs(a)},mn.prototype.makeSVG=mn.prototype.av;function Du(a,y,x,b){this.ownerDocument=y=y===void 0?bt.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},Xe.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&&zt("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 mr,this.isTemporary=!!x}rt=Qd.prototype,rt.Wx=function(a){this.Z.imageSmoothingEnabled=a},rt.arc=function(a,y,x,b,E,te){this.Z.arc(a,y,x,b,E,te)},rt.beginPath=function(){this.Z.beginPath()},rt.Se=function(){},rt.bezierCurveTo=function(a,y,x,b,E,te){this.Z.bezierCurveTo(a,y,x,b,E,te)},rt.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},rt.clip=function(){this.Z.clip()},rt.closePath=function(){this.Z.closePath()},rt.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},rt.createPattern=function(a,y){return this.Z.createPattern(a,y)},rt.createRadialGradient=function(a,y,x,b,E,te){return this.Z.createRadialGradient(a,y,x,b,E,te)},rt.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)},rt.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},rt.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},rt.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},rt.fillText=function(a,y,x){this.Z.fillText(a,y,x)},rt.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},rt.lineTo=function(a,y){this.Z.lineTo(a,y)},rt.measureText=function(a){return this.Z.measureText(a)},rt.moveTo=function(a,y){this.Z.moveTo(a,y)},rt.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},rt.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},rt.restore=function(){this.Z.restore()},rt.save=function(){this.yc(),this.Z.save()},Qd.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},rt=Qd.prototype,rt.setTransform=function(a,y,x,b,E,te){this.El.setTransform(a,y,x,b,E,te)},rt.scale=function(a,y){this.El.scale(a,y)},rt.translate=function(a,y){this.El.translate(a,y)},rt.stroke=function(){this.Z.stroke()},rt.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}},rt.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},rt.ng=function(a,y){if(a instanceof fo&&a.type===Su){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)},rt.jk=function(){this.Hm||this.stroke()},rt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},rt.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},rt.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vx),a.lineDashOffset=0)},rt.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},rt.Hs=function(){},Xe.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),br(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=Ha):this.Lk=a===Su?this.Qd=Fr:this.Qd=fs,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},rt=fo.prototype,rt.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},rt.ka=function(){return Object.isFrozen(this)&&zt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},rt.qb=function(a){a.classType===fo&&(this.type=a)},rt.toString=function(){var a="Brush(";if(this.type===Nh)a+=this.color;else if(a=this.type===ch?a+"Linear ":this.type===Su?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+")"},rt.addColorStop=function(a,y){return this._isFrozen&&Yt(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Cn(a,"0 <= loc <= 1",fo,"addColorStop:loc"),this.we===null&&(this.we=new hi),this.we.add(a,y),this.na===Nh&&(this.type=ch),this.xe=null,this},rt.Vz=function(a,y){if(this._isFrozen&&Yt(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===Su)&&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)}rt.Wy=function(a,y){if(this._isFrozen&&Yt(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===Su)&&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=Ro.j;var b=Ro.u,E=Ro.o,te=Ro.F;return uh(y),x===void 0&&(x=.5),"rgba("+Math.round((Ro.j-a)*x+a)+", "+Math.round((Ro.u-b)*x+b)+", "+Math.round((Ro.o-E)*x+E)+", "+Math.round((Ro.F-te)*x+te)+")"}rt.Gx=function(){if(this.type===Nh)return lp(this.color);if((this.type===ch||this.type===Su)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Su)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*Ro.j+587*Ro.u+114*Ro.o)/1e3):!1}function up(a,y){switch(y){case fp:y=100*lv(Ro.j);var x=100*lv(Ro.u),b=100*lv(Ro.o);return nl.j=.4124564*y+.3575761*x+.1804375*b,nl.u=.2126729*y+.7151522*x+.072175*b,nl.o=.0193339*y+.119192*x+.9503041*b,nl.F=Ro.F,y=cv(nl.j/cp[0]),x=cv(nl.u/cp[1]),b=cv(nl.o/cp[2]),Gc.j=116*x-16,Gc.u=500*(y-x),Gc.o=200*(x-b),Gc.F=nl.F,Gc.j=Math.min(100,Math.max(0,Gc.j+100*a)),a=(Gc.j+16)/116,y=a-Gc.o/200,nl.j=cp[0]*n1(Gc.u/500+a),nl.u=cp[1]*(Gc.j>mm*dv?Math.pow(a,3):Gc.j/mm),nl.o=cp[2]*n1(y),nl.F=Gc.F,a=-.969266*nl.j+1.8760108*nl.u+.041556*nl.o,y=.0556434*nl.j+-.2040259*nl.u+1.0572252*nl.o,Ro.j=255*uv((3.2404542*nl.j+-1.5371385*nl.u+-.4985314*nl.o)/100),Ro.u=255*uv(a/100),Ro.o=255*uv(y/100),Ro.F=nl.F,Ro.j=Math.round(Ro.j),255<Ro.j?Ro.j=255:0>Ro.j&&(Ro.j=0),Ro.u=Math.round(Ro.u),255<Ro.u?Ro.u=255:0>Ro.u&&(Ro.u=0),Ro.o=Math.round(Ro.o),255<Ro.o?Ro.o=255:0>Ro.o&&(Ro.o=0),"rgba("+Ro.j+", "+Ro.u+", "+Ro.o+", "+Ro.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:zt("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,Ro.j=a[0],Ro.u=a[1],Ro.o=a[2],Ro.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Ro.j=0,Ro.u=0,Ro.o=0,Ro.F=1)}}function av(){var a=Ro.j/255,y=Ro.u/255,x=Ro.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=Ro.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||zt("Value for "+y+" must be a color string or a Brush, not "+a))}function hv(){fv=gs?new Du(null,void 0,{willReadFrequently:!0}).context:null}Xe.Object.defineProperties(fo.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&Yt(this,a),this.na=a,this.start.Mc()&&(a===ch?this.start=Qa:a===Su&&(this.start=Fr)),this.end.Mc()&&(a===ch?this.end=Ha:a===Su&&(this.end=Fr)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&Yt(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&Yt(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&Yt(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&Yt(this,a),0>a&&Cn(a,">= zero",fo,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&Yt(this,a),0>a&&Cn(a,">= zero",fo,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&Yt(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&Yt(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,Ro=new cg,ru=new cg,nl=new cg,Gc=new cg,hp=!1;fo.className="Brush";var Nh;fo.Solid=Nh=new un(fo,"Solid",0);var ch;fo.Linear=ch=new un(fo,"Linear",1);var Su;fo.Radial=Su=new un(fo,"Radial",2);var dp;fo.Pattern=dp=new un(fo,"Pattern",4);var fp;fo.Lab=fp=new un(fo,"Lab",5);var i1;fo.HSL=i1=new un(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 oa(){this.xa="Base"}oa.prototype.measure=function(){},oa.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},oa.prototype.arrange=function(){},oa.prototype.Ly=function(a,y,x,b,E,te){a.arrange(y,x,b,E,te)},oa.prototype.iA=function(a){a.Uj()},oa.prototype.gc=function(){},Xe.Object.defineProperties(oa.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Zn}}}),oa.prototype.remeasureObject=oa.prototype.iA,oa.prototype.arrangeElement=oa.prototype.Ly,oa.prototype.measureElement=oa.prototype.Yz,oa.className="PanelLayout";function vm(){this.xa="Base"}qe(vm,oa),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 gr&&_e.isGeometryPositioned&&(_e=_e.strokeWidth/2,Ve-=_e,Qe-=_e),uo(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 gr&&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,oa),ym.prototype.measure=function(a,y,x,b,E,te,ne){var ae=b.length;y=Gn(),te=hh(a);for(var fe=0;fe<ae;fe++){var _e=b[fe];if(_e.visible||_e===te){var Te=ml(_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));Jn(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,it=te+E.bottom,ct=je.height,It=ml(Te,!1);(isNaN(Te.desiredSize.height)&&It===Wn||It===Bi)&&(ct=Math.max(x.height-Qe-it,0)),Qe=ct+Qe+it,it=Te.alignment,it.Xb()&&(it=a.defaultAlignment),it.sb()||(it=Fr),ne&&(ae-=je.width+Ve.left+Ve.right),Te.arrange(ae+it.offsetX+Ve.left,_e+it.offsetY+Ve.top+(x.height*it.y-Qe*it.y),je.width,ct),ne||(ae+=je.width+Ve.left+Ve.right)}}};function Sm(){this.xa="Base"}qe(Sm,oa),Sm.prototype.measure=function(a,y,x,b,E,te){var ne=b.length;x=Gn();for(var ae=hh(a),fe=0;fe<ne;fe++){var _e=b[fe];if(_e.visible||_e===ae){var Te=ml(_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,Os(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);Jn(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,it=te+E.right,ct=je.width,It=ml(Te,!1);(isNaN(Te.desiredSize.width)&&It===Wn||It===_i)&&(ct=Math.max(x.width-Qe-it,0)),Qe=ct+Qe+it,it=Te.alignment,it.Xb()&&(it=a.defaultAlignment),it.sb()||(it=Fr),ne&&(ae-=je.height+Ve.bottom+Ve.top),Te.arrange(_e+it.offsetX+Ve.left+(x.width*it.x-Qe*it.x),ae+it.offsetY+Ve.top,ct,je.height),ne||(ae+=je.height+Ve.bottom+Ve.top)}}};function xm(){this.xa="Base"}qe(xm,oa),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),it=Math.max(ne+je,0),ct=a.isClipping,It=Tn.allocAt(-_e.left,-_e.top,Qe,it),Mt=Tn.allocAt(0,0,te,ne);pv(fe,Mt,!0),te=Mt.width,ne=Mt.height;for(var Gt=!0,Zt=hh(a),$t=0;$t<ae;$t++){var en=b[$t];Ve=y;var vn=x;if(en!==fe&&(en.visible||en===Zt)){_e=en.margin;var ni=_e.left,pi=_e.top;switch(Qe=_e.right+_e.left,it=_e.top+_e.bottom,_e=ml(en,!1),_e){case Wn:Ve=te,vn=ne,pi=ni=it=Qe=0;break;case _i:Ve=te,ni=Qe=0;break;case Bi:vn=ne,pi=it=0}en.measure(Ve,vn,0,0),Ve=en.measuredBounds,Qe=Math.max(Ve.width+Qe,0),it=Math.max(Ve.height+it,0),_e=en.alignment,_e.Xb()&&(_e=a.defaultAlignment),_e.sb()||(_e=Fr);var ci=en.alignmentFocus;if(ci.Xb()&&(ci=Fr),vn=null,en instanceof Zn&&en.$e!==""&&(vn=en.fb(en.$e),vn===en&&(vn=null)),ni=Mt.x-ni,pi=Mt.y-pi,vn!==null){for(en.arrange(0,0,Ve.width,Ve.height),Ve=vn.actualBounds,Ve=kt.allocAt(Ve.x+(ci.x*Ve.width-ci.offsetX),Ve.y+(ci.y*Ve.height-ci.offsetY)),vn=vn.panel;vn!==en;)vn.transform.Ga(Ve),vn=vn.panel;ni+=_e.x*te+_e.offsetX-Ve.x,pi+=_e.y*ne+_e.offsetY-Ve.y,kt.free(Ve)}else ni+=_e.x*te+_e.offsetX-(ci.x*Ve.width+ci.offsetX),pi+=_e.y*ne+_e.offsetY-(ci.y*Ve.height+ci.offsetY);Gt?(Gt=!1,E.h(ni,pi,Qe,it)):uo(E,ni,pi,Qe,it)}}switch(Gt?E.assign(It):ct?E.Uu(Mt.x,Mt.y,Mt.width,Mt.height):uo(E,It.x,It.y,It.width,It.height),Tn.free(It),Tn.free(Mt),_e=fe.stretch,_e===ar&&(_e=ml(fe,!1)),_e){case jn:return;case Wn: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),it=Math.max(ne+je,0),_e=fe.margin,Mt=Tn.allocAt(-_e.left,-_e.top,Qe,it),pv(fe,Mt,!0),te=Mt.width,ne=Mt.height,y=0;y<ae;y++)x=b[y],x===fe||!x.visible&&x!==Zt||(_e=x.margin,Qe=_e.right+_e.left,it=_e.top+_e.bottom,Ve=x.measuredBounds,Qe=Math.max(Ve.width+Qe,0),it=Math.max(Ve.height+it,0),Te=x.alignment,Te.Xb()&&(Te=a.defaultAlignment),Te.sb()||(Te=Fr),x=x.alignmentFocus,x.Xb()&&(x=Fr),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,it)):uo(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,it));Gt?E.assign(It):ct?E.Uu(Mt.x,Mt.y,Mt.width,Mt.height):uo(E,It.x,It.y,It.width,It.height),Tn.free(Mt)},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=Tn.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=Fr);var it=je.alignmentFocus;if(it.Xb()&&(it=Fr),_e=null,je instanceof Zn&&je.$e!==""&&(_e=je.fb(je.$e),_e===je&&(_e=null)),_e!==null){var ct=_e.actualBounds;for(it=kt.allocAt(ct.x+(it.x*ct.width-it.offsetX),ct.y+(it.y*ct.height-it.offsetY)),_e=_e.panel;_e!==je;)_e.transform.Ga(it),_e=_e.panel;_e=Te.x*ne.width+Te.offsetX-it.x,Te=Te.y*ne.height+Te.offsetY-it.y,kt.free(it)}else _e=Te.x*ne.width+Te.offsetX-(it.x*Ve+it.offsetX),Te=Te.y*ne.height+Te.offsetY-(it.y*Qe+it.offsetY);_e+=ne.x-x.x,Te+=ne.y-x.y,je.visible&&je.arrange(te+_e,fe+Te,Ve,Qe)}}Tn.free(ne)};function pv(a,y,x){var b=null;if(a instanceof Zn&&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,oa),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 it=0,ct=null;fe instanceof gr&&(ct=fe,it=ct.strokeWidth*ct.scale);var It=Math.max(_e.width+Ve,0);_e=Math.max(_e.height+Qe,0);var Mt=yv(fe),Gt=Mt.x*It+Mt.offsetX;Mt=Mt.y*_e+Mt.offsetY;var Zt=Sv(fe),$t=Zt.x*It+Zt.offsetX;for(Zt=Zt.y*_e+Zt.offsetY,isFinite(y)&&(Te=Math.max(Math.abs(Gt-$t)-it,0)),isFinite(x)&&(je=Math.max(Math.abs(Mt-Zt)-it,0)),it=Yn.alloc(),it.h(0,0),a=hh(a),Zt=0;Zt<ae;Zt++)Mt=b[Zt],Mt===fe||!Mt.visible&&Mt!==a||(_e=Mt.margin,It=_e.right+_e.left,Gt=_e.top+_e.bottom,Mt.measure(Te,je,0,0),_e=Mt.measuredBounds,It=Math.max(_e.width+It,0),_e=Math.max(_e.height+Gt,0),it.h(Math.max(It,it.width),Math.max(_e,it.height)));if(ae===1)E.width=It,E.height=_e,Yn.free(it);else{switch(Mt=yv(fe),Zt=Sv(fe),ae=b=0,Zt.x!==Mt.x&&Zt.y!==Mt.y&&(b=it.width/Math.abs(Zt.x-Mt.x),ae=it.height/Math.abs(Zt.y-Mt.y)),Yn.free(it),it=0,ct!==null&&(it=ct.strokeWidth*ct.scale,_v(ct)===yi&&(b=ae=Math.max(b,ae))),b+=Math.abs(Mt.offsetX)+Math.abs(Zt.offsetX)+it,ae+=Math.abs(Mt.offsetY)+Math.abs(Zt.offsetY)+it,ct=fe.stretch,ct===ar&&(ct=ml(fe,!1)),ct){case jn:ne=te=0;break;case Wn: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=Tn.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,uo(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=Fr),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&&(_r(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 Tn(te.x,te.y,te.width,te.height))));Tn.free(te)};function bm(){this.xa="Base",this.name="Table"}qe(bm,oa),bm.prototype.measure=function(a,y,x,b,E){for(var te=b.length,ne=Gn(),ae=Gn(),fe=0;fe<te;fe++){var _e=b[fe],Te=_e instanceof Zn?_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 it=je[Qe];Te.type===Zn.TableRow?it.row=_e.row:Te.type===Zn.TableColumn&&(it.column=_e.column),ne.push(it)}}else ne.push(_e)}te=ne.length,te===0&&(a.Fb(0),a.Eb(0));for(var ct=[],It=0;It<te;It++){var Mt=ne[It];Mt.visible&&(Js(Mt,!0),Hc(Mt,!0),ct[Mt.row]||(ct[Mt.row]=[]),ct[Mt.row][Mt.column]||(ct[Mt.row][Mt.column]=[]),ct[Mt.row][Mt.column].push(Mt))}Jn(ne);var Gt=Gn(),Zt=Gn(),$t=Gn(),en={count:0},vn={count:0},ni=y,pi=x,ci=a.rowDefs,$n=a.colDefs,Dn=null;te=ci.length;for(var nr=0;nr<te;nr++)Dn=ci[nr],Dn!==void 0&&(Dn.actual=0);te=$n.length;for(var Vi=0;Vi<te;Vi++)Dn=$n[Vi],Dn!==void 0&&(Dn.actual=0);for(var to=ct.length,To=0,ua=0;ua<to;ua++)ct[ua]&&(To=Math.max(To,ct[ua].length));var da=Math.min(a.topIndex,to-1),$a=Math.min(a.leftIndex,To-1),ca=0;to=ct.length;for(var Gh=hh(a),Hs=0;Hs<to;Hs++)if(ct[Hs]){To=ct[Hs].length;var fc=a.Fb(Hs);fc.actual=0;for(var Ya=fc.oc=0;Ya<To;Ya++)if(ct[Hs][Ya]){var Wh=a.Eb(Ya);Gt[Ya]===void 0&&(Wh.actual=0,Wh.oc=0,Gt[Ya]=!0);for(var au=ct[Hs][Ya],ju=au.length,Gl=0;Gl<ju;Gl++){var kl=au[Gl];if(kl.visible||kl===Gh){var Cd=1<kl.rowSpan||1<kl.columnSpan;Cd&&(Hs<da||Ya<$a||Zt.push(kl));var pc=kl.margin,Rp=pc.right+pc.left,Wl=pc.top+pc.bottom,Xa=lc(kl,fc,Wh,!1),Jg=kl.desiredSize,Hf=!isNaN(Jg.height),Nc=!isNaN(Jg.width)&&Hf;if(Cd||Xa===jn||Nc||Hs<da||Ya<$a||(en[Ya]!==void 0||Xa!==Wn&&Xa!==_i||(en[Ya]=-1,en.count++),vn[Hs]!==void 0||Xa!==Wn&&Xa!==Bi||(vn[Hs]=-1,vn.count++),$t.push(kl)),kl.measure(1/0,1/0,0,0),!(Hs<da||Ya<$a)){var Al=kl.measuredBounds,lf=Math.max(Al.width+Rp,0),Zl=Math.max(Al.height+Wl,0);if(kl.rowSpan===1&&(Xa===jn||Xa===_i)){Dn=a.Fb(Hs);var Pd=Dn.Wc();ca=Math.max(Zl-Dn.actual,0),ca+Pd>pi&&(ca=Math.max(pi-Pd,0));var Z0=Dn.oa===0;Dn.oc=Dn.oc+ca,Dn.actual=Dn.oa+ca,pi=Math.max(pi-(ca+(Z0?Pd:0)),0)}if(kl.columnSpan===1&&(Xa===jn||Xa===Bi)){Dn=a.Eb(Ya);var Qg=Dn.Wc();ca=Math.max(lf-Dn.actual,0),ca+Qg>ni&&(ca=Math.max(ni-Qg,0));var Hy=Dn.oa===0;Dn.oc=Dn.oc+ca,Dn.actual=Dn.oa+ca,ni=Math.max(ni-(ca+(Hy?Qg:0)),0)}Cd&&kl.Uj()}}}}}Jn(Gt);var Qc=0,ph=0;te=a.columnCount;for(var Uf=0;Uf<te;Uf++){var _d=$n[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=ci[Bp];Ed!==void 0&&(ph+=isNaN(Ed.Hc)?Ed.oc:Ed.Hc,Ed.oc!==0&&(ph+=Ed.Wc()))}ni=Math.max(y-Qc,0);var qc=pi=Math.max(x-ph,0),Zh=ni;te=$t.length;for(var Nl=0;Nl<te;Nl++){var Oc=$t[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;en[Oc.column]=gh.oc===0&&en[Oc.column]!==void 0?Math.max(Fp.width+uf,en[Oc.column]):null,vn[Oc.row]=K0.oc===0&&vn[Oc.row]!==void 0?Math.max(Fp.height+Ic,vn[Oc.row]):null}var Gf=0,jp=0,ec;for(ec in vn)ec!=="count"&&(Gf+=vn[ec]);for(ec in en)ec!=="count"&&(jp+=en[ec]);for(var wa=Yn.alloc(),qg=0;qg<te;qg++){var ul=$t[qg];if(ul.visible||ul===Gh){var Us=a.Fb(ul.row),cl=a.Eb(ul.column),mh=0;isFinite(cl.width)?mh=cl.width:(isFinite(ni)&&en[ul.column]!==null?jp===0?mh=cl.actual+ni:mh=en[ul.column]/jp*Zh:en[ul.column]!==null?mh=ni:mh=cl.actual||ni,mh=Math.max(0,mh-cl.Wc()));var Kh=0;switch(isFinite(Us.height)?Kh=Us.height:(isFinite(pi)&&vn[ul.row]!==null?Gf===0?Kh=Us.actual+pi:Kh=vn[ul.row]/Gf*qc:vn[ul.row]!==null?Kh=pi:Kh=Us.actual||pi,Kh=Math.max(0,Kh-Us.Wc())),wa.h(Math.max(cl.minimum,Math.min(mh,cl.maximum)),Math.max(Us.minimum,Math.min(Kh,Us.maximum))),Xa=lc(ul,Us,cl,!1),Xa){case _i:wa.height=Math.max(wa.height,Us.actual+pi);break;case Bi:wa.width=Math.max(wa.width,cl.actual+ni)}var cf=ul.margin,Uy=cf.right+cf.left,V0=cf.top+cf.bottom;ul.Uj(),ul.measure(wa.width,wa.height,cl.minimum,Us.minimum);var zp=ul.measuredBounds,hf=Math.max(zp.width+Uy,0),Wf=Math.max(zp.height+V0,0);isFinite(ni)&&(hf=Math.min(hf,wa.width)),isFinite(pi)&&(Wf=Math.min(Wf,wa.height));var Ol=0;Ol=Us.actual,Us.actual=Math.max(Us.actual,Wf),Us.oc=Math.max(Us.oc,Wf),ca=Us.actual-Ol,pi=Math.max(pi-ca,0),vn[ul.row]===null&&(qc=Math.max(qc-ca,0)),Ol=cl.actual,cl.actual=Math.max(cl.actual,hf),cl.oc=Math.max(cl.oc,hf),ca=cl.actual-Ol,ni=Math.max(ni-ca,0),en[ul.column]===null&&(Zh=Math.max(Zh-ca,0))}}Jn($t);var vh=Yn.alloc(),mc=Gn(),Pu=Gn();if(te=Zt.length,te!==0){for(var Ld=0;Ld<to;Ld++)if(ct[Ld]){To=ct[Ld].length;var Hp=a.Fb(Ld);mc[Ld]=Hp.actual;for(var Md=0;Md<To;Md++)if(ct[Ld][Md]){var $0=a.Eb(Md);Pu[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(wa.h(Math.max(zu.minimum,Math.min(y,zu.maximum)),Math.max(tc.minimum,Math.min(x,tc.maximum))),Xa=lc(Ps,tc,zu,!1),Xa){case Wn:Pu[zu.index]!==0&&(wa.width=Math.min(wa.width,Pu[zu.index])),mc[tc.index]!==0&&(wa.height=Math.min(wa.height,mc[tc.index]));break;case _i:Pu[zu.index]!==0&&(wa.width=Math.min(wa.width,Pu[zu.index]));break;case Bi:mc[tc.index]!==0&&(wa.height=Math.min(wa.height,mc[tc.index]))}isFinite(zu.width)&&(wa.width=zu.width),isFinite(tc.height)&&(wa.height=tc.height),vh.h(0,0);for(var Y0=zu.minimum,Kl=tc.minimum,Vh=1;Vh<Ps.rowSpan&&!(Ps.row+Vh>=a.rowCount);Vh++)Dn=a.Fb(Ps.row+Vh),ca=0,ca=Xa===Wn||Xa===Bi?Math.max(Dn.minimum,mc[Ps.row+Vh]===0?Dn.maximum:Math.min(mc[Ps.row+Vh],Dn.maximum)):Math.max(Dn.minimum,isNaN(Dn.Hc)?Dn.maximum:Math.min(Dn.Hc,Dn.maximum)),vh.height+=ca,Kl+=Dn.minimum;for(var Hu=1;Hu<Ps.columnSpan&&!(Ps.column+Hu>=a.columnCount);Hu++)Dn=a.Eb(Ps.column+Hu),ca=0,ca=Xa===Wn||Xa===_i?Math.max(Dn.minimum,Pu[Ps.column+Hu]===0?Dn.maximum:Math.min(Pu[Ps.column+Hu],Dn.maximum)):Math.max(Dn.minimum,isNaN(Dn.Hc)?Dn.maximum:Math.min(Dn.Hc,Dn.maximum)),vh.width+=ca,Y0+=Dn.minimum;wa.width+=vh.width,wa.height+=vh.height;var Gp=Ps.margin,Td=Gp.right+Gp.left,em=Gp.top+Gp.bottom;Ps.measure(wa.width,wa.height,Y0,Kl);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++)Dn=a.Fb(Ps.row+Zp),kd+=Dn.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++){Dn=a.Fb(Ps.row+yh);var Xh=Dn.oa||0,ff=Yh(Ps,Dn,eh);Dn.actual=Math.min(Dn.maximum,Xh+ff),Dn.oa!==Xh&&($h-=Dn.oa-Xh)}for(;0<$h;){var vc=Dn.oa||0;if(isNaN(Dn.height)&&Dn.maximum>vc&&(Dn.actual=Math.min(Dn.maximum,vc+$h),Dn.oa!==vc&&($h-=Dn.oa-vc)),Dn.index===0)break;Dn=a.Fb(Dn.index-1)}}for(var Zf=0,Jh=0;Jh<Ps.columnSpan&&!(Ps.column+Jh>=a.columnCount);Jh++)Dn=a.Eb(Ps.column+Jh),Zf+=Dn.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++){Dn=a.Eb(Ps.column+pf);var tm=Dn.oa||0,Wy=Sh(Ps,Dn,Gy);Dn.actual=Math.min(Dn.maximum,tm+Wy),Dn.oa!==tm&&(Kf-=Dn.oa-tm)}for(;0<Kf;){var X0=Dn.oa||0;if(isNaN(Dn.width)&&Dn.maximum>X0&&(Dn.actual=Math.min(Dn.maximum,X0+Kf),Dn.oa!==X0&&(Kf-=Dn.oa-X0)),Dn.index===0)break;Dn=a.Eb(Dn.index-1)}}}}Jn(Zt),Yn.free(vh),Yn.free(wa),mc!==void 0&&Jn(mc),Pu!==void 0&&Jn(Pu);var Vf=0,$f=0,J0=a.desiredSize,gx=a.maxSize;Xa=ml(a,!0);var nm=ph=Qc=0,im=0;te=a.columnCount;for(var Q0=0;Q0<te;Q0++)$n[Q0]!==void 0&&(Dn=a.Eb(Q0),isFinite(Dn.width)?(nm+=Dn.width,nm+=Dn.Wc()):Nm(Dn)===pg?(nm+=Dn.oa,nm+=Dn.Wc()):Dn.oa!==0&&(Qc+=Dn.oa,Qc+=Dn.Wc()));isFinite(J0.width)?Vf=Math.min(J0.width,gx.width):Vf=Xa!==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++)$n[q0]!==void 0&&(Dn=a.Eb(q0),isFinite(Dn.width)||Nm(Dn)===pg||(Dn.actual=Dn.oa*Qx),Dn.position=E.width,Dn.oa!==0&&(E.width+=Dn.oa,E.width+=Dn.Wc()));te=a.rowCount;for(var ev=0;ev<te;ev++)ci[ev]!==void 0&&(Dn=a.Fb(ev),isFinite(Dn.height)?(im+=Dn.height,im+=Dn.Wc()):Nm(Dn)===pg?(im+=Dn.oa,im+=Dn.Wc()):Dn.oa!==0&&(ph+=Dn.oa,ph+=Dn.Wc()));isFinite(J0.height)?$f=Math.min(J0.height,gx.height):$f=Xa!==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++)ci[tv]!==void 0&&(Dn=a.Fb(tv),isFinite(Dn.height)||Nm(Dn)===pg||(Dn.actual=Dn.oa*qx),Dn.position=E.height,Dn.oa!==0&&(E.height+=Dn.oa,E.height+=Dn.Wc()));te=ae.length;for(var Zy=0;Zy<te;Zy++){var rm=ae[Zy],Ky=0,Vy=0;rm.type===Zn.TableRow?(Ky=E.width,Dn=a.Fb(rm.row),Vy=Dn.actual):(Dn=a.Eb(rm.column),Ky=Dn.actual,Vy=E.height),rm.measuredBounds.h(0,0,Ky,Vy),Js(rm,!1)}Jn(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 it=Math.min(a.leftIndex,Te-1);if(0<ae.length){for(;it!==Te&&(ae[it]===void 0||ae[it].oa===0);)it++;it=Math.max(Math.min(it,Te-1),0),Ve=-ae[it].position}for(var ct=0,It=0;ct!==_e&&fe[ct]===void 0;)ct++;for(;It!==_e&&ae[It]===void 0;)It++;Te=a.part,a.Fb(ct),a.Eb(It);for(var Mt=0;Mt<y.length;Mt++){var Gt=y[Mt];if(Gt instanceof Zn&&Gt.visible&&Oh(Gt)){if(Gt.type===Zn.TableRow){ae=a.Fb(Gt.row);var Zt=a.Eb(It)}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(It,it))),Zt=Gt.measuredBounds,Gt.Uk(),Gt.actualBounds.ka();var $t=Gt.actualBounds,en=Tn.allocAt($t.x,$t.y,$t.width,$t.height);$t.x=Gt.type===Zn.TableRow?te:ae,$t.y=Gt.type===Zn.TableColumn?E:fe,$t.width=Zt.width,$t.height=Zt.height,Gt.actualBounds.freeze(),Hc(Gt,!1),vs(en,$t)||Te===null||(Te.oh(),Gt.Pn(Te)),Tn.free(en)}}for(Mt=Yn.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))),$t=0;$t<Te;$t++)if(ne[Gt][$t]){en=a.Eb($t),ae=en.position+Ve+te,en.oa!==0&&(ae+=en.Io(Math.max(It,it)));for(var vn=ne[Gt][$t],ni=vn.length,pi=0;pi<ni;pi++){var ci=vn[pi],$n=ci.measuredBounds;Mt.h(0,0);for(var Dn=1;Dn<ci.rowSpan&&!(Gt+Dn>=a.rowCount);Dn++){var nr=a.Fb(Gt+Dn);nr.oa!==0&&(Mt.height+=nr.total)}for(Dn=1;Dn<ci.columnSpan&&!($t+Dn>=a.columnCount);Dn++)nr=a.Eb($t+Dn),nr.oa!==0&&(Mt.width+=nr.total);var Vi=en.oa+Mt.width,to=Zt.oa+Mt.height;Dn=ae,nr=fe;var To=Vi,ua=to,da=ae,$a=fe,ca=Vi,Gh=to;ae+Vi>x.width&&(ca=Math.max(x.width-ae,0)),fe+to>x.height&&(Gh=Math.max(x.height-fe,0));var Hs=ci.alignment;if(Hs.Xb()){Hs=a.defaultAlignment,Hs.sb()||(Hs=Fr);var fc=Hs.x,Ya=Hs.y,Wh=Hs.offsetX;Hs=Hs.offsetY;var au=en.alignment,ju=Zt.alignment;au.sb()&&(fc=au.x,Wh=au.offsetX),ju.sb()&&(Ya=ju.y,Hs=ju.offsetY)}else fc=Hs.x,Ya=Hs.y,Wh=Hs.offsetX,Hs=Hs.offsetY;(isNaN(fc)||isNaN(Ya))&&(Ya=fc=.5,Hs=Wh=0),au=$n.width,ju=$n.height;var Gl=ci.margin,kl=Gl.left+Gl.right,Cd=Gl.top+Gl.bottom,pc=lc(ci,Zt,en,!1);!isNaN(ci.desiredSize.width)||pc!==Wn&&pc!==_i||(au=Math.max(Vi-kl,0)),!isNaN(ci.desiredSize.height)||pc!==Wn&&pc!==Bi||(ju=Math.max(to-Cd,0)),Vi=ci.maxSize,to=ci.minSize,au=Math.min(Vi.width,au),ju=Math.min(Vi.height,ju),au=Math.max(to.width,au),ju=Math.max(to.height,ju),Vi=ju+Cd,Dn+=To*fc-(au+kl)*fc+Wh+Gl.left,nr+=ua*Ya-Vi*Ya+Hs+Gl.top,ci.visible&&(_r(da,$a,ca,Gh,Dn,nr,$n.width,$n.height)?ci.arrange(Dn,nr,au,ju):ci.arrange(Dn,nr,au,ju,new Tn(da,$a,ca,Gh)))}}}for(Yn.free(Mt),a=0;a<b;a++)x=y[a],te=x instanceof Zn?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,oa),Cm.prototype.measure=function(){},Cm.prototype.arrange=function(){};function Pm(){this.xa="Base"}qe(Pm,oa),Pm.prototype.measure=function(){},Pm.prototype.arrange=function(){};function _m(){this.xa="Base"}qe(_m,oa),_m.prototype.measure=function(a,y,x,b,E,te,ne){1<b.length&&zt("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),it=1;a.viewboxStretch===yi?je!==0&&ae!==0&&(it=Math.min(Ve/je,Qe/ae)):je!==0&&ae!==0&&(it=Math.max(Ve/je,Qe/ae)),it===0&&(it=1e-4),b.Ca*=it,Te!==b.scale&&(Js(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=Fr),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,oa),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=[],it=a.O.s,ct=it.length,It=0;It<ct;It++){var Mt=it[It],Gt=[];if(Qe.push(Gt),Mt.visible){var Zt=Mt.interval;if(!(0>Zt)){Mt=mv(Mt.figure);for(var $t=0;$t<ct;$t++)if($t!==It){var en=it[$t];en.visible&&mv(en.figure)===Mt&&(en=en.interval,en>Zt&&Gt.push(en))}}}}for(it=a.O.s,ct=it.length,It=0;It<ct;It++){var vn=it[It];if(vn.visible&&(Gt=vn.interval||1,Mt=Math.abs(Gt),!(2>E*Mt*x))){if(Zt=vn.segmentIndex,(!isFinite(Zt)||isNaN(Zt))&&(Zt=0),0>Zt&&(Zt=Mt-Math.min(-Zt,Mt)),Zt=Math.round(Zt%Mt),Mt=vn.opacity,$t=1,Mt!==1){if(Mt===0)continue;$t=y.globalAlpha,y.globalAlpha=$t*Mt}en=Qe[It];var ni=!1,pi=vn.strokeDashArray;if(pi!==null&&(ni=!0,y.js(pi,vn.strokeDashOffset)),vn.figure==="LineV"&&vn.stroke!==null&&0<vn.strokeWidth){for(y.lineWidth=vn.strokeWidth,xs(a,y,vn.stroke,!1,!1,te,ne),y.beginPath(),pi=vn=Math.floor((Ve-E)/E);pi<=vn+_e;pi++){var ci=pi*E+Ve;0<=ci&&ci<=ae&&Em(pi,Gt,Zt,en)&&(y.moveTo(ci,0),y.lineTo(ci,fe))}y.stroke(),y.Se()}else if(vn.figure==="LineH"&&vn.stroke!==null&&0<vn.strokeWidth){for(y.lineWidth=vn.strokeWidth,xs(a,y,vn.stroke,!1,!1,te,ne),y.beginPath(),pi=vn=Math.floor((je-b)/b);pi<=vn+Te;pi++)ci=pi*b+je,0<=ci&&ci<=fe&&Em(pi,Gt,Zt,en)&&(y.moveTo(0,ci),y.lineTo(ae,ci));y.stroke(),y.Se()}else if(vn.figure==="BarV"&&vn.fill!==null)for(xs(a,y,vn.fill,!0,!1,te,ne),vn=vn.width,isNaN(vn)&&(vn=E),ci=pi=Math.floor((Ve-E)/E);ci<=pi+_e;ci++){var $n=ci*E+Ve;0<=$n+vn&&$n<=ae&&Em(ci,Gt,Zt,en)&&y.fillRect($n,0,vn,fe)}else if(vn.figure==="BarH"&&vn.fill!==null)for(xs(a,y,vn.fill,!0,!1,te,ne),vn=vn.height,isNaN(vn)&&(vn=b),ci=pi=Math.floor((je-b)/b);ci<=pi+Te;ci++)$n=ci*b+je,0<=$n+vn&&$n<=fe&&Em(ci,Gt,Zt,en)&&y.fillRect(0,$n,ae,vn);ni&&y.fs(),Mt!==1&&(y.globalAlpha=$t)}}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,oa),Lm.prototype.measure=function(a,y,x,b,E){var te=b.length;if(a instanceof Qr||a instanceof Xn){var ne=null,ae=null;if(a instanceof Xn&&(ne=a),a instanceof Qr&&(ae=a,ne=ae.adornedPart,a.j===null&&(a.j=[])),ne instanceof Xn){var fe=ne;if(te===0)Os(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 it=_e.measuredBounds;x.ed(it),Qe.push(it)}it=mr.alloc();for(var ct=kt.alloc(),It=kt.alloc(),Mt=0;Mt<te;Mt++){var Gt=b[Mt];if(Gt!==_e)if(Gt.isPanelMain&&Gt instanceof gr){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 $t=Gt.segmentIndex,en=Gt.segmentFraction,vn=Gt.alignmentFocus;vn.Mc()&&(vn=Fr);var ni=Gt.segmentOrientation,pi=Gt.segmentOffset;if(isNaN($t)){var ci=fe.ua;Zt=Gn(),ci.Qu(en,Zt);var $n=kt.allocAt(Zt[0],Zt[1]);if($n.add(fe.i(0)),ci.type===Qn.j?$n.offset(-ci.startX,-ci.startY):(ci=ci.figures.first(),ci!==null&&$n.offset(-ci.startX,-ci.startY)),ci=Zt[2],ni!==rl){var Dn=fe.computeAngle(Gt,ni,ci);Gt.Kb=Dn}Dn=$n.x-y.x;var nr=$n.y-y.y;kt.free($n),Jn(Zt)}else if($t<-je||$t>=je)Zt=kt.alloc(),fe.vg(),fe.computeMidPoint(Zt),ci=fe.midAngle,ni!==rl&&(Dn=fe.computeAngle(Gt,ni,ci),Gt.Kb=Dn),Dn=Zt.x-y.x,nr=Zt.y-y.y,kt.free(Zt);else{if(Dn=0,0<=$t?(nr=Te.M($t),Zt=$t<je-1?Te.M($t+1):nr):(Dn=je+$t,nr=Te.M(Dn),Zt=0<Dn?Te.M(Dn-1):nr),nr.Xa(Zt)){0<=$t?(ci=0<$t?Te.M($t-1):nr,Dn=$t<je-2?Te.M($t+2):Zt):(ci=Dn<je-1?Te.M(Dn+1):nr,Dn=1<Dn?Te.M(Dn-2):Zt),$n=ci.Bf(nr);var Vi=Zt.Bf(Dn);ci=$n>Vi+10?0<=$t?ci.ab(nr):nr.ab(ci):Vi>$n+10?0<=$t?Zt.ab(Dn):Dn.ab(Zt):0<=$t?ci.ab(Dn):Dn.ab(ci)}else ci=0<=$t?nr.ab(Zt):Zt.ab(nr);ni!==rl&&(Dn=fe.computeAngle(Gt,ni,ci),Gt.Kb=Dn),Dn=nr.x+(Zt.x-nr.x)*en-y.x,nr=nr.y+(Zt.y-nr.y)*en-y.y}Gt.measure(1/0,1/0,0,0),Zt=Gt.measuredBounds,$n=Gt.naturalBounds;var to=0;Gt instanceof gr&&(to=Gt.strokeWidth),Vi=$n.width+to;var To=$n.height+to;it.reset(),it.translate(-Zt.x,-Zt.y),it.scale(Gt.scale,Gt.scale),it.rotate(ni===rl?Gt.angle:ci,Vi/2,To/2),ni!==Pg&&ni!==Eg||it.rotate(90,Vi/2,To/2),ni!==_g&&ni!==Lg||it.rotate(-90,Vi/2,To/2),ni===i0&&(45<ci&&135>ci||225<ci&&315>ci)&&it.rotate(-ci,Vi/2,To/2),$n=new Tn(0,0,Vi,To),ct.xi($n,vn),it.Ga(ct),vn=-ct.x+to/2*Gt.scale,Gt=-ct.y+to/2*Gt.scale,It.assign(pi),to=isNaN(pi.x);var ua=isNaN(pi.y);if(to||ua){Vi=Vi/2+3,To=To/2+3;var da=45<=ci&&135>=ci,$a=225<=ci&&315>=ci;ni===rl&&(da||$a)?(It.x=ua?Vi:pi.y,It.y=to?To:pi.x,da?0<=$t||isNaN($t)&&.5>en||!to||(It.y=-To):$a&&((0<=$t||isNaN($t)&&.5>en)&&to&&(It.y=-To),ua&&(It.x=-Vi))):(to&&(It.x=0<=$t||isNaN($t)&&.5>en?Vi:-Vi),ua&&(It.y=-To),It.rotate(ci))}else It.rotate(ci);Dn+=It.x,nr+=It.y,$n.set(Zt),$n.h(Dn+vn,nr+Gt,Zt.width,Zt.height),Qe.push($n),x.ed($n)}}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),Os(E,x.width||0,x.height||0),mr.free(it),kt.free(ct),kt.free(It)}}}},Lm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Qr||a instanceof Xn){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 Xn)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,it=Gn();Qe.Qu(fe,it);var ct=kt.allocAt(it[0],it[1]);ct.add(je.i(0)),Qe.type===Qn.j||(Qe=Qe.figures.first()),ct.offset(-Qe.startX,-Qe.startY),Qe=it[2],_e!==rl&&(je=je.computeAngle(ne,_e,Qe),ne.angle=je),je=ct.x;var It=ct.y;kt.free(ct),Jn(it)}else if(ae<-x||ae>=x)it=kt.alloc(),Qe=je,It=it,Qe.vg(),Qe.computeMidPoint(It),Qe=je.midAngle,_e!==rl&&(je=je.computeAngle(ne,_e,Qe),ne.angle=je),je=it.x,It=it.y,kt.free(it);else{if(ct=0,0<=ae?(it=y.s[ae],It=ae<x-1?y.s[ae+1]:it):(ct=x+ae,it=y.s[ct],It=0<ct?y.s[ct-1]:it),it.Xa(It)){0<=ae?(Qe=0<ae?y.s[ae-1]:it,ct=ae<x-2?y.s[ae+2]:It):(Qe=ct<x-1?y.s[ct+1]:it,ct=1<ct?y.s[ct-2]:It);var Mt=Qe.Bf(it),Gt=It.Bf(ct);Qe=Mt>Gt+10?0<=ae?Qe.ab(it):it.ab(Qe):Gt>Mt+10?0<=ae?It.ab(ct):ct.ab(It):0<=ae?Qe.ab(ct):ct.ab(Qe)}else Qe=0<=ae?it.ab(It):It.ab(it);_e!==rl&&(je=je.computeAngle(ne,_e,Qe),ne.angle=je),je=it.x+(It.x-it.x)*fe,It=it.y+(It.y-it.y)*fe}if(Ve.ys())ne.location=new kt(je,It);else{Ve.Mc()&&(Ve=Fr),it=mr.alloc(),it.reset(),it.scale(ne.scale,ne.scale),it.rotate(ne.angle,0,0);var Zt=ne.naturalBounds;ct=Tn.allocAt(0,0,Zt.width,Zt.height),Mt=kt.alloc(),Mt.xi(ct,Ve),it.Ga(Mt),Ve=-Mt.x,Gt=-Mt.y;var $t=Zt.width,en=Zt.height;Zt=kt.alloc(),Zt.assign(Te);var vn=isNaN(Te.x),ni=isNaN(Te.y);if(vn||ni){$t=$t/2+3,en=en/2+3;var pi=45<=Qe&&135>=Qe,ci=225<=Qe&&315>=Qe;_e===rl&&(pi||ci)?(Zt.x=ni?$t:Te.y,Zt.y=vn?en:Te.x,pi?0<=ae||isNaN(ae)&&.5>fe||!vn||(Zt.y=-en):ci&&((0<=ae||isNaN(ae)&&.5>fe)&&vn&&(Zt.y=-en),ni&&(Zt.x=-$t))):(vn&&(Zt.x=0<=ae||isNaN(ae)&&.5>fe?$t:-$t),ni&&(Zt.y=-en),Zt.rotate(Qe))}else Zt.rotate(Qe);je+=Zt.x,It+=Zt.y,it.pp(ct),Ve+=ct.x,Gt+=ct.y,ae=kt.allocAt(je+Ve,It+Gt),ne.move(ae),kt.free(ae),kt.free(Zt),kt.free(Mt),Tn.free(ct),mr.free(it)}}E!==null?E.Ul(!1):b.Ul(!1),b=O1(a),a.location.h(a.position.x+b.x,a.position.y+b.y),kt.free(b)}};function r1(a,y,x,b){if(iu(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof Qr&&a.type===Zn.Link&&a.adornedObject instanceof gr&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof Xn&&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),Js(b,!1)}}function dg(){this.xa="Base"}qe(dg,oa),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 Tn(-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,it=ae.strokeWidth,ct=Qe.flattenedSegments,It=Qe.flattenedLengths,Mt=Qe.flattenedTotalLength,Gt=ct.length,Zt=0,$t=0,en=Gn(),vn=0;vn<Gt;vn++){var ni=ct[vn],pi=[];$t=Zt=0;for(var ci=ni.length,$n=0;$n<ci;$n+=2){var Dn=ni[$n],nr=ni[$n+1];if($n!==0){var Vi=180*Math.atan2(nr-$t,Dn-Zt)/Math.PI;0>Vi&&(Vi+=360),pi.push(Vi)}Zt=Dn,$t=nr}en.push(pi)}if(a.graduatedIntervals===null){for(var to=[],To=a.O.s,ua=To.length,da=0;da<ua;da++){var $a=To[da],ca=[];if(to.push(ca),$a.visible){var Gh=$a.interval;if(!(0>Gh)){for(var Hs=0;Hs<ua;Hs++)if(Hs!==da){var fc=To[Hs];if(fc.visible&&$a.constructor===fc.constructor){var Ya=fc.interval;Ya>Gh&&ca.push(Ya)}}}}}a.graduatedIntervals=to}var Wh=a.graduatedIntervals,au=a.O.s,ju=au.length,Gl=0,kl=0,Cd=Mt;a.graduatedMarks=[];for(var pc,Rp=0;Rp<ju;Rp++){var Wl=au[Rp];if(pc=[],Wl.visible&&Wl!==ae){var Xa=Math.abs(Wl.interval),Jg=a.graduatedTickUnit;if(!(2>Jg*Xa*Mt/a.graduatedRange&&Wl.graduatedSkip===null)){var Hf=It[0][0],Nc=0,Al=0;kl=Mt*Wl.graduatedStart-1e-4,Cd=Mt*Wl.graduatedEnd+1e-4;var lf=Jg*Xa,Zl=a.graduatedTickBase;if(Zl<a.graduatedMin){var Pd=(a.graduatedMin-Zl)/lf;Pd=Pd%1===0?Pd:Math.floor(Pd+1),Zl+=Pd*lf}else Zl>a.graduatedMin+lf&&(Zl-=Math.floor((Zl-a.graduatedMin)/lf)*lf);for(var Z0=Wh[Rp],Qg=Zl,Hy=1e-6*a.graduatedMax,Qc=1;Zl<=a.graduatedMax+Hy;Qc++){e:{for(var ph=Z0.length,Uf=0;Uf<ph;Uf++){var _d=(Zl-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&&(Zl>a.graduatedMax&&(Zl=a.graduatedMax),Wl.graduatedSkip===null||Wl instanceof Ao&&!Wl.graduatedSkip(Zl,Wl)||Wl instanceof gr&&!Wl.graduatedSkip(Zl,Wl))&&(Gl=(Zl-a.graduatedMin)*Mt/a.graduatedRange,Gl>Mt&&(Gl=Mt),kl<=Gl&&Gl<=Cd)){for(var qc=en[Nc][Al],Zh=It[Nc][Al];Nc<It.length;){for(;Gl>Hf&&Al<It[Nc].length-1;)Al++,qc=en[Nc][Al],Zh=It[Nc][Al],Hf+=Zh;if(Gl<=Hf)break;Nc++,Al=0,qc=en[Nc][Al],Zh=It[Nc][Al],Hf+=Zh}var Nl=ct[Nc],Oc=Nl[2*Al],K0=Nl[2*Al+1],gh=(Gl-(Hf-Zh))/Zh,Fp=new kt(Oc+(Nl[2*Al+2]-Oc)*gh+it/2-Qe.bounds.x,K0+(Nl[2*Al+3]-K0)*gh+it/2-Qe.bounds.y);Fp.scale(ae.scale,ae.scale);e:{var gc=qc,uf=en[Nc];if(!(.5005>gh&&.4995<gh)){var Ic=gc;if(.5>gh?0<Al?Ic=uf[Al-1]:on.$(Nl[0],Nl[Nl.length-2])&&on.$(Nl[1],Nl[Nl.length-1])&&(Ic=uf[uf.length-1]):.5<gh&&(Al+1<uf.length?Ic=uf[Al+1]:on.$(Nl[0],Nl[Nl.length-2])&&on.$(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(Wl instanceof Ao){var ec="";Wl.graduatedFunction!==null?(ec=Wl.graduatedFunction(Zl,Wl),ec=ec!=null?ec.toString():""):ec=(+Zl.toFixed(2)).toString(),ec!==""&&pc.push({$l:Fp,angle:qc,text:ec})}else pc.push({$l:Fp,angle:qc})}Zl=Qg+Qc*lf}}}a.graduatedMarks.push(pc)}Jn(en);var wa=a.graduatedMarks;if(wa!==null)for(var qg=b.length,ul=0;ul<qg;ul++){var Us=b[ul],cl=wa[ul];if(Us.visible&&Us!==ae&&cl.length!==0){if(Us instanceof gr){var mh=a,Kh=E,cf=Us.alignmentFocus;cf.Mc()&&(cf=Qa);var Uy=Us.angle;Us.Kb=0,Us.measure(1/0,1/0,0,0),Us.Kb=Uy;var V0=Us.measuredBounds,zp=V0.width,hf=V0.height,Wf=Tn.allocAt(0,0,zp,hf),Ol=kt.alloc();Ol.xi(Wf,cf),Tn.free(Wf);for(var vh=-Ol.x,mc=-Ol.y,Pu=new Tn,Ld=cl.length,Hp=0;Hp<Ld;Hp++)for(var Md=cl[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+Us.angle),Ol.offset($0,Up),Hp===0&&tc===0?Pu.h(Ol.x,Ol.y,0,0):Pu.Ye(Ol),Ol.offset(-$0,-Up),Ol.rotate(-Ps-Us.angle)}kt.free(Ol),mh.graduatedBounds!==null&&mh.graduatedBounds.push(Pu),uo(Kh,Pu.x,Pu.y,Pu.width,Pu.height)}else if(Us instanceof Ao){var zu=a,Y0=E;zu.temporaryTextBlock===null&&(zu.temporaryTextBlock=new Ao);var Kl=zu.temporaryTextBlock;S1(Kl,Us);var Vh=Us.alignmentFocus;Vh.Mc()&&(Vh=Qa);for(var Hu=Us.segmentOrientation,Gp=Us.segmentOffset,Td=new Tn,em=0,Wp=0,Dc=0,df=0,kd=0,Zp=cl.length,$h=0;$h<Zp;$h++){var eh=cl[$h];em=eh.$l.x,Wp=eh.$l.y,Dc=eh.angle,kd=df=Us.angle,Hu!==rl&&(kd=Hu===Cg||Hu===n0?Dc+Us.angle:Dc,df=Xn.computeAngle(Hu,kd)),Kl.Kb=df,Kl.text=eh.text||"",Kl.measure(1/0,1/0,0,0);var Yh=Kl.measuredBounds,yh=Kl.naturalBounds,Xh=yh.width,ff=yh.height,vc=mr.alloc();vc.reset(),vc.translate(-Yh.x,-Yh.y),vc.scale(Kl.scale,Kl.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=Tn.allocAt(0,0,Xh,ff),Jh=kt.alloc();Jh.xi(Zf,Vh),vc.Ga(Jh);var Kf=-Jh.x,Gy=-Jh.y,Sh=kt.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 Tn(em,Wp,Yh.width,Yh.height),tm=new Tn(Yh.x,Yh.y,Yh.width,Yh.height),Wy=new Tn(yh.x,yh.y,yh.width,yh.height);eh.Sz=df,eh.lineCount=Kl.lineCount,eh.lines=[Kl.Cb,Kl.Ih,Kl.df,Kl.Le,Kl.Qc,Kl.Qb,Kl.ze],eh.actualBounds=pf,eh.measuredBounds=tm,eh.naturalBounds=Wy,$h===0?Td.assign(pf):Td.ed(pf),kt.free(Sh),kt.free(Jh),Tn.free(Zf),mr.free(vc)}zu.graduatedBounds!==null&&zu.graduatedBounds.push(Td),uo(Y0,Td.x,Td.y,Td.width,Td.height)}Js(Us,!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 zl,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],it=Qe.length;if(Ve.visible&&Ve!==te&&Qe.length!==0){if(Ve instanceof gr){if(!(2>a.graduatedTickUnit*Ve.interval*te.geometry.flattenedTotalLength/a.graduatedRange*ne&&Ve.graduatedSkip===null)){var ct=Ve.measuredBounds,It=Ve.strokeWidth*Ve.scale,Mt=Ve.alignmentFocus;Mt.Mc()&&(Mt=Qa);for(var Gt=0;Gt<it;Gt++){var Zt=Qe[Gt].$l,$t=Qe[Gt].angle,en=Mt,vn=Ve.Ab;vn.reset(),vn.translate(Zt.x+ae.x,Zt.y+ae.y),vn.rotate($t+Ve.angle,0,0),vn.translate(-ct.width*en.x+en.offsetX+It/2,-ct.height*en.y+en.offsetY+It/2),vn.scale(Ve.scale,Ve.scale),Iu(Ve,!1),Ve.wh.set(Ve.Ab),Ve.Kk=Ve.scale,vu(Ve,!1),Ve.gc(y,x),E&&(a.svg.appendChild(Ve.svg),Ve.svg=null),Ve.Ab.reset()}}}else if(Ve instanceof Ao)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Ao),ct=a.temporaryTextBlock,S1(ct,Ve),It=0;It<it;It++)Mt=Qe[It],Mt.actualBounds&&Mt.measuredBounds&&Mt.naturalBounds&&(ct.ec=Mt.text||"",ct.Kb=Mt.Sz||0,ct.Gc=Mt.lineCount||0,Gt=Mt.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]),Mt.naturalBounds&&(ct.dc=Mt.naturalBounds),Mt.actualBounds&&(Gt=Mt.actualBounds,ct.arrange(Gt.x,Gt.y,Gt.width,Gt.height)),Gt=Mt.actualBounds,ct.arrange(Gt.x,Gt.y,Gt.width,Gt.height),Zt=Mt.measuredBounds,Mt=Mt.naturalBounds,$t=ct.Ab,$t.reset(),$t.translate(Gt.x+ae.x,Gt.y+ae.y),$t.translate(-Zt.x,-Zt.y),ct.no($t,Mt.x,Mt.y,Mt.width,Mt.height),Iu(ct,!1),ct.wh.set(ct.Ab),ct.Kk=ct.scale,vu(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 Zn(a,y){if(nn.call(this),this.na=null,a===void 0)this.na=Zn.Position;else if(typeof a=="string"){var x=$u.I(a);x!==null&&(this.na=x)}else a instanceof oa?this.na=a:a&&(this.na=Zn.Position,y=a);this.na===null&&zt("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Zn.Grid?1048576:0),this.O=new On,this.yb=ba,this.Tm=ro,this.Uf=ar,this.$g=null,this.$e="",this.jg=new Tn(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=yi,this.jn=is,this.kn=Pr,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}qe(Zn,nn),Zn.prototype.cloneProtected=function(a){nn.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},Zn.prototype.Af=function(a){nn.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},Zn.prototype.copy=function(){var a=nn.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 ii&&(te.Te=!0);var ae=a.diagram;ae!==null&&ae.undoManager.isUndoingRedoing||te.cb(ps,"elements",a,null,E,null,ne)}}return a}return null},rt=Zn.prototype,rt.toString=function(){return"Panel("+this.type.name+")#"+Cr(this)},rt.Pn=function(a){nn.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,b=0;b<x;b++)y[b].Pn(a)},rt.hh=function(a,y){if(this.na===Zn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Zn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Zn.Table)if(a.yc(),a instanceof zl){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===Zn.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){xs(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(),it=je.separatorStrokeWidth;isNaN(it)&&(it=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ct=je.separatorStroke;ct===null&&(ct=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(ct===null||je.index===(x?fe:_e))&&(it=0),Qe-=it,it=je.position+it,Qe+=je.actual,it+Qe>Ve&&(Qe=Ve-it),0>=Qe||(Ve=a.yb,xs(a,y,je.background,!0,!1,ae,ne),x?y.fillRect(Ve.left,it+Ve.top,ne.width-(Ve.left+Ve.right),Qe):y.fillRect(it+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"}rt.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},rt.kk=function(a,y,x){if(!nn.prototype.kk.call(this,a,y,x))return!1;if(this.type===Zn.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===Zn.Grid||this.na===Zn.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},rt.nk=function(){return!0},rt.$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 nn.prototype.$o.call(this,a,y,x,b)},rt.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,on.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=on.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=kt.alloc(),Ve=null,y=1/0;var it=null,ct=this.isClipping&&this.na===Zn.Spot;ct&&(it=kt.alloc(),Ve=this.Pb(),(_e=Ve.Sj(ae,a,fe,x,it))&&(y=(ae-it.x)*(ae-it.x)+(a-it.y)*(a-it.y)));for(var It=0;It<Qe;It++){var Mt=je[It];Mt.visible&&Mt!==Ve&&Mt.Sj(ae,a,fe,x,Te)&&(_e=!0,Mt=(ae-Te.x)*(ae-Te.x)+(a-Te.y)*(a-Te.y),Mt<b&&(b=Mt,E.set(Te)))}return ct&&(y>b&&E.set(it),kt.free(it)),kt.free(Te),te&&E.transform(ne),_e},rt.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();nn.prototype.Gj.call(this)},rt.v=function(a){if(!iu(this)){nn.prototype.v.call(this,a),a=null,(this.na===Zn.Auto||this.na===Zn.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=ml(E,!1);(E instanceof il||E instanceof Zn||E instanceof Ao||te!==jn)&&E.v(!0)}}}},rt.Uj=function(){if(!iu(this)){Js(this,!0),Hc(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},rt.Uk=function(){if(!(this.l&2048)){Iu(this,!0),vu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},rt.Wu=function(){vu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},rt.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),Os(E,a,fe),Os(this.naturalBounds,a,fe),this.Ge(0,0,a,fe)},rt.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}rt.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=ml(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 Wn: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)}},rt.gh=function(a){var y=this.naturalBounds,x=hh(this);if(_r(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=kt.allocAt(0,0);b--;){var te=y[b];if((te.visible||te===x)&&(Tr(E.set(a),te.transform),te.ca(E)))return kt.free(E),!0}return kt.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},rt.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},rt.qm=function(a,y){if(y(this,a),a instanceof Zn){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 Zn&&a1(a,te,x)}}function yx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof Zn){y=y.O.s;for(var b=y.length,E=0;E<b;E++)l1(a,y[E],x)}}rt.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof Zn){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}rt.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 Zn){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 Zn?x=Math.max(x,c1(E)):E instanceof gr&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}rt.se=function(){return!(this.type===Zn.TableRow||this.type===Zn.TableColumn)};function Oh(a){return a.type===Zn.TableRow||a.type===Zn.TableColumn}rt.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),tl(this)))return null;var b=this.naturalBounds,E=1/this.Df(),te=this.se(),ne=te?a:Tr(kt.allocAt(a.x,a.y),this.transform),ae=this.diagram,fe=10,_e=5;if(ae!==null&&(fe=ae.Ql("extraTouchArea"),_e=fe/2),_r(-(_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=kt.alloc(),_e=(fe=this.isClipping&&this.na===Zn.Spot)?this.Pb():null,fe&&(_e.se()?Tr(ae.set(a),_e.transform):ae.set(a),!_e.ca(ae)))return kt.free(ae),te||kt.free(ne),null;for(var je=hh(this);Te--;){var Ve=E[Te];if((Ve.visible||Ve===je)&&(Ve.se()?Tr(ae.set(a),Ve.transform):ae.set(a),!fe||Ve!==_e)){var Qe=null;if(Ve instanceof Zn?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 kt.free(ae),te||kt.free(ne),Qe}}kt.free(ae)}return this.background===null&&this.areaBackground===null?(te||kt.free(ne),null):(a=_r(0,0,b.width,b.height,ne.x,ne.y)?this:null,te||kt.free(ne),a)}return te||kt.free(ne),null},rt.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:Tr(kt.allocAt(a.x,a.y),this.transform);if(E=_r(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=kt.alloc(),Te=hh(this);fe--;){var je=ae[fe];if(je.visible||je===Te){je.se()?Tr(_e.set(a),je.transform):_e.set(a);var Ve=je;je=je instanceof Zn?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))}}kt.free(_e)}return te||kt.free(ne),E&&(this.background!==null||this.areaBackground!==null)}return te||kt.free(ne),!1},rt.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=mr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&mr.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 Zn?Te:null,Ve=mr.alloc(),Ve.set(ne),(Te!==null?Te.Cf(a,y,x,b,E,Ve):la(je,a,b,Ve))&&(y!==null&&(je=y(je)),je===null||x!==null&&!x(je)||E.add(je)),mr.free(Ve))}}return te===void 0&&mr.free(ne),b}return te===void 0&&mr.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 Zn&&vv(ne,y,x,b),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||b.add(ne))}}}rt.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:Tr(kt.allocAt(a.x,a.y),this.transform),_e=ae?y:Tr(kt.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||Io(fe.x,fe.y,0,0,0,ne.height)<=Te||Io(fe.x,fe.y,0,ne.height,ne.width,ne.height)<=Te||Io(fe.x,fe.y,ne.width,ne.height,ne.width,0)<=Te||Io(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||(kt.free(fe),kt.free(_e)),je){if(!this.isAtomic){fe=kt.alloc(),_e=kt.alloc(),Te=hh(this);for(var Ve=this.O.s,Qe=Ve.length;Qe--;){var it=Ve[Qe];if(it.visible||it===Te){var ct=it.actualBounds,It=this.naturalBounds;(!ae||!(ct.x>It.width||ct.y>It.height||0>ct.x+ct.width||0>ct.y+ct.height))&&(it.se()?(ct=it.transform,Tr(fe.set(a),ct),Tr(_e.set(y),ct)):(fe.set(a),_e.set(y)),ct=it,it=it instanceof Zn?it:null,(it!==null?it.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)))}}kt.free(fe),kt.free(_e)}return E?je:ne}return!1};function yv(a){var y=null;return a instanceof gr&&(y=a.spot1,y===ro&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=$s),y}function Sv(a){var y=null;return a instanceof gr&&(y=a.spot2,y===ro&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Ta),y}rt.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},rt.M=function(a){return this.O.M(a)},rt.Gb=function(a,y){y instanceof ki&&zt("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&zt("Cannot make a Panel contain itself: "+this.toString()),zt("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&zt("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!==Zn.Grid||y instanceof gr||zt("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Zn.Graduated||y instanceof gr||y instanceof Ao||zt("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 hi),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 zt("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 Zn&&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 ii&&(x.Te=!0),x.Te&&x instanceof ii&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(us,"elements",this,y,null,b,null),x.cb(ps,"elements",this,null,y,null,a)))};function xv(a,y){a.l=y?a.l|16777216:a.l&-16777217}rt.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)},rt.mb=function(a){0<=a&&this.pc(a,!0)},rt.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),Js(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 ii&&(b instanceof Zn?b.qm(b,function(ne,ae){Gv(te,ae,y)}):Gv(te,b,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||te.cb(us,"elements",this,b,null,a,null))},rt.Fb=function(a){0>a&&Cn(a,">= 0",Zn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Qs;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(ps,"rowdefs",this,null,x,null,a)}return y[a]},rt.oA=function(a){if(0>a&&Cn(a,">= 0",Zn,"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(us,"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 Qs?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}rt.Eb=function(a){0>a&&Cn(a,">= 0",Zn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Qs;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(ps,"coldefs",this,null,x,null,a)}return y[a]},rt.jA=function(a){if(0>a&&Cn(a,">= 0",Zn,"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(us,"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 Qs?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}rt.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},rt.Hy=function(a,y){return(a=this.Fb(a))&&Am(a,new Qs(y)),this},rt.By=function(a,y){return(a=this.Eb(a))&&Am(a,new Qs(y)),this},rt.nz=function(a){if(0>a||this.type!==Zn.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},rt.fz=function(a){if(0>a||this.type!==Zn.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},rt.Fz=function(a,y){if(y===void 0&&(y=new kt(NaN,NaN)),this.type!==Zn.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)},rt.Gz=function(a){if(this.type!==Zn.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&&zt("Template cannot have .data be non-null: "+a),a.allBindings=y=new On;else if(y._isFrozen)return;var x=new On;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 On),Qe.srcBindings.add(Ve))),y.add(Ve)}if(Te instanceof Zn&&Te.type===Zn.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 it=Qe.be.iterator;it.next();){var ct=it.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();)it=Qe.value,it.xd=Ve,it.to=1,it.wl=Ve.index,y.add(it)}}});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 On),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 Zn&&(ne=ae.substring(0,fe),ae=ae.substr(fe+1),fe=te.fb(ne),fe!==null?(te=fe,E.targetProperty=ae):An('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+E.toString())),te instanceof Qs?(ne=Cr(te.panel),E.Ai=ne===void 0?-1:ne,te.panel.bindingId=E.Ai):te instanceof nn?(ne=Cr(te),E.Ai=ne===void 0?-1:ne,te.bindingId=E.Ai):zt("Unknown type of binding target: "+te)}y.freeze(),a instanceof ki&&a.Zc()&&a.Va()}rt.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return yx(y,function(x){x instanceof Zn&&(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},rt.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 Zn))continue;E===1?te=te.Eb(x.wl):E===2&&(te=te.Fb(x.wl))}te!==void 0&&x.Mv(te,b)}}},rt.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 Zn&&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 Zn)||te.data!==y[ne])return!0;E++,ne++}return!1}function fg(a){if(a.type===Zn.Spot||a.type===Zn.Auto)return Math.min(a.O.length,1);if(a.type===Zn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof gr&&b.isPanelMain))break}return x}return a.type===Zn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Zn&&Oh(a))?1:0}rt.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 Zn){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 ii&&(y.Te=!0),y.Te&&y instanceof ii&&(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 hi),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 Zn){var E=y,te=x;b.type===Zn.TableRow?b.row=E:b.type===Zn.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=Ns(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;zt("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,An('No item template Panel found for category "'+y+'" on '+a),An(" Using default item template."),a=new Zn,y=new Ao,y.bind(new zs("text","",li)),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 Zn){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var te=y[E];x&&te instanceof Zn&&!te.isEnabled||km(a,te,x)}}}function kc(a,y){y.name=a,$u.add(a,y)}Xe.Object.defineProperties(Zn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Zn.Grid,this.v(),this.g("type",y,a))}},elements:{get:function(){return this.O.iterator}},naturalBounds:{get:function(){return this.dc}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"?(0>a&&Cn(a,">= 0",Zn,"padding"),a=new Ei(a)):(0>a.left&&Cn(a.left,">= 0",Zn,"padding:value.left"),0>a.right&&Cn(a.right,">= 0",Zn,"padding:value.right"),0>a.top&&Cn(a.top,">= 0",Zn,"padding:value.top"),0>a.bottom&&Cn(a.bottom,">= 0",Zn,"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:ba},set:function(a){typeof a=="number"&&(a=new Ei(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new xu),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 xu),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 xu),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)||zt("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 xu),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 xu),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 xu),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)||zt("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 xu),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 xu),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||zt("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()||zt("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),Ea(this)&&(a=this.part,a!==null&&Ho(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),Ea(this)&&(a=this.part,a!==null&&Ho(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 xu),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new xu),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 xu),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 xu),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)&&zt("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new xu),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)&&zt("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new xu),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 ki&&!(this instanceof Qr);Ru(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof Xn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof ki&&(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 hi}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof ki||a.isPanelMain)&&zt("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(););Sr(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&&(Sr(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 sr&&(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))}}}),Xe.Object.defineProperties(Zn,{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")}}}),Zn.prototype.rebuildItemElements=Zn.prototype.mv,Zn.prototype.findItemPanelForData=Zn.prototype.sx,Zn.prototype.updateTargetBindings=Zn.prototype.La,Zn.prototype.copyTemplate=Zn.prototype.Uy,Zn.prototype.graduatedValueForPoint=Zn.prototype.Gz,Zn.prototype.graduatedPointForValue=Zn.prototype.Fz,Zn.prototype.findColumnForLocalX=Zn.prototype.fz,Zn.prototype.findRowForLocalY=Zn.prototype.nz,Zn.prototype.addColumnDefinition=Zn.prototype.By,Zn.prototype.addRowDefinition=Zn.prototype.Hy,Zn.prototype.addRowColumnDefinition=Zn.prototype.Gy,Zn.prototype.removeColumnDefinition=Zn.prototype.jA,Zn.prototype.getColumnDefinition=Zn.prototype.Eb,Zn.prototype.removeRowDefinition=Zn.prototype.oA,Zn.prototype.getRowDefinition=Zn.prototype.Fb,Zn.prototype.removeAt=Zn.prototype.mb,Zn.prototype.remove=Zn.prototype.remove,Zn.prototype.insertAt=Zn.prototype.Gb,Zn.prototype.elt=Zn.prototype.M,Zn.prototype.add=Zn.prototype.add,Zn.prototype.findObject=Zn.prototype.fb,Zn.prototype.findInVisualTree=Zn.prototype.Nl,Zn.prototype.walkVisualTreeFrom=Zn.prototype.qm,Zn.prototype.findMainElement=Zn.prototype.Pb;var g1=!1,m1=null,$u=new hi;Zn.className="Panel",Zn.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 xu(){this.Pc=[],this.Oc=[],this.j=this.ob=Om,this.hb=this.Hb=0,this.Qp=ba,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}xu.prototype.copy=function(a){for(var y=new xu,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},xu.className="TablePanelSettings";function Qs(a){br(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=ro,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Pv,this.hg=ar,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))}Qs.prototype.copy=function(){var a=new Qs;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=Bn(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=Bn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}rt=Qs.prototype,rt.qb=function(a){a.classType===Qs&&(this.sizing=a)},rt.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Cr(this)},rt.wi=function(a){this.Me=a},rt.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)},rt.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===Zn.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)},rt.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}rt.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new zs(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&f1(y)&&zt("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new On),this.be.add(E),this},Xe.Object.defineProperties(Qs.prototype,{panel:{get:function(){return this.Me}},isRow:{get:function(){return this.uq},set:function(a){this.uq=a}},index:{get:function(){return this.Za},set:function(a){this.Za=a}},height:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&Cn(a,">= 0",Qs,"height"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("height",y,a))}},width:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&Cn(a,">= 0",Qs,"width"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("width",y,a))}},minimum:{get:function(){return this.jj},set:function(a){var y=this.jj;y!==a&&((0>a||!isFinite(a))&&Cn(a,">= 0",Qs,"minimum"),this.jj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("minimum",y,a))}},maximum:{get:function(){return this.hj},set:function(a){var y=this.hj;y!==a&&(0>a&&Cn(a,">= 0",Qs,"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 Ei(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)||zt("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}}}),Qs.prototype.computeEffectiveSpacing=Qs.prototype.Wc,Qs.prototype.computeEffectiveSpacingTop=Qs.prototype.Io;var Pv=new un(Qs,"Default",0),pg=new un(Qs,"None",1),Om=new un(Qs,"ProportionalExtra",2);Qs.className="RowColumnDefinition",Qs.Default=Pv,Qs.None=pg,Qs.ProportionalExtra=Om;function gr(a,y){nn.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(gr,nn),gr.prototype.cloneProtected=function(a){nn.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=Bn(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())}rt=gr.prototype,rt.th=function(){nn.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},rt.qb=function(a){a===jn||a===yi||a===Br||a===ar?this.geometryStretch=a:nn.prototype.qb.call(this,a)},rt.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Cr(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,it,ct=0,It=Gn(),Mt=2;Mt<E;Mt+=2)_e=x[Mt],Te=x[Mt+1],je=_e-ae,ae=Te-fe,je===0&&(je=.001),Ve=ae/je,Qe=Math.atan2(ae,je),it=Math.sqrt(je*je+ae*ae),It.push([je,Qe,Ve,it]),ct+=it,ae=_e,fe=Te;ae=x[0],fe=x[1],je=b.measuredBounds.width,b instanceof gr&&(je-=b.strokeWidth),1>je&&(je=1),E=x=je,_e=ne/2,Te=_e!==0,Mt=0,it=It[Mt],je=it[0],Qe=it[1],Ve=it[2],it=it[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){Jn(It);return}E>it?(Gt=E-it,E=it):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,it-=E,Gt!==0){if(Mt++,Mt===It.length){Jn(It);return}it=It[Mt],je=it[0],Qe=it[1],Ve=it[2],it=it[3],E=Gt}}Jn(It)}}rt.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&&xs(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===Zn.Link&&ae instanceof Qr&&ae.category==="Selection"&&ae.adornedObject instanceof gr&&ae.adornedPart.Pb()===ae.adornedObject?ae.adornedObject.strokeWidth:0),fe===0&&(x=null),x!==null&&fe!==0&&(xs(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===Qn.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===Qn.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===Qn.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+on.wg*E,fe-Ve,_e+E,fe-on.wg*Ve,_e+E,fe),a.bezierCurveTo(_e+E,fe+on.wg*Ve,_e+on.wg*E,fe+Ve,_e,fe+Ve),a.bezierCurveTo(_e-on.wg*E,fe+Ve,_e-E,fe+on.wg*Ve,_e-E,fe),a.bezierCurveTo(_e-E,fe-on.wg*Ve,_e-on.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===Qn.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,it=0;it<je;it++){var ct=Te[it];switch(ct.type){case _s:a.moveTo(ct.endX,ct.endY);break;case bo:a.lineTo(ct.endX,ct.endY);break;case fa:a.bezierCurveTo(ct.point1X,ct.point1Y,ct.point2X,ct.point2Y,ct.endX,ct.endY);break;case fl:a.quadraticCurveTo(ct.point1X,ct.point1Y,ct.endX,ct.endY);break;case ss:if(ct.radiusX===ct.radiusY){var It=Math.PI/180;a.arc(ct.point1X,ct.point1Y,ct.radiusX,ct.startAngle*It,(ct.startAngle+ct.sweepAngle)*It,0>ct.sweepAngle,Qe!==null?Qe.endX:_e.startX,Qe!==null?Qe.endY:_e.startY)}else if(Qe=Na(ct,_e),It=Qe.length,It===0)a.lineTo(ct.centerX,ct.centerY);else for(var Mt=0;Mt<It;Mt++){var Gt=Qe[Mt];Mt===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(Mt=It=0,Qe!==null&&Qe.type===ss){if(Qe=Na(Qe,_e),Gt=Qe.length,Gt===0){a.lineTo(ct.endX,ct.endY);break}Qe=Qe[Gt-1]||null,Qe!==null&&(It=Qe[6],Mt=Qe[7])}else It=Qe!==null?Qe.endX:_e.startX,Mt=Qe!==null?Qe.endY:_e.startY;if(Qe=Ks(ct,_e,It,Mt),It=Qe.length,It===0){a.lineTo(ct.endX,ct.endY);break}for(Mt=0;Mt<It;Mt++)Gt=Qe[Mt],a.bezierCurveTo(Gt[2],Gt[3],Gt[4],Gt[5],Gt[6],Gt[7]);break;default:zt("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=Gn(),te.type===Qn.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===Qn.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(it=_e[je],it.type){case _s:pp(a,y,b,x),b.length=0,b.push(it.endX),b.push(it.endY),ne=it.endX,E=it.endY,fe=ne,Ve=E;break;case bo:b.push(it.endX),b.push(it.endY),ne=it.endX,E=it.endY;break;case fa:on.Qe(ne,E,it.point1X,it.point1Y,it.point2X,it.point2Y,it.endX,it.endY,.5,b),ne=it.endX,E=it.endY;break;case fl:on.ep(ne,E,it.point1X,it.point1Y,it.endX,it.endY,.5,b),ne=it.endX,E=it.endY;break;case ss:if(ct=Na(it,ae),Qe=ct.length,Qe===0){b.push(it.centerX),b.push(it.centerY),ne=it.centerX,E=it.centerY;break}for(It=0;It<Qe;It++)Mt=ct[It],on.Qe(ne,E,Mt[2],Mt[3],Mt[4],Mt[5],Mt[6],Mt[7],.5,b),ne=Mt[6],E=Mt[7];break;case Cl:if(ct=Ks(it,ae,ne,E),Qe=ct.length,Qe===0){b.push(it.endX),b.push(it.endY),ne=it.endX,E=it.endY;break}for(It=0;It<Qe;It++)Mt=ct[It],on.Qe(ne,E,Mt[2],Mt[3],Mt[4],Mt[5],Mt[6],Mt[7],.5,b),ne=Mt[6],E=Mt[7];break;default:zt("Segment not of valid type: "+it.type)}it.isClosed&&(b.push(fe),b.push(Ve),pp(a,y,b,x))}pp(a,y,b,x)}else if(te.type===Qn.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===Qn.F){if(E=new Zs,E.startX=te.endX,E.startY=(te.startY+te.endY)/2,ne=new Zr(ss),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=Na(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],on.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)}Jn(b),a.restore(),a.Vc(!1)}}}},rt.kk=function(a,y,x){return!nn.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)},rt.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:nn.prototype.nk.call(this,a)},rt.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)}},rt.ga=function(a,y){if(y===void 0&&(y=new kt),a instanceof Si){a.Mc()&&zt("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},rt.mi=function(a){a===void 0&&(a=new Tn);var y=this.naturalBounds,x=this.oe;y=Tn.allocAt(y.x,y.y,y.width,y.height);var b=this.strokeWidth;return y.Bc(b/2,b/2),b=kt.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),uo(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),uo(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),uo(a,b.x,b.y,0,0),Tn.free(y),kt.free(b),a},rt.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!==Qn.j||y||(E+=2);var te=Tn.alloc();if(te.assign(b),te.Bc(E+2,E+2),!te.ca(a))return Tn.free(te),!1;if(b=E+1e-4,x.type===Qn.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:(Tn.free(te),on.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===Qn.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 Tn.free(te),!1;te.Bc(b,b)}return this.stroke!==null&&te.Bc(E,E),a=te.ca(a),Tn.free(te),a}if(x.type===Qn.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 Tn.free(te),!1;ne+=b,E+=b}return this.stroke!==null&&(ne+=b,E+=b),Tn.free(te),0>=ne||0>=E?!1:1>=x*x/(ne*ne)+y*y/(E*E)}if(x.type===Qn.o)return Tn.free(te),this.fill===null?Wu(x,a.x,a.y,E):Mu(x,a,E,1<this.strokeWidth,y);zt("Unknown Geometry type: "+x.type)},rt.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=on.Ze[ae];typeof _e=="string"&&(_e=on.Ze[_e]),typeof _e=="function"?(fe=_e(null,100,100),Ev[ae]=fe):zt("Unsupported Figure: "+ae)}ne=fe.bounds}ae=ne.width,fe=ne.height,_e=ne.width;var Te=ne.height;switch(ml(this,!0)){case jn:b=x=0;break;case Wn:_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 Wn:ae=_e,fe=Te;break;case yi:x=Math.min(_e/ae,Te/fe),isFinite(x)||(x=1),ae*=x,fe*=x;break;default:zt(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&&on.$(this.ua.Sk,a-te)&&on.$(this.ua.Rk,y-te)||(this.ua=gr.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===ar?Wn:y:y===ar?Ev[a.figure].defaultStretch:y}rt.eh=function(a,y,x,b){Va(this,a,y,x,b)},rt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},rt.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===Qn.j)if(1.5>=this.strokeWidth)Te=on.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=Gn(),a=new kt,on.Ve(_e.startX+b,_e.startY+Te,_e.endX+b,_e.endY+Te,te,ne,ae,fe,a)&&y.push(a),a=new kt,on.Ve(_e.startX-b,_e.startY-Te,_e.endX-b,_e.endY-Te,te,ne,ae,fe,a)&&y.push(a),a=new kt,on.Ve(_e.startX+b,_e.startY+Te,_e.startX-b,_e.startY-Te,te,ne,ae,fe,a)&&y.push(a),a=new kt,on.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 Jn(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);Jn(y)}else if(_e.type===Qn.u)Te=on.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===Qn.F){y=Tn.allocAt(Qe.x,Qe.y,Qe.width,Qe.height).Bc(je,je);e:if(y.width===0)Te=on.Ve(y.x,y.y,y.x,y.y+y.height,te,ne,ae,fe,E);else if(y.height===0)Te=on.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}Tn.free(y)}else if(_e.type===Qn.o){Ve=kt.alloc();var it=ae-te,ct=fe-ne,It=it*it+ct*ct,Mt=te,Gt=ne;if(0<It&&Qe.contains(Mt,Gt)&&(Ve.x=Mt,Ve.y=Gt,this.ca(Ve)))for(it!==0&&.5>Math.abs(it)?(ct*=.5/it,it=.5):ct!==0&&.5>Math.abs(ct)&&(it*=.5/ct,ct=.5),Mt-=it,Gt-=ct;Qe.contains(Mt,Gt);)Mt-=it,Gt-=ct;for(E.x=ae,E.y=fe,ct=0;ct<_e.figures.count;ct++){var Zt=_e.figures.s[ct],$t=Zt.isFilled?Mt:te,en=Zt.isFilled?Gt:ne,vn=Zt.segments;Qe=Zt.startX,it=Zt.startY;for(var ni=Qe,pi=it,ci=0;ci<vn.count;ci++){var $n=vn.s[ci],Dn=$n.type,nr=$n.endX,Vi=$n.endY,to=!1;switch(Dn){case _s:ni=nr,pi=Vi;break;case bo:to=Dm(Qe,it,nr,Vi,$t,en,ae,fe,Ve);break;case fa:to=on.Eo(Qe,it,$n.point1X,$n.point1Y,$n.point2X,$n.point2Y,nr,Vi,$t,en,ae,fe,.6,Ve);break;case fl:to=on.Eo(Qe,it,Qe+2/3*($n.point1X-Qe),it+2/3*($n.point1Y-it),nr+2/3*($n.point1X-nr),Vi+2/3*($n.point1Y-Vi),nr,Vi,$t,en,ae,fe,.6,Ve);break;case ss:case Cl:Dn=$n.type===ss?Na($n,Zt):Ks($n,Zt,Qe,it);var To=Dn.length;if(To===0){to=Dm(Qe,it,$n.type===ss?$n.centerX:$n.endX,$n.type===ss?$n.centerY:$n.endY,$t,en,ae,fe,Ve);break}for(Vi=null,nr=0;nr<To;nr++){if(Vi=Dn[nr],nr===0&&Dm(Qe,it,Vi[0],Vi[1],$t,en,ae,fe,Ve)){var ua=Im($t,en,Ve,It,E);ua<It&&(It=ua,Te=!0)}on.Eo(Vi[0],Vi[1],Vi[2],Vi[3],Vi[4],Vi[5],Vi[6],Vi[7],$t,en,ae,fe,.6,Ve)&&(ua=Im($t,en,Ve,It,E),ua<It&&(It=ua,Te=!0))}nr=Vi[6],Vi=Vi[7];break;default:zt("Unknown Segment type: "+Dn)}Qe=nr,it=Vi,to&&(to=Im($t,en,Ve,It,E),to<It&&(It=to,Te=!0)),$n.isClosed&&(nr=ni,Vi=pi,Dm(Qe,it,nr,Vi,$t,en,ae,fe,Ve)&&($n=Im($t,en,Ve,It,E),$n<It&&(It=$n,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,kt.free(Ve)}else zt("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(on.$(a,x)&&on.$(y,b)||on.$(E,ne)&&on.$(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||on.$(fe.y,a))&&(fe.y<y||on.$(fe.y,y))&&(_e=!0)):(y=a<x?a:x,a=a<x?x:a,(fe.x>y||on.$(fe.x,y))&&(fe.x<a||on.$(fe.x,a))&&(_e=!0)),_e)}rt.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=kt.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)))),kt.free(te),E},rt.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=mr.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,te=a.top;a=a.bottom;var ne=kt.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 kt.free(ne),!0;var ae=kt.alloc(),fe=kt.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)))),kt.free(ne),mr.free(x),kt.free(ae),kt.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)}rt.tx=function(a,y,x){function b(It,Mt){for(var Gt=It.length,Zt=0;Zt<Gt;Zt+=2)if(Mt.zd(It[Zt],It[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,qi(a.x,a.y,ae,fe)<=E&&qi(a.x,a.y,_e,fe)<=E&&qi(a.x,a.y,ae,ne)<=E&&qi(a.x,a.y,_e,ne)<=E)return!0}if(ae=y.startX,fe=y.startY,_e=y.endX,ne=y.endY,y.type===Qn.j){if(x=(ae-_e)*(a.x-_e)+(fe-ne)*(a.y-ne),Io(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===Qn.u)return y=!1,x&&(y=Io(a.x,a.y,ae,fe,ae,ne)<=E||Io(a.x,a.y,ae,fe,_e,fe)<=E||Io(a.x,a.y,_e,fe,_e,ne)<=E||Io(a.x,a.y,ae,ne,_e,ne)<=E),y;if(y.type===Qn.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 Io(a.x,a.y,ae,fe,_e,ne)<=E;if(x){if(a=on.$y(Te,je,y,te),a*a<=E)return!0}else return!(qi(y,te,-Te,0)>=E||qi(y,te,0,-je)>=E||qi(y,te,0,je)>=E||qi(y,te,Te,0)>=E)}else if(y.type===Qn.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&&Io(a.x,a.y,te,ae,te,_e)>E&&Io(a.x,a.y,te,ae,fe,ae)>E&&Io(a.x,a.y,fe,_e,te,_e)>E&&Io(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 _s:case bo:if(ne=je.endX,Te=je.endY,a.zd(ne,Te)>E)return!1;break;case fa:var Ve=Gn();if(on.Qe(ne,Te,je.point1X,je.point1Y,je.point2X,je.point2Y,je.endX,je.endY,.8,Ve),ne=b(Ve,a),Jn(Ve),ne||(ne=je.endX,Te=je.endY,a.zd(ne,Te)>E))return!1;break;case fl:if(Ve=Gn(),on.ep(ne,Te,je.point1X,je.point1Y,je.endX,je.endY,.8,Ve),ne=b(Ve,a),Jn(Ve),ne||(ne=je.endX,Te=je.endY,a.zd(ne,Te)>E))return!1;break;case ss:case Cl:Ve=je.type===ss?Na(je,te):Ks(je,te,ne,Te);var Qe=Ve.length;if(Qe===0){if(ne=je.type===ss?je.centerX:je.endX,Te=je.type===ss?je.centerY:je.endY,a.zd(ne,Te)>E)return!1;break}je=null;for(var it=Gn(),ct=0;ct<Qe;ct++)if(je=Ve[ct],it.length=0,on.Qe(je[0],je[1],je[2],je[3],je[4],je[5],je[6],je[7],.8,it),b(it,a))return Jn(it),!1;Jn(it),je!==null&&(ne=je[6],Te=je[7]);break;default:zt("Unknown Segment type: "+je.type)}}return!0}}}return!1},rt.qc=function(){this.ua=null},rt.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=Gs):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new Si(1-Gs.x,Gs.y)))}gr.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=Wc[a.toArrow];else a.fromArrow!=="None"?b=Wc[a.fromArrow]:(b=on.Ze[a.figure],typeof b=="string"&&(b=on.Ze[b]),b===void 0&&zt("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=on.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 on.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=Qn.parse(on.um[b],!1),Wc[b]=a,x!==b&&(Wc[x]=b),b}}return typeof y=="string"?y:y instanceof Qn?a:null}Xe.Object.defineProperties(gr.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),Ea(this)&&(a=this.part,a!==null&&Ho(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=Qn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=kt.allocAt(-y.x,-y.y),kt.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 Cn(a,"value >= 0",gr,"strokeWidth:value")}},strokeCap:{get:function(){return this.Na!==null?this.Na.Hr:"butt"},set:function(a){var y=this.strokeCap;y!==a&&(typeof a!="string"||a!=="butt"&&a!=="round"&&a!=="square"?Cn(a,'"butt", "round", or "square"',gr,"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"?Cn(a,'"miter", "bevel", or "round"',gr,"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)||zt("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=on.Ze[a];typeof x=="function"?x=a:(x=on.Ze[a.toLowerCase()])||zt("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?zt("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?zt("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:ro},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:ro},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:ar},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))}}}),gr.prototype.intersectsRect=gr.prototype.Yc,gr.prototype.containedInRect=gr.prototype.fh,gr.prototype.getNearestIntersectionPoint=gr.prototype.rs,gr.prototype.getDocumentBounds=gr.prototype.mi,gr.prototype.getDocumentPoint=gr.prototype.ga;var Wc=new fi,Ev=new fi;gr.className="Shape",gr.getFigureGenerators=function(){var a=new hi,y;for(y in on.Ze)y!==y.toLowerCase()&&a.add(y,on.Ze[y]);return a.freeze(),a},gr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=on.Ze;b[a]=y,b[x]=a},gr.getArrowheadGeometries=function(){var a=new hi;for(b in on.um)if(Wc[b]===void 0){var y=Qn.parse(on.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 Qn&&a.add(x,b)}return a.freeze(),a},gr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=Qn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||zt("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=ar,this.gg=this.fg=ro}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 Ao(a,y){return nn.call(this),zm||(vl=gs?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(Ao,nn),Ao.prototype.cloneProtected=function(a){nn.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())}rt=Ao.prototype,rt.th=function(){nn.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}rt.qb=function(a){a.classType===Ao?this.wrap=a:nn.prototype.qb.call(this,a)},rt.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},rt.v=function(){nn.prototype.v.call(this)},rt.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;xs(this,a,this.xc,!0,!1,x,b),(fe||_e)&&xs(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 zl&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,je=this.spacingBelow,this.flip){case Wr:a.translate(E,0),a.scale(-1,1);break;case wr:a.translate(0,te),a.scale(1,-1);break;case Co: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 Wr:a.scale(-1,1),a.translate(-E,0);break;case wr:a.scale(1,-1),a.translate(0,-te);break;case Co:a.scale(-1,-1),a.translate(-E,-te)}}},rt.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 zl&&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 zl&&y.ad.classList.add("gojs-td"))}},rt.kk=function(a,y,x){if(!nn.prototype.kk.call(this,a,y,x))return!1;if(xs(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},rt.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:nn.prototype.nk.call(this,a)},rt.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)}},rt.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var te=this.Ae;vl!==null&&E1!==te&&(E1=vl.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),Os(this.dc,te,ne),this.Ge(0,0,te,ne),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},rt.eh=function(a,y,x,b){Va(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 vl===null?8*a.length:vl.measureText(a).width}function mg(a){if(a.df!==null)return a.df;var y=a.Ae;if(vl===null){var x=16;return a.df=x}return Nv[y]!==void 0&&5e3>_1?x=Nv[y]:(x=1.3*vl.measureText("M").width,Nv[y]=x,_1++),a.df=x}function x1(a){if(vl===null)return 6;if(jm[a]!==void 0&&5e3>Ov)var y=jm[a];else y=vl.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=Yn.alloc();Mv(a,te,y,fe),E+=fe.height,Yn.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}Xe.Object.defineProperties(Ao.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:ia},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),Ac(this),this.da.Yr=a,el(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=Yn.alloc();Mv(this,this.ec,999999,a);var y=a.width;Yn.free(a),a=w1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Os(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&&Cn(a,"> 0",Ao,"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 un(Ao,"None",0),b1=new un(Ao,"WrapFit",1),kv=new un(Ao,"WrapDesiredSize",2),C1=new un(Ao,"WrapBreakAll",3),Av=new un(Ao,"OverflowClip",0),Fm=new un(Ao,"OverflowEllipsis",1),vg=new un(Ao,"FormatTrim",0),P1=new un(Ao,"FormatNone",0),xx=/[ \u200b\u00ad]/,Nv=new fi,_1=0,jm=new fi,Ov=0,yg="...",E1="",vl=null,zm=!1;Ao.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=ia,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},Ao.getEllipsis=function(){return yg},Ao.setEllipsis=function(a){yg=a,jm=new fi,Ov=0},Ao.getBaseline=function(){return Rm},Ao.setBaseline=function(a){Rm=a},Ao.getUnderline=function(){return Bm},Ao.setUnderline=function(a){Bm=a},Ao.isValidFont=function(a){if(zm||(vl=gs?new Du(null).context:null,zm=!0),vl===null)return!0;var y=vl.font;if(a===y||a==="10px sans-serif")return!0;vl.font="10px sans-serif",vl.font=a;var x=vl.font;if(x!=="10px sans-serif")return vl.font=y,!0;vl.font="19px serif";var b=vl.font;return vl.font=a,x=vl.font,vl.font=y,x!==b},Ao.FormatNone=P1,Ao.FormatTrim=vg,Ao.None=Tv,Ao.OverflowClip=Av,Ao.OverflowEllipsis=Fm,Ao.WrapBreakAll=C1,Ao.WrapDesiredSize=kv,Ao.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 yl(a,y){nn.call(this),this.Eg=null,this.qo="",this.Xg=no,this.Nk=Wn,this.Zg=this.Hd=null,this.Mk=Fr,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(yl,nn),yl.prototype.cloneProtected=function(a){nn.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},yl.prototype.qb=function(a){a===jn||a===yi||a===Br?this.imageStretch=a:nn.prototype.qb.call(this,a)},yl.prototype.toString=function(){return"Picture("+this.source+")#"+Cr(this)};function vp(a){a===void 0&&(a=""),a!==""?mp[a]&&(delete mp[a],Hm--):(mp=new fi,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()||(Js(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=Gn();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);Jn(te)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}yl.prototype.hA=function(){if(this.source!==""){vp(this.source);var a=this.source;this.source="",this.source=a}},yl.prototype.redraw=function(){this.N(),this.Uc=!0},yl.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 zl;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,it=this.Mk;switch(Qe){case jn:if(this.sourceRect.w())break;je>=b.width&&(te=te+it.offsetX+(je*it.x-b.width*it.x)),Ve>=b.height&&(ne=ne+it.offsetY+(Ve*it.y-b.height*it.y)),fe=Math.min(b.width,je),ae=Math.min(b.height,Ve);break;case Wn:je=b.width,Ve=b.height;break;case yi:case Br:Qe===yi?(Qe=Math.min(b.height/Ve,b.width/je),je*=Qe,Ve*=Qe):Qe===Br&&(Qe=Math.max(b.height/Ve,b.width/je),je*=Qe,Ve*=Qe,je>=b.width&&(te=(te+it.offsetX+(je*it.x-b.width*it.x)/je)*fe),Ve>=b.height&&(ne=(ne+it.offsetY+(Ve*it.y-b.height*it.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,It=fe*ae/ct,Mt=x.__goCache;Qe=null;var Gt=wx;if(!E){if(x.sq&&Mt!==void 0&&4<ct&&It>Gt*Gt)for(Mt.gi===null&&(T1(Mt,4,_e,Te,x),T1(Mt,16,_e,Te,x)),E=Mt.gi,_e=E.length,Te=0;Te<_e&&E[Te].ratio*E[Te].ratio<It;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?it.offsetX+(b.width*it.x-je*it.x):0,it=Ve<b.height?it.offsetY+(b.height*it.y-Ve*it.y):0,this.flip){case Wr:a.translate(Math.min(b.width,je),0),a.scale(-1,1);break;case wr:a.translate(0,Math.min(b.height,Ve)),a.scale(1,-1);break;case Co:a.translate(Math.min(b.width,je),Math.min(b.height,Ve)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Mt!==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,it,Math.min(b.width,je),Math.min(b.height,Ve)),a instanceof zl&&(this.bt=[te/y,ne/y,Math.min(Qe.source.width,fe/y),Math.min(Qe.source.height,ae/y),E,it,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,it,Math.min(b.width,je),Math.min(b.height,Ve)),a instanceof zl&&(this.bt=[te,ne,fe,ae,E,it,Math.min(b.width,je),Math.min(b.height,Ve)])}catch(Zt){this.en=!1}switch(this.flip){case Wr:a.scale(-1,1),a.translate(-Math.min(b.width,je),0);break;case wr:a.scale(1,-1),a.translate(0,-Math.min(b.height,Ve));break;case Co:a.scale(-1,-1),a.translate(-Math.min(b.width,je),-Math.min(b.height,Ve))}}}}},yl.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,te=ml(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===Wn||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===Wn||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)),Os(this.dc,a,y),this.Ge(0,0,a,y)},yl.prototype.eh=function(a,y,x,b){Va(this,a,y,x,b)},Xe.Object.defineProperties(yl.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||zt("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()||(Js(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(gs){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<Hm&&(vp(),x=mp),b=Pn("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}}}),yl.prototype.redraw=yl.prototype.redraw,yl.prototype.reloadSource=yl.prototype.hA;var Hm=0,wx=4;yl.className="Picture",mp=new fi,yl.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 Qn,this.mc=null}yp.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new Qn,this.mc=null};function Sp(a,y,x,b,E,te){a.mc=new Zs,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 Zr(_s);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 Zr(bo);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 Zr(fa);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 Zr(fl);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 Zr(ss);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 Zr(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 Fa(a,y){var x=a.toLowerCase(),b=on.Ze;b[a]=y,b[x]=a}Fa("Rectangle",function(a,y,x){a="r"+y+","+x;var b=on.Mf[a];return b!==void 0||(b=new Qn(Qn.u),b.endX=y,b.endY=x,on.Nf<on.vm&&(on.Mf[a]=b,on.Nf++)),b}),Fa("Square",function(a,y,x){a="s"+y+","+x;var b=on.Mf[a];return b!==void 0||(b=new Qn(Qn.u),b.endX=y,b.endY=x,b.defaultStretch=yi,on.Nf<on.vm&&(on.Mf[a]=b,on.Nf++)),b}),Fa("RoundedRectangle",function(a,y,x){a=a?a.parameter1:NaN,(isNaN(a)||0>a)&&(a=5),a=Math.min(a,y/3),a=Math.min(a,x/3);var b="rr"+y+","+x+","+a,E=on.Mf[b];if(E!==void 0)return E;var te=a*on.wg;return E=new Qn().add(new Zs(a,0,!0).add(new Zr(bo,y-a,0)).add(new Zr(fa,y,a,y-te,0,y,te)).add(new Zr(bo,y,x-a)).add(new Zr(fa,y-a,x,y,x-te,y-te,x)).add(new Zr(bo,a,x)).add(new Zr(fa,0,x-a,te,x,0,x-te)).add(new Zr(bo,0,a)).add(new Zr(fa,a,0,0,te,te,0).close())),1<te&&(E.spot1=new Si(0,0,te,te),E.spot2=new Si(1,1,-te,-te)),on.Nf<on.vm&&(on.Mf[b]=E,on.Nf++),E}),Fa("Border","RoundedRectangle"),Fa("Ellipse",function(a,y,x){a="e"+y+","+x;var b=on.Mf[a];return b!==void 0||(b=new Qn(Qn.F),b.endX=y,b.endY=x,b.spot1=Yl,b.spot2=Rl,on.Nf<on.vm&&(on.Mf[a]=b,on.Nf++)),b}),Fa("Circle",function(a,y,x){a="c"+y+","+x;var b=on.Mf[a];return b!==void 0||(b=new Qn(Qn.F),b.endX=y,b.endY=x,b.spot1=Yl,b.spot2=Rl,b.defaultStretch=yi,on.Nf<on.vm&&(on.Mf[a]=b,on.Nf++)),b}),Fa("TriangleRight",function(a,y,x){return new Qn().add(new Zs(0,0).add(new Zr(bo,y,.5*x)).add(new Zr(bo,0,x).close())).pm(0,.25,.5,.75)}),Fa("TriangleDown",function(a,y,x){return new Qn().add(new Zs(0,0).add(new Zr(bo,y,0)).add(new Zr(bo,.5*y,x).close())).pm(.25,0,.75,.5)}),Fa("TriangleLeft",function(a,y,x){return new Qn().add(new Zs(y,x).add(new Zr(bo,0,.5*x)).add(new Zr(bo,y,0).close())).pm(.5,.25,1,.75)}),Fa("TriangleUp",function(a,y,x){return new Qn().add(new Zs(y,x).add(new Zr(bo,0,x)).add(new Zr(bo,.5*y,0).close())).pm(.25,.5,.75,1)}),Fa("Triangle","TriangleUp"),Fa("Diamond",function(a,y,x){return new Qn().add(new Zs(.5*y,0).add(new Zr(bo,0,.5*x)).add(new Zr(bo,.5*y,x)).add(new Zr(bo,y,.5*x).close())).pm(.25,.25,.75,.75)}),Fa("LineH",function(a,y,x){return a=new Qn(Qn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),Fa("LineV",function(a,y,x){return a=new Qn(Qn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),Fa("None","Rectangle"),Fa("BarH","Rectangle"),Fa("BarV","Rectangle"),Fa("MinusLine","LineH"),Fa("PlusLine",function(a,y,x){return new Qn().add(new Zs(0,x/2,!1).add(new Zr(bo,y,x/2)).add(new Zr(_s,y/2,0)).add(new Zr(bo,y/2,x)))}),Fa("XLine",function(a,y,x){return new Qn().add(new Zs(0,x,!1).add(new Zr(bo,y,0)).add(new Zr(_s,0,0)).add(new Zr(bo,y,x)))}),Fa("LineRight",function(a,y,x){return new Qn().add(new Zs(.25*y,0,!1).add(new Zr(bo,.75*y,.5*x)).add(new Zr(bo,.25*y,x)))}),Fa("LineDown",function(a,y,x){return new Qn().add(new Zs(0,.25*x,!1).add(new Zr(bo,.5*y,.75*x)).add(new Zr(bo,y,.25*x)))}),Fa("LineLeft",function(a,y,x){return new Qn().add(new Zs(.75*y,0,!1).add(new Zr(bo,.25*y,.5*x)).add(new Zr(bo,.75*y,x)))}),Fa("LineUp",function(a,y,x){return new Qn().add(new Zs(0,.75*x,!1).add(new Zr(bo,.5*y,.25*x)).add(new Zr(bo,y,.75*x)))}),on.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=Ls,this.ir=null,this.jr="",this.lr=ro,this.Gq="",this.Hq=$s,this.Pq=_o,this.Kq=Oo,this.Up=null,this.Cq=127,this.zr=wo,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 ki(a,y){a===void 0||a instanceof oa||typeof a=="string"?Zn.call(this,a):(Zn.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 kt(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new Tn,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}qe(ki,Zn),ki.prototype.cloneProtected=function(a){Zn.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},rt=ki.prototype,rt.Af=function(a){Zn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},rt.toString=function(){var a=Rn(this.constructor)+"#"+Cr(this);return this.data!==null&&(a+="("+li(this.data)+")"),a};function Sl(a){a.P===null?a.P=new Dv:a.P.nc&&(a.P=a.P.copy())}rt.th=function(){Zn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},rt.gk=function(a,y,x,b,E,te,ne){var ae=this.diagram;ae!==null&&(a===ps&&y==="elements"?E instanceof Zn?qd(E,function(fe){ly(ae.partManager,fe),Zd(ae,fe)}):sd(ae,E):a===us&&y==="elements"&&(E instanceof Zn?qd(E,function(fe){uy(ae.partManager,fe,ae)}):Jp(ae,E)),ae.cb(a,y,x,b,E,te,ne))},rt.La=function(a){if(Zn.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 Zn&&qd(E,function(te){te.data!==null&&te.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},ki.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},ki.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},ki.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 hi),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)))}}},ki.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)}},ki.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Gn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Jn(y)}},ki.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 sr?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof Qr))break e;Ru(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Zn.Link),x.adornedObject=y)}if(x!==null){x.type===Zn.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Px(this,a),y=this.adornments;y.next();)y.value.La()}},ki.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=Tn.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),Tn.free(b),Fv(a,!1)}}ki.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new mr);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),this.Lb=te,te.ws()||te.pp(E)},ki.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=Fr;this.locationSpot.sb()&&(te=this.locationSpot);var ne=kt.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),kt.free(ne)}},ki.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},ki.prototype.moveTo=function(a,y,x){a=kt.allocAt(a,y),this.move(a,x),kt.free(a)},ki.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())},ki.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())},ki.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new hi),y.I(a)!==null)return y.I(a);var x=Zn.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 kt),x=x.Mc()?Fr: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}ki.prototype.mi=function(a){return a===void 0&&(a=new Tn),a.assign(this.actualBounds)},ki.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function O1(a){var y=kt.alloc(),x=a.locationObject,b=x.naturalBounds,E=x instanceof gr?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}ki.prototype.arrange=function(){if(tl(this)===!1)N1(this);else{Hc(this,!1);var a=this.Ib,y=Tn.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()||on.B(y.width,a.width)&&on.B(y.height,a.height)||0<=this.vw&&this.C(16),Tn.free(y),Fv(this,!1)}},rt=ki.prototype,rt.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=Tn.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),Tn.free(E)}!(this.G&65536)&&a.D(y)||F1(this,b,x),x.N(),!a.w()&&!y.w()||vs(a,y)||(this instanceof ii&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},rt.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 kt(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),cd(this)===!1&&tl(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 kt(b,E),x))}rt.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;cd(this)||tl(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)},rt.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,kt.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 kt(te,ne),y),b||y.x===te&&y.y===ne||a.g("position",new kt(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 ii&&Mh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?hd(a)?(Vl(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}rt.si=function(){return!0},rt.Zc=function(){return!0},rt.ph=function(){return!1},rt.Dd=function(){return!0};function Bv(a,y,x,b){y.constructor===a.constructor||H1||(H1=!0,An('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),An(" Old class: "+Rn(a.constructor)+", new class: "+Rn(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 ii&&(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 ii&&(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)}ki.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},ki.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},ki.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},ki.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},ki.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},ki.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},ki.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},ki.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},ki.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}rt=ki.prototype,rt.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}rt.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},rt.N=function(){var a=this.diagram;a!==null&&!tl(this)&&!cd(this)&&this.isVisible()&&this.Ib.w()&&a.N(nf(this,this.Ib))},rt.v=function(){Zn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof ii&&this.labeledLink!==null&&el(this.labeledLink),a.$b(!0))},rt.Vo=function(a){a||(a=this.Ah,a!==null&&Zv(a,this))},rt.Wo=function(a){a||(a=this.Ah,a!==null&&Kv(a,this))},rt.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},rt.oz=function(){return zv(this,this)};function zv(a,y){var x=y.containingGroup;return x!==null?1+zv(a,x):y instanceof ii&&(y=y.labeledLink,y!==null)?zv(a,y):0}rt.sz=function(){return j1(this,this)};function j1(a,y){var x=y.containingGroup;return x!==null||y instanceof ii&&(x=y.labeledLink,x!==null)?j1(a,x):y}rt.Td=function(a){return a instanceof sr?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 ii&&(y=y.labeledLink,y!==null)?Hv(a,y,x):!1:!0}rt.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof sr&&Zm(y,!0),y instanceof ii){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 ii&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof sr&&Zm(y,!1),y instanceof ii&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},ki.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof ii&&this.isLinkLabel)},ki.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 ii&&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 ii){if(x&&y instanceof sr)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 Xn)for(y=y.labelNodes;y.next();)dd(a,y.value,x,b,E,te)}}Xe.Object.defineProperties(ki.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?lr: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(us,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb(ps,"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&&(Sl(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!==Zn.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:_o},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),Sl(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:Oo},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),Sl(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&&(Sl(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:$s},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),Sl(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,tl(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 Xn||(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&&(Sl(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&&(Sl(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&&(Sl(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 Xn?(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&&(Sl(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&&(Sl(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&&(Sl(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:Ls},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),Sl(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&&(Sl(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&&(Sl(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:ro},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),Sl(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&&zt("Cannot make a Group a member of itself: "+this.toString()),zt("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 sr&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Zv(a,this):this instanceof sr&&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 sr){for(x=new In,dd(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof ii)for(b=b.linksConnected;b.next();)xp(b.value)}if(this instanceof ii){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 zt("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&&(Sl(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof ii&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(Sl(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&&(Sl(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:wo},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),Sl(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&&(Sl(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&&(Sl(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),ki.prototype.invalidateLayout=ki.prototype.C,ki.prototype.findCommonContainingGroup=ki.prototype.px,ki.prototype.isMemberOf=ki.prototype.Td,ki.prototype.findTopLevelPart=ki.prototype.sz,ki.prototype.findSubGraphLevel=ki.prototype.oz,ki.prototype.ensureBounds=ki.prototype.Va,ki.prototype.getDocumentBounds=ki.prototype.mi,ki.prototype.findObject=ki.prototype.fb,ki.prototype.moveTo=ki.prototype.moveTo,ki.prototype.invalidateAdornments=ki.prototype.Wb,ki.prototype.clearAdornments=ki.prototype.Ej,ki.prototype.removeAdornment=ki.prototype.Jf,ki.prototype.addAdornment=ki.prototype.bh,ki.prototype.findAdornment=ki.prototype.Pj,ki.prototype.updateTargetBindings=ki.prototype.La;var H1=!1;ki.className="Part",ki.LayoutNone=0,ki.LayoutAdded=1,ki.LayoutRemoved=2,ki.LayoutShown=4,ki.LayoutHidden=8,ki.LayoutNodeSized=16,ki.LayoutGroupLayout=32,ki.LayoutNodeReplaced=64,ki.LayoutStandard=127,ki.LayoutAll=16777215;function Qr(a,y){a===void 0||a instanceof oa||typeof a=="string"?ki.call(this,a):(ki.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,ki),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 Xn&&y instanceof gr){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 gr&&(E.ua=a)}}},Qr.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!tl(a))},Qr.prototype.Zc=function(){return!1},Qr.prototype.gk=function(a,y,x,b,E,te,ne){if(a===ps&&y==="elements"){if(E instanceof il)this.$a===null&&(this.$a=E);else if(E instanceof Zn){var ae=E.Nl(function(fe){return fe instanceof il});ae instanceof il&&this.$a===null&&(this.$a=ae)}}else a===us&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Zn&&this.$a.rg(b)&&(this.$a=null));ki.prototype.gk.call(this,a,y,x,b,E,te,ne)},Qr.prototype.updateAdornments=function(){},Qr.prototype.Lj=function(){},Xe.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=za,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 ii(a,y){a===void 0||a instanceof oa||typeof a=="string"?ki.call(this,a):(ki.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new On,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}qe(ii,ki),ii.prototype.cloneProtected=function(a){ki.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},rt=ii.prototype,rt.Af=function(a){ki.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())}rt.th=function(){ki.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}rt.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=G1(this,a,y,x),a!==null&&a.Sl()},rt.gk=function(a,y,x,b,E,te,ne){a===ps&&y==="elements"?this.wc=null:a===us&&y==="elements"&&(this.wc=null),ki.prototype.gk.call(this,a,y,x,b,E,te,ne)},rt.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Hl(x.fromPort),Hl(x.toPort),x.bb())}};function W1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Hl(x.fromPort),Hl(x.toPort),x.bb())}}function Hl(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Hl(y.port)}}rt.si=function(){return!0},ii.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},ii.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},ii.prototype.isVisible=function(){if(!ki.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===Xs){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},ii.prototype.Zb=function(a){ki.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)}},ii.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)})}}ii.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new $i(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},rt=ii.prototype,rt.Mo=function(a){a===void 0&&(a=null);var y=new $i(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},rt.Sd=function(a){a===void 0&&(a=null);var y=new $i(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},rt.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):lr},rt.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):lr},rt.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):lr},rt.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new $i(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},rt.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new $i(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){Hl(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){Hl(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}}}ii.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},rt=ii.prototype,rt.Vo=function(a){ki.prototype.Vo.call(this,a),a||(Sg(this),a=this.Yk,a!==null&&eS(a,this))},rt.Wo=function(a){ki.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},rt.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,ki.prototype.Lj.call(this)},rt.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 hi: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=Gn()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Jn(x)}}}rt.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},rt.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}},rt.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},rt.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},rt.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof ii)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},rt.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},rt.uz=function(){return $1(this,this)};function $1(a,y){return y=y.pg(),y===null?0:1+$1(a,y)}rt.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new $i(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},rt.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 On,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 On,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Fi(x):lr},rt.wz=function(a){a===void 0&&(a=1/0);var y=new In;return dd(y,this,!1,a,!0),y},ii.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}ii.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}Xe.Object.defineProperties(ii.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:za},set:function(a){typeof a=="number"&&(a=new Ei(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),el(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))}}}),ii.prototype.expandTree=ii.prototype.expandTree,ii.prototype.collapseTree=ii.prototype.collapseTree,ii.prototype.findTreeParts=ii.prototype.wz,ii.prototype.findTreeChildrenNodes=ii.prototype.Ou,ii.prototype.findTreeChildrenLinks=ii.prototype.Qo,ii.prototype.findTreeLevel=ii.prototype.uz,ii.prototype.findTreeParentChain=ii.prototype.vz,ii.prototype.findTreeParentNode=ii.prototype.pg,ii.prototype.findTreeParentLink=ii.prototype.kh,ii.prototype.findCommonTreeParent=ii.prototype.gz,ii.prototype.findTreeRoot=ii.prototype.xz,ii.prototype.isInTreeOf=ii.prototype.Nz,ii.prototype.findPort=ii.prototype.ns,ii.prototype.findLinksTo=ii.prototype.kz,ii.prototype.findLinksBetween=ii.prototype.jz,ii.prototype.findNodesInto=ii.prototype.Oo,ii.prototype.findNodesOutOf=ii.prototype.Po,ii.prototype.findNodesConnected=ii.prototype.Mu,ii.prototype.findLinksInto=ii.prototype.Sd,ii.prototype.findLinksOutOf=ii.prototype.Mo,ii.prototype.findExternalTreeLinksConnected=ii.prototype.qx,ii.prototype.invalidateConnectedLinks=ii.prototype.Bd,ii.prototype.invalidateLinkBundle=ii.prototype.Lz;var _x=new un(ii,"SpreadingNone",10),$m=new un(ii,"SpreadingEvenly",11),Wv=new un(ii,"SpreadingPacked",12);ii.className="Node",ii.SpreadingNone=_x,ii.SpreadingEvenly=$m,ii.SpreadingPacked=Wv;function sr(a,y){a===void 0||a instanceof oa||typeof a=="string"?ii.call(this,a):(ii.call(this),a&&(y=a)),this.U|=4608,this.Gn=new In,this.$a=null,this.Sc=new Qo,this.Sc.group=this,this.gl=new In,this.tb=this.$p=null,y&&Object.assign(this,y)}qe(sr,ii),sr.prototype.cloneProtected=function(a){ii.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof il});y instanceof il?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())},rt=sr.prototype,rt.Af=function(a){ii.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 ii)x.Bd(y);else if(x instanceof Xn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},rt.gk=function(a,y,x,b,E,te,ne){if(a===ps&&y==="elements"){if(E instanceof il)this.$a===null?this.$a=E:this.$a!==E&&zt("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof Zn){var ae=E.Nl(function(fe){return fe instanceof il});ae instanceof il&&(this.$a===null?this.$a=ae:this.$a!==ae&&zt("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===us&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Zn&&this.$a.rg(b)&&(this.$a=null));ii.prototype.gk.call(this,a,y,x,b,E,te,ne)},rt.Xl=function(a,y){ii.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Zn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Zn&&(a=a.Pb()),this.tb===null&&(this.tb=new Tn),a.mi(this.tb),a instanceof gr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},rt.eh=function(a,y,x,b){this.nf=this.$a,ii.prototype.eh.call(this,a,y,x,b)},rt.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Xn||y.Va()}),ii.prototype.Va.call(this)},rt.si=function(){if(!ii.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof ii){if(y.isVisible()&&tl(y))return!1}else if(y instanceof Xn&&y.isVisible()&&tl(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function Zv(a,y){if(a.Gn.add(y)){y instanceof sr&&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 Xn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function Kv(a,y){if(a.Gn.remove(y)){y instanceof sr&&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 Xn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}rt.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)}ii.prototype.Lj.call(this)},sr.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=Mn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},sr.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=Mn(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},sr.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))},rt=sr.prototype,rt.Bd=function(a){var y=(this.U&65536)!==0;if(ii.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()?(Hl(x.fromPort),Hl(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(Hl(x.fromPort),Hl(x.toPort),x.bb()))}}},rt.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 ii)for(E=E.linksConnected;E.next();){var te=E.value;y.contains(te)||x.add(te)}}return a&&(this.$p=x),x.iterator},rt.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 ii)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},rt.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new In;return a(this,y),y},rt.Rj=function(){var a=new In;return dd(a,this,!0,0,!0),a.remove(this),a},rt.Zb=function(a){ii.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},sr.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 sr&&te.isSubGraphExpanded&&(te.wasSubGraphExpanded=te.isSubGraphExpanded,Q1(te,y,x,b)),te instanceof ii)te.Bd(y),x.Aj(te,b);else if(te instanceof Xn)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!1}sr.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 sr&&te.wasSubGraphExpanded&&(te.wasSubGraphExpanded=!1,q1(te,y,x,b)),te instanceof ii)te.Bd(y),x.Cj(te,b);else if(te instanceof Xn)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!0}sr.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=kt.alloc(),ii.prototype.move.call(this,a,y),a=new In,y=this.Rj().iterator;y.next();)E=y.value,E instanceof Xn&&(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 ii&&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 Xn&&(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());kt.free(te)}},Xe.Object.defineProperties(sr.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&&zt("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)}}}),sr.prototype.expandSubGraph=sr.prototype.expandSubGraph,sr.prototype.collapseSubGraph=sr.prototype.collapseSubGraph,sr.prototype.findSubGraphParts=sr.prototype.Rj,sr.prototype.findContainingGroupChain=sr.prototype.hz,sr.prototype.findExternalNodesConnected=sr.prototype.iz,sr.prototype.findExternalLinksConnected=sr.prototype.Lu,sr.prototype.ensureBounds=sr.prototype.Va,sr.className="Group";function il(a){nn.call(this),this.yb=ba,this.ko=new Tn(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}qe(il,nn),il.prototype.cloneProtected=function(a){nn.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},il.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return _r(0,0,y.width,y.height,a.x,a.y)},il.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof sr||a instanceof Qr)||zt("Placeholder is not inside a Group or Adornment."),a instanceof sr){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(Os(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=kt.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),kt.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 gr&&(ne=te.strokeWidth);var ae=te.Df(),fe=te.naturalBounds,_e=(fe.width+ne)*ae;ne=(fe.height+ne)*ae,a.type!==Zn.Link&&(ae=te.ga(a.category==="Selection"?$s:a.locationSpot,kt.alloc()),a.location=ae,kt.free(ae)),isNaN(_e)||isNaN(ne)?(a=te.ga($s,kt.alloc()),_e=Tn.allocAt(a.x,a.y,0,0),_e.Ye(te.ga(Ta,a)),_e.Ye(te.ga(wl,a)),_e.Ye(te.ga(Aa,a)),Os(y,_e.width+b||0,_e.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),kt.free(a),Tn.free(_e)):(Os(y,_e+b||0,ne+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},il.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},il.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof sr&&!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=Tn.alloc(),E=this.computeMemberBounds(x);var te=this.yb;return y instanceof sr&&!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)),Tn.free(x),b&&y instanceof sr&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},il.prototype.computeMemberBounds=function(a){if(!(this.part instanceof sr))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 Xn&&(!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},Xe.Object.defineProperties(il.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Ei(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),il.className="Placeholder";function Xn(a){ki.call(this,Zn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=rl,this.Om=0,this.Qm=rl,this.Rm=NaN,this.qj=Jv,this.po=.5,this.wd=null,this.Nb=new On().freeze(),this.Tg=this.Mg=null,this.ml=new Tn,this.ua=new Qn,this.u=this.o=this.Sf=this.Wf=null,this.su=new kt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}qe(Xn,ki),Xn.prototype.cloneProtected=function(a){ki.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())},rt=Xn.prototype,rt.Af=function(a){ki.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&&Hl(y),a=a.toPort,a!==null&&Hl(a)},rt.qb=function(a){a.classType===Xn?(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!==rl&&zt("Unknown Link enum value for a Link property: "+a):ki.prototype.qb.call(this,a)},rt.Xc=function(){this.ba===null&&(this.ba=new lg)},rt.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),tl(a)||cd(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),tl(a)||cd(a)))},rt.zv=function(){return!1},rt.Av=function(){},rt.Zc=function(){return!1},Xn.prototype.computeAngle=function(a,y,x){return Xn.computeAngle(y,x)},Xn.computeAngle=function(a,y){switch(a){default:case rl: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=on.bp(y),90<a&&270>a&&(a-=180);break;case Eg:a=on.bp(y+90),90<a&&270>a&&(a-=180);break;case Lg:a=on.bp(y-90),90<a&&270>a&&(a-=180);break;case i0:if(a=on.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return on.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}rt=Xn.prototype,rt.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&ki.prototype.oh.call(this)},rt.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},rt.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()}rt.Vo=function(a){if(ki.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)}},rt.Wo=function(a){if(ki.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)}},rt.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))},Xn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Xn.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?ki.prototype.move.call(this,a,!1):(a=kt.allocAt(x.x+b,x.y+E),ki.prototype.move.call(this,a,!1),kt.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)},Xn.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},Xn.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},Xn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(yr),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 on.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),on.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},Xn.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),on.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)},rt=Xn.prototype,rt.i=function(a){return this.Nb.s[a]},rt.dd=function(a,y){this.Nb.cd(a,y)},rt.L=function(a,y,x){this.Nb.cd(a,new kt(y,x))},rt.Kz=function(a,y){this.Nb.Gb(a,y)},rt.m=function(a,y,x){this.Nb.Gb(a,new kt(y,x))},rt.ne=function(a){this.Nb.add(a)},rt.yf=function(a,y){this.Nb.add(new kt(a,y))},rt.pv=function(a){this.Nb.mb(a)},rt.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 On,te=a.Nb.iterator;te.next();){var ne=te.value;E.add(new kt(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),el(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&&zo(ne.animationManager,a,E),a.g("points",te,E)}}rt.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},rt.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&&zo(x.animationManager,this,y),Ym(this),this.g("points",a,y)}},rt.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))}rt.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())}},rt.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()}}},Xn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Nf||(Nf=new ii,Nf.desiredSize=Vr,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 ii,Of.desiredSize=Vr,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()===rl||_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,it=te.y+fe/3,ct=Qe,It=it;on.B(fe,0)?It=0<ae?It-_e:It+_e:(Te=-ae/fe,je=Math.sqrt(_e*_e/(Te*Te+1)),0>_e&&(je=-je),ct=(0>fe?-1:1)*je+Qe,It=Te*(ct-Qe)+it),Qe=te.x+2*ae/3,it=te.y+2*fe/3;var Mt=Qe,Gt=it;on.B(fe,0)?Gt=0<ae?Gt-_e:Gt+_e:(Mt=(0>fe?-1:1)*je+Qe,Gt=Te*(Mt-Qe)+it),this.Fj(),this.ne(te),this.yf(ct,It),this.yf(Mt,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,on.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=Tn.alloc(),y.mi(ae),fe=ae.ca(E),Ve.mi(ae),_e=ae.ca(b),(fe||_e)&&(ne=y.ga(Jm(ne),new kt),this.dd(0,this.getLinkPointFromPoint(a,y,ne,E,!0,ne)),x=Ve.ga(Jm(x),new kt),this.dd(1,this.getLinkPointFromPoint(te,Ve,x,b,!1,x))),Tn.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=it=0,(Te||!ae||_e)&&(It=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&&(It+=Math.abs(Zt)*(Te?1:2)),Qe===0?it=It:Qe===90?ct=It:Qe===180?it=-It:Qe===270?ct=-It:(it=It*Math.cos(Qe*Math.PI/180),ct=It*Math.sin(Qe*Math.PI/180)),ne.Mc()&&_e&&(It=y.ga(Fr,kt.alloc()),Mt=kt.allocAt(It.x+1e3*it,It.y+1e3*ct),this.getLinkPointFromPoint(a,y,It,Mt,!0,je),kt.free(It),kt.free(Mt))),It=this.getLinkPoint(b,E,x,!1,Te,a,y);var $t=Gt=Mt=0;if(Te||!fe||_e){var en=this.computeEndSegmentLength(b,E,x,!1);$t=this.getLinkDirection(b,E,It,x,!1,Te,a,y),_e&&(fe||ne.D(x)||!Te&&ne.x+x.x===1&&ne.y+x.y===1)&&($t+=Te?0:30,0>Zt&&($t+=180)),0>$t?$t+=360:360<=$t&&($t-=360),_e&&(en+=Math.abs(Zt)*(Te?1:2)),$t===0?Mt=en:$t===90?Gt=en:$t===180?Mt=-en:$t===270?Gt=-en:(Mt=en*Math.cos($t*Math.PI/180),Gt=en*Math.sin($t*Math.PI/180)),x.Mc()&&_e&&(x=E.ga(Fr,kt.alloc()),ne=kt.allocAt(x.x+1e3*Mt,x.y+1e3*Gt),this.getLinkPointFromPoint(b,E,x,ne,!1,It),kt.free(x),kt.free(ne))}x=je,(Te||!ae||_e)&&(x=new kt(je.x+it,je.y+ct)),ne=It,(Te||!fe||_e)&&(ne=new kt(It.x+Mt,It.y+Gt)),!Ve&&!Te&&ae&&3<te&&this.adjustPoints(0,je,te-2,ne)?this.dd(te-1,It):!Ve&&!Te&&fe&&3<te&&this.adjustPoints(1,x,te-1,It)?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,It)):(this.Fj(),this.ne(je),(Te||!ae||_e)&&this.ne(x),Te&&this.addOrthoPoints(x,Qe,ne,$t,a,b),(Te||!fe||_e)&&this.ne(ne),this.ne(It))}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}Xn.prototype.getLinkPointFromPoint=function(a,y,x,b,E,te){if(te===void 0&&(te=new kt),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)}Xn.prototype.getLinkPoint=function(a,y,x,b,E,te,ne,ae){if(ae===void 0&&(ae=new kt),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=kt.alloc(),_e=kt.alloc();var Te=new Tn(y.ga($s,fe),y.ga(Ta,_e)),je=this.computeSpot(!b,ne);a=this.getLinkPoint(te,ne,je,!b,E,a,y,_e),(x.Hf(_u)||x.Hf(Ua))&&a.y>=Te.y&&a.y<=Te.y+Te.height?ae.y=a.y:(x.Hf($l)||x.Hf(Ga))&&a.x>=Te.x&&a.x<=Te.x+Te.width&&(ae.x=a.x),kt.free(fe),kt.free(_e)}}return ae}}return x=y.ga(Jm(x),kt.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=kt.alloc(),ne=ne.ga(Jm(fe),te),E&&(ne=Vv(x,ne)),kt.free(te)),this.getLinkPointFromPoint(a,y,x,ne,b,ae),kt.free(x),ae},Xn.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(Fr,kt.alloc()),this.pointsCount>(te?6:2)?(ae=E?this.i(1):this.i(this.pointsCount-2),ae=te?Vv(fe,ae.copy()):x):(x=kt.alloc(),ae=ae.ga(Fr,x),kt.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,kt.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},Xn.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)},Xn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Fr:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===ro?fs:y)):(a=y||this.toPort,a===null?a=Fr:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===ro?fs:y)),a};function wp(a){return a===fs||a.x===.5&&a.y===.5}function Jm(a){return a.x===.5&&a.y===.5?a:Fr}Xn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==rl&&4<this.pointsCount?this.computeMidPoint(new kt):(a=y.Zn,a=a!==null?lS(a,this):null,a!==null?a.Zo:y.ga(Fr))},Xn.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},Xn.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=mr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&mr.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=mr.alloc(),je.set(ne),Te instanceof Zn)ae=Te.Cf(a,y,x,b,E,je);else if(this.path===Te){if(Te instanceof gr)if(ae=a,Ve=b,Te.pickable===!1)ae=!1;else if(je.multiply(Te.transform),Ve)e:{var Qe=ae,it=je;if(Te.fh(Qe,it))ae=!0;else{if(it===void 0&&(it=Te.transform,Qe.Re(Te.actualBounds))){ae=!0;break e}ae=Qe.left,Ve=Qe.right;var ct=Qe.top;Qe=Qe.bottom;var It=kt.alloc(),Mt=kt.alloc(),Gt=kt.alloc(),Zt=mr.alloc();Zt.set(it),Zt.bv(Te.transform),Zt.Vj(),Mt.x=Ve,Mt.y=ct,Mt.transform(Zt),It.x=ae,It.y=ct,It.transform(Zt),it=!1,tf(Te,It,Mt,Gt)?it=!0:(It.x=Ve,It.y=Qe,It.transform(Zt),tf(Te,It,Mt,Gt)?it=!0:(Mt.x=ae,Mt.y=Qe,Mt.transform(Zt),tf(Te,It,Mt,Gt)?it=!0:(It.x=ae,It.y=ct,It.transform(Zt),tf(Te,It,Mt,Gt)&&(it=!0)))),mr.free(Zt),kt.free(It),kt.free(Mt),kt.free(Gt),ae=it}}else ae=Te.fh(ae,je)}else ae=la(Te,a,b,je);ae&&(Ve=Te,y!==null&&(Ve=y(Te)),Ve&&(x===null||x(Ve))&&E.add(Ve)),mr.free(je)}}}return te===void 0&&mr.free(ne),ae||this.background!==null||this.areaBackground!==null}return te===void 0&&mr.free(ne),!1},Xn.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},Xn.prototype.computeCorner=function(){if(this.curve===ou)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Xn.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},Xn.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(Fr).ab(x.ga(Fr))/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},Xn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===rl&&x.bb()}},Xn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=iS;var y=this.Sf;if(y!==null){for(var x=Gn(),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),Jn(x)}}return a},Xn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Xn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Xn.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(!on.$(_e,0)){if(on.$(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),on.$(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),on.$(y,0)||(on.$(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 it=(Ve-Te)/(fe-ae);Qe=Math.sqrt(1+1/(it*it))}else it=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var ct=y.x,It=y.y,Mt=.5;_e!==0&&(Mt=((E-ct)*(E-ne)+(te-It)*(te-je))/_e);var Gt=E+Mt*(ne-E),Zt=te+Mt*(je-te);y=Math.sqrt((ct-Gt)*(ct-Gt)+(It-Zt)*(It-Zt)),It<it*(ct-Gt)+Zt&&(y=-y),0<it&&(y=-y),ct=ae+Mt*(fe-ae),Mt=Te+Mt*(Ve-Te),it!==0?(y=ct+y/Qe,this.L(a,y,Mt-(y-ct)/it)):this.L(a,ct,Mt+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,on.B(E.y,te.y)?on.B(te.x,ne.x)?Te=y.y:on.B(te.y,ne.y)&&(ae=y.x):on.B(E.x,te.x)&&(on.B(te.y,ne.y)?ae=y.x:on.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,on.B(E.y,te.y)?on.B(te.x,ne.x)?Te=b.y:on.B(te.y,ne.y)&&(ae=b.x):on.B(E.x,te.x)&&(on.B(te.y,ne.y)?ae=b.x:on.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}},Xn.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=kt.alloc(),Te=kt.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 it=x=null;if(Ve.isVirtualized){Ve=Qe.bounds.copy(),Ve.Bc(-Qe.Ho,-Qe.Go);var ct=kt.alloc();Cp(Qe,a.x,a.y)||(on.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)):on.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)):on.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)||(on.Ff(Ve.x,Ve.y,Ve.x+Ve.width,Ve.y+Ve.height,je.x,je.y,Te.x,Te.y,ct)?(it=je=ct.copy(),b=Te.ab(ct)):on.Ff(Ve.x,Ve.y,Ve.x+Ve.width,Ve.y+Ve.height,Te.x,Te.y,_e.x,_e.y,ct)?(it=je=ct.copy(),b=_e.ab(ct)):on.Ff(Ve.x,Ve.y,Ve.x+Ve.width,Ve.y+Ve.height,_e.x,_e.y,a.x,a.y,ct)&&(it=je=ct.copy(),b=a.ab(ct))),kt.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?on.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)):on.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)&&(on.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)):on.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)),it!==null&&(b===0||b===180?this.yf(te.x,it.y):this.yf(it.x,te.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(_e.copy()),this.ne(Te.copy())),kt.free(_e),kt.free(Te)}},Xn.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)}Xn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=Io(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=Io(y,a,b.x,b.y,x.x,x.y);b=x,ae<E&&(te=ne,E=ae)}return te},Xn.prototype.qc=function(){this.lk=!1,this.v()},Xn.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 gr&&(E.ua=this.ua)}}},Xn.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&&!on.$(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=Qn.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&&!on.$(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=kt.allocAt(b,fe),x=kt.alloc(),x.assign(this.i(1)),te=kt.allocAt(b,fe),E=kt.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,it=this.i(Xv(this,_e,je,!1));if((!on.$(Ve.x,Qe.x)||!on.$(Qe.x,it.x))&&(!on.$(Ve.y,Qe.y)||!on.$(Qe.y,it.y))){var ct=Te;isNaN(ct)&&(ct=this.smoothness/3);var It=Ve.x;Ve=Ve.y;var Mt=Qe.x;Qe=Qe.y;var Gt=it.x;it=it.y;var Zt=ct*Qm(It,Ve,Mt,Qe);ct*=Qm(Mt,Qe,Gt,it),on.$(Ve,Qe)&&on.$(Mt,Gt)&&(Mt>It?it>Qe?(te.x=Mt-Zt,te.y=Qe-Zt,E.x=Mt+ct,E.y=Qe+ct):(te.x=Mt-Zt,te.y=Qe+Zt,E.x=Mt+ct,E.y=Qe-ct):it>Qe?(te.x=Mt+Zt,te.y=Qe-Zt,E.x=Mt-ct,E.y=Qe+ct):(te.x=Mt+Zt,te.y=Qe+Zt,E.x=Mt-ct,E.y=Qe-ct)),on.$(It,Mt)&&on.$(Qe,it)&&(Qe>Ve?(Gt>Mt?(te.x=Mt-Zt,te.y=Qe-Zt,E.x=Mt+ct):(te.x=Mt+Zt,te.y=Qe-Zt,E.x=Mt-ct),E.y=Qe+ct):(Gt>Mt?(te.x=Mt-Zt,te.y=Qe+Zt,E.x=Mt+ct):(te.x=Mt+Zt,te.y=Qe+Zt,E.x=Mt-ct),E.y=Qe-ct)),(on.$(It,Mt)&&on.$(Mt,Gt)||on.$(Ve,Qe)&&on.$(Qe,it))&&(It=.5*(It+Gt),Ve=.5*(Ve+it),te.x=It,te.y=Ve,E.x=It,E.y=Ve),(je===1||je===2&&on.$(ne.x,this.i(0).x)&&on.$(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,Pr)),_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),kt.free(y),kt.free(x),kt.free(te),kt.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,Pr)),Ih(ae,te.x-b,te.y-fe,E.x-b,E.y-fe,ne.x-b,ne.y-fe);else{for(te=kt.alloc(),te.assign(this.i(0)),E=kt.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,Pr)),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,It=-fe,Ve=Te,Mt=this.i(_e),ct=x,on.B(te.y,Ve.y)&&on.B(Ve.x,Mt.x))if(it=Math.min(ne,Math.abs(Ve.x-E.x)/2),it=Zt=Math.min(it,Math.abs(Mt.y-Ve.y)/2),on.B(it,0))Af(this,ae,je,It,te,Ve,ct),te.assign(Ve);else{var $t=Ve.x,en=Ve.y;Qe=$t,Gt=en,Ve.x>te.x?$t=Ve.x-it:$t=Ve.x+it,Mt.y>Ve.y?Gt=Ve.y+Zt:Gt=Ve.y-Zt,Mt=kt.allocAt($t,en),Af(this,ae,je,It,te,Mt,ct),kt.free(Mt),Um(ae,Ve.x+je,Ve.y+It,Qe+je,Gt+It),te.h(Qe,Gt)}else on.B(te.x,Ve.x)&&on.B(Ve.y,Mt.y)?(it=Math.min(ne,Math.abs(Ve.y-E.y)/2),it=Zt=Math.min(it,Math.abs(Mt.x-Ve.x)/2),on.B(Zt,0)?(Af(this,ae,je,It,te,Ve,ct),te.assign(Ve)):($t=Ve.x,en=Ve.y,Qe=$t,Gt=en,Ve.y>te.y?en=Ve.y-it:en=Ve.y+it,Mt.x>Ve.x?Qe=Ve.x+Zt:Qe=Ve.x-Zt,Mt=kt.allocAt($t,en),Af(this,ae,je,It,te,Mt,ct),kt.free(Mt),Um(ae,Ve.x+je,Ve.y+It,Qe+je,Gt+It),te.h(Qe,Gt))):(Af(this,ae,je,It,te,Ve,ct),te.assign(Ve));E.assign(Te),je=_e}kt.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=Qn.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),on.$(a,0)?y:on.$(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;on.$(y.x,te.x)&&on.$(y.y,te.y);){if(x>=E)return E-1;te=a.i(x++)}if(!on.$(y.x,te.x)&&!on.$(y.y,te.y))return x-1;for(var ne=te;on.$(y.x,te.x)&&on.$(te.x,ne.x)&&(!b||(y.y>=te.y?te.y>=ne.y:te.y<=ne.y))||on.$(y.y,te.y)&&on.$(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}Xn.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(on.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 it=te.y+b;a.curve===Fh?Sp(y,Qe,it,!1):Ih(y,Ve,je,Qe,je,Qe,it)}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(on.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,it=te.x+x,je+=b,a.curve===Fh?Sp(y,it,je,!1):Ih(y,Qe,Ve,Qe,je,it,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 Xn){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=on.B(a.y,y.y),te=b.pointsCount,ne=b.i(0),ae=kt.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,it=ne.x;ne=ne.y;var ct=_e.x,It=_e.y;if(on.B(Te,Ve)){if(!on.B(je,Qe)&&on.B(ne,It)&&Math.min(je,Qe)<ne&&Math.max(je,Qe)>ne&&Math.min(it,ct)<Te&&Math.max(it,ct)>Te&&!on.B(it,ct)){ae.x=Te,ae.y=ne,Te=!0;break e}}else if(on.B(je,Qe)&&on.B(it,ct)&&Math.min(Te,Ve)<it&&Math.max(Te,Ve)>it&&Math.min(ne,It)<je&&Math.max(ne,It)>je&&!on.B(ne,It)){ae.x=it,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}kt.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()))}Xn.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 Xn&&(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 Xn&&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())}}Xn.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},Xn.prototype.isVisible=function(){if(!ki.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},Xn.prototype.Zb=function(a){if(ki.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)},Xn.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()))}Xn.prototype.ph=function(){return!0},Xe.Object.defineProperties(Xn.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&&Hl(x),wg(this),this.ff=a;var b=this.fromPort;b!==null&&Hl(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&&Hl(x),wg(this),this.vf=a;var b=this.toPort;b!==null&&Hl(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:ro},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&&Hl(this.fromPort),this.bb())}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:NaN},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Cn(a,">= 0",Xn,"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:ro},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&&Hl(this.toPort),this.bb())}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:NaN},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Cn(a,">= 0",Xn,"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?lr: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 gr?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),on.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);on.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 kt)}},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);on.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):on.$(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 On,b=0;b<a.length/2;b++)E=new kt(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(!Vt(te)||typeof te.x!="number"||isNaN(te.x)||typeof te.y!="number"||isNaN(te.y)){b=!1;break}}if(b)for(x=new On,b=0;b<a.length;b++)E=a[b],x.add(new kt(E.x,E.y).freeze())}}else if(a instanceof On)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else zt("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&&zo(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)}}}),Xn.prototype.invalidateOtherJumpOvers=Xn.prototype.Xo,Xn.prototype.findClosestSegment=Xn.prototype.ez,Xn.prototype.updateRoute=Xn.prototype.vg,Xn.prototype.invalidateRoute=Xn.prototype.bb,Xn.prototype.rollbackRoute=Xn.prototype.rv,Xn.prototype.commitRoute=Xn.prototype.zf,Xn.prototype.startRoute=Xn.prototype.uh,Xn.prototype.clearPoints=Xn.prototype.Fj,Xn.prototype.removePoint=Xn.prototype.pv,Xn.prototype.addPointAt=Xn.prototype.yf,Xn.prototype.addPoint=Xn.prototype.ne,Xn.prototype.insertPointAt=Xn.prototype.m,Xn.prototype.insertPoint=Xn.prototype.Kz,Xn.prototype.setPointAt=Xn.prototype.L,Xn.prototype.setPoint=Xn.prototype.dd,Xn.prototype.getPoint=Xn.prototype.i,Xn.prototype.getOtherPort=Xn.prototype.Cz,Xn.prototype.getOtherNode=Xn.prototype.To;var Nf=null,Of=null,Jv=new un(Xn,"Normal",1),Mx=new un(Xn,"Orthogonal",2),Tx=new un(Xn,"AvoidsNodes",6),nS=new un(Xn,"AvoidsNodesStraight",7),rl=new un(Xn,"None",0),ou=new un(Xn,"Bezier",9),Fh=new un(Xn,"JumpGap",10),bp=new un(Xn,"JumpOver",11),bg=new un(Xn,"End",17),e0=new un(Xn,"Scale",18),t0=new un(Xn,"Stretch",19),Cg=new un(Xn,"OrientAlong",21),Pg=new un(Xn,"OrientPlus90",22),_g=new un(Xn,"OrientMinus90",23),Qv=new un(Xn,"OrientOpposite",24),n0=new un(Xn,"OrientUpright",25),Eg=new un(Xn,"OrientPlus90Upright",26),Lg=new un(Xn,"OrientMinus90Upright",27),i0=new un(Xn,"OrientUpright45",28),iS=16,rS=14,Mg=8;Xn.className="Link",Xn.Normal=Jv,Xn.Orthogonal=Mx,Xn.AvoidsNodes=Tx,Xn.AvoidsNodesStraight=nS,Xn.None=rl,Xn.Bezier=ou,Xn.JumpGap=Fh,Xn.JumpOver=bp,Xn.End=bg,Xn.Scale=e0,Xn.Stretch=t0,Xn.OrientAlong=Cg,Xn.OrientPlus90=Pg,Xn.OrientMinus90=_g,Xn.OrientOpposite=Qv,Xn.OrientUpright=n0,Xn.OrientPlus90Upright=Eg,Xn.OrientMinus90Upright=Lg,Xn.OrientUpright45=i0,Xn.EndSegmentStep=8,Xn.CurvinessStart=iS,Xn.SpacingMin=rS,Xn.OrthoShortCut=Mg;function r0(a,y,x,b){br(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){br(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=Gn(),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);Jn(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++}}}Xe.Object.defineProperties(Tg.prototype,{bounds:{get:function(){return new Tn(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(){br(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 sr?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($s,kt.alloc()),fe=a.port.ga(Ta,kt.alloc());for(E=Tn.allocAt(ae.x,ae.y,0,0),E.Ye(fe),kt.free(ae),kt.free(fe),ae=kt.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(kt.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=kt.alloc(),fe=kt.alloc(),ne=kt.alloc(),_e=kt.alloc(),je.ga($s,ae),je.ga(wl,fe),je.ga(Ta,ne),je.ga(Aa,_e),Qe=Ve=Te=je=0,b===Wv)for(var it=0;it<te.length;it++){var ct=te[it];if(ct!==null){var It=ct.link.computeThickness();switch(ct.Nc){case 8:Ve+=It;break;case 2:Qe+=It;break;case 1:je+=It;break;default:case 4:Te+=It}}}var Mt=it=0,Gt=1,Zt=ct=0;for(It=0;It<te.length;It++){var $t=te[It];if($t!==null){if(it!==$t.Nc){switch(it=$t.Nc,it){case 8:var en=ne;Mt=_e;break;case 2:en=_e,Mt=ae;break;case 1:en=ae,Mt=fe;break;default:case 4:en=fe,Mt=ne}switch(ct=Mt.x-en.x,Zt=Mt.y-en.y,it){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}Mt=0}var vn=$t.Zo;if(b===Wv){switch($t=$t.link.computeThickness(),$t*=Gt,vn.set(en),it){case 8:vn.x=en.x+ct/2+Ve/2-Mt-$t/2;break;case 2:vn.y=en.y+Zt/2+Qe/2-Mt-$t/2;break;case 1:vn.x=en.x+ct/2-je/2+Mt+$t/2;break;default:case 4:vn.y=en.y+Zt/2-Te/2+Mt+$t/2}Mt+=$t}else{var ni=.5;b===$m&&(ni=($t.Uo+1)/($t.Gl+1)),vn.x=en.x+ct*ni,vn.y=en.y+Zt*ni}}}for(kt.free(ae),kt.free(fe),kt.free(ne),kt.free(_e),en=a.pe,te=0;te<en.length;te++)b=en[te],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,Tn.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,fs,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 kt,this.Gl=this.Uo=0,this.Zo=new kt,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 Qo(a){br(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new kt(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}Qo.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},Qo.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Qo.prototype.qb=function(){},Qo.prototype.toString=function(){var a=Rn(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},Qo.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())}}},Qo.prototype.createNetwork=function(){return new No(this)},Qo.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof mn?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof sr?y.lg(a.memberParts):y.lg(a.iterator),y},Qo.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")}},Qo.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()}},Qo.prototype.doLayout=function(a){var y=new In;a instanceof mn?(fd(this,y,a.nodes,!0,this.rh,!0,!1,!0),fd(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof sr?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},Qo.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 sr&&(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++}},Qo.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 Xn)&&(kg(ae),this.rh(ae))){var fe=ae.measuredBounds,_e=fe.width;fe=fe.height,ae.moveTo(x,b),ae instanceof sr&&(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++}}},Qo.prototype.rh=function(a){return!!(!a.location.w()||a instanceof sr&&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 ii?fe.isLinkLabel||(fe instanceof sr&&fe.layout===null?fd(a,y,fe.memberParts,!1,E,te,ne,ae):(kg(fe),y.add(fe))):ne&&fe instanceof Xn?y.add(fe):!ae||!fe.Zc()||fe instanceof ii||(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()}Qo.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new Tn),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},Qo.prototype.ex=function(a){var y=new In;return a instanceof mn?(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 sr?fd(this,y,a.memberParts,!1,null,!0,!0,!0):fd(this,y,a.iterator,!1,null,!0,!0,!0),y},Qo.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($s),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Xe.Object.defineProperties(Qo.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())}}}),Qo.prototype.collectParts=Qo.prototype.ex,Qo.prototype.getLayoutBounds=Qo.prototype.ni,Qo.prototype.invalidateLayout=Qo.prototype.C,Qo.className="Layout";function No(a){br(this),this.Sc=a,this.wf=new In,this.ye=new In,this.Es=new hi,this.zs=new hi}No.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 hi,this.zs=new hi},No.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},No.prototype.createVertex=function(){return new sa(this)},No.prototype.createEdge=function(){return new Ul(this)},No.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 ii)return!ne.isLinkLabel;if(ne instanceof Xn){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 ii&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof sr&&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 Xn&&(!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))}}},No.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},rt=No.prototype,rt.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},rt.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},rt.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}rt.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},rt.ki=function(a){return a===null?null:this.Es.I(a)},rt.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}}rt.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},rt.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))}rt.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},rt.Lo=function(a){return a===null?null:this.zs.I(a)},rt.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},rt.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))}},rt.Ko=function(){for(var a=Gn(),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]);Jn(a)},No.prototype.deleteArtificialVertexes=function(){for(var a=Gn(),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=Gn(),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]);Jn(a),Jn(y)};function Ax(a){for(var y=Gn(),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]);Jn(y)}No.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Ax(this),this.Ko()),a=new On;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))}}No.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},Xe.Object.defineProperties(No.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}}}),No.prototype.findAllParts=No.prototype.dz,No.prototype.splitIntoSubNetworks=No.prototype.Zx,No.prototype.deleteSelfEdges=No.prototype.Ko,No.prototype.reverseEdge=No.prototype.gm,No.prototype.linkVertexes=No.prototype.Zj,No.prototype.findEdge=No.prototype.Lo,No.prototype.deleteLink=No.prototype.Yy,No.prototype.deleteEdge=No.prototype.Mj,No.prototype.addLink=No.prototype.Dy,No.prototype.addEdge=No.prototype.Bo,No.prototype.findVertex=No.prototype.ki,No.prototype.deleteNode=No.prototype.Zy,No.prototype.deleteVertex=No.prototype.Iu,No.prototype.addNode=No.prototype.Bl,No.prototype.addVertex=No.prototype.dh,No.prototype.addParts=No.prototype.lg,No.className="LayoutNetwork";function sa(a){br(this),this.ob=a,this.j=new Tn(0,0,10,10).freeze(),this.o=new kt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new On,this.mg=new On}sa.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new On,this.mg=new On},sa.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Cr(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},sa.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;Vt(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 sr)){x=Tn.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(Fr);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),Tn.free(x);return}Tn.free(x)}a.moveTo(y.x,y.y)}},sa.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},sa.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},sa.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},sa.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}Xe.Object.defineProperties(sa.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=Tn.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),Tn.free(x),!(a instanceof sr)&&(a=a.locationObject.ga(Fr),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 On,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}}}),sa.prototype.deleteDestinationEdge=sa.prototype.Jl,sa.prototype.addDestinationEdge=sa.prototype.zl,sa.prototype.deleteSourceEdge=sa.prototype.Kl,sa.prototype.addSourceEdge=sa.prototype.Cl,sa.className="LayoutVertex",sa.standardComparer=oy,sa.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 Ul(a){br(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Ul.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Ul.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Cr(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},Ul.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Ul.prototype.commit=function(){},Ul.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},Xe.Object.defineProperties(Ul.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)}}}),Ul.prototype.getOtherVertex=Ul.prototype.Ax,Ul.className="LayoutEdge";function xa(a){Qo.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new Yn(NaN,NaN).freeze(),this.tf=new Yn(10,10).freeze(),this.Jb=Ag,this.Rb=l0,this.nd=Ng,this.hd=cS,a&&Object.assign(this,a)}qe(xa,Qo),xa.prototype.cloneProtected=function(a){Qo.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},xa.prototype.qb=function(a){a.classType===xa?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:zt("Unknown enum value: "+a):Qo.prototype.qb.call(this,a)},xa.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 sr)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=Tn.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 it=Qe=this.arrangementOrigin.x,ct=this.arrangementOrigin.y,It=0,Mt=0,Gt=0;Gt<E.length;Gt++){var Zt=E[Gt],$t=this.ni(Zt,_e),en=Math.ceil(($t.width+ae)/Te)*Te,vn=Math.ceil(($t.height+fe)/je)*je;switch(Ve){case uc:var ni=Math.abs(it-$t.width);break;default:ni=it+$t.width}switch((0<te&&It>te-1||0<ne&&0<It&&ni-Qe>ne)&&(b.push(new Tn(0,ct,ne+ae,Mt)),It=0,it=Qe,ct+=Mt,Mt=0),Mt=Math.max(Mt,vn),Ve){case uc:$t=-$t.width;break;default:$t=0}switch(Zt.moveTo(it+$t,ct),Ve){case uc:it-=en;break;default:it+=en}It++}b.push(new Tn(0,ct,ne+ae,Mt)),Tn.free(_e);break;case Ag:for(fe=ne,Te=te,je=y,Ve=x,ne=Tn.alloc(),Qe=Math.max(this.cellSize.width,1),te=ct=_e=0,ae=kt.alloc(),it=0;it<E.length;it++)Mt=E[it],It=this.ni(Mt,ne),Mt=Dh(Mt,Mt.locationObject,Mt.locationSpot,ae),_e=Math.max(_e,Mt.x),ct=Math.max(ct,It.width-Mt.x),te=Math.max(te,Mt.y);switch(it=this.arrangement,it){case uc:_e+=je;break;default:ct+=je}Qe=isFinite(Qe)?Math.max(Qe+je,1):Math.max(_e+ct,1);var pi=Mt=this.arrangementOrigin.x;for(Gt=this.arrangementOrigin.y,ct=0,fe>=_e&&(fe-=_e),_e=Zt=0,en=Math.max(this.cellSize.height,1),$t=te=0,vn=!0,It=kt.alloc(),ni=0;ni<E.length;ni++){var ci=E[ni],$n=this.ni(ci,ne),Dn=Dh(ci,ci.locationObject,ci.locationSpot,ae);if(0<ct)switch(it){case uc:pi=(pi-Mt-($n.width-Dn.x))/Qe,pi=on.$(Math.round(pi),pi)?Math.round(pi):Math.floor(pi),pi=pi*Qe+Mt;break;default:pi=(pi-Mt+Dn.x)/Qe,pi=on.$(Math.round(pi),pi)?Math.round(pi):Math.ceil(pi),pi=pi*Qe+Mt}else switch(it){case uc:Zt=pi+Dn.x+$n.width;break;default:Zt=pi-Dn.x}switch(it){case uc:var nr=-(pi+Dn.x)+Zt;break;default:nr=pi+$n.width-Dn.x-Zt}if(0<Te&&ct>Te-1||0<fe&&0<ct&&nr>fe){for(b.push(new Tn(0,vn?Gt-te:Gt,fe+je,$t+te+Ve)),pi=0;pi<ct&&ni!==ct;pi++){nr=E[ni-ct+pi];var Vi=Dh(nr,nr.locationObject,nr.locationSpot,It);nr.moveTo(nr.position.x,nr.position.y+te-Vi.y)}$t+=Ve,Gt=vn?Gt+$t:Gt+($t+te),ct=$t=te=0,pi=Mt,vn=!1}switch(pi===Mt&&(_e=it===uc?Math.max(_e,$n.width-Dn.x):Math.min(_e,-Dn.x)),te=Math.max(te,Dn.y),$t=Math.max($t,$n.height-Dn.y),isFinite(en)&&($t=Math.max($t,Math.max($n.height,en)-Dn.y)),vn?ci.moveTo(pi-Dn.x,Gt-Dn.y):ci.moveTo(pi-Dn.x,Gt),it){case uc:pi-=Dn.x+je;break;default:pi+=$n.width-Dn.x+je}ct++}if(b.push(new Tn(0,Gt,fe+je,(vn?$t:$t+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(kt.free(ae),kt.free(It),it===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);Tn.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 kt(E+y/2-(te+E),ne-x/2)):this.commitLayers(b,new kt(E-y/2,ne-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},xa.prototype.commitLayers=function(){};function cS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}Xe.Object.defineProperties(xa.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 un(xa,"Position",0),Ag=new un(xa,"Location",1),l0=new un(xa,"LeftToRight",2),uc=new un(xa,"RightToLeft",3),sy=new un(xa,"Forward",4),u0=new un(xa,"Reverse",5),Ng=new un(xa,"Ascending",6),c0=new un(xa,"Descending",7);xa.className="GridLayout",xa.standardComparer=cS,xa.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},xa.Position=a0,xa.Location=Ag,xa.LeftToRight=l0,xa.RightToLeft=uc,xa.Forward=sy,xa.Reverse=u0,xa.Ascending=Ng,xa.Descending=c0;function po(){this.On=new In,this.Dn=new In,this.Pa=new In,this.cf=new hi,this.bf=new hi,this.aj=new hi,this.H=null,this.tp=!1}rt=po.prototype,rt.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},rt.Xe=function(a){this.H=a},rt.oi=function(a){if(a instanceof ii){if(this.On.add(a),a instanceof sr){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 Xn?this.Dn.add(a):a instanceof Qr||this.Pa.add(a);y=a.data,y===null||a instanceof Qr||(a instanceof Xn?this.bf.add(y,a):this.cf.add(y,a))},rt.pc=function(a){if(a.Ej(),a instanceof ii){if(this.On.remove(a),a instanceof sr){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 Xn?this.Dn.remove(a):a instanceof Qr||this.Pa.remove(a);y=a.data,y===null||a instanceof Qr||(a instanceof Xn?this.bf.remove(y):this.cf.remove(y))},rt.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 sr)&&zt('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 sr||zt('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 Xn||zt('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Gn(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=Gn(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=Gn(),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]);Jn(y),Jn(x),Jn(a)}},po.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},po.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)}}po.prototype.insertLink=function(){return null},po.prototype.resolveReferencesForData=function(){},po.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,An('No Group template found for category "'+x+'"'),An(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,An('No Node template found for category "'+x+'"'),An(" Using default node template")),y=a.ny))),y}po.prototype.getLinkCategoryForData=function(){return""},po.prototype.setLinkCategoryForData=function(){},po.prototype.setFromNodeForLink=function(){},po.prototype.setToNodeForLink=function(){},po.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,An('No Link template found for category "'+a+'"'),An(" Using default link template")),x=y.my)),x},po.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},po.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},po.prototype.ip=function(a){a=this.Lc(a),a!==null&&(rd(this.diagram,a,!1),this.unresolveReferencesForPart(a))},po.prototype.unresolveReferencesForPart=function(){},po.prototype.removeDataForLink=function(){},po.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},po.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof ii?a:null)},po.prototype.findLinkForKey=function(){return null},rt=po.prototype,rt.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},rt.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof ii?a:null)},rt.Kc=function(a){return a===null?null:this.bf.I(a)},rt.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(Vt(ne)&&ay(this,E,ne)){y.add(b);break}}}return y.iterator},rt.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(Vt(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(an(te)){if(!an(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(Vt(y)&&Vt(x)){if(!ay(a,y,x))return!1}else if(y!==x)return!1;return!0}po.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===ps){var ne=a.newValue;b==="nodeDataArray"&&Vt(ne)&&hS(this,ne),y.isModified=!0}else if(x===us){var ae=a.oldValue;b==="nodeDataArray"&&Vt(ae)&&this.ip(ae),y.isModified=!0}else x===Wa&&(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===ps||x===us){var Te=a.change===ps,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 it=Qe[a];if(Te)Tm(it,Ve,je,!0);else if(!(0>je)){var ct=je+fg(it);it.pc(ct,!0),wv(it,ct,je)}}y.isModified=!0}}finally{y.aa=!0}}}}},po.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)},po.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()},po.prototype.refreshDataBoundLinks=function(){},po.prototype.updateRelationshipsFromData=function(){},po.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=Gn()),x.push(ne))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);Jn(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ly(a,y){var x=y.Hh;if(an(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(an(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}}}}po.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new hi;if(an(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 hi,ne=b.iterator;ne.next();){var ae=ne.value;if(ae instanceof Xn)a||ae.fromNode!==null&&ae.toNode!==null||E.add(ae);else if(ae instanceof ii&&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 hi;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 ki))return null;if(te.isSelected=!1,te.isHighlighted=!1,b.add(y,te),y instanceof ii){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 sr&&te instanceof sr)for(y=y.memberParts;y.next();)ne=h0(a,y.value,x,b,E),ne instanceof Xn||ne===null||(ne.containingGroup=te)}else if(y instanceof Xn&&te instanceof Xn)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 ii&&(ne.labeledLink=te);return te}po.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof Xn||(b=E.copyNodeData(b),Vt(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 Xn||(E=y.copyNodeData(b)),Vt(E)&&(x.data=E)));return x},Xe.Object.defineProperties(po.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}}}),po.prototype.updateAllRelationshipsFromData=po.prototype.rp,po.prototype.findLinksByExample=po.prototype.ls,po.prototype.findNodesByExample=po.prototype.ms,po.prototype.findLinkForData=po.prototype.Kc,po.prototype.findNodeForData=po.prototype.ii,po.prototype.findPartForData=po.prototype.Lc,po.prototype.findNodeForKey=po.prototype.Vb,po.prototype.removeModeledPart=po.prototype.ip,po.prototype.removeModeledParts=po.prototype.Gs,po.prototype.rebuildParts=po.prototype.Wd;var pS=!1,gS=!1,mS=!1;po.className="PartManager";function ha(a){po.apply(this,arguments)}qe(ha,po),ha.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},ha.prototype.addModeledParts=function(a){for(po.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 ii&&(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 ii&&(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}}}}ha.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)})}ha.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},ha.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},ha.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},ha.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},ha.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},ha.prototype.findPartForKey=function(a){var y=po.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},ha.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},ha.prototype.doModelChanged=function(a){var y=this;if(po.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 it=a.newValue;if(it!==void 0){var ct=this.Vb(it);ct instanceof sr?Qe.containingGroup=ct:Qe.containingGroup=null}else Qe.containingGroup=null}}else if(E==="linkLabelKeys"){var It=this.Kc(a.object);if(It!==null){var Mt=a.oldValue,Gt=a.newValue;Array.isArray(Mt)&&Mt.forEach(function(Dn){0<=Gt.indexOf(Dn)||(Dn=y.Vb(Dn),Dn!==null&&(Dn.labeledLink=null))}),Array.isArray(Gt)&&Gt.forEach(function(Dn){Dn=y.Vb(Dn),Dn!==null&&(Dn.labeledLink=It)})}}else if(E==="linkCategory"){var Zt=this.Kc(a.object),$t=a.newValue;Zt!==null&&typeof $t=="string"&&(Zt.category=$t)}else E==="linkDataArray"&&(SS(this,a.oldValue),vS(this,a.newValue));x.isModified=!0}else if(b===ps){var en=a.newValue;if(E==="linkDataArray"&&typeof en=="object"&&en!==null)yS(this,en);else if(E==="linkLabelKeys"&&gd(en)){var vn=this.Kc(a.object),ni=this.Vb(en);vn!==null&&ni!==null&&(ni.labeledLink=vn)}x.isModified=!0}else if(b===us){var pi=a.oldValue;if(E==="linkDataArray"&&typeof pi=="object"&&pi!==null)this.ip(pi);else if(E==="linkLabelKeys"&&gd(pi)){var ci=this.Vb(pi);ci!==null&&(ci.labeledLink=null)}x.isModified=!0}}else if(b===Vo){var $n=a.propertyName;a.object!==x.model||$n!=="linkFromKeyProperty"&&$n!=="linkToKeyProperty"&&$n!=="linkFromPortIdProperty"&&$n!=="linkToPortIdProperty"&&$n!=="linkLabelKeysProperty"&&$n!=="nodeIsGroupProperty"&&$n!=="nodeGroupKeyProperty"&&$n!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},ha.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)})},ha.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 Xn){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 sr)&&(a.containingGroup=y)}}},ha.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 sr&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=E)):(te.link=this.Kc(ne),te.link!==null&&E instanceof ii&&(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 sr&&(E.containingGroup=a))}},ha.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof ii){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 sr)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&cc(y,x,b)}}},ha.prototype.copyPartData=function(a,y){var x=po.prototype.copyPartData.call(this,a,y);if(a instanceof Xn)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},ha.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 Xn){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 ii&&(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 ii||(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},ha.prototype.findLinkForKey=ha.prototype.findLinkForKey,ha.prototype.findPartForKey=ha.prototype.findPartForKey,ha.prototype.removeAllModeledParts=ha.prototype.removeAllModeledParts,ha.prototype.addModeledParts=ha.prototype.addModeledParts,ha.prototype.addAllModeledParts=ha.prototype.addAllModeledParts,ha.className="GraphLinksPartManager";function wu(){po.apply(this,arguments),this.Sg=null}qe(wu,po);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}}}wu.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},wu.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},wu.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}},wu.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))},wu.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},wu.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},wu.prototype.doModelChanged=function(a){if(po.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}}}}},wu.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;a instanceof ii&&(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)))}}},wu.prototype.updateDataBindings=function(a,y){po.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},wu.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 ii&&y.mh(te)===x&&d0(this,E,this.ii(te))}hc(y,x)}a=y.mh(a),a!==void 0&&E instanceof ii&&(a=this.Vb(a),d0(this,a,E))}},wu.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof ii){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(us,"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)}},wu.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},wu.prototype.findLinkForKey=wu.prototype.findLinkForKey,wu.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,br(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new hi,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 hi,this.Lt=new On,this.Wg=!1,this.o=null,this.undoManager=new jo,a!==void 0&&(an(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)+":"+li(E)}}return y},xi.prototype.xA=function(a){a.change!==Wa&&zt("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Rs?(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===ps?E.add(je.newValue):je.change===us&&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=Fo++,b.set(je,Ve),E.set(je,y))}if(!Vt(y))return y;te||(te=[]);var ae=Object.isExtensible(y);if(b||(b=new hi),ae){var fe=b.get(y);if(fe)return fe}else for(E||(E=new hi),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 kt||y instanceof Yn||y instanceof Tn||y instanceof Ei||y instanceof Si)fe=y.copy(),ne(y,fe);else{if(y instanceof fo||y instanceof Qn||y instanceof un)return y;if(y instanceof On)fe=new On().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 hi)fe=new hi().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}rt=xi.prototype,rt.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},rt.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},rt.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,Vt(y)&&(a.dm(y),a.modelData=y)}rt.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)},rt.kv=function(a){xS(this,a),a=a.nodeDataArray,an(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 hi,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===ps||te===us)&&(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(Vt(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}rt.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===ps?E.add(Te.newValue):Te.change===us&&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},rt.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)&&zt("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new hi;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)},rt.$x=function(a,y){a.change!==Wa&&zt("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Rs?(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 }'},rt.yA=function(a,y){return this.$x(a,y)},rt.np=function(a){return a===void 0&&(a=Ig(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},rt.toJSON=function(a){return this.np(a)},rt.Zw=function(a){var y=null;if(typeof a=="string")try{y=bt.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:zt("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&zt("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},rt.Ky=function(a){return this.Zw(a)},xi.constructGraphLinksModel=function(){return new xi},rt=xi.prototype,rt.dm=function(a){if(an(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(Vt(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:zt("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(Vt(a)){for(y in a)if(x=a[y],Vt(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 On,b=0;b<x.length/2;b++)E.add(new kt(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return Nx(a)}return a},rt.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()):an(a)?pd(this,a):Vt(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 wi;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 ol(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function cy(a,y){var x=y;if(x instanceof kt)y={class:"go.Point",x:ol(x.x),y:ol(x.y)};else if(x instanceof Yn)y={class:"go.Size",width:ol(x.width),height:ol(x.height)};else if(x instanceof Tn)y={class:"go.Rect",x:ol(x.x),y:ol(x.y),width:ol(x.width),height:ol(x.height)};else if(x instanceof Ei)y={class:"go.Margin",top:ol(x.top),right:ol(x.right),bottom:ol(x.bottom),left:ol(x.left)};else if(x instanceof Si)x.sb()?y={class:"go.Spot",x:ol(x.x),y:ol(x.y),offsetX:ol(x.offsetX),offsetY:ol(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===Su)&&(y.start=x.start,y.end=x.end,x.type===Su&&(x.startRadius!==0&&(y.startRadius=ol(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=ol(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 Qn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=ol(x.startX)),x.startY!==0&&(y.startY=ol(x.startY)),x.endX!==0&&(y.endX=ol(x.endX)),x.endY!==0&&(y.endY=ol(x.endY)),x.spot1.D($s)||(y.spot1=x.spot1),x.spot2.D(Ta)||(y.spot2=x.spot2),x.type===Qn.o&&(y.path=Qn.ia(x))):x instanceof un&&(y={class:"go.EnumValue",classType:Ig(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var te=Ns(y,E);if(!CS(E,te))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&te instanceof On){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 sl(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 kt(sl(a.x),sl(a.y));else if(y==="Size")x=new Yn(sl(a.width),sl(a.height));else if(y==="Rect")x=new Tn(sl(a.x),sl(a.y),sl(a.width),sl(a.height));else if(y==="Margin")x=new Ei(sl(a.top),sl(a.right),sl(a.bottom),sl(a.left));else if(y==="Spot")typeof a.enum=="string"?x=xh(a.enum):x=new Si(sl(a.x),sl(a.y),sl(a.offsetX),sl(a.offsetY));else if(y==="Brush"){if(x=new fo,x.type=ai(fo,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof Si&&(x.start=a.start),a.end instanceof Si&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=sl(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=sl(a.endRadius)),a=a.colorStops,Vt(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=Qn.parse(a.path):x=new Qn,x.type=ai(Qn,a.type),typeof a.startX=="number"&&(x.startX=sl(a.startX)),typeof a.startY=="number"&&(x.startY=sl(a.startY)),typeof a.endX=="number"&&(x.endX=sl(a.endX)),typeof a.endY=="number"&&(x.endY=sl(a.endY)),a.spot1 instanceof Si&&(x.spot1=a.spot1),a.spot2 instanceof Si&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=dy(b),typeof b=="function"&&(x=ai(b,a.name)));return x}rt.Pe=function(a){return this.Lt.add(a),this},rt.ik=function(a){this.Lt.remove(a)},rt.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)},rt.cb=function(a,y,x,b,E,te,ne){ea(this,"",a,y,x,b,E,te,ne)},rt.g=function(a,y,x,b,E){ea(this,"",Vo,a,this,y,x,b,E)},rt.Fs=function(a,y,x,b,E,te){ea(this,"",Vo,y,a,x,b,E,te)};function ea(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===ps?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,Vt(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&&Nn(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!an(b)&&a.propertyName&&(b=Ns(a.object,a.propertyName)),an(b)&&typeof x=="number"&&(a=a.newValue,y?qn(b,x):Nn(b,x,a))):zt("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===us?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,Vt(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&Nn(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)&&!an(b)&&a.propertyName&&(b=Ns(a.object,a.propertyName)),an(b)&&typeof x=="number"&&(a=a.oldValue,y?Nn(b,x,a):qn(b,x))):zt("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Wa&&zt("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}},rt=xi.prototype,rt.La=function(a,y){y===void 0&&(y=""),ea(this,"SourceChanged",Wa,y,a,null,null)},rt.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Ns(a,y),y!==void 0)){if(gd(y))return y;zt("Key value for node data "+a+" is not a number or a string: "+y)}}},rt.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=Ns(a,x);b!==y&&this.hc(y)===null&&($o(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),ea(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"}rt.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},rt.hc=function(a){return a===null&&zt("Model.findNodeDataForKey:key must not be null"),a!==void 0&&gd(a)?this.kb.I(a):null},rt.$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)}}}}},rt.xf=function(a){a!==null&&(xo(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&&zt("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,Nn(a.Tc,b,y)),ea(a,"nodeDataArray",ps,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}rt.Fy=function(a){if(an(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)},rt.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)}ea(a,"nodeDataArray",us,"nodeDataArray",a,y,null,b,null),a.qp(y)}rt.nA=function(a){if(an(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)},rt.$z=function(a){if(a!==this.nodeDataArray&&an(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()}},rt.jp=function(a,y){y!==void 0&&(a=Og(this,a),a instanceof In&&this.Vf.add(y,a))},rt.Lv=function(){},rt.fm=function(){},rt.em=function(){},rt.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)}rt.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),Vt(a)&&br(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 br(b),b}if(x&&Vt(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=Ns(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 jo||te instanceof Rs||te instanceof Go||(te=p0(a,te,!1)),$o(x,b,te)}return br(x),x}return y instanceof kt||y instanceof Yn||y instanceof Tn||y instanceof Si||y instanceof Ei?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 nn&&(ES=!0,An('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),An(" Is that really your intent?"));var b=Ns(a,y);b!==x&&($o(a,y,x),this.Fs(a,y,b,x))},rt=xi.prototype,rt.set=function(a,y,x){this.setDataProperty(a,y,x)},rt.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])}},rt.Ay=function(a,y){this.ts(a,-1,y)},rt.ts=function(a,y,x){0>y&&(y=a.length),Nn(a,y,x),ea(this,"",ps,"",a,null,x,null,y)},rt.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&zt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];qn(a,y),ea(this,"",us,"",a,x,null,y,null)},rt.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Ns(a,y),y===void 0))return"";if(typeof y=="string")return y;zt("getCategoryForNodeData found a non-string category for "+a+": "+y)},rt.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=Ns(a,x);b===void 0&&(b=""),b!==y&&($o(a,x,y),ea(this,"nodeCategory",Vo,x,a,b,y))}else $o(a,x,y)}},rt.lm=function(a,y){this.jm(y,this.Ro(a))},rt.Tl=function(){return!1},rt.Wj=function(){return!1},rt.ri=function(){return!1},rt.xs=function(){return!1},rt.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]:bt.go!==void 0&&bt.go[a]?bt.go[a]:null}function Ns(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){}}Xe.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===""&&zt("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&zt("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];Vt(E)||zt("Model.nodeDataArray must only contain Objects, not: "+E),xo(E)}for(this.Tc=a,b=new On,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(ea(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=bt.JSON.parse(a)}catch(te){}else typeof a=="object"?x=a:zt("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=bt[b])),typeof E=="function"&&(a=new E)}catch(te){}a===null||a instanceof xi?y=a:zt("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=Ns,xi.safePropertySet=$o,Xu.Brush=fo,Xu.ChangedEvent=Go,Xu.Geometry=Qn,Xu.Margin=Ei,Xu.Panel=Zn,Xu.Point=kt,Xu.Rect=Tn,Xu.Size=Yn,Xu.Spot=Si,Xu.Transaction=Rs,Xu.UndoManager=jo;function zs(a,y,x,b){br(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}zs.prototype.copy=function(){var a=new zs;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},rt=zs.prototype,rt.qb=function(a){a.classType===zs&&(this.mode=a)},rt.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},rt.freeze=function(){return this._isFrozen=!0,this},rt.ka=function(){return this._isFrozen=!1,this},rt.Kx=function(a){return a===void 0&&(a=null),this.mode=Dg,this.backConverter=a,this},rt.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},rt.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)}rt.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==="")An("Binding error: target property is the empty string: "+this.toString());else{var te=y;if(b!==""&&(te=Ns(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){}}}},rt.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=Ns(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,it=b.panel.itemArray;fe.ov(it,Qe),fe.ts(it,Qe,Ve)}}}catch(ct){}}finally{this.st.remove(a)}}}},Xe.Object.defineProperties(zs.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&Yt(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&Yt(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&Yt(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&Yt(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&Yt(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&Yt(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&Yt(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&Yt(this),this.el=a}}}),zs.prototype.updateSource=zs.prototype.sp,zs.prototype.updateTarget=zs.prototype.Mv,zs.prototype.ofModel=zs.prototype.dA,zs.prototype.ofObject=zs.prototype.cp,zs.prototype.makeTwoWay=zs.prototype.Kx;var Ox="Binding",MS=new un(zs,"OneWay",1),Dg=new un(zs,"TwoWay",2);zs.className="Binding",zs.parseEnum=function(a,y){return function(x){return x=ai(a,x),x===null?y:x}},zs.toString=li,zs.OneWay=MS,zs.TwoWay=Dg;function jr(a,y,x){xi.call(this),this.Vv=`,
|
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
|
"removedLinkKeys": `,this.md=[],this.$f=new In,this.wb=new hi,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&&(an(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}qe(jr,xi),jr.constructGraphLinksModel=xi.constructGraphLinksModel,jr.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},rt=jr.prototype,rt.clear=function(){xi.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},rt.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)+":"+li(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},rt.Qv=function(a,y){this.linkKeyProperty===""&&zt("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===ps?E.add(Te.newValue):Te.change===us&&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},rt.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},rt.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)},rt.Rv=function(){var a=xi.prototype.Rv.call(this),y=`,
|
|
|
"linkDataArray": `+pd(this,this.linkDataArray,!0);return a+y},rt.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}rt.Pv=function(a,y){this.linkKeyProperty===""&&zt("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===ps?E.add(Te.newValue):Te.change===us&&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},rt.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)&&zt("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)},jr.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===ps){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,Vt(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===us){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,Vt(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)}},rt=jr.prototype,rt.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}},rt.yx=function(a){return su(this,a,!0)},rt.wv=function(a,y){Ep(this,a,y,!0)},rt.Bx=function(a){return su(this,a,!1)},rt.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=Ns(y,a),a!==void 0))){if(gd(a))return a;zt((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=Ns(y,E);te!==x&&(hc(a,te,y),$o(y,E,x),a.hc(x)===null&&cc(a,x,y),ea(a,b?"linkFromKey":"linkToKey",Vo,E,y,te,x),typeof E=="string"&&a.La(y,E))}else $o(y,E,x)}}rt.zx=function(a){return g0(this,a,!0)},rt.xv=function(a,y){Lp(this,a,y,!0)},rt.Cx=function(a){return g0(this,a,!1)},rt.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=Ns(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=Ns(y,E);te===void 0&&(te=""),te!==x&&($o(y,E,x),ea(a,b?"linkFromPortId":"linkToPortId",Vo,E,y,te,x),typeof E=="string"&&a.La(y,E))}else $o(y,E,x)}}rt.Ef=function(a){if(a===null)return m0;var y=this.je;return y===""?m0:(a=Ns(a,y),a===void 0?m0:a)},rt.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=Ns(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)}ea(this,"linkLabelKeys",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else $o(a,x,y)}},rt.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Ns(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),ea(this,"linkLabelKeys",ps,x,a,null,y,null,E)))}else zt(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},rt.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Ns(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(hc(this,y,a),ea(this,"linkLabelKeys",us,x,a,y,null,E,null)))}else b!==void 0&&zt(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},rt.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Ns(a,y),y!==void 0)){if(gd(y))return y;zt("Key value for link data "+a+" is not a number or a string: "+y)}}},rt.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=Ns(a,x);b!==y&&this.jh(y)===null&&($o(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),ea(this,"linkKey",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},rt.jh=function(a){return a===null&&zt("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&gd(a)?this.wb.I(a):null},rt.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)}}}}},rt.Jc=function(a){return a===null?!1:this.$f.contains(a)},rt.fi=function(a){a!==null&&(xo(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&&zt("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)),ea(a,"linkDataArray",ps,"linkDataArray",a,null,y,null,b),fy(a,y)}rt.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)},rt.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(ea(a,"linkDataArray",us,"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)}rt.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)},rt.Zz=function(a){if(this.linkKeyProperty===""&&zt("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&an(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)}rt.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):p0(this,a,!0),Vt(a)&&(br(a),this.lf!==""&&$o(a,this.lf,void 0),this.mf!==""&&$o(a,this.mf,void 0),this.je!==""&&$o(a,this.je,[])),a},rt.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Ns(a,y)},rt.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Ns(a,y),y!==void 0)){if(gd(y))return y;zt("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},rt.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=Ns(a,x);b!==y&&(hc(this,b,a),$o(a,x,y),this.hc(y)===null&&cc(this,y,a),ea(this,"nodeGroupKey",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},jr.prototype.copyNodeData=function(a){return a===null?null:(a=xi.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Ns(a,this.Je)===void 0||$o(a,this.Je,void 0),a)},jr.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=Ns(a,y);b!==x&&($o(a,y,x),this.Fs(a,y,b,x))},rt=jr.prototype,rt.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&&Ns(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},rt.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),ea(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),ea(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,ea(this,"linkLabelKeys",ps,fe,b,E,te,_e,_e))}},rt.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;$o(a,b,x),ea(this,"nodeGroupKey",Vo,b,a,y,x),typeof b=="string"&&this.La(a,b)}},rt.Lv=function(){xi.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)fy(this,a[x])},rt.fm=function(a){xi.prototype.fm.call(this,a),a=this.wa(a);var y=Og(this,a);if(y!==null){var x=Gn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;ea(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,ea(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,ea(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&&(ea(this,"linkLabelKeys",ps,ne,b,a,a,ae,ae),x.push(b))}for(y=0;y<x.length;y++)hc(this,a,x[y]);Jn(x)}},rt.em=function(a){xi.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&cc(this,y,a)},rt.qp=function(a){xi.prototype.qp.call(this,a);var y=this.lh(a);hc(this,y,a)},rt.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Ns(a,y),y===void 0))return"";if(typeof y=="string")return y;zt("getCategoryForLinkData found a non-string category for "+a+": "+y)},jr.prototype.getLinkCategoryForData=function(a){return this.ps(a)},jr.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=Ns(a,x);b===void 0&&(b=""),b!==y&&($o(a,x,y),ea(this,"linkCategory",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},jr.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},rt=jr.prototype,rt.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))}rt.Wj=function(){return!0},rt.ri=function(){return!0},rt.xs=function(){return!0},rt.Xj=function(){return!0},Xe.Object.defineProperties(jr.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];Vt(E)||zt("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),xo(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new On,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,ea(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"}}}),jr.prototype.setCategoryForLinkData=jr.prototype.lp,jr.prototype.getCategoryForLinkData=jr.prototype.ps,jr.prototype.assignAllDataProperties=jr.prototype.Do,jr.prototype.setGroupKeyForNodeData=jr.prototype.mp,jr.prototype.getGroupKeyForNodeData=jr.prototype.lh,jr.prototype.isGroupForNodeData=jr.prototype.Yu,jr.prototype.copyLinkData=jr.prototype.Jo,jr.prototype.mergeLinkDataArray=jr.prototype.Zz,jr.prototype.removeLinkDataCollection=jr.prototype.lA,jr.prototype.removeLinkData=jr.prototype.bm,jr.prototype.addLinkDataCollection=jr.prototype.Ey,jr.prototype.addLinkData=jr.prototype.fi,jr.prototype.containsLinkData=jr.prototype.Jc,jr.prototype.makeLinkDataKeyUnique=jr.prototype.Bs,jr.prototype.findLinkDataForKey=jr.prototype.jh,jr.prototype.setKeyForLinkData=jr.prototype.Ks,jr.prototype.getKeyForLinkData=jr.prototype.Ac,jr.prototype.removeLabelKeyForLinkData=jr.prototype.Qx,jr.prototype.addLabelKeyForLinkData=jr.prototype.Bu,jr.prototype.setLabelKeysForLinkData=jr.prototype.Ls,jr.prototype.getLabelKeysForLinkData=jr.prototype.Ef,jr.prototype.setToPortIdForLinkData=jr.prototype.Cv,jr.prototype.getToPortIdForLinkData=jr.prototype.Cx,jr.prototype.setFromPortIdForLinkData=jr.prototype.xv,jr.prototype.getFromPortIdForLinkData=jr.prototype.zx,jr.prototype.setToKeyForLinkData=jr.prototype.Bv,jr.prototype.getToKeyForLinkData=jr.prototype.Bx,jr.prototype.setFromKeyForLinkData=jr.prototype.wv,jr.prototype.getFromKeyForLinkData=jr.prototype.yx,jr.prototype.clear=jr.prototype.clear;var m0=Object.freeze([]);jr.className="GraphLinksModel",Xu.GraphLinksModel=jr,xi.constructGraphLinksModel=xi.constructGraphLinksModel=function(){return new jr},xi.initDiagramModel=hy=function(){return new jr};function al(a,y){xi.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(an(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}qe(al,xi),al.constructGraphLinksModel=xi.constructGraphLinksModel,al.prototype.cloneProtected=function(a){xi.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},rt=al.prototype,rt.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)+":"+li(E)}}return y},rt.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},rt.gp=function(a){xi.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},rt.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&zt("applyIncrementalJson cannot change Model properties"),xi.prototype.fp.call(this,a)},rt.Vl=function(a){return a},rt.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Ns(a,y),y!==void 0)){if(gd(y))return y;zt("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},rt.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=Ns(a,x);b!==y&&(hc(this,b,a),$o(a,x,y),this.hc(y)===null&&cc(this,y,a),ea(this,"nodeParentKey",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},rt.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Ns(a,y),y===void 0)?"":typeof y=="string"?y:(zt("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},al.prototype.getLinkCategoryForData=function(a){return this.ss(a)},al.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=Ns(a,x);b===void 0&&(b=""),b!==y&&($o(a,x,y),ea(this,"parentLinkCategory",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},al.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},al.prototype.copyNodeData=function(a){return a===null?null:(a=xi.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Ns(a,this.Ke)===void 0||$o(a,this.Ke,void 0),a)},al.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=Ns(a,y);b!==x&&($o(a,y,x),this.Fs(a,y,b,x))},rt=al.prototype,rt.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)},rt.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;$o(a,b,x),ea(this,"nodeParentKey",Vo,b,a,y,x),typeof b=="string"&&this.La(a,b)}},rt.fm=function(a){xi.prototype.fm.call(this,a),a=this.wa(a);var y=Og(this,a);if(y!==null){var x=Gn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;ea(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]);Jn(x)}},rt.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)},rt.qp=function(a){xi.prototype.qp.call(this,a);var y=this.mh(a);hc(this,y,a)},rt.lm=function(a,y){xi.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},rt.Tl=function(){return!0},rt.xs=function(){return!0},Xe.Object.defineProperties(al.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"}}}),al.prototype.setParentLinkCategoryForNodeData=al.prototype.Ms,al.prototype.getParentLinkCategoryForNodeData=al.prototype.ss,al.prototype.setParentKeyForNodeData=al.prototype.qe,al.prototype.getParentKeyForNodeData=al.prototype.mh,al.className="TreeModel",Xu.TreeModel=al;function as(a){Qo.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=Ju,this.Ti=0,this.Zv=new kt,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=ll,this.nd=Tp,this.hd=oy,this.tf=6,this.Nn=C0,a&&Object.assign(this,a)}qe(as,Qo),as.prototype.cloneProtected=function(a){Qo.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},as.prototype.qb=function(a){a.classType===as?a===w0||a===b0||a===S0||a===x0||a===Tp?this.sorting=a:a===sf||a===Mp||a===ll||a===vd?this.direction=a:a===zh||a===md||a===Ju||a===Qu?this.arrangement=a:(a===Df||a===C0)&&(this.nodeDiameterFormula=a):Qo.prototype.qb.call(this,a)},as.prototype.createNetwork=function(){return new kp(this)},as.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 On;y.addAll(a.iterator),a=new On;var x=new On,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 On,b.addAll(a),b.addAll(x)):(this.arrangement===Qu&&x.reverse(),b=new On,b.addAll(x),b.addAll(a))}fe=b.length;for(var Qe=te=E=0;Qe<b.length;Qe++){var it=je+Ve*te*(this.direction===ll?1:-1)/fe,ct=b.M(Qe).diameter;isNaN(ct)&&(ct=yd(b.M(Qe),it)),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++)it=b.M(E),ct=b.M(E===fe-1?0:E+1),isNaN(it.diameter)&&yd(it,0),isNaN(ct.diameter)&&yd(ct,0),ne=Math.max(ne,(it.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,ll);break;case Ju:Bg(this,x,_e+ne,ll);break;case zh:Rg(this,x,Te/2,_e+ne,ll)}}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,ll);break;case Ju:Bg(this,a,_e+ne,ll);break;case zh:Rg(this,a,Te/2,_e+ne,ll)}}}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,ll)}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===ll?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===ll?x:-x,(_e.diameter+Te.diameter)/2+ne),x+=b===ll?_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===ll?x:-x,ne),x+=b===ll?_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===ll?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=kt.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(kt.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===ll?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=kt.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(kt.free(Te),a.mj++,!(23<a.mj)){if(fe=Math.atan2(_e,fe),fe=E===ll?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===ll)){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===ll)){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}as.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},as.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 kt(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))},as.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}}as.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:zt("Invalid sorting type.")}return a};function Ix(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new On;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}as.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 On;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=[],it=0;it<x.length;it++)0>y[x[it]].indexOf(x[it===x.length-1?0:it+1])&&Qe.push(it===x.length-1?0:it+1);if(Qe.length===0)for(it=0;it<x.length;it++)Qe.push(it);for(it=0;it<Qe.length;it++){for(var ct=Qe[it],It=y[_e],Mt=0,Gt=0;Gt<ne.length;Gt++){var Zt=te[ne[Gt]],$t=te[ae[Gt]];if(Zt<$t){var en=Zt;Zt=$t}else en=$t;if(en<ct&&ct<=Zt)for($t=0;$t<It.length;$t++){var vn=It[$t];0>x.indexOf(vn)||en<te[vn]&&te[vn]<Zt||en===te[vn]||Zt===te[vn]||Mt++}else for($t=0;$t<It.length;$t++)vn=It[$t],0>x.indexOf(vn)||en<te[vn]&&te[vn]<Zt&&en!==te[vn]&&Zt!==te[vn]&&Mt++}for(It=Mt,Gt=Mt=0;Gt<y[_e].length;Gt++)en=x.indexOf(y[_e][Gt]),0<=en&&(en=Math.abs(ct-(en>=ct?en+1:en)),Mt+=en<x.length+1-en?en:x.length+1-en);for(Gt=0;Gt<ne.length;Gt++)en=te[ne[Gt]],Zt=te[ae[Gt]],en>=ct&&en++,Zt>=ct&&Zt++,en>Zt&&($t=Zt,Zt=en,en=$t),Zt-en<(x.length+2)/2==(en<ct&&ct<=Zt)&&Mt++;(It<Te||It===Te&&Mt<je)&&(Te=It,je=Mt,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||(it=Qe>Te?Qe-Te:Te-Qe,je+=Qe<Te!=it>ne-it?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},Xe.Object.defineProperties(as.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!==ll&&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 un(as,"ConstantSpacing",0),md=new un(as,"ConstantDistance",1),zh=new un(as,"ConstantAngle",2),Qu=new un(as,"Packed",3),ll=new un(as,"Clockwise",4),vd=new un(as,"Counterclockwise",5),sf=new un(as,"BidirectionalLeft",6),Mp=new un(as,"BidirectionalRight",7),S0=new un(as,"Forwards",8),x0=new un(as,"Reverse",9),w0=new un(as,"Ascending",10),b0=new un(as,"Descending",11),Tp=new un(as,"Optimized",12),C0=new un(as,"Pythagorean",13),Df=new un(as,"Circular",14);as.className="CircularLayout",as.ConstantSpacing=Ju,as.ConstantDistance=md,as.ConstantAngle=zh,as.Packed=Qu,as.Clockwise=ll,as.Counterclockwise=vd,as.BidirectionalLeft=sf,as.BidirectionalRight=Mp,as.Forwards=S0,as.Reverse=x0,as.Ascending=w0,as.Descending=b0,as.Optimized=Tp,as.Pythagorean=C0,as.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){No.call(this,a)}qe(kp,No),kp.prototype.createVertex=function(){return new zg(this)},kp.prototype.createEdge=function(){return new P0(this)},kp.className="CircularNetwork";function zg(a){sa.call(this,a),this.u=this.Si=NaN}qe(zg,sa);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}Xe.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){Ul.call(this,a)}qe(P0,Ul),P0.className="CircularEdge";function Ma(a){Qo.call(this),this.ah=null,this.An=0,this.$d=new Yn(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(Ma,Qo),Ma.prototype.cloneProtected=function(a){Qo.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},Ma.prototype.createNetwork=function(){return new Rf(this)},Ma.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=Gn(),Te=0;Te<ae+y.vertexes.count+2;Te++)_e[Te]=null;ae=0,ne.reset();for(var je=Tn.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 kt(je.x+je.width+b.width,je.y),_e[1]=new kt(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],it=new kt(Qe.x+je.width+b.width,Qe.y),ct=new kt(Qe.x,Qe.y+je.height+b.height);for(Ve+1<ae&&_e.splice(Ve+1,0,null),_e[Ve]=it,_e[Ve+1]=ct,ae++,Ve=Qe.x-je.x,Qe=Qe.y-je.y,Te=Te.vertexes.iterator;Te.next();)it=Te.value,it.centerX+=Ve,it.centerY+=Qe}for(Tn.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 kt(Ve.x+Ve.width+b.width,Ve.y),_e[1]=new kt(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 kt(je.x+Ve.width+b.width,je.y),Ve=new kt(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(Jn(_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},Ma.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},Ma.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 On),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 On,E.Hj=ae),ae.add(ne),E.Vd--,E.sh+=ne.sh):ne.network===b&&(ae=ne.Hj,ae===null&&(ae=new On,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,on.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=on.sqrt((ae+Qe+_e*_e*4/(ne*ne))/Qe),ne=(ae-1)*Te/2,ae=(ae-1)*je/2,E.bounds=new Tn(te-Ve.x-ne,fe-Ve.y-ae,Te+2*ne,je+2*ae),E.focus=new kt(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 Tn(b.centerX-te,b.centerY-ne,E.Ss,E.Qs),b.focus=new kt(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=on.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,it){return Qe===null||it===null||Qe===it?0:it.width*it.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=on.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}Ma.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Ma.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,on.sqrt(x*x+a*a)):a+x<y?(b=b+E-ne,a=a+x-y,on.sqrt(b*b+a*a)):ne-(b+E):b>ne+ae?a>y+te?(x=b-ne-ae,a=a-y-te,on.sqrt(x*x+a*a)):a+x<y?(b=b-ne-ae,a=a+x-y,on.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,It){return ct===null||It===null||ct===It?0:ct.centerX-It.centerX}):y.sort(function(ct,It){return ct===null||It===null||ct===It?0:ct.centerY-It.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 it=zS(ne,Ve);1>it?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new _0),it=b.random(),ae=b.random(),fe>_e?(b=Math.abs(Ve.bounds.right-ne.bounds.x),b=(1+b)*it):fe<_e?(b=Math.abs(Ve.bounds.x-ne.bounds.right),b=-(1+b)*it):(b=Math.max(Ve.width,ne.width),b=(1+b)*it-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)/(it*it),b=(_e-fe)/it*ae,_e=(Qe-Te)/it*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}Ma.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},Ma.prototype.moveFixedVertex=function(){},Ma.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Ma.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=ro,y.toSpot=ro)}},Ma.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=Tn.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,Tn.free(x)}x=Tn.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()}Tn.free(x)},Ma.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Ma.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Ma.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Ma.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Ma.prototype.electricalFieldX=function(){return 0},Ma.prototype.electricalFieldY=function(){return 0},Ma.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Ma.prototype.gravitationalFieldX=function(){return 0},Ma.prototype.gravitationalFieldY=function(){return 0},Ma.prototype.isFixed=function(a){return a.isFixed},Xe.Object.defineProperties(Ma.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"&&zt('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())}}}),Ma.className="ForceDirectedLayout";function US(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}US.className="ForceDirectedSubnet";function Rf(a){No.call(this,a)}qe(Rf,No),Rf.prototype.createVertex=function(){return new Hg(this)},Rf.prototype.createEdge=function(){return new Ug(this)},Rf.className="ForceDirectedNetwork";function Hg(a){sa.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,sa),Xe.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){Ul.call(this,a),this.j=this.o=NaN}qe(Ug,Ul),Xe.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 mo(a){Qo.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 kt,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}qe(mo,Qo),mo.prototype.cloneProtected=function(a){Qo.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},mo.prototype.qb=function(a){a.classType===mo?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:zt("Unknown enum value: "+a):Qo.prototype.qb.call(this,a)},mo.prototype.createNetwork=function(){return new Np(this)},mo.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 it=E.focus;_e=te.focus;var ct=b.rev?te.bounds:E.bounds;Qe=kt.alloc(),Te!==je?ct.w()&&je.isVisible()?je.actualBounds.w()?(Dh(je,Ve,Fr,Qe),Qe.x+=je.actualBounds.x-ct.x,Qe.y+=je.actualBounds.y-ct.y):(Dh(je,Ve,Fr,Qe),Qe.w()||Qe.assign(it)):Qe.assign(it):ct.w()?(Dh(je,Ve,Fr,Qe),Qe.w()||Qe.assign(it)):Qe.assign(it),je=b.rev?E.bounds:te.bounds,Te=kt.alloc(),ne!==fe?je.w()&&fe.isVisible()?fe.actualBounds.w()?(Dh(fe,ae,Fr,Te),Te.x+=fe.actualBounds.x-je.x,Te.y+=fe.actualBounds.y-je.y):(Dh(fe,ae,Fr,Te),Te.w()||Te.assign(_e)):Te.assign(_e):je.w()?(Dh(fe,ae,Fr,Te),Te.w()||Te.assign(_e)):Te.assign(_e),this.K===90||this.K===270?(ne=Math.round((Qe.x-it.x)/this.kc),fe=Qe.x,ae=Math.round((Te.x-_e.x)/this.kc),_e=Te.x):(ne=Math.round((Qe.y-it.y)/this.kc),fe=Qe.y,ae=Math.round((Te.y-_e.y)/this.kc),_e=Te.y),kt.free(Qe),kt.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 It=ct.fromPort,Mt=ct.toPort;if(It!==null&&Mt!==null){var Gt=ct.fromNode;if(Ve=ct.toNode,Gt!==null&&Ve!==null){var Zt=T0(this,!0),$t=T0(this,!1),en=this.setsPortSpots?Zt:ct.computeSpot(!0,It);it=this.setsPortSpots?$t:ct.computeSpot(!1,Mt);var vn=ct.isOrthogonal;en.$c()&&en.Hf($t)&&it.$c()&&it.Hf(Zt)?je=0:(Zt=ct.getLinkPoint(Gt,It,en,!0,vn,Ve,Mt,kt.alloc()),$t=ct.getLinkDirection(Gt,It,Zt,en,!0,vn,Ve,Mt),kt.free(Zt),en.ys()||$t!==JS(this,b,!0)?this.setsPortSpots&&Gt!==null&&Gt.ports.count===1&&b.rev&&(je+=1):je+=1,en=ct.getLinkPoint(Ve,Mt,it,!1,vn,Gt,It,kt.alloc()),ct=ct.getLinkDirection(Ve,Mt,en,it,!1,vn,Gt,It),kt.free(en),it.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)&&(it=a.createVertex(),it.node=null,it.Dj=1,it.layer=Qe,it.near=E,a.dh(it),E=a.Zj(E,it,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=ne,E.portToColOffset=0,E.portFromPos=fe,E.portToPos=0,E=it),ct=1,je&&ct--,Qe-Te>ct&&0<Qe){for(b.valid=!1,it=a.createVertex(),it.node=null,it.Dj=2,it.layer=Qe-1,a.dh(it),E=a.Zj(E,it,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=it,Qe--;Qe-Te>ct&&0<Qe;)it=a.createVertex(),it.node=null,it.Dj=3,it.layer=Qe-1,a.dh(it),E=a.Zj(E,it,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=it,Qe--;E=a.Zj(it,te,b.link),E.valid=!je,je&&(it.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},mo.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}mo.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},mo.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 xl(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 bu(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 it=fe[Ve];if(it.valid&&it.fromVertex.layer!==y){var ct=it.fromVertex.index,It=it.portToPos;it=it.portFromPos,Te<It&&(je>ct||je===ct&&Qe>it)&&ae++,It<Te&&(ct>je||ct===je&&it>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++)it=fe[Ve],it.valid&&it.toVertex.layer!==y&&(ct=it.toVertex.index,It=it.portToPos,it=it.portFromPos,Qe<it&&(je>ct||je===ct&&Te>It)&&ae++,it<Qe&&(ct>je||ct===je&&It>Te)&&ae++)}for(te[ne*E+ne]=ae,fe=ne+1;fe<E;fe++){var Mt=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++)it=Zt[Ve],it.valid&&it.fromVertex.layer!==y&&(ct=it.fromVertex.index,it=it.portFromPos,(je<ct||je===ct&&Qe<it)&&Gt++,(ct<je||ct===je&&it<Qe)&&Mt++)}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++)it=Zt[Ve],it.valid&&it.toVertex.layer!==y&&(ct=it.toVertex.index,It=it.portToPos,(je<ct||je===ct&&Te<It)&&Gt++,(ct<je||ct===je&&It<Te)&&Mt++)}te[ne*E+fe]=Mt,te[fe*E+ne]=Gt}}return xd(a,y,b),te}mo.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}mo.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(it,ct){return it-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)}}mo.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++}mo.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 it=Ve[Qe],ct=it.fromVertex;Te+=1,ct.component!==1&&(te+=1,ct=ct.layer-_e.layer,it=a.linkMinLength(it),b=Math.min(b,ct-it))}for(Ve=_e.destinationEdgesArrayAccess,E=Ve.length,Qe=0;Qe<E;Qe++)it=Ve[Qe].toVertex,--Te,it.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++)it=Ve[Qe].fromVertex,_e+=1,it.component!==1?b+=1:Te=!0;for(Ve=ne.destinationEdgesArrayAccess,je=Ve.length,Qe=0;Qe<je;Qe++)it=Ve[Qe],ct=it.toVertex,--_e,ct.component!==1&&(--b,ct=ne.layer-ct.layer,it=a.linkMinLength(it),E=Math.min(E,ct-it));(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}mo.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))}mo.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=xl(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=xl(this)),b=this.Ia;0<=b;b--)L0(this,b,-1),Bu(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=xl(this))}for(bu(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=xl(this)),b=this.Ia;0<=b;b--)L0(this,b,0),Bu(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=xl(this))}bu(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?bu(this,y):(a=E,y=xl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,1)||te;for(E=this.countCrossings(),E>=a?bu(this,y):(a=E,y=xl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,1)||te;for(E>=a?bu(this,y):(a=E,y=xl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,-1)||te;for(E>=a?bu(this,y):(a=E,y=xl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,0)||te;for(E>=a?bu(this,y):(a=E,y=xl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,0)||te;E>=a?bu(this,y):(a=E,y=xl(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?bu(this,y):(a=E,y=xl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,1)||te;for(E=this.countCrossings(),E>=a?bu(this,y):(a=E,y=xl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,1)||te;for(E>=a?bu(this,y):(a=E,y=xl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,-1)||te;for(E>=a?bu(this,y):(a=E,y=xl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,0)||te;for(E>=a?bu(this,y):(a=E,y=xl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,0)||te;E>=a?bu(this,y):(a=E,y=xl(this))}}bu(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,it=b[te].column,ct=b[te+1].column,It=a.nodeMinColumnSpace(b[te],!0),Mt=a.nodeMinColumnSpace(b[te],!1),Gt=a.nodeMinColumnSpace(b[te+1],!0),Zt=a.nodeMinColumnSpace(b[te+1],!1);It=it-It+Gt,Mt=ct-Mt+Zt;var $t=b[te].sourceEdges.iterator;for($t.reset();$t.next();)if(Gt=$t.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($t=b[te].destinationEdges.iterator,$t.reset();$t.next();)if(Gt=$t.value,Zt=Gt.toVertex,Gt.valid&&Zt.layer===y){for(Gt=0;b[Gt]!==Zt;)Gt++;Gt===te+1&&(Qe+=1)}for($t=b[te+1].sourceEdges.iterator,$t.reset();$t.next();)if(Gt=$t.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($t=b[te+1].destinationEdges.iterator,$t.reset();$t.next();)if(Gt=$t.value,Zt=Gt.toVertex,Gt.valid&&Zt.layer===y){for(Gt=0;b[Gt]!==Zt;)Gt++;Gt===te&&(Ve+=1)}Gt=Zt=0,$t=ne[b[te].index];var en=ae[b[te].index],vn=ne[b[te+1].index],ni=ae[b[te+1].index];$t!==-1&&(Zt+=Math.abs($t-it),Gt+=Math.abs($t-Mt)),en!==-1&&(Zt+=Math.abs(en-it),Gt+=Math.abs(en-Mt)),vn!==-1&&(Zt+=Math.abs(vn-ct),Gt+=Math.abs(vn-It)),ni!==-1&&(Zt+=Math.abs(ni-ct),Gt+=Math.abs(ni-It)),(Qe<Ve-.5||Qe===Ve&&je<Te-.5||Qe===Ve&&je===Te&&Gt<Zt-.5)&&(_e=fe=!0,b[te].column=Mt,b[te+1].column=It,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}mo.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 it=Ve=0,ct=0;if(0>=x)for(var It=E[b].sourceEdges.iterator;It.next();){var Mt=It.value,Gt=Mt.fromVertex;if(Mt.valid&&Gt.layer!==y){var Zt=gy(Mt),$t=Mt.portFromColOffset;Mt=Mt.portToColOffset,Gt=Gt.column,Ve+=(Math.abs(Te+Mt-(Gt+$t))+1)*Zt,it+=(Math.abs(Qe+Mt-(Gt+$t))+1)*Zt,ct+=(Math.abs(je+Mt-(Gt+$t))+1)*Zt}}if(0<=x)for(It=E[b].destinationEdges.iterator;It.next();)Mt=It.value,Gt=Mt.toVertex,Mt.valid&&Gt.layer!==y&&(Zt=gy(Mt),$t=Mt.portFromColOffset,Mt=Mt.portToColOffset,Gt=Gt.column,Ve+=(Math.abs(Te+$t-(Gt+Mt))+1)*Zt,it+=(Math.abs(Qe+$t-(Gt+Mt))+1)*Zt,ct+=(Math.abs(je+$t-(Gt+Mt))+1)*Zt);Mt=$t=Zt=0,It=ne[E[b].index],Gt=ae[E[b].index],It!==-1&&(Zt+=Math.abs(It-Te),$t+=Math.abs(It-Qe),Mt+=Math.abs(It-je)),Gt!==-1&&(Zt+=Math.abs(Gt-Te),$t+=Math.abs(Gt-Qe),Mt+=Math.abs(Gt-je)),it<Ve||it===Ve&&$t<Zt?(_e=fe=!0,E[b].column=Qe):(ct<Ve||ct===Ve&&Mt<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=xl(a),te=E0(a);for(b=te+1;te<b;){b=te,tx(a,x,1);var ne=E0(a);ne>te?bu(a,E):ne<te&&(te=ne,E=xl(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=xl(a),te=E0(a),b=te+1;te<b;)b=te,tx(a,x,-1),ne=E0(a),ne>te?bu(a,E):ne<te&&(te=ne,E=xl(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=Gn(),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=hr(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)),Jn(y),a.u(te,ne,ae,fe),a.network.vertexes.each(function(Qe){var it=Gn();_e&&it.push(te.get(Qe)),Te&&it.push(ne.get(Qe)),je&&it.push(ae.get(Qe)),Ve&&it.push(fe.get(Qe)),it.sort(function(It,Mt){return It-Mt});var ct=it.length;ct=(it[Math.floor((ct-1)/2)]+it[Math.ceil((ct-1)/2)])/2,Jn(it),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=hr(_e.sourceEdgesArrayAccess),Qe=Ve.next();!Qe.done;Qe=Ve.next())Qe=Qe.value,Qe.valid&&je.push(Qe);_e.bo=je}for(_e=hr(_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}}}mo.prototype.verticalAlignment=function(a,y,x){Kx(a),a=hr(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=hr(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=hr(y),ne=te.next();!ne.done;ne=te.next()){var ae=hr(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=hr(y),ae=te.next();!ae.done;ae=te.next()){ae=hr(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 it=I0(Te,je),ct=it.portFromPos,It=it.portToPos;it.link!==null&&(Te.node&&Te.node!==it.link.fromNode&&(ct=ne?Te.focusX:Te.focusY),je.node&&je.node!==it.link.toNode&&(It=ne?je.focusX:je.focusY))}else it=I0(je,Te),ct=it.portToPos,It=it.portFromPos,it.link!==null&&(Te.node&&Te.node!==it.link.toNode&&(ct=ne?Te.focusX:Te.focusY),je.node&&je.node!==it.link.fromNode&&(It=ne?je.focusX:je.focusY));Ve=b?Te.qg+(Ve-ct)-(Qe-It):Te.qg+ct-It,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=hr(y),ne=x.next();!ne.done;ne=x.next())for(te=hr(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 hi,y=hr(y),ne=y.next();!ne.done;ne=y.next())for(x=hr(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&&zt("Could not determine previous vertex in layer"),y[x][a-1]}mo.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=Gn(),E=Gn(),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)));Jn(b),Jn(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}mo.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:Ws:a.K===90?y?Ws:bs:a.K===180?y?Ts:Gs:y?Gs:Ts}mo.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 kt(x&&b?0:te,x&&!b?0:y),a.reset();a.next();)x=a.value,x.x+=te,x.y+=y,x.commit()},mo.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 Tn(0,0,x,Math.abs(this.Ta[0]))):y.push(new Tn(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new Tn(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new Tn(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new Tn(0,0,Math.abs(this.Ta[0]),x)):y.push(new Tn(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new Tn(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new Tn(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},mo.prototype.commitLayers=function(){},mo.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===fs&&(b=!0),ae!==null&&fe===fs&&(x=!0),(b||x)&&(fe=null,b&&(fe=y.getLinkPointFromPoint(E,ne,ne.ga(Fr),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(Fr),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,it=this.ie,ct=y.firstPickIndex+1;if(y.isOrthogonal){Qe=!0;var It=y.pointsCount;4<It&&y.points.removeRange(2,It-3)}else if(y.curve===ou)Ve=!0,It=y.pointsCount,4<It&&y.points.removeRange(2,It-3),It===4&&(ct=2);else{It=y.pointsCount;var Mt=_e===fs,Gt=fe===fs;2<It&&Mt&&Gt?y.points.removeRange(1,It-2):3<It&&Mt&&!Gt?y.points.removeRange(1,It-3):3<It&&!Mt&&Gt?y.points.removeRange(2,It-2):4<It&&!Mt&&!Gt&&y.points.removeRange(2,It-3)}if(x.rev){for(;je!==null&&Te!==je;){var Zt=It=null;for(Mt=je.sourceEdges.iterator;Mt.next()&&(Gt=Mt.value,Gt.link!==x.link||(It=Gt.fromVertex,Zt=Gt.toVertex,It.node!==null)););if(It===null)break;if(It!==Te){Mt=y.i(ct-1).x,Gt=y.i(ct-1).y;var $t=It.centerX,en=It.centerY;if(Qe)this.K===180||this.K===0?ct===y.firstPickIndex+1?(y.m(ct++,Mt,Gt),y.m(ct++,Mt,en)):(Zt!==null?Zt.centerY:Gt)!==en&&(Zt=this.Ta[It.layer-1]+this.Rf.x,y.m(ct++,Zt,Gt),y.m(ct++,Zt,en)):ct===y.firstPickIndex+1?(y.m(ct++,Mt,Gt),y.m(ct++,$t,Gt)):(Zt!==null?Zt.centerX:Mt)!==$t&&(Zt=this.Ta[It.layer-1]+this.Rf.y,y.m(ct++,Mt,Zt),y.m(ct++,$t,Zt));else if(ct===y.firstPickIndex+1){Zt=Math.max(10,this.he[je.layer]);var vn=Math.max(10,this.Ld[je.layer]);if(Ve)this.K===180?$t<=je.bounds.x?(je=je.bounds.x,y.m(ct++,je-Zt,en),y.m(ct++,je,en),y.m(ct++,je+vn,en)):(y.m(ct++,$t-Zt,en),y.m(ct++,$t,en),y.m(ct++,$t+vn,en)):this.K===90?en>=je.bounds.bottom?(je=je.bounds.y+je.bounds.height,y.m(ct++,$t,je+vn),y.m(ct++,$t,je),y.m(ct++,$t,je-Zt)):(y.m(ct++,$t,en+vn),y.m(ct++,$t,en),y.m(ct++,$t,en-Zt)):this.K===270?en<=je.bounds.y?(je=je.bounds.y,y.m(ct++,$t,je-Zt),y.m(ct++,$t,je),y.m(ct++,$t,je+vn)):(y.m(ct++,$t,en-Zt),y.m(ct++,$t,en),y.m(ct++,$t,en+vn)):this.K===0&&($t>=je.bounds.right?(je=je.bounds.x+je.bounds.width,y.m(ct++,je+vn,en),y.m(ct++,je,en),y.m(ct++,je-Zt,en)):(y.m(ct++,$t+vn,en),y.m(ct++,$t,en),y.m(ct++,$t-Zt,en)));else{y.m(ct++,Mt,Gt);var ni=0;this.K===180||this.K===0?((this.K===180?$t>=je.bounds.right:$t<=je.bounds.x)&&(ni=(this.K===0?-Zt:vn)/2),y.m(ct++,Mt+ni,en)):((this.K===270?en>=je.bounds.bottom:en<=je.bounds.y)&&(ni=(this.K===90?-Zt:vn)/2),y.m(ct++,$t,Gt+ni)),y.m(ct++,$t,en)}}else Zt=Math.max(10,this.he[It.layer]),vn=Math.max(10,this.Ld[It.layer]),Ve?this.K===180?(y.m(ct++,$t-Zt-it,en),y.m(ct++,Math.min($t-Zt+it/2,$t),en),y.m(ct++,$t,en),y.m(ct++,$t,en),y.m(ct++,Math.max($t+vn-it/2,$t),en),y.m(ct++,$t+vn+it,en)):this.K===90?(y.m(ct++,$t,en+vn+it),y.m(ct++,$t,Math.max(en+vn-it/2,en)),y.m(ct++,$t,en),y.m(ct++,$t,en),y.m(ct++,$t,Math.min(en-Zt+it/2,en)),y.m(ct++,$t,en-Zt-it)):this.K===270?(y.m(ct++,$t,en-Zt-it),y.m(ct++,$t,Math.min(en-Zt+it/2,en)),y.m(ct++,$t,en),y.m(ct++,$t,en),y.m(ct++,$t,Math.max(en+vn-it/2,en)),y.m(ct++,$t,en+vn+it)):(y.m(ct++,$t+vn+it,en),y.m(ct++,Math.max($t+vn-it/2,$t),en),y.m(ct++,$t,en),y.m(ct++,$t,en),y.m(ct++,Math.min($t-Zt+it/2,$t),en),y.m(ct++,$t-Zt-it,en)):y.m(ct++,$t,en)}je=It}(ae===null||_e!==fs||Qe)&&(Mt=y.i(ct-1).x,Gt=y.i(ct-1).y,$t=y.i(ct).x,en=y.i(ct).y,Qe?(it=this.Ld[Te.layer],this.K===180||this.K===0?(Qe=Gt,Qe>=Te.bounds.y&&Qe<=Te.bounds.bottom&&(this.K===180?$t>=Te.bounds.x:$t<=Te.bounds.right)&&(je=Te.centerX+(this.K===180?-it:it),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++,$t,Qe)):(Qe=Mt,Qe>=Te.bounds.x&&Qe<=Te.bounds.right&&(this.K===270?en>=Te.bounds.y:en<=Te.bounds.bottom)&&(je=Te.centerY+(this.K===270?-it:it),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++,Mt,je),y.m(ct++,Qe,je)),y.m(ct++,Qe,en)),y.m(ct++,$t,en)):Ve?(Zt=Math.max(10,this.he[Te.layer]),vn=Math.max(10,this.Ld[Te.layer]),this.K===180&&$t>=Te.bounds.x?(je=Te.bounds.x+Te.bounds.width,y.L(ct-2,je,Gt),y.L(ct-1,je+vn,Gt)):this.K===90&&en<=Te.bounds.bottom?(je=Te.bounds.y,y.L(ct-2,Mt,je),y.L(ct-1,Mt,je-Zt)):this.K===270&&en>=Te.bounds.y?(je=Te.bounds.y+Te.bounds.height,y.L(ct-2,Mt,je),y.L(ct-1,Mt,je+vn)):this.K===0&&$t<=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]),vn=Math.max(10,this.Ld[Te.layer]),Qe=0,this.K===180||this.K===0?((this.K===180?$t<=Te.bounds.x:$t>=Te.bounds.right)&&(Qe=(this.K===0?vn:-Zt)/2),y.m(ct++,$t+Qe,Gt)):((this.K===270?en<=Te.bounds.y:en>=Te.bounds.bottom)&&(Qe=(this.K===90?vn:-Zt)/2),y.m(ct++,Mt,en+Qe)),y.m(ct++,$t,en)))}else{for(;Te!==null&&Te!==je;){for(Zt=It=null,Te=Te.destinationEdges.iterator;Te.next()&&(Mt=Te.value,Mt.link!==x.link||(It=Mt.toVertex,Zt=Mt.fromVertex,Zt.node!==null&&(Zt=null),It.node!==null)););if(It===null)break;It!==je&&(Mt=y.i(ct-1).x,Gt=y.i(ct-1).y,$t=It.centerX,en=It.centerY,Qe?this.K===180||this.K===0?(Zt!==null?Zt.centerY:Gt)!==en&&(Zt=this.Ta[It.layer]+this.Rf.x,ct===y.firstPickIndex+1&&(Zt=this.K===0?Math.max(Zt,Mt):Math.min(Zt,Mt)),y.m(ct++,Zt,Gt),y.m(ct++,Zt,en)):(Zt!==null?Zt.centerX:Mt)!==$t&&(Zt=this.Ta[It.layer]+this.Rf.y,ct===y.firstPickIndex+1&&(Zt=this.K===90?Math.max(Zt,Gt):Math.min(Zt,Gt)),y.m(ct++,Mt,Zt),y.m(ct++,$t,Zt)):(Zt=Math.max(10,this.he[It.layer]),vn=Math.max(10,this.Ld[It.layer]),Ve?this.K===180?(y.m(ct++,$t+vn+it,en),y.m(ct++,Math.max($t+vn-it/2,$t),en),y.m(ct++,$t,en),y.m(ct++,$t,en),y.m(ct++,Math.min($t-Zt+it/2,$t),en),y.m(ct++,$t-Zt-it,en)):this.K===90?(y.m(ct++,$t,en-Zt-it),y.m(ct++,$t,Math.min(en-Zt+it/2,en)),y.m(ct++,$t,en),y.m(ct++,$t,en),y.m(ct++,$t,Math.max(en+vn-it/2,en)),y.m(ct++,$t,en+vn+it)):this.K===270?(y.m(ct++,$t,en+vn+it),y.m(ct++,$t,Math.max(en+vn-it/2,en)),y.m(ct++,$t,en),y.m(ct++,$t,en),y.m(ct++,$t,Math.min(en-Zt+it/2,en)),y.m(ct++,$t,en-Zt-it)):(y.m(ct++,$t-Zt-it,en),y.m(ct++,Math.min($t-Zt+it/2,$t),en),y.m(ct++,$t,en),y.m(ct++,$t,en),y.m(ct++,Math.max($t+vn-it/2,$t),en),y.m(ct++,$t+vn+it,en)):this.K===180?(y.m(ct++,$t+vn,en),y.m(ct++,$t-Zt,en)):this.K===90?(y.m(ct++,$t,en-Zt),y.m(ct++,$t,en+vn)):this.K===270?(y.m(ct++,$t,en+vn),y.m(ct++,$t,en-Zt)):(y.m(ct++,$t-Zt,en),y.m(ct++,$t+vn,en)))),Te=It}Qe&&(Mt=y.i(ct-1).x,Gt=y.i(ct-1).y,$t=y.i(ct).x,en=y.i(ct).y,this.K===180||this.K===0?Gt!==en&&(Zt=this.K===0?Math.min(Math.max(($t+Mt)/2,this.Ta[je.layer]+this.Rf.x),$t):Math.max(Math.min(($t+Mt)/2,this.Ta[je.layer]+this.Rf.x),$t),y.m(ct++,Zt,Gt),y.m(ct++,Zt,en)):Mt!==$t&&(Zt=this.K===90?Math.min(Math.max((en+Gt)/2,this.Ta[je.layer]+this.Rf.y),en):Math.max(Math.min((en+Gt)/2,this.Ta[je.layer]+this.Rf.y),en),y.m(ct++,Mt,Zt),y.m(ct++,$t,Zt)))}b!==null&&Ve&&4<=y.pointsCount&&(ne!==null&&(ne=_e===fs?y.getLinkPointFromPoint(E,ne,ne.ga(Fr),y.i(3),!0):y.i(0),_e===fs&&(_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===fs?y.getLinkPointFromPoint(te,ae,ae.ga(Fr),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),fe===fs&&(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()},mo.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new On,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 it=this.linkSpacing*(Te-(_e-1)/2);y++,Qe.uh(),Qe.L(Ve.index,te.x,te.y+it),Qe.L(Ve.index+1,ne.x,ne.y+it),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),it=this.linkSpacing*(Te-(_e-1)/2),y++,Qe.uh(),Qe.L(Ve.index,te.x+it,te.y),Qe.L(Ve.index+1,ne.x+it,ne.y),Qe.zf()}te=E}a=b}}}},rt=mo.prototype,rt.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},rt.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},rt.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},rt.B=function(a,y){return a-=y,-1<a&&1>a},rt.zi=function(a,y,x,b){var E=a.length,te=b-x;if(!(1>=te))if((0>x||x>=E-1)&&zt("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}Xe.Object.defineProperties(mo.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()):zt("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 un(mo,"CycleDepthFirst",0),xy=new un(mo,"CycleGreedy",1),Wg=new un(mo,"CycleFromLayers",2),A0=new un(mo,"LayerOptimalLinkLength",0),wy=new un(mo,"LayerLongestPathSink",1),by=new un(mo,"LayerLongestPathSource",2),N0=new un(mo,"InitDepthFirstOut",0),Cy=new un(mo,"InitDepthFirstIn",1),Py=new un(mo,"InitNaive",2),_y=new un(mo,"AggressiveNone",0),O0=new un(mo,"AggressiveLess",1),Ey=new un(mo,"AggressiveMore",2),$x=8;mo.className="LayeredDigraphLayout",mo.CycleDepthFirst=k0,mo.CycleGreedy=xy,mo.CycleFromLayers=Wg,mo.LayerOptimalLinkLength=A0,mo.LayerLongestPathSink=wy,mo.LayerLongestPathSource=by,mo.InitDepthFirstOut=N0,mo.InitDepthFirstIn=Cy,mo.InitNaive=Py,mo.AggressiveNone=_y,mo.AggressiveLess=O0,mo.AggressiveMore=Ey,mo.PackNone=0,mo.PackExpand=1,mo.PackStraighten=2,mo.PackMedian=4,mo.PackAll=15,mo.AlignNone=0,mo.AlignUpperLeft=1,mo.AlignUpperRight=2,mo.AlignLowerLeft=4,mo.AlignLowerRight=8,mo.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){No.call(this,a)}qe(Np,No),Np.prototype.createVertex=function(){return new Cu(this)},Np.prototype.createEdge=function(){return new Zg(this)},Np.className="LayeredDigraphNetwork";function Cu(a){sa.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(Cu,sa);function rx(a,y){return a.index-y.index}function I0(a,y){if(!a.$n){for(var x=[],b=hr(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=hr(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;zt("Unable to find destination edge to given vertex")}function Ly(a){if(!a.co){for(var y=[],x=hr(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=hr(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}Cu.prototype.Cl=function(a){sa.prototype.Cl.call(this,a),this.bo=this.co=null},Cu.prototype.Kl=function(a){sa.prototype.Kl.call(this,a),this.bo=this.co=null},Cu.prototype.zl=function(a){sa.prototype.zl.call(this,a),this.$n=this.ao=null},Cu.prototype.Jl=function(a){sa.prototype.Jl.call(this,a),this.$n=this.ao=null},Xe.Object.defineProperties(Cu.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)}}}),Cu.prototype.deleteDestinationEdge=Cu.prototype.Jl,Cu.prototype.addDestinationEdge=Cu.prototype.zl,Cu.prototype.deleteSourceEdge=Cu.prototype.Kl,Cu.prototype.addSourceEdge=Cu.prototype.Cl,Cu.className="LayeredDigraphVertex";function Zg(a){Ul.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}qe(Zg,Ul),Xe.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 Ir(a){Qo.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 Yn(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(Ir,Qo),Ir.prototype.cloneProtected=function(a){Qo.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)},Ir.prototype.qb=function(a){a.classType===Ir?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:zt("Unknown enum value: "+a):Qo.prototype.qb.call(this,a)},Ir.prototype.createNetwork=function(){return new zf(this)},Ir.prototype.makeNetwork=function(a){function y(b){if(b instanceof ii)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof Xn){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 mn?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof sr?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Ir.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 mn&&(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 ii?(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}Ir.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:zt("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:zt("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 On,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 On,b=y.sourceVertexes;b.next();)E=b.value,sx(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:zt("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}Ir.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}}Ir.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])}}Ir.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])}}Ir.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:zt("Unhandled sorting value "+a.sorting.toString())}},Ir.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Ir.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=Tn.allocAt(0,0,a.bounds.width+te,a.bounds.height+ne),a.bounds=E,Tn.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}Ir.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=kt.alloc(),Ve=0;Ve<Te;Ve++){var Qe=_e[Ve],it=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-it.width,a.bounds.y+fe),Qe.move(je),Qe=Qe.Sd();Qe.next();){var ct=Qe.value;ct.fromSpot=Ts,ct.toSpot=Gs}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=Gs,ct.toSpot=Ts;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=Gs,ct.toSpot=Ts;else for(je.h(a.bounds.x+a.commentMargin-it.width,a.bounds.y+fe),Qe.move(je),Qe=Qe.Sd();Qe.next();)ct=Qe.value,ct.fromSpot=Ts,ct.toSpot=Gs;fe=0<=a.commentSpacing?fe+(it.height+a.commentSpacing):fe+(a.commentSpacing-it.height)}else{if(135<E&&!te||!x&&ae)if(0<=a.commentMargin)for(je.h(a.bounds.x+fe,a.bounds.y-a.commentMargin-it.height),Qe.move(je),Qe=Qe.Sd();Qe.next();)ct=Qe.value,ct.fromSpot=bs,ct.toSpot=Ws;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=Ws,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=Ws,ct.toSpot=bs;else for(je.h(a.bounds.x+fe,a.bounds.y+a.commentMargin-it.height),Qe.move(je),Qe=Qe.Sd();Qe.next();)ct=Qe.value,ct.fromSpot=bs,ct.toSpot=Ws;fe=0<=a.commentSpacing?fe+(it.width+a.commentSpacing):fe+(a.commentSpacing-it.width)}}if(kt.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)}},Ir.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),it=a.rowSpacing,ct=0;(b||_e||a.hm||a.im&&a.maxGenerationCount===1)&&(ct=Math.max(0,a.rowIndent)),b=a.width;var It=a.height,Mt=0,Gt=0,Zt=0,$t=null,en=null,vn=0,ni=0,pi=0,ci=0,$n=0,Dn=0,nr=0,Vi=0;if(Te&&!Kg(fe)&&135<E&&ne.reverse(),Kg(fe))if(1<ae)for(var to=0;to<ae;to++)to%2===0&&to!==ae-1&&(Vi=Math.max(Vi,y?ne[to].Da.width:ne[to].Da.height));else ae===1&&(Vi=y?ne[0].Da.width:ne[0].Da.height);if(Te){switch(fe){case Hh:Gt=135>E?hx(this,a,ne,Vi,Mt,Gt):dx(this,a,ne,Vi,Mt,Gt),Vi=Gt.x,Mt=Gt.width,Gt=Gt.height;break;case Uh:for($t=0;$t<ae;$t++)en=ne[$t],je=en.Da,Zt=Dn===0?0:it,y?(en.S.h(te-je.width,ci+Zt),Mt=Math.max(Mt,je.width),Gt=Math.max(Gt,ci+Zt+je.height),ci+=Zt+je.height):(en.S.h(pi+Zt,te-je.height),Mt=Math.max(Mt,pi+Zt+je.width),Gt=Math.max(Gt,je.height),pi+=Zt+je.width),Dn++;break;case fh:for($t=0;$t<ae;$t++)en=ne[$t],te=en.Da,je=Dn===0?0:it,y?(en.S.h(Ve/2+a.focus.x,ci+je),Mt=Math.max(Mt,te.width),Gt=Math.max(Gt,ci+je+te.height),ci+=je+te.height):(en.S.h(pi+je,Ve/2+a.focus.y),Mt=Math.max(Mt,pi+je+te.width),Gt=Math.max(Gt,te.height),pi+=je+te.width),Dn++}$t=Tl(this,2),en=Tl(this,2),y?($t[0].h(0,0),$t[1].h(0,Gt),en[0].h(Mt,0)):($t[0].h(0,0),$t[1].h(Mt,0),en[0].h(0,Gt)),en[1].h(Mt,Gt)}else for(to=0;to<ae;to++){var To=ne[to],ua=To.Da;if(y){0<je&&0<Dn&&pi+Ve+ua.width>je&&(pi<te&&af(a,fe,te-pi,0,nr,to-1),$n++,Dn=0,nr=to,Zt=Gt,pi=0,ci=135<E?-Gt-it:Gt+it),R0(this,To,0,ci);var da=0;if(Dn===0)$t=To.Yo,en=To.kp,vn=ua.width,ni=ua.height,($t===null||en===null||E!==qu(To))&&($t=Tl(this,2),en=Tl(this,2),$t[0].h(0,0),$t[1].h(0,ni),en[0].h(vn,0),en[1].h(vn,ni));else{var $a=Gn();ni=fx(this,a,To,$t,en,vn,ni,$a),da=ni.x,$t=$a[0],en=$a[1],vn=ni.width,ni=ni.height,Jn($a),pi<ua.width&&0>da&&(Bf(a,-da,0,nr,to-1),B0($t,-da,0),B0(en,-da,0),da=0)}To.S.h(da,ci),Mt=Math.max(Mt,vn),Gt=Math.max(Gt,Zt+($n===0?0:it)+ua.height),pi=vn}else 0<je&&0<Dn&&ci+Ve+ua.height>je&&(ci<te&&af(a,fe,0,te-ci,nr,to-1),$n++,Dn=0,nr=to,Zt=Mt,ci=0,pi=135<E?-Mt-it:Mt+it),R0(this,To,pi,0),da=0,Dn===0?($t=To.Yo,en=To.kp,vn=ua.width,ni=ua.height,($t===null||en===null||E!==qu(To))&&($t=Tl(this,2),en=Tl(this,2),$t[0].h(0,0),$t[1].h(vn,0),en[0].h(0,ni),en[1].h(vn,ni))):($a=Gn(),ni=fx(this,a,To,$t,en,vn,ni,$a),da=ni.x,$t=$a[0],en=$a[1],vn=ni.width,ni=ni.height,Jn($a),ci<ua.height&&0>da&&(Bf(a,0,-da,nr,to-1),B0($t,0,-da),B0(en,0,-da),da=0)),To.S.h(pi,da),Gt=Math.max(Gt,ni),Mt=Math.max(Mt,Zt+($n===0?0:it)+ua.width),ci=ni;Dn++}switch(0<$n&&(y?(Gt+=Math.max(0,x),pi<Mt&&af(a,fe,Mt-pi,0,nr,ae-1),0<ct&&(_e||Bf(a,ct,0,0,ae-1),Mt+=ct)):(Mt+=Math.max(0,x),ci<Gt&&af(a,fe,0,Gt-ci,nr,ae-1),0<ct&&(_e||Bf(a,0,ct,0,ae-1),Gt+=ct))),ct=_e=0,fe){case Ip:y?_e+=Mt/2-a.focus.x-Qe/2:ct+=Gt/2-a.focus.y-Qe/2;break;case jf:0<$n?y?_e+=Mt/2-a.focus.x-Qe/2:ct+=Gt/2-a.focus.y-Qe/2:y?(Vi=ne[0].S.x+ne[0].la.x,_e+=Vi+(ne[ae-1].S.x+ne[ae-1].la.x+2*ne[ae-1].focus.x-Vi)/2-a.focus.x-Qe/2):(Vi=ne[0].S.y+ne[0].la.y,ct+=Vi+(ne[ae-1].S.y+ne[ae-1].la.y+2*ne[ae-1].focus.y-Vi)/2-a.focus.y-Qe/2);break;case Yc:y?(_e-=Qe,Mt+=Qe):(ct-=Qe,Gt+=Qe);break;case Xc:y?(_e+=Mt-a.width+Qe,Mt+=Qe):(ct+=Gt-a.height+Qe,Gt+=Qe);break;case Hh:y?1<ae?_e+=Vi+Ve/2-a.focus.x:_e+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<ae?ct+=Vi+Ve/2-a.focus.y:ct+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case Uh:y?_e+=Mt+Ve/2-a.focus.x:ct+=Gt+Ve/2-a.focus.y;break;case fh:break;default:Gt=this.customAlignment(a,_e,ct,Mt,Gt),_e=Gt[0],ct=Gt[1],Mt=Gt[2],Gt=Gt[3]}for(Qe=0;Qe<ae;Qe++)Vi=ne[Qe],y?Vi.S.h(Vi.S.x+Vi.la.x-_e,Vi.S.y+(135<E?(Te?-Gt:-Vi.Da.height)+Vi.la.y-x:It+x+Vi.la.y)):Vi.S.h(Vi.S.x+(135<E?(Te?-Mt:-Vi.Da.width)+Vi.la.x-x:b+x+Vi.la.x),Vi.S.y+Vi.la.y-ct);if(ae=ne=0,Te?y?(Mt=ky(a,Mt,_e),0>_e&&(_e=0),135<E&&(ct+=Gt+x),Gt+=It+x,fe===fh&&(ne+=Ve/2+a.focus.x),ae+=It+x):(135<E&&(_e+=Mt+x),Mt+=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>Mt&&(Mt=Ny(fe,b-Mt,0),ne=Mt.x,ae=Mt.y,Mt=b,_e=0):Mt=ky(a,Mt,_e),0>_e&&(ne-=_e,_e=0),135<E&&(ct+=Gt+x),Gt=Math.max(Math.max(Gt,It),Gt+It+x),ae+=It+x):(135<E&&(_e+=Mt+x),Mt=Math.max(Math.max(Mt,b),Mt+b+x),a.comments===null?It>Gt&&(Gt=Ny(fe,0,It-Gt),ne=Gt.x,ae=Gt.y,Gt=It,ct=0):Gt=Ay(a,Gt,ct),0>ct&&(ae-=ct,ct=0),ne+=b+x),0<$n)E=Tl(this,4),$n=Tl(this,4),y?(E[2].h(0,It+x),E[3].h(E[2].x,Gt),$n[2].h(Mt,E[2].y),$n[3].h($n[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(Mt,E[2].y),$n[2].h(E[2].x,Gt),$n[3].h(E[3].x,$n[2].y));else{for(E=Tl(this,$t.length+2),$n=Tl(this,en.length+2),fe=0;fe<$t.length;fe++)Te=$t[fe],E[fe+2].h(Te.x+ne,Te.y+ae);for(fe=0;fe<en.length;fe++)Te=en[fe],$n[fe+2].h(Te.x+ne,Te.y+ae)}y?(E[0].h(_e,0),E[1].h(E[0].x,It),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])),$n[0].h(_e+b,0),$n[1].h($n[0].x,It),$n[2].y<$n[1].y&&($n[2].x<$n[0].x?$n[2].assign($n[1]):$n[1].assign($n[2])),$n[3].y<$n[2].y&&($n[3].x<$n[0].x?$n[3].assign($n[2]):$n[2].assign($n[3])),E[2].y-=x/2,$n[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])),$n[0].h(0,ct+It),$n[1].h(b,$n[0].y),$n[2].x<$n[1].x&&($n[2].y<$n[0].y?$n[2].assign($n[1]):$n[1].assign($n[2])),$n[3].x<$n[2].x&&($n[3].y<$n[0].y?$n[3].assign($n[2]):$n[2].assign($n[3])),E[2].x-=x/2,$n[2].x-=x/2),dc(this,$t),dc(this,en),a.Yo=E,a.kp=$n,a.la.h(_e,ct),a.Da.h(Mt,Gt)}break;default:zt("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,it=a.computeNodeIndent(y),ct=Te||je?0:it/2,It=y.rowSpacing,Mt=0;(Te||je||y.hm||y.im&&y.maxGenerationCount===1)&&(Mt=Math.max(0,y.rowIndent)),Te=y.width;var Gt=y.height,Zt=0,$t=0,en=0,vn=0,ni=0,pi=0,ci=0,$n=0,Dn=0,nr=0;if(ae&&!Kg(_e)&&135<b&&E.reverse(),Kg(_e))if(1<ne)for(var Vi=0;Vi<ne;Vi++){var to=E[Vi],To=to.Da;Vi%2===0&&Vi!==ne-1?Dn=Math.max(Dn,(x?To.width:To.height)+a.computeBusNodeSpacing(to)-Qe):Vi%2!==0&&(nr=Math.max(nr,(x?To.width:To.height)+a.computeBusNodeSpacing(to)-Qe))}else ne===1&&(Dn=x?E[0].Da.width:E[0].Da.height);if(ae)switch(_e){case Hh:case Jc:$t=135>b?hx(a,y,E,Dn,Zt,$t):dx(a,y,E,Dn,Zt,$t),Dn=$t.x,Zt=$t.width,$t=$t.height;break;case Uh:for(Ve=0;Ve<ne;Ve++)ct=E[Ve],en=ct.Da,nr=ci===0?0:It,x?(ct.S.h(te-en.width,ni+nr),Zt=Math.max(Zt,en.width),$t=Math.max($t,ni+nr+en.height),ni+=nr+en.height):(ct.S.h(vn+nr,te-en.height),Zt=Math.max(Zt,vn+nr+en.width),$t=Math.max($t,en.height),vn+=nr+en.width),ci++;break;case fh:for(te=0;te<ne;te++)Ve=E[te],ct=Ve.Da,en=ci===0?0:It,x?(Ve.S.h(Qe/2+y.focus.x,ni+en),Zt=Math.max(Zt,ct.width),$t=Math.max($t,ni+en+ct.height),ni+=en+ct.height):(Ve.S.h(vn+en,Qe/2+y.focus.y),Zt=Math.max(Zt,vn+en+ct.width),$t=Math.max($t,ct.height),vn+=en+ct.width),ci++}else for(nr=0;nr<ne;nr++)Vi=E[nr],to=Vi.Da,x?(0<Ve&&0<ci&&vn+Qe+to.width>Ve&&(vn<te&&af(y,_e,te-vn,0,$n,nr-1),pi++,ci=0,$n=nr,en=$t,vn=0,ni=135<b?-$t-It:$t+It),To=ci===0?ct:Qe,R0(a,Vi,0,ni),Vi.S.h(vn+To,ni),Zt=Math.max(Zt,vn+To+to.width),$t=Math.max($t,en+(pi===0?0:It)+to.height),vn+=To+to.width):(0<Ve&&0<ci&&ni+Qe+to.height>Ve&&(ni<te&&af(y,_e,0,te-ni,$n,nr-1),pi++,ci=0,$n=nr,en=Zt,ni=0,vn=135<b?-Zt-It:Zt+It),To=ci===0?ct:Qe,R0(a,Vi,vn,0),Vi.S.h(vn,ni+To),$t=Math.max($t,ni+To+to.height),Zt=Math.max(Zt,en+(pi===0?0:It)+to.width),ni+=To+to.height),ci++;switch(0<pi&&(x?($t+=Math.max(0,fe),vn<Zt&&af(y,_e,Zt-vn,0,$n,ne-1),0<Mt&&(je||Bf(y,Mt,0,0,ne-1),Zt+=Mt)):(Zt+=Math.max(0,fe),ni<$t&&af(y,_e,0,$t-ni,$n,ne-1),0<Mt&&(je||Bf(y,0,Mt,0,ne-1),$t+=Mt))),Mt=je=0,_e){case Ip:x?je+=Zt/2-y.focus.x-it/2:Mt+=$t/2-y.focus.y-it/2;break;case jf:0<pi?x?je+=Zt/2-y.focus.x-it/2:Mt+=$t/2-y.focus.y-it/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-it/2):(a=E[0].S.y+E[0].la.y,Mt+=a+(E[ne-1].S.y+E[ne-1].la.y+2*E[ne-1].focus.y-a)/2-y.focus.y-it/2);break;case Yc:x?(je-=it,Zt+=it):(Mt-=it,$t+=it);break;case Xc:x?(je+=Zt-y.width+it,Zt+=it):(Mt+=$t-y.height+it,$t+=it);break;case Hh:case Jc:x?1<ne?je+=Dn+Qe/2-y.focus.x:je+=E[0].focus.x-y.focus.x+E[0].la.x:1<ne?Mt+=Dn+Qe/2-y.focus.y:Mt+=E[0].focus.y-y.focus.y+E[0].la.y;break;case Uh:x?je+=Zt+Qe/2-y.focus.x:Mt+=$t+Qe/2-y.focus.y;break;case fh:break;default:a=a.customAlignment(y,je,Mt,Zt,$t),je=a[0],Mt=a[1],Zt=a[2],$t=a[3]}for(a=0;a<ne;a++)it=E[a],x?it.S.h(it.S.x+it.la.x-je,it.S.y+(135<b?(ae?-$t:-it.Da.height)+it.la.y-fe:Gt+fe+it.la.y)):it.S.h(it.S.x+(135<b?(ae?-Zt:-it.Da.width)+it.la.x-fe:Te+fe+it.la.x),it.S.y+it.la.y-Mt);x?(Zt=ky(y,Zt,je),0>je&&(je=0),135<b&&(Mt+=$t+fe),$t=Math.max(Math.max($t,Gt),$t+Gt+fe)):(135<b&&(je+=Zt+fe),Zt=Math.max(Math.max(Zt,Te),Zt+Te+fe),$t=Ay(y,$t,Mt),0>Mt&&(Mt=0)),y.la.h(je,Mt),y.Da.h(Zt,$t)}}Ir.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 Tn(b,0,E,te);if(ne===1)return y=x[0],E=y.Da.width,te=y.Da.height,new Tn(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 it=x[Qe],ct=it.Da,It=Te===0?0:fe;if(_e){var Mt=a.computeBusNodeSpacing(it)-ae;it.S.h(b-(ct.width+Mt),Ve+It),E=Math.max(E,ct.width+Mt),te=Math.max(te,Ve+It+ct.height),Ve+=It+ct.height}else Mt=a.computeBusNodeSpacing(it)-ae,it.S.h(je+It,b-(ct.height+Mt)),te=Math.max(te,ct.height+Mt),E=Math.max(E,je+It+ct.width),je+=It+ct.width;Te++}for(Te=0,it=je,Qe=Ve,_e?(je=b+ae,Ve=0):(je=0,Ve=b+ae),ct=0;ct<ne;ct++)if(ct%2!==0){It=x[ct],Mt=It.Da;var Gt=Te===0?0:fe;if(_e){var Zt=a.computeBusNodeSpacing(It)-ae;It.S.h(je+Zt,Ve+Gt),E=Math.max(E,je+Mt.width+Zt),te=Math.max(te,Ve+Gt+Mt.height),Ve+=Gt+Mt.height}else Zt=a.computeBusNodeSpacing(It)-ae,It.S.h(je+Gt,Ve+Zt),E=Math.max(E,je+Gt+Mt.width),te=Math.max(te,Ve+Mt.height+Zt),je+=Gt+Mt.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(it),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(it,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 Tn(b,0,E,te)}function dx(a,y,x,b,E,te){var ne=x.length;if(ne===0)return new Tn(b,0,E,te);if(ne===1)return x=x[0],E=x.Da.width,te=x.Da.height,new Tn(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 it=x[Qe],ct=it.Da,It=Te===0?0:fe;if(_e){var Mt=a.computeBusNodeSpacing(it)-ae;Ve-=It+ct.height,it.S.h(b-(ct.width+Mt),Ve),E=Math.max(E,ct.width+Mt),te=Math.max(te,Math.abs(Ve))}else Mt=a.computeBusNodeSpacing(it)-ae,je-=It+ct.width,it.S.h(je,b-(ct.height+Mt)),te=Math.max(te,ct.height+Mt),E=Math.max(E,Math.abs(je));Te++}for(Te=0,it=je,Qe=Ve,_e?(je=b+ae,Ve=0):(je=0,Ve=b+ae),ct=0;ct<ne;ct++)if(ct%2!==0){It=x[ct],Mt=It.Da;var Gt=Te===0?0:fe;if(_e){var Zt=a.computeBusNodeSpacing(It)-ae;Ve-=Gt+Mt.height,It.S.h(je+Zt,Ve),E=Math.max(E,je+Mt.width+Zt),te=Math.max(te,Math.abs(Ve))}else Zt=a.computeBusNodeSpacing(It)-ae,je-=Gt+Mt.width,It.S.h(je,Ve+Zt),te=Math.max(te,Ve+Mt.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(it),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(it,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 Tn(b,0,E,te)}Ir.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Ir.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:zt("Unhandled alignment value "+a.toString())}return new kt(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:zt("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,it=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),it=Tl(a,2),_e?(Qe[0].h(0,0),Qe[1].h(0,ne.height),it[0].h(ne.width,0),it[1].h(it[0].x,Qe[1].y)):(Qe[0].h(0,0),Qe[1].h(ne.width,0),it[0].h(0,ne.height),it[1].h(Qe[1].x,it[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 It=Qe[E];fe=It.x,_e=It.y,fe+=b;var Mt=te;x+1<je.length&&(Mt=je[x+1]);var Gt=It;It=Gt.x,Gt=Gt.y,E+1<Qe.length&&(Gt=Qe[E+1],It=Gt.x,Gt=Gt.y,It+=b);var Zt=Ve;te.y===_e?Zt=fe-te.x:te.y>_e&&te.y<Gt?Zt=fe+(te.y-_e)/(Gt-_e)*(It-fe)-te.x:_e>te.y&&_e<Mt.y&&(Zt=fe-(te.x+(_e-te.y)/(Mt.y-te.y)*(Mt.x-te.x))),Zt<Ve&&(Ve=Zt),Mt.y<=te.y?x++:Gt<=_e?E++:(Mt.y<=Gt&&x++,Gt<=Mt.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=it,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;)Mt=je[x++],Te[E++].h(Mt.x,Mt.y);for(;_e<te.length;)Mt=te[_e++],Te[E++].h(Mt.x+fe,Mt.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,it),ae[0]=b,ae[1]=E,new Tn(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],It=Qe[E],fe=It.x,_e=It.y,_e+=Ve,Mt=te,x+1<je.length&&(Mt=je[x+1]),Gt=It,It=Gt.x,Gt=Gt.y,E+1<Qe.length&&(Gt=Qe[E+1],It=Gt.x,Gt=Gt.y,Gt+=Ve),Zt=b,te.x===fe?Zt=_e-te.y:te.x>fe&&te.x<It?Zt=_e+(te.x-fe)/(It-fe)*(Gt-_e)-te.y:fe>te.x&&fe<Mt.x&&(Zt=_e-(te.y+(fe-te.x)/(Mt.x-te.x)*(Mt.y-te.y))),Zt<b&&(b=Zt),Mt.x<=te.x?x++:It<=fe?E++:(Mt.x<=It&&x++,It<=Mt.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=it,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;)Mt=je[x++],Te[E++].h(Mt.x,Mt.y);for(;_e<te.length;)Mt=te[_e++],Te[E++].h(Mt.x,Mt.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,it),ae[0]=b,ae[1]=E,new Tn(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 kt;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)}Ir.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:zt("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:zt("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)}}}Ir.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Ir.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Ir.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 kt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new kt(-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 Tn(0,te,x,ae))):this.angle===90?(E.push(new Tn(0,te,x,ae)),te+=ae):this.angle===180?(te-=ae,E.push(new Tn(te,0,ae,x))):(E.push(new Tn(te,0,ae,x)),te+=ae)}this.commitLayers(E,b)}},Ir.prototype.commitLayers=function(){},Ir.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Ir.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])}}Ir.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=Gs;break;case 90:E=Ws;break;case 180:E=Ts;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?Ts:bs;if(ne===1||y===ne-1&&ne%2===1)switch(b){case 0:fe=Ts;break;case 90:fe=bs;break;case 180:fe=Gs;break;default:fe=Ws}else y%2===0&&(fe=b===90||b===270?Gs:Ws);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?Gs:Ws,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?Ts: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=Gs;break;case 90:b.fromSpot=Ws;break;case 180:b.fromSpot=Ts;break;default:b.fromSpot=bs}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=Ts;break;case 90:b.toSpot=bs;break;case 180:b.toSpot=Gs;break;default:b.toSpot=Ws}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=Gs;break;case 90:b.toSpot=Ws;break;case 180:b.toSpot=Ts;break;default:b.toSpot=bs}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=Ts;break;case 90:b.fromSpot=bs;break;case 180:b.fromSpot=Gs;break;default:b.fromSpot=Ws}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}Ir.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},Ir.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)},Xe.Object.defineProperties(Ir.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()):zt("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 un(Ir,"PathDefault",-1),$c=new un(Ir,"PathDestination",0),Ff=new un(Ir,"PathSource",1),Op=new un(Ir,"SortingForwards",10),Vg=new un(Ir,"SortingReverse",11),$g=new un(Ir,"SortingAscending",12),Yg=new un(Ir,"SortingDescending",13),Ip=new un(Ir,"AlignmentCenterSubtrees",20),jf=new un(Ir,"AlignmentCenterChildren",21),Yc=new un(Ir,"AlignmentStart",22),Xc=new un(Ir,"AlignmentEnd",23),Hh=new un(Ir,"AlignmentBus",24),Jc=new un(Ir,"AlignmentBusBranching",25),Uh=new un(Ir,"AlignmentTopLeftBus",26),fh=new un(Ir,"AlignmentBottomRightBus",27),j0=new un(Ir,"CompactionNone",30),Xg=new un(Ir,"CompactionBlock",31),z0=new un(Ir,"StyleLayered",40),Iy=new un(Ir,"StyleLastParents",41),Dy=new un(Ir,"StyleAlternating",42),Ry=new un(Ir,"StyleRootOnly",43),H0=new un(Ir,"ArrangementVertical",50),By=new un(Ir,"ArrangementHorizontal",51),U0=new un(Ir,"ArrangementFixedRoots",52),Fy=new un(Ir,"LayerIndividual",60),jy=new un(Ir,"LayerSiblings",61),G0=new un(Ir,"LayerUniform",62);Ir.className="TreeLayout",Ir.PathDefault=F0,Ir.PathDestination=$c,Ir.PathSource=Ff,Ir.SortingForwards=Op,Ir.SortingReverse=Vg,Ir.SortingAscending=$g,Ir.SortingDescending=Yg,Ir.AlignmentCenterSubtrees=Ip,Ir.AlignmentCenterChildren=jf,Ir.AlignmentStart=Yc,Ir.AlignmentEnd=Xc,Ir.AlignmentBus=Hh,Ir.AlignmentBusBranching=Jc,Ir.AlignmentTopLeftBus=Uh,Ir.AlignmentBottomRightBus=fh,Ir.CompactionNone=j0,Ir.CompactionBlock=Xg,Ir.StyleLayered=z0,Ir.StyleLastParents=Iy,Ir.StyleAlternating=Dy,Ir.StyleRootOnly=Ry,Ir.ArrangementVertical=H0,Ir.ArrangementHorizontal=By,Ir.ArrangementFixedRoots=U0,Ir.LayerIndividual=Fy,Ir.LayerSiblings=jy,Ir.LayerUniform=G0;function zf(a){No.call(this,a)}qe(zf,No),zf.prototype.createVertex=function(){return new Fu(this)},zf.prototype.createEdge=function(){return new Dp(this)},zf.className="TreeNetwork";function Fu(a){sa.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 kt(0,0),this.Da=new Yn(0,0),this.la=new kt(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=ro,this.wr=!0,this.Dp=ro}qe(Fu,sa),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)},Xe.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){Ul.call(this,a),this.$t=new kt(0,0)}qe(Dp,Ul),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:zt("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))):zt("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()))}}},Xe.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 ei,this.mouseDownTools),this.gb("Relinking",new Kn,this.mouseDownTools),this.gb("LinkReshaping",new Vn,this.mouseDownTools),this.gb("Rotating",new Ii,this.mouseDownTools),this.gb("Resizing",new Oi,this.mouseDownTools),this.gb("Linking",new xn,this.mouseMoveTools),this.gb("Dragging",new qo,this.mouseMoveTools),this.gb("DragSelecting",new Li,this.mouseMoveTools),this.gb("Panning",new Ci,this.mouseMoveTools),this.gb("ContextMenu",new dr,this.mouseUpTools),this.gb("TextEditing",new Or,this.mouseUpTools),this.gb("ClickCreating",new ji,this.mouseUpTools),this.gb("ClickSelecting",new cr,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",ha),rp.add("TreeModel",wu);var W0=bt.go,zy={get licenseKey(){return mn.licenseKey},set licenseKey(a){mn.licenseKey=a},get version(){return mn.version},Group:sr,EnumValue:un,List:On,Set:In,Map:hi,Point:kt,Size:Yn,Rect:Tn,Margin:Ei,Spot:Si,Geometry:Qn,PathFigure:Zs,PathSegment:Zr,InputEvent:Ca,DiagramEvent:Pc,ChangedEvent:Go,Model:xi,GraphLinksModel:jr,TreeModel:al,Binding:zs,Transaction:Rs,UndoManager:jo,CommandHandler:Ot,Tool:Ur,DraggingTool:qo,DraggingInfo:ah,DraggingOptions:pe,LinkingBaseTool:Et,LinkingTool:xn,RelinkingTool:Kn,LinkReshapingTool:Vn,ResizingTool:Oi,RotatingTool:Ii,ClickSelectingTool:cr,ActionTool:ei,ClickCreatingTool:ji,HTMLInfo:Yi,ContextMenuTool:dr,DragSelectingTool:Li,PanningTool:Ci,TextEditingTool:Or,ToolManager:Wo,Animation:ds,AnimationManager:ko,AnimationTrigger:jl,Layer:ns,Diagram:mn,Palette:Fe,Overview:Ue,Brush:fo,GraphObject:nn,Panel:Zn,RowColumnDefinition:Qs,Shape:gr,TextBlock:Ao,Picture:yl,Part:ki,Adornment:Qr,Node:ii,Link:Xn,Placeholder:il,Layout:Qo,LayoutNetwork:No,LayoutVertex:sa,LayoutEdge:Ul,GridLayout:xa,PanelLayout:oa,CircularLayout:as,CircularNetwork:kp,CircularVertex:zg,CircularEdge:P0,ForceDirectedLayout:Ma,ForceDirectedNetwork:Rf,ForceDirectedVertex:Hg,ForceDirectedEdge:Ug,LayeredDigraphLayout:mo,LayeredDigraphNetwork:Np,LayeredDigraphVertex:Cu,LayeredDigraphEdge:Zg,TreeLayout:Ir,TreeNetwork:zf,TreeVertex:Fu,TreeEdge:Dp};typeof W0=="object"&&W0.version&&An("WARNING: a `go` object on the root object is already defined. "+("Debug"in W0?"debug ":"")+"version: "+W0.version+", replaced with version: "+zy.version),mn.prototype.go=zy,bt.go=zy,typeof Ln.exports=="object"&&(Ln.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,Pe=me.List,Le=me.Set,he=me.Map,Se=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,ye=me.TreeModel,we=me.Binding,be=me.Transaction,Ae=me.UndoManager,De=me.CommandHandler,ze=me.Tool,Ze=me.DraggingTool,Ye=me.DraggingInfo,Ge=me.LinkingBaseTool,ft=me.LinkingTool,at=me.RelinkingTool,Pt=me.LinkReshapingTool,tt=me.ResizingTool,vt=me.RotatingTool,st=me.ClickSelectingTool,jt=me.ActionTool,lt=me.ClickCreatingTool,et=me.HTMLInfo,ut=me.ContextMenuTool,mt=me.DragSelectingTool,_t=me.PanningTool,gt=me.TextEditingTool,Bt=me.ToolManager,Ht=me.Animation,hn=me.AnimationManager,Qt=me.AnimationTrigger,bn=me.Layer,Wt=me.Diagram,Kt=me.Palette,Jt=me.Overview,dn=me.Brush,Lt=me.GraphObject,pt=me.Panel,Rt=me.RowColumnDefinition,St=me.Shape,yt=me.TextBlock,nt=me.TextBlockMetrics,He=me.Picture,Ie=me.Part,We=me.Adornment,Oe=me.Node,Ce=me.Link,Ne=me.Placeholder,$e=me.Layout,dt=me.LayoutNetwork,Je=me.LayoutVertex,Tt=me.LayoutEdge,qt=me.GridLayout,yn=me.PanelLayout,rn=me.CircularLayout,pn=me.CircularNetwork,Fn=me.CircularVertex,kn=me.CircularEdge,oi=me.ForceDirectedLayout,ri=me.ForceDirectedNetwork,Ti=me.ForceDirectedVertex,mi=me.ForceDirectedEdge,Qi=me.LayeredDigraphLayout,ir=me.LayeredDigraphNetwork,fr=me.LayeredDigraphVertex,er=me.LayeredDigraphEdge,Mr=me.TreeLayout,qr=me.TreeNetwork,di=me.TreeVertex,xr=me.TreeEdge,zi=me.version},24334:function(Ln,tn,Ee){var Me,me;(function(Be,ke){Ln.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,Pe="2.6.4",Le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",he=function(at){for(var Pt={},tt=0,vt=at.length;tt<vt;tt++)Pt[at.charAt(tt)]=tt;return Pt}(Le),Se=String.fromCharCode,xe=function(at){if(at.length<2){var Pt=at.charCodeAt(0);return Pt<128?at:Pt<2048?Se(192|Pt>>>6)+Se(128|Pt&63):Se(224|Pt>>>12&15)+Se(128|Pt>>>6&63)+Se(128|Pt&63)}else{var Pt=65536+(at.charCodeAt(0)-55296)*1024+(at.charCodeAt(1)-56320);return Se(240|Pt>>>18&7)+Se(128|Pt>>>12&63)+Se(128|Pt>>>6&63)+Se(128|Pt&63)}},ge=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,le=function(at){return at.replace(ge,xe)},ve=function(at){var Pt=[0,2,1][at.length%3],tt=at.charCodeAt(0)<<16|(at.length>1?at.charCodeAt(1):0)<<8|(at.length>2?at.charCodeAt(2):0),vt=[Le.charAt(tt>>>18),Le.charAt(tt>>>12&63),Pt>=2?"=":Le.charAt(tt>>>6&63),Pt>=1?"=":Le.charAt(tt&63)];return vt.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(Pt){return Pt=="+"?"-":"_"}).replace(/=/g,"")},ee=function(at,Pt){return Pt?z(ce(at)):ce(at)},oe=function(at){return ee(at,!0)},ie;Be.Uint8Array&&(ie=function(at,Pt){for(var tt="",vt=0,st=at.length;vt<st;vt+=3){var jt=at[vt],lt=at[vt+1],et=at[vt+2],ut=jt<<16|lt<<8|et;tt+=Le.charAt(ut>>>18)+Le.charAt(ut>>>12&63)+(typeof lt!="undefined"?Le.charAt(ut>>>6&63):"=")+(typeof et!="undefined"?Le.charAt(ut&63):"=")}return Pt?z(tt):tt});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 Pt=(7&at.charCodeAt(0))<<18|(63&at.charCodeAt(1))<<12|(63&at.charCodeAt(2))<<6|63&at.charCodeAt(3),tt=Pt-65536;return Se((tt>>>10)+55296)+Se((tt&1023)+56320);case 3:return Se((15&at.charCodeAt(0))<<12|(63&at.charCodeAt(1))<<6|63&at.charCodeAt(2));default:return Se((31&at.charCodeAt(0))<<6|63&at.charCodeAt(1))}},ye=function(at){return at.replace(se,ue)},we=function(at){var Pt=at.length,tt=Pt%4,vt=(Pt>0?he[at.charAt(0)]<<18:0)|(Pt>1?he[at.charAt(1)]<<12:0)|(Pt>2?he[at.charAt(2)]<<6:0)|(Pt>3?he[at.charAt(3)]:0),st=[Se(vt>>>16),Se(vt>>>8&255),Se(vt&255)];return st.length-=[0,0,2,1][tt],st.join("")},be=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 be(String(at).replace(/[^A-Za-z0-9\+\/]/g,""))},De=function(at){return ye(be(at))},ze=function(at){return String(at).replace(/[-_]/g,function(Pt){return Pt=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ze=function(at){return De(ze(at))},Ye;Be.Uint8Array&&(Ye=function(at){return Uint8Array.from(Ae(ze(at)),function(Pt){return Pt.charCodeAt(0)})});var Ge=function(){var at=Be.Base64;return Be.Base64=ke,at};if(Be.Base64={VERSION:Pe,atob:Ae,btoa:de,fromBase64:Ze,toBase64:ee,utob:le,encode:ee,encodeURI:oe,btou:ye,decode:Ze,noConflict:Ge,fromUint8Array:ie,toUint8Array:Ye},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),Ln.exports?Ln.exports.Base64=Be.Base64:(Me=[],me=function(){return Be.Base64}.apply(tn,Me),me!==void 0&&(Ln.exports=me)),{Base64:Be.Base64}})},17115:function(Ln,tn,Ee){"use strict";Ee.d(tn,{ZP:function(){return he}});var Me=Ee(29043),me=Ee(59301),Be=Ee(87746),ke=0,Pe=(0,Be.Z)();function Le(){var Se;return Pe?(Se=ke,ke+=1):Se="TEST_OR_SSR",Se}function he(Se){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()))},[]),Se||le}},77861:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Ac:function(){return $e},Xo:function(){return mi},Wx:function(){return ir},ZP:function(){return At},lk:function(){return ye}});var Me=Ee(5891),me=Ee(26390),Be=Ee(80962),ke=Ee(57259),Pe=Ee(29043),Le=Ee(19149),he=Ee(80665),Se=Ee(35788),xe=Ee(51395),ge=Ee(59301),le=Ee(92310),ve=Ee.n(le),de=Ee(28800),ce=Ee(93144),z=Ee(85108),ee=Ee(20475),oe=function(bt){var gn=bt.className,En=bt.customizeIcon,Un=bt.customizeIconProps,Pn=bt.onMouseDown,zt=bt.onClick,Yt=bt.children,Cn;return typeof En=="function"?Cn=En(Un):Cn=En,ge.createElement("span",{className:gn,onMouseDown:function(Vt){Vt.preventDefault(),Pn&&Pn(Vt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:zt,"aria-hidden":!0},Cn!==void 0?Cn:ge.createElement("span",{className:ve()(gn.split(/\s+/).map(function(An){return"".concat(An,"-icon")}))},Yt))},ie=oe;function se(Nt,bt,gn,En,Un){var Pn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,zt=arguments.length>6?arguments[6]:void 0,Yt=arguments.length>7?arguments[7]:void 0,Cn=ge.useMemo(function(){if((0,he.Z)(En)==="object")return En.clearIcon;if(Un)return Un},[En,Un]),An=ge.useMemo(function(){return!!(!Pn&&En&&(gn.length||zt)&&!(Yt==="combobox"&&zt===""))},[En,Pn,gn.length,zt,Yt]);return{allowClear:An,clearIcon:ge.createElement(ie,{className:"".concat(Nt,"-clear"),onMouseDown:bt,customizeIcon:Cn},"\xD7")}}var ue=ge.createContext(null);function ye(){return ge.useContext(ue)}function we(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,bt=ge.useState(!1),gn=(0,Pe.Z)(bt,2),En=gn[0],Un=gn[1],Pn=ge.useRef(null),zt=function(){window.clearTimeout(Pn.current)};ge.useEffect(function(){return zt},[]);var Yt=function(An,Vt){zt(),Pn.current=window.setTimeout(function(){Un(An),Vt&&Vt()},Nt)};return[En,Yt,zt]}function be(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,bt=ge.useRef(null),gn=ge.useRef(null);ge.useEffect(function(){return function(){window.clearTimeout(gn.current)}},[]);function En(Un){(Un||bt.current===null)&&(bt.current=Un),window.clearTimeout(gn.current),gn.current=window.setTimeout(function(){bt.current=null},Nt)}return[function(){return bt.current},En]}function Ae(Nt,bt,gn,En){var Un=ge.useRef(null);Un.current={open:bt,triggerOpen:gn,customizedTrigger:En},ge.useEffect(function(){function Pn(zt){var Yt;if(!((Yt=Un.current)!==null&&Yt!==void 0&&Yt.customizedTrigger)){var Cn=zt.target;Cn.shadowRoot&&zt.composed&&(Cn=zt.composedPath()[0]||Cn),Un.current.open&&Nt().filter(function(An){return An}).every(function(An){return!An.contains(Cn)&&An!==Cn})&&Un.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Pn),function(){return window.removeEventListener("mousedown",Pn)}},[])}var De=Ee(36994),ze=Ee(11780),Ze=function(bt,gn){var En,Un,Pn=bt.prefixCls,zt=bt.id,Yt=bt.inputElement,Cn=bt.disabled,An=bt.tabIndex,Vt=bt.autoFocus,an=bt.autoComplete,Bn=bt.editable,Nn=bt.activeDescendantId,qn=bt.value,Gn=bt.maxLength,Jn=bt.onKeyDown,Rn=bt.onMouseDown,li=bt.onChange,Mi=bt.onPaste,zn=bt.onCompositionStart,si=bt.onCompositionEnd,Hi=bt.open,ur=bt.attrs,Ai=Yt||ge.createElement("input",null),un=Ai,ai=un.ref,wi=un.props,fi=wi.onKeyDown,Wi=wi.onChange,Ni=wi.onMouseDown,lr=wi.onCompositionStart,Fi=wi.onCompositionEnd,$i=wi.style;return(0,xe.Kp)(!("maxLength"in Ai.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Ai=ge.cloneElement(Ai,(0,ke.Z)((0,ke.Z)((0,ke.Z)({type:"search"},wi),{},{id:zt,ref:(0,ee.sQ)(gn,ai),disabled:Cn,tabIndex:An,autoComplete:an||"off",autoFocus:Vt,className:ve()("".concat(Pn,"-selection-search-input"),(En=Ai)===null||En===void 0||(Un=En.props)===null||Un===void 0?void 0:Un.className),role:"combobox","aria-label":"Search","aria-expanded":Hi||!1,"aria-haspopup":"listbox","aria-owns":"".concat(zt,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(zt,"_list"),"aria-activedescendant":Hi?Nn:void 0},ur),{},{value:Bn?qn:"",maxLength:Gn,readOnly:!Bn,unselectable:Bn?null:"on",style:(0,ke.Z)((0,ke.Z)({},$i),{},{opacity:Bn?null:0}),onKeyDown:function(On){Jn(On),fi&&fi(On)},onMouseDown:function(On){Rn(On),Ni&&Ni(On)},onChange:function(On){li(On),Wi&&Wi(On)},onCompositionStart:function(On){zn(On),lr&&lr(On)},onCompositionEnd:function(On){si(On),Fi&&Fi(On)},onPaste:Mi})),Ai},Ye=ge.forwardRef(Ze);Ye.displayName="Input";var Ge=Ye;function ft(Nt){return Array.isArray(Nt)?Nt:Nt!==void 0?[Nt]:[]}var at=typeof window!="undefined"&&window.document&&window.document.documentElement,Pt=at;function tt(Nt){return Nt!=null}function vt(Nt){return!Nt&&Nt!==0}function st(Nt){return["string","number"].includes((0,he.Z)(Nt))}function jt(Nt){var bt=void 0;return Nt&&(st(Nt.title)?bt=Nt.title.toString():st(Nt.label)&&(bt=Nt.label.toString())),bt}function lt(Nt,bt){Pt?ge.useLayoutEffect(Nt,bt):ge.useEffect(Nt,bt)}function et(Nt){var bt;return(bt=Nt.key)!==null&&bt!==void 0?bt:Nt.value}var ut=function(bt){bt.preventDefault(),bt.stopPropagation()},mt=function(bt){var gn=bt.id,En=bt.prefixCls,Un=bt.values,Pn=bt.open,zt=bt.searchValue,Yt=bt.autoClearSearchValue,Cn=bt.inputRef,An=bt.placeholder,Vt=bt.disabled,an=bt.mode,Bn=bt.showSearch,Nn=bt.autoFocus,qn=bt.autoComplete,Gn=bt.activeDescendantId,Jn=bt.tabIndex,Rn=bt.removeIcon,li=bt.maxTagCount,Mi=bt.maxTagTextLength,zn=bt.maxTagPlaceholder,si=zn===void 0?function(Pr){return"+ ".concat(Pr.length," ...")}:zn,Hi=bt.tagRender,ur=bt.onToggleOpen,Ai=bt.onRemove,un=bt.onInputChange,ai=bt.onInputPaste,wi=bt.onInputKeyDown,fi=bt.onInputMouseDown,Wi=bt.onInputCompositionStart,Ni=bt.onInputCompositionEnd,lr=ge.useRef(null),Fi=(0,ge.useState)(0),$i=(0,Pe.Z)(Fi,2),Lr=$i[0],On=$i[1],Kr=(0,ge.useState)(!1),In=(0,Pe.Z)(Kr,2),br=In[0],xo=In[1],Cr="".concat(En,"-selection"),Fo=Pn||an==="multiple"&&Yt===!1||an==="tags"?zt:"",oo=an==="tags"||an==="multiple"&&Yt===!1||Bn&&(Pn||br);lt(function(){On(lr.current.scrollWidth)},[Fo]);function Ki(Pr,_o,Oo,wo,yr){return ge.createElement("span",{className:ve()("".concat(Cr,"-item"),(0,Be.Z)({},"".concat(Cr,"-item-disabled"),Oo)),title:jt(Pr)},ge.createElement("span",{className:"".concat(Cr,"-item-content")},_o),wo&&ge.createElement(ie,{className:"".concat(Cr,"-item-remove"),onMouseDown:ut,onClick:yr,customizeIcon:Rn},"\xD7"))}function Ji(Pr,_o,Oo,wo,yr){var tr=function(Po){ut(Po),ur(!Pn)};return ge.createElement("span",{onMouseDown:tr},Hi({label:_o,value:Pr,disabled:Oo,closable:wo,onClose:yr}))}function pr(Pr){var _o=Pr.disabled,Oo=Pr.label,wo=Pr.value,yr=!Vt&&!_o,tr=Oo;if(typeof Mi=="number"&&(typeof Oo=="string"||typeof Oo=="number")){var Hr=String(tr);Hr.length>Mi&&(tr="".concat(Hr.slice(0,Mi),"..."))}var Po=function(Io){Io&&Io.stopPropagation(),Ai(Pr)};return typeof Hi=="function"?Ji(wo,tr,_o,yr,Po):Ki(Pr,tr,_o,yr,Po)}function kr(Pr){var _o=typeof si=="function"?si(Pr):si;return Ki({title:_o},_o,!1)}var hi=ge.createElement("div",{className:"".concat(Cr,"-search"),style:{width:Lr},onFocus:function(){xo(!0)},onBlur:function(){xo(!1)}},ge.createElement(Ge,{ref:Cn,open:Pn,prefixCls:En,id:gn,inputElement:null,disabled:Vt,autoFocus:Nn,autoComplete:qn,editable:oo,activeDescendantId:Gn,value:Fo,onKeyDown:wi,onMouseDown:fi,onChange:un,onPaste:ai,onCompositionStart:Wi,onCompositionEnd:Ni,tabIndex:Jn,attrs:(0,De.Z)(bt,!0)}),ge.createElement("span",{ref:lr,className:"".concat(Cr,"-search-mirror"),"aria-hidden":!0},Fo,"\xA0")),kt=ge.createElement(ze.Z,{prefixCls:"".concat(Cr,"-overflow"),data:Un,renderItem:pr,renderRest:kr,suffix:hi,itemKey:et,maxCount:li});return ge.createElement(ge.Fragment,null,kt,!Un.length&&!Fo&&ge.createElement("span",{className:"".concat(Cr,"-placeholder")},An))},_t=mt,gt=function(bt){var gn=bt.inputElement,En=bt.prefixCls,Un=bt.id,Pn=bt.inputRef,zt=bt.disabled,Yt=bt.autoFocus,Cn=bt.autoComplete,An=bt.activeDescendantId,Vt=bt.mode,an=bt.open,Bn=bt.values,Nn=bt.placeholder,qn=bt.tabIndex,Gn=bt.showSearch,Jn=bt.searchValue,Rn=bt.activeValue,li=bt.maxLength,Mi=bt.onInputKeyDown,zn=bt.onInputMouseDown,si=bt.onInputChange,Hi=bt.onInputPaste,ur=bt.onInputCompositionStart,Ai=bt.onInputCompositionEnd,un=bt.title,ai=ge.useState(!1),wi=(0,Pe.Z)(ai,2),fi=wi[0],Wi=wi[1],Ni=Vt==="combobox",lr=Ni||Gn,Fi=Bn[0],$i=Jn||"";Ni&&Rn&&!fi&&($i=Rn),ge.useEffect(function(){Ni&&Wi(!1)},[Ni,Rn]);var Lr=Vt!=="combobox"&&!an&&!Gn?!1:!!$i,On=un===void 0?jt(Fi):un,Kr=function(){if(Fi)return null;var br=Lr?{visibility:"hidden"}:void 0;return ge.createElement("span",{className:"".concat(En,"-selection-placeholder"),style:br},Nn)};return ge.createElement(ge.Fragment,null,ge.createElement("span",{className:"".concat(En,"-selection-search")},ge.createElement(Ge,{ref:Pn,prefixCls:En,id:Un,open:an,inputElement:gn,disabled:zt,autoFocus:Yt,autoComplete:Cn,editable:lr,activeDescendantId:An,value:$i,onKeyDown:Mi,onMouseDown:zn,onChange:function(br){Wi(!0),si(br)},onPaste:Hi,onCompositionStart:ur,onCompositionEnd:Ai,tabIndex:qn,attrs:(0,De.Z)(bt,!0),maxLength:Ni?li:void 0})),!Ni&&Fi?ge.createElement("span",{className:"".concat(En,"-selection-item"),title:On,style:Lr?{visibility:"hidden"}:void 0},Fi.label):null,Kr())},Bt=gt;function Ht(Nt){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(Nt)}var hn=function(bt,gn){var En=(0,ge.useRef)(null),Un=(0,ge.useRef)(!1),Pn=bt.prefixCls,zt=bt.open,Yt=bt.mode,Cn=bt.showSearch,An=bt.tokenWithEnter,Vt=bt.autoClearSearchValue,an=bt.onSearch,Bn=bt.onSearchSubmit,Nn=bt.onToggleOpen,qn=bt.onInputKeyDown,Gn=bt.domRef;ge.useImperativeHandle(gn,function(){return{focus:function(){En.current.focus()},blur:function(){En.current.blur()}}});var Jn=be(0),Rn=(0,Pe.Z)(Jn,2),li=Rn[0],Mi=Rn[1],zn=function($i){var Lr=$i.which;(Lr===z.Z.UP||Lr===z.Z.DOWN)&&$i.preventDefault(),qn&&qn($i),Lr===z.Z.ENTER&&Yt==="tags"&&!Un.current&&!zt&&(Bn==null||Bn($i.target.value)),Ht(Lr)&&Nn(!0)},si=function(){Mi(!0)},Hi=(0,ge.useRef)(null),ur=function($i){an($i,!0,Un.current)!==!1&&Nn(!0)},Ai=function(){Un.current=!0},un=function($i){Un.current=!1,Yt!=="combobox"&&ur($i.target.value)},ai=function($i){var Lr=$i.target.value;if(An&&Hi.current&&/[\r\n]/.test(Hi.current)){var On=Hi.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Lr=Lr.replace(On,Hi.current)}Hi.current=null,ur(Lr)},wi=function($i){var Lr=$i.clipboardData,On=Lr.getData("text");Hi.current=On},fi=function($i){var Lr=$i.target;if(Lr!==En.current){var On=document.body.style.msTouchAction!==void 0;On?setTimeout(function(){En.current.focus()}):En.current.focus()}},Wi=function($i){var Lr=li();$i.target!==En.current&&!Lr&&Yt!=="combobox"&&$i.preventDefault(),(Yt!=="combobox"&&(!Cn||!Lr)||!zt)&&(zt&&Vt!==!1&&an("",!0,!1),Nn())},Ni={inputRef:En,onInputKeyDown:zn,onInputMouseDown:si,onInputChange:ai,onInputPaste:wi,onInputCompositionStart:Ai,onInputCompositionEnd:un},lr=Yt==="multiple"||Yt==="tags"?ge.createElement(_t,(0,Me.Z)({},bt,Ni)):ge.createElement(Bt,(0,Me.Z)({},bt,Ni));return ge.createElement("div",{ref:Gn,className:"".concat(Pn,"-selector"),onClick:fi,onMouseDown:Wi},lr)},Qt=ge.forwardRef(hn);Qt.displayName="Selector";var bn=Qt,Wt=Ee(35593),Kt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Jt=function(bt){var gn=bt===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:gn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:gn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:gn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:gn,adjustY:1},htmlRegion:"scroll"}}},dn=function(bt,gn){var En=bt.prefixCls,Un=bt.disabled,Pn=bt.visible,zt=bt.children,Yt=bt.popupElement,Cn=bt.animation,An=bt.transitionName,Vt=bt.dropdownStyle,an=bt.dropdownClassName,Bn=bt.direction,Nn=Bn===void 0?"ltr":Bn,qn=bt.placement,Gn=bt.builtinPlacements,Jn=bt.dropdownMatchSelectWidth,Rn=bt.dropdownRender,li=bt.dropdownAlign,Mi=bt.getPopupContainer,zn=bt.empty,si=bt.getTriggerDOMNode,Hi=bt.onPopupVisibleChange,ur=bt.onPopupMouseEnter,Ai=(0,Le.Z)(bt,Kt),un="".concat(En,"-dropdown"),ai=Yt;Rn&&(ai=Rn(Yt));var wi=ge.useMemo(function(){return Gn||Jt(Jn)},[Gn,Jn]),fi=Cn?"".concat(un,"-").concat(Cn):An,Wi=typeof Jn=="number",Ni=ge.useMemo(function(){return Wi?null:Jn===!1?"minWidth":"width"},[Jn,Wi]),lr=Vt;Wi&&(lr=(0,ke.Z)((0,ke.Z)({},lr),{},{width:Jn}));var Fi=ge.useRef(null);return ge.useImperativeHandle(gn,function(){return{getPopupElement:function(){return Fi.current}}}),ge.createElement(Wt.Z,(0,Me.Z)({},Ai,{showAction:Hi?["click"]:[],hideAction:Hi?["click"]:[],popupPlacement:qn||(Nn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:wi,prefixCls:un,popupTransitionName:fi,popup:ge.createElement("div",{ref:Fi,onMouseEnter:ur},ai),stretch:Ni,popupAlign:li,popupVisible:Pn,getPopupContainer:Mi,popupClassName:ve()(an,(0,Be.Z)({},"".concat(un,"-empty"),zn)),popupStyle:lr,getTriggerDOMNode:si,onPopupVisibleChange:Hi}),zt)},Lt=ge.forwardRef(dn);Lt.displayName="SelectTrigger";var pt=Lt,Rt=Ee(17953);function St(Nt,bt){var gn=Nt.key,En;return"value"in Nt&&(En=Nt.value),gn!=null?gn:En!==void 0?En:"rc-index-key-".concat(bt)}function yt(Nt,bt){var gn=Nt||{},En=gn.label,Un=gn.value,Pn=gn.options,zt=gn.groupLabel,Yt=En||(bt?"children":"label");return{label:Yt,value:Un||"value",options:Pn||"options",groupLabel:zt||Yt}}function nt(Nt){var bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},gn=bt.fieldNames,En=bt.childrenAsData,Un=[],Pn=yt(gn,!1),zt=Pn.label,Yt=Pn.value,Cn=Pn.options,An=Pn.groupLabel;function Vt(an,Bn){an.forEach(function(Nn){if(Bn||!(Cn in Nn)){var qn=Nn[Yt];Un.push({key:St(Nn,Un.length),groupOption:Bn,data:Nn,label:Nn[zt],value:qn})}else{var Gn=Nn[An];Gn===void 0&&En&&(Gn=Nn.label),Un.push({key:St(Nn,Un.length),group:!0,data:Nn,label:Gn}),Vt(Nn[Cn],!0)}})}return Vt(Nt,!1),Un}function He(Nt){var bt=(0,ke.Z)({},Nt);return"props"in bt||Object.defineProperty(bt,"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`."),bt}}),bt}function Ie(Nt,bt){if(!bt||!bt.length)return null;var gn=!1;function En(Pn,zt){var Yt=(0,Rt.Z)(zt),Cn=Yt[0],An=Yt.slice(1);if(!Cn)return[Pn];var Vt=Pn.split(Cn);return gn=gn||Vt.length>1,Vt.reduce(function(an,Bn){return[].concat((0,me.Z)(an),(0,me.Z)(En(Bn,An)))},[]).filter(function(an){return an})}var Un=En(Nt,bt);return gn?Un: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 Ce(Nt){return Nt==="tags"||Nt==="multiple"}var Ne=ge.forwardRef(function(Nt,bt){var gn,En,Un=Nt.id,Pn=Nt.prefixCls,zt=Nt.className,Yt=Nt.showSearch,Cn=Nt.tagRender,An=Nt.direction,Vt=Nt.omitDomProps,an=Nt.displayValues,Bn=Nt.onDisplayValuesChange,Nn=Nt.emptyOptions,qn=Nt.notFoundContent,Gn=qn===void 0?"Not Found":qn,Jn=Nt.onClear,Rn=Nt.mode,li=Nt.disabled,Mi=Nt.loading,zn=Nt.getInputElement,si=Nt.getRawInputElement,Hi=Nt.open,ur=Nt.defaultOpen,Ai=Nt.onDropdownVisibleChange,un=Nt.activeValue,ai=Nt.onActiveValueChange,wi=Nt.activeDescendantId,fi=Nt.searchValue,Wi=Nt.autoClearSearchValue,Ni=Nt.onSearch,lr=Nt.onSearchSplit,Fi=Nt.tokenSeparators,$i=Nt.allowClear,Lr=Nt.suffixIcon,On=Nt.clearIcon,Kr=Nt.OptionList,In=Nt.animation,br=Nt.transitionName,xo=Nt.dropdownStyle,Cr=Nt.dropdownClassName,Fo=Nt.dropdownMatchSelectWidth,oo=Nt.dropdownRender,Ki=Nt.dropdownAlign,Ji=Nt.placement,pr=Nt.builtinPlacements,kr=Nt.getPopupContainer,hi=Nt.showAction,kt=hi===void 0?[]:hi,Pr=Nt.onFocus,_o=Nt.onBlur,Oo=Nt.onKeyUp,wo=Nt.onKeyDown,yr=Nt.onMouseDown,tr=(0,Le.Z)(Nt,We),Hr=Ce(Rn),Po=(Yt!==void 0?Yt:Hr)||Rn==="combobox",Tr=(0,ke.Z)({},tr);Oe.forEach(function(ro){delete Tr[ro]}),Vt==null||Vt.forEach(function(ro){delete Tr[ro]});var Io=ge.useState(!1),qi=(0,Pe.Z)(Io,2),Ui=qi[0],rr=qi[1];ge.useEffect(function(){rr((0,ce.Z)())},[]);var Yn=ge.useRef(null),Vr=ge.useRef(null),Eo=ge.useRef(null),rs=ge.useRef(null),Lo=ge.useRef(null),is=we(),ms=(0,Pe.Z)(is,3),Ls=ms[0],ws=ms[1],ta=ms[2];ge.useImperativeHandle(bt,function(){var ro,Uo;return{focus:(ro=rs.current)===null||ro===void 0?void 0:ro.focus,blur:(Uo=rs.current)===null||Uo===void 0?void 0:Uo.blur,scrollTo:function(ia){var Is;return(Is=Lo.current)===null||Is===void 0?void 0:Is.scrollTo(ia)}}});var aa=ge.useMemo(function(){var ro;if(Rn!=="combobox")return fi;var Uo=(ro=an[0])===null||ro===void 0?void 0:ro.value;return typeof Uo=="string"||typeof Uo=="number"?String(Uo):""},[fi,Rn,an]),Tn=Rn==="combobox"&&typeof zn=="function"&&zn()||null,Os=typeof si=="function"&&si(),hl=(0,ee.x1)(Vr,Os==null||(gn=Os.props)===null||gn===void 0?void 0:gn.ref),dl=ge.useState(!1),vs=(0,Pe.Z)(dl,2),ja=vs[0],lu=vs[1];(0,de.Z)(function(){lu(!0)},[]);var Vl=(0,Se.Z)(!1,{defaultValue:ur,value:Hi}),uo=(0,Pe.Z)(Vl,2),_r=uo[0],na=uo[1],Rr=ja?_r:!1,no=!Gn&&Nn;(li||no&&Rr&&Rn==="combobox")&&(Rr=!1);var $r=no?!1:Rr,Ei=ge.useCallback(function(ro){var Uo=ro!==void 0?ro:!Rr;li||(na(Uo),Rr!==Uo&&(Ai==null||Ai(Uo)))},[li,Rr,na,Ai]),ls=ge.useMemo(function(){return(Fi||[]).some(function(ro){return[`
|
|
|
`,`\r
|
|
|
`].includes(ro)})},[Fi]),Ms=function(Uo,La,ia){var Is=!0,bs=Uo;ai==null||ai(null);var Ts=ia?null:Ie(Uo,Fi);return Rn!=="combobox"&&Ts&&(bs="",lr==null||lr(Ts),Ei(!1),Is=!1),Ni&&aa!==bs&&Ni(bs,{source:La?"typing":"effect"}),Is},ba=function(Uo){!Uo||!Uo.trim()||Ni(Uo,{source:"submit"})};ge.useEffect(function(){!Rr&&!Hr&&Rn!=="combobox"&&Ms("",!1,!1)},[Rr]),ge.useEffect(function(){_r&&li&&na(!1),li&&ws(!1)},[li]);var za=be(),Ja=(0,Pe.Z)(za,2),Si=Ja[0],fs=Ja[1],$s=function(Uo){var La=Si(),ia=Uo.which;if(ia===z.Z.ENTER&&(Rn!=="combobox"&&Uo.preventDefault(),Rr||Ei(!0)),fs(!!aa),ia===z.Z.BACKSPACE&&!La&&Hr&&!aa&&an.length){for(var Is=(0,me.Z)(an),bs=null,Ts=Is.length-1;Ts>=0;Ts-=1){var Gs=Is[Ts];if(!Gs.disabled){Is.splice(Ts,1),bs=Gs;break}}bs&&Bn(Is,{type:"remove",values:[bs]})}for(var Ws=arguments.length,Yl=new Array(Ws>1?Ws-1:0),Rl=1;Rl<Ws;Rl++)Yl[Rl-1]=arguments[Rl];if(Rr&&Lo.current){var Ds;(Ds=Lo.current).onKeyDown.apply(Ds,[Uo].concat(Yl))}wo==null||wo.apply(void 0,[Uo].concat(Yl))},Qa=function(Uo){for(var La=arguments.length,ia=new Array(La>1?La-1:0),Is=1;Is<La;Is++)ia[Is-1]=arguments[Is];if(Rr&&Lo.current){var bs;(bs=Lo.current).onKeyUp.apply(bs,[Uo].concat(ia))}Oo==null||Oo.apply(void 0,[Uo].concat(ia))},wl=function(Uo){var La=an.filter(function(ia){return ia!==Uo});Bn(La,{type:"remove",values:[Uo]})},Il=ge.useRef(!1),Fr=function(){ws(!0),li||(Pr&&!Il.current&&Pr.apply(void 0,arguments),kt.includes("focus")&&Ei(!0)),Il.current=!0},nc=function(){ws(!1,function(){Il.current=!1,Ei(!1)}),!li&&(aa&&(Rn==="tags"?Ni(aa,{source:"submit"}):Rn==="multiple"&&Ni("",{source:"blur"})),_o&&_o.apply(void 0,arguments))},Aa=[];ge.useEffect(function(){return function(){Aa.forEach(function(ro){return clearTimeout(ro)}),Aa.splice(0,Aa.length)}},[]);var Ha=function(Uo){var La,ia=Uo.target,Is=(La=Eo.current)===null||La===void 0?void 0:La.getPopupElement();if(Is&&Is.contains(ia)){var bs=setTimeout(function(){var Yl=Aa.indexOf(bs);if(Yl!==-1&&Aa.splice(Yl,1),ta(),!Ui&&!Is.contains(document.activeElement)){var Rl;(Rl=rs.current)===null||Rl===void 0||Rl.focus()}});Aa.push(bs)}for(var Ts=arguments.length,Gs=new Array(Ts>1?Ts-1:0),Ws=1;Ws<Ts;Ws++)Gs[Ws-1]=arguments[Ws];yr==null||yr.apply(void 0,[Uo].concat(Gs))},Ta=ge.useState({}),$l=(0,Pe.Z)(Ta,2),_u=$l[1];function Ua(){_u({})}var Ga;Os&&(Ga=function(Uo){Ei(Uo)}),Ae(function(){var ro;return[Yn.current,(ro=Eo.current)===null||ro===void 0?void 0:ro.getPopupElement()]},$r,Ei,!!Os);var Uu=ge.useMemo(function(){return(0,ke.Z)((0,ke.Z)({},Nt),{},{notFoundContent:Gn,open:Rr,triggerOpen:$r,id:Un,showSearch:Po,multiple:Hr,toggleOpen:Ei})},[Nt,Gn,$r,Rr,Un,Po,Hr,Ei]),yc=!!Lr||Mi,Eu;yc&&(Eu=ge.createElement(ie,{className:ve()("".concat(Pn,"-arrow"),(0,Be.Z)({},"".concat(Pn,"-arrow-loading"),Mi)),customizeIcon:Lr,customizeIconProps:{loading:Mi,searchValue:aa,open:Rr,focused:Ls,showSearch:Po}}));var Dl=function(){var Uo;Jn==null||Jn(),(Uo=rs.current)===null||Uo===void 0||Uo.focus(),Bn([],{type:"clear",values:an}),Ms("",!1,!1)},Sc=se(Pn,Dl,an,$i,On,li,aa,Rn),Gu=Sc.allowClear,Lu=Sc.clearIcon,bl=ge.createElement(Kr,{ref:Lo}),th=ve()(Pn,zt,(En={},(0,Be.Z)(En,"".concat(Pn,"-focused"),Ls),(0,Be.Z)(En,"".concat(Pn,"-multiple"),Hr),(0,Be.Z)(En,"".concat(Pn,"-single"),!Hr),(0,Be.Z)(En,"".concat(Pn,"-allow-clear"),$i),(0,Be.Z)(En,"".concat(Pn,"-show-arrow"),yc),(0,Be.Z)(En,"".concat(Pn,"-disabled"),li),(0,Be.Z)(En,"".concat(Pn,"-loading"),Mi),(0,Be.Z)(En,"".concat(Pn,"-open"),Rr),(0,Be.Z)(En,"".concat(Pn,"-customize-input"),Tn),(0,Be.Z)(En,"".concat(Pn,"-show-search"),Po),En)),xc=ge.createElement(pt,{ref:Eo,disabled:li,prefixCls:Pn,visible:$r,popupElement:bl,animation:In,transitionName:br,dropdownStyle:xo,dropdownClassName:Cr,direction:An,dropdownMatchSelectWidth:Fo,dropdownRender:oo,dropdownAlign:Ki,placement:Ji,builtinPlacements:pr,getPopupContainer:kr,empty:Nn,getTriggerDOMNode:function(){return Vr.current},onPopupVisibleChange:Ga,onPopupMouseEnter:Ua},Os?ge.cloneElement(Os,{ref:hl}):ge.createElement(bn,(0,Me.Z)({},Nt,{domRef:Vr,prefixCls:Pn,inputElement:Tn,ref:rs,id:Un,showSearch:Po,autoClearSearchValue:Wi,mode:Rn,activeDescendantId:wi,tagRender:Cn,values:an,open:Rr,onToggleOpen:Ei,activeValue:un,searchValue:aa,onSearch:Ms,onSearchSubmit:ba,onRemove:wl,tokenWithEnter:ls}))),uu;return Os?uu=xc:uu=ge.createElement("div",(0,Me.Z)({className:th},Tr,{ref:Yn,onMouseDown:Ha,onKeyDown:$s,onKeyUp:Qa,onFocus:Fr,onBlur:nc}),Ls&&!Rr&&ge.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(an.map(function(ro){var Uo=ro.label,La=ro.value;return["number","string"].includes((0,he.Z)(Uo))?Uo:La}).join(", "))),xc,Eu,Gu&&Lu),ge.createElement(ue.Provider,{value:Uu},uu)}),$e=Ne,dt=function(Nt,bt){var gn=ge.useRef({values:new Map,options:new Map}),En=ge.useMemo(function(){var Pn=gn.current,zt=Pn.values,Yt=Pn.options,Cn=Nt.map(function(an){if(an.label===void 0){var Bn;return(0,ke.Z)((0,ke.Z)({},an),{},{label:(Bn=zt.get(an.value))===null||Bn===void 0?void 0:Bn.label})}return an}),An=new Map,Vt=new Map;return Cn.forEach(function(an){An.set(an.value,an),Vt.set(an.value,bt.get(an.value)||Yt.get(an.value))}),gn.current.values=An,gn.current.options=Vt,Cn},[Nt,bt]),Un=ge.useCallback(function(Pn){return bt.get(Pn)||gn.current.options.get(Pn)},[bt]);return[En,Un]};function Je(Nt,bt){return ft(Nt).join("").toUpperCase().includes(bt)}var Tt=function(Nt,bt,gn,En,Un){return ge.useMemo(function(){if(!gn||En===!1)return Nt;var Pn=bt.options,zt=bt.label,Yt=bt.value,Cn=[],An=typeof En=="function",Vt=gn.toUpperCase(),an=An?En:function(Nn,qn){return Un?Je(qn[Un],Vt):qn[Pn]?Je(qn[zt!=="children"?zt:"label"],Vt):Je(qn[Yt],Vt)},Bn=An?function(Nn){return He(Nn)}:function(Nn){return Nn};return Nt.forEach(function(Nn){if(Nn[Pn]){var qn=an(gn,Bn(Nn));if(qn)Cn.push(Nn);else{var Gn=Nn[Pn].filter(function(Jn){return an(gn,Bn(Jn))});Gn.length&&Cn.push((0,ke.Z)((0,ke.Z)({},Nn),{},(0,Be.Z)({},Pn,Gn)))}return}an(gn,Bn(Nn))&&Cn.push(Nn)}),Cn},[Nt,En,Un,gn,bt])},qt=Ee(17115),yn=Ee(38298),rn=["children","value"],pn=["children"];function Fn(Nt){var bt=Nt,gn=bt.key,En=bt.props,Un=En.children,Pn=En.value,zt=(0,Le.Z)(En,rn);return(0,ke.Z)({key:gn,value:Pn!==void 0?Pn:gn,children:Un},zt)}function kn(Nt){var bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,yn.Z)(Nt).map(function(gn,En){if(!ge.isValidElement(gn)||!gn.type)return null;var Un=gn,Pn=Un.type.isSelectOptGroup,zt=Un.key,Yt=Un.props,Cn=Yt.children,An=(0,Le.Z)(Yt,pn);return bt||!Pn?Fn(gn):(0,ke.Z)((0,ke.Z)({key:"__RC_SELECT_GRP__".concat(zt===null?En:zt,"__"),label:zt},An),{},{options:kn(Cn)})}).filter(function(gn){return gn})}function oi(Nt,bt,gn,En,Un){return ge.useMemo(function(){var Pn=Nt,zt=!Nt;zt&&(Pn=kn(bt));var Yt=new Map,Cn=new Map,An=function(Bn,Nn,qn){qn&&typeof qn=="string"&&Bn.set(Nn[qn],Nn)};function Vt(an){for(var Bn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Nn=0;Nn<an.length;Nn+=1){var qn=an[Nn];!qn[gn.options]||Bn?(Yt.set(qn[gn.value],qn),An(Cn,qn,gn.label),An(Cn,qn,En),An(Cn,qn,Un)):Vt(qn[gn.options],!0)}}return Vt(Pn),{options:Pn,valueOptions:Yt,labelOptions:Cn}},[Nt,bt,gn,En,Un])}function ri(Nt){var bt=ge.useRef();bt.current=Nt;var gn=ge.useCallback(function(){return bt.current.apply(bt,arguments)},[]);return gn}var Ti=function(){return null};Ti.isSelectOptGroup=!0;var mi=Ti,Qi=function(){return null};Qi.isSelectOption=!0;var ir=Qi,fr=Ee(79722),er=Ee(64002),Mr=Ee(21881),qr=ge.createContext(null),di=qr;function xr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var zi=["disabled","title","children","style","className"];function rt(Nt){return typeof Nt=="string"||typeof Nt=="number"}var zr=function(bt,gn){var En=ye(),Un=En.prefixCls,Pn=En.id,zt=En.open,Yt=En.multiple,Cn=En.mode,An=En.searchValue,Vt=En.toggleOpen,an=En.notFoundContent,Bn=En.onPopupScroll,Nn=ge.useContext(di),qn=Nn.flattenOptions,Gn=Nn.onActiveValue,Jn=Nn.defaultActiveFirstOption,Rn=Nn.onSelect,li=Nn.menuItemSelectedIcon,Mi=Nn.rawValues,zn=Nn.fieldNames,si=Nn.virtual,Hi=Nn.direction,ur=Nn.listHeight,Ai=Nn.listItemHeight,un="".concat(Un,"-item"),ai=(0,fr.Z)(function(){return qn},[zt,qn],function(Ki,Ji){return Ji[0]&&Ki[1]!==Ji[1]}),wi=ge.useRef(null),fi=function(Ji){Ji.preventDefault()},Wi=function(Ji){wi.current&&wi.current.scrollTo(typeof Ji=="number"?{index:Ji}:Ji)},Ni=function(Ji){for(var pr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,kr=ai.length,hi=0;hi<kr;hi+=1){var kt=(Ji+hi*pr+kr)%kr,Pr=ai[kt],_o=Pr.group,Oo=Pr.data;if(!_o&&!Oo.disabled)return kt}return-1},lr=ge.useState(function(){return Ni(0)}),Fi=(0,Pe.Z)(lr,2),$i=Fi[0],Lr=Fi[1],On=function(Ji){var pr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Lr(Ji);var kr={source:pr?"keyboard":"mouse"},hi=ai[Ji];if(!hi){Gn(null,-1,kr);return}Gn(hi.value,Ji,kr)};(0,ge.useEffect)(function(){On(Jn!==!1?Ni(0):-1)},[ai.length,An]);var Kr=ge.useCallback(function(Ki){return Mi.has(Ki)&&Cn!=="combobox"},[Cn,(0,me.Z)(Mi).toString(),Mi.size]);(0,ge.useEffect)(function(){var Ki=setTimeout(function(){if(!Yt&&zt&&Mi.size===1){var pr=Array.from(Mi)[0],kr=ai.findIndex(function(hi){var kt=hi.data;return kt.value===pr});kr!==-1&&(On(kr),Wi(kr))}});if(zt){var Ji;(Ji=wi.current)===null||Ji===void 0||Ji.scrollTo(void 0)}return function(){return clearTimeout(Ki)}},[zt,An,qn.length]);var In=function(Ji){Ji!==void 0&&Rn(Ji,{selected:!Mi.has(Ji)}),Yt||Vt(!1)};if(ge.useImperativeHandle(gn,function(){return{onKeyDown:function(Ji){var pr=Ji.which,kr=Ji.ctrlKey;switch(pr){case z.Z.N:case z.Z.P:case z.Z.UP:case z.Z.DOWN:{var hi=0;if(pr===z.Z.UP?hi=-1:pr===z.Z.DOWN?hi=1:xr()&&kr&&(pr===z.Z.N?hi=1:pr===z.Z.P&&(hi=-1)),hi!==0){var kt=Ni($i+hi,hi);Wi(kt),On(kt,!0)}break}case z.Z.ENTER:{var Pr=ai[$i];Pr&&!Pr.data.disabled?In(Pr.value):In(void 0),zt&&Ji.preventDefault();break}case z.Z.ESC:Vt(!1),zt&&Ji.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Ji){Wi(Ji)}}}),ai.length===0)return ge.createElement("div",{role:"listbox",id:"".concat(Pn,"_list"),className:"".concat(un,"-empty"),onMouseDown:fi},an);var br=Object.keys(zn).map(function(Ki){return zn[Ki]}),xo=function(Ji){return Ji.label};function Cr(Ki,Ji){var pr=Ki.group;return{role:pr?"presentation":"option",id:"".concat(Pn,"_list_").concat(Ji)}}var Fo=function(Ji){var pr=ai[Ji];if(!pr)return null;var kr=pr.data||{},hi=kr.value,kt=pr.group,Pr=(0,De.Z)(kr,!0),_o=xo(pr);return pr?ge.createElement("div",(0,Me.Z)({"aria-label":typeof _o=="string"&&!kt?_o:null},Pr,{key:Ji},Cr(pr,Ji),{"aria-selected":Kr(hi)}),hi):null},oo={role:"listbox",id:"".concat(Pn,"_list")};return ge.createElement(ge.Fragment,null,si&&ge.createElement("div",(0,Me.Z)({},oo,{style:{height:0,width:0,overflow:"hidden"}}),Fo($i-1),Fo($i),Fo($i+1)),ge.createElement(Mr.Z,{itemKey:"key",ref:wi,data:ai,height:ur,itemHeight:Ai,fullHeight:!1,onMouseDown:fi,onScroll:Bn,virtual:si,direction:Hi,innerProps:si?null:oo},function(Ki,Ji){var pr,kr=Ki.group,hi=Ki.groupOption,kt=Ki.data,Pr=Ki.label,_o=Ki.value,Oo=kt.key;if(kr){var wo,yr=(wo=kt.title)!==null&&wo!==void 0?wo:rt(Pr)?Pr.toString():void 0;return ge.createElement("div",{className:ve()(un,"".concat(un,"-group")),title:yr},Pr!==void 0?Pr:Oo)}var tr=kt.disabled,Hr=kt.title,Po=kt.children,Tr=kt.style,Io=kt.className,qi=(0,Le.Z)(kt,zi),Ui=(0,er.Z)(qi,br),rr=Kr(_o),Yn="".concat(un,"-option"),Vr=ve()(un,Yn,Io,(pr={},(0,Be.Z)(pr,"".concat(Yn,"-grouped"),hi),(0,Be.Z)(pr,"".concat(Yn,"-active"),$i===Ji&&!tr),(0,Be.Z)(pr,"".concat(Yn,"-disabled"),tr),(0,Be.Z)(pr,"".concat(Yn,"-selected"),rr),pr)),Eo=xo(Ki),rs=!li||typeof li=="function"||rr,Lo=typeof Eo=="number"?Eo:Eo||_o,is=rt(Lo)?Lo.toString():void 0;return Hr!==void 0&&(is=Hr),ge.createElement("div",(0,Me.Z)({},(0,De.Z)(Ui),si?{}:Cr(Ki,Ji),{"aria-selected":rr,className:Vr,title:is,onMouseMove:function(){$i===Ji||tr||On(Ji)},onClick:function(){tr||In(_o)},style:Tr}),ge.createElement("div",{className:"".concat(Yn,"-content")},Lo),ge.isValidElement(li)||rr,rs&&ge.createElement(ie,{className:"".concat(un,"-option-state"),customizeIcon:li,customizeIconProps:{isSelected:rr}},rr?"\u2713":null))}))},hr=ge.forwardRef(zr);hr.displayName="OptionList";var vo=hr;function co(Nt){var bt=Nt.mode,gn=Nt.options,En=Nt.children,Un=Nt.backfill,Pn=Nt.allowClear,zt=Nt.placeholder,Yt=Nt.getInputElement,Cn=Nt.showSearch,An=Nt.onSearch,Vt=Nt.defaultOpen,an=Nt.autoFocus,Bn=Nt.labelInValue,Nn=Nt.value,qn=Nt.inputValue,Gn=Nt.optionLabelProp,Jn=isMultiple(bt),Rn=Cn!==void 0?Cn:Jn||bt==="combobox",li=gn||convertChildrenToData(En);if(warning(bt!=="tags"||li.every(function(Hi){return!Hi.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),bt==="tags"||bt==="combobox"){var Mi=li.some(function(Hi){return Hi.options?Hi.options.some(function(ur){return typeof("value"in ur?ur.value:ur.key)=="number"}):typeof("value"in Hi?Hi.value:Hi.key)=="number"});warning(!Mi,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(bt!=="combobox"||!Gn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(bt==="combobox"||!Un,"`backfill` only works with `combobox` mode."),warning(bt==="combobox"||!Yt,"`getInputElement` only work with `combobox` mode."),noteOnce(bt!=="combobox"||!Yt||!Pn||!zt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),An&&!Rn&&bt!=="combobox"&&bt!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Vt||an,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Nn!=null){var zn=toArray(Nn);warning(!Bn||zn.every(function(Hi){return _typeof(Hi)==="object"&&("key"in Hi||"value"in Hi)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Jn||Array.isArray(Nn),"`value` should be array when `mode` is `multiple` or `tags`")}if(En){var si=null;toNodeArray(En).some(function(Hi){if(!React.isValidElement(Hi)||!Hi.type)return!1;var ur=Hi,Ai=ur.type;if(Ai.isSelectOption)return!1;if(Ai.isSelectOptGroup){var un=toNodeArray(Hi.props.children).every(function(ai){return!React.isValidElement(ai)||!Hi.type||ai.type.isSelectOption?!0:(si=ai.type,!1)});return!un}return si=Ai,!0}),si&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(si.displayName||si.name||si,"`.")),warning(qn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function yo(Nt,bt){if(Nt){var gn=function En(Un){for(var Pn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,zt=0;zt<Un.length;zt++){var Yt=Un[zt];if(Yt[bt==null?void 0:bt.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Pn&&Array.isArray(Yt[bt==null?void 0:bt.options])&&En(Yt[bt==null?void 0:bt.options],!0))break}};gn(Nt)}}var eo=null,lo=["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"],ln=["inputValue"];function Ke(Nt){return!Nt||(0,he.Z)(Nt)!=="object"}var qe=ge.forwardRef(function(Nt,bt){var gn=Nt.id,En=Nt.mode,Un=Nt.prefixCls,Pn=Un===void 0?"rc-select":Un,zt=Nt.backfill,Yt=Nt.fieldNames,Cn=Nt.inputValue,An=Nt.searchValue,Vt=Nt.onSearch,an=Nt.autoClearSearchValue,Bn=an===void 0?!0:an,Nn=Nt.onSelect,qn=Nt.onDeselect,Gn=Nt.dropdownMatchSelectWidth,Jn=Gn===void 0?!0:Gn,Rn=Nt.filterOption,li=Nt.filterSort,Mi=Nt.optionFilterProp,zn=Nt.optionLabelProp,si=Nt.options,Hi=Nt.children,ur=Nt.defaultActiveFirstOption,Ai=Nt.menuItemSelectedIcon,un=Nt.virtual,ai=Nt.direction,wi=Nt.listHeight,fi=wi===void 0?200:wi,Wi=Nt.listItemHeight,Ni=Wi===void 0?20:Wi,lr=Nt.value,Fi=Nt.defaultValue,$i=Nt.labelInValue,Lr=Nt.onChange,On=(0,Le.Z)(Nt,lo),Kr=(0,qt.ZP)(gn),In=Ce(En),br=!!(!si&&Hi),xo=ge.useMemo(function(){return Rn===void 0&&En==="combobox"?!1:Rn},[Rn,En]),Cr=ge.useMemo(function(){return yt(Yt,br)},[JSON.stringify(Yt),br]),Fo=(0,Se.Z)("",{value:An!==void 0?An:Cn,postState:function(no){return no||""}}),oo=(0,Pe.Z)(Fo,2),Ki=oo[0],Ji=oo[1],pr=oi(si,Hi,Cr,Mi,zn),kr=pr.valueOptions,hi=pr.labelOptions,kt=pr.options,Pr=ge.useCallback(function(Rr){var no=ft(Rr);return no.map(function($r){var Ei,ls,Ms,ba,za;if(Ke($r))Ei=$r;else{var Ja;Ms=$r.key,ls=$r.label,Ei=(Ja=$r.value)!==null&&Ja!==void 0?Ja:Ms}var Si=kr.get(Ei);if(Si){var fs;if(ls===void 0&&(ls=Si==null?void 0:Si[zn||Cr.label]),Ms===void 0&&(Ms=(fs=Si==null?void 0:Si.key)!==null&&fs!==void 0?fs:Ei),ba=Si==null?void 0:Si.disabled,za=Si==null?void 0:Si.title,0)var $s}return{label:ls,value:Ei,key:Ms,disabled:ba,title:za}})},[Cr,zn,kr]),_o=(0,Se.Z)(Fi,{value:lr}),Oo=(0,Pe.Z)(_o,2),wo=Oo[0],yr=Oo[1],tr=ge.useMemo(function(){var Rr,no=Pr(wo);return En==="combobox"&&vt((Rr=no[0])===null||Rr===void 0?void 0:Rr.value)?[]:no},[wo,Pr,En]),Hr=dt(tr,kr),Po=(0,Pe.Z)(Hr,2),Tr=Po[0],Io=Po[1],qi=ge.useMemo(function(){if(!En&&Tr.length===1){var Rr=Tr[0];if(Rr.value===null&&(Rr.label===null||Rr.label===void 0))return[]}return Tr.map(function(no){var $r;return(0,ke.Z)((0,ke.Z)({},no),{},{label:($r=no.label)!==null&&$r!==void 0?$r:no.value})})},[En,Tr]),Ui=ge.useMemo(function(){return new Set(Tr.map(function(Rr){return Rr.value}))},[Tr]);ge.useEffect(function(){if(En==="combobox"){var Rr,no=(Rr=Tr[0])===null||Rr===void 0?void 0:Rr.value;Ji(tt(no)?String(no):"")}},[Tr]);var rr=ri(function(Rr,no){var $r,Ei=no!=null?no:Rr;return $r={},(0,Be.Z)($r,Cr.value,Rr),(0,Be.Z)($r,Cr.label,Ei),$r}),Yn=ge.useMemo(function(){if(En!=="tags")return kt;var Rr=(0,me.Z)(kt),no=function(Ei){return kr.has(Ei)};return(0,me.Z)(Tr).sort(function($r,Ei){return $r.value<Ei.value?-1:1}).forEach(function($r){var Ei=$r.value;no(Ei)||Rr.push(rr(Ei,$r.label))}),Rr},[rr,kt,kr,Tr,En]),Vr=Tt(Yn,Cr,Ki,xo,Mi),Eo=ge.useMemo(function(){return En!=="tags"||!Ki||Vr.some(function(Rr){return Rr[Mi||"value"]===Ki})||Vr.some(function(Rr){return Rr[Cr.value]===Ki})?Vr:[rr(Ki)].concat((0,me.Z)(Vr))},[rr,Mi,En,Vr,Ki,Cr]),rs=ge.useMemo(function(){return li?(0,me.Z)(Eo).sort(function(Rr,no){return li(Rr,no)}):Eo},[Eo,li]),Lo=ge.useMemo(function(){return nt(rs,{fieldNames:Cr,childrenAsData:br})},[rs,Cr,br]),is=function(no){var $r=Pr(no);if(yr($r),Lr&&($r.length!==Tr.length||$r.some(function(Ms,ba){var za;return((za=Tr[ba])===null||za===void 0?void 0:za.value)!==(Ms==null?void 0:Ms.value)}))){var Ei=$i?$r:$r.map(function(Ms){return Ms.value}),ls=$r.map(function(Ms){return He(Io(Ms.value))});Lr(In?Ei:Ei[0],In?ls:ls[0])}},ms=ge.useState(null),Ls=(0,Pe.Z)(ms,2),ws=Ls[0],ta=Ls[1],aa=ge.useState(0),Tn=(0,Pe.Z)(aa,2),Os=Tn[0],hl=Tn[1],dl=ur!==void 0?ur:En!=="combobox",vs=ge.useCallback(function(Rr,no){var $r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ei=$r.source,ls=Ei===void 0?"keyboard":Ei;hl(no),zt&&En==="combobox"&&Rr!==null&&ls==="keyboard"&&ta(String(Rr))},[zt,En]),ja=function(no,$r,Ei){var ls=function(){var Il,Fr=Io(no);return[$i?{label:Fr==null?void 0:Fr[Cr.label],value:no,key:(Il=Fr==null?void 0:Fr.key)!==null&&Il!==void 0?Il:no}:no,He(Fr)]};if($r&&Nn){var Ms=ls(),ba=(0,Pe.Z)(Ms,2),za=ba[0],Ja=ba[1];Nn(za,Ja)}else if(!$r&&qn&&Ei!=="clear"){var Si=ls(),fs=(0,Pe.Z)(Si,2),$s=fs[0],Qa=fs[1];qn($s,Qa)}},lu=ri(function(Rr,no){var $r,Ei=In?no.selected:!0;Ei?$r=In?[].concat((0,me.Z)(Tr),[Rr]):[Rr]:$r=Tr.filter(function(ls){return ls.value!==Rr}),is($r),ja(Rr,Ei),En==="combobox"?ta(""):(!Ce||Bn)&&(Ji(""),ta(""))}),Vl=function(no,$r){is(no);var Ei=$r.type,ls=$r.values;(Ei==="remove"||Ei==="clear")&&ls.forEach(function(Ms){ja(Ms.value,!1,Ei)})},uo=function(no,$r){if(Ji(no),ta(null),$r.source==="submit"){var Ei=(no||"").trim();if(Ei){var ls=Array.from(new Set([].concat((0,me.Z)(Ui),[Ei])));is(ls),ja(Ei,!0),Ji("")}return}$r.source!=="blur"&&(En==="combobox"&&is(no),Vt==null||Vt(no))},_r=function(no){var $r=no;En!=="tags"&&($r=no.map(function(ls){var Ms=hi.get(ls);return Ms==null?void 0:Ms.value}).filter(function(ls){return ls!==void 0}));var Ei=Array.from(new Set([].concat((0,me.Z)(Ui),(0,me.Z)($r))));is(Ei),Ei.forEach(function(ls){ja(ls,!0)})},na=ge.useMemo(function(){var Rr=un!==!1&&Jn!==!1;return(0,ke.Z)((0,ke.Z)({},pr),{},{flattenOptions:Lo,onActiveValue:vs,defaultActiveFirstOption:dl,onSelect:lu,menuItemSelectedIcon:Ai,rawValues:Ui,fieldNames:Cr,virtual:Rr,direction:ai,listHeight:fi,listItemHeight:Ni,childrenAsData:br})},[pr,Lo,vs,dl,lu,Ai,Ui,Cr,un,Jn,fi,Ni,br]);return ge.createElement(di.Provider,{value:na},ge.createElement($e,(0,Me.Z)({},On,{id:Kr,prefixCls:Pn,ref:bt,omitDomProps:ln,mode:En,displayValues:qi,onDisplayValuesChange:Vl,direction:ai,searchValue:Ki,onSearch:uo,autoClearSearchValue:Bn,onSearchSplit:_r,dropdownMatchSelectWidth:Jn,OptionList:vo,emptyOptions:!Lo.length,activeValue:ws,activeDescendantId:"".concat(Kr,"_list_").concat(Os)})))}),Xe=qe;Xe.Option=ir,Xe.OptGroup=mi;var wt=Xe,At=wt},9296:function(Ln,tn,Ee){"use strict";Ee.r(tn),Ee.d(tn,{ResizableTextArea:function(){return Ye},default:function(){return vt}});var Me=Ee(5891),me=Ee(57259),Be=Ee(80962),ke=Ee(80665),Pe=Ee(29043),Le=Ee(19149),he=Ee(26390),Se=Ee(92310),xe=Ee.n(Se),ge=Ee(93681),le=Ee(5643),ve=Ee(35788),de=Ee(59301),ce=Ee(29301),z=Ee(28800),ee=Ee(23073),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 ye(st){var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,lt=st.getAttribute("id")||st.getAttribute("data-reactid")||st.getAttribute("name");if(jt&&se[lt])return se[lt];var et=window.getComputedStyle(st),ut=et.getPropertyValue("box-sizing")||et.getPropertyValue("-moz-box-sizing")||et.getPropertyValue("-webkit-box-sizing"),mt=parseFloat(et.getPropertyValue("padding-bottom"))+parseFloat(et.getPropertyValue("padding-top")),_t=parseFloat(et.getPropertyValue("border-bottom-width"))+parseFloat(et.getPropertyValue("border-top-width")),gt=ie.map(function(Ht){return"".concat(Ht,":").concat(et.getPropertyValue(Ht))}).join(";"),Bt={sizingStyle:gt,paddingSize:mt,borderSize:_t,boxSizing:ut};return jt&<&&(se[lt]=Bt),Bt}function we(st){var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,lt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,et=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=ye(st,jt),mt=ut.paddingSize,_t=ut.borderSize,gt=ut.boxSizing,Bt=ut.sizingStyle;ue.setAttribute("style","".concat(Bt,";").concat(oe)),ue.value=st.value||st.placeholder||"";var Ht=void 0,hn=void 0,Qt,bn=ue.scrollHeight;if(gt==="border-box"?bn+=_t:gt==="content-box"&&(bn-=mt),lt!==null||et!==null){ue.value=" ";var Wt=ue.scrollHeight-mt;lt!==null&&(Ht=Wt*lt,gt==="border-box"&&(Ht=Ht+mt+_t),bn=Math.max(Ht,bn)),et!==null&&(hn=Wt*et,gt==="border-box"&&(hn=hn+mt+_t),Qt=bn>hn?"":"hidden",bn=Math.min(hn,bn))}var Kt={height:bn,overflowY:Qt,resize:"none"};return Ht&&(Kt.minHeight=Ht),hn&&(Kt.maxHeight=hn),Kt}var be=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Ae=0,De=1,ze=2,Ze=de.forwardRef(function(st,jt){var lt=st,et=lt.prefixCls,ut=lt.onPressEnter,mt=lt.defaultValue,_t=lt.value,gt=lt.autoSize,Bt=lt.onResize,Ht=lt.className,hn=lt.style,Qt=lt.disabled,bn=lt.onChange,Wt=lt.onInternalAutoSize,Kt=(0,Le.Z)(lt,be),Jt=(0,ve.Z)(mt,{value:_t,postState:function(mi){return mi!=null?mi:""}}),dn=(0,Pe.Z)(Jt,2),Lt=dn[0],pt=dn[1],Rt=function(mi){pt(mi.target.value),bn==null||bn(mi)},St=de.useRef();de.useImperativeHandle(jt,function(){return{textArea:St.current}});var yt=de.useMemo(function(){return gt&&(0,ke.Z)(gt)==="object"?[gt.minRows,gt.maxRows]:[]},[gt]),nt=(0,Pe.Z)(yt,2),He=nt[0],Ie=nt[1],We=!!gt,Oe=function(){try{if(document.activeElement===St.current){var mi=St.current,Qi=mi.selectionStart,ir=mi.selectionEnd,fr=mi.scrollTop;St.current.setSelectionRange(Qi,ir),St.current.scrollTop=fr}}catch(er){}},Ce=de.useState(ze),Ne=(0,Pe.Z)(Ce,2),$e=Ne[0],dt=Ne[1],Je=de.useState(),Tt=(0,Pe.Z)(Je,2),qt=Tt[0],yn=Tt[1],rn=function(){dt(Ae)};(0,z.Z)(function(){We&&rn()},[_t,He,Ie,We]),(0,z.Z)(function(){if($e===Ae)dt(De);else if($e===De){var Ti=we(St.current,!1,He,Ie);dt(ze),yn(Ti)}else Oe()},[$e]);var pn=de.useRef(),Fn=function(){ee.Z.cancel(pn.current)},kn=function(mi){$e===ze&&(Bt==null||Bt(mi),gt&&(Fn(),pn.current=(0,ee.Z)(function(){rn()})))};de.useEffect(function(){return Fn},[]);var oi=We?qt:null,ri=(0,me.Z)((0,me.Z)({},hn),oi);return($e===Ae||$e===De)&&(ri.overflowY="hidden",ri.overflowX="hidden"),de.createElement(ce.Z,{onResize:kn,disabled:!(gt||Bt)},de.createElement("textarea",(0,Me.Z)({},Kt,{ref:St,style:ri,className:xe()(et,Ht,(0,Be.Z)({},"".concat(et,"-disabled"),Qt)),disabled:Qt,value:Lt,onChange:Rt})))}),Ye=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,jt){return(0,he.Z)(st||"").slice(0,jt).join("")}function at(st,jt,lt,et){var ut=lt;return st?ut=ft(lt,et):(0,he.Z)(jt||"").length<lt.length&&(0,he.Z)(lt||"").length>et&&(ut=jt),ut}var Pt=de.forwardRef(function(st,jt){var lt,et=st.defaultValue,ut=st.value,mt=st.onFocus,_t=st.onBlur,gt=st.onChange,Bt=st.allowClear,Ht=st.maxLength,hn=st.onCompositionStart,Qt=st.onCompositionEnd,bn=st.suffix,Wt=st.prefixCls,Kt=Wt===void 0?"rc-textarea":Wt,Jt=st.classes,dn=st.showCount,Lt=st.className,pt=st.style,Rt=st.disabled,St=st.hidden,yt=st.classNames,nt=st.styles,He=st.onResize,Ie=(0,Le.Z)(st,Ge),We=(0,ve.Z)(et,{value:ut,defaultValue:et}),Oe=(0,Pe.Z)(We,2),Ce=Oe[0],Ne=Oe[1],$e=(0,de.useRef)(null),dt=de.useState(!1),Je=(0,Pe.Z)(dt,2),Tt=Je[0],qt=Je[1],yn=de.useState(!1),rn=(0,Pe.Z)(yn,2),pn=rn[0],Fn=rn[1],kn=de.useRef(),oi=de.useRef(0),ri=de.useState(null),Ti=(0,Pe.Z)(ri,2),mi=Ti[0],Qi=Ti[1],ir=function(){var Ke;(Ke=$e.current)===null||Ke===void 0||Ke.textArea.focus()};(0,de.useImperativeHandle)(jt,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(){qt(function(ln){return!Rt&&ln})},[Rt]);var fr=Number(Ht)>0,er=function(Ke){Fn(!0),kn.current=Ce,oi.current=Ke.currentTarget.selectionStart,hn==null||hn(Ke)},Mr=function(Ke){Fn(!1);var qe=Ke.currentTarget.value;if(fr){var Xe,wt=oi.current>=Ht+1||oi.current===((Xe=kn.current)===null||Xe===void 0?void 0:Xe.length);qe=at(wt,kn.current,qe,Ht)}qe!==Ce&&(Ne(qe),(0,le.rJ)(Ke.currentTarget,Ke,gt,qe)),Qt==null||Qt(Ke)},qr=function(Ke){var qe=Ke.target.value;if(!pn&&fr){var Xe=Ke.target.selectionStart>=Ht+1||Ke.target.selectionStart===qe.length||!Ke.target.selectionStart;qe=at(Xe,Ce,qe,Ht)}Ne(qe),(0,le.rJ)(Ke.currentTarget,Ke,gt,qe)},di=function(Ke){var qe=Ie.onPressEnter,Xe=Ie.onKeyDown;Ke.key==="Enter"&&qe&&qe(Ke),Xe==null||Xe(Ke)},xr=function(Ke){qt(!0),mt==null||mt(Ke)},zi=function(Ke){qt(!1),_t==null||_t(Ke)},rt=function(Ke){var qe;Ne(""),ir(),(0,le.rJ)((qe=$e.current)===null||qe===void 0?void 0:qe.textArea,Ke,gt)},zr=(0,le.D7)(Ce);!pn&&fr&&ut==null&&(zr=ft(zr,Ht));var hr=bn,vo;if(dn){var co=(0,he.Z)(zr).length;(0,ke.Z)(dn)==="object"?vo=dn.formatter({value:zr,count:co,maxLength:Ht}):vo="".concat(co).concat(fr?" / ".concat(Ht):""),hr=de.createElement(de.Fragment,null,hr,de.createElement("span",{className:xe()("".concat(Kt,"-data-count"),yt==null?void 0:yt.count),style:nt==null?void 0:nt.count},vo))}var yo=function(Ke){var qe;He==null||He(Ke),(qe=$e.current)!==null&&qe!==void 0&&qe.textArea.style.height&&Qi(!0)},eo=!Ie.autoSize&&!dn&&!Bt,lo=de.createElement(ge.BaseInput,{value:zr,allowClear:Bt,handleReset:rt,suffix:hr,prefixCls:Kt,classes:{affixWrapper:xe()(Jt==null?void 0:Jt.affixWrapper,(lt={},(0,Be.Z)(lt,"".concat(Kt,"-show-count"),dn),(0,Be.Z)(lt,"".concat(Kt,"-textarea-allow-clear"),Bt),lt))},disabled:Rt,focused:Tt,className:Lt,style:(0,me.Z)((0,me.Z)({},pt),mi&&!eo?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof vo=="string"?vo:void 0}},hidden:St,inputElement:de.createElement(Ye,(0,Me.Z)({},Ie,{onKeyDown:di,onChange:qr,onFocus:xr,onBlur:zi,onCompositionStart:er,onCompositionEnd:Mr,className:yt==null?void 0:yt.textarea,style:(0,me.Z)((0,me.Z)({},nt==null?void 0:nt.textarea),{},{resize:pt==null?void 0:pt.resize}),disabled:Rt,prefixCls:Kt,onResize:yo,ref:$e}))});return lo}),tt=Pt,vt=tt},39417:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return De}});var Me=Ee(5891),me=Ee(80962),Be=Ee(19149),ke=Ee(57259),Pe=Ee(79545),Le=Ee(68550),he=Ee(21882),Se=Ee(17928),xe=Ee(7711),ge=Ee(92310),le=Ee.n(ge),ve=Ee(36994),de=Ee(59301),ce=Ee(39378),z=function(Ze){for(var Ye=Ze.prefixCls,Ge=Ze.level,ft=Ze.isStart,at=Ze.isEnd,Pt="".concat(Ye,"-indent-unit"),tt=[],vt=0;vt<Ge;vt+=1){var st;tt.push(de.createElement("span",{key:vt,className:le()(Pt,(st={},(0,me.Z)(st,"".concat(Pt,"-start"),ft[vt]),(0,me.Z)(st,"".concat(Pt,"-end"),at[vt]),st))}))}return de.createElement("span",{"aria-hidden":"true",className:"".concat(Ye,"-indent")},tt)},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",ye="close",we="---",be=function(ze){(0,Se.Z)(Ye,ze);var Ze=(0,xe.Z)(Ye);function Ye(){var Ge;(0,Pe.Z)(this,Ye);for(var ft=arguments.length,at=new Array(ft),Pt=0;Pt<ft;Pt++)at[Pt]=arguments[Pt];return Ge=Ze.call.apply(Ze,[this].concat(at)),Ge.state={dragNodeHighlight:!1},Ge.selectHandle=void 0,Ge.cacheIndent=void 0,Ge.onSelectorClick=function(tt){var vt=Ge.props.context.onNodeClick;vt(tt,(0,ie.F)(Ge.props)),Ge.isSelectable()?Ge.onSelect(tt):Ge.onCheck(tt)},Ge.onSelectorDoubleClick=function(tt){var vt=Ge.props.context.onNodeDoubleClick;vt(tt,(0,ie.F)(Ge.props))},Ge.onSelect=function(tt){if(!Ge.isDisabled()){var vt=Ge.props.context.onNodeSelect;vt(tt,(0,ie.F)(Ge.props))}},Ge.onCheck=function(tt){if(!Ge.isDisabled()){var vt=Ge.props,st=vt.disableCheckbox,jt=vt.checked,lt=Ge.props.context.onNodeCheck;if(!(!Ge.isCheckable()||st)){var et=!jt;lt(tt,(0,ie.F)(Ge.props),et)}}},Ge.onMouseEnter=function(tt){var vt=Ge.props.context.onNodeMouseEnter;vt(tt,(0,ie.F)(Ge.props))},Ge.onMouseLeave=function(tt){var vt=Ge.props.context.onNodeMouseLeave;vt(tt,(0,ie.F)(Ge.props))},Ge.onContextMenu=function(tt){var vt=Ge.props.context.onNodeContextMenu;vt(tt,(0,ie.F)(Ge.props))},Ge.onDragStart=function(tt){var vt=Ge.props.context.onNodeDragStart;tt.stopPropagation(),Ge.setState({dragNodeHighlight:!0}),vt(tt,(0,he.Z)(Ge));try{tt.dataTransfer.setData("text/plain","")}catch(st){}},Ge.onDragEnter=function(tt){var vt=Ge.props.context.onNodeDragEnter;tt.preventDefault(),tt.stopPropagation(),vt(tt,(0,he.Z)(Ge))},Ge.onDragOver=function(tt){var vt=Ge.props.context.onNodeDragOver;tt.preventDefault(),tt.stopPropagation(),vt(tt,(0,he.Z)(Ge))},Ge.onDragLeave=function(tt){var vt=Ge.props.context.onNodeDragLeave;tt.stopPropagation(),vt(tt,(0,he.Z)(Ge))},Ge.onDragEnd=function(tt){var vt=Ge.props.context.onNodeDragEnd;tt.stopPropagation(),Ge.setState({dragNodeHighlight:!1}),vt(tt,(0,he.Z)(Ge))},Ge.onDrop=function(tt){var vt=Ge.props.context.onNodeDrop;tt.preventDefault(),tt.stopPropagation(),Ge.setState({dragNodeHighlight:!1}),vt(tt,(0,he.Z)(Ge))},Ge.onExpand=function(tt){var vt=Ge.props,st=vt.loading,jt=vt.context.onNodeExpand;st||jt(tt,(0,ie.F)(Ge.props))},Ge.setSelectHandle=function(tt){Ge.selectHandle=tt},Ge.getNodeState=function(){var tt=Ge.props.expanded;return Ge.isLeaf()?null:tt?ue:ye},Ge.hasChildren=function(){var tt=Ge.props.eventKey,vt=Ge.props.context.keyEntities,st=(0,oe.Z)(vt,tt)||{},jt=st.children;return!!(jt||[]).length},Ge.isLeaf=function(){var tt=Ge.props,vt=tt.isLeaf,st=tt.loaded,jt=Ge.props.context.loadData,lt=Ge.hasChildren();return vt===!1?!1:vt||!jt&&!lt||jt&&st&&!lt},Ge.isDisabled=function(){var tt=Ge.props.disabled,vt=Ge.props.context.disabled;return!!(vt||tt)},Ge.isCheckable=function(){var tt=Ge.props.checkable,vt=Ge.props.context.checkable;return!vt||tt===!1?!1:vt},Ge.syncLoadData=function(tt){var vt=tt.expanded,st=tt.loading,jt=tt.loaded,lt=Ge.props.context,et=lt.loadData,ut=lt.onNodeLoad;st||et&&vt&&!Ge.isLeaf()&&!Ge.hasChildren()&&!jt&&ut((0,ie.F)(Ge.props))},Ge.isDraggable=function(){var tt=Ge.props,vt=tt.data,st=tt.context.draggable;return!!(st&&(!st.nodeDraggable||st.nodeDraggable(vt)))},Ge.renderDragHandler=function(){var tt=Ge.props.context,vt=tt.draggable,st=tt.prefixCls;return vt!=null&&vt.icon?de.createElement("span",{className:"".concat(st,"-draggable-icon")},vt.icon):null},Ge.renderSwitcherIconDom=function(tt){var vt=Ge.props.switcherIcon,st=Ge.props.context.switcherIcon,jt=vt||st;return typeof jt=="function"?jt((0,ke.Z)((0,ke.Z)({},Ge.props),{},{isLeaf:tt})):jt},Ge.renderSwitcher=function(){var tt=Ge.props.expanded,vt=Ge.props.context.prefixCls;if(Ge.isLeaf()){var st=Ge.renderSwitcherIconDom(!0);return st!==!1?de.createElement("span",{className:le()("".concat(vt,"-switcher"),"".concat(vt,"-switcher-noop"))},st):null}var jt=le()("".concat(vt,"-switcher"),"".concat(vt,"-switcher_").concat(tt?ue:ye)),lt=Ge.renderSwitcherIconDom(!1);return lt!==!1?de.createElement("span",{onClick:Ge.onExpand,className:jt},lt):null},Ge.renderCheckbox=function(){var tt=Ge.props,vt=tt.checked,st=tt.halfChecked,jt=tt.disableCheckbox,lt=Ge.props.context.prefixCls,et=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"),vt&&"".concat(lt,"-checkbox-checked"),!vt&&st&&"".concat(lt,"-checkbox-indeterminate"),(et||jt)&&"".concat(lt,"-checkbox-disabled")),onClick:Ge.onCheck},mt)},Ge.renderIcon=function(){var tt=Ge.props.loading,vt=Ge.props.context.prefixCls;return de.createElement("span",{className:le()("".concat(vt,"-iconEle"),"".concat(vt,"-icon__").concat(Ge.getNodeState()||"docu"),tt&&"".concat(vt,"-icon_loading"))})},Ge.renderSelector=function(){var tt=Ge.state.dragNodeHighlight,vt=Ge.props,st=vt.title,jt=st===void 0?we:st,lt=vt.selected,et=vt.icon,ut=vt.loading,mt=vt.data,_t=Ge.props.context,gt=_t.prefixCls,Bt=_t.showIcon,Ht=_t.icon,hn=_t.loadData,Qt=_t.titleRender,bn=Ge.isDisabled(),Wt="".concat(gt,"-node-content-wrapper"),Kt;if(Bt){var Jt=et||Ht;Kt=Jt?de.createElement("span",{className:le()("".concat(gt,"-iconEle"),"".concat(gt,"-icon__customize"))},typeof Jt=="function"?Jt(Ge.props):Jt):Ge.renderIcon()}else hn&&ut&&(Kt=Ge.renderIcon());var dn;typeof jt=="function"?dn=jt(mt):Qt?dn=Qt(mt):dn=jt;var Lt=de.createElement("span",{className:"".concat(gt,"-title")},dn);return de.createElement("span",{ref:Ge.setSelectHandle,title:typeof jt=="string"?jt:"",className:le()("".concat(Wt),"".concat(Wt,"-").concat(Ge.getNodeState()||"normal"),!bn&&(lt||tt)&&"".concat(gt,"-node-selected")),onMouseEnter:Ge.onMouseEnter,onMouseLeave:Ge.onMouseLeave,onContextMenu:Ge.onContextMenu,onClick:Ge.onSelectorClick,onDoubleClick:Ge.onSelectorDoubleClick},Kt,Lt,Ge.renderDropIndicator())},Ge.renderDropIndicator=function(){var tt=Ge.props,vt=tt.disabled,st=tt.eventKey,jt=Ge.props.context,lt=jt.draggable,et=jt.dropLevelOffset,ut=jt.dropPosition,mt=jt.prefixCls,_t=jt.indent,gt=jt.dropIndicatorRender,Bt=jt.dragOverNodeKey,Ht=jt.direction,hn=!!lt,Qt=!vt&&hn&&Bt===st,bn=_t!=null?_t:Ge.cacheIndent;return Ge.cacheIndent=_t,Qt?gt({dropPosition:ut,dropLevelOffset:et,indent:bn,prefixCls:mt,direction:Ht}):null},Ge}return(0,Le.Z)(Ye,[{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,Pt=at.eventKey,tt=at.className,vt=at.style,st=at.dragOver,jt=at.dragOverGapTop,lt=at.dragOverGapBottom,et=at.isLeaf,ut=at.isStart,mt=at.isEnd,_t=at.expanded,gt=at.selected,Bt=at.checked,Ht=at.halfChecked,hn=at.loading,Qt=at.domRef,bn=at.active,Wt=at.data,Kt=at.onMouseMove,Jt=at.selectable,dn=(0,Be.Z)(at,se),Lt=this.props.context,pt=Lt.prefixCls,Rt=Lt.filterTreeNode,St=Lt.keyEntities,yt=Lt.dropContainerKey,nt=Lt.dropTargetKey,He=Lt.draggingNodeKey,Ie=this.isDisabled(),We=(0,ve.Z)(dn,{aria:!0,data:!0}),Oe=(0,oe.Z)(St,Pt)||{},Ce=Oe.level,Ne=mt[mt.length-1],$e=this.isDraggable(),dt=!Ie&&$e,Je=He===Pt,Tt=Jt!==void 0?{"aria-selected":!!Jt}:void 0;return de.createElement("div",(0,Me.Z)({ref:Qt,className:le()(tt,"".concat(pt,"-treenode"),(ft={},(0,me.Z)(ft,"".concat(pt,"-treenode-disabled"),Ie),(0,me.Z)(ft,"".concat(pt,"-treenode-switcher-").concat(_t?"open":"close"),!et),(0,me.Z)(ft,"".concat(pt,"-treenode-checkbox-checked"),Bt),(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===Pt),(0,me.Z)(ft,"drop-container",yt===Pt),(0,me.Z)(ft,"drag-over",!Ie&&st),(0,me.Z)(ft,"drag-over-gap-top",!Ie&&jt),(0,me.Z)(ft,"drag-over-gap-bottom",!Ie&<),(0,me.Z)(ft,"filter-node",Rt&&Rt((0,ie.F)(this.props))),ft)),style:vt,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},Tt,We),de.createElement(ee,{prefixCls:pt,level:Ce,isStart:ut,isEnd:mt}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),Ye}(de.Component),Ae=function(Ze){return de.createElement(ce.k.Consumer,null,function(Ye){return de.createElement(be,(0,Me.Z)({},Ze,{context:Ye}))})};Ae.displayName="TreeNode",Ae.isTreeNode=1;var De=Ae},39378:function(Ln,tn,Ee){"use strict";Ee.d(tn,{k:function(){return me}});var Me=Ee(59301),me=Me.createContext(null)},99581:function(Ln,tn,Ee){"use strict";Ee.d(tn,{O:function(){return De.Z},Z:function(){return Lt}});var Me=Ee(5891),me=Ee(80962),Be=Ee(80665),ke=Ee(57259),Pe=Ee(26390),Le=Ee(79545),he=Ee(68550),Se=Ee(21882),xe=Ee(17928),ge=Ee(7711),le=Ee(92310),ve=Ee.n(le),de=Ee(85108),ce=Ee(36994),z=Ee(51395),ee=Ee(59301),oe=Ee(39378);function ie(pt){var Rt=pt.dropPosition,St=pt.dropLevelOffset,yt=pt.indent,nt={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Rt){case-1:nt.top=0,nt.left=-St*yt;break;case 1:nt.bottom=0,nt.left=-St*yt;break;case 0:nt.bottom=0,nt.left=yt;break}return ee.createElement("div",{style:nt})}function se(pt){if(pt==null)throw new TypeError("Cannot destructure "+pt)}var ue=Ee(29043),ye=Ee(19149),we=Ee(28800),be=Ee(21881),Ae=Ee(43469),De=Ee(39417);function ze(pt,Rt){var St=ee.useState(!1),yt=(0,ue.Z)(St,2),nt=yt[0],He=yt[1];ee.useLayoutEffect(function(){if(nt)return pt(),function(){Rt()}},[nt]),ee.useLayoutEffect(function(){return He(!0),function(){He(!1)}},[])}var Ze=Ee(71430),Ye=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ge=function(Rt,St){var yt=Rt.className,nt=Rt.style,He=Rt.motion,Ie=Rt.motionNodes,We=Rt.motionType,Oe=Rt.onMotionStart,Ce=Rt.onMotionEnd,Ne=Rt.active,$e=Rt.treeNodeRequiredProps,dt=(0,ye.Z)(Rt,Ye),Je=ee.useState(!0),Tt=(0,ue.Z)(Je,2),qt=Tt[0],yn=Tt[1],rn=ee.useContext(oe.k),pn=rn.prefixCls,Fn=Ie&&We!=="hide";(0,we.Z)(function(){Ie&&Fn!==qt&&yn(Fn)},[Ie]);var kn=function(){Ie&&Oe()},oi=ee.useRef(!1),ri=function(){Ie&&!oi.current&&(oi.current=!0,Ce())};ze(kn,ri);var Ti=function(Qi){Fn===Qi&&ri()};return Ie?ee.createElement(Ae.default,(0,Me.Z)({ref:St,visible:qt},He,{motionAppear:We==="show",onVisibleChanged:Ti}),function(mi,Qi){var ir=mi.className,fr=mi.style;return ee.createElement("div",{ref:Qi,className:ve()("".concat(pn,"-treenode-motion"),ir),style:fr},Ie.map(function(er){var Mr=(0,Me.Z)({},(se(er.data),er.data)),qr=er.title,di=er.key,xr=er.isStart,zi=er.isEnd;delete Mr.children;var rt=(0,Ze.H8)(di,$e);return ee.createElement(De.Z,(0,Me.Z)({},Mr,rt,{title:qr,active:Ne,data:er.data,key:di,isStart:xr,isEnd:zi}))}))}):ee.createElement(De.Z,(0,Me.Z)({domRef:St,className:yt,style:nt},dt,{active:Ne}))};Ge.displayName="MotionTreeNode";var ft=ee.forwardRef(Ge),at=ft;function Pt(){var pt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],St=pt.length,yt=Rt.length;if(Math.abs(St-yt)!==1)return{add:!1,key:null};function nt(He,Ie){var We=new Map;He.forEach(function(Ce){We.set(Ce,!0)});var Oe=Ie.filter(function(Ce){return!We.has(Ce)});return Oe.length===1?Oe[0]:null}return St<yt?{add:!0,key:nt(pt,Rt)}:{add:!1,key:nt(Rt,pt)}}function tt(pt,Rt,St){var yt=pt.findIndex(function(We){return We.key===St}),nt=pt[yt+1],He=Rt.findIndex(function(We){return We.key===St});if(nt){var Ie=Rt.findIndex(function(We){return We.key===nt.key});return Rt.slice(He+1,Ie)}return Rt.slice(He+1)}var vt=["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},jt=function(){},lt="RC_TREE_MOTION_".concat(Math.random()),et={key:lt},ut={key:lt,level:0,index:0,pos:"0",node:et,nodes:[et]},mt={parent:null,children:[],pos:ut.pos,data:et,title:null,key:lt,isStart:[],isEnd:[]};function _t(pt,Rt,St,yt){return Rt===!1||!St?pt:pt.slice(0,Math.ceil(St/yt)+1)}function gt(pt){var Rt=pt.key,St=pt.pos;return(0,Ze.km)(Rt,St)}function Bt(pt){for(var Rt=String(pt.data.key),St=pt;St.parent;)St=St.parent,Rt="".concat(St.data.key," > ").concat(Rt);return Rt}var Ht=ee.forwardRef(function(pt,Rt){var St=pt.prefixCls,yt=pt.data,nt=pt.selectable,He=pt.checkable,Ie=pt.expandedKeys,We=pt.selectedKeys,Oe=pt.checkedKeys,Ce=pt.loadedKeys,Ne=pt.loadingKeys,$e=pt.halfCheckedKeys,dt=pt.keyEntities,Je=pt.disabled,Tt=pt.dragging,qt=pt.dragOverNodeKey,yn=pt.dropPosition,rn=pt.motion,pn=pt.height,Fn=pt.itemHeight,kn=pt.virtual,oi=pt.focusable,ri=pt.activeItem,Ti=pt.focused,mi=pt.tabIndex,Qi=pt.onKeyDown,ir=pt.onFocus,fr=pt.onBlur,er=pt.onActiveChange,Mr=pt.onListChangeStart,qr=pt.onListChangeEnd,di=(0,ye.Z)(pt,vt),xr=ee.useRef(null),zi=ee.useRef(null);ee.useImperativeHandle(Rt,function(){return{scrollTo:function(an){xr.current.scrollTo(an)},getIndentWidth:function(){return zi.current.offsetWidth}}});var rt=ee.useState(Ie),zr=(0,ue.Z)(rt,2),hr=zr[0],vo=zr[1],co=ee.useState(yt),yo=(0,ue.Z)(co,2),eo=yo[0],lo=yo[1],ln=ee.useState(yt),Ke=(0,ue.Z)(ln,2),qe=Ke[0],Xe=Ke[1],wt=ee.useState([]),At=(0,ue.Z)(wt,2),Nt=At[0],bt=At[1],gn=ee.useState(null),En=(0,ue.Z)(gn,2),Un=En[0],Pn=En[1],zt=ee.useRef(yt);zt.current=yt;function Yt(){var Vt=zt.current;lo(Vt),Xe(Vt),bt([]),Pn(null),qr()}(0,we.Z)(function(){vo(Ie);var Vt=Pt(hr,Ie);if(Vt.key!==null)if(Vt.add){var an=eo.findIndex(function(Rn){var li=Rn.key;return li===Vt.key}),Bn=_t(tt(eo,yt,Vt.key),kn,pn,Fn),Nn=eo.slice();Nn.splice(an+1,0,mt),Xe(Nn),bt(Bn),Pn("show")}else{var qn=yt.findIndex(function(Rn){var li=Rn.key;return li===Vt.key}),Gn=_t(tt(yt,eo,Vt.key),kn,pn,Fn),Jn=yt.slice();Jn.splice(qn+1,0,mt),Xe(Jn),bt(Gn),Pn("hide")}else eo!==yt&&(lo(yt),Xe(yt))},[Ie,yt]),ee.useEffect(function(){Tt||Yt()},[Tt]);var Cn=rn?qe:yt,An={expandedKeys:Ie,selectedKeys:We,loadedKeys:Ce,loadingKeys:Ne,checkedKeys:Oe,halfCheckedKeys:$e,dragOverNodeKey:qt,dropPosition:yn,keyEntities:dt};return ee.createElement(ee.Fragment,null,Ti&&ri&&ee.createElement("span",{style:st,"aria-live":"assertive"},Bt(ri)),ee.createElement("div",null,ee.createElement("input",{style:st,disabled:oi===!1||Je,tabIndex:oi!==!1?mi:null,onKeyDown:Qi,onFocus:ir,onBlur:fr,value:"",onChange:jt,"aria-label":"for screen reader"})),ee.createElement("div",{className:"".concat(St,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},ee.createElement("div",{className:"".concat(St,"-indent")},ee.createElement("div",{ref:zi,className:"".concat(St,"-indent-unit")}))),ee.createElement(be.Z,(0,Me.Z)({},di,{data:Cn,itemKey:gt,height:pn,fullHeight:!1,virtual:kn,itemHeight:Fn,prefixCls:"".concat(St,"-list"),ref:xr,onVisibleChange:function(an,Bn){var Nn=new Set(an),qn=Bn.filter(function(Gn){return!Nn.has(Gn)});qn.some(function(Gn){return gt(Gn)===lt})&&Yt()}}),function(Vt){var an=Vt.pos,Bn=(0,Me.Z)({},(se(Vt.data),Vt.data)),Nn=Vt.title,qn=Vt.key,Gn=Vt.isStart,Jn=Vt.isEnd,Rn=(0,Ze.km)(qn,an);delete Bn.key,delete Bn.children;var li=(0,Ze.H8)(Rn,An);return ee.createElement(at,(0,Me.Z)({},Bn,li,{title:Nn,active:!!ri&&qn===ri.key,pos:an,data:Vt.data,isStart:Gn,isEnd:Jn,motion:rn,motionNodes:qn===lt?Nt:null,motionType:Un,onMotionStart:Mr,onMotionEnd:Yt,treeNodeRequiredProps:An,onMouseMove:function(){er(null)}}))}))});Ht.displayName="NodeList";var hn=Ht,Qt=Ee(35654),bn=Ee(90782),Wt=Ee(67841),Kt=10,Jt=function(pt){(0,xe.Z)(St,pt);var Rt=(0,ge.Z)(St);function St(){var yt;(0,Le.Z)(this,St);for(var nt=arguments.length,He=new Array(nt),Ie=0;Ie<nt;Ie++)He[Ie]=arguments[Ie];return yt=Rt.call.apply(Rt,[this].concat(He)),yt.destroyed=!1,yt.delayedDragEnterLogic=void 0,yt.loadingRetryTimes={},yt.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$)()},yt.dragStartMousePosition=null,yt.dragNode=void 0,yt.currentMouseOverDroppableNodeKey=null,yt.listRef=ee.createRef(),yt.onNodeDragStart=function(We,Oe){var Ce=yt.state,Ne=Ce.expandedKeys,$e=Ce.keyEntities,dt=yt.props.onDragStart,Je=Oe.props.eventKey;yt.dragNode=Oe,yt.dragStartMousePosition={x:We.clientX,y:We.clientY};var Tt=(0,Qt._5)(Ne,Je);yt.setState({draggingNodeKey:Je,dragChildrenKeys:(0,Qt.wA)(Je,$e),indent:yt.listRef.current.getIndentWidth()}),yt.setExpandedKeys(Tt),window.addEventListener("dragend",yt.onWindowDragEnd),dt==null||dt({event:We,node:(0,Ze.F)(Oe.props)})},yt.onNodeDragEnter=function(We,Oe){var Ce=yt.state,Ne=Ce.expandedKeys,$e=Ce.keyEntities,dt=Ce.dragChildrenKeys,Je=Ce.flattenNodes,Tt=Ce.indent,qt=yt.props,yn=qt.onDragEnter,rn=qt.onExpand,pn=qt.allowDrop,Fn=qt.direction,kn=Oe.props,oi=kn.pos,ri=kn.eventKey,Ti=(0,Se.Z)(yt),mi=Ti.dragNode;if(yt.currentMouseOverDroppableNodeKey!==ri&&(yt.currentMouseOverDroppableNodeKey=ri),!mi){yt.resetDragState();return}var Qi=(0,Qt.OM)(We,mi,Oe,Tt,yt.dragStartMousePosition,pn,Je,$e,Ne,Fn),ir=Qi.dropPosition,fr=Qi.dropLevelOffset,er=Qi.dropTargetKey,Mr=Qi.dropContainerKey,qr=Qi.dropTargetPos,di=Qi.dropAllowed,xr=Qi.dragOverNodeKey;if(dt.indexOf(er)!==-1||!di){yt.resetDragState();return}if(yt.delayedDragEnterLogic||(yt.delayedDragEnterLogic={}),Object.keys(yt.delayedDragEnterLogic).forEach(function(zi){clearTimeout(yt.delayedDragEnterLogic[zi])}),mi.props.eventKey!==Oe.props.eventKey&&(We.persist(),yt.delayedDragEnterLogic[oi]=window.setTimeout(function(){if(yt.state.draggingNodeKey!==null){var zi=(0,Pe.Z)(Ne),rt=(0,Wt.Z)($e,Oe.props.eventKey);rt&&(rt.children||[]).length&&(zi=(0,Qt.L0)(Ne,Oe.props.eventKey)),"expandedKeys"in yt.props||yt.setExpandedKeys(zi),rn==null||rn(zi,{node:(0,Ze.F)(Oe.props),expanded:!0,nativeEvent:We.nativeEvent})}},800)),mi.props.eventKey===er&&fr===0){yt.resetDragState();return}yt.setState({dragOverNodeKey:xr,dropPosition:ir,dropLevelOffset:fr,dropTargetKey:er,dropContainerKey:Mr,dropTargetPos:qr,dropAllowed:di}),yn==null||yn({event:We,node:(0,Ze.F)(Oe.props),expandedKeys:Ne})},yt.onNodeDragOver=function(We,Oe){var Ce=yt.state,Ne=Ce.dragChildrenKeys,$e=Ce.flattenNodes,dt=Ce.keyEntities,Je=Ce.expandedKeys,Tt=Ce.indent,qt=yt.props,yn=qt.onDragOver,rn=qt.allowDrop,pn=qt.direction,Fn=(0,Se.Z)(yt),kn=Fn.dragNode;if(kn){var oi=(0,Qt.OM)(We,kn,Oe,Tt,yt.dragStartMousePosition,rn,$e,dt,Je,pn),ri=oi.dropPosition,Ti=oi.dropLevelOffset,mi=oi.dropTargetKey,Qi=oi.dropContainerKey,ir=oi.dropAllowed,fr=oi.dropTargetPos,er=oi.dragOverNodeKey;Ne.indexOf(mi)!==-1||!ir||(kn.props.eventKey===mi&&Ti===0?yt.state.dropPosition===null&&yt.state.dropLevelOffset===null&&yt.state.dropTargetKey===null&&yt.state.dropContainerKey===null&&yt.state.dropTargetPos===null&&yt.state.dropAllowed===!1&&yt.state.dragOverNodeKey===null||yt.resetDragState():ri===yt.state.dropPosition&&Ti===yt.state.dropLevelOffset&&mi===yt.state.dropTargetKey&&Qi===yt.state.dropContainerKey&&fr===yt.state.dropTargetPos&&ir===yt.state.dropAllowed&&er===yt.state.dragOverNodeKey||yt.setState({dropPosition:ri,dropLevelOffset:Ti,dropTargetKey:mi,dropContainerKey:Qi,dropTargetPos:fr,dropAllowed:ir,dragOverNodeKey:er}),yn==null||yn({event:We,node:(0,Ze.F)(Oe.props)}))}},yt.onNodeDragLeave=function(We,Oe){yt.currentMouseOverDroppableNodeKey===Oe.props.eventKey&&!We.currentTarget.contains(We.relatedTarget)&&(yt.resetDragState(),yt.currentMouseOverDroppableNodeKey=null);var Ce=yt.props.onDragLeave;Ce==null||Ce({event:We,node:(0,Ze.F)(Oe.props)})},yt.onWindowDragEnd=function(We){yt.onNodeDragEnd(We,null,!0),window.removeEventListener("dragend",yt.onWindowDragEnd)},yt.onNodeDragEnd=function(We,Oe){var Ce=yt.props.onDragEnd;yt.setState({dragOverNodeKey:null}),yt.cleanDragState(),Ce==null||Ce({event:We,node:(0,Ze.F)(Oe.props)}),yt.dragNode=null,window.removeEventListener("dragend",yt.onWindowDragEnd)},yt.onNodeDrop=function(We,Oe){var Ce,Ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,$e=yt.state,dt=$e.dragChildrenKeys,Je=$e.dropPosition,Tt=$e.dropTargetKey,qt=$e.dropTargetPos,yn=$e.dropAllowed;if(yn){var rn=yt.props.onDrop;if(yt.setState({dragOverNodeKey:null}),yt.cleanDragState(),Tt!==null){var pn=(0,ke.Z)((0,ke.Z)({},(0,Ze.H8)(Tt,yt.getTreeNodeRequiredProps())),{},{active:((Ce=yt.getActiveItem())===null||Ce===void 0?void 0:Ce.key)===Tt,data:(0,Wt.Z)(yt.state.keyEntities,Tt).node}),Fn=dt.indexOf(Tt)!==-1;(0,z.ZP)(!Fn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var kn=(0,Qt.yx)(qt),oi={event:We,node:(0,Ze.F)(pn),dragNode:yt.dragNode?(0,Ze.F)(yt.dragNode.props):null,dragNodesKeys:[yt.dragNode.props.eventKey].concat(dt),dropToGap:Je!==0,dropPosition:Je+Number(kn[kn.length-1])};Ne||rn==null||rn(oi),yt.dragNode=null}}},yt.cleanDragState=function(){var We=yt.state.draggingNodeKey;We!==null&&yt.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),yt.dragStartMousePosition=null,yt.currentMouseOverDroppableNodeKey=null},yt.triggerExpandActionExpand=function(We,Oe){var Ce=yt.state,Ne=Ce.expandedKeys,$e=Ce.flattenNodes,dt=Oe.expanded,Je=Oe.key,Tt=Oe.isLeaf;if(!(Tt||We.shiftKey||We.metaKey||We.ctrlKey)){var qt=$e.filter(function(rn){return rn.key===Je})[0],yn=(0,Ze.F)((0,ke.Z)((0,ke.Z)({},(0,Ze.H8)(Je,yt.getTreeNodeRequiredProps())),{},{data:qt.data}));yt.setExpandedKeys(dt?(0,Qt._5)(Ne,Je):(0,Qt.L0)(Ne,Je)),yt.onNodeExpand(We,yn)}},yt.onNodeClick=function(We,Oe){var Ce=yt.props,Ne=Ce.onClick,$e=Ce.expandAction;$e==="click"&&yt.triggerExpandActionExpand(We,Oe),Ne==null||Ne(We,Oe)},yt.onNodeDoubleClick=function(We,Oe){var Ce=yt.props,Ne=Ce.onDoubleClick,$e=Ce.expandAction;$e==="doubleClick"&&yt.triggerExpandActionExpand(We,Oe),Ne==null||Ne(We,Oe)},yt.onNodeSelect=function(We,Oe){var Ce=yt.state.selectedKeys,Ne=yt.state,$e=Ne.keyEntities,dt=Ne.fieldNames,Je=yt.props,Tt=Je.onSelect,qt=Je.multiple,yn=Oe.selected,rn=Oe[dt.key],pn=!yn;pn?qt?Ce=(0,Qt.L0)(Ce,rn):Ce=[rn]:Ce=(0,Qt._5)(Ce,rn);var Fn=Ce.map(function(kn){var oi=(0,Wt.Z)($e,kn);return oi?oi.node:null}).filter(function(kn){return kn});yt.setUncontrolledState({selectedKeys:Ce}),Tt==null||Tt(Ce,{event:"select",selected:pn,node:Oe,selectedNodes:Fn,nativeEvent:We.nativeEvent})},yt.onNodeCheck=function(We,Oe,Ce){var Ne=yt.state,$e=Ne.keyEntities,dt=Ne.checkedKeys,Je=Ne.halfCheckedKeys,Tt=yt.props,qt=Tt.checkStrictly,yn=Tt.onCheck,rn=Oe.key,pn,Fn={event:"check",node:Oe,checked:Ce,nativeEvent:We.nativeEvent};if(qt){var kn=Ce?(0,Qt.L0)(dt,rn):(0,Qt._5)(dt,rn),oi=(0,Qt._5)(Je,rn);pn={checked:kn,halfChecked:oi},Fn.checkedNodes=kn.map(function(fr){return(0,Wt.Z)($e,fr)}).filter(function(fr){return fr}).map(function(fr){return fr.node}),yt.setUncontrolledState({checkedKeys:kn})}else{var ri=(0,bn.S)([].concat((0,Pe.Z)(dt),[rn]),!0,$e),Ti=ri.checkedKeys,mi=ri.halfCheckedKeys;if(!Ce){var Qi=new Set(Ti);Qi.delete(rn);var ir=(0,bn.S)(Array.from(Qi),{checked:!1,halfCheckedKeys:mi},$e);Ti=ir.checkedKeys,mi=ir.halfCheckedKeys}pn=Ti,Fn.checkedNodes=[],Fn.checkedNodesPositions=[],Fn.halfCheckedKeys=mi,Ti.forEach(function(fr){var er=(0,Wt.Z)($e,fr);if(er){var Mr=er.node,qr=er.pos;Fn.checkedNodes.push(Mr),Fn.checkedNodesPositions.push({node:Mr,pos:qr})}}),yt.setUncontrolledState({checkedKeys:Ti},!1,{halfCheckedKeys:mi})}yn==null||yn(pn,Fn)},yt.onNodeLoad=function(We){var Oe=We.key,Ce=new Promise(function(Ne,$e){yt.setState(function(dt){var Je=dt.loadedKeys,Tt=Je===void 0?[]:Je,qt=dt.loadingKeys,yn=qt===void 0?[]:qt,rn=yt.props,pn=rn.loadData,Fn=rn.onLoad;if(!pn||Tt.indexOf(Oe)!==-1||yn.indexOf(Oe)!==-1)return null;var kn=pn(We);return kn.then(function(){var oi=yt.state.loadedKeys,ri=(0,Qt.L0)(oi,Oe);Fn==null||Fn(ri,{event:"load",node:We}),yt.setUncontrolledState({loadedKeys:ri}),yt.setState(function(Ti){return{loadingKeys:(0,Qt._5)(Ti.loadingKeys,Oe)}}),Ne()}).catch(function(oi){if(yt.setState(function(Ti){return{loadingKeys:(0,Qt._5)(Ti.loadingKeys,Oe)}}),yt.loadingRetryTimes[Oe]=(yt.loadingRetryTimes[Oe]||0)+1,yt.loadingRetryTimes[Oe]>=Kt){var ri=yt.state.loadedKeys;(0,z.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),yt.setUncontrolledState({loadedKeys:(0,Qt.L0)(ri,Oe)}),Ne()}$e(oi)}),{loadingKeys:(0,Qt.L0)(yn,Oe)}})});return Ce.catch(function(){}),Ce},yt.onNodeMouseEnter=function(We,Oe){var Ce=yt.props.onMouseEnter;Ce==null||Ce({event:We,node:Oe})},yt.onNodeMouseLeave=function(We,Oe){var Ce=yt.props.onMouseLeave;Ce==null||Ce({event:We,node:Oe})},yt.onNodeContextMenu=function(We,Oe){var Ce=yt.props.onRightClick;Ce&&(We.preventDefault(),Ce({event:We,node:Oe}))},yt.onFocus=function(){var We=yt.props.onFocus;yt.setState({focused:!0});for(var Oe=arguments.length,Ce=new Array(Oe),Ne=0;Ne<Oe;Ne++)Ce[Ne]=arguments[Ne];We==null||We.apply(void 0,Ce)},yt.onBlur=function(){var We=yt.props.onBlur;yt.setState({focused:!1}),yt.onActiveChange(null);for(var Oe=arguments.length,Ce=new Array(Oe),Ne=0;Ne<Oe;Ne++)Ce[Ne]=arguments[Ne];We==null||We.apply(void 0,Ce)},yt.getTreeNodeRequiredProps=function(){var We=yt.state,Oe=We.expandedKeys,Ce=We.selectedKeys,Ne=We.loadedKeys,$e=We.loadingKeys,dt=We.checkedKeys,Je=We.halfCheckedKeys,Tt=We.dragOverNodeKey,qt=We.dropPosition,yn=We.keyEntities;return{expandedKeys:Oe||[],selectedKeys:Ce||[],loadedKeys:Ne||[],loadingKeys:$e||[],checkedKeys:dt||[],halfCheckedKeys:Je||[],dragOverNodeKey:Tt,dropPosition:qt,keyEntities:yn}},yt.setExpandedKeys=function(We){var Oe=yt.state,Ce=Oe.treeData,Ne=Oe.fieldNames,$e=(0,Ze.oH)(Ce,We,Ne);yt.setUncontrolledState({expandedKeys:We,flattenNodes:$e},!0)},yt.onNodeExpand=function(We,Oe){var Ce=yt.state.expandedKeys,Ne=yt.state,$e=Ne.listChanging,dt=Ne.fieldNames,Je=yt.props,Tt=Je.onExpand,qt=Je.loadData,yn=Oe.expanded,rn=Oe[dt.key];if(!$e){var pn=Ce.indexOf(rn),Fn=!yn;if((0,z.ZP)(yn&&pn!==-1||!yn&&pn===-1,"Expand state not sync with index check"),Fn?Ce=(0,Qt.L0)(Ce,rn):Ce=(0,Qt._5)(Ce,rn),yt.setExpandedKeys(Ce),Tt==null||Tt(Ce,{node:Oe,expanded:Fn,nativeEvent:We.nativeEvent}),Fn&&qt){var kn=yt.onNodeLoad(Oe);kn&&kn.then(function(){var oi=(0,Ze.oH)(yt.state.treeData,Ce,dt);yt.setUncontrolledState({flattenNodes:oi})}).catch(function(){var oi=yt.state.expandedKeys,ri=(0,Qt._5)(oi,rn);yt.setExpandedKeys(ri)})}}},yt.onListChangeStart=function(){yt.setUncontrolledState({listChanging:!0})},yt.onListChangeEnd=function(){setTimeout(function(){yt.setUncontrolledState({listChanging:!1})})},yt.onActiveChange=function(We){var Oe=yt.state.activeKey,Ce=yt.props.onActiveChange;Oe!==We&&(yt.setState({activeKey:We}),We!==null&&yt.scrollTo({key:We}),Ce==null||Ce(We))},yt.getActiveItem=function(){var We=yt.state,Oe=We.activeKey,Ce=We.flattenNodes;return Oe===null?null:Ce.find(function(Ne){var $e=Ne.key;return $e===Oe})||null},yt.offsetActiveKey=function(We){var Oe=yt.state,Ce=Oe.flattenNodes,Ne=Oe.activeKey,$e=Ce.findIndex(function(Tt){var qt=Tt.key;return qt===Ne});$e===-1&&We<0&&($e=Ce.length),$e=($e+We+Ce.length)%Ce.length;var dt=Ce[$e];if(dt){var Je=dt.key;yt.onActiveChange(Je)}else yt.onActiveChange(null)},yt.onKeyDown=function(We){var Oe=yt.state,Ce=Oe.activeKey,Ne=Oe.expandedKeys,$e=Oe.checkedKeys,dt=Oe.fieldNames,Je=yt.props,Tt=Je.onKeyDown,qt=Je.checkable,yn=Je.selectable;switch(We.which){case de.Z.UP:{yt.offsetActiveKey(-1),We.preventDefault();break}case de.Z.DOWN:{yt.offsetActiveKey(1),We.preventDefault();break}}var rn=yt.getActiveItem();if(rn&&rn.data){var pn=yt.getTreeNodeRequiredProps(),Fn=rn.data.isLeaf===!1||!!(rn.data[dt.children]||[]).length,kn=(0,Ze.F)((0,ke.Z)((0,ke.Z)({},(0,Ze.H8)(Ce,pn)),{},{data:rn.data,active:!0}));switch(We.which){case de.Z.LEFT:{Fn&&Ne.includes(Ce)?yt.onNodeExpand({},kn):rn.parent&&yt.onActiveChange(rn.parent.key),We.preventDefault();break}case de.Z.RIGHT:{Fn&&!Ne.includes(Ce)?yt.onNodeExpand({},kn):rn.children&&rn.children.length&&yt.onActiveChange(rn.children[0].key),We.preventDefault();break}case de.Z.ENTER:case de.Z.SPACE:{qt&&!kn.disabled&&kn.checkable!==!1&&!kn.disableCheckbox?yt.onNodeCheck({},kn,!$e.includes(Ce)):!qt&&yn&&!kn.disabled&&kn.selectable!==!1&&yt.onNodeSelect({},kn);break}}}Tt==null||Tt(We)},yt.setUncontrolledState=function(We){var Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!yt.destroyed){var Ne=!1,$e=!0,dt={};Object.keys(We).forEach(function(Je){if(Je in yt.props){$e=!1;return}Ne=!0,dt[Je]=We[Je]}),Ne&&(!Oe||$e)&&yt.setState((0,ke.Z)((0,ke.Z)({},dt),Ce))}},yt.scrollTo=function(We){yt.listRef.current.scrollTo(We)},yt}return(0,he.Z)(St,[{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,Ce=He.draggingNodeKey,Ne=He.activeKey,$e=He.dropLevelOffset,dt=He.dropContainerKey,Je=He.dropTargetKey,Tt=He.dropPosition,qt=He.dragOverNodeKey,yn=He.indent,rn=this.props,pn=rn.prefixCls,Fn=rn.className,kn=rn.style,oi=rn.showLine,ri=rn.focusable,Ti=rn.tabIndex,mi=Ti===void 0?0:Ti,Qi=rn.selectable,ir=rn.showIcon,fr=rn.icon,er=rn.switcherIcon,Mr=rn.draggable,qr=rn.checkable,di=rn.checkStrictly,xr=rn.disabled,zi=rn.motion,rt=rn.loadData,zr=rn.filterTreeNode,hr=rn.height,vo=rn.itemHeight,co=rn.virtual,yo=rn.titleRender,eo=rn.dropIndicatorRender,lo=rn.onContextMenu,ln=rn.onScroll,Ke=rn.direction,qe=rn.rootClassName,Xe=rn.rootStyle,wt=(0,ce.Z)(this.props,{aria:!0,data:!0}),At;return Mr&&((0,Be.Z)(Mr)==="object"?At=Mr:typeof Mr=="function"?At={nodeDraggable:Mr}:At={}),ee.createElement(oe.k.Provider,{value:{prefixCls:pn,selectable:Qi,showIcon:ir,icon:fr,switcherIcon:er,draggable:At,draggingNodeKey:Ce,checkable:qr,checkStrictly:di,disabled:xr,keyEntities:Oe,dropLevelOffset:$e,dropContainerKey:dt,dropTargetKey:Je,dropPosition:Tt,dragOverNodeKey:qt,indent:yn,direction:Ke,dropIndicatorRender:eo,loadData:rt,filterTreeNode:zr,titleRender:yo,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()(pn,Fn,qe,(nt={},(0,me.Z)(nt,"".concat(pn,"-show-line"),oi),(0,me.Z)(nt,"".concat(pn,"-focused"),Ie),(0,me.Z)(nt,"".concat(pn,"-active-focused"),Ne!==null),nt)),style:Xe},ee.createElement(hn,(0,Me.Z)({ref:this.listRef,prefixCls:pn,style:kn,data:We,disabled:xr,selectable:Qi,checkable:!!qr,motion:zi,dragging:Ce!==null,height:hr,itemHeight:vo,virtual:co,focusable:ri,focused:Ie,tabIndex:mi,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:lo,onScroll:ln},this.getTreeNodeRequiredProps(),wt))))}}],[{key:"getDerivedStateFromProps",value:function(nt,He){var Ie=He.prevProps,We={prevProps:nt};function Oe(ri){return!Ie&&ri in nt||Ie&&Ie[ri]!==nt[ri]}var Ce,Ne=He.fieldNames;if(Oe("fieldNames")&&(Ne=(0,Ze.w$)(nt.fieldNames),We.fieldNames=Ne),Oe("treeData")?Ce=nt.treeData:Oe("children")&&((0,z.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Ce=(0,Ze.zn)(nt.children)),Ce){We.treeData=Ce;var $e=(0,Ze.I8)(Ce,{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,Qt.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(ri){return Je[ri].key})}else!Ie&&nt.defaultExpandedKeys&&(We.expandedKeys=nt.autoExpandParent||nt.defaultExpandParent?(0,Qt.r7)(nt.defaultExpandedKeys,dt):nt.defaultExpandedKeys);if(We.expandedKeys||delete We.expandedKeys,Ce||We.expandedKeys){var Tt=(0,Ze.oH)(Ce||He.treeData,We.expandedKeys||He.expandedKeys,Ne);We.flattenNodes=Tt}if(nt.selectable&&(Oe("selectedKeys")?We.selectedKeys=(0,Qt.BT)(nt.selectedKeys,nt):!Ie&&nt.defaultSelectedKeys&&(We.selectedKeys=(0,Qt.BT)(nt.defaultSelectedKeys,nt))),nt.checkable){var qt;if(Oe("checkedKeys")?qt=(0,Qt.E6)(nt.checkedKeys)||{}:!Ie&&nt.defaultCheckedKeys?qt=(0,Qt.E6)(nt.defaultCheckedKeys)||{}:Ce&&(qt=(0,Qt.E6)(nt.checkedKeys)||{checkedKeys:He.checkedKeys,halfCheckedKeys:He.halfCheckedKeys}),qt){var yn=qt,rn=yn.checkedKeys,pn=rn===void 0?[]:rn,Fn=yn.halfCheckedKeys,kn=Fn===void 0?[]:Fn;if(!nt.checkStrictly){var oi=(0,bn.S)(pn,!0,dt);pn=oi.checkedKeys,kn=oi.halfCheckedKeys}We.checkedKeys=pn,We.halfCheckedKeys=kn}}return Oe("loadedKeys")&&(We.loadedKeys=nt.loadedKeys),We}}]),St}(ee.Component);Jt.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},Jt.TreeNode=De.Z;var dn=Jt,Lt=dn},35654:function(Ln,tn,Ee){"use strict";Ee.d(tn,{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(26390),me=Ee(80665),Be=Ee(51395),ke=Ee(59301),Pe=Ee(39417),Le=Ee(67841),he=Ee(71430),Se=null;function xe(ye,we){if(!ye)return[];var be=ye.slice(),Ae=be.indexOf(we);return Ae>=0&&be.splice(Ae,1),be}function ge(ye,we){var be=(ye||[]).slice();return be.indexOf(we)===-1&&be.push(we),be}function le(ye){return ye.split("-")}function ve(ye,we){var be=[],Ae=(0,Le.Z)(we,ye);function De(){var ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];ze.forEach(function(Ze){var Ye=Ze.key,Ge=Ze.children;be.push(Ye),De(Ge)})}return De(Ae.children),be}function de(ye){if(ye.parent){var we=le(ye.pos);return Number(we[we.length-1])===ye.parent.children.length-1}return!1}function ce(ye){var we=le(ye.pos);return Number(we[we.length-1])===0}function z(ye,we,be,Ae,De,ze,Ze,Ye,Ge,ft){var at,Pt=ye.clientX,tt=ye.clientY,vt=ye.target.getBoundingClientRect(),st=vt.top,jt=vt.height,lt=(ft==="rtl"?-1:1)*(((De==null?void 0:De.x)||0)-Pt),et=(lt-12)/Ae,ut=(0,Le.Z)(Ye,be.props.eventKey);if(tt<st+jt/2){var mt=Ze.findIndex(function(Lt){return Lt.key===ut.key}),_t=mt<=0?0:mt-1,gt=Ze[_t].key;ut=(0,Le.Z)(Ye,gt)}var Bt=ut.key,Ht=ut,hn=ut.key,Qt=0,bn=0;if(!Ge.includes(Bt))for(var Wt=0;Wt<et&&de(ut);Wt+=1)ut=ut.parent,bn+=1;var Kt=we.props.data,Jt=ut.node,dn=!0;return ce(ut)&&ut.level===0&&tt<st+jt/2&&ze({dragNode:Kt,dropNode:Jt,dropPosition:-1})&&ut.key===be.props.eventKey?Qt=-1:(Ht.children||[]).length&&Ge.includes(hn)?ze({dragNode:Kt,dropNode:Jt,dropPosition:0})?Qt=0:dn=!1:bn===0?et>-1.5?ze({dragNode:Kt,dropNode:Jt,dropPosition:1})?Qt=1:dn=!1:ze({dragNode:Kt,dropNode:Jt,dropPosition:0})?Qt=0:ze({dragNode:Kt,dropNode:Jt,dropPosition:1})?Qt=1:dn=!1:ze({dragNode:Kt,dropNode:Jt,dropPosition:1})?Qt=1:dn=!1,{dropPosition:Qt,dropLevelOffset:bn,dropTargetKey:ut.key,dropTargetPos:ut.pos,dragOverNodeKey:hn,dropContainerKey:Qt===0?null:((at=ut.parent)===null||at===void 0?void 0:at.key)||null,dropAllowed:dn}}function ee(ye,we){if(ye){var be=we.multiple;return be?ye.slice():ye.length?[ye[0]]:ye}}var oe=function(we){return we};function ie(ye,we){if(!ye)return[];var be=we||{},Ae=be.processProps,De=Ae===void 0?oe:Ae,ze=Array.isArray(ye)?ye:[ye];return ze.map(function(Ze){var Ye=Ze.children,Ge=_objectWithoutProperties(Ze,Se),ft=ie(Ye,we);return React.createElement(TreeNode,_extends({key:Ge.key},De(Ge)),ft)})}function se(ye){if(!ye)return null;var we;if(Array.isArray(ye))we={checkedKeys:ye,halfCheckedKeys:void 0};else if((0,me.Z)(ye)==="object")we={checkedKeys:ye.checked||void 0,halfCheckedKeys:ye.halfChecked||void 0};else return(0,Be.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return we}function ue(ye,we){var be=new Set;function Ae(De){if(!be.has(De)){var ze=(0,Le.Z)(we,De);if(ze){be.add(De);var Ze=ze.parent,Ye=ze.node;Ye.disabled||Ze&&Ae(Ze.key)}}}return(ye||[]).forEach(function(De){Ae(De)}),(0,Me.Z)(be)}},90782:function(Ln,tn,Ee){"use strict";Ee.d(tn,{S:function(){return he}});var Me=Ee(51395),me=Ee(67841);function Be(Se,xe){var ge=new Set;return Se.forEach(function(le){xe.has(le)||ge.add(le)}),ge}function ke(Se){var xe=Se||{},ge=xe.disabled,le=xe.disableCheckbox,ve=xe.checkable;return!!(ge||le)||ve===!1}function Pe(Se,xe,ge,le){for(var ve=new Set(Se),de=new Set,ce=0;ce<=ge;ce+=1){var z=xe.get(ce)||new Set;z.forEach(function(se){var ue=se.key,ye=se.node,we=se.children,be=we===void 0?[]:we;ve.has(ue)&&!le(ye)&&be.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,ye=se.node;if(!(le(ye)||!se.parent||ee.has(se.parent.key))){if(le(se.parent.node)){ee.add(ue.key);return}var we=!0,be=!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),!be&&(ze||de.has(De))&&(be=!0)}),we&&ve.add(ue.key),be&&de.add(ue.key),ee.add(ue.key)}})}return{checkedKeys:Array.from(ve),halfCheckedKeys:Array.from(Be(de,ve))}}function Le(Se,xe,ge,le,ve){for(var de=new Set(Se),ce=new Set(xe),z=0;z<=le;z+=1){var ee=ge.get(z)||new Set;ee.forEach(function(ue){var ye=ue.key,we=ue.node,be=ue.children,Ae=be===void 0?[]:be;!de.has(ye)&&!ce.has(ye)&&!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 ye=ue.parent,we=ue.node;if(!(ve(we)||!ue.parent||oe.has(ue.parent.key))){if(ve(ue.parent.node)){oe.add(ye.key);return}var be=!0,Ae=!1;(ye.children||[]).filter(function(De){return!ve(De.node)}).forEach(function(De){var ze=De.key,Ze=de.has(ze);be&&!Ze&&(be=!1),!Ae&&(Ze||ce.has(ze))&&(Ae=!0)}),be||de.delete(ye.key),Ae&&ce.add(ye.key),oe.add(ye.key)}})}return{checkedKeys:Array.from(de),halfCheckedKeys:Array.from(Be(ce,de))}}function he(Se,xe,ge,le){var ve=[],de;le?de=le:de=ke;var ce=new Set(Se.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,ye=z.get(ue);ye||(ye=new Set,z.set(ue,ye)),ye.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=Pe(ce,z,ee,de):oe=Le(ce,xe.halfCheckedKeys,z,ee,de),oe}},67841:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Me}});function Me(me,Be){return me[Be]}},71430:function(Ln,tn,Ee){"use strict";Ee.d(tn,{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(80665),me=Ee(26390),Be=Ee(57259),ke=Ee(19149),Pe=Ee(38298),Le=Ee(64002),he=Ee(51395),Se=Ee(67841),xe=["children"];function ge(ye,we){return"".concat(ye,"-").concat(we)}function le(ye){return ye&&ye.type&&ye.type.isTreeNode}function ve(ye,we){return ye!=null?ye:we}function de(ye){var we=ye||{},be=we.title,Ae=we._title,De=we.key,ze=we.children,Ze=be||"title";return{title:Ze,_title:Ae||[Ze],key:De||"key",children:ze||"children"}}function ce(ye,we){var be=new Map;function Ae(De){var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(De||[]).forEach(function(Ze){var Ye=Ze[we.key],Ge=Ze[we.children];warning(Ye!=null,"Tree node must have a certain key: [".concat(ze).concat(Ye,"]"));var ft=String(Ye);warning(!be.has(ft)||Ye===null||Ye===void 0,"Same 'key' exist in the Tree: ".concat(ft)),be.set(ft,!0),Ae(Ge,"".concat(ze).concat(ft," > "))})}Ae(ye)}function z(ye){function we(be){var Ae=(0,Pe.Z)(be);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,Ye=Ze.children,Ge=(0,ke.Z)(Ze,xe),ft=(0,Be.Z)({key:ze},Ge),at=we(Ye);return at.length&&(ft.children=at),ft}).filter(function(De){return De})}return we(ye)}function ee(ye,we,be){var Ae=de(be),De=Ae._title,ze=Ae.key,Ze=Ae.children,Ye=new Set(we===!0?[]:we),Ge=[];function ft(at){var Pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return at.map(function(tt,vt){for(var st=ge(Pt?Pt.pos:"0",vt),jt=ve(tt[ze],st),lt,et=0;et<De.length;et+=1){var ut=De[et];if(tt[ut]!==void 0){lt=tt[ut];break}}var mt=(0,Be.Z)((0,Be.Z)({},(0,Le.Z)(tt,[].concat((0,me.Z)(De),[ze,Ze]))),{},{title:lt,key:jt,parent:Pt,pos:st,children:null,data:tt,isStart:[].concat((0,me.Z)(Pt?Pt.isStart:[]),[vt===0]),isEnd:[].concat((0,me.Z)(Pt?Pt.isEnd:[]),[vt===at.length-1])});return Ge.push(mt),we===!0||Ye.has(jt)?mt.children=ft(tt[Ze]||[],mt):mt.children=[],mt})}return ft(ye),Ge}function oe(ye,we,be){var Ae={};(0,Me.Z)(be)==="object"?Ae=be:Ae={externalGetKey:be},Ae=Ae||{};var De=Ae,ze=De.childrenPropName,Ze=De.externalGetKey,Ye=De.fieldNames,Ge=de(Ye),ft=Ge.key,at=Ge.children,Pt=ze||at,tt;Ze?typeof Ze=="string"?tt=function(jt){return jt[Ze]}:typeof Ze=="function"&&(tt=function(jt){return Ze(jt)}):tt=function(jt,lt){return ve(jt[ft],lt)};function vt(st,jt,lt,et){var ut=st?st[Pt]:ye,mt=st?ge(lt.pos,jt):"0",_t=st?[].concat((0,me.Z)(et),[st]):[];if(st){var gt=tt(st,mt),Bt={node:st,index:jt,pos:mt,key:gt,parentPos:lt.node?lt.pos:null,level:lt.level+1,nodes:_t};we(Bt)}ut&&ut.forEach(function(Ht,hn){vt(Ht,hn,{node:st,pos:mt,level:lt?lt.level+1:-1},_t)})}vt(null)}function ie(ye){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},be=we.initWrapper,Ae=we.processEntity,De=we.onProcessFinished,ze=we.externalGetKey,Ze=we.childrenPropName,Ye=we.fieldNames,Ge=arguments.length>2?arguments[2]:void 0,ft=ze||Ge,at={},Pt={},tt={posEntities:at,keyEntities:Pt};return be&&(tt=be(tt)||tt),oe(ye,function(vt){var st=vt.node,jt=vt.index,lt=vt.pos,et=vt.key,ut=vt.parentPos,mt=vt.level,_t=vt.nodes,gt={node:st,nodes:_t,index:jt,key:et,pos:lt,level:mt},Bt=ve(et,lt);at[lt]=gt,Pt[Bt]=gt,gt.parent=at[ut],gt.parent&&(gt.parent.children=gt.parent.children||[],gt.parent.children.push(gt)),Ae&&Ae(gt,tt)},{externalGetKey:ft,childrenPropName:Ze,fieldNames:Ye}),De&&De(tt),tt}function se(ye,we){var be=we.expandedKeys,Ae=we.selectedKeys,De=we.loadedKeys,ze=we.loadingKeys,Ze=we.checkedKeys,Ye=we.halfCheckedKeys,Ge=we.dragOverNodeKey,ft=we.dropPosition,at=we.keyEntities,Pt=(0,Se.Z)(at,ye),tt={eventKey:ye,expanded:be.indexOf(ye)!==-1,selected:Ae.indexOf(ye)!==-1,loaded:De.indexOf(ye)!==-1,loading:ze.indexOf(ye)!==-1,checked:Ze.indexOf(ye)!==-1,halfChecked:Ye.indexOf(ye)!==-1,pos:String(Pt?Pt.pos:""),dragOver:Ge===ye&&ft===0,dragOverGapTop:Ge===ye&&ft===-1,dragOverGapBottom:Ge===ye&&ft===1};return tt}function ue(ye){var we=ye.data,be=ye.expanded,Ae=ye.selected,De=ye.checked,ze=ye.loaded,Ze=ye.loading,Ye=ye.halfChecked,Ge=ye.dragOver,ft=ye.dragOverGapTop,at=ye.dragOverGapBottom,Pt=ye.pos,tt=ye.active,vt=ye.eventKey,st=(0,Be.Z)((0,Be.Z)({},we),{},{expanded:be,selected:Ae,checked:De,loaded:ze,loading:Ze,halfChecked:Ye,dragOver:Ge,dragOverGapTop:ft,dragOverGapBottom:at,pos:Pt,active:tt,key:vt});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`."),ye}}),st}},8178:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return me}});var Me=Ee(4676);function me(Be,ke,Pe,Le){var he=Me.unstable_batchedUpdates?function(xe){Me.unstable_batchedUpdates(Pe,xe)}:Pe;return Be!=null&&Be.addEventListener&&Be.addEventListener(ke,he,Le),{remove:function(){Be!=null&&Be.removeEventListener&&Be.removeEventListener(ke,he,Le)}}}},21783:function(Ln,tn,Ee){"use strict";Ee.d(tn,{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 Pe(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:Pe(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 Se(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)}}},24387:function(Ln,tn,Ee){"use strict";Ee.d(tn,{G:function(){return ke}});var Me=Ee(87746),me=function(Le){if((0,Me.Z)()&&window.document.documentElement){var he=Array.isArray(Le)?Le:[Le],Se=window.document.documentElement;return he.some(function(xe){return xe in Se.style})}return!1},Be=function(Le,he){if(!me(Le))return!1;var Se=document.createElement("div"),xe=Se.style[Le];return Se.style[Le]=he,Se.style[Le]!==xe};function ke(Pe,Le){return!Array.isArray(Pe)&&Le!==void 0?Be(Pe,Le):me(Pe)}},21881:function(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return dn}});var Me=Ee(5891),me=Ee(80665),Be=Ee(57259),ke=Ee(80962),Pe=Ee(29043),Le=Ee(19149),he=Ee(92310),Se=Ee.n(he),xe=Ee(29301),ge=Ee(80764),le=Ee(28800),ve=Ee(59301),de=Ee(4676),ce=ve.forwardRef(function(Lt,pt){var Rt=Lt.height,St=Lt.offsetY,yt=Lt.offsetX,nt=Lt.children,He=Lt.prefixCls,Ie=Lt.onInnerResize,We=Lt.innerProps,Oe=Lt.rtl,Ce=Lt.extra,Ne={},$e={display:"flex",flexDirection:"column"};return St!==void 0&&(Ne={height:Rt,position:"relative",overflow:"hidden"},$e=(0,Be.Z)((0,Be.Z)({},$e),{},(0,ke.Z)((0,ke.Z)((0,ke.Z)((0,ke.Z)((0,ke.Z)({transform:"translateY(".concat(St,"px)")},Oe?"marginRight":"marginLeft",-yt),"position","absolute"),"left",0),"right",0),"top",0))),ve.createElement("div",{style:Ne},ve.createElement(xe.Z,{onResize:function(Je){var Tt=Je.offsetHeight;Tt&&Ie&&Ie()}},ve.createElement("div",(0,Me.Z)({style:$e,className:Se()((0,ke.Z)({},"".concat(He,"-holder-inner"),He)),ref:pt},We),nt,Ce)))});ce.displayName="Filler";var z=ce;function ee(Lt){var pt=Lt.children,Rt=Lt.setRef,St=ve.useCallback(function(yt){Rt(yt)},[]);return ve.cloneElement(pt,{ref:St})}function oe(Lt,pt,Rt,St,yt,nt,He,Ie){var We=Ie.getKey;return Lt.slice(pt,Rt+1).map(function(Oe,Ce){var Ne=pt+Ce,$e=He(Oe,Ne,{style:{width:St},offsetX:yt}),dt=We(Oe);return ve.createElement(ee,{key:dt,setRef:function(Tt){return nt(Oe,Tt)}},$e)})}function ie(Lt,pt,Rt,St){var yt=Rt-Lt,nt=pt-Rt,He=Math.min(yt,nt)*2;if(St<=He){var Ie=Math.floor(St/2);return St%2?Rt+Ie+1:Rt-Ie}return yt>nt?Rt-(St-nt):Rt+(St-yt)}function se(Lt,pt,Rt){var St=Lt.length,yt=pt.length,nt,He;if(St===0&&yt===0)return null;St<yt?(nt=Lt,He=pt):(nt=pt,He=Lt);var Ie={__EMPTY_ITEM__:!0};function We(Je){return Je!==void 0?Rt(Je):Ie}for(var Oe=null,Ce=Math.abs(St-yt)!==1,Ne=0;Ne<He.length;Ne+=1){var $e=We(nt[Ne]),dt=We(He[Ne]);if($e!==dt){Oe=Ne,Ce=Ce||$e!==We(He[Ne+1]);break}}return Oe===null?null:{index:Oe,multiple:Ce}}function ue(Lt,pt,Rt){var St=ve.useState(Lt),yt=(0,Pe.Z)(St,2),nt=yt[0],He=yt[1],Ie=ve.useState(null),We=(0,Pe.Z)(Ie,2),Oe=We[0],Ce=We[1];return ve.useEffect(function(){var Ne=se(nt||[],Lt||[],pt);(Ne==null?void 0:Ne.index)!==void 0&&(Rt==null||Rt(Ne.index),Ce(Lt[Ne.index])),He(Lt)},[Lt]),[Oe]}var ye=Ee(23073),we=(typeof navigator=="undefined"?"undefined":(0,me.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),be=we,Ae=function(Lt,pt,Rt,St){var yt=(0,ve.useRef)(!1),nt=(0,ve.useRef)(null);function He(){clearTimeout(nt.current),yt.current=!0,nt.current=setTimeout(function(){yt.current=!1},50)}var Ie=(0,ve.useRef)({top:Lt,bottom:pt,left:Rt,right:St});return Ie.current.top=Lt,Ie.current.bottom=pt,Ie.current.left=Rt,Ie.current.right=St,function(We,Oe){var Ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ne=We?Oe<0&&Ie.current.left||Oe>0&&Ie.current.right:Oe<0&&Ie.current.top||Oe>0&&Ie.current.bottom;return Ce&&Ne?(clearTimeout(nt.current),yt.current=!1):(!Ne||yt.current)&&He(),!yt.current&&Ne}};function De(Lt,pt,Rt,St,yt,nt,He){var Ie=(0,ve.useRef)(0),We=(0,ve.useRef)(null),Oe=(0,ve.useRef)(null),Ce=(0,ve.useRef)(!1),Ne=Ae(pt,Rt,St,yt);function $e(rn,pn){if(ye.Z.cancel(We.current),!Ne(!1,pn)){var Fn=rn;if(!Fn._virtualHandled)Fn._virtualHandled=!0;else return;Ie.current+=pn,Oe.current=pn,be||Fn.preventDefault(),We.current=(0,ye.Z)(function(){var kn=Ce.current?10:1;He(Ie.current*kn,!1),Ie.current=0})}}function dt(rn,pn){He(pn,!0),be||rn.preventDefault()}var Je=(0,ve.useRef)(null),Tt=(0,ve.useRef)(null);function qt(rn){if(Lt){ye.Z.cancel(Tt.current),Tt.current=(0,ye.Z)(function(){Je.current=null},2);var pn=rn.deltaX,Fn=rn.deltaY,kn=rn.shiftKey,oi=pn,ri=Fn;(Je.current==="sx"||!Je.current&&kn&&Fn&&!pn)&&(oi=Fn,ri=0,Je.current="sx");var Ti=Math.abs(oi),mi=Math.abs(ri);Je.current===null&&(Je.current=nt&&Ti>mi?"x":"y"),Je.current==="y"?$e(rn,ri):dt(rn,oi)}}function yn(rn){Lt&&(Ce.current=rn.detail===Oe.current)}return[qt,yn]}function ze(Lt,pt,Rt,St){var yt=ve.useMemo(function(){return[new Map,[]]},[Lt,Rt.id,St]),nt=(0,Pe.Z)(yt,2),He=nt[0],Ie=nt[1],We=function(Ce){var Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ce,$e=He.get(Ce),dt=He.get(Ne);if($e===void 0||dt===void 0)for(var Je=Lt.length,Tt=Ie.length;Tt<Je;Tt+=1){var qt,yn=Lt[Tt],rn=pt(yn);He.set(rn,Tt);var pn=(qt=Rt.get(rn))!==null&&qt!==void 0?qt:St;if(Ie[Tt]=(Ie[Tt-1]||0)+pn,rn===Ce&&($e=Tt),rn===Ne&&(dt=Tt),$e!==void 0&&dt!==void 0)break}return{top:Ie[$e-1]||0,bottom:Ie[dt]}};return We}var Ze=Ee(85899),Ye=Ee(79545),Ge=Ee(68550),ft=function(){function Lt(){(0,Ye.Z)(this,Lt),(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,Ge.Z)(Lt,[{key:"set",value:function(Rt,St){this.maps[Rt]=St,this.id+=1,this.diffKeys.add(Rt)}},{key:"get",value:function(Rt){return this.maps[Rt]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),Lt}(),at=ft;function Pt(Lt){var pt=parseFloat(Lt);return isNaN(pt)?0:pt}function tt(Lt,pt,Rt){var St=ve.useState(0),yt=(0,Pe.Z)(St,2),nt=yt[0],He=yt[1],Ie=(0,ve.useRef)(new Map),We=(0,ve.useRef)(new at),Oe=(0,ve.useRef)(0);function Ce(){Oe.current+=1}function Ne(){var dt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Ce();var Je=function(){var yn=!1;Ie.current.forEach(function(rn,pn){if(rn&&rn.offsetParent){var Fn=(0,Ze.ZP)(rn),kn=Fn.offsetHeight,oi=getComputedStyle(Fn),ri=oi.marginTop,Ti=oi.marginBottom,mi=Pt(ri),Qi=Pt(Ti),ir=kn+mi+Qi;We.current.get(pn)!==ir&&(We.current.set(pn,ir),yn=!0)}}),yn&&He(function(rn){return rn+1})};if(dt)Je();else{Oe.current+=1;var Tt=Oe.current;Promise.resolve().then(function(){Tt===Oe.current&&Je()})}}function $e(dt,Je){var Tt=Lt(dt),qt=Ie.current.get(Tt);Je?(Ie.current.set(Tt,Je),Ne()):Ie.current.delete(Tt),!qt!=!Je&&(Je?pt==null||pt(dt):Rt==null||Rt(dt))}return(0,ve.useEffect)(function(){return Ce},[]),[$e,Ne,We.current,nt]}var vt=14/15;function st(Lt,pt,Rt){var St=(0,ve.useRef)(!1),yt=(0,ve.useRef)(0),nt=(0,ve.useRef)(0),He=(0,ve.useRef)(null),Ie=(0,ve.useRef)(null),We,Oe=function(dt){if(St.current){var Je=Math.ceil(dt.touches[0].pageX),Tt=Math.ceil(dt.touches[0].pageY),qt=yt.current-Je,yn=nt.current-Tt,rn=Math.abs(qt)>Math.abs(yn);rn?yt.current=Je:nt.current=Tt;var pn=Rt(rn,rn?qt:yn,!1,dt);pn&&dt.preventDefault(),clearInterval(Ie.current),pn&&(Ie.current=setInterval(function(){rn?qt*=vt:yn*=vt;var Fn=Math.floor(rn?qt:yn);(!Rt(rn,Fn,!0)||Math.abs(Fn)<=.1)&&clearInterval(Ie.current)},16))}},Ce=function(){St.current=!1,We()},Ne=function(dt){We(),dt.touches.length===1&&!St.current&&(St.current=!0,yt.current=Math.ceil(dt.touches[0].pageX),nt.current=Math.ceil(dt.touches[0].pageY),He.current=dt.target,He.current.addEventListener("touchmove",Oe,{passive:!1}),He.current.addEventListener("touchend",Ce,{passive:!0}))};We=function(){He.current&&(He.current.removeEventListener("touchmove",Oe),He.current.removeEventListener("touchend",Ce))},(0,le.Z)(function(){return Lt&&pt.current.addEventListener("touchstart",Ne,{passive:!0}),function(){var $e;($e=pt.current)===null||$e===void 0||$e.removeEventListener("touchstart",Ne),We(),clearInterval(Ie.current)}},[Lt])}function jt(Lt){return Math.floor(Math.pow(Lt,.5))}function lt(Lt,pt){var Rt="touches"in Lt?Lt.touches[0]:Lt;return Rt[pt?"pageX":"pageY"]-window[pt?"scrollX":"scrollY"]}function et(Lt,pt,Rt){ve.useEffect(function(){var St=pt.current;if(Lt&&St){var yt=!1,nt,He,Ie=function(){ye.Z.cancel(nt)},We=function $e(){Ie(),nt=(0,ye.Z)(function(){Rt(He),$e()})},Oe=function(dt){var Je=dt;Je._virtualHandled||(Je._virtualHandled=!0,yt=!0)},Ce=function(){yt=!1,Ie()},Ne=function(dt){if(yt){var Je=lt(dt,!1),Tt=St.getBoundingClientRect(),qt=Tt.top,yn=Tt.bottom;if(Je<=qt){var rn=qt-Je;He=-jt(rn),We()}else if(Je>=yn){var pn=Je-yn;He=jt(pn),We()}else Ie()}};return St.addEventListener("mousedown",Oe),St.ownerDocument.addEventListener("mouseup",Ce),St.ownerDocument.addEventListener("mousemove",Ne),function(){St.removeEventListener("mousedown",Oe),St.ownerDocument.removeEventListener("mouseup",Ce),St.ownerDocument.removeEventListener("mousemove",Ne),Ie()}}},[Lt])}var ut=10;function mt(Lt,pt,Rt,St,yt,nt,He,Ie){var We=ve.useRef(),Oe=ve.useState(null),Ce=(0,Pe.Z)(Oe,2),Ne=Ce[0],$e=Ce[1];return(0,le.Z)(function(){if(Ne&&Ne.times<ut){if(!Lt.current){$e(function(rt){return(0,Be.Z)({},rt)});return}nt();var dt=Ne.targetAlign,Je=Ne.originAlign,Tt=Ne.index,qt=Ne.offset,yn=Lt.current.clientHeight,rn=!1,pn=dt,Fn=null;if(yn){for(var kn=dt||Je,oi=0,ri=0,Ti=0,mi=Math.min(pt.length-1,Tt),Qi=0;Qi<=mi;Qi+=1){var ir=yt(pt[Qi]);ri=oi;var fr=Rt.get(ir);Ti=ri+(fr===void 0?St:fr),oi=Ti}for(var er=kn==="top"?qt:yn-qt,Mr=mi;Mr>=0;Mr-=1){var qr=yt(pt[Mr]),di=Rt.get(qr);if(di===void 0){rn=!0;break}if(er-=di,er<=0)break}switch(kn){case"top":Fn=ri-qt;break;case"bottom":Fn=Ti-yn+qt;break;default:{var xr=Lt.current.scrollTop,zi=xr+yn;ri<xr?pn="top":Ti>zi&&(pn="bottom")}}Fn!==null&&He(Fn),Fn!==Ne.lastTop&&(rn=!0)}rn&&$e((0,Be.Z)((0,Be.Z)({},Ne),{},{times:Ne.times+1,targetAlign:pn,lastTop:Fn}))}},[Ne,Lt.current]),function(dt){if(dt==null){Ie();return}if(ye.Z.cancel(We.current),typeof dt=="number")He(dt);else if(dt&&(0,me.Z)(dt)==="object"){var Je,Tt=dt.align;"index"in dt?Je=dt.index:Je=pt.findIndex(function(rn){return yt(rn)===dt.key});var qt=dt.offset,yn=qt===void 0?0:qt;$e({times:0,index:Je,offset:yn,originAlign:Tt})}}}var _t=ve.forwardRef(function(Lt,pt){var Rt=Lt.prefixCls,St=Lt.rtl,yt=Lt.scrollOffset,nt=Lt.scrollRange,He=Lt.onStartMove,Ie=Lt.onStopMove,We=Lt.onScroll,Oe=Lt.horizontal,Ce=Lt.spinSize,Ne=Lt.containerSize,$e=Lt.style,dt=Lt.thumbStyle,Je=ve.useState(!1),Tt=(0,Pe.Z)(Je,2),qt=Tt[0],yn=Tt[1],rn=ve.useState(null),pn=(0,Pe.Z)(rn,2),Fn=pn[0],kn=pn[1],oi=ve.useState(null),ri=(0,Pe.Z)(oi,2),Ti=ri[0],mi=ri[1],Qi=!St,ir=ve.useRef(),fr=ve.useRef(),er=ve.useState(!1),Mr=(0,Pe.Z)(er,2),qr=Mr[0],di=Mr[1],xr=ve.useRef(),zi=function(){clearTimeout(xr.current),di(!0),xr.current=setTimeout(function(){di(!1)},3e3)},rt=nt-Ne||0,zr=Ne-Ce||0,hr=ve.useMemo(function(){if(yt===0||rt===0)return 0;var Xe=yt/rt;return Xe*zr},[yt,rt,zr]),vo=function(wt){wt.stopPropagation(),wt.preventDefault()},co=ve.useRef({top:hr,dragging:qt,pageY:Fn,startTop:Ti});co.current={top:hr,dragging:qt,pageY:Fn,startTop:Ti};var yo=function(wt){yn(!0),kn(lt(wt,Oe)),mi(co.current.top),He(),wt.stopPropagation(),wt.preventDefault()};ve.useEffect(function(){var Xe=function(bt){bt.preventDefault()},wt=ir.current,At=fr.current;return wt.addEventListener("touchstart",Xe,{passive:!1}),At.addEventListener("touchstart",yo,{passive:!1}),function(){wt.removeEventListener("touchstart",Xe),At.removeEventListener("touchstart",yo)}},[]);var eo=ve.useRef();eo.current=rt;var lo=ve.useRef();lo.current=zr,ve.useEffect(function(){if(qt){var Xe,wt=function(bt){var gn=co.current,En=gn.dragging,Un=gn.pageY,Pn=gn.startTop;ye.Z.cancel(Xe);var zt=ir.current.getBoundingClientRect(),Yt=Ne/(Oe?zt.width:zt.height);if(En){var Cn=(lt(bt,Oe)-Un)*Yt,An=Pn;!Qi&&Oe?An-=Cn:An+=Cn;var Vt=eo.current,an=lo.current,Bn=an?An/an:0,Nn=Math.ceil(Bn*Vt);Nn=Math.max(Nn,0),Nn=Math.min(Nn,Vt),Xe=(0,ye.Z)(function(){We(Nn,Oe)})}},At=function(){yn(!1),Ie()};return window.addEventListener("mousemove",wt,{passive:!0}),window.addEventListener("touchmove",wt,{passive:!0}),window.addEventListener("mouseup",At,{passive:!0}),window.addEventListener("touchend",At,{passive:!0}),function(){window.removeEventListener("mousemove",wt),window.removeEventListener("touchmove",wt),window.removeEventListener("mouseup",At),window.removeEventListener("touchend",At),ye.Z.cancel(Xe)}}},[qt]),ve.useEffect(function(){return zi(),function(){clearTimeout(xr.current)}},[yt]),ve.useImperativeHandle(pt,function(){return{delayHidden:zi}});var ln="".concat(Rt,"-scrollbar"),Ke={position:"absolute",visibility:qr?null:"hidden"},qe={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Oe?(Ke.height=8,Ke.left=0,Ke.right=0,Ke.bottom=0,qe.height="100%",qe.width=Ce,Qi?qe.left=hr:qe.right=hr):(Ke.width=8,Ke.top=0,Ke.bottom=0,Qi?Ke.right=0:Ke.left=0,qe.width="100%",qe.height=Ce,qe.top=hr),ve.createElement("div",{ref:ir,className:Se()(ln,(0,ke.Z)((0,ke.Z)((0,ke.Z)({},"".concat(ln,"-horizontal"),Oe),"".concat(ln,"-vertical"),!Oe),"".concat(ln,"-visible"),qr)),style:(0,Be.Z)((0,Be.Z)({},Ke),$e),onMouseDown:vo,onMouseMove:zi},ve.createElement("div",{ref:fr,className:Se()("".concat(ln,"-thumb"),(0,ke.Z)({},"".concat(ln,"-thumb-moving"),qt)),style:(0,Be.Z)((0,Be.Z)({},qe),dt),onMouseDown:yo}))}),gt=_t,Bt=20;function Ht(){var Lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Rt=Lt/pt*Lt;return isNaN(Rt)&&(Rt=0),Rt=Math.max(Rt,Bt),Math.floor(Rt)}var hn=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],Qt=[],bn={overflowY:"auto",overflowAnchor:"none"};function Wt(Lt,pt){var Rt=Lt.prefixCls,St=Rt===void 0?"rc-virtual-list":Rt,yt=Lt.className,nt=Lt.height,He=Lt.itemHeight,Ie=Lt.fullHeight,We=Ie===void 0?!0:Ie,Oe=Lt.style,Ce=Lt.data,Ne=Lt.children,$e=Lt.itemKey,dt=Lt.virtual,Je=Lt.direction,Tt=Lt.scrollWidth,qt=Lt.component,yn=qt===void 0?"div":qt,rn=Lt.onScroll,pn=Lt.onVirtualScroll,Fn=Lt.onVisibleChange,kn=Lt.innerProps,oi=Lt.extraRender,ri=Lt.styles,Ti=(0,Le.Z)(Lt,hn),mi=ve.useCallback(function(yr){return typeof $e=="function"?$e(yr):yr==null?void 0:yr[$e]},[$e]),Qi=tt(mi,null,null),ir=(0,Pe.Z)(Qi,4),fr=ir[0],er=ir[1],Mr=ir[2],qr=ir[3],di=!!(dt!==!1&&nt&&He),xr=ve.useMemo(function(){return Object.values(Mr.maps).reduce(function(yr,tr){return yr+tr},0)},[Mr.id,Mr.maps]),zi=di&&Ce&&(Math.max(He*Ce.length,xr)>nt||!!Tt),rt=Je==="rtl",zr=Se()(St,(0,ke.Z)({},"".concat(St,"-rtl"),rt),yt),hr=Ce||Qt,vo=(0,ve.useRef)(),co=(0,ve.useRef)(),yo=(0,ve.useRef)(),eo=(0,ve.useState)(0),lo=(0,Pe.Z)(eo,2),ln=lo[0],Ke=lo[1],qe=(0,ve.useState)(0),Xe=(0,Pe.Z)(qe,2),wt=Xe[0],At=Xe[1],Nt=(0,ve.useState)(!1),bt=(0,Pe.Z)(Nt,2),gn=bt[0],En=bt[1],Un=function(){En(!0)},Pn=function(){En(!1)},zt={getKey:mi};function Yt(yr){Ke(function(tr){var Hr;typeof yr=="function"?Hr=yr(tr):Hr=yr;var Po=Wi(Hr);return vo.current.scrollTop=Po,Po})}var Cn=(0,ve.useRef)({start:0,end:hr.length}),An=(0,ve.useRef)(),Vt=ue(hr,mi),an=(0,Pe.Z)(Vt,1),Bn=an[0];An.current=Bn;var Nn=ve.useMemo(function(){if(!di)return{scrollHeight:void 0,start:0,end:hr.length-1,offset:void 0};if(!zi){var yr;return{scrollHeight:((yr=co.current)===null||yr===void 0?void 0:yr.offsetHeight)||0,start:0,end:hr.length-1,offset:void 0}}for(var tr=0,Hr,Po,Tr,Io=hr.length,qi=0;qi<Io;qi+=1){var Ui=hr[qi],rr=mi(Ui),Yn=Mr.get(rr),Vr=tr+(Yn===void 0?He:Yn);Vr>=ln&&Hr===void 0&&(Hr=qi,Po=tr),Vr>ln+nt&&Tr===void 0&&(Tr=qi),tr=Vr}return Hr===void 0&&(Hr=0,Po=0,Tr=Math.ceil(nt/He)),Tr===void 0&&(Tr=hr.length-1),Tr=Math.min(Tr+1,hr.length-1),{scrollHeight:tr,start:Hr,end:Tr,offset:Po}},[zi,di,ln,hr,qr,nt]),qn=Nn.scrollHeight,Gn=Nn.start,Jn=Nn.end,Rn=Nn.offset;Cn.current.start=Gn,Cn.current.end=Jn,ve.useLayoutEffect(function(){var yr=Mr.getRecord();if(yr.size===1){var tr=Array.from(yr)[0],Hr=mi(hr[Gn]);if(Hr===tr){var Po=Mr.get(tr),Tr=Po-He;Yt(function(Io){return Io+Tr})}}Mr.resetRecord()},[qn]);var li=ve.useState({width:0,height:nt}),Mi=(0,Pe.Z)(li,2),zn=Mi[0],si=Mi[1],Hi=function(tr){si({width:tr.offsetWidth,height:tr.offsetHeight})},ur=(0,ve.useRef)(),Ai=(0,ve.useRef)(),un=ve.useMemo(function(){return Ht(zn.width,Tt)},[zn.width,Tt]),ai=ve.useMemo(function(){return Ht(zn.height,qn)},[zn.height,qn]),wi=qn-nt,fi=(0,ve.useRef)(wi);fi.current=wi;function Wi(yr){var tr=yr;return Number.isNaN(fi.current)||(tr=Math.min(tr,fi.current)),tr=Math.max(tr,0),tr}var Ni=ln<=0,lr=ln>=wi,Fi=wt<=0,$i=wt>=Tt,Lr=Ae(Ni,lr,Fi,$i),On=function(){return{x:rt?-wt:wt,y:ln}},Kr=(0,ve.useRef)(On()),In=(0,ge.useEvent)(function(yr){if(pn){var tr=(0,Be.Z)((0,Be.Z)({},On()),yr);(Kr.current.x!==tr.x||Kr.current.y!==tr.y)&&(pn(tr),Kr.current=tr)}});function br(yr,tr){var Hr=yr;tr?((0,de.flushSync)(function(){At(Hr)}),In()):Yt(Hr)}function xo(yr){var tr=yr.currentTarget.scrollTop;tr!==ln&&Yt(tr),rn==null||rn(yr),In()}var Cr=function(tr){var Hr=tr,Po=Tt?Tt-zn.width:0;return Hr=Math.max(Hr,0),Hr=Math.min(Hr,Po),Hr},Fo=(0,ge.useEvent)(function(yr,tr){tr?((0,de.flushSync)(function(){At(function(Hr){var Po=Hr+(rt?-yr:yr);return Cr(Po)})}),In()):Yt(function(Hr){var Po=Hr+yr;return Po})}),oo=De(di,Ni,lr,Fi,$i,!!Tt,Fo),Ki=(0,Pe.Z)(oo,2),Ji=Ki[0],pr=Ki[1];st(di,vo,function(yr,tr,Hr,Po){var Tr=Po;return Lr(yr,tr,Hr)?!1:!Tr||!Tr._virtualHandled?(Tr&&(Tr._virtualHandled=!0),Ji({preventDefault:function(){},deltaX:yr?tr:0,deltaY:yr?0:tr}),!0):!1}),et(zi,vo,function(yr){Yt(function(tr){return tr+yr})}),(0,le.Z)(function(){function yr(Hr){var Po=Ni&&Hr.detail<0,Tr=lr&&Hr.detail>0;di&&!Po&&!Tr&&Hr.preventDefault()}var tr=vo.current;return tr.addEventListener("wheel",Ji,{passive:!1}),tr.addEventListener("DOMMouseScroll",pr,{passive:!0}),tr.addEventListener("MozMousePixelScroll",yr,{passive:!1}),function(){tr.removeEventListener("wheel",Ji),tr.removeEventListener("DOMMouseScroll",pr),tr.removeEventListener("MozMousePixelScroll",yr)}},[di,Ni,lr]),(0,le.Z)(function(){if(Tt){var yr=Cr(wt);At(yr),In({x:yr})}},[zn.width,Tt]);var kr=function(){var tr,Hr;(tr=ur.current)===null||tr===void 0||tr.delayHidden(),(Hr=Ai.current)===null||Hr===void 0||Hr.delayHidden()},hi=mt(vo,hr,Mr,He,mi,function(){return er(!0)},Yt,kr);ve.useImperativeHandle(pt,function(){return{nativeElement:yo.current,getScrollInfo:On,scrollTo:function(tr){function Hr(Po){return Po&&(0,me.Z)(Po)==="object"&&("left"in Po||"top"in Po)}Hr(tr)?(tr.left!==void 0&&At(Cr(tr.left)),hi(tr.top)):hi(tr)}}}),(0,le.Z)(function(){if(Fn){var yr=hr.slice(Gn,Jn+1);Fn(yr,hr)}},[Gn,Jn,hr]);var kt=ze(hr,mi,Mr,He),Pr=oi==null?void 0:oi({start:Gn,end:Jn,virtual:zi,offsetX:wt,offsetY:Rn,rtl:rt,getSize:kt}),_o=oe(hr,Gn,Jn,Tt,wt,fr,Ne,zt),Oo=null;nt&&(Oo=(0,Be.Z)((0,ke.Z)({},We?"height":"maxHeight",nt),bn),di&&(Oo.overflowY="hidden",Tt&&(Oo.overflowX="hidden"),gn&&(Oo.pointerEvents="none")));var wo={};return rt&&(wo.dir="rtl"),ve.createElement("div",(0,Me.Z)({ref:yo,style:(0,Be.Z)((0,Be.Z)({},Oe),{},{position:"relative"}),className:zr},wo,Ti),ve.createElement(xe.Z,{onResize:Hi},ve.createElement(yn,{className:"".concat(St,"-holder"),style:Oo,ref:vo,onScroll:xo,onMouseEnter:kr},ve.createElement(z,{prefixCls:St,height:qn,offsetX:wt,offsetY:Rn,scrollWidth:Tt,onInnerResize:er,ref:co,innerProps:kn,rtl:rt,extra:Pr},_o))),zi&&qn>nt&&ve.createElement(gt,{ref:ur,prefixCls:St,scrollOffset:ln,scrollRange:qn,rtl:rt,onScroll:br,onStartMove:Un,onStopMove:Pn,spinSize:ai,containerSize:zn.height,style:ri==null?void 0:ri.verticalScrollBar,thumbStyle:ri==null?void 0:ri.verticalScrollBarThumb}),zi&&Tt>zn.width&&ve.createElement(gt,{ref:Ai,prefixCls:St,scrollOffset:wt,scrollRange:Tt,rtl:rt,onScroll:br,onStartMove:Un,onStopMove:Pn,spinSize:un,containerSize:zn.width,horizontal:!0,style:ri==null?void 0:ri.horizontalScrollBar,thumbStyle:ri==null?void 0:ri.horizontalScrollBarThumb}))}var Kt=ve.forwardRef(Wt);Kt.displayName="List";var Jt=Kt,dn=Jt},7062:function(Ln,tn,Ee){var Me=Ee(19637),me=Ee(97573),Be=[Ee(96627)];Ln.exports=Me.createStore(me,Be)},96627:function(Ln,tn,Ee){Ln.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(Ln){return Ln<10?"0"+Ln:Ln}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(Ln){return rx_escapable.lastIndex=0,rx_escapable.test(Ln)?'"'+Ln.replace(rx_escapable,function(tn){var Ee=meta[tn];return typeof Ee=="string"?Ee:"\\u"+("0000"+tn.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+Ln+'"'}function str(Ln,tn){var Ee,Me,me,Be,ke=gap,Pe,Le=tn[Ln];switch(Le&&typeof Le=="object"&&typeof Le.toJSON=="function"&&(Le=Le.toJSON(Ln)),typeof rep=="function"&&(Le=rep.call(tn,Ln,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,Pe=[],Object.prototype.toString.apply(Le)==="[object Array]"){for(Be=Le.length,Ee=0;Ee<Be;Ee+=1)Pe[Ee]=str(Ee,Le)||"null";return me=Pe.length===0?"[]":gap?`[
|
|
|
`+gap+Pe.join(`,
|
|
|
`+gap)+`
|
|
|
`+ke+"]":"["+Pe.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&&Pe.push(quote(Me)+(gap?": ":":")+me));else for(Me in Le)Object.prototype.hasOwnProperty.call(Le,Me)&&(me=str(Me,Le),me&&Pe.push(quote(Me)+(gap?": ":":")+me));return me=Pe.length===0?"{}":gap?`{
|
|
|
`+gap+Pe.join(`,
|
|
|
`+gap)+`
|
|
|
`+ke+"}":"{"+Pe.join(",")+"}",gap=ke,me}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(Ln,tn,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=tn,tn&&typeof tn!="function"&&(typeof tn!="object"||typeof tn.length!="number"))throw new Error("JSON.stringify");return str("",{"":Ln})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(Ln,tn){var Ee,Me,me=Ln[tn];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(Ln,tn,me)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(Ln){return"\\u"+("0000"+Ln.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(Ln,tn,Ee){var Me=Ee(67039),me=Me.slice,Be=Me.pluck,ke=Me.each,Pe=Me.bind,Le=Me.create,he=Me.isList,Se=Me.isFunction,xe=Me.isObject;Ln.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(ye){try{var we="__storejs__test__";ye.write(we,we);var be=ye.read(we)===we;return ye.remove(we),be}catch(Ae){return!1}},_assignPluginFnProp:function(ye,we){var be=this[we];this[we]=function(){var De=me(arguments,0),ze=this;function Ze(){if(be)return ke(arguments,function(Ge,ft){De[ft]=Ge}),be.apply(ze,De)}var Ye=[Ze].concat(De);return ye.apply(ze,Ye)}},_serialize:function(ye){return JSON.stringify(ye)},_deserialize:function(ye,we){if(!ye)return we;var be="";try{be=JSON.parse(ye)}catch(Ae){be=ye}return be!==void 0?be:we},_addStorage:function(ye){this.enabled||this._testStorage(ye)&&(this.storage=ye,this.enabled=!0)},_addPlugin:function(ye){var we=this;if(he(ye)){ke(ye,function(De){we._addPlugin(De)});return}var be=Be(this.plugins,function(De){return ye===De});if(!be){if(this.plugins.push(ye),!Se(ye))throw new Error("Plugins must be function values that return objects");var Ae=ye.call(this);if(!xe(Ae))throw new Error("Plugins must return an object of function properties");ke(Ae,function(De,ze){if(!Se(De))throw new Error("Bad plugin property: "+ze+" from plugin "+ye.name+". Plugins should only return functions.");we._assignPluginFnProp(De,ze)})}},addStorage:function(ye){le("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(ye)}},ue=Le(se,ge,{plugins:[]});return ue.raw={},ke(ue,function(ye,we){Se(ye)&&(ue.raw[we]=Pe(ue,ye))}),ke(de,function(ye){ue._addStorage(ye)}),ke(ce,function(ye){ue._addPlugin(ye)}),ue}},67039:function(Ln,tn,Ee){var Me=Pe(),me=Le(),Be=he(),ke=typeof window!="undefined"?window:Ee.g;Ln.exports={assign:Me,create:me,trim:Be,bind:Se,slice:xe,each:ge,map:le,pluck:ve,isList:de,isFunction:ce,isObject:z,Global:ke};function Pe(){return Object.assign?Object.assign:function(oe,ie,se,ue){for(var ye=1;ye<arguments.length;ye++)ge(Object(arguments[ye]),function(we,be){oe[be]=we});return oe}}function Le(){if(Object.create)return function(ie,se,ue,ye){var we=xe(arguments,1);return Me.apply(this,[Object.create(ie)].concat(we))};{let oe=function(){};var ee=oe;return function(se,ue,ye,we){var be=xe(arguments,1);return oe.prototype=se,Me.apply(this,[new oe].concat(be))}}}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 Se(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(Ln,tn,Ee){Ln.exports=[Ee(52496),Ee(16436),Ee(76673),Ee(35701),Ee(65578),Ee(65300)]},35701:function(Ln,tn,Ee){var Me=Ee(67039),me=Me.Global,Be=Me.trim;Ln.exports={name:"cookieStorage",read:Pe,write:he,each:Le,remove:Se,clearAll:xe};var ke=me.document;function Pe(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 Se(le){!le||!ge(le)||(ke.cookie=escape(le)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function xe(){Le(function(le,ve){Se(ve)})}function ge(le){return new RegExp("(?:^|;\\s*)"+escape(le).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(ke.cookie)}},52496:function(Ln,tn,Ee){var Me=Ee(67039),me=Me.Global;Ln.exports={name:"localStorage",read:ke,write:Pe,each:Le,remove:he,clearAll:Se};function Be(){return me.localStorage}function ke(xe){return Be().getItem(xe)}function Pe(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 Se(){return Be().clear()}},65300:function(Ln){Ln.exports={name:"memoryStorage",read:Ee,write:Me,each:me,remove:Be,clearAll:ke};var tn={};function Ee(Pe){return tn[Pe]}function Me(Pe,Le){tn[Pe]=Le}function me(Pe){for(var Le in tn)tn.hasOwnProperty(Le)&&Pe(tn[Le],Le)}function Be(Pe){delete tn[Pe]}function ke(Pe){tn={}}},16436:function(Ln,tn,Ee){var Me=Ee(67039),me=Me.Global;Ln.exports={name:"oldFF-globalStorage",read:ke,write:Pe,each:Le,remove:he,clearAll:Se};var Be=me.globalStorage;function ke(xe){return Be[xe]}function Pe(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 Se(){Le(function(xe,ge){delete Be[xe]})}},76673:function(Ln,tn,Ee){var Me=Ee(67039),me=Me.Global;Ln.exports={name:"oldIE-userDataStorage",write:he,read:Se,each:xe,remove:ge,clearAll:le};var Be="storejs",ke=me.document,Pe=ce(),Le=(me.navigator?me.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function he(z,ee){if(!Le){var oe=de(z);Pe(function(ie){ie.setAttribute(oe,ee),ie.save(Be)})}}function Se(z){if(!Le){var ee=de(z),oe=null;return Pe(function(ie){oe=ie.getAttribute(ee)}),oe}}function xe(z){Pe(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);Pe(function(oe){oe.removeAttribute(ee),oe.save(Be)})}function le(){Pe(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(Ln,tn,Ee){var Me=Ee(67039),me=Me.Global;Ln.exports={name:"sessionStorage",read:ke,write:Pe,each:Le,remove:he,clearAll:Se};function Be(){return me.sessionStorage}function ke(xe){return Be().getItem(xe)}function Pe(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 Se(){return Be().clear()}},82059:function(Ln){var tn=arguments[3],Ee=arguments[4],Me=arguments[5],me=JSON.stringify;Ln.exports=function(Be,ke){for(var Pe,Le=Object.keys(Me),he=0,Se=Le.length;he<Se;he++){var xe=Le[he],ge=Me[xe].exports;if(ge===Be||ge&&ge.default===Be){Pe=xe;break}}if(!Pe){Pe=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var le={},he=0,Se=Le.length;he<Se;he++){var xe=Le[he];le[xe]=xe}Ee[Pe]=["function(require,module,exports){"+Be+"(self); }",le]}var ve=Math.floor(Math.pow(16,8)*Math.random()).toString(16),de={};de[Pe]=Pe,Ee[ve]=["function(require,module,exports){var f = require("+me(Pe)+");(f.default ? f.default : f)(self);}",de];var ce={};z(ve);function z(ye){ce[ye]=!0;for(var we in Ee[ye][1]){var be=Ee[ye][1][we];ce[be]||z(be)}}var ee="("+tn+")({"+Object.keys(ce).map(function(ye){return me(ye)+":["+Ee[ye][0]+","+me(Ee[ye][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(Ln){(function(tn,Ee){if(1)Ln.exports=Ee();else var Me,me})(window,function(){return function(tn){var Ee={};function Me(me){if(Ee[me])return Ee[me].exports;var Be=Ee[me]={i:me,l:!1,exports:{}};return tn[me].call(Be.exports,Be,Be.exports,Me),Be.l=!0,Be.exports}return Me.m=tn,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 Pe in me)Me.d(ke,Pe,function(Le){return me[Le]}.bind(null,Pe));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(tn,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(Pe){return ke._listeners.push(Pe),{dispose:function(){if(!ke._disposed){for(var Le=0;Le<ke._listeners.length;Le++)if(ke._listeners[Le]===Pe)return void ke._listeners.splice(Le,1)}}}}),this._event},enumerable:!1,configurable:!0}),Be.prototype.fire=function(ke,Pe){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,Pe)},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(Pe){return ke.fire(Pe)})}},function(tn,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(tn,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 Pe=0,Le=this._disposables;Pe<Le.length;Pe++)Le[Pe].dispose();this._disposables.length=0},ke.prototype.register=function(Pe){return this._disposables.push(Pe),Pe},ke.prototype.unregister=function(Pe){var Le=this._disposables.indexOf(Pe);Le!==-1&&this._disposables.splice(Le,1)},ke}();function Be(ke){for(var Pe=0,Le=ke;Pe<Le.length;Pe++)Le[Pe].dispose();ke.length=0}Ee.Disposable=me,Ee.disposeArray=Be,Ee.getDisposeArrayDisposable=function(ke){return{dispose:function(){return Be(ke)}}}},function(tn,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(tn,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(Se,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])})(Se,xe)},function(Se,xe){function ge(){this.constructor=Se}me(Se,xe),Se.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),Pe=Me(3),Le=Me(6),he=function(Se){function xe(){var ge=Se!==null&&Se.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,Se),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[Pe.CHAR_DATA_ATTR_INDEX],this.bg=0;var le=!1;if(ge[Pe.CHAR_DATA_CHAR_INDEX].length>2)le=!0;else if(ge[Pe.CHAR_DATA_CHAR_INDEX].length===2){var ve=ge[Pe.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=ve&&ve<=56319){var de=ge[Pe.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=de&&de<=57343?this.content=1024*(ve-55296)+de-56320+65536|ge[Pe.CHAR_DATA_WIDTH_INDEX]<<22:le=!0}else le=!0}else this.content=ge[Pe.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|ge[Pe.CHAR_DATA_WIDTH_INDEX]<<22;le&&(this.combinedData=ge[Pe.CHAR_DATA_CHAR_INDEX],this.content=2097152|ge[Pe.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(tn,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(tn,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(Pe){return[Pe>>>16&255,Pe>>>8&255,255&Pe]},ke.fromColorRGB=function(Pe){return(255&Pe[0])<<16|(255&Pe[1])<<8|255&Pe[2]},ke.prototype.clone=function(){var Pe=new ke;return Pe.fg=this.fg,Pe.bg=this.bg,Pe.extended=this.extended.clone(),Pe},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(Pe,Le){Pe===void 0&&(Pe=0),Le===void 0&&(Le=-1),this.underlineStyle=Pe,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(tn,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.addDisposableDomListener=void 0,Ee.addDisposableDomListener=function(me,Be,ke,Pe){me.addEventListener(Be,ke,Pe);var Le=!1;return{dispose:function(){Le||(Le=!0,me.removeEventListener(Be,ke,Pe))}}}},function(tn,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,Pe,Le){Pe===void 0&&(Pe=0),Le===void 0&&(Le=ke.length);for(var he="",Se=Pe;Se<Le;++Se){var xe=ke[Se];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(Pe,Le){var he=Pe.length;if(!he)return 0;var Se=0,xe=0;this._interim&&(56320<=(ve=Pe.charCodeAt(xe++))&&ve<=57343?Le[Se++]=1024*(this._interim-55296)+ve-56320+65536:(Le[Se++]=this._interim,Le[Se++]=ve),this._interim=0);for(var ge=xe;ge<he;++ge){var le=Pe.charCodeAt(ge);if(55296<=le&&le<=56319){if(++ge>=he)return this._interim=le,Se;var ve;56320<=(ve=Pe.charCodeAt(ge))&&ve<=57343?Le[Se++]=1024*(le-55296)+ve-56320+65536:(Le[Se++]=le,Le[Se++]=ve)}else Le[Se++]=le}return Se},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(Pe,Le){var he=Pe.length;if(!he)return 0;var Se,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=Pe[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 ye=he-4,we=ce;we<he;){for(;!(!(we<ye)||128&(Se=Pe[we])||128&(xe=Pe[we+1])||128&(ge=Pe[we+2])||128&(le=Pe[we+3]));)Le[ve++]=Se,Le[ve++]=xe,Le[ve++]=ge,Le[ve++]=le,we+=4;if((Se=Pe[we++])<128)Le[ve++]=Se;else if((224&Se)==192){if(we>=he)return this.interim[0]=Se,ve;if((192&(xe=Pe[we++]))!=128){we--;continue}if((de=(31&Se)<<6|63&xe)<128){we--;continue}Le[ve++]=de}else if((240&Se)==224){if(we>=he)return this.interim[0]=Se,ve;if((192&(xe=Pe[we++]))!=128){we--;continue}if(we>=he)return this.interim[0]=Se,this.interim[1]=xe,ve;if((192&(ge=Pe[we++]))!=128){we--;continue}if((de=(15&Se)<<12|(63&xe)<<6|63&ge)<2048||de>=55296&&de<=57343)continue;Le[ve++]=de}else if((248&Se)==240){if(we>=he)return this.interim[0]=Se,ve;if((192&(xe=Pe[we++]))!=128){we--;continue}if(we>=he)return this.interim[0]=Se,this.interim[1]=xe,ve;if((192&(ge=Pe[we++]))!=128){we--;continue}if(we>=he)return this.interim[0]=Se,this.interim[1]=xe,this.interim[2]=ge,ve;if((192&(le=Pe[we++]))!=128){we--;continue}if((de=(7&Se)<<18|(63&xe)<<12|(63&ge)<<6|63&le)<65536||de>1114111)continue;Le[ve++]=de}}return ve},ke}();Ee.Utf8ToUtf32=Be},function(tn,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(tn,Ee,Me){"use strict";var me,Be,ke,Pe;function Le(Se){var xe=Se.toString(16);return xe.length<2?"0"+xe:xe}function he(Se,xe){return Se<xe?(xe+.05)/(Se+.05):(Se+.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(Se){Se.toCss=function(xe,ge,le,ve){return ve!==void 0?"#"+Le(xe)+Le(ge)+Le(le)+Le(ve):"#"+Le(xe)+Le(ge)+Le(le)},Se.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(Se,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=Se.rgba>>24&255,z=Se.rgba>>16&255,ee=Se.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(Se){return(255&Se.rgba)==255},Be.ensureContrastRatio=function(Se,xe,ge){var le=Pe.ensureContrastRatio(Se.rgba,xe.rgba,ge);if(le)return Pe.toColor(le>>24&255,le>>16&255,le>>8&255)},Be.opaque=function(Se){var xe=(255|Se.rgba)>>>0,ge=Pe.toChannels(xe),le=ge[0],ve=ge[1],de=ge[2];return{css:me.toCss(le,ve,de),rgba:xe}},Be.opacity=function(Se,xe){var ge=Math.round(255*xe),le=Pe.toChannels(Se.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(Se){switch(Se.length){case 7:return{css:Se,rgba:(parseInt(Se.slice(1),16)<<8|255)>>>0};case 9:return{css:Se,rgba:parseInt(Se.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(Se){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))}Se.relativeLuminance=function(ge){return xe(ge>>16&255,ge>>8&255,255&ge)},Se.relativeLuminance2=xe}(ke=Ee.rgb||(Ee.rgb={})),function(Se){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}Se.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)},Se.reduceLuminance=xe,Se.increaseLuminance=ge,Se.toChannels=function(le){return[le>>24&255,le>>16&255,le>>8&255,255&le]},Se.toColor=function(le,ve,de){return{css:me.toCss(le,ve,de),rgba:me.toRgba(le,ve,de)}}}(Pe=Ee.rgba||(Ee.rgba={})),Ee.toPaddedHex=Le,Ee.contrastRatio=he},function(tn,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 Pe(Le,he){return Le.indexOf(he)>=0}Ee.isFirefox=!!~Be.indexOf("Firefox"),Ee.isSafari=/^((?!chrome|android).)*safari/i.test(Be),Ee.isMac=Pe(["Macintosh","MacIntel","MacPPC","Mac68K"],ke),Ee.isIpad=ke==="iPad",Ee.isIphone=ke==="iPhone",Ee.isWindows=Pe(["Windows","Win16","Win32","WinCE"],ke),Ee.isLinux=ke.indexOf("Linux")>=0},function(tn,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(tn,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BaseRenderLayer=void 0;var me=Me(3),Be=Me(9),ke=Me(25),Pe=Me(6),Le=Me(28),he=Me(10),Se=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;Se.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("+Pe.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("+Pe.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 ye=this._resolveBackgroundRgba(ee,z,oe),we=this._resolveForegroundRgba(ce,de,oe,ie),be=he.rgba.ensureContrastRatio(ye,we,this._optionsService.options.minimumContrastRatio);if(be){var Ae={css:he.channels.toCss(be>>24&255,be>>16&255,be>>8&255),rgba:be};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(tn,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.createDecorator=Ee.getServiceDependencies=Ee.serviceRegistry=void 0;function me(Be,ke,Pe){ke.di$target===ke?ke.di$dependencies.push({id:Be,index:Pe}):(ke.di$dependencies=[{id:Be,index:Pe}],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(Pe,Le,he){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");me(ke,Pe,he)};return ke.toString=function(){return Be},Ee.serviceRegistry.set(Be,ke),ke}},function(tn,Ee,Me){"use strict";function me(Be,ke,Pe,Le){if(Pe===void 0&&(Pe=0),Le===void 0&&(Le=Be.length),Pe>=Be.length)return Be;Pe=(Be.length+Pe)%Be.length,Le=Le>=Be.length?Be.length:(Be.length+Le)%Be.length;for(var he=Pe;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,Pe,Le){return Be.fill?Be.fill(ke,Pe,Le):me(Be,ke,Pe,Le)},Ee.fillFallback=me,Ee.concat=function(Be,ke){var Pe=new Be.constructor(Be.length+ke.length);return Pe.set(Be),Pe.set(ke,Be.length),Pe}},function(tn,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),Pe=Me(6);Ee.DEFAULT_ATTR_DATA=Object.freeze(new Pe.AttributeData);var Le=function(){function he(Se,xe,ge){ge===void 0&&(ge=!1),this.isWrapped=ge,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*Se);for(var le=xe||ke.CellData.fromCharData([0,Be.NULL_CELL_CHAR,Be.NULL_CELL_WIDTH,Be.NULL_CELL_CODE]),ve=0;ve<Se;++ve)this.setCell(ve,le);this.length=Se}return he.prototype.get=function(Se){var xe=this._data[3*Se+0],ge=2097151&xe;return[this._data[3*Se+1],2097152&xe?this._combined[Se]:ge?me.stringFromCodePoint(ge):"",xe>>22,2097152&xe?this._combined[Se].charCodeAt(this._combined[Se].length-1):ge]},he.prototype.set=function(Se,xe){this._data[3*Se+1]=xe[Be.CHAR_DATA_ATTR_INDEX],xe[Be.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[Se]=xe[1],this._data[3*Se+0]=2097152|Se|xe[Be.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*Se+0]=xe[Be.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|xe[Be.CHAR_DATA_WIDTH_INDEX]<<22},he.prototype.getWidth=function(Se){return this._data[3*Se+0]>>22},he.prototype.hasWidth=function(Se){return 12582912&this._data[3*Se+0]},he.prototype.getFg=function(Se){return this._data[3*Se+1]},he.prototype.getBg=function(Se){return this._data[3*Se+2]},he.prototype.hasContent=function(Se){return 4194303&this._data[3*Se+0]},he.prototype.getCodePoint=function(Se){var xe=this._data[3*Se+0];return 2097152&xe?this._combined[Se].charCodeAt(this._combined[Se].length-1):2097151&xe},he.prototype.isCombined=function(Se){return 2097152&this._data[3*Se+0]},he.prototype.getString=function(Se){var xe=this._data[3*Se+0];return 2097152&xe?this._combined[Se]:2097151&xe?me.stringFromCodePoint(2097151&xe):""},he.prototype.loadCell=function(Se,xe){var ge=3*Se;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[Se]),268435456&xe.bg&&(xe.extended=this._extendedAttrs[Se]),xe},he.prototype.setCell=function(Se,xe){2097152&xe.content&&(this._combined[Se]=xe.combinedData),268435456&xe.bg&&(this._extendedAttrs[Se]=xe.extended),this._data[3*Se+0]=xe.content,this._data[3*Se+1]=xe.fg,this._data[3*Se+2]=xe.bg},he.prototype.setCellFromCodePoint=function(Se,xe,ge,le,ve,de){268435456&ve&&(this._extendedAttrs[Se]=de),this._data[3*Se+0]=xe|ge<<22,this._data[3*Se+1]=le,this._data[3*Se+2]=ve},he.prototype.addCodepointToCell=function(Se,xe){var ge=this._data[3*Se+0];2097152&ge?this._combined[Se]+=me.stringFromCodePoint(xe):(2097151&ge?(this._combined[Se]=me.stringFromCodePoint(2097151&ge)+me.stringFromCodePoint(xe),ge&=-2097152,ge|=2097152):ge=xe|1<<22,this._data[3*Se+0]=ge)},he.prototype.insertCells=function(Se,xe,ge,le){if((Se%=this.length)&&this.getWidth(Se-1)===2&&this.setCellFromCodePoint(Se-1,0,1,(le==null?void 0:le.fg)||0,(le==null?void 0:le.bg)||0,(le==null?void 0:le.extended)||new Pe.ExtendedAttrs),xe<this.length-Se){for(var ve=new ke.CellData,de=this.length-Se-xe-1;de>=0;--de)this.setCell(Se+xe+de,this.loadCell(Se+de,ve));for(de=0;de<xe;++de)this.setCell(Se+de,ge)}else for(de=Se;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 Pe.ExtendedAttrs)},he.prototype.deleteCells=function(Se,xe,ge,le){if(Se%=this.length,xe<this.length-Se){for(var ve=new ke.CellData,de=0;de<this.length-Se-xe;++de)this.setCell(Se+de,this.loadCell(Se+xe+de,ve));for(de=this.length-xe;de<this.length;++de)this.setCell(de,ge)}else for(de=Se;de<this.length;++de)this.setCell(de,ge);Se&&this.getWidth(Se-1)===2&&this.setCellFromCodePoint(Se-1,0,1,(le==null?void 0:le.fg)||0,(le==null?void 0:le.bg)||0,(le==null?void 0:le.extended)||new Pe.ExtendedAttrs),this.getWidth(Se)!==0||this.hasContent(Se)||this.setCellFromCodePoint(Se,0,1,(le==null?void 0:le.fg)||0,(le==null?void 0:le.bg)||0,(le==null?void 0:le.extended)||new Pe.ExtendedAttrs)},he.prototype.replaceCells=function(Se,xe,ge,le){for(Se&&this.getWidth(Se-1)===2&&this.setCellFromCodePoint(Se-1,0,1,(le==null?void 0:le.fg)||0,(le==null?void 0:le.bg)||0,(le==null?void 0:le.extended)||new Pe.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 Pe.ExtendedAttrs);Se<xe&&Se<this.length;)this.setCell(Se++,ge)},he.prototype.resize=function(Se,xe){if(Se!==this.length){if(Se>this.length){var ge=new Uint32Array(3*Se);this.length&&(3*Se<this._data.length?ge.set(this._data.subarray(0,3*Se)):ge.set(this._data)),this._data=ge;for(var le=this.length;le<Se;++le)this.setCell(le,xe)}else if(Se){(ge=new Uint32Array(3*Se)).set(this._data.subarray(0,3*Se)),this._data=ge;var ve=Object.keys(this._combined);for(le=0;le<ve.length;le++){var de=parseInt(ve[le],10);de>=Se&&delete this._combined[de]}}else this._data=new Uint32Array(0),this._combined={};this.length=Se}},he.prototype.fill=function(Se){this._combined={},this._extendedAttrs={};for(var xe=0;xe<this.length;++xe)this.setCell(xe,Se)},he.prototype.copyFrom=function(Se){for(var xe in this.length!==Se.length?this._data=new Uint32Array(Se._data):this._data.set(Se._data),this.length=Se.length,this._combined={},Se._combined)this._combined[xe]=Se._combined[xe];for(var xe in this._extendedAttrs={},Se._extendedAttrs)this._extendedAttrs[xe]=Se._extendedAttrs[xe];this.isWrapped=Se.isWrapped},he.prototype.clone=function(){var Se=new he(0);for(var xe in Se._data=new Uint32Array(this._data),Se.length=this.length,this._combined)Se._combined[xe]=this._combined[xe];for(var xe in this._extendedAttrs)Se._extendedAttrs[xe]=this._extendedAttrs[xe];return Se.isWrapped=this.isWrapped,Se},he.prototype.getTrimmedLength=function(){for(var Se=this.length-1;Se>=0;--Se)if(4194303&this._data[3*Se+0])return Se+(this._data[3*Se+0]>>22);return 0},he.prototype.copyCellsFrom=function(Se,xe,ge,le,ve){var de=Se._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(Se._combined);for(z=0;z<ee.length;z++){var oe=parseInt(ee[z],10);oe>=xe&&(this._combined[oe-xe+ge]=Se._combined[oe])}},he.prototype.translateToString=function(Se,xe,ge){Se===void 0&&(Se=!1),xe===void 0&&(xe=0),ge===void 0&&(ge=this.length),Se&&(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(tn,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 Pe=0,Le=Be;Pe<Le.length;Pe++){var he=Le[Pe];(me=he==null?void 0:he.parentElement)===null||me===void 0||me.removeChild(he)}}},function(tn,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(tn,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(we,be){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,be)},function(we,be){function Ae(){this.constructor=we}me(we,be),we.prototype=be===null?Object.create(be):(Ae.prototype=be.prototype,new Ae)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.InputHandler=Ee.WindowsOptionsReportType=void 0;var ke,Pe=Me(12),Le=Me(20),he=Me(39),Se=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,be){if(we>24)return be.setWinLines||!1;switch(we){case 1:return!!be.restoreWin;case 2:return!!be.minimizeWin;case 3:return!!be.setWinPosition;case 4:return!!be.setWinSizePixels;case 5:return!!be.raiseWin;case 6:return!!be.lowerWin;case 7:return!!be.refreshWin;case 8:return!!be.setWinSizeChars;case 9:return!!be.maximizeWin;case 10:return!!be.fullscreenWin;case 11:return!!be.getWinState;case 13:return!!be.getWinPosition;case 14:return!!be.getWinSizePixels;case 15:return!!be.getScreenSizePixels;case 16:return!!be.getCellSizePixels;case 18:return!!be.getWinSizeChars;case 19:return!!be.getScreenSizeChars;case 20:return!!be.getIconTitle;case 21:return!!be.getWinTitle;case 22:return!!be.pushTitle;case 23:return!!be.popTitle;case 24:return!!be.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(be,Ae,De,ze){this._bufferService=be,this._coreService=Ae,this._logService=De,this._optionsService=ze,this._data=new Uint32Array(0)}return we.prototype.hook=function(be){this._data=new Uint32Array(0)},we.prototype.put=function(be,Ae,De){this._data=xe.concat(this._data,be.subarray(Ae,De))},we.prototype.unhook=function(be){if(be){var Ae=ge.utf32ToString(this._data);switch(this._data=new Uint32Array(0),Ae){case'"q':return this._coreService.triggerDataEvent(Pe.C0.ESC+'P1$r0"q'+Pe.C0.ESC+"\\");case'"p':return this._coreService.triggerDataEvent(Pe.C0.ESC+'P1$r61;1"p'+Pe.C0.ESC+"\\");case"r":var De=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(Pe.C0.ESC+"P1$r"+De+Pe.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(Pe.C0.ESC+"P1$r0m"+Pe.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(Pe.C0.ESC+"P1$r"+ze+" q"+Pe.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",Ae),this._coreService.triggerDataEvent(Pe.C0.ESC+"P0$r"+Pe.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},we}(),ye=function(we){function be(Ae,De,ze,Ze,Ye,Ge,ft,at,Pt){Pt===void 0&&(Pt=new he.EscapeSequenceParser);var tt=we.call(this)||this;tt._bufferService=Ae,tt._charsetService=De,tt._coreService=ze,tt._dirtyRowService=Ze,tt._logService=Ye,tt._optionsService=Ge,tt._coreMouseService=ft,tt._unicodeService=at,tt._parser=Pt,tt._parseBuffer=new Uint32Array(4096),tt._stringDecoder=new ge.StringToUtf32,tt._utf8Decoder=new ge.Utf8ToUtf32,tt._workCell=new ce.CellData,tt._windowTitle="",tt._iconName="",tt._windowTitleStack=[],tt._iconNameStack=[],tt._curAttrData=le.DEFAULT_ATTR_DATA.clone(),tt._eraseAttrDataInternal=le.DEFAULT_ATTR_DATA.clone(),tt._onRequestBell=new ve.EventEmitter,tt._onRequestRefreshRows=new ve.EventEmitter,tt._onRequestReset=new ve.EventEmitter,tt._onRequestScroll=new ve.EventEmitter,tt._onRequestSyncScrollBar=new ve.EventEmitter,tt._onRequestWindowsOptionsReport=new ve.EventEmitter,tt._onA11yChar=new ve.EventEmitter,tt._onA11yTab=new ve.EventEmitter,tt._onCursorMove=new ve.EventEmitter,tt._onLineFeed=new ve.EventEmitter,tt._onScroll=new ve.EventEmitter,tt._onTitleChange=new ve.EventEmitter,tt.register(tt._parser),tt._parser.setCsiHandlerFallback(function(lt,et){tt._logService.debug("Unknown CSI code: ",{identifier:tt._parser.identToString(lt),params:et.toArray()})}),tt._parser.setEscHandlerFallback(function(lt){tt._logService.debug("Unknown ESC code: ",{identifier:tt._parser.identToString(lt)})}),tt._parser.setExecuteHandlerFallback(function(lt){tt._logService.debug("Unknown EXECUTE code: ",{code:lt})}),tt._parser.setOscHandlerFallback(function(lt,et,ut){tt._logService.debug("Unknown OSC code: ",{identifier:lt,action:et,data:ut})}),tt._parser.setDcsHandlerFallback(function(lt,et,ut){et==="HOOK"&&(ut=ut.toArray()),tt._logService.debug("Unknown DCS code: ",{identifier:tt._parser.identToString(lt),action:et,payload:ut})}),tt._parser.setPrintHandler(function(lt,et,ut){return tt.print(lt,et,ut)}),tt._parser.setCsiHandler({final:"@"},function(lt){return tt.insertChars(lt)}),tt._parser.setCsiHandler({intermediates:" ",final:"@"},function(lt){return tt.scrollLeft(lt)}),tt._parser.setCsiHandler({final:"A"},function(lt){return tt.cursorUp(lt)}),tt._parser.setCsiHandler({intermediates:" ",final:"A"},function(lt){return tt.scrollRight(lt)}),tt._parser.setCsiHandler({final:"B"},function(lt){return tt.cursorDown(lt)}),tt._parser.setCsiHandler({final:"C"},function(lt){return tt.cursorForward(lt)}),tt._parser.setCsiHandler({final:"D"},function(lt){return tt.cursorBackward(lt)}),tt._parser.setCsiHandler({final:"E"},function(lt){return tt.cursorNextLine(lt)}),tt._parser.setCsiHandler({final:"F"},function(lt){return tt.cursorPrecedingLine(lt)}),tt._parser.setCsiHandler({final:"G"},function(lt){return tt.cursorCharAbsolute(lt)}),tt._parser.setCsiHandler({final:"H"},function(lt){return tt.cursorPosition(lt)}),tt._parser.setCsiHandler({final:"I"},function(lt){return tt.cursorForwardTab(lt)}),tt._parser.setCsiHandler({final:"J"},function(lt){return tt.eraseInDisplay(lt)}),tt._parser.setCsiHandler({prefix:"?",final:"J"},function(lt){return tt.eraseInDisplay(lt)}),tt._parser.setCsiHandler({final:"K"},function(lt){return tt.eraseInLine(lt)}),tt._parser.setCsiHandler({prefix:"?",final:"K"},function(lt){return tt.eraseInLine(lt)}),tt._parser.setCsiHandler({final:"L"},function(lt){return tt.insertLines(lt)}),tt._parser.setCsiHandler({final:"M"},function(lt){return tt.deleteLines(lt)}),tt._parser.setCsiHandler({final:"P"},function(lt){return tt.deleteChars(lt)}),tt._parser.setCsiHandler({final:"S"},function(lt){return tt.scrollUp(lt)}),tt._parser.setCsiHandler({final:"T"},function(lt){return tt.scrollDown(lt)}),tt._parser.setCsiHandler({final:"X"},function(lt){return tt.eraseChars(lt)}),tt._parser.setCsiHandler({final:"Z"},function(lt){return tt.cursorBackwardTab(lt)}),tt._parser.setCsiHandler({final:"`"},function(lt){return tt.charPosAbsolute(lt)}),tt._parser.setCsiHandler({final:"a"},function(lt){return tt.hPositionRelative(lt)}),tt._parser.setCsiHandler({final:"b"},function(lt){return tt.repeatPrecedingCharacter(lt)}),tt._parser.setCsiHandler({final:"c"},function(lt){return tt.sendDeviceAttributesPrimary(lt)}),tt._parser.setCsiHandler({prefix:">",final:"c"},function(lt){return tt.sendDeviceAttributesSecondary(lt)}),tt._parser.setCsiHandler({final:"d"},function(lt){return tt.linePosAbsolute(lt)}),tt._parser.setCsiHandler({final:"e"},function(lt){return tt.vPositionRelative(lt)}),tt._parser.setCsiHandler({final:"f"},function(lt){return tt.hVPosition(lt)}),tt._parser.setCsiHandler({final:"g"},function(lt){return tt.tabClear(lt)}),tt._parser.setCsiHandler({final:"h"},function(lt){return tt.setMode(lt)}),tt._parser.setCsiHandler({prefix:"?",final:"h"},function(lt){return tt.setModePrivate(lt)}),tt._parser.setCsiHandler({final:"l"},function(lt){return tt.resetMode(lt)}),tt._parser.setCsiHandler({prefix:"?",final:"l"},function(lt){return tt.resetModePrivate(lt)}),tt._parser.setCsiHandler({final:"m"},function(lt){return tt.charAttributes(lt)}),tt._parser.setCsiHandler({final:"n"},function(lt){return tt.deviceStatus(lt)}),tt._parser.setCsiHandler({prefix:"?",final:"n"},function(lt){return tt.deviceStatusPrivate(lt)}),tt._parser.setCsiHandler({intermediates:"!",final:"p"},function(lt){return tt.softReset(lt)}),tt._parser.setCsiHandler({intermediates:" ",final:"q"},function(lt){return tt.setCursorStyle(lt)}),tt._parser.setCsiHandler({final:"r"},function(lt){return tt.setScrollRegion(lt)}),tt._parser.setCsiHandler({final:"s"},function(lt){return tt.saveCursor(lt)}),tt._parser.setCsiHandler({final:"t"},function(lt){return tt.windowOptions(lt)}),tt._parser.setCsiHandler({final:"u"},function(lt){return tt.restoreCursor(lt)}),tt._parser.setCsiHandler({intermediates:"'",final:"}"},function(lt){return tt.insertColumns(lt)}),tt._parser.setCsiHandler({intermediates:"'",final:"~"},function(lt){return tt.deleteColumns(lt)}),tt._parser.setExecuteHandler(Pe.C0.BEL,function(){return tt.bell()}),tt._parser.setExecuteHandler(Pe.C0.LF,function(){return tt.lineFeed()}),tt._parser.setExecuteHandler(Pe.C0.VT,function(){return tt.lineFeed()}),tt._parser.setExecuteHandler(Pe.C0.FF,function(){return tt.lineFeed()}),tt._parser.setExecuteHandler(Pe.C0.CR,function(){return tt.carriageReturn()}),tt._parser.setExecuteHandler(Pe.C0.BS,function(){return tt.backspace()}),tt._parser.setExecuteHandler(Pe.C0.HT,function(){return tt.tab()}),tt._parser.setExecuteHandler(Pe.C0.SO,function(){return tt.shiftOut()}),tt._parser.setExecuteHandler(Pe.C0.SI,function(){return tt.shiftIn()}),tt._parser.setExecuteHandler(Pe.C1.IND,function(){return tt.index()}),tt._parser.setExecuteHandler(Pe.C1.NEL,function(){return tt.nextLine()}),tt._parser.setExecuteHandler(Pe.C1.HTS,function(){return tt.tabSet()}),tt._parser.setOscHandler(0,new ee.OscHandler(function(lt){tt.setTitle(lt),tt.setIconName(lt)})),tt._parser.setOscHandler(1,new ee.OscHandler(function(lt){return tt.setIconName(lt)})),tt._parser.setOscHandler(2,new ee.OscHandler(function(lt){return tt.setTitle(lt)})),tt._parser.setEscHandler({final:"7"},function(){return tt.saveCursor()}),tt._parser.setEscHandler({final:"8"},function(){return tt.restoreCursor()}),tt._parser.setEscHandler({final:"D"},function(){return tt.index()}),tt._parser.setEscHandler({final:"E"},function(){return tt.nextLine()}),tt._parser.setEscHandler({final:"H"},function(){return tt.tabSet()}),tt._parser.setEscHandler({final:"M"},function(){return tt.reverseIndex()}),tt._parser.setEscHandler({final:"="},function(){return tt.keypadApplicationMode()}),tt._parser.setEscHandler({final:">"},function(){return tt.keypadNumericMode()}),tt._parser.setEscHandler({final:"c"},function(){return tt.fullReset()}),tt._parser.setEscHandler({final:"n"},function(){return tt.setgLevel(2)}),tt._parser.setEscHandler({final:"o"},function(){return tt.setgLevel(3)}),tt._parser.setEscHandler({final:"|"},function(){return tt.setgLevel(3)}),tt._parser.setEscHandler({final:"}"},function(){return tt.setgLevel(2)}),tt._parser.setEscHandler({final:"~"},function(){return tt.setgLevel(1)}),tt._parser.setEscHandler({intermediates:"%",final:"@"},function(){return tt.selectDefaultCharset()}),tt._parser.setEscHandler({intermediates:"%",final:"G"},function(){return tt.selectDefaultCharset()});var vt=function(lt){st._parser.setEscHandler({intermediates:"(",final:lt},function(){return tt.selectCharset("("+lt)}),st._parser.setEscHandler({intermediates:")",final:lt},function(){return tt.selectCharset(")"+lt)}),st._parser.setEscHandler({intermediates:"*",final:lt},function(){return tt.selectCharset("*"+lt)}),st._parser.setEscHandler({intermediates:"+",final:lt},function(){return tt.selectCharset("+"+lt)}),st._parser.setEscHandler({intermediates:"-",final:lt},function(){return tt.selectCharset("-"+lt)}),st._parser.setEscHandler({intermediates:".",final:lt},function(){return tt.selectCharset("."+lt)}),st._parser.setEscHandler({intermediates:"/",final:lt},function(){return tt.selectCharset("/"+lt)})},st=this;for(var jt in Le.CHARSETS)vt(jt);return tt._parser.setEscHandler({intermediates:"#",final:"8"},function(){return tt.screenAlignmentPattern()}),tt._parser.setErrorHandler(function(lt){return tt._logService.error("Parsing error: ",lt),lt}),tt._parser.setDcsHandler({intermediates:"$",final:"q"},new ue(tt._bufferService,tt._coreService,tt._logService,tt._optionsService)),tt}return Be(be,we),Object.defineProperty(be.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),be.prototype.dispose=function(){we.prototype.dispose.call(this)},be.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 Ye=0;Ye<Ae.length;Ye+=131072){var Ge=Ye+131072<Ae.length?Ye+131072:Ae.length,ft=typeof Ae=="string"?this._stringDecoder.decode(Ae.substring(Ye,Ge),this._parseBuffer):this._utf8Decoder.decode(Ae.subarray(Ye,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)},be.prototype.print=function(Ae,De,ze){var Ze,Ye,Ge=this._bufferService.buffer,ft=this._charsetService.charset,at=this._optionsService.options.screenReaderMode,Pt=this._bufferService.cols,tt=this._coreService.decPrivateModes.wraparound,vt=this._coreService.modes.insertMode,st=this._curAttrData,jt=Ge.lines.get(Ge.ybase+Ge.y);this._dirtyRowService.markDirty(Ge.y),Ge.x&&ze-De>0&&jt.getWidth(Ge.x-1)===2&&jt.setCellFromCodePoint(Ge.x-1,0,1,st.fg,st.bg,st.extended);for(var lt=De;lt<ze;++lt){if(Ze=Ae[lt],Ye=this._unicodeService.wcwidth(Ze),Ze<127&&ft){var et=ft[String.fromCharCode(Ze)];et&&(Ze=et.charCodeAt(0))}if(at&&this._onA11yChar.fire(ge.stringFromCodePoint(Ze)),Ye||!Ge.x){if(Ge.x+Ye-1>=Pt){if(tt){for(;Ge.x<Pt;)jt.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),jt=Ge.lines.get(Ge.ybase+Ge.y)}else if(Ge.x=Pt-1,Ye===2)continue}if(vt&&(jt.insertCells(Ge.x,Ye,Ge.getNullCell(st),st),jt.getWidth(Pt-1)===2&&jt.setCellFromCodePoint(Pt-1,de.NULL_CELL_CODE,de.NULL_CELL_WIDTH,st.fg,st.bg,st.extended)),jt.setCellFromCodePoint(Ge.x++,Ze,Ye,st.fg,st.bg,st.extended),Ye>0)for(;--Ye;)jt.setCellFromCodePoint(Ge.x++,0,0,st.fg,st.bg,st.extended)}else jt.getWidth(Ge.x-1)?jt.addCodepointToCell(Ge.x-1,Ze):jt.addCodepointToCell(Ge.x-2,Ze)}ze-De>0&&(jt.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<Pt&&ze-De>0&&jt.getWidth(Ge.x)===0&&!jt.hasContent(Ge.x)&&jt.setCellFromCodePoint(Ge.x,0,1,st.fg,st.bg,st.extended),this._dirtyRowService.markDirty(Ge.y)},be.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)})},be.prototype.addDcsHandler=function(Ae,De){return this._parser.addDcsHandler(Ae,new oe.DcsHandler(De))},be.prototype.addEscHandler=function(Ae,De){return this._parser.addEscHandler(Ae,De)},be.prototype.addOscHandler=function(Ae,De){return this._parser.addOscHandler(Ae,new ee.OscHandler(De))},be.prototype.bell=function(){this._onRequestBell.fire()},be.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()},be.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},be.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()},be.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)}},be.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},be.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},be.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)},be.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)},be.prototype._moveCursor=function(Ae,De){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+Ae,this._bufferService.buffer.y+De)},be.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))},be.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)},be.prototype.cursorForward=function(Ae){this._moveCursor(Ae.params[0]||1,0)},be.prototype.cursorBackward=function(Ae){this._moveCursor(-(Ae.params[0]||1),0)},be.prototype.cursorNextLine=function(Ae){this.cursorDown(Ae),this._bufferService.buffer.x=0},be.prototype.cursorPrecedingLine=function(Ae){this.cursorUp(Ae),this._bufferService.buffer.x=0},be.prototype.cursorCharAbsolute=function(Ae){this._setCursor((Ae.params[0]||1)-1,this._bufferService.buffer.y)},be.prototype.cursorPosition=function(Ae){this._setCursor(Ae.length>=2?(Ae.params[1]||1)-1:0,(Ae.params[0]||1)-1)},be.prototype.charPosAbsolute=function(Ae){this._setCursor((Ae.params[0]||1)-1,this._bufferService.buffer.y)},be.prototype.hPositionRelative=function(Ae){this._moveCursor(Ae.params[0]||1,0)},be.prototype.linePosAbsolute=function(Ae){this._setCursor(this._bufferService.buffer.x,(Ae.params[0]||1)-1)},be.prototype.vPositionRelative=function(Ae){this._moveCursor(0,Ae.params[0]||1)},be.prototype.hVPosition=function(Ae){this.cursorPosition(Ae)},be.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={})},be.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()},be.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()},be.prototype._eraseInBufferLine=function(Ae,De,ze,Ze){Ze===void 0&&(Ze=!1);var Ye=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+Ae);Ye.replaceCells(De,ze,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Ze&&(Ye.isWrapped=!1)},be.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},be.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))}},be.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)},be.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,Ye=this._bufferService.rows-1-ze.scrollBottom,Ge=this._bufferService.rows-1+ze.ybase-Ye+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}},be.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,Ye=ze.ybase+ze.y;for(Ze=this._bufferService.rows-1-ze.scrollBottom,Ze=this._bufferService.rows-1+ze.ybase-Ze;De--;)ze.lines.splice(Ye,1),ze.lines.splice(Ze,0,ze.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(ze.y,ze.scrollBottom),ze.x=0}},be.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))},be.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))},be.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)},be.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)},be.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 Ye=De.lines.get(De.ybase+Ze);Ye.deleteCells(0,ze,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Ye.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},be.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 Ye=De.lines.get(De.ybase+Ze);Ye.insertCells(0,ze,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Ye.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},be.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 Ye=this._bufferService.buffer.lines.get(De.ybase+Ze);Ye.insertCells(De.x,ze,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Ye.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},be.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 Ye=De.lines.get(De.ybase+Ze);Ye.deleteCells(De.x,ze,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Ye.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},be.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))},be.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)}},be.prototype.sendDeviceAttributesPrimary=function(Ae){Ae.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(Pe.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(Pe.C0.ESC+"[?6c"))},be.prototype.sendDeviceAttributesSecondary=function(Ae){Ae.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(Pe.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(Pe.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(Ae.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(Pe.C0.ESC+"[>83;40003;0c"))},be.prototype._is=function(Ae){return(this._optionsService.options.termName+"").indexOf(Ae)===0},be.prototype.setMode=function(Ae){for(var De=0;De<Ae.length;De++)switch(Ae.params[De]){case 4:this._coreService.modes.insertMode=!0}},be.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}},be.prototype.resetMode=function(Ae){for(var De=0;De<Ae.length;De++)switch(Ae.params[De]){case 4:this._coreService.modes.insertMode=!1}},be.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}},be.prototype._updateAttrColor=function(Ae,De,ze,Ze,Ye){return De===2?(Ae|=50331648,Ae&=-16777216,Ae|=z.AttributeData.fromColorRGB([ze,Ze,Ye])):De===5&&(Ae&=-50331904,Ae|=33554432|255&ze),Ae},be.prototype._extractColor=function(Ae,De,ze){var Ze=[0,0,-1,0,0,0],Ye=0,Ge=0;do{if(Ze[Ge+Ye]=Ae.params[De+Ge],Ae.hasSubParams(De+Ge)){var ft=Ae.getSubParams(De+Ge),at=0;do Ze[1]===5&&(Ye=1),Ze[Ge+at+1+Ye]=ft[at];while(++at<ft.length&&at+Ge+1+Ye<Ze.length);break}if(Ze[1]===5&&Ge+Ye>=2||Ze[1]===2&&Ge+Ye>=5)break;Ze[1]&&(Ye=1)}while(++Ge+De<Ae.length&&Ge+Ye<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},be.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()},be.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,Ye=0;Ye<ze;Ye++)(De=Ae.params[Ye])>=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(Ye)?Ae.getSubParams(Ye)[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?Ye+=this._extractColor(Ae,Ye,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)},be.prototype.deviceStatus=function(Ae){switch(Ae.params[0]){case 5:this._coreService.triggerDataEvent(Pe.C0.ESC+"[0n");break;case 6:var De=this._bufferService.buffer.y+1,ze=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(Pe.C0.ESC+"["+De+";"+ze+"R")}},be.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(Pe.C0.ESC+"[?"+De+";"+ze+"R")}},be.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},be.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},be.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))},be.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(Pe.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())}}},be.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},be.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()},be.prototype.setTitle=function(Ae){this._windowTitle=Ae,this._onTitleChange.fire(Ae)},be.prototype.setIconName=function(Ae){this._iconName=Ae},be.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},be.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},be.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},be.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,Le.DEFAULT_CHARSET)},be.prototype.selectCharset=function(Ae){Ae.length===2?Ae[0]!=="/"&&this._charsetService.setgCharset(ie[Ae[0]],Le.CHARSETS[Ae[1]]||Le.DEFAULT_CHARSET):this.selectDefaultCharset()},be.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()},be.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},be.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()},be.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},be.prototype.reset=function(){this._curAttrData=le.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=le.DEFAULT_ATTR_DATA.clone()},be.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},be.prototype.setgLevel=function(Ae){this._charsetService.setgLevel(Ae)},be.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,Ye=De.lines.get(Ze);Ye&&(Ye.fill(Ae),Ye.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},be}(Se.Disposable);Ee.InputHandler=ye},function(tn,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(tn,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Params=void 0;var me=function(){function Be(ke,Pe){if(ke===void 0&&(ke=32),Pe===void 0&&(Pe=32),this.maxLength=ke,this.maxSubParamsLength=Pe,Pe>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(ke),this.length=0,this._subParams=new Int32Array(Pe),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(ke),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return Be.fromArray=function(ke){var Pe=new Be;if(!ke.length)return Pe;for(var Le=ke[0]instanceof Array?1:0;Le<ke.length;++Le){var he=ke[Le];if(he instanceof Array)for(var Se=0;Se<he.length;++Se)Pe.addSubParam(he[Se]);else Pe.addParam(he)}return Pe},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=[],Pe=0;Pe<this.length;++Pe){ke.push(this.params[Pe]);var Le=this._subParamsIdx[Pe]>>8,he=255&this._subParamsIdx[Pe];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 Pe=this._subParamsIdx[ke]>>8,Le=255&this._subParamsIdx[ke];return Le-Pe>0?this._subParams.subarray(Pe,Le):null},Be.prototype.getSubParamsAll=function(){for(var ke={},Pe=0;Pe<this.length;++Pe){var Le=this._subParamsIdx[Pe]>>8,he=255&this._subParamsIdx[Pe];he-Le>0&&(ke[Pe]=this._subParams.slice(Le,he))}return ke},Be.prototype.addDigit=function(ke){var Pe;if(!(this._rejectDigits||!(Pe=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var Le=this._digitIsSub?this._subParams:this.params,he=Le[Pe-1];Le[Pe-1]=~he?Math.min(10*he+ke,2147483647):ke}},Be}();Ee.Params=me},function(tn,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,Se){this._handlers[he]===void 0&&(this._handlers[he]=[]);var xe=this._handlers[he];return xe.push(Se),{dispose:function(){var ge=xe.indexOf(Se);ge!==-1&&xe.splice(ge,1)}}},Le.prototype.setHandler=function(he,Se){this._handlers[he]=[Se]},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 Se=he.length-1;Se>=0;Se--)he[Se].start();else this._handlerFb(this._id,"START")},Le.prototype._put=function(he,Se,xe){var ge=this._handlers[this._id];if(ge)for(var le=ge.length-1;le>=0;le--)ge[le].put(he,Se,xe);else this._handlerFb(this._id,"PUT",Be.utf32ToString(he,Se,xe))},Le.prototype._end=function(he){var Se=this._handlers[this._id];if(Se){for(var xe=Se.length-1;xe>=0&&Se[xe].end(he)===!1;xe--);for(xe--;xe>=0;xe--)Se[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,Se,xe){if(this._state!==3){if(this._state===1)for(;Se<xe;){var ge=he[Se++];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-Se>0&&this._put(he,Se,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 Pe=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,Se,xe){this._hitLimit||(this._data+=Be.utf32ToString(he,Se,xe),this._data.length>me.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},Le.prototype.end=function(he){var Se;return this._hitLimit?Se=!1:he&&(Se=this._handler(this._data)),this._data="",this._hitLimit=!1,Se},Le}();Ee.OscHandler=Pe},function(tn,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.PAYLOAD_LIMIT=void 0,Ee.PAYLOAD_LIMIT=1e7},function(tn,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),Pe=[],Le=function(){function Se(){this._handlers=Object.create(null),this._active=Pe,this._ident=0,this._handlerFb=function(){}}return Se.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},Se.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)}}},Se.prototype.setHandler=function(xe,ge){this._handlers[xe]=[ge]},Se.prototype.clearHandler=function(xe){this._handlers[xe]&&delete this._handlers[xe]},Se.prototype.setHandlerFallback=function(xe){this._handlerFb=xe},Se.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=Pe,this._ident=0},Se.prototype.hook=function(xe,ge){if(this.reset(),this._ident=xe,this._active=this._handlers[xe]||Pe,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)},Se.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))},Se.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=Pe,this._ident=0},Se}();Ee.DcsParser=Le;var he=function(){function Se(xe){this._handler=xe,this._data="",this._hitLimit=!1}return Se.prototype.hook=function(xe){this._params=xe.clone(),this._data="",this._hitLimit=!1},Se.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))},Se.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},Se}();Ee.DcsHandler=he},function(tn,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(Pe,Le,he,Se,xe){for(var ge=me.generateConfig(Se,xe,Pe,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(Pe){for(var Le=0;Le<ke.length;Le++){var he=ke[Le].ownedBy.indexOf(Pe);if(he!==-1){ke[Le].ownedBy.length===1?(ke[Le].atlas.dispose(),ke.splice(Le,1)):ke[Le].ownedBy.splice(he,1);break}}}},function(tn,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,Pe,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:Pe.fontFamily,fontSize:Pe.fontSize,fontWeight:Pe.fontWeight,fontWeightBold:Pe.fontWeightBold,allowTransparency:Pe.allowTransparency,colors:he}},Ee.configEquals=function(Be,ke){for(var Pe=0;Pe<Be.colors.ansi.length;Pe++)if(Be.colors.ansi[Pe].rgba!==ke.colors.ansi[Pe].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(tn,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"),Pe=me.css.toColor("#000000"),Le=me.css.toColor("#ffffff"),he=me.css.toColor("#000000"),Se={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:Pe,cursor:Le,cursorAccent:he,selectionTransparent:Se,selectionOpaque:me.color.blend(Pe,Se),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,Pe),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,Se,!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(ye){return Number(ye)}),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(tn,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(tn,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),Pe=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 Se=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),ye=0;ye<ue.length;ye++)ve.push(ue[ye]);ce=se,ee=z,oe=this._workCell.fg,ie=this._workCell.bg}z+=this._workCell.getChars().length||Pe.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-ce>1)for(ue=this._getJoinedRanges(de,ee,z,le,ce),ye=0;ye<ue.length;ye++)ve.push(ue[ye]);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||Pe.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=Se},function(tn,Ee,Me){"use strict";function me(Be,ke){var Pe=ke.getBoundingClientRect();return[Be.clientX-Pe.left,Be.clientY-Pe.top]}Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.getRawByteCoords=Ee.getCoords=Ee.getCoordsRelativeToElement=void 0,Ee.getCoordsRelativeToElement=me,Ee.getCoords=function(Be,ke,Pe,Le,he,Se,xe,ge){if(he){var le=me(Be,ke);if(le)return le[0]=Math.ceil((le[0]+(ge?Se/2:0))/Se),le[1]=Math.ceil(le[1]/xe),le[0]=Math.min(Math.max(le[0],1),Pe+(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(tn,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,Pe,Le){var he=this;this._rowCount=Le,ke=ke!==void 0?ke:0,Pe=Pe!==void 0?Pe: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,Pe):Pe,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),Pe=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(ke,Pe)}},Be}();Ee.RenderDebouncer=me},function(tn,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(Pe,Le){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(he,Se){he.__proto__=Se}||function(he,Se){for(var xe in Se)Se.hasOwnProperty(xe)&&(he[xe]=Se[xe])})(Pe,Le)},function(Pe,Le){function he(){this.constructor=Pe}me(Pe,Le),Pe.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(Pe){function Le(){var he=Pe!==null&&Pe.apply(this,arguments)||this;return he._currentDevicePixelRatio=window.devicePixelRatio,he}return Be(Le,Pe),Le.prototype.setListener=function(he){var Se=this;this._listener&&this.clearListener(),this._listener=he,this._outerListener=function(){Se._listener&&(Se._listener(window.devicePixelRatio,Se._currentDevicePixelRatio),Se._updateDpr())},this._updateDpr()},Le.prototype.dispose=function(){Pe.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(tn,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 Pe=Array.isArray(Be)?[]:{};for(var Le in Be)Pe[Le]=ke<=1?Be[Le]:Be[Le]?me(Be[Le],ke-1):Be[Le];return Pe}},function(tn,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Terminal=void 0;var me=Me(4),Be=Me(35),ke=Me(18),Pe=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 Se=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 Pe.EventEmitter,this._normal=new Se(this._buffers.normal,"normal"),this._alternate=new Se(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(tn,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(Pt,tt){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(vt,st){vt.__proto__=st}||function(vt,st){for(var jt in st)st.hasOwnProperty(jt)&&(vt[jt]=st[jt])})(Pt,tt)},function(Pt,tt){function vt(){this.constructor=Pt}me(Pt,tt),Pt.prototype=tt===null?Object.create(tt):(vt.prototype=tt.prototype,new vt)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Terminal=void 0;var ke=Me(36),Pe=Me(37),Le=Me(38),he=Me(12),Se=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),ye=Me(16),we=Me(27),be=Me(60),Ae=Me(5),De=Me(61),ze=Me(62),Ze=Me(63),Ye=Me(64),Ge=Me(65),ft=typeof window!="undefined"?window.document:null,at=function(Pt){function tt(vt){vt===void 0&&(vt={});var st=Pt.call(this,vt)||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(jt,lt){return st.refresh(jt,lt)})),st.register(st._inputHandler.onRequestReset(function(){return st.reset()})),st.register(st._inputHandler.onRequestScroll(function(jt,lt){return st.scroll(jt,lt||void 0)})),st.register(st._inputHandler.onRequestWindowsOptionsReport(function(jt){return st._reportWindowsOptions(jt)})),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(jt){return st._afterResize(jt.cols,jt.rows)})),st}return Be(tt,Pt),Object.defineProperty(tt.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(tt.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(tt.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(tt.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(tt.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(tt.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(tt.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(tt.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(tt.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(tt.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),tt.prototype.dispose=function(){var vt,st,jt;this._isDisposed||(Pt.prototype.dispose.call(this),(vt=this._renderService)===null||vt===void 0||vt.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(jt=(st=this.element)===null||st===void 0?void 0:st.parentNode)===null||jt===void 0||jt.removeChild(this.element))},tt.prototype._setup=function(){Pt.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(tt.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),tt.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},tt.prototype._updateOptions=function(vt){var st,jt,lt,et;switch(Pt.prototype._updateOptions.call(this,vt),vt){case"fontFamily":case"fontSize":(st=this._renderService)===null||st===void 0||st.clear(),(jt=this._charSizeService)===null||jt===void 0||jt.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)):((et=this._accessibilityManager)===null||et===void 0||et.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},tt.prototype._onTextAreaFocus=function(vt){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(he.C0.ESC+"[I"),this.updateCursorStyle(vt),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},tt.prototype.blur=function(){var vt;return(vt=this.textarea)===null||vt===void 0?void 0:vt.blur()},tt.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()},tt.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var vt=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),st=this._bufferService.buffer.y*vt,jt=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=jt+"px",this.textarea.style.top=st+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=vt+"px",this.textarea.style.lineHeight=vt+"px",this.textarea.style.zIndex="-5"}},tt.prototype._initGlobal=function(){var vt=this;this._bindKeys(),this.register(de.addDisposableDomListener(this.element,"copy",function(jt){vt.hasSelection()&&Le.copyHandler(jt,vt._selectionService)}));var st=function(jt){return Le.handlePasteEvent(jt,vt.textarea,vt._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(jt){jt.button===2&&Le.rightClickHandler(jt,vt.textarea,vt.screenElement,vt._selectionService,vt.options.rightClickSelectsWord)})):this.register(de.addDisposableDomListener(this.element,"contextmenu",function(jt){Le.rightClickHandler(jt,vt.textarea,vt.screenElement,vt._selectionService,vt.options.rightClickSelectsWord)})),ve.isLinux&&this.register(de.addDisposableDomListener(this.element,"auxclick",function(jt){jt.button===1&&Le.moveTextAreaUnderMouseCursor(jt,vt.textarea,vt.screenElement)}))},tt.prototype._bindKeys=function(){var vt=this;this.register(de.addDisposableDomListener(this.textarea,"keyup",function(st){return vt._keyUp(st)},!0)),this.register(de.addDisposableDomListener(this.textarea,"keydown",function(st){return vt._keyDown(st)},!0)),this.register(de.addDisposableDomListener(this.textarea,"keypress",function(st){return vt._keyPress(st)},!0)),this.register(de.addDisposableDomListener(this.textarea,"compositionstart",function(){return vt._compositionHelper.compositionstart()})),this.register(de.addDisposableDomListener(this.textarea,"compositionupdate",function(st){return vt._compositionHelper.compositionupdate(st)})),this.register(de.addDisposableDomListener(this.textarea,"compositionend",function(){return vt._compositionHelper.compositionend()})),this.register(this.onRender(function(){return vt._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(st){return vt._queueLinkification(st.start,st.end)}))},tt.prototype.open=function(vt){var st=this;if(!vt)throw new Error("Terminal requires a parent element.");ft.body.contains(vt)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=vt.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"),vt.appendChild(this.element);var jt=ft.createDocumentFragment();this._viewportElement=ft.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),jt.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),jt.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(Ye.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(jt),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 et=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(be.RenderService,et,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(Pe.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()},tt.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+'"')}},tt.prototype._setTheme=function(vt){var st,jt,lt;this._theme=vt,(st=this._colorManager)===null||st===void 0||st.setTheme(vt),(jt=this._renderService)===null||jt===void 0||jt.setColors(this._colorManager.colors),(lt=this.viewport)===null||lt===void 0||lt.onThemeChange(this._colorManager.colors)},tt.prototype.bindMouse=function(){var vt=this,st=this,jt=this.element;function lt(Bt){var Ht,hn,Qt=st._mouseService.getRawByteCoords(Bt,st.screenElement,st.cols,st.rows);if(!Qt)return!1;switch(Bt.overrideType||Bt.type){case"mousemove":hn=32,Bt.buttons===void 0?(Ht=3,Bt.button!==void 0&&(Ht=Bt.button<3?Bt.button:3)):Ht=1&Bt.buttons?0:4&Bt.buttons?1:2&Bt.buttons?2:3;break;case"mouseup":hn=0,Ht=Bt.button<3?Bt.button:3;break;case"mousedown":hn=1,Ht=Bt.button<3?Bt.button:3;break;case"wheel":Bt.deltaY!==0&&(hn=Bt.deltaY<0?0:1),Ht=4;break;default:return!1}return!(hn===void 0||Ht===void 0||Ht>4)&&st._coreMouseService.triggerMouseEvent({col:Qt.x-33,row:Qt.y-33,button:Ht,action:hn,ctrl:Bt.ctrlKey,alt:Bt.altKey,shift:Bt.shiftKey})}var et={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ut=function(Bt){return lt(Bt),Bt.buttons||(vt._document.removeEventListener("mouseup",et.mouseup),et.mousedrag&&vt._document.removeEventListener("mousemove",et.mousedrag)),vt.cancel(Bt)},mt=function(Bt){return lt(Bt),Bt.preventDefault(),vt.cancel(Bt)},_t=function(Bt){Bt.buttons&<(Bt)},gt=function(Bt){Bt.buttons||lt(Bt)};this.register(this._coreMouseService.onProtocolChange(function(Bt){Bt?(vt.optionsService.options.logLevel==="debug"&&vt._logService.debug("Binding to mouse events:",vt._coreMouseService.explainEvents(Bt)),vt.element.classList.add("enable-mouse-events"),vt._selectionService.disable()):(vt._logService.debug("Unbinding from mouse events."),vt.element.classList.remove("enable-mouse-events"),vt._selectionService.enable()),8&Bt?et.mousemove||(jt.addEventListener("mousemove",gt),et.mousemove=gt):(jt.removeEventListener("mousemove",et.mousemove),et.mousemove=null),16&Bt?et.wheel||(jt.addEventListener("wheel",mt,{passive:!1}),et.wheel=mt):(jt.removeEventListener("wheel",et.wheel),et.wheel=null),2&Bt?et.mouseup||(et.mouseup=ut):(vt._document.removeEventListener("mouseup",et.mouseup),et.mouseup=null),4&Bt?et.mousedrag||(et.mousedrag=_t):(vt._document.removeEventListener("mousemove",et.mousedrag),et.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(de.addDisposableDomListener(jt,"mousedown",function(Bt){if(Bt.preventDefault(),vt.focus(),vt._coreMouseService.areMouseEventsActive&&!vt._selectionService.shouldForceSelection(Bt))return lt(Bt),et.mouseup&&vt._document.addEventListener("mouseup",et.mouseup),et.mousedrag&&vt._document.addEventListener("mousemove",et.mousedrag),vt.cancel(Bt)})),this.register(de.addDisposableDomListener(jt,"wheel",function(Bt){if(!et.wheel){if(!vt.buffer.hasScrollback){var Ht=vt.viewport.getLinesScrolled(Bt);if(Ht===0)return;for(var hn=he.C0.ESC+(vt._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Bt.deltaY<0?"A":"B"),Qt="",bn=0;bn<Math.abs(Ht);bn++)Qt+=hn;vt._coreService.triggerDataEvent(Qt,!0)}}},{passive:!0})),this.register(de.addDisposableDomListener(jt,"wheel",function(Bt){if(!et.wheel)return vt.viewport.onWheel(Bt)?void 0:vt.cancel(Bt)},{passive:!1})),this.register(de.addDisposableDomListener(jt,"touchstart",function(Bt){if(!vt._coreMouseService.areMouseEventsActive)return vt.viewport.onTouchStart(Bt),vt.cancel(Bt)},{passive:!0})),this.register(de.addDisposableDomListener(jt,"touchmove",function(Bt){if(!vt._coreMouseService.areMouseEventsActive)return vt.viewport.onTouchMove(Bt)?void 0:vt.cancel(Bt)},{passive:!1}))},tt.prototype.refresh=function(vt,st){var jt;(jt=this._renderService)===null||jt===void 0||jt.refreshRows(vt,st)},tt.prototype._queueLinkification=function(vt,st){var jt;(jt=this.linkifier)===null||jt===void 0||jt.linkifyRows(vt,st)},tt.prototype.updateCursorStyle=function(vt){this._selectionService&&this._selectionService.shouldColumnSelect(vt)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},tt.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},tt.prototype.scrollLines=function(vt,st){Pt.prototype.scrollLines.call(this,vt,st),this.refresh(0,this.rows-1)},tt.prototype.paste=function(vt){Le.paste(vt,this.textarea,this._coreService)},tt.prototype.attachCustomKeyEventHandler=function(vt){this._customKeyEventHandler=vt},tt.prototype.registerLinkMatcher=function(vt,st,jt){var lt=this.linkifier.registerLinkMatcher(vt,st,jt);return this.refresh(0,this.rows-1),lt},tt.prototype.deregisterLinkMatcher=function(vt){this.linkifier.deregisterLinkMatcher(vt)&&this.refresh(0,this.rows-1)},tt.prototype.registerLinkProvider=function(vt){return this.linkifier2.registerLinkProvider(vt)},tt.prototype.registerCharacterJoiner=function(vt){var st=this._renderService.registerCharacterJoiner(vt);return this.refresh(0,this.rows-1),st},tt.prototype.deregisterCharacterJoiner=function(vt){this._renderService.deregisterCharacterJoiner(vt)&&this.refresh(0,this.rows-1)},Object.defineProperty(tt.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),tt.prototype.addMarker=function(vt){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+vt)},tt.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},tt.prototype.select=function(vt,st,jt){this._selectionService.setSelection(vt,st,jt)},tt.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},tt.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]}},tt.prototype.clearSelection=function(){var vt;(vt=this._selectionService)===null||vt===void 0||vt.clearSelection()},tt.prototype.selectAll=function(){var vt;(vt=this._selectionService)===null||vt===void 0||vt.selectAll()},tt.prototype.selectLines=function(vt,st){var jt;(jt=this._selectionService)===null||jt===void 0||jt.selectLines(vt,st)},tt.prototype._keyDown=function(vt){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(vt)===!1)return!1;if(!this._compositionHelper.keydown(vt))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var st=se.evaluateKeyboardEvent(vt,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(vt),st.type===3||st.type===2){var jt=this.rows-1;return this.scrollLines(st.type===2?-jt:jt),this.cancel(vt,!0)}return st.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,vt)||(st.cancel&&this.cancel(vt,!0),!st.key||(st.key!==he.C0.ETX&&st.key!==he.C0.CR||(this.textarea.value=""),this._onKey.fire({key:st.key,domEvent:vt}),this._showCursor(),this._coreService.triggerDataEvent(st.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(vt,!0)))},tt.prototype._isThirdLevelShift=function(vt,st){var jt=vt.isMac&&!this.options.macOptionIsMeta&&st.altKey&&!st.ctrlKey&&!st.metaKey||vt.isWindows&&st.altKey&&st.ctrlKey&&!st.metaKey;return st.type==="keypress"?jt:jt&&(!st.keyCode||st.keyCode>47)},tt.prototype._keyUp=function(vt){this._customKeyEventHandler&&this._customKeyEventHandler(vt)===!1||(function(st){return st.keyCode===16||st.keyCode===17||st.keyCode===18}(vt)||this.focus(),this.updateCursorStyle(vt))},tt.prototype._keyPress=function(vt){var st;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(vt)===!1)return!1;if(this.cancel(vt),vt.charCode)st=vt.charCode;else if(vt.which===null||vt.which===void 0)st=vt.keyCode;else{if(vt.which===0||vt.charCode===0)return!1;st=vt.which}return!(!st||(vt.altKey||vt.ctrlKey||vt.metaKey)&&!this._isThirdLevelShift(this.browser,vt))&&(st=String.fromCharCode(st),this._onKey.fire({key:st,domEvent:vt}),this._showCursor(),this._coreService.triggerDataEvent(st,!0),!0)},tt.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},tt.prototype.resize=function(vt,st){vt!==this.cols||st!==this.rows?Pt.prototype.resize.call(this,vt,st):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},tt.prototype._afterResize=function(vt,st){var jt,lt;(jt=this._charSizeService)===null||jt===void 0||jt.measure(),(lt=this.viewport)===null||lt===void 0||lt.syncScrollArea(!0)},tt.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 vt=1;vt<this.rows;vt++)this.buffer.lines.push(this.buffer.getBlankLine(ye.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},tt.prototype.reset=function(){var vt,st;this.options.rows=this.rows,this.options.cols=this.cols;var jt=this._customKeyEventHandler;this._setup(),Pt.prototype.reset.call(this),(vt=this._selectionService)===null||vt===void 0||vt.reset(),this._customKeyEventHandler=jt,this.refresh(0,this.rows-1),(st=this.viewport)===null||st===void 0||st.syncScrollArea()},tt.prototype._reportWindowsOptions=function(vt){if(this._renderService)switch(vt){case Se.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var st=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),jt=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(he.C0.ESC+"[4;"+jt+";"+st+"t");break;case Se.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var lt=this._renderService.dimensions.scaledCellWidth.toFixed(0),et=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(he.C0.ESC+"[6;"+et+";"+lt+"t")}},tt.prototype.cancel=function(vt,st){if(this.options.cancelEvents||st)return vt.preventDefault(),vt.stopPropagation(),!1},tt.prototype._visualBell=function(){return!1},tt.prototype._soundBell=function(){return this.options.bellStyle==="sound"},tt}(Ge.CoreTerminal);Ee.Terminal=at},function(tn,Ee,Me){"use strict";var me=this&&this.__decorate||function(he,Se,xe,ge){var le,ve=arguments.length,de=ve<3?Se:ge===null?ge=Object.getOwnPropertyDescriptor(Se,xe):ge;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")de=Reflect.decorate(he,Se,xe,ge);else for(var ce=he.length-1;ce>=0;ce--)(le=he[ce])&&(de=(ve<3?le(de):ve>3?le(Se,xe,de):le(Se,xe))||de);return ve>3&&de&&Object.defineProperty(Se,xe,de),de},Be=this&&this.__param||function(he,Se){return function(xe,ge){Se(xe,ge,he)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CompositionHelper=void 0;var ke=Me(5),Pe=Me(1),Le=function(){function he(Se,xe,ge,le,ve,de){this._textarea=Se,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(Se){var xe=this;this._compositionView.textContent=Se.data,this.updateCompositionElements(),setTimeout(function(){xe._compositionPosition.end=xe._textarea.value.length},0)},he.prototype.compositionend=function(){this._finalizeComposition(!0)},he.prototype.keydown=function(Se){if(this._isComposing||this._isSendingComposition){if(Se.keyCode===229||Se.keyCode===16||Se.keyCode===17||Se.keyCode===18)return!1;this._finalizeComposition(!1)}return Se.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},he.prototype._finalizeComposition=function(Se){var xe=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,Se){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 Se=this,xe=this._textarea.value;setTimeout(function(){if(!Se._isComposing){var ge=Se._textarea.value.replace(xe,"");ge.length>0&&Se._coreService.triggerDataEvent(ge,!0)}},0)},he.prototype.updateCompositionElements=function(Se){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"}Se||setTimeout(function(){return xe.updateCompositionElements(!0)},0)}},he=me([Be(2,Pe.IBufferService),Be(3,Pe.IOptionsService),Be(4,ke.ICharSizeService),Be(5,Pe.ICoreService)],he)}();Ee.CompositionHelper=Le},function(tn,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},Pe=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),Se=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([Pe(3,xe.IBufferService),Pe(4,xe.IOptionsService),Pe(5,Se.ICharSizeService),Pe(6,Se.IRenderService)],ve)}(Le.Disposable);Ee.Viewport=ge},function(tn,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,Se){Le=Be(Le=me(Le),Se.decPrivateModes.bracketedPasteMode),Se.triggerDataEvent(Le,!0),he.value=""}function Pe(Le,he,Se){var xe=Se.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,Se){Le.stopPropagation(),Le.clipboardData&&ke(Le.clipboardData.getData("text/plain"),he,Se)},Ee.paste=ke,Ee.moveTextAreaUnderMouseCursor=Pe,Ee.rightClickHandler=function(Le,he,Se,xe,ge){Pe(Le,he,Se),ge&&!xe.isClickInSelection(Le)&&xe.selectWordAtCursor(Le),he.value=xe.selectionText,he.select()}},function(tn,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),Pe=Me(15),Le=Me(21),he=Me(22),Se=Me(24),xe=function(){function le(ve){this.table=new Uint8Array(ve)}return le.prototype.setDefault=function(ve,de){Pe.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 Se.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,ye=this._params,we=this._transitions.table,be=0;be<ce;++be){switch((ee=we[oe<<8|((z=de[be])<160?z:160)])>>4){case 2:for(var Ae=be+1;;++Ae){if(Ae>=ce||(z=de[Ae])<32||z>126&&z<160){this._printHandler(de,be,Ae),be=Ae-1;break}if(++Ae>=ce||(z=de[Ae])<32||z>126&&z<160){this._printHandler(de,be,Ae),be=Ae-1;break}if(++Ae>=ce||(z=de[Ae])<32||z>126&&z<160){this._printHandler(de,be,Ae),be=Ae-1;break}if(++Ae>=ce||(z=de[Ae])<32||z>126&&z<160){this._printHandler(de,be,Ae),be=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:be,code:z,currentState:oe,collect:ue,params:ye,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](ye)===!1;ze--);ze<0&&this._csiHandlerFb(ue<<8|z,ye),this.precedingCodepoint=0;break;case 8:do switch(z){case 59:ye.addParam(0);break;case 58:ye.addSubParam(-1);break;default:ye.addDigit(z-48)}while(++be<ce&&(z=de[be])>47&&z<60);be--;break;case 9:ue<<=8,ue|=z;break;case 10:for(var Ze=this._escHandlers[ue<<8|z],Ye=Ze?Ze.length-1:-1;Ye>=0&&Ze[Ye]()===!1;Ye--);Ye<0&&this._escHandlerFb(ue<<8|z),this.precedingCodepoint=0;break;case 11:ye.reset(),ye.addParam(0),ue=0;break;case 12:se.hook(ue<<8|z,ye);break;case 13:for(var Ge=be+1;;++Ge)if(Ge>=ce||(z=de[Ge])===24||z===26||z===27||z>127&&z<160){se.put(de,be,Ge),be=Ge-1;break}break;case 14:se.unhook(z!==24&&z!==26),z===27&&(ee|=1),ye.reset(),ye.addParam(0),ue=0,this.precedingCodepoint=0;break;case 4:ie.start();break;case 5:for(var ft=be+1;;ft++)if(ft>=ce||(z=de[ft])<32||z>127&&z<=159){ie.put(de,be,ft),be=ft-1;break}break;case 6:ie.end(z!==24&&z!==26),z===27&&(ee|=1),ye.reset(),ye.addParam(0),ue=0,this.precedingCodepoint=0}oe=15&ee}this._collect=ue,this.currentState=oe},ve}(ke.Disposable);Ee.EscapeSequenceParser=ge},function(tn,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(ie,se){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ue,ye){ue.__proto__=ye}||function(ue,ye){for(var we in ye)ye.hasOwnProperty(we)&&(ue[we]=ye[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,ye){var we,be=arguments.length,Ae=be<3?se:ye===null?ye=Object.getOwnPropertyDescriptor(se,ue):ye;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ae=Reflect.decorate(ie,se,ue,ye);else for(var De=ie.length-1;De>=0;De--)(we=ie[De])&&(Ae=(be<3?we(Ae):be>3?we(se,ue,Ae):we(se,ue))||Ae);return be>3&&Ae&&Object.defineProperty(se,ue,Ae),Ae},Pe=this&&this.__param||function(ie,se){return function(ue,ye){se(ue,ye,ie)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Renderer=void 0;var Le=Me(41),he=Me(47),Se=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,ye,we,be,Ae,De,ze,Ze,Ye){var Ge=ie.call(this)||this;Ge._colors=ue,Ge._screenElement=ye,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,be,Ge._bufferService,ze),new Se.CursorRenderLayer(Ge._screenElement,3,Ge._colors,Ge._id,Ge._onRequestRedraw,Ge._bufferService,ze,Ze,Ye)],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,ye=this._renderLayers;ue<ye.length;ue++)ye[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 ye=0,we=this._renderLayers;ye<we.length;ye++){var be=we[ye];be.setColors(this._colors),be.reset()}},se.prototype.onResize=function(ue,ye){this._updateDimensions();for(var we=0,be=this._renderLayers;we<be.length;we++)be[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,ye,we){we===void 0&&(we=!1),this._runOperation(function(be){return be.onSelectionChanged(ue,ye,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 ye=0,we=this._renderLayers;ye<we.length;ye++)ue(we[ye])},se.prototype.renderRows=function(ue,ye){for(var we=0,be=this._renderLayers;we<be.length;we++)be[we].onGridChanged(ue,ye)},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([Pe(4,de.IBufferService),Pe(5,ve.ICharSizeService),Pe(6,de.IOptionsService),Pe(7,de.ICoreService),Pe(8,ve.ICoreBrowserService)],se)}(le.Disposable);Ee.Renderer=oe},function(tn,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),Pe=Me(13),Le=Me(6),he=Me(3),Se=Me(29),xe=Me(4),ge=function(le){function ve(de,ce,z,ee,oe,ie,se,ue){var ye=le.call(this,de,"text",ce,oe,z,ie,se,ue)||this;return ye._characterWidth=0,ye._characterFont="",ye._characterOverlapCache={},ye._workCell=new xe.CellData,ye._state=new ke.GridCache,ye._characterJoinerRegistry=ee,ye}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):[],ye=0;ye<this._bufferService.cols;ye++){se.loadCell(ye,this._workCell);var we=this._workCell,be=!1,Ae=ye;if(we.getWidth()!==0){if(ue.length>0&&ye===ue[0][0]){be=!0;var De=ue.shift();we=new Se.JoinedCellData(this._workCell,se.translateToString(!0,De[0],De[1]),De[1]-De[0]),Ae=De[1]-1}!be&&this._isOverlapping(we)&&Ae<se.length-1&&se.getCodePoint(Ae+1)===he.NULL_CELL_CODE&&(we.content&=-12582913,we.content|=2<<22),ee(we,ye,oe),ye=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(ye,we,be){var Ae=null;ye.isInverse()?Ae=ye.isFgDefault()?z._colors.foreground.css:ye.isFgRGB()?"rgb("+Le.AttributeData.toColorRGB(ye.getFgColor()).join(",")+")":z._colors.ansi[ye.getFgColor()].css:ye.isBgRGB()?Ae="rgb("+Le.AttributeData.toColorRGB(ye.getBgColor()).join(",")+")":ye.isBgPalette()&&(Ae=z._colors.ansi[ye.getBgColor()].css),ue===null&&(ie=we,se=be),be!==se?(ee.fillStyle=ue||"",z._fillCells(ie,se,oe-ie,1),ie=we,se=be):ue!==Ae&&(ee.fillStyle=ue||"",z._fillCells(ie,se,we-ie,1),ie=we,se=be),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}(Pe.BaseRenderLayer);Ee.TextRenderLayer=ge},function(tn,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,Pe){for(var Le=0;Le<ke;Le++){this.cache.length<=Le&&this.cache.push([]);for(var he=this.cache[Le].length;he<Pe;he++)this.cache[Le].push(void 0);this.cache[Le].length=Pe}this.cache.length=ke},Be.prototype.clear=function(){for(var ke=0;ke<this.cache.length;ke++)for(var Pe=0;Pe<this.cache[ke].length;Pe++)this.cache[ke][Pe]=void 0},Be}();Ee.GridCache=me},function(tn,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),Pe=Me(44),Le=Me(27),he=Me(46),Se=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 ye=se._width*se._height;return se._cacheMap=new he.LRUMap(ye),se._cacheMap.prealloc(ye),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 ye=ve(ie),we=this._cacheMap.get(ye);if(we!=null)return this._drawFromCache(oe,we,se,ue),!0;if(this._drawToCacheCount<100){var be=void 0;be=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var Ae=this._drawToCache(ie,be);return this._cacheMap.set(ye,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 ye=this._toCoordinateX(ie.index),we=this._toCoordinateY(ie.index);oe.drawImage(ie.inBitmap?this._bitmap:this._cacheCanvas,ye,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,ye=oe.italic?"italic":"";this._tmpCtx.font=ye+" "+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),be=!1;this._config.allowTransparency||(be=function(Ze,Ye){for(var Ge=!0,ft=Ye.rgba>>>24,at=Ye.rgba>>>16&255,Pt=Ye.rgba>>>8&255,tt=0;tt<Ze.data.length;tt+=4)Ze.data[tt]===ft&&Ze.data[tt+1]===at&&Ze.data[tt+2]===Pt?Ze.data[tt+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:be,inBitmap:!1};return this._addGlyphToBitmap(ze),ze},ee.prototype._addGlyphToBitmap=function(oe){var ie=this;!("createImageBitmap"in window)||Se.isFirefox||Se.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}(Pe.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}(Pe.BaseCharAtlas);Ee.NoneCharAtlas=ce},function(tn,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(tn,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,Pe,Le){this._rgba[ke]||(this._rgba[ke]={}),this._rgba[ke][Pe]=Le},Be.prototype.getCss=function(ke,Pe){return this._rgba[ke]?this._rgba[ke][Pe]:void 0},Be.prototype.setColor=function(ke,Pe,Le){this._color[ke]||(this._color[ke]={}),this._color[ke][Pe]=Le},Be.prototype.getColor=function(ke,Pe){return this._color[ke]?this._color[ke][Pe]:void 0},Be}();Ee.ColorContrastCache=me},function(tn,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 Pe=ke.prev,Le=ke.next;ke===this._head&&(this._head=Le),ke===this._tail&&(this._tail=Pe),Pe!==null&&(Pe.next=Le),Le!==null&&(Le.prev=Pe)},Be.prototype._appendNode=function(ke){var Pe=this._tail;Pe!==null&&(Pe.next=ke),ke.prev=Pe,ke.next=null,this._tail=ke,this._head===null&&(this._head=ke)},Be.prototype.prealloc=function(ke){for(var Pe=this._nodePool,Le=0;Le<ke;Le++)Pe.push({prev:null,next:null,key:null,value:null})},Be.prototype.get=function(ke){var Pe=this._map[ke];return Pe!==void 0?(this._unlinkNode(Pe),this._appendNode(Pe),Pe.value):null},Be.prototype.peekValue=function(ke){var Pe=this._map[ke];return Pe!==void 0?Pe.value:null},Be.prototype.peek=function(){var ke=this._head;return ke===null?null:ke.value},Be.prototype.set=function(ke,Pe){var Le=this._map[ke];if(Le!==void 0)Le=this._map[ke],this._unlinkNode(Le),Le.value=Pe;else if(this.size>=this.capacity)Le=this._head,this._unlinkNode(Le),delete this._map[Le.key],Le.key=ke,Le.value=Pe,this._map[ke]=Le;else{var he=this._nodePool;he.length>0?((Le=he.pop()).key=ke,Le.value=Pe):Le={prev:null,next:null,key:ke,value:Pe},this._map[ke]=Le,this.size++}this._appendNode(Le)},Be}();Ee.LRUMap=me},function(tn,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(Pe,Le){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(he,Se){he.__proto__=Se}||function(he,Se){for(var xe in Se)Se.hasOwnProperty(xe)&&(he[xe]=Se[xe])})(Pe,Le)},function(Pe,Le){function he(){this.constructor=Pe}me(Pe,Le),Pe.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(Pe){function Le(he,Se,xe,ge,le,ve){var de=Pe.call(this,he,"selection",Se,!0,xe,ge,le,ve)||this;return de._clearState(),de}return Be(Le,Pe),Le.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},Le.prototype.resize=function(he){Pe.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,Se,xe){if(this._didStateChange(he,Se,xe,this._bufferService.buffer.ydisp))if(this._clearAll(),he&&Se){var ge=he[1]-this._bufferService.buffer.ydisp,le=Se[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=Se[0]-ce,ee=de-ve+1;this._fillCells(ce,ve,z,ee)}else{ce=ge===ve?he[0]:0;var oe=ve===de?Se[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?Se[0]:this._bufferService.cols;this._fillCells(0,de,se,1)}}this._state.start=[he[0],he[1]],this._state.end=[Se[0],Se[1]],this._state.columnSelectMode=xe,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},Le.prototype._didStateChange=function(he,Se,xe,ge){return!this._areCoordinatesEqual(he,this._state.start)||!this._areCoordinatesEqual(Se,this._state.end)||xe!==this._state.columnSelectMode||ge!==this._state.ydisp},Le.prototype._areCoordinatesEqual=function(he,Se){return!(!he||!Se)&&he[0]===Se[0]&&he[1]===Se[1]},Le}(Me(13).BaseRenderLayer);Ee.SelectionRenderLayer=ke},function(tn,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(Se,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])})(Se,xe)},function(Se,xe){function ge(){this.constructor=Se}me(Se,xe),Se.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),Pe=Me(4),Le=function(Se){function xe(ge,le,ve,de,ce,z,ee,oe,ie){var se=Se.call(this,ge,"cursor",le,!0,ve,de,z,ee)||this;return se._onRequestRedraw=ce,se._coreService=oe,se._coreBrowserService=ie,se._cell=new Pe.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,Se),xe.prototype.resize=function(ge){Se.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 Se(xe,ge){this._renderCallback=ge,this.isCursorVisible=!0,xe&&this._restartInterval()}return Object.defineProperty(Se.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),Se.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)},Se.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})))},Se.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)},Se.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)},Se.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},Se}()},function(tn,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(Se,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])})(Se,xe)},function(Se,xe){function ge(){this.constructor=Se}me(Se,xe),Se.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),Pe=Me(9),Le=Me(26),he=function(Se){function xe(ge,le,ve,de,ce,z,ee,oe){var ie=Se.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,Se),xe.prototype.resize=function(ge){Se.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===Pe.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(tn,Ee,Me){"use strict";var me=this&&this.__decorate||function(Se,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(Se,xe,ge,le);else for(var z=Se.length-1;z>=0;z--)(ve=Se[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(Se,xe){return function(ge,le){xe(ge,le,Se)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.MouseZone=Ee.Linkifier=void 0;var ke=Me(0),Pe=Me(1),Le=function(){function Se(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(Se.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),Se.prototype.attachToDom=function(xe,ge){this._element=xe,this._mouseZoneManager=ge},Se.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()},Se._timeBeforeLatency))},Se.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")},Se.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},Se.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)},Se.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},Se.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 ye=ue.getFg(se[1]),we=ye?ye>>9&511:void 0;le.validationCallback?le.validationCallback(ie,function(be){de._rowsTimeoutId||be&&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";);},Se.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 ye=window.open();ye?(ye.opener=null,ye.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)}))}},Se.prototype._createLinkHoverEvent=function(xe,ge,le,ve,de){return{x1:xe,y1:ge,x2:le,y2:ve,cols:this._bufferService.cols,fg:de}},Se._timeBeforeLatency=200,Se=me([Be(0,Pe.IBufferService),Be(1,Pe.ILogService),Be(2,Pe.IUnicodeService)],Se)}();Ee.Linkifier=Le;var he=function(Se,xe,ge,le,ve,de,ce,z,ee){this.x1=Se,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(tn,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(ie,se){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ue,ye){ue.__proto__=ye}||function(ue,ye){for(var we in ye)ye.hasOwnProperty(we)&&(ue[we]=ye[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,ye){var we,be=arguments.length,Ae=be<3?se:ye===null?ye=Object.getOwnPropertyDescriptor(se,ue):ye;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ae=Reflect.decorate(ie,se,ue,ye);else for(var De=ie.length-1;De>=0;De--)(we=ie[De])&&(Ae=(be<3?we(Ae):be>3?we(se,ue,Ae):we(se,ue))||Ae);return be>3&&Ae&&Object.defineProperty(se,ue,Ae),Ae},Pe=this&&this.__param||function(ie,se){return function(ue,ye){se(ue,ye,ie)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.SelectionService=void 0;var Le=Me(11),he=Me(52),Se=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,ye,we,be,Ae,De,ze){var Ze=ie.call(this)||this;return Ze._element=ue,Ze._screenElement=ye,Ze._bufferService=we,Ze._coreService=be,Ze._mouseService=Ae,Ze._optionsService=De,Ze._renderService=ze,Ze._dragScrollAmount=0,Ze._enabled=!0,Ze._workCell=new Se.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(Ye){return Ze._onMouseMove(Ye)},Ze._mouseUpListener=function(Ye){return Ze._onMouseUp(Ye)},Ze._coreService.onUserInput(function(){Ze.hasSelection&&Ze.clearSelection()}),Ze._trimListener=Ze._bufferService.buffer.lines.onTrim(function(Ye){return Ze._onTrim(Ye)}),Ze.register(Ze._bufferService.buffers.onBufferActivate(function(Ye){return Ze._onBufferActivate(Ye)})),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,ye=this._model.finalSelectionEnd;return!(!ue||!ye)&&(ue[0]!==ye[0]||ue[1]!==ye[1])},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"selectionText",{get:function(){var ue=this._model.finalSelectionStart,ye=this._model.finalSelectionEnd;if(!ue||!ye)return"";var we=this._bufferService.buffer,be=[];if(this._activeSelectionMode===3){if(ue[0]===ye[0])return"";for(var Ae=ue[1];Ae<=ye[1];Ae++){var De=we.translateBufferLineToString(Ae,!0,ue[0],ye[0]);be.push(De)}}else{var ze=ue[1]===ye[1]?ye[0]:void 0;for(be.push(we.translateBufferLineToString(ue[1],!0,ue[0],ze)),Ae=ue[1]+1;Ae<=ye[1]-1;Ae++){var Ze=we.lines.get(Ae);De=we.translateBufferLineToString(Ae,!0),Ze&&Ze.isWrapped?be[be.length-1]+=De:be.push(De)}ue[1]!==ye[1]&&(Ze=we.lines.get(ye[1]),De=we.translateBufferLineToString(ye[1],!0,0,ye[0]),Ze&&Ze.isWrapped?be[be.length-1]+=De:be.push(De))}return be.map(function(Ye){return Ye.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 ye=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return ye._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 ye=this._getMouseBufferCoords(ue),we=this._model.finalSelectionStart,be=this._model.finalSelectionEnd;return!!(we&&be&&ye)&&this._areCoordsInSelection(ye,we,be)},se.prototype._areCoordsInSelection=function(ue,ye,we){return ue[1]>ye[1]&&ue[1]<we[1]||ye[1]===we[1]&&ue[1]===ye[1]&&ue[0]>=ye[0]&&ue[0]<we[0]||ye[1]<we[1]&&ue[1]===we[1]&&ue[0]<we[0]||ye[1]<we[1]&&ue[1]===ye[1]&&ue[0]>=ye[0]},se.prototype.selectWordAtCursor=function(ue){var ye=this._getMouseBufferCoords(ue);ye&&(this._selectWordAt(ye,!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,ye){this._model.clearSelection(),ue=Math.max(ue,0),ye=Math.min(ye,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,ue],this._model.selectionEnd=[this._bufferService.cols,ye],this.refresh(),this._onSelectionChange.fire()},se.prototype._onTrim=function(ue){this._model.onTrim(ue)&&this.refresh()},se.prototype._getMouseBufferCoords=function(ue){var ye=this._mouseService.getCoords(ue,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(ye)return ye[0]--,ye[1]--,ye[1]+=this._bufferService.buffer.ydisp,ye},se.prototype._getMouseEventScrollAmount=function(ue){var ye=ve.getCoordsRelativeToElement(ue,this._screenElement)[1],we=this._renderService.dimensions.canvasHeight;return ye>=0&&ye<=we?0:(ye>we&&(ye-=we),ye=Math.min(Math.max(ye,-50),50),(ye/=50)/Math.abs(ye)+Math.round(14*ye))},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 ye=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);ye&&ye.length!==this._model.selectionStart[0]&&ye.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},se.prototype._onDoubleClick=function(ue){var ye=this._getMouseBufferCoords(ue);ye&&(this._activeSelectionMode=1,this._selectWordAt(ye,!0))},se.prototype._onTripleClick=function(ue){var ye=this._getMouseBufferCoords(ue);ye&&(this._activeSelectionMode=2,this._selectLineAt(ye[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 ye=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 be=we.lines.get(this._model.selectionEnd[1]);be&&be.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}ye&&ye[0]===this._model.selectionEnd[0]&&ye[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 ye=ue.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&ye<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 be=de.moveToCellSequence(we[0]-1,we[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(be,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},se.prototype._onBufferActivate=function(ue){var ye=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=ue.activeBuffer.lines.onTrim(function(we){return ye._onTrim(we)})},se.prototype._convertViewportColToCharacterIndex=function(ue,ye){for(var we=ye[0],be=0;ye[0]>=be;be++){var Ae=ue.loadCell(be,this._workCell).getChars().length;this._workCell.getWidth()===0?we--:Ae>1&&ye[0]!==be&&(we+=Ae-1)}return we},se.prototype.setSelection=function(ue,ye,we){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[ue,ye],this._model.selectionStartLength=we,this.refresh()},se.prototype._getWordAt=function(ue,ye,we,be){if(we===void 0&&(we=!0),be===void 0&&(be=!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),Ye=Ze,Ge=ue[0]-Ze,ft=0,at=0,Pt=0,tt=0;if(ze.charAt(Ze)===" "){for(;Ze>0&&ze.charAt(Ze-1)===" ";)Ze--;for(;Ye<ze.length&&ze.charAt(Ye+1)===" ";)Ye++}else{var vt=ue[0],st=ue[0];De.getWidth(vt)===0&&(ft++,vt--),De.getWidth(st)===2&&(at++,st++);var jt=De.getString(st).length;for(jt>1&&(tt+=jt-1,Ye+=jt-1);vt>0&&Ze>0&&!this._isCharWordSeparator(De.loadCell(vt-1,this._workCell));){De.loadCell(vt-1,this._workCell);var lt=this._workCell.getChars().length;this._workCell.getWidth()===0?(ft++,vt--):lt>1&&(Pt+=lt-1,Ze-=lt-1),Ze--,vt--}for(;st<De.length&&Ye+1<ze.length&&!this._isCharWordSeparator(De.loadCell(st+1,this._workCell));){De.loadCell(st+1,this._workCell);var et=this._workCell.getChars().length;this._workCell.getWidth()===2?(at++,st++):et>1&&(tt+=et-1,Ye+=et-1),Ye++,st++}}Ye++;var ut=Ze+Ge-ft+Pt,mt=Math.min(this._bufferService.cols,Ye-Ze+ft+at-Pt-tt);if(ye||ze.slice(Ze,Ye).trim()!==""){if(we&&ut===0&&De.getCodePoint(0)!==32){var _t=Ae.lines.get(ue[1]-1);if(_t&&De.isWrapped&&_t.getCodePoint(this._bufferService.cols-1)!==32){var gt=this._getWordAt([this._bufferService.cols-1,ue[1]-1],!1,!0,!1);if(gt){var Bt=this._bufferService.cols-gt.start;ut-=Bt,mt+=Bt}}}if(be&&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,ye){var we=this._getWordAt(ue,ye);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 ye=this._getWordAt(ue,!0);if(ye){for(var we=ue[1];ye.start<0;)ye.start+=this._bufferService.cols,we--;if(!this._model.areSelectionValuesReversed())for(;ye.start+ye.length>this._bufferService.cols;)ye.length-=this._bufferService.cols,we++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?ye.start:ye.start+ye.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 ye=this._bufferService.buffer.getWrappedRangeForLine(ue);this._model.selectionStart=[0,ye.first],this._model.selectionEnd=[this._bufferService.cols,ye.last],this._model.selectionStartLength=0},se=ke([Pe(2,le.IBufferService),Pe(3,le.ICoreService),Pe(4,ge.IMouseService),Pe(5,le.IOptionsService),Pe(6,ge.IRenderService)],se)}(ce.Disposable);Ee.SelectionService=oe},function(tn,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,Pe=this.selectionEnd;return!(!ke||!Pe)&&(ke[1]>Pe[1]||ke[1]===Pe[1]&&ke[0]>Pe[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(tn,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 Se(Math.abs(de-ce)-function(z,ee,oe){for(var ie=0,se=z-ke(oe,z),ue=ee-ke(oe,ee),ye=0;ye<Math.abs(se-ue);ye++){var we=Pe(z,ee)==="A"?-1:1,be=oe.buffer.lines.get(se+we*ye);be&&be.isWrapped&&ie++}return ie}(xe,ge,le),he(Pe(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 Pe(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 Se(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,ye,we){return Be(ie,ue,ye,we).length===0?"":Se(Le(oe,ie,oe,ie-ke(ye,ie),!1,ye).length,he("D",we))}(ce,z,0,ge,le,ve)+Be(z,ge,le,ve)+function(oe,ie,se,ue,ye,we){var be;be=Be(ie,ue,ye,we).length>0?ue-ke(ye,ue):ie;var Ae=ue,De=function(ze,Ze,Ye,Ge,ft,at){var Pt;return Pt=Be(Ye,Ge,ft,at).length>0?Ge-ke(ft,Ge):Ze,ze<Ye&&Pt<=Ge||ze>=Ye&&Pt<Ge?"C":"D"}(oe,ie,se,ue,ye,we);return Se(Le(oe,be,se,Ae,De==="C",ye).length,he(De,we))}(ce,z,xe,ge,le,ve);if(z===ge)return de=ce>xe?"D":"C",Se(Math.abs(ce-xe),he(de,ve));de=z>ge?"D":"C";var ee=Math.abs(z-ge);return Se(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(tn,Ee,Me){"use strict";var me=this&&this.__decorate||function(Le,he,Se,xe){var ge,le=arguments.length,ve=le<3?he:xe===null?xe=Object.getOwnPropertyDescriptor(he,Se):xe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(Le,he,Se,xe);else for(var de=Le.length-1;de>=0;de--)(ge=Le[de])&&(ve=(le<3?ge(ve):le>3?ge(he,Se,ve):ge(he,Se))||ve);return le>3&&ve&&Object.defineProperty(he,Se,ve),ve},Be=this&&this.__param||function(Le,he){return function(Se,xe){he(Se,xe,Le)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.SoundService=void 0;var ke=Me(1),Pe=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 Se=he.createBufferSource();he.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(xe){Se.buffer=xe,Se.connect(he.destination),Se.start(0)})}},Le.prototype._base64ToArrayBuffer=function(he){for(var Se=window.atob(he),xe=Se.length,ge=new Uint8Array(xe),le=0;le<xe;le++)ge[le]=Se.charCodeAt(le);return ge.buffer},Le.prototype._removeMimeType=function(he){return he.split(",")[1]},Le=me([Be(0,ke.IOptionsService)],Le)}();Ee.SoundService=Pe},function(tn,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},Pe=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),Se=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([Pe(2,xe.IBufferService),Pe(3,Se.IMouseService),Pe(4,Se.ISelectionService),Pe(5,xe.IOptionsService)],ve)}(Le.Disposable);Ee.MouseZoneManager=ge},function(tn,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),Pe=Me(11),Le=Me(31),he=Me(7),Se=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)),Pe.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,Pe.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(),ye=this._rowElements[ie];ye&&(se.length===0?ye.innerHTML=" ":ye.textContent=se,ye.setAttribute("aria-posinset",ue),ye.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}(Se.Disposable);Ee.AccessibilityManager=le},function(tn,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,ye=arguments.length,we=ye<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 be=ee.length-1;be>=0;be--)(ue=ee[be])&&(we=(ye<3?ue(we):ye>3?ue(oe,ie,we):ue(oe,ie))||we);return ye>3&&we&&Object.defineProperty(oe,ie,we),we},Pe=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),Se=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,ye,we,be,Ae,De,ze){var Ze=ee.call(this)||this;return Ze._colors=ie,Ze._element=se,Ze._screenElement=ue,Ze._viewportElement=ye,Ze._linkifier=we,Ze._linkifier2=be,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(Ye){return Ze._onLinkHover(Ye)}),Ze._linkifier.onHideLinkUnderline(function(Ye){return Ze._onLinkLeave(Ye)}),Ze._linkifier2.onShowLinkUnderline(function(Ye){return Ze._onLinkHover(Ye)}),Ze._linkifier2.onHideLinkUnderline(function(Ye){return Ze._onLinkLeave(Ye)}),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 ye=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.innerHTML=ye,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,ye){se+=ie._terminalSelector+" .xterm-fg-"+ye+" { color: "+ue.css+"; }"+ie._terminalSelector+" .xterm-bg-"+ye+" { 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 ye=document.createElement("div");this._rowContainer.appendChild(ye),this._rowElements.push(ye)}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 ye=ie[1]-this._bufferService.buffer.ydisp,we=se[1]-this._bufferService.buffer.ydisp,be=Math.max(ye,0),Ae=Math.min(we,this._bufferService.rows-1);if(!(be>=this._bufferService.rows||Ae<0)){var De=document.createDocumentFragment();if(ue)De.appendChild(this._createSelectionElement(be,ie[0],se[0],Ae-be+1));else{var ze=ye===be?ie[0]:0,Ze=be===Ae?se[0]:this._bufferService.cols;De.appendChild(this._createSelectionElement(be,ze,Ze));var Ye=Ae-be-1;if(De.appendChild(this._createSelectionElement(be+1,0,this._bufferService.cols,Ye)),be!==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,ye){ye===void 0&&(ye=1);var we=document.createElement("div");return we.style.height=ye*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,ye=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),we=this._optionsService.options.cursorBlink,be=ie;be<=se;be++){var Ae=this._rowElements[be];Ae.innerHTML="";var De=be+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,ye,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,ye,we,be){for(;ie!==se||ue!==ye;){var Ae=this._rowElements[ue];if(!Ae)return;var De=Ae.children[ie];De&&(De.style.textDecoration=be?"underline":"none"),++ie>=we&&(ie=0,ue++)}},oe=ke([Pe(6,xe.ICharSizeService),Pe(7,ge.IOptionsService),Pe(8,ge.IBufferService)],oe)}(Se.Disposable);Ee.DomRenderer=z},function(tn,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),Pe=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 Se(xe,ge,le){this._document=xe,this._optionsService=ge,this._colors=le,this._workCell=new ke.CellData}return Se.prototype.setColors=function(xe){this._colors=xe},Se.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 ye=this._workCell.getFgColor(),we=this._workCell.getFgColorMode(),be=this._workCell.getBgColor(),Ae=this._workCell.getBgColorMode(),De=!!this._workCell.isInverse();if(De){var ze=ye;ye=be,be=ze;var Ze=we;we=Ae,Ae=Ze}switch(we){case 16777216:case 33554432:this._workCell.isBold()&&ye<8&&this._optionsService.options.drawBoldTextInBrightColors&&(ye+=8),this._applyMinimumContrast(ue,this._colors.background,this._colors.ansi[ye])||ue.classList.add("xterm-fg-"+ye);break;case 50331648:var Ye=Pe.rgba.toColor(ye>>16&255,ye>>8&255,255&ye);this._applyMinimumContrast(ue,this._colors.background,Ye)||this._addStyle(ue,"color:#"+he(ye.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-"+be);break;case 50331648:this._addStyle(ue,"background-color:#"+he(be.toString(16),"0",6));break;case 0:default:De&&ue.classList.add("xterm-bg-"+me.INVERTED_DEFAULT_COLOR)}ee.appendChild(ue)}}return ee},Se.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=Pe.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)},Se.prototype._addStyle=function(xe,ge){xe.setAttribute("style",""+(xe.getAttribute("style")||"")+ge+";")},Se}();function he(Se,xe,ge){for(;Se.length<ge;)Se=xe+Se;return Se}Ee.DomRendererRowFactory=Le},function(tn,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,Pe,Le,he){var Se={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"?Se.key=Pe?me.C0.ESC+"OA":me.C0.ESC+"[A":ke.key==="UIKeyInputLeftArrow"?Se.key=Pe?me.C0.ESC+"OD":me.C0.ESC+"[D":ke.key==="UIKeyInputRightArrow"?Se.key=Pe?me.C0.ESC+"OC":me.C0.ESC+"[C":ke.key==="UIKeyInputDownArrow"&&(Se.key=Pe?me.C0.ESC+"OB":me.C0.ESC+"[B");break;case 8:if(ke.shiftKey){Se.key=me.C0.BS;break}if(ke.altKey){Se.key=me.C0.ESC+me.C0.DEL;break}Se.key=me.C0.DEL;break;case 9:if(ke.shiftKey){Se.key=me.C0.ESC+"[Z";break}Se.key=me.C0.HT,Se.cancel=!0;break;case 13:Se.key=ke.altKey?me.C0.ESC+me.C0.CR:me.C0.CR,Se.cancel=!0;break;case 27:Se.key=me.C0.ESC,ke.altKey&&(Se.key=me.C0.ESC+me.C0.ESC),Se.cancel=!0;break;case 37:if(ke.metaKey)break;xe?(Se.key=me.C0.ESC+"[1;"+(xe+1)+"D",Se.key===me.C0.ESC+"[1;3D"&&(Se.key=me.C0.ESC+(Le?"b":"[1;5D"))):Se.key=Pe?me.C0.ESC+"OD":me.C0.ESC+"[D";break;case 39:if(ke.metaKey)break;xe?(Se.key=me.C0.ESC+"[1;"+(xe+1)+"C",Se.key===me.C0.ESC+"[1;3C"&&(Se.key=me.C0.ESC+(Le?"f":"[1;5C"))):Se.key=Pe?me.C0.ESC+"OC":me.C0.ESC+"[C";break;case 38:if(ke.metaKey)break;xe?(Se.key=me.C0.ESC+"[1;"+(xe+1)+"A",Le||Se.key!==me.C0.ESC+"[1;3A"||(Se.key=me.C0.ESC+"[1;5A")):Se.key=Pe?me.C0.ESC+"OA":me.C0.ESC+"[A";break;case 40:if(ke.metaKey)break;xe?(Se.key=me.C0.ESC+"[1;"+(xe+1)+"B",Le||Se.key!==me.C0.ESC+"[1;3B"||(Se.key=me.C0.ESC+"[1;5B")):Se.key=Pe?me.C0.ESC+"OB":me.C0.ESC+"[B";break;case 45:ke.shiftKey||ke.ctrlKey||(Se.key=me.C0.ESC+"[2~");break;case 46:Se.key=xe?me.C0.ESC+"[3;"+(xe+1)+"~":me.C0.ESC+"[3~";break;case 36:Se.key=xe?me.C0.ESC+"[1;"+(xe+1)+"H":Pe?me.C0.ESC+"OH":me.C0.ESC+"[H";break;case 35:Se.key=xe?me.C0.ESC+"[1;"+(xe+1)+"F":Pe?me.C0.ESC+"OF":me.C0.ESC+"[F";break;case 33:ke.shiftKey?Se.type=2:Se.key=me.C0.ESC+"[5~";break;case 34:ke.shiftKey?Se.type=3:Se.key=me.C0.ESC+"[6~";break;case 112:Se.key=xe?me.C0.ESC+"[1;"+(xe+1)+"P":me.C0.ESC+"OP";break;case 113:Se.key=xe?me.C0.ESC+"[1;"+(xe+1)+"Q":me.C0.ESC+"OQ";break;case 114:Se.key=xe?me.C0.ESC+"[1;"+(xe+1)+"R":me.C0.ESC+"OR";break;case 115:Se.key=xe?me.C0.ESC+"[1;"+(xe+1)+"S":me.C0.ESC+"OS";break;case 116:Se.key=xe?me.C0.ESC+"[15;"+(xe+1)+"~":me.C0.ESC+"[15~";break;case 117:Se.key=xe?me.C0.ESC+"[17;"+(xe+1)+"~":me.C0.ESC+"[17~";break;case 118:Se.key=xe?me.C0.ESC+"[18;"+(xe+1)+"~":me.C0.ESC+"[18~";break;case 119:Se.key=xe?me.C0.ESC+"[19;"+(xe+1)+"~":me.C0.ESC+"[19~";break;case 120:Se.key=xe?me.C0.ESC+"[20;"+(xe+1)+"~":me.C0.ESC+"[20~";break;case 121:Se.key=xe?me.C0.ESC+"[21;"+(xe+1)+"~":me.C0.ESC+"[21~";break;case 122:Se.key=xe?me.C0.ESC+"[23;"+(xe+1)+"~":me.C0.ESC+"[23~";break;case 123:Se.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&&(Se.type=1):ke.key&&!ke.ctrlKey&&!ke.altKey&&!ke.metaKey&&ke.keyCode>=48&&ke.key.length===1?Se.key=ke.key:ke.key&&ke.ctrlKey&&ke.key==="_"&&(Se.key=me.C0.US);else{var ge=Be[ke.keyCode],le=ge&&ge[ke.shiftKey?1:0];if(le)Se.key=me.C0.ESC+le;else if(ke.keyCode>=65&&ke.keyCode<=90){var ve=ke.ctrlKey?ke.keyCode-64:ke.keyCode+32;Se.key=me.C0.ESC+String.fromCharCode(ve)}}else ke.keyCode>=65&&ke.keyCode<=90?Se.key=String.fromCharCode(ke.keyCode-64):ke.keyCode===32?Se.key=me.C0.NUL:ke.keyCode>=51&&ke.keyCode<=55?Se.key=String.fromCharCode(ke.keyCode-51+27):ke.keyCode===56?Se.key=me.C0.DEL:ke.keyCode===219?Se.key=me.C0.ESC:ke.keyCode===220?Se.key=me.C0.FS:ke.keyCode===221&&(Se.key=me.C0.GS)}return Se}},function(tn,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 ye=ce.length-1;ye>=0;ye--)(ie=ce[ye])&&(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},Pe=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),Se=Me(2),xe=Me(32),ge=Me(7),le=Me(1),ve=Me(5),de=function(ce){function z(ee,oe,ie,se,ue,ye){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(ye.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 be=new IntersectionObserver(function(Ae){return we._onIntersectionChange(Ae[Ae.length-1])},{threshold:0});be.observe(ie),we.register({dispose:function(){return be.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([Pe(3,le.IOptionsService),Pe(4,ve.ICharSizeService),Pe(5,le.IBufferService)],z)}(Se.Disposable);Ee.RenderService=de},function(tn,Ee,Me){"use strict";var me=this&&this.__decorate||function(Se,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(Se,xe,ge,le);else for(var z=Se.length-1;z>=0;z--)(ve=Se[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(Se,xe){return function(ge,le){xe(ge,le,Se)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CharSizeService=void 0;var ke=Me(1),Pe=Me(0),Le=function(){function Se(xe,ge,le){this._optionsService=le,this.width=0,this.height=0,this._onCharSizeChange=new Pe.EventEmitter,this._measureStrategy=new he(xe,ge,this._optionsService)}return Object.defineProperty(Se.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),Se.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())},Se=me([Be(2,ke.IOptionsService)],Se)}();Ee.CharSizeService=Le;var he=function(){function Se(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 Se.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},Se}()},function(tn,Ee,Me){"use strict";var me=this&&this.__decorate||function(he,Se,xe,ge){var le,ve=arguments.length,de=ve<3?Se:ge===null?ge=Object.getOwnPropertyDescriptor(Se,xe):ge;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")de=Reflect.decorate(he,Se,xe,ge);else for(var ce=he.length-1;ce>=0;ce--)(le=he[ce])&&(de=(ve<3?le(de):ve>3?le(Se,xe,de):le(Se,xe))||de);return ve>3&&de&&Object.defineProperty(Se,xe,de),de},Be=this&&this.__param||function(he,Se){return function(xe,ge){Se(xe,ge,he)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.MouseService=void 0;var ke=Me(5),Pe=Me(30),Le=function(){function he(Se,xe){this._renderService=Se,this._charSizeService=xe}return he.prototype.getCoords=function(Se,xe,ge,le,ve){return Pe.getCoords(Se,xe,ge,le,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,ve)},he.prototype.getRawByteCoords=function(Se,xe,ge,le){var ve=this.getCoords(Se,xe,ge,le);return Pe.getRawByteCoords(ve)},he=me([Be(0,ke.IRenderService),Be(1,ke.ICharSizeService)],he)}();Ee.MouseService=Le},function(tn,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},Pe=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),Se=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(Se.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 ye,we;if(!z._isMouseOut){var be=ue==null?void 0:ue.map(function(Ae){return{link:Ae}});(ye=z._activeProviderReplies)===null||ye===void 0||ye.set(ie,be),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,ye=se.link.range.end.y>de?this._bufferService.cols:se.link.range.end.x,we=ue;we<=ye;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 ye=ie.find(function(be){return oe._linkAtPosition(be.link,ce)});ye&&(z=!0,this._handleNewLink(ye))}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(be){return oe._linkAtPosition(be.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,Se.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([Pe(0,Le.IBufferService)],ve)}(Se.Disposable);Ee.Linkifier2=ge},function(tn,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(tn,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(ue,ye){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(we,be){we.__proto__=be}||function(we,be){for(var Ae in be)be.hasOwnProperty(Ae)&&(we[Ae]=be[Ae])})(ue,ye)},function(ue,ye){function we(){this.constructor=ue}me(ue,ye),ue.prototype=ye===null?Object.create(ye):(we.prototype=ye.prototype,new we)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CoreTerminal=void 0;var ke=Me(2),Pe=Me(1),Le=Me(66),he=Me(67),Se=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 ye(we){var be=ue.call(this)||this;return be._onBinary=new le.EventEmitter,be._onData=new le.EventEmitter,be._onLineFeed=new le.EventEmitter,be._onResize=new le.EventEmitter,be._onScroll=new le.EventEmitter,be._instantiationService=new Le.InstantiationService,be.optionsService=new xe.OptionsService(we),be._instantiationService.setService(Pe.IOptionsService,be.optionsService),be._bufferService=be.register(be._instantiationService.createInstance(Se.BufferService)),be._instantiationService.setService(Pe.IBufferService,be._bufferService),be._logService=be._instantiationService.createInstance(he.LogService),be._instantiationService.setService(Pe.ILogService,be._logService),be._coreService=be.register(be._instantiationService.createInstance(ge.CoreService,function(){return be.scrollToBottom()})),be._instantiationService.setService(Pe.ICoreService,be._coreService),be._coreMouseService=be._instantiationService.createInstance(ve.CoreMouseService),be._instantiationService.setService(Pe.ICoreMouseService,be._coreMouseService),be._dirtyRowService=be._instantiationService.createInstance(de.DirtyRowService),be._instantiationService.setService(Pe.IDirtyRowService,be._dirtyRowService),be.unicodeService=be._instantiationService.createInstance(ce.UnicodeService),be._instantiationService.setService(Pe.IUnicodeService,be.unicodeService),be._charsetService=be._instantiationService.createInstance(z.CharsetService),be._instantiationService.setService(Pe.ICharsetService,be._charsetService),be._inputHandler=new oe.InputHandler(be._bufferService,be._charsetService,be._coreService,be._dirtyRowService,be._logService,be.optionsService,be._coreMouseService,be.unicodeService),be.register(le.forwardEvent(be._inputHandler.onLineFeed,be._onLineFeed)),be.register(be._inputHandler),be.register(le.forwardEvent(be._bufferService.onResize,be._onResize)),be.register(le.forwardEvent(be._coreService.onData,be._onData)),be.register(le.forwardEvent(be._coreService.onBinary,be._onBinary)),be.register(be.optionsService.onOptionChange(function(Ae){return be._updateOptions(Ae)})),be._writeBuffer=new ie.WriteBuffer(function(Ae){return be._inputHandler.parse(Ae)}),be}return Be(ye,ue),Object.defineProperty(ye.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),ye.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)},ye.prototype.write=function(we,be){this._writeBuffer.write(we,be)},ye.prototype.writeSync=function(we){this._writeBuffer.writeSync(we)},ye.prototype.resize=function(we,be){isNaN(we)||isNaN(be)||(we=Math.max(we,Se.MINIMUM_COLS),be=Math.max(be,Se.MINIMUM_ROWS),this._bufferService.resize(we,be))},ye.prototype.scroll=function(we,be){be===void 0&&(be=!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,be),this._cachedBlankLine=Ae),Ae.isWrapped=be;var ze=De.ybase+De.scrollTop,Ze=De.ybase+De.scrollBottom;if(De.scrollTop===0){var Ye=De.lines.isFull;Ze===De.lines.length-1?Ye?De.lines.recycle().copyFrom(Ae):De.lines.push(Ae.clone()):De.lines.splice(Ze+1,0,Ae.clone()),Ye?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)},ye.prototype.scrollLines=function(we,be){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&&(be||this._onScroll.fire(Ae.ydisp))},ye.prototype.scrollPages=function(we){this.scrollLines(we*(this.rows-1))},ye.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},ye.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},ye.prototype.scrollToLine=function(we){var be=we-this._bufferService.buffer.ydisp;be!==0&&this.scrollLines(be)},ye.prototype.addEscHandler=function(we,be){return this._inputHandler.addEscHandler(we,be)},ye.prototype.addDcsHandler=function(we,be){return this._inputHandler.addDcsHandler(we,be)},ye.prototype.addCsiHandler=function(we,be){return this._inputHandler.addCsiHandler(we,be)},ye.prototype.addOscHandler=function(we,be){return this._inputHandler.addOscHandler(we,be)},ye.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},ye.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},ye.prototype._updateOptions=function(we){var be;switch(we){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((be=this._windowsMode)===null||be===void 0||be.dispose(),this._windowsMode=void 0)}},ye.prototype._enableWindowsMode=function(){var we=this;if(!this._windowsMode){var be=[];be.push(this.onLineFeed(ee.updateWindowsModeWrappedState.bind(null,this._bufferService))),be.push(this.addCsiHandler({final:"H"},function(){return ee.updateWindowsModeWrappedState(we._bufferService),!1})),this._windowsMode={dispose:function(){for(var Ae=0,De=be;Ae<De.length;Ae++)De[Ae].dispose()}}}},ye}(ke.Disposable);Ee.CoreTerminal=se},function(tn,Ee,Me){"use strict";var me=this&&this.__spreadArrays||function(){for(var he=0,Se=0,xe=arguments.length;Se<xe;Se++)he+=arguments[Se].length;var ge=Array(he),le=0;for(Se=0;Se<xe;Se++)for(var ve=arguments[Se],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),Pe=function(){function he(){for(var Se=[],xe=0;xe<arguments.length;xe++)Se[xe]=arguments[xe];this._entries=new Map;for(var ge=0,le=Se;ge<le.length;ge++){var ve=le[ge],de=ve[0],ce=ve[1];this.set(de,ce)}}return he.prototype.set=function(Se,xe){var ge=this._entries.get(Se);return this._entries.set(Se,xe),ge},he.prototype.forEach=function(Se){this._entries.forEach(function(xe,ge){return Se(ge,xe)})},he.prototype.has=function(Se){return this._entries.has(Se)},he.prototype.get=function(Se){return this._entries.get(Se)},he}();Ee.ServiceCollection=Pe;var Le=function(){function he(){this._services=new Pe,this._services.set(Be.IInstantiationService,this)}return he.prototype.setService=function(Se,xe){this._services.set(Se,xe)},he.prototype.getService=function(Se){return this._services.get(Se)},he.prototype.createInstance=function(Se){for(var xe=[],ge=1;ge<arguments.length;ge++)xe[ge-1]=arguments[ge];for(var le=ke.getServiceDependencies(Se).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] "+Se.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 "+Se.name+" at position "+(oe+1)+" conflicts with "+xe.length+" static arguments");return new(Se.bind.apply(Se,me([void 0],me(xe,ve))))},he}();Ee.InstantiationService=Le},function(tn,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 Pe,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"})(Pe=Ee.LogLevel||(Ee.LogLevel={}));var he={debug:Pe.DEBUG,info:Pe.INFO,warn:Pe.WARN,error:Pe.ERROR,off:Pe.OFF},Se=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<=Pe.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<=Pe.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<=Pe.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<=Pe.ERROR&&this._log(console.error,ge,le)},xe=me([Be(0,Le.IOptionsService)],xe)}();Ee.LogService=Se},function(tn,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},Pe=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),Se=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 Se.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([Pe(0,Le.IOptionsService)],ve)}(xe.Disposable);Ee.BufferService=ge},function(tn,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(he,Se){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,Se)},function(he,Se){function xe(){this.constructor=he}me(he,Se),he.prototype=Se===null?Object.create(Se):(xe.prototype=Se.prototype,new xe)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BufferSet=void 0;var ke=Me(70),Pe=Me(0),Le=function(he){function Se(xe,ge){var le=he.call(this)||this;return le._onBufferActivate=le.register(new Pe.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(Se,he),Object.defineProperty(Se.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),Se.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}))},Se.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}))},Se.prototype.resize=function(xe,ge){this._normal.resize(xe,ge),this._alt.resize(xe,ge)},Se.prototype.setupTabStops=function(xe){this._normal.setupTabStops(xe),this._alt.setupTabStops(xe)},Se}(Me(2).Disposable);Ee.BufferSet=Le},function(tn,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),Pe=Me(3),Le=Me(72),he=Me(73),Se=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=Se.DEFAULT_CHARSET,this.markers=[],this._nullCell=ke.CellData.fromCharData([0,Pe.NULL_CELL_CHAR,Pe.NULL_CELL_WIDTH,Pe.NULL_CELL_CODE]),this._whitespaceCell=ke.CellData.fromCharData([0,Pe.WHITESPACE_CELL_CHAR,Pe.WHITESPACE_CELL_WIDTH,Pe.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 ye=this.ybase+this.y;if(!(ye>=ie&&ye<ie+ue.length)){var we=ue[ue.length-1].getTrimmedLength(),be=Le.reflowSmallerGetNewLineLengths(ue,this._cols,de),Ae=be.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 Ye=this.getBlankLine(Be.DEFAULT_ATTR_DATA,!0);ze.push(Ye)}ze.length>0&&(ee.push({start:ie+ue.length+oe,newLines:ze}),oe+=ze.length),ue.push.apply(ue,ze);var Ge=be.length-1,ft=be[Ge];ft===0&&(ft=be[--Ge]);for(var at=ue.length-Ae-1,Pt=we;at>=0;){var tt=Math.min(Pt,ft);if(ue[Ge].copyCellsFrom(ue[at],Pt-tt,ft-tt,tt,!0),(ft-=tt)===0&&(ft=be[--Ge]),(Pt-=tt)===0){at--;var vt=Math.max(at,0);Pt=Le.getWrappedLineTrimmedLength(ue,vt,this._cols)}}for(Ze=0;Ze<ue.length;Ze++)be[Ze]<de&&ue[Ze].setCell(be[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 jt=[],lt=[];for(Ze=0;Ze<this.lines.length;Ze++)lt.push(this.lines.get(Ze));var et=this.lines.length,ut=et-1,mt=0,_t=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,et+oe-1);Ze>=0;Ze--)if(_t&&_t.start>ut+gt){for(var Bt=_t.newLines.length-1;Bt>=0;Bt--)this.lines.set(Ze--,_t.newLines[Bt]);Ze++,jt.push({index:ut+1,amount:_t.newLines.length}),gt+=_t.newLines.length,_t=ee[++mt]}else this.lines.set(Ze,lt[ut--]);var Ht=0;for(Ze=jt.length-1;Ze>=0;Ze--)jt[Ze].index+=Ht,this.lines.onInsertEmitter.fire(jt[Ze]),Ht+=jt[Ze].amount;var hn=Math.max(0,et+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)[Pe.CHAR_DATA_WIDTH_INDEX]&&(ce-=ee.get(ie)[Pe.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(tn,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CircularList=void 0;var me=Me(0),Be=function(){function ke(Pe){this._maxLength=Pe,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(Pe){if(this._maxLength!==Pe){for(var Le=new Array(Pe),he=0;he<Math.min(Pe,this.length);he++)Le[he]=this._array[this._getCyclicIndex(he)];this._array=Le,this._maxLength=Pe,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"length",{get:function(){return this._length},set:function(Pe){if(Pe>this._length)for(var Le=this._length;Le<Pe;Le++)this._array[Le]=void 0;this._length=Pe},enumerable:!1,configurable:!0}),ke.prototype.get=function(Pe){return this._array[this._getCyclicIndex(Pe)]},ke.prototype.set=function(Pe,Le){this._array[this._getCyclicIndex(Pe)]=Le},ke.prototype.push=function(Pe){this._array[this._getCyclicIndex(this._length)]=Pe,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(Pe,Le){for(var he=[],Se=2;Se<arguments.length;Se++)he[Se-2]=arguments[Se];if(Le){for(var xe=Pe;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>=Pe;xe--)this._array[this._getCyclicIndex(xe+he.length)]=this._array[this._getCyclicIndex(xe)];for(xe=0;xe<he.length;xe++)this._array[this._getCyclicIndex(Pe+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(Pe){Pe>this._length&&(Pe=this._length),this._startIndex+=Pe,this._length-=Pe,this.onTrimEmitter.fire(Pe)},ke.prototype.shiftElements=function(Pe,Le,he){if(!(Le<=0)){if(Pe<0||Pe>=this._length)throw new Error("start argument out of range");if(Pe+he<0)throw new Error("Cannot shift elements in list beyond index 0");if(he>0){for(var Se=Le-1;Se>=0;Se--)this.set(Pe+Se+he,this.get(Pe+Se));var xe=Pe+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(Se=0;Se<Le;Se++)this.set(Pe+Se+he,this.get(Pe+Se))}},ke.prototype._getCyclicIndex=function(Pe){return(this._startIndex+Pe)%this._maxLength},ke}();Ee.CircularList=Be},function(tn,Ee,Me){"use strict";function me(Be,ke,Pe){if(ke===Be.length-1)return Be[ke].getTrimmedLength();var Le=!Be[ke].hasContent(Pe-1)&&Be[ke].getWidth(Pe-1)===1,he=Be[ke+1].getWidth(0)===2;return Le&&he?Pe-1:Pe}Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.getWrappedLineTrimmedLength=Ee.reflowSmallerGetNewLineLengths=Ee.reflowLargerApplyNewLayout=Ee.reflowLargerCreateNewLayout=Ee.reflowLargerGetLinesToRemove=void 0,Ee.reflowLargerGetLinesToRemove=function(Be,ke,Pe,Le,he){for(var Se=[],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=Pe-ce,ue=Math.min(ie,se);ve[de].copyCellsFrom(ve[z],ee,ce,ue,!1),(ce+=ue)===Pe&&(de++,ce=0),(ee+=ue)===oe&&(z++,ee=0),ce===0&&de!==0&&ve[de-1].getWidth(Pe-1)===2&&(ve[de].copyCellsFrom(ve[de-1],Pe-1,ce++,1,!1),ve[de-1].setCell(Pe-1,he))}ve[de].replaceCells(ce,Pe,he);for(var ye=0,we=ve.length-1;we>0&&(we>de||ve[we].getTrimmedLength()===0);we--)ye++;ye>0&&(Se.push(xe+ve.length-ye),Se.push(ye)),xe+=ve.length-1}}}return Se},Ee.reflowLargerCreateNewLayout=function(Be,ke){for(var Pe=[],Le=0,he=ke[Le],Se=0,xe=0;xe<Be.length;xe++)if(he===xe){var ge=ke[++Le];Be.onDeleteEmitter.fire({index:xe-Se,amount:ge}),xe+=ge-1,Se+=ge,he=ke[++Le]}else Pe.push(xe);return{layout:Pe,countRemoved:Se}},Ee.reflowLargerApplyNewLayout=function(Be,ke){for(var Pe=[],Le=0;Le<ke.length;Le++)Pe.push(Be.get(ke[Le]));for(Le=0;Le<Pe.length;Le++)Be.set(Le,Pe[Le]);Be.length=ke.length},Ee.reflowSmallerGetNewLineLengths=function(Be,ke,Pe){for(var Le=[],he=Be.map(function(ce,z){return me(Be,z,ke)}).reduce(function(ce,z){return ce+z}),Se=0,xe=0,ge=0;ge<he;){if(he-ge<Pe){Le.push(he-ge);break}Se+=Pe;var le=me(Be,xe,ke);Se>le&&(Se-=le,xe++);var ve=Be[xe].getWidth(Se-1)===2;ve&&Se--;var de=ve?Pe-1:Pe;Le.push(de),ge+=de}return Le},Ee.getWrappedLineTrimmedLength=me},function(tn,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(Le,he){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Se,xe){Se.__proto__=xe}||function(Se,xe){for(var ge in xe)xe.hasOwnProperty(ge)&&(Se[ge]=xe[ge])})(Le,he)},function(Le,he){function Se(){this.constructor=Le}me(Le,he),Le.prototype=he===null?Object.create(he):(Se.prototype=he.prototype,new Se)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Marker=void 0;var ke=Me(0),Pe=function(Le){function he(Se){var xe=Le.call(this)||this;return xe.line=Se,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=Pe},function(tn,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 Pe=["cols","rows"],Le=function(){function he(Se){this._onOptionChange=new me.EventEmitter,this.options=ke.clone(Ee.DEFAULT_OPTIONS);for(var xe=0,ge=Object.keys(Se);xe<ge.length;xe++){var le=ge[xe];if(le in this.options){var ve=Se[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(Se,xe){if(!(Se in Ee.DEFAULT_OPTIONS))throw new Error('No option with key "'+Se+'"');if(Pe.indexOf(Se)!==-1)throw new Error('Option "'+Se+'" can only be set in the constructor');this.options[Se]!==xe&&(xe=this._sanitizeAndValidateOption(Se,xe),this.options[Se]!==xe&&(this.options[Se]=xe,this._onOptionChange.fire(Se)))},he.prototype._sanitizeAndValidateOption=function(Se,xe){switch(Se){case"bellStyle":case"cursorStyle":case"fontWeight":case"fontWeightBold":case"rendererType":case"wordSeparator":xe||(xe=Ee.DEFAULT_OPTIONS[Se]);break;case"cursorWidth":xe=Math.floor(xe);case"lineHeight":case"tabStopWidth":if(xe<1)throw new Error(Se+" 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(Se+" cannot be less than 0, value: "+xe);break;case"fastScrollSensitivity":case"scrollSensitivity":if(xe<=0)throw new Error(Se+" cannot be less than or equal to 0, value: "+xe)}return xe},he.prototype.getOption=function(Se){if(!(Se in Ee.DEFAULT_OPTIONS))throw new Error('No option with key "'+Se+'"');return this.options[Se]},he}();Ee.OptionsService=Le},function(tn,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},Pe=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),Se=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=Se.clone(ge),se.decPrivateModes=Se.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=Se.clone(ge),this.decPrivateModes=Se.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([Pe(1,Le.IBufferService),Pe(2,Le.ILogService),Pe(3,Le.IOptionsService)],ce)}(xe.Disposable);Ee.CoreService=ve},function(tn,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),Pe=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 Se=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"+Se(ve[0])+Se(ve[1])+Se(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 Pe.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(tn,Ee,Me){"use strict";var me=this&&this.__decorate||function(Le,he,Se,xe){var ge,le=arguments.length,ve=le<3?he:xe===null?xe=Object.getOwnPropertyDescriptor(he,Se):xe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(Le,he,Se,xe);else for(var de=Le.length-1;de>=0;de--)(ge=Le[de])&&(ve=(le<3?ge(ve):le>3?ge(he,Se,ve):ge(he,Se))||ve);return le>3&&ve&&Object.defineProperty(he,Se,ve),ve},Be=this&&this.__param||function(Le,he){return function(Se,xe){he(Se,xe,Le)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.DirtyRowService=void 0;var ke=Me(1),Pe=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,Se){if(he>Se){var xe=he;he=Se,Se=xe}he<this._start&&(this._start=he),Se>this._end&&(this._end=Se)},Le.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},Le=me([Be(0,ke.IBufferService)],Le)}();Ee.DirtyRowService=Pe},function(tn,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.UnicodeService=void 0;var me=Me(0),Be=Me(79),ke=function(){function Pe(){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(Pe.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.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}),Pe.prototype.register=function(Le){this._providers[Le.version]=Le},Pe.prototype.wcwidth=function(Le){return this._activeProvider.wcwidth(Le)},Pe.prototype.getStringCellWidth=function(Le){for(var he=0,Se=Le.length,xe=0;xe<Se;++xe){var ge=Le.charCodeAt(xe);if(55296<=ge&&ge<=56319){if(++xe>=Se)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},Pe}();Ee.UnicodeService=ke},function(tn,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]],Pe=[[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 Se=0;Se<ke.length;++Se)Be.fill(me,0,ke[Se][0],ke[Se][1]+1)}}return he.prototype.wcwidth=function(Se){return Se<32?0:Se<127?1:Se<65536?me[Se]: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}(Se,Pe)?0:Se>=131072&&Se<=196605||Se>=196608&&Se<=262141?2:1},he}();Ee.UnicodeV6=Le},function(tn,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,Pe){this._charsets[ke]=Pe,this.glevel===ke&&(this.charset=Pe)},Be}();Ee.CharsetService=me},function(tn,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),Pe=ke==null?void 0:ke.get(Be.cols-1),Le=Be.buffer.lines.get(Be.buffer.ybase+Be.buffer.y);Le&&Pe&&(Le.isWrapped=Pe[me.CHAR_DATA_CODE_INDEX]!==me.NULL_CELL_CODE&&Pe[me.CHAR_DATA_CODE_INDEX]!==me.WHITESPACE_CELL_CODE)}},function(tn,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 Pe=this._bufferOffset;Pe<this._writeBuffer.length;++Pe){var Le=this._writeBuffer[Pe],he=this._callbacks[Pe];this._action(Le),he&&he()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(ke)},Be.prototype.write=function(ke,Pe){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(Pe)},Be.prototype._innerWrite=function(){for(var ke=this,Pe=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()-Pe>=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(tn,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,Pe){var Le=this,he={instance:Pe,dispose:Pe.dispose,isDisposed:!1};this._addons.push(he),Pe.dispose=function(){return Le._wrappedAddonDispose(he)},Pe.activate(ke)},Be.prototype._wrappedAddonDispose=function(ke){if(!ke.isDisposed){for(var Pe=-1,Le=0;Le<this._addons.length;Le++)if(this._addons[Le]===ke){Pe=Le;break}if(Pe===-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(Pe,1)}},Be}();Ee.AddonManager=me}])})},93314:function(Ln){"use strict";Ln.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(Ln){"use strict";Ln.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(Ln,tn,Ee){"use strict";Ee.d(tn,{Z:function(){return Se}});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,Pe=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:_t=>_t!==ie;if(!Me(xe))throw new TypeError("Invalid target");const ye=document.scrollingElement||document.documentElement,we=[];let be=xe;for(;Me(be)&&ue(be);){if(be=Pe(be),be===ye){we.push(be);break}be!=null&&be===document.body&&Be(be)&&!Be(document.documentElement)||be!=null&&Be(be,se)&&we.push(be)}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:Ye,width:Ge,top:ft,right:at,bottom:Pt,left:tt}=xe.getBoundingClientRect(),{top:vt,right:st,bottom:jt,left:lt}=(_t=>{const gt=window.getComputedStyle(_t);return{top:parseFloat(gt.scrollMarginTop)||0,right:parseFloat(gt.scrollMarginRight)||0,bottom:parseFloat(gt.scrollMarginBottom)||0,left:parseFloat(gt.scrollMarginLeft)||0}})(xe);let et=ee==="start"||ee==="nearest"?ft-vt:ee==="end"?Pt+jt:ft+Ye/2-vt+jt,ut=oe==="center"?tt+Ge/2-lt+st:oe==="end"?at+st:tt-lt;const mt=[];for(let _t=0;_t<we.length;_t++){const gt=we[_t],{height:Bt,width:Ht,top:hn,right:Qt,bottom:bn,left:Wt}=gt.getBoundingClientRect();if(z==="if-needed"&&ft>=0&&tt>=0&&Pt<=De&&at<=Ae&&(gt===ye&&!Be(gt)||ft>=hn&&Pt<=bn&&tt>=Wt&&at<=Qt))return mt;const Kt=getComputedStyle(gt),Jt=parseInt(Kt.borderLeftWidth,10),dn=parseInt(Kt.borderTopWidth,10),Lt=parseInt(Kt.borderRightWidth,10),pt=parseInt(Kt.borderBottomWidth,10);let Rt=0,St=0;const yt="offsetWidth"in gt?gt.offsetWidth-gt.clientWidth-Jt-Lt:0,nt="offsetHeight"in gt?gt.offsetHeight-gt.clientHeight-dn-pt:0,He="offsetWidth"in gt?gt.offsetWidth===0?0:Ht/gt.offsetWidth:0,Ie="offsetHeight"in gt?gt.offsetHeight===0?0:Bt/gt.offsetHeight:0;if(ye===gt)Rt=ee==="start"?et:ee==="end"?et-De:ee==="nearest"?ke(Ze,Ze+De,De,dn,pt,Ze+et,Ze+et+Ye,Ye):et-De/2,St=oe==="start"?ut:oe==="center"?ut-Ae/2:oe==="end"?ut-Ae:ke(ze,ze+Ae,Ae,Jt,Lt,ze+ut,ze+ut+Ge,Ge),Rt=Math.max(0,Rt+Ze),St=Math.max(0,St+ze);else{Rt=ee==="start"?et-hn-dn:ee==="end"?et-bn+pt+nt:ee==="nearest"?ke(hn,bn,Bt,dn,pt+nt,et,et+Ye,Ye):et-(hn+Bt/2)+nt/2,St=oe==="start"?ut-Wt-Jt:oe==="center"?ut-(Wt+Ht/2)+yt/2:oe==="end"?ut-Qt+Lt+yt:ke(Wt,Qt,Ht,Jt,Lt+yt,ut,ut+Ge,Ge);const{scrollLeft:We,scrollTop:Oe}=gt;Rt=Ie===0?0:Math.max(0,Math.min(Oe+Rt/Ie,gt.scrollHeight-Bt/Ie+nt)),St=He===0?0:Math.max(0,Math.min(We+St/He,gt.scrollWidth-Ht/He+yt)),et+=Oe-Rt,ut+=We-St}mt.push({el:gt,top:Rt,left:St})}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 Se(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})}}}}]);
|