|
|
(self.webpackChunk=self.webpackChunk||[]).push([[7460],{89489:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Se}});var Le=Ee(72308),me=Ee(59301),Ie={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"},Te=Ie,be=Ee(7657),Pe=function(ge,ce){return me.createElement(be.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(Pe),Se=he},59477:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Se}});var Le=Ee(72308),me=Ee(59301),Ie={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"},Te=Ie,be=Ee(7657),Pe=function(ge,ce){return me.createElement(be.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(Pe),Se=he},40001:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Se}});var Le=Ee(72308),me=Ee(59301),Ie={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"},Te=Ie,be=Ee(7657),Pe=function(ge,ce){return me.createElement(be.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(Pe),Se=he},81953:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Se}});var Le=Ee(72308),me=Ee(59301),Ie={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"},Te=Ie,be=Ee(7657),Pe=function(ge,ce){return me.createElement(be.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(Pe),Se=he},49198:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Se}});var Le=Ee(72308),me=Ee(59301),Ie={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"},Te=Ie,be=Ee(7657),Pe=function(ge,ce){return me.createElement(be.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(Pe),Se=he},87169:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Se}});var Le=Ee(72308),me=Ee(59301),Ie={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"},Te=Ie,be=Ee(7657),Pe=function(ge,ce){return me.createElement(be.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(Pe),Se=he},73331:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Se}});var Le=Ee(72308),me=Ee(59301),Ie={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"},Te=Ie,be=Ee(7657),Pe=function(ge,ce){return me.createElement(be.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(Pe),Se=he},15277:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Se}});var Le=Ee(72308),me=Ee(59301),Ie={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"},Te=Ie,be=Ee(7657),Pe=function(ge,ce){return me.createElement(be.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(Pe),Se=he},52671:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Se}});var Le=Ee(72308),me=Ee(59301),Ie={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"},Te=Ie,be=Ee(7657),Pe=function(ge,ce){return me.createElement(be.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(Pe),Se=he},8657:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Se}});var Le=Ee(72308),me=Ee(59301),Ie={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"},Te=Ie,be=Ee(7657),Pe=function(ge,ce){return me.createElement(be.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(Pe),Se=he},10906:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Se}});var Le=Ee(72308),me=Ee(59301),Ie={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"},Te=Ie,be=Ee(7657),Pe=function(ge,ce){return me.createElement(be.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(Pe),Se=he},56082:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Se}});var Le=Ee(72308),me=Ee(59301),Ie={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"},Te=Ie,be=Ee(7657),Pe=function(ge,ce){return me.createElement(be.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(Pe),Se=he},33853:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Se}});var Le=Ee(72308),me=Ee(59301),Ie={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"},Te=Ie,be=Ee(7657),Pe=function(ge,ce){return me.createElement(be.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(Pe),Se=he},15075:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Se}});var Le=Ee(72308),me=Ee(59301),Ie={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"},Te=Ie,be=Ee(7657),Pe=function(ge,ce){return me.createElement(be.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(Pe),Se=he},43531:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Se}});var Le=Ee(72308),me=Ee(59301),Ie={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"},Te=Ie,be=Ee(7657),Pe=function(ge,ce){return me.createElement(be.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(Pe),Se=he},76618:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Se}});var Le=Ee(72308),me=Ee(59301),Ie={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"},Te=Ie,be=Ee(7657),Pe=function(ge,ce){return me.createElement(be.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(Pe),Se=he},61485:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Se}});var Le=Ee(72308),me=Ee(59301),Ie={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"},Te=Ie,be=Ee(7657),Pe=function(ge,ce){return me.createElement(be.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(Pe),Se=he},38819:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Se}});var Le=Ee(72308),me=Ee(59301),Ie={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"},Te=Ie,be=Ee(7657),Pe=function(ge,ce){return me.createElement(be.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(Pe),Se=he},47472:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Se}});var Le=Ee(72308),me=Ee(59301),Ie={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"},Te=Ie,be=Ee(7657),Pe=function(ge,ce){return me.createElement(be.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(Pe),Se=he},37036:function(){"use strict"},95625:function(){"use strict"},88010:function(Cn,Yt){"use strict";Yt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},23257:function(Cn,Yt){"use strict";Yt.Z={header:"header___HqHSe",checkboxs:"checkboxs___ObBnD",field:"field___w_sM6","oj-form-container":"oj-form-container____odYP","oj-left-panel":"oj-left-panel___emEB2","oj-form-info":"oj-form-info___m00Ag",footer:"footer___O4iSJ",collapse:"collapse___Ltfkj","test-case-name":"test-case-name___miZcb","btn-remove-case":"btn-remove-case___cHap2","icon-tag":"icon-tag___gmyTb",btn_back:"btn_back___tNmX3",testJi:"testJi___L3fHb",upBtn:"upBtn___RGH6X",djs:"djs____TS0n",time:"time___IAdHc"}},38476:function(){"use strict"},39775:function(Cn,Yt,Ee){"use strict";var Le=Ee(59301),me=Object.defineProperty,Ie=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable,Pe=(xe,ge,ce)=>ge in xe?me(xe,ge,{enumerable:!0,configurable:!0,writable:!0,value:ce}):xe[ge]=ce,he=(xe,ge)=>{for(var ce in ge||(ge={}))Te.call(ge,ce)&&Pe(xe,ce,ge[ce]);if(Ie)for(var ce of Ie(ge))be.call(ge,ce)&&Pe(xe,ce,ge[ce]);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"})));Yt.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBmaWxsLW9wYWNpdHk9Ii4wMSIgZmlsbD0iI0ZGRiIgZD0iTTAgMGgzMHYzMEgweiIvPjxwYXRoIGQ9Ik02Ljg2NiAyNi45MjhoLTEuMjhhMi41NjEgMi41NjEgMCAwIDEtMi41NjItMi41NjFWNS41ODVhMi41NjEgMi41NjEgMCAwIDEgMi41NjEtMi41NmgxLjI4djQuMjY4YTIuNTYxIDIuNTYxIDAgMCAwIDIuNTYyIDIuNTZoMy44NDJhMi41NjEgMi41NjEgMCAwIDAgMi41Ni0yLjU2VjMuMDI0aDIuOTE1bDguMTg0IDguMTg0djEzLjE1OWEyLjU2MSAyLjU2MSAwIDAgMS0yLjU2MSAyLjU2MWgtMS4yOHYtNS45NzZjMC0uOTQzLS43NjUtMS43MDctMS43MDgtMS43MDdIOC41NzNjLS45NDMgMC0xLjcwNy43NjQtMS43MDcgMS43MDd2NS45NzZaIiBmaWxsPSIjQjZEMEZDIi8+PHBhdGggZD0iTTguNTczIDMuMDI0aDUuNTV2NC4yNjlhLjg1NC44NTQgMCAwIDEtLjg1NC44NTNIOS40MjdhLjg1NC44NTQgMCAwIDEtLjg1NC0uODUzVjMuMDI0Wk04LjU3MyAyNi45Mjh2LTUuOTc2SDIxLjM4djUuOTc2eiIgZmlsbD0iIzE4OTBGRiIvPjwvZz48L3N2Zz4="},93450:function(Cn,Yt,Ee){"use strict";var Le=Ee(59301),me=Object.defineProperty,Ie=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable,Pe=(xe,ge,ce)=>ge in xe?me(xe,ge,{enumerable:!0,configurable:!0,writable:!0,value:ce}):xe[ge]=ce,he=(xe,ge)=>{for(var ce in ge||(ge={}))Te.call(ge,ce)&&Pe(xe,ce,ge[ce]);if(Ie)for(var ce of Ie(ge))be.call(ge,ce)&&Pe(xe,ce,ge[ce]);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"})));Yt.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMzAgMTVjMCA4LjI4NC02LjcxNiAxNS0xNSAxNS04LjI4NCAwLTE1LTYuNzE2LTE1LTE1QzAgNi43MTYgNi43MTYgMCAxNSAwYzguMjg0IDAgMTUgNi43MTYgMTUgMTVaIiBmaWxsPSIjQkFGRkYwIi8+PHBhdGggZD0iTTI1LjUgMTVjMCA1LjgtNC43IDEwLjUtMTAuNSAxMC41UzQuNSAyMC44IDQuNSAxNSA5LjIgNC41IDE1IDQuNSAyNS41IDkuMiAyNS41IDE1WiIgZmlsbD0iIzQ0RDdCNiIvPjxwYXRoIGQ9Ik0xMy41IDlhMS41IDEuNSAwIDAgMSAxLjUgMS41djQuMzc5bDMuNTYgMy41NmExLjUgMS41IDAgMCAxLTIuMTIgMi4xMjJsLTQtNEExLjUgMS41IDAgMCAxIDEyIDE1LjV2LTVBMS41IDEuNSAwIDAgMSAxMy41IDlaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg=="},74413:function(){"use strict";function Cn(ue,z,ee,oe){ee===void 0&&(ee=0),oe===void 0&&(oe=1/0),this._name=ue,this._defaultValue=z,this._minimum=ee,this._maximum=oe}Object.defineProperty(Cn.prototype,"name",{get:function(){return this._name},set:function(ue){if(typeof ue!="string"||ue==="")throw new Error("Shape name must be a valid string.");this._name=ue}}),Object.defineProperty(Cn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(ue){if(typeof ue!="number"||isNaN(ue))throw new Error("The default value must be a real number, not: "+ue);this._defaultValue=ue}}),Object.defineProperty(Cn.prototype,"minimum",{get:function(){return this._minimum},set:function(ue){if(typeof ue!="number"||isNaN(ue))throw new Error("Minimum must be a real number, not: "+ue);this._minimum=ue}}),Object.defineProperty(Cn.prototype,"maximum",{get:function(){return this._maximum},set:function(ue){if(typeof ue!="number"||isNaN(ue))throw new Error("Maximum must be a real number, not: "+ue);this._maximum=ue}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(ue,z){var ee=go.Shape._FigureParameters[ue];return ee?ee[z]:null},go.Shape.setFigureParameter=function(ue,z,ee){if(!(ee instanceof Cn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+ee);if(ee.defaultValue<ee.minimum||ee.defaultValue>ee.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+ee.defaultValue);var oe=go.Shape._FigureParameters[ue];oe||(oe=[],go.Shape._FigureParameters[ue]=oe),oe[z]=ee};var Yt=[];function Ee(ue,z){var ee=Yt.pop();return ee===void 0?new go.Point(ue,z):(ee.x=ue,ee.y=z,ee)}function Le(){var ue=Yt.pop();return ue===void 0?new go.Point:ue}function me(ue){Yt.push(ue)}function Ie(ue,z,ee,oe,ie,se,le,ye,we){we||(we=new go.Point);var Ce=ue-ee,ke=ie-le,Ne=NaN,je=NaN;if(Ce===0)if(ke===0)ue===ee&&(Ne=ue,je=z);else{var Ve=(se-ye)/ke,Qe=se-Ve*ie;Ne=ue,je=Ve*Ne+Qe}else if(ke===0){var Ge=(z-oe)/Ce,mt=z-Ge*ue;Ne=ie,je=Ge*Ne+mt}else{var Ge=(z-oe)/Ce,Ve=(se-ye)/ke,mt=z-Ge*ue,Qe=se-Ve*ie;Ne=(Qe-mt)/(Ge-Ve),je=Ge*Ne+mt}return we.x=Ne,we.y=je,we}function Te(ue,z,ee,oe,ie,se,le,ye,we,Ce,ke,Ne,je,Ve){var Qe=1-we,Ge=we,mt=ue*Qe+ee*Ge,ct=z*Qe+oe*Ge,Ct=ee*Qe+ie*Ge,it=oe*Qe+se*Ge,St=ie*Qe+le*Ge,ut=se*Qe+ye*Ge,Ft=mt*Qe+Ct*Ge,ht=ct*Qe+it*Ge,rt=Ct*Qe+St*Ge,dt=it*Qe+ut*Ge,yt=Ft*Qe+rt*Ge,_t=ht*Qe+dt*Ge;Ce.x=mt,Ce.y=ct,ke.x=Ft,ke.y=ht,Ne.x=yt,Ne.y=_t,je.x=rt,je.y=dt,Ve.x=St,Ve.y=ut}var be=new go.Spot(.156,.156),Pe=new go.Spot(.844,.844),he=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Cn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(ue,z,ee){var oe=ue?ue.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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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=be,ie.spot2=Pe,ie.defaultStretch=go.GraphObject.Uniform,ie}),go.Shape.defineFigureGenerator("Line1",function(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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 Cn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(ue,z,ee){var oe=ue?ue.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 Cn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(ue,z,ee){var oe=ue?ue.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 Cn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(ue,z,ee){var oe=ue?ue.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 Cn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(ue,z,ee){var oe=ue?ue.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 Cn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(ue,z,ee){var oe=ue?ue.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 ue=Se.pop();return ue===void 0?[]:ue}function ge(ue){ue.length=0,Se.push(ue)}function ce(ue){for(var z=xe(),ee=.5,oe=.5,ie=Math.PI*1.5,se=0,le=0;le<ue;le++)se=2*Math.PI/ue*le+ie,z[le]=new go.Point(oe+ee*Math.cos(se),oe+ee*Math.sin(se));return z.push(z[0]),z}function ve(ue){var z=de(ue),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(ue){for(var z=ce(ue),ee=xe(),oe=Math.floor(z.length/2),ie=z.length-1,se=ue%2===0?2:1,le=0;le<ie;le++){var ye=z[le],we=z[le+1],Ce=z[(oe+le-1)%ie],ke=z[(oe+le+se)%ie];ee[le*2]=ye,ee[le*2+1]=Ie(ye.x,ye.y,Ce.x,Ce.y,we.x,we.y,ke.x,ke.y,new go.Point)}return ee[ee.length]=ee[0],ge(z),ee}go.Shape.defineFigureGenerator("Pentagon",function(ue,z,ee){var oe=ce(5),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var le=1;le<5;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,z,ee){var oe=ce(6),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var le=1;le<6;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,z,ee){var oe=ce(7),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var le=1;le<7;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,z,ee){var oe=ce(8),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var le=1;le<8;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,z,ee){var oe=ce(9),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var le=1;le<9;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,z,ee){var oe=ce(10),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var le=1;le<10;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,z,ee){var oe=ce(12),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var le=1;le<12;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,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 le=1;le<10;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,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 le=1;le<12;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,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 le=1;le<14;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,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 le=1;le<16;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,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 le=1;le<18;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,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 le=1;le<20;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,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 le=1;le<oe.length;le+=3)se.add(new go.PathSegment(go.PathSegment.Bezier,oe[le+2].x*z,oe[le+2].y*ee,oe[le].x*z,oe[le].y*ee,oe[le+1].x*z,oe[le+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(ue,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 le=1;le<oe.length;le+=3)se.add(new go.PathSegment(go.PathSegment.Bezier,oe[le+2].x*z,oe[le+2].y*ee,oe[le].x*z,oe[le].y*ee,oe[le+1].x*z,oe[le+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(ue,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 le=1;le<oe.length;le+=3)se.add(new go.PathSegment(go.PathSegment.Bezier,oe[le+2].x*z,oe[le+2].y*ee,oe[le].x*z,oe[le].y*ee,oe[le+1].x*z,oe[le+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(ue,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 le=1;le<oe.length;le+=3)se.add(new go.PathSegment(go.PathSegment.Bezier,oe[le+2].x*z,oe[le+2].y*ee,oe[le].x*z,oe[le].y*ee,oe[le+1].x*z,oe[le+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(ue,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 le=1;le<oe.length;le+=3)se.add(new go.PathSegment(go.PathSegment.Bezier,oe[le+2].x*z,oe[le+2].y*ee,oe[le].x*z,oe[le].y*ee,oe[le+1].x*z,oe[le+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(ue,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 le=1;le<oe.length;le+=3)se.add(new go.PathSegment(go.PathSegment.Bezier,oe[le+2].x*z,oe[le+2].y*ee,oe[le].x*z,oe[le].y*ee,oe[le+1].x*z,oe[le+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 Cn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new Cn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(ue,z,ee){var oe=ue?ue.parameter1:NaN,ie=ue?ue.parameter2:NaN;isNaN(oe)&&(oe=8),isNaN(ie)&&(ie=8);var se=new go.Geometry,le=new go.PathFigure(0,0,!0);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe<z/2&&ie<ee/2&&(le.add(new go.PathSegment(go.PathSegment.Move,oe,ie)),le.add(new go.PathSegment(go.PathSegment.Line,oe,ee-ie)),le.add(new go.PathSegment(go.PathSegment.Line,z-oe,ee-ie)),le.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 Cn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(ue,z,ee){var oe=ue?ue.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=8);var ie=z/2,se=new go.Geometry,le=new go.PathFigure(z,z/2,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Arc,0,360,ie,ie,ie,ie).close());var ye=Math.max(ie-oe,0);return ye>0&&(le.add(new go.PathSegment(go.PathSegment.Move,z/2+ye,z/2)),le.add(new go.PathSegment(go.PathSegment.Arc,0,-360,ie,ie,ye,ye).close())),se.spot1=be,se.spot2=Pe,se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("Cloud",function(ue,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(ue,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 Cn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Cn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(ue,z,ee){var oe=ue?ue.parameter1:NaN,ie=ue?ue.parameter2:NaN;isNaN(oe)&&(oe=0),isNaN(ie)&&(ie=315);var se=oe%360;se<0&&(se+=360);var le=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,le,ye,ye,ye,ye).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(ue,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 Cn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(ue,z,ee){var oe=ue?ue.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=30);var ie=Math.min(oe,z)/2,se=z/2,le=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,le-ie)).add(new go.PathSegment(go.PathSegment.Line,z,le-ie)).add(new go.PathSegment(go.PathSegment.Line,z,le+ie)).add(new go.PathSegment(go.PathSegment.Line,se+ie,le+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,le+ie)).add(new go.PathSegment(go.PathSegment.Line,0,le+ie)).add(new go.PathSegment(go.PathSegment.Line,0,le-ie)).add(new go.PathSegment(go.PathSegment.Line,se-ie,le-ie).close()))}),go.Shape.setFigureParameter("ThinCross",0,new Cn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(ue,z,ee){var oe=ue?ue.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=10);var ie=Math.min(oe,z)/2,se=z/2,le=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,le-ie)).add(new go.PathSegment(go.PathSegment.Line,z,le-ie)).add(new go.PathSegment(go.PathSegment.Line,z,le+ie)).add(new go.PathSegment(go.PathSegment.Line,se+ie,le+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,le+ie)).add(new go.PathSegment(go.PathSegment.Line,0,le+ie)).add(new go.PathSegment(go.PathSegment.Line,0,le-ie)).add(new go.PathSegment(go.PathSegment.Line,se-ie,le-ie).close()))}),go.Shape.setFigureParameter("ThickX",0,new Cn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(ue,z,ee){var oe=ue?ue.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,le=ee/2,ye=Math.atan2(ee,z),we=oe-Math.min(Math.cos(ye)*oe/2,se),Ce=oe-Math.min(Math.sin(ye)*oe/2,le),ie=new go.Geometry,ke=new go.PathFigure(we,0,!0);return ie.add(ke),ke.add(new go.PathSegment(go.PathSegment.Line,se,.2*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,z-we,0)),ke.add(new go.PathSegment(go.PathSegment.Line,z,Ce)),ke.add(new go.PathSegment(go.PathSegment.Line,.8*z,le)),ke.add(new go.PathSegment(go.PathSegment.Line,z,ee-Ce)),ke.add(new go.PathSegment(go.PathSegment.Line,z-we,ee)),ke.add(new go.PathSegment(go.PathSegment.Line,se,.8*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,we,ee)),ke.add(new go.PathSegment(go.PathSegment.Line,0,ee-Ce)),ke.add(new go.PathSegment(go.PathSegment.Line,.2*z,le)),ke.add(new go.PathSegment(go.PathSegment.Line,0,Ce).close()),ie}}),go.Shape.setFigureParameter("ThinX",0,new Cn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(ue,z,ee){var oe=ue?ue.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 Cn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(ue,z,ee){var oe=ue?ue.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 Cn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(ue,z,ee){var oe=ue?ue.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(ue,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(ue,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(ue,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(ue,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(ue,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,le=.3,ye=0,we=se*he;return ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5+se+ye)*ee,(.5-se+le)*z,(.5+we+ye)*ee,(.5-we+le)*z,(.5+se+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+le)*z,(.5+ye)*ee,(.5+we+le)*z,(.5+se+ye)*ee,(.5+se+le)*z,(.5+we+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5-se+ye)*ee,(1-.5+se+le)*z,(.5-we+ye)*ee,(.5+we+le)*z,(.5-se+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.65*z,.36771243*ee,(.5-we+le)*z,(.5-se+ye)*ee,(.5-se+le+.05)*z,(.5-we+ye-.02)*ee)),se=.2,le=0,ye=-.3,we=se*he,ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+le)*z,(.5+ye)*ee,(.5+we+le)*z,(.5+se+ye)*ee,(.5+se+le)*z,(.5+we+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5-se+ye)*ee,(1-.5+se+le)*z,(.5-we+ye)*ee,(.5+we+le)*z,(.5-se+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+le)*z,(.5+ye)*ee,(.5-we+le)*z,(.5-se+ye)*ee,(.5-se+le)*z,(.5-we+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-we+le)*z,(.5+se+ye)*ee,(.5-se+le)*z,(.5+we+ye)*ee,(.5-we+le)*z,(.5+se+ye)*ee)),se=.2,le=-.3,ye=0,we=se*he,ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5-se+ye)*ee,(1-.5+se+le-.05)*z,(.5-we+ye-.02)*ee,(.5+we+le)*z,(.5-se+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+le)*z,(.5+ye)*ee,(.5-we+le)*z,(.5-se+ye)*ee,(.5-se+le)*z,(.5-we+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5+se+ye)*ee,(.5-se+le)*z,(.5+we+ye)*ee,(.5-we+le)*z,(.5+se+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.6*ee,(.5+we+le)*z,(.5+se+ye)*ee,(.5+se+le)*z,(.5+we+ye)*ee).close()),oe.setSpots(.06,.33,.93,.68),oe}),go.Shape.defineFigureGenerator("YinYang",function(ue,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,le=.5,ye=.25;return ie.add(new go.PathSegment(go.PathSegment.Move,(le+se)*z,ye*ee)),ie.add(new go.PathSegment(go.PathSegment.Arc,0,-360,z*le,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((le+se)*z,ye*ee,!0),oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,0,360,z*le,ee*ye,se*z,se*z).close()),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("Peace",function(ue,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(ue,z,ee){var oe=new go.Geometry,ie=he*.5,se=.5,le=.5,ye=.5,we=new go.PathFigure(le*z,(ye-se)*ee);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,(le-se)*z,ye*ee,(le-ie)*z,(ye-se)*ee,(le-se)*z,(ye-ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+se)*ee,(le-se)*z,(ye+ie)*ee,(le-ie)*z,(ye+se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*z,ye*ee,(le+ie)*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye-se)*ee,(le+se)*z,(ye-ie)*ee,(le+ie)*z,(ye-se)*ee)),se=.4,ie=he*.4;var Ce=Le(),ke=Le(),Ne=Le(),je=Le();Te(le,ye-se,le+ie,ye-se,le+se,ye-ie,le+se,ye,.42,Ce,ke,Ne,je,je);var Ve=Le(),Qe=Le(),Ge=Le();Te(le,ye-se,le+ie,ye-se,le+se,ye-ie,le+se,ye,.58,je,je,Ge,Ve,Qe);var mt=Le(),ct=Le(),Ct=Le();Te(le,ye+se,le-ie,ye+se,le-se,ye+ie,le-se,ye,.42,mt,ct,Ct,je,je);var it=Le(),St=Le(),ut=Le();return Te(le,ye+se,le-ie,ye+se,le-se,ye+ie,le-se,ye,.58,je,je,ut,it,St),we.add(new go.PathSegment(go.PathSegment.Move,ut.x*z,ut.y*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le-se)*z,ye*ee,it.x*z,it.y*ee,St.x*z,St.y*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye-se)*ee,(le-se)*z,(ye-ie)*ee,(le-ie)*z,(ye-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,Ne.x*z,Ne.y*ee,Ce.x*z,Ce.y*ee,ke.x*z,ke.y*ee)),we.add(new go.PathSegment(go.PathSegment.Line,ut.x*z,ut.y*ee).close()),we.add(new go.PathSegment(go.PathSegment.Move,Ct.x*z,Ct.y*ee)),we.add(new go.PathSegment(go.PathSegment.Line,Ge.x*z,Ge.y*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*z,ye*ee,Ve.x*z,Ve.y*ee,Qe.x*z,Qe.y*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee,(le+ie)*z,(ye+se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,Ct.x*z,Ct.y*ee,mt.x*z,mt.y*ee,ct.x*z,ct.y*ee).close()),me(Ce),me(ke),me(Ne),me(je),me(Ve),me(Qe),me(Ge),me(mt),me(ct),me(Ct),me(it),me(St),me(ut),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("Fragile",function(ue,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 Cn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(ue,z,ee){var oe=ue?ue.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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=he*.4,se=.4,le=.5,ye=.5,we=Le(),Ce=Le(),ke=Le(),Ne=Le(),je=new go.PathFigure((le-se)*z,ye*ee,!1);oe.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye-se)*ee,(le-se)*z,(ye-ie)*ee,(le-ie)*z,(ye-se)*ee)),Te(le,ye-se,le+ie,ye-se,le+se,ye-ie,le+se,ye,.44,ke,Ne,Ce,we,we),je.add(new go.PathSegment(go.PathSegment.Bezier,Ce.x*z,Ce.y*ee,ke.x*z,ke.y*ee,Ne.x*z,Ne.y*ee));var Ve=Ee(Ce.x,Ce.y);Te(le,ye-se,le+ie,ye-se,le+se,ye-ie,le+se,ye,.56,we,we,Ce,ke,Ne);var Qe=Ee(Ce.x,Ce.y);je.add(new go.PathSegment(go.PathSegment.Line,(Ve.x*.1+.95*.9)*z,Ve.y*.1*ee)),je.add(new go.PathSegment(go.PathSegment.Line,.85*z,Ve.y*.1*ee)),je.add(new go.PathSegment(go.PathSegment.Line,.85*z,0)),je.add(new go.PathSegment(go.PathSegment.Line,z,0)),je.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),je.add(new go.PathSegment(go.PathSegment.Line,(Qe.x*.1+.9)*z,.15*ee)),je.add(new go.PathSegment(go.PathSegment.Line,(Qe.x*.1+.9)*z,(Qe.y*.1+.05*.9)*ee)),je.add(new go.PathSegment(go.PathSegment.Line,Qe.x*z,Qe.y*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*z,ye*ee,ke.x*z,ke.y*ee,Ne.x*z,Ne.y*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee,(le+ie)*z,(ye+se)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(le-se)*z,ye*ee,(le-ie)*z,(ye+se)*ee,(le-se)*z,(ye+ie)*ee)),se=.35,ie=he*.35;var Ge=new go.PathFigure(le*z,(ye-se)*ee,!1);oe.add(Ge),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(le-se)*z,ye*ee,(le-ie)*z,(ye-se)*ee,(le-se)*z,(ye-ie)*ee)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+se)*ee,(le-se)*z,(ye+ie)*ee,(le-ie)*z,(ye+se)*ee)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*z,ye*ee,(le+ie)*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye-se)*ee,(le+se)*z,(ye-ie)*ee,(le+ie)*z,(ye-se)*ee));var mt=new go.PathFigure((le-se)*z,ye*ee,!1);return oe.add(mt),me(we),me(Ce),me(ke),me(Ne),me(Ve),me(Qe),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(ue,z,ee){var oe=new go.Geometry,ie=.375,se=0,le=-.125,ye=ie*he,we=new go.PathFigure((.525+se)*z,(.5+ie+le)*ee,!1);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+se)*z,(.5+le)*ee,(.5+ye+se)*z,(.5+ie+le)*ee,(.5+ie+se)*z,(.5+ye+le)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5+se)*z,(.5-ie+le)*ee,(1-.5+ie+se)*z,(.5-ye+le)*ee,(.5+ye+se)*z,(.5-ie+le)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+se)*z,(.5+le)*ee,(.5-ye+se)*z,(.5-ie+le)*ee,(.5-ie+se)*z,(.5-ye+le)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.475+se)*z,(.5+ie+le)*ee,(.5-ie+se)*z,(.5+ye+le)*ee,(.5-ye+se)*z,(.5+ie+le)*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,le=-.125,ye=ie*he;var we=new go.PathFigure((1-.5+ie+se)*z,(.5+le)*ee,!1);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5+se)*z,(.5+ie+le)*ee,(.5+ie+se)*z,(.5+ye+le)*ee,(.5+ye+se)*z,(.5+ie+le)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+se)*z,(.5+le)*ee,(.5-ye+se)*z,(.5+ie+le)*ee,(.5-ie+se)*z,(.5+ye+le)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5+se)*z,(.5-ie+le)*ee,(.5-ie+se)*z,(.5-ye+le)*ee,(.5-ye+se)*z,(.5-ie+le)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+se)*z,(.5+le)*ee,(.5+ye+se)*z,(.5-ie+le)*ee,(1-.5+ie+se)*z,(.5-ye+le)*ee));var we=new go.PathFigure((.525+se)*z,(.5+ie+le)*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(ue,z,ee){var oe=ue?ue.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(ue,z,ee){var oe=ue?ue.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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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 Cn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Cn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(ue,z,ee){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=ue?ue.parameter2:NaN;isNaN(ie)&&(ie=.3);var se=(1-oe)*z,le=(.5-ie/2)*ee,ye=(.5+ie/2)*ee,we=new go.Geometry,Ce=new go.PathFigure(0,le,!0);we.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Line,se,le)),Ce.add(new go.PathSegment(go.PathSegment.Line,se,0)),Ce.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),Ce.add(new go.PathSegment(go.PathSegment.Line,se,ee)),Ce.add(new go.PathSegment(go.PathSegment.Line,se,ye)),Ce.add(new go.PathSegment(go.PathSegment.Line,0,ye).close()),we.spot1=new go.Spot(0,le/ee);var ke=Ie(0,ye/ee,1,ye/ee,se/z,1,1,.5,Le());return we.spot2=new go.Spot(ke.x,ke.y),me(ke),we}),go.Shape.setFigureParameter("Arrow2",0,new Cn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Cn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(ue,z,ee){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=30),oe>z&&(oe=z);var ie=ue?ue.parameter2:NaN;isNaN(ie)&&(ie=30),ie=Math.min(ie,ee/2);var se=z-oe,le=(ee-ie)/2,ye=le+ie,we=new go.Geometry,Ce=new go.PathFigure(0,le,!0);we.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Line,se,le)),Ce.add(new go.PathSegment(go.PathSegment.Line,se,0)),Ce.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),Ce.add(new go.PathSegment(go.PathSegment.Line,se,ee)),Ce.add(new go.PathSegment(go.PathSegment.Line,se,ye)),Ce.add(new go.PathSegment(go.PathSegment.Line,0,ye).close()),we.spot1=new go.Spot(0,le/ee);var ke=Ie(0,ye/ee,1,ye/ee,se/z,1,1,.5,Le());return we.spot2=new go.Spot(ke.x,ke.y),me(ke),we}),go.Shape.defineFigureGenerator("Chevron",function(ue,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(ue,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 Cn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(ue,z,ee){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=(.5-oe/2)*ee,se=(.5+oe/2)*ee,le=new go.Geometry,ye=new go.PathFigure(z,.5*ee,!0);le.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=Ie(0,.5,.3,0,0,ie/ee,.1,ie/ee,Le());return le.spot1=new go.Spot(we.x,we.y),we=Ie(.7,1,1,.5,0,se/ee,1,se/ee,we),le.spot2=new go.Spot(we.x,we.y),me(we),le}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Cn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Cn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(ue,z,ee){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=40);var ie=ue?ue.parameter2:NaN;isNaN(ie)&&(ie=100);var se=(ee-oe)/2,le=se+oe,ye=(ee-ie)/2,we=ye+ie;(oe>ee||ie>ee)&&(ie>oe?(oe=oe*ee/ie,se=(ee-oe)/2,le=se+oe,ye=0,we=ee):(se=0,le=ee,ye=0,we=ee));var Ce=new go.Geometry,ke=new go.PathFigure(z,.5*ee,!0);Ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Line,.7*z,we)),ke.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),ke.add(new go.PathSegment(go.PathSegment.Line,.3*z,le)),ke.add(new go.PathSegment(go.PathSegment.Line,.3*z,we)),ke.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.3*z,ye)),ke.add(new go.PathSegment(go.PathSegment.Line,.3*z,se)),ke.add(new go.PathSegment(go.PathSegment.Line,.7*z,se)),ke.add(new go.PathSegment(go.PathSegment.Line,.7*z,ye).close());var Ne=Ie(0,.5,.3,ye/ee,0,se/ee,1,se/ee,Le());return Ce.spot1=new go.Spot(Ne.x,Ne.y),Ne=Ie(.7,we/ee,1,.5,0,le/ee,1,le/ee,Ne),Ce.spot2=new go.Spot(Ne.x,Ne.y),me(Ne),Ce}),go.Shape.setFigureParameter("IBeamArrow",0,new Cn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(ue,z,ee){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=(.5-oe/2)*ee,se=(.5+oe/2)*ee,le=new go.Geometry,ye=new go.PathFigure(z,.5*ee,!0);le.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()),le.spot1=new go.Spot(0,ie/ee);var we=Ie(.7,1,1,.5,0,se/ee,1,se/ee,Le());return le.spot2=new go.Spot(we.x,we.y),me(we),le}),go.Shape.setFigureParameter("IBeamArrow2",0,new Cn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Cn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(ue,z,ee){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=40);var ie=ue?ue.parameter2:NaN;isNaN(ie)&&(ie=100);var se=(ee-oe)/2,le=se+oe,ye=(ee-ie)/2,we=ye+ie;(oe>ee||ie>ee)&&(ie>oe?(oe=oe*ee/ie,se=(ee-oe)/2,le=se+oe,ye=0,we=ee):(se=0,le=ee,ye=0,we=ee));var Ce=new go.Geometry,ke=new go.PathFigure(z,.5*ee,!0);Ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Line,.7*z,we)),ke.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),ke.add(new go.PathSegment(go.PathSegment.Line,.2*z,le)),ke.add(new go.PathSegment(go.PathSegment.Line,.2*z,we)),ke.add(new go.PathSegment(go.PathSegment.Line,0,we)),ke.add(new go.PathSegment(go.PathSegment.Line,0,ye)),ke.add(new go.PathSegment(go.PathSegment.Line,.2*z,ye)),ke.add(new go.PathSegment(go.PathSegment.Line,.2*z,se)),ke.add(new go.PathSegment(go.PathSegment.Line,.7*z,se)),ke.add(new go.PathSegment(go.PathSegment.Line,.7*z,ye).close()),Ce.spot1=new go.Spot(0,se/ee);var Ne=Ie(.7,we/ee,1,.5,0,le/ee,1,le/ee,Le());return Ce.spot2=new go.Spot(Ne.x,Ne.y),me(Ne),Ce}),go.Shape.setFigureParameter("Pointer",0,new Cn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(ue,z,ee){var oe=ue?ue.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 le=Ie(.2,.65,1,.65,0,1,1,.5,Le());return ie.spot2=new go.Spot(le.x,le.y),me(le),ie}),go.Shape.setFigureParameter("RoundedPointer",0,new Cn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(ue,z,ee){var oe=ue?ue.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 le=Ie(0,.65,1,.65,0,1,1,.5,Le());return ie.spot2=new go.Spot(le.x,le.y),me(le),ie}),go.Shape.setFigureParameter("SplitEndArrow",0,new Cn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(ue,z,ee){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.4);var ie=(.5-oe/2)*ee,se=(.5+oe/2)*ee,le=new go.Geometry,ye=new go.PathFigure(z,.5*ee,!0);le.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()),le.spot1=new go.Spot(.2,.3);var we=Ie(.7,1,1,.5,0,se/ee,1,se/ee,Le());return le.spot2=new go.Spot(we.x,we.y),me(we),le}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Cn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(ue,z,ee){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=50);var ie=(ee-oe)/2,se=ie+oe;oe>ee&&(ie=0,se=ee);var le=new go.Geometry,ye=new go.PathFigure(z,.5*ee,!0);le.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()),le.spot1=new go.Spot(.2,ie/ee);var we=Ie(.7,1,1,.5,0,se/ee,1,se/ee,Le());return le.spot2=new go.Spot(we.x,we.y),me(we),le}),go.Shape.setFigureParameter("SquareArrow",0,new Cn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(ue,z,ee){var oe=ue?ue.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(ue,z,ee){var oe=new go.Geometry,ie=he*.5,se=he*.1,le=new go.PathFigure(0,.9*ee,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+se)*ee,(.5+ie)*z,ee)),le.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(ue,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(ue,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(ue,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(ue,z,ee){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,ee/3);var ie=new go.Geometry,se=he*.5,le=new go.PathFigure(0,oe,!0);ie.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,he*oe,(.5-se)*z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,1*z,oe,(.5+se)*z,0,1*z,he*oe)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee-oe)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,1*ee,1*z,ee-he*oe,(.5+se)*z,1*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-oe,(.5-se)*z,1*ee,0,ee-he*oe)),le.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(ue,z,ee){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,ee/3);var ie=new go.Geometry,se=he*.5,le=new go.PathFigure(0,ee-oe,!0);ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,oe)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,he*oe,(.5-se)*z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,oe,(.5+se)*z,0,z,he*oe)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee-oe)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,ee-he*oe,(.5+se)*z,ee)),le.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(ue,z,ee){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,z/3);var ie=new go.Geometry,se=he*.5,le=new go.PathFigure(oe,0,!0);ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z-oe,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,z-he*oe,0,z,(.5-se)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,z-oe,ee,z,(.5+se)*ee,z-he*oe,ee)),le.add(new go.PathSegment(go.PathSegment.Line,oe,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,he*oe,ee,0,(.5+se)*ee)),le.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(ue,z,ee){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,z/3);var ie=new go.Geometry,se=he*.5,le=new go.PathFigure(z-oe,0,!0);ie.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,z-he*oe,0,z,(.5-se)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,z-oe,ee,z,(.5+se)*ee,z-he*oe,ee)),le.add(new go.PathSegment(go.PathSegment.Line,oe,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,he*oe,ee,0,(.5+se)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,(.5-se)*ee,he*oe,0)),le.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(ue,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(ue,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(ue,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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=.2,se=.1,le=he*ie,ye=he*se,we=.5,Ce=.1,ke=new go.PathFigure(we*z,(Ce+se)*ee,!0);oe.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,(we-ie)*z,Ce*ee,(we-le)*z,(Ce+se)*ee,(we-ie)*z,(Ce+ye)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Ce-se)*ee,(we-ie)*z,(Ce-ye)*ee,(we-le)*z,(Ce-se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(we+ie)*z,Ce*ee,(we+le)*z,(Ce-se)*ee,(we+ie)*z,(Ce-ye)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Ce+se)*ee,(we+ie)*z,(Ce+ye)*ee,(we+le)*z,(Ce+se)*ee));var Ne=.05,je=he*Ne;we=.05,Ce=.25;var Ve=new go.PathFigure(.5*z,.2*ee,!0);return oe.add(Ve),Ve.add(new go.PathSegment(go.PathSegment.Line,.95*z,.2*ee)),we=.95,Ce=.25,Ve.add(new go.PathSegment(go.PathSegment.Bezier,(we+Ne)*z,Ce*ee,(we+je)*z,(Ce-Ne)*ee,(we+Ne)*z,(Ce-je)*ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,z,.6*ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,.85*z,.35*ee)),Ne=.025,je=he*Ne,we=.825,Ce=.35,Ve.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Ce-Ne)*ee,(we+Ne)*z,(Ce-je)*ee,(we+je)*z,(Ce-Ne)*ee)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(we-Ne)*z,Ce*ee,(we-je)*z,(Ce-Ne)*ee,(we-Ne)*z,(Ce-je)*ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,.55*z,ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*ee)),Ne=.05,je=he*Ne,we=.5,Ce=.7,Ve.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Ce-Ne)*ee,(we+Ne)*z,(Ce-je)*ee,(we+je)*z,(Ce-Ne)*ee)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(we-Ne)*z,Ce*ee,(we-je)*z,(Ce-Ne)*ee,(we-Ne)*z,(Ce-je)*ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,.45*z,ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,.2*z,.35*ee)),Ne=.025,je=he*Ne,we=.175,Ce=.35,Ve.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Ce-Ne)*ee,(we+Ne)*z,(Ce-je)*ee,(we+je)*z,(Ce-Ne)*ee)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(we-Ne)*z,Ce*ee,(we-je)*z,(Ce-Ne)*ee,(we-Ne)*z,(Ce-je)*ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),Ne=.05,je=he*Ne,we=.05,Ce=.25,Ve.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Ce-Ne)*ee,(we-Ne)*z,(Ce-je)*ee,(we-je)*z,(Ce-Ne)*ee)),Ve.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 Cn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(ue,z,ee){var oe=ue?ue.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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.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 le=new go.PathFigure(0,ie*ee,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,ie*ee)),le.add(new go.PathSegment(go.PathSegment.Move,0,(1-ie)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,(1-ie)*ee)),oe}),go.Shape.defineFigureGenerator("Database",function(ue,z,ee){var oe=new go.Geometry,ie=he*.5,se=he*.1,le=new go.PathFigure(z,.1*ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+se)*ee,(.5+ie)*z,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-ie)*z,ee,0,(.9+se)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-se)*ee,(.5-ie)*z,0)),le.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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=he*.5,se=he*.1,le=new go.PathFigure(z,.1*ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+se)*ee,(.5+ie)*z,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-ie)*z,ee,0,(.9+se)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-se)*ee,(.5-ie)*z,0)),le.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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.parameter1:NaN;isNaN(ie)?ie=.2:ie<.15&&(ie=.15);var se=he*.2,le=new go.PathFigure(0,.2*ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,0,(.2-se)*ee,(.2-se)*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.2*ee,(.8+se)*z,0,z,(.2-se)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,ee,z,(.8+se)*ee,(.8+se)*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*ee,(.2-se)*z,ee,0,(.8+se)*ee)),le.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(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.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 le=new go.PathFigure(0,ie*ee,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,ie*ee)),oe}),go.Shape.defineFigureGenerator("Document",function(ue,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(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.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 le=new go.PathFigure(ie*z,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,ie*ee)),le.add(new go.PathSegment(go.PathSegment.Move,z,ie*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,0)),le.add(new go.PathSegment(go.PathSegment.Move,0,(1-ie)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),le.add(new go.PathSegment(go.PathSegment.Move,(1-ie)*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,(1-ie)*ee)),oe}),go.Shape.defineFigureGenerator("ExternalProcess",function(ue,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(ue,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(ue,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 le=new go.PathFigure(z,.5*ee,!1);return oe.add(le),le.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(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.parameter1:NaN,se=ue?ue.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(se)&&(se=.1);var le=new go.PathFigure(0,0,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.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(ue,z,ee){var oe=new go.Geometry,ie=1/Math.SQRT2,se=(1-1/Math.SQRT2)/2,le=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+le)*ee,(ye+le)*z,ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,ye*ee,(ye-le)*z,ee,0,(ye+le)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ye*z,0,0,(ye-le)*ee,(ye-le)*z,0)),we.add(new go.PathSegment(go.PathSegment.Bezier,z,ye*ee,(ye+le)*z,0,z,(ye-le)*ee));var Ce=new go.PathFigure((se+ie)*z,(se+ie)*ee,!1);return oe.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Line,se*z,se*ee)),Ce.add(new go.PathSegment(go.PathSegment.Move,se*z,(se+ie)*ee)),Ce.add(new go.PathSegment(go.PathSegment.Line,(se+ie)*z,se*ee)),oe}),go.Shape.defineFigureGenerator("LinedDocument",function(ue,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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=he*.5,se=.5,le=new go.PathFigure(.5*z,ee,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,0,se*ee,(se-ie)*z,ee,0,(se+ie)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,se*z,0,0,(se-ie)*ee,(se-ie)*z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,se*ee,(se+ie)*z,0,z,(se-ie)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,(se+.1)*z,.9*ee,z,(se+ie)*ee,(se+ie)*z,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.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(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.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(ue,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(ue,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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.parameter1:NaN;isNaN(ie)&&(ie=.1);var se=1-ie,le=new go.PathFigure(0,0,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=he*.5,se=.5,le=new go.PathFigure(z,se*ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,se*z,ee,z,(se+ie)*ee,(se+ie)*z,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,se*ee,(se-ie)*z,ee,0,(se+ie)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,se*z,0,0,(se-ie)*ee,(se-ie)*z,0)),le.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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.parameter1:NaN,se=ue?ue.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(se)&&(se=.3);var le=new go.PathFigure(0,0,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.parameter1:NaN,se=ue?ue.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(se)&&(se=.3);var le=new go.PathFigure(0,0,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe}),go.Shape.defineFigureGenerator("Procedure",function(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.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 le=new go.PathFigure((1-ie)*z,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,ee)),le.add(new go.PathSegment(go.PathSegment.Move,ie*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),oe}),go.Shape.defineFigureGenerator("Process",function(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.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 le=new go.PathFigure(ie*z,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),oe.spot2=go.Spot.BottomRight,oe}),go.Shape.defineFigureGenerator("Sort",function(ue,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(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.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 le=new go.PathFigure(ie*z,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),le.add(new go.PathSegment(go.PathSegment.Move,(1-ie)*z,0)),le.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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.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(ue,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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=he*.5,se=.5,le=new go.PathFigure(z,se*ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,se*z,ee,z,(se+ie)*ee,(se+ie)*z,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,se*ee,(se-ie)*z,ee,0,(se+ie)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,se*z,0,0,(se-ie)*ee,(se-ie)*z,0)),le.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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=he*.1,se=.1,le=.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 Ce=new go.PathFigure((le+se)*z,ye*ee,!0);return oe.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee,(le+ie)*z,(ye+se)*ee)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(le-se)*z,ye*ee,(le-ie)*z,(ye+se)*ee,(le-se)*z,(ye+ie)*ee)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye-se)*ee,(le-se)*z,(ye-ie)*ee,(le-ie)*z,(ye-se)*ee)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*z,ye*ee,(le+ie)*z,(ye-se)*ee,(le+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(ue,z,ee){var oe=new go.Geometry,ie=he*.5,se=he*.4,le=he*.1,ye=.1,we=.9,Ce=.5,ke=new go.PathFigure(.8*z,.5*ee,!0);oe.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,ee,.8*z,(.5+se)*ee,(.4+ie)*z,ee)),ke.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ke.add(new go.PathSegment(go.PathSegment.Line,0,0)),ke.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ke.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(.4+ie)*z,0,.8*z,(.5-se)*ee));var Ne=new go.PathFigure((we+ye)*z,Ce*ee,!0);return oe.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Ce+ye)*ee,(we+ye)*z,(Ce+le)*ee,(we+le)*z,(Ce+ye)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(we-ye)*z,Ce*ee,(we-le)*z,(Ce+ye)*ee,(we-ye)*z,(Ce+le)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Ce-ye)*ee,(we-ye)*z,(Ce-le)*ee,(we-le)*z,(Ce-ye)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(we+ye)*z,Ce*ee,(we+le)*z,(Ce-ye)*ee,(we+ye)*z,(Ce-le)*ee)),oe.spot1=new go.Spot(0,.05),oe.spot2=new go.Spot(.55,.95),oe}),go.Shape.defineFigureGenerator("NorGate",function(ue,z,ee){var oe=new go.Geometry,ie=.5,se=he*ie,le=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,(le+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,(le+se)*z,(ye-ie)*ee,.7*z,(ye-se)*ee)),ie=.1,se=he*.1,le=.9,ye=.5;var Ce=new go.PathFigure((le-ie)*z,ye*ee,!0);return oe.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye-ie)*ee,(le-ie)*z,(ye-se)*ee,(le-se)*z,(ye-ie)*ee)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(le+ie)*z,ye*ee,(le+se)*z,(ye-ie)*ee,(le+ie)*z,(ye-se)*ee)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+ie)*ee,(le+ie)*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(le-ie)*z,ye*ee,(le-se)*z,(ye+ie)*ee,(le-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(ue,z,ee){var oe=new go.Geometry,ie=.5,se=he*ie,le=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,(le+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,(le+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(ue,z,ee){var oe=new go.Geometry,ie=.5,se=he*ie,le=.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 Ce=new go.PathFigure(.8*z,.5*ee,!0);oe.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,ee,.7*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*ee,.45*z,.25*ee)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(le+se)*z,(ye-ie)*ee,.7*z,(ye-se)*ee)),ie=.1,se=he*.1,le=.9,ye=.5;var ke=new go.PathFigure((le-ie)*z,ye*ee,!0);return oe.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye-ie)*ee,(le-ie)*z,(ye-se)*ee,(le-se)*z,(ye-ie)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(le+ie)*z,ye*ee,(le+se)*z,(ye-ie)*ee,(le+ie)*z,(ye-se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+ie)*ee,(le+ie)*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(le-ie)*z,ye*ee,(le-se)*z,(ye+ie)*ee,(le-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(ue,z,ee){var oe=new go.Geometry,ie=.5,se=he*ie,le=.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 Ce=new go.PathFigure(.2*z,0,!0);return oe.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(le+se)*z,(ye-ie)*ee,.9*z,(ye-se)*ee)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,ee,.9*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee)),Ce.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(ue,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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=he*.1,se=.1,le=.1,ye=.5,we=new go.PathFigure((le-ie*.5)*z,ee,!1);return oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*z,0,(le-ie)*z,ee,(le-se)*z,0)),le=.3,we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,ee,(le+se)*z,0,(le+ie)*z,ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*z,0,(le-ie)*z,ee,(le-se)*z,0)),le=.5,we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,ee,(le+se)*z,0,(le+ie)*z,ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*z,0,(le-ie)*z,ee,(le-se)*z,0)),le=.7,we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,ee,(le+se)*z,0,(le+ie)*z,ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*z,0,(le-ie)*z,ee,(le-se)*z,0)),le=.9,we.add(new go.PathSegment(go.PathSegment.Bezier,(le+ie*.5)*z,ee,(le+se)*z,0,(le+ie)*z,ee)),oe}),go.Shape.defineFigureGenerator("ACvoltageSource",function(ue,z,ee){var oe=new go.Geometry,ie=he*.5,se=.5,le=.5,ye=.5,we=new go.PathFigure((le-se)*z,ye*ee,!1);return oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye-se)*ee,(le-se)*z,(ye-ie)*ee,(le-ie)*z,(ye-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*z,ye*ee,(le+ie)*z,(ye-se)*ee,(le+se)*z,(ye-ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee,(le+ie)*z,(ye+se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le-se)*z,ye*ee,(le-ie)*z,(ye+se)*ee,(le-se)*z,(ye+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Move,(le-se+.1)*z,ye*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le+se-.1)*z,ye*ee,le*z,(ye-se)*ee,le*z,(ye+se)*ee)),oe}),go.Shape.defineFigureGenerator("DCvoltageSource",function(ue,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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=z,se=ee;z=z*.38,ee=ee*.6;var le=he*.8,ye=.8,we=0,Ce=.5,ke=(ie-z)/2,Ne=(se-ee)/2,je=new go.PathFigure(we*z+ke,(Ce+ye)*ee+Ne,!0);oe.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,(we-ye)*z+ke,Ce*ee+Ne,(we-le)*z+ke,(Ce+ye)*ee+Ne,(we-ye)*z+ke,(Ce+le)*ee+Ne)),je.add(new go.PathSegment(go.PathSegment.Bezier,we*z+ke,(Ce-ye)*ee+Ne,(we-ye)*z+ke,(Ce-le)*ee+Ne,(we-le)*z+ke,(Ce-ye)*ee+Ne)),je.add(new go.PathSegment(go.PathSegment.Bezier,(we-ye+le*.5)*z+ke,Ce*ee+Ne,we*z+ke,(Ce-ye)*ee+Ne,(we-ye+le*.5)*z+ke,(Ce-le)*ee+Ne)),je.add(new go.PathSegment(go.PathSegment.Bezier,we*z+ke,(Ce+ye)*ee+Ne,(we-ye+le*.5)*z+ke,(Ce+le)*ee+Ne,we*z+ke,(Ce+ye)*ee+Ne).close()),le=he*.4,ye=.4,we=.2,Ce=.5;var Ve=new go.PathFigure(we*z+ke,(Ce+ye)*ee+Ne,!0);oe.add(Ve),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(we-ye)*z+ke,Ce*ee+Ne,(we-le)*z+ke,(Ce+ye)*ee+Ne,(we-ye)*z+ke,(Ce+le)*ee+Ne)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,we*z+ke,(Ce-ye)*ee+Ne,(we-ye)*z+ke,(Ce-le)*ee+Ne,(we-le)*z+ke,(Ce-ye)*ee+Ne)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(we-ye+le*.5)*z+ke,Ce*ee+Ne,we*z+ke,(Ce-ye)*ee+Ne,(we-ye+le*.5)*z+ke,(Ce-le)*ee+Ne)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,we*z+ke,(Ce+ye)*ee+Ne,(we-ye+le*.5)*z+ke,(Ce+le)*ee+Ne,we*z+ke,(Ce+ye)*ee+Ne).close()),le=he*.2,ye=.2,we=.5,Ce=.5;var Qe=new go.PathFigure((we-ye)*z+ke,Ce*ee+Ne,!0);oe.add(Qe),Qe.add(new go.PathSegment(go.PathSegment.Bezier,we*z+ke,(Ce-ye)*ee+Ne,(we-ye)*z+ke,(Ce-le)*ee+Ne,(we-le)*z+ke,(Ce-ye)*ee+Ne)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,(we+ye)*z+ke,Ce*ee+Ne,(we+le)*z+ke,(Ce-ye)*ee+Ne,(we+ye)*z+ke,(Ce-le)*ee+Ne)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,we*z+ke,(Ce+ye)*ee+Ne,(we+ye)*z+ke,(Ce+le)*ee+Ne,(we+le)*z+ke,(Ce+ye)*ee+Ne)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,(we-ye)*z+ke,Ce*ee+Ne,(we-le)*z+ke,(Ce+ye)*ee+Ne,(we-ye)*z+ke,(Ce+le)*ee+Ne)),le=he*.4,ye=.4,we=.8,Ce=.5;var Ge=new go.PathFigure(we*z+ke,(Ce-ye)*ee+Ne,!0);oe.add(Ge),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(we+ye)*z+ke,Ce*ee+Ne,(we+le)*z+ke,(Ce-ye)*ee+Ne,(we+ye)*z+ke,(Ce-le)*ee+Ne)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,we*z+ke,(Ce+ye)*ee+Ne,(we+ye)*z+ke,(Ce+le)*ee+Ne,(we+le)*z+ke,(Ce+ye)*ee+Ne)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(we+ye-le*.5)*z+ke,Ce*ee+Ne,we*z+ke,(Ce+ye)*ee+Ne,(we+ye-le*.5)*z+ke,(Ce+le)*ee+Ne)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,we*z+ke,(Ce-ye)*ee+Ne,(we+ye-le*.5)*z+ke,(Ce-le)*ee+Ne,we*z+ke,(Ce-ye)*ee+Ne).close()),le=he*.8,ye=.8,we=1,Ce=.5;var mt=new go.PathFigure(we*z+ke,(Ce-ye)*ee+Ne,!0);return oe.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,(we+ye)*z+ke,Ce*ee+Ne,(we+le)*z+ke,(Ce-ye)*ee+Ne,(we+ye)*z+ke,(Ce-le)*ee+Ne)),mt.add(new go.PathSegment(go.PathSegment.Bezier,we*z+ke,(Ce+ye)*ee+Ne,(we+ye)*z+ke,(Ce+le)*ee+Ne,(we+le)*z+ke,(Ce+ye)*ee+Ne)),mt.add(new go.PathSegment(go.PathSegment.Bezier,(we+ye-le*.5)*z+ke,Ce*ee+Ne,we*z+ke,(Ce+ye)*ee+Ne,(we+ye-le*.5)*z+ke,(Ce+le)*ee+Ne)),mt.add(new go.PathSegment(go.PathSegment.Bezier,we*z+ke,(Ce-ye)*ee+Ne,(we+ye-le*.5)*z+ke,(Ce-le)*ee+Ne,we*z+ke,(Ce-ye)*ee+Ne).close()),oe}),go.Shape.defineFigureGenerator("Email",function(ue,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(ue,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 le=new go.PathFigure(.6*z,ee,!0,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.6*ee)),le.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(ue,z,ee){var oe=new go.Geometry,ie=he*.4,se=.4,le=.5,ye=.5,we=Le(),Ce=Le(),ke=Le(),Ne=Le();Te(le,ye-se,le+ie,ye-se,le+se,ye-ie,le+se,ye,.5,we,we,Ce,ke,Ne);var je=Ee(Ce.x,Ce.y),Ve=new go.PathFigure(Ce.x*z,Ce.y*ee,!0);oe.add(Ve),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*z,ye*ee,ke.x*z,ke.y*ee,Ne.x*z,Ne.y*ee)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee,(le+ie)*z,(ye+se)*ee)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(le-se)*z,ye*ee,(le-ie)*z,(ye+se)*ee,(le-se)*z,(ye+ie)*ee)),Te(le-se,ye,le-se,ye-ie,le-ie,ye-se,le,ye-se,.5,ke,Ne,Ce,we,we),Ve.add(new go.PathSegment(go.PathSegment.Bezier,Ce.x*z,Ce.y*ee,ke.x*z,ke.y*ee,Ne.x*z,Ne.y*ee)),ie=he*.3,se=.3,Te(le-se,ye,le-se,ye-ie,le-ie,ye-se,le,ye-se,.5,ke,Ne,Ce,we,we),Ve.add(new go.PathSegment(go.PathSegment.Line,Ce.x*z,Ce.y*ee)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(le-se)*z,ye*ee,Ne.x*z,Ne.y*ee,ke.x*z,ke.y*ee)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+se)*ee,(le-se)*z,(ye+ie)*ee,(le-ie)*z,(ye+se)*ee)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*z,ye*ee,(le+ie)*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee)),Te(le,ye-se,le+ie,ye-se,le+se,ye-ie,le+se,ye,.5,we,we,Ce,ke,Ne),Ve.add(new go.PathSegment(go.PathSegment.Bezier,Ce.x*z,Ce.y*ee,Ne.x*z,Ne.y*ee,ke.x*z,ke.y*ee).close());var Ve=new go.PathFigure(.45*z,0,!0);return oe.add(Ve),Ve.add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,.55*z,.5*ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,.55*z,0).close()),me(we),me(Ce),me(ke),me(Ne),me(je),oe.spot1=new go.Spot(.25,.45),oe.spot2=new go.Spot(.75,.8),oe}),go.Shape.defineFigureGenerator("Fallout",function(ue,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(le,ye,we){le.add(new go.PathSegment(go.PathSegment.Move,(.3+ye)*z,(.8+we)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5+ye)*z,(.5+we)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.1+ye)*z,(.5+we)*ee)),le.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(ue,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(ue,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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=.5,se=0,le=0,ye=ie*he,we=.4*Math.SQRT2/2+.5,Ce=.5-.5*Math.SQRT2/2,ke=1,Ne=.5,je=.5,Ve=0,Qe=new go.PathFigure(we*z,(1-Ce)*ee,!1);return oe.add(Qe),Qe.add(new go.PathSegment(go.PathSegment.Bezier,ke*z,Ne*ee,ke*z,.7*ee,ke*z,Ne*ee)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,(je+se)*z,(Ve+se)*ee,(.5+ie+se)*z,(.5-ye+se)*ee,(.5+ye+se)*z,(.5-ie+se)*ee)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+se)*z,(.5+le)*ee,(.5-ye+se)*z,(.5-ie+le)*ee,(.5-ie+se)*z,(.5-ye+le)*ee)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,(.35+se)*z,.9*ee,(.5-ie+se)*z,(.5+ye+le)*ee,(.5-ye+se)*z,.9*ee)),Qe.add(new go.PathSegment(go.PathSegment.Move,(.25+se)*z,.8*ee)),Qe.add(new go.PathSegment(go.PathSegment.Line,(.35+se)*z,.9*ee)),Qe.add(new go.PathSegment(go.PathSegment.Line,(.2+se)*z,.95*ee)),oe}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(ue,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(ue,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(ue,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 le=new go.PathFigure(0,.5*ee,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*ee,.2*z,.35*ee,.3*z,.35*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,.7*z,.65*ee,.8*z,.65*ee)),oe}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(ue,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(ue,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(ue,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(ue,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 le=.5-.285,ye=.5,we=le,Ce=Math.PI/4,ke=4*(1-Math.cos(Ce))/(3*Math.sin(Ce)),Ne=ke*.5,je=le,Ve=le,Qe=ke*je,Ge=ke*Ve;se.add(new go.PathSegment(go.PathSegment.Bezier,(ye-je)*z,we*ee,(ye-(Qe+je)/2)*z,(we+(Ve+Ge)/2)*ee,(ye-je)*z,(we+Ge)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,ye*z,(we-Ve)*ee,(ye-je)*z,(we-Ge)*ee,(ye-Qe)*z,(we-Ve)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(ye+je)*z,we*ee,(ye+Qe)*z,(we-Ve)*ee,(ye+je)*z,(we-Ge)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*z,(1-.595)*ee,(ye+je)*z,(we+Ge)*ee,(ye+(Qe+je)/2)*z,(we+(Ve+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 mt=new go.PathFigure(.2*z,ee,!1);oe.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.2*z,.8*ee));var ct=new go.PathFigure(.8*z,ee,!1);return oe.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.8*z,.8*ee)),oe}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(ue,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(ue,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(ue,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 le=new go.PathFigure(.1*z,ee,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee).close()),oe}),go.Shape.defineFigureGenerator("Caution",function(ue,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(ue,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 le=new go.PathFigure(.675*z,.575*ee,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.875*z,.525*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.775*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.85*z,.95*ee,z,.8*ee,z,.85*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.65*z,.95*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.65*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.85*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.65*z,.725*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.65*z,.775*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.7*z,.775*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.775*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.675*z,.575*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.775*z,.775*ee)),oe}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(ue,z,ee){var oe=new go.Geometry,ie=.5,se=he*.5,le=new go.PathFigure(z,ie*ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,ie*z,ee,z,(ie+se)*ee,(ie+se)*z,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,ie*ee,(ie-se)*z,ee,0,(ie+se)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,ie*z,0,0,(ie-se)*ee,(ie-se)*z,0)),le.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(ue,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(ue,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 le=new go.PathFigure(0,.5*ee,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee).close()),oe}),go.Shape.defineFigureGenerator("Component",function(ue,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 le=new go.PathFigure(0,.6*ee,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee).close()),oe}),go.Shape.defineFigureGenerator("Boat Shipment",function(ue,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(ue,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(ue,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(ue,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(ue,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 le=.1,ye=he*.1,we=.2,Ce=.9,ke=new go.PathFigure((we-le)*z,Ce*ee,!0);oe.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Ce-le)*ee,(we-le)*z,(Ce-ye)*ee,(we-ye)*z,(Ce-le)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(we+le)*z,Ce*ee,(we+ye)*z,(Ce-le)*ee,(we+le)*z,(Ce-ye)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Ce+le)*ee,(we+le)*z,(Ce+ye)*ee,(we+ye)*z,(Ce+le)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(we-le)*z,Ce*ee,(we-ye)*z,(Ce+le)*ee,(we-le)*z,(Ce+ye)*ee).close()),le=.1,ye=he*.1,we=.8,Ce=.9;var Ne=new go.PathFigure((we-le)*z,Ce*ee,!0);return oe.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Ce-le)*ee,(we-le)*z,(Ce-ye)*ee,(we-ye)*z,(Ce-le)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(we+le)*z,Ce*ee,(we+ye)*z,(Ce-le)*ee,(we+le)*z,(Ce-ye)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Ce+le)*ee,(we+le)*z,(Ce+ye)*ee,(we+ye)*z,(Ce+le)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(we-le)*z,Ce*ee,(we-ye)*z,(Ce+le)*ee,(we-le)*z,(Ce+ye)*ee).close()),oe}),go.Shape.defineFigureGenerator("KanbanPost",function(ue,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(ue,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 le=new go.PathFigure(.5*z,.8*ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.8*ee)),le.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,Ce=he*.1,ke=.1,Ne=.9,je=new go.PathFigure((ke-we)*z,Ne*ee,!0);oe.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,ke*z,(Ne-we)*ee,(ke-we)*z,(Ne-Ce)*ee,(ke-Ce)*z,(Ne-we)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ke+we)*z,Ne*ee,(ke+Ce)*z,(Ne-we)*ee,(ke+we)*z,(Ne-Ce)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,ke*z,(Ne+we)*ee,(ke+we)*z,(Ne+Ce)*ee,(ke+Ce)*z,(Ne+we)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ke-we)*z,Ne*ee,(ke-Ce)*z,(Ne+we)*ee,(ke-we)*z,(Ne+Ce)*ee)),we=.1,Ce=he*.1,ke=.4,Ne=.9;var Ve=new go.PathFigure((ke-we)*z,Ne*ee,!0);return oe.add(Ve),Ve.add(new go.PathSegment(go.PathSegment.Bezier,ke*z,(Ne-we)*ee,(ke-we)*z,(Ne-Ce)*ee,(ke-Ce)*z,(Ne-we)*ee)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(ke+we)*z,Ne*ee,(ke+Ce)*z,(Ne-we)*ee,(ke+we)*z,(Ne-Ce)*ee)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,ke*z,(Ne+we)*ee,(ke+we)*z,(Ne+Ce)*ee,(ke+Ce)*z,(Ne+we)*ee)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(ke-we)*z,Ne*ee,(ke-Ce)*z,(Ne+we)*ee,(ke-we)*z,(Ne+Ce)*ee)),oe}),go.Shape.defineFigureGenerator("RailShipment",function(ue,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 le=new go.PathFigure(.55*z,.4*ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.4*ee).close());var ke=.05,Ne=he*.05,je=.175,Ve=.95,ye=new go.PathFigure((je-ke)*z,Ve*ee,!0);oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(Ve-ke)*ee,(je-ke)*z,(Ve-Ne)*ee,(je-Ne)*z,(Ve-ke)*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,(je+ke)*z,Ve*ee,(je+Ne)*z,(Ve-ke)*ee,(je+ke)*z,(Ve-Ne)*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(Ve+ke)*ee,(je+ke)*z,(Ve+Ne)*ee,(je+Ne)*z,(Ve+ke)*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,(je-ke)*z,Ve*ee,(je-Ne)*z,(Ve+ke)*ee,(je-ke)*z,(Ve+Ne)*ee));var ke=.05,Ne=he*.05,je=.375,Ve=.95,we=new go.PathFigure((je-ke)*z,Ve*ee,!0);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(Ve-ke)*ee,(je-ke)*z,(Ve-Ne)*ee,(je-Ne)*z,(Ve-ke)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(je+ke)*z,Ve*ee,(je+Ne)*z,(Ve-ke)*ee,(je+ke)*z,(Ve-Ne)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(Ve+ke)*ee,(je+ke)*z,(Ve+Ne)*ee,(je+Ne)*z,(Ve+ke)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(je-ke)*z,Ve*ee,(je-Ne)*z,(Ve+ke)*ee,(je-ke)*z,(Ve+Ne)*ee));var ke=.05,Ne=he*.05,je=.625,Ve=.95,Ce=new go.PathFigure((je-ke)*z,Ve*ee,!0);oe.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(Ve-ke)*ee,(je-ke)*z,(Ve-Ne)*ee,(je-Ne)*z,(Ve-ke)*ee)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(je+ke)*z,Ve*ee,(je+Ne)*z,(Ve-ke)*ee,(je+ke)*z,(Ve-Ne)*ee)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(Ve+ke)*ee,(je+ke)*z,(Ve+Ne)*ee,(je+Ne)*z,(Ve+ke)*ee)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(je-ke)*z,Ve*ee,(je-Ne)*z,(Ve+ke)*ee,(je-ke)*z,(Ve+Ne)*ee));var ke=.05,Ne=he*.05,je=.825,Ve=.95,Qe=new go.PathFigure((je-ke)*z,Ve*ee,!0);oe.add(Qe),Qe.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(Ve-ke)*ee,(je-ke)*z,(Ve-Ne)*ee,(je-Ne)*z,(Ve-ke)*ee)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,(je+ke)*z,Ve*ee,(je+Ne)*z,(Ve-ke)*ee,(je+ke)*z,(Ve-Ne)*ee)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(Ve+ke)*ee,(je+ke)*z,(Ve+Ne)*ee,(je+Ne)*z,(Ve+ke)*ee)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,(je-ke)*z,Ve*ee,(je-Ne)*z,(Ve+ke)*ee,(je-ke)*z,(Ve+Ne)*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(ue,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 le=new go.PathFigure(.15*z,ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.15*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.15*z,ee).close());var ye=.05,we=he*.05,Ce=.35,ke=.775,Ne=new go.PathFigure((Ce-ye)*z,ke*ee,!0);return oe.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Ce*z,(ke-ye)*ee,(Ce-ye)*z,(ke-we)*ee,(Ce-we)*z,(ke-ye)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Ce+ye)*z,ke*ee,(Ce+we)*z,(ke-ye)*ee,(Ce+ye)*z,(ke-we)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Ce*z,(ke+ye)*ee,(Ce+ye)*z,(ke+we)*ee,(Ce+we)*z,(ke+ye)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Ce-ye)*z,ke*ee,(Ce-we)*z,(ke+ye)*ee,(Ce-ye)*z,(ke+we)*ee).close()),oe}),go.Shape.defineFigureGenerator("ControlCenter",function(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=.3,se=he*.3,le=.5,ye=.7,we=new go.PathFigure((le-ie)*z,ye*ee,!0);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye-ie)*ee,(le-ie)*z,(ye-se)*ee,(le-se)*z,(ye-ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le+ie)*z,ye*ee,(le+se)*z,(ye-ie)*ee,(le+ie)*z,(ye-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+ie)*ee,(le+ie)*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le-ie)*z,ye*ee,(le-se)*z,(ye+ie)*ee,(le-ie)*z,(ye+se)*ee));var Ce=new go.PathFigure(0,.7*ee,!1);return oe.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,z,.7*ee,0,0,z,0)),oe}),go.Shape.defineFigureGenerator("TripleFanBlades",function(ue,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(ue,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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=.5,se=he*.5,le=.5,ye=.5,we=new go.PathFigure((le-ie)*z,ye*ee,!0);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye-ie)*ee,(le-ie)*z,(ye-se)*ee,(le-se)*z,(ye-ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le+ie)*z,ye*ee,(le+se)*z,(ye-ie)*ee,(le+ie)*z,(ye-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+ie)*ee,(le+ie)*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le-ie)*z,ye*ee,(le-se)*z,(ye+ie)*ee,(le-ie)*z,(ye+se)*ee));var Ce=new go.PathFigure(.15*z,.5*ee,!1);return oe.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Line,.85*z,.5*ee)),oe}),go.Shape.defineFigureGenerator("Flag",function(ue,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(ue,z,ee){var oe=new go.Geometry,ie=.5,se=he*.5,le=.5,ye=.5,we=new go.PathFigure((le-ie)*z,ye*ee,!1);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye-ie)*ee,(le-ie)*z,(ye-se)*ee,(le-se)*z,(ye-ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le+ie)*z,ye*ee,(le+se)*z,(ye-ie)*ee,(le+ie)*z,(ye-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+ie)*ee,(le+ie)*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le-ie)*z,ye*ee,(le-se)*z,(ye+ie)*ee,(le-ie)*z,(ye+se)*ee).close()),ie=.05,se=he*.05,le=.5,ye=.8;var Ce=new go.PathFigure((le-ie)*z,ye*ee,!1);return oe.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye-ie)*ee,(le-ie)*z,(ye-se)*ee,(le-se)*z,(ye-ie)*ee)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(le+ie)*z,ye*ee,(le+se)*z,(ye-ie)*ee,(le+ie)*z,(ye-se)*ee)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+ie)*ee,(le+ie)*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(le-ie)*z,ye*ee,(le-se)*z,(ye+ie)*ee,(le-ie)*z,(ye+se)*ee).close()),Ce.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*ee)),Ce.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,.75*z,.475*ee,.75*z,.225*ee)),Ce.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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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 le=new go.PathFigure(.402*z,.85*ee,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.402*z,.45*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.598*z,.45*ee)),le.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(ue,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(ue,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 le=new go.PathFigure(z*.408,ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.408,ee*(1-.184*2))),le.add(new go.PathSegment(go.PathSegment.Line,z*.592,ee*(1-.184*3))),le.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(ue,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 le=new go.PathFigure(z*.055,.13*ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.13)),le.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.16)),le.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(ue,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(ue,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(ue,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 le=new go.PathFigure(z*.11,ee*.1,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),ee*.1)),le.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),ee*.8)),le.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(ue,z,ee){var oe=new go.Geometry,ie=8,se=ie*he,le=new go.PathFigure(ie,0,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.86,0)),le.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.14)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee-ie)),le.add(new go.PathSegment(go.PathSegment.Bezier,z-ie,ee,z,ee-se,z-se,ee)),le.add(new go.PathSegment(go.PathSegment.Line,ie,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ie,se,ee,0,ee-se)),le.add(new go.PathSegment(go.PathSegment.Line,0,ie)),le.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 Ce=new go.PathFigure(z*.78,ee*.05,!1);return oe.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.05)),Ce.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.25)),Ce.add(new go.PathSegment(go.PathSegment.Line,z*.78,ee*.25).close()),oe}),go.Shape.defineFigureGenerator("SpeechBubble",function(ue,z,ee){var oe=ue?ue.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,le=new go.Geometry,ye=new go.PathFigure(oe,0,!0);return le.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?(le.spot1=new go.Spot(0,0,ie,ie),le.spot2=new go.Spot(1,.8,-ie,-ie)):(le.spot1=go.Spot.TopLeft,le.spot2=new go.Spot(1,.8)),le}),go.Shape.defineFigureGenerator("Repeat",function(ue,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(ue,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(ue,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 le=new go.PathFigure(z*.28,ee*.37,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.37)),le.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.41)),le.add(new go.PathSegment(go.PathSegment.Line,z*.28,ee*.41).close()),oe}),go.Shape.defineFigureGenerator("Beaker",function(ue,z,ee){var oe=new go.Geometry,ie=15,se=ie*he,le=new go.PathFigure(z*.62,ee*.475,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,ee-ie)),le.add(new go.PathSegment(go.PathSegment.Bezier,z-ie,ee,z,ee-se,z-se,ee)),le.add(new go.PathSegment(go.PathSegment.Line,ie,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ie,se,ee,0,ee-se)),le.add(new go.PathSegment(go.PathSegment.Line,z*.38,ee*.475)),le.add(new go.PathSegment(go.PathSegment.Line,z*.38,ee*.03)),le.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*0)),le.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*0)),le.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(ue,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 le=new go.PathFigure(z*.4,ee*0,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.44)),le.add(new go.PathSegment(go.PathSegment.Line,z*.26,ee*.44)),le.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.66)),le.add(new go.PathSegment(go.PathSegment.Line,z*(1-.26),ee*.44)),le.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.44)),le.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*0).close()),oe}),go.Shape.defineFigureGenerator("Bin",function(ue,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(ue,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 le=new go.PathFigure(z*.5,ee*0,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.26,ee*.25)),le.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.25)),le.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.63)),le.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.63)),le.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.25)),le.add(new go.PathSegment(go.PathSegment.Line,z*.74,ee*.25).close()),oe}),go.Shape.defineFigureGenerator("EmptyDrink",function(ue,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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*.5,ee*0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,ee*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.5)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.65)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.65)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*.5)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.25).close()),oe}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},80727:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var Cn={},Yt="5.0",Ee={},Le=null,me=!1,Ie=!1,Te=null,be=!1,Pe=null,he=null,Se=0;Se<arguments.length;Se++){var xe=arguments[Se];if(xe!==null)switch(typeof xe){case"number":Yt=xe.toFixed(1);break;case"string":xe.match(new RegExp("^[0-9]\\.[0-9]+$"))?Yt=xe:Te=xe;break;case"object":typeof xe.is3D!="undefined"?Le=xe:Ee=xe;break;case"boolean":me=xe,Ie=!0;break}}Le===null&&(Le={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&&!Ie&&(me=!0)),Te!==null&&Ee.id===void 0&&(Ee.id=Te);var ge="",ce="",ve=!1,de=null,ue=null,z=null,ee=!1,oe=null,ie=null,se=null,le=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(vt){return parseFloat(vt)>4?parseFloat(vt):5};Cn.setHTML5Codebase=function(vt,Bt){he=vt,dt(vt,Bt)},Cn.setJavaCodebase=Cn.setJavaCodebaseVersion=Cn.isCompiledInstalled=Cn.setPreCompiledScriptPath=Cn.setPreCompiledResourcePath=function(){},Cn.setHTML5CodebaseVersion=function(vt,Bt){var jt=parseFloat(vt);if(jt!==NaN&&jt<5){console.log("The GeoGebra HTML5 codebase version "+jt+" is deprecated. Using version latest instead.");return}Pe=vt,rt(vt,Bt)},Cn.getHTML5CodebaseVersion=function(){return ue},Cn.getParameters=function(){return Ee},Cn.setFontsCSSURL=function(vt){le=vt},Cn.setGiacJSURL=function(vt){},Cn.setJNLPFile=function(vt){ge=vt},Cn.setJNLPBaseDir=function(vt){},Cn.inject=function(){function vt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Bt="auto",jt=Ee.id,un,Kt=!1,xn=0;xn<arguments.length;xn++){var Ut=arguments[xn];typeof Ut=="string"?(Ut=Ut.toLowerCase(),Ut.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Bt=Ut:jt=arguments[xn]):typeof Ut=="boolean"?Kt=Ut:Ut instanceof HTMLElement&&(un=Ut)}Wt();function Wt(){if(!be){setTimeout(Wt,200);return}Bt=Ft(Bt);var $t=un||document.getElementById(jt);if(!$t){console.log("possibly bug on ajax loading? ");return}if(Cn.removeExistingApplet($t,!1),Ee.width===void 0&&$t.clientWidth&&(Ee.width=$t.clientWidth),Ee.height===void 0&&$t.clientHeight&&(Ee.height=$t.clientHeight),!(Ee.width&&Ee.height)&&Bt==="html5"&&(delete Ee.width,delete Ee.height),de=Bt,Bt==="screenshot")ct($t,Ee);else{var ft=!1;Ee.hasOwnProperty("playButton")&&Ee.playButton||Ee.hasOwnProperty("clickToLoad")&&Ee.clickToLoad?ft=!0:Ee.hasOwnProperty("playButtonAutoDecide")&&Ee.playButtonAutoDecide&&(ft=(!Ce()||vt())&&ke()),ft?(de="screenshot",it($t,Ee,Kt,Bt)):mt($t,Ee,Kt)}}};function Ce(){try{return window.self!==window.top}catch(vt){return!0}}function ke(){return Ee.hasOwnProperty("screenshotGenerator")&&Ee.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Cn.getViews=function(){return Le},Cn.isJavaInstalled=function(){return!1};var Ne=function(vt){var Bt=function(xn){var Ut=JSON.parse(xn),Wt=function(We){return We.type=="G"||We.type=="E"},$t=Ut.elements?Ut.elements.filter(Wt)[0]:Ut;if(!$t||!$t.url){jt();return}Ee.fileName=$t.url,je($t.settings||{}),Le.is3D=!0;var ft="https://www.geogebra.org/images/";Cn.setPreviewImage(oe||$t.previewUrl,ft+"GeoGebra_loading.png",ft+"applet_play.png"),vt()},jt=function(){Ee.onError&&Ee.onError(),yt("Error: Fetching material (id "+Ee.material_id+") failed.",Ee)},un=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Kt="/materials/"+Ee.material_id+"?scope=basic";Ve("https://"+un+"/api/proxy.php?path="+encodeURIComponent(Kt),Bt,jt)};function je(vt){var Bt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(jt){vt[jt]=!!vt[jt]}),Bt.forEach(function(jt){Ee[jt]===void 0&&vt[jt]!==void 0&&(Ee[jt]=vt[jt])}),Ee.showToolBarHelp===void 0&&(Ee.showToolBarHelp=Ee.showToolBar)}function Ve(vt,Bt,jt){var un=new XMLHttpRequest;un.open("GET",vt),un.onload=function(){Bt(un.responseText)},un.onerror=jt,un.send()}Cn.isHTML5Installed=function(){return!0},Cn.getLoadedAppletType=function(){return de},Cn.setPreviewImage=function(vt,Bt,jt){oe=vt,ie=Bt,se=jt},Cn.removeExistingApplet=function(vt,Bt){var jt;typeof vt=="string"&&(vt=document.getElementById(vt)),de=null;var un=null;for(jt=0;jt<vt.childNodes.length;jt++){var Kt=vt.childNodes[jt],xn=Kt.className;xn==="applet_screenshot"?Bt?(Kt.style.display="block",de="screenshot"):Kt.style.display="none":xn!=="applet_scaler prerender"&&(vt.removeChild(Kt),un=xn&&xn.indexOf("appletParameters")!=-1?Kt.id:null,jt--)}var Ut=Ee.id!==void 0?Ee.id:un,Wt=window[Ut];Wt&&typeof Wt.getBase64=="function"&&(Wt.remove(),window[Ut]=null)},Cn.refreshHitPoints=function(){if(we(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var vt=Cn.getAppletObject();return vt&&typeof vt.recalculateEnvironments=="function"?(vt.recalculateEnvironments(),!0):!1},Cn.startAnimation=function(){var vt=Cn.getAppletObject();return vt&&typeof vt.startAnimation=="function"?(vt.startAnimation(),!0):!1},Cn.stopAnimation=function(){var vt=Cn.getAppletObject();return vt&&typeof vt.stopAnimation=="function"?(vt.stopAnimation(),!0):!1},Cn.getAppletObject=function(){var vt=Ee.id!==void 0?Ee.id:"ggbApplet";return window[vt]},Cn.resize=function(){};var Qe=function(vt,Bt,jt){var un=document.createElement("param");un.setAttribute("name",Bt),un.setAttribute("value",jt),vt.appendChild(un)},Ge=function(vt){return vt&&vt!=="false"},mt=function(vt,Bt,jt){we(ue)<=4.2&&(jt=!0);var un=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==ue||ggbHTML5LoadedCodebaseIsWebSimple&&!ee)&&(un=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Kt=document.createElement("div");Kt.classList.add("appletParameters","notranslate");var xn=Bt.width,Ut=Bt.height;if(Bt.disableAutoScale=Bt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Bt.disableAutoScale,Bt.width!==void 0)if(we(ue)<=4.4)Ge(Bt.showToolBar)&&(Bt.height-=7),Ge(Bt.showAlgebraInput)&&(Bt.height-=37),Bt.width<605&&Ge(Bt.showToolBar)&&(Bt.width=605,xn=605);else{var Wt=100;(Ge(Bt.showToolBar)||Ge(Bt.showMenuBar))&&(Bt.hasOwnProperty("customToolBar")&&(Bt.customToolbar=Bt.customToolBar),Wt=Ge(Bt.showMenuBar)?245:155),xn<Wt&&(Bt.width=Wt,xn=Wt)}Kt.style.border="none",Kt.style.display="inline-block";for(var $t in Bt)Bt.hasOwnProperty($t)&&$t!=="appletOnLoad"&&Kt.setAttribute("data-param-"+$t,Bt[$t]);le&&Kt.setAttribute("data-param-fontscssurl",le),Cn.resize=function(){GGBAppletUtils.responsiveResize(vt,Bt)},window.addEventListener("resize",function(lt){Cn.resize()});var ft=typeof Bt.appletOnLoad=="function"?Bt.appletOnLoad:function(){};if(!jt&&Bt.width!==void 0){Bt.hasOwnProperty("showSplash")||Kt.setAttribute("data-param-showSplash","false");var We=vt.querySelector(".applet_scaler.prerender"),Be=We!==null;if(Be)var qe=We.querySelector(".ggb_preview");else{var qe=ut(xn,Ut,Bt.borderColor,!1);We=document.createElement("div"),We.className="applet_scaler",We.style.position="relative",We.style.display="block",We.style.width=xn+"px",We.style.height=Ut+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(We,"66%"),we(ue)>=5?(Bt.appletOnLoad=function(lt){var xt=vt.querySelector(".ggb_preview");xt&&xt.parentNode.removeChild(xt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(We),window.GGBT_wsf_view&&$(window).trigger("resize"),ft(lt)},Be||We.appendChild(qe)):Kt.appendChild(qe),We.appendChild(Kt),Be||vt.appendChild(We),setTimeout(function(){Cn.resize()},1)}else{var et=document.createElement("div");et.className="applet_scaler",et.style.position="relative",et.style.display="block",et.appendChild(Kt),vt.appendChild(et),Bt.appletOnLoad=function(lt){Cn.resize(),ft(lt)}}function He(lt,xt){xt&&typeof xt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(lt,xt.appletOnLoad):renderGGBElement(lt),yt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",xt)}function Xe(lt,xt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:lt,params:xt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(tn){He(tn.article,tn.params)}),html5AppletsToProcess=null)},we(ue)<5&&(lt.className+=" geogebraweb")):He(lt,xt)}if(un){scriptLoadStarted=!0;for(var Re=0;Re<Kt.childNodes.length;Re++){var Ae=Kt.childNodes[Re].tagName;Ae==="TABLE"&&(Kt.removeChild(Kt.childNodes[Re]),Re--)}if(ggbHTML5LoadedScript!==null){var Ue=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Ue!=null&&Ue.parentNode.removeChild(Ue)}var Ke=document.createElement("script"),Ze=function(){Xe(Kt,Bt)};Ke.src=ce+z,ggbHTML5LoadedCodebaseIsWebSimple=ee,ggbHTML5LoadedCodebaseVersion=ue,ggbHTML5LoadedScript=Ke.src,yt("GeoGebra HTML5 codebase loaded: '"+ce+"'.",Bt),!he&&(!Pe||Pe=="5.0")?(ee?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Ze()):ce.requirejs?__webpack_require__.e(4184).then(function(){var lt=[__webpack_require__(74620)];Ze.apply(null,lt)}.bind(this)).catch(__webpack_require__.oe):(Ke.onload=Ze,vt.appendChild(Ke))}else Xe(Kt,Bt);Bt.height=Ut,Bt.width=xn},ct=function(vt,Bt,jt){var un=ut(Bt.width,Bt.height,Bt.borderColor,jt),Kt=document.createElement("div");Kt.style.position="relative",Kt.style.display="block",Kt.style.width=Bt.width+"px",Kt.style.height=Bt.height+"px",Kt.className="applet_screenshot applet_scaler"+(jt?" applet_screenshot_play":""),Kt.appendChild(un);var xn=GGBAppletUtils.getScale(Bt,vt,jt);jt?(vt.appendChild(St()),window.GGBT_wsf_view||(vt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Kt,"66%"),vt.appendChild(Kt),xn!==1&&!isNaN(xn)&&(GGBAppletUtils.scaleElement(Kt,xn),Kt.style.width=Bt.width+"px",Kt.style.height=Bt.height+"px",Kt.parentNode.style.width=Bt.width*xn+"px",Kt.parentNode.style.height=Bt.height*xn+"px"),Cn.resize=function(){Ct(vt,un,Kt,jt)},window.addEventListener("resize",function(Ut){Cn.resize()}),Cn.resize()};function Ct(vt,Bt,jt,un){if(vt.contains(Bt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(vt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(vt)}var Kt=GGBAppletUtils.getScale(Ee,vt,un);jt.parentNode!==null&&(!isNaN(Kt)&&Kt!==1?(GGBAppletUtils.scaleElement(jt,Kt),jt.parentNode.style.width=Ee.width*Kt+"px",jt.parentNode.style.height=Ee.height*Kt+"px"):(GGBAppletUtils.scaleElement(jt,1),jt.parentNode.style.width=Ee.width+"px",jt.parentNode.style.height=Ee.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(vt),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Cn.onExitFullscreen=function(vt,Bt){Bt.appendChild(vt)};var it=function(vt,Bt,jt,un){ct(vt,Bt,!0);for(var Kt=function(){var Wt=[];for(Ut=0;Ut<vt.childNodes.length;Ut++)Wt.push(vt.childNodes[Ut]);if(window.GGBT_wsf_view){var $t=window.GGBT_wsf_view.renderFullScreen(vt,Bt.id),ft=document.getElementById("fullscreencontainer"),We=jQuery(vt).find(".fullscreencontent");We.length>0?($t.remove(),We.attr("id","fullscreencontent").show(),jQuery(ft).append(We),window.dispatchEvent(new Event("resize"))):mt($t,Bt,!1),window.GGBT_wsf_view.launchFullScreen(ft)}else de=un,mt(vt,Bt,!1);if(!window.GGBT_wsf_view)for(Ut=0;Ut<Wt.length;Ut++)vt.removeChild(Wt[Ut])},xn=vt.getElementsByClassName("ggb_preview_play"),Ut=0;Ut<xn.length;Ut++)xn[Ut].addEventListener("click",Kt,!1),xn[Ut].addEventListener("ontouchstart",Kt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(vt),ke()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},St=function(){var vt=document.createElement("div");if(vt.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");}',jt=document.createElement("style");jt.styleSheet?jt.styleSheet.cssText=Bt:jt.appendChild(document.createTextNode(Bt)),document.getElementsByTagName("head")[0].appendChild(jt)}return vt},ut=function(vt,Bt,jt,un){var Kt=document.createElement("div");Kt.className="ggb_preview",Kt.style.position="absolute",Kt.style.zIndex="90",Kt.style.width=vt-2+"px",Kt.style.height=Bt-2+"px",Kt.style.top="0px",Kt.style.left="0px",Kt.style.overflow="hidden",Kt.style.backgroundColor="white";var xn="lightgrey";jt!==void 0&&(jt==="none"?xn="transparent":xn=jt),Kt.style.border="1px solid "+xn;var Ut=document.createElement("img");if(Ut.style.position="relative",Ut.style.zIndex="1000",Ut.style.top="-1px",Ut.style.left="-1px",oe!==null&&Ut.setAttribute("src",oe),Ut.style.opacity=.7,ie!==null){var Wt,$t,ft;if(!un){Wt=document.createElement("img"),Wt.style.position="absolute",Wt.style.zIndex="1001",Wt.style.opacity=1,Ut.style.opacity=.3,$t=360,$t>vt/4*3&&($t=vt/4*3),ft=$t/5.8,Wt.setAttribute("src",ie),Wt.setAttribute("width",$t),Wt.setAttribute("height",ft);var We=(vt-$t)/2,Be=(Bt-ft)/2;Wt.style.left=We+"px",Wt.style.top=Be+"px",Kt.appendChild(Wt)}}return Kt.appendChild(Ut),Kt},Ft=function(vt){return vt=vt.toLowerCase(),vt==="html5"||vt==="screenshot"?vt:"html5"},ht=["web","webSimple","web3d","tablet","tablet3d","phone"],rt=function(vt,Bt){if(ue=vt,Bt){dt(ue,!0);return}var jt=!me;if(jt){var un=we(ue);!isNaN(un)&&un<4.4&&(jt=!1)}var Kt,xn;window.location.protocol.substr(0,4)==="http"?Kt=window.location.protocol:Kt="http:";var Ut=ue.indexOf("//");Ut>0?xn=ue:Ut===0?xn=Kt+ue:xn="https://www.geogebra.org/apps/5.2.814.0/";for(var Wt in ht)if(ue.slice(ht[Wt].length*-1)===ht[Wt]||ue.slice((ht[Wt].length+1)*-1)===ht[Wt]+"/"){dt(xn,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&jt&&!Le.is3D&&!Le.AV&&!Le.SV&&!Le.CV&&!Le.EV2&&!Le.CP&&!Le.PC&&!Le.DA&&!Le.FI&&!Le.PV&&!Ge(Ee.showToolBar)&&!Ge(Ee.showMenuBar)&&!Ge(Ee.showAlgebraInput)&&!Ge(Ee.enableRightClick)&&(!Ee.appName||Ee.appName=="classic")?xn+="webSimple/":xn+="web3d/",dt(xn,!1)},dt=function(vt,Bt){if(vt.requirejs){ce=vt;return}vt.slice(-1)!=="/"&&(vt+="/"),ce=vt,Bt===null&&(Bt=vt.indexOf("http")===-1),ve=Bt,z="web.nocache.js",ee=!1;var jt=ce.split("/");jt.length>1&&(!Bt&&jt[jt.length-2]==="webSimple"?(z="webSimple.nocache.js",ee=!0):ht.indexOf(jt[jt.length-2])>=0&&(z=jt[jt.length-2]+".nocache.js")),jt=vt.split("/"),ue=jt[jt.length-3],ue.substr(0,4)==="test"?ue=ue.substr(4,1)+"."+ue.substr(5,1):(ue.substr(0,3)==="war"||ue.substr(0,4)==="beta")&&(ue="5.0");var un=parseFloat(ue);un!==NaN&&un<5&&vt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+un+" is deprecated. Using version latest instead."),rt("5.0",Bt))},yt=function(vt,Bt){window.console&&window.console.log&&(!Bt||typeof Bt.showLogging=="undefined"||Bt.showLogging&&Bt.showLogging!=="false")&&console.log(vt)};Ee.material_id!==void 0?Ne(_t):_t();function _t(){var vt=Yt;Pe!==null?vt=Pe:parseFloat(vt)<5&&(vt="5.0"),rt(vt,!1),he!==null&&dt(he,ve),be=!0}return Cn},GGBAppletUtils=function(){"use strict";function Cn(){return window.GGBT_wsf_edit!==void 0}function Yt(be,Pe){Pe!=1?(be.style.transformOrigin="0% 0% 0px",be.style.webkitTransformOrigin="0% 0% 0px",be.style.transform="scale("+Pe+","+Pe+")",be.style.webkitTransform="scale("+Pe+","+Pe+")",be.style.maxWidth="initial",be.querySelector(".ggb_preview")!==null&&(be.querySelector(".ggb_preview").style.maxWidth="initial"),be.querySelectorAll(".ggb_preview img")[0]!==void 0&&(be.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),be.querySelectorAll(".ggb_preview img")[1]!==void 0&&(be.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(be.style.transform="none",be.style.webkitTransform="none")}function Ee(be,Pe,he,Se,xe,ge){var ce=null;if(ge!=null&&ge!="")for(var ve=be.parentNode;ve!=null;)if((" "+ve.className+" ").indexOf(" "+ge+" ")>-1){ce=ve;break}else ve=ve.parentNode;var de=0,ue=0,z=0,ee=0,oe=0,ie=0,se=0;if(ce)de=ce.offsetWidth,ue=Math.max(Se?ce.offsetWidth:0,ce.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(de=Math.min(window.innerWidth,document.documentElement.clientWidth),ue=Math.min(window.innerHeight,document.documentElement.clientHeight),z=de):(de=window.innerWidth,ue=window.innerHeight,z=window.innerWidth),be){var le=be.getBoundingClientRect();le.left>0&&le.left<=de&&(xe===void 0||!xe)&&(document.dir==="rtl"?(oe=de-le.width-le.left,ie=z<=480?10:30):(ie=le.left,oe=z<=480?10:30),ee=ie+oe)}if(be&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var ye=be.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ee=40,se=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ee=0,se=40)}}return be&&((he===void 0||!he)&&Pe>0&&Pe+ee<de?de=Pe:de-=ee,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(he===void 0||!he)&&(ue-=se)),{width:de,height:ue}}function Le(be,Pe,he,Se,xe){if(be.isScreenshoGenerator)return 1;var ge=Se!==void 0&&Se,ce=be.noScaleMargin!=null&&be.noScaleMargin,ve=function(ye){return ye&&ye!=="false"},de=ve(be.autoHeight),ue=Ee(Pe,be.width,he,de,ge&&window.GGBT_wsf_view||ce,xe),z=parseInt(ue.width),ee=be.width,oe=be.height;if(ee===void 0){var ie=Pe.querySelector(".appletParameters");ie&&(ee=ie.offsetWidth,oe=ie.offsetHeight)}var se=z/ee,le=ge?1:ue.height/oe;return he!==void 0&&!he&&(se=Math.min(1,se),le=Math.min(1,le)),Math.min(se,le)}function me(be,Pe,he){var Se=1,xe,ge=!1;if(be.hasOwnProperty("allowUpscale")&&(ge=be.allowUpscale),be.hasOwnProperty("scale")&&(Se=parseFloat(be.scale),(isNaN(Se)||Se===null||Se===0)&&(Se=1),Se>1&&(ge=!0)),Pe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ge=!0),!(be.hasOwnProperty("disableAutoScale")&&be.disableAutoScale))xe=Le(be,Pe,ge,he,be.scaleContainerClass);else return Se;return ge&&(!be.hasOwnProperty("scale")||Se===1)?xe:Math.min(Se,xe)}function Ie(be){var Pe=Math.min(window.innerWidth,document.documentElement.clientWidth),he=Math.min(window.innerHeight,document.documentElement.clientHeight),Se=be.getBoundingClientRect(),xe=(Pe-Se.width)/2,ge=(he-Se.height)/2;ge<0&&(ge=0),be.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(xe<40?be.style.left="40px":be.style.left=xe+"px",be.style.top=ge+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ge<40?be.style.top="40px":be.style.top=ge+"px",be.style.left=xe+"px")}function Te(be,Pe){var he=be.querySelector(".appletParameters");if(he){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Pe.id!==he.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(be)}if(he.parentElement&&/fullscreen/.test(he.parentElement.className))return;var Se=me(Pe,be);Cn()&&he.setAttribute("data-param-scale",Se);for(var xe=null,ge=0;ge<be.childNodes.length;ge++)if(be.childNodes[ge].className!==void 0&&be.childNodes[ge].className.match(/^applet_scaler/)){xe=be.childNodes[ge];break}if(xe!==null&&xe.querySelector(".noscale")!==null)return;var ce=Pe.id!==void 0?Pe.id:"ggbApplet",ve=window[ce];(ve==null||!ve.recalculateEnvironments)&&xe!==null&&!xe.className.match(/fullscreen/)&&(xe.parentNode.style.transform="",!isNaN(Se)&&Se!==1?(xe.parentNode.style.width=Pe.width*Se+"px",xe.parentNode.style.height=Pe.height*Se+"px",Yt(xe,Se)):(Yt(xe,1),xe.parentNode.style.width=Pe.width+"px",xe.parentNode.style.height=Pe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Ie(be),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(he).parents(".content-added-content"))}}return{responsiveResize:Te,isFlexibleWorksheetEditor:Cn,positionCenter:Ie,getScale:me,scaleElement:Yt}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var Cn=n.location.search;return Cn.indexOf(J)!=-1||Cn.indexOf(K)!=-1}function q(Cn,Yt){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(Cn){var Yt=s[L].bindings;s[L].bindings=function(){for(var Ee=Yt?Yt():{},Le=Cn[webModule.__softPermutationId],me=O;me<Le.length;me++){var Ie=Le[me];Ee[Ie[O]]=Ie[P]}return Ee}};var t;function u(){return v(),t}function v(){if(!t){var Cn=o.createElement(Q);if(Cn.id=L,Cn.style.cssText=R+S,Cn.tabIndex=-1,o.body.appendChild(Cn),t=Cn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Yt=document.compatMode==U?V:W;t.write(Yt+X),t.close()}}}function w(Cn){function Yt(Le){function me(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Ie=me();if(Ie){Le();return}function Te(){if(!Ie){if(!me())return;Ie=!0,Le(),o.removeEventListener&&o.removeEventListener(Z,Te,!1),be&&clearInterval(be)}}o.addEventListener&&o.addEventListener(Z,Te,!1);var be=setInterval(function(){Te()},$)}function Ee(Le){var me=u(),Ie=me.body,Te=me.createElement(_);Te.language=ab,Te.crossOrigin=W,Te.src=Le,webModule.__errFn&&(Te.onerror=function(){webModule.__errFn(L,new Error(bb+Le))}),Ie.appendChild(Te)}Yt(function(){Ee(Cn)})}webModule.__startLoadingFragment=function(Cn){return C(Cn)},webModule.__installRunAsyncCode=function(Cn){var Yt=u(),Ee=Yt.body,Le=Yt.createElement(_);Le.language=ab,Le.text=Cn,Ee.appendChild(Le),Ee.removeChild(Le)};function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(Cn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Cn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Cn){var Yt=c[Cn];return Yt==null?null:Yt},r=d,webModule.__errFn=e}function B(){function Cn(be){var Pe=be.lastIndexOf(rb);Pe==-1&&(Pe=be.length);var he=be.indexOf(sb);he==-1&&(he=be.length);var Se=be.lastIndexOf(tb,Math.min(he,Pe));return Se>=O?be.substring(O,Se+P):W}function Yt(be){if(!be.match(/^\w+:\/\//)){var Pe=o.createElement(ub);Pe.src=be+vb,be=Cn(Pe.src)}return be}function Ee(){var be=__gwt_getMetaProperty(wb);return be!=null?be:W}function Le(){for(var be=o.getElementsByTagName(_),Pe=O;Pe<be.length;++Pe)if(be[Pe].src.indexOf(xb)!=-1)return Cn(be[Pe].src);return W}function me(){var be=o.getElementsByTagName(yb);return be.length>O?be[be.length-P].href:W}function Ie(){var be=o.location;return be.href==be.protocol+zb+be.host+be.pathname+be.search+be.hash}var Te=Ee();return Te==W&&(Te=Le()),Te==W&&(Te=me()),Te==W&&Ie()&&(Te=Cn(o.location.href)),Te=Yt(Te),Te}function C(Cn){return Cn.match(/^\//)||Cn.match(/^[a-zA-Z]+:\/\//)?Cn:webModule.__moduleBase+Cn}function D(){var Cn=[],Yt=O,Ee=[],Le=[];function me(be){var Pe=Le[be](),he=Ee[be];if(Pe in he)return Pe;var Se=[];for(var xe in he)Se[he[xe]]=xe;throw r&&r(be,Se,Pe),null}if(__gwt_isKnownPropertyValue=function(be,Pe){return Pe in Ee[be]},webModule.__getPropMap=function(){var be={};for(var Pe in Ee)Ee.hasOwnProperty(Pe)&&(be[Pe]=me(Pe));return be},webModule.__computePropValue=me,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Ie;try{Ie=Cb;var Te=Ie.indexOf(Db);Te!=-1&&(Yt=parseInt(Ie.substring(Te+P),$),Ie=Ie.substring(O,Te))}catch(be){}return webModule.__softPermutationId=Yt,C(Ie+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},77903:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Ax:function(){return Te},Ds:function(){return be},KI:function(){return he},SI:function(){return Ie},f1:function(){return me}});var Le=Ee(3294);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 Ie(Se,xe=""){let ge=[];for(let ce=0;ce<Se.length;ce++){let ve=Se[ce],de=xe?`${xe}/${ve.name}`:`${ve.name}`;ge.push({title:ve.name,type:ve.type,isLeaf:ve.type!=="tree",key:de})}return ge}function Te(Se,xe,ge){for(let ce=0;ce<Se.length;ce++){let ve=Se[ce];if(ve.key===xe){ve.children=ge;break}ve.children&&Te(ve.children,xe,ge)}return Se}function be(Se,xe,ge){let ce;return function(){let ve=this,de=arguments,ue=function(){ce=null,ge||Se.apply(ve,de)},z=ge&&!ce;clearTimeout(ce),ce=setTimeout(ue,xe),z&&Se.apply(ve,de)}}const Pe=!0,he=Le.Z.API_SERVER},73524:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return ce}});var Le=Ee(59301),me={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Ie=Ee(92310),Te=Ee.n(Ie),be=Ee(71418),Pe=Ee(2859),he=Ee(99064),Se=Ee(955),xe=(ve,de,ue)=>new Promise((z,ee)=>{var oe=le=>{try{se(ue.next(le))}catch(ye){ee(ye)}},ie=le=>{try{se(ue.throw(le))}catch(ye){ee(ye)}},se=le=>le.done?z(le.value):Promise.resolve(le.value).then(oe,ie);se((ue=ue.apply(ve,de)).next())}),ce=({data:ve,className:de,fullWidth:ue,style:z={},onClose:ee,onOk:oe,showFullTools:ie,noAssociationId:se})=>{const le=(0,Le.useRef)(null),ye=(0,Le.useRef)(null),we=(0,Le.useRef)(null),Ce=(0,Le.useRef)(null),[ke,Ne]=(0,Le.useState)(!1),[je,Ve]=(0,Le.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,Le.useEffect)(()=>(we.current||(we.current=document.createElement("style"),document.head.appendChild(we.current)),ve!=null&&ve.visible?(document.body.setAttribute("data-custom","y-hidden"),we.current.innerHTML=" html { overflow-y: hidden; }",ve!=null&&ve.src&&Qe()):(document.body.removeAttribute("data-custom"),we.current&&(document.head.removeChild(we.current),we.current=null)),()=>{document.body.removeAttribute("data-custom"),we.current&&(document.head.removeChild(we.current),we.current=null)}),[ve==null?void 0:ve.visible]);const Qe=()=>xe(void 0,null,function*(){Ne(!0),Ve("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Ct=yield(0,Se.ZJ)(ve==null?void 0:ve.src);le.current.src="",le.current.src=Ct,le.current.onload=function(){ct()},Ne(!1),Ve("")}),Ge=Ct=>xe(void 0,null,function*(){Ne(!0),Ve("\u6B63\u5728\u4FDD\u5B58\u4E2D");const it=yield(0,he.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:ve.title,file:Ct.dataUrl}});it!=null&&it.id&&!se?(yield(0,he.ZP)(`/api/attachments/${ve.id}/add_subitem.json`,{method:"post",body:{subitem_id:it==null?void 0:it.id,settings:JSON.stringify(Ct.state)}})).status===0&&oe():it!=null&&it.id&&oe(it),Ne(!1),Ve("")}),mt=()=>{const Ct=document.querySelector('a[href="https://markerjs.com/"]');Ct&&Ct.parentNode&&(Ct.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(St=>{const ut=document.querySelector(St.name);ut&&ut.setAttribute("title",St.title)})},ct=()=>{ye.current=new Pe.hP(le.current),ye.current.targetRoot=Ce.current,ye.current.addEventListener("render",Ge),ye.current.addEventListener("beforeclose",ee),ie&&(ye.current.availableMarkerTypes=ye.current.ALL_MARKER_TYPES,ye.current.uiStyleSettings.redoButtonVisible=!0,ye.current.uiStyleSettings.notesButtonVisible=!0,ye.current.uiStyleSettings.zoomButtonVisible=!0,ye.current.uiStyleSettings.zoomOutButtonVisible=!0,ye.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=ye.current.uiStyleSettings,ye.current.show(),ve!=null&&ve.snapshotData&&ye.current.restoreState(ve.snapshotData),setTimeout(()=>{window.scrollTo(0,0),mt()},300)};return Le.createElement(Le.Fragment,null,(ve==null?void 0:ve.visible)&&Le.createElement(be.Z,{spinning:ke,tip:je,style:{position:"absolute",width:"100vw"}},Le.createElement("div",{ref:Ce,className:Te()(me.imageDimensions,de,ue?me.fullWidth:""),style:z},Le.createElement("img",{className:me.img,ref:le}))))}},41588:function(Cn,Yt,Ee){"use strict";var Le=Ee(59301),me=Ee(95237),Ie=Ee(43604),Te=Ee(99313),be=Ee(3113),Pe=Ee(85149),he=Ee(88010),Se=Ee(48136),xe=Ee(59301);const ge=(0,Le.forwardRef)(({callback:ce,showSaveButton:ve,value:de=""},ue)=>{const z=(0,Le.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(Ie.Z,{flex:"110px",className:he.Z.item},xe.createElement("div",null,xe.createElement(Pe.Z,{value:`$$${ye.value}$$`}),ye.name),xe.createElement("div",{className:he.Z.children},ye.children.map((Ce,ke)=>xe.createElement("div",{key:ke},xe.createElement("h1",null,Ce.name),xe.createElement(me.Z,{gutter:[10,10]},Ce.data.map((Ne,je)=>xe.createElement(Ie.Z,{key:je,onClick:()=>ie(Ne),className:he.Z.diamond},xe.createElement(Pe.Z,{value:"`$$"+Ne.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(Ie.Z,{flex:"110px",className:he.Z.item},xe.createElement("div",null,xe.createElement(Pe.Z,{value:"`$$"+ye.value+"$$`"}),ye.name),xe.createElement("div",{className:he.Z.children},ye.children.map((Ce,ke)=>xe.createElement("div",{key:ke},Ce.name&&xe.createElement("h1",null,Ce.name),xe.createElement(me.Z,{gutter:[10,10]},Ce.data.map((Ne,je)=>xe.createElement(Ie.Z,{key:je,onClick:()=>ie(Ne),className:he.Z.diamond},xe.createElement(Pe.Z,{value:"`$$"+Ne.value+"$$`"}))))))))))}],le=()=>{var ye=document.createElement("div");ye.innerHTML=z.current.getValue();var we=ye.innerText;return ce&&ce(we),we};return(0,Le.useImperativeHandle)(ue,()=>({getData:le})),xe.createElement("div",{className:he.Z.mathWrap},xe.createElement(Te.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(be.ZP,{size:"large",onClick:le,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Yt.Z=ge},8797:function(Cn,Yt,Ee){"use strict";var Le=Ee(59301),me=Ee(93314),Ie=Ee(3113),Te=Object.defineProperty,be=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,he=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,ge=(ue,z,ee)=>z in ue?Te(ue,z,{enumerable:!0,configurable:!0,writable:!0,value:ee}):ue[z]=ee,ce=(ue,z)=>{for(var ee in z||(z={}))Se.call(z,ee)&&ge(ue,ee,z[ee]);if(he)for(var ee of he(z))xe.call(z,ee)&&ge(ue,ee,z[ee]);return ue},ve=(ue,z)=>be(ue,Pe(z));const de=({img:ue,buttonProps:z={},styles:ee={},customText:oe,ButtonText:ie,ButtonClick:se,Buttonclass:le,ButtonTwo:ye,imgStyles:we,loading:Ce=!1,className:ke=""})=>Le.createElement("section",{className:`tc animated fadeIn ${ke}`,style:ce({color:"#999",margin:"100px auto",visibility:Ce?"hidden":"visible"},ee)},Le.createElement("img",{src:ue||me,style:ve(ce({},we),{pointerEvents:"none",userSelect:"none"})}),Le.createElement("p",{className:"mt20 font14"},oe||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),ie&&Le.createElement(Ie.ZP,ce({className:le,onClick:se},z),ie),ye&&ye);Yt.Z=de},23210:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return le}});var Le=Ee(59301),me={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Ie=Ee(3113),Te=Ee(70557),be=Ee(23954),Pe=Ee(6848),he=Ee(955),Se=Ee(94941),xe=Ee(8797),ge=Ee(3294),ce=Ee(19381),ve=Ee(59301),de=Object.defineProperty,ue=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,oe=(ye,we,Ce)=>we in ye?de(ye,we,{enumerable:!0,configurable:!0,writable:!0,value:Ce}):ye[we]=Ce,ie=(ye,we)=>{for(var Ce in we||(we={}))z.call(we,Ce)&&oe(ye,Ce,we[Ce]);if(ue)for(var Ce of ue(we))ee.call(we,Ce)&&oe(ye,Ce,we[Ce]);return ye},se=(ye,we,Ce)=>new Promise((ke,Ne)=>{var je=Ge=>{try{Qe(Ce.next(Ge))}catch(mt){Ne(mt)}},Ve=Ge=>{try{Qe(Ce.throw(Ge))}catch(mt){Ne(mt)}},Qe=Ge=>Ge.done?ke(Ge.value):Promise.resolve(Ge.value).then(je,Ve);Qe((Ce=Ce.apply(ye,we)).next())}),le=({editOffice:ye="view",data:we,theme:Ce,type:ke,filename:Ne,monacoEditor:je,className:Ve,style:Qe,close:Ge,onClose:mt,hasMask:ct,disabledDownload:Ct,onImgDimensions:it,showNodata:St,recordInfo:ut})=>{const[Ft,ht]=(0,Le.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[rt,dt]=(0,Le.useState)(""),[yt,_t]=(0,Le.useState)(),vt=window.ENV==="build"?"/react/build":"",Bt=location.host.startsWith("localhost")?ge.Z.PROXY_SERVER:ge.Z.API_SERVER,un=10*(1024*1024),Kt=(0,Le.useRef)();we!=null&&we.startsWith("/api")&&ke!=="txt"&&(we=ge.Z.API_SERVER+we);const xn=ft=>ft.substring(ft.lastIndexOf("/")+1).split(".").pop();Ne&&je&&(je.filename=Ne),(0,Le.useEffect)(()=>{var ft,We;const Be=(We=(ft=document.cookie)==null?void 0:ft.replace(/\s/g,""))==null?void 0:We.split(";");Be==null||Be.map(qe=>{let et=qe.split("=");et[0]==="_educoder_session"&&dt(et[1])})},[]),(0,Le.useEffect)(()=>{ke==="office"&&(we.indexOf("bigfilescdn.")>-1||we.indexOf("bigfiles1")>-1?_t({url:we,fileType:xn(we),model:we.indexOf("model=edit")?"edit":"view"}):Ut())},[ke,we]);const Ut=()=>se(void 0,null,function*(){console.log("data:",we);let ft=we;we.startsWith("http")||(ft=location.origin+ft);let We=new URL(ft).pathname.split("/").pop();const Be=yield(0,Se.gJ)({attachment_id:We});Be.url=Bt+Be.url,_t(Be)}),Wt=()=>{if(we.startsWith("http")||we.startsWith("blob:")){$t();return}(0,he.Sv)(Ne||"educoder",we,Ne)},$t=()=>{ut&&(0,ce.fc)({id:ut==null?void 0:ut.id,watch_type:1,course_id:ut==null?void 0:ut.course_id}),(0,he.Nd)(Ne||"educoder",decodeURIComponent(we))};return ve.createElement("div",{style:ie({},Qe||{}),className:`${ct&&me.bgBlack} ${ke?me.wrp:"hide"}`},Ge&&ve.createElement("div",{className:me.close,ref:Kt},!!it&&ve.createElement(Pe.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Kt.current},ve.createElement("span",{onClick:()=>{mt(),it()}},ve.createElement("i",{className:"icon-yulanpizhu"}))),!Ct&&ve.createElement(Pe.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Kt.current},ve.createElement("span",{onClick:$t},ve.createElement("i",{className:"icon-quxiaozhiding"}))),ve.createElement(Pe.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Kt.current},ve.createElement("span",{className:"",onClick:mt},ve.createElement("i",{className:"icon-guanbi1"})))),ve.createElement("div",{className:`${me[Ve]} ${Ve} ${me.monaco} ${ke==="txt"?"show":"hide"}`},ke==="txt"&&ve.createElement(ve.Fragment,null,ve.createElement(be.ZP,ie({},je)))),ke==="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}),ke==="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})),ke==="office"&&yt&&ve.createElement("iframe",{src:`${vt}/office.html?key=${yt.key}&url=${btoa(yt.url)}&callbackUrl=${Bt+(yt.callbackUrl||"")}&fileType=${yt.fileType}&title=${yt.title||""}&model=${ye}&officeServer=${ge.Z.ONLYOFFICE}&disabledDownload=${!!Ct}`}),ke==="html"&&ve.createElement("iframe",{src:we+"&disposition=inline"}),ke==="pdf"&&ve.createElement("iframe",{src:`${vt}/js/pdfview/index.html?filename=${Ne||"educoder.pdf"}&url=${encodeURIComponent(we)}&disabledDownload=${!!Ct}`}),ke==="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}`}),(ke==="other"||ke==="download")&&ve.createElement(ve.Fragment,null,St?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(Ie.ZP,{icon:ve.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Wt,disabled:Ct},"\u4E0B\u8F7D")}):ve.createElement(Ie.ZP,{type:"primary",size:"middle",onClick:Wt,disabled:Ct},ve.createElement(Te.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},85149:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{z:function(){return ke},Z:function(){return Ne}});var Le=Ee(59301),me=Ee(50304),Ie=Ee(24768),Te=Ee(64018),be=Ee(46284),Pe=Ee(3294),he=Ee(955),Se=Ee(15342),xe=Ee(1012),ge=Ee(23210),ce=Ee(59301),de=({html:je})=>{const Ve=(0,Le.useRef)(null),Qe=(0,Le.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,Le.useEffect)(()=>{const mt=Ve.current.attachShadow({mode:"open"});Qe.current=document.createElement("div"),Qe.current.className="markdown-body",Qe.current.innerHTML=je,mt.appendChild(Qe.current);const ct=document.createElement("style");return ct.textContent=Ge,mt.appendChild(ct),()=>{mt.innerHTML=""}},[]),(0,Le.useEffect)(()=>{Qe.current&&(Qe.current.innerHTML=je)},[je]),ce.createElement("div",{ref:Ve})},ue=Object.defineProperty,z=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable,ie=(je,Ve,Qe)=>Ve in je?ue(je,Ve,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):je[Ve]=Qe,se=(je,Ve)=>{for(var Qe in Ve||(Ve={}))ee.call(Ve,Qe)&&ie(je,Qe,Ve[Qe]);if(z)for(var Qe of z(Ve))oe.call(Ve,Qe)&&ie(je,Qe,Ve[Qe]);return je};const le="@\u2581\u2581@",ye="@\u2581@",we=/<pre[^>]*>/g;function Ce(je){let Ve=document.createElement("div");return Ve.innerHTML=je,Ve.childNodes.length===0?"":Ve.childNodes[0].nodeValue}const ke=(je,Ve)=>{je=je||"";const Qe=/(?: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,mt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ct=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ve?je.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Qe,(Ct,it,St,ut,Ft,ht,rt)=>{const dt=it||ut||ht,yt=St||Ft||rt||"?";return Pe.Z.API_SERVER+"/api/attachments/"+dt+yt+"&t="+(0,he.Jn)(dt,Date.now())+(Ct.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(je=je.replace(ct,(Ct,it,St,ut,Ft,ht,rt)=>{const dt=it||ut||ht,yt=St||Ft||rt||"?";return Pe.Z.API_SERVER+"/attachments/download/"+dt+yt+"&t="+(0,he.Jn)(dt,Date.now())+(Ct.indexOf(")")>-1?")":"&")}).replace(Qe,(Ct,it,St,ut,Ft,ht,rt)=>{const dt=it||ut||ht,yt=St||Ft||rt||"?";return Pe.Z.API_SERVER+"/api/attachments/"+dt+yt+"&t="+(0,he.Jn)(dt,Date.now())+(Ct.indexOf(")")>-1?")":"&")}).replace(Ge,(Ct,it,St,ut,Ft)=>{const ht=it||ut,rt=St||Ft||"";return'"'+Pe.Z.API_SERVER+"/api/attachments/"+ht+rt+ht+rt+"&t="+(0,he.Jn)(ht,Date.now())}).replace(mt,(Ct,it,St,ut,Ft)=>{const ht=it||ut,rt=St||Ft||"";return"("+Pe.Z.API_SERVER+"/files/uploads/"+ht+rt+ht+rt+"&t="+(0,he.Jn)(ht,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
|
`),je)};var Ne=({value:je="",className:Ve,showTextOnly:Qe,showLines:Ge,style:mt={},stylesPrev:ct={},highlightKeywords:Ct,showProgramFill:it,isProgramFill:St,disabledFill:ut=!1,programFillValue:Ft,onFillChange:ht=yt=>{},onFillBlur:rt=()=>{},onFillFocus:dt=()=>{}})=>{let yt=String(je);const[_t,vt]=(0,Le.useState)(""),[Bt,jt]=(0,Le.useState)("office"),[un,Kt]=(0,Le.useState)([]),xn=(0,Le.useRef)("a"+(0,xe.Z)()),Ut={},Wt=(Ke,Ze,lt)=>{const xt=document.createElement(Ke===ye?"input":"textarea");xt.style.width="100%",xt.style.height=Ke===ye?"40px":"151px",xt.rows=5,xt.spellcheck=!1,xt.name="edu-program-fill",xt.placeholder="\u8BF7\u8F93\u5165",xt.dataset.id=Ze;const tn=Object.keys(Ut).length;return Ut[tn]=xt,`<span class="edu-program-fill-wrap ${Ke===ye?"":"show"}" style="width:${Ke===ye?"400px":"100%"}" title=${lt||""}><span>${xt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function $t(Ke){return Ke=Ke.replace(/!\[.*?\]\(.*?\)/g,""),Ke=Ke.replace(/\[.*?\]\(.*?\)/g,""),Ke=Ke.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Ke=Ke.replace(/<embed.*?>/g,""),Ke=Ke.replace(/<img.*?>/g,""),Ke=Ke.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Ke=Ke.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Ke=Ke.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Ke=Ke.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Ke}const ft=Ke=>Ke.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Ze,lt){let xt=lt.replace(/(\n|\r)/g,"").split("}"),tn=[];return xt.map(en=>{en!=""&&tn.push(`.${xn.current} ${en}`)}),`<style>${tn.join("}")}</style>`}),We=(0,Le.useMemo)(()=>{try{const xt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,tn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,en=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Jt=/\(\/attachments\/download\//g;yt=yt.replace(Jt,"("+Pe.Z.API_SERVER+"/attachments/download/").replace(xt,"("+Pe.Z.API_SERVER+"/api/attachments/").replace(tn,'"'+Pe.Z.API_SERVER+"/api/attachments/").replace(en,'"'+Pe.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
|
`)}catch(xt){}if(it){let xt=-1;return yt=yt.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(tn,en,Jt){var gn;return++xt,Wt(tn,xt,(gn=Ft==null?void 0:Ft[xt])==null?void 0:gn.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${ft(yt||"")}</pre>`}let Ke=ft(yt);Ke=(0,Ie.ZP)(Ke);const Ze=(0,Ie.ez)();yt.match(/\[TOC\]/)&&(Ke=Ke.replace("<p>[TOC]</p>",(0,Ie.Qv)()),(0,Ie.Iy)()),Ke=Ke.replace(/(__special_katext_id_\d+__)/g,(xt,tn)=>{const{type:en,expression:Jt}=Ze[tn];return(0,Se.renderToString)(Ce(Jt)||"",{displayMode:en==="block",throwOnError:!1,output:"html"})}),Ke=Ke.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ie.AL)();const lt=document.createElement("div");if(lt.innerHTML=Ke,Qe)return lt.innerText;if(Ct){const xt=Ct.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return He(lt,xt),lt.innerHTML}return setTimeout(()=>Ae(),500),lt.innerHTML},[yt,Ct]);(0,Le.useEffect)(()=>{Xe.current&&Xe.current.querySelectorAll(["input","textarea"]).forEach(Ze=>{Ze.oninput=Be,Ze.onblur=qe,Ze.onfocus=et})},[un]),(0,Le.useEffect)(()=>{var Ke,Ze,lt,xt,tn;if(Ft!=null&&Ft.length)try{const en=Xe.current.querySelectorAll(".edu-program-fill-score"),Jt=Xe.current.querySelectorAll('[name="edu-program-fill"]');for(const[gn,Mn]of Jt.entries())Mn.value=((Ke=Ft==null?void 0:Ft[gn])==null?void 0:Ke.value)||"",((Ze=Ft==null?void 0:Ft[gn])==null?void 0:Ze.type)==="warning"?Mn.className="program-fill-warning":((lt=Ft==null?void 0:Ft[gn])==null?void 0:lt.type)==="success"?Mn.className="program-fill-success":Mn.className="";for(const[gn,Mn]of en.entries())Mn.innerHTML=(xt=Ft==null?void 0:Ft[gn])!=null&&xt.score?`${(tn=Ft==null?void 0:Ft[gn])==null?void 0:tn.score}\u5206`:"";Kt(Ft)}catch(en){console.log(en,"error")}},[Ft]);const Be=Ke=>{un[Ke.target.dataset.id]=un[Ke.target.dataset.id]||{},un[Ke.target.dataset.id].value=Ke.target.value,Kt([...un]),ht(un,Ke.target.dataset.id)},qe=Ke=>{un[Ke.target.dataset.id]=un[Ke.target.dataset.id]||{},un[Ke.target.dataset.id].value=Ke.target.value,Kt([...un]),rt(un,Ke.target.dataset.id)},et=Ke=>{un[Ke.target.dataset.id]=un[Ke.target.dataset.id]||{},un[Ke.target.dataset.id].value=Ke.target.value,Kt([...un]),dt(un,Ke.target.dataset.id)};function He(Ke,Ze){return Ke.childNodes.forEach(lt=>{var xt;if(lt.childNodes.length>0)He(lt,Ze);else if(lt.nodeName!=="IMG")if(lt.innerHTML)lt.innerHTML=(xt=lt.innerHTML)==null?void 0:xt.replace(new RegExp(Ze,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const tn=document.createElement("span");tn.innerHTML=lt.textContent.replace(new RegExp(Ze,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),lt.replaceWith(tn)}})}const Xe=(0,Le.useRef)();Ie.jb.WebkitLineClamp=Ge,Ge&&(mt=se(se({},mt),Ie.jb));function Re(Ke){let Ze=Ke.target;if(Ze.tagName.toUpperCase()==="A"){let lt=Ze.getAttribute("href");if(lt.indexOf("office")>-1)Ke.preventDefault(),vt(lt),jt("office");else if(lt.indexOf("application/pdf")>-1)Ke.preventDefault(),vt(lt),jt("pdf");else if(lt.indexOf("text/html")>-1)Ke.preventDefault(),vt(lt),jt("html");else if(lt.startsWith("#")){Ke.preventDefault();let xt=document.getElementById(lt.replace("#",""));xt&&xt.scrollIntoView(!0)}}}const Ae=()=>{var Ke;const Ze=(Ke=Xe.current)==null?void 0:Ke.querySelectorAll("video");Ze==null||Ze.forEach(lt=>{if(lt.oncontextmenu=()=>!1,lt.src.indexOf(".m3u8")>-1&&!lt.canPlayType("application/vnd.apple.mpegurl")){if(be.ZP.isSupported()){var xt=new be.ZP;xt.loadSource(lt.src),xt.attachMedia(lt)}}})};(0,Le.useEffect)(()=>{if(Xe.current&&We&&We.match(we)&&window.PR.prettyPrint(),Xe.current)return Xe.current.addEventListener("click",Re),()=>{var Ke;(Ke=Xe.current)==null||Ke.removeEventListener("click",Re),(0,Ie.AL)(),(0,Ie.Iy)()}},[We,Xe.current,Re]),(0,Le.useEffect)(()=>{var Ke;const Ze=lt=>{lt.preventDefault(),lt.clipboardData.setData("text",window.getSelection().toString())};return(Ke=Xe.current)==null||Ke.addEventListener("copy",Ze),()=>{var lt;(lt=Xe.current)==null||lt.removeEventListener("copy",Ze)}},[Xe.current]);const Ue=Ke=>/<style[\s\S]*?>/i.test(Ke||"");return Le.createElement(Le.Fragment,null,Qe&&Le.createElement("div",{ref:Xe},We),!Qe&&!Ue(We)&&Le.createElement("div",{ref:Xe,style:se({},mt),className:`${Ve||""} ${ut?"disabled-fill":""} markdown-body ${xn.current}`,dangerouslySetInnerHTML:{__html:We}}),!Qe&&Ue(We)&&Le.createElement(de,{html:We}),Le.createElement(ge.Z,{close:!0,data:_t,type:_t!=null&&_t.length?Bt:"",style:se({},ct),onClose:()=>vt("")}))}},33538:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Te}});var Le=Ee(89070),me={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},Ie=Ee(59301),Te=({message:be,className:Pe,children:he,style:Se={}})=>Ie.createElement("div",{className:`custom-spinner ${me.idsRingWrapper} ${Pe}`},Ie.createElement("div",{className:me.ldsRing},Ie.createElement("div",null),Ie.createElement("div",null),Ie.createElement("div",null),Ie.createElement("div",null)),be?Ie.createElement("p",{style:Se},be):null,he,Ie.createElement(Le.Outlet,null))},17064:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Te}});var Le=Ee(59301),me=Ee(34604),Ie=Ee(59301),Te=({defaultX:be="40%",leftChild:Pe,rightChild:he,className:Se,hideResize:xe=!1})=>{const[ge,ce]=(0,Le.useState)(be),ve=(0,Le.useRef)();function de(){ve.current=!0}(0,Le.useEffect)(()=>{function ee(ie){ve.current&&(me.Z.publish("resize-move-bar",ie),ce(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 ue=typeof ge=="number"&&ge!==.01?`${ge}px`:be,z=`calc(100% - ${xe?"0px":"4px"} - ${ue})`;return Ie.createElement("div",{className:`split-panel-container ${Se}`},Ie.createElement("section",{style:{width:ue,display:ge===.01?"none":""}},Pe),Ie.createElement("section",{className:"resize-x-bar",onMouseDown:de},Ie.createElement("a",{className:"btn-resize"},Ie.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},Ie.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"})))),Ie.createElement("section",{style:{width:z}},he))}},13787:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Pe}});var Le=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_"},Ie=Ee(92310),Te=Ee.n(Ie),Pe=({className:he,style:Se={},leftNode:xe,leftTitle:ge="\u81EA\u6D4B\u8F93\u5165",rightNode:ce,rightTitle:ve="\u8FD0\u884C\u7ED3\u679C"})=>Le.createElement("div",{className:Te()(me.result,he),style:Se},Le.createElement("div",{className:me.left},Le.createElement("div",{className:me.title},Le.createElement("i",{style:{color:"#08CF76"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),Le.createElement("span",null,ge)),Le.createElement("div",{className:me.leftNode},xe)),Le.createElement("div",{className:me.right},Le.createElement("div",{className:me.title},Le.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),Le.createElement("span",null,ve)),Le.createElement("div",{className:me.rightNode},ce)))},19105:function(Cn,Yt,Ee){"use strict";var Le=Ee(59301);const me=Te=>String(Te).length===1?`0${Te}`:Te,Ie=({className:Te="",onChange:be,defaultValue:Pe=0})=>{const[he,Se]=(0,Le.useState)(Pe);(0,Le.useEffect)(()=>{const ve=setTimeout(()=>{Se(he+1e3)},1e3);return be(he+1e3),()=>{clearInterval(ve)}},[he]);const xe=parseInt(he/(60*6e4))||"00",ge=parseInt(he%(60*6e4)/6e4)||"00",ce=parseInt(he%6e4/1e3)||"00";return Le.createElement("div",{className:Te},me(xe),":",me(ge),":",me(ce))};Yt.Z=Ie},71839:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return z}});var Le=Ee(59301),me=Ee(8591),Ie=Ee(38854),Te=Ee(29382),be=Ee(46284),Pe=Ee(24065),he=Ee(56102),Se=Ee(4901),xe={watermark:"watermark___hNYlv",videovideo:"videovideo___ovOkV",animate__loop:"animate__loop___mvL6s",upDown:"upDown___SlgHv",container:"container___g1WYG","video-container":"video-container___XPkWR","video-controls":"video-controls___to0Zq",hide:"hide___NA3DV","video-progress":"video-progress___gqHsd",seek:"seek___iZHBm","seek-tooltip":"seek-tooltip___uWyXx","bottom-controls":"bottom-controls___uoIBm","left-controls":"left-controls___mBEx4","right-controls":"right-controls___e9L6r",rateOverlay:"rateOverlay___HHBWe",controlText:"controlText___M_BWR","volume-controls":"volume-controls___fa3mE","fullscreen-button":"fullscreen-button___ur0es","fullscreen-button1":"fullscreen-button1___rfaXm","pip-button":"pip-button___GFO8W","playback-animation":"playback-animation___ndURq",volume:"volume___OTmpP",hidden:"hidden___o7GkT"},ge=(ee,oe,ie)=>new Promise((se,le)=>{var ye=ke=>{try{Ce(ie.next(ke))}catch(Ne){le(Ne)}},we=ke=>{try{Ce(ie.throw(ke))}catch(Ne){le(Ne)}},Ce=ke=>ke.done?se(ke.value):Promise.resolve(ke.value).then(ye,we);Ce((ie=ie.apply(ee,oe)).next())});function ce(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 ue=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;var z=(0,Le.forwardRef)(({allow_skip:ee,src:oe,toLog:ie,videoId:se,logWatchHistory:le,courseId:ye=null,startTime:we,handlePause:Ce=()=>{},handlePlay:ke=()=>{},handlePlayEnded:Ne=()=>{},autoPlay:je=!1,onPlayEnded:Ve=()=>{},isShowWaterMark:Qe=!0},Ge)=>{var mt;oe=oe==null?void 0:oe.replace("http://","https://");const Ct=((mt=oe==null?void 0:oe.split("."))==null?void 0:mt.pop())==="flv",it=(0,Le.useRef)(),St=(0,Le.useRef)(),ut=(0,Le.useRef)(),Ft=(0,Le.useRef)(),ht=(0,Le.useRef)(),rt=(0,Le.useRef)(),dt=(0,Le.useRef)(),yt=(0,Le.useRef)(),_t=(0,Le.useRef)(),vt=(0,Le.useRef)(),Bt=(0,Le.useRef)(),jt=(0,Le.useRef)(),un=(0,Le.useRef)(),Kt=(0,Le.useRef)(),xn=navigator.userAgent.toLowerCase().match(ue),Ut=xn?xn[0]:"pc",Wt=(0,Le.useRef)(!1),$t=(0,Pe.eY)();let ft=0,We=0,Be=0,qe=null,et=!1,He=20,Xe=1,Re=!1,Ae=!1,Ue=[];(0,Le.useImperativeHandle)(Ge,()=>({getLastUpdatedTime:()=>it.current.currentTime,getDuration:()=>it.current.duration})),me.ZP.config({maxCount:1,getContainer:()=>ut.current});const Ke=(0,Le.useCallback)((gn,Mn=!1)=>{let yn={point:it.current.currentTime};qe?(yn.log_id=qe,yn.watch_duration=de(Ue),yn.total_duration=We):(ye?(yn.video_id=parseInt(se,10),yn.course_id=ye):yn.video_id=se,yn.duration=ft,yn.device=Ut),Mn&&(yn.ed="1");function kn(){return ge(this,null,function*(){Re=!0,qe=yield le==null?void 0:le(yn),Re=!1,gn&&gn()})}kn()},[se,ye]);(0,Le.useEffect)(()=>{it.current&&(Ft.current.style.display="none",ht.current.style.display="block"),me.ZP.destroy();let gn=null;return Te.Z.isSupported&&Ct&&oe&&(oe==null?void 0:oe.indexOf(".m3u8"))<0?(gn=Te.Z.createPlayer({type:"flv",volume:.8,cors:!0,url:oe,muted:!1}),it.current&&(gn.attachMediaElement(it.current),gn.load())):it.current.setAttribute("src",oe),lt(),()=>{gn&&(gn.unload(),gn.pause(),gn.destroy(),gn=null)}},[it,Ct,oe]);function Ze(){it.current.paused?(Ft.current.style.display="none",ht.current.style.display="block"):(Ft.current.style.display="block",ht.current.style.display="none")}function lt(){Bt.current.style.display="none",un.current.style.display="none",jt.current.style.display="none",it.current.muted||it.current.volume===0?Bt.current.style.display="block":it.current.volume>0&&it.current.volume<=.5?un.current.style.display="block":jt.current.style.display="block"}(0,Le.useEffect)(()=>{const gn=document.getElementById("play"),Mn=document.querySelectorAll(".playback-icons use");function yn(){ke(),we&&!Wt.current&&(it.current.currentTime=we),Wt.current=!0,Ue.push(it.current.currentTime),et||(et=!0,ie&&Ke())}function kn(){return ge(this,null,function*(){Ze(),Ue.push(it.current.currentTime),ie&&Ke(()=>{qe=null,Be=0,et=!1,Re=!1,Ae=!1,Ue=[],We=0,Xe=1},!0),Ve()})}function $n(){rt.current.value=Math.round(it.current.currentTime),dt.current.value=Math.round(it.current.currentTime)}function An(){const xi=ce(Math.round(it.current.currentTime));_t.current.innerText=`${xi.hour>0?xi.hour+":":""}${xi.minutes}:${xi.seconds}`,_t.current.setAttribute("datetime",`${xi.hour>0?" "+xi.hour+" ":""}${xi.minutes}m ${xi.seconds}s`)}function oi(){var xi,wr,Mr,ot,Rr,Nr,Hr;const uo=Math.round((xi=it.current)==null?void 0:xi.duration);(Mr=(wr=rt.current)==null?void 0:wr.setAttribute)==null||Mr.call(wr,"max",uo),(Rr=(ot=dt.current)==null?void 0:ot.setAttribute)==null||Rr.call(ot,"max",uo);const po=ce(uo);yt.current&&(yt.current.innerText=`${po.hour>0?po.hour+":":""}${po.minutes}:${po.seconds}`,(Hr=(Nr=yt.current).setAttribute)==null||Hr.call(Nr,"datetime",`${po.hour>0?" "+po.hour+" ":""}${po.minutes}m ${po.seconds}s`))}function ai(){try{const xi=Math.round(it.current.duration);rt.current.setAttribute("max",xi),dt.current.setAttribute("max",xi);const wr=ce(xi);yt.current.innerText=`${wr.hour>0?wr.hour+":":""}${wr.minutes}:${wr.seconds}`,yt.current.setAttribute("datetime",`${wr.hour>0?" "+wr.hour+" ":""}${wr.minutes}m ${wr.seconds}s`),$n(),An();const{width:Mr,height:ot,x:Rr,y:Nr}=St.current.getBoundingClientRect();if(Rr<0||Nr<0||!Mr)return;if(!Ae){let Hr=it.current.currentTime,uo=Hr-Be;Math.abs(uo)<10?(We+=Math.abs(uo),Be=Hr,Re||We-Xe*He>=0&&(Xe++,Ue.push(Be),ie&&Ke())):(Be=Hr,ie&&Ke())}}catch(xi){console.log(xi)}}function Di(){Ae=!0}function Pi(){it.current.playing&&Ue.push(it.current.currentTime,Be),Be=it.current.currentTime,Ae=!1}function Xi(){ft=it.current.duration,ft<=20&&(He=ft/3),it.current.addEventListener("play",yn)}function or(xi){xi.preventDefault(),(0,Se.vp)()?(it.current.style.width="100%",it.current.style.height="100%"):it.current.style.cssText=""}function ar(){Ce()}function dr(xi){if(!ee){me.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");return}const wr=xi.target.dataset.seek?xi.target.dataset.seek:xi.target.value;it.current.currentTime=wr,dt.current.value=wr,rt.current.value=wr}function no(xi){const wr=Math.round(xi.offsetX/xi.target.clientWidth*parseInt(xi.target.getAttribute("max"),10));rt.current.setAttribute("data-seek",wr);const Mr=ce(wr);vt.current.textContent=`${Mr.hour>0?Mr.hour+":":""}${Mr.minutes}:${Mr.seconds}`;const ot=it.current.getBoundingClientRect();vt.current.style.left=`${xi.pageX-ot.left}px`}function Ir(xi){switch(xi.code){case"Space":xi.preventDefault(),en();break;case"ArrowRight":if(xi.preventDefault(),!ee){me.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(it.current.currentTime>=it.current.duration)break;it.current.currentTime=parseInt(it.current.currentTime)+5,$n();break;case"ArrowLeft":if(xi.preventDefault(),!ee){me.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(it.current.currentTime===0)break;it.current.currentTime=parseInt(it.current.currentTime)-5,$n();break;case"ArrowUp":xi.preventDefault(),it.current.volume<1&&(it.current.volume=(parseInt(it.current.volume*10)+1)/10);break;case"ArrowDown":xi.preventDefault(),it.current.volume>0&&(it.current.volume=(parseInt(it.current.volume*10)-1)/10);break}}return ut.current.addEventListener((0,Se.gH)(),or),it.current.addEventListener("canplay",Xi),it.current.addEventListener("ended",kn),it.current.addEventListener("seeking",Di),it.current.addEventListener("seeked",Pi),it.current.addEventListener("loadedmetadata",oi),rt.current.addEventListener("mousemove",no),rt.current.addEventListener("input",dr),it.current.addEventListener("timeupdate",ai),it.current.addEventListener("pause",ar),it.current.addEventListener("volumechange",lt),document.addEventListener("keydown",Ir),()=>{var xi,wr,Mr,ot,Rr,Nr,Hr,uo,po,io,Do,Xn;(xi=it.current)==null||xi.removeEventListener("canplay",Xi),(wr=it.current)==null||wr.removeEventListener("play",yn),(Mr=it.current)==null||Mr.removeEventListener("ended",kn),(ot=it.current)==null||ot.removeEventListener("seeking",Di),(Rr=it.current)==null||Rr.removeEventListener("seeked",Pi),(Nr=rt.current)==null||Nr.removeEventListener("mousemove",no),(Hr=rt.current)==null||Hr.removeEventListener("input",dr),(uo=it.current)==null||uo.removeEventListener("timeupdate",ai),(po=it.current)==null||po.removeEventListener("pause",ar),(io=it.current)==null||io.removeEventListener("loadedmetadata",oi),(Do=it.current)==null||Do.removeEventListener("volumechange",lt),document.removeEventListener("keydown",Ir),(Xn=it.current)!=null&&Xn.playing&&(Ue.push(Be,it.current.currentTime),ie&&Ke())}},[it,oe]),(0,Le.useEffect)(()=>{if(it.current.onended=()=>{Ne(it)},it.current.oncontextmenu=()=>!1,(oe==null?void 0:oe.indexOf(".m3u8"))>-1){if(it.current.canPlayType("application/vnd.apple.mpegurl"))it.current.src=oe;else if(be.ZP.isSupported()){var gn=new be.ZP;gn.loadSource(oe),gn.attachMedia(it.current)}}},[oe]);const[xt,tn]=(0,Le.useState)(1),en=()=>{it.current.paused||it.current.ended?it.current.play():it.current.pause(),Ze()};function Jt(){it.current.muted=!it.current.muted,it.current.muted?(Kt.current.setAttribute("data-volume",volume.value),Kt.current.value=0):Kt.current.value=Kt.current.dataset.volume}return Le.createElement("div",{style:{position:"relative"},ref:ut},Le.createElement("div",{ref:St,className:`${xe.watermark} animated_alternate animate__animated_10s animate__infinite animate__stepstart ${xe.animate__loop}`},Qe&&$t?$t.login:" "),Le.createElement("div",{className:xe.container},Le.createElement("div",{className:xe["video-container"],id:"video-container"},Le.createElement("div",{className:xe["playback-animation"],id:"playback-animation"},Le.createElement("svg",{className:xe["playback-icons"]},Le.createElement("use",{className:"hidden",href:"#play-icon"}),Le.createElement("use",{href:"#pause"}))),Le.createElement("video",{className:xe.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:it,autoPlay:je}),Le.createElement("div",{className:`${xe["video-controls"]} `,id:"video-controls"},Le.createElement("div",{className:xe["bottom-controls"]},Le.createElement("div",{className:xe["left-controls"]},Le.createElement("button",{"data-title":"\u64AD\u653E/\u6682\u505C",id:"play",onClick:en},Le.createElement("svg",{className:xe["playback-icons"]},Le.createElement("use",{ref:ht,href:"#play-icon"}),Le.createElement("use",{ref:Ft,style:{display:"none"},href:"#pause"}))),Le.createElement("div",{className:xe.time},Le.createElement("time",{id:"time-elapsed",ref:_t},"00:00"),Le.createElement("span",null," / "),Le.createElement("time",{id:"duration",ref:yt},"00:00"))),Le.createElement("div",{className:xe["right-controls"]},ee&&Le.createElement(Ie.Z,{placement:"top",overlayClassName:xe.rateOverlay,getPopupContainer:gn=>gn.parentNode,menu:{items:[{key:"1",label:Le.createElement("span",{onClick:()=>{tn(1),it.current.playbackRate=1}},"1.0x")},{key:"2",label:Le.createElement("span",{onClick:()=>{tn(1.5),it.current.playbackRate=1.5}},"1.5x")},{key:"3",label:Le.createElement("span",{onClick:()=>{tn(2),it.current.playbackRate=2}},"2.0x")}]}},Le.createElement("div",{className:`${xe.controlText} mr5`},"\u500D\u901F")),Le.createElement(he.CopyToClipboard,{text:oe,onCopy:()=>me.ZP.success("\u590D\u5236\u6210\u529F")},Le.createElement("button",{"data-title":"\u590D\u5236\u94FE\u63A5"},Le.createElement("i",{className:"icon-lianjie2 iconfont",style:{fontSize:"12px",color:"white"}}))),Le.createElement("div",{className:xe["volume-controls"]},Le.createElement("button",{"data-title":"\u5F00\u542F/\u5173\u95ED\u58F0\u97F3",className:xe["volume-button"],id:"volume-button",onClick:Jt},Le.createElement("i",{ref:Bt,className:"icon-a-bianzu8 iconfont",style:{fontSize:"14px",color:"white"}}),Le.createElement("i",{ref:un,className:"icon-shengyinkaibeifen iconfont",style:{fontSize:"14px",color:"white"}}),Le.createElement("i",{ref:jt,className:"icon-shengyinkai iconfont",style:{fontSize:"14px",color:"white"}})),Le.createElement("input",{className:xe.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:Kt,style:{display:"none"},onClick:lt})),Le.createElement("button",{"data-title":"\u5168\u5C4F/\u9000\u51FA\u5168\u5C4F",className:xe["fullscreen-button"],onClick:()=>{(0,Se.vp)()?(0,Se.BU)():(0,Se.Dj)(ut.current)}},Le.createElement("i",{className:"icon-fangda1 iconfont",style:{fontSize:"12px",color:"white"}})))),Le.createElement("div",{className:xe["video-progress"]},Le.createElement("progress",{ref:dt,value:"0",min:"0"}),Le.createElement("input",{className:xe.seek,ref:rt,value:"0",min:"0",type:"range",step:"1"}),Le.createElement("div",{className:xe["seek-tooltip"],ref:vt,id:"seek-tooltip"},"00:00"))))),Le.createElement("svg",{style:{display:"none"}},Le.createElement("defs",null,Le.createElement("symbol",{id:"pause",viewBox:"0 0 24 24"},Le.createElement("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})),Le.createElement("symbol",{id:"play-icon",viewBox:"0 0 24 24"},Le.createElement("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})),Le.createElement("symbol",{id:"volume-high",viewBox:"0 0 24 24"},Le.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"})),Le.createElement("symbol",{id:"volume-low",viewBox:"0 0 24 24"},Le.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"})),Le.createElement("symbol",{id:"volume-mute",viewBox:"0 0 24 24"},Le.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"})),Le.createElement("symbol",{id:"fullscreen",viewBox:"0 0 24 24"},Le.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"})),Le.createElement("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24"},Le.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"})),Le.createElement("symbol",{id:"pip",viewBox:"0 0 24 24"},Le.createElement("path",{d:"M21 19.031v-14.063h-18v14.063h18zM23.016 18.984q0 0.797-0.609 1.406t-1.406 0.609h-18q-0.797 0-1.406-0.609t-0.609-1.406v-14.016q0-0.797 0.609-1.383t1.406-0.586h18q0.797 0 1.406 0.586t0.609 1.383v14.016zM18.984 11.016v6h-7.969v-6h7.969z"})))))})},61398:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Te}});var Le=Ee(59301),me=Ee(34604),Ie=Ee(11611),Te=()=>{const[be,Pe]=(0,Le.useState)(""),[he,Se]=(0,Le.useState)(0);let[xe,ge]=(0,Le.useState)(),[ce,ve]=(0,Le.useState)();const[de,ue]=(0,Le.useState)(!1),z=(0,Le.useRef)("");(0,Le.useEffect)(()=>me.Z.subscribe("preview-image",je=>{Pe(je),console.log(Ce.current),document.body.style.overflow="hidden"}),[]),(0,Le.useEffect)(()=>(document.addEventListener("keydown",ee),()=>{document.removeEventListener("keydown",ee)}),[]),(0,Le.useEffect)(()=>{z.current=be},[be]);function ee(Ne){Ne.keyCode==27&&z.current&&oe()}function oe(){document.body.style.overflow="auto",ge(void 0),ve(void 0),Se(0),Pe("")}function ie(){Se(he+90)}function se(){xe=Ce.current.width*1.1,ce=Ce.current.height*1.1,ve(ce),ge(xe)}function le(){xe=Ce.current.width/1.1,ce=Ce.current.height/1.1,ve(ce),ge(xe)}const ye=(0,Le.useRef)(),we=(0,Le.useRef)(),Ce=(0,Le.useRef)(),ke=Ne=>{(Ne.nativeEvent.target===ye.current||Ne.nativeEvent.target===we.current)&&oe()};return Le.createElement(Le.Fragment,null,be?Le.createElement("div",null,Le.createElement("div",{className:"preview-wrp-group",ref:we},Le.createElement(Ie.Z,{className:"image-preview",src:be,style:{display:"none"},preview:{visible:!0,src:be,onVisibleChange:Ne=>{Pe("")}},alt:"\u9884\u89C8\u5927\u56FE"}))):null)}},97692:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{h:function(){return ye}});var Le=Ee(59301),me=Ee(57809),Ie=Ee(78241),Te=Ee(3113),be=Ee(89780),Pe=Ee.n(be),he=Ee(37036),Se=Ee(95625),xe=Object.defineProperty,ge=Object.defineProperties,ce=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,de=Object.prototype.hasOwnProperty,ue=Object.prototype.propertyIsEnumerable,z=(we,Ce,ke)=>Ce in we?xe(we,Ce,{enumerable:!0,configurable:!0,writable:!0,value:ke}):we[Ce]=ke,ee=(we,Ce)=>{for(var ke in Ce||(Ce={}))de.call(Ce,ke)&&z(we,ke,Ce[ke]);if(ve)for(var ke of ve(Ce))ue.call(Ce,ke)&&z(we,ke,Ce[ke]);return we},oe=(we,Ce)=>ge(we,ce(Ce));const ie=me.default.Option,se={labelCol:{span:4},wrapperCol:{span:20}},le={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"]};Yt.Z=({callback:we,onCancel:Ce})=>{const[ke,Ne]=(0,Le.useState)("python");function je(Qe){Ne(le[Qe][1])}function Ve(Qe){we(Qe)}return Le.createElement(Ie.default,oe(ee({},se),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ve,style:{width:500}}),Le.createElement(Ie.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},Le.createElement(me.default,{getPopupContainer:Qe=>Qe.parentNode,onChange:je},Object.keys(le).map(Qe=>Le.createElement(ie,{key:Qe,value:Qe},le[Qe][0])))),Le.createElement(Ie.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},Le.createElement(ye,{mode:ke})),Le.createElement("div",{className:"flex-container flex-end"},Le.createElement(Te.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Le.createElement(Te.ZP,{type:"ghost",onClick:Ce},"\u53D6\u6D88")))};function ye({value:we,onChange:Ce,mode:ke,options:Ne={}}){const je=(0,Le.useRef)(),[Ve,Qe]=(0,Le.useState)();return(0,Le.useEffect)(()=>{if(Ve){let Ge=function(mt){const ct=mt.getValue();Ce&&Ce(ct)};return Ve.on("change",Ge),()=>{Ve.off("change",Ge)}}},[Ve,Ce]),(0,Le.useEffect)(()=>{Ve&&Ve.setOption("mode",ke)},[Ve,ke]),(0,Le.useEffect)(()=>{Ve&&(we!==Ve.getValue()||we==="")&&setTimeout(()=>{Ve.setValue(we||"")},300)},[Ve,we]),(0,Le.useEffect)(()=>{if(je.current&&!Ve){const Ge=Pe().fromTextArea(je.current,ee({mode:ke,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Ne));Qe(Ge)}},[je.current,Ve]),Le.createElement("div",{className:"my-codemirror-container"},Le.createElement("textarea",{ref:je}))}},12290:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Xn}});var Le=Ee(59301),me=Ee(89780),Ie=Ee.n(me),Te=Ee(76374),be=Ee(37036),Pe=Ee(6313),he=Ee(25717),Se=Ee(99498),xe=Ee(25419),ge=Ee(67549),ce=Ee(85149),ve=({value:$e="",className:nt,showTextOnly:Je,showLines:wt,style:Nt={}})=>{const kt=(0,Le.useMemo)(()=>"",[$e]);return Le.createElement(Le.Fragment,null,Le.createElement("div",{dangerouslySetInnerHTML:{__html:kt}}))},de=Ee(59301),ue=Object.defineProperty,z=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,le=($e,nt,Je)=>nt in $e?ue($e,nt,{enumerable:!0,configurable:!0,writable:!0,value:Je}):$e[nt]=Je,ye=($e,nt)=>{for(var Je in nt||(nt={}))ie.call(nt,Je)&&le($e,Je,nt[Je]);if(oe)for(var Je of oe(nt))se.call(nt,Je)&&le($e,Je,nt[Je]);return $e},we=($e,nt)=>z($e,ee(nt));let Ce=[{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 ke({onActionCallback:$e,title:nt,icon:Je,actionName:wt,className:Nt="",children:kt}){function Et(){$e(wt)}return de.createElement("a",{title:nt,className:Nt,onClick:Et},de.createElement("i",{className:`${Je}`}),kt)}var Ne=({watch:$e,showNullButton:nt,showNullProgramButton:Je,onActionCallback:wt,fullScreen:Nt,insertTemp:kt,hidetoolBar:Et,extraUse:cn})=>{const bn=[...Ce,{title:`${$e?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${$e?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return de.createElement("ul",{className:"markdown-toolbar-container"},!Et&&bn.map((dn,rn)=>de.createElement("li",{key:rn},dn.actionName?de.createElement(ke,we(ye({},dn),{onActionCallback:wt})):de.createElement("span",{className:"v-line"}))),nt?de.createElement("li",null,de.createElement(ke,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:wt},de.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Je?de.createElement(de.Fragment,null,de.createElement("li",null,de.createElement(ke,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:wt},de.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),de.createElement("li",null,de.createElement(ke,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:wt},de.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,kt&&de.createElement("li",null,de.createElement(ke,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${kt}`,onActionCallback:wt},de.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),cn&&de.createElement("li",null,cn),de.createElement("li",{className:"btn-full-screen"},de.createElement(ke,{icon:`${Nt?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Nt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:wt})))},je=Ee(79346),Ve=Ee(78241),Qe=Ee(92832),Ge=Ee(3113),mt=Object.defineProperty,ct=Object.defineProperties,Ct=Object.getOwnPropertyDescriptors,it=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,ut=Object.prototype.propertyIsEnumerable,Ft=($e,nt,Je)=>nt in $e?mt($e,nt,{enumerable:!0,configurable:!0,writable:!0,value:Je}):$e[nt]=Je,ht=($e,nt)=>{for(var Je in nt||(nt={}))St.call(nt,Je)&&Ft($e,Je,nt[Je]);if(it)for(var Je of it(nt))ut.call(nt,Je)&&Ft($e,Je,nt[Je]);return $e},rt=($e,nt)=>ct($e,Ct(nt));const dt={labelCol:{span:4},wrapperCol:{span:20}};var yt=({callback:$e,onCancel:nt})=>{function Je(wt){$e(wt)}return Le.createElement(Ve.default,rt(ht({},dt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Je,style:{width:500}}),Le.createElement(Ve.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},Le.createElement(Qe.default,null)),Le.createElement(Ve.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},Le.createElement(Qe.default,null)),Le.createElement("div",{className:"flex-container flex-end"},Le.createElement(Ge.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Le.createElement(Ge.ZP,{type:"ghost",onClick:nt},"\u53D6\u6D88")))},_t=Ee(97692),vt=Ee(28451),Bt=Ee(43418),jt=Ee(95237),un=Ee(73524),Kt=Ee(59301),xn=({callback:$e,onCancel:nt})=>{const Je=document.createElement("canvas"),wt=Je.getContext("2d");Je.width=1e3,Je.height=800,wt.fillStyle="#ffffff",wt.fillRect(0,0,Je.width,Je.height);const Nt=Je.toDataURL("image/png");return Kt.createElement(Bt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Kt.createElement(jt.Z,{style:{height:"100vh"}},Kt.createElement(un.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Nt,visible:!0,title:String(Date.now())},onOk:kt=>{$e({src:kt.url})},onClose:nt})))},Ut=Ee(12378);function Wt(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(Wt,go.CommandHandler),Wt.prototype.canAlignSelection=function(){var $e=this.diagram;return!($e===null||$e.isReadOnly||$e.isModelReadOnly||$e.selection.count<2)},Wt.prototype.alignLeft=function(){var $e=this.diagram;$e.startTransaction("aligning left");var nt=1/0;$e.selection.each(function(Je){Je instanceof go.Link||(nt=Math.min(Je.position.x,nt))}),$e.selection.each(function(Je){Je instanceof go.Link||Je.move(new go.Point(nt,Je.position.y))}),$e.commitTransaction("aligning left")},Wt.prototype.alignRight=function(){var $e=this.diagram;$e.startTransaction("aligning right");var nt=-1/0;$e.selection.each(function(Je){if(!(Je instanceof go.Link)){var wt=Je.actualBounds.x+Je.actualBounds.width;nt=Math.max(wt,nt)}}),$e.selection.each(function(Je){Je instanceof go.Link||Je.move(new go.Point(nt-Je.actualBounds.width,Je.position.y))}),$e.commitTransaction("aligning right")},Wt.prototype.alignTop=function(){var $e=this.diagram;$e.startTransaction("alignTop");var nt=1/0;$e.selection.each(function(Je){Je instanceof go.Link||(nt=Math.min(Je.position.y,nt))}),$e.selection.each(function(Je){Je instanceof go.Link||Je.move(new go.Point(Je.position.x,nt))}),$e.commitTransaction("alignTop")},Wt.prototype.alignBottom=function(){var $e=this.diagram;$e.startTransaction("aligning bottom");var nt=-1/0;$e.selection.each(function(Je){if(!(Je instanceof go.Link)){var wt=Je.actualBounds.y+Je.actualBounds.height;nt=Math.max(wt,nt)}}),$e.selection.each(function(Je){Je instanceof go.Link||Je.move(new go.Point(Je.actualBounds.x,nt-Je.actualBounds.height))}),$e.commitTransaction("aligning bottom")},Wt.prototype.alignCenterX=function(){var $e=this.diagram,nt=$e.selection.first();if(nt){$e.startTransaction("aligning Center X");var Je=nt.actualBounds.x+nt.actualBounds.width/2;$e.selection.each(function(wt){wt instanceof go.Link||wt.move(new go.Point(Je-wt.actualBounds.width/2,wt.actualBounds.y))}),$e.commitTransaction("aligning Center X")}},Wt.prototype.alignCenterY=function(){var $e=this.diagram,nt=$e.selection.first();if(nt){$e.startTransaction("aligning Center Y");var Je=nt.actualBounds.y+nt.actualBounds.height/2;$e.selection.each(function(wt){wt instanceof go.Link||wt.move(new go.Point(wt.actualBounds.x,Je-wt.actualBounds.height/2))}),$e.commitTransaction("aligning Center Y")}},Wt.prototype.alignColumn=function($e){var nt=this.diagram;nt.startTransaction("align Column"),$e===void 0&&($e=0),$e=parseFloat($e);var Je=new Array;nt.selection.each(function(cn){cn instanceof go.Link||Je.push(cn)});for(var wt=0;wt<Je.length-1;wt++){var Nt=Je[wt],kt=Nt.actualBounds.y+Nt.actualBounds.height+$e,Et=Je[wt+1];Et.move(new go.Point(Nt.actualBounds.x,kt))}nt.commitTransaction("align Column")},Wt.prototype.alignRow=function($e){$e===void 0&&($e=0),$e=parseFloat($e);var nt=this.diagram;nt.startTransaction("align Row");var Je=new Array;nt.selection.each(function(cn){cn instanceof go.Link||Je.push(cn)});for(var wt=0;wt<Je.length-1;wt++){var Nt=Je[wt],kt=Nt.actualBounds.x+Nt.actualBounds.width+$e,Et=Je[wt+1];Et.move(new go.Point(kt,Nt.actualBounds.y))}nt.commitTransaction("align Row")},Wt.prototype.canRotate=function($e){var nt=this.diagram;return!(nt===null||nt.isReadOnly||nt.isModelReadOnly||nt.selection.count<1)},Wt.prototype.rotate=function($e){$e===void 0&&($e=90);var nt=this.diagram;nt.startTransaction("rotate "+$e.toString());var nt=this.diagram;nt.selection.each(function(Je){Je instanceof go.Link||Je instanceof go.Group||(Je.angle+=$e)}),nt.commitTransaction("rotate "+$e.toString())},Wt.prototype.pullToFront=function(){var $e=this.diagram;$e.startTransaction("pullToFront");var nt=new go.Map;$e.selection.each(function(Je){nt.set(Je.layer,0)}),nt.iteratorKeys.each(function(Je){var wt=0;Je.parts.each(function(Nt){if(!Nt.isSelected){var kt=Nt.zOrder;isNaN(kt)?Nt.zOrder=0:wt=Math.max(wt,kt)}}),nt.set(Je,wt)}),$e.selection.each(function(Je){Wt._assignZOrder(Je,nt.get(Je.layer)+1)}),$e.commitTransaction("pullToFront")},Wt.prototype.pushToBack=function(){var $e=this.diagram;$e.startTransaction("pushToBack");var nt=new go.Map;$e.selection.each(function(Je){nt.set(Je.layer,0)}),nt.iteratorKeys.each(function(Je){var wt=0;Je.parts.each(function(Nt){if(!Nt.isSelected){var kt=Nt.zOrder;isNaN(kt)?Nt.zOrder=0:wt=Math.min(wt,kt)}}),nt.set(Je,wt)}),$e.selection.each(function(Je){Wt._assignZOrder(Je,nt.get(Je.layer)-1-Wt._findGroupDepth(Je))}),$e.commitTransaction("pushToBack")},Wt._assignZOrder=function($e,nt,Je){Je===void 0&&(Je=$e),$e.layer===Je.layer&&($e.zOrder=nt),$e instanceof go.Group&&$e.memberParts.each(function(wt){Wt._assignZOrder(wt,nt+1,Je)})},Wt._findGroupDepth=function($e){if($e instanceof go.Group){var nt=0;return $e.memberParts.each(function(Je){nt=Math.max(nt,Wt._findGroupDepth(Je))}),nt+1}else return 0},Wt.prototype.doKeyDown=function(){var $e=this.diagram;if($e!==null){var nt=$e.lastInput;if(nt.key==="Up"||nt.key==="Down"||nt.key==="Left"||nt.key==="Right"){var Je=this.arrowKeyBehavior;if(Je==="none")return;if(Je==="select"){this._arrowKeySelect();return}else if(Je==="move"){this._arrowKeyMove();return}else if(Je==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},Wt.prototype._getAllParts=function(){var $e=new Array;return this.diagram.nodes.each(function(nt){$e.push(nt)}),this.diagram.parts.each(function(nt){$e.push(nt)}),$e},Wt.prototype._arrowKeyMove=function(){var $e=this.diagram,nt=$e.lastInput,Je=0,wt=0;if(nt.control||nt.meta)Je=1,wt=1;else if($e.grid!==null){var Nt=$e.grid.gridCellSize;wt=Nt.width,Je=Nt.height}$e.startTransaction("arrowKeyMove"),$e.selection.each(function(kt){nt.key==="Up"?kt.move(new go.Point(kt.actualBounds.x,kt.actualBounds.y-Je)):nt.key==="Down"?kt.move(new go.Point(kt.actualBounds.x,kt.actualBounds.y+Je)):nt.key==="Left"?kt.move(new go.Point(kt.actualBounds.x-wt,kt.actualBounds.y)):nt.key==="Right"&&kt.move(new go.Point(kt.actualBounds.x+wt,kt.actualBounds.y))}),$e.commitTransaction("arrowKeyMove")},Wt.prototype._arrowKeySelect=function(){var $e=this.diagram,nt=$e.lastInput,Je=null;nt.key==="Up"?Je=this._findNearestPartTowards(270):nt.key==="Down"?Je=this._findNearestPartTowards(90):nt.key==="Left"?Je=this._findNearestPartTowards(180):nt.key==="Right"&&(Je=this._findNearestPartTowards(0)),Je!==null&&(nt.shift?Je.isSelected=!0:nt.control||nt.meta?Je.isSelected=!Je.isSelected:$e.select(Je))},Wt.prototype._findNearestPartTowards=function($e){var nt=this.diagram.selection.first();if(nt===null)return null;for(var Je=nt.actualBounds.center,wt=this._getAllParts(),Nt=1/0,kt=nt,Et=0;Et<wt.length;Et++){var cn=wt[Et];if(cn!==nt&&cn.canSelect()){var bn=cn.actualBounds.center,dn=Je.directionPoint(bn),rn=this._angleCloseness(dn,$e);if(rn<=45){var At=Je.distanceSquaredPoint(bn);At*=1+Math.sin(rn*Math.PI/180),At<Nt&&(Nt=At,kt=cn)}}}return kt},Wt.prototype._angleCloseness=function($e,nt){return Math.min(Math.abs(nt-$e),Math.min(Math.abs(nt+360-$e),Math.abs(nt-360-$e)))},Wt.prototype._arrowKeyTree=function(){var $e=this.diagram,nt=$e.selection.first();if(nt instanceof go.Node){var Je=$e.lastInput;if(Je.key==="Right"){if(!nt.isTreeLeaf)if(!nt.isTreeExpanded)$e.commandHandler.canExpandTree(nt)&&$e.commandHandler.expandTree(nt);else{var wt=this._sortTreeChildrenByY(nt).first();wt!==null&&$e.select(wt)}}else if(Je.key==="Left")if(!nt.isTreeLeaf&&nt.isTreeExpanded)$e.commandHandler.canCollapseTree(nt)&&$e.commandHandler.collapseTree(nt);else{var Nt=nt.findTreeParentNode();Nt!==null&&$e.select(Nt)}else if(Je.key==="Up"){var Nt=nt.findTreeParentNode();if(Nt!==null){var kt=this._sortTreeChildrenByY(Nt),Et=kt.indexOf(nt);if(Et>0){for(var cn=kt.elt(Et-1);cn!==null&&cn.isTreeExpanded&&!cn.isTreeLeaf;){var bn=this._sortTreeChildrenByY(cn);cn=bn.last()}cn!==null&&$e.select(cn)}else $e.select(Nt)}}else if(Je.key==="Down")if(nt.isTreeExpanded&&!nt.isTreeLeaf){var wt=this._sortTreeChildrenByY(nt).first();wt!==null&&$e.select(wt)}else for(;nt!==null;){var Nt=nt.findTreeParentNode();if(Nt===null)break;var kt=this._sortTreeChildrenByY(Nt),Et=kt.indexOf(nt);if(Et<kt.length-1){$e.select(kt.elt(Et+1));break}else nt=Nt}var dn=$e.selection.first();dn!==null&&$e.scrollToRect(dn.actualBounds)}},Wt.prototype._sortTreeChildrenByY=function($e){var nt=new go.List().addAll($e.findTreeChildrenNodes());return nt.sort(function(Je,wt){var Nt=Je.location,kt=wt.location;return Nt.y<kt.y?-1:Nt.y>kt.y?1:Nt.x<kt.x?-1:Nt.x>kt.x?1:0}),nt},Wt.prototype.copyToClipboard=function($e){go.CommandHandler.prototype.copyToClipboard.call(this,$e),this._lastPasteOffset.set(this.pasteOffset)},Wt.prototype.pasteFromClipboard=function(){var $e=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts($e,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),$e},Object.defineProperty(Wt.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function($e){if($e!=="move"&&$e!=="select"&&$e!=="scroll"&&$e!=="tree"&&$e!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+$e);this._arrowKeyBehavior=$e}}),Object.defineProperty(Wt.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function($e){if(!($e instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+$e);this._pasteOffset.set($e)}});var $t=Wt,ft=Ee(74413),We=Ee(43604),Be=Ee(99064),qe={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},et=Ee(24065),He=Ee(59301),Xe=($e,nt,Je)=>new Promise((wt,Nt)=>{var kt=bn=>{try{cn(Je.next(bn))}catch(dn){Nt(dn)}},Et=bn=>{try{cn(Je.throw(bn))}catch(dn){Nt(dn)}},cn=bn=>bn.done?wt(bn.value):Promise.resolve(bn.value).then(kt,Et);cn((Je=Je.apply($e,nt)).next())});function Re({onCancel:$e,callback:nt}){let Je=(0,Le.useRef)(),wt=(0,Le.useRef)(),Nt=(0,Le.useRef)(),kt=(0,Le.useRef)(!1);const Et=(0,Le.useRef)(!1),[cn,bn]=(0,Le.useState)(0);function dn(){const At=Ut.bx.make,an={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"};Je.current=new Ut.S0(wt.current,{padding:20,grid:At(Ut.s_,"Grid",At(Ut.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),At(Ut.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Jn=>{var ui=Jn.diagram.commandHandler.addTopLevelParts(Jn.diagram.selection,!0);ui||Jn.diagram.currentTool.doCancel()},commandHandler:At($t),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Jn=>{var ui=Jn.subject;ui.location=ui.location.copy().snapToGridPoint(Jn.diagram.grid.gridOrigin,Jn.diagram.grid.gridCellSize),setTimeout(()=>{Jn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Jn=>{var ui=Jn.subject;setTimeout(()=>{Jn.diagram.commandHandler.editTextBlock()})},LinkRelinked:Jn=>{var ui=Jn.parameter.part;ui.invalidateConnectedLinks();var yi=Jn.subject;Jn.diagram.toolManager.linkingTool.isForwards?yi.toNode.invalidateConnectedLinks():yi.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Je.current.nodeTemplate=At(Ut.NB,"Auto",{locationSpot:Ut.z6.Center,locationObjectName:"SHAPE",desiredSize:new Ut.$u(120,60),minSize:new Ut.$u(40,40),resizable:!0,resizeCellSize:new Ut.$u(10,10),rotatable:!0},new Ut.KX("location","loc",Ut.E9.parse).makeTwoWay(Ut.E9.stringify),new Ut.KX("desiredSize","size",Ut.$u.parse).makeTwoWay(Ut.$u.stringify),At(Ut.bn,{name:"SHAPE",fill:an.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Ut.z6.AllSides,toSpot:Ut.z6.AllSides},new Ut.KX("figure"),new Ut.KX("fill"),new Ut.KX("stroke","borderColor"),new Ut.KX("strokeWidth","thickness"),new Ut.KX("strokeDashArray","dash")),At(Ut.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),At(Ut.al,{margin:1,textAlign:"center",overflow:Ut.al.OverflowEllipsis,editable:!0},new Ut.KX("text").makeTwoWay(),new Ut.KX("stroke","color"))),Je.current.nodeTemplate.toolTip=At("ToolTip",At(Ut.s_,"Vertical",{maxSize:new Ut.$u(200,NaN)},At(Ut.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Ut.KX("text")),At(Ut.al,{font:"10pt sans-serif",textAlign:"center"},new Ut.KX("text","details"))));function En(Jn,ui){var yi=(di,Ei)=>{di.handled=!0,di.diagram.model.commit(Qi=>{var Fi=Ei.part.adornedPart,zi=new Ut.E9().setRectSpot(Fi.actualBounds,Jn);zi.subtract(Fi.location),zi.scale(2,2),zi.x+=Math.sign(zi.x)*130,zi.y+=Math.sign(zi.y)*130,zi.add(Fi.location),zi.snapToGridPoint(di.diagram.grid.gridOrigin,di.diagram.grid.gridCellSize);var fr=Qi.copyNodeData(Fi.data);Qi.setGroupKeyForNodeData(fr,Qi.getGroupKeyForNodeData(Fi.data)),Qi.addNodeData(fr);var Bn={from:Fi.key,to:Qi.getKeyForNodeData(fr)};Qi.addLinkData(Bn);var Br=di.diagram.findNodeForData(fr);Br.location=zi,di.diagram.select(Br),setTimeout(()=>{di.diagram.commandHandler.editTextBlock()},20)})};return At(Ut.bn,{figure:ui,alignment:Jn,alignmentFocus:Jn.opposite(),width:Jn.equals(Ut.z6.Top)||Jn.equals(Ut.z6.Bottom)?25:18,height:Jn.equals(Ut.z6.Top)||Jn.equals(Ut.z6.Bottom)?18:25,fill:"orange",stroke:an.white,strokeWidth:4,mouseEnter:(di,Ei)=>Ei.fill="dodgerblue",mouseLeave:(di,Ei)=>Ei.fill="orange",isActionable:!0,click:yi,contextClick:yi})}function Dn(Jn){return At(Ut.bn,{fill:"orange",stroke:"rgba(0, 0, 0, 0)",strokeWidth:15,background:"transparent",geometryString:"F1 M0 0 b 0 360 -4 0 4 z M10 0 b 0 360 -4 0 4 z M20 0 b 0 360 -4 0 4",isActionable:!0,cursor:"context-menu",mouseEnter:(ui,yi)=>yi.fill="dodgerblue",mouseLeave:(ui,yi)=>yi.fill="orange",click:(ui,yi)=>{ui.diagram.commandHandler.showContextMenu(yi.part.adornedPart)}},Jn||{})}Je.current.nodeTemplate.selectionAdornmentTemplate=At(Ut.uz,"Spot",At(Ut.Vm,{padding:10}),En(Ut.z6.Top,"TriangleUp"),En(Ut.z6.Left,"TriangleLeft"),En(Ut.z6.Right,"TriangleRight"),En(Ut.z6.Bottom,"TriangleDown"),Dn({alignment:new Ut.z6(.75,0)}));function qt(Jn,ui){return(yi,di)=>{yi.handled=!0,yi.diagram.model.commit(Ei=>{Ei.set(di.part.adornedPart.data,Jn,ui)})}}function on(Jn,ui){return ui||(ui="color"),At(Ut.bn,{width:16,height:16,stroke:"lightgray",fill:Jn,margin:1,background:"transparent",mouseEnter:(yi,di)=>di.stroke="dodgerblue",mouseLeave:(yi,di)=>di.stroke="lightgray",click:qt(ui,Jn),contextClick:qt(ui,Jn)})}function Nn(){return[At("ContextMenuButton",At(Ut.s_,"Horizontal",on(an.white,"fill"),on(an.beige,"fill"),on(an.extralightblue,"fill"),on(an.extralightred,"fill"))),At("ContextMenuButton",At(Ut.s_,"Horizontal",on(an.lightgray,"fill"),on(an.lightgreen,"fill"),on(an.lightblue,"fill"),on(an.lightred,"fill")))]}function On(){return[At("ContextMenuButton",At(Ut.s_,"Horizontal",on(an.black),on(an.green),on(an.blue),on(an.red))),At("ContextMenuButton",At(Ut.s_,"Horizontal",on(an.white),on(an.magenta),on(an.purple),on(an.orange)))]}function qn(Jn,ui){return ui||(ui="thickness"),At(Ut.bn,"LineH",{width:16,height:16,strokeWidth:Jn,margin:1,background:"transparent",mouseEnter:(yi,di)=>di.background="dodgerblue",mouseLeave:(yi,di)=>di.background="transparent",click:qt(ui,Jn),contextClick:qt(ui,Jn)})}function Hn(Jn,ui){return ui||(ui="dash"),At(Ut.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Jn,margin:1,background:"transparent",mouseEnter:(yi,di)=>di.background="dodgerblue",mouseLeave:(yi,di)=>di.background="transparent",click:qt(ui,Jn),contextClick:qt(ui,Jn)})}function ei(){return[At("ContextMenuButton",At(Ut.s_,"Horizontal",qn(1),qn(2),qn(3),qn(4))),At("ContextMenuButton",At(Ut.s_,"Horizontal",Hn(null),Hn([2,4]),Hn([4,4])))]}function Fn(Jn,ui){return ui||(ui="figure"),At(Ut.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Jn,margin:1,background:"transparent",mouseEnter:(yi,di)=>di.fill="dodgerblue",mouseLeave:(yi,di)=>di.fill="lightgray",click:qt(ui,Jn),contextClick:qt(ui,Jn)})}Je.current.nodeTemplate.contextMenu=At("ContextMenu",At("ContextMenuButton",At(Ut.s_,"Horizontal",Fn("Rectangle"),Fn("RoundedRectangle"),Fn("Ellipse"),Fn("Diamond"))),At("ContextMenuButton",At(Ut.s_,"Horizontal",Fn("Parallelogram2"),Fn("ManualOperation"),Fn("Procedure"),Fn("Cylinder1"))),At("ContextMenuButton",At(Ut.s_,"Horizontal",Fn("Terminator"),Fn("CreateRequest"),Fn("Document"),Fn("TriangleDown"))),Nn(),On(),ei()),Je.current.groupTemplate=At(Ut.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Ut.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Jn,ui)=>{var yi=ui.addMembers(ui.diagram.selection,!0);yi||ui.diagram.currentTool.doCancel()},avoidable:!1},new Ut.KX("location","loc",Ut.E9.parse).makeTwoWay(Ut.E9.stringify),At(Ut.s_,"Auto",{name:"BODY"},At(Ut.bn,{parameter1:10,fill:an.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Ut.z6.AllSides,toSpot:Ut.z6.AllSides},new Ut.KX("fill"),new Ut.KX("stroke","color"),new Ut.KX("strokeWidth","thickness"),new Ut.KX("strokeDashArray","dash")),At(Ut.Vm,{background:"transparent",margin:20})),At(Ut.al,{alignment:Ut.z6.Top,alignmentFocus:Ut.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new Ut.KX("text"),new Ut.KX("stroke","color"))),Je.current.groupTemplate.selectionAdornmentTemplate=At(Ut.uz,"Spot",At(Ut.s_,"Auto",At(Ut.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),At(Ut.Vm,{margin:1.5})),Dn({alignment:Ut.z6.TopRight,alignmentFocus:Ut.z6.BottomRight})),Je.current.groupTemplate.contextMenu=At("ContextMenu",Nn(),On(),ei()),Je.current.linkTemplate=At(Ut.rU,{layerName:"Foreground",routing:Ut.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new Ut.KX("fromSpot","fromSpot",Ut.z6.parse),new Ut.KX("toSpot","toSpot",Ut.z6.parse),new Ut.KX("fromShortLength","dir",Jn=>Jn>=1?10:0),new Ut.KX("toShortLength","dir",Jn=>Jn>=1?10:0),new Ut.KX("points").makeTwoWay(),At(Ut.bn,{strokeWidth:2},new Ut.KX("stroke","color"),new Ut.KX("strokeWidth","thickness"),new Ut.KX("strokeDashArray","dash")),At(Ut.bn,{segmentIndex:0,segmentOffset:new Ut.E9(15,0),segmentOrientation:Ut.rU.OrientAlong,alignmentFocus:Ut.z6.Right,figure:"circle",width:10,strokeWidth:0},new Ut.KX("fill","color"),new Ut.KX("visible","dir",Jn=>Jn===1)),At(Ut.bn,{segmentIndex:-1,segmentOffset:new Ut.E9(-10,6),segmentOrientation:Ut.rU.OrientPlus90,alignmentFocus:Ut.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Ut.KX("fill","color"),new Ut.KX("visible","dir",Jn=>Jn>=1),new Ut.KX("width","thickness",Jn=>7+3*Jn),new Ut.KX("height","thickness",Jn=>7+3*Jn),new Ut.KX("segmentOffset","thickness",Jn=>new Ut.E9(-15,4+1.5*Jn))),At(Ut.bn,{segmentIndex:0,segmentOffset:new Ut.E9(15,-6),segmentOrientation:Ut.rU.OrientMinus90,alignmentFocus:Ut.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Ut.KX("fill","color"),new Ut.KX("visible","dir",Jn=>Jn===2),new Ut.KX("width","thickness",Jn=>7+3*Jn),new Ut.KX("height","thickness",Jn=>7+3*Jn),new Ut.KX("segmentOffset","thickness",Jn=>new Ut.E9(-15,4+1.5*Jn))),At(Ut.al,{alignmentFocus:new Ut.z6(0,1,-4,0),editable:!0},new Ut.KX("text").makeTwoWay(),new Ut.KX("stroke","color"))),Je.current.linkTemplate.selectionAdornmentTemplate=At(Ut.uz,At(Ut.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:hi(2)},new Ut.KX("pathPattern","thickness",hi)),Dn({alignmentFocus:new Ut.z6(0,0,-6,-4)}));function hi(Jn){return At(Ut.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Jn+4).toString()+" H3"})}function Ii(Jn){var ui="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Jn===0?ui="M0 0 M16 16 M0 8 L16 8":Jn===2&&(ui="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),At(Ut.bn,{geometryString:ui,margin:2,background:"transparent",mouseEnter:(yi,di)=>di.background="dodgerblue",mouseLeave:(yi,di)=>di.background="transparent",click:qt("dir",Jn),contextClick:qt("dir",Jn)})}function Ri(Jn){var ui=(yi,di)=>{yi.handled=!0,yi.diagram.model.commit(Ei=>{var Qi=di.part.adornedPart;Ei.set(Qi.data,Jn?"toSpot":"fromSpot",Ut.z6.stringify(Ut.z6.AllSides)),(Jn?Qi.toNode:Qi.fromNode).invalidateConnectedLinks()})};return At(Ut.bn,{width:12,height:12,fill:"transparent",mouseEnter:(yi,di)=>di.background="dodgerblue",mouseLeave:(yi,di)=>di.background="transparent",click:ui,contextClick:ui})}function Pn(Jn,ui){var yi=0,di=Ut.z6.RightSide;Jn.equals(Ut.z6.Top)?(yi=270,di=Ut.z6.TopSide):Jn.equals(Ut.z6.Left)?(yi=180,di=Ut.z6.LeftSide):Jn.equals(Ut.z6.Bottom)&&(yi=90,di=Ut.z6.BottomSide),ui||(yi-=180);var Ei=(Qi,Fi)=>{Qi.handled=!0,Qi.diagram.model.commit(zi=>{var fr=Fi.part.adornedPart;zi.set(fr.data,ui?"toSpot":"fromSpot",Ut.z6.stringify(di)),(ui?fr.toNode:fr.fromNode).invalidateConnectedLinks()})};return At(Ut.bn,{alignment:Jn,alignmentFocus:Jn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:yi,background:"transparent",mouseEnter:(Qi,Fi)=>Fi.background="dodgerblue",mouseLeave:(Qi,Fi)=>Fi.background="transparent",click:Ei,contextClick:Ei})}Je.current.linkTemplate.contextMenu=At("ContextMenu",On(),ei(),At("ContextMenuButton",At(Ut.s_,"Horizontal",Ii(0),Ii(1),Ii(2))),At("ContextMenuButton",At(Ut.s_,"Horizontal",At(Ut.s_,"Spot",Ri(!1),Pn(Ut.z6.Top,!1),Pn(Ut.z6.Left,!1),Pn(Ut.z6.Right,!1),Pn(Ut.z6.Bottom,!1)),At(Ut.s_,"Spot",{margin:new Ut.Zt(0,0,0,2)},Ri(!0),Pn(Ut.z6.Top,!0),Pn(Ut.z6.Left,!0),Pn(Ut.z6.Right,!0),Pn(Ut.z6.Bottom,!0)))));const Vi=`{ "class": "GraphLinksModel",
|
|
|
"nodeDataArray": [
|
|
|
{"text":"Find Problem","key":-9,"loc":"-20 -140","color":"#3358ff","fill":"white","figure":"Procedure","thickness":3},
|
|
|
{"text":"What do we want?","key":-10,"loc":"-65 -324.305","group":-16,"figure":"Ellipse","fill":"white"},
|
|
|
{"text":"What do our users want?","key":-11,"loc":"105 -334.305","group":-20,"figure":"Ellipse","fill":"#ffffff","color":"black"},
|
|
|
{"text":"Meetings","key":-12,"loc":"-65 -444.305","group":-16,"figure":"TriangleDown","fill":"#ffffff"},
|
|
|
{"text":"Reviews","key":-13,"loc":"105 -454.305","group":-20,"figure":"TriangleDown","fill":"#ffffff","color":"black"},
|
|
|
{"text":"Can we solve it?","key":-14,"loc":"190 -140","color":"#7d33ff","fill":"#ffffff","figure":"Diamond","size":"140 80","thickness":3},
|
|
|
{"isGroup":true,"text":"Internal","key":-16,"loc":"-65 -384.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22},
|
|
|
{"isGroup":true,"text":"External","key":-20,"loc":"105 -394.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22},
|
|
|
{"isGroup":true,"text":"Sources","key":-22,"loc":"20 -400","fill":"#a5d2fa","dash":[4,4],"color":"#3358ff"}
|
|
|
],
|
|
|
"linkDataArray": [
|
|
|
{"from":-12,"to":-10,"points":[-65,-414.305,-65,-404.305,-65,-384.305,-65,-384.305,-65,-364.305,-65,-354.305],"dash":null,"dir":1},
|
|
|
{"from":-13,"to":-11,"points":[105,-424.305,105,-414.305,105,-394.305,105,-394.305,105,-374.305,105,-364.305],"dash":null,"color":"#000000","dir":1},
|
|
|
{"from":-10,"to":-9,"points":[-65,-294.305,-65,-284.305,-65,-232.1525,-40,-232.1525,-40,-180,-40,-170],"dir":2,"dash":[4,4]},
|
|
|
{"from":-11,"to":-9,"points":[105,-304.305,105,-294.305,105,-237.1525,0,-237.1525,0,-180,0,-170],"dash":[4,4],"dir":2},
|
|
|
{"from":-9,"to":-14,"points":[40,-150,58,-150,80,-150,80,-153.33333333333331,102,-153.33333333333331,120,-153.33333333333331],"dir":1,"color":"#3358ff"},
|
|
|
{"from":-14,"to":-9,"points":[190,-100,190,-90,-20,-90,-20,-95,-20,-100,-20,-110],"fromSpot":"BottomSide","toSpot":"BottomSide","text":"No","color":"#ff3333","thickness":2,"dir":1},
|
|
|
{"from":-9,"to":-14,"points":[40,-130,58,-130,80,-130,80,-126.66666666666666,102,-126.66666666666666,120,-126.66666666666666]}
|
|
|
]}`;var Cr=["Rectangle","Square","RoundedRectangle","Border","Ellipse","Circle","TriangleRight","TriangleDown","TriangleLeft","TriangleUp","Triangle","Diamond","LineH","LineV","None","BarH","BarV","MinusLine","PlusLine","XLine","LineRight","LineDown","LineLeft","LineUp"];function mr(Jn){return console.log("shapeName:",Jn),Cr.indexOf(Jn)>=0}var _n=new Ut.YI(Nt.current,{maxSelectionCount:1,linkTemplate:At(Ut.rU,{locationSpot:Ut.z6.Center,selectionAdornmentTemplate:At(Ut.uz,"Link",{locationSpot:Ut.z6.Center},At(Ut.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),At(Ut.bn,{toArrow:"Standard",stroke:null}))},{routing:Ut.rU.AvoidsNodes,curve:Ut.rU.JumpOver,corner:5,toShortLength:4},new Ut.KX("points"),At(Ut.bn,{isPanelMain:!0,strokeWidth:2}),At(Ut.bn,{toArrow:"Standard",stroke:null})),model:new Ut.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...Ut.bn.getFigureGenerators().toArray().map(Jn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Jn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Je.current.addDiagramListener("TextEdited",function(Jn){var ui;const yi=Jn.subject.part;var di=(ui=document.activeElement)==null?void 0:ui.value;typeof di=="string"&&di.trim()===""&&Je.current.model.commit(function(Ei){Ei.set(yi.data,"text","\u672A\u547D\u540D"),Je.current.commandHandler.stopCommand()},"increment")}),_n.nodeTemplate=At(Ut.NB,"Auto",{locationSpot:Ut.z6.Center},new Ut.KX("location","location",Ut.E9.parse).makeTwoWay(Ut.E9.stringify),At(Ut.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 Ut.KX("stroke").makeTwoWay(),new Ut.KX("fill").makeTwoWay(),new Ut.KX("figure")),At(Ut.al,{margin:new Ut.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new Ut.$u(16,16),maxSize:new Ut.$u(10,NaN),textAlign:"center",editable:!0},new Ut.KX("key").makeTwoWay())),setTimeout(()=>{Je.current.grid=At(Ut.s_,"Grid",At(Ut.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),At(Ut.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Je.current.grid.visible=!0,Je.current.grid.gridCellStroke="darkgray",Je.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Je.current,Je.current}const rn=()=>Xe(this,null,function*(){var At,an=Je.current.makeImage();const En=yield(0,Be.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:an.src,file_data:JSON.stringify({login:(At=(0,et.eY)())==null?void 0:At.login,data:JSON.parse(Je.current.model.toJson())})}});nt({src:En.url})});return(0,Le.useEffect)(()=>(setTimeout(()=>{dn()},500),bn(cn+1),()=>{Je.current=null}),[]),He.createElement("div",{ref:Et,className:kt.current?`${qe.maxH60} body-overflow-initial`:"body-overflow-initial"},He.createElement(Bt.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!cn,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:He.createElement(jt.Z,null,He.createElement(We.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),He.createElement(We.Z,{onClick:()=>{var At,an,En=Je.current.selection.first();if(kt.current=!kt.current,document.activeElement&&En){let Dn=(an=(At=document.activeElement)==null?void 0:At.value)==null?void 0:an.trim();typeof Dn=="string"&&Je.current.model.commit(function(qt){qt.set(En.data,"text",Dn||"\u672A\u547D\u540D"),Je.current.commandHandler.stopCommand()},"increment")}bn(cn+1)}},He.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:$e},He.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:qe.flowChartWrp},He.createElement("div",{style:{display:"flex",height:"100%"}},He.createElement("div",{style:{width:"300px",height:"100%"}},He.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),He.createElement("div",{style:{height:"calc(100% - 50px)"},className:qe.myPaletteDiv,ref:Nt})),He.createElement("div",{style:{flex:1,position:"relative"}},He.createElement("div",{ref:wt,style:{height:"80vh"}}))),He.createElement("div",{className:"tr"},He.createElement(Ge.ZP,{size:"large",onClick:rn,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Ae=Re,Ue=Ee(5112),Ke=Ee(5871);const Ze=Ue.ZP.Group,lt={margin:"0 8px"};var xt=({callback:$e,onCancel:nt})=>{function Je(wt){$e(wt)}return Le.createElement(Ve.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Je},Le.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},Le.createElement("span",{style:lt},"\u5355\u5143\u683C\u6570\uFF1A"),Le.createElement("span",{style:lt},"\u884C\u6570"),Le.createElement(Ve.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},Le.createElement(Ke.Z,null)),Le.createElement("span",{style:lt},"\u5217\u6570"),Le.createElement(Ve.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},Le.createElement(Ke.Z,null))),Le.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},Le.createElement("span",{style:lt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),Le.createElement(Ve.default.Item,{name:"align"},Le.createElement(Ze,null,Le.createElement(Ue.ZP,{value:"default"},Le.createElement("i",{className:"fa fa-align-justify"})),Le.createElement(Ue.ZP,{value:"left"},Le.createElement("i",{className:"fa fa-align-left"})),Le.createElement(Ue.ZP,{value:"center"},Le.createElement("i",{className:"fa fa-align-center"})),Le.createElement(Ue.ZP,{value:"right"},Le.createElement("i",{className:"fa fa-align-right"}))))),Le.createElement("div",{className:"flex-container flex-end"},Le.createElement(Ge.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Le.createElement(Ge.ZP,{type:"ghost",onClick:nt},"\u53D6\u6D88")))},tn=Ee(78673),en=Ee(80727),Jt=Ee.n(en),Mn=(0,Le.forwardRef)(({use3d:$e,width:nt,height:Je,callback:wt,showSaveButton:Nt},kt)=>{const Et=(0,Le.useRef)(),cn=(0,Le.useRef)(),[bn,dn]=(0,Le.useState)(!1),rn=(0,Le.useRef)({id:Et,appName:"graphing",width:nt||1e3,height:Je||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,Le.useEffect)(()=>{cn.current=new(Jt())(rn.current,!0),window.onload=function(){cn.current.inject("applet_container")}},[]);const At=()=>{var an=window.ggbApplet.getPNGBase64(1,!0,72);return wt&&wt(an),an};return(0,Le.useEffect)(()=>{rn.current.appName=bn?"3D":"graphing",cn.current.inject("applet_container")},[bn]),(0,Le.useEffect)(()=>{dn($e)},[$e]),(0,Le.useImperativeHandle)(kt,()=>({getImgData:At})),Le.createElement(Le.Fragment,null,Le.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Et}),Le.createElement(jt.Z,{align:"middle"},Le.createElement(We.Z,{flex:1},Le.createElement(tn.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:bn,onChange:an=>dn(an)})),Le.createElement(We.Z,null,Le.createElement(Ge.ZP,{size:"large",onClick:At,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),yn=Ee(41588),kn=Ee(8591);const $n="link",An="upload-image",oi="add-flowchart",ai="draw-image",Di="add-flowchart",Pi="code-block",Xi="add-table",or="------------",ar={default:or,left:`:${or}`,center:`:${or}:`,right:`${or}:`};var dr=Ee(58856);function no(){}let Ir=0;const xi=1e4,wr="\u2581",Mr="@\u2581\u2581@",ot="@\u2581@",Rr=`
|
|
|
**\u6A21\u677F\u6807\u9898**
|
|
|
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`,Nr=["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($e){return/^\d+$/.test($e)?`${$e}px`:$e}const po=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",io={[po+"-B"]:"bold",[po+"-I"]:"italic"},Do={[$n]:"\u6DFB\u52A0\u94FE\u63A5",[Pi]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[An]:"\u6DFB\u52A0\u56FE\u7247",[ai]:"\u6DFB\u52A0\u753B\u56FE",[oi]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Xi]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Xn=({defaultValue:$e="",onChange:nt,width:Je="100%",height:wt=400,miniToolbar:Nt=!1,isFocus:kt=!1,watch:Et,insertTemp:cn,mode:bn="markdown",id:dn="markdown-editor-id",showResizeBar:rn=!1,noStorage:At=!1,showNullButton:an=!1,showNullProgramButton:En=!1,hidetoolBar:Dn=!1,fullScreen:qt=!1,onBlur:on,onCMBeforeChange:Nn,onFullScreen:On,className:qn="",disablePaste:Hn=!1,disabled:ei=!1,disabledFill:Fn=!1,placeholder:hi="",values:Ii="",extraUse:Ri})=>{const[Pn,Vi]=(0,Le.useState)(null),[Cr,mr]=(0,Le.useState)($e),[_n,Jn]=(0,Le.useState)(Et),[ui,yi]=(0,Le.useState)(qt),[di,Ei]=(0,Le.useState)(""),[Qi,Fi]=(0,Le.useState)(0),[zi,fr]=(0,Le.useState)(wt),[Bn,Br]=(0,Le.useState)(!1),[In,pr]=(0,Le.useState)(0),[yo,Or]=(0,Le.useState)(0),bo=(0,Le.useRef)(),co=(0,Le.useRef)(),Ki=(0,Le.useRef)(),Hi=(0,Le.useRef)();(0,Le.useEffect)(()=>{const nr=window.scrollY||window.pageYOffset;mr(Ii),Pn==null||Pn.setValue(Ii),window.scrollTo(0,nr)},[Ii]),(0,Le.useEffect)(()=>{On==null||On(ui)},[ui]),(0,Le.useEffect)(()=>{if(bo.current){let nr=function(Qn,ir){var eo;if(Hn){ir.preventDefault();return}const Ro=ir.clipboardData;if(Ro){const Bo=Ro.types.toString(),Xo=Ro.items;if(Bo==="Files"||Ro.types.indexOf("Files")>-1){if(ir.preventDefault(),bn=="stex")return;try{let as=Xo[1];((eo=Xo[0])==null?void 0:eo.kind)==="file"&&(as=Xo[0]);const Ho=as.getAsFile(),ia=Ho.name.split(".").pop();(0,vt.I)(Ho,_s=>{var la,Tn,Is;_s.id?((la=Ho==null?void 0:Ho.type)==null?void 0:la.indexOf("image"))>-1?Wi.replaceSelection(`<img width="100%" src="/api/attachments/${_s.id}?type=${_s.content_type})" alt="" />`):((Tn=Ho==null?void 0:Ho.type)==null?void 0:Tn.indexOf("video"))>-1?Wi.replaceSelection(`<video width="100%" controls src="/api/attachments/${_s.id}"></video>`):((Is=Ho==null?void 0:Ho.type)==null?void 0:Is.indexOf("pdf"))>-1?Wi.replaceSelection(`<a href="/api/attachments/${_s.id}?type=${Ho.type}&disposition=inline" target="_blank">${Ho.name}</a>`):Nr.includes(ia)?Wi.replaceSelection(`<a href="/api/attachments/${_s.id}?type=office&disposition=inline" target="_blank">${Ho.name}</a>`):Wi.replaceSelection(`[${Ho.name}](/api/attachments/${_s.id}?type=${_s.content_type})`):(_s==null?void 0:_s.status)===401&&(document.location.href="/user/login")})}catch(as){kn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Wi=Ie().fromTextArea(bo.current,{mode:bn,lineNumbers:!Nt,lineWrapping:!0,value:$e,autoCloseTags:!0,autoCloseBrackets:!0});return Wi.on("keyup",function(Qn,ir){ir.keyCode===8&&(Qn.getValue()==""?Wi.setOption("placeholder",hi):Wi.setOption("placeholder",null))}),Wi.on("keydown",function(Qn,ir){if(ir.keyCode===8){var eo=Pr(Qn);eo&&ir.preventDefault()}}),kt&&Wi.focus(),Wi.on("paste",nr),ei&&Wi.on("beforeChange",function(Qn,ir){(ir.origin==="paste"||ir.origin==="+input")&&ir.cancel()}),Vi(Wi),()=>{Wi.off("paste",nr)}}},[]);const lr=(0,Le.useCallback)(()=>{if(co.current)try{}catch(nr){console.log(nr,"---- to set md editor body height")}},[zi,co,ui]);(0,Le.useEffect)(()=>{function nr(){let Wi=new Te.Z(Qn=>{for(let ir of Qn)(ir.target.offsetHeight>0||ir.target.offsetWidth>0)&&(lr(),Pn.setSize("100%","100%"),Pn.refresh())});return Wi.observe(bo.current.parentElement),Wi}if(Pn){const Wi=nr();return()=>{var Qn,ir;(Qn=bo.current)!=null&&Qn.parentElement&&Wi.unobserve((ir=bo.current)==null?void 0:ir.parentElement)}}},[Pn,lr]),(0,Le.useEffect)(()=>{if(Pn){let nr=[];for(const[Wi,Qn]of Object.entries(io)){let ir={[Wi]:()=>{ci(Qn)}};nr.push(ir),Pn.addKeyMap(ir)}return()=>{for(let Wi of nr)Pn.removeKeyMap(Wi)}}},[Pn]),(0,Le.useEffect)(()=>{qt!==ui&&yi(qt)},[qt]),(0,dr.Z)(()=>{if(!At&&Qi>0){let nr=new Date().getTime(),Wi=window.sessionStorage.getItem(dn);nr>=Qi+xi&&(!Wi||Wi!==Cr)&&(window.sessionStorage.setItem(dn,Cr),Br(!0))}},xi),(0,Le.useEffect)(()=>{Jn(Et)},[Pn,Et]),(0,Le.useEffect)(()=>{Pn&&kt&&Pn.focus()},[Pn,kt]),(0,Le.useEffect)(()=>{if(_n&&Pn){let nr=function(Qn){let ir=Qn.target;if(Hi.current){let eo=ir.scrollTop/ir.scrollHeight;Hi.current.scrollTop=Hi.current.scrollHeight*eo}};const Wi=Pn.getScrollerElement();return Wi.addEventListener("scroll",nr),()=>{Wi.removeEventListener("scroll",nr)}}},[Pn,_n]),(0,Le.useEffect)(()=>{if(Pn&&Nn){let nr=function(Wi,Qn){Nn(Wi,Qn)};return Pn.on("beforeChange",nr),()=>{Pn.off("beforeChange",nr)}}},[Pn,Nn]),(0,Le.useEffect)(()=>{if(Pn&&on){let nr=function(){on(Pn.getValue())};return Pn.on("blur",nr),()=>{Pn.off("blur",nr)}}},[Pn,on]);function Pr(nr,Wi){var Qn=nr.getDoc(),ir=Qn.getCursor(),eo=Qn.getLine(ir.line),Ro=eo.charAt(ir.ch-1),Bo=eo.lastIndexOf("@\u2581@",ir.ch),Xo=eo.lastIndexOf("@\u2581\u2581@",ir.ch),as=Bo>Xo?Bo:Xo,Ho=Bo>Xo?3:4;if(Mr.indexOf(Ro)===-1)return null;if(console.log("change1:",Wi,nr,eo,ir,as,Bo,Xo,Ro),as>=0&&ir.ch-as<5){var ia=as+Ho;return Qn.replaceRange("",{line:ir.line,ch:as},{line:ir.line,ch:ia}),{line:ir.line,ch:ia}}return null}(0,Le.useEffect)(()=>{if(Pn){let nr=function(Wi,Qn){const ir=Wi.getValue();mr(ir),Fi(new Date().getTime()),Wi.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),nt&&(En?nt(ir,ur(ir)):nt(ir))};return Pn.on("change",nr),()=>{Pn.off("change",nr)}}},[Pn,nt]),(0,Le.useEffect)(()=>{if(Pn)if($e==null)Pn.setValue(""),mr("");else{const nr=window.scrollY||window.pageYOffset;$e!==Pn.getValue()&&(Pn.setValue($e),mr($e),Pn.setCursor(ei?1:Pn.lineCount(),0),window.scrollTo(0,nr))}},[Pn,$e]);const ci=(0,Le.useCallback)(nr=>{const Wi=Pn.getCursor(),Qn=Pn.getSelection();let ir=Qn.split(`
|
|
|
`);switch(nr){case"bold":return Pn.replaceSelection("**"+Qn+"**"),Qn===""&&Pn.setCursor(Wi.line,Wi.ch+2),Pn.focus();case"italic":return Pn.replaceSelection("*"+Qn+"*"),Qn===""&&Pn.setCursor(Wi.line,Wi.ch+1),Pn.focus();case"code":return Pn.replaceSelection("`"+Qn+"`"),Qn===""&&Pn.setCursor(Wi.line,Wi.ch+1),Pn.focus();case"inline-latex":return Ei("inline-latex"),Pn.focus();case"latex":return Pn.replaceSelection("```latex\n"+Qn+"\n```"),Pn.setCursor(Wi.line+1,Qn.length+1),Pn.focus();case"line-break":return Pn.replaceSelection(`<br/>
|
|
|
`),Pn.focus();case"list-ul":return Qn===""?Pn.replaceSelection("- "+Qn):Pn.replaceSelection(ir.map(eo=>eo===""?"":`- ${eo}`).join(`
|
|
|
`)),Pn.focus();case"list-ol":return Qn===""?Pn.replaceSelection("1. "+Qn):Pn.replaceSelection(ir.map((eo,Ro)=>eo===""?"":`${Ro+1}. ${eo}`).join(`
|
|
|
`)),Pn.focus();case"add-null-ch":return Qn===""&&Pn.setCursor(Wi.line,Wi.ch),Pn.replaceSelection(wr),Pn.focus();case"add-signal":return Qn===""&&Pn.setCursor(Wi.line,Wi.ch),Pn.replaceSelection(ot),Pn.focus();case"add-multiple":return Qn===""&&Pn.setCursor(Wi.line,Wi.ch),Pn.replaceSelection(Mr),Pn.focus();case"inster-template-1":return Qn===""&&Pn.setCursor(Wi.line,Wi.ch),Pn.replaceSelection(Rr),Pn.focus();case"eraser":return Pn.setValue(""),Pn.focus();case"trigger-watch":return Jn(!_n),Pn.focus();case"trigger-full-screen":return yi(!ui),Pn.focus();case $n:Ei($n);return;case Pi:Ei(Pi);return;case An:Ei(An);return;case ai:Ei(ai);return;case"maths-latex":Ei("maths-latex");return;case oi:Ei(oi);return;case Xi:Ei(Xi);return;default:throw new Error}},[Pn,_n,ui]),Tt=(0,Le.useCallback)((nr,Wi)=>{var Qn,ir,eo,Ro,Bo,Xo;switch(Ei(""),di){case $n:const{title:la,link:Tn}=nr;return Pn.replaceSelection(`[${la}](${Tn})`),Pn.focus();case Pi:const{language:Is,content:Pu}=nr;return Pn.replaceSelection(["```"+Is,Pu,"```"].join(`
|
|
|
`)),Pn.focus();case"maths-latex":for(var as=atob(nr),Ho=new Uint8Array(as.length),ia=0;ia<as.length;ia++)Ho[ia]=as.charCodeAt(ia);var _s=new Blob([Ho],{type:"image/png"});(0,vt.I)(_s,xr=>{xr.id?Pn.replaceSelection(``):(xr==null?void 0:xr.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Pn.replaceSelection("`$$"+nr+"$$`");break;case An:case ai:case Di:const{src:Ua,alt:Sa}=nr,us=Wi,Ws=(eo=(ir=(Qn=us==null?void 0:us.name)==null?void 0:Qn.split("."))==null?void 0:ir.pop)==null?void 0:eo.call(ir);return((Ro=us==null?void 0:us.type)==null?void 0:Ro.indexOf("image"))>-1||!(us!=null&&us.type)?us!=null&&us.align||us!=null&&us.width?Pn.replaceSelection(`<p style="text-align:${us.align||"initial"}"><img width="${us.width?us.width+"%":"initial"}" src="${Ua}" alt="${Sa||""}" /></p>`):Pn.replaceSelection(`<img width="100%" src="${Ua}" alt="${Sa||""}" />`):((Bo=us==null?void 0:us.type)==null?void 0:Bo.indexOf("video"))>-1?Pn.replaceSelection(`<video width="100%" controls src="${Ua}"></video>`):((Xo=us==null?void 0:us.type)==null?void 0:Xo.indexOf("pdf"))>-1?Pn.replaceSelection(`<a href="${Ua}?type=${us.type}&disposition=inline" target="_blank">${us.name}</a>`):Nr.includes(Ws)?Pn.replaceSelection(`<a href="${Ua}?type=office&disposition=inline" target="_blank">${us.name}</a>`):Pn.replaceSelection(`[${us.name}](${Ua})`),Pn.focus();case Xi:const{row:Po,col:Ao,align:Eo}=nr;let ua=`
|
|
|
`;for(let xr=0;xr<Po;xr++){let lo=[],$r=[];for(let Mi=0;Mi<Ao;Mi++)xr===1&&$r.push(ar[Eo]),lo.push(" ");xr===1&&(ua+=`| ${$r.join(" | ")} |
|
|
|
`),ua+=`| ${lo.join(Ao===1?"":" | ")} |
|
|
|
`}return Pn.replaceSelection(ua+`
|
|
|
`),Pn.focus();default:throw new Error}},[Pn,di]),Ur=(0,Le.useMemo)(()=>{switch(di){case $n:return Le.createElement(yt,{callback:Tt,onCancel:zr});case Pi:return Le.createElement(_t.Z,{callback:Tt,onCancel:zr});case An:return Le.createElement(vt.Z,{callback:Tt,onCancel:zr});case oi:return Le.createElement(Ae,{callback:Tt,onCancel:zr});case Xi:return Le.createElement(xt,{callback:Tt,onCancel:zr});case"maths-latex":return Le.createElement(Mn,{showSaveButton:!0,callback:Tt});case"inline-latex":return Le.createElement(yn.Z,{showSaveButton:!0,callback:Tt});default:return null}},[di]);function zr(){Ei("")}(0,Le.useEffect)(()=>{if(Ki.current){let nr=function(Bo){eo=!0,Ro=Bo.pageY},Wi=function(){eo=!1},Qn=function(Bo){if(eo){let Xo=Bo.pageY-Ro;Xo<0&&(Xo=0),Xo>300&&(Xo=300);let as=wt+Xo+"px";fr(as)}},ir=Ki.current,eo=!1,Ro=0;return ir.addEventListener("mousedown",nr),document.addEventListener("mousemove",Qn),document.addEventListener("mouseup",Wi),()=>{ir.removeEventListener("mousedown",nr),document.removeEventListener("mousemove",Qn),document.removeEventListener("mouseup",Wi)}}},[Pn,Ki]),(0,Le.useEffect)(()=>{fr(wt)},[wt]);const ts=Hr(Je),ko=Hr(zi),ss={width:ts,height:ko},_r=(0,Le.useMemo)(()=>{if(Qi){let nr=new Date(Qi),Wi=nr.getHours(),Qn=nr.getMinutes(),ir=nr.getSeconds();return Wi=Wi<10?"0"+Wi:Wi,Qn=Qn<10?"0"+Qn:Qn,ir=ir<10?"0"+ir:ir,`${Wi}:${Qn}:${ir}`}return 0},[Qi]),ur=nr=>{const Wi=[];if(En){let Qn=-1;nr=nr.replace(/(@▁▁@|@▁@)/g,function(ir,eo,Ro){Wi.push({multiLine:ir!==ot})})}return Wi};function Kr(){window.sessionStorage.removeItem(dn),Br(!1),Fi(0)}function cr(){Br(!1),Fi(0),Pn.setValue(window.sessionStorage.getItem(dn))}(0,Le.useEffect)(()=>{Do[di]&&di!==ai&&di!==oi&&setTimeout(()=>{const nr=document.getElementsByClassName("markdown-popup-form")[0],Wi=window.innerWidth/2-nr.offsetWidth/2,Qn=window.innerHeight/2-nr.offsetHeight/2;pr(Wi),Or(Qn)},0)},[di]);const qr=nr=>{nr.preventDefault();const Wi=nr.clientX-In,Qn=nr.clientY-yo;document.body.onmousemove=ir=>{let eo=ir.clientX-Wi,Ro=ir.clientY-Qn;const Bo=document.getElementsByClassName("markdown-popup-form")[0],Xo=window.innerWidth-Bo.offsetWidth,as=window.innerHeight-Bo.offsetHeight;eo=Math.max(0,Math.min(eo,Xo)),Ro=Math.max(0,Math.min(Ro,as)),Yo(ir.clientX,ir.clientY,Wi,Qn)&&(pr(eo),Or(Ro))},document.body.onmouseup=function(){document.body.onmousemove=null}},Yo=(nr,Wi,Qn,ir)=>{const eo=document.body.clientHeight,Ro=document.body.clientWidth;return nr<20&&Qn>nr||nr>Ro-20&&Qn<nr||Wi<20&&ir>Wi||Wi>eo-20&&ir<Wi?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return Le.createElement(Le.Fragment,null,Le.createElement("div",{className:"markdown-editor-wrapper",ref:co},Le.createElement("div",{className:`markdown-editor-container ${qn} ${_n?"on-preview":""} ${Nt?"mini":""} ${ui?"full-screen":""}`,style:ss},Le.createElement(Ne,{insertTemp:cn,watch:_n,fullScreen:ui,showNullButton:an,showNullProgramButton:En,onActionCallback:ci,hidetoolBar:Dn,extraUse:Ri}),Le.createElement("div",{className:"markdown-editor-body"},Le.createElement("div",{className:"codemirror-container"},Le.createElement("textarea",{ref:bo,placeholder:hi})),_n?Le.createElement("div",{ref:Hi,className:"preview-container"},bn==="stex"&&Le.createElement(ve,{value:Cr}),bn!=="stex"&&Le.createElement(ce.Z,{disabledFill:Fn,showProgramFill:En,value:Cr})):null))),rn?Le.createElement("a",{ref:Ki,className:"editor-resize"}):null,di===ai&&Le.createElement(xn,{callback:Tt,onCancel:zr}),di===oi&&Le.createElement(Ae,{callback:Tt,onCancel:zr}),Le.createElement(je.Z,null,Do[di]&&di!==ai&&di!==oi?Le.createElement(Bt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:In,top:yo},title:Le.createElement("div",{style:{cursor:"move"},onMouseDown:qr},Do[di]),open:!0,onCancel:zr,footer:null,destroyOnClose:!0,width:di===oi?"1200px":null,height:di===oi?"80vh":null,className:"markdown-popup-form"},Ur):null))}},28451:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Ce},I:function(){return Ne}});var Le=Ee(78241),me=Ee(8591),Ie=Ee(92832),Te=Ee(81327),be=Ee(5871),Pe=Ee(5112),he=Ee(3113),Se=Ee(77903),xe=Ee(59301),ge=Ee(59301),ce=Object.defineProperty,ve=Object.defineProperties,de=Object.getOwnPropertyDescriptors,ue=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,oe=(je,Ve,Qe)=>Ve in je?ce(je,Ve,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):je[Ve]=Qe,ie=(je,Ve)=>{for(var Qe in Ve||(Ve={}))z.call(Ve,Qe)&&oe(je,Qe,Ve[Qe]);if(ue)for(var Qe of ue(Ve))ee.call(Ve,Qe)&&oe(je,Qe,Ve[Qe]);return je},se=(je,Ve)=>ve(je,de(Ve));const{useForm:le}=Le.default,ye={width:280,marginRight:10},we={labelCol:{span:5},wrapperCol:{span:19}};var Ce=({callback:je,onCancel:Ve})=>{const[Qe]=le();let Ge=(0,xe.useRef)();function mt(it){Ge.current.width=Qe.getFieldValue("width"),Ge.current.align=Qe.getFieldValue("align"),je(it,Ge.current)}function ct(it,St){if(it.status===-1){me.ZP.error(it.message);return}Qe.setFieldsValue({src:`/api/attachments/${it.id}`,type:St.type})}function Ct(it){let St=it.target.files[0];Ge.current=St,Ne(St,ct)}return ge.createElement(Le.default,se(ie({form:Qe},we),{className:"upload-image-panel",onFinish:mt,style:{width:470,overflow:"hidden"}}),ge.createElement(Le.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},ge.createElement("div",{className:"flex-container"},ge.createElement(Le.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},ge.createElement(Ie.default,{style:ye})),ge.createElement(ke,{onFileChange:Ct}))),ge.createElement(Le.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},ge.createElement(Ie.default,{style:{width:264}})),ge.createElement(Le.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},ge.createElement(Te.Z,null,ge.createElement(Le.default.Item,{name:"width",style:{margin:0}},ge.createElement(be.Z,{style:{width:264}})),ge.createElement("span",{className:"ml8"},"%"))),ge.createElement(Le.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},ge.createElement(Pe.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),ge.createElement("aside",null,ge.createElement(Le.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},ge.createElement(he.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ge.createElement(he.ZP,{type:"default",onClick:Ve},"\u53D6\u6D88"))))};function ke({onFileChange:je}){return ge.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",ge.createElement("input",{type:"file",onChange:je}))}function Ne(je,Ve){if(!je)throw new String("\u6CA1\u6709\u6587\u4EF6");let Qe=new FormData;Qe.append("editormd-image-file",je),Qe.append("file_param_name","editormd-image-file"),Qe.append("byxhr","true");var Ge=new window.XMLHttpRequest;Ge.withCredentials=!0,Ge.addEventListener("load",function(mt){Ve(JSON.parse(mt.target.responseText),je)},!1),Ge.addEventListener("error",function(mt){console.error(mt)},!1),Ge.open("POST",`${Se.KI}/api/attachments.json`),Ge.send(Qe)}},79346:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Ie}});var Le=Ee(59301),me=Ee(4676);class Ie extends Le.Component{constructor(be){super(be);const Pe=window.document;this.node=Pe.createElement("div"),Pe.body.appendChild(this.node)}render(){const{children:be}=this.props;return(0,me.createPortal)(be,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},23954:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{SV:function(){return Xe},ZP:function(){return He}});var Le=Ee(59301),me=Ee(76374);const Ie={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"]},Te={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"]},be={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
|
`)}]},Pe={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
|
`)}]},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(53184),xe=Ee.n(Se),ge=Object.defineProperty,ce=Object.defineProperties,ve=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,ee=(Re,Ae,Ue)=>Ae in Re?ge(Re,Ae,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):Re[Ae]=Ue,oe=(Re,Ae)=>{for(var Ue in Ae||(Ae={}))ue.call(Ae,Ue)&&ee(Re,Ue,Ae[Ue]);if(de)for(var Ue of de(Ae))z.call(Ae,Ue)&&ee(Re,Ue,Ae[Ue]);return Re},ie=(Re,Ae)=>ce(Re,ve(Ae)),se=(Re,Ae,Ue)=>new Promise((Ke,Ze)=>{var lt=en=>{try{tn(Ue.next(en))}catch(Jt){Ze(Jt)}},xt=en=>{try{tn(Ue.throw(en))}catch(Jt){Ze(Jt)}},tn=en=>en.done?Ke(en.value):Promise.resolve(en.value).then(lt,xt);tn((Ue=Ue.apply(Re,Ae)).next())});const le={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=(Re,Ae)=>Ae.map(Ue=>({label:Ue,kind:Re.languages.CompletionItemKind.Keyword,insertText:Ue})),we=Re=>Object.keys(le.tables).map(Ae=>({label:Ae,kind:Re.languages.CompletionItemKind.Variable,insertText:Ae})),Ce=(Re,Ae)=>{const Ue=le.tables[Re];return Ue?Ue.map(Ke=>({label:Ke,kind:Ae.languages.CompletionItemKind.Field,insertText:Ke})):[]};function ke(Re,Ae,Ue,Ke,Ze){let lt=Ae.getWordUntilPosition(Ue),xt={startLineNumber:Ue.lineNumber,endLineNumber:Ue.lineNumber,startColumn:lt.startColumn,endColumn:lt.endColumn},tn=Ke.map(en=>({label:en,kind:Re.languages.CompletionItemKind.Keyword,insertText:en,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:xt}));return Ze.map(en=>{tn.push(ie(oe({},en),{range:xt}))}),tn}var Ne=Re=>{le.languages.map(Ze=>(Re.languages.registerDocumentFormattingEditProvider(Ze,{provideDocumentFormattingEdits(lt,xt,tn){return se(this,null,function*(){const en=xe()(lt.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:lt.getFullModelRange(),text:en}]})}}),Ze));const Ae=be.quickKey.map(Ze=>({label:Ze.label,kind:Re.languages.CompletionItemKind.Method,insertText:Ze.content,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Ue=Pe.quickKey.map(Ze=>({label:Ze.label,kind:Re.languages.CompletionItemKind.Method,insertText:Ze.content,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Ke=Te.quickKey.map(Ze=>({label:Ze.label,kind:Re.languages.CompletionItemKind.Method,insertText:Ze.content,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet}));Re.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Ze,lt){var xt=Ze.getWordUntilPosition(lt),tn={startLineNumber:lt.lineNumber,endLineNumber:lt.lineNumber,startColumn:xt.startColumn,endColumn:xt.endColumn},en=Ze.getLineContent(lt.lineNumber).substring(xt.startColumn-2,xt.endColumn);return{suggestions:[...be.keywords.map(Jt=>({label:Jt,kind:Re.languages.CompletionItemKind.Function,documentation:Jt,insertText:Jt,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn})),...be.quickKey.map(Jt=>({label:Jt.label,kind:Re.languages.CompletionItemKind.Function,documentation:Jt.content,insertText:en.startsWith("#")?Jt.content.replace(/#/,""):Jt.content,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn}))]}}}),Re.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Ze,lt){var xt=Ze.getWordUntilPosition(lt),tn={startLineNumber:lt.lineNumber,endLineNumber:lt.lineNumber,startColumn:xt.startColumn,endColumn:xt.endColumn};return{suggestions:[...Ie.keywords.map(en=>({label:en,kind:Re.languages.CompletionItemKind.Function,documentation:en,insertText:en,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn}))]}}}),Re.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Ze,lt){var xt=Ze.getWordUntilPosition(lt),tn={startLineNumber:lt.lineNumber,endLineNumber:lt.lineNumber,startColumn:xt.startColumn,endColumn:xt.endColumn},en=Ze.getLineContent(lt.lineNumber).substring(xt.startColumn-2,xt.endColumn);return{suggestions:[...Te.keywords.map(Jt=>({label:Jt,kind:Re.languages.CompletionItemKind.Function,documentation:Jt,insertText:Jt,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn})),...Te.quickKey.map(Jt=>({label:Jt.label,kind:Re.languages.CompletionItemKind.Function,documentation:Jt.content,insertText:en.startsWith("#")?Jt.content.replace(/#/,""):Jt.content,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn}))]}}}),Re.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Ze,lt){var xt=Ze.getWordUntilPosition(lt),tn={startLineNumber:lt.lineNumber,endLineNumber:lt.lineNumber,startColumn:xt.startColumn,endColumn:xt.endColumn},en=Ze.getLineContent(lt.lineNumber).substring(xt.startColumn-2,xt.endColumn);return{suggestions:[...he.keywords.map(Jt=>({label:Jt,kind:Re.languages.CompletionItemKind.Function,documentation:Jt,insertText:Jt,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn})),...he.quickKey.map(Jt=>({label:Jt.label,kind:Re.languages.CompletionItemKind.Function,documentation:Jt.content,insertText:en.startsWith("#")?Jt.content.replace(/#/,""):Jt.content,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn}))]}}}),Re.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Ze,lt){var xt=Ze.getWordUntilPosition(lt),tn={startLineNumber:lt.lineNumber,endLineNumber:lt.lineNumber,startColumn:xt.startColumn,endColumn:xt.endColumn},en=Ze.getLineContent(lt.lineNumber).substring(xt.startColumn-2,xt.endColumn);return{suggestions:[...Pe.keywords.map(Jt=>({label:Jt,kind:Re.languages.CompletionItemKind.Function,documentation:Jt,insertText:Jt,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn})),...Pe.quickKey.map(Jt=>({label:Jt.label,kind:Re.languages.CompletionItemKind.Function,documentation:Jt.content,insertText:en.startsWith("#")?Jt.content.replace(/#/,""):Jt.content,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn}))]}}})};const je="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Ve=Object.defineProperty,Qe=(Re,Ae,Ue)=>Ae in Re?Ve(Re,Ae,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):Re[Ae]=Ue,Ge=(Re,Ae,Ue)=>Qe(Re,typeof Ae!="symbol"?Ae+"":Ae,Ue);const mt=class mx{constructor(Ae,Ue,Ke){this.placeholder=Ae,this.editor=Ue,this.monaco=Ke,Ue.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(mt,"ID","editor.widget.placeholderHint");var Ct=mt,it=Ee(96236),St=Ee(8591),ut=Ee(6848),Ft=Ee(89392),ht=Ee(34604),rt=Ee(56102),dt=Object.defineProperty,yt=Object.defineProperties,_t=Object.getOwnPropertyDescriptors,vt=Object.getOwnPropertySymbols,Bt=Object.prototype.hasOwnProperty,jt=Object.prototype.propertyIsEnumerable,un=(Re,Ae,Ue)=>Ae in Re?dt(Re,Ae,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):Re[Ae]=Ue,Kt=(Re,Ae)=>{for(var Ue in Ae||(Ae={}))Bt.call(Ae,Ue)&&un(Re,Ue,Ae[Ue]);if(vt)for(var Ue of vt(Ae))jt.call(Ae,Ue)&&un(Re,Ue,Ae[Ue]);return Re},xn=(Re,Ae)=>yt(Re,_t(Ae)),Ut=(Re,Ae)=>{var Ue={};for(var Ke in Re)Bt.call(Re,Ke)&&Ae.indexOf(Ke)<0&&(Ue[Ke]=Re[Ke]);if(Re!=null&&vt)for(var Ke of vt(Re))Ae.indexOf(Ke)<0&&jt.call(Re,Ke)&&(Ue[Ke]=Re[Ke]);return Ue},Wt=(Re,Ae,Ue)=>new Promise((Ke,Ze)=>{var lt=en=>{try{tn(Ue.next(en))}catch(Jt){Ze(Jt)}},xt=en=>{try{tn(Ue.throw(en))}catch(Jt){Ze(Jt)}},tn=en=>en.done?Ke(en.value):Promise.resolve(en.value).then(lt,xt);tn((Ue=Ue.apply(Re,Ae)).next())});function $t(Re){return/^\d+$/.test(Re)?`${Re}px`:Re}function ft(){}let We=!1;const Be={"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 qe(Re=[]){let Ae=Re;if(Array.isArray(Re)){for(let Ue=0;Ue<Re.length;Ue++){let Ke=Be[Re[Ue]];if(Ke)return Ke}return Ae[0]}return Be[Ae]||Ae}let et=null;var He=Re=>{var Ae=Re,{width:Ue="100%",height:Ke="100%",value:Ze,language:lt="javascript",style:xt={},options:tn={},overrideServices:en={},theme:Jt="vs-dark",onEditBlur:gn,isCopy:Mn=!1,onSave:yn,autoHeight:kn=!1,forbidCopy:$n=!1,onChange:An=ft,editorDidMount:oi=ft,onFocus:ai=ft,onBreakPoint:Di=ft,breakPointValue:Pi=[],filename:Xi="educoder.txt",errorLine:or,errorContent:ar="",highlightLine:dr,openBreakPoint:no=!1,placeholder:Ir="",showMiniMap:xi=!0}=Ae,wr=Ut(Ae,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const Mr=(0,Le.useRef)(),ot=(0,Le.useRef)({}),Rr=(0,Le.useRef)(),Nr=(0,Le.useRef)(),Hr=(0,Le.useRef)([]),uo=(0,Le.useRef)(!1),po=(0,Le.useRef)(),io=(0,Le.useRef)(),Do=(0,Le.useRef)(!1),[Xn,$e]=(0,Le.useState)(!1);function nt(){let on;return Mr.current&&(on=new me.Z(Nn=>{for(let On of Nn)(On.target.offsetHeight>0||On.target.offsetWidth>0)&&ot.current.instance.layout()}),on.observe(Mr.current)),on}function Je(){St.ZP.warning({content:decodeURIComponent(je),key:"monaco-editor-tip"})}const wt=()=>{let on=ot.current.instance;if(Ze!=null&&on&&Xn){const Nn=on.getModel();Nn&&Ze!==Nn.getValue()&&(We=!0,Nn.setValue(Ze),on.layout(),We=!1)}};(0,Le.useEffect)(()=>{const on=ht.Z.subscribe("formatDocument",Nn=>{var On;let qn=ot.current.instance;(On=qn==null?void 0:qn.getAction)==null||On.call(qn,"editor.action.formatDocument").run()});return window.updateMonacoValue=Nn=>{An(Nn)},on},[]),(0,Le.useEffect)(()=>{var on;let Nn=ot.current.instance;Nr.current&&clearTimeout(Nr.current),Nr.current=setTimeout(()=>{wt()},500),Ze&&(Ze!=null&&Ze.length)&&((on=Nn==null?void 0:Nn.updateOptions)==null||on.call(Nn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ze.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ze,Xn,ot.current]),(0,Le.useEffect)(()=>{if(or&&ot.current&&ot.current.instance){let Nn=ot.current.instance;Nn.changeViewZones(function(On){var qn=document.createElement("div");qn.style.padding="10px 20px",qn.style.width="calc(100% - 20px)",qn.className="my-error-line-wrp",qn.innerHTML=ar,On.addZone({afterLineNumber:or||11,heightInLines:3,domNode:qn})});var on={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Nn.addOverlayWidget(on),Nn.revealPositionInCenter({lineNumber:20,column:1})}},[or,ot.current,Xn]);const Nt=(on="",Nn)=>{if(!on||on.trim()==="")return!0;const qn=ot.current.instance.getModel().getLineTokens(Nn);let Hn=!1;for(let ei=0;ei<2;ei++)qn.getStandardTokenType(ei)===1&&(Hn=!0);return Hn};(0,Le.useEffect)(()=>{var on;const Nn=(on=ot.current)==null?void 0:on.instance;if(Nn&&Xn&&$n){const On=Nn.onDidBlurEditorWidget(()=>{Do.current=!1}),qn=Nn.onDidFocusEditorText(()=>{Do.current=!0});return()=>{On.dispose(),qn.dispose()}}},[ot.current,Xn,$n]),(0,Le.useEffect)(()=>{var on;if((on=ot.current)!=null&&on.instance&&Xn&&no){let Nn=ot.current.instance,On=Nn.getModel();if(!On)return;(()=>{var _n;let Jn=[],ui=[];const yi=On.getAllDecorations();for(let Ei of yi)Ei.options.className==="highlighted-line"&&(Jn.push((_n=Ei==null?void 0:Ei.range)==null?void 0:_n.startLineNumber),ui.push(Ei==null?void 0:Ei.id));if(dr===Jn[0])return;On.deltaDecorations(ui,[]);const di=On.getLineCount();dr&&dr<=di&&(Nn.deltaDecorations([],[{range:new et.Range(dr,1,dr,On.getLineMaxColumn(dr)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Nn.revealLineInCenter(dr))})();const Hn=(_n=!1)=>{var Jn;let ui=[],yi=[];const di=On.getAllDecorations();for(let Ei of di)Ei.options.linesDecorationsClassName==="breakpoints-select"&&(ui.push((Jn=Ei==null?void 0:Ei.range)==null?void 0:Jn.startLineNumber),yi.push(Ei==null?void 0:Ei.id));if(_n)return{lines:ui,ids:yi};Di(ui)},ei=_n=>Wt(void 0,null,function*(){let Jn={range:new et.Range(_n,1,_n,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield On.deltaDecorations([],[Jn]),Hn()}),Fn=_n=>Wt(void 0,null,function*(){let Jn=[];const ui=Nn.getLineDecorations(_n);for(let yi of ui)yi.options.linesDecorationsClassName==="breakpoints-select"&&Jn.push(yi.id);yield On.deltaDecorations(Jn,[]),Hn()}),hi=_n=>{let Jn=Nn.getLineDecorations(_n);for(let ui of Jn)if(ui.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Ft.isEqual)(Pi,Hn(!0).lines)){On.deltaDecorations(Hn(!0).ids,[]);const _n=Pi.map(Jn=>({range:new et.Range(Jn,1,Jn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));On.deltaDecorations([],_n)}const Ii=Nn.onDidChangeModelContent(_n=>{let Jn=Nn.getPosition();if(Jn){let ui=Jn.lineNumber;clearTimeout(io.current),io.current=setTimeout(()=>{Nt(On.getLineContent(ui),ui)?Fn(ui):hi(ui)?(Fn(ui),ei(ui)):Hn()},100)}}),Ri=Nn.onMouseDown(_n=>{var Jn,ui,yi;if(_n.target.detail&&((yi=(ui=(Jn=_n.target)==null?void 0:Jn.element)==null?void 0:ui.className)!=null&&yi.includes("line-numbers"))){let di=_n.target.position.lineNumber;if(Nt(On.getLineContent(di),di))return;hi(di)?Fn(di):ei(di)}}),Pn=_n=>{let Jn={range:new et.Range(_n,1,_n,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Hr.current=Nn.deltaDecorations(Hr.current,[Jn])},Vi=()=>{Hr.current=Nn.deltaDecorations(Hr.current,[])},Cr=Nn.onMouseMove(_n=>{var Jn,ui,yi;if(Vi(),_n.target.detail&&((yi=(ui=(Jn=_n.target)==null?void 0:Jn.element)==null?void 0:ui.className)!=null&&yi.includes("line-numbers"))){let di=_n.target.position.lineNumber;if(Nt(On.getLineContent(di),di))return;Pn(di)}}),mr=Nn.onMouseLeave(()=>{Vi()});return()=>{Ii.dispose(),Ri.dispose(),Cr.dispose(),mr.dispose()}}},[ot.current,Xn,Pi,dr,no,lt]),(0,Le.useEffect)(()=>{var on;(on=ot.current)!=null&&on.instance&&no&&ot.current.instance.setPosition({lineNumber:0,column:0})},[dr]);function kt(){let on=ot.current.instance;if(on){const Nn=on.getSelection(),On=ot.current.pastePos||{},qn=new et.Range(On.startLineNumber||Nn.endLineNumber,On.startColumn||Nn.endColumn,On.endLineNumber||Nn.endLineNumber,On.endColumn||Nn.endColumn);setTimeout(()=>{on.executeEdits("",[{range:qn,text:""}])},300)}}function Et(on){(window.navigator.platform.match("Mac")?on.metaKey:on.ctrlKey)&&on.keyCode==83&&(on.preventDefault(),yn())}const cn=()=>{if(kn&&ot.current.instance){const on=ot.current.instance.getContentHeight();Dn(on<Ke?Ke:on)}else Dn(Ke)};function bn(on){var Nn=document.createEvent("MouseEvents");Nn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),on.dispatchEvent(Nn)}const dn=on=>{if(!Do.current)return;const{keyCode:Nn,ctrlKey:On,metaKey:qn,target:Hn,type:ei}=on;return(ei==="paste"||(Nn===67||Nn===86)&&(qn||On))&&Hn.nodeName==="TEXTAREA"&&(Je(),on.preventDefault()),!1};function rn(on,Nn){var On=window.URL||window.webkitURL||window,qn=new Blob([Nn]),Hn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Hn.href=On.createObjectURL(qn),Hn.download=on,bn(Hn)}(0,Le.useEffect)(()=>{cn()},[cn]),(0,Le.useEffect)(()=>{Mr.current&&!Xn&&Promise.all([Ee.e(8909),Ee.e(3267)]).then(Ee.bind(Ee,71448)).then(on=>{try{et=on,ot.current.instance=et.editor.create(Mr.current,{value:Ze,language:qe(lt),theme:Jt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:xi||!1}},en);const Nn=ot.current.instance;let Hn=[...it.BH._menuItems].find(Ii=>Ii[0]._debugName=="EditorContext")[1],ei=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Fn=(Ii,Ri)=>{var Pn,Vi;let Cr=Ii._first;do Ri.includes((Vi=(Pn=Cr.element)==null?void 0:Pn.command)==null?void 0:Vi.id)&&Ii._remove(Cr);while(Cr=Cr.next)};if(oi(Nn,et),setTimeout(()=>{cn(),ot.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{rn(Xi||"educoder.txt",Nn.getValue())}})},500),ot.current.subscription=Nn.onDidChangeModelContent(Ii=>{uo.current?clearTimeout(po.current):(cn(),An(Nn.getValue(),Ii)),po.current=setTimeout(()=>{uo.current=!1},500)}),window.Monaco||Ne(et,qe(lt)),$n&&(Fn(Hn,ei),Mr.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",dn),window.removeEventListener("paste",dn),window.addEventListener("keydown",dn),window.addEventListener("paste",dn)),window.Monaco=et,gn&&Nn.onDidBlurEditorWidget(()=>{gn(Nn.getValue())}),ai&&Nn.onDidFocusEditorText(()=>{ai(Nn.getValue())}),$n)try{Nn.onDidPaste(Ii=>{const Ri=Nn.getSelection(),Pn=ot.current.pastePos||{},Vi=new et.Range(Pn.startLineNumber||Ri.endLineNumber,Pn.startColumn||Ri.endColumn,Pn.endLineNumber||Ri.endLineNumber,Pn.endColumn||Ri.endColumn);Nn.executeEdits("",[{range:Ii.range,text:""}])})}catch(Ii){}let hi=nt();return Ir&&typeof Ir=="string"&&new Ct(Ir,Nn,et),$e(!0),()=>{const Ii=ot.current.instance;Ii.dispose();const Ri=Ii.getModel();Ri&&Ri.dispose(),ot.current.subscription&&ot.current.subscription.dispose(),hi.unobserve(Mr.current)}}catch(Nn){}})},[]),(0,Le.useEffect)(()=>{if(ot.current.instance&&Xn)return document.addEventListener("keydown",Et,!1),()=>{document.removeEventListener("keydown",Et)}},[yn,Xn]),(0,Le.useEffect)(()=>{let on=ot.current.instance;if(on&&Xn){let Nn=qe(lt);et.editor.setModelLanguage(on.getModel(),Nn)}},[lt,Xn]),(0,Le.useEffect)(()=>{ot.current.instance&&Xn&&et.editor.setTheme(Jt)},[Jt,Xn]),(0,Le.useEffect)(()=>{let on=ot.current.instance;Rr.current=tn,on&&Xn&&(on.updateOptions(Kt({},tn)),setTimeout(()=>{on.getModel().updateOptions(Kt({},tn))},200))},[JSON.stringify(tn),Xn]),(0,Le.useEffect)(()=>{let on=ot.current.instance;on&&Xn&&on.layout()},[Ue,Ke,Xn]);const[At,an]=(0,Le.useState)($t(Ue)),[En,Dn]=(0,Le.useState)($t(Ke)),qt=xn(Kt({},xt),{width:At,height:En,position:"relative"});return Le.createElement("div",{className:"my-monaco-editor",ref:Mr,style:qt},Mn&&Le.createElement(rt.CopyToClipboard,{text:Ze,onCopy:()=>St.ZP.success("\u590D\u5236\u6210\u529F")},Le.createElement(ut.Z,{title:"\u590D\u5236\u4EE3\u7801"},Le.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},Le.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Xe({width:Re="100%",height:Ae="100%",original:Ue,modified:Ke,language:Ze,options:lt={}}){const xt=(0,Le.useRef)(),[tn,en]=(0,Le.useState)(null);function Jt(kn){let $n;return xt.current&&($n=new me.Z(An=>{for(let oi of An)(oi.target.offsetHeight>0||oi.target.offsetWidth>0)&&kn.layout()}),$n.observe(xt.current)),$n}(0,Le.useEffect)(()=>(xt.current&&Promise.all([Ee.e(8909),Ee.e(9404)]).then(Ee.bind(Ee,2550)).then(kn=>{et=kn;const $n=et.editor.createDiffEditor(xt.current,xn(Kt({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},lt),{wordWrap:!0}));en($n);let An=Jt($n);return()=>{$n.dispose();const oi=$n.getModel();oi&&oi.dispose(),An.unobserve(xt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,Le.useEffect)(()=>{tn&&tn.setModel({original:et.editor.createModel(Ue,Ze),modified:et.editor.createModel(Ke,Ze)})},[Ue,Ke,Ze,tn]);const gn=$t(Re),Mn=$t(Ae),yn={width:gn,height:Mn};return Le.createElement("div",{className:"my-diff-editor",ref:xt,style:yn})}},16869:function(Cn,Yt,Ee){"use strict";var Le=Ee(38476),me=Ee(57809),Ie=Ee(78673),Te=Ee(59301);const be=me.default.Option;Yt.Z=({isTheoretical:Pe,onFontSizeChange:he,cmFontSize:Se,cmCodeMode:xe,autoFormat:ge,onCodeModeChange:ce,onTabToSpace:ve,onAutoFormat:de,formatDocument:ue,className:z="",tabToSpace:ee,children:oe,code_editor:ie,challenge:se})=>{const le={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"};return Te.createElement("div",{className:`tpi-code-setting ${z}`},Te.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),Te.createElement("section",null,Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),Te.createElement(me.default,{bordered:!1,size:"small",value:xe,onChange:ce},Te.createElement(be,{value:"vs"},"\u767D\u8272\u80CC\u666F"),Te.createElement(be,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),!Pe&&Te.createElement(Te.Fragment,null,Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),Te.createElement(me.default,{bordered:!1,size:"small",value:Se,onChange:he},Te.createElement(be,{value:12},"12px"),Te.createElement(be,{value:14},"14px"),Te.createElement(be,{value:16},"16px"),Te.createElement(be,{value:18},"18px"),Te.createElement(be,{value:20},"20px"),Te.createElement(be,{value:22},"22px"))),Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"Tab\u8F6C\u6362"),Te.createElement(Ie.Z,{checked:ee,onChange:ve})),Te.createElement("div",{className:"file-item",onClick:ue},Te.createElement("b",{style:{cursor:"pointer"}},"\u683C\u5F0F\u5316\u4EE3\u7801")))),!Pe&&Te.createElement(Te.Fragment,null,Te.createElement("h3",null,"\u5FEB\u6377\u952E"),Te.createElement("section",null,Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),Te.createElement("span",null,"Ctrl + S")),Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),Te.createElement("span",null,"F1 / Alt + F1")),Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),Te.createElement("span",null,"Ctrl + ]/[")),Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),Te.createElement("span",null,"Ctrl + Shift + \\")),Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),Te.createElement("span",null,"Home")),Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),Te.createElement("span",null,"End"))),oe),!Pe&&Te.createElement(Te.Fragment,null,Te.createElement("h3",null,"\u5FEB\u6377\u952E"),Te.createElement("section",null,Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),Te.createElement("span",null,le[se==null?void 0:se.difficulty])),Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),Te.createElement("span",null,ie==null?void 0:ie.name)),Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u5B9E\u9A8C\u5BB9\u5668\u7F51\u7EDC"),Te.createElement("span",null,ie!=null&&ie.close_internet?"\u5173\u95ED\u5916\u7F51":"\u5F00\u542F\u5916\u7F51")))))}},58856:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return me}});var Le=Ee(59301);function me(Ie,Te){const be=(0,Le.useRef)();(0,Le.useEffect)(()=>{be.current=Ie}),(0,Le.useEffect)(()=>{function Pe(){be.current()}if(Te!==null){let he=setInterval(Pe,Te);return()=>clearInterval(he)}},[Te])}},25555:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Im:function(){return Ve},ZP:function(){return it},gZ:function(){return ct}});var Le=Ee(59301),me=Ee(92832),Ie=Ee(3113),Te=Ee(84105),be=Ee(87395),Pe=Ee(35106),he=Ee(24334),Se=Ee(33538),xe=Ee(85149),ge=Ee(955),ce=Ee(13787),ve=Ee(34376),de=Ee(92310),ue=Ee.n(de),z=Ee(59301),ee=Object.defineProperty,oe=Object.defineProperties,ie=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,le=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable,we=(St,ut,Ft)=>ut in St?ee(St,ut,{enumerable:!0,configurable:!0,writable:!0,value:Ft}):St[ut]=Ft,Ce=(St,ut)=>{for(var Ft in ut||(ut={}))le.call(ut,Ft)&&we(St,Ft,ut[Ft]);if(se)for(var Ft of se(ut))ye.call(ut,Ft)&&we(St,Ft,ut[Ft]);return St},ke=(St,ut)=>oe(St,ie(ut));const{TextArea:Ne}=me.default,je={visible:!1,tabIndex:"0"},Ve={[Pe.h.HIDE_COMPILE_STATUS]:"\u6682\u4E0D\u652F\u6301\u67E5\u770B",[Pe.h.NOMATCH]:"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D",[Pe.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 Qe=(St=>(St[St.SET_VISIBLE=0]="SET_VISIBLE",St[St.SET_TABINDEX=1]="SET_TABINDEX",St))(Qe||{});function Ge(St,ut){switch(ut.type){case 0:return ke(Ce({},St),{visible:ut.payload});case 1:return ke(Ce({},St),{tabIndex:ut.payload});default:throw new Error}}function mt({value:St,className:ut}){const[Ft,ht]=(0,Le.useState)(!1),rt=(0,Le.useRef)(),dt=(0,Le.useRef)();return(0,Le.useEffect)(()=>{Ft&&(dt.current.reset(),dt.current.write((0,ge.pp)(St||"")))},[St,Ft]),(0,Le.useEffect)(()=>{var yt,_t,vt,Bt;if(rt.current){dt.current=new ve.Terminal({fontSize:14,disableStdin:!0}),dt.current.open(rt.current);const jt=rt.current.offsetWidth-14,un=((Bt=(vt=(_t=(yt=dt.current)==null?void 0:yt._core)==null?void 0:_t._renderService)==null?void 0:vt.dimensions)==null?void 0:Bt.actualCellWidth)||9.5,Kt=Math.ceil(jt/un);dt.current.resize(Kt,8),ht(!0)}},[]),z.createElement("div",{ref:rt,className:ue()("XtermText-valueRef",ut)})}function ct(St){const{status:ut,error_msg:Ft,output:ht,input:rt,expected_output:dt,is_file:yt,input_file_url:_t,output_file_url:vt,expected_output_file_url:Bt}=St;let jt=null;const un={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(ut){case Pe.h.NOMATCH:jt=z.createElement(z.Fragment,null,z.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!yt&&z.createElement(mt,{className:"mb10",value:rt}),yt&&z.createElement("div",{style:un},z.createElement("a",{onClick:()=>(0,ge.LR)(_t,rt)},rt)),z.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!yt&&z.createElement(mt,{className:"mb10",value:ht&&he.Base64.decode(ht)||""}),yt&&z.createElement("div",{style:un},z.createElement("a",{onClick:()=>(0,ge.LR)(vt,ht)},ht)),z.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!yt&&z.createElement(mt,{className:"mb10",value:dt&&he.Base64.decode(dt)||""}),yt&&z.createElement("div",{style:un},z.createElement("a",{onClick:()=>(0,ge.LR)(Bt,dt)},dt)));break;case Pe.h.EXECUTEFAILURE:jt=z.createElement(z.Fragment,null,z.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!yt&&z.createElement(xe.Z,{value:rt,style:un}),yt&&z.createElement("div",{style:un},z.createElement("a",{onClick:()=>(0,ge.LR)(_t,rt)},rt)),z.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),z.createElement("pre",{className:"error"},he.Base64.decode(Ft)));break;case Pe.h.COMPILEFAILURE:jt=z.createElement(z.Fragment,null,z.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!yt&&z.createElement(xe.Z,{value:rt,style:un}),yt&&z.createElement("div",{style:un},z.createElement("a",{onClick:()=>(0,ge.LR)(_t,rt)},rt)),z.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),z.createElement("pre",{className:"error"},he.Base64.decode(Ft)));break;case Pe.h.PODFAILURE:jt=z.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case Pe.h.TIMEOUT:jt=z.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return z.createElement(z.Fragment,null," ",jt," ")}function Ct(St){const{status:ut,error_msg:Ft,execute_time:ht,output:rt,input:dt,expected_output:yt,is_file:_t,input_file_url:vt,output_file_url:Bt,expected_output_file_url:jt}=St;let un=null;switch(ut){case Pe.h.OK:un=z.createElement(z.Fragment,null,z.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",ht,"\u79D2"),z.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),z.createElement("pre",null,he.Base64.decode(rt)));break;case Pe.h.NOMATCH:un=z.createElement(z.Fragment,null,z.createElement("p",null,"\u8F93\u5165\uFF1A",z.createElement("pre",null,dt)),z.createElement("p",null,"\u8F93\u51FA\uFF1A",rt&&he.Base64.decode(rt)),z.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",yt&&he.Base64.decode(yt)));break;case Pe.h.EXECUTEFAILURE:un=z.createElement(z.Fragment,null,z.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",z.createElement("pre",null,dt)),z.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),z.createElement("pre",{className:"error"},he.Base64.decode(Ft)));break;case Pe.h.COMPILEFAILURE:un=z.createElement(z.Fragment,null,z.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",z.createElement("pre",null,dt)),z.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),z.createElement("pre",{className:"error"},he.Base64.decode(Ft)));break;case Pe.h.PODFAILURE:un=z.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case Pe.h.TIMEOUT:un=z.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return z.createElement(z.Fragment,null," ",un," ")}var it=({id:St,is_file:ut,input:Ft,debuging:ht,submitting:rt,executingMessage:dt,debugResult:yt,onChangeInput:_t,onDebugCode:vt,onSubmitCode:Bt})=>{const[jt,un]=(0,Le.useReducer)(Ge,je),{visible:Kt,tabIndex:xn}=jt;(0,Le.useEffect)(()=>{un({type:0,payload:!1})},[St]);function Ut(We){let Be=We.target.id;un({type:1,payload:Be})}function Wt(){un({type:0,payload:!Kt})}const $t=(0,Le.useMemo)(()=>{if(yt){const{status:We}=yt;return z.createElement(z.Fragment,null,Ct(yt))}return null},[yt]);function ft(){un({type:0,payload:!0}),un({type:1,payload:"1"}),vt()}return z.createElement("div",{className:"test-case-panel"},z.createElement("div",{className:`test-case-panel-body ${Kt?"active":""}`},z.createElement("ul",{className:"s-navs"},z.createElement("li",null,z.createElement("a",{className:"active"},"\u8C03\u8BD5\u4EE3\u7801\u7ED3\u679C"))),z.createElement(ce.Z,{leftTitle:"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B",rightTitle:"\u4EE3\u7801\u6267\u884C\u7ED3\u679C",style:{height:240},leftNode:z.createElement(Ne,{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:ut?"":Ft,onChange:_t}),rightNode:ht?z.createElement(Se.Z,{message:"\u4EE3\u7801\u6267\u884C\u4E2D..."}):yt?$t: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 ${Kt?"up":""}`,onClick:Wt},Kt?z.createElement(Te.Z,null):z.createElement(be.Z,null)),z.createElement("footer",{className:"footer"},z.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),z.createElement("div",{className:"flex-container"},z.createElement(Ie.ZP,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),z.createElement(Ie.ZP,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),z.createElement(Ie.ZP,{className:"btn-green",type:"ghost",loading:ht,onClick:ft},"\u8C03\u8BD5\u4EE3\u7801"),z.createElement(Ie.ZP,{type:"primary",className:"custom-ant-disabled",loading:rt,disabled:rt,onClick:()=>{un({type:0,payload:!1}),Bt()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},31723:function(Cn,Yt,Ee){"use strict";Ee.r(Yt),Ee.d(Yt,{default:function(){return Rt}});var Le=Ee(59301),me=Ee(10906),Ie=Ee(76618),Te=Ee(89070),be=Ee(31797),Pe=Ee(8591),he=Ee(43418),Se=Ee(71418),xe=Ee(57809),ge=Ee(49802),ce=Ee(17064),ve=Ee(3294),de=Ee(87169),ue=Ee(43428),z=Ee(23954),ee=Ee(79346),oe=Ee(16479),ie=Ee(16869),se=Ee(59301),le=Object.defineProperty,ye=Object.defineProperties,we=Object.getOwnPropertyDescriptors,Ce=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,je=(gt,Pt,Lt)=>Pt in gt?le(gt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):gt[Pt]=Lt,Ve=(gt,Pt)=>{for(var Lt in Pt||(Pt={}))ke.call(Pt,Lt)&&je(gt,Lt,Pt[Lt]);if(Ce)for(var Lt of Ce(Pt))Ne.call(Pt,Lt)&&je(gt,Lt,Pt[Lt]);return gt},Qe=(gt,Pt)=>ye(gt,we(Pt));const Ge={theme:(0,oe.G)("cmCodeMode","vs-dark"),fontSize:(0,oe.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,oe.G)("cmTabToSpace",!0)};var mt=(gt=>(gt[gt.set_font_size=0]="set_font_size",gt[gt.set_theme=1]="set_theme",gt[gt.on_tab_to_space=2]="on_tab_to_space",gt[gt.set_show_editor_setting=3]="set_show_editor_setting",gt))(mt||{});function ct(gt,Pt){switch(Pt.type){case 3:return Qe(Ve({},gt),{showEditorSetting:Pt.payload});case 1:return Qe(Ve({},gt),{theme:Pt.payload});case 0:return Qe(Ve({},gt),{fontSize:Pt.payload});case 2:return Qe(Ve({},gt),{tabToSpace:Pt.payload});default:throw new Error}}var Ct=({isLoading:gt,value:Pt,onChange:Lt,language:Sn,onUpdateCode:hn,ActionBarRender:sn=mn=>se.createElement(it,{onShowCodeSetting:mn})})=>{const[mn,vn]=(0,Le.useReducer)(ct,Ge),{theme:wn,fontSize:zn,showEditorSetting:ni,tabToSpace:Wn}=mn,wi=(0,Le.useRef)(),Zn=(0,Le.useRef)(),gi={onFontSizeChange:Ui=>{vn({type:0,payload:Ui}),(0,oe.t)("cmFontSize",Ui)},tabToSpace:Wn,cmFontSize:zn,className:"oj",cmCodeMode:wn,onTabToSpace:Ui=>{vn({type:2,payload:Ui}),(0,oe.t)("cmTabToSpace",Ui)},onCodeModeChange:Ui=>{vn({type:1,payload:Ui}),(0,oe.t)("cmCodeMode",Ui)}};function si(){vn({type:3,payload:!1})}function Oi(){vn({type:3,payload:!0})}const Ni={value:Pt,language:Sn,theme:wn,height:"calc(100% - 56px)",options:{fontSize:zn,insertSpaces:Wn},onChange:Ui=>{Lt(Ui),Zn.current=Ui,clearTimeout(wi.current),wi.current=setTimeout(()=>{hn(Zn.current)},1e4)},onEditBlur:Ui=>{Zn.current&&hn(Zn.current)}};return se.createElement(Le.Fragment,null,se.createElement("div",{className:"code-panel-container"},sn(Oi),!gt&&se.createElement(z.ZP,Ve({},Ni))),se.createElement(ee.Z,null,se.createElement(ue.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:ni,onClose:si},se.createElement(ie.Z,Ve({},gi)))))};function it({onShowCodeSetting:gt}){return se.createElement("div",{className:"action-bar"},se.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),se.createElement("a",{onClick:gt},se.createElement("i",{className:"iconfont icon-shezhi"})))}var St=Ee(24334),ut=Ee(23257),Ft=Ee(25555),ht=Ee(92832),rt=Ee(78241),dt=Ee(3113);const{TextArea:yt}=ht.default,_t=5e3;var vt=({callback:gt,onCancel:Pt,notes:Lt})=>{function Sn(hn){gt(hn)}return Le.createElement(rt.default,{className:"note-form-panel",onFinish:Sn,initialValues:{notes:Lt}},Le.createElement(rt.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}`}]},Le.createElement(yt,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),Le.createElement(rt.default.Item,{style:{textAlign:"right"}},Le.createElement(dt.ZP,{type:"ghost",onClick:Pt,style:{marginRight:10}}," \u53D6\u6D88 "),Le.createElement(dt.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"},jt={pagination:"pagination___npPu7",info:"info___aRH6C"},un=Ee(1710),Kt=Ee(58421),xn=Ee(58617),Ut=Ee(81953),Wt=Ee(35106),$t=Ee(955),ft=Ee(61186),We=Ee.n(ft);const{Column:Be}=un.default;var qe=({submitResult:gt,submitting:Pt,submitRecords:Lt,page:Sn,onPageChange:hn,topicId:sn})=>{const{status:mn,id:vn,input:wn,output:zn,expected_output:ni,is_file:Wn,input_file_url:wi,output_file_url:Zn,expected_output_file_url:gi,error_msg:si}=gt||{},{records:Oi,records_count:Ni}=Lt||{},Ui=(0,Te.useParams)();function ki(){Wn?navigator.clipboard.writeText(St.Base64.decode(si)).then(()=>{Pe.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(St.Base64.decode(zn)).then(()=>{Pe.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return Le.createElement(Se.Z,{spinning:Pt,tip:"\u8BC4\u6D4B\u4E2D...",indicator:Le.createElement(xn.Z,{style:{fontSize:24},spin:!0})},vn?Le.createElement(Le.Fragment,null,Le.createElement("ul",{className:jt.info},Le.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",Le.createElement("span",{className:mn===Wt.h.OK?"c-green":"c-red"},Ft.Im[mn])),Le.createElement("li",{className:jt.error},Le.createElement("a",{onClick:ki},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",Le.createElement(Ut.Z,null)," ")),Le.createElement("li",null,Le.createElement(Te.Link,{to:`/problems/${sn}/record-detail/${vn}?backId=${Ui==null?void 0:Ui.save_identifier}`},"\u663E\u793A\u8BE6\u60C5 > "))),mn!==Wt.h.OK?Le.createElement(Le.Fragment,null,Le.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),Le.createElement("pre",null,!Wn&&wn,Wn&&Le.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,$t.LR)(wi,wn)},wn)),Le.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),Le.createElement("pre",null,(mn===4||mn===5)&&St.Base64.decode(si),mn!=4&&mn!=5&&(Wn?Le.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,$t.LR)(Zn,zn)},zn):St.Base64.decode(zn))),Le.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),Le.createElement("pre",null,!Wn&&St.Base64.decode(ni),Wn&&Le.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,$t.LR)(gi,ni)},ni))):null):null,(Oi==null?void 0:Oi.length)>0?Le.createElement(un.default,{dataSource:Oi,rowKey:"id",pagination:!1},Le.createElement(Be,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:(Ai,rr)=>Le.createElement("span",null," ",We()(Ai).format("YYYY-MM-DD HH:mm:ss"))}),Le.createElement(Be,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:(Ai,rr)=>{var ti;return Le.createElement(Te.Link,{className:Ai===0?"c-green":"c-red",to:`/problems/${sn}/record-detail/${rr.id}?backId=${Ui==null?void 0:Ui.save_identifier}`},(ti=Ft.Im[Ai])==null?void 0:ti.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),Le.createElement(Be,{title:"\u6267\u884C\u7528\u65F6 (S)",dataIndex:"execute_time",key:"execute_time"}),Le.createElement(Be,{title:"\u5185\u5B58\u6D88\u8017\uFF08MB\uFF09",dataIndex:"execute_memory",key:"execute_memory"}),Le.createElement(Be,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"})):null,Ni>15?Le.createElement(Kt.Z,{className:jt.pagination,current:Sn,pageSize:15,total:Ni,onChange:hn}):null)},et=Ee(8797),He=Ee(12563),Xe=Ee(81327),Re={desc:"desc___X8_hx",info:"info___C1DPv","commit-info":"commit-info____9yQm"},Ae=Ee(85149),Ue=Ee(59301);const Ke={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u9002\u4E2D",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}};var Ze=({hack:gt,onTriggerPraise:Pt,toDiscuss:Lt})=>{const{language:Sn,difficulty:hn,time_limit:sn,username:mn,user_path:vn,user_praise:wn,comments_count:zn,praises_count:ni,description:Wn,pass_count:wi,submit_count:Zn}=gt,gi=(0,Te.useLocation)();console.log(gt.language,"language");const si=Ke[hn];return Ue.createElement(Ue.Fragment,null,Ue.createElement("ul",{className:Re.info},Ue.createElement("li",null,"\u96BE\u5EA6\uFF1A",Ue.createElement(He.default,{color:si==null?void 0:si.color},si==null?void 0:si.name)),Ue.createElement("li",null,"\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",Ue.createElement("b",null,sn,"\u79D2"))),Ue.createElement(Ae.Z,{value:Wn,className:Re.desc}),Ue.createElement("ul",{className:Re["commit-info"]},Ue.createElement("li",null,Ue.createElement(Xe.Z,{size:4},Ue.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",Ue.createElement("b",null,wi))),Ue.createElement("li",null,Ue.createElement(Xe.Z,{size:4},Ue.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",Ue.createElement("b",null,Zn))," "),Ue.createElement("li",{style:{flex:"1 0 0"}}),Ue.createElement("li",null,Ue.createElement(Xe.Z,{size:4},Ue.createElement("i",{className:"iconfont icon-huifu1",onClick:Lt})," ",Ue.createElement("b",null,zn))," ")))},lt=Ee(34604),xt=Object.defineProperty,tn=Object.getOwnPropertySymbols,en=Object.prototype.hasOwnProperty,Jt=Object.prototype.propertyIsEnumerable,gn=(gt,Pt,Lt)=>Pt in gt?xt(gt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):gt[Pt]=Lt,Mn=(gt,Pt)=>{for(var Lt in Pt||(Pt={}))en.call(Pt,Lt)&&gn(gt,Lt,Pt[Lt]);if(tn)for(var Lt of tn(Pt))Jt.call(Pt,Lt)&&gn(gt,Lt,Pt[Lt]);return gt};const yn=gt=>React.createElement("svg",Mn({width:40,height:40,xmlns:"http://www.w3.org/2000/svg"},gt),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 kn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjEwMCUiIGlkPSJhIj48c3RvcCBzdG9wLWNvbG9yPSIjRUVGN0ZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0MxRTJGRiIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSJ1cmwoI2EpIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHJ4PSI4Ii8+PGcgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNMTYuMDU3IDIwLjc4NEg4LjIzOEExLjIyIDEuMjIgMCAwIDAgNyAyMS45NzR2Ni44MTFhMS4yMiAxLjIyIDAgMCAwIDEuMjM4IDEuMTloNy44MTlhMS4yMTMgMS4yMTMgMCAwIDAgMS4yMzgtMS4xOXYtNi44MTFhMS4yMTMgMS4yMTMgMCAwIDAtLjM3Ni0uODQ3IDEuMjAzIDEuMjAzIDAgMCAwLS44NjItLjMzMnYtLjAxWm0tMS4yNSA2Ljc2OUg5LjQyM1YyMy4xMmg1LjM4NHY0LjQzM1oiIGZpbGw9IiM0Q0FDRkYiLz48cGF0aCBkPSJNMTYuMDU3IDEwLjAwNWExLjIyIDEuMjIgMCAwIDEgMS4yMzggMS4xODl2Ni44MTJhMS4yMTMgMS4yMTMgMCAwIDEtLjM3Ni44NDZjLS4yMzIuMjIyLS41NDIuMzQtLjg2Mi4zMzJIOC4yMzhBMS4yMTMgMS4yMTMgMCAwIDEgNyAxOC4wMDV2LTYuODExYTEuMjIgMS4yMiAwIDAgMSAxLjIzOC0xLjE5Wm0tMS4yMzkgMi40MUg5LjQzNHY0LjQwMWg1LjM4NHYtNC40WiIgZmlsbD0iIzk0Q0RGRiIvPjxwYXRoIGQ9Ik0yMC40MTggMTIuNjMyaDExLjE4OWExLjIxMyAxLjIxMyAwIDAgMCAxLjIzOC0xLjE3OSAxLjIyNCAxLjIyNCAwIDAgMC0uMzcxLS44NTcgMS4yMTQgMS4yMTQgMCAwIDAtLjg2Ny0uMzQzSDIwLjQxOGExLjIwMyAxLjIwMyAwIDAgMC0uODY2LjMzNmMtLjIzMy4yMjMtLjM2Ny41My0uMzcyLjg1NC4wMDUuMzIzLjE0LjYzLjM3Mi44NTQuMjMyLjIyMy41NDQuMzQ0Ljg2Ni4zMzVaTTMxLjU3NSAxNi4wMjdoLTExLjE5YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTE5LjU1N2MtLjIzNy4zODQtLjIzNy44NyAwIDEuMjU0LjIzOC4zODQuNjcyLjYgMS4xMi41NTdoMTEuMTg5Yy40NDguMDQzLjg4Mi0uMTczIDEuMTE5LS41NTcuMjM3LS4zODQuMjM3LS44NyAwLTEuMjU0YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTItLjU1N1pNMzEuNTc1IDIxLjU5NWgtMTEuMTlhMS4xODMgMS4xODMgMCAwIDAtMS4xMTkuNTU3Yy0uMjM3LjM4NC0uMjM3Ljg3IDAgMS4yNTQuMjM4LjM4NC42NzIuNiAxLjEyLjU1N2gxMS4xODljLjQ0OC4wNDMuODgyLS4xNzMgMS4xMTktLjU1Ny4yMzctLjM4NC4yMzctLjg3IDAtMS4yNTRhMS4xODMgMS4xODMgMCAwIDAtMS4xMi0uNTU3Wk0zMS41NzUgMjcuMTYzaC0xMS4xOWExLjE4MyAxLjE4MyAwIDAgMC0xLjExOS41NTdjLS4yMzcuMzg0LS4yMzcuODcgMCAxLjI1NC4yMzguMzg0LjY3Mi42IDEuMTIuNTU3aDExLjE4OWMuNDQ4LjA0My44ODItLjE3MyAxLjExOS0uNTU3LjIzNy0uMzg0LjIzNy0uODcgMC0xLjI1NGExLjE4MyAxLjE4MyAwIDAgMC0xLjEyLS41NTdaIiBmaWxsPSIjMTg5MEZGIi8+PC9nPjwvZz48L3N2Zz4=",$n=Ee(99064);function An(gt){return(0,$n.U2)("comments.json",gt)}function oi(gt){return(0,$n.v_)(`/discusses/${gt}/plus.json`,{container_type:"Discuss",type:1})}function ai(gt){return(0,$n.v_)("comments/reply.json",gt)}function Di(gt){return(0,$n.v_)("comments.json",gt)}function Pi(gt){return(0,$n.v_)(`comments/${gt==null?void 0:gt.id}/hidden.json`,gt)}function Xi(gt){return(0,$n.IV)(`comments/${gt==null?void 0:gt.id}.json`)}var or=Ee(34362),ar=Ee(24065);function dr({author:gt}){return Le.createElement("a",{href:`/users/${gt.login}`,target:"_blank"},Le.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:`${ve.Z.IMG_SERVER}/images/${gt.image_url}`,width:"50"}))}function no({data:gt,index:Pt,parentDiscussIndex:Lt,user:Sn,onSetActionType:hn}){const{author:sn,can_delete:mn,content:vn,id:wn,time:zn}=gt;function ni(){hn({id:wn,index:Pt,type:"delete-discuss",parentDiscussIndex:Lt,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}const Wn=Sn.admin||mn||sn.user_id===Sn.user_id;return Le.createElement("div",{className:"discuss-item-container second-discuss "},Le.createElement(dr,{author:sn}),Le.createElement("section",null,Le.createElement("div",{className:"discuss-info"},Le.createElement("a",{href:`/users/${sn.login}`,target:"_blank"},sn.name),Le.createElement("span",{className:"grey"},zn),Le.createElement("div",{className:"btn-group",style:{marginBottom:0}},Wn?Le.createElement("a",{onClick:ni,title:"\u5220\u9664"},Le.createElement("i",{className:"iconfont icon-shanchu"})):null)),Le.createElement(Ae.Z,{className:"discuss-content",value:vn})))}var Ir=({user:gt,data:Pt,index:Lt,onPlusDiscuss:Sn,onSetActionType:hn,activeDiscussIndex:sn,onReplyDiscuss:mn,onSetActiveDiscussIndex:vn})=>{const{content:wn,children:zn,hidden:ni,id:Wn,praise_count:wi,time:Zn,user_praise:gi,can_delete:si,author:Oi}=Pt;console.log(si&&(!zn||zn.length==0),"children22");function Ni(){vn(Wn)}function Ui(){Sn(Wn,!gi,Lt)}function ki(){hn({id:Wn,index:Lt,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function Ai(){hn({id:Wn,index:Lt,params:{hidden:ni?"0":"1"},type:"hidden-discuss",message:ni?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}const rr=gt.admin||gt.user_id===Oi.user_id;return Le.createElement("div",{className:"discuss-item-container",key:Wn},Le.createElement(dr,{author:Oi}),Le.createElement("section",null,Le.createElement("div",{className:"discuss-info"},Le.createElement("a",{href:`/users/${Oi.login}`,target:"_blank"}," ",Oi.name," "),Le.createElement("span",{className:"grey"},Zn)),Le.createElement(Ae.Z,{className:"discuss-content",value:wn}),zn&&zn.length>0?Le.createElement("div",{className:"reply-discuss-container"},zn.map((ti,ji)=>Le.createElement(no,{key:ti.id,data:ti,index:ji,user:gt,onSetActionType:hn,parentDiscussIndex:Lt}))):null,Le.createElement("div",{className:"btn-group"},(0,ar.Ny)()?Le.createElement("a",{onClick:Ai,title:ni?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},Le.createElement("i",{className:ni?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,si&&(!zn||zn.length==0)?Le.createElement("a",{onClick:ki,title:"\u5220\u9664"},Le.createElement("i",{className:"iconfont icon-shanchu"})):null,Le.createElement("a",{onClick:Ni,title:"\u56DE\u590D"}," ",Le.createElement("i",{className:"iconfont icon-huifu1"})," "),Le.createElement("a",{onClick:Ui,className:gi?"c-orange":""},Le.createElement("i",{className:gi?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),Le.createElement("span",null,wi||""))),Le.createElement(or.Z,{id:Wn,activeDiscussIndex:sn,onReplyDiscuss:mn})))},xi=Ee(61398),wr=Ee(12290),Mr=(gt,Pt,Lt)=>new Promise((Sn,hn)=>{var sn=wn=>{try{vn(Lt.next(wn))}catch(zn){hn(zn)}},mn=wn=>{try{vn(Lt.throw(wn))}catch(zn){hn(zn)}},vn=wn=>wn.done?Sn(wn.value):Promise.resolve(wn.value).then(sn,mn);vn((Lt=Lt.apply(gt,Pt)).next())}),ot=({user_praise:gt,praise_count:Pt,praisePlus:Lt,onCreateDiscuss:Sn,discuss_count:hn})=>{const[sn,mn]=(0,Le.useState)(!1),[vn,wn]=(0,Le.useState)("");function zn(Zn){wn(Zn)}function ni(){mn(!0)}function Wn(){mn(!1)}function wi(){return Mr(this,null,function*(){Sn(vn),wn(""),mn(!1)})}return Le.createElement("div",{className:`dis-input-editor-container ${sn?"active":""} `},Le.createElement("div",{className:sn?"text-area hide":"text-area"},Le.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:ni}),Le.createElement("a",{style:{alignItems:"center"}}," ",Le.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",hn," "),Le.createElement("a",{className:"c-light-black",onClick:Lt,style:{alignItems:"center"},title:gt?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},Le.createElement("i",{className:`mr3 ${gt?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"} `}),Pt?Le.createElement("span",null,Pt):"")),sn?Le.createElement("div",{className:"input-mask",onClick:Wn}):null,Le.createElement("div",{className:sn?"md-container":"md-container hide"},Le.createElement(wr.Z,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:vn,height:240,onChange:zn}),Le.createElement("div",{className:"tip-container",onClick:Wn},Le.createElement("a",{className:"btn-send",onClick:wi}," \u53D1\u9001 "))))},Rr=Object.defineProperty,Nr=Object.defineProperties,Hr=Object.getOwnPropertyDescriptors,uo=Object.getOwnPropertySymbols,po=Object.prototype.hasOwnProperty,io=Object.prototype.propertyIsEnumerable,Do=(gt,Pt,Lt)=>Pt in gt?Rr(gt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):gt[Pt]=Lt,Xn=(gt,Pt)=>{for(var Lt in Pt||(Pt={}))po.call(Pt,Lt)&&Do(gt,Lt,Pt[Lt]);if(uo)for(var Lt of uo(Pt))io.call(Pt,Lt)&&Do(gt,Lt,Pt[Lt]);return gt},$e=(gt,Pt)=>Nr(gt,Hr(Pt)),nt=(gt,Pt,Lt)=>new Promise((Sn,hn)=>{var sn=wn=>{try{vn(Lt.next(wn))}catch(zn){hn(zn)}},mn=wn=>{try{vn(Lt.throw(wn))}catch(zn){hn(zn)}},vn=wn=>wn.done?Sn(wn.value):Promise.resolve(wn.value).then(sn,mn);vn((Lt=Lt.apply(gt,Pt)).next())});const Je={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null};var wt=(gt=>(gt[gt.GET_DISCUSSES=0]="GET_DISCUSSES",gt[gt.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",gt[gt.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",gt[gt.PLUS_DISCUSS=3]="PLUS_DISCUSS",gt[gt.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",gt[gt.SET_PAGE=5]="SET_PAGE",gt[gt.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING",gt))(wt||{});function Nt(gt,Pt){switch(Pt.type){case 6:return $e(Xn({},gt),{loading:!0});case 0:return Xn(Xn({},gt),Pt.payload);case 1:return Xn(Xn({},gt),Pt.payload);case 4:return Xn(Xn({},gt),Pt.payload);case 3:return Xn(Xn({},gt),Pt.payload);case 5:return Xn(Xn({},gt),Pt.payload);case 2:return Xn(Xn({},gt),Pt.payload);default:throw new Error}}var kt=({user:gt,identifier:Pt,hack:Lt,onTriggerPraise:Sn,setDiscussTotal:hn})=>{const[sn,mn]=(0,Le.useReducer)(Nt,Je),{loading:vn,page:wn,data:zn,count:ni,actionType:Wn,activeDiscussIndex:wi}=sn;console.log("---",sn);const Zn=(0,Le.useCallback)(()=>nt(void 0,null,function*(){mn({type:6});const ti=yield An({container_type:"Practice",container_identifier:Pt,limit:10,page:wn}),{comments:ji,disscuss_count:Li}=ti;mn({type:0,payload:{data:ji,count:Li,loading:!1}}),hn(Li)}),[wn,Pt]);(0,Le.useEffect)(()=>{Zn()},[Pt,wn]);function gi(ti){mn({type:5,payload:{page:ti}})}function si(ti){mn({type:4,payload:{actionType:ti}})}function Oi(ti){mn(wi===ti?{type:2,payload:{activeDiscussIndex:null}}:{type:2,payload:{activeDiscussIndex:ti}})}function Ni(ti,ji,Li){return nt(this,null,function*(){try{const bi=yield oi(ti);zn[Li].user_praise=ji,zn[Li].praise_count=bi.praise_count,mn({type:3,payload:{data:[...zn]}})}catch(bi){console.log(bi)}})}function Ui(){return nt(this,null,function*(){const{id:ti,params:ji,type:Li,index:bi,parentDiscussIndex:$i}=Wn;Li==="hidden-discuss"&&(console.log(ji,"params"),yield Pi(Xn({id:ti,container_type:"Practice",container_identifier:Pt},ji)),$i?zn[$i].children[bi].hidden=ji.hidden==1:zn[bi].hidden=ji.hidden==1,mn({type:4,payload:{actionType:null,data:[...zn]}})),Li==="delete-discuss"&&(yield Xi({id:ti,container_type:"Practice",container_identifier:Pt}),mn({type:4,payload:{actionType:null}}),yield Zn())})}function ki(){mn({type:4,payload:{actionType:null}})}function Ai(ti,ji){return nt(this,null,function*(){try{yield ai({container_type:"Practice",container_identifier:Pt,comments:{content:ji,parent_id:ti}}),Zn()}catch(Li){console.log(Li)}})}function rr(ti){return nt(this,null,function*(){mn({type:6}),yield Di({comments:{content:ti},container_type:"Practice",container_identifier:Pt}),Zn()})}return Le.createElement(Le.Fragment,null,Le.createElement("div",{className:"discuss-panel"},zn.length===0?Le.createElement(et.Z,null):Le.createElement(Se.Z,{spinning:vn},zn.map((ti,ji)=>Le.createElement(Ir,{onReplyDiscuss:Ai,onPlusDiscuss:Ni,onSetActiveDiscussIndex:Oi,onSetActionType:si,data:ti,index:ji,user:gt,activeDiscussIndex:wi}))),ni>10?Le.createElement("div",{className:"pagination-container mt10 mb10"},Le.createElement(Kt.Z,{showQuickJumper:!0,onChange:gi,current:wn,total:ni,showTotal:ti=>Le.createElement("span",{style:{color:"#656F87"}},"\u5171",Le.createElement("span",{className:"c-light-primary"},ti),"\u6761\u6570\u636E")})):null),Le.createElement(ot,{user_praise:Lt.user_praise,praise_count:Lt.praises_count,praisePlus:Sn,discuss_count:Lt.comments_count,onCreateDiscuss:rr}),Le.createElement(ee.Z,null,Le.createElement(he.default,{centered:!0,title:"\u63D0\u793A",open:!!Wn,onOk:Ui,onCancel:ki},Le.createElement("p",null,Wn?Wn.message:"")),Le.createElement(xi.Z,null)))},Et={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"},cn={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"},bn=Object.defineProperty,dn=Object.getOwnPropertySymbols,rn=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable,an=(gt,Pt,Lt)=>Pt in gt?bn(gt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):gt[Pt]=Lt,En=(gt,Pt)=>{for(var Lt in Pt||(Pt={}))rn.call(Pt,Lt)&&an(gt,Lt,Pt[Lt]);if(dn)for(var Lt of dn(Pt))At.call(Pt,Lt)&&an(gt,Lt,Pt[Lt]);return gt};const Dn=gt=>React.createElement("svg",En({width:12,height:10,xmlns:"http://www.w3.org/2000/svg"},gt),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 qt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExIDBhMSAxIDAgMCAxIDEgMXY4YTEgMSAwIDAgMS0xIDFIMWExIDEgMCAwIDEtMS0xVjFhMSAxIDAgMCAxIDEtMWgxMFpNNC40IDIuNGEuNC40IDAgMCAwLS40LjR2NC40YS40LjQgMCAwIDAgLjY0LjMybDIuNzItMi4wNGEuNi42IDAgMCAwIDAtLjk2TDQuNjQgMi40OGEuNC40IDAgMCAwLS4yNC0uMDhaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",on=Object.defineProperty,Nn=Object.getOwnPropertySymbols,On=Object.prototype.hasOwnProperty,qn=Object.prototype.propertyIsEnumerable,Hn=(gt,Pt,Lt)=>Pt in gt?on(gt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):gt[Pt]=Lt,ei=(gt,Pt)=>{for(var Lt in Pt||(Pt={}))On.call(Pt,Lt)&&Hn(gt,Lt,Pt[Lt]);if(Nn)for(var Lt of Nn(Pt))qn.call(Pt,Lt)&&Hn(gt,Lt,Pt[Lt]);return gt};const Fn=gt=>React.createElement("svg",ei({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},gt),React.createElement("title",null,"\u70B9\u8D5E1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M2.593 13.356V5.694c0-.31-.231-.561-.516-.561H.976c-.532 0-.962.468-.962 1.047v6.69c0 .579.43 1.047.962 1.047h1.101c.285 0 .516-.251.516-.561Z",fill:"#999"}),React.createElement("path",{d:"M3.335 13.512V5.53c0-.184.136-.346.333-.391.695-.16 2.289-.735 2.967-2.694C7.048.73 7.495-.08 8.823.017c1.328.097 1.417 1.263 1.417 1.618v2.752s-.107.42.34.453c.45.033 3.947 0 3.947 0s1.919-.029 1.309 2.122c-.53 1.871-1.58 4.882-1.846 5.635a1.606 1.606 0 0 1-.235.438c-.257.338-.796.88-1.62.88H3.782c-.247.002-.447-.179-.447-.403Z",fill:"#CCC"})));var hi="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjOTk5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQ0NDIi8+PC9nPjwvc3ZnPg==",Ii=Object.defineProperty,Ri=Object.getOwnPropertySymbols,Pn=Object.prototype.hasOwnProperty,Vi=Object.prototype.propertyIsEnumerable,Cr=(gt,Pt,Lt)=>Pt in gt?Ii(gt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):gt[Pt]=Lt,mr=(gt,Pt)=>{for(var Lt in Pt||(Pt={}))Pn.call(Pt,Lt)&&Cr(gt,Lt,Pt[Lt]);if(Ri)for(var Lt of Ri(Pt))Vi.call(Pt,Lt)&&Cr(gt,Lt,Pt[Lt]);return gt};const _n=gt=>React.createElement("svg",mr({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},gt),React.createElement("title",null,"\u70B9\u8D5E2"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M2.593 13.356V5.694c0-.31-.231-.561-.516-.561H.976c-.532 0-.962.468-.962 1.047v6.69c0 .579.43 1.047.962 1.047h1.101c.285 0 .516-.251.516-.561Z",fill:"#0152d9"}),React.createElement("path",{d:"M3.335 13.512V5.53c0-.184.136-.346.333-.391.695-.16 2.289-.735 2.967-2.694C7.048.73 7.495-.08 8.823.017c1.328.097 1.417 1.263 1.417 1.618v2.752s-.107.42.34.453c.45.033 3.947 0 3.947 0s1.919-.029 1.309 2.122c-.53 1.871-1.58 4.882-1.846 5.635a1.606 1.606 0 0 1-.235.438c-.257.338-.796.88-1.62.88H3.782c-.247.002-.447-.179-.447-.403Z",fill:"#B6D0FC"})));var Jn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjMDE1MmQ5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQjZEMEZDIi8+PC9nPjwvc3ZnPg==",ui=Object.defineProperty,yi=Object.getOwnPropertySymbols,di=Object.prototype.hasOwnProperty,Ei=Object.prototype.propertyIsEnumerable,Qi=(gt,Pt,Lt)=>Pt in gt?ui(gt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):gt[Pt]=Lt,Fi=(gt,Pt)=>{for(var Lt in Pt||(Pt={}))di.call(Pt,Lt)&&Qi(gt,Lt,Pt[Lt]);if(yi)for(var Lt of yi(Pt))Ei.call(Pt,Lt)&&Qi(gt,Lt,Pt[Lt]);return gt};const zi=gt=>React.createElement("svg",Fi({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},gt),React.createElement("title",null,"\u8BC4\u8BBA1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M4.717.01h8.84c1.571 0 2.357.777 2.357 2.332v5.25c0 1.556-.786 2.334-2.357 2.334h-8.84c-1.572 0-2.357-.778-2.357-2.334v-5.25C2.36.787 3.145.01 4.717.01Z",fill:"#999"}),React.createElement("path",{d:"M2.36 2.342h8.84a2.37 2.37 0 0 1 1.666.684c.442.437.69 1.03.69 1.65v5.25c0 1.288-1.055 2.333-2.357 2.333H7.94l-1.16 1.153-1.167-1.153H2.36a2.37 2.37 0 0 1-1.667-.683 2.321 2.321 0 0 1-.69-1.65v-5.25c0-.62.248-1.213.69-1.65a2.37 2.37 0 0 1 1.667-.684Z",fill:"#B6D0FC"}),React.createElement("path",{d:"M2.36 2.926h8.84c1.301 0 2.357 1.044 2.357 2.333v5.25c0 .619-.249 1.212-.69 1.65a2.37 2.37 0 0 1-1.668.683H7.94l-1.16 1.154-1.167-1.154H2.36a2.37 2.37 0 0 1-1.667-.683 2.321 2.321 0 0 1-.69-1.65V5.26c0-.619.248-1.212.69-1.65a2.37 2.37 0 0 1 1.667-.683Z",fill:"#CCC"}),React.createElement("path",{d:"M3.538 5.842h6.483c.393 0 .589.195.589.584 0 .389-.196.583-.59.583H3.539c-.393 0-.59-.194-.59-.583 0-.39.197-.584.59-.584ZM3.538 8.76h4.715c.393 0 .59.194.59.582 0 .39-.197.584-.59.584H3.538c-.393 0-.59-.195-.59-.584 0-.388.197-.583.59-.583Z",fill:"#FFF"})));var fr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNC43MTcuMDFoOC44NGMxLjU3MSAwIDIuMzU3Ljc3NyAyLjM1NyAyLjMzMnY1LjI1YzAgMS41NTYtLjc4NiAyLjMzNC0yLjM1NyAyLjMzNGgtOC44NGMtMS41NzIgMC0yLjM1Ny0uNzc4LTIuMzU3LTIuMzM0di01LjI1QzIuMzYuNzg3IDMuMTQ1LjAxIDQuNzE3LjAxWiIgZmlsbD0iIzk5OSIvPjxwYXRoIGQ9Ik0yLjM2IDIuMzQyaDguODRhMi4zNyAyLjM3IDAgMCAxIDEuNjY2LjY4NGMuNDQyLjQzNy42OSAxLjAzLjY5IDEuNjV2NS4yNWMwIDEuMjg4LTEuMDU1IDIuMzMzLTIuMzU3IDIuMzMzSDcuOTRsLTEuMTYgMS4xNTMtMS4xNjctMS4xNTNIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NXYtNS4yNWMwLS42Mi4yNDgtMS4yMTMuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4NFoiIGZpbGw9IiNCNkQwRkMiLz48cGF0aCBkPSJNMi4zNiAyLjkyNmg4Ljg0YzEuMzAxIDAgMi4zNTcgMS4wNDQgMi4zNTcgMi4zMzN2NS4yNWMwIC42MTktLjI0OSAxLjIxMi0uNjkgMS42NWEyLjM3IDIuMzcgMCAwIDEtMS42NjguNjgzSDcuOTRsLTEuMTYgMS4xNTQtMS4xNjctMS4xNTRIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NVY1LjI2YzAtLjYxOS4yNDgtMS4yMTIuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4M1oiIGZpbGw9IiNDQ0MiLz48cGF0aCBkPSJNMy41MzggNS44NDJoNi40ODNjLjM5MyAwIC41ODkuMTk1LjU4OS41ODQgMCAuMzg5LS4xOTYuNTgzLS41OS41ODNIMy41MzljLS4zOTMgMC0uNTktLjE5NC0uNTktLjU4MyAwLS4zOS4xOTctLjU4NC41OS0uNTg0Wk0zLjUzOCA4Ljc2aDQuNzE1Yy4zOTMgMCAuNTkuMTk0LjU5LjU4MiAwIC4zOS0uMTk3LjU4NC0uNTkuNTg0SDMuNTM4Yy0uMzkzIDAtLjU5LS4xOTUtLjU5LS41ODQgMC0uMzg4LjE5Ny0uNTgzLjU5LS41ODNaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==",Bn=Object.defineProperty,Br=Object.getOwnPropertySymbols,In=Object.prototype.hasOwnProperty,pr=Object.prototype.propertyIsEnumerable,yo=(gt,Pt,Lt)=>Pt in gt?Bn(gt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):gt[Pt]=Lt,Or=(gt,Pt)=>{for(var Lt in Pt||(Pt={}))In.call(Pt,Lt)&&yo(gt,Lt,Pt[Lt]);if(Br)for(var Lt of Br(Pt))pr.call(Pt,Lt)&&yo(gt,Lt,Pt[Lt]);return gt};const bo=gt=>React.createElement("svg",Or({width:16,height:12,xmlns:"http://www.w3.org/2000/svg"},gt),React.createElement("title",null,"\u67E5\u770B1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M7.965 11.961C2.593 11.961 0 6.926 0 5.981 0 5.035 2.623 0 7.965 0s7.965 4.984 7.965 5.98c0 .997-2.593 5.981-7.965 5.981Zm0-2.208c1.296 0 2.494-.72 3.142-1.886a3.902 3.902 0 0 0 0-3.773c-.648-1.167-1.846-1.886-3.142-1.886-2.004 0-3.629 1.69-3.629 3.773s1.625 3.772 3.629 3.772Z",fill:"#CCC"}),React.createElement("path",{d:"M7.965 8.28c-1.222 0-2.213-1.029-2.213-2.3 0-1.27.991-2.3 2.213-2.3s2.212 1.03 2.212 2.3c0 1.271-.99 2.3-2.212 2.3Z",fill:"#999"})));var co="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNy45NjUgMTEuOTYxQzIuNTkzIDExLjk2MSAwIDYuOTI2IDAgNS45ODEgMCA1LjAzNSAyLjYyMyAwIDcuOTY1IDBzNy45NjUgNC45ODQgNy45NjUgNS45OGMwIC45OTctMi41OTMgNS45ODEtNy45NjUgNS45ODFabTAtMi4yMDhjMS4yOTYgMCAyLjQ5NC0uNzIgMy4xNDItMS44ODZhMy45MDIgMy45MDIgMCAwIDAgMC0zLjc3M2MtLjY0OC0xLjE2Ny0xLjg0Ni0xLjg4Ni0zLjE0Mi0xLjg4Ni0yLjAwNCAwLTMuNjI5IDEuNjktMy42MjkgMy43NzNzMS42MjUgMy43NzIgMy42MjkgMy43NzJaIiBmaWxsPSIjQ0NDIi8+PHBhdGggZD0iTTcuOTY1IDguMjhjLTEuMjIyIDAtMi4yMTMtMS4wMjktMi4yMTMtMi4zIDAtMS4yNy45OTEtMi4zIDIuMjEzLTIuM3MyLjIxMiAxLjAzIDIuMjEyIDIuM2MwIDEuMjcxLS45OSAyLjMtMi4yMTIgMi4zWiIgZmlsbD0iIzk5OSIvPjwvZz48L3N2Zz4=",Hi=({style:gt={},onClick:Pt,onAssist:Lt,onHide:Sn,data:hn,active:sn,showLine:mn})=>Le.createElement(Le.Fragment,null,Le.createElement("div",{className:sn===(hn==null?void 0:hn.id)?`${cn.list} ${cn.active}`:cn.list,style:gt,onClick:()=>Pt(hn)},(hn==null?void 0:hn.video)&&Le.createElement("div",{className:cn.left},Le.createElement("img",{src:hn==null?void 0:hn.video_cover}),Le.createElement("div",null,Le.createElement("img",{src:qt}),Le.createElement("span",null,hn==null?void 0:hn.video_duration)),Le.createElement("div",{className:cn.mask})),Le.createElement("div",{className:cn.right},Le.createElement("div",{className:cn.name},Le.createElement("img",{src:ve.Z.IMG_SERVER+"/images/"+(hn==null?void 0:hn.image_url),width:30,height:30}),Le.createElement("div",{title:hn==null?void 0:hn.name,className:cn.title},hn==null?void 0:hn.name),(hn==null?void 0:hn.is_authority)&&Le.createElement("div",{className:cn.b},"\u5B98\u65B9"),(hn==null?void 0:hn.is_excellent)&&Le.createElement("div",{className:cn.a},"\u7CBE\u9009")),Le.createElement("div",{className:cn.des},Le.createElement(Ae.Z,{showLines:2,showTextOnly:!0,value:(hn==null?void 0:hn.content)||"\u6682\u65E0\u5185\u5BB9"})),Le.createElement("div",{className:cn.tag},Le.createElement("span",{className:"current",onClick:vn=>{vn.stopPropagation(),Lt(hn)}},Le.createElement("img",{src:hn!=null&&hn.user_liker?Jn:hi}),Le.createElement("span",{style:{color:hn!=null&&hn.user_liker?"#0152d9":"#656f87"}},hn==null?void 0:hn.praises_count)),Le.createElement("span",null,Le.createElement("img",{src:fr}),Le.createElement("span",null,hn==null?void 0:hn.discusses_count)),Le.createElement("span",null,Le.createElement("img",{src:co}),Le.createElement("span",null,hn==null?void 0:hn.viewed_count)),(0,ar.Ny)()&&Le.createElement("span",{className:"current",style:{color:"#0152d9",marginRight:0,userSelect:"none"},onClick:vn=>{vn.stopPropagation(),Sn(hn)}},hn!=null&&hn.is_hidden?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")))),mn&&Le.createElement("div",{className:cn.line})),lr={flex_box_center:"flex_box_center___C6sVF",flex_space_between:"flex_space_between___VEt8l",flex_box_vertical_center:"flex_box_vertical_center___qeD5F",flex_box_center_end:"flex_box_center_end___iYJd9",flex_box_column:"flex_box_column___iAKJf",listForm:"listForm___leDJL",scroll:"scroll___wtFaF",formWrap:"formWrap___p3W41",btns:"btns___Izl4q",main:"main___xTqlG",mainLoading:"mainLoading___QLa9s",tip:"tip___a0tbY",proWarp:"proWarp___BZhOt",pro:"pro___Yp1Rx",mainSucceed:"mainSucceed___HfaTf",del:"del___TXGhB"},Pr=Ee(6848),ci=Ee(70750),Tt=Object.defineProperty,Ur=Object.getOwnPropertySymbols,zr=Object.prototype.hasOwnProperty,ts=Object.prototype.propertyIsEnumerable,ko=(gt,Pt,Lt)=>Pt in gt?Tt(gt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):gt[Pt]=Lt,ss=(gt,Pt)=>{for(var Lt in Pt||(Pt={}))zr.call(Pt,Lt)&&ko(gt,Lt,Pt[Lt]);if(Ur)for(var Lt of Ur(Pt))ts.call(Pt,Lt)&&ko(gt,Lt,Pt[Lt]);return gt};const _r=gt=>React.createElement("svg",ss({width:32,height:30,xmlns:"http://www.w3.org/2000/svg"},gt),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 ur="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNiAwQzEuMTc1IDAgLjc2OC4xNy40NjguNDc0QTEuNjMgMS42MyAwIDAgMCAwIDEuNjIydjMuMjQzaDMuMjM3TDcuMzc4IDBIMS42Wm03Ljg3NiAwTDUuMzM4IDQuODY1aDUuOUwxNS4zNzEgMEg5LjQ3NlptNy45OTggMC00LjEzNyA0Ljg2NWg1Ljg5NkwyMy4zNzIgMGgtNS44OThabTggMC00LjEzOCA0Ljg2NWg2LjY2VjEuNjIyYTEuNjI5IDEuNjI5IDAgMCAwLS40NjctMS4xNDhBMS41ODUgMS41ODUgMCAwIDAgMjYuMzk3IDBoLS45MjRaTTAgNi40ODd2MTcuODM3YzAgLjQzLjE2Ny44NDQuNDY4IDEuMTQ4LjMuMzA1LjcwNy40NzUgMS4xMzIuNDc0aDE4LjYxYTYuNTE1IDYuNTE1IDAgMCAxIDEuNjUyLTYuMjE4IDYuMzEgNi4zMSAwIDAgMSA2LjEzNC0xLjY3NVY2LjQ4N0gwWm0xMS45OTggNS42NzUgNi40IDQuMDU2LTYuNCA0LjA1NXYtOC4xMVptMTQuMzk5IDYuNDg3Yy0zLjA5Mi4wMDItNS41OTcgMi41NDQtNS41OTUgNS42NzguMDAxIDMuMTM0IDIuNTA4IDUuNjc0IDUuNiA1LjY3M0MyOS40OTQgMzAgMzIgMjcuNDU4IDMyIDI0LjMyNGMwLTEuNTA2LS41OS0yLjk1LTEuNjQxLTQuMDE0YTUuNTYxIDUuNTYxIDAgMCAwLTMuOTYyLTEuNjYxWm0wIDIuMDI3Yy4yMi4wMDMuNDI4LjEuNTc0LjI2Ni42NjMuNiAxLjMyNyAxLjM1MiAxLjk5IDIuMDAyYS44LjggMCAwIDEgMCAxLjE0Ljc4OC43ODggMCAwIDEtMS4xMjUgMGwtLjYzOC0uNjQ2djMuNzI0YS44MTQuODE0IDAgMCAxLS4zOTIuNzI0Ljc5Ljc5IDAgMCAxLS44MTUgMCAuODE0LjgxNCAwIDAgMS0uMzkyLS43MjR2LTMuNzI0bC0uNjM3LjY0NmEuNzkuNzkgMCAwIDEtLjc3My4yMTUuODAzLjgwMyAwIDAgMS0uNTY3LS41NzUuODE2LjgxNiAwIDAgMSAuMjEyLS43ODNjLjY1MS0uNjY0IDEuMzMzLTEuMzg4IDEuOTktMi4wMDJhLjc3OC43NzggMCAwIDEgLjU3NS0uMjY2bC0uMDAyLjAwM1oiIGZpbGw9IiMwMTUyZDkiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",Kr=Object.defineProperty,cr=Object.getOwnPropertySymbols,qr=Object.prototype.hasOwnProperty,Yo=Object.prototype.propertyIsEnumerable,nr=(gt,Pt,Lt)=>Pt in gt?Kr(gt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):gt[Pt]=Lt,Wi=(gt,Pt)=>{for(var Lt in Pt||(Pt={}))qr.call(Pt,Lt)&&nr(gt,Lt,Pt[Lt]);if(cr)for(var Lt of cr(Pt))Yo.call(Pt,Lt)&&nr(gt,Lt,Pt[Lt]);return gt};const Qn=gt=>React.createElement("svg",Wi({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},gt),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 ir="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1IDBjOC4yODUgMCAxNSA2LjcxNyAxNSAxNSAwIDguMjg1LTYuNzE1IDE1LTE1IDE1LTguMjgzIDAtMTUtNi43MTUtMTUtMTVDMCA2LjcxNyA2LjcxNyAwIDE1IDBabTEwLjA0MSA3LjV2LjAxYTQ3LjkzNCA0Ny45MzQgMCAwIDAtMTEuMjMyIDkuMzg2bC00LjM3Mi0zLjN2LS4wMDJMNy41IDE1LjA4bDcuNTUzIDcuNDJBNDQuNjI1IDQ0LjYyNSAwIDAgMSAyNS41IDguNTVsLS40NTktMS4wNVoiIGZpbGw9IiM0NEQ3QjYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",eo=Object.defineProperty,Ro=Object.getOwnPropertySymbols,Bo=Object.prototype.hasOwnProperty,Xo=Object.prototype.propertyIsEnumerable,as=(gt,Pt,Lt)=>Pt in gt?eo(gt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):gt[Pt]=Lt,Ho=(gt,Pt)=>{for(var Lt in Pt||(Pt={}))Bo.call(Pt,Lt)&&as(gt,Lt,Pt[Lt]);if(Ro)for(var Lt of Ro(Pt))Xo.call(Pt,Lt)&&as(gt,Lt,Pt[Lt]);return gt};const ia=gt=>React.createElement("svg",Ho({xmlns:"http://www.w3.org/2000/svg",width:20,height:20},gt),React.createElement("path",{fill:"#AFBACB",d:"M9.99.02C4.482.02.02 4.482.02 9.99c0 5.506 4.463 9.97 9.97 9.97 5.506 0 9.97-4.464 9.97-9.97 0-5.507-4.464-9.97-9.97-9.97Zm1.636 13.69c-.744 1.19-1.488 2.083-2.827 2.083-.893-.149-1.19-.744-1.042-1.488l1.637-5.506c0-.149 0-.298-.149-.298-.148 0-.446 0-.595.298l-1.042 1.19v-.744c.745-1.19 1.935-2.083 2.828-2.083.744.149 1.19.744 1.042 1.488L9.84 14.305c0 .149 0 .298.148.298.15 0 .447-.15.596-.298l1.041-1.34v.745Zm-.297-7.292c-.596 0-1.19-.446-1.19-1.19 0-.745.446-1.191 1.19-1.191.595 0 1.19.446 1.19 1.19 0 .745-.595 1.191-1.19 1.191Z"}));var _s="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZmlsbD0iI0FGQkFDQiIgZD0iTTkuOTkuMDJDNC40ODIuMDIuMDIgNC40ODIuMDIgOS45OWMwIDUuNTA2IDQuNDYzIDkuOTcgOS45NyA5Ljk3IDUuNTA2IDAgOS45Ny00LjQ2NCA5Ljk3LTkuOTcgMC01LjUwNy00LjQ2NC05Ljk3LTkuOTctOS45N1ptMS42MzYgMTMuNjljLS43NDQgMS4xOS0xLjQ4OCAyLjA4My0yLjgyNyAyLjA4My0uODkzLS4xNDktMS4xOS0uNzQ0LTEuMDQyLTEuNDg4bDEuNjM3LTUuNTA2YzAtLjE0OSAwLS4yOTgtLjE0OS0uMjk4LS4xNDggMC0uNDQ2IDAtLjU5NS4yOThsLTEuMDQyIDEuMTl2LS43NDRjLjc0NS0xLjE5IDEuOTM1LTIuMDgzIDIuODI4LTIuMDgzLjc0NC4xNDkgMS4xOS43NDQgMS4wNDIgMS40ODhMOS44NCAxNC4zMDVjMCAuMTQ5IDAgLjI5OC4xNDguMjk4LjE1IDAgLjQ0Ny0uMTUuNTk2LS4yOThsMS4wNDEtMS4zNHYuNzQ1Wm0tLjI5Ny03LjI5MmMtLjU5NiAwLTEuMTktLjQ0Ni0xLjE5LTEuMTkgMC0uNzQ1LjQ0Ni0xLjE5MSAxLjE5LTEuMTkxLjU5NSAwIDEuMTkuNDQ2IDEuMTkgMS4xOSAwIC43NDUtLjU5NSAxLjE5MS0xLjE5IDEuMTkxWiIvPjwvc3ZnPg==",la=Object.defineProperty,Tn=Object.getOwnPropertySymbols,Is=Object.prototype.hasOwnProperty,Pu=Object.prototype.propertyIsEnumerable,Ua=(gt,Pt,Lt)=>Pt in gt?la(gt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):gt[Pt]=Lt,Sa=(gt,Pt)=>{for(var Lt in Pt||(Pt={}))Is.call(Pt,Lt)&&Ua(gt,Lt,Pt[Lt]);if(Tn)for(var Lt of Tn(Pt))Pu.call(Pt,Lt)&&Ua(gt,Lt,Pt[Lt]);return gt},us=(gt,Pt,Lt)=>new Promise((Sn,hn)=>{var sn=wn=>{try{vn(Lt.next(wn))}catch(zn){hn(zn)}},mn=wn=>{try{vn(Lt.throw(wn))}catch(zn){hn(zn)}},vn=wn=>wn.done?Sn(wn.value):Promise.resolve(wn.value).then(sn,mn);vn((Lt=Lt.apply(gt,Pt)).next())});const Ws=(gt,Pt)=>{var Lt,Sn,hn;const{uploadInfo:sn={}}=Pt.payload;switch(Pt.type){case"addVideo":return{videoList:[...gt.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:gt.videoList.filter(mn=>mn.name!==Pt.payload.name)};case"replaceVideo":return{videoList:Pt.payload};case"removeAll":return[];case"updateProgress":return{videoList:gt.videoList.map(mn=>mn.name===Pt.payload.uploadInfo.file.name?Sa(Sa({},mn),{loaded:Pt.payload.progressPercent,video_id:sn.videoId,fileHash:sn.fileHash}):mn)};case"updateTitle":return{videoList:(Lt=gt.videoList)==null?void 0:Lt.map(mn=>mn.name===Pt.payload.item.name?Sa(Sa({},mn),{title:Pt.payload.title}):mn)};case"updateImg":return{videoList:(Sn=gt.videoList)==null?void 0:Sn.map(mn=>mn.name===Pt.payload.item.name?Sa(Sa({},mn),{attachment_id:Pt.payload.attachment_id}):mn)};case"updateImg":return{videoList:(hn=gt.videoList)==null?void 0:hn.map(mn=>mn.name===Pt.payload.item.name?Sa(Sa({},mn),{attachment_id:Pt.payload.attachment_id}):mn)};default:return[]}};var Ao=({onClose:gt,onOk:Pt,identifier:Lt,active:Sn})=>{var hn,sn;const[mn]=rt.default.useForm(),[vn,wn]=(0,Le.useState)({}),[zn,ni]=(0,Le.useState)(!1),[Wn,wi]=(0,Le.useState)(!1),[Zn,gi]=(0,Le.useReducer)(Ws,{videoList:[]}),si=(0,ar.eY)(),Oi=(0,Te.useParams)(),Ni=(0,Le.useRef)();(0,Le.useEffect)(()=>{Sn&&Ui()},[Sn]);const Ui=()=>us(void 0,null,function*(){var Gi,vr,qi,So,Co,is,so,Tr,No,Ar;const Yr=yield(0,ge.M3)(Lt,{active:Sn});if((Yr==null?void 0:Yr.status)===0){const rs={name:(Gi=Yr==null?void 0:Yr.data)==null?void 0:Gi.name,content:(vr=Yr==null?void 0:Yr.data)==null?void 0:vr.content};mn.setFieldsValue(rs),wn(rs),(So=(qi=Yr==null?void 0:Yr.data)==null?void 0:qi.videos)!=null&&So[0]&&gi({type:"replaceVideo",payload:[{video_id:(so=(is=(Co=Yr==null?void 0:Yr.data)==null?void 0:Co.videos)==null?void 0:is[0])==null?void 0:so.video_id,name:(Ar=(No=(Tr=Yr==null?void 0:Yr.data)==null?void 0:Tr.videos)==null?void 0:No[0])==null?void 0:Ar.title,loaded:100}]})}}),ki=(Gi,vr)=>{wn(Sa({},vr))},Ai=Gi=>us(void 0,null,function*(){const vr={videos:Zn.videoList,articles:Gi};wi(!0);let qi;Sn?(vr.active=Sn,qi=yield(0,ge.gu)(Lt,vr)):qi=yield(0,ge.bx)(Lt,vr),(qi==null?void 0:qi.status)===0&&(console.log(Sn||(qi==null?void 0:qi.id),44),Pt(Sn||(qi==null?void 0:qi.id))),wi(!1)}),rr=()=>{const Gi=document.getElementById("fileUpload");Gi.value=""},ti=Gi=>{var vr='{"Vod":{}}';if(ni(!0),Ni.current){Ni.current.addFile(Gi,null,null,null,vr);return}(0,ci.o)(si==null?void 0:si.login,"",{create:!Ni,addFileSuccess:qi=>{gi({type:"addVideo",payload:{uploadInfo:qi}})},onUploadProgress:(qi,So,Co)=>{const is=Math.ceil(Co*100);gi({type:"updateProgress",payload:{uploadInfo:qi,progressPercent:is}}),rr()},onUploadFailed:qi=>{Pe.ZP.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:qi=>{ni(!1)},onUploadSucceed:qi=>{ni(!1)},onUploadError:qi=>{ni(!1)},gotUploader:qi=>{qi.addFile(Gi,null,null,null,vr),Ni.current=qi}})},ji=Gi=>{var vr;const So=Gi.target.files[0];if(!So){rr();return}let Co=So.name.toLowerCase();if(Co&&Co.indexOf(".avi")==-1&&Co.indexOf(".flv")==-1&&Co.indexOf(".f4v")==-1&&Co.indexOf(".m4v")==-1&&Co.indexOf(".mov")==-1&&Co.indexOf(".mp4")==-1&&Co.indexOf(".rmvb")==-1&&Co.indexOf(".swf")==-1&&Co.indexOf(".webm")==-1&&Co.indexOf(".wmv")==-1){Pe.ZP.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),rr();return}if(So.size>1024*1024*1024){Pe.ZP.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC71024M"),rr();return}if((vr=Zn.videoList)!=null&&vr.find(is=>is.name===So.name)){Pe.ZP.info("\u4F60\u4E0D\u80FD\u4E0A\u4F20\u540C\u4E00\u4E2A\u89C6\u9891\u6587\u4EF6\u540D\u79F0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002"),rr();return}ti(So)},Li=(Gi,vr)=>{he.default.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:Le.createElement("div",{className:"tc"},"\u60A8\u786E\u8BA4\u8981",vr?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:()=>{rr(),gi({type:"removeVideo",payload:{name:Gi}})}})},bi=()=>Le.createElement("label",{htmlFor:"fileUpload",className:lr.main},Le.createElement("img",{src:ur,alt:""}),Le.createElement("span",null,"\u4E0A\u4F20\u89C6\u9891")),$i=Gi=>Le.createElement("div",{className:lr.mainLoading},Le.createElement("div",{className:lr.proWarp},Le.createElement("div",{className:lr.pro},Le.createElement("div",{style:{width:Gi}})),Le.createElement("span",null,Gi||0,"%")),Le.createElement("aside",null,"\u4E0A\u4F20\u4E2D"),Le.createElement("div",{className:lr.tip},Le.createElement(Pr.Z,{getPopupContainer:vr=>vr.parentNode,title:Le.createElement("div",null,Le.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",Le.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"),Le.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),Le.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},Le.createElement("img",{src:_s,alt:""})))),pi=Gi=>Le.createElement("div",{className:lr.mainSucceed},Le.createElement("img",{src:ir,alt:""}),Le.createElement("span",null,"\u4E0A\u4F20\u6210\u529F"),Le.createElement("div",{className:lr.tip},Le.createElement(Pr.Z,{getPopupContainer:vr=>vr.parentNode,title:Le.createElement("div",null,Le.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",Le.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"),Le.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),Le.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},Le.createElement("img",{src:_s,alt:""}))),Le.createElement("div",{className:lr.del,onClick:()=>Li(Gi.name,Gi.loaded==100)},Le.createElement("i",{className:"iconfont icon-shanchu7 mr5"}),"\u5220\u9664\u89C6\u9891")),sr=()=>{var Gi;return Le.createElement(Le.Fragment,null,(Gi=Zn.videoList)==null?void 0:Gi.map((vr,qi)=>Le.createElement(Le.Fragment,{key:qi},vr.loaded==100?pi(vr):$i(vr.loaded))))},Yi=()=>{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:gt})},Ci=(hn=Zn.videoList)==null?void 0:hn.length;return Le.createElement("div",{className:lr.listForm},Le.createElement("header",null,Sn?"\u7F16\u8F91":"\u53D1\u5E03","\u9898\u89E3"),Le.createElement("section",{className:lr.scroll,id:"sss"},Le.createElement("div",{className:lr.formWrap}," ",Le.createElement(rt.default,{form:mn,scrollToFirstError:!0,layout:"vertical",onValuesChange:ki,onFinish:Ai},Le.createElement(rt.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"}]},Le.createElement(ht.default,{bordered:!1,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26",suffix:`${((sn=vn.name)==null?void 0:sn.length)||0}/60`})),Le.createElement(rt.default.Item,{name:"content",label:"\u5185\u5BB9:"},Le.createElement(wr.Z,{defaultValue:vn.content||"",watch:!0})))),Le.createElement("div",{className:lr.upload},Ci?sr():bi(),Le.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/*"}))),Le.createElement("div",{className:lr.btns},Le.createElement(dt.ZP,{onClick:Yi,type:"primary",ghost:!0},"\u5173\u95ED"),Le.createElement(dt.ZP,{loading:Wn,disabled:zn,onClick:()=>mn.submit(),type:"primary"},"\u53D1\u5E03\u9898\u89E3")))},Eo={flex_box_center:"flex_box_center___Udvu8",flex_space_between:"flex_space_between___WNLp1",flex_box_vertical_center:"flex_box_vertical_center___ecch5",flex_box_center_end:"flex_box_center_end___cu_DJ",flex_box_column:"flex_box_column___zF2CU",listDetails:"listDetails___HpDwH",head:"head___wipEz",name:"name___qdH8S",title:"title___B0yUa",a:"a___LB6ZS",b:"b___yvOON",tag:"tag___bRCso",btn:"btn___akBxg",scroll:"scroll___JKC_q",video:"video___nEr4F",html:"html___GDNSx",g:"g___LSOhO",btns:"btns___Ci727"},ua=Ee(61621),xr=Object.defineProperty,lo=Object.getOwnPropertySymbols,$r=Object.prototype.hasOwnProperty,Mi=Object.prototype.propertyIsEnumerable,Es=(gt,Pt,Lt)=>Pt in gt?xr(gt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):gt[Pt]=Lt,Ls=(gt,Pt)=>{for(var Lt in Pt||(Pt={}))$r.call(Pt,Lt)&&Es(gt,Lt,Pt[Lt]);if(lo)for(var Lt of lo(Pt))Mi.call(Pt,Lt)&&Es(gt,Lt,Pt[Lt]);return gt};const xa=gt=>React.createElement("svg",Ls({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:15,height:16},gt),React.createElement("defs",null,React.createElement("path",{id:"jx_svg__a",d:"M6.385.257c.616-.343 1.616-.342 2.23 0l5.27 2.94C14.501 3.538 15 4.38 15 5.071v5.856c0 .692-.501 1.533-1.115 1.876l-5.27 2.939c-.616.343-1.616.342-2.23 0l-5.27-2.94C.499 12.462 0 11.622 0 10.929V5.072C0 4.38.501 3.54 1.115 3.196Zm1.423 3.817c-.169-.341-.446-.341-.615 0L6.38 5.717c-.169.341-.616.665-.994.72l-1.82.264c-.378.055-.464.317-.19.583l1.317 1.278c.273.266.444.79.38 1.165l-.31 1.806c-.066.376.158.538.496.36l1.628-.853c.338-.177.89-.177 1.23 0l1.627.853c.337.177.561.015.497-.36l-.31-1.806c-.065-.375.105-.899.379-1.165l1.316-1.278c.274-.266.188-.529-.19-.583l-1.819-.264c-.377-.054-.825-.378-.994-.72Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"jx_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#jx_svg__a"})),React.createElement("use",{fill:"#8DC9FF",fillRule:"nonzero",xlinkHref:"#jx_svg__a"}),React.createElement("circle",{cx:-1.5,cy:-3.5,r:16.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#jx_svg__b)"}),React.createElement("circle",{cx:-2.5,cy:-4.5,r:12.5,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#jx_svg__b)"})));var xl="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNNi4zODUuMjU3Yy42MTYtLjM0MyAxLjYxNi0uMzQyIDIuMjMgMGw1LjI3IDIuOTRDMTQuNTAxIDMuNTM4IDE1IDQuMzggMTUgNS4wNzF2NS44NTZjMCAuNjkyLS41MDEgMS41MzMtMS4xMTUgMS44NzZsLTUuMjcgMi45MzljLS42MTYuMzQzLTEuNjE2LjM0Mi0yLjIzIDBsLTUuMjctMi45NEMuNDk5IDEyLjQ2MiAwIDExLjYyMiAwIDEwLjkyOVY1LjA3MkMwIDQuMzguNTAxIDMuNTQgMS4xMTUgMy4xOTZabTEuNDIzIDMuODE3Yy0uMTY5LS4zNDEtLjQ0Ni0uMzQxLS42MTUgMEw2LjM4IDUuNzE3Yy0uMTY5LjM0MS0uNjE2LjY2NS0uOTk0LjcybC0xLjgyLjI2NGMtLjM3OC4wNTUtLjQ2NC4zMTctLjE5LjU4M2wxLjMxNyAxLjI3OGMuMjczLjI2Ni40NDQuNzkuMzggMS4xNjVsLS4zMSAxLjgwNmMtLjA2Ni4zNzYuMTU4LjUzOC40OTYuMzZsMS42MjgtLjg1M2MuMzM4LS4xNzcuODktLjE3NyAxLjIzIDBsMS42MjcuODUzYy4zMzcuMTc3LjU2MS4wMTUuNDk3LS4zNmwtLjMxLTEuODA2Yy0uMDY1LS4zNzUuMTA1LS44OTkuMzc5LTEuMTY1bDEuMzE2LTEuMjc4Yy4yNzQtLjI2Ni4xODgtLjUyOS0uMTktLjU4M2wtMS44MTktLjI2NGMtLjM3Ny0uMDU0LS44MjUtLjM3OC0uOTk0LS43MloiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48dXNlIGZpbGw9IiM4REM5RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI2EiLz48Y2lyY2xlIGN4PSItMS41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLTIuNSIgY3k9Ii00LjUiIHI9IjEyLjUiIGZpbGw9IiNFRUY3RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgbWFzaz0idXJsKCNiKSIvPjwvZz48L3N2Zz4=",Il=Object.defineProperty,vi=Object.getOwnPropertySymbols,ms=Object.prototype.hasOwnProperty,Xs=Object.prototype.propertyIsEnumerable,qa=(gt,Pt,Lt)=>Pt in gt?Il(gt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):gt[Pt]=Lt,wl=(gt,Pt)=>{for(var Lt in Pt||(Pt={}))ms.call(Pt,Lt)&&qa(gt,Lt,Pt[Lt]);if(vi)for(var Lt of vi(Pt))Xs.call(Pt,Lt)&&qa(gt,Lt,Pt[Lt]);return gt};const Dl=gt=>React.createElement("svg",wl({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},gt),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,Ia=Object.getOwnPropertySymbols,Ga=Object.prototype.hasOwnProperty,Na=Object.prototype.propertyIsEnumerable,$l=(gt,Pt,Lt)=>Pt in gt?nc(gt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):gt[Pt]=Lt,_u=(gt,Pt)=>{for(var Lt in Pt||(Pt={}))Ga.call(Pt,Lt)&&$l(gt,Lt,Pt[Lt]);if(Ia)for(var Lt of Ia(Pt))Na.call(Pt,Lt)&&$l(gt,Lt,Pt[Lt]);return gt};const Wa=gt=>React.createElement("svg",_u({width:22,height:20,xmlns:"http://www.w3.org/2000/svg"},gt),React.createElement("title",null,"\u5927\u70B9\u8D5E"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M3.566 19.08V8.134c0-.443-.318-.802-.71-.802H1.34c-.73 0-1.322.67-1.322 1.496v9.558c0 .827.593 1.496 1.322 1.496h1.515c.392 0 .71-.36.71-.802Z",fill:"#A3D3FF"}),React.createElement("path",{d:"M4.585 19.303V7.9c0-.263.188-.495.459-.559.955-.229 3.147-1.049 4.08-3.848.567-2.451 1.182-3.607 3.008-3.469 1.826.139 1.948 1.804 1.948 2.312v3.93s-.148.602.468.649c.617.046 5.426 0 5.426 0s2.639-.042 1.8 3.031c-.73 2.673-2.173 6.974-2.537 8.05a2.324 2.324 0 0 1-.324.626c-.353.483-1.094 1.258-2.228 1.258H5.201c-.341.002-.616-.257-.616-.577Z",fill:"#FFF"})));var Za="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMy41NjYgMTkuMDhWOC4xMzRjMC0uNDQzLS4zMTgtLjgwMi0uNzEtLjgwMkgxLjM0Yy0uNzMgMC0xLjMyMi42Ny0xLjMyMiAxLjQ5NnY5LjU1OGMwIC44MjcuNTkzIDEuNDk2IDEuMzIyIDEuNDk2aDEuNTE1Yy4zOTIgMCAuNzEtLjM2LjcxLS44MDJaIiBmaWxsPSIjQTNEM0ZGIi8+PHBhdGggZD0iTTQuNTg1IDE5LjMwM1Y3LjljMC0uMjYzLjE4OC0uNDk1LjQ1OS0uNTU5Ljk1NS0uMjI5IDMuMTQ3LTEuMDQ5IDQuMDgtMy44NDguNTY3LTIuNDUxIDEuMTgyLTMuNjA3IDMuMDA4LTMuNDY5IDEuODI2LjEzOSAxLjk0OCAxLjgwNCAxLjk0OCAyLjMxMnYzLjkzcy0uMTQ4LjYwMi40NjguNjQ5Yy42MTcuMDQ2IDUuNDI2IDAgNS40MjYgMHMyLjYzOS0uMDQyIDEuOCAzLjAzMWMtLjczIDIuNjczLTIuMTczIDYuOTc0LTIuNTM3IDguMDVhMi4zMjQgMi4zMjQgMCAwIDEtLjMyNC42MjZjLS4zNTMuNDgzLTEuMDk0IDEuMjU4LTIuMjI4IDEuMjU4SDUuMjAxYy0uMzQxLjAwMi0uNjE2LS4yNTctLjYxNi0uNTc3WiIgZmlsbD0iI0ZGRiIvPjwvZz48L3N2Zz4=",Uu={flex_box_center:"flex_box_center___Fl60v",flex_space_between:"flex_space_between___bECvI",flex_box_vertical_center:"flex_box_vertical_center___NasnL",flex_box_center_end:"flex_box_center_end___llsAF",flex_box_column:"flex_box_column___KaTPF",discuss:"discuss___fk6PE",reply:"reply___pOmly",pagination:"pagination___qEsHX"},yc=Ee(95237),Eu=Ee(43604),Rl={flex_box_center:"flex_box_center___qGmgZ",flex_space_between:"flex_space_between___PeDhE",flex_box_vertical_center:"flex_box_vertical_center___avs2o",flex_box_center_end:"flex_box_center_end___bpXQB",flex_box_column:"flex_box_column___bc5wd",discussItem:"discussItem___zcesj",wrap:"wrap___ezVW4",list:"list___EEOWp",btns:"btns___Niwl7",secondLevelDiscuss:"secondLevelDiscuss___TXG1b",line:"line___ejh2a",thirdlyLevelDiscuss:"thirdlyLevelDiscuss___HRI5Q"},Sc=(gt,Pt,Lt)=>new Promise((Sn,hn)=>{var sn=wn=>{try{vn(Lt.next(wn))}catch(zn){hn(zn)}},mn=wn=>{try{vn(Lt.throw(wn))}catch(zn){hn(zn)}},vn=wn=>wn.done?Sn(wn.value):Promise.resolve(wn.value).then(sn,mn);vn((Lt=Lt.apply(gt,Pt)).next())});const Gu=({id:gt,cb:Pt})=>{const[Lt,Sn]=(0,Le.useState)("");return Le.createElement("aside",{className:"mt10"},Le.createElement(wr.Z,{defaultValue:Lt,id:"writeForumsReviewId",onChange:hn=>{Sn(hn)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),Le.createElement(yc.Z,null,Le.createElement(Eu.Z,{flex:"1"}),Le.createElement(Eu.Z,null,Le.createElement(dt.ZP,{type:"primary",size:"middle",onClick:()=>Sc(void 0,null,function*(){Lt===""?Pe.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):Pt(gt,Lt)})},"\u53D1\u9001"))))},Lu=({data:gt})=>{var Pt;return Le.createElement("div",{className:Rl.thirdlyLevelDiscuss},Le.createElement("span",{className:"c-grey-333"},Le.createElement("span",{className:"font 14 c-light-primary"},(Pt=gt==null?void 0:gt.author)==null?void 0:Pt.name),"@",Le.createElement("span",{className:"font 14 c-light-primary"},gt==null?void 0:gt.parent_name),":"),Le.createElement(Ae.Z,{value:gt==null?void 0:gt.content}))},bl=({data:gt,onReplyDiscuss:Pt,thirdlyReply:Lt,setThirdlyReply:Sn})=>{var hn,sn,mn,vn;const wn=(0,ar.eY)();return console.log(wn,"user"),Le.createElement("div",{className:Rl.list},Le.createElement("img",{src:ve.Z.IMG_SERVER+"/images/"+((hn=gt==null?void 0:gt.author)==null?void 0:hn.image_url)}),Le.createElement("div",{className:Rl.wrap},Le.createElement("div",{className:"font14",style:{marginBottom:6}},Le.createElement("span",{className:"c-grey-333"},(sn=gt==null?void 0:gt.author)==null?void 0:sn.name),(wn==null?void 0:wn.login)!==((mn=gt==null?void 0:gt.author)==null?void 0:mn.login)&&Le.createElement("span",{onClick:()=>Sn(gt==null?void 0:gt.id),className:"c-grey-999 current",style:{float:"right"}},Le.createElement("i",{className:"iconfont icon-huifu3 mr3 font12"}),Le.createElement("span",null,"\u56DE\u590D"))),Le.createElement(Ae.Z,{value:gt==null?void 0:gt.content}),(vn=gt==null?void 0:gt.children)==null?void 0:vn.map(zn=>Le.createElement(Lu,{key:zn.id,data:zn})),Lt===(gt==null?void 0:gt.id)&&Le.createElement("div",null,Le.createElement(Gu,{id:gt==null?void 0:gt.id,cb:Pt}),Le.createElement("div",{style:{textAlign:"end",paddingTop:20},onClick:()=>Sn(null),className:"c-light-primary current"},Le.createElement("i",{style:{transform:"scale(0.7)",display:"inline-block"},className:"iconfont icon-shouqi font12"}),"\u6536\u8D77\u56DE\u590D")),Le.createElement("div",{className:Rl.line})))};var xc=({data:gt,onReplyDiscuss:Pt,secondReply:Lt,setSecondReply:Sn,thirdlyReply:hn,setThirdlyReply:sn,onPlusDiscuss:mn})=>{var vn,wn,zn,ni;const[Wn,wi]=(0,Le.useState)(!1);return console.log(gt,"data"),Le.createElement("div",{className:Rl.discussItem},Le.createElement("div",{className:Rl.list},Le.createElement("img",{src:ve.Z.IMG_SERVER+"/images/"+((vn=gt==null?void 0:gt.author)==null?void 0:vn.image_url)}),Le.createElement("div",{className:Rl.wrap},Le.createElement("div",{className:"font14",style:{marginBottom:6}},Le.createElement("span",{className:"c-grey-333 mr30"},(wn=gt==null?void 0:gt.author)==null?void 0:wn.name),Le.createElement("span",{className:"c-grey-999"},gt==null?void 0:gt.time)),Le.createElement(Ae.Z,{value:gt==null?void 0:gt.content}),Le.createElement("div",{className:Rl.btns},Le.createElement("div",{onClick:()=>mn(gt==null?void 0:gt.id),className:gt!=null&>.user_praise?"c-light-primary":"c-grey-999"},Le.createElement("i",{className:"iconfont icon-xiaodianzan2 mr3"}),Le.createElement("span",null,gt==null?void 0:gt.praise_count)),Le.createElement("div",{onClick:()=>{var Zn;((Zn=gt==null?void 0:gt.children)==null?void 0:Zn.length)!==0&&(Sn(null),wi(!Wn))},style:{color:Wn?"#0152d9":"#999999"}},Le.createElement("i",{className:"iconfont icon-xiaopinglun2 mr3"}),Le.createElement("span",null,Wn?"\u6536\u8D77\u8BC4\u8BBA":(zn=gt==null?void 0:gt.children)==null?void 0:zn.length)),Le.createElement("div",{onClick:()=>{wi(!1),Sn(Lt===(gt==null?void 0:gt.id)?null:gt==null?void 0:gt.id)},style:{color:Lt===(gt==null?void 0:gt.id)?"#0152d9":"#999999"}},Le.createElement("i",{className:"iconfont icon-huifu3 mr3"}),Le.createElement("span",null,Lt===(gt==null?void 0:gt.id)?"\u6536\u8D77\u56DE\u590D":"\u56DE\u590D"))),Lt===(gt==null?void 0:gt.id)&&Le.createElement(Gu,{id:gt==null?void 0:gt.id,cb:(Zn,gi)=>{Pt(Zn,gi),wi(!0)}}),Wn&&Le.createElement("div",{className:Rl.secondLevelDiscuss},(ni=gt==null?void 0:gt.children)==null?void 0:ni.map(Zn=>Le.createElement(bl,{thirdlyReply:hn,setThirdlyReply:sn,key:Zn.id,data:Zn,onReplyDiscuss:Pt}))))))},lu=(gt,Pt,Lt)=>new Promise((Sn,hn)=>{var sn=wn=>{try{vn(Lt.next(wn))}catch(zn){hn(zn)}},mn=wn=>{try{vn(Lt.throw(wn))}catch(zn){hn(zn)}},vn=wn=>wn.done?Sn(wn.value):Promise.resolve(wn.value).then(sn,mn);vn((Lt=Lt.apply(gt,Pt)).next())}),Uo=({identifier:gt,active:Pt,onOk:Lt})=>{const[Sn,hn]=(0,Le.useState)(""),[sn,mn]=(0,Le.useState)(1),[vn,wn]=(0,Le.useState)([]),[zn,ni]=(0,Le.useState)(0),[Wn,wi]=(0,Le.useState)(null),[Zn,gi]=(0,Le.useState)(null);(0,Le.useEffect)(()=>{si(1),mn(1)},[Pt]);const si=Ai=>lu(void 0,null,function*(){const rr=yield An({container_type:"QuestionSolutionArticle",container_identifier:Pt,limit:5,page:Ai});rr!=null&&rr.comments&&(wn((rr==null?void 0:rr.comments)||[]),mn(Ai),ni(rr==null?void 0:rr.disscuss_count))}),Oi=()=>lu(void 0,null,function*(){if(Sn===""){Pe.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");return}const Ai=yield Di({comments:{content:Sn},container_type:"QuestionSolutionArticle",container_identifier:Pt});Ai!=null&&Ai.discuss&&(hn(""),si(sn),Lt())}),Ni=(Ai,rr,ti)=>lu(void 0,null,function*(){const ji=yield ai({container_type:"QuestionSolutionArticle",container_identifier:Pt,comments:{content:rr,parent_id:Ai}});wi(null),gi(null),si(sn)}),Ui=Ai=>lu(void 0,null,function*(){const rr=yield oi(Ai);si(sn)}),ki=Ai=>{mn(Ai),si(Ai)};return Le.createElement("div",{className:Uu.discuss},Le.createElement("aside",{className:Uu.reply,style:{borderWidth:zn?1:0}},Le.createElement(wr.Z,{defaultValue:Sn,id:"writeForumsReviewId",onChange:Ai=>{hn(Ai)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),Le.createElement(yc.Z,null,Le.createElement(Eu.Z,{flex:"1"}),Le.createElement(Eu.Z,null,Le.createElement(dt.ZP,{type:"primary",size:"middle",onClick:()=>Oi()},"\u53D1\u9001")))),vn==null?void 0:vn.map(Ai=>Le.createElement(xc,{secondReply:Wn,setSecondReply:wi,thirdlyReply:Zn,setThirdlyReply:gi,key:Ai.id,data:Ai,onReplyDiscuss:Ni,onPlusDiscuss:Ui})),Le.createElement(Kt.Z,{className:Uu.pagination,showTotal:Ai=>Le.createElement("span",{style:{color:"#656F87"}},"\u5171",Le.createElement("span",{className:"c-light-primary"},Ai),"\u6761\u6570\u636E"),current:sn,onChange:ki,total:zn,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5}))},ka=Ee(71839),ra=Object.defineProperty,Ds=Object.getOwnPropertySymbols,bs=Object.prototype.hasOwnProperty,ks=Object.prototype.propertyIsEnumerable,Zs=(gt,Pt,Lt)=>Pt in gt?ra(gt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):gt[Pt]=Lt,Ks=(gt,Pt)=>{for(var Lt in Pt||(Pt={}))bs.call(Pt,Lt)&&Zs(gt,Lt,Pt[Lt]);if(Ds)for(var Lt of Ds(Pt))ks.call(Pt,Lt)&&Zs(gt,Lt,Pt[Lt]);return gt},Yl=(gt,Pt,Lt)=>new Promise((Sn,hn)=>{var sn=wn=>{try{vn(Lt.next(wn))}catch(zn){hn(zn)}},mn=wn=>{try{vn(Lt.throw(wn))}catch(zn){hn(zn)}},vn=wn=>wn.done?Sn(wn.value):Promise.resolve(wn.value).then(sn,mn);vn((Lt=Lt.apply(gt,Pt)).next())}),Rs=({active:gt,identifier:Pt,onAssist:Lt,onEdit:Sn,onArticlesSkip:hn,onClose:sn,onOk:mn,onDelete:vn,detailsIndex:wn,btnShowStatus:zn})=>{var ni,Wn,wi,Zn,gi,si,Oi,Ni,Ui,ki;const[Ai,rr]=(0,Le.useState)(!0),[ti,ji]=(0,Le.useState)({});(0,Le.useEffect)(()=>{gt&&Li()},[gt,wn]);const Li=(Yi=!0)=>Yl(void 0,null,function*(){Yi&&rr(!0);const Ci=yield(0,ge.wO)(Pt,{active:gt});(Ci==null?void 0:Ci.status)===0&&ji((Ci==null?void 0:Ci.data)||{}),rr(!1)}),bi=Yi=>Yl(void 0,null,function*(){const Ci=yield(0,ge.qe)(Pt,Ks({active:gt},Yi));(Ci==null?void 0:Ci.status)===0&&(Li(!1),mn())}),$i=Yi=>Yl(void 0,null,function*(){(yield(0,ge.Rg)(Pt,{active:Yi==null?void 0:Yi.id})).status===0&&(Li(!1),mn())}),pi=Yi=>{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:()=>vn(Yi)})},sr=()=>{Li(!1),mn()};return Le.createElement("div",{className:Eo.listDetails},Le.createElement(ua.Z,{className:"pt20 pl20 pr20",loading:Ai,active:!0,paragraph:{rows:5}},Le.createElement("div",{className:Eo.head},Le.createElement("div",{className:Eo.name},Le.createElement("div",{title:ti==null?void 0:ti.name,className:Eo.title},ti==null?void 0:ti.name),(ti==null?void 0:ti.is_authority)&&Le.createElement("div",{className:Eo.b},"\u5B98\u65B9"),(ti==null?void 0:ti.is_excellent)&&Le.createElement("div",{className:Eo.a},"\u7CBE\u9009")),Le.createElement("div",{className:Eo.tag},Le.createElement("img",{src:ve.Z.IMG_SERVER+"/images/"+(ti==null?void 0:ti.image_url)}),Le.createElement("div",{className:"c-grey-333 ml5 mr20 font14"},ti==null?void 0:ti.username),Le.createElement("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12"},"\u53D1\u5E03\u4E8E",We()(ti==null?void 0:ti.created_at).format("YYYY-MM-DD")),Le.createElement("span",null,Le.createElement("img",{src:hi}),Le.createElement("span",null,ti==null?void 0:ti.praises_count)),Le.createElement("span",null,Le.createElement("img",{src:fr}),Le.createElement("span",null,ti==null?void 0:ti.discusses_count)),Le.createElement("span",null,Le.createElement("img",{src:co}),Le.createElement("span",null,ti==null?void 0:ti.viewed_count)),Le.createElement("div",{className:Eo.btn},((0,ar.Ny)()||(ti==null?void 0:ti.is_self))&&Le.createElement(Le.Fragment,null,Le.createElement(dt.ZP,{onClick:()=>pi(ti),type:"primary",ghost:!0},"\u5220\u9664"),Le.createElement(dt.ZP,{onClick:()=>Sn(ti),type:"primary",ghost:!0},"\u7F16\u8F91")),(0,ar.Ny)()&&Le.createElement(dt.ZP,{onClick:()=>bi({is_authority:!(ti!=null&&ti.is_authority)}),type:"primary"},Le.createElement("img",{src:Fr}),ti!=null&&ti.is_authority?"\u53D6\u6D88":"\u8BBE\u4E3A","\u5B98\u65B9"),(0,ar.Ny)()&&Le.createElement(dt.ZP,{onClick:()=>bi({is_excellent:!(ti!=null&&ti.is_excellent)}),type:"primary"},Le.createElement("img",{src:xl}),ti!=null&&ti.is_excellent?"\u53D6\u6D88":"\u8BBE\u4E3A","\u7CBE\u9009")))),Le.createElement("div",{className:Eo.scroll},((Wn=(ni=ti==null?void 0:ti.videos)==null?void 0:ni[0])==null?void 0:Wn.id)&&Le.createElement("div",{className:Eo.video},Le.createElement(Se.Z,{tip:"\u6B63\u5728\u8F6C\u7801\uFF0C\u8BF7\u7A0D\u7B49...",spinning:!((Zn=(wi=ti==null?void 0:ti.videos)==null?void 0:wi[0])!=null&&Zn.transcoded)},Le.createElement(ka.Z,{poster:(si=(gi=ti==null?void 0:ti.videos)==null?void 0:gi[0])==null?void 0:si.cover_url,src:((Ni=(Oi=ti==null?void 0:ti.videos)==null?void 0:Oi[0])==null?void 0:Ni.play_url)||"",videoId:(ki=(Ui=ti==null?void 0:ti.videos)==null?void 0:Ui[0])==null?void 0:ki.id,logWatchHistory:()=>{}}))),Le.createElement(Ae.Z,{className:Eo.html,value:(ti==null?void 0:ti.content)||""}),Le.createElement("div",{onClick:()=>$i(ti),className:Eo.g},Le.createElement("img",{className:"mr10",src:(ti!=null&&ti.user_liker,Za)}),Le.createElement("span",null,ti==null?void 0:ti.praises_count)),Le.createElement(Uo,{onOk:sr,active:gt,identifier:Pt})),Le.createElement("div",{className:Eo.btns},Le.createElement(dt.ZP,{onClick:()=>sn(),type:"primary",ghost:!0},"\u5173\u95ED"),zn[0]&&Le.createElement(dt.ZP,{onClick:Yi=>hn(Yi,"prev"),style:{marginLeft:20},type:"primary"},"\u4E0A\u4E00\u9898\u89E3"),zn[1]&&Le.createElement(dt.ZP,{onClick:Yi=>hn(Yi,"next"),style:{marginLeft:20},type:"primary"},"\u4E0B\u4E00\u9898\u89E3"))))},xh=Object.defineProperty,nh=Object.getOwnPropertySymbols,wc=Object.prototype.hasOwnProperty,gr=Object.prototype.propertyIsEnumerable,bc=(gt,Pt,Lt)=>Pt in gt?xh(gt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):gt[Pt]=Lt,nn=(gt,Pt)=>{for(var Lt in Pt||(Pt={}))wc.call(Pt,Lt)&&bc(gt,Lt,Pt[Lt]);if(nh)for(var Lt of nh(Pt))gr.call(Pt,Lt)&&bc(gt,Lt,Pt[Lt]);return gt};const Yn=gt=>React.createElement("svg",nn({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},gt),React.createElement("defs",null,React.createElement("path",{id:"a_svg__a",d:"M13.727 0C14.983 0 16 .895 16 2v12c0 1.105-1.017 2-2.273 2H2.273C1.017 16 0 15.105 0 14V2C0 .895 1.017 0 2.273 0h11.454ZM7.464 11H2.955c-.266 0-.513.19-.646.5s-.133.69 0 1c.133.31.38.5.646.5h4.509c.411 0 .745-.448.745-1s-.334-1-.745-1Zm4-3.5H2.955c-.411 0-.745.448-.745 1s.334 1 .745 1h8.509c.412 0 .746-.448.746-1s-.334-1-.746-1ZM3.71 2.75a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"a_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#a_svg__a"})),React.createElement("use",{fill:"#7DC1FF",fillRule:"nonzero",xlinkHref:"#a_svg__a"}),React.createElement("circle",{cx:1.5,cy:.5,r:16.5,fill:"#A3D3FF",fillRule:"nonzero",mask:"url(#a_svg__b)"}),React.createElement("ellipse",{cx:1.5,cy:-.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#a_svg__b)",rx:12.5,ry:12}),React.createElement("ellipse",{cx:-2.5,cy:-4,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#a_svg__b)",rx:12.5,ry:12})));var wh="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNMTMuNzI3IDBDMTQuOTgzIDAgMTYgLjg5NSAxNiAydjEyYzAgMS4xMDUtMS4wMTcgMi0yLjI3MyAySDIuMjczQzEuMDE3IDE2IDAgMTUuMTA1IDAgMTRWMkMwIC44OTUgMS4wMTcgMCAyLjI3MyAwaDExLjQ1NFpNNy40NjQgMTFIMi45NTVjLS4yNjYgMC0uNTEzLjE5LS42NDYuNXMtLjEzMy42OSAwIDFjLjEzMy4zMS4zOC41LjY0Ni41aDQuNTA5Yy40MTEgMCAuNzQ1LS40NDguNzQ1LTFzLS4zMzQtMS0uNzQ1LTFabTQtMy41SDIuOTU1Yy0uNDExIDAtLjc0NS40NDgtLjc0NSAxcy4zMzQgMSAuNzQ1IDFoOC41MDljLjQxMiAwIC43NDYtLjQ0OC43NDYtMXMtLjMzNC0xLS43NDYtMVpNMy43MSAyLjc1YTEuNSAxLjUgMCAxIDAgMCAzIDEuNSAxLjUgMCAwIDAgMC0zWiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzdEQzFGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9IjEuNSIgY3k9Ii41IiByPSIxNi41IiBmaWxsPSIjQTNEM0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiLz48ZWxsaXBzZSBjeD0iMS41IiBjeT0iLS41IiBmaWxsPSIjQzFFMkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48ZWxsaXBzZSBjeD0iLTIuNSIgY3k9Ii00IiBmaWxsPSIjRUVGN0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48L2c+PC9zdmc+",Qh=Ee(59477),Mu=Ee(89489),Tu=Object.defineProperty,Wu=Object.defineProperties,bh=Object.getOwnPropertyDescriptors,Cc=Object.getOwnPropertySymbols,Vs=Object.prototype.hasOwnProperty,Vr=Object.prototype.propertyIsEnumerable,Da=(gt,Pt,Lt)=>Pt in gt?Tu(gt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):gt[Pt]=Lt,$s=(gt,Pt)=>{for(var Lt in Pt||(Pt={}))Vs.call(Pt,Lt)&&Da(gt,Lt,Pt[Lt]);if(Cc)for(var Lt of Cc(Pt))Vr.call(Pt,Lt)&&Da(gt,Lt,Pt[Lt]);return gt},Ms=(gt,Pt)=>Wu(gt,bh(Pt)),xo=(gt,Pt,Lt)=>new Promise((Sn,hn)=>{var sn=wn=>{try{vn(Lt.next(wn))}catch(zn){hn(zn)}},mn=wn=>{try{vn(Lt.throw(wn))}catch(zn){hn(zn)}},vn=wn=>wn.done?Sn(wn.value):Promise.resolve(wn.value).then(sn,mn);vn((Lt=Lt.apply(gt,Pt)).next())}),dl=({identifier:gt,tabStatus:Pt,setFilterListTotal:Lt,setListStatus:Sn})=>{const hn={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null};let[sn,mn]=(0,Le.useState)($s({},hn));const[vn,wn]=(0,Le.useState)(!1),[zn,ni]=(0,Le.useState)(0),[Wn,wi]=(0,Le.useState)(1),[Zn,gi]=(0,Le.useState)(null),[si,Oi]=(0,Le.useState)([]),[Ni,Ui]=(0,Le.useState)([!0,!0]),[ki,Ai]=(0,Le.useState)(0),rr=(0,Le.useRef)(null);(0,Le.useEffect)(()=>{Gi()},[Pt]),(0,Le.useEffect)(()=>{ti()},[Zn]),(0,Le.useEffect)(()=>{Li($s({},hn)),Gi()},[gt]),(0,Le.useEffect)(()=>(window.addEventListener("resize",ji),Sn(ki),()=>{window.removeEventListener("resize",ji)}),[ki]);const ti=()=>xo(void 0,null,function*(){if(!Zn){Ui([!0,!0]);return}const Ar=[!0,!0],Yr=si==null?void 0:si.findIndex(rs=>rs.id===Zn);Yr===0&&sn.page===1&&(Ar[0]=!1),(sn.page-1)*sn.limit+(Yr+1)===sn.total&&(Ar[1]=!1),Ui(Ar)}),ji=()=>{var Ar;if(ki){const Yr=window.innerWidth-((Ar=rr.current)==null?void 0:Ar.clientWidth);ni(Yr)}},Li=Ar=>xo(void 0,null,function*(){var Yr,rs,Wr;wn(!0);const Er=yield(0,ge.WH)(gt,Ar);return(Er==null?void 0:Er.status)===0&&(Oi(((Yr=Er==null?void 0:Er.data)==null?void 0:Yr.articles)||[]),mn(Ms($s({},Ar),{total:(rs=Er==null?void 0:Er.data)==null?void 0:rs.articles_count})),Lt((Wr=Er==null?void 0:Er.data)==null?void 0:Wr.articles_count)),wn(!1),Er}),bi=()=>{(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,Gi(),mn($s({},sn)),Li(sn)},$i=()=>{sn.page=1,sn.search=sn==null?void 0:sn.save_search,Gi(),mn($s({},sn)),Li(sn)},pi=()=>{var Ar;const Yr=document.getElementsByClassName("btn-resize");Yr[0].style.visibility="hidden";const rs=window.innerWidth-((Ar=rr.current)==null?void 0:Ar.clientWidth);ni(rs)},sr=()=>{pi(),Ai(1)},Yi=Ar=>{pi(),gi(Ar==null?void 0:Ar.id),Ai(3)},Ci=Ar=>{pi(),gi(Ar==null?void 0:Ar.id),Ai(2)},Gi=()=>{const Ar=document.getElementsByClassName("btn-resize");Ar[0].style.visibility="visible",ni(0),Ai(0),gi(null)},vr=Ar=>{Ai(3),gi(Ar),sn.page=1,mn($s({},sn)),Li(sn)},qi=Ar=>{Ai(3),gi(Ar),mn($s({},sn)),Li(sn)},So=Ar=>{mn($s({},sn)),Li(sn)},Co=Ar=>xo(void 0,null,function*(){(yield(0,ge.Rg)(gt,{active:Ar==null?void 0:Ar.id})).status===0&&(Li(sn),wi(Wn+1))}),is=Ar=>xo(void 0,null,function*(){(yield(0,ge.rL)(gt,{active:Ar==null?void 0:Ar.id})).status===0&&(Li(sn),wi(Wn+1))}),so=Ar=>xo(void 0,null,function*(){(yield(0,ge.de)(gt,{active:Ar==null?void 0:Ar.id})).status===0&&(Gi(),Li(sn))}),Tr=Ar=>{sn.page=Ar,mn($s({},sn)),Li(sn)},No=(Ar,Yr)=>xo(void 0,null,function*(){var rs,Wr,Er,Xr;const br=si==null?void 0:si.findIndex(ao=>ao.id===Zn);if(console.log(br,Yr,22),Yr==="prev"){if(br===void 0){Pe.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(br===0){if(sn.page===1){Pe.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(sn.page!==1){sn.page=sn.page-1,mn($s({},sn));const ao=yield Li(sn);if((ao==null?void 0:ao.status)===0){const Lr=(Er=ao==null?void 0:ao.data)==null?void 0:Er.articles[((Wr=(rs=ao==null?void 0:ao.data)==null?void 0:rs.articles)==null?void 0:Wr.length)-1];gi(Lr==null?void 0:Lr.id),console.log(Ar.target,555)}}}else{const ao=si[br-1];gi(ao==null?void 0:ao.id)}}if(Yr==="next"){if(br===void 0){Pe.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if((sn.page-1)*sn.limit+(br+1)===sn.total){Pe.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(br+1===sn.limit){sn.page=sn.page+1,mn($s({},sn));const ao=yield Li(sn);if((ao==null?void 0:ao.status)===0){const Lr=(Xr=ao==null?void 0:ao.data)==null?void 0:Xr.articles[0];gi(Lr==null?void 0:Lr.id)}}else{const ao=si[br+1];gi(ao==null?void 0:ao.id)}}});return Le.createElement("div",{className:Et.wrap,ref:rr},Le.createElement("div",{className:Et.head},Le.createElement("div",{className:Et.sort,onClick:bi},Le.createElement("span",null,"\u6700\u65B0"),Le.createElement("aside",null,Le.createElement(Qh.Z,{style:{color:(sn==null?void 0:sn.sort_direction)==="asc"?"#0152d9":"#bfbfbf"}}),Le.createElement(Mu.Z,{style:{color:(sn==null?void 0:sn.sort_direction)==="desc"?"#0152d9":"#bfbfbf"}}))),Le.createElement(ht.default.Search,{value:sn.save_search,className:Et["oj-width-input"],placeholder:"\u641C\u7D22\u9898\u89E3",onChange:Ar=>{sn.save_search=Ar.target.value,mn($s({},sn))},onSearch:$i}),Le.createElement("div",{onClick:sr,className:Et.btn},Le.createElement("img",{src:wh}),"\u5199\u9898\u89E3")),Le.createElement("div",{className:Et.listWarp},Le.createElement(Se.Z,{spinning:vn,className:"mt20"},si==null?void 0:si.map((Ar,Yr)=>{let rs=!0;return Yr+1===si.length&&Yr!==0&&(rs=!1),Le.createElement(Hi,{active:Zn,key:Ar.id,data:Ar,showLine:rs,onClick:Yi,onAssist:Co,onHide:is})}),(si==null?void 0:si.length)===0&&Le.createElement(et.Z,{customText:"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"}))),Le.createElement(Kt.Z,{className:Et.pagination,showTotal:Ar=>Le.createElement("span",{style:{color:"#656F87"}},"\u5171",Le.createElement("span",{className:"c-light-primary"},Ar),"\u6761\u6570\u636E"),total:sn.total,showSizeChanger:!1,current:sn==null?void 0:sn.page,onChange:Tr,hideOnSinglePage:!0,showQuickJumper:!0}),ki>0&&Le.createElement("div",{className:Et.fixedRight,style:{width:zn}},ki===1&&Le.createElement(Ao,{identifier:gt,onClose:Gi,onOk:vr}),ki===2&&Le.createElement(Ao,{active:Zn,identifier:gt,onClose:Gi,onOk:qi}),ki===3&&Le.createElement(Rs,{btnShowStatus:Ni,onArticlesSkip:No,detailsIndex:Wn,active:Zn,identifier:gt,onClose:Gi,onOk:So,onEdit:Ci,onAssist:Co,onDelete:so})))},cs={flex_box_center:"flex_box_center___BbEkt",flex_space_between:"flex_space_between___v3cDl",flex_box_vertical_center:"flex_box_vertical_center___wUFLn",flex_box_center_end:"flex_box_center_end___Tdr08",flex_box_column:"flex_box_column___fYHlj",wrap:"wrap___UAZFM",head:"head___Nl6hk",title:"title___Ir573",content:"content___xUewa",list:"list___oi2ig",footer:"footer___V3bwQ"},Cl=Object.defineProperty,Ea=Object.defineProperties,Pc=Object.getOwnPropertyDescriptors,Go=Object.getOwnPropertySymbols,Ka=Object.prototype.hasOwnProperty,Vo=Object.prototype.propertyIsEnumerable,vs=(gt,Pt,Lt)=>Pt in gt?Cl(gt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):gt[Pt]=Lt,ds=(gt,Pt)=>{for(var Lt in Pt||(Pt={}))Ka.call(Pt,Lt)&&vs(gt,Lt,Pt[Lt]);if(Go)for(var Lt of Go(Pt))Vo.call(Pt,Lt)&&vs(gt,Lt,Pt[Lt]);return gt},Bs=(gt,Pt)=>Ea(gt,Pc(Pt)),Fo=(gt,Pt,Lt)=>new Promise((Sn,hn)=>{var sn=wn=>{try{vn(Lt.next(wn))}catch(zn){hn(zn)}},mn=wn=>{try{vn(Lt.throw(wn))}catch(zn){hn(zn)}},vn=wn=>wn.done?Sn(wn.value):Promise.resolve(wn.value).then(sn,mn);vn((Lt=Lt.apply(gt,Pt)).next())}),Gr=({visible:gt,onVisible:Pt,value:Lt,onChange:Sn,setIndex:hn})=>{var sn;const mn={page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null};let[vn,wn]=(0,Le.useState)(mn);const[zn,ni]=(0,Le.useState)([]),[Wn,wi]=(0,Le.useState)([]),[Zn,gi]=(0,Le.useState)(!1),si=(0,Le.useRef)([]),Oi=(0,Le.useRef)(null),Ni=(0,Te.useParams)();(0,Le.useEffect)(()=>(Ni!=null&&Ni.id&&(Oi.current=setInterval(()=>{Ui(30)},3e4)),()=>{clearInterval(Oi.current)}),[]);const Ui=pi=>Fo(void 0,null,function*(){const sr=yield(0,ge.uc)(Ni==null?void 0:Ni.id,{practice_time:pi})});(0,Le.useEffect)(()=>{Li(vn),ti()},[]),(0,Le.useEffect)(()=>(window.addEventListener("click",Ai),()=>{window.removeEventListener("click",Ai)}),[Ni==null?void 0:Ni.save_identifier,gt]),(0,Le.useEffect)(()=>{const pi=si.current.findIndex(vr=>vr.identifier===(Ni==null?void 0:Ni.save_identifier)),sr=si.current[pi-1],Yi=si.current[pi+1],Ci=document.getElementById("oj-prev"),Gi=document.getElementById("oj-next");sr?Ci.style.display="block":Ci.style.display="none",Yi?Gi.style.display="block":Gi.style.display="none"},[Ni==null?void 0:Ni.save_identifier,si.current]);const ki=(pi,sr)=>{if(pi.id===sr)return pi;for(let Yi=0,Ci=pi;Ci=Ci.parentNode;Yi++){if(Ci.id===sr)return Ci;if(Ci==document.documentElement)return!1}},Ai=pi=>Fo(void 0,null,function*(){!ki(pi.target,"oj-drawer")&>&&Pt(!1);const sr=si.current.findIndex(Gi=>Gi.identifier===(Ni==null?void 0:Ni.save_identifier)),Yi=si.current[sr-1],Ci=si.current[sr+1];if(pi.target.id==="oj-prev"){if(!Yi||sr===-1){Pe.ZP.warning("\u4E0A\u4E00\u9898\u4E0D\u5B58\u5728");return}pi.target.style.pointerEvents="none",pi.target.style.cursor="not-allowed",yield bi(Yi==null?void 0:Yi.identifier),hn("0"),setTimeout(()=>{pi.target.style.pointerEvents="auto",pi.target.style.cursor="pointer"},400)}if(pi.target.id==="oj-next"||pi.target.id==="oj-modal-next"){if(!Ci||sr===-1){Pe.ZP.warning("\u4E0B\u4E00\u9898\u4E0D\u5B58\u5728");return}pi.target.style.pointerEvents="none",pi.target.style.cursor="not-allowed",yield bi(Ci==null?void 0:Ci.identifier),hn("0"),setTimeout(()=>{pi.target.style.pointerEvents="auto",pi.target.style.cursor="pointer"},400)}});(0,Le.useEffect)(()=>{Sn(Ni==null?void 0:Ni.save_identifier);const pi=Wn.findIndex(sr=>sr.some(Yi=>Yi.identifier===(Ni==null?void 0:Ni.save_identifier)));wn(pi===-1?Bs(ds({},vn),{page:1}):Bs(ds({},vn),{page:pi+1}))},[Ni==null?void 0:Ni.save_identifier,Wn]);const rr=pi=>{vn.page=1,vn.tag_discipline_id=pi,wn(ds({},vn)),Li(vn)},ti=()=>Fo(void 0,null,function*(){const pi=yield(0,$n.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});ni(pi.tag_disciplines||[])}),ji=pi=>{vn.page=1,vn.difficulty=typeof pi=="number"?pi:null,wn(ds({},vn)),Li(vn)},Li=pi=>Fo(void 0,null,function*(){var sr,Yi;gi(!0);const Ci=yield(0,ge.KC)(pi);if(Ci!=null&&Ci.practices_list){for(var Gi=(sr=Ci==null?void 0:Ci.practices_list)==null?void 0:sr.length,vr=[],qi=0;qi<Gi;qi+=vn==null?void 0:vn.per_page)vr.push((Yi=Ci==null?void 0:Ci.practices_list)==null?void 0:Yi.slice(qi,qi+(vn==null?void 0:vn.per_page)));wn(Bs(ds({},vn),{total:Ci==null?void 0:Ci.practices_count})),si.current=(Ci==null?void 0:Ci.practices_list)||[],wi(vr)}gi(!1)}),bi=(pi,sr)=>Fo(void 0,null,function*(){const Yi=yield(0,$n.ZP)(`/api/practices/${pi}/start`,{method:"get"});(Yi==null?void 0:Yi.status)===0&&Te.history.push(`/problems/${Yi==null?void 0:Yi.identifier}/oj/${pi}`)}),$i=pi=>{vn.page=pi,wn(ds({},vn))};return Le.createElement("div",{className:cs.wrap,id:"oj-drawer",style:{left:gt?0:-700}},Le.createElement("div",{className:cs.head},Le.createElement("div",{className:cs.title},"\u9898\u76EE\u5217\u8868"),Le.createElement(ht.default.Search,{value:vn==null?void 0:vn.save_search,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22",style:{width:180,marginLeft:"auto",marginRight:10},onChange:pi=>{vn.save_search=pi.target.value,wn(ds({},vn))},onSearch:()=>{vn.page=1,vn.search=vn.save_search,wn(ds({},vn)),Li(vn)}}),Le.createElement(xe.default,{value:vn==null?void 0:vn.tag_discipline_id,style:{width:210},mode:"multiple",placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,showArrow:!0,getPopupContainer:pi=>pi.parentNode,maxTagTextLength:2,maxTagCount:2,onChange:rr},zn.map(pi=>Le.createElement(xe.default.Option,{key:pi.id,value:pi.id},pi.name))),Le.createElement(xe.default,{style:{width:70,marginLeft:10},allowClear:!0,placeholder:"\u96BE\u5EA6",getPopupContainer:pi=>pi.parentNode,value:vn==null?void 0:vn.difficulty,onChange:ji},Le.createElement(xe.default.Option,{value:1},"\u7B80\u5355"),Le.createElement(xe.default.Option,{value:2},"\u9002\u4E2D"),Le.createElement(xe.default.Option,{value:3},"\u56F0\u96BE"))),Le.createElement("div",{className:cs.content},Le.createElement(Se.Z,{spinning:Zn},(sn=Wn==null?void 0:Wn[vn.page-1])==null?void 0:sn.map(pi=>Le.createElement("div",{key:pi.identifier,className:cs.list,onClick:sr=>bi(pi.identifier,sr)},Le.createElement("i",{style:{visibility:Lt===pi.identifier?"visible":"hidden"},className:"iconfont icon-wancheng1 c-green-29b"}),Le.createElement("span",{style:{fontWeight:Lt===pi.identifier?"bold":400,color:Lt===pi.identifier?"#ffffff":"#bac4cd"},title:pi==null?void 0:pi.name},pi.name),(pi==null?void 0:pi.difficulty)===1&&Le.createElement("b",{style:{color:"#2FA34F"}},"\u7B80\u5355"),(pi==null?void 0:pi.difficulty)===2&&Le.createElement("b",{style:{color:"#0152d9"}},"\u9002\u4E2D"),(pi==null?void 0:pi.difficulty)===3&&Le.createElement("b",{style:{color:"#FA6400"}},"\u56F0\u96BE"))))),Le.createElement("div",{className:cs.footer},Le.createElement(Kt.Z,{showTotal:pi=>Le.createElement("span",{style:{color:"#656F87"}},"\u5171",Le.createElement("span",{className:"c-light-primary"},pi),"\u6761\u6570\u636E"),total:vn.total,pageSize:vn==null?void 0:vn.per_page,current:vn==null?void 0:vn.page,showSizeChanger:!1,onChange:$i,showQuickJumper:!0,hideOnSinglePage:!0})))},Ad=({hack:gt,onTriggerPraise:Pt,topicId:Lt,page:Sn,onPageChange:hn,user:sn,submitRecords:mn,submitting:vn,submitResult:wn})=>{const[zn]=(0,Te.useSearchParams)(),ni=(0,Te.useLocation)(),[Wn,wi]=(0,Le.useState)(zn.get("tab")||"0"),[Zn,gi]=(0,Le.useState)(0),[si,Oi]=(0,Le.useState)(0),[Ni,Ui]=(0,Le.useState)(0),[ki,Ai]=(0,Le.useState)(),[rr,ti]=(0,Le.useState)(!1);function ji(bi){const $i=bi.target.id;if(Wn==="3"&&$i!==Wn&&(si===1||si===2)){he.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:()=>{wi($i)}});return}wi($i)}(0,Le.useEffect)(()=>lt.Z.subscribe("to-commit-info",()=>{wi("1")}),[]);function Li(){wi("2")}return Le.createElement("div",{className:Bt["left-panel"]},Le.createElement("ul",{className:`${Bt["s-navs"]} ${Bt["bg-white"]} ${Bt.b1}`},Le.createElement("li",{className:"mr40 current"},Le.createElement("img",{onClick:()=>ti(!0),src:kn})),Le.createElement("li",{className:Bt["oj-mr"]},Le.createElement("a",{className:Wn==="0"?Bt.active:"",id:"0",onClick:ji},"\u4EFB\u52A1\u63CF\u8FF0")),Le.createElement("li",{className:Bt["oj-mr"]},Le.createElement("a",{className:Wn==="3"?Bt.active:"",id:"3",onClick:ji},"\u9898\u89E3",Ni?`(${Ni})`:"")),Le.createElement("li",{className:Bt["oj-mr"]},Le.createElement("a",{className:Wn==="2"?Bt.active:"",id:"2",onClick:ji},"\u8BC4\u8BBA",Zn?`(${Zn})`:"")),Le.createElement("li",null,Le.createElement("a",{className:Wn==="1"?Bt.active:"",id:"1",onClick:ji},"\u63D0\u4EA4\u8BB0\u5F55"))),Le.createElement("div",{className:`${Bt["tab-panel-body"]} ${Wn==="0"?"":"hide"}`,style:{padding:"0 0 0 16px"}},Le.createElement(Ze,{hack:gt,onTriggerPraise:Pt,toDiscuss:Li})),Le.createElement("div",{className:`${Bt["tab-panel-body"]} ${Wn==="1"?"":"hide"}`},mn!=null&&mn.records_count?Le.createElement(qe,{page:Sn,onPageChange:hn,topicId:Lt,submitting:vn,submitRecords:mn,submitResult:wn}):Le.createElement(et.Z,null)),Le.createElement("div",{className:`${Bt["tab-panel-body"]} ${Wn==="2"?"":"hide"}`,style:{padding:0}},Le.createElement(kt,{setDiscussTotal:gi,user:sn,identifier:gt.identifier,hack:gt,onTriggerPraise:Pt})),Le.createElement("div",{className:`${Bt["tab-panel-body"]} ${Wn==="3"?"":"hide"}`,style:{padding:0}},Le.createElement(dl,{setListStatus:Oi,setFilterListTotal:Ui,tabStatus:Wn,identifier:gt.identifier})),Le.createElement(Gr,{visible:rr,setIndex:wi,onVisible:bi=>ti(bi),value:ki,onChange:bi=>Ai(bi)}))},Wo=Ee(19105),Nd=Ee(62522),ih=Ee(39775),rh=Ee(93450),Od=Ee(89392),Ch=Ee.n(Od),ic=Ee(56102),ro=Ee(59301),ns=Object.defineProperty,ku=Object.defineProperties,qh=Object.getOwnPropertyDescriptors,Au=Object.getOwnPropertySymbols,ed=Object.prototype.hasOwnProperty,uu=Object.prototype.propertyIsEnumerable,Fl=(gt,Pt,Lt)=>Pt in gt?ns(gt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):gt[Pt]=Lt,ps=(gt,Pt)=>{for(var Lt in Pt||(Pt={}))ed.call(Pt,Lt)&&Fl(gt,Lt,Pt[Lt]);if(Au)for(var Lt of Au(Pt))uu.call(Pt,Lt)&&Fl(gt,Lt,Pt[Lt]);return gt},Fs=(gt,Pt)=>ku(gt,qh(Pt)),rc=(gt,Pt)=>{var Lt={};for(var Sn in gt)ed.call(gt,Sn)&&Pt.indexOf(Sn)<0&&(Lt[Sn]=gt[Sn]);if(gt!=null&&Au)for(var Sn of Au(gt))Pt.indexOf(Sn)<0&&uu.call(gt,Sn)&&(Lt[Sn]=gt[Sn]);return Lt},el=(gt,Pt,Lt)=>new Promise((Sn,hn)=>{var sn=wn=>{try{vn(Lt.next(wn))}catch(zn){hn(zn)}},mn=wn=>{try{vn(Lt.throw(wn))}catch(zn){hn(zn)}},vn=wn=>wn.done?Sn(wn.value):Promise.resolve(wn.value).then(sn,mn);vn((Lt=Lt.apply(gt,Pt)).next())});const{Countdown:Id}=be.default,td={Java:"java",C:"c",Python:"py","C++":"c"};var Dd=(gt=>(gt[gt.SET_LOADING=0]="SET_LOADING",gt[gt.GET_DATA=1]="GET_DATA",gt[gt.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",gt[gt.SET_DATA=3]="SET_DATA",gt[gt.SET_DEBUGING=4]="SET_DEBUGING",gt[gt.SET_SUBMITING=5]="SET_SUBMITING",gt[gt.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",gt[gt.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",gt[gt.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",gt[gt.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",gt[gt.SET_PAGE=10]="SET_PAGE",gt[gt.GET_LANGUAGE=11]="GET_LANGUAGE",gt[gt.GET_DRAWER=12]="GET_DRAWER",gt))(Dd||{});function Oa(){return new Date().getTime()}const oc={loading:!0,data:void 0,showNote:!1,debugResult:void 0,submitResult:void 0,debuging:!1,submitting:!1,submitRecords:void 0,submitRecordPage:1,executingMessage:"",languageValue:"",languageList:[],drawerData:[]};function gf(gt,Pt){switch(Pt.type){case 1:return ps(ps({},gt),Pt.payload);case 3:return Fs(ps({},gt),{data:Pt.payload});case 0:return Fs(ps({},gt),{loading:Pt.payload});case 11:return Fs(ps({},gt),{languageList:Pt.payload});case 12:return Fs(ps({},gt),{drawerData:Pt.payload});case 9:return Fs(ps({},gt),{showNote:Pt.payload});case 4:return Fs(ps({},gt),{debuging:Pt.payload});case 5:return Fs(ps({},gt),{submitting:Pt.payload});case 2:return Fs(ps({},gt),{submitRecords:Pt.payload});case 10:return Fs(ps({},gt),{submitRecordPage:Pt.payload});case 6:return Fs(ps({},gt),{executingMessage:Pt.payload});case 7:return ps(ps({},gt),Pt.payload);case 8:return ps(ps({},gt),Pt.payload);default:throw new Error}}var Rt=({children:gt})=>{var Pt,Lt,Sn,hn;const[sn,mn]=(0,Le.useReducer)(gf,oc),{id:vn}=(0,Te.useParams)(),wn=(0,Te.useLocation)(),[zn]=(0,Te.useSearchParams)(),{languageValue:ni,languageList:Wn,loading:wi,data:Zn,debugResult:gi,submitResult:si,submitRecords:Oi,submitRecordPage:Ni,showNote:Ui,debuging:ki,submitting:Ai,executingMessage:rr}=sn,[ti,ji]=(0,Le.useState)("#FFF"),[Li,bi]=(0,Le.useState)(null),[$i,pi]=(0,Le.useState)({}),[sr,Yi]=(0,Le.useState)(!1),Ci=(0,Le.useRef)(null),Gi=(0,Le.useRef)(null),vr=Zn==null?void 0:Zn.user,qi=Zn==null?void 0:Zn.hack;(0,Le.useEffect)(()=>((0,Te.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,Te.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,Te.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,Te.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,Le.useEffect)(()=>{setTimeout(()=>{document.title="\u5728\u7EBF\u5237\u9898"},400)}),(0,Le.useEffect)(()=>{var Jr;if(sr){const Io=document.getElementById("oj-next"),Cs=document.getElementById("oj-modal-next");((Jr=Io==null?void 0:Io.style)==null?void 0:Jr.display)==="none"?Cs.style.display="none":Cs.style.display="block"}},[sr]),(0,Le.useEffect)(()=>{function Jr(){return el(this,null,function*(){var Io,Cs,Lo;const Jo=yield(0,ge.fu)(vn);if(Jo.status===401)document.location.href="/user/login";else{Jo.hack=Jo.practice,Jo.hack.code=St.Base64.decode((Io=Jo==null?void 0:Jo.hack)==null?void 0:Io.code);const Ss=`${vr==null?void 0:vr.login}-language`;localStorage.getItem(Ss)&&(Jo.hack.language=localStorage.getItem(Ss)),Gi.current=Ch().cloneDeep(Jo),Gi.current.language=(Cs=Jo==null?void 0:Jo.hack)==null?void 0:Cs.language,mn({type:1,payload:{loading:!1,data:Jo}}),mn({type:8,payload:{languageValue:(Lo=Jo==null?void 0:Jo.hack)==null?void 0:Lo.language}})}})}vn&&Jr()},[vn]),(0,Le.useEffect)(()=>{mn({type:8,payload:{debugResult:void 0}}),is(),Yi(!1)},[vn]),(0,Le.useEffect)(()=>{clearTimeout(Ci.current)},[vn]),(0,Le.useEffect)(()=>{Co()},[vn,Ni]);const So=()=>{window.parent.postMessage("backExercise","*")};function Co(){return el(this,null,function*(){try{const Jr=yield(0,ge.zO)(vn,{limit:15,page:Ni});mn({type:2,payload:Jr})}catch(Jr){console.log(Jr)}})}function is(){return el(this,null,function*(){try{const Jr=yield(0,ge.dd)(vn);mn({type:11,payload:Jr==null?void 0:Jr.data})}catch(Jr){console.log(Jr)}})}function so(Jr){mn({type:10,payload:Jr})}function Tr(Jr){return el(this,null,function*(){var Io,Cs,Lo;const Jo=((Lo=(Cs=(Io=window==null?void 0:window.location)==null?void 0:Io.pathname)==null?void 0:Cs.split("/"))==null?void 0:Lo[2])||vn;return yield(0,ge.n4)(Jo,Jr||{code:St.Base64.encode(qi.code),language:ni})})}function No(){return el(this,null,function*(){var Jr;if(!qi.code||((Jr=qi.code)==null?void 0:Jr.trim())===""){Pe.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(!Ai){mn({type:5,payload:!0});try{if(lt.Z.publish("to-commit-info"),(yield Tr()).status===0){let Pl=function(){return el(this,null,function*(){const{status:Qo,data:qo}=yield(0,ge.rX)(vn,"submit"),Ts=Oa()-Js>(Jo*Ss+3)*1e3;if(Qo!==0&&!Ts&&setTimeout(Pl,1e3),Ts){he.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),mn({type:5,payload:!1});return}if(Qo===0){qo.status===2&&he.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"});const ma=yield(0,ge.zO)(vn,{limit:15,page:Ni});mn({type:8,payload:Fs(ps({},sn),{submitResult:qo,submitting:!1,submitRecords:ma})}),(qo==null?void 0:qo.status)===0&&Yi(!0)}})},Cs={};if((yield(0,ge.bM)(vn,Cs)).status===-1&&zn.get("exercisesId")){window.parent.location.href=`/classrooms/${zn.get("coursesId")}/exercise/${zn.get("exercisesId")}/detail`;return}const{time_limit:Jo,test_case_size:Ss}=qi,Js=Oa();Pl()}}catch(Io){mn({type:5,payload:!1})}}})}function Ar(){return el(this,null,function*(){var Jr;if(!qi.code||((Jr=qi.code)==null?void 0:Jr.trim())===""){Pe.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,mn({type:4,payload:!0});try{if((yield Tr()).status===0){let Js=function(){return el(this,null,function*(){const{status:Pl,message:Qo,data:qo}=yield(0,ge.rX)(vn,"debug"),Ts=Oa()-Ss>(Cs+3)*1e3;if(Pl!==0&&!Ts&&(mn({type:6,payload:Qo}),setTimeout(Js,1e3)),Ts){he.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),mn({type:4,payload:!1});return}Pl===0&&(mn({type:4,payload:!1}),qo.status===2&&he.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),mn({type:7,payload:Fs(ps({},sn),{debugResult:qo,debuging:!1})}))})};const{time_limit:Cs}=qi;let Lo={input:encodeURIComponent(Zn.test_case.input)};if((yield(0,ge.MU)(vn,Lo)).status===-1&&zn.get("exercisesId")){window.parent.location.href=`/classrooms/${zn.get("coursesId")}/exercise/${zn.get("exercisesId")}/detail`;return}const Ss=Oa();Js()}else mn({type:4,payload:!1})}catch(Io){console.log(Io)}finally{}})}function Yr(Jr){var Io;clearTimeout(Ci.current),Ci.current=setTimeout(()=>{var Cs;Tr({code:St.Base64.encode(Jr),language:(Cs=Gi==null?void 0:Gi.current)==null?void 0:Cs.language})},2e3),mn({type:3,payload:Fs(ps({},Gi==null?void 0:Gi.current),{hack:Fs(ps({},(Io=Gi==null?void 0:Gi.current)==null?void 0:Io.hack),{code:Jr})})})}function rs(Jr){let Io=Jr.target.value;mn({type:3,payload:Fs(ps({},Zn),{test_case:{input:Io}})})}const Wr=Jr=>el(void 0,null,function*(){var Io;if(mn({type:0,payload:!0}),(yield Tr()).status===0){mn({type:8,payload:{languageValue:Jr}}),Gi.current.language=Jr;const Lo=`${vr==null?void 0:vr.login}-language`;localStorage.setItem(Lo,Jr);const Jo=yield(0,ge.dd)(vn);if(Jo.status===0){const Ss=(Io=Jo==null?void 0:Jo.data)==null?void 0:Io.find(Js=>Js.language===Jr);Yr(St.Base64.decode(Ss.code))}}setTimeout(()=>{mn({type:0,payload:!1})},300)});function Er(){return el(this,null,function*(){try{const Jr=yield(0,ge.H7)(vn,{language:ni});Jr.status===401?Te.history.replace("/login",{from:wn.pathname}):(Yr(St.Base64.decode(Jr.code)),is())}catch(Jr){console.log(Jr)}})}function Xr(){he.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:ro.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",ro.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk(){return el(this,null,function*(){const Jr=yield(0,ge.fi)(vn,{language:ni});Jr.status===401?Te.history.replace("/login",{from:wn.pathname}):Yr(St.Base64.decode(Jr.code))})}})}function br(){mn({type:9,payload:!0})}function ao(){mn({type:9,payload:!1})}function Lr(Jr){return el(this,null,function*(){yield(0,ge.MK)(vn,Jr),mn({type:1,payload:{showNote:!1,data:Fs(ps({},Zn),{hack:Fs(ps({},qi),{notes:Jr.notes})})}})})}const ho={input:(Pt=Zn==null?void 0:Zn.test_case)==null?void 0:Pt.input,is_file:(Lt=Zn==null?void 0:Zn.test_case)==null?void 0:Lt.is_file,language:((Sn=Gi.current)==null?void 0:Sn.language)||(qi==null?void 0:qi.language),code:qi==null?void 0:qi.code,title:"main."+td[qi==null?void 0:qi.language],modify_code:qi==null?void 0:qi.modify_code,notes:qi==null?void 0:qi.notes,debugResult:gi,debuging:ki,submitting:Ai,executingMessage:rr,id:vn,languageValue:ni,languageList:Wn,onChangeLanguage:Wr,onCancelNote:ao,onAddNote:Lr,showNote:Ui,onShowNote:br,onSubmitCode:No,onChangeCode:Yr,onChangeInput:rs,onDebugCode:Ar,onResetCode:Er,onSyncCode:Xr,onUpdateCode:Tr};function Zo(){return el(this,null,function*(){const{praise_count:Jr}=yield(0,ge.vl)(qi.id,{container_type:"Hack",type:1});let Io=Fs(ps({},Zn),{hack:Fs(ps({},qi),{praises_count:Jr,user_praise:!qi.user_praise})});mn({type:3,payload:Io})})}const Ko={topicId:vn,submitResult:si,submitRecords:Oi,submitting:Ai,page:Ni,onPageChange:so,hack:qi,user:Zn==null?void 0:Zn.user,onTriggerPraise:Zo};return console.log(Zn,Gi==null?void 0:Gi.current,"data--------"),ro.createElement(ro.Fragment,null,ro.createElement(Se.Z,{className:"oj-custom-large-spin",size:"large",spinning:wi},Zn?ro.createElement("div",{className:"oj-custom-warp"},ro.createElement("header",{className:ut.Z.header,style:{minWidth:1200}},ro.createElement("div",null,ro.createElement("img",{src:`${ve.Z.IMG_SERVER}/images/${vr.image_url}`,alt:"user",width:30}),ro.createElement("span",null,vr.name)),ro.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},ro.createElement("div",null,qi.name),ro.createElement(Wo.Z,{onChange:Jr=>{},className:"font12 c-grey-999"})),ro.createElement(ic.CopyToClipboard,{text:`${(hn=window.location)==null?void 0:hn.origin}/problems/${qi.identifier}/share`,onCopy:()=>Pe.ZP.success("\u590D\u5236\u9898\u76EE\u94FE\u63A5\u6210\u529F")},ro.createElement("span",{className:ut.Z.btn_back,style:{marginRight:10,cursor:"pointer"}}," ",ro.createElement("i",{className:"iconfont icon-fenxiang1 font14 mr5"}),"\u5206\u4EAB\u9898\u76EE")),qi.edit_privilege?ro.createElement(Te.Link,{className:ut.Z.btn_back,to:`/problems/${qi.identifier}/ojedit`,style:{marginRight:10}}," ",ro.createElement(me.Z,null)," \u7F16\u8F91"):null,ro.createElement(Te.Link,{className:ut.Z.btn_back,onClick:()=>{},to:"/problems"}," ",ro.createElement(Ie.Z,null),"\u9000\u51FA")),ro.createElement(ce.Z,{hideResize:!0,className:"my-problems oj-problems",leftChild:ro.createElement(Ad,ps({},Ko)),rightChild:ro.createElement(ln,ps({},ho))})):null),ro.createElement(he.default,{centered:!0,closable:!1,width:680,footer:null,open:sr,className:"oj-modal"},ro.createElement("section",{className:"oj-modal-content"},ro.createElement("div",{className:"oj-modal-head"},ro.createElement("img",{src:Nd,alt:""}),ro.createElement("i",{onClick:()=>Yi(!1),className:"iconfont icon-guanbi1"})),ro.createElement("aside",null,ro.createElement("img",{className:"mr30",src:rh.Z}),"\u8FD0\u884C\u65F6\u95F4:\xA0",ro.createElement("span",{style:{color:"#75d6ba",marginRight:100}},si==null?void 0:si.execute_time,"s"),"\u4F18\u4E8E",ro.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(si==null?void 0:si.time_better_than)||100,"%"),"\u7684\u7528\u6237"),ro.createElement("aside",{className:"mb50"},ro.createElement("img",{src:ih.Z,className:"mr30"}),ro.createElement("span",{className:"oj-modal-tt"},ro.createElement("span",null,ro.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),ro.createElement("span",{className:"c-light-primary"},si==null?void 0:si.execute_memory,"mb")),ro.createElement("span",null,ro.createElement("span",null))),"\u4F18\u4E8E",ro.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(si==null?void 0:si.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),ro.createElement("div",{id:"oj-modal-next",className:"oj-modal-btn"},"\u8FDB\u5165\u4E0B\u4E00\u9898"))))};function zt({languageValue:gt,languageList:Pt,onChangeLanguage:Lt,title:Sn,modify_code:hn,onSyncCode:sn,onShowCodeSetting:mn,onResetCode:vn}){const wn=(0,Te.useLocation)(),zn=()=>{he.default.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:ro.createElement(de.Z,null),content:"\u4F60\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:vn})};return ro.createElement("div",{className:"action-bar"},ro.createElement(xe.default,{className:"oj-select",value:gt,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:Lt},Pt==null?void 0:Pt.map(ni=>ro.createElement(xe.default.Option,{key:ni.language,value:ni.language},ni.language))),ro.createElement("span",null),ro.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:zn},ro.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),ro.createElement("a",{onClick:mn},ro.createElement("i",{className:"iconfont icon-shezhi"})))}function ln(gt){var Pt=gt,{id:Lt,input:Sn,is_file:hn,showNote:sn,onShowNote:mn,notes:vn,onCancelNote:wn,onAddNote:zn,debugResult:ni,language:Wn,debuging:wi,submitting:Zn,executingMessage:gi,code:si,onSubmitCode:Oi,onDebugCode:Ni,onChangeCode:Ui,onChangeInput:ki,onUpdateCode:Ai}=Pt,rr=rc(Pt,["id","input","is_file","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]);function ti(Li){return ro.createElement(zt,Fs(ps({},rr),{onShowCodeSetting:Li}))}const ji={id:Lt,input:Sn,debugResult:ni,debuging:wi,is_file:hn,submitting:Zn,executingMessage:gi,onDebugCode:Ni,onChangeCode:Ui,onSubmitCode:Oi,onChangeInput:ki};return ro.createElement("div",{className:"right-panel"},ro.createElement(Ct,{onUpdateCode:()=>{},language:Wn,value:si,onChange:Ui,ActionBarRender:ti}),ro.createElement("div",{className:`note-form-area ${sn?"active":""}`},ro.createElement(vt,{onCancel:wn,notes:vn,callback:zn})),ro.createElement(Ft.ZP,ps({},ji)))}},35106:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{h:function(){return Le}});var Le=(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))(Le||{})},49802:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{H7:function(){return xe},KC:function(){return ue},M3:function(){return ie},MK:function(){return Se},MU:function(){return Te},Rg:function(){return ye},WH:function(){return z},X6:function(){return Pe},bM:function(){return Ie},bx:function(){return ee},dd:function(){return ve},de:function(){return Ce},fi:function(){return ge},fu:function(){return me},gu:function(){return oe},n4:function(){return ce},qe:function(){return le},rL:function(){return we},rX:function(){return he},uc:function(){return ke},vl:function(){return de},wO:function(){return se},zO:function(){return be}});var Le=Ee(99064);function me(Ne){return(0,Le.U2)(`mypractices/${Ne}.json`,{hidePopLogin:!0})}function Ie(Ne,je){return(0,Le.v_)(`mypractices/${Ne}/code_submit.json`,je)}function Te(Ne,je){return(0,Le.v_)(`mypractices/${Ne}/code_debug.json`,je)}function be(Ne,je){return je.language&&(je.language=encodeURIComponent(je.language)),(0,Le.U2)(`mypractices/${Ne}/submit_records.json`,je)}function Pe(Ne){return(0,Le.U2)("mypractices/record_detail.json",{id:Ne})}function he(Ne,je){return(0,Le.U2)(`mypractices/${Ne}/result.json`,{mode:je})}function Se(Ne,je){return(0,Le.v_)(`mypractices/${Ne}/add_notes.json`,je)}function xe(Ne,je){return(0,Le.v_)(`mypractices/${Ne}/restore_initial_code.json`,je)}function ge(Ne,je){return(0,Le.v_)(`mypractices/${Ne}/sync_code.json`,je)}function ce(Ne,je){return(0,Le.v_)(`mypractices/${Ne}/update_code.json`,je)}function ve(Ne){return(0,Le.v_)(`mypractices/${Ne}/initial_codes.json`)}function de(Ne,je){return(0,Le.v_)(`discusses/${Ne}/plus.json`,je)}function ue(Ne){return(0,Le.U2)("practices/practices_list.json",Ne)}function z(Ne,je){return(0,Le.U2)(`practices/${Ne}/question_solution_articles`,je)}function ee(Ne,je){return(0,Le.v_)(`practices/${Ne}/question_solution_articles`,je)}function oe(Ne,je){return(0,Le.gz)(`practices/${Ne}/question_solution_articles/${je==null?void 0:je.active}`,je)}function ie(Ne,je){return(0,Le.U2)(`practices/${Ne}/question_solution_articles/${je==null?void 0:je.active}/edit`,je)}function se(Ne,je){return(0,Le.U2)(`practices/${Ne}/question_solution_articles/${je==null?void 0:je.active}`,je)}function le(Ne,je){return(0,Le.v_)(`practices/${Ne}/question_solution_articles/${je==null?void 0:je.active}/set_authority_or_excellent`,je)}function ye(Ne,je){return(0,Le.v_)(`practices/${Ne}/question_solution_articles/${je==null?void 0:je.active}/praise_or_treads`,je)}function we(Ne,je){return(0,Le.v_)(`practices/${Ne}/question_solution_articles/${je==null?void 0:je.active}/hide`)}function Ce(Ne,je){return(0,Le.IV)(`practices/${Ne}/question_solution_articles/${je==null?void 0:je.active}`,je)}function ke(Ne,je){return(0,Le.v_)(`mypractices/${Ne}/update_practice_time_sum`,je)}},34362:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return de}});var Le=Ee(59301),me=Ee(8591),Ie=Ee(6848),Te=Ee(71418),be=Ee(95237),Pe=Ee(43604),he=Ee(58421),Se=Ee(3113),xe=Ee(12290),ge=Ee(99064),ce=Ee(85149),ve=(z,ee,oe)=>new Promise((ie,se)=>{var le=Ce=>{try{we(oe.next(Ce))}catch(ke){se(ke)}},ye=Ce=>{try{we(oe.throw(Ce))}catch(ke){se(ke)}},we=Ce=>Ce.done?ie(Ce.value):Promise.resolve(Ce.value).then(le,ye);we((oe=oe.apply(z,ee)).next())}),de=({id:z,activeDiscussIndex:ee,onReplyDiscuss:oe,adminOrOperator:ie})=>{const[se,le]=(0,Le.useState)(""),[ye,we]=(0,Le.useState)(!1);function Ce(Ne){le(Ne)}function ke(){if(!se){me.ZP.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}oe(z,se),le("")}return(0,Le.useEffect)(()=>{ee!=z&&we(!1)},[ee]),Le.createElement("div",{key:z,className:"discuss-item-editor",style:{display:ee===z?"block":"none",width:"100%"}},Le.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:Ce,extraUse:ie&&Le.createElement(Ie.Z,{color:"#fff",open:ye,destroyTooltipOnHide:!0,title:ue({id:z,isOpen:ye,activeDiscussIndex:ee,onChange:Ce,setIsOpen:we}),overlayStyle:{maxWidth:600}},Le.createElement("a",{title:ye?"\u5173\u95ED\u63A8\u8350":"\u6253\u5F00\u63A8\u8350",onClick:()=>we(!ye)},Le.createElement("i",{className:"iconfont icon-dianzan11"})))}),Le.createElement("a",{onClick:ke,className:"btn-send"},"\u53D1\u9001"))};const ue=z=>{const[ee,oe]=(0,Le.useState)(!1),[ie,se]=(0,Le.useState)([]),[le,ye]=(0,Le.useState)(1);(0,Le.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 Ce=yield(0,ge.ZP)(`/api/discusses/${z==null?void 0:z.id}/recommend_answer.json`,{method:"get"});(Ce==null?void 0:Ce.status)==0&&se(Ce==null?void 0:Ce.answer),oe(!1)});return Le.createElement(Te.Z,{spinning:ee},Le.createElement("div",{style:{color:"#000"}},Le.createElement(ce.Z,{className:"font14",style:{maxHeight:500,overflow:"auto"},value:(ie==null?void 0:ie[le-1])||""}),Le.createElement(be.Z,{justify:"end",align:"middle"},Le.createElement(Pe.Z,null,Le.createElement(he.Z,{simple:!0,current:le,pageSize:1,total:(ie==null?void 0:ie.length)||0,onChange:Ce=>{ye(Ce)}})),Le.createElement(Pe.Z,null,Le.createElement(Se.ZP,{onClick:()=>ve(void 0,null,function*(){z==null||z.onChange(ie==null?void 0:ie[le-1]),z==null||z.setIsOpen(!1)})},"\u586B\u5165\u6587\u672C\u6846")))))}},70750:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{o:function(){return xe}});var Le=Ee(99064),me=Ee(93125),Ie=Ee.n(me);let Te="",be,Pe="";function he(ge){Se(ge)}function Se(ge){be=new(Ie()).Vod({timeout:6e4,partSize:1048576,parallel:5,retryCount:3,retryDuration:2,region:"ap-southeast-1",userId:0x6803cbd867207,enableUploadProgress:!1,addFileSuccess:function(ce){console.log("addFileSuccess: "+ce.file.name),ge.addFileSuccess&&ge.addFileSuccess(ce),be.startUpload()},onUploadstarted:function(ce){const ve=ce.file.name;if(ce.videoId){var ue=`/api/users/${Te}/video_auths.json`;(0,Le.ZP)(ue,{method:"put",body:{video_id:ce.videoId,title:ve,file_name:ve,virtual_classroom_id:Pe}}).then(z=>{if(z.status==-1){ge.onUploadError&&ge.onUploadError(ce);return}const ee=z.data;var oe=ee.UploadAuth,ie=ee.UploadAddress,se=ee.VideoId;be.setUploadAuthAndAddress(ce,oe,ie)}).catch(z=>{be.deleteFile(be._curIndex),be.nextUpload(),console.log(z)})}else{var de=`/api/users/${Te}/video_auths.json`;const z="";(0,Le.ZP)(de,{method:"Post",body:{title:z+ve,file_name:z+ve,virtual_classroom_id:Pe}}).then(ee=>{if(ee){const le=ee.data;var oe=le.UploadAuth,ie=le.UploadAddress,se=le.VideoId;be.setUploadAuthAndAddress(ce,oe,ie,se)}}).catch(ee=>{be.deleteFile(be._curIndex),be.nextUpload(),console.log(ee)}),console.log("\u6587\u4EF6\u5F00\u59CB\u4E0A\u4F20...")}},onUploadSucceed:function(ce){ge.onUploadSucceed&&ge.onUploadSucceed(ce),console.log("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F!")},onUploadFailed:function(ce,ve,de){ge.onUploadFailed&&ge.onUploadFailed(ce),console.log("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25!")},onUploadCanceled:function(ce,ve,de){console.log("\u6587\u4EF6\u4E0A\u4F20\u5DF2\u6682\u505C!")},onUploadProgress:function(ce,ve,de){ge.onUploadProgress&&ge.onUploadProgress(ce,ve,de);var ue=Math.ceil(de*100);console.log("\u6587\u4EF6\u4E0A\u4F20\u4E2D...")},onUploadTokenExpired:function(ce){console.log("\u6587\u4EF6\u4E0A\u4F20\u8D85\u65F6!");var ve=`/api/users/${Te}/video_auths.json`;(0,Le.ZP)(ve,{method:"put",body:{video_id:ce.videoId}}).then(de=>{var z=de.data.UploadAuth;be.resumeUploadWithAuth(z)}).catch(de=>{console.log(de)})},onUploadEnd:function(ce){ge.onUploadEnd&&ge.onUploadEnd(ce),console.log("onUploadEnd: uploaded all the files")}}),ge.gotUploader&&ge.gotUploader(be)}function xe(ge,ce,ve){ge&&(Te=ge),ce&&(Pe=ce),he(ve)}},4901:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{BU:function(){return me},Dj:function(){return Le},gH:function(){return Ie},vp:function(){return Te}});function Le(be){try{be.mozRequestFullScreen?be.mozRequestFullScreen():be.webkitRequestFullScreen&&be.webkitRequestFullScreen()}catch(Pe){console.log(Pe,":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 Ie=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function Te(){var be=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,Pe=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",be),window.isFullScreen?window.isFullScreen:be!=null}},24768:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{AL:function(){return ye},Iy:function(){return ce},Qv:function(){return ue},ez:function(){return le},jb:function(){return ve}});var Le=Ee(32834),me=Ee.n(Le),Ie=Ee(11690),Te=Ee.n(Ie);let be=1;function Pe(je,Ve){const Qe=je.match(/^(\s+)(?:```)/);if(Qe===null)return Ve;const Ge=Qe[1];return Ve.split(`
|
|
|
`).map(mt=>{const ct=mt.match(/^\s+/);if(ct===null)return mt;const[Ct]=ct;return Ct.length>=Ge.length?mt.slice(Ge.length):mt}).join(`
|
|
|
`)}let he=[],Se=["<ul>"];const xe=new(me()).Renderer,ge=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function ce(){he.length=0,Se=["<ul>"]}const ve={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function de(je,Ve,Qe,Ge){if(Ve>=je.length||je[Ve].level<=Qe)return Ve;var mt=je[Ve];Ge.push("<li><a href='#"+be+mt.anchor+"'>"+mt.text+"</a>"),Ve++;var ct=[];return Ve=de(je,Ve,mt.level,ct),ct.length>0&&(Ge.push("<ul>"),ct.forEach(function(Ct){Ge.push(Ct)}),Ge.push("</ul>")),Ge.push("</li>"),Ve=de(je,Ve,Qe,Ge),Ve}function ue(){return de(he,0,0,Se),Se.push("</ul>"),Se.join("")}const z={heading(je){const Ve=ge.exec(je);if(be+=1,Ve)return{type:"heading",raw:Ve[0],depth:Ve[1].length,text:Ve[2]}},fences(je){const Ve=this.rules.block.fences.exec(je);if(Ve){const Qe=Ve[0];let Ge=Pe(Qe,Ve[3]||"");const mt=Ve[2]?Ve[2].trim():Ve[2];if(["latex","katex","math"].indexOf(mt)>=0){const ct=ie(),Ct=Ge;Ge=ct,se[ct]={type:"block",expression:Ct}}return{type:"code",raw:Qe,lang:mt,text:Ge}}}},ee=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let oe=0;const ie=()=>`__special_katext_id_${oe++}__`;let se={};function le(){return se}function ye(){oe=0,se={}}function we(je){return je=je.replace(ee,(Ve,Qe)=>{const Ge=ie();return se[Ge]={type:"inline",expression:Qe},Ge}),je}const Ce=xe.listitem;xe.listitem=function(je){return Ce(we(je))};const ke=xe.paragraph;xe.paragraph=function(je){return ke(we(je))};const Ne=xe.tablecell;xe.tablecell=function(je,Ve){return Ne(we(je),Ve)},xe.code=function(je,Ve,Qe){const Ge=(Ve||"").match(/\S*/)[0];return Ge?["latex","katex","math"].indexOf(Ge)>=0?`<p class='editormd-tex'>${je}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ve}">${Qe?je:(0,Ie.escape)(je,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(Qe?je:(0,Ie.escape)(je,!0))+"</code></pre>"},xe.heading=function(je,Ve,Qe){let Ge=this.options.headerPrefix+Qe.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return he.push({anchor:Ge,level:Ve,text:je}),"<h"+Ve+' id="'+be+Ge+'">'+je+"</h"+Ve+">"},me().setOptions({silent:!0,gfm:!0,pedantic:!1}),me().use({tokenizer:z,renderer:xe}),Yt.ZP=me()},16479:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{G:function(){return be},t:function(){return Te}});var Le=Ee(7062),me=Ee.n(Le);const Ie=null;function Te(Pe,he){let Se=me().get("__ec");Se||(Se={}),Se[Pe]=he,me().set("__ec",Se)}function be(Pe,he){let Se=me().get("__ec");return Se?Se[Pe]===void 0?he:Se[Pe]:he}},29382:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Do}});class Le{static install(){Object.setPrototypeOf=Object.setPrototypeOf||function($e,nt){return $e.__proto__=nt,$e},Object.assign=Object.assign||function($e){if($e==null)throw new TypeError("Cannot convert undefined or null to object");let nt=Object($e);for(let Je=1;Je<arguments.length;Je++){let wt=arguments[Je];if(wt!=null)for(let Nt in wt)wt.hasOwnProperty(Nt)&&(nt[Nt]=wt[Nt])}return nt},typeof self.Promise!="function"&&Ee(3867).polyfill()}}Le.install();var me=Le,Ie=Ee(86204),Te=Ee.n(Ie);class be{static e($e,nt){(!$e||be.FORCE_GLOBAL_TAG)&&($e=be.GLOBAL_TAG);let Je=`[${$e}] > ${nt}`;be.ENABLE_CALLBACK&&be.emitter.emit("log","error",Je),be.ENABLE_ERROR&&(console.error?console.error(Je):console.warn?console.warn(Je):console.log(Je))}static i($e,nt){(!$e||be.FORCE_GLOBAL_TAG)&&($e=be.GLOBAL_TAG);let Je=`[${$e}] > ${nt}`;be.ENABLE_CALLBACK&&be.emitter.emit("log","info",Je),be.ENABLE_INFO&&(console.info?console.info(Je):console.log(Je))}static w($e,nt){(!$e||be.FORCE_GLOBAL_TAG)&&($e=be.GLOBAL_TAG);let Je=`[${$e}] > ${nt}`;be.ENABLE_CALLBACK&&be.emitter.emit("log","warn",Je),be.ENABLE_WARN&&(console.warn?console.warn(Je):console.log(Je))}static d($e,nt){(!$e||be.FORCE_GLOBAL_TAG)&&($e=be.GLOBAL_TAG);let Je=`[${$e}] > ${nt}`;be.ENABLE_CALLBACK&&be.emitter.emit("log","debug",Je),be.ENABLE_DEBUG&&(console.debug?console.debug(Je):console.log(Je))}static v($e,nt){(!$e||be.FORCE_GLOBAL_TAG)&&($e=be.GLOBAL_TAG);let Je=`[${$e}] > ${nt}`;be.ENABLE_CALLBACK&&be.emitter.emit("log","verbose",Je),be.ENABLE_VERBOSE&&console.log(Je)}}be.GLOBAL_TAG="flv.js",be.FORCE_GLOBAL_TAG=!1,be.ENABLE_ERROR=!0,be.ENABLE_INFO=!0,be.ENABLE_WARN=!0,be.ENABLE_DEBUG=!0,be.ENABLE_VERBOSE=!0,be.ENABLE_CALLBACK=!1,be.emitter=new(Te());var Pe=be;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($e){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=$e,this._totalBytes+=$e):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=$e,this._totalBytes+=$e):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=$e,this._totalBytes+=$e,this._lastCheckpoint=this._now())}get currentKBps(){this.addBytes(0);let $e=(this._now()-this._lastCheckpoint)/1e3;return $e==0&&($e=1),this._intervalBytes/$e/1024}get lastSecondKBps(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}get averageKBps(){let $e=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/$e/1024}}var Se=he;class xe{constructor($e){this._message=$e}get name(){return"RuntimeException"}get message(){return this._message}toString(){return this.name+": "+this.message}}class ge extends xe{constructor($e){super($e)}get name(){return"IllegalStateException"}}class ce extends xe{constructor($e){super($e)}get name(){return"InvalidArgumentException"}}class ve extends xe{constructor($e){super($e)}get name(){return"NotImplementedException"}}const de={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},ue={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"};class z{constructor($e){this._type=$e||"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($e){this._onContentLengthKnown=$e}get onURLRedirect(){return this._onURLRedirect}set onURLRedirect($e){this._onURLRedirect=$e}get onDataArrival(){return this._onDataArrival}set onDataArrival($e){this._onDataArrival=$e}get onError(){return this._onError}set onError($e){this._onError=$e}get onComplete(){return this._onComplete}set onComplete($e){this._onComplete=$e}open($e,nt){throw new ve("Unimplemented abstract function!")}abort(){throw new ve("Unimplemented abstract function!")}}let ee={};function oe(){let Xn=self.navigator.userAgent.toLowerCase(),$e=/(edge)\/([\w.]+)/.exec(Xn)||/(opr)[\/]([\w.]+)/.exec(Xn)||/(chrome)[ \/]([\w.]+)/.exec(Xn)||/(iemobile)[\/]([\w.]+)/.exec(Xn)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Xn)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Xn)||/(webkit)[ \/]([\w.]+)/.exec(Xn)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(Xn)||/(msie) ([\w.]+)/.exec(Xn)||Xn.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(Xn)||Xn.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(Xn)||[],nt=/(ipad)/.exec(Xn)||/(ipod)/.exec(Xn)||/(windows phone)/.exec(Xn)||/(iphone)/.exec(Xn)||/(kindle)/.exec(Xn)||/(android)/.exec(Xn)||/(windows)/.exec(Xn)||/(mac)/.exec(Xn)||/(linux)/.exec(Xn)||/(cros)/.exec(Xn)||[],Je={browser:$e[5]||$e[3]||$e[1]||"",version:$e[2]||$e[4]||"0",majorVersion:$e[4]||$e[2]||"0",platform:nt[0]||""},wt={};if(Je.browser){wt[Je.browser]=!0;let Nt=Je.majorVersion.split(".");wt.version={major:parseInt(Je.majorVersion,10),string:Je.version},Nt.length>1&&(wt.version.minor=parseInt(Nt[1],10)),Nt.length>2&&(wt.version.build=parseInt(Nt[2],10))}if(Je.platform&&(wt[Je.platform]=!0),(wt.chrome||wt.opr||wt.safari)&&(wt.webkit=!0),wt.rv||wt.iemobile){wt.rv&&delete wt.rv;let Nt="msie";Je.browser=Nt,wt[Nt]=!0}if(wt.edge){delete wt.edge;let Nt="msedge";Je.browser=Nt,wt[Nt]=!0}if(wt.opr){let Nt="opera";Je.browser=Nt,wt[Nt]=!0}if(wt.safari&&wt.android){let Nt="android";Je.browser=Nt,wt[Nt]=!0}wt.name=Je.browser,wt.platform=Je.platform;for(let Nt in ee)ee.hasOwnProperty(Nt)&&delete ee[Nt];Object.assign(ee,wt)}oe();var ie=ee;class se extends z{static isSupported(){try{let $e=ie.msedge&&ie.version.minor>=15048,nt=ie.msedge?$e:!0;return self.fetch&&self.ReadableStream&&nt}catch($e){return!1}}constructor($e,nt){super("fetch-stream-loader"),this.TAG="FetchStreamLoader",this._seekHandler=$e,this._config=nt,this._needStash=!0,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),super.destroy()}open($e,nt){this._dataSource=$e,this._range=nt;let Je=$e.url;this._config.reuseRedirectedURL&&$e.redirectedURL!=null&&(Je=$e.redirectedURL);let wt=this._seekHandler.getConfig(Je,nt),Nt=new self.Headers;if(typeof wt.headers=="object"){let Et=wt.headers;for(let cn in Et)Et.hasOwnProperty(cn)&&Nt.append(cn,Et[cn])}let kt={method:"GET",headers:Nt,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(let Et in this._config.headers)Nt.append(Et,this._config.headers[Et]);$e.cors===!1&&(kt.mode="same-origin"),$e.withCredentials&&(kt.credentials="include"),$e.referrerPolicy&&(kt.referrerPolicy=$e.referrerPolicy),this._status=de.kConnecting,self.fetch(wt.url,kt).then(Et=>{if(this._requestAbort){this._requestAbort=!1,this._status=de.kIdle;return}if(Et.ok&&Et.status>=200&&Et.status<=299){if(Et.url!==wt.url&&this._onURLRedirect){let bn=this._seekHandler.removeURLParameters(Et.url);this._onURLRedirect(bn)}let cn=Et.headers.get("Content-Length");return cn!=null&&(this._contentLength=parseInt(cn),this._contentLength!==0&&this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)),this._pump.call(this,Et.body.getReader())}else if(this._status=de.kError,this._onError)this._onError(ue.HTTP_STATUS_CODE_INVALID,{code:Et.status,msg:Et.statusText});else throw new xe("FetchStreamLoader: Http code invalid, "+Et.status+" "+Et.statusText)}).catch(Et=>{if(this._status=de.kError,this._onError)this._onError(ue.EXCEPTION,{code:-1,msg:Et.message});else throw Et})}abort(){this._requestAbort=!0}_pump($e){return $e.read().then(nt=>{if(nt.done)if(this._contentLength!==null&&this._receivedLength<this._contentLength){this._status=de.kError;let Je=ue.EARLY_EOF,wt={code:-1,msg:"Fetch stream meet Early-EOF"};if(this._onError)this._onError(Je,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,$e.cancel();this._status=de.kBuffering;let Je=nt.value.buffer,wt=this._range.from+this._receivedLength;this._receivedLength+=Je.byteLength,this._onDataArrival&&this._onDataArrival(Je,wt,this._receivedLength),this._pump($e)}}).catch(nt=>{if(nt.code===11&&ie.msedge)return;this._status=de.kError;let Je=0,wt=null;if((nt.code===19||nt.message==="network error")&&(this._contentLength===null||this._contentLength!==null&&this._receivedLength<this._contentLength)?(Je=ue.EARLY_EOF,wt={code:nt.code,msg:"Fetch stream meet Early-EOF"}):(Je=ue.EXCEPTION,wt={code:nt.code,msg:nt.message}),this._onError)this._onError(Je,wt);else throw new xe(wt.msg)})}}var le=se;class ye extends z{static isSupported(){try{let $e=new XMLHttpRequest;return $e.open("GET","https://example.com",!0),$e.responseType="moz-chunked-arraybuffer",$e.responseType==="moz-chunked-arraybuffer"}catch($e){return Pe.w("MozChunkedLoader",$e.message),!1}}constructor($e,nt){super("xhr-moz-chunked-loader"),this.TAG="MozChunkedLoader",this._seekHandler=$e,this._config=nt,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($e,nt){this._dataSource=$e,this._range=nt;let Je=$e.url;this._config.reuseRedirectedURL&&$e.redirectedURL!=null&&(Je=$e.redirectedURL);let wt=this._seekHandler.getConfig(Je,nt);this._requestURL=wt.url;let Nt=this._xhr=new XMLHttpRequest;if(Nt.open("GET",wt.url,!0),Nt.responseType="moz-chunked-arraybuffer",Nt.onreadystatechange=this._onReadyStateChange.bind(this),Nt.onprogress=this._onProgress.bind(this),Nt.onloadend=this._onLoadEnd.bind(this),Nt.onerror=this._onXhrError.bind(this),$e.withCredentials&&(Nt.withCredentials=!0),typeof wt.headers=="object"){let kt=wt.headers;for(let Et in kt)kt.hasOwnProperty(Et)&&Nt.setRequestHeader(Et,kt[Et])}if(typeof this._config.headers=="object"){let kt=this._config.headers;for(let Et in kt)kt.hasOwnProperty(Et)&&Nt.setRequestHeader(Et,kt[Et])}this._status=de.kConnecting,Nt.send()}abort(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=de.kComplete}_onReadyStateChange($e){let nt=$e.target;if(nt.readyState===2){if(nt.responseURL!=null&&nt.responseURL!==this._requestURL&&this._onURLRedirect){let Je=this._seekHandler.removeURLParameters(nt.responseURL);this._onURLRedirect(Je)}if(nt.status!==0&&(nt.status<200||nt.status>299))if(this._status=de.kError,this._onError)this._onError(ue.HTTP_STATUS_CODE_INVALID,{code:nt.status,msg:nt.statusText});else throw new xe("MozChunkedLoader: Http code invalid, "+nt.status+" "+nt.statusText);else this._status=de.kBuffering}}_onProgress($e){if(this._status===de.kError)return;this._contentLength===null&&$e.total!==null&&$e.total!==0&&(this._contentLength=$e.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));let nt=$e.target.response,Je=this._range.from+this._receivedLength;this._receivedLength+=nt.byteLength,this._onDataArrival&&this._onDataArrival(nt,Je,this._receivedLength)}_onLoadEnd($e){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($e){this._status=de.kError;let nt=0,Je=null;if(this._contentLength&&$e.loaded<this._contentLength?(nt=ue.EARLY_EOF,Je={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(nt=ue.EXCEPTION,Je={code:-1,msg:$e.constructor.name+" "+$e.type}),this._onError)this._onError(nt,Je);else throw new xe(Je.msg)}}var we=ye;class Ce extends null{static isSupported(){try{if(typeof self.MSStream=="undefined"||typeof self.MSStreamReader=="undefined")return!1;let $e=new XMLHttpRequest;return $e.open("GET","https://example.com",!0),$e.responseType="ms-stream",$e.responseType==="ms-stream"}catch($e){return Log.w("MSStreamLoader",$e.message),!1}}constructor($e,nt){super("xhr-msstream-loader"),this.TAG="MSStreamLoader",this._seekHandler=$e,this._config=nt,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($e,nt){this._internalOpen($e,nt,!1)}_internalOpen($e,nt,Je){this._dataSource=$e,Je?this._currentRange=nt:this._totalRange=nt;let wt=$e.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?wt=this._currentRedirectedURL:$e.redirectedURL!=null&&(wt=$e.redirectedURL));let Nt=this._seekHandler.getConfig(wt,nt);this._currentRequestURL=Nt.url;let kt=this._reader=new self.MSStreamReader;kt.onprogress=this._msrOnProgress.bind(this),kt.onload=this._msrOnLoad.bind(this),kt.onerror=this._msrOnError.bind(this);let Et=this._xhr=new XMLHttpRequest;if(Et.open("GET",Nt.url,!0),Et.responseType="ms-stream",Et.onreadystatechange=this._xhrOnReadyStateChange.bind(this),Et.onerror=this._xhrOnError.bind(this),$e.withCredentials&&(Et.withCredentials=!0),typeof Nt.headers=="object"){let cn=Nt.headers;for(let bn in cn)cn.hasOwnProperty(bn)&&Et.setRequestHeader(bn,cn[bn])}if(typeof this._config.headers=="object"){let cn=this._config.headers;for(let bn in cn)cn.hasOwnProperty(bn)&&Et.setRequestHeader(bn,cn[bn])}this._isReconnecting?this._isReconnecting=!1:this._status=LoaderStatus.kConnecting,Et.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($e){let nt=$e.target;if(nt.readyState===2)if(nt.status>=200&&nt.status<=299){if(this._status=LoaderStatus.kBuffering,nt.responseURL!=null){let wt=this._seekHandler.removeURLParameters(nt.responseURL);nt.responseURL!==this._currentRequestURL&&wt!==this._currentRedirectedURL&&(this._currentRedirectedURL=wt,this._onURLRedirect&&this._onURLRedirect(wt))}let Je=nt.getResponseHeader("Content-Length");if(Je!=null&&this._contentLength==null){let wt=parseInt(Je);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:nt.status,msg:nt.statusText});else throw new RuntimeException("MSStreamLoader: Http code invalid, "+nt.status+" "+nt.statusText);else if(nt.readyState===3&&nt.status>=200&&nt.status<=299){this._status=LoaderStatus.kBuffering;let Je=nt.response;this._reader.readAsArrayBuffer(Je)}}_xhrOnError($e){this._status=LoaderStatus.kError;let nt=LoaderErrors.EXCEPTION,Je={code:-1,msg:$e.constructor.name+" "+$e.type};if(this._onError)this._onError(nt,Je);else throw new RuntimeException(Je.msg)}_msrOnProgress($e){let Je=$e.target.result;if(Je==null){this._doReconnectIfNeeded();return}let wt=Je.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=Je.byteLength;let Nt=this._totalRange.from+this._receivedLength;this._receivedLength+=wt.byteLength,this._onDataArrival&&this._onDataArrival(wt,Nt,this._receivedLength),Je.byteLength>=this._bufferLimit&&(Log.v(this.TAG,`MSStream buffer exceeded max size near ${Nt+wt.byteLength}, reconnecting...`),this._doReconnectIfNeeded())}_doReconnectIfNeeded(){if(this._contentLength==null||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();let $e={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,$e,!0)}}_msrOnLoad($e){this._status=LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}_msrOnError($e){this._status=LoaderStatus.kError;let nt=0,Je=null;if(this._contentLength&&this._receivedLength<this._contentLength?(nt=LoaderErrors.EARLY_EOF,Je={code:-1,msg:"MSStream meet Early-Eof"}):(nt=LoaderErrors.EARLY_EOF,Je={code:-1,msg:$e.constructor.name+" "+$e.type}),this._onError)this._onError(nt,Je);else throw new RuntimeException(Je.msg)}}var ke=null;class Ne extends z{static isSupported(){try{let $e=new XMLHttpRequest;return $e.open("GET","https://example.com",!0),$e.responseType="arraybuffer",$e.responseType==="arraybuffer"}catch($e){return Pe.w("RangeLoader",$e.message),!1}}constructor($e,nt){super("xhr-range-loader"),this.TAG="RangeLoader",this._seekHandler=$e,this._config=nt,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($e,nt){this._dataSource=$e,this._range=nt,this._status=de.kConnecting;let Je=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(Je=!0,this._totalLength=this._dataSource.filesize),!this._totalLengthReceived&&!Je?(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1})):this._openSubRange()}_openSubRange(){let $e=this._currentChunkSizeKB*1024,nt=this._range.from+this._receivedLength,Je=nt+$e;this._contentLength!=null&&Je-this._range.from>=this._contentLength&&(Je=this._range.from+this._contentLength-1),this._currentRequestRange={from:nt,to:Je},this._internalOpen(this._dataSource,this._currentRequestRange)}_internalOpen($e,nt){this._lastTimeLoaded=0;let Je=$e.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?Je=this._currentRedirectedURL:$e.redirectedURL!=null&&(Je=$e.redirectedURL));let wt=this._seekHandler.getConfig(Je,nt);this._currentRequestURL=wt.url;let Nt=this._xhr=new XMLHttpRequest;if(Nt.open("GET",wt.url,!0),Nt.responseType="arraybuffer",Nt.onreadystatechange=this._onReadyStateChange.bind(this),Nt.onprogress=this._onProgress.bind(this),Nt.onload=this._onLoad.bind(this),Nt.onerror=this._onXhrError.bind(this),$e.withCredentials&&(Nt.withCredentials=!0),typeof wt.headers=="object"){let kt=wt.headers;for(let Et in kt)kt.hasOwnProperty(Et)&&Nt.setRequestHeader(Et,kt[Et])}if(typeof this._config.headers=="object"){let kt=this._config.headers;for(let Et in kt)kt.hasOwnProperty(Et)&&Nt.setRequestHeader(Et,kt[Et])}Nt.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($e){let nt=$e.target;if(nt.readyState===2){if(nt.responseURL!=null){let Je=this._seekHandler.removeURLParameters(nt.responseURL);nt.responseURL!==this._currentRequestURL&&Je!==this._currentRedirectedURL&&(this._currentRedirectedURL=Je,this._onURLRedirect&&this._onURLRedirect(Je))}if(nt.status>=200&&nt.status<=299){if(this._waitForTotalLength)return;this._status=de.kBuffering}else if(this._status=de.kError,this._onError)this._onError(ue.HTTP_STATUS_CODE_INVALID,{code:nt.status,msg:nt.statusText});else throw new xe("RangeLoader: Http code invalid, "+nt.status+" "+nt.statusText)}}_onProgress($e){if(this._status===de.kError)return;if(this._contentLength===null){let Je=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,Je=!0;let wt=$e.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,Je){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}let nt=$e.loaded-this._lastTimeLoaded;this._lastTimeLoaded=$e.loaded,this._speedSampler.addBytes(nt)}_normalizeSpeed($e){let nt=this._chunkSizeKBList,Je=nt.length-1,wt=0,Nt=0,kt=Je;if($e<nt[0])return nt[0];for(;Nt<=kt;){if(wt=Nt+Math.floor((kt-Nt)/2),wt===Je||$e>=nt[wt]&&$e<nt[wt+1])return nt[wt];nt[wt]<$e?Nt=wt+1:kt=wt-1}}_onLoad($e){if(this._status===de.kError)return;if(this._waitForTotalLength){this._waitForTotalLength=!1;return}this._lastTimeLoaded=0;let nt=this._speedSampler.lastSecondKBps;if(nt===0&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(nt=this._speedSampler.currentKBps)),nt!==0){let kt=this._normalizeSpeed(nt);this._currentSpeedNormalized!==kt&&(this._currentSpeedNormalized=kt,this._currentChunkSizeKB=kt)}let Je=$e.target.response,wt=this._range.from+this._receivedLength;this._receivedLength+=Je.byteLength;let Nt=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():Nt=!0,this._onDataArrival&&this._onDataArrival(Je,wt,this._receivedLength),Nt&&(this._status=de.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}_onXhrError($e){this._status=de.kError;let nt=0,Je=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(nt=ue.EARLY_EOF,Je={code:-1,msg:"RangeLoader meet Early-Eof"}):(nt=ue.EXCEPTION,Je={code:-1,msg:$e.constructor.name+" "+$e.type}),this._onError)this._onError(nt,Je);else throw new xe(Je.msg)}}var je=Ne;class Ve extends z{static isSupported(){try{return typeof self.WebSocket!="undefined"}catch($e){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($e){try{let nt=this._ws=new self.WebSocket($e.url);nt.binaryType="arraybuffer",nt.onopen=this._onWebSocketOpen.bind(this),nt.onclose=this._onWebSocketClose.bind(this),nt.onmessage=this._onWebSocketMessage.bind(this),nt.onerror=this._onWebSocketError.bind(this),this._status=de.kConnecting}catch(nt){this._status=de.kError;let Je={code:nt.code,msg:nt.message};if(this._onError)this._onError(ue.EXCEPTION,Je);else throw new xe(Je.msg)}}abort(){let $e=this._ws;$e&&($e.readyState===0||$e.readyState===1)&&(this._requestAbort=!0,$e.close()),this._ws=null,this._status=de.kComplete}_onWebSocketOpen($e){this._status=de.kBuffering}_onWebSocketClose($e){if(this._requestAbort===!0){this._requestAbort=!1;return}this._status=de.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)}_onWebSocketMessage($e){if($e.data instanceof ArrayBuffer)this._dispatchArrayBuffer($e.data);else if($e.data instanceof Blob){let nt=new FileReader;nt.onload=()=>{this._dispatchArrayBuffer(nt.result)},nt.readAsArrayBuffer($e.data)}else{this._status=de.kError;let nt={code:-1,msg:"Unsupported WebSocket message type: "+$e.data.constructor.name};if(this._onError)this._onError(ue.EXCEPTION,nt);else throw new xe(nt.msg)}}_dispatchArrayBuffer($e){let nt=$e,Je=this._receivedLength;this._receivedLength+=nt.byteLength,this._onDataArrival&&this._onDataArrival(nt,Je,this._receivedLength)}_onWebSocketError($e){this._status=de.kError;let nt={code:$e.code,msg:$e.message};if(this._onError)this._onError(ue.EXCEPTION,nt);else throw new xe(nt.msg)}}var Qe=Ve;class Ge{constructor($e){this._zeroStart=$e||!1}getConfig($e,nt){let Je={};if(nt.from!==0||nt.to!==-1){let wt;nt.to!==-1?wt=`bytes=${nt.from.toString()}-${nt.to.toString()}`:wt=`bytes=${nt.from.toString()}-`,Je.Range=wt}else this._zeroStart&&(Je.Range="bytes=0-");return{url:$e,headers:Je}}removeURLParameters($e){return $e}}var mt=Ge;class ct{constructor($e,nt){this._startName=$e,this._endName=nt}getConfig($e,nt){let Je=$e;if(nt.from!==0||nt.to!==-1){let wt=!0;Je.indexOf("?")===-1&&(Je+="?",wt=!1),wt&&(Je+="&"),Je+=`${this._startName}=${nt.from.toString()}`,nt.to!==-1&&(Je+=`&${this._endName}=${nt.to.toString()}`)}return{url:Je,headers:{}}}removeURLParameters($e){let nt=$e.split("?")[0],Je,wt=$e.indexOf("?");wt!==-1&&(Je=$e.substring(wt+1));let Nt="";if(Je!=null&&Je.length>0){let kt=Je.split("&");for(let Et=0;Et<kt.length;Et++){let cn=kt[Et].split("="),bn=Et>0;cn[0]!==this._startName&&cn[0]!==this._endName&&(bn&&(Nt+="&"),Nt+=kt[Et])}}return Nt.length===0?nt:nt+"?"+Nt}}var Ct=ct;class it{constructor($e,nt,Je){this.TAG="IOController",this._config=nt,this._extraData=Je,this._stashInitialSize=1024*384,nt.stashInitialSize!=null&&nt.stashInitialSize>0&&(this._stashInitialSize=nt.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,nt.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=$e,this._isWebSocketURL=/wss?:\/\/(.+?)/.test($e.url),this._refTotalLength=$e.filesize?$e.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($e){this._extraData=$e}get onDataArrival(){return this._onDataArrival}set onDataArrival($e){this._onDataArrival=$e}get onSeeked(){return this._onSeeked}set onSeeked($e){this._onSeeked=$e}get onError(){return this._onError}set onError($e){this._onError=$e}get onComplete(){return this._onComplete}set onComplete($e){this._onComplete=$e}get onRedirect(){return this._onRedirect}set onRedirect($e){this._onRedirect=$e}get onRecoveredEarlyEof(){return this._onRecoveredEarlyEof}set onRecoveredEarlyEof($e){this._onRecoveredEarlyEof=$e}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===je?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}get loaderType(){return this._loader.type}_selectSeekHandler(){let $e=this._config;if($e.seekType==="range")this._seekHandler=new mt(this._config.rangeLoadZeroStart);else if($e.seekType==="param"){let nt=$e.seekParamStart||"bstart",Je=$e.seekParamEnd||"bend";this._seekHandler=new Ct(nt,Je)}else if($e.seekType==="custom"){if(typeof $e.customSeekHandler!="function")throw new ce("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new $e.customSeekHandler}else throw new ce(`Invalid seekType in config: ${$e.seekType}`)}_selectLoader(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=Qe;else if(le.isSupported())this._loaderClass=le;else if(we.isSupported())this._loaderClass=we;else if(je.isSupported())this._loaderClass=je;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($e){this._currentRange={from:0,to:-1},$e&&(this._currentRange.from=$e),this._speedSampler.reset(),$e||(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 $e=this._resumeFrom;this._resumeFrom=0,this._internalSeek($e,!0)}}seek($e){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek($e,!0)}_internalSeek($e,nt){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(nt),this._loader.destroy(),this._loader=null;let Je={from:$e,to:-1};this._currentRange={from:Je.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,Je),this._onSeeked&&this._onSeeked()}updateUrl($e){if(!$e||typeof $e!="string"||$e.length===0)throw new ce("Url must be a non-empty string!");this._dataSource.url=$e}_expandBuffer($e){let nt=this._stashSize;for(;nt+1024*1024*1<$e;)nt*=2;if(nt+=1024*1024*1,nt===this._bufferSize)return;let Je=new ArrayBuffer(nt);if(this._stashUsed>0){let wt=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(Je,0,nt).set(wt,0)}this._stashBuffer=Je,this._bufferSize=nt}_normalizeSpeed($e){let nt=this._speedNormalizeList,Je=nt.length-1,wt=0,Nt=0,kt=Je;if($e<nt[0])return nt[0];for(;Nt<=kt;){if(wt=Nt+Math.floor((kt-Nt)/2),wt===Je||$e>=nt[wt]&&$e<nt[wt+1])return nt[wt];nt[wt]<$e?Nt=wt+1:kt=wt-1}}_adjustStashSize($e){let nt=0;this._config.isLive||$e<512?nt=$e:$e>=512&&$e<=1024?nt=Math.floor($e*1.5):nt=$e*2,nt>8192&&(nt=8192);let Je=nt*1024+1024*1024*1;this._bufferSize<Je&&this._expandBuffer(Je),this._stashSize=nt*1024}_dispatchChunks($e,nt){return this._currentRange.to=nt+$e.byteLength-1,this._onDataArrival($e,nt)}_onURLRedirect($e){this._redirectedURL=$e,this._onRedirect&&this._onRedirect($e)}_onContentLengthKnown($e){$e&&this._fullRequestFlag&&(this._totalLength=$e,this._fullRequestFlag=!1)}_onLoaderChunkArrival($e,nt,Je){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($e.byteLength);let wt=this._speedSampler.lastSecondKBps;if(wt!==0){let Nt=this._normalizeSpeed(wt);this._speedNormalized!==Nt&&(this._speedNormalized=Nt,this._adjustStashSize(Nt))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=nt),this._stashUsed+$e.byteLength<=this._stashSize)new Uint8Array(this._stashBuffer,0,this._stashSize).set(new Uint8Array($e),this._stashUsed),this._stashUsed+=$e.byteLength;else{let Nt=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){let kt=this._stashBuffer.slice(0,this._stashUsed),Et=this._dispatchChunks(kt,this._stashByteStart);if(Et<kt.byteLength){if(Et>0){let cn=new Uint8Array(kt,Et);Nt.set(cn,0),this._stashUsed=cn.byteLength,this._stashByteStart+=Et}}else this._stashUsed=0,this._stashByteStart+=Et;this._stashUsed+$e.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+$e.byteLength),Nt=new Uint8Array(this._stashBuffer,0,this._bufferSize)),Nt.set(new Uint8Array($e),this._stashUsed),this._stashUsed+=$e.byteLength}else{let kt=this._dispatchChunks($e,nt);if(kt<$e.byteLength){let Et=$e.byteLength-kt;Et>this._bufferSize&&(this._expandBuffer(Et),Nt=new Uint8Array(this._stashBuffer,0,this._bufferSize)),Nt.set(new Uint8Array($e,kt),0),this._stashUsed+=Et,this._stashByteStart=nt+kt}}}else if(this._stashUsed===0){let Nt=this._dispatchChunks($e,nt);if(Nt<$e.byteLength){let kt=$e.byteLength-Nt;kt>this._bufferSize&&this._expandBuffer(kt),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array($e,Nt),0),this._stashUsed+=kt,this._stashByteStart=nt+Nt}}else{this._stashUsed+$e.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+$e.byteLength);let Nt=new Uint8Array(this._stashBuffer,0,this._bufferSize);Nt.set(new Uint8Array($e),this._stashUsed),this._stashUsed+=$e.byteLength;let kt=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(kt<this._stashUsed&&kt>0){let Et=new Uint8Array(this._stashBuffer,kt);Nt.set(Et,0)}this._stashUsed-=kt,this._stashByteStart+=kt}}_flushStashBuffer($e){if(this._stashUsed>0){let nt=this._stashBuffer.slice(0,this._stashUsed),Je=this._dispatchChunks(nt,this._stashByteStart),wt=nt.byteLength-Je;if(Je<nt.byteLength)if($e)Pe.w(this.TAG,`${wt} bytes unconsumed data remain when flush buffer, dropped`);else{if(Je>0){let Nt=new Uint8Array(this._stashBuffer,0,this._bufferSize),kt=new Uint8Array(nt,Je);Nt.set(kt,0),this._stashUsed=kt.byteLength,this._stashByteStart+=Je}return 0}return this._stashUsed=0,this._stashByteStart=0,wt}return 0}_onLoaderComplete($e,nt){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}_onLoaderError($e,nt){switch(Pe.e(this.TAG,`Loader error, code = ${nt.code}, msg = ${nt.msg}`),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,$e=ue.UNRECOVERABLE_EARLY_EOF),$e){case ue.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){let Je=this._currentRange.to+1;Je<this._totalLength&&(Pe.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(Je,!1));return}$e=ue.UNRECOVERABLE_EARLY_EOF;break}case ue.UNRECOVERABLE_EARLY_EOF:case ue.CONNECTING_TIMEOUT:case ue.HTTP_STATUS_CODE_INVALID:case ue.EXCEPTION:break}if(this._onError)this._onError($e,nt);else throw new xe("IOException: "+nt.msg)}}var St=it;const ut={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 Ft(){return Object.assign({},ut)}class ht{static supportMSEH264Playback(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}static supportNetworkStreamIO(){let $e=new St({},Ft()),nt=$e.loaderType;return $e.destroy(),nt=="fetch-stream-loader"||nt=="xhr-moz-chunked-loader"}static getNetworkLoaderTypeName(){let $e=new St({},Ft()),nt=$e.loaderType;return $e.destroy(),nt}static supportNativeMediaPlayback($e){ht.videoElement==null&&(ht.videoElement=window.document.createElement("video"));let nt=ht.videoElement.canPlayType($e);return nt==="probably"||nt=="maybe"}static getFeatureList(){let $e={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return $e.mseFlvPlayback=ht.supportMSEH264Playback(),$e.networkStreamIO=ht.supportNetworkStreamIO(),$e.networkLoaderName=ht.getNetworkLoaderTypeName(),$e.mseLiveFlvPlayback=$e.mseFlvPlayback&&$e.networkStreamIO,$e.nativeMP4H264Playback=ht.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),$e.nativeWebmVP8Playback=ht.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),$e.nativeWebmVP9Playback=ht.supportNativeMediaPlayback('video/webm; codecs="vp9"'),$e}}var rt=ht,yt={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 Pe.FORCE_GLOBAL_TAG}static set forceGlobalTag($e){Pe.FORCE_GLOBAL_TAG=$e,_t._notifyChange()}static get globalTag(){return Pe.GLOBAL_TAG}static set globalTag($e){Pe.GLOBAL_TAG=$e,_t._notifyChange()}static get enableAll(){return Pe.ENABLE_VERBOSE&&Pe.ENABLE_DEBUG&&Pe.ENABLE_INFO&&Pe.ENABLE_WARN&&Pe.ENABLE_ERROR}static set enableAll($e){Pe.ENABLE_VERBOSE=$e,Pe.ENABLE_DEBUG=$e,Pe.ENABLE_INFO=$e,Pe.ENABLE_WARN=$e,Pe.ENABLE_ERROR=$e,_t._notifyChange()}static get enableDebug(){return Pe.ENABLE_DEBUG}static set enableDebug($e){Pe.ENABLE_DEBUG=$e,_t._notifyChange()}static get enableVerbose(){return Pe.ENABLE_VERBOSE}static set enableVerbose($e){Pe.ENABLE_VERBOSE=$e,_t._notifyChange()}static get enableInfo(){return Pe.ENABLE_INFO}static set enableInfo($e){Pe.ENABLE_INFO=$e,_t._notifyChange()}static get enableWarn(){return Pe.ENABLE_WARN}static set enableWarn($e){Pe.ENABLE_WARN=$e,_t._notifyChange()}static get enableError(){return Pe.ENABLE_ERROR}static set enableError($e){Pe.ENABLE_ERROR=$e,_t._notifyChange()}static getConfig(){return{globalTag:Pe.GLOBAL_TAG,forceGlobalTag:Pe.FORCE_GLOBAL_TAG,enableVerbose:Pe.ENABLE_VERBOSE,enableDebug:Pe.ENABLE_DEBUG,enableInfo:Pe.ENABLE_INFO,enableWarn:Pe.ENABLE_WARN,enableError:Pe.ENABLE_ERROR,enableCallback:Pe.ENABLE_CALLBACK}}static applyConfig($e){Pe.GLOBAL_TAG=$e.globalTag,Pe.FORCE_GLOBAL_TAG=$e.forceGlobalTag,Pe.ENABLE_VERBOSE=$e.enableVerbose,Pe.ENABLE_DEBUG=$e.enableDebug,Pe.ENABLE_INFO=$e.enableInfo,Pe.ENABLE_WARN=$e.enableWarn,Pe.ENABLE_ERROR=$e.enableError,Pe.ENABLE_CALLBACK=$e.enableCallback}static _notifyChange(){let $e=_t.emitter;if($e.listenerCount("change")>0){let nt=_t.getConfig();$e.emit("change",nt)}}static registerListener($e){_t.emitter.addListener("change",$e)}static removeListener($e){_t.emitter.removeListener("change",$e)}static addLogListener($e){Pe.emitter.addListener("log",$e),Pe.emitter.listenerCount("log")>0&&(Pe.ENABLE_CALLBACK=!0,_t._notifyChange())}static removeLogListener($e){Pe.emitter.removeListener("log",$e),Pe.emitter.listenerCount("log")===0&&(Pe.ENABLE_CALLBACK=!1,_t._notifyChange())}}_t.emitter=new(Te());var vt=_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 $e=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,nt=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&&$e&&nt}isSeekable(){return this.hasKeyframesIndex===!0}getNearestKeyframe($e){if(this.keyframesIndex==null)return null;let nt=this.keyframesIndex,Je=this._search(nt.times,$e);return{index:Je,milliseconds:nt.times[Je],fileposition:nt.filepositions[Je]}}_search($e,nt){let Je=0,wt=$e.length-1,Nt=0,kt=0,Et=wt;for(nt<$e[0]&&(Je=0,kt=Et+1);kt<=Et;)if(Nt=kt+Math.floor((Et-kt)/2),Nt===wt||nt>=$e[Nt]&&nt<$e[Nt+1]){Je=Nt;break}else $e[Nt]<nt?kt=Nt+1:Et=Nt-1;return Je}}var jt=Bt;function un(Xn,$e,nt){let Je=Xn;if($e+nt<Je.length){for(;nt--;)if((Je[++$e]&192)!==128)return!1;return!0}else return!1}function Kt(Xn){let $e=[],nt=Xn,Je=0,wt=Xn.length;for(;Je<wt;){if(nt[Je]<128){$e.push(String.fromCharCode(nt[Je])),++Je;continue}else if(!(nt[Je]<192)){if(nt[Je]<224){if(un(nt,Je,1)){let Nt=(nt[Je]&31)<<6|nt[Je+1]&63;if(Nt>=128){$e.push(String.fromCharCode(Nt&65535)),Je+=2;continue}}}else if(nt[Je]<240){if(un(nt,Je,2)){let Nt=(nt[Je]&15)<<12|(nt[Je+1]&63)<<6|nt[Je+2]&63;if(Nt>=2048&&(Nt&63488)!==55296){$e.push(String.fromCharCode(Nt&65535)),Je+=3;continue}}}else if(nt[Je]<248&&un(nt,Je,3)){let Nt=(nt[Je]&7)<<18|(nt[Je+1]&63)<<12|(nt[Je+2]&63)<<6|nt[Je+3]&63;if(Nt>65536&&Nt<1114112){Nt-=65536,$e.push(String.fromCharCode(Nt>>>10|55296)),$e.push(String.fromCharCode(Nt&1023|56320)),Je+=4;continue}}}$e.push("\uFFFD"),++Je}return $e.join("")}var xn=Kt;let Ut=function(){let Xn=new ArrayBuffer(2);return new DataView(Xn).setInt16(0,256,!0),new Int16Array(Xn)[0]===256}();class Wt{static parseScriptData($e,nt,Je){let wt={};try{let Nt=Wt.parseValue($e,nt,Je),kt=Wt.parseValue($e,nt+Nt.size,Je-Nt.size);wt[Nt.data]=kt.data}catch(Nt){Pe.e("AMF",Nt.toString())}return wt}static parseObject($e,nt,Je){if(Je<3)throw new ge("Data not enough when parse ScriptDataObject");let wt=Wt.parseString($e,nt,Je),Nt=Wt.parseValue($e,nt+wt.size,Je-wt.size),kt=Nt.objectEnd;return{data:{name:wt.data,value:Nt.data},size:wt.size+Nt.size,objectEnd:kt}}static parseVariable($e,nt,Je){return Wt.parseObject($e,nt,Je)}static parseString($e,nt,Je){if(Je<2)throw new ge("Data not enough when parse String");let Nt=new DataView($e,nt,Je).getUint16(0,!Ut),kt;return Nt>0?kt=xn(new Uint8Array($e,nt+2,Nt)):kt="",{data:kt,size:2+Nt}}static parseLongString($e,nt,Je){if(Je<4)throw new ge("Data not enough when parse LongString");let Nt=new DataView($e,nt,Je).getUint32(0,!Ut),kt;return Nt>0?kt=xn(new Uint8Array($e,nt+4,Nt)):kt="",{data:kt,size:4+Nt}}static parseDate($e,nt,Je){if(Je<10)throw new ge("Data size invalid when parse Date");let wt=new DataView($e,nt,Je),Nt=wt.getFloat64(0,!Ut),kt=wt.getInt16(8,!Ut);return Nt+=kt*60*1e3,{data:new Date(Nt),size:10}}static parseValue($e,nt,Je){if(Je<1)throw new ge("Data not enough when parse Value");let wt=new DataView($e,nt,Je),Nt=1,kt=wt.getUint8(0),Et,cn=!1;try{switch(kt){case 0:Et=wt.getFloat64(1,!Ut),Nt+=8;break;case 1:{Et=!!wt.getUint8(1),Nt+=1;break}case 2:{let bn=Wt.parseString($e,nt+1,Je-1);Et=bn.data,Nt+=bn.size;break}case 3:{Et={};let bn=0;for((wt.getUint32(Je-4,!Ut)&16777215)===9&&(bn=3);Nt<Je-4;){let dn=Wt.parseObject($e,nt+Nt,Je-Nt-bn);if(dn.objectEnd)break;Et[dn.data.name]=dn.data.value,Nt+=dn.size}Nt<=Je-3&&(wt.getUint32(Nt-1,!Ut)&16777215)===9&&(Nt+=3);break}case 8:{Et={},Nt+=4;let bn=0;for((wt.getUint32(Je-4,!Ut)&16777215)===9&&(bn=3);Nt<Je-8;){let dn=Wt.parseVariable($e,nt+Nt,Je-Nt-bn);if(dn.objectEnd)break;Et[dn.data.name]=dn.data.value,Nt+=dn.size}Nt<=Je-3&&(wt.getUint32(Nt-1,!Ut)&16777215)===9&&(Nt+=3);break}case 9:Et=void 0,Nt=1,cn=!0;break;case 10:{Et=[];let bn=wt.getUint32(1,!Ut);Nt+=4;for(let dn=0;dn<bn;dn++){let rn=Wt.parseValue($e,nt+Nt,Je-Nt);Et.push(rn.data),Nt+=rn.size}break}case 11:{let bn=Wt.parseDate($e,nt+1,Je-1);Et=bn.data,Nt+=bn.size;break}case 12:{let bn=Wt.parseString($e,nt+1,Je-1);Et=bn.data,Nt+=bn.size;break}default:Nt=Je,Pe.w("AMF","Unsupported AMF value type "+kt)}}catch(bn){Pe.e("AMF",bn.toString())}return{data:Et,size:Nt,objectEnd:cn}}}var $t=Wt;class ft{constructor($e){this.TAG="ExpGolomb",this._buffer=$e,this._buffer_index=0,this._total_bytes=$e.byteLength,this._total_bits=$e.byteLength*8,this._current_word=0,this._current_word_bits_left=0}destroy(){this._buffer=null}_fillCurrentWord(){let $e=this._total_bytes-this._buffer_index;if($e<=0)throw new ge("ExpGolomb: _fillCurrentWord() but no bytes available");let nt=Math.min(4,$e),Je=new Uint8Array(4);Je.set(this._buffer.subarray(this._buffer_index,this._buffer_index+nt)),this._current_word=new DataView(Je.buffer).getUint32(0,!1),this._buffer_index+=nt,this._current_word_bits_left=nt*8}readBits($e){if($e>32)throw new ce("ExpGolomb: readBits() bits exceeded max 32bits!");if($e<=this._current_word_bits_left){let kt=this._current_word>>>32-$e;return this._current_word<<=$e,this._current_word_bits_left-=$e,kt}let nt=this._current_word_bits_left?this._current_word:0;nt=nt>>>32-this._current_word_bits_left;let Je=$e-this._current_word_bits_left;this._fillCurrentWord();let wt=Math.min(Je,this._current_word_bits_left),Nt=this._current_word>>>32-wt;return this._current_word<<=wt,this._current_word_bits_left-=wt,nt=nt<<wt|Nt,nt}readBool(){return this.readBits(1)===1}readByte(){return this.readBits(8)}_skipLeadingZero(){let $e;for($e=0;$e<this._current_word_bits_left;$e++)if(this._current_word&2147483648>>>$e)return this._current_word<<=$e,this._current_word_bits_left-=$e,$e;return this._fillCurrentWord(),$e+this._skipLeadingZero()}readUEG(){let $e=this._skipLeadingZero();return this.readBits($e+1)-1}readSEG(){let $e=this.readUEG();return $e&1?$e+1>>>1:-1*($e>>>1)}}var We=ft;class Be{static _ebsp2rbsp($e){let nt=$e,Je=nt.byteLength,wt=new Uint8Array(Je),Nt=0;for(let kt=0;kt<Je;kt++)kt>=2&&nt[kt]===3&&nt[kt-1]===0&&nt[kt-2]===0||(wt[Nt]=nt[kt],Nt++);return new Uint8Array(wt.buffer,0,Nt)}static parseSPS($e){let nt=Be._ebsp2rbsp($e),Je=new We(nt);Je.readByte();let wt=Je.readByte();Je.readByte();let Nt=Je.readByte();Je.readUEG();let kt=Be.getProfileString(wt),Et=Be.getLevelString(Nt),cn=1,bn=420,dn=[0,420,422,444],rn=8;if((wt===100||wt===110||wt===122||wt===244||wt===44||wt===83||wt===86||wt===118||wt===128||wt===138||wt===144)&&(cn=Je.readUEG(),cn===3&&Je.readBits(1),cn<=3&&(bn=dn[cn]),rn=Je.readUEG()+8,Je.readUEG(),Je.readBits(1),Je.readBool())){let di=cn!==3?8:12;for(let Ei=0;Ei<di;Ei++)Je.readBool()&&(Ei<6?Be._skipScalingList(Je,16):Be._skipScalingList(Je,64))}Je.readUEG();let At=Je.readUEG();if(At===0)Je.readUEG();else if(At===1){Je.readBits(1),Je.readSEG(),Je.readSEG();let di=Je.readUEG();for(let Ei=0;Ei<di;Ei++)Je.readSEG()}let an=Je.readUEG();Je.readBits(1);let En=Je.readUEG(),Dn=Je.readUEG(),qt=Je.readBits(1);qt===0&&Je.readBits(1),Je.readBits(1);let on=0,Nn=0,On=0,qn=0;Je.readBool()&&(on=Je.readUEG(),Nn=Je.readUEG(),On=Je.readUEG(),qn=Je.readUEG());let ei=1,Fn=1,hi=0,Ii=!0,Ri=0,Pn=0;if(Je.readBool()){if(Je.readBool()){let di=Je.readByte(),Ei=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],Qi=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];di>0&&di<16?(ei=Ei[di-1],Fn=Qi[di-1]):di===255&&(ei=Je.readByte()<<8|Je.readByte(),Fn=Je.readByte()<<8|Je.readByte())}if(Je.readBool()&&Je.readBool(),Je.readBool()&&(Je.readBits(4),Je.readBool()&&Je.readBits(24)),Je.readBool()&&(Je.readUEG(),Je.readUEG()),Je.readBool()){let di=Je.readBits(32),Ei=Je.readBits(32);Ii=Je.readBool(),Ri=Ei,Pn=di*2,hi=Ri/Pn}}let Cr=1;(ei!==1||Fn!==1)&&(Cr=ei/Fn);let mr=0,_n=0;if(cn===0)mr=1,_n=2-qt;else{let di=cn===3?1:2,Ei=cn===1?2:1;mr=di,_n=Ei*(2-qt)}let Jn=(En+1)*16,ui=(2-qt)*((Dn+1)*16);Jn-=(on+Nn)*mr,ui-=(On+qn)*_n;let yi=Math.ceil(Jn*Cr);return Je.destroy(),Je=null,{profile_string:kt,level_string:Et,bit_depth:rn,ref_frames:an,chroma_format:bn,chroma_format_string:Be.getChromaFormatString(bn),frame_rate:{fixed:Ii,fps:hi,fps_den:Pn,fps_num:Ri},sar_ratio:{width:ei,height:Fn},codec_size:{width:Jn,height:ui},present_size:{width:yi,height:ui}}}static _skipScalingList($e,nt){let Je=8,wt=8,Nt=0;for(let kt=0;kt<nt;kt++)wt!==0&&(Nt=$e.readSEG(),wt=(Je+Nt+256)%256),Je=wt===0?Je:wt}static getProfileString($e){switch($e){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($e){return($e/10).toFixed(1)}static getChromaFormatString($e){switch($e){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}var qe=Be,He={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};function Xe(Xn){return Xn>>>8&255|(Xn&255)<<8}function Re(Xn){return(Xn&4278190080)>>>24|(Xn&16711680)>>>8|(Xn&65280)<<8|(Xn&255)<<24}function Ae(Xn,$e){return Xn[$e]<<24|Xn[$e+1]<<16|Xn[$e+2]<<8|Xn[$e+3]}class Ue{constructor($e,nt){this.TAG="FLVDemuxer",this._config=nt,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=$e.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=$e.hasAudioTrack,this._hasVideo=$e.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new jt,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 Je=new ArrayBuffer(2);return new DataView(Je).setInt16(0,256,!0),new Int16Array(Je)[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($e){let nt=new Uint8Array($e),Je={match:!1};if(nt[0]!==70||nt[1]!==76||nt[2]!==86||nt[3]!==1)return Je;let wt=(nt[4]&4)>>>2!==0,Nt=(nt[4]&1)!==0,kt=Ae(nt,5);return kt<9?Je:{match:!0,consumed:kt,dataOffset:kt,hasAudioTrack:wt,hasVideoTrack:Nt}}bindDataSource($e){return $e.onDataArrival=this.parseChunks.bind(this),this}get onTrackMetadata(){return this._onTrackMetadata}set onTrackMetadata($e){this._onTrackMetadata=$e}get onMediaInfo(){return this._onMediaInfo}set onMediaInfo($e){this._onMediaInfo=$e}get onMetaDataArrived(){return this._onMetaDataArrived}set onMetaDataArrived($e){this._onMetaDataArrived=$e}get onScriptDataArrived(){return this._onScriptDataArrived}set onScriptDataArrived($e){this._onScriptDataArrived=$e}get onError(){return this._onError}set onError($e){this._onError=$e}get onDataAvailable(){return this._onDataAvailable}set onDataAvailable($e){this._onDataAvailable=$e}get timestampBase(){return this._timestampBase}set timestampBase($e){this._timestampBase=$e}get overridedDuration(){return this._duration}set overridedDuration($e){this._durationOverrided=!0,this._duration=$e,this._mediaInfo.duration=$e}set overridedHasAudio($e){this._hasAudioFlagOverrided=!0,this._hasAudio=$e,this._mediaInfo.hasAudio=$e}set overridedHasVideo($e){this._hasVideoFlagOverrided=!0,this._hasVideo=$e,this._mediaInfo.hasVideo=$e}resetMediaInfo(){this._mediaInfo=new jt}_isInitialMetadataDispatched(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}parseChunks($e,nt){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new ge("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");let Je=0,wt=this._littleEndian;if(nt===0)if($e.byteLength>13)Je=Ue.probe($e).dataOffset;else return 0;for(this._firstParse&&(this._firstParse=!1,nt+Je!==this._dataOffset&&Pe.w(this.TAG,"First time parsing but chunk byteStart invalid!"),new DataView($e,Je).getUint32(0,!wt)!==0&&Pe.w(this.TAG,"PrevTagSize0 !== 0 !!!"),Je+=4);Je<$e.byteLength;){this._dispatch=!0;let Nt=new DataView($e,Je);if(Je+11+4>$e.byteLength)break;let kt=Nt.getUint8(0),Et=Nt.getUint32(0,!wt)&16777215;if(Je+11+Et+4>$e.byteLength)break;if(kt!==8&&kt!==9&&kt!==18){Pe.w(this.TAG,`Unsupported tag type ${kt}, skipped`),Je+=11+Et+4;continue}let cn=Nt.getUint8(4),bn=Nt.getUint8(5),dn=Nt.getUint8(6),rn=Nt.getUint8(7),At=dn|bn<<8|cn<<16|rn<<24;(Nt.getUint32(7,!wt)&16777215)!==0&&Pe.w(this.TAG,"Meet tag which has StreamID != 0!");let En=Je+11;switch(kt){case 8:this._parseAudioData($e,En,Et,At);break;case 9:this._parseVideoData($e,En,Et,At,nt+Je);break;case 18:this._parseScriptData($e,En,Et);break}let Dn=Nt.getUint32(11+Et,!wt);Dn!==11+Et&&Pe.w(this.TAG,`Invalid PrevTagSize ${Dn}`),Je+=11+Et+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),Je}_parseScriptData($e,nt,Je){let wt=$t.parseScriptData($e,nt,Je);if(wt.hasOwnProperty("onMetaData")){if(wt.onMetaData==null||typeof wt.onMetaData!="object"){Pe.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&Pe.w(this.TAG,"Found another onMetaData tag!"),this._metadata=wt;let Nt=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},Nt)),typeof Nt.hasAudio=="boolean"&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=Nt.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),typeof Nt.hasVideo=="boolean"&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=Nt.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),typeof Nt.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=Nt.audiodatarate),typeof Nt.videodatarate=="number"&&(this._mediaInfo.videoDataRate=Nt.videodatarate),typeof Nt.width=="number"&&(this._mediaInfo.width=Nt.width),typeof Nt.height=="number"&&(this._mediaInfo.height=Nt.height),typeof Nt.duration=="number"){if(!this._durationOverrided){let kt=Math.floor(Nt.duration*this._timescale);this._duration=kt,this._mediaInfo.duration=kt}}else this._mediaInfo.duration=0;if(typeof Nt.framerate=="number"){let kt=Math.floor(Nt.framerate*1e3);if(kt>0){let Et=kt/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=Et,this._referenceFrameRate.fps_num=kt,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=Et}}if(typeof Nt.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;let kt=Nt.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(kt),Nt.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=Nt,Pe.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($e){let nt=[],Je=[];for(let wt=1;wt<$e.times.length;wt++){let Nt=this._timestampBase+Math.floor($e.times[wt]*1e3);nt.push(Nt),Je.push($e.filepositions[wt])}return{times:nt,filepositions:Je}}_parseAudioData($e,nt,Je,wt){if(Je<=1){Pe.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");return}if(this._hasAudioFlagOverrided===!0&&this._hasAudio===!1)return;let Nt=this._littleEndian,Et=new DataView($e,nt,Je).getUint8(0),cn=Et>>>4;if(cn!==2&&cn!==10){this._onError(He.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+cn);return}let bn=0,dn=(Et&12)>>>2;if(dn>=0&&dn<=4)bn=this._flvSoundRateTable[dn];else{this._onError(He.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+dn);return}let rn=(Et&2)>>>1,At=Et&1,an=this._audioMetadata,En=this._audioTrack;if(an||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),an=this._audioMetadata={},an.type="audio",an.id=En.id,an.timescale=this._timescale,an.duration=this._duration,an.audioSampleRate=bn,an.channelCount=At===0?1:2),cn===10){let Dn=this._parseAACAudioData($e,nt+1,Je-1);if(Dn==null)return;if(Dn.packetType===0){an.config&&Pe.w(this.TAG,"Found another AudioSpecificConfig!");let qt=Dn.data;an.audioSampleRate=qt.samplingRate,an.channelCount=qt.channelCount,an.codec=qt.codec,an.originalCodec=qt.originalCodec,an.config=qt.config,an.refSampleDuration=1024/an.audioSampleRate*an.timescale,Pe.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",an);let on=this._mediaInfo;on.audioCodec=an.originalCodec,on.audioSampleRate=an.audioSampleRate,on.audioChannelCount=an.channelCount,on.hasVideo?on.videoCodec!=null&&(on.mimeType='video/x-flv; codecs="'+on.videoCodec+","+on.audioCodec+'"'):on.mimeType='video/x-flv; codecs="'+on.audioCodec+'"',on.isComplete()&&this._onMediaInfo(on)}else if(Dn.packetType===1){let qt=this._timestampBase+wt,on={unit:Dn.data,length:Dn.data.byteLength,dts:qt,pts:qt};En.samples.push(on),En.length+=Dn.data.length}else Pe.e(this.TAG,`Flv: Unsupported AAC data type ${Dn.packetType}`)}else if(cn===2){if(!an.codec){let Nn=this._parseMP3AudioData($e,nt+1,Je-1,!0);if(Nn==null)return;an.audioSampleRate=Nn.samplingRate,an.channelCount=Nn.channelCount,an.codec=Nn.codec,an.originalCodec=Nn.originalCodec,an.refSampleDuration=1152/an.audioSampleRate*an.timescale,Pe.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",an);let On=this._mediaInfo;On.audioCodec=an.codec,On.audioSampleRate=an.audioSampleRate,On.audioChannelCount=an.channelCount,On.audioDataRate=Nn.bitRate,On.hasVideo?On.videoCodec!=null&&(On.mimeType='video/x-flv; codecs="'+On.videoCodec+","+On.audioCodec+'"'):On.mimeType='video/x-flv; codecs="'+On.audioCodec+'"',On.isComplete()&&this._onMediaInfo(On)}let Dn=this._parseMP3AudioData($e,nt+1,Je-1,!1);if(Dn==null)return;let qt=this._timestampBase+wt,on={unit:Dn,length:Dn.byteLength,dts:qt,pts:qt};En.samples.push(on),En.length+=Dn.length}}_parseAACAudioData($e,nt,Je){if(Je<=1){Pe.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}let wt={},Nt=new Uint8Array($e,nt,Je);return wt.packetType=Nt[0],Nt[0]===0?wt.data=this._parseAACAudioSpecificConfig($e,nt+1,Je-1):wt.data=Nt.subarray(1),wt}_parseAACAudioSpecificConfig($e,nt,Je){let wt=new Uint8Array($e,nt,Je),Nt=null,kt=0,Et=0,cn=null,bn=0,dn=null;if(kt=Et=wt[0]>>>3,bn=(wt[0]&7)<<1|wt[1]>>>7,bn<0||bn>=this._mpegSamplingRates.length){this._onError(He.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}let rn=this._mpegSamplingRates[bn],At=(wt[1]&120)>>>3;if(At<0||At>=8){this._onError(He.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}kt===5&&(dn=(wt[1]&7)<<1|wt[2]>>>7,cn=(wt[2]&124)>>>2);let an=self.navigator.userAgent.toLowerCase();return an.indexOf("firefox")!==-1?bn>=6?(kt=5,Nt=new Array(4),dn=bn-3):(kt=2,Nt=new Array(2),dn=bn):an.indexOf("android")!==-1?(kt=2,Nt=new Array(2),dn=bn):(kt=5,dn=bn,Nt=new Array(4),bn>=6?dn=bn-3:At===1&&(kt=2,Nt=new Array(2),dn=bn)),Nt[0]=kt<<3,Nt[0]|=(bn&15)>>>1,Nt[1]=(bn&15)<<7,Nt[1]|=(At&15)<<3,kt===5&&(Nt[1]|=(dn&15)>>>1,Nt[2]=(dn&1)<<7,Nt[2]|=8,Nt[3]=0),{config:Nt,samplingRate:rn,channelCount:At,codec:"mp4a.40."+kt,originalCodec:"mp4a.40."+Et}}_parseMP3AudioData($e,nt,Je,wt){if(Je<4){Pe.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}let Nt=this._littleEndian,kt=new Uint8Array($e,nt,Je),Et=null;if(wt){if(kt[0]!==255)return;let cn=kt[1]>>>3&3,bn=(kt[1]&6)>>1,dn=(kt[2]&240)>>>4,rn=(kt[2]&12)>>>2,an=(kt[3]>>>6&3)!==3?2:1,En=0,Dn=0,qt=34,on="mp3";switch(cn){case 0:En=this._mpegAudioV25SampleRateTable[rn];break;case 2:En=this._mpegAudioV20SampleRateTable[rn];break;case 3:En=this._mpegAudioV10SampleRateTable[rn];break}switch(bn){case 1:qt=34,dn<this._mpegAudioL3BitRateTable.length&&(Dn=this._mpegAudioL3BitRateTable[dn]);break;case 2:qt=33,dn<this._mpegAudioL2BitRateTable.length&&(Dn=this._mpegAudioL2BitRateTable[dn]);break;case 3:qt=32,dn<this._mpegAudioL1BitRateTable.length&&(Dn=this._mpegAudioL1BitRateTable[dn]);break}Et={bitRate:Dn,samplingRate:En,channelCount:an,codec:on,originalCodec:on}}else Et=kt;return Et}_parseVideoData($e,nt,Je,wt,Nt){if(Je<=1){Pe.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");return}if(this._hasVideoFlagOverrided===!0&&this._hasVideo===!1)return;let kt=new Uint8Array($e,nt,Je)[0],Et=(kt&240)>>>4,cn=kt&15;if(cn!==7){this._onError(He.CODEC_UNSUPPORTED,`Flv: Unsupported codec in video frame: ${cn}`);return}this._parseAVCVideoPacket($e,nt+1,Je-1,wt,Nt,Et)}_parseAVCVideoPacket($e,nt,Je,wt,Nt,kt){if(Je<4){Pe.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}let Et=this._littleEndian,cn=new DataView($e,nt,Je),bn=cn.getUint8(0),rn=(cn.getUint32(0,!Et)&16777215)<<8>>8;if(bn===0)this._parseAVCDecoderConfigurationRecord($e,nt+4,Je-4);else if(bn===1)this._parseAVCVideoData($e,nt+4,Je-4,wt,Nt,kt,rn);else if(bn!==2){this._onError(He.FORMAT_ERROR,`Flv: Invalid video packet type ${bn}`);return}}_parseAVCDecoderConfigurationRecord($e,nt,Je){if(Je<7){Pe.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}let wt=this._videoMetadata,Nt=this._videoTrack,kt=this._littleEndian,Et=new DataView($e,nt,Je);wt?typeof wt.avcc!="undefined"&&Pe.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=Nt.id,wt.timescale=this._timescale,wt.duration=this._duration);let cn=Et.getUint8(0),bn=Et.getUint8(1),dn=Et.getUint8(2),rn=Et.getUint8(3);if(cn!==1||bn===0){this._onError(He.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(Et.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(He.FORMAT_ERROR,`Flv: Strange NaluLengthSizeMinusOne: ${this._naluLengthSize-1}`);return}let At=Et.getUint8(5)&31;if(At===0){this._onError(He.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else At>1&&Pe.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ${At}`);let an=6;for(let Dn=0;Dn<At;Dn++){let qt=Et.getUint16(an,!kt);if(an+=2,qt===0)continue;let on=new Uint8Array($e,nt+an,qt);an+=qt;let Nn=qe.parseSPS(on);if(Dn!==0)continue;wt.codecWidth=Nn.codec_size.width,wt.codecHeight=Nn.codec_size.height,wt.presentWidth=Nn.present_size.width,wt.presentHeight=Nn.present_size.height,wt.profile=Nn.profile_string,wt.level=Nn.level_string,wt.bitDepth=Nn.bit_depth,wt.chromaFormat=Nn.chroma_format,wt.sarRatio=Nn.sar_ratio,wt.frameRate=Nn.frame_rate,(Nn.frame_rate.fixed===!1||Nn.frame_rate.fps_num===0||Nn.frame_rate.fps_den===0)&&(wt.frameRate=this._referenceFrameRate);let On=wt.frameRate.fps_den,qn=wt.frameRate.fps_num;wt.refSampleDuration=wt.timescale*(On/qn);let Hn=on.subarray(1,4),ei="avc1.";for(let hi=0;hi<3;hi++){let Ii=Hn[hi].toString(16);Ii.length<2&&(Ii="0"+Ii),ei+=Ii}wt.codec=ei;let Fn=this._mediaInfo;Fn.width=wt.codecWidth,Fn.height=wt.codecHeight,Fn.fps=wt.frameRate.fps,Fn.profile=wt.profile,Fn.level=wt.level,Fn.refFrames=Nn.ref_frames,Fn.chromaFormat=Nn.chroma_format_string,Fn.sarNum=wt.sarRatio.width,Fn.sarDen=wt.sarRatio.height,Fn.videoCodec=ei,Fn.hasAudio?Fn.audioCodec!=null&&(Fn.mimeType='video/x-flv; codecs="'+Fn.videoCodec+","+Fn.audioCodec+'"'):Fn.mimeType='video/x-flv; codecs="'+Fn.videoCodec+'"',Fn.isComplete()&&this._onMediaInfo(Fn)}let En=Et.getUint8(an);if(En===0){this._onError(He.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");return}else En>1&&Pe.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ${En}`);an++;for(let Dn=0;Dn<En;Dn++){let qt=Et.getUint16(an,!kt);an+=2,qt!==0&&(an+=qt)}wt.avcc=new Uint8Array(Je),wt.avcc.set(new Uint8Array($e,nt,Je),0),Pe.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($e,nt,Je,wt,Nt,kt,Et){let cn=this._littleEndian,bn=new DataView($e,nt,Je),dn=[],rn=0,At=0;const an=this._naluLengthSize;let En=this._timestampBase+wt,Dn=kt===1;for(;At<Je;){if(At+4>=Je){Pe.w(this.TAG,`Malformed Nalu near timestamp ${En}, offset = ${At}, dataSize = ${Je}`);break}let qt=bn.getUint32(At,!cn);if(an===3&&(qt>>>=8),qt>Je-an){Pe.w(this.TAG,`Malformed Nalus near timestamp ${En}, NaluSize > DataSize!`);return}let on=bn.getUint8(At+an)&31;on===5&&(Dn=!0);let Nn=new Uint8Array($e,nt+At,an+qt),On={type:on,data:Nn};dn.push(On),rn+=Nn.byteLength,At+=an+qt}if(dn.length){let qt=this._videoTrack,on={units:dn,length:rn,isKeyframe:Dn,dts:En,cts:Et,pts:En+Et};Dn&&(on.fileposition=Nt),qt.samples.push(on),qt.length+=rn}}}var Ke=Ue;class Ze{static init(){Ze.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 nt in Ze.types)Ze.types.hasOwnProperty(nt)&&(Ze.types[nt]=[nt.charCodeAt(0),nt.charCodeAt(1),nt.charCodeAt(2),nt.charCodeAt(3)]);let $e=Ze.constants={};$e.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),$e.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),$e.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),$e.STSC=$e.STCO=$e.STTS,$e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),$e.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]),$e.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]),$e.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),$e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),$e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box($e){let nt=8,Je=null,wt=Array.prototype.slice.call(arguments,1),Nt=wt.length;for(let Et=0;Et<Nt;Et++)nt+=wt[Et].byteLength;Je=new Uint8Array(nt),Je[0]=nt>>>24&255,Je[1]=nt>>>16&255,Je[2]=nt>>>8&255,Je[3]=nt&255,Je.set($e,4);let kt=8;for(let Et=0;Et<Nt;Et++)Je.set(wt[Et],kt),kt+=wt[Et].byteLength;return Je}static generateInitSegment($e){let nt=Ze.box(Ze.types.ftyp,Ze.constants.FTYP),Je=Ze.moov($e),wt=new Uint8Array(nt.byteLength+Je.byteLength);return wt.set(nt,0),wt.set(Je,nt.byteLength),wt}static moov($e){let nt=Ze.mvhd($e.timescale,$e.duration),Je=Ze.trak($e),wt=Ze.mvex($e);return Ze.box(Ze.types.moov,nt,Je,wt)}static mvhd($e,nt){return Ze.box(Ze.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,$e>>>24&255,$e>>>16&255,$e>>>8&255,$e&255,nt>>>24&255,nt>>>16&255,nt>>>8&255,nt&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($e){return Ze.box(Ze.types.trak,Ze.tkhd($e),Ze.mdia($e))}static tkhd($e){let nt=$e.id,Je=$e.duration,wt=$e.presentWidth,Nt=$e.presentHeight;return Ze.box(Ze.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,nt>>>24&255,nt>>>16&255,nt>>>8&255,nt&255,0,0,0,0,Je>>>24&255,Je>>>16&255,Je>>>8&255,Je&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,Nt>>>8&255,Nt&255,0,0]))}static mdia($e){return Ze.box(Ze.types.mdia,Ze.mdhd($e),Ze.hdlr($e),Ze.minf($e))}static mdhd($e){let nt=$e.timescale,Je=$e.duration;return Ze.box(Ze.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,nt>>>24&255,nt>>>16&255,nt>>>8&255,nt&255,Je>>>24&255,Je>>>16&255,Je>>>8&255,Je&255,85,196,0,0]))}static hdlr($e){let nt=null;return $e.type==="audio"?nt=Ze.constants.HDLR_AUDIO:nt=Ze.constants.HDLR_VIDEO,Ze.box(Ze.types.hdlr,nt)}static minf($e){let nt=null;return $e.type==="audio"?nt=Ze.box(Ze.types.smhd,Ze.constants.SMHD):nt=Ze.box(Ze.types.vmhd,Ze.constants.VMHD),Ze.box(Ze.types.minf,nt,Ze.dinf(),Ze.stbl($e))}static dinf(){return Ze.box(Ze.types.dinf,Ze.box(Ze.types.dref,Ze.constants.DREF))}static stbl($e){return Ze.box(Ze.types.stbl,Ze.stsd($e),Ze.box(Ze.types.stts,Ze.constants.STTS),Ze.box(Ze.types.stsc,Ze.constants.STSC),Ze.box(Ze.types.stsz,Ze.constants.STSZ),Ze.box(Ze.types.stco,Ze.constants.STCO))}static stsd($e){return $e.type==="audio"?$e.codec==="mp3"?Ze.box(Ze.types.stsd,Ze.constants.STSD_PREFIX,Ze.mp3($e)):Ze.box(Ze.types.stsd,Ze.constants.STSD_PREFIX,Ze.mp4a($e)):Ze.box(Ze.types.stsd,Ze.constants.STSD_PREFIX,Ze.avc1($e))}static mp3($e){let nt=$e.channelCount,Je=$e.audioSampleRate,wt=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,nt,0,16,0,0,0,0,Je>>>8&255,Je&255,0,0]);return Ze.box(Ze.types[".mp3"],wt)}static mp4a($e){let nt=$e.channelCount,Je=$e.audioSampleRate,wt=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,nt,0,16,0,0,0,0,Je>>>8&255,Je&255,0,0]);return Ze.box(Ze.types.mp4a,wt,Ze.esds($e))}static esds($e){let nt=$e.config||[],Je=nt.length,wt=new Uint8Array([0,0,0,0,3,23+Je,0,1,0,4,15+Je,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([Je]).concat(nt).concat([6,1,2]));return Ze.box(Ze.types.esds,wt)}static avc1($e){let nt=$e.avcc,Je=$e.codecWidth,wt=$e.codecHeight,Nt=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,Je>>>8&255,Je&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 Ze.box(Ze.types.avc1,Nt,Ze.box(Ze.types.avcC,nt))}static mvex($e){return Ze.box(Ze.types.mvex,Ze.trex($e))}static trex($e){let nt=$e.id,Je=new Uint8Array([0,0,0,0,nt>>>24&255,nt>>>16&255,nt>>>8&255,nt&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return Ze.box(Ze.types.trex,Je)}static moof($e,nt){return Ze.box(Ze.types.moof,Ze.mfhd($e.sequenceNumber),Ze.traf($e,nt))}static mfhd($e){let nt=new Uint8Array([0,0,0,0,$e>>>24&255,$e>>>16&255,$e>>>8&255,$e&255]);return Ze.box(Ze.types.mfhd,nt)}static traf($e,nt){let Je=$e.id,wt=Ze.box(Ze.types.tfhd,new Uint8Array([0,0,0,0,Je>>>24&255,Je>>>16&255,Je>>>8&255,Je&255])),Nt=Ze.box(Ze.types.tfdt,new Uint8Array([0,0,0,0,nt>>>24&255,nt>>>16&255,nt>>>8&255,nt&255])),kt=Ze.sdtp($e),Et=Ze.trun($e,kt.byteLength+16+16+8+16+8+8);return Ze.box(Ze.types.traf,wt,Nt,Et,kt)}static sdtp($e){let nt=$e.samples||[],Je=nt.length,wt=new Uint8Array(4+Je);for(let Nt=0;Nt<Je;Nt++){let kt=nt[Nt].flags;wt[Nt+4]=kt.isLeading<<6|kt.dependsOn<<4|kt.isDependedOn<<2|kt.hasRedundancy}return Ze.box(Ze.types.sdtp,wt)}static trun($e,nt){let Je=$e.samples||[],wt=Je.length,Nt=12+16*wt,kt=new Uint8Array(Nt);nt+=8+Nt,kt.set([0,0,15,1,wt>>>24&255,wt>>>16&255,wt>>>8&255,wt&255,nt>>>24&255,nt>>>16&255,nt>>>8&255,nt&255],0);for(let Et=0;Et<wt;Et++){let cn=Je[Et].duration,bn=Je[Et].size,dn=Je[Et].flags,rn=Je[Et].cts;kt.set([cn>>>24&255,cn>>>16&255,cn>>>8&255,cn&255,bn>>>24&255,bn>>>16&255,bn>>>8&255,bn&255,dn.isLeading<<2|dn.dependsOn,dn.isDependedOn<<6|dn.hasRedundancy<<4|dn.isNonSync,0,0,rn>>>24&255,rn>>>16&255,rn>>>8&255,rn&255],12+16*Et)}return Ze.box(Ze.types.trun,kt)}static mdat($e){return Ze.box(Ze.types.mdat,$e)}}Ze.init();var lt=Ze;class xt{static getSilentFrame($e,nt){if($e==="mp4a.40.2"){if(nt===1)return new Uint8Array([0,200,0,128,35,128]);if(nt===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(nt===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(nt===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(nt===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(nt===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(nt===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(nt===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(nt===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 tn=xt;class en{constructor($e,nt,Je,wt,Nt){this.dts=$e,this.pts=nt,this.duration=Je,this.originalDts=wt,this.isSyncPoint=Nt,this.fileposition=null}}class Jt{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($e){$e.isSyncPoint=!0,this.syncPoints.push($e)}}class gn{constructor(){this._list=[]}clear(){this._list=[]}appendArray($e){let nt=this._list;$e.length!==0&&(nt.length>0&&$e[0].originalDts<nt[nt.length-1].originalDts&&this.clear(),Array.prototype.push.apply(nt,$e))}getLastSyncPointBeforeDts($e){if(this._list.length==0)return null;let nt=this._list,Je=0,wt=nt.length-1,Nt=0,kt=0,Et=wt;for($e<nt[0].dts&&(Je=0,kt=Et+1);kt<=Et;)if(Nt=kt+Math.floor((Et-kt)/2),Nt===wt||$e>=nt[Nt].dts&&$e<nt[Nt+1].dts){Je=Nt;break}else nt[Nt].dts<$e?kt=Nt+1:Et=Nt-1;return this._list[Je]}}class Mn{constructor($e){this._type=$e,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($e){let nt=this._list;if(nt.length===0)return-2;let Je=nt.length-1,wt=0,Nt=0,kt=Je,Et=0;if($e<nt[0].originalBeginDts)return Et=-1,Et;for(;Nt<=kt;)if(wt=Nt+Math.floor((kt-Nt)/2),wt===Je||$e>nt[wt].lastSample.originalDts&&$e<nt[wt+1].originalBeginDts){Et=wt;break}else nt[wt].originalBeginDts<$e?Nt=wt+1:kt=wt-1;return Et}_searchNearestSegmentAfter($e){return this._searchNearestSegmentBefore($e)+1}append($e){let nt=this._list,Je=$e,wt=this._lastAppendLocation,Nt=0;wt!==-1&&wt<nt.length&&Je.originalBeginDts>=nt[wt].lastSample.originalDts&&(wt===nt.length-1||wt<nt.length-1&&Je.originalBeginDts<nt[wt+1].originalBeginDts)?Nt=wt+1:nt.length>0&&(Nt=this._searchNearestSegmentBefore(Je.originalBeginDts)+1),this._lastAppendLocation=Nt,this._list.splice(Nt,0,Je)}getLastSegmentBefore($e){let nt=this._searchNearestSegmentBefore($e);return nt>=0?this._list[nt]:null}getLastSampleBefore($e){let nt=this.getLastSegmentBefore($e);return nt!=null?nt.lastSample:null}getLastSyncPointBefore($e){let nt=this._searchNearestSegmentBefore($e),Je=this._list[nt].syncPoints;for(;Je.length===0&&nt>0;)nt--,Je=this._list[nt].syncPoints;return Je.length>0?Je[Je.length-1]:null}}class yn{constructor($e){this.TAG="MP4Remuxer",this._config=$e,this._isLive=$e.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 Mn("audio"),this._videoSegmentInfoList=new Mn("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($e){return $e.onDataAvailable=this.remux.bind(this),$e.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}get onInitSegment(){return this._onInitSegment}set onInitSegment($e){this._onInitSegment=$e}get onMediaSegment(){return this._onMediaSegment}set onMediaSegment($e){this._onMediaSegment=$e}insertDiscontinuity(){this._audioNextDts=this._videoNextDts=void 0}seek($e){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}remux($e,nt){if(!this._onMediaSegment)throw new ge("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase($e,nt),this._remuxVideo(nt),this._remuxAudio($e)}_onTrackMetadataReceived($e,nt){let Je=null,wt="mp4",Nt=nt.codec;if($e==="audio")this._audioMeta=nt,nt.codec==="mp3"&&this._mp3UseMpegAudio?(wt="mpeg",Nt="",Je=new Uint8Array):Je=lt.generateInitSegment(nt);else if($e==="video")this._videoMeta=nt,Je=lt.generateInitSegment(nt);else return;if(!this._onInitSegment)throw new ge("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment($e,{type:$e,data:Je.buffer,codec:Nt,container:`${$e}/${wt}`,mediaDuration:nt.duration})}_calculateDtsBase($e,nt){this._dtsBaseInited||($e.samples&&$e.samples.length&&(this._audioDtsBase=$e.samples[0].dts),nt.samples&&nt.samples.length&&(this._videoDtsBase=nt.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}flushStashedSamples(){let $e=this._videoStashedLastSample,nt=this._audioStashedLastSample,Je={type:"video",id:1,sequenceNumber:0,samples:[],length:0};$e!=null&&(Je.samples.push($e),Je.length=$e.length);let wt={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};nt!=null&&(wt.samples.push(nt),wt.length=nt.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(Je,!0),this._remuxAudio(wt,!0)}_remuxAudio($e,nt){if(this._audioMeta==null)return;let Je=$e,wt=Je.samples,Nt,kt=-1,Et=-1,cn=-1,bn=this._audioMeta.refSampleDuration,dn=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,rn=this._dtsBaseInited&&this._audioNextDts===void 0,At=!1;if(!wt||wt.length===0||wt.length===1&&!nt)return;let an=0,En=null,Dn=0;dn?(an=0,Dn=Je.length):(an=8,Dn=8+Je.length);let qt=null;if(wt.length>1&&(qt=wt.pop(),Dn-=qt.length),this._audioStashedLastSample!=null){let Fn=this._audioStashedLastSample;this._audioStashedLastSample=null,wt.unshift(Fn),Dn+=Fn.length}qt!=null&&(this._audioStashedLastSample=qt);let on=wt[0].dts-this._dtsBase;if(this._audioNextDts)Nt=on-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())Nt=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(At=!0);else{let Fn=this._audioSegmentInfoList.getLastSampleBefore(on);if(Fn!=null){let hi=on-(Fn.originalDts+Fn.duration);hi<=3&&(hi=0);let Ii=Fn.dts+Fn.duration+hi;Nt=on-Ii}else Nt=0}if(At){let Fn=on-Nt,hi=this._videoSegmentInfoList.getLastSegmentBefore(on);if(hi!=null&&hi.beginDts<Fn){let Ii=tn.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(Ii){let Ri=hi.beginDts,Pn=Fn-hi.beginDts;Pe.v(this.TAG,`InsertPrefixSilentAudio: dts: ${Ri}, duration: ${Pn}`),wt.unshift({unit:Ii,dts:Ri,pts:Ri}),Dn+=Ii.byteLength}}else At=!1}let Nn=[];for(let Fn=0;Fn<wt.length;Fn++){let hi=wt[Fn],Ii=hi.unit,Ri=hi.dts-this._dtsBase,Pn=Ri-Nt;kt===-1&&(kt=Pn);let Vi=0;Fn!==wt.length-1?Vi=wt[Fn+1].dts-this._dtsBase-Nt-Pn:qt!=null?Vi=qt.dts-this._dtsBase-Nt-Pn:Nn.length>=1?Vi=Nn[Nn.length-1].duration:Vi=Math.floor(bn);let Cr=!1,mr=null;if(Vi>bn*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!ie.safari){Cr=!0;let _n=Math.abs(Vi-bn),Jn=Math.ceil(_n/bn),ui=Pn+bn;Pe.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
|
|
|
dts: ${Pn+Vi} ms, expected: ${Pn+Math.round(bn)} ms, delta: ${Math.round(_n)} ms, generate: ${Jn} frames`);let yi=tn.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);yi==null&&(Pe.w(this.TAG,`Unable to generate silent frame for ${this._audioMeta.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`),yi=Ii),mr=[];for(let Ei=0;Ei<Jn;Ei++){let Qi=Math.round(ui);if(mr.length>0){let zi=mr[mr.length-1];zi.duration=Qi-zi.dts}let Fi={dts:Qi,pts:Qi,cts:0,unit:yi,size:yi.byteLength,duration:0,originalDts:Ri,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};mr.push(Fi),Dn+=Fi.size,ui+=bn}let di=mr[mr.length-1];di.duration=Pn+Vi-di.dts,Vi=Math.round(bn)}Nn.push({dts:Pn,pts:Pn,cts:0,unit:hi.unit,size:hi.unit.byteLength,duration:Vi,originalDts:Ri,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),Cr&&Nn.push.apply(Nn,mr)}dn?En=new Uint8Array(Dn):(En=new Uint8Array(Dn),En[0]=Dn>>>24&255,En[1]=Dn>>>16&255,En[2]=Dn>>>8&255,En[3]=Dn&255,En.set(lt.types.mdat,4));for(let Fn=0;Fn<Nn.length;Fn++){let hi=Nn[Fn].unit;En.set(hi,an),an+=hi.byteLength}let On=Nn[Nn.length-1];Et=On.dts+On.duration,this._audioNextDts=Et;let qn=new Jt;qn.beginDts=kt,qn.endDts=Et,qn.beginPts=kt,qn.endPts=Et,qn.originalBeginDts=Nn[0].originalDts,qn.originalEndDts=On.originalDts+On.duration,qn.firstSample=new en(Nn[0].dts,Nn[0].pts,Nn[0].duration,Nn[0].originalDts,!1),qn.lastSample=new en(On.dts,On.pts,On.duration,On.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(qn),Je.samples=Nn,Je.sequenceNumber++;let Hn=null;dn?Hn=new Uint8Array:Hn=lt.moof(Je,kt),Je.samples=[],Je.length=0;let ei={type:"audio",data:this._mergeBoxes(Hn,En).buffer,sampleCount:Nn.length,info:qn};dn&&rn&&(ei.timestampOffset=kt),this._onMediaSegment("audio",ei)}_remuxVideo($e,nt){if(this._videoMeta==null)return;let Je=$e,wt=Je.samples,Nt,kt=-1,Et=-1,cn=-1,bn=-1;if(!wt||wt.length===0||wt.length===1&&!nt)return;let dn=8,rn=null,At=8+$e.length,an=null;if(wt.length>1&&(an=wt.pop(),At-=an.length),this._videoStashedLastSample!=null){let On=this._videoStashedLastSample;this._videoStashedLastSample=null,wt.unshift(On),At+=On.length}an!=null&&(this._videoStashedLastSample=an);let En=wt[0].dts-this._dtsBase;if(this._videoNextDts)Nt=En-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())Nt=0;else{let On=this._videoSegmentInfoList.getLastSampleBefore(En);if(On!=null){let qn=En-(On.originalDts+On.duration);qn<=3&&(qn=0);let Hn=On.dts+On.duration+qn;Nt=En-Hn}else Nt=0}let Dn=new Jt,qt=[];for(let On=0;On<wt.length;On++){let qn=wt[On],Hn=qn.dts-this._dtsBase,ei=qn.isKeyframe,Fn=Hn-Nt,hi=qn.cts,Ii=Fn+hi;kt===-1&&(kt=Fn,cn=Ii);let Ri=0;if(On!==wt.length-1?Ri=wt[On+1].dts-this._dtsBase-Nt-Fn:an!=null?Ri=an.dts-this._dtsBase-Nt-Fn:qt.length>=1?Ri=qt[qt.length-1].duration:Ri=Math.floor(this._videoMeta.refSampleDuration),ei){let Pn=new en(Fn,Ii,Ri,qn.dts,!0);Pn.fileposition=qn.fileposition,Dn.appendSyncPoint(Pn)}qt.push({dts:Fn,pts:Ii,cts:hi,units:qn.units,size:qn.length,isKeyframe:ei,duration:Ri,originalDts:Hn,flags:{isLeading:0,dependsOn:ei?2:1,isDependedOn:ei?1:0,hasRedundancy:0,isNonSync:ei?0:1}})}rn=new Uint8Array(At),rn[0]=At>>>24&255,rn[1]=At>>>16&255,rn[2]=At>>>8&255,rn[3]=At&255,rn.set(lt.types.mdat,4);for(let On=0;On<qt.length;On++){let qn=qt[On].units;for(;qn.length;){let ei=qn.shift().data;rn.set(ei,dn),dn+=ei.byteLength}}let on=qt[qt.length-1];if(Et=on.dts+on.duration,bn=on.pts+on.duration,this._videoNextDts=Et,Dn.beginDts=kt,Dn.endDts=Et,Dn.beginPts=cn,Dn.endPts=bn,Dn.originalBeginDts=qt[0].originalDts,Dn.originalEndDts=on.originalDts+on.duration,Dn.firstSample=new en(qt[0].dts,qt[0].pts,qt[0].duration,qt[0].originalDts,qt[0].isKeyframe),Dn.lastSample=new en(on.dts,on.pts,on.duration,on.originalDts,on.isKeyframe),this._isLive||this._videoSegmentInfoList.append(Dn),Je.samples=qt,Je.sequenceNumber++,this._forceFirstIDR){let On=qt[0].flags;On.dependsOn=2,On.isNonSync=0}let Nn=lt.moof(Je,kt);Je.samples=[],Je.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(Nn,rn).buffer,sampleCount:qt.length,info:Dn})}_mergeBoxes($e,nt){let Je=new Uint8Array($e.byteLength+nt.byteLength);return Je.set($e,0),Je.set(nt,$e.byteLength),Je}}var kn=yn,An={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"};class oi{constructor($e,nt){this.TAG="TransmuxingController",this._emitter=new(Te()),this._config=nt,$e.segments||($e.segments=[{duration:$e.duration,filesize:$e.filesize,url:$e.url}]),typeof $e.cors!="boolean"&&($e.cors=!0),typeof $e.withCredentials!="boolean"&&($e.withCredentials=!1),this._mediaDataSource=$e,this._currentSegmentIndex=0;let Je=0;this._mediaDataSource.segments.forEach(wt=>{wt.timestampBase=Je,Je+=wt.duration,wt.cors=$e.cors,wt.withCredentials=$e.withCredentials,nt.referrerPolicy&&(wt.referrerPolicy=nt.referrerPolicy)}),!isNaN(Je)&&this._mediaDataSource.duration!==Je&&(this._mediaDataSource.duration=Je),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($e,nt){this._emitter.addListener($e,nt)}off($e,nt){this._emitter.removeListener($e,nt)}start(){this._loadSegment(0),this._enableStatisticsReporter()}_loadSegment($e,nt){this._currentSegmentIndex=$e;let Je=this._mediaDataSource.segments[$e],wt=this._ioctl=new St(Je,this._config,$e);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),nt?this._demuxer.bindDataSource(this._ioctl):wt.onDataArrival=this._onInitChunkArrival.bind(this),wt.open(nt)}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($e){if(this._mediaInfo==null||!this._mediaInfo.isSeekable())return;let nt=this._searchSegmentIndexContains($e);if(nt===this._currentSegmentIndex){let Je=this._mediaInfo.segments[nt];if(Je==null)this._pendingSeekTime=$e;else{let wt=Je.getNearestKeyframe($e);this._remuxer.seek(wt.milliseconds),this._ioctl.seek(wt.fileposition),this._pendingResolveSeekPoint=wt.milliseconds}}else{let Je=this._mediaInfo.segments[nt];if(Je==null)this._pendingSeekTime=$e,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(nt);else{let wt=Je.getNearestKeyframe($e);this._internalAbort(),this._remuxer.seek($e),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[nt].timestampBase,this._loadSegment(nt,wt.fileposition),this._pendingResolveSeekPoint=wt.milliseconds,this._reportSegmentMediaInfo(nt)}}this._enableStatisticsReporter()}_searchSegmentIndexContains($e){let nt=this._mediaDataSource.segments,Je=nt.length-1;for(let wt=0;wt<nt.length;wt++)if($e<nt[wt].timestampBase){Je=wt-1;break}return Je}_onInitChunkArrival($e,nt){let Je=null,wt=0;if(nt>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,wt=this._demuxer.parseChunks($e,nt);else if((Je=Ke.probe($e)).match){this._demuxer=new Ke(Je,this._config),this._remuxer||(this._remuxer=new kn(this._config));let Nt=this._mediaDataSource;Nt.duration!=null&&!isNaN(Nt.duration)&&(this._demuxer.overridedDuration=Nt.duration),typeof Nt.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=Nt.hasAudio),typeof Nt.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=Nt.hasVideo),this._demuxer.timestampBase=Nt.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($e,nt)}else Je=null,Pe.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(()=>{this._internalAbort()}),this._emitter.emit(An.DEMUX_ERROR,He.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),wt=0;return wt}_onMediaInfo($e){this._mediaInfo==null&&(this._mediaInfo=Object.assign({},$e),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,jt.prototype));let nt=Object.assign({},$e);Object.setPrototypeOf(nt,jt.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=nt,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(()=>{let Je=this._pendingSeekTime;this._pendingSeekTime=null,this.seek(Je)})}_onMetaDataArrived($e){this._emitter.emit(An.METADATA_ARRIVED,$e)}_onScriptDataArrived($e){this._emitter.emit(An.SCRIPTDATA_ARRIVED,$e)}_onIOSeeked(){this._remuxer.insertDiscontinuity()}_onIOComplete($e){let Je=$e+1;Je<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(Je)):(this._remuxer.flushStashedSamples(),this._emitter.emit(An.LOADING_COMPLETE),this._disableStatisticsReporter())}_onIORedirect($e){let nt=this._ioctl.extraData;this._mediaDataSource.segments[nt].redirectedURL=$e}_onIORecoveredEarlyEof(){this._emitter.emit(An.RECOVERED_EARLY_EOF)}_onIOException($e,nt){Pe.e(this.TAG,`IOException: type = ${$e}, code = ${nt.code}, msg = ${nt.msg}`),this._emitter.emit(An.IO_ERROR,$e,nt),this._disableStatisticsReporter()}_onDemuxException($e,nt){Pe.e(this.TAG,`DemuxException: type = ${$e}, info = ${nt}`),this._emitter.emit(An.DEMUX_ERROR,$e,nt)}_onRemuxerInitSegmentArrival($e,nt){this._emitter.emit(An.INIT_SEGMENT,$e,nt)}_onRemuxerMediaSegmentArrival($e,nt){if(this._pendingSeekTime==null&&(this._emitter.emit(An.MEDIA_SEGMENT,$e,nt),this._pendingResolveSeekPoint!=null&&$e==="video")){let Je=nt.info.syncPoints,wt=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,ie.safari&&Je.length>0&&Je[0].originalDts===wt&&(wt=Je[0].pts),this._emitter.emit(An.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($e){let nt=this._mediaInfo.segments[$e],Je=Object.assign({},nt);Je.duration=this._mediaInfo.duration,Je.segmentCount=this._mediaInfo.segmentCount,delete Je.segments,delete Je.keyframesIndex,this._emitter.emit(An.MEDIA_INFO,Je)}_reportStatisticsInfo(){let $e={};$e.url=this._ioctl.currentURL,$e.hasRedirect=this._ioctl.hasRedirect,$e.hasRedirect&&($e.redirectedURL=this._ioctl.currentRedirectedURL),$e.speed=this._ioctl.currentSpeed,$e.loaderType=this._ioctl.loaderType,$e.currentSegmentIndex=this._currentSegmentIndex,$e.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(An.STATISTICS_INFO,$e)}}var ai=oi,Pi=function(Xn){let $e="TransmuxingWorker",nt=null,Je=Dn.bind(this);me.install(),Xn.addEventListener("message",function(qt){switch(qt.data.cmd){case"init":nt=new ai(qt.data.param[0],qt.data.param[1]),nt.on(An.IO_ERROR,At.bind(this)),nt.on(An.DEMUX_ERROR,an.bind(this)),nt.on(An.INIT_SEGMENT,wt.bind(this)),nt.on(An.MEDIA_SEGMENT,Nt.bind(this)),nt.on(An.LOADING_COMPLETE,kt.bind(this)),nt.on(An.RECOVERED_EARLY_EOF,Et.bind(this)),nt.on(An.MEDIA_INFO,cn.bind(this)),nt.on(An.METADATA_ARRIVED,bn.bind(this)),nt.on(An.SCRIPTDATA_ARRIVED,dn.bind(this)),nt.on(An.STATISTICS_INFO,rn.bind(this)),nt.on(An.RECOMMEND_SEEKPOINT,En.bind(this));break;case"destroy":nt&&(nt.destroy(),nt=null),Xn.postMessage({msg:"destroyed"});break;case"start":nt.start();break;case"stop":nt.stop();break;case"seek":nt.seek(qt.data.param);break;case"pause":nt.pause();break;case"resume":nt.resume();break;case"logging_config":{let on=qt.data.param;vt.applyConfig(on),on.enableCallback===!0?vt.addLogListener(Je):vt.removeLogListener(Je);break}}});function wt(qt,on){let Nn={msg:An.INIT_SEGMENT,data:{type:qt,data:on}};Xn.postMessage(Nn,[on.data])}function Nt(qt,on){let Nn={msg:An.MEDIA_SEGMENT,data:{type:qt,data:on}};Xn.postMessage(Nn,[on.data])}function kt(){let qt={msg:An.LOADING_COMPLETE};Xn.postMessage(qt)}function Et(){let qt={msg:An.RECOVERED_EARLY_EOF};Xn.postMessage(qt)}function cn(qt){let on={msg:An.MEDIA_INFO,data:qt};Xn.postMessage(on)}function bn(qt){let on={msg:An.METADATA_ARRIVED,data:qt};Xn.postMessage(on)}function dn(qt){let on={msg:An.SCRIPTDATA_ARRIVED,data:qt};Xn.postMessage(on)}function rn(qt){let on={msg:An.STATISTICS_INFO,data:qt};Xn.postMessage(on)}function At(qt,on){Xn.postMessage({msg:An.IO_ERROR,data:{type:qt,info:on}})}function an(qt,on){Xn.postMessage({msg:An.DEMUX_ERROR,data:{type:qt,info:on}})}function En(qt){Xn.postMessage({msg:An.RECOMMEND_SEEKPOINT,data:qt})}function Dn(qt,on){Xn.postMessage({msg:"logcat_callback",data:{type:qt,logcat:on}})}};class Xi{constructor($e,nt){if(this.TAG="Transmuxer",this._emitter=new(Te()),nt.enableWorker&&typeof Worker!="undefined")try{let Je=Ee(82059);this._worker=Je(Pi),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[$e,nt]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},vt.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:vt.getConfig()})}catch(Je){Pe.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new ai($e,nt)}else this._controller=new ai($e,nt);if(this._controller){let Je=this._controller;Je.on(An.IO_ERROR,this._onIOError.bind(this)),Je.on(An.DEMUX_ERROR,this._onDemuxError.bind(this)),Je.on(An.INIT_SEGMENT,this._onInitSegment.bind(this)),Je.on(An.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),Je.on(An.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),Je.on(An.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),Je.on(An.MEDIA_INFO,this._onMediaInfo.bind(this)),Je.on(An.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),Je.on(An.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),Je.on(An.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),Je.on(An.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}destroy(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),vt.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}on($e,nt){this._emitter.addListener($e,nt)}off($e,nt){this._emitter.removeListener($e,nt)}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($e){this._worker?this._worker.postMessage({cmd:"seek",param:$e}):this._controller.seek($e)}pause(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}resume(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}_onInitSegment($e,nt){Promise.resolve().then(()=>{this._emitter.emit(An.INIT_SEGMENT,$e,nt)})}_onMediaSegment($e,nt){Promise.resolve().then(()=>{this._emitter.emit(An.MEDIA_SEGMENT,$e,nt)})}_onLoadingComplete(){Promise.resolve().then(()=>{this._emitter.emit(An.LOADING_COMPLETE)})}_onRecoveredEarlyEof(){Promise.resolve().then(()=>{this._emitter.emit(An.RECOVERED_EARLY_EOF)})}_onMediaInfo($e){Promise.resolve().then(()=>{this._emitter.emit(An.MEDIA_INFO,$e)})}_onMetaDataArrived($e){Promise.resolve().then(()=>{this._emitter.emit(An.METADATA_ARRIVED,$e)})}_onScriptDataArrived($e){Promise.resolve().then(()=>{this._emitter.emit(An.SCRIPTDATA_ARRIVED,$e)})}_onStatisticsInfo($e){Promise.resolve().then(()=>{this._emitter.emit(An.STATISTICS_INFO,$e)})}_onIOError($e,nt){Promise.resolve().then(()=>{this._emitter.emit(An.IO_ERROR,$e,nt)})}_onDemuxError($e,nt){Promise.resolve().then(()=>{this._emitter.emit(An.DEMUX_ERROR,$e,nt)})}_onRecommendSeekpoint($e){Promise.resolve().then(()=>{this._emitter.emit(An.RECOMMEND_SEEKPOINT,$e)})}_onLoggingConfigChanged($e){this._worker&&this._worker.postMessage({cmd:"logging_config",param:$e})}_onWorkerMessage($e){let nt=$e.data,Je=nt.data;if(nt.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(nt.msg){case An.INIT_SEGMENT:case An.MEDIA_SEGMENT:this._emitter.emit(nt.msg,Je.type,Je.data);break;case An.LOADING_COMPLETE:case An.RECOVERED_EARLY_EOF:this._emitter.emit(nt.msg);break;case An.MEDIA_INFO:Object.setPrototypeOf(Je,jt.prototype),this._emitter.emit(nt.msg,Je);break;case An.METADATA_ARRIVED:case An.SCRIPTDATA_ARRIVED:case An.STATISTICS_INFO:this._emitter.emit(nt.msg,Je);break;case An.IO_ERROR:case An.DEMUX_ERROR:this._emitter.emit(nt.msg,Je.type,Je.info);break;case An.RECOMMEND_SEEKPOINT:this._emitter.emit(nt.msg,Je);break;case"logcat_callback":Pe.emitter.emit("log",Je.type,Je.logcat);break;default:break}}}var or=Xi,dr={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};class no{constructor($e){this.TAG="MSEController",this._config=$e,this._emitter=new(Te()),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 gn}destroy(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}on($e,nt){this._emitter.addListener($e,nt)}off($e,nt){this._emitter.removeListener($e,nt)}attachMediaElement($e){if(this._mediaSource)throw new ge("MediaSource has been attached to an HTMLMediaElement!");let nt=this._mediaSource=new window.MediaSource;nt.addEventListener("sourceopen",this.e.onSourceOpen),nt.addEventListener("sourceended",this.e.onSourceEnded),nt.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=$e,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),$e.src=this._mediaSourceObjectURL}detachMediaElement(){if(this._mediaSource){let $e=this._mediaSource;for(let nt in this._sourceBuffers){let Je=this._pendingSegments[nt];Je.splice(0,Je.length),this._pendingSegments[nt]=null,this._pendingRemoveRanges[nt]=null,this._lastInitSegments[nt]=null;let wt=this._sourceBuffers[nt];if(wt){if($e.readyState!=="closed"){try{$e.removeSourceBuffer(wt)}catch(Nt){Pe.e(this.TAG,Nt.message)}wt.removeEventListener("error",this.e.onSourceBufferError),wt.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[nt]=null,this._sourceBuffers[nt]=null}}if($e.readyState==="open")try{$e.endOfStream()}catch(nt){Pe.e(this.TAG,nt.message)}$e.removeEventListener("sourceopen",this.e.onSourceOpen),$e.removeEventListener("sourceended",this.e.onSourceEnded),$e.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($e,nt){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push($e),this._pendingSegments[$e.type].push($e);return}let Je=$e,wt=`${Je.container}`;Je.codec&&Je.codec.length>0&&(wt+=`;codecs=${Je.codec}`);let Nt=!1;if(Pe.v(this.TAG,"Received Initialization Segment, mimeType: "+wt),this._lastInitSegments[Je.type]=Je,wt!==this._mimeTypes[Je.type]){if(this._mimeTypes[Je.type])Pe.v(this.TAG,`Notice: ${Je.type} mimeType changed, origin: ${this._mimeTypes[Je.type]}, target: ${wt}`);else{Nt=!0;try{let kt=this._sourceBuffers[Je.type]=this._mediaSource.addSourceBuffer(wt);kt.addEventListener("error",this.e.onSourceBufferError),kt.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(kt){Pe.e(this.TAG,kt.message),this._emitter.emit(dr.ERROR,{code:kt.code,msg:kt.message});return}}this._mimeTypes[Je.type]=wt}nt||this._pendingSegments[Je.type].push(Je),Nt||this._sourceBuffers[Je.type]&&!this._sourceBuffers[Je.type].updating&&this._doAppendSegments(),ie.safari&&Je.container==="audio/mpeg"&&Je.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=Je.mediaDuration/1e3,this._updateMediaSourceDuration())}appendMediaSegment($e){let nt=$e;this._pendingSegments[nt.type].push(nt),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();let Je=this._sourceBuffers[nt.type];Je&&!Je.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}seek($e){for(let nt in this._sourceBuffers){if(!this._sourceBuffers[nt])continue;let Je=this._sourceBuffers[nt];if(this._mediaSource.readyState==="open")try{Je.abort()}catch(Nt){Pe.e(this.TAG,Nt.message)}this._idrList.clear();let wt=this._pendingSegments[nt];if(wt.splice(0,wt.length),this._mediaSource.readyState!=="closed"){for(let Nt=0;Nt<Je.buffered.length;Nt++){let kt=Je.buffered.start(Nt),Et=Je.buffered.end(Nt);this._pendingRemoveRanges[nt].push({start:kt,end:Et})}if(Je.updating||this._doRemoveRanges(),ie.safari){let Nt=this._lastInitSegments[nt];Nt&&(this._pendingSegments[nt].push(Nt),Je.updating||this._doAppendSegments())}}}}endOfStream(){let $e=this._mediaSource,nt=this._sourceBuffers;if(!$e||$e.readyState!=="open"){$e&&$e.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0);return}nt.video&&nt.video.updating||nt.audio&&nt.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,$e.endOfStream())}getNearestKeyframe($e){return this._idrList.getLastSyncPointBeforeDts($e)}_needCleanupSourceBuffer(){if(!this._config.autoCleanupSourceBuffer)return!1;let $e=this._mediaElement.currentTime;for(let nt in this._sourceBuffers){let Je=this._sourceBuffers[nt];if(Je){let wt=Je.buffered;if(wt.length>=1&&$e-wt.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}_doCleanupSourceBuffer(){let $e=this._mediaElement.currentTime;for(let nt in this._sourceBuffers){let Je=this._sourceBuffers[nt];if(Je){let wt=Je.buffered,Nt=!1;for(let kt=0;kt<wt.length;kt++){let Et=wt.start(kt),cn=wt.end(kt);if(Et<=$e&&$e<cn+3){if($e-Et>=this._config.autoCleanupMaxBackwardDuration){Nt=!0;let bn=$e-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[nt].push({start:Et,end:bn})}}else cn<$e&&(Nt=!0,this._pendingRemoveRanges[nt].push({start:Et,end:cn}))}Nt&&!Je.updating&&this._doRemoveRanges()}}}_updateMediaSourceDuration(){let $e=this._sourceBuffers;if(this._mediaElement.readyState===0||this._mediaSource.readyState!=="open"||$e.video&&$e.video.updating||$e.audio&&$e.audio.updating)return;let nt=this._mediaSource.duration,Je=this._pendingMediaDuration;Je>0&&(isNaN(nt)||Je>nt)&&(Pe.v(this.TAG,`Update MediaSource duration from ${nt} to ${Je}`),this._mediaSource.duration=Je),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}_doRemoveRanges(){for(let $e in this._pendingRemoveRanges){if(!this._sourceBuffers[$e]||this._sourceBuffers[$e].updating)continue;let nt=this._sourceBuffers[$e],Je=this._pendingRemoveRanges[$e];for(;Je.length&&!nt.updating;){let wt=Je.shift();nt.remove(wt.start,wt.end)}}}_doAppendSegments(){let $e=this._pendingSegments;for(let nt in $e)if(!(!this._sourceBuffers[nt]||this._sourceBuffers[nt].updating)&&$e[nt].length>0){let Je=$e[nt].shift();if(Je.timestampOffset){let wt=this._sourceBuffers[nt].timestampOffset,Nt=Je.timestampOffset/1e3;Math.abs(wt-Nt)>.1&&(Pe.v(this.TAG,`Update MPEG audio timestampOffset from ${wt} to ${Nt}`),this._sourceBuffers[nt].timestampOffset=Nt),delete Je.timestampOffset}if(!Je.data||Je.data.byteLength===0)continue;try{this._sourceBuffers[nt].appendBuffer(Je.data),this._isBufferFull=!1,nt==="video"&&Je.hasOwnProperty("info")&&this._idrList.appendArray(Je.info.syncPoints)}catch(wt){this._pendingSegments[nt].unshift(Je),wt.code===22?(this._isBufferFull||this._emitter.emit(dr.BUFFER_FULL),this._isBufferFull=!0):(Pe.e(this.TAG,wt.message),this._emitter.emit(dr.ERROR,{code:wt.code,msg:wt.message}))}}}_onSourceOpen(){if(Pe.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0){let $e=this._pendingSourceBufferInit;for(;$e.length;){let nt=$e.shift();this.appendInitSegment(nt,!0)}}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(dr.SOURCE_OPEN)}_onSourceEnded(){Pe.v(this.TAG,"MediaSource onSourceEnded")}_onSourceClose(){Pe.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 $e=this._pendingSegments;return $e.video.length>0||$e.audio.length>0}_hasPendingRemoveRanges(){let $e=this._pendingRemoveRanges;return $e.video.length>0||$e.audio.length>0}_onSourceBufferUpdateEnd(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(dr.UPDATE_END)}_onSourceBufferError($e){Pe.e(this.TAG,`SourceBuffer Error: ${$e}`)}}var Ir=no;const xi={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},wr={NETWORK_EXCEPTION:ue.EXCEPTION,NETWORK_STATUS_CODE_INVALID:ue.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:ue.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:ue.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:He.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:He.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:He.CODEC_UNSUPPORTED};class Mr{constructor($e,nt){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(Te()),this._config=Ft(),typeof nt=="object"&&Object.assign(this._config,nt),$e.type.toLowerCase()!=="flv")throw new ce("FlvPlayer requires an flv MediaDataSource input!");$e.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=$e,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 Je=ie.chrome&&(ie.version.major<50||ie.version.major===50&&ie.version.build<2661);this._alwaysSeekKeyframe=!!(Je||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($e,nt){$e===yt.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(yt.MEDIA_INFO,this.mediaInfo)}):$e===yt.STATISTICS_INFO&&this._statisticsInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(yt.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener($e,nt)}off($e,nt){this._emitter.removeListener($e,nt)}attachMediaElement($e){if(this._mediaElement=$e,$e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),$e.addEventListener("seeking",this.e.onvSeeking),$e.addEventListener("canplay",this.e.onvCanPlay),$e.addEventListener("stalled",this.e.onvStalled),$e.addEventListener("progress",this.e.onvProgress),this._msectl=new Ir(this._config),this._msectl.on(dr.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(dr.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(dr.SOURCE_OPEN,()=>{this._mseSourceOpened=!0,this._hasPendingLoad&&(this._hasPendingLoad=!1,this.load())}),this._msectl.on(dr.ERROR,nt=>{this._emitter.emit(yt.ERROR,xi.MEDIA_ERROR,wr.MEDIA_MSE_ERROR,nt)}),this._msectl.attachMediaElement($e),this._pendingSeekTime!=null)try{$e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(nt){}}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 or(this._mediaDataSource,this._config),this._transmuxer.on(An.INIT_SEGMENT,($e,nt)=>{this._msectl.appendInitSegment(nt)}),this._transmuxer.on(An.MEDIA_SEGMENT,($e,nt)=>{if(this._msectl.appendMediaSegment(nt),this._config.lazyLoad&&!this._config.isLive){let Je=this._mediaElement.currentTime;nt.info.endDts>=(Je+this._config.lazyLoadMaxDuration)*1e3&&this._progressChecker==null&&(Pe.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}),this._transmuxer.on(An.LOADING_COMPLETE,()=>{this._msectl.endOfStream(),this._emitter.emit(yt.LOADING_COMPLETE)}),this._transmuxer.on(An.RECOVERED_EARLY_EOF,()=>{this._emitter.emit(yt.RECOVERED_EARLY_EOF)}),this._transmuxer.on(An.IO_ERROR,($e,nt)=>{this._emitter.emit(yt.ERROR,xi.NETWORK_ERROR,$e,nt)}),this._transmuxer.on(An.DEMUX_ERROR,($e,nt)=>{this._emitter.emit(yt.ERROR,xi.MEDIA_ERROR,$e,{code:-1,msg:nt})}),this._transmuxer.on(An.MEDIA_INFO,$e=>{this._mediaInfo=$e,this._emitter.emit(yt.MEDIA_INFO,Object.assign({},$e))}),this._transmuxer.on(An.METADATA_ARRIVED,$e=>{this._emitter.emit(yt.METADATA_ARRIVED,$e)}),this._transmuxer.on(An.SCRIPTDATA_ARRIVED,$e=>{this._emitter.emit(yt.SCRIPTDATA_ARRIVED,$e)}),this._transmuxer.on(An.STATISTICS_INFO,$e=>{this._statisticsInfo=this._fillStatisticsInfo($e),this._emitter.emit(yt.STATISTICS_INFO,Object.assign({},this._statisticsInfo))}),this._transmuxer.on(An.RECOMMEND_SEEKPOINT,$e=>{this._mediaElement&&!this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=$e/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($e){this._mediaElement.volume=$e}get muted(){return this._mediaElement.muted}set muted($e){this._mediaElement.muted=$e}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime($e){this._mediaElement?this._internalSeek($e):this._pendingSeekTime=$e}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($e){if($e.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return $e;let nt=!0,Je=0,wt=0;if(this._mediaElement.getVideoPlaybackQuality){let Nt=this._mediaElement.getVideoPlaybackQuality();Je=Nt.totalVideoFrames,wt=Nt.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(Je=this._mediaElement.webkitDecodedFrameCount,wt=this._mediaElement.webkitDroppedFrameCount):nt=!1;return nt&&($e.decodedFrames=Je,$e.droppedFrames=wt),$e}_onmseUpdateEnd(){if(!this._config.lazyLoad||this._config.isLive)return;let $e=this._mediaElement.buffered,nt=this._mediaElement.currentTime,Je=0,wt=0;for(let Nt=0;Nt<$e.length;Nt++){let kt=$e.start(Nt),Et=$e.end(Nt);if(kt<=nt&&nt<Et){Je=kt,wt=Et;break}}wt>=nt+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(Pe.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}_onmseBufferFull(){Pe.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 $e=this._mediaElement.currentTime,nt=this._mediaElement.buffered,Je=!1;for(let wt=0;wt<nt.length;wt++){let Nt=nt.start(wt),kt=nt.end(wt);if($e>=Nt&&$e<kt){$e>=kt-this._config.lazyLoadRecoverDuration&&(Je=!0);break}}Je&&(window.clearInterval(this._progressChecker),this._progressChecker=null,Je&&(Pe.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}_isTimepointBuffered($e){let nt=this._mediaElement.buffered;for(let Je=0;Je<nt.length;Je++){let wt=nt.start(Je),Nt=nt.end(Je);if($e>=wt&&$e<Nt)return!0}return!1}_internalSeek($e){let nt=this._isTimepointBuffered($e),Je=!1,wt=0;if($e<1&&this._mediaElement.buffered.length>0){let Nt=this._mediaElement.buffered.start(0);(Nt<1&&$e<Nt||ie.safari)&&(Je=!0,wt=ie.safari?.1:Nt)}if(Je)this._requestSetTime=!0,this._mediaElement.currentTime=wt;else if(nt){if(!this._alwaysSeekKeyframe)this._requestSetTime=!0,this._mediaElement.currentTime=$e;else{let Nt=this._msectl.getNearestKeyframe(Math.floor($e*1e3));this._requestSetTime=!0,Nt!=null?this._mediaElement.currentTime=Nt.dts/1e3:this._mediaElement.currentTime=$e}this._progressChecker!=null&&this._checkProgressAndResume()}else this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek($e),this._transmuxer.seek(Math.floor($e*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=$e)}_checkAndApplyUnbufferedSeekpoint(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){let $e=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered($e)||(this._progressChecker!=null&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek($e),this._transmuxer.seek(Math.floor($e*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=$e))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_checkAndResumeStuckPlayback($e){let nt=this._mediaElement;if($e||!this._receivedCanPlay||nt.readyState<2){let Je=nt.buffered;Je.length>0&&nt.currentTime<Je.start(0)&&(Pe.w(this.TAG,`Playback seems stuck at ${nt.currentTime}, seek to ${Je.start(0)}`),this._requestSetTime=!0,this._mediaElement.currentTime=Je.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}_onvLoadedMetadata($e){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}_onvSeeking($e){let nt=this._mediaElement.currentTime,Je=this._mediaElement.buffered;if(this._requestSetTime){this._requestSetTime=!1;return}if(nt<1&&Je.length>0){let wt=Je.start(0);if(wt<1&&nt<wt||ie.safari){this._requestSetTime=!0,this._mediaElement.currentTime=ie.safari?.1:wt;return}}if(this._isTimepointBuffered(nt)){if(this._alwaysSeekKeyframe){let wt=this._msectl.getNearestKeyframe(Math.floor(nt*1e3));wt!=null&&(this._requestSetTime=!0,this._mediaElement.currentTime=wt.dts/1e3)}this._progressChecker!=null&&this._checkProgressAndResume();return}this._seekpointRecord={seekPoint:nt,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_onvCanPlay($e){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}_onvStalled($e){this._checkAndResumeStuckPlayback(!0)}_onvProgress($e){this._checkAndResumeStuckPlayback()}}var ot=Mr;class Rr{constructor($e,nt){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new(Te()),this._config=Ft(),typeof nt=="object"&&Object.assign(this._config,nt),$e.type.toLowerCase()==="flv")throw new ce("NativePlayer does't support flv MediaDataSource input!");if($e.hasOwnProperty("segments"))throw new ce(`NativePlayer(${$e.type}) doesn't support multipart playback!`);this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=$e,this._mediaElement=null}destroy(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on($e,nt){$e===yt.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(yt.MEDIA_INFO,this.mediaInfo)}):$e===yt.STATISTICS_INFO&&this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(yt.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener($e,nt)}off($e,nt){this._emitter.removeListener($e,nt)}attachMediaElement($e){if(this._mediaElement=$e,$e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{$e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(nt){}}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($e){this._mediaElement.volume=$e}get muted(){return this._mediaElement.muted}set muted($e){this._mediaElement.muted=$e}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime($e){this._mediaElement?this._mediaElement.currentTime=$e:this._pendingSeekTime=$e}get mediaInfo(){let nt={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(nt.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(nt.width=this._mediaElement.videoWidth,nt.height=this._mediaElement.videoHeight)),nt}get statisticsInfo(){let $e={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return $e;let nt=!0,Je=0,wt=0;if(this._mediaElement.getVideoPlaybackQuality){let Nt=this._mediaElement.getVideoPlaybackQuality();Je=Nt.totalVideoFrames,wt=Nt.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(Je=this._mediaElement.webkitDecodedFrameCount,wt=this._mediaElement.webkitDroppedFrameCount):nt=!1;return nt&&($e.decodedFrames=Je,$e.droppedFrames=wt),$e}_onvLoadedMetadata($e){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(yt.MEDIA_INFO,this.mediaInfo)}_reportStatisticsInfo(){this._emitter.emit(yt.STATISTICS_INFO,this.statisticsInfo)}}var Nr=Rr;me.install();function Hr(Xn,$e){let nt=Xn;if(nt==null||typeof nt!="object")throw new ce("MediaDataSource must be an javascript object!");if(!nt.hasOwnProperty("type"))throw new ce("MediaDataSource must has type field to indicate video file type!");switch(nt.type){case"flv":return new ot(nt,$e);default:return new Nr(nt,$e)}}function uo(){return rt.supportMSEH264Playback()}function po(){return rt.getFeatureList()}let io={};io.createPlayer=Hr,io.isSupported=uo,io.getFeatureList=po,io.BaseLoader=z,io.LoaderStatus=de,io.LoaderErrors=ue,io.Events=yt,io.ErrorTypes=xi,io.ErrorDetails=wr,io.FlvPlayer=ot,io.NativePlayer=Nr,io.LoggingControl=vt,Object.defineProperty(io,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var Do=io},93125:function(Cn,Yt,Ee){(function(Le){if(1)window.OSS=Le(),Cn.exports=Le();else var me})(function(){var Le;return function(){function me(Ie,Te,be){function Pe(xe,ge){if(!Te[xe]){if(!Ie[xe]){var ce=void 0;if(!ge&&ce)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=Te[xe]={exports:{}};Ie[xe][0].call(de.exports,function(ue){return Pe(Ie[xe][1][ue]||ue)},de,de.exports,me,Ie,Te,be)}return Te[xe].exports}for(var he=void 0,Se=0;Se<be.length;Se++)Pe(be[Se]);return Pe}return me}()({1:[function(me,Ie,Te){"use strict";var be=me("./browser/client");be.Buffer=me("buffer").Buffer,be.co=me("co"),be.urllib=me("../shims/xhr"),be.version=me("./browser/version").version,Ie.exports=be},{"../shims/xhr":244,"./browser/client":2,"./browser/version":5,buffer:38,co:41}],2:[function(me,Ie,Te){(function(be,Pe){"use strict";function he(rt){return rt&&rt.__esModule?rt:{default:rt}}function Se(rt,dt){return rt[dt]||rt[dt.toLowerCase()]}function xe(rt,dt){var yt=je.parse(rt);if(!yt.protocol){var _t=dt?"https://":"http://";yt=je.parse(_t+rt)}if(yt.protocol!=="http:"&&yt.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return yt}function ge(rt,dt,yt){var _t=yt?"https://":"http://",vt=dt?"-internal.aliyuncs.com":".aliyuncs.com";return rt.substr(0,14)==="vpc100-oss-cn-"&&(vt=".aliyuncs.com"),je.parse(_t+rt+vt)}function ce(){return document&&document.location&&document.location.protocol==="https:"}function ve(rt,dt){if(!(this instanceof ve))return new ve(rt,dt);rt&&rt.inited?this.options=rt:this.options=ve.initOptions(rt),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=mt,this.agent=this.options.agent||Ft),this.ctx=dt,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}var de=me("babel-runtime/regenerator"),ue=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"),le=me("copy-to"),ye=me("mime"),we=me("xml2js"),Ce=me("humanize-ms"),ke=me("agentkeepalive"),Ne=me("merge-descriptors"),je=me("url"),Ve=me("is-type-of"),Qe=me("platform"),Ge=me("utility"),mt=me("urllib"),ct=me("./version"),Ct=me("dateformat"),it=me("bowser"),St=me("../common/signUtils"),ut=me("../common/utils"),Ft=new ke;Ie.exports=ve,ve.initOptions=function(rt){if(!rt||!rt.accessKeyId||!rt.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");var dt=ce(),yt={region:"oss-cn-hangzhou",internal:!1,secure:dt,bucket:null,endpoint:null,cname:!1};if((0,ee.default)(rt).forEach(function(_t){rt[_t]!==void 0&&(yt[_t]=rt[_t])}),yt.accessKeyId=yt.accessKeyId.trim(),yt.accessKeySecret=yt.accessKeySecret.trim(),yt.timeout&&(yt.timeout=Ce(yt.timeout)),yt.endpoint)yt.endpoint=xe(yt.endpoint,yt.secure);else{if(!yt.region)throw new Error("require options.endpoint or options.region");yt.endpoint=ge(yt.region,yt.internal,yt.secure)}return yt.inited=!0,yt};var ht=ve.prototype;Ne(ht,me("./object")),Ne(ht,me("./managed_upload")),Ne(ht,me("../common/multipart")),Ne(ht,me("../common/thunkpool.js")),ve.Wrapper=me("./wrapper"),ht.signature=function(rt){return oe("authorization stringToSign: %s",rt),St.computeSignature(this.options.accessKeySecret,rt)},ht.authorization=function(rt,dt,yt,_t){var vt=St.buildCanonicalString(rt.toUpperCase(),dt,{headers:_t,parameters:yt});return St.authorization(this.options.accessKeyId,this.options.accessKeySecret,vt)},ht.createRequest=function(rt){var dt={"x-oss-date":Ct(+new Date+this.options.amendTimeSkewed,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.options.stsToken&&(dt["x-oss-security-token"]=this.options.stsToken),le(rt.headers).to(dt),Se(dt,"Content-Type")||(rt.mime===ye.default_type&&(rt.mime=""),rt.mime&&rt.mime.indexOf("/")>0?dt["Content-Type"]=rt.mime:dt["Content-Type"]=ye.getType(rt.mime||se.extname(rt.object||""))||"application/octet-stream"),rt.content&&(dt["Content-Md5"]=ie.createHash("md5").update(new Pe(rt.content,"utf8")).digest("base64"),dt["Content-Length"]||(dt["Content-Length"]=rt.content.length));var yt=this._getResource(rt);dt.authorization=this.authorization(rt.method,yt,rt.subres,dt);var _t=this._getReqUrl(rt);oe("request %s %s, with headers %j, !!stream: %s",rt.method,_t,dt,!!rt.stream);var vt=rt.timeout||this.options.timeout;return{url:_t,params:{agent:this.agent,method:rt.method,content:rt.content,stream:rt.stream,headers:dt,timeout:vt,writeStream:rt.writeStream,customResponse:rt.customResponse,ctx:rt.ctx||this.ctx}}},ht.request=ue.default.mark(function rt(dt){var yt,_t,vt,Bt;return ue.default.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:return yt=this.createRequest(dt),_t=void 0,vt=void 0,jt.prev=3,jt.next=6,this.urllib.request(yt.url,yt.params);case 6:_t=jt.sent,oe("response %s %s, got %s, headers: %j",dt.method,yt.url,_t.status,_t.headers),jt.next=13;break;case 10:jt.prev=10,jt.t0=jt.catch(3),vt=jt.t0;case 13:if(Bt=void 0,!_t||!dt.successStatuses||dt.successStatuses.indexOf(_t.status)!==-1){jt.next=26;break}return jt.next=17,this.requestError(_t);case 17:if(Bt=jt.sent,Bt.code!=="RequestTimeTooSkewed"){jt.next=23;break}return this.options.amendTimeSkewed=+new Date(Bt.serverTime)-new Date,jt.next=22,this.request(dt);case 22:return jt.abrupt("return",jt.sent);case 23:Bt.params=dt,jt.next=30;break;case 26:if(!vt){jt.next=30;break}return jt.next=29,this.requestError(vt);case 29:Bt=jt.sent;case 30:if(!Bt){jt.next=32;break}throw Bt;case 32:if(!dt.xmlResponse){jt.next=36;break}return jt.next=35,this.parseXML(_t.data);case 35:_t.data=jt.sent;case 36:return jt.abrupt("return",_t);case 37:case"end":return jt.stop()}},rt,this,[[3,10]])}),ht._getResource=function(rt){var dt="/";return rt.bucket&&(dt+=rt.bucket+"/"),rt.object&&(dt+=rt.object),dt},ht._isIP=function(rt){return ut._isIP(rt)},ht._escape=function(rt){return Ge.encodeURIComponent(rt).replace(/%2F/g,"/")},ht._getReqUrl=function(rt){var dt={};le(this.options.endpoint).to(dt);var yt=this._isIP(dt.hostname),_t=this.options.cname;!rt.bucket||_t||yt||(dt.host=rt.bucket+"."+dt.host);var vt="/";rt.bucket&&yt&&(vt+=rt.bucket+"/"),rt.object&&(vt+=this._escape(rt.object).replace(/\+/g,"%2B")),dt.pathname=vt;var Bt={};if(rt.query&&Ne(Bt,rt.query),rt.subres){var jt={};Ve.string(rt.subres)?jt[rt.subres]="":Ve.array(rt.subres)?rt.subres.forEach(function(un){jt[un]=""}):jt=rt.subres,Ne(Bt,jt)}return dt.query=Bt,je.format(dt)},ht._getUserAgent=function(){var rt=be&&be.browser?"js":"nodejs",dt="aliyun-sdk-"+rt+"/"+ct.version,yt=Qe.description;return!yt&&be&&(yt="Node.js "+be.version.slice(1)+" on "+be.platform+" "+be.arch),this._checkUserAgent(dt+" "+yt)},ht._checkUserAgent=function(rt){return rt.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},ht.checkBrowserAndVersion=function(rt,dt){return it.name===rt&&it.version.split(".")[0]===dt},ht.parseXML=function(rt){return function(dt){Pe.isBuffer(rt)&&(rt=rt.toString()),we.parseString(rt,{explicitRoot:!1,explicitArray:!1},dt)}},ht.requestError=ue.default.mark(function rt(dt){var yt,_t,vt,Bt;return ue.default.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:if(yt=null,dt.data&&dt.data.length){jt.next=5;break}dt.status===-1||dt.status===-2?(yt=new Error(dt.message),yt.name=dt.name,yt.status=dt.status,yt.code=dt.name):(dt.status===404?(yt=new Error("Object not exists"),yt.name="NoSuchKeyError",yt.status=404,yt.code="NoSuchKey"):dt.status===412?(yt=new Error("Pre condition failed"),yt.name="PreconditionFailedError",yt.status=412,yt.code="PreconditionFailed"):(yt=new Error("Unknow error, status: "+dt.status),yt.name="UnknowError",yt.status=dt.status),yt.requestId=dt.headers["x-oss-request-id"],yt.host=""),jt.next=30;break;case 5:return _t=String(dt.data),oe("request response error data: %s",_t),vt=void 0,jt.prev=8,jt.next=11,this.parseXML(_t)||{};case 11:vt=jt.sent,jt.next=21;break;case 14:return jt.prev=14,jt.t0=jt.catch(8),oe(_t),jt.t0.message+=`
|
|
|
raw xml: `+_t,jt.t0.status=dt.status,jt.t0.requestId=dt.headers["x-oss-request-id"],jt.abrupt("return",jt.t0);case 21:Bt=vt.Message||"unknow request error, status: "+dt.status,vt.Condition&&(Bt+=" (condition: "+vt.Condition+")"),yt=new Error(Bt),yt.name=vt.Code?vt.Code+"Error":"UnknowError",yt.status=dt.status,yt.code=vt.Code,yt.requestId=vt.RequestId,yt.hostId=vt.HostId,yt.serverTime=vt.ServerTime;case 30:return oe("generate error %j",yt),jt.abrupt("return",yt);case 32:case"end":return jt.stop()}},rt,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,Ie,Te){(function(be){"use strict";function Pe(le){return le&&le.__esModule?le:{default:le}}function he(le,ye){if(!(this instanceof he))return new he(le,ye);se.call(this,ye),this.file=le,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}var Se=me("babel-runtime/core-js/array/from"),xe=Pe(Se),ge=me("babel-runtime/regenerator"),ce=Pe(ge),ve=me("is-type-of"),de=me("util"),ue=me("path"),z=me("mime"),ee=me("copy-to"),oe=Te;oe.multipartUpload=ce.default.mark(function le(ye,we,Ce){var ke,Ne,je,Ve,Qe,Ge,mt,ct,Ct;return ce.default.wrap(function(it){for(;;)switch(it.prev=it.next){case 0:if(this.resetCancelFlag(),Ce=Ce||{},!Ce.checkpoint||!Ce.checkpoint.uploadId){it.next=6;break}return it.next=5,this._resumeMultipart(Ce.checkpoint,Ce);case 5:return it.abrupt("return",it.sent);case 6:return ke=102400,Ce.mime||(ve.file(we)?Ce.mime=z.getType(ue.extname(we.name)):ve.blob(we)?Ce.mime=we.type:Ce.mime=z.getType(ue.extname(we))),Ce.headers=Ce.headers||{},this._convertMetaToHeaders(Ce.meta,Ce.headers),it.next=12,this._getFileSize(we);case 12:if(!((Ne=it.sent)<ke)){it.next=25;break}return je=this._createStream(we,0,Ne),Ce.contentLength=Ne,it.next=18,this.putStream(ye,je,Ce);case 18:if(Ve=it.sent,!Ce||!Ce.progress){it.next=22;break}return it.next=22,Ce.progress(1);case 22:return Qe={res:Ve.res,bucket:this.options.bucket,name:ye,etag:Ve.res.headers.etag},(Ce.headers&&Ce.headers["x-oss-callback"]||Ce.callback)&&(Qe.data=Ve.data),it.abrupt("return",Qe);case 25:if(!(Ce.partSize&&Ce.partSize<ke)){it.next=27;break}throw new Error("partSize must not be smaller than "+ke);case 27:return it.next=29,this.initMultipartUpload(ye,Ce);case 29:if(Ge=it.sent,mt=Ge.uploadId,ct=this._getPartSize(Ne,Ce.partSize),Ct={file:we,name:ye,fileSize:Ne,partSize:ct,uploadId:mt,doneParts:[]},!Ce||!Ce.progress){it.next=36;break}return it.next=36,Ce.progress(0,Ct,Ge.res);case 36:return it.next=38,this._resumeMultipart(Ct,Ce);case 38:return it.abrupt("return",it.sent);case 39:case"end":return it.stop()}},le,this)}),oe._resumeMultipart=ce.default.mark(function le(ye,we){var Ce,ke,Ne,je,Ve,Qe,Ge,mt,ct,Ct,it,St,ut,Ft,ht,rt,dt,yt,_t,vt,Bt;return ce.default.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:if(!this.isCancel()){jt.next=2;break}throw this._makeCancelEvent();case 2:if(Ce=ye.file,ke=ye.fileSize,Ne=ye.partSize,je=ye.uploadId,Ve=ye.doneParts,Qe=ye.name,Ge=[],Ve.length>0&&ee(Ve).to(Ge),mt=this._divideParts(ke,Ne),ct=mt.length,Ct=!1,it=ce.default.mark(function un(Kt,xn){var Ut,Wt,$t;return ce.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:if(Kt.isCancel()){ft.next=21;break}return ft.prev=1,Ut=mt[xn-1],Wt={stream:Kt._createStream(Ce,Ut.start,Ut.end),size:Ut.end-Ut.start},ft.next=6,Kt._uploadPart(Qe,je,xn,Wt);case 6:if($t=ft.sent,Kt.isCancel()||Ct){ft.next=13;break}if(ye.doneParts.push({number:xn,etag:$t.res.headers.etag}),Ge.push({number:xn,etag:$t.res.headers.etag}),!we||!we.progress){ft.next=13;break}return ft.next=13,we.progress(Ve.length/ct,ye,$t.res);case 13:ft.next=21;break;case 15:if(ft.prev=15,ft.t0=ft.catch(1),Kt.isCancel()){ft.next=21;break}throw Kt.cancel(),ft.t0.partNum=xn,ft.t0;case 21:case"end":return ft.stop()}},un,this,[[1,15]])}),St=(0,xe.default)(new Array(ct),function(un,Kt){return Kt+1}),ut=Ge.map(function(un){return un.number}),Ft=St.filter(function(un){return ut.indexOf(un)<0}),ht=5,rt=we.parallel||ht,!this.checkBrowserAndVersion("Internet Explorer","10")&&rt!==1){jt.next=26;break}dt=0;case 16:if(!(dt<Ft.length)){jt.next=24;break}if(!this.isCancel()){jt.next=19;break}throw this._makeCancelEvent();case 19:return jt.next=21,it(this,Ft[dt]);case 21:dt++,jt.next=16;break;case 24:jt.next=40;break;case 26:for(yt=[],_t=0;_t<Ft.length;_t++)yt.push(it(this,Ft[_t]));return jt.next=30,this._thunkPool(yt,rt);case 30:if(vt=jt.sent,Ct=!0,!(vt&&vt.length>0)){jt.next=37;break}throw this.resetCancelFlag(),Bt=vt[0],Bt.message="Failed to upload some parts with error: "+Bt.toString()+" part_num: "+Bt.partNum,Bt;case 37:if(!this.isCancel()){jt.next=40;break}throw yt=null,this._makeCancelEvent();case 40:return jt.next=42,this.completeMultipartUpload(Qe,je,Ge,we);case 42:return jt.abrupt("return",jt.sent);case 43:case"end":return jt.stop()}},le,this)}),ve.file=function(le){return typeof File!="undefined"&&le instanceof File},ve.blob=function(le){return typeof Blob!="undefined"&&le instanceof Blob},oe._getFileSize=ce.default.mark(function le(ye){var we;return ce.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(!ve.buffer(ye)){Ce.next=4;break}return Ce.abrupt("return",ye.length);case 4:if(!ve.blob(ye)&&!ve.file(ye)){Ce.next=6;break}return Ce.abrupt("return",ye.size);case 6:if(!ve.string(ye)){Ce.next=11;break}return Ce.next=9,this._statFile(ye);case 9:return we=Ce.sent,Ce.abrupt("return",we.size);case 11:throw new Error("_getFileSize requires Buffer/File/String.");case 12:case"end":return Ce.stop()}},le,this)});var ie=me("stream"),se=ie.Readable;de.inherits(he,se),he.prototype.readFileAndPush=function(le){if(this.fileBuffer)for(var ye=!0;ye&&this.fileBuffer&&this.start<this.fileBuffer.length;){var we=this.start,Ce=we+le;Ce=Ce>this.fileBuffer.length?this.fileBuffer.length:Ce,this.start=Ce,ye=this.push(this.fileBuffer.slice(we,Ce))}},he.prototype._read=function(le){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);le=le||16384;var ye=this;this.reader.onload=function(we){ye.fileBuffer=new be(new Uint8Array(we.target.result)),ye.file=null,ye.readFileAndPush(le)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(le)},oe._createStream=function(le,ye,we){if(ve.blob(le)||ve.file(le))return new he(le.slice(ye,we));throw new Error("_createStream requires File/String.")},oe._getPartSize=function(le,ye){return ye?Math.max(Math.ceil(le/1e4),ye):1048576},oe._divideParts=function(le,ye){for(var we=Math.ceil(le/ye),Ce=[],ke=0;ke<we;ke++){var Ne=ye*ke,je=Math.min(Ne+ye,le);Ce.push({start:Ne,end:je})}return Ce},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,Ie,Te){"use strict";function be(ye){return ye&&ye.__esModule?ye:{default:ye}}var Pe=me("babel-runtime/core-js/object/keys"),he=be(Pe),Se=me("babel-runtime/regenerator"),xe=be(Se),ge=me("debug")("ali-oss:object"),ce=me("utility"),ve=me("fs"),de=me("is-type-of"),ue=me("url"),z=me("copy-to"),ee=me("path"),oe=me("mime"),ie=me("../common/callback"),se=me("../common/signUtils"),le=Te;le.append=xe.default.mark(function ye(we,Ce,ke){var Ne;return xe.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ke=ke||{},ke.position===void 0&&(ke.position="0"),ke.subres={append:"",position:ke.position},ke.method="POST",je.next=6,this.put(we,Ce,ke);case 6:return Ne=je.sent,Ne.nextAppendPosition=Ne.res.headers["x-oss-next-append-position"],je.abrupt("return",Ne);case 9:case"end":return je.stop()}},ye,this)}),le.put=xe.default.mark(function ye(we,Ce,ke){var Ne,je,Ve,Qe,Ge,mt;return xe.default.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:if(Ne=void 0,ke=ke||{},!de.buffer(Ce)){ct.next=6;break}Ne=Ce,ct.next=18;break;case 6:if(!de.blob(Ce)&&!de.file(Ce)){ct.next=17;break}return ke.mime||(de.file(Ce)?ke.mime=oe.getType(ee.extname(Ce.name)):ke.mime=Ce.type),je=this._createStream(Ce,0,Ce.size),ct.next=11,this._getFileSize(Ce);case 11:return ke.contentLength=ct.sent,ct.next=14,this.putStream(we,je,ke);case 14:return ct.abrupt("return",ct.sent);case 17:throw new TypeError("Must provide Buffer/Blob for put.");case 18:return ke.headers=ke.headers||{},this._convertMetaToHeaders(ke.meta,ke.headers),Ve=ke.method||"PUT",Qe=this._objectRequestParams(Ve,we,ke),ie.encodeCallback(Qe,ke),Qe.mime=ke.mime,Qe.content=Ne,Qe.successStatuses=[200],ct.next=28,this.request(Qe);case 28:return Ge=ct.sent,mt={name:we,url:this._objectUrl(we),res:Ge.res},Qe.headers&&Qe.headers["x-oss-callback"]&&(mt.data=JSON.parse(Ge.data.toString())),ct.abrupt("return",mt);case 32:case"end":return ct.stop()}},ye,this)}),le.putStream=xe.default.mark(function ye(we,Ce,ke){var Ne,je,Ve,Qe;return xe.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:return ke=ke||{},ke.headers=ke.headers||{},ke.contentLength?ke.headers["Content-Length"]=ke.contentLength:ke.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(ke.meta,ke.headers),Ne=ke.method||"PUT",je=this._objectRequestParams(Ne,we,ke),ie.encodeCallback(je,ke),je.mime=ke.mime,je.stream=Ce,je.successStatuses=[200],Ge.next=12,this.request(je);case 12:return Ve=Ge.sent,Qe={name:we,url:this._objectUrl(we),res:Ve.res},je.headers&&je.headers["x-oss-callback"]&&(Qe.data=JSON.parse(Ve.data.toString())),Ge.abrupt("return",Qe);case 16:case"end":return Ge.stop()}},ye,this)}),le.head=xe.default.mark(function ye(we,Ce){var ke,Ne,je;return xe.default.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:return ke=this._objectRequestParams("HEAD",we,Ce),ke.successStatuses=[200,304],Ve.next=4,this.request(ke);case 4:return Ne=Ve.sent,je={meta:null,res:Ne.res,status:Ne.status},Ne.status===200&&(0,he.default)(Ne.headers).forEach(function(Qe){Qe.indexOf("x-oss-meta-")===0&&(je.meta||(je.meta={}),je.meta[Qe.substring(11)]=Ne.headers[Qe])}),Ve.abrupt("return",je);case 8:case"end":return Ve.stop()}},ye,this)}),le.get=xe.default.mark(function ye(we,Ce,ke){var Ne,je,Ve,Qe;return xe.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:return Ne=null,je=!1,de.writableStream(Ce)?Ne=Ce:de.string(Ce)?(Ne=ve.createWriteStream(Ce),je=!0):ke=Ce,ke=ke||{},ke.process&&(ke.subres=ke.subres||{},ke.subres["x-oss-process"]=ke.process),Ve=void 0,Ge.prev=6,Qe=this._objectRequestParams("GET",we,ke),Qe.writeStream=Ne,Qe.successStatuses=[200,206,304],Ge.next=12,this.request(Qe);case 12:Ve=Ge.sent,je&&Ne.destroy(),Ge.next=24;break;case 16:if(Ge.prev=16,Ge.t0=Ge.catch(6),!je){Ge.next=23;break}return Ne.destroy(),ge("get error: %s, delete the exists file %s",Ge.t0,Ce),Ge.next=23,this._deleteFileSafe(Ce);case 23:throw Ge.t0;case 24:return Ge.abrupt("return",{res:Ve.res,content:Ve.data});case 25:case"end":return Ge.stop()}},ye,this,[[6,16]])}),le.getStream=xe.default.mark(function ye(we,Ce){var ke,Ne;return xe.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return Ce=Ce||{},ke=this._objectRequestParams("GET",we,Ce),ke.customResponse=!0,ke.successStatuses=[200,206,304],je.next=6,this.request(ke);case 6:return Ne=je.sent,je.abrupt("return",{stream:Ne.res,res:{status:Ne.status,headers:Ne.headers}});case 8:case"end":return je.stop()}},ye,this)}),le.delete=xe.default.mark(function ye(we,Ce){var ke,Ne;return xe.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ke=this._objectRequestParams("DELETE",we,Ce),ke.successStatuses=[204],je.next=4,this.request(ke);case 4:return Ne=je.sent,je.abrupt("return",{res:Ne.res});case 6:case"end":return je.stop()}},ye,this)}),le.deleteMulti=xe.default.mark(function ye(we,Ce){var ke,Ne,je,Ve,Qe,Ge;return xe.default.wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:for(Ce=Ce||{},ke=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<Delete>
|
|
|
`,Ce.quiet?ke+=` <Quiet>true</Quiet>
|
|
|
`:ke+=` <Quiet>false</Quiet>
|
|
|
`,Ne=0;Ne<we.length;Ne++)ke+=" <Object><Key>"+ce.escape(this._objectName(we[Ne]))+`</Key></Object>
|
|
|
`;return ke+="</Delete>",ge("delete multi objects: %s",ke),Ce.subres="delete",je=this._objectRequestParams("POST","",Ce),je.mime="xml",je.content=ke,je.xmlResponse=!0,je.successStatuses=[200],mt.next=14,this.request(je);case 14:return Ve=mt.sent,Qe=Ve.data,Ge=Qe&&Qe.Deleted||null,Ge&&(Array.isArray(Ge)||(Ge=[Ge]),Ge=Ge.map(function(ct){return ct.Key})),mt.abrupt("return",{res:Ve.res,deleted:Ge});case 19:case"end":return mt.stop()}},ye,this)}),le.copy=xe.default.mark(function ye(we,Ce,ke){var Ne,je,Ve;return xe.default.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return ke=ke||{},ke.headers=ke.headers||{},(0,he.default)(ke.headers).forEach(function(Ge){ke.headers["x-oss-copy-source-"+Ge.toLowerCase()]=ke.headers[Ge]}),ke.meta&&(ke.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(ke.meta,ke.headers),Ce=Ce[0]!=="/"?"/"+this.options.bucket+"/"+encodeURIComponent(Ce):"/"+encodeURIComponent(Ce.slice(1)),ke.headers["x-oss-copy-source"]=Ce,Ne=this._objectRequestParams("PUT",we,ke),Ne.xmlResponse=!0,Ne.successStatuses=[200,304],Qe.next=12,this.request(Ne);case 12:return je=Qe.sent,Ve=je.data,Ve&&(Ve={etag:Ve.ETag,lastModified:Ve.LastModified}),Qe.abrupt("return",{data:Ve,res:je.res});case 16:case"end":return Qe.stop()}},ye,this)}),le.putMeta=xe.default.mark(function ye(we,Ce,ke){return xe.default.wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:return Ne.next=2,this.copy(we,we,{meta:Ce||{},timeout:ke&&ke.timeout,ctx:ke&&ke.ctx});case 2:return Ne.abrupt("return",Ne.sent);case 3:case"end":return Ne.stop()}},ye,this)}),le.list=xe.default.mark(function ye(we,Ce){var ke,Ne,je,Ve,Qe;return xe.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:return ke=this._objectRequestParams("GET","",Ce),ke.query=we,ke.xmlResponse=!0,ke.successStatuses=[200],Ge.next=6,this.request(ke);case 6:return Ne=Ge.sent,je=Ne.data.Contents,Ve=this,je&&(Array.isArray(je)||(je=[je]),je=je.map(function(mt){return{name:mt.Key,url:Ve._objectUrl(mt.Key),lastModified:mt.LastModified,etag:mt.ETag,type:mt.Type,size:Number(mt.Size),storageClass:mt.StorageClass,owner:{id:mt.Owner.ID,displayName:mt.Owner.DisplayName}}})),Qe=Ne.data.CommonPrefixes||null,Qe&&(Array.isArray(Qe)||(Qe=[Qe]),Qe=Qe.map(function(mt){return mt.Prefix})),Ge.abrupt("return",{res:Ne.res,objects:je,prefixes:Qe,nextMarker:Ne.data.NextMarker||null,isTruncated:Ne.data.IsTruncated==="true"});case 13:case"end":return Ge.stop()}},ye,this)}),le.putACL=xe.default.mark(function ye(we,Ce,ke){var Ne,je;return xe.default.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:return ke=ke||{},ke.subres="acl",ke.headers=ke.headers||{},ke.headers["x-oss-object-acl"]=Ce,we=this._objectName(we),Ne=this._objectRequestParams("PUT",we,ke),Ne.successStatuses=[200],Ve.next=9,this.request(Ne);case 9:return je=Ve.sent,Ve.abrupt("return",{res:je.res});case 11:case"end":return Ve.stop()}},ye,this)}),le.getACL=xe.default.mark(function ye(we,Ce){var ke,Ne;return xe.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return Ce=Ce||{},Ce.subres="acl",we=this._objectName(we),ke=this._objectRequestParams("GET",we,Ce),ke.successStatuses=[200],ke.xmlResponse=!0,je.next=8,this.request(ke);case 8:return Ne=je.sent,je.abrupt("return",{acl:Ne.data.AccessControlList.Grant,owner:{id:Ne.data.Owner.ID,displayName:Ne.data.Owner.DisplayName},res:Ne.res});case 10:case"end":return je.stop()}},ye,this)}),le.restore=xe.default.mark(function ye(we,Ce){var ke,Ne;return xe.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return Ce=Ce||{},Ce.subres="restore",ke=this._objectRequestParams("POST",we,Ce),ke.successStatuses=[202],je.next=6,this.request(ke);case 6:return Ne=je.sent,je.abrupt("return",{res:Ne.res});case 8:case"end":return je.stop()}},ye,this)}),le.signatureUrl=function(ye,we){we=we||{},ye=this._objectName(ye),we.method=we.method||"GET";var Ce=ce.timestamp()+(we.expires||1800),ke={bucket:this.options.bucket,object:ye},Ne=this._getResource(ke);this.options.stsToken&&(we["security-token"]=this.options.stsToken);var je=se._signatureForURL(this.options.accessKeySecret,we,Ne,Ce),Ve=ue.parse(this._getReqUrl(ke));return Ve.query={OSSAccessKeyId:this.options.accessKeyId,Expires:Ce,Signature:je.Signature},z(je.subResource).to(Ve.query),Ve.format()},le.getObjectUrl=function(ye,we){return we?we[we.length-1]!=="/"&&(we+="/"):we=this.options.endpoint.format(),we+this._escape(this._objectName(ye))},le._objectUrl=function(ye){return this._getReqUrl({bucket:this.options.bucket,object:ye})},le.generateObjectUrl=function(ye,we){if(we)we[we.length-1]!=="/"&&(we+="/");else{we=this.options.endpoint.format();var Ce=ue.parse(we),ke=this.options.bucket;Ce.hostname=ke+"."+Ce.hostname,Ce.host=ke+"."+Ce.host,we=Ce.format()}return we+this._escape(this._objectName(ye))},le._objectRequestParams=function(ye,we,Ce){if(!this.options.bucket)throw new Error("Please create a bucket first");Ce=Ce||{},we=this._objectName(we);var ke={object:we,bucket:this.options.bucket,method:ye,subres:Ce&&Ce.subres,timeout:Ce&&Ce.timeout,ctx:Ce&&Ce.ctx};return Ce.headers&&(ke.headers={},z(Ce.headers).to(ke.headers)),ke},le._objectName=function(ye){return ye.replace(/^\/+/,"")},le._statFile=function(ye){return function(we){ve.stat(ye,we)}},le._convertMetaToHeaders=function(ye,we){ye&&(0,he.default)(ye).forEach(function(Ce){we["x-oss-meta-"+Ce]=ye[Ce]})},le._deleteFileSafe=function(ye){return function(we){ve.exists(ye,function(Ce){Ce?ve.unlink(ye,function(ke){ke&&ge("unlink %j error: %s",ye,ke),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,Ie,Te){"use strict";Te.version="5.3.1"},{}],6:[function(me,Ie,Te){"use strict";function be(ee){return ee&&ee.__esModule?ee:{default:ee}}function Pe(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"||Pe(oe.prototype)||Pe(ee.prototype))}function Se(ee,oe){var ie=new ee(oe),se=(0,de.default)(ie),le=(0,de.default)((0,ce.default)(ie));se.concat(le).forEach(function(ye){he(ie[ye])?this[ye]=ue.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"),ce=be(ge),ve=me("babel-runtime/core-js/object/keys"),de=be(ve),ue=me("co"),z=me("./client");Ie.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,Ie,Te){(function(be){"use strict";function Pe(ce){return ce&&ce.__esModule?ce:{default:ce}}var he=me("babel-runtime/core-js/object/keys"),Se=Pe(he),xe=me("babel-runtime/core-js/json/stringify"),ge=Pe(xe);Te.encodeCallback=function(ce,ve){if(ce.headers=ce.headers||{},!Object.prototype.hasOwnProperty.call(ce.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 ue=new be((0,ge.default)(de)).toString("base64");if(ce.headers["x-oss-callback"]=ue,ve.callback.customValue){var z={};(0,Se.default)(ve.callback.customValue).forEach(function(ee){z["x:"+ee]=ve.callback.customValue[ee]}),ce.headers["x-oss-callback-var"]=new be((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,Ie,Te){"use strict";var be=me("babel-runtime/regenerator"),Pe=function(ge){return ge&&ge.__esModule?ge:{default:ge}}(be),he=me("copy-to"),Se=me("./callback"),xe=Te;xe.listUploads=Pe.default.mark(function ge(ce,ve){var de,ue,z,ee;return Pe.default.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return ve=ve||{},de={},he(ve).to(de),de.subres="uploads",ue=this._objectRequestParams("GET","",de),ue.query=ce,ue.xmlResponse=!0,ue.successStatuses=[200],oe.next=10,this.request(ue);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=Pe.default.mark(function ge(ce,ve,de,ue){var z,ee,oe;return Pe.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return ue=ue||{},z={},he(ue).to(z),z.subres={uploadId:ve},ee=this._objectRequestParams("GET",ce,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=Pe.default.mark(function ge(ce,ve,de){var ue,z,ee;return Pe.default.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return this.cancel(),de=de||{},ue={},he(de).to(ue),ue.subres={uploadId:ve},z=this._objectRequestParams("DELETE",ce,ue),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=Pe.default.mark(function ge(ce,ve){var de,ue,z;return Pe.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",ue=this._objectRequestParams("POST",ce,de),ue.mime=ve.mime,ue.xmlResponse=!0,ue.successStatuses=[200],ee.next=12,this.request(ue);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=Pe.default.mark(function ge(ce,ve,de,ue,z,ee,oe){var ie;return Pe.default.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return ie={stream:this._createStream(ue,z,ee),size:ee-z},se.next=3,this._uploadPart(ce,ve,de,ie,oe);case 3:return se.abrupt("return",se.sent);case 4:case"end":return se.stop()}},ge,this)}),xe.completeMultipartUpload=Pe.default.mark(function ge(ce,ve,de,ue){var z,ee,oe,ie,se,le,ye,we;return Pe.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:for(z=de.concat().sort(function(ke,Ne){return ke.number-Ne.number}).filter(function(ke,Ne,je){return!Ne||ke.number!==je[Ne-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>",ue=ue||{},se={},he(ue).to(se),se.subres={uploadId:ve},le=this._objectRequestParams("POST",ce,se),Se.encodeCallback(le,se),le.mime="xml",le.content=ee,le.headers&&le.headers["x-oss-callback"]||(le.xmlResponse=!0),le.successStatuses=[200],Ce.next=16,this.request(le);case 16:return ye=Ce.sent,we={res:ye.res,bucket:le.bucket,name:ce,etag:ye.res.headers.etag},le.headers&&le.headers["x-oss-callback"]&&(we.data=JSON.parse(ye.data.toString())),Ce.abrupt("return",we);case 20:case"end":return Ce.stop()}},ge,this)}),xe._uploadPart=Pe.default.mark(function ge(ce,ve,de,ue,z){var ee,oe,ie;return Pe.default.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return z=z||{},ee={},he(z).to(ee),ee.headers={"Content-Length":ue.size},ee.subres={partNumber:de,uploadId:ve},oe=this._objectRequestParams("PUT",ce,ee),oe.mime=ee.mime,oe.stream=ue.stream,oe.successStatuses=[200],se.next=11,this.request(oe);case 11:return ie=se.sent,ue.stream=null,oe.stream=null,se.abrupt("return",{name:ce,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,Ie,Te){(function(be){"use strict";function Pe(de){return de&&de.__esModule?de:{default:de}}var he=me("babel-runtime/core-js/json/stringify"),Se=Pe(he),xe=me("babel-runtime/core-js/object/keys"),ge=Pe(xe),ce=me("./../../shims/crypto/crypto.js"),ve=me("is-type-of");Te.buildCanonicalizedResource=function(de,ue){var z=""+de,ee="?";if(ve.string(ue)&&ue.trim()!=="")z+=ee+ue;else if(ve.array(ue))ue.sort(),z+=ee+ue.join("&");else if(ue){var oe=function(se,le){return se[0]>le[0]?1:se[0]<le[0]?-1:0},ie=function(se){z+=ee+se,ue[se]&&(z+="="+ue[se]),ee="&"};(0,ge.default)(ue).sort(oe).forEach(ie)}return z},Te.buildCanonicalString=function(de,ue,z,ee){z=z||{};var oe=z.headers||{},ie=[],se={},le=[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])}),le=le.concat(ie),le.push(this.buildCanonicalizedResource(ue,z.parameters)),le.join(`
|
|
|
`)},Te.computeSignature=function(de,ue){return ce.createHmac("sha1",de).update(new be(ue,"utf8")).digest("base64")},Te.authorization=function(de,ue,z){return"OSS "+de+":"+this.computeSignature(ue,z)},Te._signatureForURL=function(de,ue,z,ee){var oe={},ie={};if(ue.process&&(ie["x-oss-process"]=ue.process),ue.response&&(0,ge.default)(ue.response).forEach(function(we){var Ce="response-"+we.toLowerCase();ie[Ce]=ue.response[we]}),(0,ge.default)(ue).forEach(function(we){var Ce=we.toLowerCase(),ke=ue[we];Ce.indexOf("x-oss-")===0?oe[Ce]=ke:Ce.indexOf("content-md5")===0||Ce.indexOf("content-type")===0?oe[we]=ke:Ce!=="expires"&&Ce!=="response"&&Ce!=="process"&&Ce!=="method"&&(ie[Ce]=ke)}),Object.prototype.hasOwnProperty.call(ue,"security-token")&&(ie["security-token"]=ue["security-token"]),Object.prototype.hasOwnProperty.call(ue,"callback")){var se={callbackUrl:encodeURI(ue.callback.url),callbackBody:ue.callback.body};if(ue.callback.host&&(se.callbackHost=ue.callback.host),ue.callback.contentType&&(se.callbackBodyType=ue.callback.contentType),ie.callback=new be((0,Se.default)(se)).toString("base64"),ue.callback.customValue){var le={};(0,ge.default)(ue.callback.customValue).forEach(function(we){le["x:"+we]=ue.callback.customValue[we]}),ie["callback-var"]=new be((0,Se.default)(le)).toString("base64")}}var ye=this.buildCanonicalString(ue.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,Ie,Te){"use strict";var be=me("babel-runtime/regenerator"),Pe=function(ce){return ce&&ce.__esModule?ce:{default:ce}}(be),he=me("co"),Se=me("co-priority-queue"),xe=me("any-promise"),ge=Te;ge._thunkPool=function(ce,ve){function de(ie,se){++ee===ie.length&&se(oe)}function ue(ie,se){function le(){var je;return Pe.default.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:je=void 0;case 1:if(z.isCancel()){Ve.next=9;break}return Ve.next=4,Ce.next();case 4:return je=Ve.sent,Ve.next=7,je();case 7:Ve.next=1;break;case 9:ke+=1,ke===ie&&(Ce.fns=[],Ce.buffer=[],se(oe));case 11:case"end":return Ve.stop()}},we,this)}function ye(je){console.error(je.stack)}for(var we=Pe.default.mark(le),Ce=new Se,ke=0,Ne=0;Ne<ie;Ne++)he(le).catch(ye);return function(je,Ve){return function(Qe){Ce.push(Pe.default.mark(function Ge(){return Pe.default.wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:return mt.prev=0,mt.t0=Qe,mt.next=4,je;case 4:mt.t1=mt.sent,(0,mt.t0)(null,mt.t1),mt.next=11;break;case 8:mt.prev=8,mt.t2=mt.catch(0),Qe(mt.t2);case 11:case"end":return mt.stop()}},Ge,this,[[0,8]])}),Ve)}}}var z=this,ee=0,oe=[];return new xe(function(ie){function se(ke){return Pe.default.wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:return Ne.next=2,we(ce[ke]);case 2:de(ce,ie);case 3:case"end":return Ne.stop()}},ye,this)}function le(ke){oe.push(ke),de(ce,ie)}for(var ye=Pe.default.mark(se),we=new ue(ve,ie),Ce=0;Ce<ce.length;Ce++)he(se(Ce)).catch(le)})},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,Ie,Te){"use strict";Te._isIP=function(be){var Pe=/^(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 Pe.test(be)||he.test(be)}},{}],12:[function(me,Ie,Te){function be(){}Ie.exports=be,Ie.exports.HttpsAgent=be},{}],13:[function(me,Ie,Te){Ie.exports=me("./register")().Promise},{"./register":15}],14:[function(me,Ie,Te){"use strict";var be=null;Ie.exports=function(Pe,he){return function(Se,xe){Se=Se||null,xe=xe||{};var ge=xe.global!==!1;if(be===null&&ge&&(be=Pe["@@any-promise/REGISTRATION"]||null),be!==null&&Se!==null&&be.implementation!==Se)throw new Error('any-promise already defined as "'+be.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return be===null&&(be=Se!==null&&xe.Promise!==void 0?{Promise:xe.Promise,implementation:Se}:he(Se),ge&&(Pe["@@any-promise/REGISTRATION"]=be)),be}}},{}],15:[function(me,Ie,Te){"use strict";function be(){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"}}Ie.exports=me("./loader")(window,be)},{"./loader":14}],16:[function(me,Ie,Te){Ie.exports={default:me("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":44}],17:[function(me,Ie,Te){Ie.exports={default:me("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":45}],18:[function(me,Ie,Te){Ie.exports={default:me("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":46}],19:[function(me,Ie,Te){Ie.exports={default:me("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":47}],20:[function(me,Ie,Te){Ie.exports={default:me("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":48}],21:[function(me,Ie,Te){Ie.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,Ie,Te){Ie.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,Ie,Te){Ie.exports={default:me("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":51}],24:[function(me,Ie,Te){Ie.exports={default:me("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":52}],25:[function(me,Ie,Te){Ie.exports={default:me("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":53}],26:[function(me,Ie,Te){Ie.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,Ie,Te){Ie.exports={default:me("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":56}],28:[function(me,Ie,Te){Ie.exports={default:me("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":55}],29:[function(me,Ie,Te){Ie.exports={default:me("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":57}],30:[function(me,Ie,Te){"use strict";Te.__esModule=!0,Te.default=function(be,Pe){if(!(be instanceof Pe))throw new TypeError("Cannot call a class as a function")}},{}],31:[function(me,Ie,Te){"use strict";Te.__esModule=!0;var be=me("../core-js/object/define-property"),Pe=function(he){return he&&he.__esModule?he:{default:he}}(be);Te.default=function(){function he(Se,xe){for(var ge=0;ge<xe.length;ge++){var ce=xe[ge];ce.enumerable=ce.enumerable||!1,ce.configurable=!0,"value"in ce&&(ce.writable=!0),(0,Pe.default)(Se,ce.key,ce)}}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,Ie,Te){"use strict";function be(ce){return ce&&ce.__esModule?ce:{default:ce}}Te.__esModule=!0;var Pe=me("../core-js/symbol/iterator"),he=be(Pe),Se=me("../core-js/symbol"),xe=be(Se),ge=typeof xe.default=="function"&&typeof he.default=="symbol"?function(ce){return typeof ce}:function(ce){return ce&&typeof xe.default=="function"&&ce.constructor===xe.default&&ce!==xe.default.prototype?"symbol":typeof ce};Te.default=typeof xe.default=="function"&&ge(he.default)==="symbol"?function(ce){return ce===void 0?"undefined":ge(ce)}:function(ce){return ce&&typeof xe.default=="function"&&ce.constructor===xe.default&&ce!==xe.default.prototype?"symbol":ce===void 0?"undefined":ge(ce)}},{"../core-js/symbol":27,"../core-js/symbol/iterator":29}],33:[function(me,Ie,Te){Ie.exports=me("regenerator-runtime")},{"regenerator-runtime":191}],34:[function(me,Ie,Te){"use strict";function be(ie){var se=ie.length;if(se%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var le=ie.indexOf("=");return le===-1&&(le=se),[le,le===se?0:4-le%4]}function Pe(ie){var se=be(ie),le=se[0],ye=se[1];return 3*(le+ye)/4-ye}function he(ie,se,le){return 3*(se+le)/4-le}function Se(ie){for(var se,le=be(ie),ye=le[0],we=le[1],Ce=new ue(he(ie,ye,we)),ke=0,Ne=we>0?ye-4:ye,je=0;je<Ne;je+=4)se=de[ie.charCodeAt(je)]<<18|de[ie.charCodeAt(je+1)]<<12|de[ie.charCodeAt(je+2)]<<6|de[ie.charCodeAt(je+3)],Ce[ke++]=se>>16&255,Ce[ke++]=se>>8&255,Ce[ke++]=255&se;return we===2&&(se=de[ie.charCodeAt(je)]<<2|de[ie.charCodeAt(je+1)]>>4,Ce[ke++]=255&se),we===1&&(se=de[ie.charCodeAt(je)]<<10|de[ie.charCodeAt(je+1)]<<4|de[ie.charCodeAt(je+2)]>>2,Ce[ke++]=se>>8&255,Ce[ke++]=255&se),Ce}function xe(ie){return ve[ie>>18&63]+ve[ie>>12&63]+ve[ie>>6&63]+ve[63&ie]}function ge(ie,se,le){for(var ye,we=[],Ce=se;Ce<le;Ce+=3)ye=(ie[Ce]<<16&16711680)+(ie[Ce+1]<<8&65280)+(255&ie[Ce+2]),we.push(xe(ye));return we.join("")}function ce(ie){for(var se,le=ie.length,ye=le%3,we=[],Ce=0,ke=le-ye;Ce<ke;Ce+=16383)we.push(ge(ie,Ce,Ce+16383>ke?ke:Ce+16383));return ye===1?(se=ie[le-1],we.push(ve[se>>2]+ve[se<<4&63]+"==")):ye===2&&(se=(ie[le-2]<<8)+ie[le-1],we.push(ve[se>>10]+ve[se>>4&63]+ve[se<<2&63]+"=")),we.join("")}Te.byteLength=Pe,Te.toByteArray=Se,Te.fromByteArray=ce;for(var ve=[],de=[],ue=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,Ie,Te){(function(be,Pe,he){Ie!==void 0&&Ie.exports?Ie.exports=he():typeof Le=="function"&&Le.amd?Le("bowser",he):be.bowser=he()})(this,0,function(){function be(de){function ue(rt){var dt=de.match(rt);return dt&&dt.length>1&&dt[1]||""}function z(rt){var dt=de.match(rt);return dt&&dt.length>1&&dt[2]||""}var ee,oe=ue(/(ipod|iphone|ipad)/i).toLowerCase(),ie=/like android/i.test(de),se=!ie&&/android/i.test(de),le=/nexus\s*[0-6]\s*/i.test(de),ye=!le&&/nexus\s*[0-9]+/i.test(de),we=/CrOS/.test(de),Ce=/silk/i.test(de),ke=/sailfish/i.test(de),Ne=/tizen/i.test(de),je=/(web|hpw)os/i.test(de),Ve=/windows phone/i.test(de),Qe=(/SamsungBrowser/i.test(de),!Ve&&/windows/i.test(de)),Ge=!oe&&!Ce&&/macintosh/i.test(de),mt=!se&&!ke&&!Ne&&!je&&/linux/i.test(de),ct=z(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),Ct=ue(/version\/(\d+(\.\d+)?)/i),it=/tablet/i.test(de)&&!/tablet pc/i.test(de),St=!it&&/[^-]mobi/i.test(de),ut=/xbox/i.test(de);/opera/i.test(de)?ee={name:"Opera",opera:ce,version:Ct||ue(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(de)?ee={name:"Opera",opera:ce,version:ue(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||Ct}:/SamsungBrowser/i.test(de)?ee={name:"Samsung Internet for Android",samsungBrowser:ce,version:Ct||ue(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(de)?ee={name:"Opera Coast",coast:ce,version:Ct||ue(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(de)?ee={name:"Yandex Browser",yandexbrowser:ce,version:Ct||ue(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(de)?ee={name:"UC Browser",ucbrowser:ce,version:ue(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(de)?ee={name:"Maxthon",maxthon:ce,version:ue(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(de)?ee={name:"Epiphany",epiphany:ce,version:ue(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(de)?ee={name:"Puffin",puffin:ce,version:ue(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(de)?ee={name:"Sleipnir",sleipnir:ce,version:ue(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(de)?ee={name:"K-Meleon",kMeleon:ce,version:ue(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:Ve?(ee={name:"Windows Phone",osname:"Windows Phone",windowsphone:ce},ct?(ee.msedge=ce,ee.version=ct):(ee.msie=ce,ee.version=ue(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(de)?ee={name:"Internet Explorer",msie:ce,version:ue(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:we?ee={name:"Chrome",osname:"Chrome OS",chromeos:ce,chromeBook:ce,chrome:ce,version:ue(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(de)?ee={name:"Microsoft Edge",msedge:ce,version:ct}:/vivaldi/i.test(de)?ee={name:"Vivaldi",vivaldi:ce,version:ue(/vivaldi\/(\d+(\.\d+)?)/i)||Ct}:ke?ee={name:"Sailfish",osname:"Sailfish OS",sailfish:ce,version:ue(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(de)?ee={name:"SeaMonkey",seamonkey:ce,version:ue(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(de)?(ee={name:"Firefox",firefox:ce,version:ue(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(de)&&(ee.firefoxos=ce,ee.osname="Firefox OS")):Ce?ee={name:"Amazon Silk",silk:ce,version:ue(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(de)?ee={name:"PhantomJS",phantom:ce,version:ue(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(de)?ee={name:"SlimerJS",slimer:ce,version:ue(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(de)||/rim\stablet/i.test(de)?ee={name:"BlackBerry",osname:"BlackBerry OS",blackberry:ce,version:Ct||ue(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:je?(ee={name:"WebOS",osname:"WebOS",webos:ce,version:Ct||ue(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(de)&&(ee.touchpad=ce)):/bada/i.test(de)?ee={name:"Bada",osname:"Bada",bada:ce,version:ue(/dolfin\/(\d+(\.\d+)?)/i)}:Ne?ee={name:"Tizen",osname:"Tizen",tizen:ce,version:ue(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||Ct}:/qupzilla/i.test(de)?ee={name:"QupZilla",qupzilla:ce,version:ue(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||Ct}:/chromium/i.test(de)?ee={name:"Chromium",chromium:ce,version:ue(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||Ct}:/chrome|crios|crmo/i.test(de)?ee={name:"Chrome",chrome:ce,version:ue(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:se?ee={name:"Android",version:Ct}:/safari|applewebkit/i.test(de)?(ee={name:"Safari",safari:ce},Ct&&(ee.version=Ct)):oe?(ee={name:oe=="iphone"?"iPhone":oe=="ipad"?"iPad":"iPod"},Ct&&(ee.version=Ct)):ee=/googlebot/i.test(de)?{name:"Googlebot",googlebot:ce,version:ue(/googlebot\/(\d+(\.\d+))/i)||Ct}:{name:ue(/^(.*)\/(.*) /),version:z(/^(.*)\/(.*) /)},!ee.msedge&&/(apple)?webkit/i.test(de)?(/(apple)?webkit\/537\.36/i.test(de)?(ee.name=ee.name||"Blink",ee.blink=ce):(ee.name=ee.name||"Webkit",ee.webkit=ce),!ee.version&&Ct&&(ee.version=Ct)):!ee.opera&&/gecko\//i.test(de)&&(ee.name=ee.name||"Gecko",ee.gecko=ce,ee.version=ee.version||ue(/gecko\/(\d+(\.\d+)?)/i)),ee.windowsphone||!se&&!ee.silk?!ee.windowsphone&&oe?(ee[oe]=ce,ee.ios=ce,ee.osname="iOS"):Ge?(ee.mac=ce,ee.osname="macOS"):ut?(ee.xbox=ce,ee.osname="Xbox"):Qe?(ee.windows=ce,ee.osname="Windows"):mt&&(ee.linux=ce,ee.osname="Linux"):(ee.android=ce,ee.osname="Android");var Ft="";ee.windows?Ft=function(rt){switch(rt){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}}(ue(/Windows ((NT|XP)( \d\d?.\d)?)/i)):ee.windowsphone?Ft=ue(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):ee.mac?(Ft=ue(/Mac OS X (\d+([_\.\s]\d+)*)/i),Ft=Ft.replace(/[_\s]/g,".")):oe?(Ft=ue(/os (\d+([_\s]\d+)*) like mac os x/i),Ft=Ft.replace(/[_\s]/g,".")):se?Ft=ue(/android[ \/-](\d+(\.\d+)*)/i):ee.webos?Ft=ue(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):ee.blackberry?Ft=ue(/rim\stablet\sos\s(\d+(\.\d+)*)/i):ee.bada?Ft=ue(/bada\/(\d+(\.\d+)*)/i):ee.tizen&&(Ft=ue(/tizen[\/\s](\d+(\.\d+)*)/i)),Ft&&(ee.osversion=Ft);var ht=!ee.windows&&Ft.split(".")[0];return it||ye||oe=="ipad"||se&&(ht==3||ht>=4&&!St)||ee.silk?ee.tablet=ce:(St||oe=="iphone"||oe=="ipod"||se||le||ee.blackberry||ee.webos||ee.bada)&&(ee.mobile=ce),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=ce: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=ce:ee.x=ce,ee}function Pe(de){return de.split(".").length}function he(de,ue){var z,ee=[];if(Array.prototype.map)return Array.prototype.map.call(de,ue);for(z=0;z<de.length;z++)ee.push(ue(de[z]));return ee}function Se(de){for(var ue=Math.max(Pe(de[0]),Pe(de[1])),z=he(de,function(ee){var oe=ue-Pe(ee);return ee+=new Array(oe+1).join(".0"),he(ee.split("."),function(ie){return new Array(20-ie.length).join("0")+ie}).reverse()});--ue>=0;){if(z[0][ue]>z[1][ue])return 1;if(z[0][ue]!==z[1][ue])return-1;if(ue===0)return 0}}function xe(de,ue,z){var ee=ve;typeof ue=="string"&&(z=ue,ue=void 0),ue===void 0&&(ue=!1),z&&(ee=be(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 ue}function ge(de,ue,z){return!xe(de,ue,z)}var ce=!0,ve=be(typeof navigator!="undefined"&&navigator.userAgent||"");return ve.test=function(de){for(var ue=0;ue<de.length;++ue){var z=de[ue];if(typeof z=="string"&&z in ve)return!0}return!1},ve.isUnsupportedBrowser=xe,ve.compareVersions=Se,ve.check=ge,ve._detect=be,ve.detect=be,ve})},{}],36:[function(me,Ie,Te){},{}],37:[function(me,Ie,Te){function be(ve){if(ve&&!ge(ve))throw new Error("Unknown encoding: "+ve)}function Pe(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}},ce=Te.StringDecoder=function(ve){switch(this.encoding=(ve||"utf8").toLowerCase().replace(/[-_]/,""),be(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=Pe)}this.charBuffer=new xe(6),this.charReceived=0,this.charLength=0};ce.prototype.write=function(ve){for(var de="";this.charLength;){var ue=ve.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:ve.length;if(ve.copy(this.charBuffer,this.charReceived,0,ue),this.charReceived+=ue,this.charReceived<this.charLength)return"";ve=ve.slice(ue,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},ce.prototype.detectIncompleteChar=function(ve){for(var de=ve.length>=3?3:ve.length;de>0;de--){var ue=ve[ve.length-de];if(de==1&&ue>>5==6){this.charLength=2;break}if(de<=2&&ue>>4==14){this.charLength=3;break}if(de<=3&&ue>>3==30){this.charLength=4;break}}this.charReceived=de},ce.prototype.end=function(ve){var de="";if(ve&&ve.length&&(de=this.write(ve)),this.charReceived){var ue=this.charReceived,z=this.charBuffer,ee=this.encoding;de+=z.slice(0,ue).toString(ee)}return de}},{buffer:38}],38:[function(me,Ie,Te){(function(be){"use strict";function Pe(){return Se.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function he(Re,Ae){if(Pe()<Ae)throw new RangeError("Invalid typed array length");return Se.TYPED_ARRAY_SUPPORT?(Re=new Uint8Array(Ae),Re.__proto__=Se.prototype):(Re===null&&(Re=new Se(Ae)),Re.length=Ae),Re}function Se(Re,Ae,Ue){if(!(Se.TYPED_ARRAY_SUPPORT||this instanceof Se))return new Se(Re,Ae,Ue);if(typeof Re=="number"){if(typeof Ae=="string")throw new Error("If encoding is specified then the first argument must be a string");return ve(this,Re)}return xe(this,Re,Ae,Ue)}function xe(Re,Ae,Ue,Ke){if(typeof Ae=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&Ae instanceof ArrayBuffer?z(Re,Ae,Ue,Ke):typeof Ae=="string"?de(Re,Ae,Ue):ee(Re,Ae)}function ge(Re){if(typeof Re!="number")throw new TypeError('"size" argument must be a number');if(Re<0)throw new RangeError('"size" argument must not be negative')}function ce(Re,Ae,Ue,Ke){return ge(Ae),Ae<=0?he(Re,Ae):Ue!==void 0?typeof Ke=="string"?he(Re,Ae).fill(Ue,Ke):he(Re,Ae).fill(Ue):he(Re,Ae)}function ve(Re,Ae){if(ge(Ae),Re=he(Re,Ae<0?0:0|oe(Ae)),!Se.TYPED_ARRAY_SUPPORT)for(var Ue=0;Ue<Ae;++Ue)Re[Ue]=0;return Re}function de(Re,Ae,Ue){if(typeof Ue=="string"&&Ue!==""||(Ue="utf8"),!Se.isEncoding(Ue))throw new TypeError('"encoding" must be a valid string encoding');var Ke=0|se(Ae,Ue);Re=he(Re,Ke);var Ze=Re.write(Ae,Ue);return Ze!==Ke&&(Re=Re.slice(0,Ze)),Re}function ue(Re,Ae){var Ue=Ae.length<0?0:0|oe(Ae.length);Re=he(Re,Ue);for(var Ke=0;Ke<Ue;Ke+=1)Re[Ke]=255&Ae[Ke];return Re}function z(Re,Ae,Ue,Ke){if(Ae.byteLength,Ue<0||Ae.byteLength<Ue)throw new RangeError("'offset' is out of bounds");if(Ae.byteLength<Ue+(Ke||0))throw new RangeError("'length' is out of bounds");return Ae=Ue===void 0&&Ke===void 0?new Uint8Array(Ae):Ke===void 0?new Uint8Array(Ae,Ue):new Uint8Array(Ae,Ue,Ke),Se.TYPED_ARRAY_SUPPORT?(Re=Ae,Re.__proto__=Se.prototype):Re=ue(Re,Ae),Re}function ee(Re,Ae){if(Se.isBuffer(Ae)){var Ue=0|oe(Ae.length);return Re=he(Re,Ue),Re.length===0||Ae.copy(Re,0,0,Ue),Re}if(Ae){if(typeof ArrayBuffer!="undefined"&&Ae.buffer instanceof ArrayBuffer||"length"in Ae)return typeof Ae.length!="number"||We(Ae.length)?he(Re,0):ue(Re,Ae);if(Ae.type==="Buffer"&&et(Ae.data))return ue(Re,Ae.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function oe(Re){if(Re>=Pe())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Pe().toString(16)+" bytes");return 0|Re}function ie(Re){return+Re!=Re&&(Re=0),Se.alloc(+Re)}function se(Re,Ae){if(Se.isBuffer(Re))return Re.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(Re)||Re instanceof ArrayBuffer))return Re.byteLength;typeof Re!="string"&&(Re=""+Re);var Ue=Re.length;if(Ue===0)return 0;for(var Ke=!1;;)switch(Ae){case"ascii":case"latin1":case"binary":return Ue;case"utf8":case"utf-8":case void 0:return xn(Re).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Ue;case"hex":return Ue>>>1;case"base64":return $t(Re).length;default:if(Ke)return xn(Re).length;Ae=(""+Ae).toLowerCase(),Ke=!0}}function le(Re,Ae,Ue){var Ke=!1;if((Ae===void 0||Ae<0)&&(Ae=0),Ae>this.length||((Ue===void 0||Ue>this.length)&&(Ue=this.length),Ue<=0)||(Ue>>>=0,Ae>>>=0,Ue<=Ae))return"";for(Re||(Re="utf8");;)switch(Re){case"hex":return ut(this,Ae,Ue);case"utf8":case"utf-8":return ct(this,Ae,Ue);case"ascii":return it(this,Ae,Ue);case"latin1":case"binary":return St(this,Ae,Ue);case"base64":return mt(this,Ae,Ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ft(this,Ae,Ue);default:if(Ke)throw new TypeError("Unknown encoding: "+Re);Re=(Re+"").toLowerCase(),Ke=!0}}function ye(Re,Ae,Ue){var Ke=Re[Ae];Re[Ae]=Re[Ue],Re[Ue]=Ke}function we(Re,Ae,Ue,Ke,Ze){if(Re.length===0)return-1;if(typeof Ue=="string"?(Ke=Ue,Ue=0):Ue>2147483647?Ue=2147483647:Ue<-2147483648&&(Ue=-2147483648),Ue=+Ue,isNaN(Ue)&&(Ue=Ze?0:Re.length-1),Ue<0&&(Ue=Re.length+Ue),Ue>=Re.length){if(Ze)return-1;Ue=Re.length-1}else if(Ue<0){if(!Ze)return-1;Ue=0}if(typeof Ae=="string"&&(Ae=Se.from(Ae,Ke)),Se.isBuffer(Ae))return Ae.length===0?-1:Ce(Re,Ae,Ue,Ke,Ze);if(typeof Ae=="number")return Ae&=255,Se.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Ze?Uint8Array.prototype.indexOf.call(Re,Ae,Ue):Uint8Array.prototype.lastIndexOf.call(Re,Ae,Ue):Ce(Re,[Ae],Ue,Ke,Ze);throw new TypeError("val must be string, number or Buffer")}function Ce(Re,Ae,Ue,Ke,Ze){function lt(kn,$n){return xt===1?kn[$n]:kn.readUInt16BE($n*xt)}var xt=1,tn=Re.length,en=Ae.length;if(Ke!==void 0&&((Ke=String(Ke).toLowerCase())==="ucs2"||Ke==="ucs-2"||Ke==="utf16le"||Ke==="utf-16le")){if(Re.length<2||Ae.length<2)return-1;xt=2,tn/=2,en/=2,Ue/=2}var Jt;if(Ze){var gn=-1;for(Jt=Ue;Jt<tn;Jt++)if(lt(Re,Jt)===lt(Ae,gn===-1?0:Jt-gn)){if(gn===-1&&(gn=Jt),Jt-gn+1===en)return gn*xt}else gn!==-1&&(Jt-=Jt-gn),gn=-1}else for(Ue+en>tn&&(Ue=tn-en),Jt=Ue;Jt>=0;Jt--){for(var Mn=!0,yn=0;yn<en;yn++)if(lt(Re,Jt+yn)!==lt(Ae,yn)){Mn=!1;break}if(Mn)return Jt}return-1}function ke(Re,Ae,Ue,Ke){Ue=Number(Ue)||0;var Ze=Re.length-Ue;Ke?(Ke=Number(Ke))>Ze&&(Ke=Ze):Ke=Ze;var lt=Ae.length;if(lt%2!=0)throw new TypeError("Invalid hex string");Ke>lt/2&&(Ke=lt/2);for(var xt=0;xt<Ke;++xt){var tn=parseInt(Ae.substr(2*xt,2),16);if(isNaN(tn))return xt;Re[Ue+xt]=tn}return xt}function Ne(Re,Ae,Ue,Ke){return ft(xn(Ae,Re.length-Ue),Re,Ue,Ke)}function je(Re,Ae,Ue,Ke){return ft(Ut(Ae),Re,Ue,Ke)}function Ve(Re,Ae,Ue,Ke){return je(Re,Ae,Ue,Ke)}function Qe(Re,Ae,Ue,Ke){return ft($t(Ae),Re,Ue,Ke)}function Ge(Re,Ae,Ue,Ke){return ft(Wt(Ae,Re.length-Ue),Re,Ue,Ke)}function mt(Re,Ae,Ue){return Ae===0&&Ue===Re.length?Be.fromByteArray(Re):Be.fromByteArray(Re.slice(Ae,Ue))}function ct(Re,Ae,Ue){Ue=Math.min(Re.length,Ue);for(var Ke=[],Ze=Ae;Ze<Ue;){var lt=Re[Ze],xt=null,tn=lt>239?4:lt>223?3:lt>191?2:1;if(Ze+tn<=Ue){var en,Jt,gn,Mn;switch(tn){case 1:lt<128&&(xt=lt);break;case 2:en=Re[Ze+1],(192&en)==128&&(Mn=(31<)<<6|63&en)>127&&(xt=Mn);break;case 3:en=Re[Ze+1],Jt=Re[Ze+2],(192&en)==128&&(192&Jt)==128&&(Mn=(15<)<<12|(63&en)<<6|63&Jt)>2047&&(Mn<55296||Mn>57343)&&(xt=Mn);break;case 4:en=Re[Ze+1],Jt=Re[Ze+2],gn=Re[Ze+3],(192&en)==128&&(192&Jt)==128&&(192&gn)==128&&(Mn=(15<)<<18|(63&en)<<12|(63&Jt)<<6|63&gn)>65535&&Mn<1114112&&(xt=Mn)}}xt===null?(xt=65533,tn=1):xt>65535&&(xt-=65536,Ke.push(xt>>>10&1023|55296),xt=56320|1023&xt),Ke.push(xt),Ze+=tn}return Ct(Ke)}function Ct(Re){var Ae=Re.length;if(Ae<=He)return String.fromCharCode.apply(String,Re);for(var Ue="",Ke=0;Ke<Ae;)Ue+=String.fromCharCode.apply(String,Re.slice(Ke,Ke+=He));return Ue}function it(Re,Ae,Ue){var Ke="";Ue=Math.min(Re.length,Ue);for(var Ze=Ae;Ze<Ue;++Ze)Ke+=String.fromCharCode(127&Re[Ze]);return Ke}function St(Re,Ae,Ue){var Ke="";Ue=Math.min(Re.length,Ue);for(var Ze=Ae;Ze<Ue;++Ze)Ke+=String.fromCharCode(Re[Ze]);return Ke}function ut(Re,Ae,Ue){var Ke=Re.length;(!Ae||Ae<0)&&(Ae=0),(!Ue||Ue<0||Ue>Ke)&&(Ue=Ke);for(var Ze="",lt=Ae;lt<Ue;++lt)Ze+=Kt(Re[lt]);return Ze}function Ft(Re,Ae,Ue){for(var Ke=Re.slice(Ae,Ue),Ze="",lt=0;lt<Ke.length;lt+=2)Ze+=String.fromCharCode(Ke[lt]+256*Ke[lt+1]);return Ze}function ht(Re,Ae,Ue){if(Re%1!=0||Re<0)throw new RangeError("offset is not uint");if(Re+Ae>Ue)throw new RangeError("Trying to access beyond buffer length")}function rt(Re,Ae,Ue,Ke,Ze,lt){if(!Se.isBuffer(Re))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ae>Ze||Ae<lt)throw new RangeError('"value" argument is out of bounds');if(Ue+Ke>Re.length)throw new RangeError("Index out of range")}function dt(Re,Ae,Ue,Ke){Ae<0&&(Ae=65535+Ae+1);for(var Ze=0,lt=Math.min(Re.length-Ue,2);Ze<lt;++Ze)Re[Ue+Ze]=(Ae&255<<8*(Ke?Ze:1-Ze))>>>8*(Ke?Ze:1-Ze)}function yt(Re,Ae,Ue,Ke){Ae<0&&(Ae=4294967295+Ae+1);for(var Ze=0,lt=Math.min(Re.length-Ue,4);Ze<lt;++Ze)Re[Ue+Ze]=Ae>>>8*(Ke?Ze:3-Ze)&255}function _t(Re,Ae,Ue,Ke,Ze,lt){if(Ue+Ke>Re.length)throw new RangeError("Index out of range");if(Ue<0)throw new RangeError("Index out of range")}function vt(Re,Ae,Ue,Ke,Ze){return Ze||_t(Re,Ae,Ue,4,34028234663852886e22,-34028234663852886e22),qe.write(Re,Ae,Ue,Ke,23,4),Ue+4}function Bt(Re,Ae,Ue,Ke,Ze){return Ze||_t(Re,Ae,Ue,8,17976931348623157e292,-17976931348623157e292),qe.write(Re,Ae,Ue,Ke,52,8),Ue+8}function jt(Re){if(Re=un(Re).replace(Xe,""),Re.length<2)return"";for(;Re.length%4!=0;)Re+="=";return Re}function un(Re){return Re.trim?Re.trim():Re.replace(/^\s+|\s+$/g,"")}function Kt(Re){return Re<16?"0"+Re.toString(16):Re.toString(16)}function xn(Re,Ae){Ae=Ae||1/0;for(var Ue,Ke=Re.length,Ze=null,lt=[],xt=0;xt<Ke;++xt){if((Ue=Re.charCodeAt(xt))>55295&&Ue<57344){if(!Ze){if(Ue>56319){(Ae-=3)>-1&<.push(239,191,189);continue}if(xt+1===Ke){(Ae-=3)>-1&<.push(239,191,189);continue}Ze=Ue;continue}if(Ue<56320){(Ae-=3)>-1&<.push(239,191,189),Ze=Ue;continue}Ue=65536+(Ze-55296<<10|Ue-56320)}else Ze&&(Ae-=3)>-1&<.push(239,191,189);if(Ze=null,Ue<128){if((Ae-=1)<0)break;lt.push(Ue)}else if(Ue<2048){if((Ae-=2)<0)break;lt.push(Ue>>6|192,63&Ue|128)}else if(Ue<65536){if((Ae-=3)<0)break;lt.push(Ue>>12|224,Ue>>6&63|128,63&Ue|128)}else{if(!(Ue<1114112))throw new Error("Invalid code point");if((Ae-=4)<0)break;lt.push(Ue>>18|240,Ue>>12&63|128,Ue>>6&63|128,63&Ue|128)}}return lt}function Ut(Re){for(var Ae=[],Ue=0;Ue<Re.length;++Ue)Ae.push(255&Re.charCodeAt(Ue));return Ae}function Wt(Re,Ae){for(var Ue,Ke,Ze,lt=[],xt=0;xt<Re.length&&!((Ae-=2)<0);++xt)Ue=Re.charCodeAt(xt),Ke=Ue>>8,Ze=Ue%256,lt.push(Ze),lt.push(Ke);return lt}function $t(Re){return Be.toByteArray(jt(Re))}function ft(Re,Ae,Ue,Ke){for(var Ze=0;Ze<Ke&&!(Ze+Ue>=Ae.length||Ze>=Re.length);++Ze)Ae[Ze+Ue]=Re[Ze];return Ze}function We(Re){return Re!==Re}var Be=me("base64-js"),qe=me("ieee754"),et=me("isarray");Te.Buffer=Se,Te.SlowBuffer=ie,Te.INSPECT_MAX_BYTES=50,Se.TYPED_ARRAY_SUPPORT=be.TYPED_ARRAY_SUPPORT!==void 0?be.TYPED_ARRAY_SUPPORT:function(){try{var Re=new Uint8Array(1);return Re.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},Re.foo()===42&&typeof Re.subarray=="function"&&Re.subarray(1,1).byteLength===0}catch(Ae){return!1}}(),Te.kMaxLength=Pe(),Se.poolSize=8192,Se._augment=function(Re){return Re.__proto__=Se.prototype,Re},Se.from=function(Re,Ae,Ue){return xe(null,Re,Ae,Ue)},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(Re,Ae,Ue){return ce(null,Re,Ae,Ue)},Se.allocUnsafe=function(Re){return ve(null,Re)},Se.allocUnsafeSlow=function(Re){return ve(null,Re)},Se.isBuffer=function(Re){return!(Re==null||!Re._isBuffer)},Se.compare=function(Re,Ae){if(!Se.isBuffer(Re)||!Se.isBuffer(Ae))throw new TypeError("Arguments must be Buffers");if(Re===Ae)return 0;for(var Ue=Re.length,Ke=Ae.length,Ze=0,lt=Math.min(Ue,Ke);Ze<lt;++Ze)if(Re[Ze]!==Ae[Ze]){Ue=Re[Ze],Ke=Ae[Ze];break}return Ue<Ke?-1:Ke<Ue?1:0},Se.isEncoding=function(Re){switch(String(Re).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(Re,Ae){if(!et(Re))throw new TypeError('"list" argument must be an Array of Buffers');if(Re.length===0)return Se.alloc(0);var Ue;if(Ae===void 0)for(Ae=0,Ue=0;Ue<Re.length;++Ue)Ae+=Re[Ue].length;var Ke=Se.allocUnsafe(Ae),Ze=0;for(Ue=0;Ue<Re.length;++Ue){var lt=Re[Ue];if(!Se.isBuffer(lt))throw new TypeError('"list" argument must be an Array of Buffers');lt.copy(Ke,Ze),Ze+=lt.length}return Ke},Se.byteLength=se,Se.prototype._isBuffer=!0,Se.prototype.swap16=function(){var Re=this.length;if(Re%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Ae=0;Ae<Re;Ae+=2)ye(this,Ae,Ae+1);return this},Se.prototype.swap32=function(){var Re=this.length;if(Re%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Ae=0;Ae<Re;Ae+=4)ye(this,Ae,Ae+3),ye(this,Ae+1,Ae+2);return this},Se.prototype.swap64=function(){var Re=this.length;if(Re%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Ae=0;Ae<Re;Ae+=8)ye(this,Ae,Ae+7),ye(this,Ae+1,Ae+6),ye(this,Ae+2,Ae+5),ye(this,Ae+3,Ae+4);return this},Se.prototype.toString=function(){var Re=0|this.length;return Re===0?"":arguments.length===0?ct(this,0,Re):le.apply(this,arguments)},Se.prototype.equals=function(Re){if(!Se.isBuffer(Re))throw new TypeError("Argument must be a Buffer");return this===Re||Se.compare(this,Re)===0},Se.prototype.inspect=function(){var Re="",Ae=Te.INSPECT_MAX_BYTES;return this.length>0&&(Re=this.toString("hex",0,Ae).match(/.{2}/g).join(" "),this.length>Ae&&(Re+=" ... ")),"<Buffer "+Re+">"},Se.prototype.compare=function(Re,Ae,Ue,Ke,Ze){if(!Se.isBuffer(Re))throw new TypeError("Argument must be a Buffer");if(Ae===void 0&&(Ae=0),Ue===void 0&&(Ue=Re?Re.length:0),Ke===void 0&&(Ke=0),Ze===void 0&&(Ze=this.length),Ae<0||Ue>Re.length||Ke<0||Ze>this.length)throw new RangeError("out of range index");if(Ke>=Ze&&Ae>=Ue)return 0;if(Ke>=Ze)return-1;if(Ae>=Ue)return 1;if(Ae>>>=0,Ue>>>=0,Ke>>>=0,Ze>>>=0,this===Re)return 0;for(var lt=Ze-Ke,xt=Ue-Ae,tn=Math.min(lt,xt),en=this.slice(Ke,Ze),Jt=Re.slice(Ae,Ue),gn=0;gn<tn;++gn)if(en[gn]!==Jt[gn]){lt=en[gn],xt=Jt[gn];break}return lt<xt?-1:xt<lt?1:0},Se.prototype.includes=function(Re,Ae,Ue){return this.indexOf(Re,Ae,Ue)!==-1},Se.prototype.indexOf=function(Re,Ae,Ue){return we(this,Re,Ae,Ue,!0)},Se.prototype.lastIndexOf=function(Re,Ae,Ue){return we(this,Re,Ae,Ue,!1)},Se.prototype.write=function(Re,Ae,Ue,Ke){if(Ae===void 0)Ke="utf8",Ue=this.length,Ae=0;else if(Ue===void 0&&typeof Ae=="string")Ke=Ae,Ue=this.length,Ae=0;else{if(!isFinite(Ae))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");Ae|=0,isFinite(Ue)?(Ue|=0,Ke===void 0&&(Ke="utf8")):(Ke=Ue,Ue=void 0)}var Ze=this.length-Ae;if((Ue===void 0||Ue>Ze)&&(Ue=Ze),Re.length>0&&(Ue<0||Ae<0)||Ae>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ke||(Ke="utf8");for(var lt=!1;;)switch(Ke){case"hex":return ke(this,Re,Ae,Ue);case"utf8":case"utf-8":return Ne(this,Re,Ae,Ue);case"ascii":return je(this,Re,Ae,Ue);case"latin1":case"binary":return Ve(this,Re,Ae,Ue);case"base64":return Qe(this,Re,Ae,Ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ge(this,Re,Ae,Ue);default:if(lt)throw new TypeError("Unknown encoding: "+Ke);Ke=(""+Ke).toLowerCase(),lt=!0}},Se.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var He=4096;Se.prototype.slice=function(Re,Ae){var Ue=this.length;Re=~~Re,Ae=Ae===void 0?Ue:~~Ae,Re<0?(Re+=Ue)<0&&(Re=0):Re>Ue&&(Re=Ue),Ae<0?(Ae+=Ue)<0&&(Ae=0):Ae>Ue&&(Ae=Ue),Ae<Re&&(Ae=Re);var Ke;if(Se.TYPED_ARRAY_SUPPORT)Ke=this.subarray(Re,Ae),Ke.__proto__=Se.prototype;else{var Ze=Ae-Re;Ke=new Se(Ze,void 0);for(var lt=0;lt<Ze;++lt)Ke[lt]=this[lt+Re]}return Ke},Se.prototype.readUIntLE=function(Re,Ae,Ue){Re|=0,Ae|=0,Ue||ht(Re,Ae,this.length);for(var Ke=this[Re],Ze=1,lt=0;++lt<Ae&&(Ze*=256);)Ke+=this[Re+lt]*Ze;return Ke},Se.prototype.readUIntBE=function(Re,Ae,Ue){Re|=0,Ae|=0,Ue||ht(Re,Ae,this.length);for(var Ke=this[Re+--Ae],Ze=1;Ae>0&&(Ze*=256);)Ke+=this[Re+--Ae]*Ze;return Ke},Se.prototype.readUInt8=function(Re,Ae){return Ae||ht(Re,1,this.length),this[Re]},Se.prototype.readUInt16LE=function(Re,Ae){return Ae||ht(Re,2,this.length),this[Re]|this[Re+1]<<8},Se.prototype.readUInt16BE=function(Re,Ae){return Ae||ht(Re,2,this.length),this[Re]<<8|this[Re+1]},Se.prototype.readUInt32LE=function(Re,Ae){return Ae||ht(Re,4,this.length),(this[Re]|this[Re+1]<<8|this[Re+2]<<16)+16777216*this[Re+3]},Se.prototype.readUInt32BE=function(Re,Ae){return Ae||ht(Re,4,this.length),16777216*this[Re]+(this[Re+1]<<16|this[Re+2]<<8|this[Re+3])},Se.prototype.readIntLE=function(Re,Ae,Ue){Re|=0,Ae|=0,Ue||ht(Re,Ae,this.length);for(var Ke=this[Re],Ze=1,lt=0;++lt<Ae&&(Ze*=256);)Ke+=this[Re+lt]*Ze;return Ze*=128,Ke>=Ze&&(Ke-=Math.pow(2,8*Ae)),Ke},Se.prototype.readIntBE=function(Re,Ae,Ue){Re|=0,Ae|=0,Ue||ht(Re,Ae,this.length);for(var Ke=Ae,Ze=1,lt=this[Re+--Ke];Ke>0&&(Ze*=256);)lt+=this[Re+--Ke]*Ze;return Ze*=128,lt>=Ze&&(lt-=Math.pow(2,8*Ae)),lt},Se.prototype.readInt8=function(Re,Ae){return Ae||ht(Re,1,this.length),128&this[Re]?-1*(255-this[Re]+1):this[Re]},Se.prototype.readInt16LE=function(Re,Ae){Ae||ht(Re,2,this.length);var Ue=this[Re]|this[Re+1]<<8;return 32768&Ue?4294901760|Ue:Ue},Se.prototype.readInt16BE=function(Re,Ae){Ae||ht(Re,2,this.length);var Ue=this[Re+1]|this[Re]<<8;return 32768&Ue?4294901760|Ue:Ue},Se.prototype.readInt32LE=function(Re,Ae){return Ae||ht(Re,4,this.length),this[Re]|this[Re+1]<<8|this[Re+2]<<16|this[Re+3]<<24},Se.prototype.readInt32BE=function(Re,Ae){return Ae||ht(Re,4,this.length),this[Re]<<24|this[Re+1]<<16|this[Re+2]<<8|this[Re+3]},Se.prototype.readFloatLE=function(Re,Ae){return Ae||ht(Re,4,this.length),qe.read(this,Re,!0,23,4)},Se.prototype.readFloatBE=function(Re,Ae){return Ae||ht(Re,4,this.length),qe.read(this,Re,!1,23,4)},Se.prototype.readDoubleLE=function(Re,Ae){return Ae||ht(Re,8,this.length),qe.read(this,Re,!0,52,8)},Se.prototype.readDoubleBE=function(Re,Ae){return Ae||ht(Re,8,this.length),qe.read(this,Re,!1,52,8)},Se.prototype.writeUIntLE=function(Re,Ae,Ue,Ke){Re=+Re,Ae|=0,Ue|=0,!Ke&&rt(this,Re,Ae,Ue,Math.pow(2,8*Ue)-1,0);var Ze=1,lt=0;for(this[Ae]=255ℜ++lt<Ue&&(Ze*=256);)this[Ae+lt]=Re/Ze&255;return Ae+Ue},Se.prototype.writeUIntBE=function(Re,Ae,Ue,Ke){Re=+Re,Ae|=0,Ue|=0,!Ke&&rt(this,Re,Ae,Ue,Math.pow(2,8*Ue)-1,0);var Ze=Ue-1,lt=1;for(this[Ae+Ze]=255ℜ--Ze>=0&&(lt*=256);)this[Ae+Ze]=Re/lt&255;return Ae+Ue},Se.prototype.writeUInt8=function(Re,Ae,Ue){return Re=+Re,Ae|=0,Ue||rt(this,Re,Ae,1,255,0),Se.TYPED_ARRAY_SUPPORT||(Re=Math.floor(Re)),this[Ae]=255&Re,Ae+1},Se.prototype.writeUInt16LE=function(Re,Ae,Ue){return Re=+Re,Ae|=0,Ue||rt(this,Re,Ae,2,65535,0),Se.TYPED_ARRAY_SUPPORT?(this[Ae]=255&Re,this[Ae+1]=Re>>>8):dt(this,Re,Ae,!0),Ae+2},Se.prototype.writeUInt16BE=function(Re,Ae,Ue){return Re=+Re,Ae|=0,Ue||rt(this,Re,Ae,2,65535,0),Se.TYPED_ARRAY_SUPPORT?(this[Ae]=Re>>>8,this[Ae+1]=255&Re):dt(this,Re,Ae,!1),Ae+2},Se.prototype.writeUInt32LE=function(Re,Ae,Ue){return Re=+Re,Ae|=0,Ue||rt(this,Re,Ae,4,4294967295,0),Se.TYPED_ARRAY_SUPPORT?(this[Ae+3]=Re>>>24,this[Ae+2]=Re>>>16,this[Ae+1]=Re>>>8,this[Ae]=255&Re):yt(this,Re,Ae,!0),Ae+4},Se.prototype.writeUInt32BE=function(Re,Ae,Ue){return Re=+Re,Ae|=0,Ue||rt(this,Re,Ae,4,4294967295,0),Se.TYPED_ARRAY_SUPPORT?(this[Ae]=Re>>>24,this[Ae+1]=Re>>>16,this[Ae+2]=Re>>>8,this[Ae+3]=255&Re):yt(this,Re,Ae,!1),Ae+4},Se.prototype.writeIntLE=function(Re,Ae,Ue,Ke){if(Re=+Re,Ae|=0,!Ke){var Ze=Math.pow(2,8*Ue-1);rt(this,Re,Ae,Ue,Ze-1,-Ze)}var lt=0,xt=1,tn=0;for(this[Ae]=255ℜ++lt<Ue&&(xt*=256);)Re<0&&tn===0&&this[Ae+lt-1]!==0&&(tn=1),this[Ae+lt]=(Re/xt>>0)-tn&255;return Ae+Ue},Se.prototype.writeIntBE=function(Re,Ae,Ue,Ke){if(Re=+Re,Ae|=0,!Ke){var Ze=Math.pow(2,8*Ue-1);rt(this,Re,Ae,Ue,Ze-1,-Ze)}var lt=Ue-1,xt=1,tn=0;for(this[Ae+lt]=255ℜ--lt>=0&&(xt*=256);)Re<0&&tn===0&&this[Ae+lt+1]!==0&&(tn=1),this[Ae+lt]=(Re/xt>>0)-tn&255;return Ae+Ue},Se.prototype.writeInt8=function(Re,Ae,Ue){return Re=+Re,Ae|=0,Ue||rt(this,Re,Ae,1,127,-128),Se.TYPED_ARRAY_SUPPORT||(Re=Math.floor(Re)),Re<0&&(Re=255+Re+1),this[Ae]=255&Re,Ae+1},Se.prototype.writeInt16LE=function(Re,Ae,Ue){return Re=+Re,Ae|=0,Ue||rt(this,Re,Ae,2,32767,-32768),Se.TYPED_ARRAY_SUPPORT?(this[Ae]=255&Re,this[Ae+1]=Re>>>8):dt(this,Re,Ae,!0),Ae+2},Se.prototype.writeInt16BE=function(Re,Ae,Ue){return Re=+Re,Ae|=0,Ue||rt(this,Re,Ae,2,32767,-32768),Se.TYPED_ARRAY_SUPPORT?(this[Ae]=Re>>>8,this[Ae+1]=255&Re):dt(this,Re,Ae,!1),Ae+2},Se.prototype.writeInt32LE=function(Re,Ae,Ue){return Re=+Re,Ae|=0,Ue||rt(this,Re,Ae,4,2147483647,-2147483648),Se.TYPED_ARRAY_SUPPORT?(this[Ae]=255&Re,this[Ae+1]=Re>>>8,this[Ae+2]=Re>>>16,this[Ae+3]=Re>>>24):yt(this,Re,Ae,!0),Ae+4},Se.prototype.writeInt32BE=function(Re,Ae,Ue){return Re=+Re,Ae|=0,Ue||rt(this,Re,Ae,4,2147483647,-2147483648),Re<0&&(Re=4294967295+Re+1),Se.TYPED_ARRAY_SUPPORT?(this[Ae]=Re>>>24,this[Ae+1]=Re>>>16,this[Ae+2]=Re>>>8,this[Ae+3]=255&Re):yt(this,Re,Ae,!1),Ae+4},Se.prototype.writeFloatLE=function(Re,Ae,Ue){return vt(this,Re,Ae,!0,Ue)},Se.prototype.writeFloatBE=function(Re,Ae,Ue){return vt(this,Re,Ae,!1,Ue)},Se.prototype.writeDoubleLE=function(Re,Ae,Ue){return Bt(this,Re,Ae,!0,Ue)},Se.prototype.writeDoubleBE=function(Re,Ae,Ue){return Bt(this,Re,Ae,!1,Ue)},Se.prototype.copy=function(Re,Ae,Ue,Ke){if(Ue||(Ue=0),Ke||Ke===0||(Ke=this.length),Ae>=Re.length&&(Ae=Re.length),Ae||(Ae=0),Ke>0&&Ke<Ue&&(Ke=Ue),Ke===Ue||Re.length===0||this.length===0)return 0;if(Ae<0)throw new RangeError("targetStart out of bounds");if(Ue<0||Ue>=this.length)throw new RangeError("sourceStart out of bounds");if(Ke<0)throw new RangeError("sourceEnd out of bounds");Ke>this.length&&(Ke=this.length),Re.length-Ae<Ke-Ue&&(Ke=Re.length-Ae+Ue);var Ze,lt=Ke-Ue;if(this===Re&&Ue<Ae&&Ae<Ke)for(Ze=lt-1;Ze>=0;--Ze)Re[Ze+Ae]=this[Ze+Ue];else if(lt<1e3||!Se.TYPED_ARRAY_SUPPORT)for(Ze=0;Ze<lt;++Ze)Re[Ze+Ae]=this[Ze+Ue];else Uint8Array.prototype.set.call(Re,this.subarray(Ue,Ue+lt),Ae);return lt},Se.prototype.fill=function(Re,Ae,Ue,Ke){if(typeof Re=="string"){if(typeof Ae=="string"?(Ke=Ae,Ae=0,Ue=this.length):typeof Ue=="string"&&(Ke=Ue,Ue=this.length),Re.length===1){var Ze=Re.charCodeAt(0);Ze<256&&(Re=Ze)}if(Ke!==void 0&&typeof Ke!="string")throw new TypeError("encoding must be a string");if(typeof Ke=="string"&&!Se.isEncoding(Ke))throw new TypeError("Unknown encoding: "+Ke)}else typeof Re=="number"&&(Re&=255);if(Ae<0||this.length<Ae||this.length<Ue)throw new RangeError("Out of range index");if(Ue<=Ae)return this;Ae>>>=0,Ue=Ue===void 0?this.length:Ue>>>0,Re||(Re=0);var lt;if(typeof Re=="number")for(lt=Ae;lt<Ue;++lt)this[lt]=Re;else{var xt=Se.isBuffer(Re)?Re:xn(new Se(Re,Ke).toString()),tn=xt.length;for(lt=0;lt<Ue-Ae;++lt)this[lt+Ae]=xt[lt%tn]}return this};var Xe=/[^+\/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,Ie,Te){Ie.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,Ie,Te){"use strict";var be=function(){this.buffer=[],this.fns=[]};be.prototype.push=function(he,Se){if(this.fns.length)return this.fns.shift()(null,he);var xe={data:he,priority:Se},ge=Pe(this.buffer,xe,function(ce){return ce.priority});this.buffer.splice(ge,0,xe)},be.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 Pe=function(he,Se,xe){Se=xe(Se);for(var ge=0,ce=he?he.length:ge;ge<ce;){var ve=ge+ce>>>1;xe(he[ve])<Se?ge=ve+1:ce=ve}return ge};Ie.exports=be},{}],41:[function(me,Ie,Te){function be(z){var ee=this,oe=ue.call(arguments,1);return new Promise(function(ie,se){function le(Ce){var ke;try{ke=z.next(Ce)}catch(Ne){return se(Ne)}we(ke)}function ye(Ce){var ke;try{ke=z.throw(Ce)}catch(Ne){return se(Ne)}we(ke)}function we(Ce){if(Ce.done)return ie(Ce.value);var ke=Pe.call(ee,Ce.value);return ke&&ge(ke)?ke.then(le,ye):ye(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(Ce.value)+'"'))}if(typeof z=="function"&&(z=z.apply(ee,oe)),!z||typeof z.next!="function")return ie(z);le()})}function Pe(z){return z&&(ge(z)?z:ve(z)||ce(z)?be.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,le){if(se)return ie(se);arguments.length>2&&(le=ue.call(arguments,1)),oe(le)})})}function Se(z){return Promise.all(z.map(Pe,this))}function xe(z){for(var ee=new z.constructor,oe=Object.keys(z),ie=[],se=0;se<oe.length;se++){var le=oe[se],ye=Pe.call(this,z[le]);ye&&ge(ye)?function(we,Ce){ee[Ce]=void 0,ie.push(we.then(function(ke){ee[Ce]=ke}))}(ye,le):ee[le]=z[le]}return Promise.all(ie).then(function(){return ee})}function ge(z){return typeof z.then=="function"}function ce(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"||ce(ee.prototype))}function de(z){return Object==z.constructor}var ue=Array.prototype.slice;Ie.exports=be.default=be.co=be,be.wrap=function(z){function ee(){return be.call(this,z.apply(this,arguments))}return ee.__generatorFunction__=z,ee}},{}],42:[function(me,Ie,Te){Ie.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,Ie,Te){"use strict";function be(Se,xe){if(!(this instanceof be))return new be(Se,xe);this.src=Se,this._withAccess=xe}function Pe(Se,xe){return Se[xe]===void 0&&Se.__lookupGetter__(xe)===void 0&&Se.__lookupSetter__(xe)===void 0}var he=Array.prototype.slice;Ie.exports=be,be.prototype.withAccess=function(Se){return this._withAccess=Se!==!1,this},be.prototype.pick=function(Se){return Array.isArray(Se)||(Se=he.call(arguments)),Se.length&&(this.keys=Se),this},be.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++)ce=xe[ge],Se[ce]===void 0&&(Se[ce]=this.src[ce]);return Se}for(var ge=0;ge<xe.length;ge++){var ce=xe[ge];if(Pe(Se,ce)){var ve=this.src.__lookupGetter__(ce),de=this.src.__lookupSetter__(ce);ve&&Se.__defineGetter__(ce,ve),de&&Se.__defineSetter__(ce,de),ve||de||(Se[ce]=this.src[ce])}}return Se},be.prototype.toCover=function(Se){for(var xe=this.keys||Object.keys(this.src),ge=0;ge<xe.length;ge++){var ce=xe[ge];delete Se[ce];var ve=this.src.__lookupGetter__(ce),de=this.src.__lookupSetter__(ce);ve&&Se.__defineGetter__(ce,ve),de&&Se.__defineSetter__(ce,de),ve||de||(Se[ce]=this.src[ce])}},be.prototype.override=be.prototype.toCover,be.prototype.and=function(Se){var xe={};return this.to(xe),this.src=Se,this.to(xe),this.src=xe,this}},{}],44:[function(me,Ie,Te){me("../../modules/es6.string.iterator"),me("../../modules/es6.array.from"),Ie.exports=me("../../modules/_core").Array.from},{"../../modules/_core":65,"../../modules/es6.array.from":133,"../../modules/es6.string.iterator":145}],45:[function(me,Ie,Te){var be=me("../../modules/_core"),Pe=be.JSON||(be.JSON={stringify:JSON.stringify});Ie.exports=function(he){return Pe.stringify.apply(Pe,arguments)}},{"../../modules/_core":65}],46:[function(me,Ie,Te){me("../../modules/es6.object.assign"),Ie.exports=me("../../modules/_core").Object.assign},{"../../modules/_core":65,"../../modules/es6.object.assign":136}],47:[function(me,Ie,Te){me("../../modules/es6.object.create");var be=me("../../modules/_core").Object;Ie.exports=function(Pe,he){return be.create(Pe,he)}},{"../../modules/_core":65,"../../modules/es6.object.create":137}],48:[function(me,Ie,Te){me("../../modules/es6.object.define-property");var be=me("../../modules/_core").Object;Ie.exports=function(Pe,he,Se){return be.defineProperty(Pe,he,Se)}},{"../../modules/_core":65,"../../modules/es6.object.define-property":138}],49:[function(me,Ie,Te){me("../../modules/es6.object.get-own-property-names");var be=me("../../modules/_core").Object;Ie.exports=function(Pe){return be.getOwnPropertyNames(Pe)}},{"../../modules/_core":65,"../../modules/es6.object.get-own-property-names":139}],50:[function(me,Ie,Te){me("../../modules/es6.object.get-prototype-of"),Ie.exports=me("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":65,"../../modules/es6.object.get-prototype-of":140}],51:[function(me,Ie,Te){me("../../modules/es6.object.keys"),Ie.exports=me("../../modules/_core").Object.keys},{"../../modules/_core":65,"../../modules/es6.object.keys":141}],52:[function(me,Ie,Te){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"),Ie.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,Ie,Te){me("../modules/web.immediate"),Ie.exports=me("../modules/_core").setImmediate},{"../modules/_core":65,"../modules/web.immediate":152}],54:[function(me,Ie,Te){me("../../modules/es6.string.from-code-point"),Ie.exports=me("../../modules/_core").String.fromCodePoint},{"../../modules/_core":65,"../../modules/es6.string.from-code-point":144}],55:[function(me,Ie,Te){me("../../modules/es6.function.has-instance"),Ie.exports=me("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":130,"../../modules/es6.function.has-instance":135}],56:[function(me,Ie,Te){me("../../modules/es6.symbol"),me("../../modules/es6.object.to-string"),me("../../modules/es7.symbol.async-iterator"),me("../../modules/es7.symbol.observable"),Ie.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,Ie,Te){me("../../modules/es6.string.iterator"),me("../../modules/web.dom.iterable"),Ie.exports=me("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":130,"../../modules/es6.string.iterator":145,"../../modules/web.dom.iterable":151}],58:[function(me,Ie,Te){Ie.exports=function(be){if(typeof be!="function")throw TypeError(be+" is not a function!");return be}},{}],59:[function(me,Ie,Te){Ie.exports=function(){}},{}],60:[function(me,Ie,Te){Ie.exports=function(be,Pe,he,Se){if(!(be instanceof Pe)||Se!==void 0&&Se in be)throw TypeError(he+": incorrect invocation!");return be}},{}],61:[function(me,Ie,Te){var be=me("./_is-object");Ie.exports=function(Pe){if(!be(Pe))throw TypeError(Pe+" is not an object!");return Pe}},{"./_is-object":85}],62:[function(me,Ie,Te){var be=me("./_to-iobject"),Pe=me("./_to-length"),he=me("./_to-absolute-index");Ie.exports=function(Se){return function(xe,ge,ce){var ve,de=be(xe),ue=Pe(de.length),z=he(ce,ue);if(Se&&ge!=ge){for(;ue>z;)if((ve=de[z++])!=ve)return!0}else for(;ue>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,Ie,Te){var be=me("./_cof"),Pe=me("./_wks")("toStringTag"),he=be(function(){return arguments}())=="Arguments",Se=function(xe,ge){try{return xe[ge]}catch(ce){}};Ie.exports=function(xe){var ge,ce,ve;return xe===void 0?"Undefined":xe===null?"Null":typeof(ce=Se(ge=Object(xe),Pe))=="string"?ce:he?be(ge):(ve=be(ge))=="Object"&&typeof ge.callee=="function"?"Arguments":ve}},{"./_cof":64,"./_wks":131}],64:[function(me,Ie,Te){var be={}.toString;Ie.exports=function(Pe){return be.call(Pe).slice(8,-1)}},{}],65:[function(me,Ie,Te){var be=Ie.exports={version:"2.5.7"};typeof __e=="number"&&(__e=be)},{}],66:[function(me,Ie,Te){"use strict";var be=me("./_object-dp"),Pe=me("./_property-desc");Ie.exports=function(he,Se,xe){Se in he?be.f(he,Se,Pe(0,xe)):he[Se]=xe}},{"./_object-dp":98,"./_property-desc":111}],67:[function(me,Ie,Te){var be=me("./_a-function");Ie.exports=function(Pe,he,Se){if(be(Pe),he===void 0)return Pe;switch(Se){case 1:return function(xe){return Pe.call(he,xe)};case 2:return function(xe,ge){return Pe.call(he,xe,ge)};case 3:return function(xe,ge,ce){return Pe.call(he,xe,ge,ce)}}return function(){return Pe.apply(he,arguments)}}},{"./_a-function":58}],68:[function(me,Ie,Te){Ie.exports=function(be){if(be==null)throw TypeError("Can't call method on "+be);return be}},{}],69:[function(me,Ie,Te){Ie.exports=!me("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":74}],70:[function(me,Ie,Te){var be=me("./_is-object"),Pe=me("./_global").document,he=be(Pe)&&be(Pe.createElement);Ie.exports=function(Se){return he?Pe.createElement(Se):{}}},{"./_global":76,"./_is-object":85}],71:[function(me,Ie,Te){Ie.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],72:[function(me,Ie,Te){var be=me("./_object-keys"),Pe=me("./_object-gops"),he=me("./_object-pie");Ie.exports=function(Se){var xe=be(Se),ge=Pe.f;if(ge)for(var ce,ve=ge(Se),de=he.f,ue=0;ve.length>ue;)de.call(Se,ce=ve[ue++])&&xe.push(ce);return xe}},{"./_object-gops":103,"./_object-keys":106,"./_object-pie":107}],73:[function(me,Ie,Te){var be=me("./_global"),Pe=me("./_core"),he=me("./_ctx"),Se=me("./_hide"),xe=me("./_has"),ge=function(ce,ve,de){var ue,z,ee,oe=ce&ge.F,ie=ce&ge.G,se=ce&ge.S,le=ce&ge.P,ye=ce&ge.B,we=ce&ge.W,Ce=ie?Pe:Pe[ve]||(Pe[ve]={}),ke=Ce.prototype,Ne=ie?be:se?be[ve]:(be[ve]||{}).prototype;ie&&(de=ve);for(ue in de)(z=!oe&&Ne&&Ne[ue]!==void 0)&&xe(Ce,ue)||(ee=z?Ne[ue]:de[ue],Ce[ue]=ie&&typeof Ne[ue]!="function"?de[ue]:ye&&z?he(ee,be):we&&Ne[ue]==ee?function(je){var Ve=function(Qe,Ge,mt){if(this instanceof je){switch(arguments.length){case 0:return new je;case 1:return new je(Qe);case 2:return new je(Qe,Ge)}return new je(Qe,Ge,mt)}return je.apply(this,arguments)};return Ve.prototype=je.prototype,Ve}(ee):le&&typeof ee=="function"?he(Function.call,ee):ee,le&&((Ce.virtual||(Ce.virtual={}))[ue]=ee,ce&ge.R&&ke&&!ke[ue]&&Se(ke,ue,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,Ie.exports=ge},{"./_core":65,"./_ctx":67,"./_global":76,"./_has":77,"./_hide":78}],74:[function(me,Ie,Te){Ie.exports=function(be){try{return!!be()}catch(Pe){return!0}}},{}],75:[function(me,Ie,de){var be=me("./_ctx"),Pe=me("./_iter-call"),he=me("./_is-array-iter"),Se=me("./_an-object"),xe=me("./_to-length"),ge=me("./core.get-iterator-method"),ce={},ve={},de=Ie.exports=function(ue,z,ee,oe,ie){var se,le,ye,we,Ce=ie?function(){return ue}:ge(ue),ke=be(ee,oe,z?2:1),Ne=0;if(typeof Ce!="function")throw TypeError(ue+" is not iterable!");if(he(Ce)){for(se=xe(ue.length);se>Ne;Ne++)if((we=z?ke(Se(le=ue[Ne])[0],le[1]):ke(ue[Ne]))===ce||we===ve)return we}else for(ye=Ce.call(ue);!(le=ye.next()).done;)if((we=Pe(ye,ke,le.value,z))===ce||we===ve)return we};de.BREAK=ce,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,Ie,Te){var be=Ie.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=be)},{}],77:[function(me,Ie,Te){var be={}.hasOwnProperty;Ie.exports=function(Pe,he){return be.call(Pe,he)}},{}],78:[function(me,Ie,Te){var be=me("./_object-dp"),Pe=me("./_property-desc");Ie.exports=me("./_descriptors")?function(he,Se,xe){return be.f(he,Se,Pe(1,xe))}:function(he,Se,xe){return he[Se]=xe,he}},{"./_descriptors":69,"./_object-dp":98,"./_property-desc":111}],79:[function(me,Ie,Te){var be=me("./_global").document;Ie.exports=be&&be.documentElement},{"./_global":76}],80:[function(me,Ie,Te){Ie.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,Ie,Te){Ie.exports=function(be,Pe,he){var Se=he===void 0;switch(Pe.length){case 0:return Se?be():be.call(he);case 1:return Se?be(Pe[0]):be.call(he,Pe[0]);case 2:return Se?be(Pe[0],Pe[1]):be.call(he,Pe[0],Pe[1]);case 3:return Se?be(Pe[0],Pe[1],Pe[2]):be.call(he,Pe[0],Pe[1],Pe[2]);case 4:return Se?be(Pe[0],Pe[1],Pe[2],Pe[3]):be.call(he,Pe[0],Pe[1],Pe[2],Pe[3])}return be.apply(he,Pe)}},{}],82:[function(me,Ie,Te){var be=me("./_cof");Ie.exports=Object("z").propertyIsEnumerable(0)?Object:function(Pe){return be(Pe)=="String"?Pe.split(""):Object(Pe)}},{"./_cof":64}],83:[function(me,Ie,Te){var be=me("./_iterators"),Pe=me("./_wks")("iterator"),he=Array.prototype;Ie.exports=function(Se){return Se!==void 0&&(be.Array===Se||he[Pe]===Se)}},{"./_iterators":91,"./_wks":131}],84:[function(me,Ie,Te){var be=me("./_cof");Ie.exports=Array.isArray||function(Pe){return be(Pe)=="Array"}},{"./_cof":64}],85:[function(me,Ie,Te){Ie.exports=function(be){return typeof be=="object"?be!==null:typeof be=="function"}},{}],86:[function(me,Ie,Te){var be=me("./_an-object");Ie.exports=function(Pe,he,Se,xe){try{return xe?he(be(Se)[0],Se[1]):he(Se)}catch(ce){var ge=Pe.return;throw ge!==void 0&&be(ge.call(Pe)),ce}}},{"./_an-object":61}],87:[function(me,Ie,Te){"use strict";var be=me("./_object-create"),Pe=me("./_property-desc"),he=me("./_set-to-string-tag"),Se={};me("./_hide")(Se,me("./_wks")("iterator"),function(){return this}),Ie.exports=function(xe,ge,ce){xe.prototype=be(Se,{next:Pe(1,ce)}),he(xe,ge+" Iterator")}},{"./_hide":78,"./_object-create":97,"./_property-desc":111,"./_set-to-string-tag":115,"./_wks":131}],88:[function(me,Ie,Te){"use strict";var be=me("./_library"),Pe=me("./_export"),he=me("./_redefine"),Se=me("./_hide"),xe=me("./_iterators"),ge=me("./_iter-create"),ce=me("./_set-to-string-tag"),ve=me("./_object-gpo"),de=me("./_wks")("iterator"),ue=!([].keys&&"next"in[].keys()),z=function(){return this};Ie.exports=function(ee,oe,ie,se,le,ye,we){ge(ie,oe,se);var Ce,ke,Ne,je=function(ut){if(!ue&&ut in mt)return mt[ut];switch(ut){case"keys":case"values":return function(){return new ie(this,ut)}}return function(){return new ie(this,ut)}},Ve=oe+" Iterator",Qe=le=="values",Ge=!1,mt=ee.prototype,ct=mt[de]||mt["@@iterator"]||le&&mt[le],Ct=ct||je(le),it=le?Qe?je("entries"):Ct:void 0,St=oe=="Array"&&mt.entries||ct;if(St&&(Ne=ve(St.call(new ee)))!==Object.prototype&&Ne.next&&(ce(Ne,Ve,!0),be||typeof Ne[de]=="function"||Se(Ne,de,z)),Qe&&ct&&ct.name!=="values"&&(Ge=!0,Ct=function(){return ct.call(this)}),be&&!we||!ue&&!Ge&&mt[de]||Se(mt,de,Ct),xe[oe]=Ct,xe[Ve]=z,le)if(Ce={values:Qe?Ct:je("values"),keys:ye?Ct:je("keys"),entries:it},we)for(ke in Ce)ke in mt||he(mt,ke,Ce[ke]);else Pe(Pe.P+Pe.F*(ue||Ge),oe,Ce);return Ce}},{"./_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,Ie,Te){var be=me("./_wks")("iterator"),Pe=!1;try{var he=[7][be]();he.return=function(){Pe=!0},Array.from(he,function(){throw 2})}catch(Se){}Ie.exports=function(Se,xe){if(!xe&&!Pe)return!1;var ge=!1;try{var ce=[7],ve=ce[be]();ve.next=function(){return{done:ge=!0}},ce[be]=function(){return ve},Se(ce)}catch(de){}return ge}},{"./_wks":131}],90:[function(me,Ie,Te){Ie.exports=function(be,Pe){return{value:Pe,done:!!be}}},{}],91:[function(me,Ie,Te){Ie.exports={}},{}],92:[function(me,Ie,Te){Ie.exports=!0},{}],93:[function(me,Ie,Te){var be=me("./_uid")("meta"),Pe=me("./_is-object"),he=me("./_has"),Se=me("./_object-dp").f,xe=0,ge=Object.isExtensible||function(){return!0},ce=!me("./_fails")(function(){return ge(Object.preventExtensions({}))}),ve=function(oe){Se(oe,be,{value:{i:"O"+ ++xe,w:{}}})},de=function(oe,ie){if(!Pe(oe))return typeof oe=="symbol"?oe:(typeof oe=="string"?"S":"P")+oe;if(!he(oe,be)){if(!ge(oe))return"F";if(!ie)return"E";ve(oe)}return oe[be].i},ue=function(oe,ie){if(!he(oe,be)){if(!ge(oe))return!0;if(!ie)return!1;ve(oe)}return oe[be].w},z=function(oe){return ce&&ee.NEED&&ge(oe)&&!he(oe,be)&&ve(oe),oe},ee=Ie.exports={KEY:be,NEED:!1,fastKey:de,getWeak:ue,onFreeze:z}},{"./_fails":74,"./_has":77,"./_is-object":85,"./_object-dp":98,"./_uid":127}],94:[function(me,Ie,Te){var be=me("./_global"),Pe=me("./_task").set,he=be.MutationObserver||be.WebKitMutationObserver,Se=be.process,xe=be.Promise,ge=me("./_cof")(Se)=="process";Ie.exports=function(){var ce,ve,de,ue=function(){var ie,se;for(ge&&(ie=Se.domain)&&ie.exit();ce;){se=ce.fn,ce=ce.next;try{se()}catch(le){throw ce?de():ve=void 0,le}}ve=void 0,ie&&ie.enter()};if(ge)de=function(){Se.nextTick(ue)};else if(!he||be.navigator&&be.navigator.standalone)if(xe&&xe.resolve){var z=xe.resolve(void 0);de=function(){z.then(ue)}}else de=function(){Pe.call(be,ue)};else{var ee=!0,oe=document.createTextNode("");new he(ue).observe(oe,{characterData:!0}),de=function(){oe.data=ee=!ee}}return function(ie){var se={fn:ie,next:void 0};ve&&(ve.next=se),ce||(ce=se,de()),ve=se}}},{"./_cof":64,"./_global":76,"./_task":120}],95:[function(me,Ie,Te){"use strict";function be(he){var Se,xe;this.promise=new he(function(ge,ce){if(Se!==void 0||xe!==void 0)throw TypeError("Bad Promise constructor");Se=ge,xe=ce}),this.resolve=Pe(Se),this.reject=Pe(xe)}var Pe=me("./_a-function");Ie.exports.f=function(he){return new be(he)}},{"./_a-function":58}],96:[function(me,Ie,Te){"use strict";var be=me("./_object-keys"),Pe=me("./_object-gops"),he=me("./_object-pie"),Se=me("./_to-object"),xe=me("./_iobject"),ge=Object.assign;Ie.exports=!ge||me("./_fails")(function(){var ce={},ve={},de=Symbol(),ue="abcdefghijklmnopqrst";return ce[de]=7,ue.split("").forEach(function(z){ve[z]=z}),ge({},ce)[de]!=7||Object.keys(ge({},ve)).join("")!=ue})?function(ce,ve){for(var de=Se(ce),ue=arguments.length,z=1,ee=Pe.f,oe=he.f;ue>z;)for(var ie,se=xe(arguments[z++]),le=ee?be(se).concat(ee(se)):be(se),ye=le.length,we=0;ye>we;)oe.call(se,ie=le[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,Ie,Te){var be=me("./_an-object"),Pe=me("./_object-dps"),he=me("./_enum-bug-keys"),Se=me("./_shared-key")("IE_PROTO"),xe=function(){},ge=function(){var ce,ve=me("./_dom-create")("iframe"),de=he.length;for(ve.style.display="none",me("./_html").appendChild(ve),ve.src="javascript:",ce=ve.contentWindow.document,ce.open(),ce.write("<script>document.F=Object<\/script>"),ce.close(),ge=ce.F;de--;)delete ge.prototype[he[de]];return ge()};Ie.exports=Object.create||function(ce,ve){var de;return ce!==null?(xe.prototype=be(ce),de=new xe,xe.prototype=null,de[Se]=ce):de=ge(),ve===void 0?de:Pe(de,ve)}},{"./_an-object":61,"./_dom-create":70,"./_enum-bug-keys":71,"./_html":79,"./_object-dps":99,"./_shared-key":116}],98:[function(me,Ie,Te){var be=me("./_an-object"),Pe=me("./_ie8-dom-define"),he=me("./_to-primitive"),Se=Object.defineProperty;Te.f=me("./_descriptors")?Object.defineProperty:function(xe,ge,ce){if(be(xe),ge=he(ge,!0),be(ce),Pe)try{return Se(xe,ge,ce)}catch(ve){}if("get"in ce||"set"in ce)throw TypeError("Accessors not supported!");return"value"in ce&&(xe[ge]=ce.value),xe}},{"./_an-object":61,"./_descriptors":69,"./_ie8-dom-define":80,"./_to-primitive":126}],99:[function(me,Ie,Te){var be=me("./_object-dp"),Pe=me("./_an-object"),he=me("./_object-keys");Ie.exports=me("./_descriptors")?Object.defineProperties:function(Se,xe){Pe(Se);for(var ge,ce=he(xe),ve=ce.length,de=0;ve>de;)be.f(Se,ge=ce[de++],xe[ge]);return Se}},{"./_an-object":61,"./_descriptors":69,"./_object-dp":98,"./_object-keys":106}],100:[function(me,Ie,Te){var be=me("./_object-pie"),Pe=me("./_property-desc"),he=me("./_to-iobject"),Se=me("./_to-primitive"),xe=me("./_has"),ge=me("./_ie8-dom-define"),ce=Object.getOwnPropertyDescriptor;Te.f=me("./_descriptors")?ce:function(ve,de){if(ve=he(ve),de=Se(de,!0),ge)try{return ce(ve,de)}catch(ue){}if(xe(ve,de))return Pe(!be.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,Ie,Te){var be=me("./_to-iobject"),Pe=me("./_object-gopn").f,he={}.toString,Se=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],xe=function(ge){try{return Pe(ge)}catch(ce){return Se.slice()}};Ie.exports.f=function(ge){return Se&&he.call(ge)=="[object Window]"?xe(ge):Pe(be(ge))}},{"./_object-gopn":102,"./_to-iobject":123}],102:[function(me,Ie,Te){var be=me("./_object-keys-internal"),Pe=me("./_enum-bug-keys").concat("length","prototype");Te.f=Object.getOwnPropertyNames||function(he){return be(he,Pe)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],103:[function(me,Ie,Te){Te.f=Object.getOwnPropertySymbols},{}],104:[function(me,Ie,Te){var be=me("./_has"),Pe=me("./_to-object"),he=me("./_shared-key")("IE_PROTO"),Se=Object.prototype;Ie.exports=Object.getPrototypeOf||function(xe){return xe=Pe(xe),be(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,Ie,Te){var be=me("./_has"),Pe=me("./_to-iobject"),he=me("./_array-includes")(!1),Se=me("./_shared-key")("IE_PROTO");Ie.exports=function(xe,ge){var ce,ve=Pe(xe),de=0,ue=[];for(ce in ve)ce!=Se&&be(ve,ce)&&ue.push(ce);for(;ge.length>de;)be(ve,ce=ge[de++])&&(~he(ue,ce)||ue.push(ce));return ue}},{"./_array-includes":62,"./_has":77,"./_shared-key":116,"./_to-iobject":123}],106:[function(me,Ie,Te){var be=me("./_object-keys-internal"),Pe=me("./_enum-bug-keys");Ie.exports=Object.keys||function(he){return be(he,Pe)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],107:[function(me,Ie,Te){Te.f={}.propertyIsEnumerable},{}],108:[function(me,Ie,Te){var be=me("./_export"),Pe=me("./_core"),he=me("./_fails");Ie.exports=function(Se,xe){var ge=(Pe.Object||{})[Se]||Object[Se],ce={};ce[Se]=xe(ge),be(be.S+be.F*he(function(){ge(1)}),"Object",ce)}},{"./_core":65,"./_export":73,"./_fails":74}],109:[function(me,Ie,Te){Ie.exports=function(be){try{return{e:!1,v:be()}}catch(Pe){return{e:!0,v:Pe}}}},{}],110:[function(me,Ie,Te){var be=me("./_an-object"),Pe=me("./_is-object"),he=me("./_new-promise-capability");Ie.exports=function(Se,xe){if(be(Se),Pe(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,Ie,Te){Ie.exports=function(be,Pe){return{enumerable:!(1&be),configurable:!(2&be),writable:!(4&be),value:Pe}}},{}],112:[function(me,Ie,Te){var be=me("./_hide");Ie.exports=function(Pe,he,Se){for(var xe in he)Se&&Pe[xe]?Pe[xe]=he[xe]:be(Pe,xe,he[xe]);return Pe}},{"./_hide":78}],113:[function(me,Ie,Te){Ie.exports=me("./_hide")},{"./_hide":78}],114:[function(me,Ie,Te){"use strict";var be=me("./_global"),Pe=me("./_core"),he=me("./_object-dp"),Se=me("./_descriptors"),xe=me("./_wks")("species");Ie.exports=function(ge){var ce=typeof Pe[ge]=="function"?Pe[ge]:be[ge];Se&&ce&&!ce[xe]&&he.f(ce,xe,{configurable:!0,get:function(){return this}})}},{"./_core":65,"./_descriptors":69,"./_global":76,"./_object-dp":98,"./_wks":131}],115:[function(me,Ie,Te){var be=me("./_object-dp").f,Pe=me("./_has"),he=me("./_wks")("toStringTag");Ie.exports=function(Se,xe,ge){Se&&!Pe(Se=ge?Se:Se.prototype,he)&&be(Se,he,{configurable:!0,value:xe})}},{"./_has":77,"./_object-dp":98,"./_wks":131}],116:[function(me,Ie,Te){var be=me("./_shared")("keys"),Pe=me("./_uid");Ie.exports=function(he){return be[he]||(be[he]=Pe(he))}},{"./_shared":117,"./_uid":127}],117:[function(me,Ie,Te){var be=me("./_core"),Pe=me("./_global"),he=Pe["__core-js_shared__"]||(Pe["__core-js_shared__"]={});(Ie.exports=function(Se,xe){return he[Se]||(he[Se]=xe!==void 0?xe:{})})("versions",[]).push({version:be.version,mode:me("./_library")?"pure":"global",copyright:"\u6F0F 2018 Denis Pushkarev (zloirock.ru)"})},{"./_core":65,"./_global":76,"./_library":92}],118:[function(me,Ie,Te){var be=me("./_an-object"),Pe=me("./_a-function"),he=me("./_wks")("species");Ie.exports=function(Se,xe){var ge,ce=be(Se).constructor;return ce===void 0||(ge=be(ce)[he])==null?xe:Pe(ge)}},{"./_a-function":58,"./_an-object":61,"./_wks":131}],119:[function(me,Ie,Te){var be=me("./_to-integer"),Pe=me("./_defined");Ie.exports=function(he){return function(Se,xe){var ge,ce,ve=String(Pe(Se)),de=be(xe),ue=ve.length;return de<0||de>=ue?he?"":void 0:(ge=ve.charCodeAt(de),ge<55296||ge>56319||de+1===ue||(ce=ve.charCodeAt(de+1))<56320||ce>57343?he?ve.charAt(de):ge:he?ve.slice(de,de+2):ce-56320+(ge-55296<<10)+65536)}}},{"./_defined":68,"./_to-integer":122}],120:[function(me,Ie,Te){var be,Pe,he,Se=me("./_ctx"),xe=me("./_invoke"),ge=me("./_html"),ce=me("./_dom-create"),ve=me("./_global"),de=ve.process,ue=ve.setImmediate,z=ve.clearImmediate,ee=ve.MessageChannel,oe=ve.Dispatch,ie=0,se={},le=function(){var we=+this;if(se.hasOwnProperty(we)){var Ce=se[we];delete se[we],Ce()}},ye=function(we){le.call(we.data)};ue&&z||(ue=function(we){for(var Ce=[],ke=1;arguments.length>ke;)Ce.push(arguments[ke++]);return se[++ie]=function(){xe(typeof we=="function"?we:Function(we),Ce)},be(ie),ie},z=function(we){delete se[we]},me("./_cof")(de)=="process"?be=function(we){de.nextTick(Se(le,we,1))}:oe&&oe.now?be=function(we){oe.now(Se(le,we,1))}:ee?(Pe=new ee,he=Pe.port2,Pe.port1.onmessage=ye,be=Se(he.postMessage,he,1)):ve.addEventListener&&typeof postMessage=="function"&&!ve.importScripts?(be=function(we){ve.postMessage(we+"","*")},ve.addEventListener("message",ye,!1)):be="onreadystatechange"in ce("script")?function(we){ge.appendChild(ce("script")).onreadystatechange=function(){ge.removeChild(this),le.call(we)}}:function(we){setTimeout(Se(le,we,1),0)}),Ie.exports={set:ue,clear:z}},{"./_cof":64,"./_ctx":67,"./_dom-create":70,"./_global":76,"./_html":79,"./_invoke":81}],121:[function(me,Ie,Te){var be=me("./_to-integer"),Pe=Math.max,he=Math.min;Ie.exports=function(Se,xe){return Se=be(Se),Se<0?Pe(Se+xe,0):he(Se,xe)}},{"./_to-integer":122}],122:[function(me,Ie,Te){var be=Math.ceil,Pe=Math.floor;Ie.exports=function(he){return isNaN(he=+he)?0:(he>0?Pe:be)(he)}},{}],123:[function(me,Ie,Te){var be=me("./_iobject"),Pe=me("./_defined");Ie.exports=function(he){return be(Pe(he))}},{"./_defined":68,"./_iobject":82}],124:[function(me,Ie,Te){var be=me("./_to-integer"),Pe=Math.min;Ie.exports=function(he){return he>0?Pe(be(he),9007199254740991):0}},{"./_to-integer":122}],125:[function(me,Ie,Te){var be=me("./_defined");Ie.exports=function(Pe){return Object(be(Pe))}},{"./_defined":68}],126:[function(me,Ie,Te){var be=me("./_is-object");Ie.exports=function(Pe,he){if(!be(Pe))return Pe;var Se,xe;if(he&&typeof(Se=Pe.toString)=="function"&&!be(xe=Se.call(Pe))||typeof(Se=Pe.valueOf)=="function"&&!be(xe=Se.call(Pe))||!he&&typeof(Se=Pe.toString)=="function"&&!be(xe=Se.call(Pe)))return xe;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":85}],127:[function(me,Ie,Te){var be=0,Pe=Math.random();Ie.exports=function(he){return"Symbol(".concat(he===void 0?"":he,")_",(++be+Pe).toString(36))}},{}],128:[function(me,Ie,Te){var be=me("./_global"),Pe=be.navigator;Ie.exports=Pe&&Pe.userAgent||""},{"./_global":76}],129:[function(me,Ie,Te){var be=me("./_global"),Pe=me("./_core"),he=me("./_library"),Se=me("./_wks-ext"),xe=me("./_object-dp").f;Ie.exports=function(ge){var ce=Pe.Symbol||(Pe.Symbol=he?{}:be.Symbol||{});ge.charAt(0)=="_"||ge in ce||xe(ce,ge,{value:Se.f(ge)})}},{"./_core":65,"./_global":76,"./_library":92,"./_object-dp":98,"./_wks-ext":130}],130:[function(me,Ie,Te){Te.f=me("./_wks")},{"./_wks":131}],131:[function(me,Ie,Te){var be=me("./_shared")("wks"),Pe=me("./_uid"),he=me("./_global").Symbol,Se=typeof he=="function";(Ie.exports=function(xe){return be[xe]||(be[xe]=Se&&he[xe]||(Se?he:Pe)("Symbol."+xe))}).store=be},{"./_global":76,"./_shared":117,"./_uid":127}],132:[function(me,Ie,Te){var be=me("./_classof"),Pe=me("./_wks")("iterator"),he=me("./_iterators");Ie.exports=me("./_core").getIteratorMethod=function(Se){if(Se!=null)return Se[Pe]||Se["@@iterator"]||he[be(Se)]}},{"./_classof":63,"./_core":65,"./_iterators":91,"./_wks":131}],133:[function(me,Ie,Te){"use strict";var be=me("./_ctx"),Pe=me("./_export"),he=me("./_to-object"),Se=me("./_iter-call"),xe=me("./_is-array-iter"),ge=me("./_to-length"),ce=me("./_create-property"),ve=me("./core.get-iterator-method");Pe(Pe.S+Pe.F*!me("./_iter-detect")(function(de){Array.from(de)}),"Array",{from:function(de){var ue,z,ee,oe,ie=he(de),se=typeof this=="function"?this:Array,le=arguments.length,ye=le>1?arguments[1]:void 0,we=ye!==void 0,Ce=0,ke=ve(ie);if(we&&(ye=be(ye,le>2?arguments[2]:void 0,2)),ke==null||se==Array&&xe(ke))for(ue=ge(ie.length),z=new se(ue);ue>Ce;Ce++)ce(z,Ce,we?ye(ie[Ce],Ce):ie[Ce]);else for(oe=ke.call(ie),z=new se;!(ee=oe.next()).done;Ce++)ce(z,Ce,we?Se(oe,ye,[ee.value,Ce],!0):ee.value);return z.length=Ce,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,Ie,Te){"use strict";var be=me("./_add-to-unscopables"),Pe=me("./_iter-step"),he=me("./_iterators"),Se=me("./_to-iobject");Ie.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,ce=this._i++;return!xe||ce>=xe.length?(this._t=void 0,Pe(1)):ge=="keys"?Pe(0,ce):ge=="values"?Pe(0,xe[ce]):Pe(0,[ce,xe[ce]])},"values"),he.Arguments=he.Array,be("keys"),be("values"),be("entries")},{"./_add-to-unscopables":59,"./_iter-define":88,"./_iter-step":90,"./_iterators":91,"./_to-iobject":123}],135:[function(me,Ie,Te){"use strict";var be=me("./_is-object"),Pe=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"||!be(xe))return!1;if(!be(this.prototype))return xe instanceof this;for(;xe=Pe(xe);)if(this.prototype===xe)return!0;return!1}})},{"./_is-object":85,"./_object-dp":98,"./_object-gpo":104,"./_wks":131}],136:[function(me,Ie,Te){var be=me("./_export");be(be.S+be.F,"Object",{assign:me("./_object-assign")})},{"./_export":73,"./_object-assign":96}],137:[function(me,Ie,Te){var be=me("./_export");be(be.S,"Object",{create:me("./_object-create")})},{"./_export":73,"./_object-create":97}],138:[function(me,Ie,Te){var be=me("./_export");be(be.S+be.F*!me("./_descriptors"),"Object",{defineProperty:me("./_object-dp").f})},{"./_descriptors":69,"./_export":73,"./_object-dp":98}],139:[function(me,Ie,Te){me("./_object-sap")("getOwnPropertyNames",function(){return me("./_object-gopn-ext").f})},{"./_object-gopn-ext":101,"./_object-sap":108}],140:[function(me,Ie,Te){var be=me("./_to-object"),Pe=me("./_object-gpo");me("./_object-sap")("getPrototypeOf",function(){return function(he){return Pe(be(he))}})},{"./_object-gpo":104,"./_object-sap":108,"./_to-object":125}],141:[function(me,Ie,Te){var be=me("./_to-object"),Pe=me("./_object-keys");me("./_object-sap")("keys",function(){return function(he){return Pe(be(he))}})},{"./_object-keys":106,"./_object-sap":108,"./_to-object":125}],142:[function(me,Ie,Te){arguments[4][36][0].apply(Te,arguments)},{dup:36}],143:[function(me,Ie,Te){"use strict";var be,Pe,he,Se,xe=me("./_library"),ge=me("./_global"),ce=me("./_ctx"),ve=me("./_classof"),de=me("./_export"),ue=me("./_is-object"),z=me("./_a-function"),ee=me("./_an-instance"),oe=me("./_for-of"),ie=me("./_species-constructor"),se=me("./_task").set,le=me("./_microtask")(),ye=me("./_new-promise-capability"),we=me("./_perform"),Ce=me("./_user-agent"),ke=me("./_promise-resolve"),Ne=ge.TypeError,je=ge.process,Ve=je&&je.versions,Qe=Ve&&Ve.v8||"",Ge=ge.Promise,mt=ve(je)=="process",ct=function(){},Ct=Pe=ye.f,it=!!function(){try{var _t=Ge.resolve(1),vt=(_t.constructor={})[me("./_wks")("species")]=function(Bt){Bt(ct,ct)};return(mt||typeof PromiseRejectionEvent=="function")&&_t.then(ct)instanceof vt&&Qe.indexOf("6.6")!==0&&Ce.indexOf("Chrome/66")===-1}catch(Bt){}}(),St=function(_t){var vt;return!(!ue(_t)||typeof(vt=_t.then)!="function")&&vt},ut=function(_t,vt){if(!_t._n){_t._n=!0;var Bt=_t._c;le(function(){for(var jt=_t._v,un=_t._s==1,Kt=0;Bt.length>Kt;)(function(xn){var Ut,Wt,$t,ft=un?xn.ok:xn.fail,We=xn.resolve,Be=xn.reject,qe=xn.domain;try{ft?(un||(_t._h==2&&rt(_t),_t._h=1),ft===!0?Ut=jt:(qe&&qe.enter(),Ut=ft(jt),qe&&(qe.exit(),$t=!0)),Ut===xn.promise?Be(Ne("Promise-chain cycle")):(Wt=St(Ut))?Wt.call(Ut,We,Be):We(Ut)):Be(jt)}catch(et){qe&&!$t&&qe.exit(),Be(et)}})(Bt[Kt++]);_t._c=[],_t._n=!1,vt&&!_t._h&&Ft(_t)})}},Ft=function(_t){se.call(ge,function(){var vt,Bt,jt,un=_t._v,Kt=ht(_t);if(Kt&&(vt=we(function(){mt?je.emit("unhandledRejection",un,_t):(Bt=ge.onunhandledrejection)?Bt({promise:_t,reason:un}):(jt=ge.console)&&jt.error&&jt.error("Unhandled promise rejection",un)}),_t._h=mt||ht(_t)?2:1),_t._a=void 0,Kt&&vt.e)throw vt.v})},ht=function(_t){return _t._h!==1&&(_t._a||_t._c).length===0},rt=function(_t){se.call(ge,function(){var vt;mt?je.emit("rejectionHandled",_t):(vt=ge.onrejectionhandled)&&vt({promise:_t,reason:_t._v})})},dt=function(_t){var vt=this;vt._d||(vt._d=!0,vt=vt._w||vt,vt._v=_t,vt._s=2,vt._a||(vt._a=vt._c.slice()),ut(vt,!0))},yt=function(_t){var vt,Bt=this;if(!Bt._d){Bt._d=!0,Bt=Bt._w||Bt;try{if(Bt===_t)throw Ne("Promise can't be resolved itself");(vt=St(_t))?le(function(){var jt={_w:Bt,_d:!1};try{vt.call(_t,ce(yt,jt,1),ce(dt,jt,1))}catch(un){dt.call(jt,un)}}):(Bt._v=_t,Bt._s=1,ut(Bt,!1))}catch(jt){dt.call({_w:Bt,_d:!1},jt)}}};it||(Ge=function(_t){ee(this,Ge,"Promise","_h"),z(_t),be.call(this);try{_t(ce(yt,this,1),ce(dt,this,1))}catch(vt){dt.call(this,vt)}},be=function(_t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},be.prototype=me("./_redefine-all")(Ge.prototype,{then:function(_t,vt){var Bt=Ct(ie(this,Ge));return Bt.ok=typeof _t!="function"||_t,Bt.fail=typeof vt=="function"&&vt,Bt.domain=mt?je.domain:void 0,this._c.push(Bt),this._a&&this._a.push(Bt),this._s&&ut(this,!1),Bt.promise},catch:function(_t){return this.then(void 0,_t)}}),he=function(){var _t=new be;this.promise=_t,this.resolve=ce(yt,_t,1),this.reject=ce(dt,_t,1)},ye.f=Ct=function(_t){return _t===Ge||_t===Se?new he(_t):Pe(_t)}),de(de.G+de.W+de.F*!it,{Promise:Ge}),me("./_set-to-string-tag")(Ge,"Promise"),me("./_set-species")("Promise"),Se=me("./_core").Promise,de(de.S+de.F*!it,"Promise",{reject:function(_t){var vt=Ct(this);return(0,vt.reject)(_t),vt.promise}}),de(de.S+de.F*(xe||!it),"Promise",{resolve:function(_t){return ke(xe&&this===Se?Ge:this,_t)}}),de(de.S+de.F*!(it&&me("./_iter-detect")(function(_t){Ge.all(_t).catch(ct)})),"Promise",{all:function(_t){var vt=this,Bt=Ct(vt),jt=Bt.resolve,un=Bt.reject,Kt=we(function(){var xn=[],Ut=0,Wt=1;oe(_t,!1,function($t){var ft=Ut++,We=!1;xn.push(void 0),Wt++,vt.resolve($t).then(function(Be){We||(We=!0,xn[ft]=Be,--Wt||jt(xn))},un)}),--Wt||jt(xn)});return Kt.e&&un(Kt.v),Bt.promise},race:function(_t){var vt=this,Bt=Ct(vt),jt=Bt.reject,un=we(function(){oe(_t,!1,function(Kt){vt.resolve(Kt).then(Bt.resolve,jt)})});return un.e&&jt(un.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,Ie,Te){var be=me("./_export"),Pe=me("./_to-absolute-index"),he=String.fromCharCode,Se=String.fromCodePoint;be(be.S+be.F*(!!Se&&Se.length!=1),"String",{fromCodePoint:function(xe){for(var ge,ce=[],ve=arguments.length,de=0;ve>de;){if(ge=+arguments[de++],Pe(ge,1114111)!==ge)throw RangeError(ge+" is not a valid code point");ce.push(ge<65536?he(ge):he(55296+((ge-=65536)>>10),ge%1024+56320))}return ce.join("")}})},{"./_export":73,"./_to-absolute-index":121}],145:[function(me,Ie,Te){"use strict";var be=me("./_string-at")(!0);me("./_iter-define")(String,"String",function(Pe){this._t=String(Pe),this._i=0},function(){var Pe,he=this._t,Se=this._i;return Se>=he.length?{value:void 0,done:!0}:(Pe=be(he,Se),this._i+=Pe.length,{value:Pe,done:!1})})},{"./_iter-define":88,"./_string-at":119}],146:[function(me,Ie,Te){"use strict";var be=me("./_global"),Pe=me("./_has"),he=me("./_descriptors"),Se=me("./_export"),xe=me("./_redefine"),ge=me("./_meta").KEY,ce=me("./_fails"),ve=me("./_shared"),de=me("./_set-to-string-tag"),ue=me("./_uid"),z=me("./_wks"),ee=me("./_wks-ext"),oe=me("./_wks-define"),ie=me("./_enum-keys"),se=me("./_is-array"),le=me("./_an-object"),ye=me("./_is-object"),we=me("./_to-iobject"),Ce=me("./_to-primitive"),ke=me("./_property-desc"),Ne=me("./_object-create"),je=me("./_object-gopn-ext"),Ve=me("./_object-gopd"),Qe=me("./_object-dp"),Ge=me("./_object-keys"),mt=Ve.f,ct=Qe.f,Ct=je.f,it=be.Symbol,St=be.JSON,ut=St&&St.stringify,Ft=z("_hidden"),ht=z("toPrimitive"),rt={}.propertyIsEnumerable,dt=ve("symbol-registry"),yt=ve("symbols"),_t=ve("op-symbols"),vt=Object.prototype,Bt=typeof it=="function",jt=be.QObject,un=!jt||!jt.prototype||!jt.prototype.findChild,Kt=he&&ce(function(){return Ne(ct({},"a",{get:function(){return ct(this,"a",{value:7}).a}})).a!=7})?function(Ue,Ke,Ze){var lt=mt(vt,Ke);lt&&delete vt[Ke],ct(Ue,Ke,Ze),lt&&Ue!==vt&&ct(vt,Ke,lt)}:ct,xn=function(Ue){var Ke=yt[Ue]=Ne(it.prototype);return Ke._k=Ue,Ke},Ut=Bt&&typeof it.iterator=="symbol"?function(Ue){return typeof Ue=="symbol"}:function(Ue){return Ue instanceof it},Wt=function(Ue,Ke,Ze){return Ue===vt&&Wt(_t,Ke,Ze),le(Ue),Ke=Ce(Ke,!0),le(Ze),Pe(yt,Ke)?(Ze.enumerable?(Pe(Ue,Ft)&&Ue[Ft][Ke]&&(Ue[Ft][Ke]=!1),Ze=Ne(Ze,{enumerable:ke(0,!1)})):(Pe(Ue,Ft)||ct(Ue,Ft,ke(1,{})),Ue[Ft][Ke]=!0),Kt(Ue,Ke,Ze)):ct(Ue,Ke,Ze)},$t=function(Ue,Ke){le(Ue);for(var Ze,lt=ie(Ke=we(Ke)),xt=0,tn=lt.length;tn>xt;)Wt(Ue,Ze=lt[xt++],Ke[Ze]);return Ue},ft=function(Ue,Ke){return Ke===void 0?Ne(Ue):$t(Ne(Ue),Ke)},We=function(Ue){var Ke=rt.call(this,Ue=Ce(Ue,!0));return!(this===vt&&Pe(yt,Ue)&&!Pe(_t,Ue))&&(!(Ke||!Pe(this,Ue)||!Pe(yt,Ue)||Pe(this,Ft)&&this[Ft][Ue])||Ke)},Be=function(Ue,Ke){if(Ue=we(Ue),Ke=Ce(Ke,!0),Ue!==vt||!Pe(yt,Ke)||Pe(_t,Ke)){var Ze=mt(Ue,Ke);return!Ze||!Pe(yt,Ke)||Pe(Ue,Ft)&&Ue[Ft][Ke]||(Ze.enumerable=!0),Ze}},qe=function(Ue){for(var Ke,Ze=Ct(we(Ue)),lt=[],xt=0;Ze.length>xt;)Pe(yt,Ke=Ze[xt++])||Ke==Ft||Ke==ge||lt.push(Ke);return lt},et=function(Ue){for(var Ke,Ze=Ue===vt,lt=Ct(Ze?_t:we(Ue)),xt=[],tn=0;lt.length>tn;)!Pe(yt,Ke=lt[tn++])||Ze&&!Pe(vt,Ke)||xt.push(yt[Ke]);return xt};Bt||(it=function(){if(this instanceof it)throw TypeError("Symbol is not a constructor!");var Ue=ue(arguments.length>0?arguments[0]:void 0),Ke=function(Ze){this===vt&&Ke.call(_t,Ze),Pe(this,Ft)&&Pe(this[Ft],Ue)&&(this[Ft][Ue]=!1),Kt(this,Ue,ke(1,Ze))};return he&&un&&Kt(vt,Ue,{configurable:!0,set:Ke}),xn(Ue)},xe(it.prototype,"toString",function(){return this._k}),Ve.f=Be,Qe.f=Wt,me("./_object-gopn").f=je.f=qe,me("./_object-pie").f=We,me("./_object-gops").f=et,he&&!me("./_library")&&xe(vt,"propertyIsEnumerable",We,!0),ee.f=function(Ue){return xn(z(Ue))}),Se(Se.G+Se.W+Se.F*!Bt,{Symbol:it});for(var He="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Xe=0;He.length>Xe;)z(He[Xe++]);for(var Re=Ge(z.store),Ae=0;Re.length>Ae;)oe(Re[Ae++]);Se(Se.S+Se.F*!Bt,"Symbol",{for:function(Ue){return Pe(dt,Ue+="")?dt[Ue]:dt[Ue]=it(Ue)},keyFor:function(Ue){if(!Ut(Ue))throw TypeError(Ue+" is not a symbol!");for(var Ke in dt)if(dt[Ke]===Ue)return Ke},useSetter:function(){un=!0},useSimple:function(){un=!1}}),Se(Se.S+Se.F*!Bt,"Object",{create:ft,defineProperty:Wt,defineProperties:$t,getOwnPropertyDescriptor:Be,getOwnPropertyNames:qe,getOwnPropertySymbols:et}),St&&Se(Se.S+Se.F*(!Bt||ce(function(){var Ue=it();return ut([Ue])!="[null]"||ut({a:Ue})!="{}"||ut(Object(Ue))!="{}"})),"JSON",{stringify:function(Ue){for(var Ke,Ze,lt=[Ue],xt=1;arguments.length>xt;)lt.push(arguments[xt++]);if(Ze=Ke=lt[1],(ye(Ke)||Ue!==void 0)&&!Ut(Ue))return se(Ke)||(Ke=function(tn,en){if(typeof Ze=="function"&&(en=Ze.call(this,tn,en)),!Ut(en))return en}),lt[1]=Ke,ut.apply(St,lt)}}),it.prototype[ht]||me("./_hide")(it.prototype,ht,it.prototype.valueOf),de(it,"Symbol"),de(Math,"Math",!0),de(be.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,Ie,Te){"use strict";var be=me("./_export"),Pe=me("./_core"),he=me("./_global"),Se=me("./_species-constructor"),xe=me("./_promise-resolve");be(be.P+be.R,"Promise",{finally:function(ge){var ce=Se(this,Pe.Promise||he.Promise),ve=typeof ge=="function";return this.then(ve?function(de){return xe(ce,ge()).then(function(){return de})}:ge,ve?function(de){return xe(ce,ge()).then(function(){throw de})}:ge)}})},{"./_core":65,"./_export":73,"./_global":76,"./_promise-resolve":110,"./_species-constructor":118}],148:[function(me,Ie,Te){"use strict";var be=me("./_export"),Pe=me("./_new-promise-capability"),he=me("./_perform");be(be.S,"Promise",{try:function(Se){var xe=Pe.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,Ie,Te){me("./_wks-define")("asyncIterator")},{"./_wks-define":129}],150:[function(me,Ie,Te){me("./_wks-define")("observable")},{"./_wks-define":129}],151:[function(me,Ie,Te){me("./es6.array.iterator");for(var be=me("./_global"),Pe=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 ce=xe[ge],ve=be[ce],de=ve&&ve.prototype;de&&!de[Se]&&Pe(de,Se,ce),he[ce]=he.Array}},{"./_global":76,"./_hide":78,"./_iterators":91,"./_wks":131,"./es6.array.iterator":134}],152:[function(me,Ie,Te){var be=me("./_export"),Pe=me("./_task");be(be.G+be.B,{setImmediate:Pe.set,clearImmediate:Pe.clear})},{"./_export":73,"./_task":120}],153:[function(me,Ie,Te){(function(be){"use strict";function Pe(Ce){return Array.isArray?Array.isArray(Ce):le(Ce)==="[object Array]"}function he(Ce){return typeof Ce=="boolean"}function Se(Ce){return Ce===null}function xe(Ce){return Ce==null}function ge(Ce){return typeof Ce=="number"}function ce(Ce){return typeof Ce=="string"}function ve(Ce){return(Ce===void 0?"undefined":(0,we.default)(Ce))==="symbol"}function de(Ce){return Ce===void 0}function ue(Ce){return le(Ce)==="[object RegExp]"}function z(Ce){return(Ce===void 0?"undefined":(0,we.default)(Ce))==="object"&&Ce!==null}function ee(Ce){return le(Ce)==="[object Date]"}function oe(Ce){return le(Ce)==="[object Error]"||Ce instanceof Error}function ie(Ce){return typeof Ce=="function"}function se(Ce){return Ce===null||typeof Ce=="boolean"||typeof Ce=="number"||typeof Ce=="string"||(Ce===void 0?"undefined":(0,we.default)(Ce))==="symbol"||Ce===void 0}function le(Ce){return Object.prototype.toString.call(Ce)}var ye=me("babel-runtime/helpers/typeof"),we=function(Ce){return Ce&&Ce.__esModule?Ce:{default:Ce}}(ye);Te.isArray=Pe,Te.isBoolean=he,Te.isNull=Se,Te.isNullOrUndefined=xe,Te.isNumber=ge,Te.isString=ce,Te.isSymbol=ve,Te.isUndefined=de,Te.isRegExp=ue,Te.isObject=z,Te.isDate=ee,Te.isError=oe,Te.isFunction=ie,Te.isPrimitive=se,Te.isBuffer=be.isBuffer}).call(this,{isBuffer:me("../../is-buffer/index.js")})},{"../../is-buffer/index.js":163,"babel-runtime/helpers/typeof":32}],154:[function(me,Ie,Te){"use strict";var be=me("babel-runtime/helpers/typeof"),Pe=function(he){return he&&he.__esModule?he:{default:he}}(be);(function(he){function Se(de,ue){for(de=String(de),ue=ue||2;de.length<ue;)de="0"+de;return de}function xe(de){var ue=new Date(de.getFullYear(),de.getMonth(),de.getDate());ue.setDate(ue.getDate()-(ue.getDay()+6)%7+3);var z=new Date(ue.getFullYear(),0,4);z.setDate(z.getDate()-(z.getDay()+6)%7+3);var ee=ue.getTimezoneOffset()-z.getTimezoneOffset();ue.setHours(ue.getHours()-ee);var oe=(ue-z)/6048e5;return 1+Math.floor(oe)}function ge(de){var ue=de.getDay();return ue===0&&(ue=7),ue}function ce(de){return de===null?"null":de===void 0?"undefined":(de===void 0?"undefined":(0,Pe.default)(de))!=="object"?de===void 0?"undefined":(0,Pe.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,ue=/\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||ce(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 le=oe.slice(0,4);le!=="UTC:"&&le!=="GMT:"||(oe=oe.slice(4),ie=!0,le==="GMT:"&&(se=!0));var ye=ie?"getUTC":"get",we=ee[ye+"Date"](),Ce=ee[ye+"Day"](),ke=ee[ye+"Month"](),Ne=ee[ye+"FullYear"](),je=ee[ye+"Hours"](),Ve=ee[ye+"Minutes"](),Qe=ee[ye+"Seconds"](),Ge=ee[ye+"Milliseconds"](),mt=ie?0:ee.getTimezoneOffset(),ct=xe(ee),Ct=ge(ee),it={d:we,dd:Se(we),ddd:ve.i18n.dayNames[Ce],dddd:ve.i18n.dayNames[Ce+7],m:ke+1,mm:Se(ke+1),mmm:ve.i18n.monthNames[ke],mmmm:ve.i18n.monthNames[ke+12],yy:String(Ne).slice(2),yyyy:Ne,h:je%12||12,hh:Se(je%12||12),H:je,HH:Se(je),M:Ve,MM:Se(Ve),s:Qe,ss:Se(Qe),l:Se(Ge,3),L:Se(Math.round(Ge/10)),t:je<12?"a":"p",tt:je<12?"am":"pm",T:je<12?"A":"P",TT:je<12?"AM":"PM",Z:se?"GMT":ie?"UTC":(String(ee).match(ue)||[""]).pop().replace(z,""),o:(mt>0?"-":"+")+Se(100*Math.floor(Math.abs(mt)/60)+Math.abs(mt)%60,4),S:["th","st","nd","rd"][we%10>3?0:(we%100-we%10!=10)*we%10],W:ct,N:Ct};return oe.replace(de,function(St){return St in it?it[St]:St.slice(1,St.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 Le=="function"&&Le.amd?Le(function(){return ve}):(Te===void 0?"undefined":(0,Pe.default)(Te))==="object"?Ie.exports=ve:he.dateFormat=ve})(void 0)},{"babel-runtime/helpers/typeof":32}],155:[function(me,Ie,Te){(function(be){function Pe(){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(ce){var ve=this.useColors;if(ce[0]=(ve?"%c":"")+this.namespace+(ve?" %c":" ")+ce[0]+(ve?"%c ":" ")+"+"+Te.humanize(this.diff),ve){var de="color: "+this.color;ce.splice(1,0,de,"color: inherit");var ue=0,z=0;ce[0].replace(/%[a-zA-Z%]/g,function(ee){ee!=="%%"&&(ue++,ee==="%c"&&(z=ue))}),ce.splice(z,0,de)}}function Se(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function xe(ce){try{ce==null?Te.storage.removeItem("debug"):Te.storage.debug=ce}catch(ve){}}function ge(){var ce;try{ce=Te.storage.debug}catch(ve){}return!ce&&be!==void 0&&"env"in be&&(ce=be.env.DEBUG),ce}Te=Ie.exports=me("./debug"),Te.log=Se,Te.formatArgs=he,Te.save=xe,Te.load=ge,Te.useColors=Pe,Te.storage=typeof chrome!="undefined"&&chrome.storage!==void 0?chrome.storage.local:function(){try{return window.localStorage}catch(ce){}}(),Te.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],Te.formatters.j=function(ce){try{return JSON.stringify(ce)}catch(ve){return"[UnexpectedJSONParseError]: "+ve.message}},Te.enable(ge())}).call(this,me("_process"))},{"./debug":156,_process:173}],156:[function(me,Ie,Te){function be(ve){var de,ue=0;for(de in ve)ue=(ue<<5)-ue+ve.charCodeAt(de),ue|=0;return Te.colors[Math.abs(ue)%Te.colors.length]}function Pe(ve){function de(){if(de.enabled){var ue=de,z=+new Date,ee=z-(ce||z);ue.diff=ee,ue.prev=ce,ue.curr=z,ce=z;for(var oe=new Array(arguments.length),ie=0;ie<oe.length;ie++)oe[ie]=arguments[ie];oe[0]=Te.coerce(oe[0]),typeof oe[0]!="string"&&oe.unshift("%O");var se=0;oe[0]=oe[0].replace(/%([a-zA-Z%])/g,function(le,ye){if(le==="%%")return le;se++;var we=Te.formatters[ye];if(typeof we=="function"){var Ce=oe[se];le=we.call(ue,Ce),oe.splice(se,1),se--}return le}),Te.formatArgs.call(ue,oe),(de.log||Te.log||console.log.bind(console)).apply(ue,oe)}}return de.namespace=ve,de.enabled=Te.enabled(ve),de.useColors=Te.useColors(),de.color=be(ve),typeof Te.init=="function"&&Te.init(de),de}function he(ve){Te.save(ve),Te.names=[],Te.skips=[];for(var de=(typeof ve=="string"?ve:"").split(/[\s,]+/),ue=de.length,z=0;z<ue;z++)de[z]&&(ve=de[z].replace(/\*/g,".*?"),ve[0]==="-"?Te.skips.push(new RegExp("^"+ve.substr(1)+"$")):Te.names.push(new RegExp("^"+ve+"$")))}function Se(){Te.enable("")}function xe(ve){var de,ue;for(de=0,ue=Te.skips.length;de<ue;de++)if(Te.skips[de].test(ve))return!1;for(de=0,ue=Te.names.length;de<ue;de++)if(Te.names[de].test(ve))return!0;return!1}function ge(ve){return ve instanceof Error?ve.stack||ve.message:ve}Te=Ie.exports=Pe.debug=Pe.default=Pe,Te.coerce=ge,Te.disable=Se,Te.enable=he,Te.enabled=xe,Te.humanize=me("ms"),Te.names=[],Te.skips=[],Te.formatters={};var ce},{ms:169}],157:[function(me,Ie,Te){"use strict";function be(he){var Se=""+he,xe=Pe.exec(Se);if(!xe)return Se;var ge,ce="",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&&(ce+=Se.substring(de,ve)),de=ve+1,ce+=ge}return de!==ve?ce+Se.substring(de,ve):ce}var Pe=/["'&<>]/;Ie.exports=be},{}],158:[function(me,Ie,Te){function be(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function Pe(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}Ie.exports=be,be.EventEmitter=be,be.prototype._events=void 0,be.prototype._maxListeners=void 0,be.defaultMaxListeners=10,be.prototype.setMaxListeners=function(ge){if(!he(ge)||ge<0||isNaN(ge))throw TypeError("n must be a positive number");return this._maxListeners=ge,this},be.prototype.emit=function(ge){var ce,ve,de,ue,z,ee;if(this._events||(this._events={}),ge==="error"&&(!this._events.error||Se(this._events.error)&&!this._events.error.length)){if((ce=arguments[1])instanceof Error)throw ce;var oe=new Error('Uncaught, unspecified "error" event. ('+ce+")");throw oe.context=ce,oe}if(ve=this._events[ge],xe(ve))return!1;if(Pe(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:ue=Array.prototype.slice.call(arguments,1),ve.apply(this,ue)}else if(Se(ve))for(ue=Array.prototype.slice.call(arguments,1),ee=ve.slice(),de=ee.length,z=0;z<de;z++)ee[z].apply(this,ue);return!0},be.prototype.addListener=function(ge,ce){var ve;if(!Pe(ce))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",ge,Pe(ce.listener)?ce.listener:ce),this._events[ge]?Se(this._events[ge])?this._events[ge].push(ce):this._events[ge]=[this._events[ge],ce]:this._events[ge]=ce,Se(this._events[ge])&&!this._events[ge].warned&&(ve=xe(this._maxListeners)?be.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},be.prototype.on=be.prototype.addListener,be.prototype.once=function(ge,ce){function ve(){this.removeListener(ge,ve),de||(de=!0,ce.apply(this,arguments))}if(!Pe(ce))throw TypeError("listener must be a function");var de=!1;return ve.listener=ce,this.on(ge,ve),this},be.prototype.removeListener=function(ge,ce){var ve,de,ue,z;if(!Pe(ce))throw TypeError("listener must be a function");if(!this._events||!this._events[ge])return this;if(ve=this._events[ge],ue=ve.length,de=-1,ve===ce||Pe(ve.listener)&&ve.listener===ce)delete this._events[ge],this._events.removeListener&&this.emit("removeListener",ge,ce);else if(Se(ve)){for(z=ue;z-- >0;)if(ve[z]===ce||ve[z].listener&&ve[z].listener===ce){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,ce)}return this},be.prototype.removeAllListeners=function(ge){var ce,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(ce in this._events)ce!=="removeListener"&&this.removeAllListeners(ce);return this.removeAllListeners("removeListener"),this._events={},this}if(ve=this._events[ge],Pe(ve))this.removeListener(ge,ve);else if(ve)for(;ve.length;)this.removeListener(ge,ve[ve.length-1]);return delete this._events[ge],this},be.prototype.listeners=function(ge){return this._events&&this._events[ge]?Pe(this._events[ge])?[this._events[ge]]:this._events[ge].slice():[]},be.prototype.listenerCount=function(ge){if(this._events){var ce=this._events[ge];if(Pe(ce))return 1;if(ce)return ce.length}return 0},be.listenerCount=function(ge,ce){return ge.listenerCount(ce)}},{}],159:[function(me,Ie,Te){var be=me("http"),Pe=Ie.exports;for(var he in be)be.hasOwnProperty(he)&&(Pe[he]=be[he]);Pe.request=function(Se,xe){return Se||(Se={}),Se.scheme="https",Se.protocol="https:",be.request.call(this,Se,xe)}},{http:196}],160:[function(me,Ie,Te){"use strict";var be=me("util"),Pe=me("ms");Ie.exports=function(he){if(typeof he=="number")return he;var Se=Pe(he);if(Se===void 0){var xe=new Error(be.format("humanize-ms(%j) result undefined",he));console.warn(xe.stack)}return Se}},{ms:169,util:207}],161:[function(me,Ie,Te){Te.read=function(be,Pe,he,Se,xe){var ge,ce,ve=8*xe-Se-1,de=(1<<ve)-1,ue=de>>1,z=-7,ee=he?xe-1:0,oe=he?-1:1,ie=be[Pe+ee];for(ee+=oe,ge=ie&(1<<-z)-1,ie>>=-z,z+=ve;z>0;ge=256*ge+be[Pe+ee],ee+=oe,z-=8);for(ce=ge&(1<<-z)-1,ge>>=-z,z+=Se;z>0;ce=256*ce+be[Pe+ee],ee+=oe,z-=8);if(ge===0)ge=1-ue;else{if(ge===de)return ce?NaN:1/0*(ie?-1:1);ce+=Math.pow(2,Se),ge-=ue}return(ie?-1:1)*ce*Math.pow(2,ge-Se)},Te.write=function(be,Pe,he,Se,xe,ge){var ce,ve,de,ue=8*ge-xe-1,z=(1<<ue)-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,le=Pe<0||Pe===0&&1/Pe<0?1:0;for(Pe=Math.abs(Pe),isNaN(Pe)||Pe===1/0?(ve=isNaN(Pe)?1:0,ce=z):(ce=Math.floor(Math.log(Pe)/Math.LN2),Pe*(de=Math.pow(2,-ce))<1&&(ce--,de*=2),Pe+=ce+ee>=1?oe/de:oe*Math.pow(2,1-ee),Pe*de>=2&&(ce++,de/=2),ce+ee>=z?(ve=0,ce=z):ce+ee>=1?(ve=(Pe*de-1)*Math.pow(2,xe),ce+=ee):(ve=Pe*Math.pow(2,ee-1)*Math.pow(2,xe),ce=0));xe>=8;be[he+ie]=255&ve,ie+=se,ve/=256,xe-=8);for(ce=ce<<xe|ve,ue+=xe;ue>0;be[he+ie]=255&ce,ie+=se,ce/=256,ue-=8);be[he+ie-se]|=128*le}},{}],162:[function(me,Ie,Te){typeof Object.create=="function"?Ie.exports=function(be,Pe){be.super_=Pe,be.prototype=Object.create(Pe.prototype,{constructor:{value:be,enumerable:!1,writable:!0,configurable:!0}})}:Ie.exports=function(be,Pe){be.super_=Pe;var he=function(){};he.prototype=Pe.prototype,be.prototype=new he,be.prototype.constructor=be}},{}],163:[function(me,Ie,Te){function be(he){return!!he.constructor&&typeof he.constructor.isBuffer=="function"&&he.constructor.isBuffer(he)}function Pe(he){return typeof he.readFloatLE=="function"&&typeof he.slice=="function"&&be(he.slice(0,0))}Ie.exports=function(he){return he!=null&&(be(he)||Pe(he)||!!he._isBuffer)}},{}],164:[function(me,Ie,Te){(function(be){function Pe(xe){return Se.call(xe).replace(/^[^{]*{\s*/,"").replace(/\s*}[^}]*$/,"")}function he(xe){return typeof xe=="function"&&(/^class(\s|\{\}$)/.test(Se.call(xe))||/^.*classCallCheck\(/.test(Pe(xe)))}var Se=Function.prototype.toString;Te!==void 0?(Ie!==void 0&&Ie.exports&&(Te=Ie.exports=he),Te.isClass=he):typeof Le=="function"&&Le.amd?Le([],function(){return he}):be.isClass=he})(this)},{}],165:[function(me,Ie,Te){"use strict";function be(ge){var ce=ge.slice(2);return ce=ce[0].toLowerCase()+ce.slice(1)}var Pe=me("core-util-is"),he=me("isstream"),Se=me("is-class");Object.keys(Pe).map(function(ge){Te[be(ge)]=Pe[ge]}),Te.stream=he,Te.readableStream=he.isReadable,Te.writableStream=he.isWritable,Te.duplexStream=he.isDuplex,Te.class=Se,Te.finite=function(ge){return Number.isFinite(ge)},Te.NaN=function(ge){return Number.isNaN(ge)},Te.generator=function(ge){return ge&&typeof ge.next=="function"&&typeof ge.throw=="function"},Te.generatorFunction=function(ge){return ge&&ge.constructor&&ge.constructor.name==="GeneratorFunction"},Te.asyncFunction=function(ge){return ge&&ge.constructor&&ge.constructor.name==="AsyncFunction"},Te.promise=function(ge){return ge&&typeof ge.then=="function"};var xe=Math.pow(2,31);Te.int=function(ge){return Pe.isNumber(ge)&&ge%1==0},Te.int32=function(ge){return Te.int(ge)&&ge<xe&&ge>=-xe},Te.long=function(ge){return Te.int(ge)&&(ge>=xe||ge<-xe)},Te.Long=function(ge){return Te.object(ge)&&Te.number(ge.high)&&Te.number(ge.low)},Te.double=function(ge){return Pe.isNumber(ge)&&!isNaN(ge)&&ge%1!=0},Te.date=function(ge){return ge instanceof Date},Te.regExp=function(ge){return ge instanceof RegExp},Te.regexp=Te.regExp,Te.error=function(ge){return ge instanceof Error},Te.array=function(ge){return Array.isArray(ge)}},{"core-util-is":153,"is-class":164,isstream:167}],166:[function(me,Ie,Te){var be={}.toString;Ie.exports=Array.isArray||function(Pe){return be.call(Pe)=="[object Array]"}},{}],167:[function(me,Ie,Te){function be(ge){return ge instanceof xe.Stream}function Pe(ge){return be(ge)&&typeof ge._read=="function"&&typeof ge._readableState=="object"}function he(ge){return be(ge)&&typeof ge._write=="function"&&typeof ge._writableState=="object"}function Se(ge){return Pe(ge)&&he(ge)}var xe=me("stream");Ie.exports=be,Ie.exports.isReadable=Pe,Ie.exports.isWritable=he,Ie.exports.isDuplex=Se},{stream:195}],168:[function(me,Ie,Te){"use strict";function be(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||!Pe.call(he,ge)){var ce=Object.getOwnPropertyDescriptor(Se,ge);Object.defineProperty(he,ge,ce)}}),he}Ie.exports=be;var Pe=Object.prototype.hasOwnProperty},{}],169:[function(me,Ie,Te){function be(ue){if(ue=String(ue),!(ue.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(ue);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*ce;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 Pe(ue){return ue>=ve?Math.round(ue/ve)+"d":ue>=ce?Math.round(ue/ce)+"h":ue>=ge?Math.round(ue/ge)+"m":ue>=xe?Math.round(ue/xe)+"s":ue+"ms"}function he(ue){return Se(ue,ve,"day")||Se(ue,ce,"hour")||Se(ue,ge,"minute")||Se(ue,xe,"second")||ue+" ms"}function Se(ue,z,ee){if(!(ue<z))return ue<1.5*z?Math.floor(ue/z)+" "+ee:Math.ceil(ue/z)+" "+ee+"s"}var xe=1e3,ge=60*xe,ce=60*ge,ve=24*ce,de=365.25*ve;Ie.exports=function(ue,z){z=z||{};var ee=typeof ue;if(ee==="string"&&ue.length>0)return be(ue);if(ee==="number"&&isNaN(ue)===!1)return z.long?he(ue):Pe(ue);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(ue))}},{}],170:[function(me,Ie,Te){(function(be){function Pe(ge,ce){for(var ve=0,de=ge.length-1;de>=0;de--){var ue=ge[de];ue==="."?ge.splice(de,1):ue===".."?(ge.splice(de,1),ve++):ve&&(ge.splice(de,1),ve--)}if(ce)for(;ve--;ve)ge.unshift("..");return ge}function he(ge){typeof ge!="string"&&(ge+="");var ce,ve=0,de=-1,ue=!0;for(ce=ge.length-1;ce>=0;--ce)if(ge.charCodeAt(ce)===47){if(!ue){ve=ce+1;break}}else de===-1&&(ue=!1,de=ce+1);return de===-1?"":ge.slice(ve,de)}function Se(ge,ce){if(ge.filter)return ge.filter(ce);for(var ve=[],de=0;de<ge.length;de++)ce(ge[de],de,ge)&&ve.push(ge[de]);return ve}Te.resolve=function(){for(var ge="",ce=!1,ve=arguments.length-1;ve>=-1&&!ce;ve--){var de=ve>=0?arguments[ve]:be.cwd();if(typeof de!="string")throw new TypeError("Arguments to path.resolve must be strings");de&&(ge=de+"/"+ge,ce=de.charAt(0)==="/")}return ge=Pe(Se(ge.split("/"),function(ue){return!!ue}),!ce).join("/"),(ce?"/":"")+ge||"."},Te.normalize=function(ge){var ce=Te.isAbsolute(ge),ve=xe(ge,-1)==="/";return ge=Pe(Se(ge.split("/"),function(de){return!!de}),!ce).join("/"),ge||ce||(ge="."),ge&&ve&&(ge+="/"),(ce?"/":"")+ge},Te.isAbsolute=function(ge){return ge.charAt(0)==="/"},Te.join=function(){var ge=Array.prototype.slice.call(arguments,0);return Te.normalize(Se(ge,function(ce,ve){if(typeof ce!="string")throw new TypeError("Arguments to path.join must be strings");return ce}).join("/"))},Te.relative=function(ge,ce){function ve(se){for(var le=0;le<se.length&&se[le]==="";le++);for(var ye=se.length-1;ye>=0&&se[ye]==="";ye--);return le>ye?[]:se.slice(le,ye-le+1)}ge=Te.resolve(ge).substr(1),ce=Te.resolve(ce).substr(1);for(var de=ve(ge.split("/")),ue=ve(ce.split("/")),z=Math.min(de.length,ue.length),ee=z,oe=0;oe<z;oe++)if(de[oe]!==ue[oe]){ee=oe;break}for(var ie=[],oe=ee;oe<de.length;oe++)ie.push("..");return ie=ie.concat(ue.slice(ee)),ie.join("/")},Te.sep="/",Te.delimiter=":",Te.dirname=function(ge){if(typeof ge!="string"&&(ge+=""),ge.length===0)return".";for(var ce=ge.charCodeAt(0),ve=ce===47,de=-1,ue=!0,z=ge.length-1;z>=1;--z)if((ce=ge.charCodeAt(z))===47){if(!ue){de=z;break}}else ue=!1;return de===-1?ve?"/":".":ve&&de===1?"/":ge.slice(0,de)},Te.basename=function(ge,ce){var ve=he(ge);return ce&&ve.substr(-1*ce.length)===ce&&(ve=ve.substr(0,ve.length-ce.length)),ve},Te.extname=function(ge){typeof ge!="string"&&(ge+="");for(var ce=-1,ve=0,de=-1,ue=!0,z=0,ee=ge.length-1;ee>=0;--ee){var oe=ge.charCodeAt(ee);if(oe!==47)de===-1&&(ue=!1,de=ee+1),oe===46?ce===-1?ce=ee:z!==1&&(z=1):ce!==-1&&(z=-1);else if(!ue){ve=ee+1;break}}return ce===-1||de===-1||z===0||z===1&&ce===de-1&&ce===ve+1?"":ge.slice(ce,de)};var xe=function(ge,ce,ve){return ge.substr(ce,ve)}}).call(this,me("_process"))},{_process:173}],171:[function(me,Ie,Te){(function(be){(function(){"use strict";function Pe(Qe){return Qe=String(Qe),Qe.charAt(0).toUpperCase()+Qe.slice(1)}function he(Qe,Ge,mt){var ct={"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&&mt&&/^Win/i.test(Qe)&&!/^Windows Phone /i.test(Qe)&&(ct=ct[/[\d.]+$/.exec(Qe)])&&(Qe="Windows "+ct),Qe=String(Qe),Ge&&mt&&(Qe=Qe.replace(RegExp(Ge,"i"),mt)),Qe=xe(Qe.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(Qe,Ge){var mt=-1,ct=Qe?Qe.length:0;if(typeof ct=="number"&&ct>-1&&ct<=we)for(;++mt<ct;)Ge(Qe[mt],mt,Qe);else ge(Qe,Ge)}function xe(Qe){return Qe=z(Qe),/^(?:webOS|i(?:OS|P))/.test(Qe)?Qe:Pe(Qe)}function ge(Qe,Ge){for(var mt in Qe)Ne.call(Qe,mt)&&Ge(Qe[mt],mt,Qe)}function ce(Qe){return Qe==null?Pe(Qe):je.call(Qe).slice(8,-1)}function ve(Qe,Ge){var mt=Qe!=null?typeof Qe[Ge]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(mt)||mt=="object"&&!Qe[Ge])}function de(Qe){return String(Qe).replace(/([ -])(?!$)/g,"$1?")}function ue(Qe,Ge){var mt=null;return Se(Qe,function(ct,Ct){mt=Ge(mt,ct,Ct,Qe)}),mt}function z(Qe){return String(Qe).replace(/^ +| +$/g,"")}function ee(Qe){function Ge(Ue){return ue(Ue,function(Ke,Ze){var lt=Ze.pattern||de(Ze);return!Ke&&(Ke=RegExp("\\b"+lt+" *\\d+[.\\w_]*","i").exec(Qe)||RegExp("\\b"+lt+" *\\w+-[\\w]*","i").exec(Qe)||RegExp("\\b"+lt+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(Qe))&&((Ke=String(Ze.label&&!RegExp(lt,"i").test(Ze.label)?Ze.label:Ke).split("/"))[1]&&!/[\d.]+/.test(Ke[0])&&(Ke[0]+=" "+Ke[1]),Ze=Ze.label||Ze,Ke=xe(Ke[0].replace(RegExp(lt,"i"),Ze).replace(RegExp("; *(?:"+Ze+"[_-])?","i")," ").replace(RegExp("("+Ze+")[-_.]?(\\w)","i"),"$1 $2"))),Ke})}function mt(){return this.description||""}var ct=ie,Ct=Qe&&typeof Qe=="object"&&ce(Qe)!="String";Ct&&(ct=Qe,Qe=null);var it=ct.navigator||{},St=it.userAgent||"";Qe||(Qe=St);var ut,Ft,ht=Ct?!!it.likeChrome:/\bChrome\b/.test(Qe)&&!/internal|\n/i.test(je.toString()),rt=Ct?"Object":"ScriptBridgingProxyObject",dt=Ct?"Object":"Environment",yt=Ct&&ct.java?"JavaPackage":ce(ct.java),_t=Ct?"Object":"RuntimeObject",vt=/\bJava/.test(yt)&&ct.java,Bt=vt&&ce(ct.environment)==dt,jt=vt?"a":"\u4F2A",un=vt?"b":"\u5C3E",Kt=ct.document||{},xn=ct.operamini||ct.opera,Ut=Ce.test(Ut=Ct&&xn?xn["[[Class]]"]:ce(xn))?Ut:xn=null,Wt=Qe,$t=[],ft=null,We=Qe==St,Be=We&&xn&&typeof xn.version=="function"&&xn.version(),qe=function(Ue){return ue(Ue,function(Ke,Ze){return Ke||RegExp("\\b"+(Ze.pattern||de(Ze))+"\\b","i").exec(Qe)&&(Ze.label||Ze)})}([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),et=function(Ue){return ue(Ue,function(Ke,Ze){return Ke||RegExp("\\b"+(Ze.pattern||de(Ze))+"\\b","i").exec(Qe)&&(Ze.label||Ze)})}(["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"]),He=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"]),Xe=function(Ue){return ue(Ue,function(Ke,Ze,lt){return Ke||(Ze[He]||Ze[/^[a-z]+(?: +[a-z]+\b)*/i.exec(He)]||RegExp("\\b"+de(lt)+"(?:\\b|\\w*\\d)","i").exec(Qe))&<})}({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}}),Re=function(Ue){return ue(Ue,function(Ke,Ze){var lt=Ze.pattern||de(Ze);return!Ke&&(Ke=RegExp("\\b"+lt+"(?:/[\\d.]+|[ \\w.]*)","i").exec(Qe))&&(Ke=he(Ke,lt,Ze.label||Ze)),Ke})}(["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(qe&&(qe=[qe]),Xe&&!He&&(He=Ge([Xe])),(ut=/\bGoogle TV\b/.exec(He))&&(He=ut[0]),/\bSimulator\b/i.test(Qe)&&(He=(He?He+" ":"")+"Simulator"),et=="Opera Mini"&&/\bOPiOS\b/.test(Qe)&&$t.push("running in Turbo/Uncompressed mode"),et=="IE"&&/\blike iPhone OS\b/.test(Qe)?(ut=ee(Qe.replace(/like iPhone OS/,"")),Xe=ut.manufacturer,He=ut.product):/^iP/.test(He)?(et||(et="Safari"),Re="iOS"+((ut=/ OS ([\d_]+)/i.exec(Qe))?" "+ut[1].replace(/_/g,"."):"")):et!="Konqueror"||/buntu/i.test(Re)?Xe&&Xe!="Google"&&(/Chrome/.test(et)&&!/\bMobile Safari\b/i.test(Qe)||/\bVita\b/.test(He))||/\bAndroid\b/.test(Re)&&/^Chrome/.test(et)&&/\bVersion\//i.test(Qe)?(et="Android Browser",Re=/\bAndroid\b/.test(Re)?Re:"Android"):et=="Silk"?(/\bMobi/i.test(Qe)||(Re="Android",$t.unshift("desktop mode")),/Accelerated *= *true/i.test(Qe)&&$t.unshift("accelerated")):et=="PaleMoon"&&(ut=/\bFirefox\/([\d.]+)\b/.exec(Qe))?$t.push("identifying as Firefox "+ut[1]):et=="Firefox"&&(ut=/\b(Mobile|Tablet|TV)\b/i.exec(Qe))?(Re||(Re="Firefox OS"),He||(He=ut[1])):!et||(ut=!/\bMinefield\b/i.test(Qe)&&/\b(?:Firefox|Safari)\b/.exec(et))?(et&&!He&&/[\/,]|^[^(]+?\)/.test(Qe.slice(Qe.indexOf(ut+"/")+8))&&(et=null),(ut=He||Xe||Re)&&(He||Xe||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Re))&&(et=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Re)?Re:ut)+" Browser")):et=="Electron"&&(ut=(/\bChrome\/([\d.]+)\b/.exec(Qe)||0)[1])&&$t.push("Chromium "+ut):Re="Kubuntu",Be||(Be=function(Ue){return ue(Ue,function(Ke,Ze){return Ke||(RegExp(Ze+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(Qe)||0)[1]||null})}(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",de(et),"(?:Firefox|Minefield|NetFront)"])),(ut=qe=="iCab"&&parseFloat(Be)>3&&"WebKit"||/\bOpera\b/.test(et)&&(/\bOPR\b/.test(Qe)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(Qe)&&!/^(?:Trident|EdgeHTML)$/.test(qe)&&"WebKit"||!qe&&/\bMSIE\b/i.test(Qe)&&(Re=="Mac OS"?"Tasman":"Trident")||qe=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(et)&&"NetFront")&&(qe=[ut]),et=="IE"&&(ut=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(Qe)||0)[1])?(et+=" Mobile",Re="Windows Phone "+(/\+$/.test(ut)?ut:ut+".x"),$t.unshift("desktop mode")):/\bWPDesktop\b/i.test(Qe)?(et="IE Mobile",Re="Windows Phone 8.x",$t.unshift("desktop mode"),Be||(Be=(/\brv:([\d.]+)/.exec(Qe)||0)[1])):et!="IE"&&qe=="Trident"&&(ut=/\brv:([\d.]+)/.exec(Qe))&&(et&&$t.push("identifying as "+et+(Be?" "+Be:"")),et="IE",Be=ut[1]),We){if(ve(ct,"global"))if(vt&&(ut=vt.lang.System,Wt=ut.getProperty("os.arch"),Re=Re||ut.getProperty("os.name")+" "+ut.getProperty("os.version")),Bt){try{Be=ct.require("ringo/engine").version.join("."),et="RingoJS"}catch(Ue){(ut=ct.system)&&ut.global.system==ct.system&&(et="Narwhal",Re||(Re=ut[0].os||null))}et||(et="Rhino")}else typeof ct.process=="object"&&!ct.process.browser&&(ut=ct.process)&&(typeof ut.versions=="object"&&(typeof ut.versions.electron=="string"?($t.push("Node "+ut.versions.node),et="Electron",Be=ut.versions.electron):typeof ut.versions.nw=="string"&&($t.push("Chromium "+Be,"Node "+ut.versions.node),et="NW.js",Be=ut.versions.nw)),et||(et="Node.js",Wt=ut.arch,Re=ut.platform,Be=/[\d.]+/.exec(ut.version),Be=Be?Be[0]:null));else ce(ut=ct.runtime)==rt?(et="Adobe AIR",Re=ut.flash.system.Capabilities.os):ce(ut=ct.phantom)==_t?(et="PhantomJS",Be=(ut=ut.version||null)&&ut.major+"."+ut.minor+"."+ut.patch):typeof Kt.documentMode=="number"&&(ut=/\bTrident\/(\d+)/i.exec(Qe))?(Be=[Be,Kt.documentMode],(ut=+ut[1]+4)!=Be[1]&&($t.push("IE "+Be[1]+" mode"),qe&&(qe[1]=""),Be[1]=ut),Be=et=="IE"?String(Be[1].toFixed(1)):Be[0]):typeof Kt.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(et)&&($t.push("masking as "+et+" "+Be),et="IE",Be="11.0",qe=["Trident"],Re="Windows");Re=Re&&xe(Re)}if(Be&&(ut=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(Be)||/(?:alpha|beta)(?: ?\d)?/i.exec(Qe+";"+(We&&it.appMinorVersion))||/\bMinefield\b/i.test(Qe)&&"a")&&(ft=/b/i.test(ut)?"beta":"alpha",Be=Be.replace(RegExp(ut+"\\+?$"),"")+(ft=="beta"?un:jt)+(/\d+\+?/.exec(ut)||"")),et=="Fennec"||et=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(Re))et="Firefox Mobile";else if(et=="Maxthon"&&Be)Be=Be.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(He))He=="Xbox 360"&&(Re=null),He=="Xbox 360"&&/\bIEMobile\b/.test(Qe)&&$t.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(et)&&(!et||He||/Browser|Mobi/.test(et))||Re!="Windows CE"&&!/Mobi/i.test(Qe))if(et=="IE"&&We)try{ct.external===null&&$t.unshift("platform preview")}catch(Ue){$t.unshift("embedded")}else(/\bBlackBerry\b/.test(He)||/\bBB10\b/.test(Qe))&&(ut=(RegExp(He.replace(/ +/g," *")+"/([.\\d]+)","i").exec(Qe)||0)[1]||Be)?(ut=[ut,/BB10/.test(Qe)],Re=(ut[1]?(He=null,Xe="BlackBerry"):"Device Software")+" "+ut[0],Be=null):this!=ge&&He!="Wii"&&(We&&xn||/Opera/.test(et)&&/\b(?:MSIE|Firefox)\b/i.test(Qe)||et=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Re)||et=="IE"&&(Re&&!/^Win/.test(Re)&&Be>5.5||/\bWindows XP\b/.test(Re)&&Be>8||Be==8&&!/\bTrident\b/.test(Qe)))&&!Ce.test(ut=ee.call(ge,Qe.replace(Ce,"")+";"))&&ut.name&&(ut="ing as "+ut.name+((ut=ut.version)?" "+ut:""),Ce.test(et)?(/\bIE\b/.test(ut)&&Re=="Mac OS"&&(Re=null),ut="identify"+ut):(ut="mask"+ut,et=Ut?xe(Ut.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(ut)&&(Re=null),We||(Be=null)),qe=["Presto"],$t.push(ut));else et+=" Mobile";(ut=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(Qe)||0)[1])&&(ut=[parseFloat(ut.replace(/\.(\d)$/,".0$1")),ut],et=="Safari"&&ut[1].slice(-1)=="+"?(et="WebKit Nightly",ft="alpha",Be=ut[1].slice(0,-1)):Be!=ut[1]&&Be!=(ut[2]=(/\bSafari\/([\d.]+\+?)/i.exec(Qe)||0)[1])||(Be=null),ut[1]=(/\bChrome\/([\d.]+)/i.exec(Qe)||0)[1],ut[0]==537.36&&ut[2]==537.36&&parseFloat(ut[1])>=28&&qe=="WebKit"&&(qe=["Blink"]),We&&(ht||ut[1])?(qe&&(qe[1]="like Chrome"),ut=ut[1]||(ut=ut[0],ut<530?1:ut<532?2:ut<532.05?3:ut<533?4:ut<534.03?5:ut<534.07?6:ut<534.1?7:ut<534.13?8:ut<534.16?9:ut<534.24?10:ut<534.3?11:ut<535.01?12:ut<535.02?"13+":ut<535.07?15:ut<535.11?16:ut<535.19?17:ut<536.05?18:ut<536.1?19:ut<537.01?20:ut<537.11?"21+":ut<537.13?23:ut<537.18?24:ut<537.24?25:ut<537.36?26:qe!="Blink"?"27":"28")):(qe&&(qe[1]="like Safari"),ut=ut[0],ut=ut<400?1:ut<500?2:ut<526?3:ut<533?4:ut<534?"4+":ut<535?5:ut<537?6:ut<538?7:ut<601?8:"8"),qe&&(qe[1]+=" "+(ut+=typeof ut=="number"?".x":/[.+]/.test(ut)?"":"+")),et=="Safari"&&(!Be||parseInt(Be)>45)&&(Be=ut)),et=="Opera"&&(ut=/\bzbov|zvav$/.exec(Re))?(et+=" ",$t.unshift("desktop mode"),ut=="zvav"?(et+="Mini",Be=null):et+="Mobile",Re=Re.replace(RegExp(" *"+ut+"$"),"")):et=="Safari"&&/\bChrome\b/.exec(qe&&qe[1])&&($t.unshift("desktop mode"),et="Chrome Mobile",Be=null,/\bOS X\b/.test(Re)?(Xe="Apple",Re="iOS 4.3+"):Re=null),Be&&Be.indexOf(ut=/[\d.]+$/.exec(Re))==0&&Qe.indexOf("/"+ut+"-")>-1&&(Re=z(Re.replace(ut,""))),qe&&!/\b(?:Avant|Nook)\b/.test(et)&&(/Browser|Lunascape|Maxthon/.test(et)||et!="Safari"&&/^iOS/.test(Re)&&/\bSafari\b/.test(qe[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(et)&&qe[1])&&(ut=qe[qe.length-1])&&$t.push(ut),$t.length&&($t=["("+$t.join("; ")+")"]),Xe&&He&&He.indexOf(Xe)<0&&$t.push("on "+Xe),He&&$t.push((/^on /.test($t[$t.length-1])?"":"on ")+He),Re&&(ut=/ ([\d.+]+)$/.exec(Re),Ft=ut&&Re.charAt(Re.length-ut[0].length-1)=="/",Re={architecture:32,family:ut&&!Ft?Re.replace(ut[0],""):Re,version:ut?ut[1]:null,toString:function(){var Ue=this.version;return this.family+(Ue&&!Ft?" "+Ue:"")+(this.architecture==64?" 64-bit":"")}}),(ut=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Wt))&&!/\bi686\b/i.test(Wt)?(Re&&(Re.architecture=64,Re.family=Re.family.replace(RegExp(" *"+ut),"")),et&&(/\bWOW64\b/i.test(Qe)||We&&/\w(?:86|32)$/.test(it.cpuClass||it.platform)&&!/\bWin64; x64\b/i.test(Qe))&&$t.unshift("32-bit")):Re&&/^OS X/.test(Re.family)&&et=="Chrome"&&parseFloat(Be)>=39&&(Re.architecture=64),Qe||(Qe=null);var Ae={};return Ae.description=Qe,Ae.layout=qe&&qe[0],Ae.manufacturer=Xe,Ae.name=et,Ae.prerelease=ft,Ae.product=He,Ae.ua=Qe,Ae.version=et&&Be,Ae.os=Re||{architecture:null,family:null,version:null,toString:function(){return"null"}},Ae.parse=ee,Ae.toString=mt,Ae.version&&$t.unshift(Be),Ae.name&&$t.unshift(et),Re&&et&&(Re!=String(Re).split(" ")[0]||Re!=et.split(" ")[0]&&!He)&&$t.push(He?"("+Re+")":"on "+Re),$t.length&&(Ae.description=$t.join(" ")),Ae}var oe={function:!0,object:!0},ie=oe[typeof window]&&window||this,se=oe[typeof Te]&&Te,le=oe[typeof Ie]&&Ie&&!Ie.nodeType&&Ie,ye=se&&le&&typeof be=="object"&&be;!ye||ye.global!==ye&&ye.window!==ye&&ye.self!==ye||(ie=ye);var we=Math.pow(2,53)-1,Ce=/\bOpera/,ke=Object.prototype,Ne=ke.hasOwnProperty,je=ke.toString,Ve=ee();typeof Le=="function"&&typeof Le.amd=="object"&&Le.amd?(ie.platform=Ve,Le(function(){return Ve})):se&&le?ge(Ve,function(Qe,Ge){se[Ge]=Qe}):ie.platform=Ve}).call(this)}).call(this,typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],172:[function(me,Ie,Te){(function(be){"use strict";function Pe(he,Se,xe,ge){if(typeof he!="function")throw new TypeError('"callback" argument must be a function');var ce,ve,de=arguments.length;switch(de){case 0:case 1:return be.nextTick(he);case 2:return be.nextTick(function(){he.call(null,Se)});case 3:return be.nextTick(function(){he.call(null,Se,xe)});case 4:return be.nextTick(function(){he.call(null,Se,xe,ge)});default:for(ce=new Array(de-1),ve=0;ve<ce.length;)ce[ve++]=arguments[ve];return be.nextTick(function(){he.apply(null,ce)})}}!be.version||be.version.indexOf("v0.")===0||be.version.indexOf("v1.")===0&&be.version.indexOf("v1.8.")!==0?Ie.exports={nextTick:Pe}:Ie.exports=be}).call(this,me("_process"))},{_process:173}],173:[function(me,Ie,Te){function be(){throw new Error("setTimeout has not been defined")}function Pe(){throw new Error("clearTimeout has not been defined")}function he(le){if(de===setTimeout)return setTimeout(le,0);if((de===be||!de)&&setTimeout)return de=setTimeout,setTimeout(le,0);try{return de(le,0)}catch(ye){try{return de.call(null,le,0)}catch(we){return de.call(this,le,0)}}}function Se(le){if(ue===clearTimeout)return clearTimeout(le);if((ue===Pe||!ue)&&clearTimeout)return ue=clearTimeout,clearTimeout(le);try{return ue(le)}catch(ye){try{return ue.call(null,le)}catch(we){return ue.call(this,le)}}}function xe(){ie&&ee&&(ie=!1,ee.length?oe=ee.concat(oe):se=-1,oe.length&&ge())}function ge(){if(!ie){var le=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(le)}}function ce(le,ye){this.fun=le,this.array=ye}function ve(){}var de,ue,z=Ie.exports={};(function(){try{de=typeof setTimeout=="function"?setTimeout:be}catch(le){de=be}try{ue=typeof clearTimeout=="function"?clearTimeout:Pe}catch(le){ue=Pe}})();var ee,oe=[],ie=!1,se=-1;z.nextTick=function(le){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 ce(le,ye)),oe.length!==1||ie||he(ge)},ce.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(le){return[]},z.binding=function(le){throw new Error("process.binding is not supported")},z.cwd=function(){return"/"},z.chdir=function(le){throw new Error("process.chdir is not supported")},z.umask=function(){return 0}},{}],174:[function(me,Ie,Te){(function(be){(function(Pe){function he(yt){throw new RangeError(Ft[yt])}function Se(yt,_t){for(var vt=yt.length,Bt=[];vt--;)Bt[vt]=_t(yt[vt]);return Bt}function xe(yt,_t){var vt=yt.split("@"),Bt="";return vt.length>1&&(Bt=vt[0]+"@",yt=vt[1]),yt=yt.replace(ut,"."),Bt+Se(yt.split("."),_t).join(".")}function ge(yt){for(var _t,vt,Bt=[],jt=0,un=yt.length;jt<un;)_t=yt.charCodeAt(jt++),_t>=55296&&_t<=56319&&jt<un?(vt=yt.charCodeAt(jt++),(64512&vt)==56320?Bt.push(((1023&_t)<<10)+(1023&vt)+65536):(Bt.push(_t),jt--)):Bt.push(_t);return Bt}function ce(yt){return Se(yt,function(_t){var vt="";return _t>65535&&(_t-=65536,vt+=dt(_t>>>10&1023|55296),_t=56320|1023&_t),vt+=dt(_t)}).join("")}function ve(yt){return yt-48<10?yt-22:yt-65<26?yt-65:yt-97<26?yt-97:Ne}function de(yt,_t){return yt+22+75*(yt<26)-((_t!=0)<<5)}function ue(yt,_t,vt){var Bt=0;for(yt=vt?rt(yt/Ge):yt>>1,yt+=rt(yt/_t);yt>ht*Ve>>1;Bt+=Ne)yt=rt(yt/ht);return rt(Bt+(ht+1)*yt/(yt+Qe))}function z(yt){var _t,vt,Bt,jt,un,Kt,xn,Ut,Wt,$t,ft=[],We=yt.length,Be=0,qe=ct,et=mt;for(vt=yt.lastIndexOf(Ct),vt<0&&(vt=0),Bt=0;Bt<vt;++Bt)yt.charCodeAt(Bt)>=128&&he("not-basic"),ft.push(yt.charCodeAt(Bt));for(jt=vt>0?vt+1:0;jt<We;){for(un=Be,Kt=1,xn=Ne;jt>=We&&he("invalid-input"),Ut=ve(yt.charCodeAt(jt++)),(Ut>=Ne||Ut>rt((ke-Be)/Kt))&&he("overflow"),Be+=Ut*Kt,Wt=xn<=et?je:xn>=et+Ve?Ve:xn-et,!(Ut<Wt);xn+=Ne)$t=Ne-Wt,Kt>rt(ke/$t)&&he("overflow"),Kt*=$t;_t=ft.length+1,et=ue(Be-un,_t,un==0),rt(Be/_t)>ke-qe&&he("overflow"),qe+=rt(Be/_t),Be%=_t,ft.splice(Be++,0,qe)}return ce(ft)}function ee(yt){var _t,vt,Bt,jt,un,Kt,xn,Ut,Wt,$t,ft,We,Be,qe,et,He=[];for(yt=ge(yt),We=yt.length,_t=ct,vt=0,un=mt,Kt=0;Kt<We;++Kt)(ft=yt[Kt])<128&&He.push(dt(ft));for(Bt=jt=He.length,jt&&He.push(Ct);Bt<We;){for(xn=ke,Kt=0;Kt<We;++Kt)(ft=yt[Kt])>=_t&&ft<xn&&(xn=ft);for(Be=Bt+1,xn-_t>rt((ke-vt)/Be)&&he("overflow"),vt+=(xn-_t)*Be,_t=xn,Kt=0;Kt<We;++Kt)if(ft=yt[Kt],ft<_t&&++vt>ke&&he("overflow"),ft==_t){for(Ut=vt,Wt=Ne;$t=Wt<=un?je:Wt>=un+Ve?Ve:Wt-un,!(Ut<$t);Wt+=Ne)et=Ut-$t,qe=Ne-$t,He.push(dt(de($t+et%qe,0))),Ut=rt(et/qe);He.push(dt(de(Ut,0))),un=ue(vt,Be,Bt==jt),vt=0,++Bt}++vt,++_t}return He.join("")}function oe(yt){return xe(yt,function(_t){return it.test(_t)?z(_t.slice(4).toLowerCase()):_t})}function ie(yt){return xe(yt,function(_t){return St.test(_t)?"xn--"+ee(_t):_t})}var se=typeof Te=="object"&&Te&&!Te.nodeType&&Te,le=typeof Ie=="object"&&Ie&&!Ie.nodeType&&Ie,ye=typeof be=="object"&&be;ye.global!==ye&&ye.window!==ye&&ye.self!==ye||(Pe=ye);var we,Ce,ke=2147483647,Ne=36,je=1,Ve=26,Qe=38,Ge=700,mt=72,ct=128,Ct="-",it=/^xn--/,St=/[^\x20-\x7E]/,ut=/[\x2E\u3002\uFF0E\uFF61]/g,Ft={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ht=Ne-je,rt=Math.floor,dt=String.fromCharCode;if(we={version:"1.4.1",ucs2:{decode:ge,encode:ce},decode:z,encode:ee,toASCII:ie,toUnicode:oe},typeof Le=="function"&&typeof Le.amd=="object"&&Le.amd)Le("punycode",function(){return we});else if(se&&le)if(Ie.exports==se)le.exports=we;else for(Ce in we)we.hasOwnProperty(Ce)&&(se[Ce]=we[Ce]);else Pe.punycode=we})(this)}).call(this,typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],175:[function(me,Ie,Te){"use strict";function be(he,Se){return Object.prototype.hasOwnProperty.call(he,Se)}Ie.exports=function(he,Se,xe,ge){Se=Se||"&",xe=xe||"=";var ce={};if(typeof he!="string"||he.length===0)return ce;var ve=/\+/g;he=he.split(Se);var de=1e3;ge&&typeof ge.maxKeys=="number"&&(de=ge.maxKeys);var ue=he.length;de>0&&ue>de&&(ue=de);for(var z=0;z<ue;++z){var ee,oe,ie,se,le=he[z].replace(ve,"%20"),ye=le.indexOf(xe);ye>=0?(ee=le.substr(0,ye),oe=le.substr(ye+1)):(ee=le,oe=""),ie=decodeURIComponent(ee),se=decodeURIComponent(oe),be(ce,ie)?Pe(ce[ie])?ce[ie].push(se):ce[ie]=[ce[ie],se]:ce[ie]=se}return ce};var Pe=Array.isArray||function(he){return Object.prototype.toString.call(he)==="[object Array]"}},{}],176:[function(me,Ie,Te){"use strict";function be(xe,ge){if(xe.map)return xe.map(ge);for(var ce=[],ve=0;ve<xe.length;ve++)ce.push(ge(xe[ve],ve));return ce}var Pe=function(xe){switch(typeof xe){case"string":return xe;case"boolean":return xe?"true":"false";case"number":return isFinite(xe)?xe:"";default:return""}};Ie.exports=function(xe,ge,ce,ve){return ge=ge||"&",ce=ce||"=",xe===null&&(xe=void 0),typeof xe=="object"?be(Se(xe),function(de){var ue=encodeURIComponent(Pe(de))+ce;return he(xe[de])?be(xe[de],function(z){return ue+encodeURIComponent(Pe(z))}).join(ge):ue+encodeURIComponent(Pe(xe[de]))}).join(ge):ve?encodeURIComponent(Pe(ve))+ce+encodeURIComponent(Pe(xe)):""};var he=Array.isArray||function(xe){return Object.prototype.toString.call(xe)==="[object Array]"},Se=Object.keys||function(xe){var ge=[];for(var ce in xe)Object.prototype.hasOwnProperty.call(xe,ce)&&ge.push(ce);return ge}},{}],177:[function(me,Ie,Te){"use strict";Te.decode=Te.parse=me("./decode"),Te.encode=Te.stringify=me("./encode")},{"./decode":175,"./encode":176}],178:[function(me,Ie,Te){Ie.exports=me("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":179}],179:[function(me,Ie,Te){"use strict";function be(ie){if(!(this instanceof be))return new be(ie);de.call(this,ie),ue.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",Pe)}function Pe(){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"),ce=xe.default||function(ie){var se=[];for(var le in ie)se.push(le);return se};Ie.exports=be;var ve=me("core-util-is");ve.inherits=me("inherits");var de=me("./_stream_readable"),ue=me("./_stream_writable");ve.inherits(be,de);for(var z=ce(ue.prototype),ee=0;ee<z.length;ee++){var oe=z[ee];be.prototype[oe]||(be.prototype[oe]=ue.prototype[oe])}Object.defineProperty(be.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(be.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)}}),be.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,Ie,Te){"use strict";function be(Se){if(!(this instanceof be))return new be(Se);Pe.call(this,Se)}Ie.exports=be;var Pe=me("./_stream_transform"),he=me("core-util-is");he.inherits=me("inherits"),he.inherits(be,Pe),be.prototype._transform=function(Se,xe,ge){ge(null,Se)}},{"./_stream_transform":182,"core-util-is":153,inherits:162}],181:[function(me,Ie,Te){(function(be,Pe){"use strict";function he(We){return vt.from(We)}function Se(We){return vt.isBuffer(We)||We instanceof Bt}function xe(We,Be,qe){if(typeof We.prependListener=="function")return We.prependListener(Be,qe);We._events&&We._events[Be]?dt(We._events[Be])?We._events[Be].unshift(qe):We._events[Be]=[qe,We._events[Be]]:We.on(Be,qe)}function ge(We,Be){rt=rt||me("./_stream_duplex"),We=We||{};var qe=Be instanceof rt;this.objectMode=!!We.objectMode,qe&&(this.objectMode=this.objectMode||!!We.readableObjectMode);var et=We.highWaterMark,He=We.readableHighWaterMark,Xe=this.objectMode?16:16384;this.highWaterMark=et||et===0?et:qe&&(He||He===0)?He:Xe,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new Ut,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=We.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,We.encoding&&(xn||(xn=me("string_decoder/").StringDecoder),this.decoder=new xn(We.encoding),this.encoding=We.encoding)}function ce(We){if(rt=rt||me("./_stream_duplex"),!(this instanceof ce))return new ce(We);this._readableState=new ge(We,this),this.readable=!0,We&&(typeof We.read=="function"&&(this._read=We.read),typeof We.destroy=="function"&&(this._destroy=We.destroy)),_t.call(this)}function ve(We,Be,qe,et,He){var Xe=We._readableState;if(Be===null)Xe.reading=!1,ie(We,Xe);else{var Re;He||(Re=ue(Xe,Be)),Re?We.emit("error",Re):Xe.objectMode||Be&&Be.length>0?(typeof Be=="string"||Xe.objectMode||(0,Ft.default)(Be)===vt.prototype||(Be=he(Be)),et?Xe.endEmitted?We.emit("error",new Error("stream.unshift() after end event")):de(We,Xe,Be,!0):Xe.ended?We.emit("error",new Error("stream.push() after EOF")):(Xe.reading=!1,Xe.decoder&&!qe?(Be=Xe.decoder.write(Be),Xe.objectMode||Be.length!==0?de(We,Xe,Be,!1):ye(We,Xe)):de(We,Xe,Be,!1))):et||(Xe.reading=!1)}return z(Xe)}function de(We,Be,qe,et){Be.flowing&&Be.length===0&&!Be.sync?(We.emit("data",qe),We.read(0)):(Be.length+=Be.objectMode?1:qe.length,et?Be.buffer.unshift(qe):Be.buffer.push(qe),Be.needReadable&&se(We)),ye(We,Be)}function ue(We,Be){var qe;return Se(Be)||typeof Be=="string"||Be===void 0||We.objectMode||(qe=new TypeError("Invalid non-string/buffer chunk")),qe}function z(We){return!We.ended&&(We.needReadable||We.length<We.highWaterMark||We.length===0)}function ee(We){return We>=ft?We=ft:(We--,We|=We>>>1,We|=We>>>2,We|=We>>>4,We|=We>>>8,We|=We>>>16,We++),We}function oe(We,Be){return We<=0||Be.length===0&&Be.ended?0:Be.objectMode?1:We!==We?Be.flowing&&Be.length?Be.buffer.head.data.length:Be.length:(We>Be.highWaterMark&&(Be.highWaterMark=ee(We)),We<=Be.length?We:Be.ended?Be.length:(Be.needReadable=!0,0))}function ie(We,Be){if(!Be.ended){if(Be.decoder){var qe=Be.decoder.end();qe&&qe.length&&(Be.buffer.push(qe),Be.length+=Be.objectMode?1:qe.length)}Be.ended=!0,se(We)}}function se(We){var Be=We._readableState;Be.needReadable=!1,Be.emittedReadable||(Kt("emitReadable",Be.flowing),Be.emittedReadable=!0,Be.sync?ht.nextTick(le,We):le(We))}function le(We){Kt("emit readable"),We.emit("readable"),Ve(We)}function ye(We,Be){Be.readingMore||(Be.readingMore=!0,ht.nextTick(we,We,Be))}function we(We,Be){for(var qe=Be.length;!Be.reading&&!Be.flowing&&!Be.ended&&Be.length<Be.highWaterMark&&(Kt("maybeReadMore read 0"),We.read(0),qe!==Be.length);)qe=Be.length;Be.readingMore=!1}function Ce(We){return function(){var Be=We._readableState;Kt("pipeOnDrain",Be.awaitDrain),Be.awaitDrain&&Be.awaitDrain--,Be.awaitDrain===0&&yt(We,"data")&&(Be.flowing=!0,Ve(We))}}function ke(We){Kt("readable nexttick read 0"),We.read(0)}function Ne(We,Be){Be.resumeScheduled||(Be.resumeScheduled=!0,ht.nextTick(je,We,Be))}function je(We,Be){Be.reading||(Kt("resume read 0"),We.read(0)),Be.resumeScheduled=!1,Be.awaitDrain=0,We.emit("resume"),Ve(We),Be.flowing&&!Be.reading&&We.read(0)}function Ve(We){var Be=We._readableState;for(Kt("flow",Be.flowing);Be.flowing&&We.read()!==null;);}function Qe(We,Be){if(Be.length===0)return null;var qe;return Be.objectMode?qe=Be.buffer.shift():!We||We>=Be.length?(qe=Be.decoder?Be.buffer.join(""):Be.buffer.length===1?Be.buffer.head.data:Be.buffer.concat(Be.length),Be.buffer.clear()):qe=Ge(We,Be.buffer,Be.decoder),qe}function Ge(We,Be,qe){var et;return We<Be.head.data.length?(et=Be.head.data.slice(0,We),Be.head.data=Be.head.data.slice(We)):et=We===Be.head.data.length?Be.shift():qe?mt(We,Be):ct(We,Be),et}function mt(We,Be){var qe=Be.head,et=1,He=qe.data;for(We-=He.length;qe=qe.next;){var Xe=qe.data,Re=We>Xe.length?Xe.length:We;if(Re===Xe.length?He+=Xe:He+=Xe.slice(0,We),(We-=Re)===0){Re===Xe.length?(++et,qe.next?Be.head=qe.next:Be.head=Be.tail=null):(Be.head=qe,qe.data=Xe.slice(Re));break}++et}return Be.length-=et,He}function ct(We,Be){var qe=vt.allocUnsafe(We),et=Be.head,He=1;for(et.data.copy(qe),We-=et.data.length;et=et.next;){var Xe=et.data,Re=We>Xe.length?Xe.length:We;if(Xe.copy(qe,qe.length-We,0,Re),(We-=Re)===0){Re===Xe.length?(++He,et.next?Be.head=et.next:Be.head=Be.tail=null):(Be.head=et,et.data=Xe.slice(Re));break}++He}return Be.length-=He,qe}function Ct(We){var Be=We._readableState;if(Be.length>0)throw new Error('"endReadable()" called on non-empty stream');Be.endEmitted||(Be.ended=!0,ht.nextTick(it,Be,We))}function it(We,Be){We.endEmitted||We.length!==0||(We.endEmitted=!0,Be.readable=!1,Be.emit("end"))}function St(We,Be){for(var qe=0,et=We.length;qe<et;qe++)if(We[qe]===Be)return qe;return-1}var ut=me("babel-runtime/core-js/object/get-prototype-of"),Ft=function(We){return We&&We.__esModule?We:{default:We}}(ut),ht=me("process-nextick-args");Ie.exports=ce;var rt,dt=me("isarray");ce.ReadableState=ge;var yt=(me("events").EventEmitter,function(We,Be){return We.listeners(Be).length}),_t=me("./internal/streams/stream"),vt=me("safe-buffer").Buffer,Bt=Pe.Uint8Array||function(){},jt=me("core-util-is");jt.inherits=me("inherits");var un=me("util"),Kt=void 0;Kt=un&&un.debuglog?un.debuglog("stream"):function(){};var xn,Ut=me("./internal/streams/BufferList"),Wt=me("./internal/streams/destroy");jt.inherits(ce,_t);var $t=["error","close","destroy","pause","resume"];Object.defineProperty(ce.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(We){this._readableState&&(this._readableState.destroyed=We)}}),ce.prototype.destroy=Wt.destroy,ce.prototype._undestroy=Wt.undestroy,ce.prototype._destroy=function(We,Be){this.push(null),Be(We)},ce.prototype.push=function(We,Be){var qe,et=this._readableState;return et.objectMode?qe=!0:typeof We=="string"&&(Be=Be||et.defaultEncoding,Be!==et.encoding&&(We=vt.from(We,Be),Be=""),qe=!0),ve(this,We,Be,!1,qe)},ce.prototype.unshift=function(We){return ve(this,We,null,!0,!1)},ce.prototype.isPaused=function(){return this._readableState.flowing===!1},ce.prototype.setEncoding=function(We){return xn||(xn=me("string_decoder/").StringDecoder),this._readableState.decoder=new xn(We),this._readableState.encoding=We,this};var ft=8388608;ce.prototype.read=function(We){Kt("read",We),We=parseInt(We,10);var Be=this._readableState,qe=We;if(We!==0&&(Be.emittedReadable=!1),We===0&&Be.needReadable&&(Be.length>=Be.highWaterMark||Be.ended))return Kt("read: emitReadable",Be.length,Be.ended),Be.length===0&&Be.ended?Ct(this):se(this),null;if((We=oe(We,Be))===0&&Be.ended)return Be.length===0&&Ct(this),null;var et=Be.needReadable;Kt("need readable",et),(Be.length===0||Be.length-We<Be.highWaterMark)&&(et=!0,Kt("length less than watermark",et)),Be.ended||Be.reading?(et=!1,Kt("reading or ended",et)):et&&(Kt("do read"),Be.reading=!0,Be.sync=!0,Be.length===0&&(Be.needReadable=!0),this._read(Be.highWaterMark),Be.sync=!1,Be.reading||(We=oe(qe,Be)));var He;return He=We>0?Qe(We,Be):null,He===null?(Be.needReadable=!0,We=0):Be.length-=We,Be.length===0&&(Be.ended||(Be.needReadable=!0),qe!==We&&Be.ended&&Ct(this)),He!==null&&this.emit("data",He),He},ce.prototype._read=function(We){this.emit("error",new Error("_read() is not implemented"))},ce.prototype.pipe=function(We,Be){function qe(Mn,yn){Kt("onunpipe"),Mn===Ze&&yn&&yn.hasUnpiped===!1&&(yn.hasUnpiped=!0,He())}function et(){Kt("onend"),We.end()}function He(){Kt("cleanup"),We.removeListener("close",Ae),We.removeListener("finish",Ue),We.removeListener("drain",en),We.removeListener("error",Re),We.removeListener("unpipe",qe),Ze.removeListener("end",et),Ze.removeListener("end",Ke),Ze.removeListener("data",Xe),Jt=!0,!lt.awaitDrain||We._writableState&&!We._writableState.needDrain||en()}function Xe(Mn){Kt("ondata"),gn=!1,We.write(Mn)!==!1||gn||((lt.pipesCount===1&<.pipes===We||lt.pipesCount>1&&St(lt.pipes,We)!==-1)&&!Jt&&(Kt("false write response, pause",Ze._readableState.awaitDrain),Ze._readableState.awaitDrain++,gn=!0),Ze.pause())}function Re(Mn){Kt("onerror",Mn),Ke(),We.removeListener("error",Re),yt(We,"error")===0&&We.emit("error",Mn)}function Ae(){We.removeListener("finish",Ue),Ke()}function Ue(){Kt("onfinish"),We.removeListener("close",Ae),Ke()}function Ke(){Kt("unpipe"),Ze.unpipe(We)}var Ze=this,lt=this._readableState;switch(lt.pipesCount){case 0:lt.pipes=We;break;case 1:lt.pipes=[lt.pipes,We];break;default:lt.pipes.push(We)}lt.pipesCount+=1,Kt("pipe count=%d opts=%j",lt.pipesCount,Be);var xt=(!Be||Be.end!==!1)&&We!==be.stdout&&We!==be.stderr,tn=xt?et:Ke;lt.endEmitted?ht.nextTick(tn):Ze.once("end",tn),We.on("unpipe",qe);var en=Ce(Ze);We.on("drain",en);var Jt=!1,gn=!1;return Ze.on("data",Xe),xe(We,"error",Re),We.once("close",Ae),We.once("finish",Ue),We.emit("pipe",Ze),lt.flowing||(Kt("pipe resume"),Ze.resume()),We},ce.prototype.unpipe=function(We){var Be=this._readableState,qe={hasUnpiped:!1};if(Be.pipesCount===0)return this;if(Be.pipesCount===1)return We&&We!==Be.pipes?this:(We||(We=Be.pipes),Be.pipes=null,Be.pipesCount=0,Be.flowing=!1,We&&We.emit("unpipe",this,qe),this);if(!We){var et=Be.pipes,He=Be.pipesCount;Be.pipes=null,Be.pipesCount=0,Be.flowing=!1;for(var Xe=0;Xe<He;Xe++)et[Xe].emit("unpipe",this,qe);return this}var Re=St(Be.pipes,We);return Re===-1?this:(Be.pipes.splice(Re,1),Be.pipesCount-=1,Be.pipesCount===1&&(Be.pipes=Be.pipes[0]),We.emit("unpipe",this,qe),this)},ce.prototype.on=function(We,Be){var qe=_t.prototype.on.call(this,We,Be);if(We==="data")this._readableState.flowing!==!1&&this.resume();else if(We==="readable"){var et=this._readableState;et.endEmitted||et.readableListening||(et.readableListening=et.needReadable=!0,et.emittedReadable=!1,et.reading?et.length&&se(this):ht.nextTick(ke,this))}return qe},ce.prototype.addListener=ce.prototype.on,ce.prototype.resume=function(){var We=this._readableState;return We.flowing||(Kt("resume"),We.flowing=!0,Ne(this,We)),this},ce.prototype.pause=function(){return Kt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Kt("pause"),this._readableState.flowing=!1,this.emit("pause")),this},ce.prototype.wrap=function(We){var Be=this,qe=this._readableState,et=!1;We.on("end",function(){if(Kt("wrapped end"),qe.decoder&&!qe.ended){var Re=qe.decoder.end();Re&&Re.length&&Be.push(Re)}Be.push(null)}),We.on("data",function(Re){Kt("wrapped data"),qe.decoder&&(Re=qe.decoder.write(Re)),(!qe.objectMode||Re!=null)&&(qe.objectMode||Re&&Re.length)&&(Be.push(Re)||(et=!0,We.pause()))});for(var He in We)this[He]===void 0&&typeof We[He]=="function"&&(this[He]=function(Re){return function(){return We[Re].apply(We,arguments)}}(He));for(var Xe=0;Xe<$t.length;Xe++)We.on($t[Xe],this.emit.bind(this,$t[Xe]));return this._read=function(Re){Kt("wrapped _read",Re),et&&(et=!1,We.resume())},this},Object.defineProperty(ce.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),ce._fromList=Qe}).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,Ie,Te){"use strict";function be(ce,ve){var de=this._transformState;de.transforming=!1;var ue=de.writecb;if(!ue)return this.emit("error",new Error("write callback called multiple times"));de.writechunk=null,de.writecb=null,ve!=null&&this.push(ve),ue(ce);var z=this._readableState;z.reading=!1,(z.needReadable||z.length<z.highWaterMark)&&this._read(z.highWaterMark)}function Pe(ce){if(!(this instanceof Pe))return new Pe(ce);xe.call(this,ce),this._transformState={afterTransform:be.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,ce&&(typeof ce.transform=="function"&&(this._transform=ce.transform),typeof ce.flush=="function"&&(this._flush=ce.flush)),this.on("prefinish",he)}function he(){var ce=this;typeof this._flush=="function"?this._flush(function(ve,de){Se(ce,ve,de)}):Se(this,null,null)}function Se(ce,ve,de){if(ve)return ce.emit("error",ve);if(de!=null&&ce.push(de),ce._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(ce._transformState.transforming)throw new Error("Calling transform done when still transforming");return ce.push(null)}Ie.exports=Pe;var xe=me("./_stream_duplex"),ge=me("core-util-is");ge.inherits=me("inherits"),ge.inherits(Pe,xe),Pe.prototype.push=function(ce,ve){return this._transformState.needTransform=!1,xe.prototype.push.call(this,ce,ve)},Pe.prototype._transform=function(ce,ve,de){throw new Error("_transform() is not implemented")},Pe.prototype._write=function(ce,ve,de){var ue=this._transformState;if(ue.writecb=de,ue.writechunk=ce,ue.writeencoding=ve,!ue.transforming){var z=this._readableState;(ue.needTransform||z.needReadable||z.length<z.highWaterMark)&&this._read(z.highWaterMark)}},Pe.prototype._read=function(ce){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},Pe.prototype._destroy=function(ce,ve){var de=this;xe.prototype._destroy.call(this,ce,function(ue){ve(ue),de.emit("close")})}},{"./_stream_duplex":179,"core-util-is":153,inherits:162}],183:[function(me,Ie,Te){(function(be,Pe){"use strict";function he(Wt){return Wt&&Wt.__esModule?Wt:{default:Wt}}function Se(Wt){var $t=this;this.next=null,this.entry=null,this.finish=function(){mt($t,Wt)}}function xe(Wt){return un.from(Wt)}function ge(Wt){return un.isBuffer(Wt)||Wt instanceof Kt}function ce(){}function ve(Wt,$t){yt=yt||me("./_stream_duplex"),Wt=Wt||{};var ft=$t instanceof yt;this.objectMode=!!Wt.objectMode,ft&&(this.objectMode=this.objectMode||!!Wt.writableObjectMode);var We=Wt.highWaterMark,Be=Wt.writableHighWaterMark,qe=this.objectMode?16:16384;this.highWaterMark=We||We===0?We:ft&&(Be||Be===0)?Be:qe,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 et=Wt.decodeStrings===!1;this.decodeStrings=!et,this.defaultEncoding=Wt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(He){ye($t,He)},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(Wt){if(yt=yt||me("./_stream_duplex"),!(Ut.call(de,this)||this instanceof yt))return new de(Wt);this._writableState=new ve(Wt,this),this.writable=!0,Wt&&(typeof Wt.write=="function"&&(this._write=Wt.write),typeof Wt.writev=="function"&&(this._writev=Wt.writev),typeof Wt.destroy=="function"&&(this._destroy=Wt.destroy),typeof Wt.final=="function"&&(this._final=Wt.final)),jt.call(this)}function ue(Wt,$t){var ft=new Error("write after end");Wt.emit("error",ft),dt.nextTick($t,ft)}function z(Wt,$t,ft,We){var Be=!0,qe=!1;return ft===null?qe=new TypeError("May not write null values to stream"):typeof ft=="string"||ft===void 0||$t.objectMode||(qe=new TypeError("Invalid non-string/buffer chunk")),qe&&(Wt.emit("error",qe),dt.nextTick(We,qe),Be=!1),Be}function ee(Wt,$t,ft){return Wt.objectMode||Wt.decodeStrings===!1||typeof $t!="string"||($t=un.from($t,ft)),$t}function oe(Wt,$t,ft,We,Be,qe){if(!ft){var et=ee($t,We,Be);We!==et&&(ft=!0,Be="buffer",We=et)}var He=$t.objectMode?1:We.length;$t.length+=He;var Xe=$t.length<$t.highWaterMark;if(Xe||($t.needDrain=!0),$t.writing||$t.corked){var Re=$t.lastBufferedRequest;$t.lastBufferedRequest={chunk:We,encoding:Be,isBuf:ft,callback:qe,next:null},Re?Re.next=$t.lastBufferedRequest:$t.bufferedRequest=$t.lastBufferedRequest,$t.bufferedRequestCount+=1}else ie(Wt,$t,!1,He,We,Be,qe);return Xe}function ie(Wt,$t,ft,We,Be,qe,et){$t.writelen=We,$t.writecb=et,$t.writing=!0,$t.sync=!0,ft?Wt._writev(Be,$t.onwrite):Wt._write(Be,qe,$t.onwrite),$t.sync=!1}function se(Wt,$t,ft,We,Be){--$t.pendingcb,ft?(dt.nextTick(Be,We),dt.nextTick(Qe,Wt,$t),Wt._writableState.errorEmitted=!0,Wt.emit("error",We)):(Be(We),Wt._writableState.errorEmitted=!0,Wt.emit("error",We),Qe(Wt,$t))}function le(Wt){Wt.writing=!1,Wt.writecb=null,Wt.length-=Wt.writelen,Wt.writelen=0}function ye(Wt,$t){var ft=Wt._writableState,We=ft.sync,Be=ft.writecb;if(le(ft),$t)se(Wt,ft,We,$t,Be);else{var qe=Ne(ft);qe||ft.corked||ft.bufferProcessing||!ft.bufferedRequest||ke(Wt,ft),We?_t(we,Wt,ft,qe,Be):we(Wt,ft,qe,Be)}}function we(Wt,$t,ft,We){ft||Ce(Wt,$t),$t.pendingcb--,We(),Qe(Wt,$t)}function Ce(Wt,$t){$t.length===0&&$t.needDrain&&($t.needDrain=!1,Wt.emit("drain"))}function ke(Wt,$t){$t.bufferProcessing=!0;var ft=$t.bufferedRequest;if(Wt._writev&&ft&&ft.next){var We=$t.bufferedRequestCount,Be=new Array(We),qe=$t.corkedRequestsFree;qe.entry=ft;for(var et=0,He=!0;ft;)Be[et]=ft,ft.isBuf||(He=!1),ft=ft.next,et+=1;Be.allBuffers=He,ie(Wt,$t,!0,$t.length,Be,"",qe.finish),$t.pendingcb++,$t.lastBufferedRequest=null,qe.next?($t.corkedRequestsFree=qe.next,qe.next=null):$t.corkedRequestsFree=new Se($t),$t.bufferedRequestCount=0}else{for(;ft;){var Xe=ft.chunk,Re=ft.encoding,Ae=ft.callback;if(ie(Wt,$t,!1,$t.objectMode?1:Xe.length,Xe,Re,Ae),ft=ft.next,$t.bufferedRequestCount--,$t.writing)break}ft===null&&($t.lastBufferedRequest=null)}$t.bufferedRequest=ft,$t.bufferProcessing=!1}function Ne(Wt){return Wt.ending&&Wt.length===0&&Wt.bufferedRequest===null&&!Wt.finished&&!Wt.writing}function je(Wt,$t){Wt._final(function(ft){$t.pendingcb--,ft&&Wt.emit("error",ft),$t.prefinished=!0,Wt.emit("prefinish"),Qe(Wt,$t)})}function Ve(Wt,$t){$t.prefinished||$t.finalCalled||(typeof Wt._final=="function"?($t.pendingcb++,$t.finalCalled=!0,dt.nextTick(je,Wt,$t)):($t.prefinished=!0,Wt.emit("prefinish")))}function Qe(Wt,$t){var ft=Ne($t);return ft&&(Ve(Wt,$t),$t.pendingcb===0&&($t.finished=!0,Wt.emit("finish"))),ft}function Ge(Wt,$t,ft){$t.ending=!0,Qe(Wt,$t),ft&&($t.finished?dt.nextTick(ft):Wt.once("finish",ft)),$t.ended=!0,Wt.writable=!1}function mt(Wt,$t,ft){var We=Wt.entry;for(Wt.entry=null;We;){var Be=We.callback;$t.pendingcb--,Be(ft),We=We.next}$t.corkedRequestsFree?$t.corkedRequestsFree.next=Wt:$t.corkedRequestsFree=Wt}var ct=me("babel-runtime/core-js/object/define-property"),Ct=he(ct),it=me("babel-runtime/core-js/symbol/has-instance"),St=he(it),ut=me("babel-runtime/core-js/symbol"),Ft=he(ut),ht=me("babel-runtime/core-js/set-immediate"),rt=he(ht),dt=me("process-nextick-args");Ie.exports=de;var yt,_t=!be.browser&&["v0.10","v0.9."].indexOf(be.version.slice(0,5))>-1?rt.default:dt.nextTick;de.WritableState=ve;var vt=me("core-util-is");vt.inherits=me("inherits");var Bt={deprecate:me("util-deprecate")},jt=me("./internal/streams/stream"),un=me("safe-buffer").Buffer,Kt=Pe.Uint8Array||function(){},xn=me("./internal/streams/destroy");vt.inherits(de,jt),ve.prototype.getBuffer=function(){for(var Wt=this.bufferedRequest,$t=[];Wt;)$t.push(Wt),Wt=Wt.next;return $t},function(){try{Object.defineProperty(ve.prototype,"buffer",{get:Bt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(Wt){}}();var Ut;typeof Ft.default=="function"&&St.default&&typeof Function.prototype[St.default]=="function"?(Ut=Function.prototype[St.default],(0,Ct.default)(de,St.default,{value:function(Wt){return!!Ut.call(this,Wt)||this===de&&Wt&&Wt._writableState instanceof ve}})):Ut=function(Wt){return Wt instanceof this},de.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},de.prototype.write=function(Wt,$t,ft){var We=this._writableState,Be=!1,qe=!We.objectMode&&ge(Wt);return qe&&!un.isBuffer(Wt)&&(Wt=xe(Wt)),typeof $t=="function"&&(ft=$t,$t=null),qe?$t="buffer":$t||($t=We.defaultEncoding),typeof ft!="function"&&(ft=ce),We.ended?ue(this,ft):(qe||z(this,We,Wt,ft))&&(We.pendingcb++,Be=oe(this,We,qe,Wt,$t,ft)),Be},de.prototype.cork=function(){this._writableState.corked++},de.prototype.uncork=function(){var Wt=this._writableState;Wt.corked&&(Wt.corked--,Wt.writing||Wt.corked||Wt.finished||Wt.bufferProcessing||!Wt.bufferedRequest||ke(this,Wt))},de.prototype.setDefaultEncoding=function(Wt){if(typeof Wt=="string"&&(Wt=Wt.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Wt+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+Wt);return this._writableState.defaultEncoding=Wt,this},Object.defineProperty(de.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),de.prototype._write=function(Wt,$t,ft){ft(new Error("_write() is not implemented"))},de.prototype._writev=null,de.prototype.end=function(Wt,$t,ft){var We=this._writableState;typeof Wt=="function"?(ft=Wt,Wt=null,$t=null):typeof $t=="function"&&(ft=$t,$t=null),Wt!=null&&this.write(Wt,$t),We.corked&&(We.corked=1,this.uncork()),We.ending||We.finished||Ge(this,We,ft)},Object.defineProperty(de.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(Wt){this._writableState&&(this._writableState.destroyed=Wt)}}),de.prototype.destroy=xn.destroy,de.prototype._undestroy=xn.undestroy,de.prototype._destroy=function(Wt,$t){this.end(),$t(Wt)}}).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,Ie,Te){"use strict";function be(xe,ge){if(!(xe instanceof ge))throw new TypeError("Cannot call a class as a function")}function Pe(xe,ge,ce){xe.copy(ge,ce)}var he=me("safe-buffer").Buffer,Se=me("util");Ie.exports=function(){function xe(){be(this,xe),this.head=null,this.tail=null,this.length=0}return xe.prototype.push=function(ge){var ce={data:ge,next:null};this.length>0?this.tail.next=ce:this.head=ce,this.tail=ce,++this.length},xe.prototype.unshift=function(ge){var ce={data:ge,next:this.head};this.length===0&&(this.tail=ce),this.head=ce,++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 ce=this.head,ve=""+ce.data;ce=ce.next;)ve+=ge+ce.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 ce=he.allocUnsafe(ge>>>0),ve=this.head,de=0;ve;)Pe(ve.data,ce,de),de+=ve.data.length,ve=ve.next;return ce},xe}(),Se&&Se.inspect&&Se.inspect.custom&&(Ie.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,Ie,Te){"use strict";function be(xe,ge){var ce=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(ue){!ge&&ue?(Se.nextTick(he,ce,ue),ce._writableState&&(ce._writableState.errorEmitted=!0)):ge&&ge(ue)}),this)}function Pe(){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");Ie.exports={destroy:be,undestroy:Pe}},{"process-nextick-args":172}],186:[function(me,Ie,Te){"use strict";Ie.exports=me("events").EventEmitter},{events:158}],187:[function(me,Ie,Te){Ie.exports=me("./readable").PassThrough},{"./readable":188}],188:[function(me,Ie,Te){Te=Ie.exports=me("./lib/_stream_readable.js"),Te.Stream=Te,Te.Readable=Te,Te.Writable=me("./lib/_stream_writable.js"),Te.Duplex=me("./lib/_stream_duplex.js"),Te.Transform=me("./lib/_stream_transform.js"),Te.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,Ie,Te){Ie.exports=me("./readable").Transform},{"./readable":188}],190:[function(me,Ie,Te){Ie.exports=me("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":183}],191:[function(me,Ie,Te){var be=function(){return this}()||Function("return this")(),Pe=be.regeneratorRuntime&&Object.getOwnPropertyNames(be).indexOf("regeneratorRuntime")>=0,he=Pe&&be.regeneratorRuntime;if(be.regeneratorRuntime=void 0,Ie.exports=me("./runtime"),Pe)be.regeneratorRuntime=he;else try{delete be.regeneratorRuntime}catch(Se){be.regeneratorRuntime=void 0}},{"./runtime":192}],192:[function(me,Ie,Te){(function(be){"use strict";function Pe(rt,dt,yt,_t){var vt=dt&&dt.prototype instanceof Se?dt:Se,Bt=Object.create(vt.prototype),jt=new oe(_t||[]);return Bt._invoke=de(rt,yt,jt),Bt}function he(rt,dt,yt){try{return{type:"normal",arg:rt.call(dt,yt)}}catch(_t){return{type:"throw",arg:_t}}}function Se(){}function xe(){}function ge(){}function ce(rt){["next","throw","return"].forEach(function(dt){rt[dt]=function(yt){return this._invoke(dt,yt)}})}function ve(rt){function dt(vt,Bt,jt,un){var Kt=he(rt[vt],rt,Bt);if(Kt.type!=="throw"){var xn=Kt.arg,Ut=xn.value;return Ut&&typeof Ut=="object"&&we.call(Ut,"__await")?Promise.resolve(Ut.__await).then(function(Wt){dt("next",Wt,jt,un)},function(Wt){dt("throw",Wt,jt,un)}):Promise.resolve(Ut).then(function(Wt){xn.value=Wt,jt(xn)},un)}un(Kt.arg)}function yt(vt,Bt){function jt(){return new Promise(function(un,Kt){dt(vt,Bt,un,Kt)})}return _t=_t?_t.then(jt,jt):jt()}var _t;this._invoke=yt}function de(rt,dt,yt){var _t=Ge;return function(vt,Bt){if(_t===ct)throw new Error("Generator is already running");if(_t===Ct){if(vt==="throw")throw Bt;return se()}for(yt.method=vt,yt.arg=Bt;;){var jt=yt.delegate;if(jt){var un=ue(jt,yt);if(un){if(un===it)continue;return un}}if(yt.method==="next")yt.sent=yt._sent=yt.arg;else if(yt.method==="throw"){if(_t===Ge)throw _t=Ct,yt.arg;yt.dispatchException(yt.arg)}else yt.method==="return"&&yt.abrupt("return",yt.arg);_t=ct;var Kt=he(rt,dt,yt);if(Kt.type==="normal"){if(_t=yt.done?Ct:mt,Kt.arg===it)continue;return{value:Kt.arg,done:yt.done}}Kt.type==="throw"&&(_t=Ct,yt.method="throw",yt.arg=Kt.arg)}}}function ue(rt,dt){var yt=rt.iterator[dt.method];if(yt===le){if(dt.delegate=null,dt.method==="throw"){if(rt.iterator.return&&(dt.method="return",dt.arg=le,ue(rt,dt),dt.method==="throw"))return it;dt.method="throw",dt.arg=new TypeError("The iterator does not provide a 'throw' method")}return it}var _t=he(yt,rt.iterator,dt.arg);if(_t.type==="throw")return dt.method="throw",dt.arg=_t.arg,dt.delegate=null,it;var vt=_t.arg;return vt?vt.done?(dt[rt.resultName]=vt.value,dt.next=rt.nextLoc,dt.method!=="return"&&(dt.method="next",dt.arg=le),dt.delegate=null,it):vt:(dt.method="throw",dt.arg=new TypeError("iterator result is not an object"),dt.delegate=null,it)}function z(rt){var dt={tryLoc:rt[0]};1 in rt&&(dt.catchLoc=rt[1]),2 in rt&&(dt.finallyLoc=rt[2],dt.afterLoc=rt[3]),this.tryEntries.push(dt)}function ee(rt){var dt=rt.completion||{};dt.type="normal",delete dt.arg,rt.completion=dt}function oe(rt){this.tryEntries=[{tryLoc:"root"}],rt.forEach(z,this),this.reset(!0)}function ie(rt){if(rt){var dt=rt[ke];if(dt)return dt.call(rt);if(typeof rt.next=="function")return rt;if(!isNaN(rt.length)){var yt=-1,_t=function vt(){for(;++yt<rt.length;)if(we.call(rt,yt))return vt.value=rt[yt],vt.done=!1,vt;return vt.value=le,vt.done=!0,vt};return _t.next=_t}}return{next:se}}function se(){return{value:le,done:!0}}var le,ye=Object.prototype,we=ye.hasOwnProperty,Ce=typeof Symbol=="function"?Symbol:{},ke=Ce.iterator||"@@iterator",Ne=Ce.asyncIterator||"@@asyncIterator",je=Ce.toStringTag||"@@toStringTag",Ve=typeof Ie=="object",Qe=be.regeneratorRuntime;if(Qe)return void(Ve&&(Ie.exports=Qe));Qe=be.regeneratorRuntime=Ve?Ie.exports:{},Qe.wrap=Pe;var Ge="suspendedStart",mt="suspendedYield",ct="executing",Ct="completed",it={},St={};St[ke]=function(){return this};var ut=Object.getPrototypeOf,Ft=ut&&ut(ut(ie([])));Ft&&Ft!==ye&&we.call(Ft,ke)&&(St=Ft);var ht=ge.prototype=Se.prototype=Object.create(St);xe.prototype=ht.constructor=ge,ge.constructor=xe,ge[je]=xe.displayName="GeneratorFunction",Qe.isGeneratorFunction=function(rt){var dt=typeof rt=="function"&&rt.constructor;return!!dt&&(dt===xe||(dt.displayName||dt.name)==="GeneratorFunction")},Qe.mark=function(rt){return Object.setPrototypeOf?Object.setPrototypeOf(rt,ge):(rt.__proto__=ge,je in rt||(rt[je]="GeneratorFunction")),rt.prototype=Object.create(ht),rt},Qe.awrap=function(rt){return{__await:rt}},ce(ve.prototype),ve.prototype[Ne]=function(){return this},Qe.AsyncIterator=ve,Qe.async=function(rt,dt,yt,_t){var vt=new ve(Pe(rt,dt,yt,_t));return Qe.isGeneratorFunction(dt)?vt:vt.next().then(function(Bt){return Bt.done?Bt.value:vt.next()})},ce(ht),ht[je]="Generator",ht[ke]=function(){return this},ht.toString=function(){return"[object Generator]"},Qe.keys=function(rt){var dt=[];for(var yt in rt)dt.push(yt);return dt.reverse(),function _t(){for(;dt.length;){var vt=dt.pop();if(vt in rt)return _t.value=vt,_t.done=!1,_t}return _t.done=!0,_t}},Qe.values=ie,oe.prototype={constructor:oe,reset:function(rt){if(this.prev=0,this.next=0,this.sent=this._sent=le,this.done=!1,this.delegate=null,this.method="next",this.arg=le,this.tryEntries.forEach(ee),!rt)for(var dt in this)dt.charAt(0)==="t"&&we.call(this,dt)&&!isNaN(+dt.slice(1))&&(this[dt]=le)},stop:function(){this.done=!0;var rt=this.tryEntries[0],dt=rt.completion;if(dt.type==="throw")throw dt.arg;return this.rval},dispatchException:function(rt){function dt(Kt,xn){return Bt.type="throw",Bt.arg=rt,yt.next=Kt,xn&&(yt.method="next",yt.arg=le),!!xn}if(this.done)throw rt;for(var yt=this,_t=this.tryEntries.length-1;_t>=0;--_t){var vt=this.tryEntries[_t],Bt=vt.completion;if(vt.tryLoc==="root")return dt("end");if(vt.tryLoc<=this.prev){var jt=we.call(vt,"catchLoc"),un=we.call(vt,"finallyLoc");if(jt&&un){if(this.prev<vt.catchLoc)return dt(vt.catchLoc,!0);if(this.prev<vt.finallyLoc)return dt(vt.finallyLoc)}else if(jt){if(this.prev<vt.catchLoc)return dt(vt.catchLoc,!0)}else{if(!un)throw new Error("try statement without catch or finally");if(this.prev<vt.finallyLoc)return dt(vt.finallyLoc)}}}},abrupt:function(rt,dt){for(var yt=this.tryEntries.length-1;yt>=0;--yt){var _t=this.tryEntries[yt];if(_t.tryLoc<=this.prev&&we.call(_t,"finallyLoc")&&this.prev<_t.finallyLoc){var vt=_t;break}}vt&&(rt==="break"||rt==="continue")&&vt.tryLoc<=dt&&dt<=vt.finallyLoc&&(vt=null);var Bt=vt?vt.completion:{};return Bt.type=rt,Bt.arg=dt,vt?(this.method="next",this.next=vt.finallyLoc,it):this.complete(Bt)},complete:function(rt,dt){if(rt.type==="throw")throw rt.arg;return rt.type==="break"||rt.type==="continue"?this.next=rt.arg:rt.type==="return"?(this.rval=this.arg=rt.arg,this.method="return",this.next="end"):rt.type==="normal"&&dt&&(this.next=dt),it},finish:function(rt){for(var dt=this.tryEntries.length-1;dt>=0;--dt){var yt=this.tryEntries[dt];if(yt.finallyLoc===rt)return this.complete(yt.completion,yt.afterLoc),ee(yt),it}},catch:function(rt){for(var dt=this.tryEntries.length-1;dt>=0;--dt){var yt=this.tryEntries[dt];if(yt.tryLoc===rt){var _t=yt.completion;if(_t.type==="throw"){var vt=_t.arg;ee(yt)}return vt}}throw new Error("illegal catch attempt")},delegateYield:function(rt,dt,yt){return this.delegate={iterator:ie(rt),resultName:dt,nextLoc:yt},this.method==="next"&&(this.arg=le),it}}})(function(){return this}()||Function("return this")())},{}],193:[function(me,Ie,Te){function be(xe,ge){for(var ce in xe)ge[ce]=xe[ce]}function Pe(xe,ge,ce){return Se(xe,ge,ce)}var he=me("buffer"),Se=he.Buffer;Se.from&&Se.alloc&&Se.allocUnsafe&&Se.allocUnsafeSlow?Ie.exports=he:(be(he,Te),Te.Buffer=Pe),be(Se,Pe),Pe.from=function(xe,ge,ce){if(typeof xe=="number")throw new TypeError("Argument must not be a number");return Se(xe,ge,ce)},Pe.alloc=function(xe,ge,ce){if(typeof xe!="number")throw new TypeError("Argument must be a number");var ve=Se(xe);return ge!==void 0?typeof ce=="string"?ve.fill(ge,ce):ve.fill(ge):ve.fill(0),ve},Pe.allocUnsafe=function(xe){if(typeof xe!="number")throw new TypeError("Argument must be a number");return Se(xe)},Pe.allocUnsafeSlow=function(xe){if(typeof xe!="number")throw new TypeError("Argument must be a number");return he.SlowBuffer(xe)}},{buffer:38}],194:[function(me,Ie,Te){(function(be){"use strict";function Pe(se){return se&&se.__esModule?se:{default:se}}var he=me("babel-runtime/core-js/string/from-code-point"),Se=Pe(he),xe=me("babel-runtime/core-js/json/stringify"),ge=Pe(xe),ce=me("babel-runtime/helpers/typeof"),ve=Pe(ce),de=me("babel-runtime/core-js/object/define-property"),ue=Pe(de),z=me("babel-runtime/core-js/object/keys"),ee=Pe(z),oe=me("babel-runtime/core-js/object/create"),ie=Pe(oe);(function(se){function le(Ke,Ze){if(!(this instanceof le))return new le(Ke,Ze);var lt=this;we(lt),lt.q=lt.c="",lt.bufferCheckPosition=se.MAX_BUFFER_LENGTH,lt.opt=Ze||{},lt.opt.lowercase=lt.opt.lowercase||lt.opt.lowercasetags,lt.looseCase=lt.opt.lowercase?"toLowerCase":"toUpperCase",lt.tags=[],lt.closed=lt.closedRoot=lt.sawRoot=!1,lt.tag=lt.error=null,lt.strict=!!Ke,lt.noscript=!(!Ke&&!lt.opt.noscript),lt.state=Ae.BEGIN,lt.strictEntities=lt.opt.strictEntities,lt.ENTITIES=lt.strictEntities?(0,ie.default)(se.XML_ENTITIES):(0,ie.default)(se.ENTITIES),lt.attribList=[],lt.opt.xmlns&&(lt.ns=(0,ie.default)(qe)),lt.trackPosition=lt.opt.position!==!1,lt.trackPosition&&(lt.position=lt.line=lt.column=0),ct(lt,"onready")}function ye(Ke){for(var Ze=Math.max(se.MAX_BUFFER_LENGTH,10),lt=0,xt=0,tn=xn.length;xt<tn;xt++){var en=Ke[xn[xt]].length;if(en>Ze)switch(xn[xt]){case"textNode":it(Ke);break;case"cdata":Ct(Ke,"oncdata",Ke.cdata),Ke.cdata="";break;case"script":Ct(Ke,"onscript",Ke.script),Ke.script="";break;default:ut(Ke,"Max buffer length exceeded: "+xn[xt])}lt=Math.max(lt,en)}var Jt=se.MAX_BUFFER_LENGTH-lt;Ke.bufferCheckPosition=Jt+Ke.position}function we(Ke){for(var Ze=0,lt=xn.length;Ze<lt;Ze++)Ke[xn[Ze]]=""}function Ce(Ke){it(Ke),Ke.cdata!==""&&(Ct(Ke,"oncdata",Ke.cdata),Ke.cdata=""),Ke.script!==""&&(Ct(Ke,"onscript",Ke.script),Ke.script="")}function ke(Ke,Ze){return new Ne(Ke,Ze)}function Ne(Ke,Ze){if(!(this instanceof Ne))return new Ne(Ke,Ze);Ut.apply(this),this._parser=new le(Ke,Ze),this.writable=!0,this.readable=!0;var lt=this;this._parser.onend=function(){lt.emit("end")},this._parser.onerror=function(xt){lt.emit("error",xt),lt._parser.error=null},this._decoder=null,Wt.forEach(function(xt){(0,ue.default)(lt,"on"+xt,{get:function(){return lt._parser["on"+xt]},set:function(tn){if(!tn)return lt.removeAllListeners(xt),lt._parser["on"+xt]=tn,tn;lt.on(xt,tn)},enumerable:!0,configurable:!1})})}function je(Ke){return Ke===" "||Ke===`
|
|
|
`||Ke==="\r"||Ke===" "}function Ve(Ke){return Ke==='"'||Ke==="'"}function Qe(Ke){return Ke===">"||je(Ke)}function Ge(Ke,Ze){return Ke.test(Ze)}function mt(Ke,Ze){return!Ge(Ke,Ze)}function ct(Ke,Ze,lt){Ke[Ze]&&Ke[Ze](lt)}function Ct(Ke,Ze,lt){Ke.textNode&&it(Ke),ct(Ke,Ze,lt)}function it(Ke){Ke.textNode=St(Ke.opt,Ke.textNode),Ke.textNode&&ct(Ke,"ontext",Ke.textNode),Ke.textNode=""}function St(Ke,Ze){return Ke.trim&&(Ze=Ze.trim()),Ke.normalize&&(Ze=Ze.replace(/\s+/g," ")),Ze}function ut(Ke,Ze){return it(Ke),Ke.trackPosition&&(Ze+=`
|
|
|
Line: `+Ke.line+`
|
|
|
Column: `+Ke.column+`
|
|
|
Char: `+Ke.c),Ze=new Error(Ze),Ke.error=Ze,ct(Ke,"onerror",Ze),Ke}function Ft(Ke){return Ke.sawRoot&&!Ke.closedRoot&&ht(Ke,"Unclosed root tag"),Ke.state!==Ae.BEGIN&&Ke.state!==Ae.BEGIN_WHITESPACE&&Ke.state!==Ae.TEXT&&ut(Ke,"Unexpected end"),it(Ke),Ke.c="",Ke.closed=!0,ct(Ke,"onend"),le.call(Ke,Ke.strict,Ke.opt),Ke}function ht(Ke,Ze){if((Ke===void 0?"undefined":(0,ve.default)(Ke))!=="object"||!(Ke instanceof le))throw new Error("bad call to strictFail");Ke.strict&&ut(Ke,Ze)}function rt(Ke){Ke.strict||(Ke.tagName=Ke.tagName[Ke.looseCase]());var Ze=Ke.tags[Ke.tags.length-1]||Ke,lt=Ke.tag={name:Ke.tagName,attributes:{}};Ke.opt.xmlns&&(lt.ns=Ze.ns),Ke.attribList.length=0,Ct(Ke,"onopentagstart",lt)}function dt(Ke,Ze){var lt=Ke.indexOf(":"),xt=lt<0?["",Ke]:Ke.split(":"),tn=xt[0],en=xt[1];return Ze&&Ke==="xmlns"&&(tn="xmlns",en=""),{prefix:tn,local:en}}function yt(Ke){if(Ke.strict||(Ke.attribName=Ke.attribName[Ke.looseCase]()),Ke.attribList.indexOf(Ke.attribName)!==-1||Ke.tag.attributes.hasOwnProperty(Ke.attribName))return void(Ke.attribName=Ke.attribValue="");if(Ke.opt.xmlns){var Ze=dt(Ke.attribName,!0),lt=Ze.prefix,xt=Ze.local;if(lt==="xmlns")if(xt==="xml"&&Ke.attribValue!==We)ht(Ke,"xml: prefix must be bound to "+We+`
|
|
|
Actual: `+Ke.attribValue);else if(xt==="xmlns"&&Ke.attribValue!==Be)ht(Ke,"xmlns: prefix must be bound to "+Be+`
|
|
|
Actual: `+Ke.attribValue);else{var tn=Ke.tag,en=Ke.tags[Ke.tags.length-1]||Ke;tn.ns===en.ns&&(tn.ns=(0,ie.default)(en.ns)),tn.ns[xt]=Ke.attribValue}Ke.attribList.push([Ke.attribName,Ke.attribValue])}else Ke.tag.attributes[Ke.attribName]=Ke.attribValue,Ct(Ke,"onattribute",{name:Ke.attribName,value:Ke.attribValue});Ke.attribName=Ke.attribValue=""}function _t(Ke,Ze){if(Ke.opt.xmlns){var lt=Ke.tag,xt=dt(Ke.tagName);lt.prefix=xt.prefix,lt.local=xt.local,lt.uri=lt.ns[xt.prefix]||"",lt.prefix&&!lt.uri&&(ht(Ke,"Unbound namespace prefix: "+(0,ge.default)(Ke.tagName)),lt.uri=xt.prefix);var tn=Ke.tags[Ke.tags.length-1]||Ke;lt.ns&&tn.ns!==lt.ns&&(0,ee.default)(lt.ns).forEach(function(Di){Ct(Ke,"onopennamespace",{prefix:Di,uri:lt.ns[Di]})});for(var en=0,Jt=Ke.attribList.length;en<Jt;en++){var gn=Ke.attribList[en],Mn=gn[0],yn=gn[1],kn=dt(Mn,!0),$n=kn.prefix,An=kn.local,oi=$n===""?"":lt.ns[$n]||"",ai={name:Mn,value:yn,prefix:$n,local:An,uri:oi};$n&&$n!=="xmlns"&&!oi&&(ht(Ke,"Unbound namespace prefix: "+(0,ge.default)($n)),ai.uri=$n),Ke.tag.attributes[Mn]=ai,Ct(Ke,"onattribute",ai)}Ke.attribList.length=0}Ke.tag.isSelfClosing=!!Ze,Ke.sawRoot=!0,Ke.tags.push(Ke.tag),Ct(Ke,"onopentag",Ke.tag),Ze||(Ke.noscript||Ke.tagName.toLowerCase()!=="script"?Ke.state=Ae.TEXT:Ke.state=Ae.SCRIPT,Ke.tag=null,Ke.tagName=""),Ke.attribName=Ke.attribValue="",Ke.attribList.length=0}function vt(Ke){if(!Ke.tagName)return ht(Ke,"Weird empty close tag."),Ke.textNode+="</>",void(Ke.state=Ae.TEXT);if(Ke.script){if(Ke.tagName!=="script")return Ke.script+="</"+Ke.tagName+">",Ke.tagName="",void(Ke.state=Ae.SCRIPT);Ct(Ke,"onscript",Ke.script),Ke.script=""}var Ze=Ke.tags.length,lt=Ke.tagName;Ke.strict||(lt=lt[Ke.looseCase]());for(var xt=lt;Ze--&&Ke.tags[Ze].name!==xt;)ht(Ke,"Unexpected close tag");if(Ze<0)return ht(Ke,"Unmatched closing tag: "+Ke.tagName),Ke.textNode+="</"+Ke.tagName+">",void(Ke.state=Ae.TEXT);Ke.tagName=lt;for(var tn=Ke.tags.length;tn-- >Ze;){var en=Ke.tag=Ke.tags.pop();Ke.tagName=Ke.tag.name,Ct(Ke,"onclosetag",Ke.tagName);var Jt={};for(var gn in en.ns)Jt[gn]=en.ns[gn];var Mn=Ke.tags[Ke.tags.length-1]||Ke;Ke.opt.xmlns&&en.ns!==Mn.ns&&(0,ee.default)(en.ns).forEach(function(yn){var kn=en.ns[yn];Ct(Ke,"onclosenamespace",{prefix:yn,uri:kn})})}Ze===0&&(Ke.closedRoot=!0),Ke.tagName=Ke.attribValue=Ke.attribName="",Ke.attribList.length=0,Ke.state=Ae.TEXT}function Bt(Ke){var Ze,lt=Ke.entity,xt=lt.toLowerCase(),tn="";return Ke.ENTITIES[lt]?Ke.ENTITIES[lt]:Ke.ENTITIES[xt]?Ke.ENTITIES[xt]:(lt=xt,lt.charAt(0)==="#"&&(lt.charAt(1)==="x"?(lt=lt.slice(2),Ze=parseInt(lt,16),tn=Ze.toString(16)):(lt=lt.slice(1),Ze=parseInt(lt,10),tn=Ze.toString(10))),lt=lt.replace(/^0+/,""),isNaN(Ze)||tn.toLowerCase()!==lt?(ht(Ke,"Invalid character entity"),"&"+Ke.entity+";"):(0,Se.default)(Ze))}function jt(Ke,Ze){Ze==="<"?(Ke.state=Ae.OPEN_WAKA,Ke.startTagPosition=Ke.position):je(Ze)||(ht(Ke,"Non-whitespace before first tag."),Ke.textNode=Ze,Ke.state=Ae.TEXT)}function un(Ke,Ze){var lt="";return Ze<Ke.length&&(lt=Ke.charAt(Ze)),lt}function Kt(Ke){var Ze=this;if(this.error)throw this.error;if(Ze.closed)return ut(Ze,"Cannot write after close. Assign an onready handler.");if(Ke===null)return Ft(Ze);(Ke===void 0?"undefined":(0,ve.default)(Ke))==="object"&&(Ke=Ke.toString());for(var lt=0,xt="";xt=un(Ke,lt++),Ze.c=xt,!!xt;)switch(Ze.trackPosition&&(Ze.position++,xt===`
|
|
|
`?(Ze.line++,Ze.column=0):Ze.column++),Ze.state){case Ae.BEGIN:if(Ze.state=Ae.BEGIN_WHITESPACE,xt==="\uFEFF")continue;jt(Ze,xt);continue;case Ae.BEGIN_WHITESPACE:jt(Ze,xt);continue;case Ae.TEXT:if(Ze.sawRoot&&!Ze.closedRoot){for(var tn=lt-1;xt&&xt!=="<"&&xt!=="&";)(xt=un(Ke,lt++))&&Ze.trackPosition&&(Ze.position++,xt===`
|
|
|
`?(Ze.line++,Ze.column=0):Ze.column++);Ze.textNode+=Ke.substring(tn,lt-1)}xt!=="<"||Ze.sawRoot&&Ze.closedRoot&&!Ze.strict?(je(xt)||Ze.sawRoot&&!Ze.closedRoot||ht(Ze,"Text data outside of root node."),xt==="&"?Ze.state=Ae.TEXT_ENTITY:Ze.textNode+=xt):(Ze.state=Ae.OPEN_WAKA,Ze.startTagPosition=Ze.position);continue;case Ae.SCRIPT:xt==="<"?Ze.state=Ae.SCRIPT_ENDING:Ze.script+=xt;continue;case Ae.SCRIPT_ENDING:xt==="/"?Ze.state=Ae.CLOSE_TAG:(Ze.script+="<"+xt,Ze.state=Ae.SCRIPT);continue;case Ae.OPEN_WAKA:if(xt==="!")Ze.state=Ae.SGML_DECL,Ze.sgmlDecl="";else if(!je(xt))if(Ge(et,xt))Ze.state=Ae.OPEN_TAG,Ze.tagName=xt;else if(xt==="/")Ze.state=Ae.CLOSE_TAG,Ze.tagName="";else if(xt==="?")Ze.state=Ae.PROC_INST,Ze.procInstName=Ze.procInstBody="";else{if(ht(Ze,"Unencoded <"),Ze.startTagPosition+1<Ze.position){var en=Ze.position-Ze.startTagPosition;xt=new Array(en).join(" ")+xt}Ze.textNode+="<"+xt,Ze.state=Ae.TEXT}continue;case Ae.SGML_DECL:(Ze.sgmlDecl+xt).toUpperCase()===$t?(Ct(Ze,"onopencdata"),Ze.state=Ae.CDATA,Ze.sgmlDecl="",Ze.cdata=""):Ze.sgmlDecl+xt==="--"?(Ze.state=Ae.COMMENT,Ze.comment="",Ze.sgmlDecl=""):(Ze.sgmlDecl+xt).toUpperCase()===ft?(Ze.state=Ae.DOCTYPE,(Ze.doctype||Ze.sawRoot)&&ht(Ze,"Inappropriately located doctype declaration"),Ze.doctype="",Ze.sgmlDecl=""):xt===">"?(Ct(Ze,"onsgmldeclaration",Ze.sgmlDecl),Ze.sgmlDecl="",Ze.state=Ae.TEXT):(Ve(xt)&&(Ze.state=Ae.SGML_DECL_QUOTED),Ze.sgmlDecl+=xt);continue;case Ae.SGML_DECL_QUOTED:xt===Ze.q&&(Ze.state=Ae.SGML_DECL,Ze.q=""),Ze.sgmlDecl+=xt;continue;case Ae.DOCTYPE:xt===">"?(Ze.state=Ae.TEXT,Ct(Ze,"ondoctype",Ze.doctype),Ze.doctype=!0):(Ze.doctype+=xt,xt==="["?Ze.state=Ae.DOCTYPE_DTD:Ve(xt)&&(Ze.state=Ae.DOCTYPE_QUOTED,Ze.q=xt));continue;case Ae.DOCTYPE_QUOTED:Ze.doctype+=xt,xt===Ze.q&&(Ze.q="",Ze.state=Ae.DOCTYPE);continue;case Ae.DOCTYPE_DTD:Ze.doctype+=xt,xt==="]"?Ze.state=Ae.DOCTYPE:Ve(xt)&&(Ze.state=Ae.DOCTYPE_DTD_QUOTED,Ze.q=xt);continue;case Ae.DOCTYPE_DTD_QUOTED:Ze.doctype+=xt,xt===Ze.q&&(Ze.state=Ae.DOCTYPE_DTD,Ze.q="");continue;case Ae.COMMENT:xt==="-"?Ze.state=Ae.COMMENT_ENDING:Ze.comment+=xt;continue;case Ae.COMMENT_ENDING:xt==="-"?(Ze.state=Ae.COMMENT_ENDED,Ze.comment=St(Ze.opt,Ze.comment),Ze.comment&&Ct(Ze,"oncomment",Ze.comment),Ze.comment=""):(Ze.comment+="-"+xt,Ze.state=Ae.COMMENT);continue;case Ae.COMMENT_ENDED:xt!==">"?(ht(Ze,"Malformed comment"),Ze.comment+="--"+xt,Ze.state=Ae.COMMENT):Ze.state=Ae.TEXT;continue;case Ae.CDATA:xt==="]"?Ze.state=Ae.CDATA_ENDING:Ze.cdata+=xt;continue;case Ae.CDATA_ENDING:xt==="]"?Ze.state=Ae.CDATA_ENDING_2:(Ze.cdata+="]"+xt,Ze.state=Ae.CDATA);continue;case Ae.CDATA_ENDING_2:xt===">"?(Ze.cdata&&Ct(Ze,"oncdata",Ze.cdata),Ct(Ze,"onclosecdata"),Ze.cdata="",Ze.state=Ae.TEXT):xt==="]"?Ze.cdata+="]":(Ze.cdata+="]]"+xt,Ze.state=Ae.CDATA);continue;case Ae.PROC_INST:xt==="?"?Ze.state=Ae.PROC_INST_ENDING:je(xt)?Ze.state=Ae.PROC_INST_BODY:Ze.procInstName+=xt;continue;case Ae.PROC_INST_BODY:if(!Ze.procInstBody&&je(xt))continue;xt==="?"?Ze.state=Ae.PROC_INST_ENDING:Ze.procInstBody+=xt;continue;case Ae.PROC_INST_ENDING:xt===">"?(Ct(Ze,"onprocessinginstruction",{name:Ze.procInstName,body:Ze.procInstBody}),Ze.procInstName=Ze.procInstBody="",Ze.state=Ae.TEXT):(Ze.procInstBody+="?"+xt,Ze.state=Ae.PROC_INST_BODY);continue;case Ae.OPEN_TAG:Ge(He,xt)?Ze.tagName+=xt:(rt(Ze),xt===">"?_t(Ze):xt==="/"?Ze.state=Ae.OPEN_TAG_SLASH:(je(xt)||ht(Ze,"Invalid character in tag name"),Ze.state=Ae.ATTRIB));continue;case Ae.OPEN_TAG_SLASH:xt===">"?(_t(Ze,!0),vt(Ze)):(ht(Ze,"Forward-slash in opening tag not followed by >"),Ze.state=Ae.ATTRIB);continue;case Ae.ATTRIB:if(je(xt))continue;xt===">"?_t(Ze):xt==="/"?Ze.state=Ae.OPEN_TAG_SLASH:Ge(et,xt)?(Ze.attribName=xt,Ze.attribValue="",Ze.state=Ae.ATTRIB_NAME):ht(Ze,"Invalid attribute name");continue;case Ae.ATTRIB_NAME:xt==="="?Ze.state=Ae.ATTRIB_VALUE:xt===">"?(ht(Ze,"Attribute without value"),Ze.attribValue=Ze.attribName,yt(Ze),_t(Ze)):je(xt)?Ze.state=Ae.ATTRIB_NAME_SAW_WHITE:Ge(He,xt)?Ze.attribName+=xt:ht(Ze,"Invalid attribute name");continue;case Ae.ATTRIB_NAME_SAW_WHITE:if(xt==="=")Ze.state=Ae.ATTRIB_VALUE;else{if(je(xt))continue;ht(Ze,"Attribute without value"),Ze.tag.attributes[Ze.attribName]="",Ze.attribValue="",Ct(Ze,"onattribute",{name:Ze.attribName,value:""}),Ze.attribName="",xt===">"?_t(Ze):Ge(et,xt)?(Ze.attribName=xt,Ze.state=Ae.ATTRIB_NAME):(ht(Ze,"Invalid attribute name"),Ze.state=Ae.ATTRIB)}continue;case Ae.ATTRIB_VALUE:if(je(xt))continue;Ve(xt)?(Ze.q=xt,Ze.state=Ae.ATTRIB_VALUE_QUOTED):(ht(Ze,"Unquoted attribute value"),Ze.state=Ae.ATTRIB_VALUE_UNQUOTED,Ze.attribValue=xt);continue;case Ae.ATTRIB_VALUE_QUOTED:if(xt!==Ze.q){xt==="&"?Ze.state=Ae.ATTRIB_VALUE_ENTITY_Q:Ze.attribValue+=xt;continue}yt(Ze),Ze.q="",Ze.state=Ae.ATTRIB_VALUE_CLOSED;continue;case Ae.ATTRIB_VALUE_CLOSED:je(xt)?Ze.state=Ae.ATTRIB:xt===">"?_t(Ze):xt==="/"?Ze.state=Ae.OPEN_TAG_SLASH:Ge(et,xt)?(ht(Ze,"No whitespace between attributes"),Ze.attribName=xt,Ze.attribValue="",Ze.state=Ae.ATTRIB_NAME):ht(Ze,"Invalid attribute name");continue;case Ae.ATTRIB_VALUE_UNQUOTED:if(!Qe(xt)){xt==="&"?Ze.state=Ae.ATTRIB_VALUE_ENTITY_U:Ze.attribValue+=xt;continue}yt(Ze),xt===">"?_t(Ze):Ze.state=Ae.ATTRIB;continue;case Ae.CLOSE_TAG:if(Ze.tagName)xt===">"?vt(Ze):Ge(He,xt)?Ze.tagName+=xt:Ze.script?(Ze.script+="</"+Ze.tagName,Ze.tagName="",Ze.state=Ae.SCRIPT):(je(xt)||ht(Ze,"Invalid tagname in closing tag"),Ze.state=Ae.CLOSE_TAG_SAW_WHITE);else{if(je(xt))continue;mt(et,xt)?Ze.script?(Ze.script+="</"+xt,Ze.state=Ae.SCRIPT):ht(Ze,"Invalid tagname in closing tag."):Ze.tagName=xt}continue;case Ae.CLOSE_TAG_SAW_WHITE:if(je(xt))continue;xt===">"?vt(Ze):ht(Ze,"Invalid characters in closing tag");continue;case Ae.TEXT_ENTITY:case Ae.ATTRIB_VALUE_ENTITY_Q:case Ae.ATTRIB_VALUE_ENTITY_U:var Jt,gn;switch(Ze.state){case Ae.TEXT_ENTITY:Jt=Ae.TEXT,gn="textNode";break;case Ae.ATTRIB_VALUE_ENTITY_Q:Jt=Ae.ATTRIB_VALUE_QUOTED,gn="attribValue";break;case Ae.ATTRIB_VALUE_ENTITY_U:Jt=Ae.ATTRIB_VALUE_UNQUOTED,gn="attribValue"}xt===";"?(Ze[gn]+=Bt(Ze),Ze.entity="",Ze.state=Jt):Ge(Ze.entity.length?Re:Xe,xt)?Ze.entity+=xt:(ht(Ze,"Invalid character in entity name"),Ze[gn]+="&"+Ze.entity+xt,Ze.entity="",Ze.state=Jt);continue;default:throw new Error(Ze,"Unknown state: "+Ze.state)}return Ze.position>=Ze.bufferCheckPosition&&ye(Ze),Ze}se.parser=function(Ke,Ze){return new le(Ke,Ze)},se.SAXParser=le,se.SAXStream=Ne,se.createStream=ke,se.MAX_BUFFER_LENGTH=65536;var xn=["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(Ke){function Ze(){}return Ze.prototype=Ke,new Ze}),ee.default||(Object.keys=function(Ke){var Ze=[];for(var lt in Ke)Ke.hasOwnProperty(lt)&&Ze.push(lt);return Ze}),le.prototype={end:function(){Ft(this)},write:Kt,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){Ce(this)}};var Ut;try{Ut=me("stream").Stream}catch(Ke){Ut=function(){}}var Wt=se.EVENTS.filter(function(Ke){return Ke!=="error"&&Ke!=="end"});Ne.prototype=(0,ie.default)(Ut.prototype,{constructor:{value:Ne}}),Ne.prototype.write=function(Ke){if(typeof be=="function"&&typeof be.isBuffer=="function"&&be.isBuffer(Ke)){if(!this._decoder){var Ze=me("string_decoder").StringDecoder;this._decoder=new Ze("utf8")}Ke=this._decoder.write(Ke)}return this._parser.write(Ke.toString()),this.emit("data",Ke),!0},Ne.prototype.end=function(Ke){return Ke&&Ke.length&&this.write(Ke),this._parser.end(),!0},Ne.prototype.on=function(Ke,Ze){var lt=this;return lt._parser["on"+Ke]||Wt.indexOf(Ke)===-1||(lt._parser["on"+Ke]=function(){var xt=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);xt.splice(0,0,Ke),lt.emit.apply(lt,xt)}),Ut.prototype.on.call(lt,Ke,Ze)};var $t="[CDATA[",ft="DOCTYPE",We="http://www.w3.org/XML/1998/namespace",Be="http://www.w3.org/2000/xmlns/",qe={xml:We,xmlns:Be},et=/[:_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-]/,Xe=/[#:_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]/,Re=/[#:_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-]/,Ae=0;se.STATE={BEGIN:Ae++,BEGIN_WHITESPACE:Ae++,TEXT:Ae++,TEXT_ENTITY:Ae++,OPEN_WAKA:Ae++,SGML_DECL:Ae++,SGML_DECL_QUOTED:Ae++,DOCTYPE:Ae++,DOCTYPE_QUOTED:Ae++,DOCTYPE_DTD:Ae++,DOCTYPE_DTD_QUOTED:Ae++,COMMENT_STARTING:Ae++,COMMENT:Ae++,COMMENT_ENDING:Ae++,COMMENT_ENDED:Ae++,CDATA:Ae++,CDATA_ENDING:Ae++,CDATA_ENDING_2:Ae++,PROC_INST:Ae++,PROC_INST_BODY:Ae++,PROC_INST_ENDING:Ae++,OPEN_TAG:Ae++,OPEN_TAG_SLASH:Ae++,ATTRIB:Ae++,ATTRIB_NAME:Ae++,ATTRIB_NAME_SAW_WHITE:Ae++,ATTRIB_VALUE:Ae++,ATTRIB_VALUE_QUOTED:Ae++,ATTRIB_VALUE_CLOSED:Ae++,ATTRIB_VALUE_UNQUOTED:Ae++,ATTRIB_VALUE_ENTITY_Q:Ae++,ATTRIB_VALUE_ENTITY_U:Ae++,CLOSE_TAG:Ae++,CLOSE_TAG_SAW_WHITE:Ae++,SCRIPT:Ae++,SCRIPT_ENDING:Ae++},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(Ke){var Ze=se.ENTITIES[Ke],lt=typeof Ze=="number"?String.fromCharCode(Ze):Ze;se.ENTITIES[Ke]=lt});for(var Ue in se.STATE)se.STATE[se.STATE[Ue]]=Ue;Ae=se.STATE,Se.default||function(){var Ke=String.fromCharCode,Ze=Math.floor,lt=function(){var xt,tn,en=[],Jt=-1,gn=arguments.length;if(!gn)return"";for(var Mn="";++Jt<gn;){var yn=Number(arguments[Jt]);if(!isFinite(yn)||yn<0||yn>1114111||Ze(yn)!==yn)throw RangeError("Invalid code point: "+yn);yn<=65535?en.push(yn):(yn-=65536,xt=55296+(yn>>10),tn=yn%1024+56320,en.push(xt,tn)),(Jt+1===gn||en.length>16384)&&(Mn+=Ke.apply(null,en),en.length=0)}return Mn};ue.default?Object.defineProperty(String,"fromCodePoint",{value:lt,configurable:!0,writable:!0}):String.fromCodePoint=lt}()})(Te===void 0?(void 0).sax={}:Te)}).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,Ie,Te){function be(){Pe.call(this)}Ie.exports=be;var Pe=me("events").EventEmitter;me("inherits")(be,Pe),be.Readable=me("readable-stream/readable.js"),be.Writable=me("readable-stream/writable.js"),be.Duplex=me("readable-stream/duplex.js"),be.Transform=me("readable-stream/transform.js"),be.PassThrough=me("readable-stream/passthrough.js"),be.Stream=be,be.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 ce(){ee||(ee=!0,he.end())}function ve(){ee||(ee=!0,typeof he.destroy=="function"&&he.destroy())}function de(oe){if(ue(),Pe.listenerCount(this,"error")===0)throw oe}function ue(){z.removeListener("data",xe),he.removeListener("drain",ge),z.removeListener("end",ce),z.removeListener("close",ve),z.removeListener("error",de),he.removeListener("error",de),z.removeListener("end",ue),z.removeListener("close",ue),he.removeListener("close",ue)}var z=this;z.on("data",xe),he.on("drain",ge),he._isStdio||Se&&Se.end===!1||(z.on("end",ce),z.on("close",ve));var ee=!1;return z.on("error",de),he.on("error",de),z.on("end",ue),z.on("close",ue),he.on("close",ue),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,Ie,Te){(function(be){var Pe=me("./lib/request"),he=me("./lib/response"),Se=me("xtend"),xe=me("builtin-status-codes"),ge=me("url"),ce=Te;ce.request=function(ve,de){ve=typeof ve=="string"?ge.parse(ve):Se(ve);var ue=be.location.protocol.search(/^https?:$/)===-1?"http:":"",z=ve.protocol||ue,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 Pe(ve);return de&&se.on("response",de),se},ce.get=function(ve,de){var ue=ce.request(ve,de);return ue.end(),ue},ce.ClientRequest=Pe,ce.IncomingMessage=he.IncomingMessage,ce.Agent=function(){},ce.Agent.defaultMaxSockets=4,ce.globalAgent=new ce.Agent,ce.STATUS_CODES=xe,ce.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,Ie,Te){(function(be){"use strict";function Pe(){if(xe!==void 0)return xe;if(be.XMLHttpRequest){xe=new be.XMLHttpRequest;try{xe.open("GET",be.XDomainRequest?"/":"https://example.com")}catch(ve){xe=null}}else xe=null;return xe}function he(ve){var de=Pe();if(!de)return!1;try{return de.responseType=ve,de.responseType===ve}catch(ue){}return!1}function Se(ve){return typeof ve=="function"}Te.fetch=Se(be.fetch)&&Se(be.ReadableStream),Te.writableStream=Se(be.WritableStream),Te.abortController=Se(be.AbortController),Te.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),Te.blobConstructor=!0}catch(ve){}var xe,ge=be.ArrayBuffer!==void 0,ce=ge&&Se(be.ArrayBuffer.prototype.slice);Te.arraybuffer=Te.fetch||ge&&he("arraybuffer"),Te.msstream=!Te.fetch&&ce&&he("ms-stream"),Te.mozchunkedarraybuffer=!Te.fetch&&ge&&he("moz-chunked-arraybuffer"),Te.overrideMimeType=Te.fetch||!!Pe()&&Se(Pe().overrideMimeType),Te.vbArray=Se(be.VBArray),xe=null}).call(this,typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],198:[function(me,Ie,Te){(function(be,Pe,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(Ce){return!1}}var ge=me("babel-runtime/core-js/object/keys"),ce=function(ye){return ye&&ye.__esModule?ye:{default:ye}}(ge),ve=me("./capability"),de=me("inherits"),ue=me("./response"),z=me("readable-stream"),ee=me("to-arraybuffer"),oe=ue.IncomingMessage,ie=ue.readyStates,se=Ie.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,ce.default)(ye.headers).forEach(function(Ne){we.setHeader(Ne,ye.headers[Ne])});var Ce,ke=!0;if(ye.mode==="disable-fetch"||"requestTimeout"in ye&&!ve.abortController)ke=!1,Ce=!0;else if(ye.mode==="prefer-streaming")Ce=!1;else if(ye.mode==="allow-wrong-content-type")Ce=!ve.overrideMimeType;else{if(ye.mode&&ye.mode!=="default"&&ye.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");Ce=!0}we._mode=Se(Ce,ke),we._fetchTimer=null,we.on("finish",function(){we._onFinish()})};de(se,z.Writable),se.prototype.setHeader=function(ye,we){var Ce=this,ke=ye.toLowerCase();le.indexOf(ke)===-1&&(Ce._headers[ke]={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,Ce=ye._headers,ke=null;we.method!=="GET"&&we.method!=="HEAD"&&(ke=ve.arraybuffer?ee(he.concat(ye._body)):ve.blobConstructor?new Pe.Blob(ye._body.map(function(Ge){return ee(Ge)}),{type:(Ce["content-type"]||{}).value||""}):he.concat(ye._body).toString());var Ne=[];if((0,ce.default)(Ce).forEach(function(Ge){var mt=Ce[Ge].name,ct=Ce[Ge].value;Array.isArray(ct)?ct.forEach(function(Ct){Ne.push([mt,Ct])}):Ne.push([mt,ct])}),ye._mode==="fetch"){var je=null;if(ve.abortController){var Ve=new AbortController;je=Ve.signal,ye._fetchAbortController=Ve,"requestTimeout"in we&&we.requestTimeout!==0&&(ye._fetchTimer=Pe.setTimeout(function(){ye.emit("requestTimeout"),ye._fetchAbortController&&ye._fetchAbortController.abort()},we.requestTimeout))}Pe.fetch(ye._opts.url,{method:ye._opts.method,headers:Ne,body:ke||void 0,mode:"cors",credentials:we.withCredentials?"include":"same-origin",signal:je}).then(function(Ge){ye._fetchResponse=Ge,ye._connect()},function(Ge){Pe.clearTimeout(ye._fetchTimer),ye._destroyed||ye.emit("error",Ge)})}else{var Qe=ye._xhr=new Pe.XMLHttpRequest;try{Qe.open(ye._opts.method,ye._opts.url,!0)}catch(Ge){return void be.nextTick(function(){ye.emit("error",Ge)})}"responseType"in Qe&&(Qe.responseType=ye._mode.split(":")[0]),"withCredentials"in Qe&&(Qe.withCredentials=!!we.withCredentials),ye._mode==="text"&&"overrideMimeType"in Qe&&Qe.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in we&&(Qe.timeout=we.requestTimeout,Qe.ontimeout=function(){ye.emit("requestTimeout")}),Ne.forEach(function(Ge){Qe.setRequestHeader(Ge[0],Ge[1])}),ye._response=null,Qe.onreadystatechange=function(){switch(Qe.readyState){case ie.LOADING:case ie.DONE:ye._onXHRProgress()}},ye._mode==="moz-chunked-arraybuffer"&&(Qe.onprogress=function(){ye._onXHRProgress()}),Qe.onerror=function(){ye._destroyed||ye.emit("error",new Error("XHR error"))};try{Qe.send(ke)}catch(Ge){return void be.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,Ce){this._body.push(ye),Ce()},se.prototype.abort=se.prototype.destroy=function(){var ye=this;ye._destroyed=!0,Pe.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,Ce){var ke=this;typeof ye=="function"&&(Ce=ye,ye=void 0),z.Writable.prototype.end.call(ke,ye,we,Ce)},se.prototype.flushHeaders=function(){},se.prototype.setTimeout=function(){},se.prototype.setNoDelay=function(){},se.prototype.setSocketKeepAlive=function(){};var le=["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,Ie,Te){(function(be,Pe,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"),ce=me("inherits"),ve=me("readable-stream"),de=Te.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},ue=Te.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(){be.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(ke,Ne){se.headers[Ne.toLowerCase()]=ke,se.rawHeaders.push(Ne,ke)}),ge.writableStream){var le=new WritableStream({write:function(ke){return new xe.default(function(Ne,je){se._destroyed?je():se.push(new he(ke))?Ne():se._resumeFetch=Ne})},close:function(){Pe.clearTimeout(ie),se._destroyed||se.push(null)},abort:function(ke){se._destroyed||se.emit("error",ke)}});try{return void ee.body.pipeTo(le).catch(function(ke){Pe.clearTimeout(ie),se._destroyed||se.emit("error",ke)})}catch(ke){}}var ye=ee.body.getReader();(function ke(){ye.read().then(function(Ne){if(!se._destroyed){if(Ne.done)return Pe.clearTimeout(ie),void se.push(null);se.push(new he(Ne.value)),ke()}}).catch(function(Ne){Pe.clearTimeout(ie),se._destroyed||se.emit("error",Ne)})})()}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(ke){var Ne=ke.match(/^([^:]+):\s*(.*)/);if(Ne){var je=Ne[1].toLowerCase();je==="set-cookie"?(se.headers[je]===void 0&&(se.headers[je]=[]),se.headers[je].push(Ne[2])):se.headers[je]!==void 0?se.headers[je]+=", "+Ne[2]:se.headers[je]=Ne[2],se.rawHeaders.push(Ne[1],Ne[2])}}),se._charset="x-user-defined",!ge.overrideMimeType){var we=se.rawHeaders["mime-type"];if(we){var Ce=we.match(/;\s*charset=([^;])(;|$)/);Ce&&(se._charset=Ce[1].toLowerCase())}se._charset||(se._charset="utf-8")}};ce(ue,ve.Readable),ue.prototype._read=function(){var z=this,ee=z._resumeFetch;ee&&(z._resumeFetch=null,ee())},ue.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 Pe.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),le=0;le<ie.length;le++)se[le]=255&ie.charCodeAt(le);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 Pe.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,Ie,Te){"use strict";function be(we){if(!we)return"utf8";for(var Ce;;)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(Ce)return;we=(""+we).toLowerCase(),Ce=!0}}function Pe(we){var Ce=be(we);if(typeof Ce!="string"&&(le.isEncoding===ye||!ye(we)))throw new Error("Unknown encoding: "+we);return Ce||we}function he(we){this.encoding=Pe(we);var Ce;switch(this.encoding){case"utf16le":this.text=ue,this.end=z,Ce=4;break;case"utf8":this.fillLast=ce,Ce=4;break;case"base64":this.text=ee,this.end=oe,Ce=3;break;default:return this.write=ie,void(this.end=se)}this.lastNeed=0,this.lastTotal=0,this.lastChar=le.allocUnsafe(Ce)}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,Ce,ke){var Ne=Ce.length-1;if(Ne<ke)return 0;var je=Se(Ce[Ne]);return je>=0?(je>0&&(we.lastNeed=je-1),je):--Ne<ke||je===-2?0:(je=Se(Ce[Ne]))>=0?(je>0&&(we.lastNeed=je-2),je):--Ne<ke||je===-2?0:(je=Se(Ce[Ne]),je>=0?(je>0&&(je===2?je=0:we.lastNeed=je-3),je):0)}function ge(we,Ce,ke){if((192&Ce[0])!=128)return we.lastNeed=0,"\u951F\uFFFD";if(we.lastNeed>1&&Ce.length>1){if((192&Ce[1])!=128)return we.lastNeed=1,"\u951F\uFFFD";if(we.lastNeed>2&&Ce.length>2&&(192&Ce[2])!=128)return we.lastNeed=2,"\u951F\uFFFD"}}function ce(we){var Ce=this.lastTotal-this.lastNeed,ke=ge(this,we,Ce);return ke!==void 0?ke:this.lastNeed<=we.length?(we.copy(this.lastChar,Ce,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(we.copy(this.lastChar,Ce,0,we.length),void(this.lastNeed-=we.length))}function ve(we,Ce){var ke=xe(this,we,Ce);if(!this.lastNeed)return we.toString("utf8",Ce);this.lastTotal=ke;var Ne=we.length-(ke-this.lastNeed);return we.copy(this.lastChar,0,Ne),we.toString("utf8",Ce,Ne)}function de(we){var Ce=we&&we.length?this.write(we):"";return this.lastNeed?Ce+"\u951F\uFFFD":Ce}function ue(we,Ce){if((we.length-Ce)%2==0){var ke=we.toString("utf16le",Ce);if(ke){var Ne=ke.charCodeAt(ke.length-1);if(Ne>=55296&&Ne<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=we[we.length-2],this.lastChar[1]=we[we.length-1],ke.slice(0,-1)}return ke}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=we[we.length-1],we.toString("utf16le",Ce,we.length-1)}function z(we){var Ce=we&&we.length?this.write(we):"";if(this.lastNeed){var ke=this.lastTotal-this.lastNeed;return Ce+this.lastChar.toString("utf16le",0,ke)}return Ce}function ee(we,Ce){var ke=(we.length-Ce)%3;return ke===0?we.toString("base64",Ce):(this.lastNeed=3-ke,this.lastTotal=3,ke===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",Ce,we.length-ke))}function oe(we){var Ce=we&&we.length?this.write(we):"";return this.lastNeed?Ce+this.lastChar.toString("base64",0,3-this.lastNeed):Ce}function ie(we){return we.toString(this.encoding)}function se(we){return we&&we.length?this.write(we):""}var le=me("safe-buffer").Buffer,ye=le.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}};Te.StringDecoder=he,he.prototype.write=function(we){if(we.length===0)return"";var Ce,ke;if(this.lastNeed){if((Ce=this.fillLast(we))===void 0)return"";ke=this.lastNeed,this.lastNeed=0}else ke=0;return ke<we.length?Ce?Ce+this.text(we,ke):this.text(we,ke):Ce||""},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,Ie,Te){(function(be,Pe){function he(de,ue){this._id=de,this._clearFn=ue}var Se=me("process/browser.js").nextTick,xe=Function.prototype.apply,ge=Array.prototype.slice,ce={},ve=0;Te.setTimeout=function(){return new he(xe.call(setTimeout,window,arguments),clearTimeout)},Te.setInterval=function(){return new he(xe.call(setInterval,window,arguments),clearInterval)},Te.clearTimeout=Te.clearInterval=function(de){de.close()},he.prototype.unref=he.prototype.ref=function(){},he.prototype.close=function(){this._clearFn.call(window,this._id)},Te.enroll=function(de,ue){clearTimeout(de._idleTimeoutId),de._idleTimeout=ue},Te.unenroll=function(de){clearTimeout(de._idleTimeoutId),de._idleTimeout=-1},Te._unrefActive=Te.active=function(de){clearTimeout(de._idleTimeoutId);var ue=de._idleTimeout;ue>=0&&(de._idleTimeoutId=setTimeout(function(){de._onTimeout&&de._onTimeout()},ue))},Te.setImmediate=typeof be=="function"?be:function(de){var ue=ve++,z=!(arguments.length<2)&&ge.call(arguments,1);return ce[ue]=!0,Se(function(){ce[ue]&&(z?de.apply(null,z):de.call(null),Te.clearImmediate(ue))}),ue},Te.clearImmediate=typeof Pe=="function"?Pe:function(de){delete ce[de]}}).call(this,me("timers").setImmediate,me("timers").clearImmediate)},{"process/browser.js":173,timers:201}],202:[function(me,Ie,Te){var be=me("buffer").Buffer;Ie.exports=function(Pe){if(Pe instanceof Uint8Array){if(Pe.byteOffset===0&&Pe.byteLength===Pe.buffer.byteLength)return Pe.buffer;if(typeof Pe.buffer.slice=="function")return Pe.buffer.slice(Pe.byteOffset,Pe.byteOffset+Pe.byteLength)}if(be.isBuffer(Pe)){for(var he=new Uint8Array(Pe.length),Se=Pe.length,xe=0;xe<Se;xe++)he[xe]=Pe[xe];return he.buffer}throw new Error("Argument must be a Buffer")}},{buffer:38}],203:[function(me,Ie,Te){"use strict";function be(){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 Pe(je,Ve,Qe){if(je&&ce.isObject(je)&&je instanceof be)return je;var Ge=new be;return Ge.parse(je,Ve,Qe),Ge}function he(je){return ce.isString(je)&&(je=Pe(je)),je instanceof be?je.format():be.prototype.format.call(je)}function Se(je,Ve){return Pe(je,!1,!0).resolve(Ve)}function xe(je,Ve){return je?Pe(je,!1,!0).resolveObject(Ve):Ve}var ge=me("punycode"),ce=me("./util");Te.parse=Pe,Te.resolve=Se,Te.resolveObject=xe,Te.format=he,Te.Url=be;var ve=/^([a-z0-9.+-]+:)/i,de=/:[0-9]*$/,ue=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,z=["<",">",'"',"`"," ","\r",`
|
|
|
`," "],ee=["{","}","|","\\","^","`"].concat(z),oe=["'"].concat(ee),ie=["%","/","?",";","#"].concat(oe),se=["/","?","#"],le=/^[+a-z0-9A-Z_-]{0,63}$/,ye=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,we={javascript:!0,"javascript:":!0},Ce={javascript:!0,"javascript:":!0},ke={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Ne=me("querystring");be.prototype.parse=function(je,Ve,Qe){if(!ce.isString(je))throw new TypeError("Parameter 'url' must be a string, not "+typeof je);var Ge=je.indexOf("?"),mt=Ge!==-1&&Ge<je.indexOf("#")?"?":"#",ct=je.split(mt),Ct=/\\/g;ct[0]=ct[0].replace(Ct,"/"),je=ct.join(mt);var it=je;if(it=it.trim(),!Qe&&je.split("#").length===1){var St=ue.exec(it);if(St)return this.path=it,this.href=it,this.pathname=St[1],St[2]?(this.search=St[2],this.query=Ve?Ne.parse(this.search.substr(1)):this.search.substr(1)):Ve&&(this.search="",this.query={}),this}var ut=ve.exec(it);if(ut){ut=ut[0];var Ft=ut.toLowerCase();this.protocol=Ft,it=it.substr(ut.length)}if(Qe||ut||it.match(/^\/\/[^@\/]+@[^@\/]+/)){var ht=it.substr(0,2)==="//";!ht||ut&&Ce[ut]||(it=it.substr(2),this.slashes=!0)}if(!Ce[ut]&&(ht||ut&&!ke[ut])){for(var rt=-1,dt=0;dt<se.length;dt++){var yt=it.indexOf(se[dt]);yt!==-1&&(rt===-1||yt<rt)&&(rt=yt)}var _t,vt;vt=rt===-1?it.lastIndexOf("@"):it.lastIndexOf("@",rt),vt!==-1&&(_t=it.slice(0,vt),it=it.slice(vt+1),this.auth=decodeURIComponent(_t)),rt=-1;for(var dt=0;dt<ie.length;dt++){var yt=it.indexOf(ie[dt]);yt!==-1&&(rt===-1||yt<rt)&&(rt=yt)}rt===-1&&(rt=it.length),this.host=it.slice(0,rt),it=it.slice(rt),this.parseHost(),this.hostname=this.hostname||"";var Bt=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Bt)for(var jt=this.hostname.split(/\./),dt=0,un=jt.length;dt<un;dt++){var Kt=jt[dt];if(Kt&&!Kt.match(le)){for(var xn="",Ut=0,Wt=Kt.length;Ut<Wt;Ut++)Kt.charCodeAt(Ut)>127?xn+="x":xn+=Kt[Ut];if(!xn.match(le)){var $t=jt.slice(0,dt),ft=jt.slice(dt+1),We=Kt.match(ye);We&&($t.push(We[1]),ft.unshift(We[2])),ft.length&&(it="/"+ft.join(".")+it),this.hostname=$t.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),Bt||(this.hostname=ge.toASCII(this.hostname));var Be=this.port?":"+this.port:"",qe=this.hostname||"";this.host=qe+Be,this.href+=this.host,Bt&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),it[0]!=="/"&&(it="/"+it))}if(!we[Ft])for(var dt=0,un=oe.length;dt<un;dt++){var et=oe[dt];if(it.indexOf(et)!==-1){var He=encodeURIComponent(et);He===et&&(He=escape(et)),it=it.split(et).join(He)}}var Xe=it.indexOf("#");Xe!==-1&&(this.hash=it.substr(Xe),it=it.slice(0,Xe));var Re=it.indexOf("?");if(Re!==-1?(this.search=it.substr(Re),this.query=it.substr(Re+1),Ve&&(this.query=Ne.parse(this.query)),it=it.slice(0,Re)):Ve&&(this.search="",this.query={}),it&&(this.pathname=it),ke[Ft]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Be=this.pathname||"",Ae=this.search||"";this.path=Be+Ae}return this.href=this.format(),this},be.prototype.format=function(){var je=this.auth||"";je&&(je=encodeURIComponent(je),je=je.replace(/%3A/i,":"),je+="@");var Ve=this.protocol||"",Qe=this.pathname||"",Ge=this.hash||"",mt=!1,ct="";this.host?mt=je+this.host:this.hostname&&(mt=je+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(mt+=":"+this.port)),this.query&&ce.isObject(this.query)&&Object.keys(this.query).length&&(ct=Ne.stringify(this.query));var Ct=this.search||ct&&"?"+ct||"";return Ve&&Ve.substr(-1)!==":"&&(Ve+=":"),this.slashes||(!Ve||ke[Ve])&&mt!==!1?(mt="//"+(mt||""),Qe&&Qe.charAt(0)!=="/"&&(Qe="/"+Qe)):mt||(mt=""),Ge&&Ge.charAt(0)!=="#"&&(Ge="#"+Ge),Ct&&Ct.charAt(0)!=="?"&&(Ct="?"+Ct),Qe=Qe.replace(/[?#]/g,function(it){return encodeURIComponent(it)}),Ct=Ct.replace("#","%23"),Ve+mt+Qe+Ct+Ge},be.prototype.resolve=function(je){return this.resolveObject(Pe(je,!1,!0)).format()},be.prototype.resolveObject=function(je){if(ce.isString(je)){var Ve=new be;Ve.parse(je,!1,!0),je=Ve}for(var Qe=new be,Ge=Object.keys(this),mt=0;mt<Ge.length;mt++){var ct=Ge[mt];Qe[ct]=this[ct]}if(Qe.hash=je.hash,je.href==="")return Qe.href=Qe.format(),Qe;if(je.slashes&&!je.protocol){for(var Ct=Object.keys(je),it=0;it<Ct.length;it++){var St=Ct[it];St!=="protocol"&&(Qe[St]=je[St])}return ke[Qe.protocol]&&Qe.hostname&&!Qe.pathname&&(Qe.path=Qe.pathname="/"),Qe.href=Qe.format(),Qe}if(je.protocol&&je.protocol!==Qe.protocol){if(!ke[je.protocol]){for(var ut=Object.keys(je),Ft=0;Ft<ut.length;Ft++){var ht=ut[Ft];Qe[ht]=je[ht]}return Qe.href=Qe.format(),Qe}if(Qe.protocol=je.protocol,je.host||Ce[je.protocol])Qe.pathname=je.pathname;else{for(var un=(je.pathname||"").split("/");un.length&&!(je.host=un.shift()););je.host||(je.host=""),je.hostname||(je.hostname=""),un[0]!==""&&un.unshift(""),un.length<2&&un.unshift(""),Qe.pathname=un.join("/")}if(Qe.search=je.search,Qe.query=je.query,Qe.host=je.host||"",Qe.auth=je.auth,Qe.hostname=je.hostname||je.host,Qe.port=je.port,Qe.pathname||Qe.search){var rt=Qe.pathname||"",dt=Qe.search||"";Qe.path=rt+dt}return Qe.slashes=Qe.slashes||je.slashes,Qe.href=Qe.format(),Qe}var yt=Qe.pathname&&Qe.pathname.charAt(0)==="/",_t=je.host||je.pathname&&je.pathname.charAt(0)==="/",vt=_t||yt||Qe.host&&je.pathname,Bt=vt,jt=Qe.pathname&&Qe.pathname.split("/")||[],un=je.pathname&&je.pathname.split("/")||[],Kt=Qe.protocol&&!ke[Qe.protocol];if(Kt&&(Qe.hostname="",Qe.port=null,Qe.host&&(jt[0]===""?jt[0]=Qe.host:jt.unshift(Qe.host)),Qe.host="",je.protocol&&(je.hostname=null,je.port=null,je.host&&(un[0]===""?un[0]=je.host:un.unshift(je.host)),je.host=null),vt=vt&&(un[0]===""||jt[0]==="")),_t)Qe.host=je.host||je.host===""?je.host:Qe.host,Qe.hostname=je.hostname||je.hostname===""?je.hostname:Qe.hostname,Qe.search=je.search,Qe.query=je.query,jt=un;else if(un.length)jt||(jt=[]),jt.pop(),jt=jt.concat(un),Qe.search=je.search,Qe.query=je.query;else if(!ce.isNullOrUndefined(je.search)){if(Kt){Qe.hostname=Qe.host=jt.shift();var xn=!!(Qe.host&&Qe.host.indexOf("@")>0)&&Qe.host.split("@");xn&&(Qe.auth=xn.shift(),Qe.host=Qe.hostname=xn.shift())}return Qe.search=je.search,Qe.query=je.query,ce.isNull(Qe.pathname)&&ce.isNull(Qe.search)||(Qe.path=(Qe.pathname?Qe.pathname:"")+(Qe.search?Qe.search:"")),Qe.href=Qe.format(),Qe}if(!jt.length)return Qe.pathname=null,Qe.search?Qe.path="/"+Qe.search:Qe.path=null,Qe.href=Qe.format(),Qe;for(var Ut=jt.slice(-1)[0],Wt=(Qe.host||je.host||jt.length>1)&&(Ut==="."||Ut==="..")||Ut==="",$t=0,ft=jt.length;ft>=0;ft--)Ut=jt[ft],Ut==="."?jt.splice(ft,1):Ut===".."?(jt.splice(ft,1),$t++):$t&&(jt.splice(ft,1),$t--);if(!vt&&!Bt)for(;$t--;$t)jt.unshift("..");!vt||jt[0]===""||jt[0]&&jt[0].charAt(0)==="/"||jt.unshift(""),Wt&&jt.join("/").substr(-1)!=="/"&&jt.push("");var We=jt[0]===""||jt[0]&&jt[0].charAt(0)==="/";if(Kt){Qe.hostname=Qe.host=We?"":jt.length?jt.shift():"";var xn=!!(Qe.host&&Qe.host.indexOf("@")>0)&&Qe.host.split("@");xn&&(Qe.auth=xn.shift(),Qe.host=Qe.hostname=xn.shift())}return vt=vt||Qe.host&&jt.length,vt&&!We&&jt.unshift(""),jt.length?Qe.pathname=jt.join("/"):(Qe.pathname=null,Qe.path=null),ce.isNull(Qe.pathname)&&ce.isNull(Qe.search)||(Qe.path=(Qe.pathname?Qe.pathname:"")+(Qe.search?Qe.search:"")),Qe.auth=je.auth||Qe.auth,Qe.slashes=Qe.slashes||je.slashes,Qe.href=Qe.format(),Qe},be.prototype.parseHost=function(){var je=this.host,Ve=de.exec(je);Ve&&(Ve=Ve[0],Ve!==":"&&(this.port=Ve.substr(1)),je=je.substr(0,je.length-Ve.length)),je&&(this.hostname=je)}},{"./util":204,punycode:174,querystring:177}],204:[function(me,Ie,Te){"use strict";Ie.exports={isString:function(be){return typeof be=="string"},isObject:function(be){return typeof be=="object"&&be!==null},isNull:function(be){return be===null},isNullOrUndefined:function(be){return be==null}}},{}],205:[function(me,Ie,Te){(function(be){function Pe(Se,xe){function ge(){if(!ce){if(he("throwDeprecation"))throw new Error(xe);he("traceDeprecation")?console.trace(xe):console.warn(xe),ce=!0}return Se.apply(this,arguments)}if(he("noDeprecation"))return Se;var ce=!1;return ge}function he(Se){try{if(!be.localStorage)return!1}catch(ge){return!1}var xe=be.localStorage[Se];return xe!=null&&String(xe).toLowerCase()==="true"}Ie.exports=Pe}).call(this,typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],206:[function(me,Ie,Te){Ie.exports=function(be){return be&&typeof be=="object"&&typeof be.copy=="function"&&typeof be.fill=="function"&&typeof be.readUInt8=="function"}},{}],207:[function(me,Ie,Te){(function(be,Pe){function he(dt,yt){var _t={seen:[],stylize:xe};return arguments.length>=3&&(_t.depth=arguments[2]),arguments.length>=4&&(_t.colors=arguments[3]),ie(yt)?_t.showHidden=yt:yt&&Te._extend(_t,yt),ke(_t.showHidden)&&(_t.showHidden=!1),ke(_t.depth)&&(_t.depth=2),ke(_t.colors)&&(_t.colors=!1),ke(_t.customInspect)&&(_t.customInspect=!0),_t.colors&&(_t.stylize=Se),ce(_t,dt,_t.depth)}function Se(dt,yt){var _t=he.styles[yt];return _t?"\x1B["+he.colors[_t][0]+"m"+dt+"\x1B["+he.colors[_t][1]+"m":dt}function xe(dt,yt){return dt}function ge(dt){var yt={};return dt.forEach(function(_t,vt){yt[_t]=!0}),yt}function ce(dt,yt,_t){if(dt.customInspect&&yt&&Ge(yt.inspect)&&yt.inspect!==Te.inspect&&(!yt.constructor||yt.constructor.prototype!==yt)){var vt=yt.inspect(_t,dt);return we(vt)||(vt=ce(dt,vt,_t)),vt}var Bt=ve(dt,yt);if(Bt)return Bt;var jt=Object.keys(yt),un=ge(jt);if(dt.showHidden&&(jt=Object.getOwnPropertyNames(yt)),Qe(yt)&&(jt.indexOf("message")>=0||jt.indexOf("description")>=0))return de(yt);if(jt.length===0){if(Ge(yt)){var Kt=yt.name?": "+yt.name:"";return dt.stylize("[Function"+Kt+"]","special")}if(Ne(yt))return dt.stylize(RegExp.prototype.toString.call(yt),"regexp");if(Ve(yt))return dt.stylize(Date.prototype.toString.call(yt),"date");if(Qe(yt))return de(yt)}var xn="",Ut=!1,Wt=["{","}"];if(oe(yt)&&(Ut=!0,Wt=["[","]"]),Ge(yt)&&(xn=" [Function"+(yt.name?": "+yt.name:"")+"]"),Ne(yt)&&(xn=" "+RegExp.prototype.toString.call(yt)),Ve(yt)&&(xn=" "+Date.prototype.toUTCString.call(yt)),Qe(yt)&&(xn=" "+de(yt)),jt.length===0&&(!Ut||yt.length==0))return Wt[0]+xn+Wt[1];if(_t<0)return Ne(yt)?dt.stylize(RegExp.prototype.toString.call(yt),"regexp"):dt.stylize("[Object]","special");dt.seen.push(yt);var $t;return $t=Ut?ue(dt,yt,_t,un,jt):jt.map(function(ft){return z(dt,yt,_t,un,ft,Ut)}),dt.seen.pop(),ee($t,xn,Wt)}function ve(dt,yt){if(ke(yt))return dt.stylize("undefined","undefined");if(we(yt)){var _t="'"+JSON.stringify(yt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return dt.stylize(_t,"string")}return ye(yt)?dt.stylize(""+yt,"number"):ie(yt)?dt.stylize(""+yt,"boolean"):se(yt)?dt.stylize("null","null"):void 0}function de(dt){return"["+Error.prototype.toString.call(dt)+"]"}function ue(dt,yt,_t,vt,Bt){for(var jt=[],un=0,Kt=yt.length;un<Kt;++un)St(yt,String(un))?jt.push(z(dt,yt,_t,vt,String(un),!0)):jt.push("");return Bt.forEach(function(xn){xn.match(/^\d+$/)||jt.push(z(dt,yt,_t,vt,xn,!0))}),jt}function z(dt,yt,_t,vt,Bt,jt){var un,Kt,xn;if(xn=Object.getOwnPropertyDescriptor(yt,Bt)||{value:yt[Bt]},xn.get?Kt=xn.set?dt.stylize("[Getter/Setter]","special"):dt.stylize("[Getter]","special"):xn.set&&(Kt=dt.stylize("[Setter]","special")),St(vt,Bt)||(un="["+Bt+"]"),Kt||(dt.seen.indexOf(xn.value)<0?(Kt=se(_t)?ce(dt,xn.value,null):ce(dt,xn.value,_t-1),Kt.indexOf(`
|
|
|
`)>-1&&(Kt=jt?Kt.split(`
|
|
|
`).map(function(Ut){return" "+Ut}).join(`
|
|
|
`).substr(2):`
|
|
|
`+Kt.split(`
|
|
|
`).map(function(Ut){return" "+Ut}).join(`
|
|
|
`))):Kt=dt.stylize("[Circular]","special")),ke(un)){if(jt&&Bt.match(/^\d+$/))return Kt;un=JSON.stringify(""+Bt),un.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(un=un.substr(1,un.length-2),un=dt.stylize(un,"name")):(un=un.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),un=dt.stylize(un,"string"))}return un+": "+Kt}function ee(dt,yt,_t){var vt=0;return dt.reduce(function(Bt,jt){return vt++,jt.indexOf(`
|
|
|
`)>=0&&vt++,Bt+jt.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?_t[0]+(yt===""?"":yt+`
|
|
|
`)+" "+dt.join(`,
|
|
|
`)+" "+_t[1]:_t[0]+yt+" "+dt.join(", ")+" "+_t[1]}function oe(dt){return Array.isArray(dt)}function ie(dt){return typeof dt=="boolean"}function se(dt){return dt===null}function le(dt){return dt==null}function ye(dt){return typeof dt=="number"}function we(dt){return typeof dt=="string"}function Ce(dt){return typeof dt=="symbol"}function ke(dt){return dt===void 0}function Ne(dt){return je(dt)&&ct(dt)==="[object RegExp]"}function je(dt){return typeof dt=="object"&&dt!==null}function Ve(dt){return je(dt)&&ct(dt)==="[object Date]"}function Qe(dt){return je(dt)&&(ct(dt)==="[object Error]"||dt instanceof Error)}function Ge(dt){return typeof dt=="function"}function mt(dt){return dt===null||typeof dt=="boolean"||typeof dt=="number"||typeof dt=="string"||typeof dt=="symbol"||dt===void 0}function ct(dt){return Object.prototype.toString.call(dt)}function Ct(dt){return dt<10?"0"+dt.toString(10):dt.toString(10)}function it(){var dt=new Date,yt=[Ct(dt.getHours()),Ct(dt.getMinutes()),Ct(dt.getSeconds())].join(":");return[dt.getDate(),rt[dt.getMonth()],yt].join(" ")}function St(dt,yt){return Object.prototype.hasOwnProperty.call(dt,yt)}var ut=/%[sdj%]/g;Te.format=function(dt){if(!we(dt)){for(var yt=[],_t=0;_t<arguments.length;_t++)yt.push(he(arguments[_t]));return yt.join(" ")}for(var _t=1,vt=arguments,Bt=vt.length,jt=String(dt).replace(ut,function(xn){if(xn==="%%")return"%";if(_t>=Bt)return xn;switch(xn){case"%s":return String(vt[_t++]);case"%d":return Number(vt[_t++]);case"%j":try{return JSON.stringify(vt[_t++])}catch(Ut){return"[Circular]"}default:return xn}}),un=vt[_t];_t<Bt;un=vt[++_t])se(un)||!je(un)?jt+=" "+un:jt+=" "+he(un);return jt},Te.deprecate=function(dt,yt){function _t(){if(!vt){if(be.throwDeprecation)throw new Error(yt);be.traceDeprecation?console.trace(yt):console.error(yt),vt=!0}return dt.apply(this,arguments)}if(ke(Pe.process))return function(){return Te.deprecate(dt,yt).apply(this,arguments)};if(be.noDeprecation===!0)return dt;var vt=!1;return _t};var Ft,ht={};Te.debuglog=function(dt){if(ke(Ft)&&(Ft=be.env.NODE_DEBUG||""),dt=dt.toUpperCase(),!ht[dt])if(new RegExp("\\b"+dt+"\\b","i").test(Ft)){var yt=be.pid;ht[dt]=function(){var _t=Te.format.apply(Te,arguments);console.error("%s %d: %s",dt,yt,_t)}}else ht[dt]=function(){};return ht[dt]},Te.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"},Te.isArray=oe,Te.isBoolean=ie,Te.isNull=se,Te.isNullOrUndefined=le,Te.isNumber=ye,Te.isString=we,Te.isSymbol=Ce,Te.isUndefined=ke,Te.isRegExp=Ne,Te.isObject=je,Te.isDate=Ve,Te.isError=Qe,Te.isFunction=Ge,Te.isPrimitive=mt,Te.isBuffer=me("./support/isBuffer");var rt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Te.log=function(){console.log("%s - %s",it(),Te.format.apply(Te,arguments))},Te.inherits=me("inherits"),Te._extend=function(dt,yt){if(!yt||!je(yt))return dt;for(var _t=Object.keys(yt),vt=_t.length;vt--;)dt[_t[vt]]=yt[_t[vt]];return dt}}).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,Ie,Te){"use strict";(function(){Te.stripBOM=function(be){return be[0]==="\uFEFF"?be.substring(1):be}}).call(void 0)},{}],209:[function(me,Ie,Te){"use strict";function be(ge){return ge&&ge.__esModule?ge:{default:ge}}var Pe=me("babel-runtime/helpers/typeof"),he=be(Pe),Se=me("babel-runtime/core-js/object/keys"),xe=be(Se);(function(){var ge,ce,ve,de,ue,z={}.hasOwnProperty;ge=me("xmlbuilder"),ce=me("./defaults").defaults,de=function(ee){return typeof ee=="string"&&(ee.indexOf("&")>=0||ee.indexOf(">")>=0||ee.indexOf("<")>=0)},ue=function(ee){return"<![CDATA["+ve(ee)+"]]>"},ve=function(ee){return ee.replace("]]>","]]]]><![CDATA[>")},Te.Builder=function(){function ee(oe){var ie,se,le;this.options={},se=ce[.2];for(ie in se)z.call(se,ie)&&(le=se[ie],this.options[ie]=le);for(ie in oe)z.call(oe,ie)&&(le=oe[ie],this.options[ie]=le)}return ee.prototype.buildObject=function(oe){var ie,se,le,ye,we;return ie=this.options.attrkey,se=this.options.charkey,(0,xe.default)(oe).length===1&&this.options.rootName===ce[.2].rootName?(we=(0,xe.default)(oe)[0],oe=oe[we]):we=this.options.rootName,le=function(Ce){return function(ke,Ne){var je,Ve,Qe,Ge,mt,ct;if((Ne===void 0?"undefined":(0,he.default)(Ne))!=="object")Ce.options.cdata&&de(Ne)?ke.raw(ue(Ne)):ke.txt(Ne);else if(Array.isArray(Ne)){for(Ge in Ne)if(z.call(Ne,Ge)){Ve=Ne[Ge];for(mt in Ve)Qe=Ve[mt],ke=le(ke.ele(mt),Qe).up()}}else for(mt in Ne)if(z.call(Ne,mt))if(Ve=Ne[mt],mt===ie){if((Ve===void 0?"undefined":(0,he.default)(Ve))==="object")for(je in Ve)ct=Ve[je],ke=ke.att(je,ct)}else if(mt===se)ke=Ce.options.cdata&&de(Ve)?ke.raw(ue(Ve)):ke.txt(Ve);else if(Array.isArray(Ve))for(Ge in Ve)z.call(Ve,Ge)&&(Qe=Ve[Ge],ke=typeof Qe=="string"?Ce.options.cdata&&de(Qe)?ke.ele(mt).raw(ue(Qe)).up():ke.ele(mt,Qe).up():le(ke.ele(mt),Qe).up());else(Ve===void 0?"undefined":(0,he.default)(Ve))==="object"?ke=le(ke.ele(mt),Ve).up():typeof Ve=="string"&&Ce.options.cdata&&de(Ve)?ke=ke.ele(mt).raw(ue(Ve)).up():(Ve==null&&(Ve=""),ke=ke.ele(mt,Ve.toString()).up());return ke}}(this),ye=ge.create(we,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),le(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,Ie,Te){"use strict";(function(){Te.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,Ie,Te){"use strict";function be(ve){return ve&&ve.__esModule?ve:{default:ve}}var Pe=me("babel-runtime/core-js/object/get-own-property-names"),he=be(Pe),Se=me("babel-runtime/core-js/object/keys"),xe=be(Se),ge=me("babel-runtime/helpers/typeof"),ce=be(ge);(function(){var ve,de,ue,z,ee,oe,ie,se,le=function(Ce,ke){return function(){return Ce.apply(ke,arguments)}},ye=function(Ce,ke){function Ne(){this.constructor=Ce}for(var je in ke)we.call(ke,je)&&(Ce[je]=ke[je]);return Ne.prototype=ke.prototype,Ce.prototype=new Ne,Ce.__super__=ke.prototype,Ce},we={}.hasOwnProperty;ie=me("sax"),ue=me("events"),ve=me("./bom"),oe=me("./processors"),se=me("timers").setImmediate,de=me("./defaults").defaults,z=function(Ce){return(Ce===void 0?"undefined":(0,ce.default)(Ce))==="object"&&Ce!=null&&(0,xe.default)(Ce).length===0},ee=function(Ce,ke,Ne){var je,Ve,Qe;for(je=0,Ve=Ce.length;je<Ve;je++)Qe=Ce[je],ke=Qe(ke,Ne);return ke},Te.Parser=function(Ce){function ke(Ne){this.parseString=le(this.parseString,this),this.reset=le(this.reset,this),this.assignOrPush=le(this.assignOrPush,this),this.processAsync=le(this.processAsync,this);var je,Ve,Qe;if(!(this instanceof Te.Parser))return new Te.Parser(Ne);this.options={},Ve=de[.2];for(je in Ve)we.call(Ve,je)&&(Qe=Ve[je],this.options[je]=Qe);for(je in Ne)we.call(Ne,je)&&(Qe=Ne[je],this.options[je]=Qe);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(ke,Ce),ke.prototype.processAsync=function(){var Ne,je;try{return this.remaining.length<=this.options.chunkSize?(Ne=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(Ne),this.saxParser.close()):(Ne=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(Ne),se(this.processAsync))}catch(Ve){if(je=Ve,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(je)}},ke.prototype.assignOrPush=function(Ne,je,Ve){return je in Ne?(Ne[je]instanceof Array||(Ne[je]=[Ne[je]]),Ne[je].push(Ve)):this.options.explicitArray?Ne[je]=[Ve]:Ne[je]=Ve},ke.prototype.reset=function(){var Ne,je,Ve,Qe;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(mt){if(Ge.saxParser.resume(),!Ge.saxParser.errThrown)return Ge.saxParser.errThrown=!0,Ge.emit("error",mt)}}(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,Qe=[],Ne=this.options.attrkey,je=this.options.charkey,this.saxParser.onopentag=function(Ge){return function(mt){var ct,Ct,it,St,ut;if(it={},it[je]="",!Ge.options.ignoreAttrs){ut=mt.attributes;for(ct in ut)we.call(ut,ct)&&(Ne in it||Ge.options.mergeAttrs||(it[Ne]={}),Ct=Ge.options.attrValueProcessors?ee(Ge.options.attrValueProcessors,mt.attributes[ct],ct):mt.attributes[ct],St=Ge.options.attrNameProcessors?ee(Ge.options.attrNameProcessors,ct):ct,Ge.options.mergeAttrs?Ge.assignOrPush(it,St,Ct):it[Ne][St]=Ct)}return it["#name"]=Ge.options.tagNameProcessors?ee(Ge.options.tagNameProcessors,mt.name):mt.name,Ge.options.xmlns&&(it[Ge.options.xmlnskey]={uri:mt.uri,local:mt.local}),Qe.push(it)}}(this),this.saxParser.onclosetag=function(Ge){return function(){var mt,ct,Ct,it,St,ut,Ft,ht,rt,dt;if(ut=Qe.pop(),St=ut["#name"],Ge.options.explicitChildren&&Ge.options.preserveChildrenOrder||delete ut["#name"],ut.cdata===!0&&(mt=ut.cdata,delete ut.cdata),rt=Qe[Qe.length-1],ut[je].match(/^\s*$/)&&!mt?(ct=ut[je],delete ut[je]):(Ge.options.trim&&(ut[je]=ut[je].trim()),Ge.options.normalize&&(ut[je]=ut[je].replace(/\s{2,}/g," ").trim()),ut[je]=Ge.options.valueProcessors?ee(Ge.options.valueProcessors,ut[je],St):ut[je],(0,xe.default)(ut).length===1&&je in ut&&!Ge.EXPLICIT_CHARKEY&&(ut=ut[je])),z(ut)&&(ut=Ge.options.emptyTag!==""?Ge.options.emptyTag:ct),Ge.options.validator!=null&&(dt="/"+function(){var yt,_t,vt;for(vt=[],yt=0,_t=Qe.length;yt<_t;yt++)it=Qe[yt],vt.push(it["#name"]);return vt}().concat(St).join("/"),function(){var yt;try{ut=Ge.options.validator(dt,rt&&rt[St],ut)}catch(_t){return yt=_t,Ge.emit("error",yt)}}()),Ge.options.explicitChildren&&!Ge.options.mergeAttrs&&(ut===void 0?"undefined":(0,ce.default)(ut))==="object")if(Ge.options.preserveChildrenOrder){if(rt){rt[Ge.options.childkey]=rt[Ge.options.childkey]||[],Ft={};for(Ct in ut)we.call(ut,Ct)&&(Ft[Ct]=ut[Ct]);rt[Ge.options.childkey].push(Ft),delete ut["#name"],(0,xe.default)(ut).length===1&&je in ut&&!Ge.EXPLICIT_CHARKEY&&(ut=ut[je])}}else it={},Ge.options.attrkey in ut&&(it[Ge.options.attrkey]=ut[Ge.options.attrkey],delete ut[Ge.options.attrkey]),!Ge.options.charsAsChildren&&Ge.options.charkey in ut&&(it[Ge.options.charkey]=ut[Ge.options.charkey],delete ut[Ge.options.charkey]),(0,he.default)(ut).length>0&&(it[Ge.options.childkey]=ut),ut=it;return Qe.length>0?Ge.assignOrPush(rt,St,ut):(Ge.options.explicitRoot&&(ht=ut,ut={},ut[St]=ht),Ge.resultObject=ut,Ge.saxParser.ended=!0,Ge.emit("end",Ge.resultObject))}}(this),Ve=function(Ge){return function(mt){var ct,Ct;if(Ct=Qe[Qe.length-1])return Ct[je]+=mt,Ge.options.explicitChildren&&Ge.options.preserveChildrenOrder&&Ge.options.charsAsChildren&&(Ge.options.includeWhiteChars||mt.replace(/\\n/g,"").trim()!=="")&&(Ct[Ge.options.childkey]=Ct[Ge.options.childkey]||[],ct={"#name":"__text__"},ct[je]=mt,Ge.options.normalize&&(ct[je]=ct[je].replace(/\s{2,}/g," ").trim()),Ct[Ge.options.childkey].push(ct)),Ct}}(this),this.saxParser.ontext=Ve,this.saxParser.oncdata=function(Ge){return function(mt){var ct;if(ct=Ve(mt))return ct.cdata=!0}}()},ke.prototype.parseString=function(Ne,je){var Ve;je!=null&&typeof je=="function"&&(this.on("end",function(Qe){return this.reset(),je(null,Qe)}),this.on("error",function(Qe){return this.reset(),je(Qe)}));try{return Ne=Ne.toString(),Ne.trim()===""?(this.emit("end",null),!0):(Ne=ve.stripBOM(Ne),this.options.async?(this.remaining=Ne,se(this.processAsync),this.saxParser):this.saxParser.write(Ne).close())}catch(Qe){if(Ve=Qe,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",Ve),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw Ve}},ke}(ue.EventEmitter),Te.parseString=function(Ce,ke,Ne){var je,Ve,Qe;return Ne!=null?(typeof Ne=="function"&&(je=Ne),(ke===void 0?"undefined":(0,ce.default)(ke))==="object"&&(Ve=ke)):(typeof ke=="function"&&(je=ke),Ve={}),Qe=new Te.Parser(Ve),Qe.parseString(Ce,je)}}).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,Ie,Te){"use strict";(function(){var be;be=new RegExp(/(?!xmlns)^.*:/),Te.normalize=function(Pe){return Pe.toLowerCase()},Te.firstCharLowerCase=function(Pe){return Pe.charAt(0).toLowerCase()+Pe.slice(1)},Te.stripPrefix=function(Pe){return Pe.replace(be,"")},Te.parseNumbers=function(Pe){return isNaN(Pe)||(Pe=Pe%1==0?parseInt(Pe,10):parseFloat(Pe)),Pe},Te.parseBooleans=function(Pe){return/^(?:true|false)$/i.test(Pe)&&(Pe=Pe.toLowerCase()==="true"),Pe}}).call(void 0)},{}],213:[function(me,Ie,Te){"use strict";(function(){var be,Pe,he,Se,xe=function(ce,ve){function de(){this.constructor=ce}for(var ue in ve)ge.call(ve,ue)&&(ce[ue]=ve[ue]);return de.prototype=ve.prototype,ce.prototype=new de,ce.__super__=ve.prototype,ce},ge={}.hasOwnProperty;Pe=me("./defaults"),be=me("./builder"),he=me("./parser"),Se=me("./processors"),Te.defaults=Pe.defaults,Te.processors=Se,Te.ValidationError=function(ce){function ve(de){this.message=de}return xe(ve,ce),ve}(Error),Te.Builder=be.Builder,Te.Parser=he.Parser,Te.parseString=he.parseString}).call(void 0)},{"./builder":209,"./defaults":210,"./parser":211,"./processors":212}],214:[function(me,Ie,Te){"use strict";function be(ve){return ve&&ve.__esModule?ve:{default:ve}}var Pe=me("babel-runtime/core-js/object/get-prototype-of"),he=be(Pe),Se=me("babel-runtime/helpers/typeof"),xe=be(Se),ge=me("babel-runtime/core-js/object/assign"),ce=be(ge);(function(){var ve,de,ue,z,ee,oe,ie=[].slice,se={}.hasOwnProperty;ve=function(){var le,ye,we,Ce,ke,Ne;if(Ne=arguments[0],ke=2<=arguments.length?ie.call(arguments,1):[],z(ce.default))ce.default.apply(null,arguments);else for(le=0,we=ke.length;le<we;le++)if((Ce=ke[le])!=null)for(ye in Ce)se.call(Ce,ye)&&(Ne[ye]=Ce[ye]);return Ne},z=function(le){return!!le&&Object.prototype.toString.call(le)==="[object Function]"},ee=function(le){var ye;return!!le&&((ye=le===void 0?"undefined":(0,xe.default)(le))==="function"||ye==="object")},de=function(le){return z(Array.isArray)?Array.isArray(le):Object.prototype.toString.call(le)==="[object Array]"},ue=function(le){var ye;if(de(le))return!le.length;for(ye in le)if(se.call(le,ye))return!1;return!0},oe=function(le){var ye,we;return ee(le)&&(we=(0,he.default)(le))&&(ye=we.constructor)&&typeof ye=="function"&&ye instanceof ye&&Function.prototype.toString.call(ye)===Function.prototype.toString.call(Object)},Ie.exports.assign=ve,Ie.exports.isFunction=z,Ie.exports.isObject=ee,Ie.exports.isArray=de,Ie.exports.isEmpty=ue,Ie.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,Ie,Te){"use strict";var be=me("babel-runtime/core-js/object/create"),Pe=function(he){return he&&he.__esModule?he:{default:he}}(be);(function(){Ie.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,Pe.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,Ie,Te){"use strict";var be=me("babel-runtime/core-js/object/create"),Pe=function(he){return he&&he.__esModule?he:{default:he}}(be);(function(){var he,Se=function(ge,ce){function ve(){this.constructor=ge}for(var de in ce)xe.call(ce,de)&&(ge[de]=ce[de]);return ve.prototype=ce.prototype,ge.prototype=new ve,ge.__super__=ce.prototype,ge},xe={}.hasOwnProperty;he=me("./XMLNode"),Ie.exports=function(ge){function ce(ve,de){if(ce.__super__.constructor.call(this,ve),de==null)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(de)}return Se(ce,ge),ce.prototype.clone=function(){return(0,Pe.default)(this)},ce.prototype.toString=function(ve){return this.options.writer.set(ve).cdata(this)},ce}(he)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],217:[function(me,Ie,Te){"use strict";var be=me("babel-runtime/core-js/object/create"),Pe=function(he){return he&&he.__esModule?he:{default:he}}(be);(function(){var he,Se=function(ge,ce){function ve(){this.constructor=ge}for(var de in ce)xe.call(ce,de)&&(ge[de]=ce[de]);return ve.prototype=ce.prototype,ge.prototype=new ve,ge.__super__=ce.prototype,ge},xe={}.hasOwnProperty;he=me("./XMLNode"),Ie.exports=function(ge){function ce(ve,de){if(ce.__super__.constructor.call(this,ve),de==null)throw new Error("Missing comment text");this.text=this.stringify.comment(de)}return Se(ce,ge),ce.prototype.clone=function(){return(0,Pe.default)(this)},ce.prototype.toString=function(ve){return this.options.writer.set(ve).comment(this)},ce}(he)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],218:[function(me,Ie,Te){"use strict";(function(){var be,Pe=function(Se,xe){function ge(){this.constructor=Se}for(var ce in xe)he.call(xe,ce)&&(Se[ce]=xe[ce]);return ge.prototype=xe.prototype,Se.prototype=new ge,Se.__super__=xe.prototype,Se},he={}.hasOwnProperty;be=me("./XMLNode"),Ie.exports=function(Se){function xe(ge,ce,ve,de,ue,z){if(xe.__super__.constructor.call(this,ge),ce==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(!ue)throw new Error("Missing DTD attribute default");if(ue.indexOf("#")!==0&&(ue="#"+ue),!ue.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");if(z&&!ue.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT");this.elementName=this.stringify.eleName(ce),this.attributeName=this.stringify.attName(ve),this.attributeType=this.stringify.dtdAttType(de),this.defaultValue=this.stringify.dtdAttDefault(z),this.defaultValueType=ue}return Pe(xe,Se),xe.prototype.toString=function(ge){return this.options.writer.set(ge).dtdAttList(this)},xe}(be)}).call(void 0)},{"./XMLNode":227}],219:[function(me,Ie,Te){"use strict";(function(){var be,Pe=function(Se,xe){function ge(){this.constructor=Se}for(var ce in xe)he.call(xe,ce)&&(Se[ce]=xe[ce]);return ge.prototype=xe.prototype,Se.prototype=new ge,Se.__super__=xe.prototype,Se},he={}.hasOwnProperty;be=me("./XMLNode"),Ie.exports=function(Se){function xe(ge,ce,ve){if(xe.__super__.constructor.call(this,ge),ce==null)throw new Error("Missing DTD element name");ve||(ve="(#PCDATA)"),Array.isArray(ve)&&(ve="("+ve.join(",")+")"),this.name=this.stringify.eleName(ce),this.value=this.stringify.dtdElementValue(ve)}return Pe(xe,Se),xe.prototype.toString=function(ge){return this.options.writer.set(ge).dtdElement(this)},xe}(be)}).call(void 0)},{"./XMLNode":227}],220:[function(me,Ie,Te){"use strict";(function(){var be,Pe,he=function(xe,ge){function ce(){this.constructor=xe}for(var ve in ge)Se.call(ge,ve)&&(xe[ve]=ge[ve]);return ce.prototype=ge.prototype,xe.prototype=new ce,xe.__super__=ge.prototype,xe},Se={}.hasOwnProperty;Pe=me("./Utility").isObject,be=me("./XMLNode"),Ie.exports=function(xe){function ge(ce,ve,de,ue){if(ge.__super__.constructor.call(this,ce),de==null)throw new Error("Missing entity name");if(ue==null)throw new Error("Missing entity value");if(this.pe=!!ve,this.name=this.stringify.eleName(de),Pe(ue)){if(!ue.pubID&&!ue.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(ue.pubID&&!ue.sysID)throw new Error("System identifier is required for a public external entity");if(ue.pubID!=null&&(this.pubID=this.stringify.dtdPubID(ue.pubID)),ue.sysID!=null&&(this.sysID=this.stringify.dtdSysID(ue.sysID)),ue.nData!=null&&(this.nData=this.stringify.dtdNData(ue.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}else this.value=this.stringify.dtdEntityValue(ue)}return he(ge,xe),ge.prototype.toString=function(ce){return this.options.writer.set(ce).dtdEntity(this)},ge}(be)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],221:[function(me,Ie,Te){"use strict";(function(){var be,Pe=function(Se,xe){function ge(){this.constructor=Se}for(var ce in xe)he.call(xe,ce)&&(Se[ce]=xe[ce]);return ge.prototype=xe.prototype,Se.prototype=new ge,Se.__super__=xe.prototype,Se},he={}.hasOwnProperty;be=me("./XMLNode"),Ie.exports=function(Se){function xe(ge,ce,ve){if(xe.__super__.constructor.call(this,ge),ce==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(ce),ve.pubID!=null&&(this.pubID=this.stringify.dtdPubID(ve.pubID)),ve.sysID!=null&&(this.sysID=this.stringify.dtdSysID(ve.sysID))}return Pe(xe,Se),xe.prototype.toString=function(ge){return this.options.writer.set(ge).dtdNotation(this)},xe}(be)}).call(void 0)},{"./XMLNode":227}],222:[function(me,Ie,Te){"use strict";(function(){var be,Pe,he=function(xe,ge){function ce(){this.constructor=xe}for(var ve in ge)Se.call(ge,ve)&&(xe[ve]=ge[ve]);return ce.prototype=ge.prototype,xe.prototype=new ce,xe.__super__=ge.prototype,xe},Se={}.hasOwnProperty;Pe=me("./Utility").isObject,be=me("./XMLNode"),Ie.exports=function(xe){function ge(ce,ve,de,ue){var z;ge.__super__.constructor.call(this,ce),Pe(ve)&&(z=ve,ve=z.version,de=z.encoding,ue=z.standalone),ve||(ve="1.0"),this.version=this.stringify.xmlVersion(ve),de!=null&&(this.encoding=this.stringify.xmlEncoding(de)),ue!=null&&(this.standalone=this.stringify.xmlStandalone(ue))}return he(ge,xe),ge.prototype.toString=function(ce){return this.options.writer.set(ce).declaration(this)},ge}(be)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],223:[function(me,Ie,Te){"use strict";(function(){var be,Pe,he,Se,xe,ge,ce=function(de,ue){function z(){this.constructor=de}for(var ee in ue)ve.call(ue,ee)&&(de[ee]=ue[ee]);return z.prototype=ue.prototype,de.prototype=new z,de.__super__=ue.prototype,de},ve={}.hasOwnProperty;ge=me("./Utility").isObject,xe=me("./XMLNode"),be=me("./XMLDTDAttList"),he=me("./XMLDTDEntity"),Pe=me("./XMLDTDElement"),Se=me("./XMLDTDNotation"),Ie.exports=function(de){function ue(z,ee,oe){var ie,se;ue.__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 ce(ue,de),ue.prototype.element=function(z,ee){var oe;return oe=new Pe(this,z,ee),this.children.push(oe),this},ue.prototype.attList=function(z,ee,oe,ie,se){var le;return le=new be(this,z,ee,oe,ie,se),this.children.push(le),this},ue.prototype.entity=function(z,ee){var oe;return oe=new he(this,!1,z,ee),this.children.push(oe),this},ue.prototype.pEntity=function(z,ee){var oe;return oe=new he(this,!0,z,ee),this.children.push(oe),this},ue.prototype.notation=function(z,ee){var oe;return oe=new Se(this,z,ee),this.children.push(oe),this},ue.prototype.toString=function(z){return this.options.writer.set(z).docType(this)},ue.prototype.ele=function(z,ee){return this.element(z,ee)},ue.prototype.att=function(z,ee,oe,ie,se){return this.attList(z,ee,oe,ie,se)},ue.prototype.ent=function(z,ee){return this.entity(z,ee)},ue.prototype.pent=function(z,ee){return this.pEntity(z,ee)},ue.prototype.not=function(z,ee){return this.notation(z,ee)},ue.prototype.up=function(){return this.root()||this.documentObject},ue}(xe)}).call(void 0)},{"./Utility":214,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLNode":227}],224:[function(me,Ie,Te){"use strict";(function(){var be,Pe,he,Se,xe=function(ce,ve){function de(){this.constructor=ce}for(var ue in ve)ge.call(ve,ue)&&(ce[ue]=ve[ue]);return de.prototype=ve.prototype,ce.prototype=new de,ce.__super__=ve.prototype,ce},ge={}.hasOwnProperty;Se=me("./Utility").isPlainObject,be=me("./XMLNode"),he=me("./XMLStringifier"),Pe=me("./XMLStringWriter"),Ie.exports=function(ce){function ve(de){ve.__super__.constructor.call(this,null),de||(de={}),de.writer||(de.writer=new Pe),this.options=de,this.stringify=new he(de),this.isDocument=!0}return xe(ve,ce),ve.prototype.end=function(de){var ue;return de?Se(de)&&(ue=de,de=this.options.writer.set(ue)):de=this.options.writer,de.document(this)},ve.prototype.toString=function(de){return this.options.writer.set(de).document(this)},ve}(be)}).call(void 0)},{"./Utility":214,"./XMLNode":227,"./XMLStringWriter":231,"./XMLStringifier":232}],225:[function(me,Ie,Te){"use strict";(function(){var be,Pe,he,Se,xe,ge,ce,ve,de,ue,z,ee,oe,ie,se,le,ye,we,Ce,ke={}.hasOwnProperty;Ce=me("./Utility"),ye=Ce.isObject,le=Ce.isFunction,we=Ce.isPlainObject,ue=me("./XMLElement"),Pe=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"),ce=me("./XMLDTDNotation"),be=me("./XMLAttribute"),ie=me("./XMLStringifier"),oe=me("./XMLStringWriter"),Ie.exports=function(){function Ne(je,Ve,Qe){var Ge;je||(je={}),je.writer?we(je.writer)&&(Ge=je.writer,je.writer=new oe(Ge)):je.writer=new oe(je),this.options=je,this.writer=je.writer,this.stringify=new ie(je),this.onDataCallback=Ve||function(){},this.onEndCallback=Qe||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return Ne.prototype.node=function(je,Ve,Qe){var Ge;if(je==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(),je=je.valueOf(),Ve==null&&(Ve={}),Ve=Ve.valueOf(),ye(Ve)||(Ge=[Ve,Qe],Qe=Ge[0],Ve=Ge[1]),this.currentNode=new ue(this,je,Ve),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,Qe!=null&&this.text(Qe),this},Ne.prototype.element=function(je,Ve,Qe){return this.currentNode&&this.currentNode instanceof de?this.dtdElement.apply(this,arguments):this.node(je,Ve,Qe)},Ne.prototype.attribute=function(je,Ve){var Qe,Ge;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode");if(je!=null&&(je=je.valueOf()),ye(je))for(Qe in je)ke.call(je,Qe)&&(Ge=je[Qe],this.attribute(Qe,Ge));else le(Ve)&&(Ve=Ve.apply()),this.options.skipNullAttributes&&Ve==null||(this.currentNode.attributes[je]=new be(this,je,Ve));return this},Ne.prototype.text=function(je){var Ve;return this.openCurrent(),Ve=new se(this,je),this.onData(this.writer.text(Ve,this.currentLevel+1)),this},Ne.prototype.cdata=function(je){var Ve;return this.openCurrent(),Ve=new Pe(this,je),this.onData(this.writer.cdata(Ve,this.currentLevel+1)),this},Ne.prototype.comment=function(je){var Ve;return this.openCurrent(),Ve=new he(this,je),this.onData(this.writer.comment(Ve,this.currentLevel+1)),this},Ne.prototype.raw=function(je){var Ve;return this.openCurrent(),Ve=new ee(this,je),this.onData(this.writer.raw(Ve,this.currentLevel+1)),this},Ne.prototype.instruction=function(je,Ve){var Qe,Ge,mt,ct,Ct;if(this.openCurrent(),je!=null&&(je=je.valueOf()),Ve!=null&&(Ve=Ve.valueOf()),Array.isArray(je))for(Qe=0,ct=je.length;Qe<ct;Qe++)Ge=je[Qe],this.instruction(Ge);else if(ye(je))for(Ge in je)ke.call(je,Ge)&&(mt=je[Ge],this.instruction(Ge,mt));else le(Ve)&&(Ve=Ve.apply()),Ct=new z(this,je,Ve),this.onData(this.writer.processingInstruction(Ct,this.currentLevel+1));return this},Ne.prototype.declaration=function(je,Ve,Qe){var Ge;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node");return Ge=new ve(this,je,Ve,Qe),this.onData(this.writer.declaration(Ge,this.currentLevel+1)),this},Ne.prototype.doctype=function(je,Ve,Qe){if(this.openCurrent(),je==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,Ve,Qe),this.currentNode.rootNodeName=je,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},Ne.prototype.dtdElement=function(je,Ve){var Qe;return this.openCurrent(),Qe=new xe(this,je,Ve),this.onData(this.writer.dtdElement(Qe,this.currentLevel+1)),this},Ne.prototype.attList=function(je,Ve,Qe,Ge,mt){var ct;return this.openCurrent(),ct=new Se(this,je,Ve,Qe,Ge,mt),this.onData(this.writer.dtdAttList(ct,this.currentLevel+1)),this},Ne.prototype.entity=function(je,Ve){var Qe;return this.openCurrent(),Qe=new ge(this,!1,je,Ve),this.onData(this.writer.dtdEntity(Qe,this.currentLevel+1)),this},Ne.prototype.pEntity=function(je,Ve){var Qe;return this.openCurrent(),Qe=new ge(this,!0,je,Ve),this.onData(this.writer.dtdEntity(Qe,this.currentLevel+1)),this},Ne.prototype.notation=function(je,Ve){var Qe;return this.openCurrent(),Qe=new ce(this,je,Ve),this.onData(this.writer.dtdNotation(Qe,this.currentLevel+1)),this},Ne.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},Ne.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},Ne.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},Ne.prototype.openNode=function(je){if(!je.isOpen)return!this.root&&this.currentLevel===0&&je instanceof ue&&(this.root=je),this.onData(this.writer.openNode(je,this.currentLevel)),je.isOpen=!0},Ne.prototype.closeNode=function(je){if(!je.isClosed)return this.onData(this.writer.closeNode(je,this.currentLevel)),je.isClosed=!0},Ne.prototype.onData=function(je){return this.documentStarted=!0,this.onDataCallback(je)},Ne.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},Ne.prototype.ele=function(){return this.element.apply(this,arguments)},Ne.prototype.nod=function(je,Ve,Qe){return this.node(je,Ve,Qe)},Ne.prototype.txt=function(je){return this.text(je)},Ne.prototype.dat=function(je){return this.cdata(je)},Ne.prototype.com=function(je){return this.comment(je)},Ne.prototype.ins=function(je,Ve){return this.instruction(je,Ve)},Ne.prototype.dec=function(je,Ve,Qe){return this.declaration(je,Ve,Qe)},Ne.prototype.dtd=function(je,Ve,Qe){return this.doctype(je,Ve,Qe)},Ne.prototype.e=function(je,Ve,Qe){return this.element(je,Ve,Qe)},Ne.prototype.n=function(je,Ve,Qe){return this.node(je,Ve,Qe)},Ne.prototype.t=function(je){return this.text(je)},Ne.prototype.d=function(je){return this.cdata(je)},Ne.prototype.c=function(je){return this.comment(je)},Ne.prototype.r=function(je){return this.raw(je)},Ne.prototype.i=function(je,Ve){return this.instruction(je,Ve)},Ne.prototype.att=function(){return this.currentNode&&this.currentNode instanceof de?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Ne.prototype.a=function(){return this.currentNode&&this.currentNode instanceof de?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Ne.prototype.ent=function(je,Ve){return this.entity(je,Ve)},Ne.prototype.pent=function(je,Ve){return this.pEntity(je,Ve)},Ne.prototype.not=function(je,Ve){return this.notation(je,Ve)},Ne}()}).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,Ie,Te){"use strict";var be=me("babel-runtime/core-js/object/create"),Pe=function(he){return he&&he.__esModule?he:{default:he}}(be);(function(){var he,Se,xe,ge,ce,ve=function(ue,z){function ee(){this.constructor=ue}for(var oe in z)de.call(z,oe)&&(ue[oe]=z[oe]);return ee.prototype=z.prototype,ue.prototype=new ee,ue.__super__=z.prototype,ue},de={}.hasOwnProperty;ce=me("./Utility"),ge=ce.isObject,xe=ce.isFunction,Se=me("./XMLNode"),he=me("./XMLAttribute"),Ie.exports=function(ue){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,ue),z.prototype.clone=function(){var ee,oe,ie,se;ie=(0,Pe.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(le){var ye;return ye=le.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,Ie,Te){"use strict";(function(){var be,Pe,he,Se,xe,ge,ce,ve,de,ue,z,ee,oe={}.hasOwnProperty;ee=me("./Utility"),z=ee.isObject,ue=ee.isFunction,de=ee.isEmpty,xe=null,be=null,Pe=null,he=null,Se=null,ce=null,ve=null,ge=null,Ie.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"),be=me("./XMLCData"),Pe=me("./XMLComment"),he=me("./XMLDeclaration"),Se=me("./XMLDocType"),ce=me("./XMLRaw"),ve=me("./XMLText"),ge=me("./XMLProcessingInstruction"))}return ie.prototype.element=function(se,le,ye){var we,Ce,ke,Ne,je,Ve,Qe,Ge,mt,ct;if(Ve=null,le==null&&(le={}),le=le.valueOf(),z(le)||(mt=[le,ye],ye=mt[0],le=mt[1]),se!=null&&(se=se.valueOf()),Array.isArray(se))for(ke=0,Qe=se.length;ke<Qe;ke++)Ce=se[ke],Ve=this.element(Ce);else if(ue(se))Ve=this.element(se.apply());else if(z(se)){for(je in se)if(oe.call(se,je))if(ct=se[je],ue(ct)&&(ct=ct.apply()),z(ct)&&de(ct)&&(ct=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&je.indexOf(this.stringify.convertAttKey)===0)Ve=this.attribute(je.substr(this.stringify.convertAttKey.length),ct);else if(!this.options.separateArrayItems&&Array.isArray(ct))for(Ne=0,Ge=ct.length;Ne<Ge;Ne++)Ce=ct[Ne],we={},we[je]=Ce,Ve=this.element(we);else z(ct)?(Ve=this.element(je),Ve.element(ct)):Ve=this.element(je,ct)}else Ve=!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,le,ye);if(Ve==null)throw new Error("Could not create any elements with: "+se);return Ve},ie.prototype.insertBefore=function(se,le,ye){var we,Ce,ke;if(this.isRoot)throw new Error("Cannot insert elements at root level");return Ce=this.parent.children.indexOf(this),ke=this.parent.children.splice(Ce),we=this.parent.element(se,le,ye),Array.prototype.push.apply(this.parent.children,ke),we},ie.prototype.insertAfter=function(se,le,ye){var we,Ce,ke;if(this.isRoot)throw new Error("Cannot insert elements at root level");return Ce=this.parent.children.indexOf(this),ke=this.parent.children.splice(Ce+1),we=this.parent.element(se,le,ye),Array.prototype.push.apply(this.parent.children,ke),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,le,ye){var we,Ce;return se!=null&&(se=se.valueOf()),le||(le={}),le=le.valueOf(),z(le)||(Ce=[le,ye],ye=Ce[0],le=Ce[1]),we=new xe(this,se,le),ye!=null&&we.text(ye),this.children.push(we),we},ie.prototype.text=function(se){var le;return le=new ve(this,se),this.children.push(le),this},ie.prototype.cdata=function(se){var le;return le=new be(this,se),this.children.push(le),this},ie.prototype.comment=function(se){var le;return le=new Pe(this,se),this.children.push(le),this},ie.prototype.commentBefore=function(se){var le,ye;return le=this.parent.children.indexOf(this),ye=this.parent.children.splice(le),this.parent.comment(se),Array.prototype.push.apply(this.parent.children,ye),this},ie.prototype.commentAfter=function(se){var le,ye;return le=this.parent.children.indexOf(this),ye=this.parent.children.splice(le+1),this.parent.comment(se),Array.prototype.push.apply(this.parent.children,ye),this},ie.prototype.raw=function(se){var le;return le=new ce(this,se),this.children.push(le),this},ie.prototype.instruction=function(se,le){var ye,we,Ce,ke,Ne;if(se!=null&&(se=se.valueOf()),le!=null&&(le=le.valueOf()),Array.isArray(se))for(ke=0,Ne=se.length;ke<Ne;ke++)ye=se[ke],this.instruction(ye);else if(z(se))for(ye in se)oe.call(se,ye)&&(we=se[ye],this.instruction(ye,we));else ue(le)&&(le=le.apply()),Ce=new ge(this,se,le),this.children.push(Ce);return this},ie.prototype.instructionBefore=function(se,le){var ye,we;return ye=this.parent.children.indexOf(this),we=this.parent.children.splice(ye),this.parent.instruction(se,le),Array.prototype.push.apply(this.parent.children,we),this},ie.prototype.instructionAfter=function(se,le){var ye,we;return ye=this.parent.children.indexOf(this),we=this.parent.children.splice(ye+1),this.parent.instruction(se,le),Array.prototype.push.apply(this.parent.children,we),this},ie.prototype.declaration=function(se,le,ye){var we,Ce;return we=this.document(),Ce=new he(we,se,le,ye),we.children[0]instanceof he?we.children[0]=Ce:we.children.unshift(Ce),we.root()||we},ie.prototype.doctype=function(se,le){var ye,we,Ce,ke,Ne,je,Ve,Qe,Ge,mt;for(we=this.document(),Ce=new Se(we,se,le),Ge=we.children,ke=Ne=0,Ve=Ge.length;Ne<Ve;ke=++Ne)if((ye=Ge[ke])instanceof Se)return we.children[ke]=Ce,Ce;for(mt=we.children,ke=je=0,Qe=mt.length;je<Qe;ke=++je)if(ye=mt[ke],ye.isRoot)return we.children.splice(ke,0,Ce),Ce;return we.children.push(Ce),Ce},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 le;return le=se.root().clone(),le.parent=this,le.isRoot=!1,this.children.push(le),this},ie.prototype.ele=function(se,le,ye){return this.element(se,le,ye)},ie.prototype.nod=function(se,le,ye){return this.node(se,le,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,le){return this.instruction(se,le)},ie.prototype.doc=function(){return this.document()},ie.prototype.dec=function(se,le,ye){return this.declaration(se,le,ye)},ie.prototype.dtd=function(se,le){return this.doctype(se,le)},ie.prototype.e=function(se,le,ye){return this.element(se,le,ye)},ie.prototype.n=function(se,le,ye){return this.node(se,le,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,le){return this.instruction(se,le)},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,Ie,Te){"use strict";var be=me("babel-runtime/core-js/object/create"),Pe=function(he){return he&&he.__esModule?he:{default:he}}(be);(function(){var he,Se=function(ge,ce){function ve(){this.constructor=ge}for(var de in ce)xe.call(ce,de)&&(ge[de]=ce[de]);return ve.prototype=ce.prototype,ge.prototype=new ve,ge.__super__=ce.prototype,ge},xe={}.hasOwnProperty;he=me("./XMLNode"),Ie.exports=function(ge){function ce(ve,de,ue){if(ce.__super__.constructor.call(this,ve),de==null)throw new Error("Missing instruction target");this.target=this.stringify.insTarget(de),ue&&(this.value=this.stringify.insValue(ue))}return Se(ce,ge),ce.prototype.clone=function(){return(0,Pe.default)(this)},ce.prototype.toString=function(ve){return this.options.writer.set(ve).processingInstruction(this)},ce}(he)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],229:[function(me,Ie,Te){"use strict";var be=me("babel-runtime/core-js/object/create"),Pe=function(he){return he&&he.__esModule?he:{default:he}}(be);(function(){var he,Se=function(ge,ce){function ve(){this.constructor=ge}for(var de in ce)xe.call(ce,de)&&(ge[de]=ce[de]);return ve.prototype=ce.prototype,ge.prototype=new ve,ge.__super__=ce.prototype,ge},xe={}.hasOwnProperty;he=me("./XMLNode"),Ie.exports=function(ge){function ce(ve,de){if(ce.__super__.constructor.call(this,ve),de==null)throw new Error("Missing raw text");this.value=this.stringify.raw(de)}return Se(ce,ge),ce.prototype.clone=function(){return(0,Pe.default)(this)},ce.prototype.toString=function(ve){return this.options.writer.set(ve).raw(this)},ce}(he)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],230:[function(me,Ie,Te){"use strict";(function(){var be,Pe,he,Se,xe,ge,ce,ve,de,ue,z,ee,oe,ie=function(le,ye){function we(){this.constructor=le}for(var Ce in ye)se.call(ye,Ce)&&(le[Ce]=ye[Ce]);return we.prototype=ye.prototype,le.prototype=new we,le.__super__=ye.prototype,le},se={}.hasOwnProperty;ce=me("./XMLDeclaration"),ve=me("./XMLDocType"),be=me("./XMLCData"),Pe=me("./XMLComment"),de=me("./XMLElement"),z=me("./XMLRaw"),ee=me("./XMLText"),ue=me("./XMLProcessingInstruction"),he=me("./XMLDTDAttList"),Se=me("./XMLDTDElement"),xe=me("./XMLDTDEntity"),ge=me("./XMLDTDNotation"),oe=me("./XMLWriterBase"),Ie.exports=function(le){function ye(we,Ce){ye.__super__.constructor.call(this,Ce),this.stream=we}return ie(ye,le),ye.prototype.document=function(we){var Ce,ke,Ne,je,Ve,Qe,Ge,mt;for(Qe=we.children,ke=0,je=Qe.length;ke<je;ke++)Ce=Qe[ke],Ce.isLastRootNode=!1;for(we.children[we.children.length-1].isLastRootNode=!0,Ge=we.children,mt=[],Ne=0,Ve=Ge.length;Ne<Ve;Ne++)switch(Ce=Ge[Ne],!1){case!(Ce instanceof ce):mt.push(this.declaration(Ce));break;case!(Ce instanceof ve):mt.push(this.docType(Ce));break;case!(Ce instanceof Pe):mt.push(this.comment(Ce));break;case!(Ce instanceof ue):mt.push(this.processingInstruction(Ce));break;default:mt.push(this.element(Ce))}return mt},ye.prototype.attribute=function(we){return this.stream.write(" "+we.name+'="'+we.value+'"')},ye.prototype.cdata=function(we,Ce){return this.stream.write(this.space(Ce)+"<![CDATA["+we.text+"]]>"+this.endline(we))},ye.prototype.comment=function(we,Ce){return this.stream.write(this.space(Ce)+"<!-- "+we.text+" -->"+this.endline(we))},ye.prototype.declaration=function(we,Ce){return this.stream.write(this.space(Ce)),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,Ce){var ke,Ne,je,Ve;if(Ce||(Ce=0),this.stream.write(this.space(Ce)),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)),Ve=we.children,Ne=0,je=Ve.length;Ne<je;Ne++)switch(ke=Ve[Ne],!1){case!(ke instanceof he):this.dtdAttList(ke,Ce+1);break;case!(ke instanceof Se):this.dtdElement(ke,Ce+1);break;case!(ke instanceof xe):this.dtdEntity(ke,Ce+1);break;case!(ke instanceof ge):this.dtdNotation(ke,Ce+1);break;case!(ke instanceof be):this.cdata(ke,Ce+1);break;case!(ke instanceof Pe):this.comment(ke,Ce+1);break;case!(ke instanceof ue):this.processingInstruction(ke,Ce+1);break;default:throw new Error("Unknown DTD node type: "+ke.constructor.name)}this.stream.write("]")}return this.stream.write(this.spacebeforeslash+">"),this.stream.write(this.endline(we))},ye.prototype.element=function(we,Ce){var ke,Ne,je,Ve,Qe,Ge,mt,ct;Ce||(Ce=0),ct=this.space(Ce),this.stream.write(ct+"<"+we.name),Ge=we.attributes;for(Qe in Ge)se.call(Ge,Qe)&&(ke=Ge[Qe],this.attribute(ke));if(we.children.length===0||we.children.every(function(Ct){return Ct.value===""}))this.allowEmpty?this.stream.write("></"+we.name+">"):this.stream.write(this.spacebeforeslash+"/>");else if(this.pretty&&we.children.length===1&&we.children[0].value!=null)this.stream.write(">"),this.stream.write(we.children[0].value),this.stream.write("</"+we.name+">");else{for(this.stream.write(">"+this.newline),mt=we.children,je=0,Ve=mt.length;je<Ve;je++)switch(Ne=mt[je],!1){case!(Ne instanceof be):this.cdata(Ne,Ce+1);break;case!(Ne instanceof Pe):this.comment(Ne,Ce+1);break;case!(Ne instanceof de):this.element(Ne,Ce+1);break;case!(Ne instanceof z):this.raw(Ne,Ce+1);break;case!(Ne instanceof ee):this.text(Ne,Ce+1);break;case!(Ne instanceof ue):this.processingInstruction(Ne,Ce+1);break;default:throw new Error("Unknown XML node type: "+Ne.constructor.name)}this.stream.write(ct+"</"+we.name+">")}return this.stream.write(this.endline(we))},ye.prototype.processingInstruction=function(we,Ce){return this.stream.write(this.space(Ce)+"<?"+we.target),we.value&&this.stream.write(" "+we.value),this.stream.write(this.spacebeforeslash+"?>"+this.endline(we))},ye.prototype.raw=function(we,Ce){return this.stream.write(this.space(Ce)+we.value+this.endline(we))},ye.prototype.text=function(we,Ce){return this.stream.write(this.space(Ce)+we.value+this.endline(we))},ye.prototype.dtdAttList=function(we,Ce){return this.stream.write(this.space(Ce)+"<!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,Ce){return this.stream.write(this.space(Ce)+"<!ELEMENT "+we.name+" "+we.value),this.stream.write(this.spacebeforeslash+">"+this.endline(we))},ye.prototype.dtdEntity=function(we,Ce){return this.stream.write(this.space(Ce)+"<!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,Ce){return this.stream.write(this.space(Ce)+"<!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,Ie,Te){"use strict";(function(){var be,Pe,he,Se,xe,ge,ce,ve,de,ue,z,ee,oe,ie=function(le,ye){function we(){this.constructor=le}for(var Ce in ye)se.call(ye,Ce)&&(le[Ce]=ye[Ce]);return we.prototype=ye.prototype,le.prototype=new we,le.__super__=ye.prototype,le},se={}.hasOwnProperty;ce=me("./XMLDeclaration"),ve=me("./XMLDocType"),be=me("./XMLCData"),Pe=me("./XMLComment"),de=me("./XMLElement"),z=me("./XMLRaw"),ee=me("./XMLText"),ue=me("./XMLProcessingInstruction"),he=me("./XMLDTDAttList"),Se=me("./XMLDTDElement"),xe=me("./XMLDTDEntity"),ge=me("./XMLDTDNotation"),oe=me("./XMLWriterBase"),Ie.exports=function(le){function ye(we){ye.__super__.constructor.call(this,we)}return ie(ye,le),ye.prototype.document=function(we){var Ce,ke,Ne,je,Ve;for(this.textispresent=!1,je="",Ve=we.children,ke=0,Ne=Ve.length;ke<Ne;ke++)Ce=Ve[ke],je+=function(){switch(!1){case!(Ce instanceof ce):return this.declaration(Ce);case!(Ce instanceof ve):return this.docType(Ce);case!(Ce instanceof Pe):return this.comment(Ce);case!(Ce instanceof ue):return this.processingInstruction(Ce);default:return this.element(Ce,0)}}.call(this);return this.pretty&&je.slice(-this.newline.length)===this.newline&&(je=je.slice(0,-this.newline.length)),je},ye.prototype.attribute=function(we){return" "+we.name+'="'+we.value+'"'},ye.prototype.cdata=function(we,Ce){return this.space(Ce)+"<![CDATA["+we.text+"]]>"+this.newline},ye.prototype.comment=function(we,Ce){return this.space(Ce)+"<!-- "+we.text+" -->"+this.newline},ye.prototype.declaration=function(we,Ce){var ke;return ke=this.space(Ce),ke+='<?xml version="'+we.version+'"',we.encoding!=null&&(ke+=' encoding="'+we.encoding+'"'),we.standalone!=null&&(ke+=' standalone="'+we.standalone+'"'),ke+=this.spacebeforeslash+"?>",ke+=this.newline},ye.prototype.docType=function(we,Ce){var ke,Ne,je,Ve,Qe;if(Ce||(Ce=0),Ve=this.space(Ce),Ve+="<!DOCTYPE "+we.root().name,we.pubID&&we.sysID?Ve+=' PUBLIC "'+we.pubID+'" "'+we.sysID+'"':we.sysID&&(Ve+=' SYSTEM "'+we.sysID+'"'),we.children.length>0){for(Ve+=" [",Ve+=this.newline,Qe=we.children,Ne=0,je=Qe.length;Ne<je;Ne++)ke=Qe[Ne],Ve+=function(){switch(!1){case!(ke instanceof he):return this.dtdAttList(ke,Ce+1);case!(ke instanceof Se):return this.dtdElement(ke,Ce+1);case!(ke instanceof xe):return this.dtdEntity(ke,Ce+1);case!(ke instanceof ge):return this.dtdNotation(ke,Ce+1);case!(ke instanceof be):return this.cdata(ke,Ce+1);case!(ke instanceof Pe):return this.comment(ke,Ce+1);case!(ke instanceof ue):return this.processingInstruction(ke,Ce+1);default:throw new Error("Unknown DTD node type: "+ke.constructor.name)}}.call(this);Ve+="]"}return Ve+=this.spacebeforeslash+">",Ve+=this.newline},ye.prototype.element=function(we,Ce){var ke,Ne,je,Ve,Qe,Ge,mt,ct,Ct,it,St,ut,Ft;Ce||(Ce=0),Ft=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),ut=this.space(Ce),ct="",ct+=ut+"<"+we.name,Ct=we.attributes;for(mt in Ct)se.call(Ct,mt)&&(ke=Ct[mt],ct+=this.attribute(ke));if(we.children.length===0||we.children.every(function(ht){return ht.value===""}))this.allowEmpty?ct+="></"+we.name+">"+this.newline:ct+=this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&we.children.length===1&&we.children[0].value!=null)ct+=">",ct+=we.children[0].value,ct+="</"+we.name+">"+this.newline;else{if(this.dontprettytextnodes){for(it=we.children,je=0,Qe=it.length;je<Qe;je++)if(Ne=it[je],Ne.value!=null){this.textispresent++,Ft=!0;break}}for(this.textispresent&&(this.newline="",this.pretty=!1,ut=this.space(Ce)),ct+=">"+this.newline,St=we.children,Ve=0,Ge=St.length;Ve<Ge;Ve++)Ne=St[Ve],ct+=function(){switch(!1){case!(Ne instanceof be):return this.cdata(Ne,Ce+1);case!(Ne instanceof Pe):return this.comment(Ne,Ce+1);case!(Ne instanceof de):return this.element(Ne,Ce+1);case!(Ne instanceof z):return this.raw(Ne,Ce+1);case!(Ne instanceof ee):return this.text(Ne,Ce+1);case!(Ne instanceof ue):return this.processingInstruction(Ne,Ce+1);default:throw new Error("Unknown XML node type: "+Ne.constructor.name)}}.call(this);Ft&&this.textispresent--,this.textispresent||(this.newline=this.newlinedefault,this.pretty=this.prettydefault),ct+=ut+"</"+we.name+">"+this.newline}return ct},ye.prototype.processingInstruction=function(we,Ce){var ke;return ke=this.space(Ce)+"<?"+we.target,we.value&&(ke+=" "+we.value),ke+=this.spacebeforeslash+"?>"+this.newline},ye.prototype.raw=function(we,Ce){return this.space(Ce)+we.value+this.newline},ye.prototype.text=function(we,Ce){return this.space(Ce)+we.value+this.newline},ye.prototype.dtdAttList=function(we,Ce){var ke;return ke=this.space(Ce)+"<!ATTLIST "+we.elementName+" "+we.attributeName+" "+we.attributeType,we.defaultValueType!=="#DEFAULT"&&(ke+=" "+we.defaultValueType),we.defaultValue&&(ke+=' "'+we.defaultValue+'"'),ke+=this.spacebeforeslash+">"+this.newline},ye.prototype.dtdElement=function(we,Ce){return this.space(Ce)+"<!ELEMENT "+we.name+" "+we.value+this.spacebeforeslash+">"+this.newline},ye.prototype.dtdEntity=function(we,Ce){var ke;return ke=this.space(Ce)+"<!ENTITY",we.pe&&(ke+=" %"),ke+=" "+we.name,we.value?ke+=' "'+we.value+'"':(we.pubID&&we.sysID?ke+=' PUBLIC "'+we.pubID+'" "'+we.sysID+'"':we.sysID&&(ke+=' SYSTEM "'+we.sysID+'"'),we.nData&&(ke+=" NDATA "+we.nData)),ke+=this.spacebeforeslash+">"+this.newline},ye.prototype.dtdNotation=function(we,Ce){var ke;return ke=this.space(Ce)+"<!NOTATION "+we.name,we.pubID&&we.sysID?ke+=' PUBLIC "'+we.pubID+'" "'+we.sysID+'"':we.pubID?ke+=' PUBLIC "'+we.pubID+'"':we.sysID&&(ke+=' SYSTEM "'+we.sysID+'"'),ke+=this.spacebeforeslash+">"+this.newline},ye.prototype.openNode=function(we,Ce){var ke,Ne,je,Ve;if(Ce||(Ce=0),we instanceof de){je=this.space(Ce)+"<"+we.name,Ve=we.attributes;for(Ne in Ve)se.call(Ve,Ne)&&(ke=Ve[Ne],je+=this.attribute(ke));return je+=(we.children?">":"/>")+this.newline}return je=this.space(Ce)+"<!DOCTYPE "+we.rootNodeName,we.pubID&&we.sysID?je+=' PUBLIC "'+we.pubID+'" "'+we.sysID+'"':we.sysID&&(je+=' SYSTEM "'+we.sysID+'"'),je+=(we.children?" [":">")+this.newline},ye.prototype.closeNode=function(we,Ce){switch(Ce||(Ce=0),!1){case!(we instanceof de):return this.space(Ce)+"</"+we.name+">"+this.newline;case!(we instanceof ve):return this.space(Ce)+"]>"+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,Ie,Te){"use strict";(function(){var be=function(he,Se){return function(){return he.apply(Se,arguments)}},Pe={}.hasOwnProperty;Ie.exports=function(){function he(Se){this.assertLegalChar=be(this.assertLegalChar,this);var xe,ge,ce;Se||(Se={}),this.noDoubleEncoding=Se.noDoubleEncoding,ge=Se.stringify||{};for(xe in ge)Pe.call(ge,xe)&&(ce=ge[xe],this[xe]=ce)}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,Ie,Te){"use strict";var be=me("babel-runtime/core-js/object/create"),Pe=function(he){return he&&he.__esModule?he:{default:he}}(be);(function(){var he,Se=function(ge,ce){function ve(){this.constructor=ge}for(var de in ce)xe.call(ce,de)&&(ge[de]=ce[de]);return ve.prototype=ce.prototype,ge.prototype=new ve,ge.__super__=ce.prototype,ge},xe={}.hasOwnProperty;he=me("./XMLNode"),Ie.exports=function(ge){function ce(ve,de){if(ce.__super__.constructor.call(this,ve),de==null)throw new Error("Missing element text");this.value=this.stringify.eleText(de)}return Se(ce,ge),ce.prototype.clone=function(){return(0,Pe.default)(this)},ce.prototype.toString=function(ve){return this.options.writer.set(ve).text(this)},ce}(he)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],234:[function(me,Ie,Te){"use strict";(function(){var be={}.hasOwnProperty;Ie.exports=function(){function Pe(he){var Se,xe,ge,ce,ve,de,ue,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=(ce=he.newline)!=null?ce:`
|
|
|
`,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=(ue=he.spacebeforeslash)!=null?ue:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,z=he.writer||{};for(Se in z)be.call(z,Se)&&(ee=z[Se],this[Se]=ee)}return Pe.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)be.call(xe,Se)&&(ge=xe[Se],this[Se]=ge);return this},Pe.prototype.space=function(he){var Se;return this.pretty?(Se=(he||0)+this.offset+1,Se>0?new Array(Se).join(this.indent):""):""},Pe}()}).call(void 0)},{}],235:[function(me,Ie,Te){"use strict";(function(){var be,Pe,he,Se,xe,ge,ce;ce=me("./Utility"),xe=ce.assign,ge=ce.isFunction,be=me("./XMLDocument"),Pe=me("./XMLDocumentCB"),Se=me("./XMLStringWriter"),he=me("./XMLStreamWriter"),Ie.exports.create=function(ve,de,ue,z){var ee,oe;if(ve==null)throw new Error("Root element needs a name");return z=xe({},de,ue,z),ee=new be(z),oe=ee.element(ve),z.headless||(ee.declaration(z),z.pubID==null&&z.sysID==null||ee.doctype(z)),oe},Ie.exports.begin=function(ve,de,ue){var z;return ge(ve)&&(z=[ve,de],de=z[0],ue=z[1],ve={}),de?new Pe(ve,de,ue):new be(ve)},Ie.exports.stringWriter=function(ve){return new Se(ve)},Ie.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,Ie,Te){function be(){for(var he={},Se=0;Se<arguments.length;Se++){var xe=arguments[Se];for(var ge in xe)Pe.call(xe,ge)&&(he[ge]=xe[ge])}return he}Ie.exports=be;var Pe=Object.prototype.hasOwnProperty},{}],237:[function(me,Ie,Te){"use strict";function be(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,ue],de));for(var ie=new Se(de),se=new Se(de),le=0;le<de;le++)ie[le]=54^ee[le],se[le]=92^ee[le];var ye=z(Se.concat([ie,oe]));return z(Se.concat([se,ye]))}function Pe(z,ee){z=z||"sha1";var oe=ve[z],ie=[],se=0;return oe||he("algorithm:",z,"is not yet supported"),{update:function(le){return Se.isBuffer(le)||(le=new Se(le)),ie.push(le),se+=le.length,this},digest:function(le){var ye=Se.concat(ie),we=ee?be(oe,ee,ye):oe(ye);return ie=null,le?we.toString(le):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"),ce=me("./md5"),ve={sha1:xe,sha256:ge,md5:ce},de=64,ue=new Se(de);ue.fill(0),Te.createHash=function(z){return Pe(z)},Te.createHmac=function(z,ee){return Pe(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){Te[z]=function(){he("sorry,",z,"is not implemented yet")}})},{"./md5":239,"./sha":240,"./sha256":241,buffer:38}],238:[function(me,Ie,Te){"use strict";function be(ve,de){if(ve.length%xe!=0){var ue=ve.length+(xe-ve.length%xe);ve=Se.concat([ve,ge],ue)}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 Pe(ve,de,ue){for(var z=new Se(de),ee=ue?z.writeInt32BE:z.writeInt32LE,oe=0;oe<ve.length;oe++)ee.call(z,ve[oe],4*oe,!0);return z}function he(ve,de,ue,z){return Se.isBuffer(ve)||(ve=new Se(ve)),Pe(de(be(ve,z),ve.length*ce),ue,z)}var Se=me("buffer").Buffer,xe=4,ge=new Se(xe);ge.fill(0);var ce=8;Ie.exports={hash:he}},{buffer:38}],239:[function(me,Ie,Te){"use strict";function be(ue,z){ue[z>>5]|=128<<z%32,ue[14+(z+64>>>9<<4)]=z;for(var ee=1732584193,oe=-271733879,ie=-1732584194,se=271733878,le=0;le<ue.length;le+=16){var ye=ee,we=oe,Ce=ie,ke=se;ee=he(ee,oe,ie,se,ue[le+0],7,-680876936),se=he(se,ee,oe,ie,ue[le+1],12,-389564586),ie=he(ie,se,ee,oe,ue[le+2],17,606105819),oe=he(oe,ie,se,ee,ue[le+3],22,-1044525330),ee=he(ee,oe,ie,se,ue[le+4],7,-176418897),se=he(se,ee,oe,ie,ue[le+5],12,1200080426),ie=he(ie,se,ee,oe,ue[le+6],17,-1473231341),oe=he(oe,ie,se,ee,ue[le+7],22,-45705983),ee=he(ee,oe,ie,se,ue[le+8],7,1770035416),se=he(se,ee,oe,ie,ue[le+9],12,-1958414417),ie=he(ie,se,ee,oe,ue[le+10],17,-42063),oe=he(oe,ie,se,ee,ue[le+11],22,-1990404162),ee=he(ee,oe,ie,se,ue[le+12],7,1804603682),se=he(se,ee,oe,ie,ue[le+13],12,-40341101),ie=he(ie,se,ee,oe,ue[le+14],17,-1502002290),oe=he(oe,ie,se,ee,ue[le+15],22,1236535329),ee=Se(ee,oe,ie,se,ue[le+1],5,-165796510),se=Se(se,ee,oe,ie,ue[le+6],9,-1069501632),ie=Se(ie,se,ee,oe,ue[le+11],14,643717713),oe=Se(oe,ie,se,ee,ue[le+0],20,-373897302),ee=Se(ee,oe,ie,se,ue[le+5],5,-701558691),se=Se(se,ee,oe,ie,ue[le+10],9,38016083),ie=Se(ie,se,ee,oe,ue[le+15],14,-660478335),oe=Se(oe,ie,se,ee,ue[le+4],20,-405537848),ee=Se(ee,oe,ie,se,ue[le+9],5,568446438),se=Se(se,ee,oe,ie,ue[le+14],9,-1019803690),ie=Se(ie,se,ee,oe,ue[le+3],14,-187363961),oe=Se(oe,ie,se,ee,ue[le+8],20,1163531501),ee=Se(ee,oe,ie,se,ue[le+13],5,-1444681467),se=Se(se,ee,oe,ie,ue[le+2],9,-51403784),ie=Se(ie,se,ee,oe,ue[le+7],14,1735328473),oe=Se(oe,ie,se,ee,ue[le+12],20,-1926607734),ee=xe(ee,oe,ie,se,ue[le+5],4,-378558),se=xe(se,ee,oe,ie,ue[le+8],11,-2022574463),ie=xe(ie,se,ee,oe,ue[le+11],16,1839030562),oe=xe(oe,ie,se,ee,ue[le+14],23,-35309556),ee=xe(ee,oe,ie,se,ue[le+1],4,-1530992060),se=xe(se,ee,oe,ie,ue[le+4],11,1272893353),ie=xe(ie,se,ee,oe,ue[le+7],16,-155497632),oe=xe(oe,ie,se,ee,ue[le+10],23,-1094730640),ee=xe(ee,oe,ie,se,ue[le+13],4,681279174),se=xe(se,ee,oe,ie,ue[le+0],11,-358537222),ie=xe(ie,se,ee,oe,ue[le+3],16,-722521979),oe=xe(oe,ie,se,ee,ue[le+6],23,76029189),ee=xe(ee,oe,ie,se,ue[le+9],4,-640364487),se=xe(se,ee,oe,ie,ue[le+12],11,-421815835),ie=xe(ie,se,ee,oe,ue[le+15],16,530742520),oe=xe(oe,ie,se,ee,ue[le+2],23,-995338651),ee=ge(ee,oe,ie,se,ue[le+0],6,-198630844),se=ge(se,ee,oe,ie,ue[le+7],10,1126891415),ie=ge(ie,se,ee,oe,ue[le+14],15,-1416354905),oe=ge(oe,ie,se,ee,ue[le+5],21,-57434055),ee=ge(ee,oe,ie,se,ue[le+12],6,1700485571),se=ge(se,ee,oe,ie,ue[le+3],10,-1894986606),ie=ge(ie,se,ee,oe,ue[le+10],15,-1051523),oe=ge(oe,ie,se,ee,ue[le+1],21,-2054922799),ee=ge(ee,oe,ie,se,ue[le+8],6,1873313359),se=ge(se,ee,oe,ie,ue[le+15],10,-30611744),ie=ge(ie,se,ee,oe,ue[le+6],15,-1560198380),oe=ge(oe,ie,se,ee,ue[le+13],21,1309151649),ee=ge(ee,oe,ie,se,ue[le+4],6,-145523070),se=ge(se,ee,oe,ie,ue[le+11],10,-1120210379),ie=ge(ie,se,ee,oe,ue[le+2],15,718787259),oe=ge(oe,ie,se,ee,ue[le+9],21,-343485551),ee=ce(ee,ye),oe=ce(oe,we),ie=ce(ie,Ce),se=ce(se,ke)}return Array(ee,oe,ie,se)}function Pe(ue,z,ee,oe,ie,se){return ce(ve(ce(ce(z,ue),ce(oe,se)),ie),ee)}function he(ue,z,ee,oe,ie,se,le){return Pe(z&ee|~z&oe,ue,z,ie,se,le)}function Se(ue,z,ee,oe,ie,se,le){return Pe(z&oe|ee&~oe,ue,z,ie,se,le)}function xe(ue,z,ee,oe,ie,se,le){return Pe(z^ee^oe,ue,z,ie,se,le)}function ge(ue,z,ee,oe,ie,se,le){return Pe(ee^(z|~oe),ue,z,ie,se,le)}function ce(ue,z){var ee=(65535&ue)+(65535&z);return(ue>>16)+(z>>16)+(ee>>16)<<16|65535&ee}function ve(ue,z){return ue<<z|ue>>>32-z}var de=me("./helpers");Ie.exports=function(ue){return de.hash(ue,be,16)}},{"./helpers":238}],240:[function(me,Ie,Te){"use strict";function be(ce,ve){ce[ve>>5]|=128<<24-ve%32,ce[15+(ve+64>>9<<4)]=ve;for(var de=Array(80),ue=1732584193,z=-271733879,ee=-1732584194,oe=271733878,ie=-1009589776,se=0;se<ce.length;se+=16){for(var le=ue,ye=z,we=ee,Ce=oe,ke=ie,Ne=0;Ne<80;Ne++){de[Ne]=Ne<16?ce[se+Ne]:xe(de[Ne-3]^de[Ne-8]^de[Ne-14]^de[Ne-16],1);var je=Se(Se(xe(ue,5),Pe(Ne,z,ee,oe)),Se(Se(ie,de[Ne]),he(Ne)));ie=oe,oe=ee,ee=xe(z,30),z=ue,ue=je}ue=Se(ue,le),z=Se(z,ye),ee=Se(ee,we),oe=Se(oe,Ce),ie=Se(ie,ke)}return Array(ue,z,ee,oe,ie)}function Pe(ce,ve,de,ue){return ce<20?ve&de|~ve&ue:ce<40?ve^de^ue:ce<60?ve&de|ve&ue|de&ue:ve^de^ue}function he(ce){return ce<20?1518500249:ce<40?1859775393:ce<60?-1894007588:-899497514}function Se(ce,ve){var de=(65535&ce)+(65535&ve);return(ce>>16)+(ve>>16)+(de>>16)<<16|65535&de}function xe(ce,ve){return ce<<ve|ce>>>32-ve}var ge=me("./helpers");Ie.exports=function(ce){return ge.hash(ce,be,20,!0)}},{"./helpers":238}],241:[function(me,Ie,Te){"use strict";var be=me("./helpers"),Pe=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},ce=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)},ue=function(ee){return he(ee,17)^he(ee,19)^Se(ee,10)},z=function(ee,oe){var ie,se,le,ye,we,Ce,ke,Ne,je,Ve,Qe,Ge,mt=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),ct=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),Ct=new Array(64);ee[oe>>5]|=128<<24-oe%32,ee[15+(oe+64>>9<<4)]=oe;for(var je=0;je<ee.length;je+=16){ie=ct[0],se=ct[1],le=ct[2],ye=ct[3],we=ct[4],Ce=ct[5],ke=ct[6],Ne=ct[7];for(var Ve=0;Ve<64;Ve++)Ct[Ve]=Ve<16?ee[Ve+je]:Pe(Pe(Pe(ue(Ct[Ve-2]),Ct[Ve-7]),de(Ct[Ve-15])),Ct[Ve-16]),Qe=Pe(Pe(Pe(Pe(Ne,ve(we)),xe(we,Ce,ke)),mt[Ve]),Ct[Ve]),Ge=Pe(ce(ie),ge(ie,se,le)),Ne=ke,ke=Ce,Ce=we,we=Pe(ye,Qe),ye=le,le=se,se=ie,ie=Pe(Qe,Ge);ct[0]=Pe(ie,ct[0]),ct[1]=Pe(se,ct[1]),ct[2]=Pe(le,ct[2]),ct[3]=Pe(ye,ct[3]),ct[4]=Pe(we,ct[4]),ct[5]=Pe(Ce,ct[5]),ct[6]=Pe(ke,ct[6]),ct[7]=Pe(Ne,ct[7])}return ct};Ie.exports=function(ee){return be.hash(ee,z,32,!0)}},{"./helpers":238}],242:[function(me,Ie,Te){(function(be){"use strict";function Pe(z){return z&&z.__esModule?z:{default:z}}var he=me("babel-runtime/core-js/object/create"),Se=Pe(he),xe=me("babel-runtime/helpers/classCallCheck"),ge=Pe(xe),ce=me("babel-runtime/helpers/createClass"),ve=Pe(ce),de=me("babel-runtime/helpers/typeof"),ue=Pe(de);(function(z){if((Te===void 0?"undefined":(0,ue.default)(Te))==="object"&&Ie!==void 0)Ie.exports=z();else if(typeof Le=="function"&&Le.amd)Le([],z);else{var ee;ee=typeof window!="undefined"?window:be!==void 0?be:typeof self!="undefined"?self:this,ee.mime=z()}})(function(){return function z(ee,oe,ie){function se(we,Ce){if(!oe[we]){if(!ee[we]){var ke=typeof me=="function"&&me;if(!Ce&&ke)return ke(we,!0);if(le)return le(we,!0);var Ne=new Error("Cannot find module '"+we+"'");throw Ne.code="MODULE_NOT_FOUND",Ne}var je=oe[we]={exports:{}};ee[we][0].call(je.exports,function(Ve){var Qe=ee[we][1][Ve];return se(Qe||Ve)},je,je.exports,z,ee,oe,ie)}return oe[we].exports}for(var le=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 le=0;le<arguments.length;le++)this.define(arguments[le])}return(0,ve.default)(se,[{key:"define",value:function(le,ye){for(var we in le){for(var Ce=le[we],ke=0;ke<Ce.length;ke++){var Ne=Ce[ke];if(!ye&&Ne in this._types)throw new Error('Attempt to change mapping for "'+Ne+'" extension from "'+this._types[Ne]+'" to "'+we+'". Pass `force=true` to allow this, otherwise remove "'+Ne+'" from the list of extensions for "'+we+'".');this._types[Ne]=we}!ye&&this._extensions[we]||(this._extensions[we]=Ce[0])}}},{key:"getType",value:function(le){le=String(le);var ye=le.replace(/^.*[\/\\]/,"").toLowerCase(),we=ye.replace(/^.*\./,"").toLowerCase(),Ce=ye.length<le.length;return(we.length<ye.length-1||!Ce)&&this._types[we]||null}},{key:"getExtension",value:function(le){return(le=/^\s*([^;\s]*)/.test(le)&&RegExp.$1)&&this._extensions[le.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,Ie,Te){"use strict";Te.encodeURIComponent=function(be){try{return encodeURIComponent(be)}catch(Pe){return be}},Te.escape=me("escape-html"),Te.timestamp=function(be){if(be){var Pe=be;return typeof Pe=="string"&&(Pe=Number(Pe)),String(be).length===10&&(Pe*=1e3),new Date(Pe)}return Math.round(Date.now()/1e3)}},{"escape-html":157}],244:[function(me,Ie,Te){(function(be,Pe){"use strict";function he(Ne){return Ne&&Ne.__esModule?Ne:{default:Ne}}function Se(Ne,je){return Ne===void 0?je:Ne}function xe(Ne,je){return function(Ve,Qe,Ge){if(Ve)return je(Ve);Ne({data:Qe,status:Ge.statusCode,headers:Ge.headers,res:Ge})}}var ge,ce=me("babel-runtime/core-js/json/stringify"),ve=he(ce),de=me("babel-runtime/helpers/typeof"),ue=he(de),z=me("util"),ee=me("url"),oe=me("http"),ie=me("https"),se=me("debug")("urllib"),le=me("humanize-ms"),ye=0,we=Math.pow(2,31)-10,Ce=/^https?:\/\//i;Te.TIMEOUTS=[le("300s"),le("300s")];var ke=["json","text"];Te.request=function(Ne,je,Ve){return arguments.length===2&&typeof je=="function"&&(Ve=je,je=null),typeof Ve=="function"?Te.requestWithCallback(Ne,je,Ve):(ge||(ge=me("any-promise")),new ge(function(Qe,Ge){Te.requestWithCallback(Ne,je,xe(Qe,Ge))}))},Te.requestWithCallback=function(Ne,je,Ve){function Qe(){He&&(clearTimeout(He),He=null)}function Ge(){Xe&&(clearTimeout(Xe),Xe=null)}function mt(kn,$n,An){if(Ge(),!Ve)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),ht,be.pid,Kt.method,Ne),void(kn&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),ht,be.pid,kn.name,kn.message,kn.stack));var oi=Ve;Ve=null;var ai={};if(An&&(Ze=An.statusCode,ai=An.headers),Ze===401&&ai["www-authenticate"]&&(!je.headers||!je.headers.Authorization)&&je.digestAuth){var Di=ai["www-authenticate"];if(Di.indexOf("Digest ")>=0)return se("Request#%d %s: got digest auth header WWW-Authenticate: %s",ht,Ne,Di),je.headers=je.headers||{},je.headers.Authorization=digestAuthHeader(Kt.method,Kt.path,Di,je.digestAuth),se("Request#%d %s: auth with digest header: %s",ht,Ne,je.headers.Authorization),An.headers["set-cookie"]&&(je.headers.Cookie=An.headers["set-cookie"].join(";")),Te.requestWithCallback(Ne,je,oi)}var Pi=Date.now()-yt;en&&(en.contentDownload=Pi),se("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Pi,Ke,Ze,Kt.method,Kt.host,Kt.path,Ue,en);var Xi={status:Ze,statusCode:Ze,headers:ai,size:Ke,aborted:lt,rt:Pi,keepAliveSocket:Ue,data:$n,requestUrls:je.requestUrls,timing:en,remoteAddress:xt,remotePort:tn};if(kn){var or="";jt&&typeof jt.getCurrentStatus=="function"&&(or=", agent status: "+(0,ve.default)(jt.getCurrentStatus())),kn.message+=", "+Kt.method+" "+Ne+" "+Ze+" (connected: "+Ae+", keepalive socket: "+Ue+or+`)
|
|
|
headers: `+(0,ve.default)(ai),kn.data=$n,kn.path=Kt.path,kn.status=Ze,kn.headers=ai,kn.res=Xi}oi(kn,$n,je.streaming?An:Xi),je.emitter&&(rt.url=Ne,rt.socket=yn&&yn.connection,rt.options=Kt,rt.size=qe,je.emitter.emit("response",{requestId:ht,error:kn,ctx:je.ctx,req:rt,res:Xi}))}function ct(kn){var $n=null;if(je.followRedirect&&statuses.redirect[kn.statusCode]){je._followRedirectCount=(je._followRedirectCount||0)+1;var An=kn.headers.location;if(An){if(!(je._followRedirectCount>je.maxRedirects)){var oi=je.formatRedirectUrl?je.formatRedirectUrl(Ne,An):ee.resolve(Ne,An);se("Request#%d %s: `redirected` from %s to %s",ht,Kt.path,Ne,oi),Ge(),je.headers&&je.headers.Host&&Ce.test(An)&&(je.headers.Host=null);var ai=Ve;return Ve=null,Te.requestWithCallback(oi,je,ai),{redirect:!0,error:null}}$n=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+Ne),$n.name="MaxRedirectError"}else $n=new Error("Got statusCode "+kn.statusCode+" but cannot resolve next location from headers"),$n.name="FollowRedirectError"}return{redirect:!1,error:$n}}function Ct(kn,$n,An){return An(null,$n,kn.headers["content-encoding"])}function it(kn){if(en&&(en.waiting=Date.now()-yt),se("Request#%d %s `req response` event emit: status %d, headers: %j",ht,Ne,kn.statusCode,kn.headers),je.streaming){var $n=ct(kn);return $n.redirect?void kn.resume():$n.error?(kn.resume(),mt($n.error,null,kn)):mt(null,null,kn)}if(kn.on("close",function(){se("Request#%d %s: `res close` event emit, total size %d",ht,Ne,Ke)}),kn.on("error",function(){se("Request#%d %s: `res error` event emit, total size %d",ht,Ne,Ke)}),kn.on("aborted",function(){lt=!0,se("Request#%d %s: `res aborted` event emit, total size %d",ht,Ne,Ke)}),Jt){var $n=ct(kn);return $n.redirect?void kn.resume():$n.error?(kn.resume(),Jt.end(),mt($n.error,null,kn)):(je.consumeWriteStream===!1?kn.on("end",mt.bind(null,null,null,kn)):isNode010||isNode012?first([[Jt,"close"],[kn,"aborted"]],function(ai,Di,Pi){se("Request#%d %s: writeStream or res %s event emitted",ht,Ne,Pi),mt(Re||null,null,kn)}):Jt.on("close",function(){se("Request#%d %s: writeStream close event emitted",ht,Ne),mt(Re||null,null,kn)}),kn.pipe(Jt))}var An=[];kn.on("data",function(oi){se("Request#%d %s: `res data` event emit, size %d",ht,Ne,oi.length),Ke+=oi.length,An.push(oi)}),kn.on("end",function(){var oi=Pe.concat(An,Ke);if(se("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",ht,Ne,Ke,kn._dumped),Re)return mt(Re,oi,kn);var ai=ct(kn);if(ai.error)return mt(ai.error,oi,kn);ai.redirect||Ct(kn,oi,function(Di,Pi,Xi){if(Di)return mt(Di,oi,kn);if(!Xi&&ke.indexOf(je.dataType)>=0){try{Pi=decodeBodyByCharset(Pi,kn)}catch(ar){return se("decodeBodyByCharset error: %s",ar),mt(null,Pi,kn)}if(je.dataType==="json")if(Ke===0)Pi=null;else{var or=parseJSON(Pi,un);or.error?Di=or.error:Pi=or.data}}lt&&se("Request#%d %s: Remote socket was terminated before `response.end()` was called",ht,Ne),mt(Di,Pi,kn)})})}function St(){se("Response timer ticking, timeout: %d",Mn),Xe=setTimeout(function(){Xe=null;var kn="Response timeout for "+Mn+"ms";Re=new Error(kn),Re.name="ResponseTimeoutError",Re.requestId=ht,se("ResponseTimeout: Request#%d %s %s: %s, connected: %s",ht,Ne,Re.name,kn,Ae),ut()},Mn)}function ut(){se("Request#%d %s abort, connected: %s",ht,Ne,Ae),yn.socket||(Re.noSocket=!0,mt(Re)),yn.abort()}if(!Ne||typeof Ne!="string"&&(Ne===void 0?"undefined":(0,ue.default)(Ne))!=="object"){var Ft=z.format("expect request url to be a string or a http request options, but got %j",Ne);throw new Error(Ft)}arguments.length===2&&typeof je=="function"&&(Ve=je,je=null),je=je||{},ye>=we&&(ye=0);var ht=++ye;je.requestUrls=je.requestUrls||[];var rt={requestId:ht,url:Ne,args:je,ctx:je.ctx};je.emitter&&je.emitter.emit("request",rt),je.timeout=je.timeout||Te.TIMEOUTS,je.maxRedirects=je.maxRedirects||10,je.streaming=je.streaming||je.customResponse;var dt,yt=Date.now();typeof Ne=="string"?(Ce.test(Ne)||(Ne="http://"+Ne),dt=ee.parse(Ne)):dt=Ne;var _t=(je.type||je.method||dt.method||"GET").toUpperCase(),vt=dt.port||80,Bt=oe,jt=Se(je.agent,Te.agent),un=je.fixJSONCtlChars;dt.protocol==="https:"&&(Bt=ie,jt=Se(je.httpsAgent,Te.httpsAgent),dt.port||(vt=443));var Kt={host:dt.hostname||dt.host||"localhost",path:dt.path||"/",method:_t,port:vt,agent:jt,headers:je.headers||{},lookup:je.lookup};Array.isArray(je.timeout)?Kt.requestTimeout=je.timeout[je.timeout.length-1]:je.timeout!==void 0&&(Kt.requestTimeout=je.timeout);for(var xn=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],Ut=0;Ut<xn.length;Ut++){var Wt=xn[Ut];je.hasOwnProperty(Wt)&&(Kt[Wt]=je[Wt])}Kt.rejectUnauthorized!==!1||Kt.hasOwnProperty("secureOptions")||(Kt.secureOptions=me("constants").SSL_OP_NO_TLSv1_2);var $t=je.auth||dt.auth;$t&&(Kt.auth=$t);var ft=je.content||je.data,We=_t==="GET"||_t==="HEAD"||je.dataAsQueryString;if(!je.content&&ft&&typeof ft!="string"&&!Pe.isBuffer(ft))if(We)ft=je.nestedQuerystring?qs.stringify(ft):querystring.stringify(ft);else{var Be=Kt.headers["Content-Type"]||Kt.headers["content-type"];Be||(Be=je.contentType==="json"?"application/json":"application/x-www-form-urlencoded",Kt.headers["Content-Type"]=Be),ft=parseContentType(Be).type==="application/json"?(0,ve.default)(ft):je.nestedQuerystring?qs.stringify(ft):querystring.stringify(ft)}We&&ft&&(Kt.path+=(dt.query?"&":"?")+ft,ft=null);var qe=0;if(ft){var et=ft.length;Pe.isBuffer(ft)||(et=Pe.byteLength(ft)),qe=Kt.headers["Content-Length"]=et}je.dataType==="json"&&(Kt.headers.Accept="application/json"),typeof je.beforeRequest=="function"&&je.beforeRequest(Kt);var He=null,Xe=null,Re=null,Ae=!1,Ue=!1,Ke=0,Ze=-1,lt=!1,xt="",tn="",en=null;je.timing&&(en={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),Kt.headers["User-Agent"]||Kt.headers["user-agent"]||(Kt.headers["User-Agent"]=navigator.userAgent),je.gzip&&(Kt.headers["Accept-Encoding"]||Kt.headers["accept-encoding"]||(Kt.headers["Accept-Encoding"]="gzip"));var Jt=je.writeStream;se("Request#%d %s %s with headers %j, options.path: %s",ht,_t,Ne,Kt.headers,Kt.path),je.requestUrls.push(Ne);var gn,Mn;Array.isArray(je.timeout)?(gn=le(je.timeout[0]),Mn=le(je.timeout[1])):gn=Mn=le(je.timeout),se("ConnectTimeout: %d, ResponseTimeout: %d",gn,Mn);var yn;try{yn=Bt.request(Kt,it)}catch(kn){return mt(kn)}return typeof window=="undefined"?function(){se("Connect timer ticking, timeout: %d",gn),He=setTimeout(function(){He=null,Ze===-1&&(Ze=-2);var kn="Connect timeout for "+gn+"ms",$n="ConnectionTimeoutError";yn.socket||($n="SocketAssignTimeoutError",kn+=", working sockets is full"),Re=new Error(kn),Re.name=$n,Re.requestId=ht,se("ConnectTimeout: Request#%d %s %s: %s, connected: %s",ht,Ne,Re.name,kn,Ae),ut()},gn)}():yn.on("requestTimeout",function(){Ze===-1&&(Ze=-2);var kn="Connect timeout for "+gn+"ms";Re=new Error(kn),Re.name="ConnectionTimeoutError",Re.requestId=ht,ut()}),en&&yn.on("finish",function(){en.requestSent=Date.now()-yt}),yn.once("socket",function(kn){en&&(en.queuing=Date.now()-yt),isNode010&&kn.socket&&(kn=kn.socket);var $n=kn.readyState;if($n==="opening")return kn.once("lookup",function(An,oi,ai){se("Request#%d %s lookup: %s, %s, %s",ht,Ne,An,oi,ai),en&&(en.dnslookup=Date.now()-yt),oi&&(xt=oi)}),void kn.once("connect",function(){en&&(en.connected=Date.now()-yt),Qe(),St(),se("Request#%d %s new socket connected",ht,Ne),Ae=!0,xt||(xt=kn.remoteAddress),tn=kn.remotePort});se("Request#%d %s reuse socket connected, readyState: %s",ht,Ne,$n),Ae=!0,Ue=!0,xt||(xt=kn.remoteAddress),tn=kn.remotePort,Qe(),St()}),yn.on("error",function(kn){kn.name!=="Error"&&kn.name!=="TypeError"||(kn.name=Ae?"ResponseError":"RequestError"),kn.message+=' (req "error")',se("Request#%d %s `req error` event emit, %s: %s",ht,Ne,kn.name,kn.message),mt(Re||kn)}),Jt&&Jt.once("error",function(kn){kn.message+=' (writeStream "error")',Re=kn,se("Request#%d %s `writeStream error` event emit, %s: %s",ht,Ne,kn.name,kn.message),ut()}),je.stream?(je.stream.pipe(yn),je.stream.once("error",function(kn){kn.message+=' (stream "error")',Re=kn,se("Request#%d %s `readStream error` event emit, %s: %s",ht,Ne,kn.name,kn.message),ut()})):yn.end(ft),yn.requestId=ht,yn}}).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(Le){function me(Te){if(Ie[Te])return Ie[Te].exports;var be=Ie[Te]={i:Te,l:!1,exports:{}};return Le[Te].call(be.exports,be,be.exports,me),be.l=!0,be.exports}var Ie={};me.m=Le,me.c=Ie,me.d=function(Te,be,Pe){me.o(Te,be)||Object.defineProperty(Te,be,{configurable:!1,enumerable:!0,get:Pe})},me.n=function(Te){var be=Te&&Te.__esModule?function(){return Te.default}:function(){return Te};return me.d(be,"a",be),be},me.o=function(Te,be){return Object.prototype.hasOwnProperty.call(Te,be)},me.p="",me(me.s=12)}([function(Le,me,Ie){(function(Te,be){Le.exports=me=be()})(0,function(){var Te=Te||function(be,Pe){var he=Object.create||function(){function ie(){}return function(se){var le;return ie.prototype=se,le=new ie,ie.prototype=null,le}}(),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)}}}(),ce=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,le=ie.words,ye=this.sigBytes,we=ie.sigBytes;if(this.clamp(),ye%4)for(var Ce=0;Ce<we;Ce++){var ke=le[Ce>>>2]>>>24-Ce%4*8&255;se[ye+Ce>>>2]|=ke<<24-(ye+Ce)%4*8}else for(var Ce=0;Ce<we;Ce+=4)se[ye+Ce>>>2]=le[Ce>>>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=be.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,le=[],ye=0;ye<ie;ye+=4){var we=function(ke){var ke=ke,Ne=987654321,je=4294967295;return function(){Ne=36969*(65535&Ne)+(Ne>>16)&je,ke=18e3*(65535&ke)+(ke>>16)&je;var Ve=(Ne<<16)+ke&je;return Ve/=4294967296,(Ve+=.5)*(be.random()>.5?1:-1)}}(4294967296*(se||be.random()));se=987654071*we(),le.push(4294967296*we()|0)}return new ce.init(le,ie)}}),ve=Se.enc={},de=ve.Hex={stringify:function(ie){for(var se=ie.words,le=ie.sigBytes,ye=[],we=0;we<le;we++){var Ce=se[we>>>2]>>>24-we%4*8&255;ye.push((Ce>>>4).toString(16)),ye.push((15&Ce).toString(16))}return ye.join("")},parse:function(ie){for(var se=ie.length,le=[],ye=0;ye<se;ye+=2)le[ye>>>3]|=parseInt(ie.substr(ye,2),16)<<24-ye%8*4;return new ce.init(le,se/2)}},ue=ve.Latin1={stringify:function(ie){for(var se=ie.words,le=ie.sigBytes,ye=[],we=0;we<le;we++){var Ce=se[we>>>2]>>>24-we%4*8&255;ye.push(String.fromCharCode(Ce))}return ye.join("")},parse:function(ie){for(var se=ie.length,le=[],ye=0;ye<se;ye++)le[ye>>>2]|=(255&ie.charCodeAt(ye))<<24-ye%4*8;return new ce.init(le,se)}},z=ve.Utf8={stringify:function(ie){try{return decodeURIComponent(escape(ue.stringify(ie)))}catch(se){throw new Error("Malformed UTF-8 data")}},parse:function(ie){return ue.parse(unescape(encodeURIComponent(ie)))}},ee=xe.BufferedBlockAlgorithm=ge.extend({reset:function(){this._data=new ce.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,le=se.words,ye=se.sigBytes,we=this.blockSize,Ce=4*we,ke=ye/Ce;ke=ie?be.ceil(ke):be.max((0|ke)-this._minBufferSize,0);var Ne=ke*we,je=be.min(4*Ne,ye);if(Ne){for(var Ve=0;Ve<Ne;Ve+=we)this._doProcessBlock(le,Ve);var Qe=le.splice(0,Ne);se.sigBytes-=je}return new ce.init(Qe,je)},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,le){return new ie.init(le).finalize(se)}},_createHmacHelper:function(ie){return function(se,le){return new oe.HMAC.init(ie,le).finalize(se)}}}),Se.algo={});return Se}(Math);return Te})},function(Le,me,Ie){"use strict";function Te(he,Se){if(!(he instanceof Se))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var be=function(){function he(Se,xe){for(var ge=0;ge<xe.length;ge++){var ce=xe[ge];ce.enumerable=ce.enumerable||!1,ce.configurable=!0,"value"in ce&&(ce.writable=!0),Object.defineProperty(Se,ce.key,ce)}}return function(Se,xe,ge){return xe&&he(Se.prototype,xe),ge&&he(Se,ge),Se}}(),Pe=function(){function he(){Te(this,he)}return be(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=Pe},function(Le,me,Ie){(function(Te,be){Le.exports=me=be(Ie(0))})(0,function(Te){return function(be){function Pe(oe,ie,se,le,ye,we,Ce){var ke=oe+(ie&se|~ie&le)+ye+Ce;return(ke<<we|ke>>>32-we)+ie}function he(oe,ie,se,le,ye,we,Ce){var ke=oe+(ie&le|se&~le)+ye+Ce;return(ke<<we|ke>>>32-we)+ie}function Se(oe,ie,se,le,ye,we,Ce){var ke=oe+(ie^se^le)+ye+Ce;return(ke<<we|ke>>>32-we)+ie}function xe(oe,ie,se,le,ye,we,Ce){var ke=oe+(se^(ie|~le))+ye+Ce;return(ke<<we|ke>>>32-we)+ie}var ge=Te,ce=ge.lib,ve=ce.WordArray,de=ce.Hasher,ue=ge.algo,z=[];(function(){for(var oe=0;oe<64;oe++)z[oe]=4294967296*be.abs(be.sin(oe+1))|0})();var ee=ue.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 le=ie+se,ye=oe[le];oe[le]=16711935&(ye<<8|ye>>>24)|4278255360&(ye<<24|ye>>>8)}var we=this._hash.words,Ce=oe[ie+0],ke=oe[ie+1],Ne=oe[ie+2],je=oe[ie+3],Ve=oe[ie+4],Qe=oe[ie+5],Ge=oe[ie+6],mt=oe[ie+7],ct=oe[ie+8],Ct=oe[ie+9],it=oe[ie+10],St=oe[ie+11],ut=oe[ie+12],Ft=oe[ie+13],ht=oe[ie+14],rt=oe[ie+15],dt=we[0],yt=we[1],_t=we[2],vt=we[3];dt=Pe(dt,yt,_t,vt,Ce,7,z[0]),vt=Pe(vt,dt,yt,_t,ke,12,z[1]),_t=Pe(_t,vt,dt,yt,Ne,17,z[2]),yt=Pe(yt,_t,vt,dt,je,22,z[3]),dt=Pe(dt,yt,_t,vt,Ve,7,z[4]),vt=Pe(vt,dt,yt,_t,Qe,12,z[5]),_t=Pe(_t,vt,dt,yt,Ge,17,z[6]),yt=Pe(yt,_t,vt,dt,mt,22,z[7]),dt=Pe(dt,yt,_t,vt,ct,7,z[8]),vt=Pe(vt,dt,yt,_t,Ct,12,z[9]),_t=Pe(_t,vt,dt,yt,it,17,z[10]),yt=Pe(yt,_t,vt,dt,St,22,z[11]),dt=Pe(dt,yt,_t,vt,ut,7,z[12]),vt=Pe(vt,dt,yt,_t,Ft,12,z[13]),_t=Pe(_t,vt,dt,yt,ht,17,z[14]),yt=Pe(yt,_t,vt,dt,rt,22,z[15]),dt=he(dt,yt,_t,vt,ke,5,z[16]),vt=he(vt,dt,yt,_t,Ge,9,z[17]),_t=he(_t,vt,dt,yt,St,14,z[18]),yt=he(yt,_t,vt,dt,Ce,20,z[19]),dt=he(dt,yt,_t,vt,Qe,5,z[20]),vt=he(vt,dt,yt,_t,it,9,z[21]),_t=he(_t,vt,dt,yt,rt,14,z[22]),yt=he(yt,_t,vt,dt,Ve,20,z[23]),dt=he(dt,yt,_t,vt,Ct,5,z[24]),vt=he(vt,dt,yt,_t,ht,9,z[25]),_t=he(_t,vt,dt,yt,je,14,z[26]),yt=he(yt,_t,vt,dt,ct,20,z[27]),dt=he(dt,yt,_t,vt,Ft,5,z[28]),vt=he(vt,dt,yt,_t,Ne,9,z[29]),_t=he(_t,vt,dt,yt,mt,14,z[30]),yt=he(yt,_t,vt,dt,ut,20,z[31]),dt=Se(dt,yt,_t,vt,Qe,4,z[32]),vt=Se(vt,dt,yt,_t,ct,11,z[33]),_t=Se(_t,vt,dt,yt,St,16,z[34]),yt=Se(yt,_t,vt,dt,ht,23,z[35]),dt=Se(dt,yt,_t,vt,ke,4,z[36]),vt=Se(vt,dt,yt,_t,Ve,11,z[37]),_t=Se(_t,vt,dt,yt,mt,16,z[38]),yt=Se(yt,_t,vt,dt,it,23,z[39]),dt=Se(dt,yt,_t,vt,Ft,4,z[40]),vt=Se(vt,dt,yt,_t,Ce,11,z[41]),_t=Se(_t,vt,dt,yt,je,16,z[42]),yt=Se(yt,_t,vt,dt,Ge,23,z[43]),dt=Se(dt,yt,_t,vt,Ct,4,z[44]),vt=Se(vt,dt,yt,_t,ut,11,z[45]),_t=Se(_t,vt,dt,yt,rt,16,z[46]),yt=Se(yt,_t,vt,dt,Ne,23,z[47]),dt=xe(dt,yt,_t,vt,Ce,6,z[48]),vt=xe(vt,dt,yt,_t,mt,10,z[49]),_t=xe(_t,vt,dt,yt,ht,15,z[50]),yt=xe(yt,_t,vt,dt,Qe,21,z[51]),dt=xe(dt,yt,_t,vt,ut,6,z[52]),vt=xe(vt,dt,yt,_t,je,10,z[53]),_t=xe(_t,vt,dt,yt,it,15,z[54]),yt=xe(yt,_t,vt,dt,ke,21,z[55]),dt=xe(dt,yt,_t,vt,ct,6,z[56]),vt=xe(vt,dt,yt,_t,rt,10,z[57]),_t=xe(_t,vt,dt,yt,Ge,15,z[58]),yt=xe(yt,_t,vt,dt,Ft,21,z[59]),dt=xe(dt,yt,_t,vt,Ve,6,z[60]),vt=xe(vt,dt,yt,_t,St,10,z[61]),_t=xe(_t,vt,dt,yt,Ne,15,z[62]),yt=xe(yt,_t,vt,dt,Ct,21,z[63]),we[0]=we[0]+dt|0,we[1]=we[1]+yt|0,we[2]=we[2]+_t|0,we[3]=we[3]+vt|0},_doFinalize:function(){var oe=this._data,ie=oe.words,se=8*this._nDataBytes,le=8*oe.sigBytes;ie[le>>>5]|=128<<24-le%32;var ye=be.floor(se/4294967296),we=se;ie[15+(le+64>>>9<<4)]=16711935&(ye<<8|ye>>>24)|4278255360&(ye<<24|ye>>>8),ie[14+(le+64>>>9<<4)]=16711935&(we<<8|we>>>24)|4278255360&(we<<24|we>>>8),oe.sigBytes=4*(ie.length+1),this._process();for(var Ce=this._hash,ke=Ce.words,Ne=0;Ne<4;Ne++){var je=ke[Ne];ke[Ne]=16711935&(je<<8|je>>>24)|4278255360&(je<<24|je>>>8)}return Ce},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),Te.MD5})},function(Le,me,Ie){"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(Le,me,Ie){"use strict";function Te(ee){return ee&&ee.__esModule?ee:{default:ee}}function be(ee,oe){if(!(ee instanceof oe))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Pe=function(){function ee(oe,ie){for(var se=0;se<ie.length;se++){var le=ie[se];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(oe,le.key,le)}}return function(oe,ie,se){return ie&&ee(oe.prototype,ie),se&&ee(oe,se),oe}}(),he=Ie(5),Se=Te(he),xe=Ie(25),ge=Te(xe),ce=Ie(6),ve=Te(ce),de=Ie(7),ue=Te(de),z=function(){function ee(oe){be(this,ee);var ie=ue.default.os.name,se=ue.default.os.version||"",le=ue.default.browser.name,ye=ue.default.browser.version||"",we=window.location.href,Ce="";we&&(Ce=ue.default.getHost(we));var ke="pc";ue.default.os.ipad?ke="pad":(ue.default.os.iphone||ue.default.os.android)&&(ke="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:le,ev:ye,uat:navigator.userAgent,app_n:Ce,tt:ke,dm:"h5",ut:""}}return Pe(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 le in ie)se.push(le+"="+ie[le]);var ye=se.join("&");this.initParam.args=encodeURIComponent(ye==""?"0":ye);var we=[];for(var le in this.initParam)we.push(le+"="+this.initParam[le]);var Ce=we.join("&");AliyunUpload&&AliyunUpload.__logTestCallback__?AliyunUpload.__logTestCallback__(Ce):new Image(0,0).src="https://videocloud.cn-hangzhou.log.aliyuncs.com/logstores/upload/track?"+Ce}}],[{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(Le,me,Ie){"use strict";function Te(he,Se){if(!(he instanceof Se))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var be=function(){function he(Se,xe){for(var ge=0;ge<xe.length;ge++){var ce=xe[ge];ce.enumerable=ce.enumerable||!1,ce.configurable=!0,"value"in ce&&(ce.writable=!0),Object.defineProperty(Se,ce.key,ce)}}return function(Se,xe,ge){return xe&&he(Se.prototype,xe),ge&&he(Se,ge),Se}}(),Pe=function(){function he(){Te(this,he)}return be(he,null,[{key:"create",value:function(Se,xe){var ge,ce="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),ve=[];if(xe=xe||ce.length,Se)for(ge=0;ge<Se;ge++)ve[ge]=ce[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]=ce[ge==19?3&de|8:de])}return ve.join("")}}]),he}();me.default=Pe},function(Le,me,Ie){"use strict";Object.defineProperty(me,"__esModule",{value:!0});var Te={version:"1.5.0"};me.default=Te},function(Le,me,Ie){"use strict";function Te(ce,ve){if(!(ce instanceof ve))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var be=function(){function ce(ve,de){for(var ue=0;ue<de.length;ue++){var z=de[ue];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(ve,z.key,z)}}return function(ve,de,ue){return de&&ce(ve.prototype,de),ue&&ce(ve,ue),ve}}(),Pe=function(ce){var ve=navigator.userAgent,de="other";if(ce.ios)return"iOS";if(ce.android)return"android";if(ve.indexOf("Baiduspider")>-1)return"Baiduspider";if(ve.indexOf("PlayStation")>-1)return"PS4";var ue=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"&&!ue&&!z&&(de="Unix"),String(navigator.platform).indexOf("Linux")>-1&&(de="Linux"),ue?"windows":de},he=function(){var ce=navigator.userAgent,ve="";return(ce.indexOf("Windows NT 5.0")>-1||ce.indexOf("Windows 2000")>-1)&&(ve="2000"),(ce.indexOf("Windows NT 5.1")>-1||ce.indexOf("Windows XP")>-1)&&(ve="XP"),(ce.indexOf("Windows NT 5.2")>-1||ce.indexOf("Windows 2003")>-1)&&(ve="2003"),(ce.indexOf("Windows NT 6.0")>-1||ce.indexOf("Windows Vista")>-1)&&(ve="Vista"),(ce.indexOf("Windows NT 6.1")>-1||ce.indexOf("Windows 7")>-1)&&(ve="7"),(ce.indexOf("Windows NT 6.2")>-1||ce.indexOf("Windows 8")>-1)&&(ve="8"),(ce.indexOf("Windows NT 6.3")>-1||ce.indexOf("Windows 8.1")>-1)&&(ve="8.1"),(ce.indexOf("Windows NT 10")>-1||ce.indexOf("Windows 10")>-1)&&(ve="10"),ve},Se=function(ce){var ve=navigator.userAgent.toLowerCase();return ce.chrome?"Chrome":ce.firefox?"Firefox":ce.safari?"Safari":ce.webview?"webview":ce.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 ce={},ve={},de=navigator.userAgent,ue=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_]+))?/),le=!ie&&de.match(/(iPhone\sOS)\s([\d_]+)/),ye=de.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),we=/Win\d{2}|Windows/.test(ue),Ce=de.match(/Windows Phone ([\d.]+)/),ke=ye&&de.match(/TouchPad/),Ne=de.match(/Kindle\/([\d.]+)/),je=de.match(/Silk\/([\d._]+)/),Ve=de.match(/(BlackBerry).*Version\/([\d.]+)/),Qe=de.match(/(BB10).*Version\/([\d.]+)/),Ge=de.match(/(RIM\sTablet\sOS)\s([\d.]+)/),mt=de.match(/PlayBook/),ct=de.match(/Chrome\/([\d.]+)/)||de.match(/CriOS\/([\d.]+)/),Ct=de.match(/Firefox\/([\d.]+)/),it=de.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),St=de.match(/MSIE\s([\d.]+)/)||de.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),ut=!ct&&de.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),Ft=ut||de.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/);if((ve.webkit=!!z)&&(ve.version=z[1]),ee&&(ce.android=!0,ce.version=ee[2]),le&&!se&&(ce.ios=ce.iphone=!0,ce.version=le[2].replace(/_/g,".")),ie&&(ce.ios=ce.ipad=!0,ce.version=ie[2].replace(/_/g,".")),se&&(ce.ios=ce.ipod=!0,ce.version=se[3]?se[3].replace(/_/g,"."):null),Ce&&(ce.wp=!0,ce.version=Ce[1]),ye&&(ce.webos=!0,ce.version=ye[2]),ke&&(ce.touchpad=!0),Ve&&(ce.blackberry=!0,ce.version=Ve[2]),Qe&&(ce.bb10=!0,ce.version=Qe[2]),Ge&&(ce.rimtabletos=!0,ce.version=Ge[2]),mt&&(ve.playbook=!0),Ne&&(ce.kindle=!0,ce.version=Ne[1]),je&&(ve.silk=!0,ve.version=je[1]),!je&&ce.android&&de.match(/Kindle Fire/)&&(ve.silk=!0),ct&&(ve.chrome=!0,ve.version=ct[1]),Ct&&(ve.firefox=!0,ve.version=Ct[1]),it&&(ce.firefoxos=!0,ce.version=it[1]),St&&(ve.ie=!0,ve.version=St[1]),Ft&&(oe||ce.ios||we||ee)&&(ve.safari=!0,ce.ios||(ve.version=Ft[1])),ut&&(ve.webview=!0),oe){var ht=de.match(/[\d]*_[\d]*_[\d]*/);ht&&ht.length>0&&ht[0]&&(ce.version=ht[0].replace(/_/g,"."))}return ce.tablet=!!(ie||mt||ee&&!de.match(/Mobile/)||Ct&&de.match(/Tablet/)||St&&!de.match(/Phone/)&&de.match(/Touch/)),ce.phone=!(ce.tablet||ce.ipod||!(ee||le||ye||Ve||Qe||ct&&de.match(/Android/)||ct&&de.match(/CriOS\/([\d.]+)/)||Ct&&de.match(/Mobile/)||St&&de.match(/Touch/))),ce.pc=!ce.tablet&&!ce.phone,oe?ce.name="macOS":we?(ce.name="windows",ce.version=he()):ce.name=Pe(ce),ve.name=Se(ve),{os:ce,browser:ve}}(),ge=function(){function ce(){Te(this,ce)}return be(ce,null,[{key:"getHost",value:function(ve){var z="";if(ve===void 0||ve==null||ve=="")return"";var de=ve.indexOf("//"),ue=ve;de>-1&&(ue=ve.substring(de+2));var z=ue,ee=ue.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}}]),ce}();me.default=ge},function(Le,me,Ie){"use strict";function Te(he,Se){if(!(he instanceof Se))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var be=function(){function he(Se,xe){for(var ge=0;ge<xe.length;ge++){var ce=xe[ge];ce.enumerable=ce.enumerable||!1,ce.configurable=!0,"value"in ce&&(ce.writable=!0),Object.defineProperty(Se,ce.key,ce)}}return function(Se,xe,ge){return xe&&he(Se.prototype,xe),ge&&he(Se,ge),Se}}(),Pe=function(){function he(){Te(this,he)}return be(he,null,[{key:"get",value:function(Se,xe,ge,ce,ve){var de;ge=ge||function(){},typeof XMLHttpRequest=="undefined"&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(ue){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(ue){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(ue){}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{ce===void 0&&(ce=!0),de.open("GET",Se,ce),ve&&(de.withCredentials=!0)}catch(ue){return void ge(ue)}try{de.send()}catch(ue){ge(ue)}}}]),he}();me.default=Pe},function(Le,me,Ie){"use strict";function Te(xe,ge){if(!(xe instanceof ge))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var be=function(){function xe(ge,ce){for(var ve=0;ve<ce.length;ve++){var de=ce[ve];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),Object.defineProperty(ge,de.key,de)}}return function(ge,ce,ve){return ce&&xe(ge.prototype,ce),ve&&xe(ge,ve),ge}}(),Pe=Ie(27),he=Ie(30),Se=(Ie(10),function(){function xe(){Te(this,xe)}return be(xe,null,[{key:"randomUUID",value:function(){for(var ge=[],ce="0123456789abcdef",ve=0;ve<36;ve++)ge[ve]=ce.substr(Math.floor(16*Math.random()),1);return ge[14]="4",ge[19]=ce.substr(3&ge[19]|8,1),ge[8]=ge[13]=ge[18]=ge[23]="-",ge.join("")}},{key:"aliyunEncodeURI",value:function(ge){var ce=encodeURIComponent(ge);return ce=ce.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,ce,ve){if(!ge)throw new Error("PrismPlayer Error: vid should not be null!");var de=[];for(var ue in ge)de.push(ue);for(var z=de.sort(),ee="",oe=z.length,ue=0;ue<oe;ue++){var ie=xe.aliyunEncodeURI(z[ue]),se=xe.aliyunEncodeURI(ge[z[ue]]);ee==""?ee=ie+ce+se:ee+=ve+ie+ce+se}return ee}},{key:"makeChangeSiga",value:function(ge,ce){if(!ge)throw new Error("PrismPlayer Error: vid should not be null!");return he.stringify(Pe("GET&"+xe.aliyunEncodeURI("/")+"&"+xe.aliyunEncodeURI(xe.makeUTF8sort(ge,"=","&")),ce+"&"))}}]),xe}());me.default=Se},function(Le,me,Ie){(function(Te,be){Le.exports=me=be(Ie(0))})(0,function(Te){return Te.enc.Utf8})},function(Le,me,Ie){(function(Te,be){Le.exports=me=be(Ie(0))})(0,function(Te){return Te.enc.Hex})},function(Le,me,Ie){Le.exports=Ie(13)},function(Le,me,Ie){"use strict";var Te,be,Pe=Ie(14),he=function(xe){return xe&&xe.__esModule?xe:{default:xe}}(Pe),Se={Vod:he.default};Te=[],(be=function(){return Se}.apply(me,Te))!==void 0&&(Le.exports=be),window.AliyunUpload=Se,Cn.exports=AliyunUpload},function(Le,me,Ie){"use strict";function Te(Qe){return Qe&&Qe.__esModule?Qe:{default:Qe}}function be(Qe,Ge){if(!(Qe instanceof Ge))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Pe=function(){function Qe(Ge,mt){for(var ct=0;ct<mt.length;ct++){var Ct=mt[ct];Ct.enumerable=Ct.enumerable||!1,Ct.configurable=!0,"value"in Ct&&(Ct.writable=!0),Object.defineProperty(Ge,Ct.key,Ct)}}return function(Ge,mt,ct){return mt&&Qe(Ge.prototype,mt),ct&&Qe(Ge,ct),Ge}}(),he=Ie(15),Se=Ie(3),xe=Ie(16),ge=Te(xe),ce=Ie(18),ve=Te(ce),de=Ie(24),ue=Te(de),z=Ie(4),ee=Te(z),oe=Ie(1),ie=Te(oe),se=Ie(5),le=Te(se),ye=Ie(26),we=Te(ye),Ce=Ie(31),ke=Te(Ce),Ne=Ie(32),je=Te(Ne),Ve=(Ie(2),function(){function Qe(Ge){be(this,Qe),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 Pe(Qe,[{key:"init",value:function(Ge,mt,ct,Ct){return this._retryCount=0,!(ct&&!Ct||!ct&&Ct)&&!(Ge&&!mt||!Ge&&mt)&&(this._ossCreditor.accessKeyId=Ge,this._ossCreditor.accessKeySecret=mt,this._ossCreditor.securityToken=ct,this._ossCreditor.expireTime=Ct,!0)}},{key:"addFile",value:function(Ge,mt,ct,Ct,it,St){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(rt){console.log(rt)}for(var ut=(this.options,0);ut<this._uploadList.length;ut++)if(this._uploadList[ut].file==Ge)return!1;var Ft=new Object;if(Ft.file=Ge,Ft._endpoint=mt,Ft._bucket=ct,Ft._object=Ct,Ft.state=he.UPLOADSTATE.INIT,Ft.isImage=ie.default.isImage(Ge.name),!Ft.isImage&&this.options.enableUploadProgress){var ht=this;je.default.getMd5(Ge,function(rt){Ft.fileHash=rt;var dt=ht._getCheckoutpoint(Ft);ht.options.localCheckpoint||dt||ht._getCheckoutpointFromCloud(Ft,function(yt){if(yt.UploadPoint){var _t=JSON.parse(yt.UploadPoint);_t.loaded!=1&&(Ft.checkpoint=_t.checkpoint,Ft.loaded=_t.loaded,Ft.videoId=yt.VideoId,ht._saveCheckoutpoint(Ft,_t.checkpoint))}},function(yt){try{if((yt=JSON.parse(yt))&&yt.Code=="InvalidParameter"&&yt.Message.indexOf("UserId")>0){ht._invalidUserId=!0;var _t=yt.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(_t)}}catch(vt){console.log(vt)}})})}it&&(Ft.videoInfo=it?JSON.parse(it).Vod:{},Ft.userData=ve.default.encode(it)),Ft.ri=le.default.create(),this._uploadList.push(Ft),this._reportLog("20001",Ft,{ql:this._uploadList.length});try{this.options.addFileSuccess&&this.options.addFileSuccess(Ft)}catch(rt){console.log(rt)}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 mt=this._uploadList[Ge];if(Ge==this._curIndex&&mt.state==he.UPLOADSTATE.UPLOADING){mt.state=he.UPLOADSTATE.CANCELED;var ct=this._getCheckoutpoint(mt);ct&&ct.checkpoint&&(ct=ct.checkpoint),ct&&this._ossUpload.abort(mt),this._removeCheckoutpoint(mt),this.nextUpload()}else mt.state!=he.UPLOADSTATE.SUCCESS&&(mt.state=he.UPLOADSTATE.CANCELED);return this._reportLog("20008",mt),!0}},{key:"resumeFile",value:function(Ge){if(this.options,Ge<0||Ge>=this._uploadList.length)return!1;var mt=this._uploadList[Ge];return mt.state==he.UPLOADSTATE.CANCELED&&(mt.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 mt=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(mt),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 mt=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(mt)}else{this._state=he.VODSTATE.END;try{Ge.onUploadEnd&&Ge.onUploadEnd(mt)}catch(ct){console.log(ct)}}}},{key:"clear",value:function(Ge){for(var mt=this.options,ct=0,Ct=0;Ct<this._uploadList.length;Ct++)mt.uploadList[Ct].state==he.UPLOADSTATE.SUCCESS&&ct++,this._uploadList[Ct].state==Ge&&(mt.uploadList.splice(Ct,1),Ct--);mt.onClear&&mt.onClear(mt.uploadList.length,ct)}},{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 mt=this;if(!Ge)return!1;var ct=JSON.parse(ve.default.decode(Ge));return!!(ct.AccessKeyId&&ct.AccessKeySecret&&ct.SecurityToken&&ct.Expiration)&&mt.resumeUploadWithToken(ct.AccessKeyId,ct.AccessKeySecret,ct.SecurityToken,ct.Expiration)}},{key:"resumeUploadWithToken",value:function(Ge,mt,ct,Ct){if(this.options,!(Ge&&mt&&ct&&Ct)||this._state!=he.VODSTATE.EXPIRE||this._curIndex==-1)return!1;var it="";return this._uploadList.length>this._curIndex&&(it=this._uploadList[this._curIndex]),it&&(this.init(Ge,mt,ct,Ct),this._state=he.VODSTATE.START,this._ossUpload=null,this._uploadCore(it,it.retry),it.retry=!1),!0}},{key:"resumeUploadWithSTSToken",value:function(Ge,mt,ct){if(this._curIndex==-1||this._state!=he.VODSTATE.EXPIRE)return!1;if(this._uploadList.length>this._curIndex){var Ct=this._uploadList[this._curIndex];Ct.object?this._refreshSTSTokenUpload(Ct,Ge,mt,ct):this.setSTSToken(Ct,Ge,mt,ct)}}},{key:"setSTSTokenDirectlyUpload",value:function(Ge,mt,ct,Ct,it){if(!(mt&&ct&&Ct&&it))return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken and expiration should not be empty."),!1;this._ut="oss";var St=Ge;this.init(mt,ct,Ct,it),St.endpoint=St._endpoint,St.bucket=St._bucket,St.object=St._object,this._ossUpload=null,this._uploadCore(St,Ge.retry),Ge.retry=!1}},{key:"setSTSToken",value:function(Ge,mt,ct,Ct){if(!mt||!ct||!Ct)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;this._ut="vod",this._uploadWay="sts";var it=Ge.videoInfo,St={accessKeyId:mt,securityToken:Ct,accessKeySecret:ct,fileName:Ge.file.name,title:it.Title,requestId:Ge.ri,region:this.options.region};it.ImageType&&(St.imageType=it.ImageType),it.ImageExt&&(St.imageExt=it.ImageExt),it.FileSize&&(St.fileSize=it.FileSize),it.Description&&(St.description=it.Description),it.CateId&&(St.cateId=it.CateId),it.Tags&&(St.tags=it.Tags),it.TemplateGroupId&&(St.templateGroupId=it.TemplateGroupId),it.StorageLocation&&(St.storageLocation=it.StorageLocation),it.CoverURL&&(St.coverUrl=it.CoverURL),it.TransCodeMode&&(St.transCodeMode=it.TransCodeMode),it.UserData&&(St.userData=it.UserData);var ut=this,Ft="getUploadAuth";Ge.videoId?(St.videoId=Ge.videoId,Ft="refreshUploadAuth"):Ge.isImage&&(Ft="getImageUploadAuth"),we.default[Ft](St,function(ht){Ge.videoId=ht.VideoId?ht.VideoId:Ge.videoId,ut.setUploadAuthAndAddress(Ge,ht.UploadAuth,ht.UploadAddress),ut._state=he.VODSTATE.START},function(ht){ut._error(Ge,{name:ht.Code,code:ht.Code,message:ht.Message,requestId:ht.RequestId})})}},{key:"setUploadAuthAndAddress",value:function(Ge,mt,ct,Ct){if(!Ge||!mt||!ct)return!1;var it=JSON.parse(ve.default.decode(mt));if(!(it.AccessKeyId&&it.AccessKeySecret&&it.SecurityToken&&it.Expiration))return console.error("uploadauth is invalid"),!1;var St={},ut=Ge;if(ct){if(St=JSON.parse(ve.default.decode(ct)),!St.Endpoint||!St.Bucket||!St.FileName)return console.error("uploadAddress is invalid"),!1}else St.Endpoint=ut.endpoint,St.Bucket=ut.bucket,St.FileName=ut.object;this._ut="vod",this._uploadWay="vod",this.options.region=it.Region||this.options.region,this.init(it.AccessKeyId,it.AccessKeySecret,it.SecurityToken,it.Expiration),ut.endpoint=ut._endpoint?ut._endpoint:St.Endpoint,ut.bucket=ut._bucket?ut._bucket:St.Bucket,ut.object=ut._object?ut._object:St.FileName,ut.region=this.options.region,Ct&&(ut.videoId=Ct),this._ossUpload=null,this._uploadCore(ut,Ge.retry),Ge.retry=!1}},{key:"_refreshSTSTokenUpload",value:function(Ge,mt,ct,Ct){if(!mt||!ct||!Ct)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;var it={accessKeyId:mt,securityToken:Ct,accessKeySecret:ct,videoId:Ge.object,requestId:Ge.ri,region:this.options.region},St=this,ut="refreshUploadAuth";Ge.isImage&&(ut="getImageUploadAuth"),we.default[ut](it,function(Ft){St.setUploadAuthAndAddress(Ge,Ft.UploadAuth,UploadAddress),St._state=he.VODSTATE.START},function(Ft){St._error(Ge,{name:Ft.Code,code:Ft.Code,message:Ft.Message,requestId:Ft.RequestId})})}},{key:"_upload",value:function(Ge){var mt=arguments.length>1&&arguments[1]!==void 0&&arguments[1],ct=this.options;if(Ge.retry=mt,ct.onUploadstarted&&!mt)try{var Ct=this._getCheckoutpoint(Ge);Ct&&Ct.state!=he.UPLOADSTATE.UPLOADING&&(Ge.checkpoint=Ct,Ge.videoId=Ct.videoId),ct.onUploadstarted(Ge)}catch(it){console.log(it)}}},{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 mt=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(ht,rt){mt._error.call(mt,ht,rt)},oncomplete:function(ht,rt){mt._complete.call(mt,ht,rt)},onprogress:function(ht,rt,dt){mt._progress.call(mt,ht,rt,dt)}})}var ct=ie.default.getFileType(Ge.file.name),Ct=this._getCheckoutpoint(Ge),it="",St="";Ct&&Ct.checkpoint&&(St=Ct.state,it=Ct.videoId,Ct=Ct.checkpoint),Ct&&it==Ge.videoId&&St!=he.UPLOADSTATE.UPLOADING&&(Ct.file=Ge.file,Ge.checkpoint=Ct,Ct.uploadId);var ut=this._adjustPartSize(Ge);this._reportLog("20002",Ge,{ft:ct,fs:Ge.file.size,bu:Ge.bucket,ok:Ge.object,vid:Ge.videoId||"",fn:Ge.file.name,fw:null,fh:null,ps:ut});var Ft={headers:{"x-oss-notification":Ge.userData?Ge.userData:""},partSize:ut,parallel:this.options.parallel};this._ossUpload.upload(Ge,Ft)}},{key:"_findUploadIndex",value:function(){for(var Ge=-1,mt=0;mt<this._uploadList.length;mt++)if(this._uploadList[mt].state==he.UPLOADSTATE.INIT){Ge=mt;break}return Ge}},{key:"_error",value:function(Ge,mt){if(mt.name=="cancel")try{this.options.onUploadCanceled(Ge,mt)}catch(Ct){console.log(Ct)}else{if(mt.message.indexOf("InvalidAccessKeyIdError")>0||mt.name=="SignatureDoesNotMatchError"||mt.code=="SecurityTokenExpired"||mt.code=="InvalidSecurityToken.Expired"||mt.code=="InvalidAccessKeyId"&&this._ossCreditor.securityToken){if(this.options.onUploadTokenExpired){this._state=he.VODSTATE.EXPIRE,Ge.state=he.UPLOADSTATE.FAIlURE;try{this.options.onUploadTokenExpired(Ge,mt)}catch(Ct){console.log(Ct)}}return}if((mt.name=="RequestTimeoutError"||mt.name=="ConnectionTimeout"||mt.name=="ConnectionTimeoutError")&&this._retryTotal>this._retryCount){var ct=this;return setTimeout(function(){ct._uploadCore(Ge,!0)},1e3*ct._retryDuration),void this._retryCount++}mt.name=="NoSuchUploadError"&&this._removeCheckoutpoint(Ge),this._handleError(Ge,mt)}}},{key:"_handleError",value:function(Ge,mt){var ct=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],Ct=he.UPLOADSTATE.FAIlURE;if(Ge.state!=he.UPLOADSTATE.CANCELED&&(Ge.state=he.UPLOADSTATE.FAIlURE,this._state=he.VODSTATE.FAILURE,this.options.onUploadFailed&&mt&&mt.code&&mt.message))try{this.options.onUploadFailed(Ge,mt.code,mt.message)}catch(St){console.log(St)}if(ct&&this._changeState(Ge,Ct),this._reportLog("20006",Ge,{code:mt.name,message:mt.message,requestId:mt.requestId,fs:Ge.file.size,bu:Ge.bucket,ok:Ge.object,fn:Ge.file.name}),this._reportLog("20004",Ge,{requestId:mt.requestId,fs:Ge.file.size,bu:Ge.bucket,ok:Ge.object,fn:Ge.file.name}),Ge.ri=le.default.create(),this._findUploadIndex()!=-1){var it=this;this._state=he.VODSTATE.START,setTimeout(function(){it.nextUpload()},100)}}},{key:"_complete",value:function(Ge,mt){if(Ge.state=he.UPLOADSTATE.SUCCESS,this.options.onUploadSucceed)try{this.options.onUploadSucceed(Ge)}catch(it){console.log(it)}var ct=0;mt&&mt.res&&mt.res.headers&&(ct=mt.res.headers["x-oss-request-id"]),this._removeCheckoutpoint(Ge);var Ct=this;setTimeout(function(){Ct.nextUpload()},100),this._retryCount=0,this._reportLog("20003",Ge,{requestId:ct})}},{key:"_progress",value:function(Ge,mt,ct){if(this.options.onUploadProgress)try{Ge.loaded=mt.loaded,this.options.onUploadProgress(Ge,mt.total,mt.loaded)}catch(rt){console.log(rt)}var Ct=mt.checkpoint,it=0;Ct&&(Ge.checkpoint=Ct,this._saveCheckoutpoint(Ge,Ct,he.UPLOADSTATE.UPLOADING),it=Ct.uploadId),this._retryCount=0;var St=this._getPortNumber(Ct),ut=0;if(ct&&ct.headers&&(ut=ct.headers["x-oss-request-id"]),mt.loaded!=0&&this._reportLog("20007",Ge,{pn:St,requestId:ut}),mt.loaded!=1&&this._reportLog("20005",Ge,{UploadId:it,pn:St+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 Ft={file:Ge.file,checkpoint:mt,userId:this.options.userId,videoId:Ge.videoId,region:this.options.region,fileHash:Ge.fileHash};try{var ht=this;ke.default.upload(Ft,function(){},function(rt){if((rt=JSON.parse(rt))&&rt.Code=="InvalidParameter"&&rt.Message.indexOf("UserId")>0){ht._invalidUserId=!0;var dt=rt.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(dt)}})}catch(rt){console.log(rt)}}}},{key:"_getPortNumber",value:function(Ge){if(Ge){var mt=Ge.doneParts;if(mt&&mt.length>0)return mt[mt.length-1].number}return 0}},{key:"_removeCheckoutpoint",value:function(Ge){var mt=this._getCheckoutpointKey(Ge);ue.default.remove(mt)}},{key:"_getCheckoutpoint",value:function(Ge){var mt=this._getCheckoutpointKey(Ge),ct=ue.default.get(mt);if(ct)try{return JSON.parse(ct)}catch(Ct){}return""}},{key:"_saveCheckoutpoint",value:function(Ge,mt,ct){if(mt){var Ct=this._getCheckoutpointKey(Ge),it=Ge.file,St={fileName:it.name,lastModified:it.lastModified,size:it.size,object:Ge.object,videoId:Ge.videoId,bucket:Ge.bucket,endpoint:Ge.endpoint,checkpoint:mt,loaded:Ge.loaded,state:ct};ue.default.set(Ct,JSON.stringify(St))}}},{key:"_changeState",value:function(Ge,mt){var ct=this._getCheckoutpoint(Ge);ct&&((this._onbeforeunload=!0)&&(mt=he.UPLOADSTATE.STOPED),this._saveCheckoutpoint(Ge,ct.checkpoint,mt))}},{key:"_getCheckoutpointKey",value:function(Ge){return"upload_"+Ge.file.lastModified+"_"+Ge.file.name+"_"+Ge.file.size}},{key:"_getCheckoutpointFromCloud",value:function(Ge,mt,ct){var Ct={userId:this.options.userId,uploadInfoList:[{FileName:Ge.file.name,FileSize:Ge.file.size,FileCreateTime:Ge.file.lastModified,FileHash:Ge.fileHash}],region:this.options.region};ke.default.get(Ct,function(it){mt(it)},ct)}},{key:"_reportLog",value:function(Ge,mt,ct){ct||(ct={}),ct.ri=mt.ri,this._ut&&(ct.ut=this._ut),this._log.log(Ge,ct)}},{key:"_initEvent",value:function(){var Ge=this;window&&(window.onbeforeunload=function(mt){if(Ge._onbeforeunload=!0,Ge._curIndex!=-1&&Ge._uploadList.length>Ge._curIndex){var ct=Ge._uploadList[Ge._curIndex];Ge._changeState(ct,he.UPLOADSTATE.STOPED)}})}},{key:"_initState",value:function(){for(var Ge=0;Ge<this._uploadList.length;Ge++){var mt=this._uploadList[Ge];mt.state!=he.UPLOADSTATE.FAIlURE&&mt.state!=he.UPLOADSTATE.STOPED||(mt.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}}]),Qe}());me.default=Ve},function(Le,me,Ie){"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(Le,me,Ie){"use strict";function Te(ce){return ce&&ce.__esModule?ce:{default:ce}}function be(ce,ve){if(!(ce instanceof ve))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Pe=function(){function ce(ve,de){for(var ue=0;ue<de.length;ue++){var z=de[ue];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(ve,z.key,z)}}return function(ve,de,ue){return de&&ce(ve.prototype,de),ue&&ce(ve,ue),ve}}(),he=Ie(3),Se=Ie(17),xe=(Te(Se),Ie(1)),ge=(Te(xe),function(){function ce(ve,de){if(be(this,ce),ve){this._config=ve,this.create(this._config),this._uploadInfo=null,this._callback={};var ue=function(){};this._callback.onerror=de.onerror||ue,this._callback.oncomplete=de.oncomplete||ue,this._callback.onprogress=de.onprogress||ue}}return Pe(ce,[{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 ue=this,z=function(oe,ie,se){return function(le){ue._progress(oe,ie,se),le()}},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){ue._complete(oe)}).catch(function(oe){ue.oss.cancel&&(ue.oss&&ue.oss.isCancel()?console.log("oss is cancel as error"):ue.oss.cancel()),ue._error(oe)})}},{key:"header",value:function(ve,de,ue){this.oss.get(ve.object).then(function(z){de(z)}).catch(function(z){ue(z)})}},{key:"_progress",value:function(ve,de,ue){this._callback.onprogress(this._uploadInfo,{loaded:ve,total:this._uploadInfo.file.size,checkpoint:de},ue)}},{key:"_error",value:function(ve){this._callback.onerror(this._uploadInfo,ve)}},{key:"_complete",value:function(ve){this._callback.oncomplete(this._uploadInfo,ve)}}]),ce}());me.default=ge},function(Le,me,Ie){"use strict";function Te(he,Se){if(!(he instanceof Se))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var be=function(){function he(Se,xe){for(var ge=0;ge<xe.length;ge++){var ce=xe[ge];ce.enumerable=ce.enumerable||!1,ce.configurable=!0,"value"in ce&&(ce.writable=!0),Object.defineProperty(Se,ce.key,ce)}}return function(Se,xe,ge){return xe&&he(Se.prototype,xe),ge&&he(Se,ge),Se}}(),Pe=function(){function he(){Te(this,he)}return be(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 ce=new RegExp("\\{"+(ge-1)+"\\}","gm");xe=xe.replace(ce,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=Pe},function(Le,me,Ie){"use strict";(function(Te){function be(Se,xe){if(!(Se instanceof xe))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Pe=function(){function Se(xe,ge){for(var ce=0;ce<ge.length;ce++){var ve=ge[ce];ve.enumerable=ve.enumerable||!1,ve.configurable=!0,"value"in ve&&(ve.writable=!0),Object.defineProperty(xe,ve.key,ve)}}return function(xe,ge,ce){return ge&&Se(xe.prototype,ge),ce&&Se(xe,ce),xe}}(),he=function(){function Se(){be(this,Se)}return Pe(Se,null,[{key:"encode",value:function(xe){return new Te(xe).toString("base64")}},{key:"decode",value:function(xe){return new Te(xe,"base64").toString()}}]),Se}();me.default=he}).call(me,Ie(19).Buffer)},function(Le,me,Ie){"use strict";(function(Te){function be(){return he.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Pe(Xe,Re){if(be()<Re)throw new RangeError("Invalid typed array length");return he.TYPED_ARRAY_SUPPORT?(Xe=new Uint8Array(Re),Xe.__proto__=he.prototype):(Xe===null&&(Xe=new he(Re)),Xe.length=Re),Xe}function he(Xe,Re,Ae){if(!(he.TYPED_ARRAY_SUPPORT||this instanceof he))return new he(Xe,Re,Ae);if(typeof Xe=="number"){if(typeof Re=="string")throw new Error("If encoding is specified then the first argument must be a string");return ce(this,Xe)}return Se(this,Xe,Re,Ae)}function Se(Xe,Re,Ae,Ue){if(typeof Re=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&Re instanceof ArrayBuffer?ue(Xe,Re,Ae,Ue):typeof Re=="string"?ve(Xe,Re,Ae):z(Xe,Re)}function xe(Xe){if(typeof Xe!="number")throw new TypeError('"size" argument must be a number');if(Xe<0)throw new RangeError('"size" argument must not be negative')}function ge(Xe,Re,Ae,Ue){return xe(Re),Re<=0?Pe(Xe,Re):Ae!==void 0?typeof Ue=="string"?Pe(Xe,Re).fill(Ae,Ue):Pe(Xe,Re).fill(Ae):Pe(Xe,Re)}function ce(Xe,Re){if(xe(Re),Xe=Pe(Xe,Re<0?0:0|ee(Re)),!he.TYPED_ARRAY_SUPPORT)for(var Ae=0;Ae<Re;++Ae)Xe[Ae]=0;return Xe}function ve(Xe,Re,Ae){if(typeof Ae=="string"&&Ae!==""||(Ae="utf8"),!he.isEncoding(Ae))throw new TypeError('"encoding" must be a valid string encoding');var Ue=0|ie(Re,Ae);Xe=Pe(Xe,Ue);var Ke=Xe.write(Re,Ae);return Ke!==Ue&&(Xe=Xe.slice(0,Ke)),Xe}function de(Xe,Re){var Ae=Re.length<0?0:0|ee(Re.length);Xe=Pe(Xe,Ae);for(var Ue=0;Ue<Ae;Ue+=1)Xe[Ue]=255&Re[Ue];return Xe}function ue(Xe,Re,Ae,Ue){if(Re.byteLength,Ae<0||Re.byteLength<Ae)throw new RangeError("'offset' is out of bounds");if(Re.byteLength<Ae+(Ue||0))throw new RangeError("'length' is out of bounds");return Re=Ae===void 0&&Ue===void 0?new Uint8Array(Re):Ue===void 0?new Uint8Array(Re,Ae):new Uint8Array(Re,Ae,Ue),he.TYPED_ARRAY_SUPPORT?(Xe=Re,Xe.__proto__=he.prototype):Xe=de(Xe,Re),Xe}function z(Xe,Re){if(he.isBuffer(Re)){var Ae=0|ee(Re.length);return Xe=Pe(Xe,Ae),Xe.length===0||Re.copy(Xe,0,0,Ae),Xe}if(Re){if(typeof ArrayBuffer!="undefined"&&Re.buffer instanceof ArrayBuffer||"length"in Re)return typeof Re.length!="number"||ft(Re.length)?Pe(Xe,0):de(Xe,Re);if(Re.type==="Buffer"&&qe(Re.data))return de(Xe,Re.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function ee(Xe){if(Xe>=be())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+be().toString(16)+" bytes");return 0|Xe}function oe(Xe){return+Xe!=Xe&&(Xe=0),he.alloc(+Xe)}function ie(Xe,Re){if(he.isBuffer(Xe))return Xe.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(Xe)||Xe instanceof ArrayBuffer))return Xe.byteLength;typeof Xe!="string"&&(Xe=""+Xe);var Ae=Xe.length;if(Ae===0)return 0;for(var Ue=!1;;)switch(Re){case"ascii":case"latin1":case"binary":return Ae;case"utf8":case"utf-8":case void 0:return Kt(Xe).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Ae;case"hex":return Ae>>>1;case"base64":return Wt(Xe).length;default:if(Ue)return Kt(Xe).length;Re=(""+Re).toLowerCase(),Ue=!0}}function se(Xe,Re,Ae){var Ue=!1;if((Re===void 0||Re<0)&&(Re=0),Re>this.length||((Ae===void 0||Ae>this.length)&&(Ae=this.length),Ae<=0)||(Ae>>>=0,Re>>>=0,Ae<=Re))return"";for(Xe||(Xe="utf8");;)switch(Xe){case"hex":return St(this,Re,Ae);case"utf8":case"utf-8":return mt(this,Re,Ae);case"ascii":return Ct(this,Re,Ae);case"latin1":case"binary":return it(this,Re,Ae);case"base64":return Ge(this,Re,Ae);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ut(this,Re,Ae);default:if(Ue)throw new TypeError("Unknown encoding: "+Xe);Xe=(Xe+"").toLowerCase(),Ue=!0}}function le(Xe,Re,Ae){var Ue=Xe[Re];Xe[Re]=Xe[Ae],Xe[Ae]=Ue}function ye(Xe,Re,Ae,Ue,Ke){if(Xe.length===0)return-1;if(typeof Ae=="string"?(Ue=Ae,Ae=0):Ae>2147483647?Ae=2147483647:Ae<-2147483648&&(Ae=-2147483648),Ae=+Ae,isNaN(Ae)&&(Ae=Ke?0:Xe.length-1),Ae<0&&(Ae=Xe.length+Ae),Ae>=Xe.length){if(Ke)return-1;Ae=Xe.length-1}else if(Ae<0){if(!Ke)return-1;Ae=0}if(typeof Re=="string"&&(Re=he.from(Re,Ue)),he.isBuffer(Re))return Re.length===0?-1:we(Xe,Re,Ae,Ue,Ke);if(typeof Re=="number")return Re&=255,he.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Ke?Uint8Array.prototype.indexOf.call(Xe,Re,Ae):Uint8Array.prototype.lastIndexOf.call(Xe,Re,Ae):we(Xe,[Re],Ae,Ue,Ke);throw new TypeError("val must be string, number or Buffer")}function we(Xe,Re,Ae,Ue,Ke){function Ze(yn,kn){return lt===1?yn[kn]:yn.readUInt16BE(kn*lt)}var lt=1,xt=Xe.length,tn=Re.length;if(Ue!==void 0&&((Ue=String(Ue).toLowerCase())==="ucs2"||Ue==="ucs-2"||Ue==="utf16le"||Ue==="utf-16le")){if(Xe.length<2||Re.length<2)return-1;lt=2,xt/=2,tn/=2,Ae/=2}var en;if(Ke){var Jt=-1;for(en=Ae;en<xt;en++)if(Ze(Xe,en)===Ze(Re,Jt===-1?0:en-Jt)){if(Jt===-1&&(Jt=en),en-Jt+1===tn)return Jt*lt}else Jt!==-1&&(en-=en-Jt),Jt=-1}else for(Ae+tn>xt&&(Ae=xt-tn),en=Ae;en>=0;en--){for(var gn=!0,Mn=0;Mn<tn;Mn++)if(Ze(Xe,en+Mn)!==Ze(Re,Mn)){gn=!1;break}if(gn)return en}return-1}function Ce(Xe,Re,Ae,Ue){Ae=Number(Ae)||0;var Ke=Xe.length-Ae;Ue?(Ue=Number(Ue))>Ke&&(Ue=Ke):Ue=Ke;var Ze=Re.length;if(Ze%2!=0)throw new TypeError("Invalid hex string");Ue>Ze/2&&(Ue=Ze/2);for(var lt=0;lt<Ue;++lt){var xt=parseInt(Re.substr(2*lt,2),16);if(isNaN(xt))return lt;Xe[Ae+lt]=xt}return lt}function ke(Xe,Re,Ae,Ue){return $t(Kt(Re,Xe.length-Ae),Xe,Ae,Ue)}function Ne(Xe,Re,Ae,Ue){return $t(xn(Re),Xe,Ae,Ue)}function je(Xe,Re,Ae,Ue){return Ne(Xe,Re,Ae,Ue)}function Ve(Xe,Re,Ae,Ue){return $t(Wt(Re),Xe,Ae,Ue)}function Qe(Xe,Re,Ae,Ue){return $t(Ut(Re,Xe.length-Ae),Xe,Ae,Ue)}function Ge(Xe,Re,Ae){return Re===0&&Ae===Xe.length?We.fromByteArray(Xe):We.fromByteArray(Xe.slice(Re,Ae))}function mt(Xe,Re,Ae){Ae=Math.min(Xe.length,Ae);for(var Ue=[],Ke=Re;Ke<Ae;){var Ze=Xe[Ke],lt=null,xt=Ze>239?4:Ze>223?3:Ze>191?2:1;if(Ke+xt<=Ae){var tn,en,Jt,gn;switch(xt){case 1:Ze<128&&(lt=Ze);break;case 2:tn=Xe[Ke+1],(192&tn)==128&&(gn=(31&Ze)<<6|63&tn)>127&&(lt=gn);break;case 3:tn=Xe[Ke+1],en=Xe[Ke+2],(192&tn)==128&&(192&en)==128&&(gn=(15&Ze)<<12|(63&tn)<<6|63&en)>2047&&(gn<55296||gn>57343)&&(lt=gn);break;case 4:tn=Xe[Ke+1],en=Xe[Ke+2],Jt=Xe[Ke+3],(192&tn)==128&&(192&en)==128&&(192&Jt)==128&&(gn=(15&Ze)<<18|(63&tn)<<12|(63&en)<<6|63&Jt)>65535&&gn<1114112&&(lt=gn)}}lt===null?(lt=65533,xt=1):lt>65535&&(lt-=65536,Ue.push(lt>>>10&1023|55296),lt=56320|1023<),Ue.push(lt),Ke+=xt}return ct(Ue)}function ct(Xe){var Re=Xe.length;if(Re<=et)return String.fromCharCode.apply(String,Xe);for(var Ae="",Ue=0;Ue<Re;)Ae+=String.fromCharCode.apply(String,Xe.slice(Ue,Ue+=et));return Ae}function Ct(Xe,Re,Ae){var Ue="";Ae=Math.min(Xe.length,Ae);for(var Ke=Re;Ke<Ae;++Ke)Ue+=String.fromCharCode(127&Xe[Ke]);return Ue}function it(Xe,Re,Ae){var Ue="";Ae=Math.min(Xe.length,Ae);for(var Ke=Re;Ke<Ae;++Ke)Ue+=String.fromCharCode(Xe[Ke]);return Ue}function St(Xe,Re,Ae){var Ue=Xe.length;(!Re||Re<0)&&(Re=0),(!Ae||Ae<0||Ae>Ue)&&(Ae=Ue);for(var Ke="",Ze=Re;Ze<Ae;++Ze)Ke+=un(Xe[Ze]);return Ke}function ut(Xe,Re,Ae){for(var Ue=Xe.slice(Re,Ae),Ke="",Ze=0;Ze<Ue.length;Ze+=2)Ke+=String.fromCharCode(Ue[Ze]+256*Ue[Ze+1]);return Ke}function Ft(Xe,Re,Ae){if(Xe%1!=0||Xe<0)throw new RangeError("offset is not uint");if(Xe+Re>Ae)throw new RangeError("Trying to access beyond buffer length")}function ht(Xe,Re,Ae,Ue,Ke,Ze){if(!he.isBuffer(Xe))throw new TypeError('"buffer" argument must be a Buffer instance');if(Re>Ke||Re<Ze)throw new RangeError('"value" argument is out of bounds');if(Ae+Ue>Xe.length)throw new RangeError("Index out of range")}function rt(Xe,Re,Ae,Ue){Re<0&&(Re=65535+Re+1);for(var Ke=0,Ze=Math.min(Xe.length-Ae,2);Ke<Ze;++Ke)Xe[Ae+Ke]=(Re&255<<8*(Ue?Ke:1-Ke))>>>8*(Ue?Ke:1-Ke)}function dt(Xe,Re,Ae,Ue){Re<0&&(Re=4294967295+Re+1);for(var Ke=0,Ze=Math.min(Xe.length-Ae,4);Ke<Ze;++Ke)Xe[Ae+Ke]=Re>>>8*(Ue?Ke:3-Ke)&255}function yt(Xe,Re,Ae,Ue,Ke,Ze){if(Ae+Ue>Xe.length)throw new RangeError("Index out of range");if(Ae<0)throw new RangeError("Index out of range")}function _t(Xe,Re,Ae,Ue,Ke){return Ke||yt(Xe,Re,Ae,4,34028234663852886e22,-34028234663852886e22),Be.write(Xe,Re,Ae,Ue,23,4),Ae+4}function vt(Xe,Re,Ae,Ue,Ke){return Ke||yt(Xe,Re,Ae,8,17976931348623157e292,-17976931348623157e292),Be.write(Xe,Re,Ae,Ue,52,8),Ae+8}function Bt(Xe){if(Xe=jt(Xe).replace(He,""),Xe.length<2)return"";for(;Xe.length%4!=0;)Xe+="=";return Xe}function jt(Xe){return Xe.trim?Xe.trim():Xe.replace(/^\s+|\s+$/g,"")}function un(Xe){return Xe<16?"0"+Xe.toString(16):Xe.toString(16)}function Kt(Xe,Re){Re=Re||1/0;for(var Ae,Ue=Xe.length,Ke=null,Ze=[],lt=0;lt<Ue;++lt){if((Ae=Xe.charCodeAt(lt))>55295&&Ae<57344){if(!Ke){if(Ae>56319){(Re-=3)>-1&&Ze.push(239,191,189);continue}if(lt+1===Ue){(Re-=3)>-1&&Ze.push(239,191,189);continue}Ke=Ae;continue}if(Ae<56320){(Re-=3)>-1&&Ze.push(239,191,189),Ke=Ae;continue}Ae=65536+(Ke-55296<<10|Ae-56320)}else Ke&&(Re-=3)>-1&&Ze.push(239,191,189);if(Ke=null,Ae<128){if((Re-=1)<0)break;Ze.push(Ae)}else if(Ae<2048){if((Re-=2)<0)break;Ze.push(Ae>>6|192,63&Ae|128)}else if(Ae<65536){if((Re-=3)<0)break;Ze.push(Ae>>12|224,Ae>>6&63|128,63&Ae|128)}else{if(!(Ae<1114112))throw new Error("Invalid code point");if((Re-=4)<0)break;Ze.push(Ae>>18|240,Ae>>12&63|128,Ae>>6&63|128,63&Ae|128)}}return Ze}function xn(Xe){for(var Re=[],Ae=0;Ae<Xe.length;++Ae)Re.push(255&Xe.charCodeAt(Ae));return Re}function Ut(Xe,Re){for(var Ae,Ue,Ke,Ze=[],lt=0;lt<Xe.length&&!((Re-=2)<0);++lt)Ae=Xe.charCodeAt(lt),Ue=Ae>>8,Ke=Ae%256,Ze.push(Ke),Ze.push(Ue);return Ze}function Wt(Xe){return We.toByteArray(Bt(Xe))}function $t(Xe,Re,Ae,Ue){for(var Ke=0;Ke<Ue&&!(Ke+Ae>=Re.length||Ke>=Xe.length);++Ke)Re[Ke+Ae]=Xe[Ke];return Ke}function ft(Xe){return Xe!==Xe}var We=Ie(21),Be=Ie(22),qe=Ie(23);me.Buffer=he,me.SlowBuffer=oe,me.INSPECT_MAX_BYTES=50,he.TYPED_ARRAY_SUPPORT=Te.TYPED_ARRAY_SUPPORT!==void 0?Te.TYPED_ARRAY_SUPPORT:function(){try{var Xe=new Uint8Array(1);return Xe.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},Xe.foo()===42&&typeof Xe.subarray=="function"&&Xe.subarray(1,1).byteLength===0}catch(Re){return!1}}(),me.kMaxLength=be(),he.poolSize=8192,he._augment=function(Xe){return Xe.__proto__=he.prototype,Xe},he.from=function(Xe,Re,Ae){return Se(null,Xe,Re,Ae)},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(Xe,Re,Ae){return ge(null,Xe,Re,Ae)},he.allocUnsafe=function(Xe){return ce(null,Xe)},he.allocUnsafeSlow=function(Xe){return ce(null,Xe)},he.isBuffer=function(Xe){return!(Xe==null||!Xe._isBuffer)},he.compare=function(Xe,Re){if(!he.isBuffer(Xe)||!he.isBuffer(Re))throw new TypeError("Arguments must be Buffers");if(Xe===Re)return 0;for(var Ae=Xe.length,Ue=Re.length,Ke=0,Ze=Math.min(Ae,Ue);Ke<Ze;++Ke)if(Xe[Ke]!==Re[Ke]){Ae=Xe[Ke],Ue=Re[Ke];break}return Ae<Ue?-1:Ue<Ae?1:0},he.isEncoding=function(Xe){switch(String(Xe).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(Xe,Re){if(!qe(Xe))throw new TypeError('"list" argument must be an Array of Buffers');if(Xe.length===0)return he.alloc(0);var Ae;if(Re===void 0)for(Re=0,Ae=0;Ae<Xe.length;++Ae)Re+=Xe[Ae].length;var Ue=he.allocUnsafe(Re),Ke=0;for(Ae=0;Ae<Xe.length;++Ae){var Ze=Xe[Ae];if(!he.isBuffer(Ze))throw new TypeError('"list" argument must be an Array of Buffers');Ze.copy(Ue,Ke),Ke+=Ze.length}return Ue},he.byteLength=ie,he.prototype._isBuffer=!0,he.prototype.swap16=function(){var Xe=this.length;if(Xe%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Re=0;Re<Xe;Re+=2)le(this,Re,Re+1);return this},he.prototype.swap32=function(){var Xe=this.length;if(Xe%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Re=0;Re<Xe;Re+=4)le(this,Re,Re+3),le(this,Re+1,Re+2);return this},he.prototype.swap64=function(){var Xe=this.length;if(Xe%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Re=0;Re<Xe;Re+=8)le(this,Re,Re+7),le(this,Re+1,Re+6),le(this,Re+2,Re+5),le(this,Re+3,Re+4);return this},he.prototype.toString=function(){var Xe=0|this.length;return Xe===0?"":arguments.length===0?mt(this,0,Xe):se.apply(this,arguments)},he.prototype.equals=function(Xe){if(!he.isBuffer(Xe))throw new TypeError("Argument must be a Buffer");return this===Xe||he.compare(this,Xe)===0},he.prototype.inspect=function(){var Xe="",Re=me.INSPECT_MAX_BYTES;return this.length>0&&(Xe=this.toString("hex",0,Re).match(/.{2}/g).join(" "),this.length>Re&&(Xe+=" ... ")),"<Buffer "+Xe+">"},he.prototype.compare=function(Xe,Re,Ae,Ue,Ke){if(!he.isBuffer(Xe))throw new TypeError("Argument must be a Buffer");if(Re===void 0&&(Re=0),Ae===void 0&&(Ae=Xe?Xe.length:0),Ue===void 0&&(Ue=0),Ke===void 0&&(Ke=this.length),Re<0||Ae>Xe.length||Ue<0||Ke>this.length)throw new RangeError("out of range index");if(Ue>=Ke&&Re>=Ae)return 0;if(Ue>=Ke)return-1;if(Re>=Ae)return 1;if(Re>>>=0,Ae>>>=0,Ue>>>=0,Ke>>>=0,this===Xe)return 0;for(var Ze=Ke-Ue,lt=Ae-Re,xt=Math.min(Ze,lt),tn=this.slice(Ue,Ke),en=Xe.slice(Re,Ae),Jt=0;Jt<xt;++Jt)if(tn[Jt]!==en[Jt]){Ze=tn[Jt],lt=en[Jt];break}return Ze<lt?-1:lt<Ze?1:0},he.prototype.includes=function(Xe,Re,Ae){return this.indexOf(Xe,Re,Ae)!==-1},he.prototype.indexOf=function(Xe,Re,Ae){return ye(this,Xe,Re,Ae,!0)},he.prototype.lastIndexOf=function(Xe,Re,Ae){return ye(this,Xe,Re,Ae,!1)},he.prototype.write=function(Xe,Re,Ae,Ue){if(Re===void 0)Ue="utf8",Ae=this.length,Re=0;else if(Ae===void 0&&typeof Re=="string")Ue=Re,Ae=this.length,Re=0;else{if(!isFinite(Re))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");Re|=0,isFinite(Ae)?(Ae|=0,Ue===void 0&&(Ue="utf8")):(Ue=Ae,Ae=void 0)}var Ke=this.length-Re;if((Ae===void 0||Ae>Ke)&&(Ae=Ke),Xe.length>0&&(Ae<0||Re<0)||Re>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ue||(Ue="utf8");for(var Ze=!1;;)switch(Ue){case"hex":return Ce(this,Xe,Re,Ae);case"utf8":case"utf-8":return ke(this,Xe,Re,Ae);case"ascii":return Ne(this,Xe,Re,Ae);case"latin1":case"binary":return je(this,Xe,Re,Ae);case"base64":return Ve(this,Xe,Re,Ae);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Qe(this,Xe,Re,Ae);default:if(Ze)throw new TypeError("Unknown encoding: "+Ue);Ue=(""+Ue).toLowerCase(),Ze=!0}},he.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var et=4096;he.prototype.slice=function(Xe,Re){var Ae=this.length;Xe=~~Xe,Re=Re===void 0?Ae:~~Re,Xe<0?(Xe+=Ae)<0&&(Xe=0):Xe>Ae&&(Xe=Ae),Re<0?(Re+=Ae)<0&&(Re=0):Re>Ae&&(Re=Ae),Re<Xe&&(Re=Xe);var Ue;if(he.TYPED_ARRAY_SUPPORT)Ue=this.subarray(Xe,Re),Ue.__proto__=he.prototype;else{var Ke=Re-Xe;Ue=new he(Ke,void 0);for(var Ze=0;Ze<Ke;++Ze)Ue[Ze]=this[Ze+Xe]}return Ue},he.prototype.readUIntLE=function(Xe,Re,Ae){Xe|=0,Re|=0,Ae||Ft(Xe,Re,this.length);for(var Ue=this[Xe],Ke=1,Ze=0;++Ze<Re&&(Ke*=256);)Ue+=this[Xe+Ze]*Ke;return Ue},he.prototype.readUIntBE=function(Xe,Re,Ae){Xe|=0,Re|=0,Ae||Ft(Xe,Re,this.length);for(var Ue=this[Xe+--Re],Ke=1;Re>0&&(Ke*=256);)Ue+=this[Xe+--Re]*Ke;return Ue},he.prototype.readUInt8=function(Xe,Re){return Re||Ft(Xe,1,this.length),this[Xe]},he.prototype.readUInt16LE=function(Xe,Re){return Re||Ft(Xe,2,this.length),this[Xe]|this[Xe+1]<<8},he.prototype.readUInt16BE=function(Xe,Re){return Re||Ft(Xe,2,this.length),this[Xe]<<8|this[Xe+1]},he.prototype.readUInt32LE=function(Xe,Re){return Re||Ft(Xe,4,this.length),(this[Xe]|this[Xe+1]<<8|this[Xe+2]<<16)+16777216*this[Xe+3]},he.prototype.readUInt32BE=function(Xe,Re){return Re||Ft(Xe,4,this.length),16777216*this[Xe]+(this[Xe+1]<<16|this[Xe+2]<<8|this[Xe+3])},he.prototype.readIntLE=function(Xe,Re,Ae){Xe|=0,Re|=0,Ae||Ft(Xe,Re,this.length);for(var Ue=this[Xe],Ke=1,Ze=0;++Ze<Re&&(Ke*=256);)Ue+=this[Xe+Ze]*Ke;return Ke*=128,Ue>=Ke&&(Ue-=Math.pow(2,8*Re)),Ue},he.prototype.readIntBE=function(Xe,Re,Ae){Xe|=0,Re|=0,Ae||Ft(Xe,Re,this.length);for(var Ue=Re,Ke=1,Ze=this[Xe+--Ue];Ue>0&&(Ke*=256);)Ze+=this[Xe+--Ue]*Ke;return Ke*=128,Ze>=Ke&&(Ze-=Math.pow(2,8*Re)),Ze},he.prototype.readInt8=function(Xe,Re){return Re||Ft(Xe,1,this.length),128&this[Xe]?-1*(255-this[Xe]+1):this[Xe]},he.prototype.readInt16LE=function(Xe,Re){Re||Ft(Xe,2,this.length);var Ae=this[Xe]|this[Xe+1]<<8;return 32768&Ae?4294901760|Ae:Ae},he.prototype.readInt16BE=function(Xe,Re){Re||Ft(Xe,2,this.length);var Ae=this[Xe+1]|this[Xe]<<8;return 32768&Ae?4294901760|Ae:Ae},he.prototype.readInt32LE=function(Xe,Re){return Re||Ft(Xe,4,this.length),this[Xe]|this[Xe+1]<<8|this[Xe+2]<<16|this[Xe+3]<<24},he.prototype.readInt32BE=function(Xe,Re){return Re||Ft(Xe,4,this.length),this[Xe]<<24|this[Xe+1]<<16|this[Xe+2]<<8|this[Xe+3]},he.prototype.readFloatLE=function(Xe,Re){return Re||Ft(Xe,4,this.length),Be.read(this,Xe,!0,23,4)},he.prototype.readFloatBE=function(Xe,Re){return Re||Ft(Xe,4,this.length),Be.read(this,Xe,!1,23,4)},he.prototype.readDoubleLE=function(Xe,Re){return Re||Ft(Xe,8,this.length),Be.read(this,Xe,!0,52,8)},he.prototype.readDoubleBE=function(Xe,Re){return Re||Ft(Xe,8,this.length),Be.read(this,Xe,!1,52,8)},he.prototype.writeUIntLE=function(Xe,Re,Ae,Ue){Xe=+Xe,Re|=0,Ae|=0,!Ue&&ht(this,Xe,Re,Ae,Math.pow(2,8*Ae)-1,0);var Ke=1,Ze=0;for(this[Re]=255&Xe;++Ze<Ae&&(Ke*=256);)this[Re+Ze]=Xe/Ke&255;return Re+Ae},he.prototype.writeUIntBE=function(Xe,Re,Ae,Ue){Xe=+Xe,Re|=0,Ae|=0,!Ue&&ht(this,Xe,Re,Ae,Math.pow(2,8*Ae)-1,0);var Ke=Ae-1,Ze=1;for(this[Re+Ke]=255&Xe;--Ke>=0&&(Ze*=256);)this[Re+Ke]=Xe/Ze&255;return Re+Ae},he.prototype.writeUInt8=function(Xe,Re,Ae){return Xe=+Xe,Re|=0,Ae||ht(this,Xe,Re,1,255,0),he.TYPED_ARRAY_SUPPORT||(Xe=Math.floor(Xe)),this[Re]=255&Xe,Re+1},he.prototype.writeUInt16LE=function(Xe,Re,Ae){return Xe=+Xe,Re|=0,Ae||ht(this,Xe,Re,2,65535,0),he.TYPED_ARRAY_SUPPORT?(this[Re]=255&Xe,this[Re+1]=Xe>>>8):rt(this,Xe,Re,!0),Re+2},he.prototype.writeUInt16BE=function(Xe,Re,Ae){return Xe=+Xe,Re|=0,Ae||ht(this,Xe,Re,2,65535,0),he.TYPED_ARRAY_SUPPORT?(this[Re]=Xe>>>8,this[Re+1]=255&Xe):rt(this,Xe,Re,!1),Re+2},he.prototype.writeUInt32LE=function(Xe,Re,Ae){return Xe=+Xe,Re|=0,Ae||ht(this,Xe,Re,4,4294967295,0),he.TYPED_ARRAY_SUPPORT?(this[Re+3]=Xe>>>24,this[Re+2]=Xe>>>16,this[Re+1]=Xe>>>8,this[Re]=255&Xe):dt(this,Xe,Re,!0),Re+4},he.prototype.writeUInt32BE=function(Xe,Re,Ae){return Xe=+Xe,Re|=0,Ae||ht(this,Xe,Re,4,4294967295,0),he.TYPED_ARRAY_SUPPORT?(this[Re]=Xe>>>24,this[Re+1]=Xe>>>16,this[Re+2]=Xe>>>8,this[Re+3]=255&Xe):dt(this,Xe,Re,!1),Re+4},he.prototype.writeIntLE=function(Xe,Re,Ae,Ue){if(Xe=+Xe,Re|=0,!Ue){var Ke=Math.pow(2,8*Ae-1);ht(this,Xe,Re,Ae,Ke-1,-Ke)}var Ze=0,lt=1,xt=0;for(this[Re]=255&Xe;++Ze<Ae&&(lt*=256);)Xe<0&&xt===0&&this[Re+Ze-1]!==0&&(xt=1),this[Re+Ze]=(Xe/lt>>0)-xt&255;return Re+Ae},he.prototype.writeIntBE=function(Xe,Re,Ae,Ue){if(Xe=+Xe,Re|=0,!Ue){var Ke=Math.pow(2,8*Ae-1);ht(this,Xe,Re,Ae,Ke-1,-Ke)}var Ze=Ae-1,lt=1,xt=0;for(this[Re+Ze]=255&Xe;--Ze>=0&&(lt*=256);)Xe<0&&xt===0&&this[Re+Ze+1]!==0&&(xt=1),this[Re+Ze]=(Xe/lt>>0)-xt&255;return Re+Ae},he.prototype.writeInt8=function(Xe,Re,Ae){return Xe=+Xe,Re|=0,Ae||ht(this,Xe,Re,1,127,-128),he.TYPED_ARRAY_SUPPORT||(Xe=Math.floor(Xe)),Xe<0&&(Xe=255+Xe+1),this[Re]=255&Xe,Re+1},he.prototype.writeInt16LE=function(Xe,Re,Ae){return Xe=+Xe,Re|=0,Ae||ht(this,Xe,Re,2,32767,-32768),he.TYPED_ARRAY_SUPPORT?(this[Re]=255&Xe,this[Re+1]=Xe>>>8):rt(this,Xe,Re,!0),Re+2},he.prototype.writeInt16BE=function(Xe,Re,Ae){return Xe=+Xe,Re|=0,Ae||ht(this,Xe,Re,2,32767,-32768),he.TYPED_ARRAY_SUPPORT?(this[Re]=Xe>>>8,this[Re+1]=255&Xe):rt(this,Xe,Re,!1),Re+2},he.prototype.writeInt32LE=function(Xe,Re,Ae){return Xe=+Xe,Re|=0,Ae||ht(this,Xe,Re,4,2147483647,-2147483648),he.TYPED_ARRAY_SUPPORT?(this[Re]=255&Xe,this[Re+1]=Xe>>>8,this[Re+2]=Xe>>>16,this[Re+3]=Xe>>>24):dt(this,Xe,Re,!0),Re+4},he.prototype.writeInt32BE=function(Xe,Re,Ae){return Xe=+Xe,Re|=0,Ae||ht(this,Xe,Re,4,2147483647,-2147483648),Xe<0&&(Xe=4294967295+Xe+1),he.TYPED_ARRAY_SUPPORT?(this[Re]=Xe>>>24,this[Re+1]=Xe>>>16,this[Re+2]=Xe>>>8,this[Re+3]=255&Xe):dt(this,Xe,Re,!1),Re+4},he.prototype.writeFloatLE=function(Xe,Re,Ae){return _t(this,Xe,Re,!0,Ae)},he.prototype.writeFloatBE=function(Xe,Re,Ae){return _t(this,Xe,Re,!1,Ae)},he.prototype.writeDoubleLE=function(Xe,Re,Ae){return vt(this,Xe,Re,!0,Ae)},he.prototype.writeDoubleBE=function(Xe,Re,Ae){return vt(this,Xe,Re,!1,Ae)},he.prototype.copy=function(Xe,Re,Ae,Ue){if(Ae||(Ae=0),Ue||Ue===0||(Ue=this.length),Re>=Xe.length&&(Re=Xe.length),Re||(Re=0),Ue>0&&Ue<Ae&&(Ue=Ae),Ue===Ae||Xe.length===0||this.length===0)return 0;if(Re<0)throw new RangeError("targetStart out of bounds");if(Ae<0||Ae>=this.length)throw new RangeError("sourceStart out of bounds");if(Ue<0)throw new RangeError("sourceEnd out of bounds");Ue>this.length&&(Ue=this.length),Xe.length-Re<Ue-Ae&&(Ue=Xe.length-Re+Ae);var Ke,Ze=Ue-Ae;if(this===Xe&&Ae<Re&&Re<Ue)for(Ke=Ze-1;Ke>=0;--Ke)Xe[Ke+Re]=this[Ke+Ae];else if(Ze<1e3||!he.TYPED_ARRAY_SUPPORT)for(Ke=0;Ke<Ze;++Ke)Xe[Ke+Re]=this[Ke+Ae];else Uint8Array.prototype.set.call(Xe,this.subarray(Ae,Ae+Ze),Re);return Ze},he.prototype.fill=function(Xe,Re,Ae,Ue){if(typeof Xe=="string"){if(typeof Re=="string"?(Ue=Re,Re=0,Ae=this.length):typeof Ae=="string"&&(Ue=Ae,Ae=this.length),Xe.length===1){var Ke=Xe.charCodeAt(0);Ke<256&&(Xe=Ke)}if(Ue!==void 0&&typeof Ue!="string")throw new TypeError("encoding must be a string");if(typeof Ue=="string"&&!he.isEncoding(Ue))throw new TypeError("Unknown encoding: "+Ue)}else typeof Xe=="number"&&(Xe&=255);if(Re<0||this.length<Re||this.length<Ae)throw new RangeError("Out of range index");if(Ae<=Re)return this;Re>>>=0,Ae=Ae===void 0?this.length:Ae>>>0,Xe||(Xe=0);var Ze;if(typeof Xe=="number")for(Ze=Re;Ze<Ae;++Ze)this[Ze]=Xe;else{var lt=he.isBuffer(Xe)?Xe:Kt(new he(Xe,Ue).toString()),xt=lt.length;for(Ze=0;Ze<Ae-Re;++Ze)this[Ze+Re]=lt[Ze%xt]}return this};var He=/[^+\/0-9A-Za-z-_]/g}).call(me,Ie(20))},function(Le,me){var Ie;Ie=function(){return this}();try{Ie=Ie||Function("return this")()||(0,eval)("this")}catch(Te){typeof window=="object"&&(Ie=window)}Le.exports=Ie},function(Le,me,Ie){"use strict";function Te(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 be(ee){return 3*ee.length/4-Te(ee)}function Pe(ee){var oe,ie,se,le,ye,we=ee.length;le=Te(ee),ye=new ve(3*we/4-le),ie=le>0?we-4:we;var Ce=0;for(oe=0;oe<ie;oe+=4)se=ce[ee.charCodeAt(oe)]<<18|ce[ee.charCodeAt(oe+1)]<<12|ce[ee.charCodeAt(oe+2)]<<6|ce[ee.charCodeAt(oe+3)],ye[Ce++]=se>>16&255,ye[Ce++]=se>>8&255,ye[Ce++]=255&se;return le===2?(se=ce[ee.charCodeAt(oe)]<<2|ce[ee.charCodeAt(oe+1)]>>4,ye[Ce++]=255&se):le===1&&(se=ce[ee.charCodeAt(oe)]<<10|ce[ee.charCodeAt(oe+1)]<<4|ce[ee.charCodeAt(oe+2)]>>2,ye[Ce++]=se>>8&255,ye[Ce++]=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,le=[],ye=oe;ye<ie;ye+=3)se=(ee[ye]<<16)+(ee[ye+1]<<8)+ee[ye+2],le.push(he(se));return le.join("")}function xe(ee){for(var oe,ie=ee.length,se=ie%3,le="",ye=[],we=0,Ce=ie-se;we<Ce;we+=16383)ye.push(Se(ee,we,we+16383>Ce?Ce:we+16383));return se===1?(oe=ee[ie-1],le+=ge[oe>>2],le+=ge[oe<<4&63],le+="=="):se===2&&(oe=(ee[ie-2]<<8)+ee[ie-1],le+=ge[oe>>10],le+=ge[oe>>4&63],le+=ge[oe<<2&63],le+="="),ye.push(le),ye.join("")}me.byteLength=be,me.toByteArray=Pe,me.fromByteArray=xe;for(var ge=[],ce=[],ve=typeof Uint8Array!="undefined"?Uint8Array:Array,de="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ue=0,z=de.length;ue<z;++ue)ge[ue]=de[ue],ce[de.charCodeAt(ue)]=ue;ce[45]=62,ce[95]=63},function(Le,me){me.read=function(Ie,Te,be,Pe,he){var Se,xe,ge=8*he-Pe-1,ce=(1<<ge)-1,ve=ce>>1,de=-7,ue=be?he-1:0,z=be?-1:1,ee=Ie[Te+ue];for(ue+=z,Se=ee&(1<<-de)-1,ee>>=-de,de+=ge;de>0;Se=256*Se+Ie[Te+ue],ue+=z,de-=8);for(xe=Se&(1<<-de)-1,Se>>=-de,de+=Pe;de>0;xe=256*xe+Ie[Te+ue],ue+=z,de-=8);if(Se===0)Se=1-ve;else{if(Se===ce)return xe?NaN:1/0*(ee?-1:1);xe+=Math.pow(2,Pe),Se-=ve}return(ee?-1:1)*xe*Math.pow(2,Se-Pe)},me.write=function(Ie,Te,be,Pe,he,Se){var xe,ge,ce,ve=8*Se-he-1,de=(1<<ve)-1,ue=de>>1,z=he===23?Math.pow(2,-24)-Math.pow(2,-77):0,ee=Pe?0:Se-1,oe=Pe?1:-1,ie=Te<0||Te===0&&1/Te<0?1:0;for(Te=Math.abs(Te),isNaN(Te)||Te===1/0?(ge=isNaN(Te)?1:0,xe=de):(xe=Math.floor(Math.log(Te)/Math.LN2),Te*(ce=Math.pow(2,-xe))<1&&(xe--,ce*=2),Te+=xe+ue>=1?z/ce:z*Math.pow(2,1-ue),Te*ce>=2&&(xe++,ce/=2),xe+ue>=de?(ge=0,xe=de):xe+ue>=1?(ge=(Te*ce-1)*Math.pow(2,he),xe+=ue):(ge=Te*Math.pow(2,ue-1)*Math.pow(2,he),xe=0));he>=8;Ie[be+ee]=255&ge,ee+=oe,ge/=256,he-=8);for(xe=xe<<he|ge,ve+=he;ve>0;Ie[be+ee]=255&xe,ee+=oe,xe/=256,ve-=8);Ie[be+ee-oe]|=128*ie}},function(Le,me){var Ie={}.toString;Le.exports=Array.isArray||function(Te){return Ie.call(Te)=="[object Array]"}},function(Le,me,Ie){"use strict";function Te(he,Se){if(!(he instanceof Se))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var be=function(){function he(Se,xe){for(var ge=0;ge<xe.length;ge++){var ce=xe[ge];ce.enumerable=ce.enumerable||!1,ce.configurable=!0,"value"in ce&&(ce.writable=!0),Object.defineProperty(Se,ce.key,ce)}}return function(Se,xe,ge){return xe&&he(Se.prototype,xe),ge&&he(Se,ge),Se}}(),Pe=function(){function he(){Te(this,he)}return be(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=Pe},function(Le,me,Ie){"use strict";function Te(he,Se){if(!(he instanceof Se))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var be=function(){function he(Se,xe){for(var ge=0;ge<xe.length;ge++){var ce=xe[ge];ce.enumerable=ce.enumerable||!1,ce.configurable=!0,"value"in ce&&(ce.writable=!0),Object.defineProperty(Se,ce.key,ce)}}return function(Se,xe,ge){return xe&&he(Se.prototype,xe),ge&&he(Se,ge),Se}}(),Pe=function(){function he(){Te(this,he)}return be(he,null,[{key:"get",value:function(Se){for(var xe=Se+"",ge=document.cookie.split(";"),ce=0;ce<ge.length;ce++){var ve=ge[ce].trim();if(ve.indexOf(xe)==0)return unescape(ve.substring(xe.length+1,ve.length))}return""}},{key:"set",value:function(Se,xe,ge){var ce=new Date;ce.setTime(ce.getTime()+24*ge*60*60*1e3);var ve="expires="+ce.toGMTString();document.cookie=Se+"="+escape(xe)+"; "+ve}}]),he}();me.default=Pe},function(Le,me,Ie){"use strict";function Te(ve){return ve&&ve.__esModule?ve:{default:ve}}function be(ve,de){if(!(ve instanceof de))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Pe=function(){function ve(de,ue){for(var z=0;z<ue.length;z++){var ee=ue[z];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(de,ee.key,ee)}}return function(de,ue,z){return ue&&ve(de.prototype,ue),z&&ve(de,z),de}}(),he=Ie(8),Se=Te(he),xe=Ie(9),ge=Te(xe),ce=function(){function ve(){be(this,ve)}return Pe(ve,null,[{key:"refreshUploadAuth",value:function(de,ue,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);ue&&ue(ye)},function(le){if(z){var ye=JSON.parse(le);z(ye)}})}},{key:"getUploadAuth",value:function(de,ue,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(le){try{le=JSON.parse(le)}catch(ye){if(z)return void z({Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"})}ue&&ue(le)},function(le){if(z){var ye={Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"};try{ye=JSON.parse(le)}catch(we){}z(ye)}})}},{key:"getImageUploadAuth",value:function(de,ue,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(le){le=JSON.parse(le),ue&&ue(le)},function(le){if(z){var ye=JSON.parse(le);z(ye)}})}}]),ve}();me.default=ce},function(Le,me,Ie){(function(Te,be,Pe){Le.exports=me=be(Ie(0),Ie(28),Ie(29))})(0,function(Te){return Te.HmacSHA1})},function(Le,me,Ie){(function(Te,be){Le.exports=me=be(Ie(0))})(0,function(Te){return function(){var be=Te,Pe=be.lib,he=Pe.WordArray,Se=Pe.Hasher,xe=be.algo,ge=[],ce=xe.SHA1=Se.extend({_doReset:function(){this._hash=new he.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(ve,de){for(var ue=this._hash.words,z=ue[0],ee=ue[1],oe=ue[2],ie=ue[3],se=ue[4],le=0;le<80;le++){if(le<16)ge[le]=0|ve[de+le];else{var ye=ge[le-3]^ge[le-8]^ge[le-14]^ge[le-16];ge[le]=ye<<1|ye>>>31}var we=(z<<5|z>>>27)+se+ge[le];we+=le<20?1518500249+(ee&oe|~ee&ie):le<40?1859775393+(ee^oe^ie):le<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}ue[0]=ue[0]+z|0,ue[1]=ue[1]+ee|0,ue[2]=ue[2]+oe|0,ue[3]=ue[3]+ie|0,ue[4]=ue[4]+se|0},_doFinalize:function(){var ve=this._data,de=ve.words,ue=8*this._nDataBytes,z=8*ve.sigBytes;return de[z>>>5]|=128<<24-z%32,de[14+(z+64>>>9<<4)]=Math.floor(ue/4294967296),de[15+(z+64>>>9<<4)]=ue,ve.sigBytes=4*de.length,this._process(),this._hash},clone:function(){var ve=Se.clone.call(this);return ve._hash=this._hash.clone(),ve}});be.SHA1=Se._createHelper(ce),be.HmacSHA1=Se._createHmacHelper(ce)}(),Te.SHA1})},function(Le,me,Ie){(function(Te,be){Le.exports=me=be(Ie(0))})(0,function(Te){(function(){var be=Te,Pe=be.lib,he=Pe.Base,Se=be.enc,xe=Se.Utf8,ge=be.algo;ge.HMAC=he.extend({init:function(ce,ve){ce=this._hasher=new ce.init,typeof ve=="string"&&(ve=xe.parse(ve));var de=ce.blockSize,ue=4*de;ve.sigBytes>ue&&(ve=ce.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=ue,this.reset()},reset:function(){var ce=this._hasher;ce.reset(),ce.update(this._iKey)},update:function(ce){return this._hasher.update(ce),this},finalize:function(ce){var ve=this._hasher,de=ve.finalize(ce);return ve.reset(),ve.finalize(this._oKey.clone().concat(de))}})})()})},function(Le,me,Ie){(function(Te,be){Le.exports=me=be(Ie(0))})(0,function(Te){return function(){function be(ge,ce,ve){for(var de=[],ue=0,z=0;z<ce;z++)if(z%4){var ee=ve[ge.charCodeAt(z-1)]<<z%4*2,oe=ve[ge.charCodeAt(z)]>>>6-z%4*2;de[ue>>>2]|=(ee|oe)<<24-ue%4*8,ue++}return Se.create(de,ue)}var Pe=Te,he=Pe.lib,Se=he.WordArray,xe=Pe.enc;xe.Base64={stringify:function(ge){var ce=ge.words,ve=ge.sigBytes,de=this._map;ge.clamp();for(var ue=[],z=0;z<ve;z+=3)for(var ee=ce[z>>>2]>>>24-z%4*8&255,oe=ce[z+1>>>2]>>>24-(z+1)%4*8&255,ie=ce[z+2>>>2]>>>24-(z+2)%4*8&255,se=ee<<16|oe<<8|ie,le=0;le<4&&z+.75*le<ve;le++)ue.push(de.charAt(se>>>6*(3-le)&63));var ye=de.charAt(64);if(ye)for(;ue.length%4;)ue.push(ye);return ue.join("")},parse:function(ge){var ce=ge.length,ve=this._map,de=this._reverseMap;if(!de){de=this._reverseMap=[];for(var ue=0;ue<ve.length;ue++)de[ve.charCodeAt(ue)]=ue}var z=ve.charAt(64);if(z){var ee=ge.indexOf(z);ee!==-1&&(ce=ee)}return be(ge,ce,de)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),Te.enc.Base64})},function(Le,me,Ie){"use strict";function Te(Ce){return Ce&&Ce.__esModule?Ce:{default:Ce}}function be(Ce,ke){if(!(Ce instanceof ke))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Pe=function(){function Ce(ke,Ne){for(var je=0;je<Ne.length;je++){var Ve=Ne[je];Ve.enumerable=Ve.enumerable||!1,Ve.configurable=!0,"value"in Ve&&(Ve.writable=!0),Object.defineProperty(ke,Ve.key,Ve)}}return function(ke,Ne,je){return Ne&&Ce(ke.prototype,Ne),je&&Ce(ke,je),ke}}(),he=Ie(8),Se=Te(he),xe=Ie(7),ge=Te(xe),ce=Ie(4),ve=Te(ce),de=Ie(6),ue=Te(de),z=Ie(1),ee=Te(z),oe=Ie(9),ie=Te(oe),se=Ie(2),le=Ie(11),ye=Ie(10),we=function(){function Ce(){be(this,Ce)}return Pe(Ce,null,[{key:"getAuthInfo",value:function(ke,Ne,je){var Ve=ke+"|f#Ylm&^1TppeRhLg|"+je;return Ne&&(Ve=ke+"|"+Ne+"|f#Ylm&^1TppeRhLg|"+je),se(ye.parse(Ve)).toString(le)}},{key:"upload",value:function(ke,Ne,je){var Ve=ee.default.ISODateString(new Date),Qe=Math.floor(new Date().valueOf()/1e3),Ge=ve.default.getClientId();Ge=ve.default.setClientId(Ge);var mt=Ce.getAuthInfo(ke.userId,Ge,Qe),ct=ie.default.randomUUID(),Ct={Source:"WebSDK",BusinessType:"UploadVideo",Action:"ReportUploadProgress",TerminalType:"H5",DeviceModel:ge.default.browser.name+(ge.default.browser.version||""),AppVersion:ue.default.version,AuthTimestamp:Qe,Timestamp:Ve,AuthInfo:mt,FileName:ke.file.name,FileSize:ke.file.size,FileCreateTime:ke.file.lastModified,FileHash:ke.fileHash,UploadId:ke.checkpoint.checkpoint.uploadId,PartSize:ke.checkpoint.checkpoint.partSize,DonePartsCount:ke.checkpoint.checkpoint.doneParts.length,UploadPoint:JSON.stringify(ke.checkpoint),UploadRatio:ke.checkpoint.loaded,UserId:ke.userId,VideoId:ke.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:ct};Ge&&(Ct.ClientId=Ge);var it=ie.default.makeUTF8sort(Ct,"=","&")+"&Signature="+ie.default.aliyunEncodeURI(ie.default.makeChangeSiga(Ct,ke.accessKeySecret)),St="https://vod."+ke.region+".aliyuncs.com/?"+it;Se.default.get(St,function(ut){Ne&&Ne()},function(ut){ut&&(je(ut),console.log(ut))})}},{key:"get",value:function(ke,Ne,je){var Ve=ee.default.ISODateString(new Date),Qe=Math.floor(new Date().valueOf()/1e3),Ge=ve.default.getClientId(),mt=Ce.getAuthInfo(ke.userId,Ge,Qe),ct=ie.default.randomUUID(),Ct={Source:"WebSDK",BusinessType:"UploadVideo",Action:"GetUploadProgress",TerminalType:"H5",DeviceModel:ge.default.browser.name+(ge.default.browser.version||""),AppVersion:ue.default.version,AuthTimestamp:Qe,Timestamp:Ve,AuthInfo:mt,UserId:ke.userId,UploadInfoList:JSON.stringify(ke.uploadInfoList),Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:ct};Ge&&(Ct.ClientId=Ge);var it=ie.default.makeUTF8sort(Ct,"=","&")+"&Signature="+ie.default.aliyunEncodeURI(ie.default.makeChangeSiga(Ct,ke.accessKeySecret)),St="https://vod."+ke.region+".aliyuncs.com/?"+it;Se.default.get(St,function(ut){var Ft={},ht=Ge;ut=ut?JSON.parse(ut):{},ut.UploadProgress&&ut.UploadProgress.UploadProgressList&&ut.UploadProgress.UploadProgressList.length>0&&(Ft=ut.UploadProgress.UploadProgressList[0],ht=Ft.ClientId),ve.default.setClientId(ht),Ne&&Ne(Ft)},function(ut){ut&&(je(ut),console.log(ut))})}}]),Ce}();me.default=we},function(Le,me,Ie){"use strict";function Te(xe,ge){if(!(xe instanceof ge))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var be=function(){function xe(ge,ce){for(var ve=0;ve<ce.length;ve++){var de=ce[ve];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),Object.defineProperty(ge,de.key,de)}}return function(ge,ce,ve){return ce&&xe(ge.prototype,ce),ve&&xe(ge,ve),ge}}(),Pe=Ie(2),he=Ie(33),Se=(Ie(11),function(){function xe(){Te(this,xe)}return be(xe,null,[{key:"getMd5",value:function(ge,ce,ve){var de=new FileReader;de.onload=function(ee){try{if(ee&&ee.target){var oe=Pe(he.parse(ee.target.result)),ie=oe.toString();ce(ie)}}catch(se){console.log(se)}},de.onerror=function(ee){console.log(ee),errorCallback(ee)};var ue=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,z=ue.call(ge,0,1024);de.readAsBinaryString(z)}}]),xe}());me.default=Se},function(Le,me,Ie){(function(Te,be){Le.exports=me=be(Ie(0))})(0,function(Te){return Te.enc.Latin1})}])},50371:function(Cn,Yt){"use strict";function Ee(){const Le=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let me=1;me<arguments.length;me++){const Ie=me<0||arguments.length<=me?void 0:arguments[me];Ie&&Object.keys(Ie).forEach(Te=>{const be=Ie[Te];be!==void 0&&(Le[Te]=be)})}return Le}Yt.Z=Ee},13845:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{F:function(){return Le},Z:function(){return me}});function Le(Ie){return Ie!=null&&Ie===Ie.window}function me(Ie,Te){var be,Pe;if(typeof window=="undefined")return 0;const he=Te?"scrollTop":"scrollLeft";let Se=0;return Le(Ie)?Se=Ie[Te?"pageYOffset":"pageXOffset"]:Ie instanceof Document?Se=Ie.documentElement[he]:(Ie instanceof HTMLElement||Ie)&&(Se=Ie[he]),Ie&&!Le(Ie)&&typeof Se!="number"&&(Se=(Pe=((be=Ie.ownerDocument)!==null&&be!==void 0?be:Ie).documentElement)===null||Pe===void 0?void 0:Pe[he]),Se}},56762:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return me}});var Le=Ee(59301);function me(){const[,Ie]=Le.useReducer(Te=>Te+1,0);return Ie}},68031:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Te}});var Le=Ee(16089);function me(be,Pe,he,Se){const xe=he-Pe;return be/=Se/2,be<1?xe/2*be*be*be+Pe:xe/2*((be-=2)*be*be+2)+Pe}var Ie=Ee(13845);function Te(be){let Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:he=()=>window,callback:Se,duration:xe=450}=Pe,ge=he(),ce=(0,Ie.Z)(ge,!0),ve=Date.now(),de=()=>{const z=Date.now()-ve,ee=me(z>xe?xe:z,ce,be,xe);(0,Ie.F)(ge)?ge.scrollTo(window.pageXOffset,ee):ge instanceof Document||ge.constructor.name==="HTMLDocument"?ge.documentElement.scrollTop=ee:ge.scrollTop=ee,z<xe?(0,Le.Z)(de):typeof Se=="function"&&Se()};(0,Le.Z)(de)}},24905:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{default:function(){return ke}});var Le=Ee(92310),me=Ee.n(Le),Ie=Ee(5630),Te=Ee(59301),be=Ee(36355),Pe=Ee(1684),he=Ee(32441),xe=Te.createContext(null),ge=Ee(98447),ce=Ee(14088),ve=Ee(4572),de=function(Ne,je){var Ve={};for(var Qe in Ne)Object.prototype.hasOwnProperty.call(Ne,Qe)&&je.indexOf(Qe)<0&&(Ve[Qe]=Ne[Qe]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ge=0,Qe=Object.getOwnPropertySymbols(Ne);Ge<Qe.length;Ge++)je.indexOf(Qe[Ge])<0&&Object.prototype.propertyIsEnumerable.call(Ne,Qe[Ge])&&(Ve[Qe[Ge]]=Ne[Qe[Ge]]);return Ve};const ue=(Ne,je)=>{var Ve;const{prefixCls:Qe,className:Ge,rootClassName:mt,children:ct,indeterminate:Ct=!1,style:it,onMouseEnter:St,onMouseLeave:ut,skipGroup:Ft=!1,disabled:ht}=Ne,rt=de(Ne,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:dt,direction:yt,checkbox:_t}=Te.useContext(be.E_),vt=Te.useContext(xe),{isFormItemInput:Bt}=Te.useContext(he.aM),jt=Te.useContext(Pe.Z),un=(Ve=(vt==null?void 0:vt.disabled)||ht)!==null&&Ve!==void 0?Ve:jt,Kt=Te.useRef(rt.value);Te.useEffect(()=>{vt==null||vt.registerValue(rt.value)},[]),Te.useEffect(()=>{if(!Ft)return rt.value!==Kt.current&&(vt==null||vt.cancelValue(Kt.current),vt==null||vt.registerValue(rt.value),Kt.current=rt.value),()=>vt==null?void 0:vt.cancelValue(rt.value)},[rt.value]);const xn=dt("checkbox",Qe),[Ut,Wt]=(0,ge.ZP)(xn),$t=Object.assign({},rt);vt&&!Ft&&($t.onChange=function(){rt.onChange&&rt.onChange.apply(rt,arguments),vt.toggleOption&&vt.toggleOption({label:ct,value:rt.value})},$t.name=vt.name,$t.checked=vt.value.includes(rt.value));const ft=me()(`${xn}-wrapper`,{[`${xn}-rtl`]:yt==="rtl",[`${xn}-wrapper-checked`]:$t.checked,[`${xn}-wrapper-disabled`]:un,[`${xn}-wrapper-in-form-item`]:Bt},_t==null?void 0:_t.className,Ge,mt,Wt),We=me()({[`${xn}-indeterminate`]:Ct},ve.A,Wt),Be=Ct?"mixed":void 0;return Ut(Te.createElement(ce.Z,{component:"Checkbox",disabled:un},Te.createElement("label",{className:ft,style:Object.assign(Object.assign({},_t==null?void 0:_t.style),it),onMouseEnter:St,onMouseLeave:ut},Te.createElement(Ie.Z,Object.assign({"aria-checked":Be},$t,{prefixCls:xn,className:We,disabled:un,ref:je})),ct!==void 0&&Te.createElement("span",null,ct))))};var ee=Te.forwardRef(ue),oe=Ee(80702),ie=Ee(2738),se=function(Ne,je){var Ve={};for(var Qe in Ne)Object.prototype.hasOwnProperty.call(Ne,Qe)&&je.indexOf(Qe)<0&&(Ve[Qe]=Ne[Qe]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ge=0,Qe=Object.getOwnPropertySymbols(Ne);Ge<Qe.length;Ge++)je.indexOf(Qe[Ge])<0&&Object.prototype.propertyIsEnumerable.call(Ne,Qe[Ge])&&(Ve[Qe[Ge]]=Ne[Qe[Ge]]);return Ve};const le=(Ne,je)=>{const{defaultValue:Ve,children:Qe,options:Ge=[],prefixCls:mt,className:ct,rootClassName:Ct,style:it,onChange:St}=Ne,ut=se(Ne,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:Ft,direction:ht}=Te.useContext(be.E_),[rt,dt]=Te.useState(ut.value||Ve||[]),[yt,_t]=Te.useState([]);Te.useEffect(()=>{"value"in ut&&dt(ut.value||[])},[ut.value]);const vt=Te.useMemo(()=>Ge.map(qe=>typeof qe=="string"||typeof qe=="number"?{label:qe,value:qe}:qe),[Ge]),Bt=qe=>{_t(et=>et.filter(He=>He!==qe))},jt=qe=>{_t(et=>[].concat((0,oe.Z)(et),[qe]))},un=qe=>{const et=rt.indexOf(qe.value),He=(0,oe.Z)(rt);et===-1?He.push(qe.value):He.splice(et,1),"value"in ut||dt(He),St==null||St(He.filter(Xe=>yt.includes(Xe)).sort((Xe,Re)=>{const Ae=vt.findIndex(Ke=>Ke.value===Xe),Ue=vt.findIndex(Ke=>Ke.value===Re);return Ae-Ue}))},Kt=Ft("checkbox",mt),xn=`${Kt}-group`,[Ut,Wt]=(0,ge.ZP)(Kt),$t=(0,ie.Z)(ut,["value","disabled"]),ft=Ge.length?vt.map(qe=>Te.createElement(ee,{prefixCls:Kt,key:qe.value.toString(),disabled:"disabled"in qe?qe.disabled:ut.disabled,value:qe.value,checked:rt.includes(qe.value),onChange:qe.onChange,className:`${xn}-item`,style:qe.style,title:qe.title},qe.label)):Qe,We={toggleOption:un,value:rt,disabled:ut.disabled,name:ut.name,registerValue:jt,cancelValue:Bt},Be=me()(xn,{[`${xn}-rtl`]:ht==="rtl"},ct,Ct,Wt);return Ut(Te.createElement("div",Object.assign({className:Be,style:it},$t,{ref:je}),Te.createElement(xe.Provider,{value:We},ft)))},ye=Te.forwardRef(le);var we=Te.memo(ye);const Ce=ee;Ce.Group=we,Ce.__ANT_CHECKBOX=!0;var ke=Ce},98447:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{C2:function(){return be}});var Le=Ee(17313),me=Ee(37613),Ie=Ee(83116);const Te=Pe=>{const{checkboxCls:he}=Pe,Se=`${he}-wrapper`;return[{[`${he}-group`]:Object.assign(Object.assign({},(0,Le.Wf)(Pe)),{display:"inline-flex",flexWrap:"wrap",columnGap:Pe.marginXS,[`> ${Pe.antCls}-row`]:{flex:1}}),[Se]:Object.assign(Object.assign({},(0,Le.Wf)(Pe)),{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,Le.Wf)(Pe)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:Pe.borderRadiusSM,alignSelf:"center",[`${he}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${he}-inner`]:Object.assign({},(0,Le.oN)(Pe))},[`${he}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:Pe.checkboxSize,height:Pe.checkboxSize,direction:"ltr",backgroundColor:Pe.colorBgContainer,border:`${Pe.lineWidth}px ${Pe.lineType} ${Pe.colorBorder}`,borderRadius:Pe.borderRadiusSM,borderCollapse:"separate",transition:`all ${Pe.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:Pe.checkboxSize/14*5,height:Pe.checkboxSize/14*8,border:`${Pe.lineWidthBold}px solid ${Pe.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${Pe.motionDurationFast} ${Pe.motionEaseInBack}, opacity ${Pe.motionDurationFast}`}},"& + span":{paddingInlineStart:Pe.paddingXS,paddingInlineEnd:Pe.paddingXS}})},{[`
|
|
|
${Se}:not(${Se}-disabled),
|
|
|
${he}:not(${he}-disabled)
|
|
|
`]:{[`&:hover ${he}-inner`]:{borderColor:Pe.colorPrimary}},[`${Se}:not(${Se}-disabled)`]:{[`&:hover ${he}-checked:not(${he}-disabled) ${he}-inner`]:{backgroundColor:Pe.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${he}-checked:not(${he}-disabled):after`]:{borderColor:Pe.colorPrimaryHover}}},{[`${he}-checked`]:{[`${he}-inner`]:{backgroundColor:Pe.colorPrimary,borderColor:Pe.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${Pe.motionDurationMid} ${Pe.motionEaseOutBack} ${Pe.motionDurationFast}`}}},[`
|
|
|
${Se}-checked:not(${Se}-disabled),
|
|
|
${he}-checked:not(${he}-disabled)
|
|
|
`]:{[`&:hover ${he}-inner`]:{backgroundColor:Pe.colorPrimaryHover,borderColor:"transparent"}}},{[he]:{"&-indeterminate":{[`${he}-inner`]:{backgroundColor:Pe.colorBgContainer,borderColor:Pe.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:Pe.fontSizeLG/2,height:Pe.fontSizeLG/2,backgroundColor:Pe.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:Pe.colorBgContainerDisabled,borderColor:Pe.colorBorder,"&:after":{borderColor:Pe.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:Pe.colorTextDisabled},[`&${he}-indeterminate ${he}-inner::after`]:{background:Pe.colorTextDisabled}}}]};function be(Pe,he){const Se=(0,me.TS)(he,{checkboxCls:`.${Pe}`,checkboxSize:he.controlInteractiveSize});return[Te(Se)]}Yt.ZP=(0,Ie.Z)("Checkbox",(Pe,he)=>{let{prefixCls:Se}=he;return[be(Se,Pe)]})},93891:function(Cn,Yt,Ee){"use strict";var Le=Ee(59301),me=Ee(36355),Ie=Ee(64165);const Te=be=>{const{componentName:Pe}=be,{getPrefixCls:he}=(0,Le.useContext)(me.E_),Se=he("empty");switch(Pe){case"Table":case"List":return Le.createElement(Ie.Z,{image:Ie.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return Le.createElement(Ie.Z,{image:Ie.Z.PRESENTED_IMAGE_SIMPLE,className:`${Se}-small`});default:return Le.createElement(Ie.Z,null)}};Yt.Z=Te},43428:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Ut}});var Le=Ee(92310),me=Ee.n(Le),Ie=Ee(77321),Te=Ee(52487),be=Ee(43403),Pe=Ee(34280),he=Ee(59301),Se=he.createContext(null),xe=he.createContext({}),ge=Se,ce=Ee(49618),ve=Ee(72308),de=Ee(77900),ue=Ee(10228),z=Ee(26112),ee=Ee(70425),oe=function($t){var ft=$t.prefixCls,We=$t.className,Be=$t.style,qe=$t.children,et=$t.containerRef,He=$t.id,Xe=$t.onMouseEnter,Re=$t.onMouseOver,Ae=$t.onMouseLeave,Ue=$t.onClick,Ke=$t.onKeyDown,Ze=$t.onKeyUp,lt={onMouseEnter:Xe,onMouseOver:Re,onMouseLeave:Ae,onClick:Ue,onKeyDown:Ke,onKeyUp:Ze},xt=he.useContext(xe),tn=xt.panel,en=(0,ee.useComposeRef)(tn,et);return he.createElement(he.Fragment,null,he.createElement("div",(0,ve.Z)({id:He,className:me()("".concat(ft,"-content"),We),style:(0,Ie.Z)({},Be),"aria-modal":"true",role:"dialog",ref:en},lt),qe))},ie=oe,se=Ee(48736);function le(Wt){return typeof Wt=="string"&&String(Number(Wt))===Wt?((0,se.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Wt)):Wt}function ye(Wt){warning(!("wrapperClassName"in Wt),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Wt.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 Ce(Wt,$t){var ft,We,Be,qe,et=Wt.prefixCls,He=Wt.open,Xe=Wt.placement,Re=Wt.inline,Ae=Wt.push,Ue=Wt.forceRender,Ke=Wt.autoFocus,Ze=Wt.keyboard,lt=Wt.rootClassName,xt=Wt.rootStyle,tn=Wt.zIndex,en=Wt.className,Jt=Wt.id,gn=Wt.style,Mn=Wt.motion,yn=Wt.width,kn=Wt.height,$n=Wt.children,An=Wt.contentWrapperStyle,oi=Wt.mask,ai=Wt.maskClosable,Di=Wt.maskMotion,Pi=Wt.maskClassName,Xi=Wt.maskStyle,or=Wt.afterOpenChange,ar=Wt.onClose,dr=Wt.onMouseEnter,no=Wt.onMouseOver,Ir=Wt.onMouseLeave,xi=Wt.onClick,wr=Wt.onKeyDown,Mr=Wt.onKeyUp,ot=he.useRef(),Rr=he.useRef(),Nr=he.useRef();he.useImperativeHandle($t,function(){return ot.current});var Hr=function(rn){var At=rn.keyCode,an=rn.shiftKey;switch(At){case ue.Z.TAB:{if(At===ue.Z.TAB){if(!an&&document.activeElement===Nr.current){var En;(En=Rr.current)===null||En===void 0||En.focus({preventScroll:!0})}else if(an&&document.activeElement===Rr.current){var Dn;(Dn=Nr.current)===null||Dn===void 0||Dn.focus({preventScroll:!0})}}break}case ue.Z.ESC:{ar&&Ze&&(rn.stopPropagation(),ar(rn));break}}};he.useEffect(function(){if(He&&Ke){var dn;(dn=ot.current)===null||dn===void 0||dn.focus({preventScroll:!0})}},[He]);var uo=he.useState(!1),po=(0,Te.Z)(uo,2),io=po[0],Do=po[1],Xn=he.useContext(ge),$e;Ae===!1?$e={distance:0}:Ae===!0?$e={}:$e=Ae||{};var nt=(ft=(We=(Be=$e)===null||Be===void 0?void 0:Be.distance)!==null&&We!==void 0?We:Xn==null?void 0:Xn.pushDistance)!==null&&ft!==void 0?ft:180,Je=he.useMemo(function(){return{pushDistance:nt,push:function(){Do(!0)},pull:function(){Do(!1)}}},[nt]);he.useEffect(function(){if(He){var dn;Xn==null||(dn=Xn.push)===null||dn===void 0||dn.call(Xn)}else{var rn;Xn==null||(rn=Xn.pull)===null||rn===void 0||rn.call(Xn)}},[He]),he.useEffect(function(){return function(){var dn;Xn==null||(dn=Xn.pull)===null||dn===void 0||dn.call(Xn)}},[]);var wt=oi&&he.createElement(de.default,(0,ve.Z)({key:"mask"},Di,{visible:He}),function(dn,rn){var At=dn.className,an=dn.style;return he.createElement("div",{className:me()("".concat(et,"-mask"),At,Pi),style:(0,Ie.Z)((0,Ie.Z)({},an),Xi),onClick:ai&&He?ar:void 0,ref:rn})}),Nt=typeof Mn=="function"?Mn(Xe):Mn,kt={};if(io&&nt)switch(Xe){case"top":kt.transform="translateY(".concat(nt,"px)");break;case"bottom":kt.transform="translateY(".concat(-nt,"px)");break;case"left":kt.transform="translateX(".concat(nt,"px)");break;default:kt.transform="translateX(".concat(-nt,"px)");break}Xe==="left"||Xe==="right"?kt.width=le(yn):kt.height=le(kn);var Et={onMouseEnter:dr,onMouseOver:no,onMouseLeave:Ir,onClick:xi,onKeyDown:wr,onKeyUp:Mr},cn=he.createElement(de.default,(0,ve.Z)({key:"panel"},Nt,{visible:He,forceRender:Ue,onVisibleChanged:function(rn){or==null||or(rn)},removeOnLeave:!1,leavedClassName:"".concat(et,"-content-wrapper-hidden")}),function(dn,rn){var At=dn.className,an=dn.style;return he.createElement("div",(0,ve.Z)({className:me()("".concat(et,"-content-wrapper"),At),style:(0,Ie.Z)((0,Ie.Z)((0,Ie.Z)({},kt),an),An)},(0,z.Z)(Wt,{data:!0})),he.createElement(ie,(0,ve.Z)({id:Jt,containerRef:rn,prefixCls:et,className:en,style:gn},Et),$n))}),bn=(0,Ie.Z)({},xt);return tn&&(bn.zIndex=tn),he.createElement(ge.Provider,{value:Je},he.createElement("div",{className:me()(et,"".concat(et,"-").concat(Xe),lt,(qe={},(0,ce.Z)(qe,"".concat(et,"-open"),He),(0,ce.Z)(qe,"".concat(et,"-inline"),Re),qe)),style:bn,tabIndex:-1,ref:ot,onKeyDown:Hr},wt,he.createElement("div",{tabIndex:0,ref:Rr,style:we,"aria-hidden":"true","data-sentinel":"start"}),cn,he.createElement("div",{tabIndex:0,ref:Nr,style:we,"aria-hidden":"true","data-sentinel":"end"})))}var ke=he.forwardRef(Ce),Ne=ke,je=function($t){var ft=$t.open,We=ft===void 0?!1:ft,Be=$t.prefixCls,qe=Be===void 0?"rc-drawer":Be,et=$t.placement,He=et===void 0?"right":et,Xe=$t.autoFocus,Re=Xe===void 0?!0:Xe,Ae=$t.keyboard,Ue=Ae===void 0?!0:Ae,Ke=$t.width,Ze=Ke===void 0?378:Ke,lt=$t.mask,xt=lt===void 0?!0:lt,tn=$t.maskClosable,en=tn===void 0?!0:tn,Jt=$t.getContainer,gn=$t.forceRender,Mn=$t.afterOpenChange,yn=$t.destroyOnClose,kn=$t.onMouseEnter,$n=$t.onMouseOver,An=$t.onMouseLeave,oi=$t.onClick,ai=$t.onKeyDown,Di=$t.onKeyUp,Pi=$t.panelRef,Xi=he.useState(!1),or=(0,Te.Z)(Xi,2),ar=or[0],dr=or[1],no=he.useState(!1),Ir=(0,Te.Z)(no,2),xi=Ir[0],wr=Ir[1];(0,Pe.Z)(function(){wr(!0)},[]);var Mr=xi?We:!1,ot=he.useRef(),Rr=he.useRef();(0,Pe.Z)(function(){Mr&&(Rr.current=document.activeElement)},[Mr]);var Nr=function(Do){var Xn;if(dr(Do),Mn==null||Mn(Do),!Do&&Rr.current&&!((Xn=ot.current)!==null&&Xn!==void 0&&Xn.contains(Rr.current))){var $e;($e=Rr.current)===null||$e===void 0||$e.focus({preventScroll:!0})}},Hr=he.useMemo(function(){return{panel:Pi}},[Pi]);if(!gn&&!ar&&!Mr&&yn)return null;var uo={onMouseEnter:kn,onMouseOver:$n,onMouseLeave:An,onClick:oi,onKeyDown:ai,onKeyUp:Di},po=(0,Ie.Z)((0,Ie.Z)({},$t),{},{open:Mr,prefixCls:qe,placement:He,autoFocus:Re,keyboard:Ue,width:Ze,mask:xt,maskClosable:en,inline:Jt===!1,afterOpenChange:Nr,ref:ot},uo);return he.createElement(xe.Provider,{value:Hr},he.createElement(be.Z,{open:Mr||gn||ar,autoDestroy:!1,getContainer:Jt,autoLock:xt&&(Mr||ar)},he.createElement(Ne,po)))},Ve=je,Qe=Ve,Ge=Ee(62892),mt=Ee(36355),ct=Ee(32441),Ct=Ee(47729),St=Wt=>{const{prefixCls:$t,title:ft,footer:We,extra:Be,closeIcon:qe,closable:et,onClose:He,headerStyle:Xe,drawerStyle:Re,bodyStyle:Ae,footerStyle:Ue,children:Ke}=Wt,Ze=he.useCallback(Jt=>he.createElement("button",{type:"button",onClick:He,"aria-label":"Close",className:`${$t}-close`},Jt),[He]),[lt,xt]=(0,Ct.Z)(et,qe,Ze,void 0,!0),tn=he.useMemo(()=>!ft&&!lt?null:he.createElement("div",{style:Xe,className:me()(`${$t}-header`,{[`${$t}-header-close-only`]:lt&&!ft&&!Be})},he.createElement("div",{className:`${$t}-header-title`},xt,ft&&he.createElement("div",{className:`${$t}-title`},ft)),Be&&he.createElement("div",{className:`${$t}-extra`},Be)),[lt,xt,Be,Xe,$t,ft]),en=he.useMemo(()=>{if(!We)return null;const Jt=`${$t}-footer`;return he.createElement("div",{className:Jt,style:Ue},We)},[We,Ue,$t]);return he.createElement("div",{className:`${$t}-wrapper-body`,style:Re},tn,he.createElement("div",{className:`${$t}-body`,style:Ae},Ke),en)},ut=Ee(33234),Ft=Ee(83116),ht=Ee(37613),dt=Wt=>{const{componentCls:$t,motionDurationSlow:ft}=Wt,We={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${ft}`}}};return{[$t]:{[`${$t}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${ft}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${$t}-panel-motion`]:{"&-left":[We,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[We,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[We,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[We,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}};const yt=Wt=>{const{componentCls:$t,zIndexPopup:ft,colorBgMask:We,colorBgElevated:Be,motionDurationSlow:qe,motionDurationMid:et,padding:He,paddingLG:Xe,fontSizeLG:Re,lineHeightLG:Ae,lineWidth:Ue,lineType:Ke,colorSplit:Ze,marginSM:lt,colorIcon:xt,colorIconHover:tn,colorText:en,fontWeightStrong:Jt,footerPaddingBlock:gn,footerPaddingInline:Mn}=Wt,yn=`${$t}-content-wrapper`;return{[$t]:{position:"fixed",inset:0,zIndex:ft,pointerEvents:"none","&-pure":{position:"relative",background:Be,[`&${$t}-left`]:{boxShadow:Wt.boxShadowDrawerLeft},[`&${$t}-right`]:{boxShadow:Wt.boxShadowDrawerRight},[`&${$t}-top`]:{boxShadow:Wt.boxShadowDrawerUp},[`&${$t}-bottom`]:{boxShadow:Wt.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${$t}-mask`]:{position:"absolute",inset:0,zIndex:ft,background:We,pointerEvents:"auto"},[yn]:{position:"absolute",zIndex:ft,maxWidth:"100vw",transition:`all ${qe}`,"&-hidden":{display:"none"}},[`&-left > ${yn}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:Wt.boxShadowDrawerLeft},[`&-right > ${yn}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:Wt.boxShadowDrawerRight},[`&-top > ${yn}`]:{top:0,insetInline:0,boxShadow:Wt.boxShadowDrawerUp},[`&-bottom > ${yn}`]:{bottom:0,insetInline:0,boxShadow:Wt.boxShadowDrawerDown},[`${$t}-content`]:{width:"100%",height:"100%",overflow:"auto",background:Be,pointerEvents:"auto"},[`${$t}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${$t}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${He}px ${Xe}px`,fontSize:Re,lineHeight:Ae,borderBottom:`${Ue}px ${Ke} ${Ze}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${$t}-extra`]:{flex:"none"},[`${$t}-close`]:{display:"inline-block",marginInlineEnd:lt,color:xt,fontWeight:Jt,fontSize:Re,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${et}`,textRendering:"auto","&:focus, &:hover":{color:tn,textDecoration:"none"}},[`${$t}-title`]:{flex:1,margin:0,color:en,fontWeight:Wt.fontWeightStrong,fontSize:Re,lineHeight:Ae},[`${$t}-body`]:{flex:1,minWidth:0,minHeight:0,padding:Xe,overflow:"auto"},[`${$t}-footer`]:{flexShrink:0,padding:`${gn}px ${Mn}px`,borderTop:`${Ue}px ${Ke} ${Ze}`},"&-rtl":{direction:"rtl"}}}};var _t=(0,Ft.Z)("Drawer",Wt=>{const $t=(0,ht.TS)(Wt,{});return[yt($t),dt($t)]},Wt=>({zIndexPopup:Wt.zIndexPopupBase,footerPaddingBlock:Wt.paddingXS,footerPaddingInline:Wt.padding})),vt=Ee(11575),Bt=function(Wt,$t){var ft={};for(var We in Wt)Object.prototype.hasOwnProperty.call(Wt,We)&&$t.indexOf(We)<0&&(ft[We]=Wt[We]);if(Wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Be=0,We=Object.getOwnPropertySymbols(Wt);Be<We.length;Be++)$t.indexOf(We[Be])<0&&Object.prototype.propertyIsEnumerable.call(Wt,We[Be])&&(ft[We[Be]]=Wt[We[Be]]);return ft};const jt=null,un={distance:180},Kt=Wt=>{var $t;const{rootClassName:ft,width:We,height:Be,size:qe="default",mask:et=!0,push:He=un,open:Xe,afterOpenChange:Re,onClose:Ae,prefixCls:Ue,getContainer:Ke,style:Ze,className:lt,visible:xt,afterVisibleChange:tn}=Wt,en=Bt(Wt,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange"]),{getPopupContainer:Jt,getPrefixCls:gn,direction:Mn,drawer:yn}=he.useContext(mt.E_),kn=gn("drawer",Ue),[$n,An]=_t(kn),oi=Ke===void 0&&Jt?()=>Jt(document.body):Ke,ai=me()({"no-mask":!et,[`${kn}-rtl`]:Mn==="rtl"},ft,An),Di=he.useMemo(()=>We!=null?We:qe==="large"?736:378,[We,qe]),Pi=he.useMemo(()=>Be!=null?Be:qe==="large"?736:378,[Be,qe]),Xi={motionName:(0,Ge.m)(kn,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},or=dr=>({motionName:(0,Ge.m)(kn,`panel-motion-${dr}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),ar=(0,vt.H)();return $n(he.createElement(ut.BR,null,he.createElement(ct.Ux,{status:!0,override:!0},he.createElement(Qe,Object.assign({prefixCls:kn,onClose:Ae,maskMotion:Xi,motion:or},en,{open:Xe!=null?Xe:xt,mask:et,push:He,width:Di,height:Pi,style:Object.assign(Object.assign({},yn==null?void 0:yn.style),Ze),className:me()(yn==null?void 0:yn.className,lt),rootClassName:ai,getContainer:oi,afterOpenChange:Re!=null?Re:tn,panelRef:ar}),he.createElement(St,Object.assign({prefixCls:kn},en,{onClose:Ae}))))))},xn=Wt=>{const{prefixCls:$t,style:ft,className:We,placement:Be="right"}=Wt,qe=Bt(Wt,["prefixCls","style","className","placement"]),{getPrefixCls:et}=he.useContext(mt.E_),He=et("drawer",$t),[Xe,Re]=_t(He),Ae=me()(He,`${He}-pure`,`${He}-${Be}`,Re,We);return Xe(he.createElement("div",{className:Ae,style:ft},he.createElement(St,Object.assign({prefixCls:He},qe))))};Kt._InternalPanelDoNotUseOrYouWillBeFired=xn;var Ut=Kt},91857:function(Cn,Yt,Ee){"use strict";var Le=Ee(59301),me=Ee(38819),Ie=Ee(92310),Te=Ee.n(Ie),be=Ee(31561),Pe=Ee(70425),he=Ee(18929),Se=Ee(2738),xe=Ee(79676),ge=Ee(53487),ce=Ee(92343),ve=Ee(36355),de=Ee(20834),ue=Ee(40875),z=Ee(88088),ee=Ee(47211);const oe=null,ie=we=>{const{menu:Ce,arrow:ke,prefixCls:Ne,children:je,trigger:Ve,disabled:Qe,dropdownRender:Ge,getPopupContainer:mt,overlayClassName:ct,rootClassName:Ct,open:it,onOpenChange:St,visible:ut,onVisibleChange:Ft,mouseEnterDelay:ht=.15,mouseLeaveDelay:rt=.1,autoAdjustOverflow:dt=!0,placement:yt="",overlay:_t,transitionName:vt}=we,{getPopupContainer:Bt,getPrefixCls:jt,direction:un}=Le.useContext(ve.E_),Kt=Le.useMemo(()=>{const lt=jt();return vt!==void 0?vt:yt.includes("top")?`${lt}-slide-down`:`${lt}-slide-up`},[jt,yt,vt]),xn=Le.useMemo(()=>yt?yt.includes("Center")?yt.slice(0,yt.indexOf("Center")):yt:un==="rtl"?"bottomRight":"bottomLeft",[yt,un]),Ut=jt("dropdown",Ne),[Wt,$t]=(0,ee.Z)(Ut),[,ft]=(0,z.Z)(),We=Le.Children.only(je),Be=(0,ce.Tm)(We,{className:Te()(`${Ut}-trigger`,{[`${Ut}-rtl`]:un==="rtl"},We.props.className),disabled:Qe}),qe=Qe?[]:Ve;let et;qe&&qe.includes("contextMenu")&&(et=!0);const[He,Xe]=(0,he.Z)(!1,{value:it!=null?it:ut}),Re=(0,Pe.useEvent)(lt=>{St==null||St(lt),Ft==null||Ft(lt),Xe(lt)}),Ae=Te()(ct,Ct,$t,{[`${Ut}-rtl`]:un==="rtl"}),Ue=(0,xe.Z)({arrowPointAtCenter:typeof ke=="object"&&ke.pointAtCenter,autoAdjustOverflow:dt,offset:ft.marginXXS,arrowWidth:ke?ft.sizePopupArrow:0,borderRadius:ft.borderRadius}),Ke=Le.useCallback(()=>{Xe(!1)},[]),Ze=()=>{let lt;return Ce!=null&&Ce.items?lt=Le.createElement(de.default,Object.assign({},Ce)):typeof _t=="function"?lt=_t():lt=_t,Ge&&(lt=Ge(lt)),lt=Le.Children.only(typeof lt=="string"?Le.createElement("span",null,lt):lt),Le.createElement(ue.J,{prefixCls:`${Ut}-menu`,expandIcon:Le.createElement("span",{className:`${Ut}-menu-submenu-arrow`},Le.createElement(me.Z,{className:`${Ut}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Ke,validator:xt=>{let{mode:tn}=xt}},lt)};return Wt(Le.createElement(be.Z,Object.assign({alignPoint:et},(0,Se.Z)(we,["rootClassName"]),{mouseEnterDelay:ht,mouseLeaveDelay:rt,visible:He,builtinPlacements:Ue,arrow:!!ke,overlayClassName:Ae,prefixCls:Ut,getPopupContainer:mt||Bt,transitionName:Kt,trigger:qe,overlay:Ze,placement:xn,onVisibleChange:Re}),Be))};function se(we){return Object.assign(Object.assign({},we),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const le=(0,ge.Z)(ie,"dropdown",we=>we,se),ye=we=>Le.createElement(le,Object.assign({},we),Le.createElement("span",null));ie._InternalPanelDoNotUseOrYouWillBeFired=ye,Yt.Z=ie},38854:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return z}});var Le=Ee(91857),me=Ee(92310),Ie=Ee.n(me),Te=Ee(59301),be=Ee(18785),Pe=Ee(3113),he=Ee(36355),Se=Ee(81327),xe=Ee(33234),ge=Ee(47211),ce=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 le=0,se=Object.getOwnPropertySymbols(ee);le<se.length;le++)oe.indexOf(se[le])<0&&Object.prototype.propertyIsEnumerable.call(ee,se[le])&&(ie[se[le]]=ee[se[le]]);return ie};const ve=ee=>{const{getPopupContainer:oe,getPrefixCls:ie,direction:se}=Te.useContext(he.E_),{prefixCls:le,type:ye="default",danger:we,disabled:Ce,loading:ke,onClick:Ne,htmlType:je,children:Ve,className:Qe,menu:Ge,arrow:mt,autoFocus:ct,overlay:Ct,trigger:it,align:St,open:ut,onOpenChange:Ft,placement:ht,getPopupContainer:rt,href:dt,icon:yt=Te.createElement(be.Z,null),title:_t,buttonsRender:vt=Ze=>Ze,mouseEnterDelay:Bt,mouseLeaveDelay:jt,overlayClassName:un,overlayStyle:Kt,destroyPopupOnHide:xn,dropdownRender:Ut}=ee,Wt=ce(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"]),$t=ie("dropdown",le),ft=`${$t}-button`,[We,Be]=(0,ge.Z)($t),qe={menu:Ge,arrow:mt,autoFocus:ct,align:St,disabled:Ce,trigger:Ce?[]:it,onOpenChange:Ft,getPopupContainer:rt||oe,mouseEnterDelay:Bt,mouseLeaveDelay:jt,overlayClassName:un,overlayStyle:Kt,destroyPopupOnHide:xn,dropdownRender:Ut},{compactSize:et,compactItemClassnames:He}=(0,xe.ri)($t,se),Xe=Ie()(ft,He,Qe,Be);"overlay"in ee&&(qe.overlay=Ct),"open"in ee&&(qe.open=ut),"placement"in ee?qe.placement=ht:qe.placement=se==="rtl"?"bottomLeft":"bottomRight";const Re=Te.createElement(Pe.ZP,{type:ye,danger:we,disabled:Ce,loading:ke,onClick:Ne,htmlType:je,href:dt,title:_t},Ve),Ae=Te.createElement(Pe.ZP,{type:ye,danger:we,icon:yt}),[Ue,Ke]=vt([Re,Ae]);return We(Te.createElement(Se.Z.Compact,Object.assign({className:Xe,size:et,block:!0},Wt),Ue,Te.createElement(Le.Z,Object.assign({},qe),Ke)))};ve.__ANT_BUTTON=!0;var de=ve;const ue=Le.Z;ue.Button=de;var z=ue},47211:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return ce}});var Le=Ee(17313),me=Ee(13826),Ie=Ee(92899),Te=Ee(29878),be=Ee(19447),Pe=Ee(83116),he=Ee(37613),xe=ve=>{const{componentCls:de,menuCls:ue,colorError:z,colorTextLightSolid:ee}=ve,oe=`${ue}-item`;return{[`${de}, ${de}-menu-submenu`]:{[`${ue} ${oe}`]:{[`&${oe}-danger:not(${oe}-disabled)`]:{color:z,"&:hover":{color:ee,backgroundColor:z}}}}}};const ge=ve=>{const{componentCls:de,menuCls:ue,zIndexPopup:z,dropdownArrowDistance:ee,sizePopupArrow:oe,antCls:ie,iconCls:se,motionDurationMid:le,dropdownPaddingVertical:ye,fontSize:we,dropdownEdgeChildPadding:Ce,colorTextDisabled:ke,fontSizeIcon:Ne,controlPaddingHorizontal:je,colorBgElevated:Ve}=ve;return[{[de]:Object.assign(Object.assign({},(0,Le.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:Ne}},[`${de}-wrap`]:{position:"relative",[`${ie}-btn > ${se}-down`]:{fontSize:Ne},[`${se}-down::before`]:{transition:`transform ${le}`}},[`${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,be.ZP)(ve,{colorBg:Ve,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${de} ${ue}`]:{position:"relative",margin:0},[`${ue}-submenu-popup`]:{position:"absolute",zIndex:z,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${de}, ${de}-menu-submenu`]:{[ue]:Object.assign(Object.assign({padding:Ce,listStyleType:"none",backgroundColor:Ve,backgroundClip:"padding-box",borderRadius:ve.borderRadiusLG,outline:"none",boxShadow:ve.boxShadowSecondary},(0,Le.Qy)(ve)),{[`${ue}-item-group-title`]:{padding:`${ye}px ${je}px`,color:ve.colorTextDescription,transition:`all ${le}`},[`${ue}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${ue}-item-icon`]:{minWidth:we,marginInlineEnd:ve.marginXS,fontSize:ve.fontSizeSM},[`${ue}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${le}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${ue}-item, ${ue}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${ye}px ${je}px`,color:ve.colorText,fontWeight:"normal",fontSize:we,lineHeight:ve.lineHeight,cursor:"pointer",transition:`all ${le}`,borderRadius:ve.borderRadiusSM,"&:hover, &-active":{backgroundColor:ve.controlItemBgHover}},(0,Le.Qy)(ve)),{"&-selected":{color:ve.colorPrimary,backgroundColor:ve.controlItemBgActive,"&:hover, &-active":{backgroundColor:ve.controlItemBgActiveHover}},"&-disabled":{color:ke,cursor:"not-allowed","&:hover":{color:ke,backgroundColor:Ve,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:Ne,fontStyle:"normal"}}}),[`${ue}-item-group-list`]:{margin:`0 ${ve.marginXS}px`,padding:0,listStyle:"none"},[`${ue}-submenu-title`]:{paddingInlineEnd:je+ve.fontSizeSM},[`${ue}-submenu-vertical`]:{position:"relative"},[`${ue}-submenu${ue}-submenu-disabled ${de}-menu-submenu-title`]:{[`&, ${de}-menu-submenu-arrow-icon`]:{color:ke,backgroundColor:Ve,cursor:"not-allowed"}},[`${ue}-submenu-selected ${de}-menu-submenu-title`]:{color:ve.colorPrimary}})}},[(0,me.oN)(ve,"slide-up"),(0,me.oN)(ve,"slide-down"),(0,Ie.Fm)(ve,"move-up"),(0,Ie.Fm)(ve,"move-down"),(0,Te._y)(ve,"zoom-big")]]};var ce=(0,Pe.Z)("Dropdown",(ve,de)=>{let{rootPrefixCls:ue}=de;const{marginXXS:z,sizePopupArrow:ee,controlHeight:oe,fontSize:ie,lineHeight:se,paddingXXS:le,componentCls:ye,borderRadiusLG:we}=ve,Ce=(oe-ie*se)/2,{dropdownArrowOffset:ke}=(0,be.fS)({contentRadius:we}),Ne=(0,he.TS)(ve,{menuCls:`${ye}-menu`,rootPrefixCls:ue,dropdownArrowDistance:ee/2+z,dropdownArrowOffset:ke,dropdownPaddingVertical:Ce,dropdownEdgeChildPadding:le});return[ge(Ne),xe(Ne)]},ve=>({zIndexPopup:ve.zIndexPopupBase+50}))},64165:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return le}});var Le=Ee(92310),me=Ee.n(Le),Ie=Ee(59301),Te=Ee(36355),be=Ee(9763),Pe=Ee(64993),he=Ee(88088),xe=()=>{const[,ye]=(0,he.Z)(),Ce=new Pe.C(ye.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return Ie.createElement("svg",{style:Ce,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},Ie.createElement("g",{fill:"none",fillRule:"evenodd"},Ie.createElement("g",{transform:"translate(24 31.67)"},Ie.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),Ie.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"}),Ie.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)"}),Ie.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"}),Ie.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"})),Ie.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"}),Ie.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},Ie.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),Ie.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},ce=()=>{const[,ye]=(0,he.Z)(),{colorFill:we,colorFillTertiary:Ce,colorFillQuaternary:ke,colorBgContainer:Ne}=ye,{borderColor:je,shadowColor:Ve,contentColor:Qe}=(0,Ie.useMemo)(()=>({borderColor:new Pe.C(we).onBackground(Ne).toHexShortString(),shadowColor:new Pe.C(Ce).onBackground(Ne).toHexShortString(),contentColor:new Pe.C(ke).onBackground(Ne).toHexShortString()}),[we,Ce,ke,Ne]);return Ie.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},Ie.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},Ie.createElement("ellipse",{fill:Ve,cx:"32",cy:"33",rx:"32",ry:"7"}),Ie.createElement("g",{fillRule:"nonzero",stroke:je},Ie.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"}),Ie.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:Qe}))))},ve=Ee(83116),de=Ee(37613);const ue=ye=>{const{componentCls:we,margin:Ce,marginXS:ke,marginXL:Ne,fontSize:je,lineHeight:Ve}=ye;return{[we]:{marginInline:ke,fontSize:je,lineHeight:Ve,textAlign:"center",[`${we}-image`]:{height:ye.emptyImgHeight,marginBottom:ke,opacity:ye.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${we}-description`]:{color:ye.colorText},[`${we}-footer`]:{marginTop:Ce},"&-normal":{marginBlock:Ne,color:ye.colorTextDisabled,[`${we}-description`]:{color:ye.colorTextDisabled},[`${we}-image`]:{height:ye.emptyImgHeightMD}},"&-small":{marginBlock:ke,color:ye.colorTextDisabled,[`${we}-image`]:{height:ye.emptyImgHeightSM}}}}};var z=(0,ve.Z)("Empty",ye=>{const{componentCls:we,controlHeightLG:Ce}=ye,ke=(0,de.TS)(ye,{emptyImgCls:`${we}-img`,emptyImgHeight:Ce*2.5,emptyImgHeightMD:Ce,emptyImgHeightSM:Ce*.875});return[ue(ke)]}),ee=function(ye,we){var Ce={};for(var ke in ye)Object.prototype.hasOwnProperty.call(ye,ke)&&we.indexOf(ke)<0&&(Ce[ke]=ye[ke]);if(ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ne=0,ke=Object.getOwnPropertySymbols(ye);Ne<ke.length;Ne++)we.indexOf(ke[Ne])<0&&Object.prototype.propertyIsEnumerable.call(ye,ke[Ne])&&(Ce[ke[Ne]]=ye[ke[Ne]]);return Ce};const oe=Ie.createElement(xe,null),ie=Ie.createElement(ce,null),se=ye=>{var{className:we,rootClassName:Ce,prefixCls:ke,image:Ne=oe,description:je,children:Ve,imageStyle:Qe,style:Ge}=ye,mt=ee(ye,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:ct,direction:Ct,empty:it}=Ie.useContext(Te.E_),St=ct("empty",ke),[ut,Ft]=z(St),[ht]=(0,be.Z)("Empty"),rt=typeof je!="undefined"?je:ht==null?void 0:ht.description,dt=typeof rt=="string"?rt:"empty";let yt=null;return typeof Ne=="string"?yt=Ie.createElement("img",{alt:dt,src:Ne}):yt=Ne,ut(Ie.createElement("div",Object.assign({className:me()(Ft,St,it==null?void 0:it.className,{[`${St}-normal`]:Ne===ie,[`${St}-rtl`]:Ct==="rtl"},we,Ce),style:Object.assign(Object.assign({},it==null?void 0:it.style),Ge)},mt),Ie.createElement("div",{className:`${St}-image`,style:Qe},yt),rt&&Ie.createElement("div",{className:`${St}-description`},rt),Ve&&Ie.createElement("div",{className:`${St}-footer`},Ve)))};se.PRESENTED_IMAGE_DEFAULT=oe,se.PRESENTED_IMAGE_SIMPLE=ie;var le=se},78241:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{default:function(){return nt}});var Le=Ee(80702),me=Ee(92310),Ie=Ee.n(me),Te=Ee(77900),be=Ee(59301),Pe=Ee(62892),he=Ee(32441);function Se(Je){const[wt,Nt]=be.useState(Je);return be.useEffect(()=>{const kt=setTimeout(()=>{Nt(Je)},Je.length?0:10);return()=>{clearTimeout(kt)}},[Je]),wt}var xe=Ee(17313),ge=Ee(29878),ce=Ee(8378),ve=Ee(37613),de=Ee(83116),z=Je=>{const{componentCls:wt}=Je,Nt=`${wt}-show-help`,kt=`${wt}-show-help-item`;return{[Nt]:{transition:`opacity ${Je.motionDurationSlow} ${Je.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[kt]:{overflow:"hidden",transition:`height ${Je.motionDurationSlow} ${Je.motionEaseInOut},
|
|
|
opacity ${Je.motionDurationSlow} ${Je.motionEaseInOut},
|
|
|
transform ${Je.motionDurationSlow} ${Je.motionEaseInOut} !important`,[`&${kt}-appear, &${kt}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${kt}-leave-active`]:{transform:"translateY(-5px)"}}}}};const ee=Je=>({legend:{display:"block",width:"100%",marginBottom:Je.marginLG,padding:0,color:Je.colorTextDescription,fontSize:Je.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${Je.lineWidth}px ${Je.lineType} ${Je.colorBorder}`},label:{fontSize:Je.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 ${Je.controlOutlineWidth}px ${Je.controlOutline}`},output:{display:"block",paddingTop:15,color:Je.colorText,fontSize:Je.fontSize,lineHeight:Je.lineHeight}}),oe=(Je,wt)=>{const{formItemCls:Nt}=Je;return{[Nt]:{[`${Nt}-label > label`]:{height:wt},[`${Nt}-control-input`]:{minHeight:wt}}}},ie=Je=>{const{componentCls:wt}=Je;return{[Je.componentCls]:Object.assign(Object.assign(Object.assign({},(0,xe.Wf)(Je)),ee(Je)),{[`${wt}-text`]:{display:"inline-block",paddingInlineEnd:Je.paddingSM},"&-small":Object.assign({},oe(Je,Je.controlHeightSM)),"&-large":Object.assign({},oe(Je,Je.controlHeightLG))})}},se=Je=>{const{formItemCls:wt,iconCls:Nt,componentCls:kt,rootPrefixCls:Et,labelRequiredMarkColor:cn,labelColor:bn,labelFontSize:dn,labelHeight:rn,labelColonMarginInlineStart:At,labelColonMarginInlineEnd:an,itemMarginBottom:En}=Je;return{[wt]:Object.assign(Object.assign({},(0,xe.Wf)(Je)),{marginBottom:En,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${Et}-row`]:{display:"none"},"&-has-warning":{[`${wt}-split`]:{color:Je.colorError}},"&-has-error":{[`${wt}-split`]:{color:Je.colorWarning}},[`${wt}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${Je.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:rn,color:bn,fontSize:dn,[`> ${Nt}`]:{fontSize:Je.fontSize,verticalAlign:"top"},[`&${wt}-required:not(${wt}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:Je.marginXXS,color:cn,fontSize:Je.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${kt}-hide-required-mark &`]:{display:"none"}},[`${wt}-optional`]:{display:"inline-block",marginInlineStart:Je.marginXXS,color:Je.colorTextDescription,[`${kt}-hide-required-mark &`]:{display:"none"}},[`${wt}-tooltip`]:{color:Je.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Je.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:At,marginInlineEnd:an},[`&${wt}-no-colon::after`]:{content:'"\\a0"'}}},[`${wt}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${Et}-col-'"]):not([class*="' ${Et}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Je.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[wt]:{"&-explain, &-extra":{clear:"both",color:Je.colorTextDescription,fontSize:Je.fontSize,lineHeight:Je.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Je.controlHeightSM,transition:`color ${Je.motionDurationMid} ${Je.motionEaseOut}`},"&-explain":{"&-error":{color:Je.colorError},"&-warning":{color:Je.colorWarning}}},[`&-with-help ${wt}-explain`]:{height:"auto",opacity:1},[`${wt}-feedback-icon`]:{fontSize:Je.fontSize,textAlign:"center",visibility:"visible",animationName:ge.kr,animationDuration:Je.motionDurationMid,animationTimingFunction:Je.motionEaseOutBack,pointerEvents:"none","&-success":{color:Je.colorSuccess},"&-error":{color:Je.colorError},"&-warning":{color:Je.colorWarning},"&-validating":{color:Je.colorPrimary}}})}},le=Je=>{const{componentCls:wt,formItemCls:Nt}=Je;return{[`${wt}-horizontal`]:{[`${Nt}-label`]:{flexGrow:0},[`${Nt}-control`]:{flex:"1 1 0",minWidth:0},[`${Nt}-label[class$='-24'], ${Nt}-label[class*='-24 ']`]:{[`& + ${Nt}-control`]:{minWidth:"unset"}}}}},ye=Je=>{const{componentCls:wt,formItemCls:Nt}=Je;return{[`${wt}-inline`]:{display:"flex",flexWrap:"wrap",[Nt]:{flex:"none",marginInlineEnd:Je.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${Nt}-label,
|
|
|
> ${Nt}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${Nt}-label`]:{flex:"none"},[`${wt}-text`]:{display:"inline-block"},[`${Nt}-has-feedback`]:{display:"inline-block"}}}}},we=Je=>({padding:Je.verticalLabelPadding,margin:Je.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Ce=Je=>{const{componentCls:wt,formItemCls:Nt,rootPrefixCls:kt}=Je;return{[`${Nt} ${Nt}-label`]:we(Je),[wt]:{[Nt]:{flexWrap:"wrap",[`${Nt}-label, ${Nt}-control`]:{[`&:not([class*=" ${kt}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},ke=Je=>{const{componentCls:wt,formItemCls:Nt,rootPrefixCls:kt}=Je;return{[`${wt}-vertical`]:{[Nt]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${wt}-item-control`]:{width:"100%"}}},[`${wt}-vertical ${Nt}-label,
|
|
|
.${kt}-col-24${Nt}-label,
|
|
|
.${kt}-col-xl-24${Nt}-label`]:we(Je),[`@media (max-width: ${Je.screenXSMax}px)`]:[Ce(Je),{[wt]:{[`.${kt}-col-xs-24${Nt}-label`]:we(Je)}}],[`@media (max-width: ${Je.screenSMMax}px)`]:{[wt]:{[`.${kt}-col-sm-24${Nt}-label`]:we(Je)}},[`@media (max-width: ${Je.screenMDMax}px)`]:{[wt]:{[`.${kt}-col-md-24${Nt}-label`]:we(Je)}},[`@media (max-width: ${Je.screenLGMax}px)`]:{[wt]:{[`.${kt}-col-lg-24${Nt}-label`]:we(Je)}}}},Ne=(Je,wt)=>(0,ve.TS)(Je,{formItemCls:`${Je.componentCls}-item`,rootPrefixCls:wt});var je=(0,de.Z)("Form",(Je,wt)=>{let{rootPrefixCls:Nt}=wt;const kt=Ne(Je,Nt);return[ie(kt),se(kt),z(kt),le(kt),ye(kt),ke(kt),(0,ce.Z)(kt),ge.kr]},Je=>({labelRequiredMarkColor:Je.colorError,labelColor:Je.colorTextHeading,labelFontSize:Je.fontSize,labelHeight:Je.controlHeight,labelColonMarginInlineStart:Je.marginXXS/2,labelColonMarginInlineEnd:Je.marginXS,itemMarginBottom:Je.marginLG,verticalLabelPadding:`0 0 ${Je.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const Ve=[];function Qe(Je,wt,Nt){let kt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Je=="string"?Je:`${wt}-${kt}`,error:Je,errorStatus:Nt}}var mt=Je=>{let{help:wt,helpStatus:Nt,errors:kt=Ve,warnings:Et=Ve,className:cn,fieldId:bn,onVisibleChanged:dn}=Je;const{prefixCls:rn}=be.useContext(he.Rk),At=`${rn}-item-explain`,[,an]=je(rn),En=(0,be.useMemo)(()=>(0,Pe.Z)(rn),[rn]),Dn=Se(kt),qt=Se(Et),on=be.useMemo(()=>wt!=null?[Qe(wt,"help",Nt)]:[].concat((0,Le.Z)(Dn.map((On,qn)=>Qe(On,"error","error",qn))),(0,Le.Z)(qt.map((On,qn)=>Qe(On,"warning","warning",qn)))),[wt,Nt,Dn,qt]),Nn={};return bn&&(Nn.id=`${bn}_help`),be.createElement(Te.default,{motionDeadline:En.motionDeadline,motionName:`${rn}-show-help`,visible:!!on.length,onVisibleChanged:dn},On=>{const{className:qn,style:Hn}=On;return be.createElement("div",Object.assign({},Nn,{className:Ie()(At,qn,cn,an),style:Hn,role:"alert"}),be.createElement(Te.CSSMotionList,Object.assign({keys:on},(0,Pe.Z)(rn),{motionName:`${rn}-show-help-item`,component:!1}),ei=>{const{key:Fn,error:hi,errorStatus:Ii,className:Ri,style:Pn}=ei;return be.createElement("div",{key:Fn,className:Ie()(Ri,{[`${At}-${Ii}`]:Ii}),style:Pn},hi)}))})},ct=Ee(95013),Ct=Ee(36355),it=Ee(1684),St=Ee(52946),ut=Ee(19716),Ft=Ee(16722);const ht=["parentNode"],rt="form_item";function dt(Je){return Je===void 0||Je===!1?[]:Array.isArray(Je)?Je:[Je]}function yt(Je,wt){if(!Je.length)return;const Nt=Je.join("_");return wt?`${wt}_${Nt}`:ht.includes(Nt)?`${rt}_${Nt}`:Nt}function _t(Je,wt,Nt,kt,Et,cn){let bn=kt;return cn!==void 0?bn=cn:Nt.validating?bn="validating":Je.length?bn="error":wt.length?bn="warning":(Nt.touched||Et&&Nt.validated)&&(bn="success"),bn}function vt(Je){return dt(Je).join("_")}function Bt(Je){const[wt]=(0,ct.useForm)(),Nt=be.useRef({}),kt=be.useMemo(()=>Je!=null?Je:Object.assign(Object.assign({},wt),{__INTERNAL__:{itemRef:Et=>cn=>{const bn=vt(Et);cn?Nt.current[bn]=cn:delete Nt.current[bn]}},scrollToField:function(Et){let cn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const bn=dt(Et),dn=yt(bn,kt.__INTERNAL__.name),rn=dn?document.getElementById(dn):null;rn&&(0,Ft.Z)(rn,Object.assign({scrollMode:"if-needed",block:"nearest"},cn))},getFieldInstance:Et=>{const cn=vt(Et);return Nt.current[cn]}}),[Je,wt]);return[kt]}var jt=Ee(28726),un=function(Je,wt){var Nt={};for(var kt in Je)Object.prototype.hasOwnProperty.call(Je,kt)&&wt.indexOf(kt)<0&&(Nt[kt]=Je[kt]);if(Je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Et=0,kt=Object.getOwnPropertySymbols(Je);Et<kt.length;Et++)wt.indexOf(kt[Et])<0&&Object.prototype.propertyIsEnumerable.call(Je,kt[Et])&&(Nt[kt[Et]]=Je[kt[Et]]);return Nt};const Kt=(Je,wt)=>{const Nt=be.useContext(it.Z),{getPrefixCls:kt,direction:Et,form:cn}=be.useContext(Ct.E_),{prefixCls:bn,className:dn,rootClassName:rn,size:At,disabled:an=Nt,form:En,colon:Dn,labelAlign:qt,labelWrap:on,labelCol:Nn,wrapperCol:On,hideRequiredMark:qn,layout:Hn="horizontal",scrollToFirstError:ei,requiredMark:Fn,onFinishFailed:hi,name:Ii,style:Ri,feedbackIcons:Pn}=Je,Vi=un(Je,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Cr=(0,ut.Z)(At),mr=be.useContext(jt.Z),_n=(0,be.useMemo)(()=>Fn!==void 0?Fn:cn&&cn.requiredMark!==void 0?cn.requiredMark:!qn,[qn,Fn,cn]),Jn=Dn!=null?Dn:cn==null?void 0:cn.colon,ui=kt("form",bn),[yi,di]=je(ui),Ei=Ie()(ui,`${ui}-${Hn}`,{[`${ui}-hide-required-mark`]:_n===!1,[`${ui}-rtl`]:Et==="rtl",[`${ui}-${Cr}`]:Cr},di,cn==null?void 0:cn.className,dn,rn),[Qi]=Bt(En),{__INTERNAL__:Fi}=Qi;Fi.name=Ii;const zi=(0,be.useMemo)(()=>({name:Ii,labelAlign:qt,labelCol:Nn,labelWrap:on,wrapperCol:On,vertical:Hn==="vertical",colon:Jn,requiredMark:_n,itemRef:Fi.itemRef,form:Qi,feedbackIcons:Pn}),[Ii,qt,Nn,On,Hn,Jn,_n,Qi,Pn]);be.useImperativeHandle(wt,()=>Qi);const fr=(Br,In)=>{if(Br){let pr={block:"nearest"};typeof Br=="object"&&(pr=Br),Qi.scrollToField(In,pr)}},Bn=Br=>{if(hi==null||hi(Br),Br.errorFields.length){const In=Br.errorFields[0].name;if(ei!==void 0){fr(ei,In);return}cn&&cn.scrollToFirstError!==void 0&&fr(cn.scrollToFirstError,In)}};return yi(be.createElement(it.n,{disabled:an},be.createElement(St.q,{size:Cr},be.createElement(he.RV,Object.assign({},{validateMessages:mr}),be.createElement(he.q3.Provider,{value:zi},be.createElement(ct.default,Object.assign({id:Ii},Vi,{name:Ii,onFinishFailed:Bn,form:Qi,style:Object.assign(Object.assign({},cn==null?void 0:cn.style),Ri),className:Ei})))))))};var Ut=be.forwardRef(Kt),Wt=Ee(41799),$t=Ee(8654),ft=Ee(92343),We=Ee(11592);function Be(Je){if(typeof Je=="function")return Je;const wt=(0,We.Z)(Je);return wt.length<=1?wt[0]:wt}const qe=()=>{const{status:Je,errors:wt=[],warnings:Nt=[]}=(0,be.useContext)(he.aM);return{status:Je,errors:wt,warnings:Nt}};qe.Context=he.aM;var et=qe,He=Ee(16089);function Xe(Je){const[wt,Nt]=be.useState(Je),kt=(0,be.useRef)(null),Et=(0,be.useRef)([]),cn=(0,be.useRef)(!1);be.useEffect(()=>(cn.current=!1,()=>{cn.current=!0,He.Z.cancel(kt.current),kt.current=null}),[]);function bn(dn){cn.current||(kt.current===null&&(Et.current=[],kt.current=(0,He.Z)(()=>{kt.current=null,Nt(rn=>{let At=rn;return Et.current.forEach(an=>{At=an(At)}),At})})),Et.current.push(dn))}return[wt,bn]}function Re(){const{itemRef:Je}=be.useContext(he.q3),wt=be.useRef({});function Nt(kt,Et){const cn=Et&&typeof Et=="object"&&Et.ref,bn=kt.join("_");return(wt.current.name!==bn||wt.current.originRef!==cn)&&(wt.current.name=bn,wt.current.originRef=cn,wt.current.ref=(0,$t.sQ)(Je(kt),cn)),wt.current.ref}return Nt}var Ae=Ee(29194),Ue=Ee(34280),Ke=Ee(2738),Ze=Ee(27382),lt=Ee(37028);const xt=Je=>{const{formItemCls:wt}=Je;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${wt}-control`]:{display:"flex"}}}};var tn=(0,de.b)(["Form","item-item"],(Je,wt)=>{let{rootPrefixCls:Nt}=wt;const kt=Ne(Je,Nt);return[xt(kt)]}),Jt=Je=>{const{prefixCls:wt,status:Nt,wrapperCol:kt,children:Et,errors:cn,warnings:bn,_internalItemRender:dn,extra:rn,help:At,fieldId:an,marginBottom:En,onErrorVisibleChanged:Dn}=Je,qt=`${wt}-item`,on=be.useContext(he.q3),Nn=kt||on.wrapperCol||{},On=Ie()(`${qt}-control`,Nn.className),qn=be.useMemo(()=>Object.assign({},on),[on]);delete qn.labelCol,delete qn.wrapperCol;const Hn=be.createElement("div",{className:`${qt}-control-input`},be.createElement("div",{className:`${qt}-control-input-content`},Et)),ei=be.useMemo(()=>({prefixCls:wt,status:Nt}),[wt,Nt]),Fn=En!==null||cn.length||bn.length?be.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},be.createElement(he.Rk.Provider,{value:ei},be.createElement(mt,{fieldId:an,errors:cn,warnings:bn,help:At,helpStatus:Nt,className:`${qt}-explain-connected`,onVisibleChanged:Dn})),!!En&&be.createElement("div",{style:{width:0,height:En}})):null,hi={};an&&(hi.id=`${an}_extra`);const Ii=rn?be.createElement("div",Object.assign({},hi,{className:`${qt}-extra`}),rn):null,Ri=dn&&dn.mark==="pro_table_render"&&dn.render?dn.render(Je,{input:Hn,errorList:Fn,extra:Ii}):be.createElement(be.Fragment,null,Hn,Fn,Ii);return be.createElement(he.q3.Provider,{value:qn},be.createElement(lt.Z,Object.assign({},Nn,{className:On}),Ri),be.createElement(tn,{prefixCls:wt}))},gn=Ee(61485),Mn=Ee(31724),yn=Ee(9763),kn=Ee(6848),$n=function(Je,wt){var Nt={};for(var kt in Je)Object.prototype.hasOwnProperty.call(Je,kt)&&wt.indexOf(kt)<0&&(Nt[kt]=Je[kt]);if(Je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Et=0,kt=Object.getOwnPropertySymbols(Je);Et<kt.length;Et++)wt.indexOf(kt[Et])<0&&Object.prototype.propertyIsEnumerable.call(Je,kt[Et])&&(Nt[kt[Et]]=Je[kt[Et]]);return Nt};function An(Je){return Je?typeof Je=="object"&&!be.isValidElement(Je)?Je:{title:Je}:null}var ai=Je=>{let{prefixCls:wt,label:Nt,htmlFor:kt,labelCol:Et,labelAlign:cn,colon:bn,required:dn,requiredMark:rn,tooltip:At}=Je;var an;const[En]=(0,yn.Z)("Form"),{vertical:Dn,labelAlign:qt,labelCol:on,labelWrap:Nn,colon:On}=be.useContext(he.q3);if(!Nt)return null;const qn=Et||on||{},Hn=cn||qt,ei=`${wt}-item-label`,Fn=Ie()(ei,Hn==="left"&&`${ei}-left`,qn.className,{[`${ei}-wrap`]:!!Nn});let hi=Nt;const Ii=bn===!0||On!==!1&&bn!==!1;Ii&&!Dn&&typeof Nt=="string"&&Nt.trim()!==""&&(hi=Nt.replace(/[:|:]\s*$/,""));const Pn=An(At);if(Pn){const{icon:_n=be.createElement(gn.Z,null)}=Pn,Jn=$n(Pn,["icon"]),ui=be.createElement(kn.Z,Object.assign({},Jn),be.cloneElement(_n,{className:`${wt}-item-tooltip`,title:""}));hi=be.createElement(be.Fragment,null,hi,ui)}const Vi=rn==="optional",Cr=typeof rn=="function";Cr?hi=rn(hi,{required:!!dn}):Vi&&!dn&&(hi=be.createElement(be.Fragment,null,hi,be.createElement("span",{className:`${wt}-item-optional`,title:""},(En==null?void 0:En.optional)||((an=Mn.Z.Form)===null||an===void 0?void 0:an.optional))));const mr=Ie()({[`${wt}-item-required`]:dn,[`${wt}-item-required-mark-optional`]:Vi||Cr,[`${wt}-item-no-colon`]:!Ii});return be.createElement(lt.Z,Object.assign({},qn,{className:Fn}),be.createElement("label",{htmlFor:kt,className:mr,title:typeof Nt=="string"?Nt:""},hi))},Di=Ee(29679),Pi=Ee(19248),Xi=Ee(96512),or=Ee(58617);const ar={success:Di.Z,warning:Xi.Z,error:Pi.Z,validating:or.Z};function dr(Je){let{children:wt,errors:Nt,warnings:kt,hasFeedback:Et,validateStatus:cn,prefixCls:bn,meta:dn,noStyle:rn}=Je;const At=`${bn}-item`,{feedbackIcons:an}=be.useContext(he.q3),En=_t(Nt,kt,dn,null,!!Et,cn),{isFormItemInput:Dn,status:qt}=be.useContext(he.aM),on=be.useMemo(()=>{var Nn;let On;if(Et){const ei=Et!==!0&&Et.icons||an,Fn=En&&((Nn=ei==null?void 0:ei({status:En,errors:Nt,warnings:kt}))===null||Nn===void 0?void 0:Nn[En]),hi=En&&ar[En];On=Fn!==!1&&hi?be.createElement("span",{className:Ie()(`${At}-feedback-icon`,`${At}-feedback-icon-${En}`)},Fn||be.createElement(hi,null)):null}let qn=!0,Hn=En||"";return rn&&(qn=Dn,Hn=(En!=null?En:qt)||""),{status:Hn,errors:Nt,warnings:kt,hasFeedback:!!Et,feedbackIcon:On,isFormItemInput:qn}},[En,Et,rn,Dn,qt]);return be.createElement(he.aM.Provider,{value:on},wt)}var no=function(Je,wt){var Nt={};for(var kt in Je)Object.prototype.hasOwnProperty.call(Je,kt)&&wt.indexOf(kt)<0&&(Nt[kt]=Je[kt]);if(Je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Et=0,kt=Object.getOwnPropertySymbols(Je);Et<kt.length;Et++)wt.indexOf(kt[Et])<0&&Object.prototype.propertyIsEnumerable.call(Je,kt[Et])&&(Nt[kt[Et]]=Je[kt[Et]]);return Nt};function Ir(Je){const{prefixCls:wt,className:Nt,rootClassName:kt,style:Et,help:cn,errors:bn,warnings:dn,validateStatus:rn,meta:At,hasFeedback:an,hidden:En,children:Dn,fieldId:qt,required:on,isRequired:Nn,onSubItemMetaChange:On}=Je,qn=no(Je,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Hn=`${wt}-item`,{requiredMark:ei}=be.useContext(he.q3),Fn=be.useRef(null),hi=Se(bn),Ii=Se(dn),Ri=cn!=null,Pn=!!(Ri||bn.length||dn.length),Vi=!!Fn.current&&(0,Ae.Z)(Fn.current),[Cr,mr]=be.useState(null);(0,Ue.Z)(()=>{if(Pn&&Fn.current){const di=getComputedStyle(Fn.current);mr(parseInt(di.marginBottom,10))}},[Pn,Vi]);const _n=di=>{di||mr(null)},ui=function(){let di=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Ei=di?hi:At.errors,Qi=di?Ii:At.warnings;return _t(Ei,Qi,At,"",!!an,rn)}(),yi=Ie()(Hn,Nt,kt,{[`${Hn}-with-help`]:Ri||hi.length||Ii.length,[`${Hn}-has-feedback`]:ui&&an,[`${Hn}-has-success`]:ui==="success",[`${Hn}-has-warning`]:ui==="warning",[`${Hn}-has-error`]:ui==="error",[`${Hn}-is-validating`]:ui==="validating",[`${Hn}-hidden`]:En});return be.createElement("div",{className:yi,style:Et,ref:Fn},be.createElement(Ze.Z,Object.assign({className:`${Hn}-row`},(0,Ke.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"])),be.createElement(ai,Object.assign({htmlFor:qt},Je,{requiredMark:ei,required:on!=null?on:Nn,prefixCls:wt})),be.createElement(Jt,Object.assign({},Je,At,{errors:hi,warnings:Ii,prefixCls:wt,status:ui,help:cn,marginBottom:Cr,onErrorVisibleChanged:_n}),be.createElement(he.qI.Provider,{value:On},be.createElement(dr,{prefixCls:wt,meta:At,errors:At.errors,warnings:At.warnings,hasFeedback:an,validateStatus:ui},Dn)))),!!Cr&&be.createElement("div",{className:`${Hn}-margin-offset`,style:{marginBottom:-Cr}}))}const xi="__SPLIT__",wr=null,Mr=be.memo(Je=>{let{children:wt}=Je;return wt},(Je,wt)=>Je.value===wt.value&&Je.update===wt.update&&Je.childProps.length===wt.childProps.length&&Je.childProps.every((Nt,kt)=>Nt===wt.childProps[kt]));function ot(Je){return Je!=null}function Rr(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Nr(Je){const{name:wt,noStyle:Nt,className:kt,dependencies:Et,prefixCls:cn,shouldUpdate:bn,rules:dn,children:rn,required:At,label:an,messageVariables:En,trigger:Dn="onChange",validateTrigger:qt,hidden:on,help:Nn}=Je,{getPrefixCls:On}=be.useContext(Ct.E_),{name:qn}=be.useContext(he.q3),Hn=Be(rn),ei=typeof Hn=="function",Fn=be.useContext(he.qI),{validateTrigger:hi}=be.useContext(ct.FieldContext),Ii=qt!==void 0?qt:hi,Ri=ot(wt),Pn=On("form",cn),[Vi,Cr]=je(Pn),mr=be.useContext(ct.ListContext),_n=be.useRef(),[Jn,ui]=Xe({}),[yi,di]=(0,Wt.Z)(()=>Rr()),Ei=In=>{const pr=mr==null?void 0:mr.getKey(In.name);if(di(In.destroy?Rr():In,!0),Nt&&Nn!==!1&&Fn){let yo=In.name;if(In.destroy)yo=_n.current||yo;else if(pr!==void 0){const[Or,bo]=pr;yo=[Or].concat((0,Le.Z)(bo)),_n.current=yo}Fn(In,yo)}},Qi=(In,pr)=>{ui(yo=>{const Or=Object.assign({},yo),co=[].concat((0,Le.Z)(In.name.slice(0,-1)),(0,Le.Z)(pr)).join(xi);return In.destroy?delete Or[co]:Or[co]=In,Or})},[Fi,zi]=be.useMemo(()=>{const In=(0,Le.Z)(yi.errors),pr=(0,Le.Z)(yi.warnings);return Object.values(Jn).forEach(yo=>{In.push.apply(In,(0,Le.Z)(yo.errors||[])),pr.push.apply(pr,(0,Le.Z)(yo.warnings||[]))}),[In,pr]},[Jn,yi.errors,yi.warnings]),fr=Re();function Bn(In,pr,yo){return Nt&&!on?be.createElement(dr,{prefixCls:Pn,hasFeedback:Je.hasFeedback,validateStatus:Je.validateStatus,meta:yi,errors:Fi,warnings:zi,noStyle:!0},In):be.createElement(Ir,Object.assign({key:"row"},Je,{className:Ie()(kt,Cr),prefixCls:Pn,fieldId:pr,isRequired:yo,errors:Fi,warnings:zi,meta:yi,onSubItemMetaChange:Qi}),In)}if(!Ri&&!ei&&!Et)return Vi(Bn(Hn));let Br={};return typeof an=="string"?Br.label=an:wt&&(Br.label=String(wt)),En&&(Br=Object.assign(Object.assign({},Br),En)),Vi(be.createElement(ct.Field,Object.assign({},Je,{messageVariables:Br,trigger:Dn,validateTrigger:Ii,onMetaChange:Ei}),(In,pr,yo)=>{const Or=dt(wt).length&&pr?pr.name:[],bo=yt(Or,qn),co=At!==void 0?At:!!(dn&&dn.some(lr=>{if(lr&&typeof lr=="object"&&lr.required&&!lr.warningOnly)return!0;if(typeof lr=="function"){const Pr=lr(yo);return Pr&&Pr.required&&!Pr.warningOnly}return!1})),Ki=Object.assign({},In);let Hi=null;if(Array.isArray(Hn)&&Ri)Hi=Hn;else if(!(ei&&(!(bn||Et)||Ri))){if(!(Et&&!ei&&!Ri))if((0,ft.l$)(Hn)){const lr=Object.assign(Object.assign({},Hn.props),Ki);if(lr.id||(lr.id=bo),Nn||Fi.length>0||zi.length>0||Je.extra){const Tt=[];(Nn||Fi.length>0)&&Tt.push(`${bo}_help`),Je.extra&&Tt.push(`${bo}_extra`),lr["aria-describedby"]=Tt.join(" ")}Fi.length>0&&(lr["aria-invalid"]="true"),co&&(lr["aria-required"]="true"),(0,$t.Yr)(Hn)&&(lr.ref=fr(Or,Hn)),new Set([].concat((0,Le.Z)(dt(Dn)),(0,Le.Z)(dt(Ii)))).forEach(Tt=>{lr[Tt]=function(){for(var Ur,zr,ts,ko,ss,_r=arguments.length,ur=new Array(_r),Kr=0;Kr<_r;Kr++)ur[Kr]=arguments[Kr];(ts=Ki[Tt])===null||ts===void 0||(Ur=ts).call.apply(Ur,[Ki].concat(ur)),(ss=(ko=Hn.props)[Tt])===null||ss===void 0||(zr=ss).call.apply(zr,[ko].concat(ur))}});const ci=[lr["aria-required"],lr["aria-invalid"],lr["aria-describedby"]];Hi=be.createElement(Mr,{value:Ki[Je.valuePropName||"value"],update:Hn,childProps:ci},(0,ft.Tm)(Hn,lr))}else ei&&(bn||Et)&&!Ri?Hi=Hn(yo):Hi=Hn}return Bn(Hi,bo,co)}))}const Hr=Nr;Hr.useStatus=et;var uo=Hr,po=function(Je,wt){var Nt={};for(var kt in Je)Object.prototype.hasOwnProperty.call(Je,kt)&&wt.indexOf(kt)<0&&(Nt[kt]=Je[kt]);if(Je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Et=0,kt=Object.getOwnPropertySymbols(Je);Et<kt.length;Et++)wt.indexOf(kt[Et])<0&&Object.prototype.propertyIsEnumerable.call(Je,kt[Et])&&(Nt[kt[Et]]=Je[kt[Et]]);return Nt},Do=Je=>{var{prefixCls:wt,children:Nt}=Je,kt=po(Je,["prefixCls","children"]);const{getPrefixCls:Et}=be.useContext(Ct.E_),cn=Et("form",wt),bn=be.useMemo(()=>({prefixCls:cn,status:"error"}),[cn]);return be.createElement(ct.List,Object.assign({},kt),(dn,rn,At)=>be.createElement(he.Rk.Provider,{value:bn},Nt(dn.map(an=>Object.assign(Object.assign({},an),{fieldKey:an.key})),rn,{errors:At.errors,warnings:At.warnings})))};function Xn(){const{form:Je}=(0,be.useContext)(he.q3);return Je}const $e=Ut;$e.Item=uo,$e.List=Do,$e.ErrorList=mt,$e.useForm=Bt,$e.useFormInstance=Xn,$e.useWatch=ct.useWatch,$e.Provider=he.RV,$e.create=()=>{};var nt=$e},8628:function(Cn,Yt,Ee){"use strict";var Le=Ee(59301),me=Ee(34280),Ie=Ee(56762),Te=Ee(69507);function be(){let Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const he=(0,Le.useRef)({}),Se=(0,Ie.Z)(),xe=(0,Te.ZP)();return(0,me.Z)(()=>{const ge=xe.subscribe(ce=>{he.current=ce,Pe&&Se()});return()=>xe.unsubscribe(ge)},[]),he.current}Yt.Z=be},11611:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return bn}});var Le=Ee(59301),me=Ee(15277),Ie=Ee(92310),Te=Ee.n(Ie),be=Ee(72308),Pe=Ee(77321),he=Ee(49618),Se=Ee(52487),xe=Ee(62853),ge=Ee(74416),ce=Ee(55468),ve=Ee(18929),de=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"],ue=Le.createContext(null),z=0;function ee(dn,rn){var At=Le.useState(function(){return z+=1,String(z)}),an=(0,Se.Z)(At,1),En=an[0],Dn=Le.useContext(ue),qt={data:rn,canPreview:dn};return Le.useEffect(function(){if(Dn)return Dn.register(En,qt)},[]),Le.useEffect(function(){Dn&&Dn.register(En,qt)},[dn,rn]),En}function oe(dn){return new Promise(function(rn){var At=document.createElement("img");At.onerror=function(){return rn(!1)},At.onload=function(){return rn(!0)},At.src=dn})}function ie(dn){var rn=dn.src,At=dn.isCustomPlaceholder,an=dn.fallback,En=(0,Le.useState)(At?"loading":"normal"),Dn=(0,Se.Z)(En,2),qt=Dn[0],on=Dn[1],Nn=(0,Le.useRef)(!1),On=qt==="error";(0,Le.useEffect)(function(){oe(rn).then(function(Fn){Fn||on("error")})},[rn]),(0,Le.useEffect)(function(){At&&!Nn.current?on("loading"):On&&on("normal")},[rn]);var qn=function(){on("normal")},Hn=function(hi){Nn.current=!1,qt==="loading"&&hi!=null&&hi.complete&&(hi.naturalWidth||hi.naturalHeight)&&(Nn.current=!0,qn())},ei=On&&an?{src:an}:{onLoad:qn,src:rn};return[Hn,ei,qt]}var se=Ee(86923),le=Ee(8224),ye=Ee(10228),we=Ee(48736);function Ce(dn,rn,At,an){var En=rn+At,Dn=(At-an)/2;if(At>an){if(rn>0)return(0,he.Z)({},dn,Dn);if(rn<0&&En<an)return(0,he.Z)({},dn,-Dn)}else if(rn<0||En>an)return(0,he.Z)({},dn,rn<0?Dn:-Dn);return{}}function ke(dn,rn,At,an){var En=(0,ce.g1)(),Dn=En.width,qt=En.height,on=null;return dn<=Dn&&rn<=qt?on={x:0,y:0}:(dn>Dn||rn>qt)&&(on=(0,Pe.Z)((0,Pe.Z)({},Ce("x",At,dn,Dn)),Ce("y",an,rn,qt))),on}var Ne=Ee(13697),je=Ee(16089),Ve={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function Qe(dn,rn,At,an){var En=(0,Le.useRef)(null),Dn=(0,Le.useRef)([]),qt=(0,Le.useState)(Ve),on=(0,Se.Z)(qt,2),Nn=on[0],On=on[1],qn=function(hi){On(Ve),an&&!(0,Ne.Z)(Ve,Nn)&&an({transform:Ve,action:hi})},Hn=function(hi,Ii){En.current===null&&(Dn.current=[],En.current=(0,je.Z)(function(){On(function(Ri){var Pn=Ri;return Dn.current.forEach(function(Vi){Pn=(0,Pe.Z)((0,Pe.Z)({},Pn),Vi)}),En.current=null,an==null||an({transform:Pn,action:Ii}),Pn})})),Dn.current.push((0,Pe.Z)((0,Pe.Z)({},Nn),hi))},ei=function(hi,Ii,Ri,Pn){var Vi=dn.current,Cr=Vi.width,mr=Vi.height,_n=Vi.offsetWidth,Jn=Vi.offsetHeight,ui=Vi.offsetLeft,yi=Vi.offsetTop,di=hi,Ei=Nn.scale*hi;Ei>At?(di=At/Nn.scale,Ei=At):Ei<rn&&(di=rn/Nn.scale,Ei=rn);var Qi=Ri!=null?Ri:innerWidth/2,Fi=Pn!=null?Pn:innerHeight/2,zi=di-1,fr=zi*Cr*.5,Bn=zi*mr*.5,Br=zi*(Qi-Nn.x-ui),In=zi*(Fi-Nn.y-yi),pr=Nn.x-(Br-fr),yo=Nn.y-(In-Bn);if(hi<1&&Ei===1){var Or=_n*Ei,bo=Jn*Ei,co=(0,ce.g1)(),Ki=co.width,Hi=co.height;Or<=Ki&&bo<=Hi&&(pr=0,yo=0)}Hn({x:pr,y:yo,scale:Ei},Ii)};return{transform:Nn,resetTransform:qn,updateTransform:Hn,dispatchZoomChange:ei}}var Ge=Ee(43403),mt=Ee(77900),ct=function(rn){var At=rn.visible,an=rn.maskTransitionName,En=rn.getContainer,Dn=rn.prefixCls,qt=rn.rootClassName,on=rn.icons,Nn=rn.countRender,On=rn.showSwitch,qn=rn.showProgress,Hn=rn.current,ei=rn.transform,Fn=rn.count,hi=rn.scale,Ii=rn.minScale,Ri=rn.maxScale,Pn=rn.closeIcon,Vi=rn.onSwitchLeft,Cr=rn.onSwitchRight,mr=rn.onClose,_n=rn.onZoomIn,Jn=rn.onZoomOut,ui=rn.onRotateRight,yi=rn.onRotateLeft,di=rn.onFlipX,Ei=rn.onFlipY,Qi=rn.toolbarRender,Fi=(0,Le.useContext)(ue),zi=on.rotateLeft,fr=on.rotateRight,Bn=on.zoomIn,Br=on.zoomOut,In=on.close,pr=on.left,yo=on.right,Or=on.flipX,bo=on.flipY,co="".concat(Dn,"-operations-operation");Le.useEffect(function(){var Pr=function(Tt){Tt.keyCode===ye.Z.ESC&&mr()};return At&&window.addEventListener("keydown",Pr),function(){window.removeEventListener("keydown",Pr)}},[At]);var Ki=[{icon:bo,onClick:Ei,type:"flipY"},{icon:Or,onClick:di,type:"flipX"},{icon:zi,onClick:yi,type:"rotateLeft"},{icon:fr,onClick:ui,type:"rotateRight"},{icon:Br,onClick:Jn,type:"zoomOut",disabled:hi===Ii},{icon:Bn,onClick:_n,type:"zoomIn",disabled:hi===Ri}],Hi=Ki.map(function(Pr){var ci,Tt=Pr.icon,Ur=Pr.onClick,zr=Pr.type,ts=Pr.disabled;return Le.createElement("div",{className:Te()(co,(ci={},(0,he.Z)(ci,"".concat(Dn,"-operations-operation-").concat(zr),!0),(0,he.Z)(ci,"".concat(Dn,"-operations-operation-disabled"),!!ts),ci)),onClick:Ur,key:zr},Tt)}),lr=Le.createElement("div",{className:"".concat(Dn,"-operations")},Hi);return Le.createElement(mt.default,{visible:At,motionName:an},function(Pr){var ci=Pr.className,Tt=Pr.style;return Le.createElement(Ge.Z,{open:!0,getContainer:En!=null?En:document.body},Le.createElement("div",{className:Te()("".concat(Dn,"-operations-wrapper"),ci,qt),style:Tt},Pn===null?null:Le.createElement("button",{className:"".concat(Dn,"-close"),onClick:mr},Pn||In),On&&Le.createElement(Le.Fragment,null,Le.createElement("div",{className:Te()("".concat(Dn,"-switch-left"),(0,he.Z)({},"".concat(Dn,"-switch-left-disabled"),Hn===0)),onClick:Vi},pr),Le.createElement("div",{className:Te()("".concat(Dn,"-switch-right"),(0,he.Z)({},"".concat(Dn,"-switch-right-disabled"),Hn===Fn-1)),onClick:Cr},yo)),Le.createElement("div",{className:"".concat(Dn,"-footer")},qn&&Le.createElement("div",{className:"".concat(Dn,"-progress")},Nn?Nn(Hn+1,Fn):"".concat(Hn+1," / ").concat(Fn)),Qi?Qi(lr,(0,Pe.Z)({icons:{flipYIcon:Hi[0],flipXIcon:Hi[1],rotateLeftIcon:Hi[2],rotateRightIcon:Hi[3],zoomOutIcon:Hi[4],zoomInIcon:Hi[5]},actions:{onFlipY:Ei,onFlipX:di,onRotateLeft:yi,onRotateRight:ui,onZoomOut:Jn,onZoomIn:_n},transform:ei},Fi?{current:Hn,total:Fn}:{})):lr)))})},Ct=ct,it=1,St=1,ut=["fallback","src","imgRef"],Ft=["prefixCls","src","alt","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"],ht=function(rn){var At=rn.fallback,an=rn.src,En=rn.imgRef,Dn=(0,ge.Z)(rn,ut),qt=ie({src:an,fallback:At}),on=(0,Se.Z)(qt,2),Nn=on[0],On=on[1];return Le.createElement("img",(0,be.Z)({ref:function(Hn){En.current=Hn,Nn(Hn)}},Dn,On))},rt=function(rn){var At=rn.prefixCls,an=rn.src,En=rn.alt,Dn=rn.fallback,qt=rn.movable,on=qt===void 0?!0:qt,Nn=rn.onClose,On=rn.visible,qn=rn.icons,Hn=qn===void 0?{}:qn,ei=rn.rootClassName,Fn=rn.closeIcon,hi=rn.getContainer,Ii=rn.current,Ri=Ii===void 0?0:Ii,Pn=rn.count,Vi=Pn===void 0?1:Pn,Cr=rn.countRender,mr=rn.scaleStep,_n=mr===void 0?.5:mr,Jn=rn.minScale,ui=Jn===void 0?1:Jn,yi=rn.maxScale,di=yi===void 0?50:yi,Ei=rn.transitionName,Qi=Ei===void 0?"zoom":Ei,Fi=rn.maskTransitionName,zi=Fi===void 0?"fade":Fi,fr=rn.imageRender,Bn=rn.imgCommonProps,Br=rn.toolbarRender,In=rn.onTransform,pr=rn.onChange,yo=(0,ge.Z)(rn,Ft),Or=(0,Le.useRef)(),bo=(0,Le.useRef)({deltaX:0,deltaY:0,transformX:0,transformY:0}),co=(0,Le.useState)(!1),Ki=(0,Se.Z)(co,2),Hi=Ki[0],lr=Ki[1],Pr=(0,Le.useContext)(ue),ci=Pr&&Vi>1,Tt=Pr&&Vi>=1,Ur=Qe(Or,ui,di,In),zr=Ur.transform,ts=Ur.resetTransform,ko=Ur.updateTransform,ss=Ur.dispatchZoomChange,_r=(0,Le.useState)(!0),ur=(0,Se.Z)(_r,2),Kr=ur[0],cr=ur[1],qr=zr.rotate,Yo=zr.scale,nr=zr.x,Wi=zr.y,Qn=Te()((0,he.Z)({},"".concat(At,"-moving"),Hi));(0,Le.useEffect)(function(){Kr||cr(!0)},[Kr]);var ir=function(){ts("close")},eo=function(){ss(it+_n,"zoomIn")},Ro=function(){ss(it/(it+_n),"zoomOut")},Bo=function(){ko({rotate:qr+90},"rotateRight")},Xo=function(){ko({rotate:qr-90},"rotateLeft")},as=function(){ko({flipX:!zr.flipX},"flipX")},Ho=function(){ko({flipY:!zr.flipY},"flipY")},ia=function(Po){Po==null||Po.preventDefault(),Po==null||Po.stopPropagation(),Ri>0&&(cr(!1),ts("prev"),pr==null||pr(Ri-1,Ri))},_s=function(Po){Po==null||Po.preventDefault(),Po==null||Po.stopPropagation(),Ri<Vi-1&&(cr(!1),ts("next"),pr==null||pr(Ri+1,Ri))},la=function(){if(On&&Hi){lr(!1);var Po=bo.current,Ao=Po.transformX,Eo=Po.transformY,ua=nr!==Ao&&Wi!==Eo;if(!ua)return;var xr=Or.current.offsetWidth*Yo,lo=Or.current.offsetHeight*Yo,$r=Or.current.getBoundingClientRect(),Mi=$r.left,Es=$r.top,Ls=qr%180!==0,xa=ke(Ls?lo:xr,Ls?xr:lo,Mi,Es);xa&&ko((0,Pe.Z)({},xa),"dragRebound")}},Tn=function(Po){!on||Po.button!==0||(Po.preventDefault(),Po.stopPropagation(),bo.current={deltaX:Po.pageX-zr.x,deltaY:Po.pageY-zr.y,transformX:zr.x,transformY:zr.y},lr(!0))},Is=function(Po){On&&Hi&&ko({x:Po.pageX-bo.current.deltaX,y:Po.pageY-bo.current.deltaY},"move")},Pu=function(Po){if(!(!On||Po.deltaY==0)){var Ao=Math.abs(Po.deltaY/100),Eo=Math.min(Ao,St),ua=it+Eo*_n;Po.deltaY>0&&(ua=it/ua),ss(ua,"wheel",Po.clientX,Po.clientY)}},Ua=function(Po){!On||!ci||(Po.keyCode===ye.Z.LEFT?ia():Po.keyCode===ye.Z.RIGHT&&_s())},Sa=function(Po){On&&(Yo!==1?ko({x:0,y:0,scale:1},"doubleClick"):ss(it+_n,"doubleClick",Po.clientX,Po.clientY))};(0,Le.useEffect)(function(){var Ws,Po,Ao,Eo;if(on){Ao=(0,le.Z)(window,"mouseup",la,!1),Eo=(0,le.Z)(window,"mousemove",Is,!1);try{window.top!==window.self&&(Ws=(0,le.Z)(window.top,"mouseup",la,!1),Po=(0,le.Z)(window.top,"mousemove",Is,!1))}catch(ua){(0,we.Kp)(!1,"[rc-image] ".concat(ua))}}return function(){var ua,xr,lo,$r;(ua=Ao)===null||ua===void 0||ua.remove(),(xr=Eo)===null||xr===void 0||xr.remove(),(lo=Ws)===null||lo===void 0||lo.remove(),($r=Po)===null||$r===void 0||$r.remove()}},[On,Hi,nr,Wi,qr,on]),(0,Le.useEffect)(function(){var Ws=(0,le.Z)(window,"keydown",Ua,!1);return function(){Ws.remove()}},[On,ci,Ri]);var us=Le.createElement(ht,(0,be.Z)({},Bn,{width:rn.width,height:rn.height,imgRef:Or,className:"".concat(At,"-img"),alt:En,style:{transform:"translate3d(".concat(zr.x,"px, ").concat(zr.y,"px, 0) scale3d(").concat(zr.flipX?"-":"").concat(Yo,", ").concat(zr.flipY?"-":"").concat(Yo,", 1) rotate(").concat(qr,"deg)"),transitionDuration:!Kr&&"0s"},fallback:Dn,src:an,onWheel:Pu,onMouseDown:Tn,onDoubleClick:Sa}));return Le.createElement(Le.Fragment,null,Le.createElement(se.Z,(0,be.Z)({transitionName:Qi,maskTransitionName:zi,closable:!1,keyboard:!0,prefixCls:At,onClose:Nn,visible:On,wrapClassName:Qn,rootClassName:ei,getContainer:hi},yo,{afterClose:ir}),Le.createElement("div",{className:"".concat(At,"-img-wrapper")},fr?fr(us,(0,Pe.Z)({transform:zr},Pr?{current:Ri}:{})):us)),Le.createElement(Ct,{visible:On,transform:zr,maskTransitionName:zi,closeIcon:Fn,getContainer:hi,prefixCls:At,rootClassName:ei,icons:Hn,countRender:Cr,showSwitch:ci,showProgress:Tt,current:Ri,count:Vi,scale:Yo,minScale:ui,maxScale:di,toolbarRender:Br,onSwitchLeft:ia,onSwitchRight:_s,onZoomIn:eo,onZoomOut:Ro,onRotateRight:Bo,onRotateLeft:Xo,onFlipX:as,onFlipY:Ho,onClose:Nn}))},dt=rt,yt=Ee(80702);function _t(dn){var rn=Le.useState({}),At=(0,Se.Z)(rn,2),an=At[0],En=At[1],Dn=Le.useCallback(function(on,Nn){return En(function(On){return(0,Pe.Z)((0,Pe.Z)({},On),{},(0,he.Z)({},on,Nn))}),function(){En(function(On){var qn=(0,Pe.Z)({},On);return delete qn[on],qn})}},[]),qt=Le.useMemo(function(){return dn?dn.map(function(on){if(typeof on=="string")return{data:{src:on}};var Nn={};return Object.keys(on).forEach(function(On){["src"].concat((0,yt.Z)(de)).includes(On)&&(Nn[On]=on[On])}),{data:Nn}}):Object.keys(an).reduce(function(on,Nn){var On=an[Nn],qn=On.canPreview,Hn=On.data;return qn&&on.push({data:Hn,id:Nn}),on},[])},[dn,an]);return[qt,Dn]}var vt=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],Bt=["src"],jt=function(rn){var At,an=rn.previewPrefixCls,En=an===void 0?"rc-image-preview":an,Dn=rn.children,qt=rn.icons,on=qt===void 0?{}:qt,Nn=rn.items,On=rn.preview,qn=rn.fallback,Hn=(0,xe.Z)(On)==="object"?On:{},ei=Hn.visible,Fn=Hn.onVisibleChange,hi=Hn.getContainer,Ii=Hn.current,Ri=Hn.movable,Pn=Hn.minScale,Vi=Hn.maxScale,Cr=Hn.countRender,mr=Hn.closeIcon,_n=Hn.onChange,Jn=Hn.onTransform,ui=Hn.toolbarRender,yi=Hn.imageRender,di=(0,ge.Z)(Hn,vt),Ei=_t(Nn),Qi=(0,Se.Z)(Ei,2),Fi=Qi[0],zi=Qi[1],fr=(0,ve.Z)(0,{value:Ii}),Bn=(0,Se.Z)(fr,2),Br=Bn[0],In=Bn[1],pr=(0,Le.useState)(!1),yo=(0,Se.Z)(pr,2),Or=yo[0],bo=yo[1],co=((At=Fi[Br])===null||At===void 0?void 0:At.data)||{},Ki=co.src,Hi=(0,ge.Z)(co,Bt),lr=(0,ve.Z)(!!ei,{value:ei,onChange:function(qr,Yo){Fn==null||Fn(qr,Yo,Br)}}),Pr=(0,Se.Z)(lr,2),ci=Pr[0],Tt=Pr[1],Ur=(0,Le.useState)(null),zr=(0,Se.Z)(Ur,2),ts=zr[0],ko=zr[1],ss=Le.useCallback(function(cr,qr,Yo){var nr=Fi.findIndex(function(Wi){return Wi.id===cr});Tt(!0),ko({x:qr,y:Yo}),In(nr<0?0:nr),bo(!0)},[Fi]);Le.useEffect(function(){ci?Or||In(0):bo(!1)},[ci]);var _r=function(qr,Yo){In(qr),_n==null||_n(qr,Yo)},ur=function(){Tt(!1),ko(null)},Kr=Le.useMemo(function(){return{register:zi,onPreview:ss}},[zi,ss]);return Le.createElement(ue.Provider,{value:Kr},Dn,Le.createElement(dt,(0,be.Z)({"aria-hidden":!ci,movable:Ri,visible:ci,prefixCls:En,closeIcon:mr,onClose:ur,mousePosition:ts,imgCommonProps:Hi,src:Ki,fallback:qn,icons:on,minScale:Pn,maxScale:Vi,getContainer:hi,current:Br,count:Fi.length,countRender:Cr,onTransform:Jn,toolbarRender:ui,imageRender:yi,onChange:_r},di)))},un=jt,Kt=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],xn=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],Ut=function(rn){var At=rn.src,an=rn.alt,En=rn.onPreviewClose,Dn=rn.prefixCls,qt=Dn===void 0?"rc-image":Dn,on=rn.previewPrefixCls,Nn=on===void 0?"".concat(qt,"-preview"):on,On=rn.placeholder,qn=rn.fallback,Hn=rn.width,ei=rn.height,Fn=rn.style,hi=rn.preview,Ii=hi===void 0?!0:hi,Ri=rn.className,Pn=rn.onClick,Vi=rn.onError,Cr=rn.wrapperClassName,mr=rn.wrapperStyle,_n=rn.rootClassName,Jn=(0,ge.Z)(rn,Kt),ui=On&&On!==!0,yi=(0,xe.Z)(Ii)==="object"?Ii:{},di=yi.src,Ei=yi.visible,Qi=Ei===void 0?void 0:Ei,Fi=yi.onVisibleChange,zi=Fi===void 0?En:Fi,fr=yi.getContainer,Bn=fr===void 0?void 0:fr,Br=yi.mask,In=yi.maskClassName,pr=yi.movable,yo=yi.icons,Or=yi.scaleStep,bo=yi.minScale,co=yi.maxScale,Ki=yi.imageRender,Hi=yi.toolbarRender,lr=(0,ge.Z)(yi,xn),Pr=di!=null?di:At,ci=(0,ve.Z)(!!Qi,{value:Qi,onChange:zi}),Tt=(0,Se.Z)(ci,2),Ur=Tt[0],zr=Tt[1],ts=ie({src:At,isCustomPlaceholder:ui,fallback:qn}),ko=(0,Se.Z)(ts,3),ss=ko[0],_r=ko[1],ur=ko[2],Kr=(0,Le.useState)(null),cr=(0,Se.Z)(Kr,2),qr=cr[0],Yo=cr[1],nr=(0,Le.useContext)(ue),Wi=!!Ii,Qn=function(){zr(!1),Yo(null)},ir=Te()(qt,Cr,_n,(0,he.Z)({},"".concat(qt,"-error"),ur==="error")),eo=(0,Le.useMemo)(function(){var as={};return de.forEach(function(Ho){rn[Ho]!==void 0&&(as[Ho]=rn[Ho])}),as},de.map(function(as){return rn[as]})),Ro=(0,Le.useMemo)(function(){return(0,Pe.Z)((0,Pe.Z)({},eo),{},{src:Pr})},[Pr,eo]),Bo=ee(Wi,Ro),Xo=function(Ho){var ia=(0,ce.os)(Ho.target),_s=ia.left,la=ia.top;nr?nr.onPreview(Bo,_s,la):(Yo({x:_s,y:la}),zr(!0)),Pn==null||Pn(Ho)};return Le.createElement(Le.Fragment,null,Le.createElement("div",(0,be.Z)({},Jn,{className:ir,onClick:Wi?Xo:Pn,style:(0,Pe.Z)({width:Hn,height:ei},mr)}),Le.createElement("img",(0,be.Z)({},eo,{className:Te()("".concat(qt,"-img"),(0,he.Z)({},"".concat(qt,"-img-placeholder"),On===!0),Ri),style:(0,Pe.Z)({height:ei},Fn),ref:ss},_r,{width:Hn,height:ei,onError:Vi})),ur==="loading"&&Le.createElement("div",{"aria-hidden":"true",className:"".concat(qt,"-placeholder")},On),Br&&Wi&&Le.createElement("div",{className:Te()("".concat(qt,"-mask"),In),style:{display:(Fn==null?void 0:Fn.display)==="none"?"none":void 0}},Br)),!nr&&Wi&&Le.createElement(dt,(0,be.Z)({"aria-hidden":!Ur,visible:Ur,prefixCls:Nn,onClose:Qn,mousePosition:qr,src:Pr,alt:an,fallback:qn,getContainer:Bn,icons:yo,movable:pr,scaleStep:Or,minScale:bo,maxScale:co,rootClassName:_n,imageRender:Ki,imgCommonProps:eo,toolbarRender:Hi},lr)))};Ut.PreviewGroup=un,Ut.displayName="Image";var Wt=Ut,$t=Wt,ft=Ee(62892),We=Ee(36355),Be=Ee(31724),qe=Ee(99267),et=Ee(33853),He=Ee(38819),Xe={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"},Re=Xe,Ae=Ee(7657),Ue=function(rn,At){return Le.createElement(Ae.Z,(0,be.Z)({},rn,{ref:At,icon:Re}))},Ke=Le.forwardRef(Ue),Ze=Ke,lt={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"},xt=lt,tn=function(rn,At){return Le.createElement(Ae.Z,(0,be.Z)({},rn,{ref:At,icon:xt}))},en=Le.forwardRef(tn),Jt=en,gn={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"},Mn=gn,yn=function(rn,At){return Le.createElement(Ae.Z,(0,be.Z)({},rn,{ref:At,icon:Mn}))},kn=Le.forwardRef(yn),$n=kn,An={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"},oi=An,ai=function(rn,At){return Le.createElement(Ae.Z,(0,be.Z)({},rn,{ref:At,icon:oi}))},Di=Le.forwardRef(ai),Pi=Di,Xi={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"},or=Xi,ar=function(rn,At){return Le.createElement(Ae.Z,(0,be.Z)({},rn,{ref:At,icon:or}))},dr=Le.forwardRef(ar),no=dr,Ir=Ee(64993),xi=Ee(73819),wr=Ee(17313),Mr=Ee(29878),ot=Ee(1950),Rr=Ee(83116),Nr=Ee(37613);const Hr=dn=>({position:dn||"absolute",inset:0}),uo=dn=>{const{iconCls:rn,motionDurationSlow:At,paddingXXS:an,marginXXS:En,prefixCls:Dn,colorTextLightSolid:qt}=dn;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:qt,background:new Ir.C("#000").setAlpha(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${At}`,[`.${Dn}-mask-info`]:Object.assign(Object.assign({},wr.vS),{padding:`0 ${an}px`,[rn]:{marginInlineEnd:En,svg:{verticalAlign:"baseline"}}})}},po=dn=>{const{previewCls:rn,modalMaskBg:At,paddingSM:an,marginXL:En,margin:Dn,paddingLG:qt,previewOperationColorDisabled:on,previewOperationHoverColor:Nn,motionDurationSlow:On,iconCls:qn,colorTextLightSolid:Hn}=dn,ei=new Ir.C(At).setAlpha(.1),Fn=ei.clone().setAlpha(.2);return{[`${rn}-footer`]:{position:"fixed",bottom:En,left:{_skip_check_:!0,value:0},width:"100%",display:"flex",flexDirection:"column",alignItems:"center",color:dn.previewOperationColor},[`${rn}-progress`]:{marginBottom:Dn},[`${rn}-close`]:{position:"fixed",top:En,right:{_skip_check_:!0,value:En},display:"flex",color:Hn,backgroundColor:ei.toRgbString(),borderRadius:"50%",padding:an,outline:0,border:0,cursor:"pointer",transition:`all ${On}`,"&:hover":{backgroundColor:Fn.toRgbString()},[`& > ${qn}`]:{fontSize:dn.previewOperationSize}},[`${rn}-operations`]:{display:"flex",alignItems:"center",padding:`0 ${qt}px`,backgroundColor:ei.toRgbString(),borderRadius:100,"&-operation":{marginInlineStart:an,padding:an,cursor:"pointer",transition:`all ${On}`,userSelect:"none",[`&:not(${rn}-operations-operation-disabled):hover > ${qn}`]:{color:Nn},"&-disabled":{color:on,cursor:"not-allowed"},"&:first-of-type":{marginInlineStart:0},[`& > ${qn}`]:{fontSize:dn.previewOperationSize}}}}},io=dn=>{const{modalMaskBg:rn,iconCls:At,previewOperationColorDisabled:an,previewCls:En,zIndexPopup:Dn,motionDurationSlow:qt}=dn,on=new Ir.C(rn).setAlpha(.1),Nn=on.clone().setAlpha(.2);return{[`${En}-switch-left, ${En}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:Dn+1,display:"flex",alignItems:"center",justifyContent:"center",width:dn.imagePreviewSwitchSize,height:dn.imagePreviewSwitchSize,marginTop:-dn.imagePreviewSwitchSize/2,color:dn.previewOperationColor,background:on.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${qt}`,userSelect:"none","&:hover":{background:Nn.toRgbString()},"&-disabled":{"&, &:hover":{color:an,background:"transparent",cursor:"not-allowed",[`> ${At}`]:{cursor:"not-allowed"}}},[`> ${At}`]:{fontSize:dn.previewOperationSize}},[`${En}-switch-left`]:{insetInlineStart:dn.marginSM},[`${En}-switch-right`]:{insetInlineEnd:dn.marginSM}}},Do=dn=>{const{motionEaseOut:rn,previewCls:At,motionDurationSlow:an,componentCls:En}=dn;return[{[`${En}-preview-root`]:{[At]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${At}-body`]:Object.assign(Object.assign({},Hr()),{overflow:"hidden"}),[`${At}-img`]:{maxWidth:"100%",maxHeight:"70%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${an} ${rn} 0s`,userSelect:"none","&-wrapper":Object.assign(Object.assign({},Hr()),{transition:`transform ${an} ${rn} 0s`,display:"flex",justifyContent:"center",alignItems:"center","& > *":{pointerEvents:"auto"},"&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${At}-moving`]:{[`${At}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${En}-preview-root`]:{[`${At}-wrap`]:{zIndex:dn.zIndexPopup}}},{[`${En}-preview-operations-wrapper`]:{position:"fixed",zIndex:dn.zIndexPopup+1},"&":[po(dn),io(dn)]}]},Xn=dn=>{const{componentCls:rn}=dn;return{[rn]:{position:"relative",display:"inline-block",[`${rn}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${rn}-img-placeholder`]:{backgroundColor:dn.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${rn}-mask`]:Object.assign({},uo(dn)),[`${rn}-mask:hover`]:{opacity:1},[`${rn}-placeholder`]:Object.assign({},Hr())}}},$e=dn=>{const{previewCls:rn}=dn;return{[`${rn}-root`]:(0,Mr._y)(dn,"zoom"),"&":(0,ot.J$)(dn,!0)}};var nt=(0,Rr.Z)("Image",dn=>{const rn=`${dn.componentCls}-preview`,At=(0,Nr.TS)(dn,{previewCls:rn,modalMaskBg:new Ir.C("#000").setAlpha(.45).toRgbString(),imagePreviewSwitchSize:dn.controlHeightLG});return[Xn(At),Do(At),(0,xi.QA)((0,Nr.TS)(At,{componentCls:rn})),$e(At)]},dn=>({zIndexPopup:dn.zIndexPopupBase+80,previewOperationColor:new Ir.C(dn.colorTextLightSolid).setAlpha(.65).toRgbString(),previewOperationHoverColor:new Ir.C(dn.colorTextLightSolid).setAlpha(.85).toRgbString(),previewOperationColorDisabled:new Ir.C(dn.colorTextLightSolid).setAlpha(.25).toRgbString(),previewOperationSize:dn.fontSizeIcon*1.5})),Je=function(dn,rn){var At={};for(var an in dn)Object.prototype.hasOwnProperty.call(dn,an)&&rn.indexOf(an)<0&&(At[an]=dn[an]);if(dn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var En=0,an=Object.getOwnPropertySymbols(dn);En<an.length;En++)rn.indexOf(an[En])<0&&Object.prototype.propertyIsEnumerable.call(dn,an[En])&&(At[an[En]]=dn[an[En]]);return At};const wt={rotateLeft:Le.createElement(Ze,null),rotateRight:Le.createElement(Jt,null),zoomIn:Le.createElement(Pi,null),zoomOut:Le.createElement(no,null),close:Le.createElement(qe.Z,null),left:Le.createElement(et.Z,null),right:Le.createElement(He.Z,null),flipX:Le.createElement($n,null),flipY:Le.createElement($n,{rotate:90})};var kt=dn=>{var{previewPrefixCls:rn,preview:At}=dn,an=Je(dn,["previewPrefixCls","preview"]);const{getPrefixCls:En}=Le.useContext(We.E_),Dn=En("image",rn),qt=`${Dn}-preview`,on=En(),[Nn,On]=nt(Dn),qn=Le.useMemo(()=>{var Hn;if(At===!1)return At;const ei=typeof At=="object"?At:{},Fn=Te()(On,(Hn=ei.rootClassName)!==null&&Hn!==void 0?Hn:"");return Object.assign(Object.assign({},ei),{transitionName:(0,ft.m)(on,"zoom",ei.transitionName),maskTransitionName:(0,ft.m)(on,"fade",ei.maskTransitionName),rootClassName:Fn})},[At]);return Nn(Le.createElement($t.PreviewGroup,Object.assign({preview:qn,previewPrefixCls:qt,icons:wt},an)))},Et=function(dn,rn){var At={};for(var an in dn)Object.prototype.hasOwnProperty.call(dn,an)&&rn.indexOf(an)<0&&(At[an]=dn[an]);if(dn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var En=0,an=Object.getOwnPropertySymbols(dn);En<an.length;En++)rn.indexOf(an[En])<0&&Object.prototype.propertyIsEnumerable.call(dn,an[En])&&(At[an[En]]=dn[an[En]]);return At};const cn=dn=>{const{prefixCls:rn,preview:At,className:an,rootClassName:En,style:Dn}=dn,qt=Et(dn,["prefixCls","preview","className","rootClassName","style"]),{getPrefixCls:on,locale:Nn=Be.Z,getPopupContainer:On,image:qn}=Le.useContext(We.E_),Hn=on("image",rn),ei=on(),Fn=Nn.Image||Be.Z.Image,[hi,Ii]=nt(Hn),Ri=Te()(En,Ii),Pn=Te()(an,Ii,qn==null?void 0:qn.className),Vi=Le.useMemo(()=>{if(At===!1)return At;const mr=typeof At=="object"?At:{},{getContainer:_n}=mr,Jn=Et(mr,["getContainer"]);return Object.assign(Object.assign({mask:Le.createElement("div",{className:`${Hn}-mask-info`},Le.createElement(me.Z,null),Fn==null?void 0:Fn.preview),icons:wt},Jn),{getContainer:_n||On,transitionName:(0,ft.m)(ei,"zoom",mr.transitionName),maskTransitionName:(0,ft.m)(ei,"fade",mr.maskTransitionName)})},[At,Fn]),Cr=Object.assign(Object.assign({},qn==null?void 0:qn.style),Dn);return hi(Le.createElement($t,Object.assign({prefixCls:Hn,preview:Vi,rootClassName:Ri,className:Pn,style:Cr},qt)))};cn.PreviewGroup=kt;var bn=cn},9432:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return se},n:function(){return oe}});var Le=Ee(19248),me=Ee(92310),Ie=Ee.n(me),Te=Ee(93681),be=Ee(8654),Pe=Ee(59301),he=Ee(19080),Se=Ee(36355),xe=Ee(1684),ge=Ee(19716),ce=Ee(32441),ve=Ee(33234),de=Ee(59412),ue=Ee(9937);function z(le){return!!(le.prefix||le.suffix||le.allowClear)}var ee=function(le,ye){var we={};for(var Ce in le)Object.prototype.hasOwnProperty.call(le,Ce)&&ye.indexOf(Ce)<0&&(we[Ce]=le[Ce]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ke=0,Ce=Object.getOwnPropertySymbols(le);ke<Ce.length;ke++)ye.indexOf(Ce[ke])<0&&Object.prototype.propertyIsEnumerable.call(le,Ce[ke])&&(we[Ce[ke]]=le[Ce[ke]]);return we};function oe(le,ye){if(!le)return;le.focus(ye);const{cursor:we}=ye||{};if(we){const Ce=le.value.length;switch(we){case"start":le.setSelectionRange(0,0);break;case"end":le.setSelectionRange(Ce,Ce);break;default:le.setSelectionRange(0,Ce);break}}}var se=(0,Pe.forwardRef)((le,ye)=>{var we;const{prefixCls:Ce,bordered:ke=!0,status:Ne,size:je,disabled:Ve,onBlur:Qe,onFocus:Ge,suffix:mt,allowClear:ct,addonAfter:Ct,addonBefore:it,className:St,style:ut,styles:Ft,rootClassName:ht,onChange:rt,classNames:dt}=le,yt=ee(le,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:_t,direction:vt,input:Bt}=Pe.useContext(Se.E_),jt=_t("input",Ce),un=(0,Pe.useRef)(null),[Kt,xn]=(0,ue.ZP)(jt),{compactSize:Ut,compactItemClassnames:Wt}=(0,ve.ri)(jt,vt),$t=(0,ge.Z)(tn=>{var en;return(en=je!=null?je:Ut)!==null&&en!==void 0?en:tn}),ft=Pe.useContext(xe.Z),We=Ve!=null?Ve:ft,{status:Be,hasFeedback:qe,feedbackIcon:et}=(0,Pe.useContext)(ce.aM),He=(0,he.F)(Be,Ne),Xe=z(le)||!!qe,Re=(0,Pe.useRef)(Xe);(0,Pe.useEffect)(()=>{var tn;Xe&&Re.current,Re.current=Xe},[Xe]);const Ae=(0,de.Z)(un,!0),Ue=tn=>{Ae(),Qe==null||Qe(tn)},Ke=tn=>{Ae(),Ge==null||Ge(tn)},Ze=tn=>{Ae(),rt==null||rt(tn)},lt=(qe||mt)&&Pe.createElement(Pe.Fragment,null,mt,qe&&et);let xt;return typeof ct=="object"&&(ct!=null&&ct.clearIcon)?xt=ct:ct&&(xt={clearIcon:Pe.createElement(Le.Z,null)}),Kt(Pe.createElement(Te.default,Object.assign({ref:(0,be.sQ)(ye,un),prefixCls:jt,autoComplete:Bt==null?void 0:Bt.autoComplete},yt,{disabled:We,onBlur:Ue,onFocus:Ke,style:Object.assign(Object.assign({},Bt==null?void 0:Bt.style),ut),styles:Object.assign(Object.assign({},Bt==null?void 0:Bt.styles),Ft),suffix:lt,allowClear:xt,className:Ie()(St,ht,Wt,Bt==null?void 0:Bt.className),onChange:Ze,addonAfter:Ct&&Pe.createElement(ve.BR,null,Pe.createElement(ce.Ux,{override:!0,status:!0},Ct)),addonBefore:it&&Pe.createElement(ve.BR,null,Pe.createElement(ce.Ux,{override:!0,status:!0},it)),classNames:Object.assign(Object.assign(Object.assign({},dt),Bt==null?void 0:Bt.classNames),{input:Ie()({[`${jt}-sm`]:$t==="small",[`${jt}-lg`]:$t==="large",[`${jt}-rtl`]:vt==="rtl",[`${jt}-borderless`]:!ke},!Xe&&(0,he.Z)(jt,He),dt==null?void 0:dt.input,(we=Bt==null?void 0:Bt.classNames)===null||we===void 0?void 0:we.input,xn)}),classes:{affixWrapper:Ie()({[`${jt}-affix-wrapper-sm`]:$t==="small",[`${jt}-affix-wrapper-lg`]:$t==="large",[`${jt}-affix-wrapper-rtl`]:vt==="rtl",[`${jt}-affix-wrapper-borderless`]:!ke},(0,he.Z)(`${jt}-affix-wrapper`,He,qe),xn),wrapper:Ie()({[`${jt}-group-rtl`]:vt==="rtl"},xn),group:Ie()({[`${jt}-group-wrapper-sm`]:$t==="small",[`${jt}-group-wrapper-lg`]:$t==="large",[`${jt}-group-wrapper-rtl`]:vt==="rtl",[`${jt}-group-wrapper-disabled`]:We},(0,he.Z)(`${jt}-group-wrapper`,He,qe),xn)}})))})},1643:function(Cn,Yt,Ee){"use strict";var Le=Ee(19248),me=Ee(92310),Ie=Ee.n(me),Te=Ee(9296),be=Ee(59301),Pe=Ee(19080),he=Ee(36355),Se=Ee(1684),xe=Ee(19716),ge=Ee(32441),ce=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 ue=(0,be.forwardRef)((z,ee)=>{const{prefixCls:oe,bordered:ie=!0,size:se,disabled:le,status:ye,allowClear:we,showCount:Ce,classNames:ke,rootClassName:Ne,className:je}=z,Ve=de(z,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:Qe,direction:Ge}=be.useContext(he.E_),mt=(0,xe.Z)(se),ct=be.useContext(Se.Z),Ct=le!=null?le:ct,{status:it,hasFeedback:St,feedbackIcon:ut}=be.useContext(ge.aM),Ft=(0,Pe.F)(it,ye),ht=be.useRef(null);be.useImperativeHandle(ee,()=>{var vt;return{resizableTextArea:(vt=ht.current)===null||vt===void 0?void 0:vt.resizableTextArea,focus:Bt=>{var jt,un;(0,ce.n)((un=(jt=ht.current)===null||jt===void 0?void 0:jt.resizableTextArea)===null||un===void 0?void 0:un.textArea,Bt)},blur:()=>{var Bt;return(Bt=ht.current)===null||Bt===void 0?void 0:Bt.blur()}}});const rt=Qe("input",oe);let dt;typeof we=="object"&&(we!=null&&we.clearIcon)?dt=we:we&&(dt={clearIcon:be.createElement(Le.Z,null)});const[yt,_t]=(0,ve.ZP)(rt);return yt(be.createElement(Te.default,Object.assign({},Ve,{disabled:Ct,allowClear:dt,className:Ie()(je,Ne),classes:{affixWrapper:Ie()(`${rt}-textarea-affix-wrapper`,{[`${rt}-affix-wrapper-rtl`]:Ge==="rtl",[`${rt}-affix-wrapper-borderless`]:!ie,[`${rt}-affix-wrapper-sm`]:mt==="small",[`${rt}-affix-wrapper-lg`]:mt==="large",[`${rt}-textarea-show-count`]:Ce},(0,Pe.Z)(`${rt}-affix-wrapper`,Ft),_t)},classNames:Object.assign(Object.assign({},ke),{textarea:Ie()({[`${rt}-borderless`]:!ie,[`${rt}-sm`]:mt==="small",[`${rt}-lg`]:mt==="large"},(0,Pe.Z)(rt,Ft),_t,ke==null?void 0:ke.textarea)}),prefixCls:rt,suffix:St&&be.createElement("span",{className:`${rt}-textarea-suffix`},ut),showCount:Ce,ref:ht})))});Yt.Z=ue},59412:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return me}});var Le=Ee(59301);function me(Ie,Te){const be=(0,Le.useRef)([]),Pe=()=>{be.current.push(setTimeout(()=>{var he,Se,xe,ge;!((he=Ie.current)===null||he===void 0)&&he.input&&((Se=Ie.current)===null||Se===void 0?void 0:Se.input.getAttribute("type"))==="password"&&(!((xe=Ie.current)===null||xe===void 0)&&xe.input.hasAttribute("value"))&&((ge=Ie.current)===null||ge===void 0||ge.input.removeAttribute("value"))}))};return(0,Le.useEffect)(()=>(Te&&Pe(),()=>be.current.forEach(he=>{he&&clearTimeout(he)})),[]),Pe}},92832:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{default:function(){return mt}});var Le=Ee(92310),me=Ee.n(Le),Ie=Ee(59301),Te=Ee(36355),be=Ee(32441),Pe=Ee(9937),Se=ct=>{const{getPrefixCls:Ct,direction:it}=(0,Ie.useContext)(Te.E_),{prefixCls:St,className:ut}=ct,Ft=Ct("input-group",St),ht=Ct("input"),[rt,dt]=(0,Pe.ZP)(ht),yt=me()(Ft,{[`${Ft}-lg`]:ct.size==="large",[`${Ft}-sm`]:ct.size==="small",[`${Ft}-compact`]:ct.compact,[`${Ft}-rtl`]:it==="rtl"},dt,ut),_t=(0,Ie.useContext)(be.aM),vt=(0,Ie.useMemo)(()=>Object.assign(Object.assign({},_t),{isFormItemInput:!1}),[_t]);return rt(Ie.createElement("span",{className:yt,style:ct.style,onMouseEnter:ct.onMouseEnter,onMouseLeave:ct.onMouseLeave,onFocus:ct.onFocus,onBlur:ct.onBlur},Ie.createElement(be.aM.Provider,{value:vt},ct.children)))},xe=Ee(9432),ge=Ee(73331),ce=Ee(15277),ve=Ee(2738),de=Ee(8654),ue=Ee(59412),z=function(ct,Ct){var it={};for(var St in ct)Object.prototype.hasOwnProperty.call(ct,St)&&Ct.indexOf(St)<0&&(it[St]=ct[St]);if(ct!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,St=Object.getOwnPropertySymbols(ct);ut<St.length;ut++)Ct.indexOf(St[ut])<0&&Object.prototype.propertyIsEnumerable.call(ct,St[ut])&&(it[St[ut]]=ct[St[ut]]);return it};const ee=ct=>ct?Ie.createElement(ce.Z,null):Ie.createElement(ge.Z,null),oe={click:"onClick",hover:"onMouseOver"};var se=Ie.forwardRef((ct,Ct)=>{const{visibilityToggle:it=!0}=ct,St=typeof it=="object"&&it.visible!==void 0,[ut,Ft]=(0,Ie.useState)(()=>St?it.visible:!1),ht=(0,Ie.useRef)(null);Ie.useEffect(()=>{St&&Ft(it.visible)},[St,it]);const rt=(0,ue.Z)(ht),dt=()=>{const{disabled:We}=ct;We||(ut&&rt(),Ft(Be=>{var qe;const et=!Be;return typeof it=="object"&&((qe=it.onVisibleChange)===null||qe===void 0||qe.call(it,et)),et}))},yt=We=>{const{action:Be="click",iconRender:qe=ee}=ct,et=oe[Be]||"",He=qe(ut),Xe={[et]:dt,className:`${We}-icon`,key:"passwordIcon",onMouseDown:Re=>{Re.preventDefault()},onMouseUp:Re=>{Re.preventDefault()}};return Ie.cloneElement(Ie.isValidElement(He)?He:Ie.createElement("span",null,He),Xe)},{className:_t,prefixCls:vt,inputPrefixCls:Bt,size:jt}=ct,un=z(ct,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Kt}=Ie.useContext(Te.E_),xn=Kt("input",Bt),Ut=Kt("input-password",vt),Wt=it&&yt(Ut),$t=me()(Ut,_t,{[`${Ut}-${jt}`]:!!jt}),ft=Object.assign(Object.assign({},(0,ve.Z)(un,["suffix","iconRender","visibilityToggle"])),{type:ut?"text":"password",className:$t,prefixCls:xn,suffix:Wt});return jt&&(ft.size=jt),Ie.createElement(xe.Z,Object.assign({ref:(0,de.sQ)(Ct,ht)},ft))}),le=Ee(47472),ye=Ee(92343),we=Ee(3113),Ce=Ee(19716),ke=Ee(33234),Ne=function(ct,Ct){var it={};for(var St in ct)Object.prototype.hasOwnProperty.call(ct,St)&&Ct.indexOf(St)<0&&(it[St]=ct[St]);if(ct!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,St=Object.getOwnPropertySymbols(ct);ut<St.length;ut++)Ct.indexOf(St[ut])<0&&Object.prototype.propertyIsEnumerable.call(ct,St[ut])&&(it[St[ut]]=ct[St[ut]]);return it},Ve=Ie.forwardRef((ct,Ct)=>{const{prefixCls:it,inputPrefixCls:St,className:ut,size:Ft,suffix:ht,enterButton:rt=!1,addonAfter:dt,loading:yt,disabled:_t,onSearch:vt,onChange:Bt,onCompositionStart:jt,onCompositionEnd:un}=ct,Kt=Ne(ct,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:xn,direction:Ut}=Ie.useContext(Te.E_),Wt=Ie.useRef(!1),$t=xn("input-search",it),ft=xn("input",St),{compactSize:We}=(0,ke.ri)($t,Ut),Be=(0,Ce.Z)(Jt=>{var gn;return(gn=Ft!=null?Ft:We)!==null&&gn!==void 0?gn:Jt}),qe=Ie.useRef(null),et=Jt=>{Jt&&Jt.target&&Jt.type==="click"&&vt&&vt(Jt.target.value,Jt,{source:"clear"}),Bt&&Bt(Jt)},He=Jt=>{var gn;document.activeElement===((gn=qe.current)===null||gn===void 0?void 0:gn.input)&&Jt.preventDefault()},Xe=Jt=>{var gn,Mn;vt&&vt((Mn=(gn=qe.current)===null||gn===void 0?void 0:gn.input)===null||Mn===void 0?void 0:Mn.value,Jt,{source:"input"})},Re=Jt=>{Wt.current||yt||Xe(Jt)},Ae=typeof rt=="boolean"?Ie.createElement(le.Z,null):null,Ue=`${$t}-button`;let Ke;const Ze=rt||{},lt=Ze.type&&Ze.type.__ANT_BUTTON===!0;lt||Ze.type==="button"?Ke=(0,ye.Tm)(Ze,Object.assign({onMouseDown:He,onClick:Jt=>{var gn,Mn;(Mn=(gn=Ze==null?void 0:Ze.props)===null||gn===void 0?void 0:gn.onClick)===null||Mn===void 0||Mn.call(gn,Jt),Xe(Jt)},key:"enterButton"},lt?{className:Ue,size:Be}:{})):Ke=Ie.createElement(we.ZP,{className:Ue,type:rt?"primary":void 0,size:Be,disabled:_t,key:"enterButton",onMouseDown:He,onClick:Xe,loading:yt,icon:Ae},rt),dt&&(Ke=[Ke,(0,ye.Tm)(dt,{key:"addonAfter"})]);const xt=me()($t,{[`${$t}-rtl`]:Ut==="rtl",[`${$t}-${Be}`]:!!Be,[`${$t}-with-button`]:!!rt},ut),tn=Jt=>{Wt.current=!0,jt==null||jt(Jt)},en=Jt=>{Wt.current=!1,un==null||un(Jt)};return Ie.createElement(xe.Z,Object.assign({ref:(0,de.sQ)(qe,Ct),onPressEnter:Re},Kt,{size:Be,onCompositionStart:tn,onCompositionEnd:en,prefixCls:ft,addonAfter:Ke,suffix:ht,onChange:et,className:xt,disabled:_t}))}),Qe=Ee(1643);const Ge=xe.Z;Ge.Group=Se,Ge.Search=Ve,Ge.TextArea=Qe.Z,Ge.Password=se;var mt=Ge},45818:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{D:function(){return le},Z:function(){return Ce}});var Le=Ee(72308),me=Ee(59301),Ie={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"},Te=Ie,be=Ee(7657),Pe=function(Ne,je){return me.createElement(be.Z,(0,Le.Z)({},Ne,{ref:je,icon:Te}))},he=me.forwardRef(Pe),Se=he,xe=Ee(33853),ge=Ee(38819),ce=Ee(92310),ve=Ee.n(ce),de=Ee(2738),z=ke=>!isNaN(parseFloat(ke))&&isFinite(ke),ee=Ee(36355),oe=Ee(84966),ie=function(ke,Ne){var je={};for(var Ve in ke)Object.prototype.hasOwnProperty.call(ke,Ve)&&Ne.indexOf(Ve)<0&&(je[Ve]=ke[Ve]);if(ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Qe=0,Ve=Object.getOwnPropertySymbols(ke);Qe<Ve.length;Qe++)Ne.indexOf(Ve[Qe])<0&&Object.prototype.propertyIsEnumerable.call(ke,Ve[Qe])&&(je[Ve[Qe]]=ke[Ve[Qe]]);return je};const se={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},le=me.createContext({}),ye=(()=>{let ke=0;return function(){let Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return ke+=1,`${Ne}${ke}`}})();var Ce=me.forwardRef((ke,Ne)=>{const{prefixCls:je,className:Ve,trigger:Qe,children:Ge,defaultCollapsed:mt=!1,theme:ct="dark",style:Ct={},collapsible:it=!1,reverseArrow:St=!1,width:ut=200,collapsedWidth:Ft=80,zeroWidthTriggerStyle:ht,breakpoint:rt,onCollapse:dt,onBreakpoint:yt}=ke,_t=ie(ke,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:vt}=(0,me.useContext)(oe.Gs),[Bt,jt]=(0,me.useState)("collapsed"in ke?ke.collapsed:mt),[un,Kt]=(0,me.useState)(!1);(0,me.useEffect)(()=>{"collapsed"in ke&&jt(ke.collapsed)},[ke.collapsed]);const xn=(Be,qe)=>{"collapsed"in ke||jt(Be),dt==null||dt(Be,qe)},Ut=(0,me.useRef)();Ut.current=Be=>{Kt(Be.matches),yt==null||yt(Be.matches),Bt!==Be.matches&&xn(Be.matches,"responsive")},(0,me.useEffect)(()=>{function Be(et){return Ut.current(et)}let qe;if(typeof window!="undefined"){const{matchMedia:et}=window;if(et&&rt&&rt in se){qe=et(`(max-width: ${se[rt]})`);try{qe.addEventListener("change",Be)}catch(He){qe.addListener(Be)}Be(qe)}}return()=>{try{qe==null||qe.removeEventListener("change",Be)}catch(et){qe==null||qe.removeListener(Be)}}},[rt]),(0,me.useEffect)(()=>{const Be=ye("ant-sider-");return vt.addSider(Be),()=>vt.removeSider(Be)},[]);const Wt=()=>{xn(!Bt,"clickTrigger")},{getPrefixCls:$t}=(0,me.useContext)(ee.E_),ft=()=>{const Be=$t("layout-sider",je),qe=(0,de.Z)(_t,["collapsed"]),et=Bt?Ft:ut,He=z(et)?`${et}px`:String(et),Xe=parseFloat(String(Ft||0))===0?me.createElement("span",{onClick:Wt,className:ve()(`${Be}-zero-width-trigger`,`${Be}-zero-width-trigger-${St?"right":"left"}`),style:ht},Qe||me.createElement(Se,null)):null,Ue={expanded:St?me.createElement(ge.Z,null):me.createElement(xe.Z,null),collapsed:St?me.createElement(xe.Z,null):me.createElement(ge.Z,null)}[Bt?"collapsed":"expanded"],Ke=Qe!==null?Xe||me.createElement("div",{className:`${Be}-trigger`,onClick:Wt,style:{width:He}},Qe||Ue):null,Ze=Object.assign(Object.assign({},Ct),{flex:`0 0 ${He}`,maxWidth:He,minWidth:He,width:He}),lt=ve()(Be,`${Be}-${ct}`,{[`${Be}-collapsed`]:!!Bt,[`${Be}-has-trigger`]:it&&Qe!==null&&!Xe,[`${Be}-below`]:!!un,[`${Be}-zero-width`]:parseFloat(He)===0},Ve);return me.createElement("aside",Object.assign({className:lt},qe,{style:Ze,ref:Ne}),me.createElement("div",{className:`${Be}-children`},Ge),it||un&&Xe?Ke:null)},We=me.useMemo(()=>({siderCollapsed:Bt}),[Bt]);return me.createElement(le.Provider,{value:We},ft())})},84966:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{VY:function(){return le},$_:function(){return se},h4:function(){return ie},Gs:function(){return de},ZP:function(){return ye}});var Le=Ee(80702),me=Ee(92310),Ie=Ee.n(me),Te=Ee(2738),be=Ee(59301),Pe=Ee(36355),he=Ee(83116),xe=we=>{const{componentCls:Ce,bodyBg:ke,lightSiderBg:Ne,lightTriggerBg:je,lightTriggerColor:Ve}=we;return{[`${Ce}-sider-light`]:{background:Ne,[`${Ce}-sider-trigger`]:{color:Ve,background:je},[`${Ce}-sider-zero-width-trigger`]:{color:Ve,background:je,border:`1px solid ${ke}`,borderInlineStart:0}}}};const ge=we=>{const{antCls:Ce,componentCls:ke,colorText:Ne,triggerColor:je,footerBg:Ve,triggerBg:Qe,headerHeight:Ge,headerPadding:mt,headerColor:ct,footerPadding:Ct,triggerHeight:it,zeroTriggerHeight:St,zeroTriggerWidth:ut,motionDurationMid:Ft,motionDurationSlow:ht,fontSize:rt,borderRadius:dt,bodyBg:yt,headerBg:_t,siderBg:vt}=we;return{[ke]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:yt,"&, *":{boxSizing:"border-box"},[`&${ke}-has-sider`]:{flexDirection:"row",[`> ${ke}, > ${ke}-content`]:{width:0}},[`${ke}-header, &${ke}-footer`]:{flex:"0 0 auto"},[`${ke}-sider`]:{position:"relative",minWidth:0,background:vt,transition:`all ${Ft}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${Ce}-menu${Ce}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:it},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:it,color:je,lineHeight:`${it}px`,textAlign:"center",background:Qe,cursor:"pointer",transition:`all ${Ft}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:Ge,insetInlineEnd:-ut,zIndex:1,width:ut,height:St,color:je,fontSize:we.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:vt,borderStartStartRadius:0,borderStartEndRadius:dt,borderEndEndRadius:dt,borderEndStartRadius:0,cursor:"pointer",transition:`background ${ht} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${ht}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-ut,borderStartStartRadius:dt,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:dt}}}}},xe(we)),{"&-rtl":{direction:"rtl"}}),[`${ke}-header`]:{height:Ge,padding:mt,color:ct,lineHeight:`${Ge}px`,background:_t,[`${Ce}-menu`]:{lineHeight:"inherit"}},[`${ke}-footer`]:{padding:Ct,color:Ne,fontSize:rt,background:Ve},[`${ke}-content`]:{flex:"auto",minHeight:0}}};var ce=(0,he.Z)("Layout",we=>[ge(we)],we=>{const{colorBgLayout:Ce,controlHeight:ke,controlHeightLG:Ne,colorText:je,controlHeightSM:Ve,marginXXS:Qe,colorTextLightSolid:Ge,colorBgContainer:mt}=we,ct=Ne*1.25;return{colorBgHeader:"#001529",colorBgBody:Ce,colorBgTrigger:"#002140",bodyBg:Ce,headerBg:"#001529",headerHeight:ke*2,headerPadding:`0 ${ct}px`,headerColor:je,footerPadding:`${Ve}px ${ct}px`,footerBg:Ce,siderBg:"#001529",triggerHeight:Ne+Qe*2,triggerBg:"#002140",triggerColor:Ge,zeroTriggerWidth:Ne,zeroTriggerHeight:Ne,lightSiderBg:mt,lightTriggerBg:mt,lightTriggerColor:je}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),ve=function(we,Ce){var ke={};for(var Ne in we)Object.prototype.hasOwnProperty.call(we,Ne)&&Ce.indexOf(Ne)<0&&(ke[Ne]=we[Ne]);if(we!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,Ne=Object.getOwnPropertySymbols(we);je<Ne.length;je++)Ce.indexOf(Ne[je])<0&&Object.prototype.propertyIsEnumerable.call(we,Ne[je])&&(ke[Ne[je]]=we[Ne[je]]);return ke};const de=be.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function ue(we){let{suffixCls:Ce,tagName:ke,displayName:Ne}=we;return je=>be.forwardRef((Qe,Ge)=>be.createElement(je,Object.assign({ref:Ge,suffixCls:Ce,tagName:ke},Qe)))}const z=be.forwardRef((we,Ce)=>{const{prefixCls:ke,suffixCls:Ne,className:je,tagName:Ve}=we,Qe=ve(we,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:Ge}=be.useContext(Pe.E_),mt=Ge("layout",ke),[ct,Ct]=ce(mt),it=Ne?`${mt}-${Ne}`:mt;return ct(be.createElement(Ve,Object.assign({className:Ie()(ke||it,je,Ct),ref:Ce},Qe)))}),ee=be.forwardRef((we,Ce)=>{const{direction:ke}=be.useContext(Pe.E_),[Ne,je]=be.useState([]),{prefixCls:Ve,className:Qe,rootClassName:Ge,children:mt,hasSider:ct,tagName:Ct,style:it}=we,St=ve(we,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),ut=(0,Te.Z)(St,["suffixCls"]),{getPrefixCls:Ft,layout:ht}=be.useContext(Pe.E_),rt=Ft("layout",Ve),[dt,yt]=ce(rt),_t=Ie()(rt,{[`${rt}-has-sider`]:typeof ct=="boolean"?ct:Ne.length>0,[`${rt}-rtl`]:ke==="rtl"},ht==null?void 0:ht.className,Qe,Ge,yt),vt=be.useMemo(()=>({siderHook:{addSider:Bt=>{je(jt=>[].concat((0,Le.Z)(jt),[Bt]))},removeSider:Bt=>{je(jt=>jt.filter(un=>un!==Bt))}}}),[]);return dt(be.createElement(de.Provider,{value:vt},be.createElement(Ct,Object.assign({ref:Ce,className:_t,style:Object.assign(Object.assign({},ht==null?void 0:ht.style),it)},ut),mt)))}),oe=ue({tagName:"div",displayName:"Layout"})(ee),ie=ue({suffixCls:"header",tagName:"header",displayName:"Header"})(z),se=ue({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(z),le=ue({suffixCls:"content",tagName:"main",displayName:"Content"})(z);var ye=oe},40875:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{J:function(){return Pe}});var Le=Ee(59301),me=Ee(33234),Ie=Ee(70425),Te=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 ce=0,ge=Object.getOwnPropertySymbols(he);ce<ge.length;ce++)Se.indexOf(ge[ce])<0&&Object.prototype.propertyIsEnumerable.call(he,ge[ce])&&(xe[ge[ce]]=he[ge[ce]]);return xe};const be=Le.createContext(null),Pe=Le.forwardRef((he,Se)=>{const{children:xe}=he,ge=Te(he,["children"]),ce=Le.useContext(be),ve=Le.useMemo(()=>Object.assign(Object.assign({},ce),ge),[ce,ge.prefixCls,ge.mode,ge.selectable]);return Le.createElement(be.Provider,{value:ve},Le.createElement(me.BR,null,(0,Ie.supportNodeRef)(xe)?Le.cloneElement(xe,{ref:Se}):xe))});Yt.Z=be},20834:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{default:function(){return We}});var Le=Ee(15285),me=Ee(59301),Ie=Ee(45818),Te=Ee(92310),be=Ee.n(Te),Pe=Ee(36355),he=function(Be,qe){var et={};for(var He in Be)Object.prototype.hasOwnProperty.call(Be,He)&&qe.indexOf(He)<0&&(et[He]=Be[He]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,He=Object.getOwnPropertySymbols(Be);Xe<He.length;Xe++)qe.indexOf(He[Xe])<0&&Object.prototype.propertyIsEnumerable.call(Be,He[Xe])&&(et[He[Xe]]=Be[He[Xe]]);return et},xe=Be=>{const{prefixCls:qe,className:et,dashed:He}=Be,Xe=he(Be,["prefixCls","className","dashed"]),{getPrefixCls:Re}=me.useContext(Pe.E_),Ae=Re("menu",qe),Ue=be()({[`${Ae}-item-divider-dashed`]:!!He},et);return me.createElement(Le.iz,Object.assign({className:Ue},Xe))},ge=Ee(11592),ce=Ee(2738),ve=Ee(6848),de=Ee(92343),z=(0,me.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),oe=Be=>{var qe;const{className:et,children:He,icon:Xe,title:Re,danger:Ae}=Be,{prefixCls:Ue,firstLevel:Ke,direction:Ze,disableMenuItemTitleTooltip:lt,inlineCollapsed:xt}=me.useContext(z),tn=kn=>{const $n=me.createElement("span",{className:`${Ue}-title-content`},He);return(!Xe||(0,de.l$)(He)&&He.type==="span")&&He&&kn&&Ke&&typeof He=="string"?me.createElement("div",{className:`${Ue}-inline-collapsed-noicon`},He.charAt(0)):$n},{siderCollapsed:en}=me.useContext(Ie.D);let Jt=Re;typeof Re=="undefined"?Jt=Ke?He:"":Re===!1&&(Jt="");const gn={title:Jt};!en&&!xt&&(gn.title=null,gn.open=!1);const Mn=(0,ge.Z)(He).length;let yn=me.createElement(Le.ck,Object.assign({},(0,ce.Z)(Be,["title","icon","danger"]),{className:be()({[`${Ue}-item-danger`]:Ae,[`${Ue}-item-only-child`]:(Xe?Mn+1:Mn)===1},et),title:typeof Re=="string"?Re:void 0}),(0,de.Tm)(Xe,{className:be()((0,de.l$)(Xe)?(qe=Xe.props)===null||qe===void 0?void 0:qe.className:"",`${Ue}-item-icon`)}),tn(xt));return lt||(yn=me.createElement(ve.Z,Object.assign({},gn,{placement:Ze==="rtl"?"left":"right",overlayClassName:`${Ue}-inline-collapsed-tooltip`}),yn)),yn},se=Be=>{var qe;const{popupClassName:et,icon:He,title:Xe,theme:Re}=Be,Ae=me.useContext(z),{prefixCls:Ue,inlineCollapsed:Ke,theme:Ze}=Ae,lt=(0,Le.Xl)();let xt;if(!He)xt=Ke&&!lt.length&&Xe&&typeof Xe=="string"?me.createElement("div",{className:`${Ue}-inline-collapsed-noicon`},Xe.charAt(0)):me.createElement("span",{className:`${Ue}-title-content`},Xe);else{const en=(0,de.l$)(Xe)&&Xe.type==="span";xt=me.createElement(me.Fragment,null,(0,de.Tm)(He,{className:be()((0,de.l$)(He)?(qe=He.props)===null||qe===void 0?void 0:qe.className:"",`${Ue}-item-icon`)}),en?Xe:me.createElement("span",{className:`${Ue}-title-content`},Xe))}const tn=me.useMemo(()=>Object.assign(Object.assign({},Ae),{firstLevel:!1}),[Ae]);return me.createElement(z.Provider,{value:tn},me.createElement(Le.Wd,Object.assign({},(0,ce.Z)(Be,["icon"]),{title:xt,popupClassName:be()(Ue,et,`${Ue}-${Re||Ze}`)})))},le=Ee(18785),ye=Ee(70425),we=Ee(62892),Ce=Ee(40875),ke=function(Be,qe){var et={};for(var He in Be)Object.prototype.hasOwnProperty.call(Be,He)&&qe.indexOf(He)<0&&(et[He]=Be[He]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,He=Object.getOwnPropertySymbols(Be);Xe<He.length;Xe++)qe.indexOf(He[Xe])<0&&Object.prototype.propertyIsEnumerable.call(Be,He[Xe])&&(et[He[Xe]]=Be[He[Xe]]);return et};function Ne(Be){return(Be||[]).map((qe,et)=>{if(qe&&typeof qe=="object"){const He=qe,{label:Xe,children:Re,key:Ae,type:Ue}=He,Ke=ke(He,["label","children","key","type"]),Ze=Ae!=null?Ae:`tmp-${et}`;return Re||Ue==="group"?Ue==="group"?me.createElement(Le.BW,Object.assign({key:Ze},Ke,{title:Xe}),Ne(Re)):me.createElement(se,Object.assign({key:Ze},Ke,{title:Xe}),Ne(Re)):Ue==="divider"?me.createElement(xe,Object.assign({key:Ze},Ke)):me.createElement(oe,Object.assign({key:Ze},Ke),Xe)}return null}).filter(qe=>qe)}function je(Be){return me.useMemo(()=>Be&&Ne(Be),[Be])}var Ve=Ee(64993),Qe=Ee(17313),Ge=Ee(8378),mt=Ee(13826),ct=Ee(29878),Ct=Ee(83116),it=Ee(37613),ut=Be=>{const{componentCls:qe,motionDurationSlow:et,horizontalLineHeight:He,colorSplit:Xe,lineWidth:Re,lineType:Ae,itemPaddingInline:Ue}=Be;return{[`${qe}-horizontal`]:{lineHeight:He,border:0,borderBottom:`${Re}px ${Ae} ${Xe}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${qe}-item, ${qe}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:Ue},[`> ${qe}-item:hover,
|
|
|
> ${qe}-item-active,
|
|
|
> ${qe}-submenu ${qe}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${qe}-item, ${qe}-submenu-title`]:{transition:[`border-color ${et}`,`background ${et}`].join(",")},[`${qe}-submenu-arrow`]:{display:"none"}}}},ht=Be=>{let{componentCls:qe,menuArrowOffset:et}=Be;return{[`${qe}-rtl`]:{direction:"rtl"},[`${qe}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${qe}-rtl${qe}-vertical,
|
|
|
${qe}-submenu-rtl ${qe}-vertical`]:{[`${qe}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${et})`},"&::after":{transform:`rotate(45deg) translateY(${et})`}}}}};const rt=Be=>Object.assign({},(0,Qe.oN)(Be));var yt=(Be,qe)=>{const{componentCls:et,itemColor:He,itemSelectedColor:Xe,groupTitleColor:Re,itemBg:Ae,subMenuItemBg:Ue,itemSelectedBg:Ke,activeBarHeight:Ze,activeBarWidth:lt,activeBarBorderWidth:xt,motionDurationSlow:tn,motionEaseInOut:en,motionEaseOut:Jt,itemPaddingInline:gn,motionDurationMid:Mn,itemHoverColor:yn,lineType:kn,colorSplit:$n,itemDisabledColor:An,dangerItemColor:oi,dangerItemHoverColor:ai,dangerItemSelectedColor:Di,dangerItemActiveBg:Pi,dangerItemSelectedBg:Xi,itemHoverBg:or,itemActiveBg:ar,menuSubMenuBg:dr,horizontalItemSelectedColor:no,horizontalItemSelectedBg:Ir,horizontalItemBorderRadius:xi,horizontalItemHoverBg:wr,popupBg:Mr}=Be;return{[`${et}-${qe}, ${et}-${qe} > ${et}`]:{color:He,background:Ae,[`&${et}-root:focus-visible`]:Object.assign({},rt(Be)),[`${et}-item-group-title`]:{color:Re},[`${et}-submenu-selected`]:{[`> ${et}-submenu-title`]:{color:Xe}},[`${et}-item-disabled, ${et}-submenu-disabled`]:{color:`${An} !important`},[`${et}-item:not(${et}-item-selected):not(${et}-submenu-selected)`]:{[`&:hover, > ${et}-submenu-title:hover`]:{color:yn}},[`&:not(${et}-horizontal)`]:{[`${et}-item:not(${et}-item-selected)`]:{"&:hover":{backgroundColor:or},"&:active":{backgroundColor:ar}},[`${et}-submenu-title`]:{"&:hover":{backgroundColor:or},"&:active":{backgroundColor:ar}}},[`${et}-item-danger`]:{color:oi,[`&${et}-item:hover`]:{[`&:not(${et}-item-selected):not(${et}-submenu-selected)`]:{color:ai}},[`&${et}-item:active`]:{background:Pi}},[`${et}-item a`]:{"&, &:hover":{color:"inherit"}},[`${et}-item-selected`]:{color:Xe,[`&${et}-item-danger`]:{color:Di},"a, a:hover":{color:"inherit"}},[`& ${et}-item-selected`]:{backgroundColor:Ke,[`&${et}-item-danger`]:{backgroundColor:Xi}},[`${et}-item, ${et}-submenu-title`]:{[`&:not(${et}-item-disabled):focus-visible`]:Object.assign({},rt(Be))},[`&${et}-submenu > ${et}`]:{backgroundColor:dr},[`&${et}-popup > ${et}`]:{backgroundColor:Mr},[`&${et}-horizontal`]:Object.assign(Object.assign({},qe==="dark"?{borderBottom:0}:{}),{[`> ${et}-item, > ${et}-submenu`]:{top:xt,marginTop:-xt,marginBottom:0,borderRadius:xi,"&::after":{position:"absolute",insetInline:gn,bottom:0,borderBottom:`${Ze}px solid transparent`,transition:`border-color ${tn} ${en}`,content:'""'},"&:hover, &-active, &-open":{background:wr,"&::after":{borderBottomWidth:Ze,borderBottomColor:no}},"&-selected":{color:no,backgroundColor:Ir,"&:hover":{backgroundColor:Ir},"&::after":{borderBottomWidth:Ze,borderBottomColor:no}}}}),[`&${et}-root`]:{[`&${et}-inline, &${et}-vertical`]:{borderInlineEnd:`${xt}px ${kn} ${$n}`}},[`&${et}-inline`]:{[`${et}-sub${et}-inline`]:{background:Ue},[`${et}-item, ${et}-submenu-title`]:xt&<?{width:`calc(100% + ${xt}px)`}:{},[`${et}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${lt}px solid ${Xe}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${Mn} ${Jt}`,`opacity ${Mn} ${Jt}`].join(","),content:'""'},[`&${et}-item-danger`]:{"&::after":{borderInlineEndColor:Di}}},[`${et}-selected, ${et}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${Mn} ${en}`,`opacity ${Mn} ${en}`].join(",")}}}}}};const _t=Be=>{const{componentCls:qe,itemHeight:et,itemMarginInline:He,padding:Xe,menuArrowSize:Re,marginXS:Ae,itemMarginBlock:Ue}=Be,Ke=Xe+Re+Ae;return{[`${qe}-item`]:{position:"relative",overflow:"hidden"},[`${qe}-item, ${qe}-submenu-title`]:{height:et,lineHeight:`${et}px`,paddingInline:Xe,overflow:"hidden",textOverflow:"ellipsis",marginInline:He,marginBlock:Ue,width:`calc(100% - ${He*2}px)`},[`> ${qe}-item,
|
|
|
> ${qe}-submenu > ${qe}-submenu-title`]:{height:et,lineHeight:`${et}px`},[`${qe}-item-group-list ${qe}-submenu-title,
|
|
|
${qe}-submenu-title`]:{paddingInlineEnd:Ke}}};var Bt=Be=>{const{componentCls:qe,iconCls:et,itemHeight:He,colorTextLightSolid:Xe,dropdownWidth:Re,controlHeightLG:Ae,motionDurationMid:Ue,motionEaseOut:Ke,paddingXL:Ze,itemMarginInline:lt,fontSizeLG:xt,motionDurationSlow:tn,paddingXS:en,boxShadowSecondary:Jt,collapsedWidth:gn,collapsedIconSize:Mn}=Be,yn={height:He,lineHeight:`${He}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[qe]:{"&-inline, &-vertical":Object.assign({[`&${qe}-root`]:{boxShadow:"none"}},_t(Be))},[`${qe}-submenu-popup`]:{[`${qe}-vertical`]:Object.assign(Object.assign({},_t(Be)),{boxShadow:Jt})}},{[`${qe}-submenu-popup ${qe}-vertical${qe}-sub`]:{minWidth:Re,maxHeight:`calc(100vh - ${Ae*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${qe}-inline`]:{width:"100%",[`&${qe}-root`]:{[`${qe}-item, ${qe}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${tn}`,`background ${tn}`,`padding ${Ue} ${Ke}`].join(","),[`> ${qe}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${qe}-sub${qe}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${qe}-submenu > ${qe}-submenu-title`]:yn,[`& ${qe}-item-group-title`]:{paddingInlineStart:Ze}},[`${qe}-item`]:yn}},{[`${qe}-inline-collapsed`]:{width:gn,[`&${qe}-root`]:{[`${qe}-item, ${qe}-submenu ${qe}-submenu-title`]:{[`> ${qe}-inline-collapsed-noicon`]:{fontSize:xt,textAlign:"center"}}},[`> ${qe}-item,
|
|
|
> ${qe}-item-group > ${qe}-item-group-list > ${qe}-item,
|
|
|
> ${qe}-item-group > ${qe}-item-group-list > ${qe}-submenu > ${qe}-submenu-title,
|
|
|
> ${qe}-submenu > ${qe}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${xt/2}px - ${lt}px)`,textOverflow:"clip",[`
|
|
|
${qe}-submenu-arrow,
|
|
|
${qe}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${qe}-item-icon, ${et}`]:{margin:0,fontSize:Mn,lineHeight:`${He}px`,"+ span":{display:"inline-block",opacity:0}}},[`${qe}-item-icon, ${et}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${qe}-item-icon, ${et}`]:{display:"none"},"a, a:hover":{color:Xe}},[`${qe}-item-group-title`]:Object.assign(Object.assign({},Qe.vS),{paddingInline:en})}}]};const jt=Be=>{const{componentCls:qe,motionDurationSlow:et,motionDurationMid:He,motionEaseInOut:Xe,motionEaseOut:Re,iconCls:Ae,iconSize:Ue,iconMarginInlineEnd:Ke}=Be;return{[`${qe}-item, ${qe}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${et}`,`background ${et}`,`padding ${et} ${Xe}`].join(","),[`${qe}-item-icon, ${Ae}`]:{minWidth:Ue,fontSize:Ue,transition:[`font-size ${He} ${Re}`,`margin ${et} ${Xe}`,`color ${et}`].join(","),"+ span":{marginInlineStart:Ke,opacity:1,transition:[`opacity ${et} ${Xe}`,`margin ${et}`,`color ${et}`].join(",")}},[`${qe}-item-icon`]:Object.assign({},(0,Qe.Ro)()),[`&${qe}-item-only-child`]:{[`> ${Ae}, > ${qe}-item-icon`]:{marginInlineEnd:0}}},[`${qe}-item-disabled, ${qe}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${qe}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},un=Be=>{const{componentCls:qe,motionDurationSlow:et,motionEaseInOut:He,borderRadius:Xe,menuArrowSize:Re,menuArrowOffset:Ae}=Be;return{[`${qe}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:Be.margin,width:Re,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${et} ${He}, opacity ${et}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Re*.6,height:Re*.15,backgroundColor:"currentcolor",borderRadius:Xe,transition:[`background ${et} ${He}`,`transform ${et} ${He}`,`top ${et} ${He}`,`color ${et} ${He}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${Ae})`},"&::after":{transform:`rotate(-45deg) translateY(${Ae})`}}}}},Kt=Be=>{const{antCls:qe,componentCls:et,fontSize:He,motionDurationSlow:Xe,motionDurationMid:Re,motionEaseInOut:Ae,paddingXS:Ue,padding:Ke,colorSplit:Ze,lineWidth:lt,zIndexPopup:xt,borderRadiusLG:tn,subMenuItemBorderRadius:en,menuArrowSize:Jt,menuArrowOffset:gn,lineType:Mn,menuPanelMaskInset:yn,groupTitleLineHeight:kn,groupTitleFontSize:$n}=Be;return[{"":{[`${et}`]:Object.assign(Object.assign({},(0,Qe.dF)()),{"&-hidden":{display:"none"}})},[`${et}-submenu-hidden`]:{display:"none"}},{[et]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Qe.Wf)(Be)),(0,Qe.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:He,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${Xe} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${et}-item`]:{flex:"none"}},[`${et}-item, ${et}-submenu, ${et}-submenu-title`]:{borderRadius:Be.itemBorderRadius},[`${et}-item-group-title`]:{padding:`${Ue}px ${Ke}px`,fontSize:$n,lineHeight:kn,transition:`all ${Xe}`},[`&-horizontal ${et}-submenu`]:{transition:[`border-color ${Xe} ${Ae}`,`background ${Xe} ${Ae}`].join(",")},[`${et}-submenu, ${et}-submenu-inline`]:{transition:[`border-color ${Xe} ${Ae}`,`background ${Xe} ${Ae}`,`padding ${Re} ${Ae}`].join(",")},[`${et}-submenu ${et}-sub`]:{cursor:"initial",transition:[`background ${Xe} ${Ae}`,`padding ${Xe} ${Ae}`].join(",")},[`${et}-title-content`]:{transition:`color ${Xe}`},[`${et}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${et}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:Ze,borderStyle:Mn,borderWidth:0,borderTopWidth:lt,marginBlock:lt,padding:0,"&-dashed":{borderStyle:"dashed"}}}),jt(Be)),{[`${et}-item-group`]:{[`${et}-item-group-list`]:{margin:0,padding:0,[`${et}-item, ${et}-submenu-title`]:{paddingInline:`${He*2}px ${Ke}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:xt,borderRadius:tn,boxShadow:"none",transformOrigin:"0 0",[`&${et}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${yn}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:yn},"\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:Be.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:Be.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:Be.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:Be.paddingXS},[`> ${et}`]:Object.assign(Object.assign(Object.assign({borderRadius:tn},jt(Be)),un(Be)),{[`${et}-item, ${et}-submenu > ${et}-submenu-title`]:{borderRadius:en},[`${et}-submenu-title::after`]:{transition:`transform ${Xe} ${Ae}`}})}}),un(Be)),{[`&-inline-collapsed ${et}-submenu-arrow,
|
|
|
&-inline ${et}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${gn})`},"&::after":{transform:`rotate(45deg) translateX(-${gn})`}},[`${et}-submenu-open${et}-submenu-inline > ${et}-submenu-title > ${et}-submenu-arrow`]:{transform:`translateY(-${Jt*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${gn})`},"&::before":{transform:`rotate(45deg) translateX(${gn})`}}})},{[`${qe}-layout-header`]:{[et]:{lineHeight:"inherit"}}}]};var xn=(Be,qe)=>(0,Ct.Z)("Menu",He=>{if(qe===!1)return[];const{colorBgElevated:Xe,colorPrimary:Re,colorTextLightSolid:Ae,controlHeightLG:Ue,fontSize:Ke,darkItemColor:Ze,darkDangerItemColor:lt,darkItemBg:xt,darkSubMenuItemBg:tn,darkItemSelectedColor:en,darkItemSelectedBg:Jt,darkDangerItemSelectedBg:gn,darkItemHoverBg:Mn,darkGroupTitleColor:yn,darkItemHoverColor:kn,darkItemDisabledColor:$n,darkDangerItemHoverColor:An,darkDangerItemSelectedColor:oi,darkDangerItemActiveBg:ai}=He,Di=Ke/7*5,Pi=(0,it.TS)(He,{menuArrowSize:Di,menuHorizontalHeight:Ue*1.15,menuArrowOffset:`${Di*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:Xe}),Xi=(0,it.TS)(Pi,{itemColor:Ze,itemHoverColor:kn,groupTitleColor:yn,itemSelectedColor:en,itemBg:xt,popupBg:xt,subMenuItemBg:tn,itemActiveBg:"transparent",itemSelectedBg:Jt,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Mn,itemDisabledColor:$n,dangerItemColor:lt,dangerItemHoverColor:An,dangerItemSelectedColor:oi,dangerItemActiveBg:ai,dangerItemSelectedBg:gn,menuSubMenuBg:tn,horizontalItemSelectedColor:Ae,horizontalItemSelectedBg:Re});return[Kt(Pi),ut(Pi),Bt(Pi),yt(Pi,"light"),yt(Xi,"dark"),ht(Pi),(0,Ge.Z)(Pi),(0,mt.oN)(Pi,"slide-up"),(0,mt.oN)(Pi,"slide-down"),(0,ct._y)(Pi,"zoom-big")]},He=>{const{colorPrimary:Xe,colorError:Re,colorTextDisabled:Ae,colorErrorBg:Ue,colorText:Ke,colorTextDescription:Ze,colorBgContainer:lt,colorFillAlter:xt,colorFillContent:tn,lineWidth:en,lineWidthBold:Jt,controlItemBgActive:gn,colorBgTextHover:Mn,controlHeightLG:yn,lineHeight:kn,colorBgElevated:$n,marginXXS:An,padding:oi,fontSize:ai,controlHeightSM:Di,fontSizeLG:Pi,colorTextLightSolid:Xi,colorErrorHover:or}=He,ar=new Ve.C(Xi).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:He.zIndexPopupBase+50,radiusItem:He.borderRadiusLG,itemBorderRadius:He.borderRadiusLG,radiusSubMenuItem:He.borderRadiusSM,subMenuItemBorderRadius:He.borderRadiusSM,colorItemText:Ke,itemColor:Ke,colorItemTextHover:Ke,itemHoverColor:Ke,colorItemTextHoverHorizontal:Xe,horizontalItemHoverColor:Xe,colorGroupTitle:Ze,groupTitleColor:Ze,colorItemTextSelected:Xe,itemSelectedColor:Xe,colorItemTextSelectedHorizontal:Xe,horizontalItemSelectedColor:Xe,colorItemBg:lt,itemBg:lt,colorItemBgHover:Mn,itemHoverBg:Mn,colorItemBgActive:tn,itemActiveBg:gn,colorSubItemBg:xt,subMenuItemBg:xt,colorItemBgSelected:gn,itemSelectedBg:gn,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:Jt,activeBarHeight:Jt,colorActiveBarBorderSize:en,activeBarBorderWidth:en,colorItemTextDisabled:Ae,itemDisabledColor:Ae,colorDangerItemText:Re,dangerItemColor:Re,colorDangerItemTextHover:Re,dangerItemHoverColor:Re,colorDangerItemTextSelected:Re,dangerItemSelectedColor:Re,colorDangerItemBgActive:Ue,dangerItemActiveBg:Ue,colorDangerItemBgSelected:Ue,dangerItemSelectedBg:Ue,itemMarginInline:He.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:yn,groupTitleLineHeight:kn,collapsedWidth:yn*2,popupBg:$n,itemMarginBlock:An,itemPaddingInline:oi,horizontalLineHeight:`${yn*1.15}px`,iconSize:ai,iconMarginInlineEnd:Di-ai,collapsedIconSize:Pi,groupTitleFontSize:ai,darkItemDisabledColor:new Ve.C(Xi).setAlpha(.25).toRgbString(),darkItemColor:ar,darkDangerItemColor:Re,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:Xi,darkItemSelectedBg:Xe,darkDangerItemSelectedBg:Re,darkItemHoverBg:"transparent",darkGroupTitleColor:ar,darkItemHoverColor:Xi,darkDangerItemHoverColor:or,darkDangerItemSelectedColor:Xi,darkDangerItemActiveBg:Re}},{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"]]})(Be),Ut=function(Be,qe){var et={};for(var He in Be)Object.prototype.hasOwnProperty.call(Be,He)&&qe.indexOf(He)<0&&(et[He]=Be[He]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,He=Object.getOwnPropertySymbols(Be);Xe<He.length;Xe++)qe.indexOf(He[Xe])<0&&Object.prototype.propertyIsEnumerable.call(Be,He[Xe])&&(et[He[Xe]]=Be[He[Xe]]);return et},$t=(0,me.forwardRef)((Be,qe)=>{var et,He;const Xe=me.useContext(Ce.Z),Re=Xe||{},{getPrefixCls:Ae,getPopupContainer:Ue,direction:Ke,menu:Ze}=me.useContext(Pe.E_),lt=Ae(),{prefixCls:xt,className:tn,style:en,theme:Jt="light",expandIcon:gn,_internalDisableMenuItemTitleTooltip:Mn,inlineCollapsed:yn,siderCollapsed:kn,items:$n,children:An,rootClassName:oi,mode:ai,selectable:Di,onClick:Pi,overflowedIndicatorPopupClassName:Xi}=Be,or=Ut(Be,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),ar=(0,ce.Z)(or,["collapsedWidth"]),dr=je($n)||An;(et=Re.validator)===null||et===void 0||et.call(Re,{mode:ai});const no=(0,ye.useEvent)(function(){var io;Pi==null||Pi.apply(void 0,arguments),(io=Re.onClick)===null||io===void 0||io.call(Re)}),Ir=Re.mode||ai,xi=Di!=null?Di:Re.selectable,wr=me.useMemo(()=>kn!==void 0?kn:yn,[yn,kn]),Mr={horizontal:{motionName:`${lt}-slide-up`},inline:(0,we.Z)(lt),other:{motionName:`${lt}-zoom-big`}},ot=Ae("menu",xt||Re.prefixCls),[Rr,Nr]=xn(ot,!Xe),Hr=be()(`${ot}-${Jt}`,Ze==null?void 0:Ze.className,tn);let uo;if(typeof gn=="function")uo=gn;else if(gn===null||gn===!1)uo=null;else if(Re.expandIcon===null||Re.expandIcon===!1)uo=null;else{const io=gn!=null?gn:Re.expandIcon;uo=(0,de.Tm)(io,{className:be()(`${ot}-submenu-expand-icon`,(0,de.l$)(io)?(He=io.props)===null||He===void 0?void 0:He.className:"")})}const po=me.useMemo(()=>({prefixCls:ot,inlineCollapsed:wr||!1,direction:Ke,firstLevel:!0,theme:Jt,mode:Ir,disableMenuItemTitleTooltip:Mn}),[ot,wr,Ke,Mn,Jt]);return Rr(me.createElement(Ce.Z.Provider,{value:null},me.createElement(z.Provider,{value:po},me.createElement(Le.ZP,Object.assign({getPopupContainer:Ue,overflowedIndicator:me.createElement(le.Z,null),overflowedIndicatorPopupClassName:be()(ot,`${ot}-${Jt}`,Xi),mode:Ir,selectable:xi,onClick:no},ar,{inlineCollapsed:wr,style:Object.assign(Object.assign({},Ze==null?void 0:Ze.style),en),className:Hr,prefixCls:ot,direction:Ke,defaultMotions:Mr,expandIcon:uo,ref:qe,rootClassName:be()(oi,Nr)}),dr))))});const ft=(0,me.forwardRef)((Be,qe)=>{const et=(0,me.useRef)(null),He=me.useContext(Ie.D);return(0,me.useImperativeHandle)(qe,()=>({menu:et.current,focus:Xe=>{var Re;(Re=et.current)===null||Re===void 0||Re.focus(Xe)}})),me.createElement($t,Object.assign({ref:et},Be,He))});ft.Item=oe,ft.SubMenu=se,ft.Divider=xe,ft.ItemGroup=Le.BW;var We=ft},58421:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Re}});var Le=Ee(72308),me=Ee(59301),Ie={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"},Te=Ie,be=Ee(7657),Pe=function(Ue,Ke){return me.createElement(be.Z,(0,Le.Z)({},Ue,{ref:Ke,icon:Te}))},he=me.forwardRef(Pe),Se=he,xe=Ee(49198),ge=Ee(33853),ce=Ee(38819),ve=Ee(92310),de=Ee.n(ve),ue=Ee(49618),z=Ee(77321),ee=Ee(96949),oe=Ee(55090),ie=Ee(77205),se=Ee(38793),le=Ee(26112),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,Ce=Ee(91735),ke=function(Ae){(0,ie.Z)(Ke,Ae);var Ue=(0,se.Z)(Ke);function Ke(){var Ze;(0,ee.Z)(this,Ke);for(var lt=arguments.length,xt=new Array(lt),tn=0;tn<lt;tn++)xt[tn]=arguments[tn];return Ze=Ue.call.apply(Ue,[this].concat(xt)),Ze.state={goInputText:""},Ze.getValidValue=function(){var en=Ze.state.goInputText;return!en||Number.isNaN(en)?void 0:Number(en)},Ze.buildOptionText=function(en){return"".concat(en," ").concat(Ze.props.locale.items_per_page)},Ze.changeSize=function(en){Ze.props.changeSize(Number(en))},Ze.handleChange=function(en){Ze.setState({goInputText:en.target.value})},Ze.handleBlur=function(en){var Jt=Ze.props,gn=Jt.goButton,Mn=Jt.quickGo,yn=Jt.rootPrefixCls,kn=Ze.state.goInputText;gn||kn===""||(Ze.setState({goInputText:""}),!(en.relatedTarget&&(en.relatedTarget.className.indexOf("".concat(yn,"-item-link"))>=0||en.relatedTarget.className.indexOf("".concat(yn,"-item"))>=0))&&Mn(Ze.getValidValue()))},Ze.go=function(en){var Jt=Ze.state.goInputText;Jt!==""&&(en.keyCode===we.ENTER||en.type==="click")&&(Ze.setState({goInputText:""}),Ze.props.quickGo(Ze.getValidValue()))},Ze}return(0,oe.Z)(Ke,[{key:"getPageSizeOptions",value:function(){var lt=this.props,xt=lt.pageSize,tn=lt.pageSizeOptions;return tn.some(function(en){return en.toString()===xt.toString()})?tn:tn.concat([xt.toString()]).sort(function(en,Jt){var gn=Number.isNaN(Number(en))?0:Number(en),Mn=Number.isNaN(Number(Jt))?0:Number(Jt);return gn-Mn})}},{key:"render",value:function(){var lt=this,xt=this.props,tn=xt.pageSize,en=xt.locale,Jt=xt.rootPrefixCls,gn=xt.changeSize,Mn=xt.quickGo,yn=xt.goButton,kn=xt.selectComponentClass,$n=xt.buildOptionText,An=xt.selectPrefixCls,oi=xt.disabled,ai=this.state.goInputText,Di="".concat(Jt,"-options"),Pi=kn,Xi=null,or=null,ar=null;if(!gn&&!Mn)return null;var dr=this.getPageSizeOptions();if(gn&&Pi){var no=dr.map(function(Ir,xi){return me.createElement(Pi.Option,{key:xi,value:Ir.toString()},($n||lt.buildOptionText)(Ir))});Xi=me.createElement(Pi,{disabled:oi,prefixCls:An,showSearch:!1,className:"".concat(Di,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(tn||dr[0]).toString(),onChange:this.changeSize,getPopupContainer:function(xi){return xi.parentNode},"aria-label":en.page_size,defaultOpen:!1},no)}return Mn&&(yn&&(ar=typeof yn=="boolean"?me.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:oi,className:"".concat(Di,"-quick-jumper-button")},en.jump_to_confirm):me.createElement("span",{onClick:this.go,onKeyUp:this.go},yn)),or=me.createElement("div",{className:"".concat(Di,"-quick-jumper")},en.jump_to,me.createElement("input",{disabled:oi,type:"text",value:ai,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":en.page}),en.page,ar)),me.createElement("li",{className:"".concat(Di)},Xi,or)}}]),Ke}(me.Component);ke.defaultProps={pageSizeOptions:["10","20","50","100"]};var Ne=ke,je=function(Ue){var Ke,Ze=Ue.rootPrefixCls,lt=Ue.page,xt=Ue.active,tn=Ue.className,en=Ue.showTitle,Jt=Ue.onClick,gn=Ue.onKeyPress,Mn=Ue.itemRender,yn="".concat(Ze,"-item"),kn=de()(yn,"".concat(yn,"-").concat(lt),(Ke={},(0,ue.Z)(Ke,"".concat(yn,"-active"),xt),(0,ue.Z)(Ke,"".concat(yn,"-disabled"),!lt),(0,ue.Z)(Ke,Ue.className,tn),Ke)),$n=function(){Jt(lt)},An=function(Di){gn(Di,Jt,lt)},oi=Mn(lt,"page",me.createElement("a",{rel:"nofollow"},lt));return oi?me.createElement("li",{title:en?lt.toString():null,className:kn,onClick:$n,onKeyPress:An,tabIndex:0},oi):null},Ve=je;function Qe(){}function Ge(Ae){var Ue=Number(Ae);return typeof Ue=="number"&&!Number.isNaN(Ue)&&isFinite(Ue)&&Math.floor(Ue)===Ue}var mt=function(Ue,Ke,Ze){return Ze};function ct(Ae,Ue,Ke){var Ze=typeof Ae=="undefined"?Ue.pageSize:Ae;return Math.floor((Ke.total-1)/Ze)+1}var Ct=function(Ae){(0,ie.Z)(Ke,Ae);var Ue=(0,se.Z)(Ke);function Ke(Ze){var lt;(0,ee.Z)(this,Ke),lt=Ue.call(this,Ze),lt.paginationNode=me.createRef(),lt.getJumpPrevPage=function(){return Math.max(1,lt.state.current-(lt.props.showLessItems?3:5))},lt.getJumpNextPage=function(){return Math.min(ct(void 0,lt.state,lt.props),lt.state.current+(lt.props.showLessItems?3:5))},lt.getItemIcon=function(gn,Mn){var yn=lt.props.prefixCls,kn=gn||me.createElement("button",{type:"button","aria-label":Mn,className:"".concat(yn,"-item-link")});return typeof gn=="function"&&(kn=me.createElement(gn,(0,z.Z)({},lt.props))),kn},lt.isValid=function(gn){var Mn=lt.props.total;return Ge(gn)&&gn!==lt.state.current&&Ge(Mn)&&Mn>0},lt.shouldDisplayQuickJumper=function(){var gn=lt.props,Mn=gn.showQuickJumper,yn=gn.total,kn=lt.state.pageSize;return yn<=kn?!1:Mn},lt.handleKeyDown=function(gn){(gn.keyCode===we.ARROW_UP||gn.keyCode===we.ARROW_DOWN)&&gn.preventDefault()},lt.handleKeyUp=function(gn){var Mn=lt.getValidValue(gn),yn=lt.state.currentInputValue;Mn!==yn&<.setState({currentInputValue:Mn}),gn.keyCode===we.ENTER?lt.handleChange(Mn):gn.keyCode===we.ARROW_UP?lt.handleChange(Mn-1):gn.keyCode===we.ARROW_DOWN&<.handleChange(Mn+1)},lt.handleBlur=function(gn){var Mn=lt.getValidValue(gn);lt.handleChange(Mn)},lt.changePageSize=function(gn){var Mn=lt.state.current,yn=ct(gn,lt.state,lt.props);Mn=Mn>yn?yn:Mn,yn===0&&(Mn=lt.state.current),typeof gn=="number"&&("pageSize"in lt.props||lt.setState({pageSize:gn}),"current"in lt.props||lt.setState({current:Mn,currentInputValue:Mn})),lt.props.onShowSizeChange(Mn,gn),"onChange"in lt.props&<.props.onChange&<.props.onChange(Mn,gn)},lt.handleChange=function(gn){var Mn=lt.props,yn=Mn.disabled,kn=Mn.onChange,$n=lt.state,An=$n.pageSize,oi=$n.current,ai=$n.currentInputValue;if(lt.isValid(gn)&&!yn){var Di=ct(void 0,lt.state,lt.props),Pi=gn;return gn>Di?Pi=Di:gn<1&&(Pi=1),"current"in lt.props||lt.setState({current:Pi}),Pi!==ai&<.setState({currentInputValue:Pi}),kn(Pi,An),Pi}return oi},lt.prev=function(){lt.hasPrev()&<.handleChange(lt.state.current-1)},lt.next=function(){lt.hasNext()&<.handleChange(lt.state.current+1)},lt.jumpPrev=function(){lt.handleChange(lt.getJumpPrevPage())},lt.jumpNext=function(){lt.handleChange(lt.getJumpNextPage())},lt.hasPrev=function(){return lt.state.current>1},lt.hasNext=function(){return lt.state.current<ct(void 0,lt.state,lt.props)},lt.runIfEnter=function(gn,Mn){if(gn.key==="Enter"||gn.charCode===13){for(var yn=arguments.length,kn=new Array(yn>2?yn-2:0),$n=2;$n<yn;$n++)kn[$n-2]=arguments[$n];Mn.apply(void 0,kn)}},lt.runIfEnterPrev=function(gn){lt.runIfEnter(gn,lt.prev)},lt.runIfEnterNext=function(gn){lt.runIfEnter(gn,lt.next)},lt.runIfEnterJumpPrev=function(gn){lt.runIfEnter(gn,lt.jumpPrev)},lt.runIfEnterJumpNext=function(gn){lt.runIfEnter(gn,lt.jumpNext)},lt.handleGoTO=function(gn){(gn.keyCode===we.ENTER||gn.type==="click")&<.handleChange(lt.state.currentInputValue)},lt.renderPrev=function(gn){var Mn=lt.props,yn=Mn.prevIcon,kn=Mn.itemRender,$n=kn(gn,"prev",lt.getItemIcon(yn,"prev page")),An=!lt.hasPrev();return(0,me.isValidElement)($n)?(0,me.cloneElement)($n,{disabled:An}):$n},lt.renderNext=function(gn){var Mn=lt.props,yn=Mn.nextIcon,kn=Mn.itemRender,$n=kn(gn,"next",lt.getItemIcon(yn,"next page")),An=!lt.hasNext();return(0,me.isValidElement)($n)?(0,me.cloneElement)($n,{disabled:An}):$n};var xt=Ze.onChange!==Qe,tn="current"in Ze;tn&&!xt&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var en=Ze.defaultCurrent;"current"in Ze&&(en=Ze.current);var Jt=Ze.defaultPageSize;return"pageSize"in Ze&&(Jt=Ze.pageSize),en=Math.min(en,ct(Jt,void 0,Ze)),lt.state={current:en,currentInputValue:en,pageSize:Jt},lt}return(0,oe.Z)(Ke,[{key:"componentDidUpdate",value:function(lt,xt){var tn=this.props.prefixCls;if(xt.current!==this.state.current&&this.paginationNode.current){var en=this.paginationNode.current.querySelector(".".concat(tn,"-item-").concat(xt.current));if(en&&document.activeElement===en){var Jt;en==null||(Jt=en.blur)===null||Jt===void 0||Jt.call(en)}}}},{key:"getValidValue",value:function(lt){var xt=lt.target.value,tn=ct(void 0,this.state,this.props),en=this.state.currentInputValue,Jt;return xt===""?Jt=xt:Number.isNaN(Number(xt))?Jt=en:xt>=tn?Jt=tn:Jt=Number(xt),Jt}},{key:"getShowSizeChanger",value:function(){var lt=this.props,xt=lt.showSizeChanger,tn=lt.total,en=lt.totalBoundaryShowSizeChanger;return typeof xt!="undefined"?xt:tn>en}},{key:"render",value:function(){var lt=this.props,xt=lt.prefixCls,tn=lt.className,en=lt.style,Jt=lt.disabled,gn=lt.hideOnSinglePage,Mn=lt.total,yn=lt.locale,kn=lt.showQuickJumper,$n=lt.showLessItems,An=lt.showTitle,oi=lt.showTotal,ai=lt.simple,Di=lt.itemRender,Pi=lt.showPrevNextJumpers,Xi=lt.jumpPrevIcon,or=lt.jumpNextIcon,ar=lt.selectComponentClass,dr=lt.selectPrefixCls,no=lt.pageSizeOptions,Ir=this.state,xi=Ir.current,wr=Ir.pageSize,Mr=Ir.currentInputValue;if(gn===!0&&Mn<=wr)return null;var ot=ct(void 0,this.state,this.props),Rr=[],Nr=null,Hr=null,uo=null,po=null,io=null,Do=kn&&kn.goButton,Xn=$n?1:2,$e=xi-1>0?xi-1:0,nt=xi+1<ot?xi+1:ot,Je=(0,le.Z)(this.props,{aria:!0,data:!0}),wt=oi&&me.createElement("li",{className:"".concat(xt,"-total-text")},oi(Mn,[Mn===0?0:(xi-1)*wr+1,xi*wr>Mn?Mn:xi*wr]));if(ai){Do&&(typeof Do=="boolean"?io=me.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},yn.jump_to_confirm):io=me.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Do),io=me.createElement("li",{title:An?"".concat(yn.jump_to).concat(xi,"/").concat(ot):null,className:"".concat(xt,"-simple-pager")},io));var Nt=this.renderPrev($e);return me.createElement("ul",(0,Le.Z)({className:de()(xt,"".concat(xt,"-simple"),(0,ue.Z)({},"".concat(xt,"-disabled"),Jt),tn),style:en,ref:this.paginationNode},Je),wt,Nt?me.createElement("li",{title:An?yn.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:de()("".concat(xt,"-prev"),(0,ue.Z)({},"".concat(xt,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},Nt):null,me.createElement("li",{title:An?"".concat(xi,"/").concat(ot):null,className:"".concat(xt,"-simple-pager")},me.createElement("input",{type:"text",value:Mr,disabled:Jt,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),me.createElement("span",{className:"".concat(xt,"-slash")},"/"),ot),me.createElement("li",{title:An?yn.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:de()("".concat(xt,"-next"),(0,ue.Z)({},"".concat(xt,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(nt)),io)}if(ot<=3+Xn*2){var kt={locale:yn,rootPrefixCls:xt,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:An,itemRender:Di};ot||Rr.push(me.createElement(Ve,(0,Le.Z)({},kt,{key:"noPager",page:1,className:"".concat(xt,"-item-disabled")})));for(var Et=1;Et<=ot;Et+=1){var cn=xi===Et;Rr.push(me.createElement(Ve,(0,Le.Z)({},kt,{key:Et,page:Et,active:cn})))}}else{var bn=$n?yn.prev_3:yn.prev_5,dn=$n?yn.next_3:yn.next_5,rn=Di(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Xi,"prev page")),At=Di(this.getJumpNextPage(),"jump-next",this.getItemIcon(or,"next page"));Pi&&(Nr=rn?me.createElement("li",{title:An?bn:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:de()("".concat(xt,"-jump-prev"),(0,ue.Z)({},"".concat(xt,"-jump-prev-custom-icon"),!!Xi))},rn):null,Hr=At?me.createElement("li",{title:An?dn:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:de()("".concat(xt,"-jump-next"),(0,ue.Z)({},"".concat(xt,"-jump-next-custom-icon"),!!or))},At):null),po=me.createElement(Ve,{locale:yn,last:!0,rootPrefixCls:xt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ot,page:ot,active:!1,showTitle:An,itemRender:Di}),uo=me.createElement(Ve,{locale:yn,rootPrefixCls:xt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:An,itemRender:Di});var an=Math.max(1,xi-Xn),En=Math.min(xi+Xn,ot);xi-1<=Xn&&(En=1+Xn*2),ot-xi<=Xn&&(an=ot-Xn*2);for(var Dn=an;Dn<=En;Dn+=1){var qt=xi===Dn;Rr.push(me.createElement(Ve,{locale:yn,rootPrefixCls:xt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Dn,page:Dn,active:qt,showTitle:An,itemRender:Di}))}xi-1>=Xn*2&&xi!==3&&(Rr[0]=(0,me.cloneElement)(Rr[0],{className:"".concat(xt,"-item-after-jump-prev")}),Rr.unshift(Nr)),ot-xi>=Xn*2&&xi!==ot-2&&(Rr[Rr.length-1]=(0,me.cloneElement)(Rr[Rr.length-1],{className:"".concat(xt,"-item-before-jump-next")}),Rr.push(Hr)),an!==1&&Rr.unshift(uo),En!==ot&&Rr.push(po)}var on=!this.hasPrev()||!ot,Nn=!this.hasNext()||!ot,On=this.renderPrev($e),qn=this.renderNext(nt);return me.createElement("ul",(0,Le.Z)({className:de()(xt,tn,(0,ue.Z)({},"".concat(xt,"-disabled"),Jt)),style:en,ref:this.paginationNode},Je),wt,On?me.createElement("li",{title:An?yn.prev_page:null,onClick:this.prev,tabIndex:on?null:0,onKeyPress:this.runIfEnterPrev,className:de()("".concat(xt,"-prev"),(0,ue.Z)({},"".concat(xt,"-disabled"),on)),"aria-disabled":on},On):null,Rr,qn?me.createElement("li",{title:An?yn.next_page:null,onClick:this.next,tabIndex:Nn?null:0,onKeyPress:this.runIfEnterNext,className:de()("".concat(xt,"-next"),(0,ue.Z)({},"".concat(xt,"-disabled"),Nn)),"aria-disabled":Nn},qn):null,me.createElement(Ne,{disabled:Jt,locale:yn,rootPrefixCls:xt,selectComponentClass:ar,selectPrefixCls:dr,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:xi,pageSize:wr,pageSizeOptions:no,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Do}))}}],[{key:"getDerivedStateFromProps",value:function(lt,xt){var tn={};if("current"in lt&&(tn.current=lt.current,lt.current!==xt.current&&(tn.currentInputValue=tn.current)),"pageSize"in lt&<.pageSize!==xt.pageSize){var en=xt.current,Jt=ct(lt.pageSize,xt,lt);en=en>Jt?Jt:en,"current"in lt||(tn.current=en,tn.currentInputValue=en),tn.pageSize=lt.pageSize}return tn}}]),Ke}(me.Component);Ct.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:Qe,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:Qe,locale:Ce.Z,style:{},itemRender:mt,totalBoundaryShowSizeChanger:50};var it=Ct,St=Ee(22075),ut=Ee(36355),Ft=Ee(19716),ht=Ee(8628),rt=Ee(9763),dt=Ee(57809);const yt=Ae=>me.createElement(dt.default,Object.assign({},Ae,{showSearch:!0,size:"small"})),_t=Ae=>me.createElement(dt.default,Object.assign({},Ae,{showSearch:!0,size:"middle"}));yt.Option=dt.default.Option,_t.Option=dt.default.Option;var vt=Ee(9937),Bt=Ee(17313),jt=Ee(83116),un=Ee(37613);const Kt=Ae=>{const{componentCls:Ue}=Ae;return{[`${Ue}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${Ue}-item-link`]:{color:Ae.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${Ue}-item-link`]:{color:Ae.colorTextDisabled,cursor:"not-allowed"}}},[`&${Ue}-disabled`]:{cursor:"not-allowed",[`${Ue}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:Ae.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:Ae.colorBorder,backgroundColor:Ae.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:Ae.itemActiveBgDisabled},a:{color:Ae.itemActiveColorDisabled}}},[`${Ue}-item-link`]:{color:Ae.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${Ue}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${Ue}-simple-pager`]:{color:Ae.colorTextDisabled},[`${Ue}-jump-prev, ${Ue}-jump-next`]:{[`${Ue}-item-link-icon`]:{opacity:0},[`${Ue}-item-ellipsis`]:{opacity:1}}},[`&${Ue}-simple`]:{[`${Ue}-prev, ${Ue}-next`]:{[`&${Ue}-disabled ${Ue}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},xn=Ae=>{const{componentCls:Ue}=Ae;return{[`&${Ue}-mini ${Ue}-total-text, &${Ue}-mini ${Ue}-simple-pager`]:{height:Ae.itemSizeSM,lineHeight:`${Ae.itemSizeSM}px`},[`&${Ue}-mini ${Ue}-item`]:{minWidth:Ae.itemSizeSM,height:Ae.itemSizeSM,margin:0,lineHeight:`${Ae.itemSizeSM-2}px`},[`&${Ue}-mini:not(${Ue}-disabled) ${Ue}-item:not(${Ue}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:Ae.colorBgTextHover},"&:active":{backgroundColor:Ae.colorBgTextActive}},[`&${Ue}-mini ${Ue}-prev, &${Ue}-mini ${Ue}-next`]:{minWidth:Ae.itemSizeSM,height:Ae.itemSizeSM,margin:0,lineHeight:`${Ae.itemSizeSM}px`},[`&${Ue}-mini:not(${Ue}-disabled)`]:{[`${Ue}-prev, ${Ue}-next`]:{[`&:hover ${Ue}-item-link`]:{backgroundColor:Ae.colorBgTextHover},[`&:active ${Ue}-item-link`]:{backgroundColor:Ae.colorBgTextActive},[`&${Ue}-disabled:hover ${Ue}-item-link`]:{backgroundColor:"transparent"}}},[`
|
|
|
&${Ue}-mini ${Ue}-prev ${Ue}-item-link,
|
|
|
&${Ue}-mini ${Ue}-next ${Ue}-item-link
|
|
|
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:Ae.itemSizeSM,lineHeight:`${Ae.itemSizeSM}px`}},[`&${Ue}-mini ${Ue}-jump-prev, &${Ue}-mini ${Ue}-jump-next`]:{height:Ae.itemSizeSM,marginInlineEnd:0,lineHeight:`${Ae.itemSizeSM}px`},[`&${Ue}-mini ${Ue}-options`]:{marginInlineStart:Ae.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:Ae.miniOptionsSizeChangerTop},"&-quick-jumper":{height:Ae.itemSizeSM,lineHeight:`${Ae.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,vt.x0)(Ae)),{width:Ae.paginationMiniQuickJumperInputWidth,height:Ae.controlHeightSM})}}}},Ut=Ae=>{const{componentCls:Ue}=Ae;return{[`
|
|
|
&${Ue}-simple ${Ue}-prev,
|
|
|
&${Ue}-simple ${Ue}-next
|
|
|
`]:{height:Ae.itemSizeSM,lineHeight:`${Ae.itemSizeSM}px`,verticalAlign:"top",[`${Ue}-item-link`]:{height:Ae.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:Ae.colorBgTextHover},"&:active":{backgroundColor:Ae.colorBgTextActive},"&::after":{height:Ae.itemSizeSM,lineHeight:`${Ae.itemSizeSM}px`}}},[`&${Ue}-simple ${Ue}-simple-pager`]:{display:"inline-block",height:Ae.itemSizeSM,marginInlineEnd:Ae.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:Ae.marginXS,padding:`0 ${Ae.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:Ae.itemInputBg,border:`${Ae.lineWidth}px ${Ae.lineType} ${Ae.colorBorder}`,borderRadius:Ae.borderRadius,outline:"none",transition:`border-color ${Ae.motionDurationMid}`,color:"inherit","&:hover":{borderColor:Ae.colorPrimary},"&:focus":{borderColor:Ae.colorPrimaryHover,boxShadow:`${Ae.inputOutlineOffset}px 0 ${Ae.controlOutlineWidth}px ${Ae.controlOutline}`},"&[disabled]":{color:Ae.colorTextDisabled,backgroundColor:Ae.colorBgContainerDisabled,borderColor:Ae.colorBorder,cursor:"not-allowed"}}}}},Wt=Ae=>{const{componentCls:Ue}=Ae;return{[`${Ue}-jump-prev, ${Ue}-jump-next`]:{outline:0,[`${Ue}-item-container`]:{position:"relative",[`${Ue}-item-link-icon`]:{color:Ae.colorPrimary,fontSize:Ae.fontSizeSM,opacity:0,transition:`all ${Ae.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${Ue}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:Ae.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:Ae.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:Ae.paginationEllipsisTextIndent,opacity:1,transition:`all ${Ae.motionDurationMid}`}},"&:hover":{[`${Ue}-item-link-icon`]:{opacity:1},[`${Ue}-item-ellipsis`]:{opacity:0}}},[`
|
|
|
${Ue}-prev,
|
|
|
${Ue}-jump-prev,
|
|
|
${Ue}-jump-next
|
|
|
`]:{marginInlineEnd:Ae.marginXS},[`
|
|
|
${Ue}-prev,
|
|
|
${Ue}-next,
|
|
|
${Ue}-jump-prev,
|
|
|
${Ue}-jump-next
|
|
|
`]:{display:"inline-block",minWidth:Ae.itemSize,height:Ae.itemSize,color:Ae.colorText,fontFamily:Ae.fontFamily,lineHeight:`${Ae.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:Ae.borderRadius,cursor:"pointer",transition:`all ${Ae.motionDurationMid}`},[`${Ue}-prev, ${Ue}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:Ae.colorText,cursor:"pointer",userSelect:"none"},[`${Ue}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:Ae.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${Ae.lineWidth}px ${Ae.lineType} transparent`,borderRadius:Ae.borderRadius,outline:"none",transition:`all ${Ae.motionDurationMid}`},[`&:hover ${Ue}-item-link`]:{backgroundColor:Ae.colorBgTextHover},[`&:active ${Ue}-item-link`]:{backgroundColor:Ae.colorBgTextActive},[`&${Ue}-disabled:hover`]:{[`${Ue}-item-link`]:{backgroundColor:"transparent"}}},[`${Ue}-slash`]:{marginInlineEnd:Ae.paginationSlashMarginInlineEnd,marginInlineStart:Ae.paginationSlashMarginInlineStart},[`${Ue}-options`]:{display:"inline-block",marginInlineStart:Ae.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:Ae.controlHeight,marginInlineStart:Ae.marginXS,lineHeight:`${Ae.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,vt.ik)(Ae)),{width:Ae.controlHeightLG*1.25,height:Ae.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:Ae.marginXS,marginInlineEnd:Ae.marginXS})}}}},$t=Ae=>{const{componentCls:Ue}=Ae;return{[`${Ue}-item`]:{display:"inline-block",minWidth:Ae.itemSize,height:Ae.itemSize,marginInlineEnd:Ae.marginXS,fontFamily:Ae.fontFamily,lineHeight:`${Ae.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${Ae.lineWidth}px ${Ae.lineType} transparent`,borderRadius:Ae.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${Ae.paginationItemPaddingInline}px`,color:Ae.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${Ue}-item-active)`]:{"&:hover":{transition:`all ${Ae.motionDurationMid}`,backgroundColor:Ae.colorBgTextHover},"&:active":{backgroundColor:Ae.colorBgTextActive}},"&-active":{fontWeight:Ae.fontWeightStrong,backgroundColor:Ae.itemActiveBg,borderColor:Ae.colorPrimary,a:{color:Ae.colorPrimary},"&:hover":{borderColor:Ae.colorPrimaryHover},"&:hover a":{color:Ae.colorPrimaryHover}}}}},ft=Ae=>{const{componentCls:Ue}=Ae;return{[Ue]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Bt.Wf)(Ae)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${Ue}-total-text`]:{display:"inline-block",height:Ae.itemSize,marginInlineEnd:Ae.marginXS,lineHeight:`${Ae.itemSize-2}px`,verticalAlign:"middle"}}),$t(Ae)),Wt(Ae)),Ut(Ae)),xn(Ae)),Kt(Ae)),{[`@media only screen and (max-width: ${Ae.screenLG}px)`]:{[`${Ue}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${Ae.screenSM}px)`]:{[`${Ue}-options`]:{display:"none"}}}),[`&${Ae.componentCls}-rtl`]:{direction:"rtl"}}},We=Ae=>{const{componentCls:Ue}=Ae;return{[`${Ue}${Ue}-disabled:not(${Ue}-mini)`]:{"&, &:hover":{[`${Ue}-item-link`]:{borderColor:Ae.colorBorder}},"&:focus-visible":{[`${Ue}-item-link`]:{borderColor:Ae.colorBorder}},[`${Ue}-item, ${Ue}-item-link`]:{backgroundColor:Ae.colorBgContainerDisabled,borderColor:Ae.colorBorder,[`&:hover:not(${Ue}-item-active)`]:{backgroundColor:Ae.colorBgContainerDisabled,borderColor:Ae.colorBorder,a:{color:Ae.colorTextDisabled}},[`&${Ue}-item-active`]:{backgroundColor:Ae.itemActiveBgDisabled}},[`${Ue}-prev, ${Ue}-next`]:{"&:hover button":{backgroundColor:Ae.colorBgContainerDisabled,borderColor:Ae.colorBorder,color:Ae.colorTextDisabled},[`${Ue}-item-link`]:{backgroundColor:Ae.colorBgContainerDisabled,borderColor:Ae.colorBorder}}},[`${Ue}:not(${Ue}-mini)`]:{[`${Ue}-prev, ${Ue}-next`]:{"&:hover button":{borderColor:Ae.colorPrimaryHover,backgroundColor:Ae.itemBg},[`${Ue}-item-link`]:{backgroundColor:Ae.itemLinkBg,borderColor:Ae.colorBorder},[`&:hover ${Ue}-item-link`]:{borderColor:Ae.colorPrimary,backgroundColor:Ae.itemBg,color:Ae.colorPrimary},[`&${Ue}-disabled`]:{[`${Ue}-item-link`]:{borderColor:Ae.colorBorder,color:Ae.colorTextDisabled}}},[`${Ue}-item`]:{backgroundColor:Ae.itemBg,border:`${Ae.lineWidth}px ${Ae.lineType} ${Ae.colorBorder}`,[`&:hover:not(${Ue}-item-active)`]:{borderColor:Ae.colorPrimary,backgroundColor:Ae.itemBg,a:{color:Ae.colorPrimary}},"&-active":{borderColor:Ae.colorPrimary}}}}},Be=Ae=>{const{componentCls:Ue}=Ae;return{[`${Ue}:not(${Ue}-disabled)`]:{[`${Ue}-item`]:Object.assign({},(0,Bt.Qy)(Ae)),[`${Ue}-jump-prev, ${Ue}-jump-next`]:{"&:focus-visible":Object.assign({[`${Ue}-item-link-icon`]:{opacity:1},[`${Ue}-item-ellipsis`]:{opacity:0}},(0,Bt.oN)(Ae))},[`${Ue}-prev, ${Ue}-next`]:{[`&:focus-visible ${Ue}-item-link`]:Object.assign({},(0,Bt.oN)(Ae))}}}};var qe=(0,jt.Z)("Pagination",Ae=>{const Ue=(0,un.TS)(Ae,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:Ae.marginXXS/2,paginationMiniQuickJumperInputWidth:Ae.controlHeightLG*1.1,paginationItemPaddingInline:Ae.marginXXS*1.5,paginationEllipsisLetterSpacing:Ae.marginXXS/2,paginationSlashMarginInlineStart:Ae.marginXXS,paginationSlashMarginInlineEnd:Ae.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,vt.e5)(Ae),(0,vt.TM)(Ae));return[ft(Ue),Be(Ue),Ae.wireframe&&We(Ue)]},Ae=>({itemBg:Ae.colorBgContainer,itemSize:Ae.controlHeight,itemSizeSM:Ae.controlHeightSM,itemActiveBg:Ae.colorBgContainer,itemLinkBg:Ae.colorBgContainer,itemActiveColorDisabled:Ae.colorTextDisabled,itemActiveBgDisabled:Ae.controlItemBgActiveDisabled,itemInputBg:Ae.colorBgContainer,miniOptionsSizeChangerTop:0})),et=function(Ae,Ue){var Ke={};for(var Ze in Ae)Object.prototype.hasOwnProperty.call(Ae,Ze)&&Ue.indexOf(Ze)<0&&(Ke[Ze]=Ae[Ze]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var lt=0,Ze=Object.getOwnPropertySymbols(Ae);lt<Ze.length;lt++)Ue.indexOf(Ze[lt])<0&&Object.prototype.propertyIsEnumerable.call(Ae,Ze[lt])&&(Ke[Ze[lt]]=Ae[Ze[lt]]);return Ke},Xe=Ae=>{const{prefixCls:Ue,selectPrefixCls:Ke,className:Ze,rootClassName:lt,style:xt,size:tn,locale:en,selectComponentClass:Jt,responsive:gn,showSizeChanger:Mn}=Ae,yn=et(Ae,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:kn}=(0,ht.Z)(gn),{getPrefixCls:$n,direction:An,pagination:oi={}}=me.useContext(ut.E_),ai=$n("pagination",Ue),[Di,Pi]=qe(ai),Xi=Mn!=null?Mn:oi.showSizeChanger,or=me.useMemo(()=>{const ot=me.createElement("span",{className:`${ai}-item-ellipsis`},"\u2022\u2022\u2022"),Rr=me.createElement("button",{className:`${ai}-item-link`,type:"button",tabIndex:-1},An==="rtl"?me.createElement(ce.Z,null):me.createElement(ge.Z,null)),Nr=me.createElement("button",{className:`${ai}-item-link`,type:"button",tabIndex:-1},An==="rtl"?me.createElement(ge.Z,null):me.createElement(ce.Z,null)),Hr=me.createElement("a",{className:`${ai}-item-link`},me.createElement("div",{className:`${ai}-item-container`},An==="rtl"?me.createElement(xe.Z,{className:`${ai}-item-link-icon`}):me.createElement(Se,{className:`${ai}-item-link-icon`}),ot)),uo=me.createElement("a",{className:`${ai}-item-link`},me.createElement("div",{className:`${ai}-item-container`},An==="rtl"?me.createElement(Se,{className:`${ai}-item-link-icon`}):me.createElement(xe.Z,{className:`${ai}-item-link-icon`}),ot));return{prevIcon:Rr,nextIcon:Nr,jumpPrevIcon:Hr,jumpNextIcon:uo}},[An,ai]),[ar]=(0,rt.Z)("Pagination",St.Z),dr=Object.assign(Object.assign({},ar),en),no=(0,Ft.Z)(tn),Ir=no==="small"||!!(kn&&!no&&gn),xi=$n("select",Ke),wr=de()({[`${ai}-mini`]:Ir,[`${ai}-rtl`]:An==="rtl"},oi==null?void 0:oi.className,Ze,lt,Pi),Mr=Object.assign(Object.assign({},oi==null?void 0:oi.style),xt);return Di(me.createElement(it,Object.assign({},or,yn,{style:Mr,prefixCls:ai,selectPrefixCls:xi,className:wr,selectComponentClass:Jt||(Ir?yt:_t),locale:dr,showSizeChanger:Xi})))},Re=Xe},57809:function(Cn,Yt,Ee){"use strict";var Le=Ee(92310),me=Ee.n(Le),Ie=Ee(77861),Te=Ee(2738),be=Ee(59301),Pe=Ee(53487),he=Ee(62892),Se=Ee(19080),xe=Ee(36355),ge=Ee(1684),ce=Ee(93891),ve=Ee(19716),de=Ee(32441),ue=Ee(33234),z=Ee(14154),ee=Ee(58582),oe=Ee(84443),ie=Ee(66339),se=function(ke,Ne){var je={};for(var Ve in ke)Object.prototype.hasOwnProperty.call(ke,Ve)&&Ne.indexOf(Ve)<0&&(je[Ve]=ke[Ve]);if(ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Qe=0,Ve=Object.getOwnPropertySymbols(ke);Qe<Ve.length;Qe++)Ne.indexOf(Ve[Qe])<0&&Object.prototype.propertyIsEnumerable.call(ke,Ve[Qe])&&(je[Ve[Qe]]=ke[Ve[Qe]]);return je};const le="SECRET_COMBOBOX_MODE_DO_NOT_USE",ye=(ke,Ne)=>{var je,{prefixCls:Ve,bordered:Qe=!0,className:Ge,rootClassName:mt,getPopupContainer:ct,popupClassName:Ct,dropdownClassName:it,listHeight:St=256,placement:ut,listItemHeight:Ft=24,size:ht,disabled:rt,notFoundContent:dt,status:yt,builtinPlacements:_t,dropdownMatchSelectWidth:vt,popupMatchSelectWidth:Bt,direction:jt,style:un,allowClear:Kt}=ke,xn=se(ke,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:Ut,getPrefixCls:Wt,renderEmpty:$t,direction:ft,virtual:We,popupMatchSelectWidth:Be,popupOverflow:qe,select:et}=be.useContext(xe.E_),He=Wt("select",Ve),Xe=Wt(),Re=jt!=null?jt:ft,{compactSize:Ae,compactItemClassnames:Ue}=(0,ue.ri)(He,Re),[Ke,Ze]=(0,z.Z)(He),lt=be.useMemo(()=>{const{mode:Mr}=xn;if(Mr!=="combobox")return Mr===le?"combobox":Mr},[xn.mode]),xt=lt==="multiple"||lt==="tags",tn=(0,oe.Z)(xn.suffixIcon,xn.showArrow),en=(je=Bt!=null?Bt:vt)!==null&&je!==void 0?je:Be,{status:Jt,hasFeedback:gn,isFormItemInput:Mn,feedbackIcon:yn}=be.useContext(de.aM),kn=(0,Se.F)(Jt,yt);let $n;dt!==void 0?$n=dt:lt==="combobox"?$n=null:$n=($t==null?void 0:$t("Select"))||be.createElement(ce.Z,{componentName:"Select"});const{suffixIcon:An,itemIcon:oi,removeIcon:ai,clearIcon:Di}=(0,ie.Z)(Object.assign(Object.assign({},xn),{multiple:xt,hasFeedback:gn,feedbackIcon:yn,showSuffixIcon:tn,prefixCls:He,showArrow:xn.showArrow,componentName:"Select"})),Pi=Kt===!0?{clearIcon:Di}:Kt,Xi=(0,Te.Z)(xn,["suffixIcon","itemIcon"]),or=me()(Ct||it,{[`${He}-dropdown-${Re}`]:Re==="rtl"},mt,Ze),ar=(0,ve.Z)(Mr=>{var ot;return(ot=ht!=null?ht:Ae)!==null&&ot!==void 0?ot:Mr}),dr=be.useContext(ge.Z),no=rt!=null?rt:dr,Ir=me()({[`${He}-lg`]:ar==="large",[`${He}-sm`]:ar==="small",[`${He}-rtl`]:Re==="rtl",[`${He}-borderless`]:!Qe,[`${He}-in-form-item`]:Mn},(0,Se.Z)(He,kn,gn),Ue,et==null?void 0:et.className,Ge,mt,Ze),xi=be.useMemo(()=>ut!==void 0?ut:Re==="rtl"?"bottomRight":"bottomLeft",[ut,Re]),wr=(0,ee.Z)(_t,qe);return Ke(be.createElement(Ie.ZP,Object.assign({ref:Ne,virtual:We,showSearch:et==null?void 0:et.showSearch},Xi,{style:Object.assign(Object.assign({},et==null?void 0:et.style),un),dropdownMatchSelectWidth:en,builtinPlacements:wr,transitionName:(0,he.m)(Xe,"slide-up",xn.transitionName),listHeight:St,listItemHeight:Ft,mode:lt,prefixCls:He,placement:xi,direction:Re,suffixIcon:An,menuItemSelectedIcon:oi,removeIcon:ai,allowClear:Pi,notFoundContent:$n,className:Ir,getPopupContainer:ct||Ut,dropdownClassName:or,disabled:no})))},we=be.forwardRef(ye),Ce=(0,Pe.Z)(we);we.SECRET_COMBOBOX_MODE_DO_NOT_USE=le,we.Option=Ie.Wx,we.OptGroup=Ie.Xo,we._InternalPanelDoNotUseOrYouWillBeFired=Ce,Yt.default=we},14154:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return we}});var Le=Ee(17313),me=Ee(74207),Ie=Ee(37613),Te=Ee(83116),be=Ee(13826),Pe=Ee(92899);const he=Ce=>{const{optionHeight:ke,optionFontSize:Ne,optionLineHeight:je,optionPadding:Ve}=Ce;return{position:"relative",display:"block",minHeight:ke,padding:Ve,color:Ce.colorText,fontWeight:"normal",fontSize:Ne,lineHeight:je,boxSizing:"border-box"}};var xe=Ce=>{const{antCls:ke,componentCls:Ne}=Ce,je=`${Ne}-item`,Ve=`&${ke}-slide-up-enter${ke}-slide-up-enter-active`,Qe=`&${ke}-slide-up-appear${ke}-slide-up-appear-active`,Ge=`&${ke}-slide-up-leave${ke}-slide-up-leave-active`,mt=`${Ne}-dropdown-placement-`;return[{[`${Ne}-dropdown`]:Object.assign(Object.assign({},(0,Le.Wf)(Ce)),{position:"absolute",top:-9999,zIndex:Ce.zIndexPopup,boxSizing:"border-box",padding:Ce.paddingXXS,overflow:"hidden",fontSize:Ce.fontSize,fontVariant:"initial",backgroundColor:Ce.colorBgElevated,borderRadius:Ce.borderRadiusLG,outline:"none",boxShadow:Ce.boxShadowSecondary,[`
|
|
|
${Ve}${mt}bottomLeft,
|
|
|
${Qe}${mt}bottomLeft
|
|
|
`]:{animationName:be.fJ},[`
|
|
|
${Ve}${mt}topLeft,
|
|
|
${Qe}${mt}topLeft,
|
|
|
${Ve}${mt}topRight,
|
|
|
${Qe}${mt}topRight
|
|
|
`]:{animationName:be.Qt},[`${Ge}${mt}bottomLeft`]:{animationName:be.Uw},[`
|
|
|
${Ge}${mt}topLeft,
|
|
|
${Ge}${mt}topRight
|
|
|
`]:{animationName:be.ly},"&-hidden":{display:"none"},[`${je}`]:Object.assign(Object.assign({},he(Ce)),{cursor:"pointer",transition:`background ${Ce.motionDurationSlow} ease`,borderRadius:Ce.borderRadiusSM,"&-group":{color:Ce.colorTextDescription,fontSize:Ce.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},Le.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${je}-option-disabled)`]:{backgroundColor:Ce.optionActiveBg},[`&-selected:not(${je}-option-disabled)`]:{color:Ce.optionSelectedColor,fontWeight:Ce.optionSelectedFontWeight,backgroundColor:Ce.optionSelectedBg,[`${je}-option-state`]:{color:Ce.colorPrimary}},"&-disabled":{[`&${je}-option-selected`]:{backgroundColor:Ce.colorBgContainerDisabled},color:Ce.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:Ce.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,be.oN)(Ce,"slide-up"),(0,be.oN)(Ce,"slide-down"),(0,Pe.Fm)(Ce,"move-up"),(0,Pe.Fm)(Ce,"move-down")]};const ge=2,ce=Ce=>{let{controlHeightSM:ke,controlHeight:Ne,lineWidth:je}=Ce;const Ve=(Ne-ke)/2-je,Qe=Math.ceil(Ve/2);return[Ve,Qe]};function ve(Ce,ke){const{componentCls:Ne,iconCls:je}=Ce,Ve=`${Ne}-selection-overflow`,Qe=Ce.multipleSelectItemHeight,[Ge]=ce(Ce),mt=ke?`${Ne}-${ke}`:"";return{[`${Ne}-multiple${mt}`]:{fontSize:Ce.fontSize,[Ve]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${Ne}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${Ge-ge}px ${ge*2}px`,borderRadius:Ce.borderRadius,[`${Ne}-show-search&`]:{cursor:"text"},[`${Ne}-disabled&`]:{background:Ce.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${ge}px 0`,lineHeight:`${Qe}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${Ne}-show-arrow ${Ne}-selector,
|
|
|
&${Ne}-allow-clear ${Ne}-selector
|
|
|
`]:{paddingInlineEnd:Ce.fontSizeIcon+Ce.controlPaddingHorizontal},[`${Ne}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:Qe,marginTop:ge,marginBottom:ge,lineHeight:`${Qe-Ce.lineWidth*2}px`,background:Ce.multipleItemBg,border:`${Ce.lineWidth}px ${Ce.lineType} ${Ce.multipleItemBorderColor}`,borderRadius:Ce.borderRadiusSM,cursor:"default",transition:`font-size ${Ce.motionDurationSlow}, line-height ${Ce.motionDurationSlow}, height ${Ce.motionDurationSlow}`,userSelect:"none",marginInlineEnd:ge*2,paddingInlineStart:Ce.paddingXS,paddingInlineEnd:Ce.paddingXS/2,[`${Ne}-disabled&`]:{color:Ce.multipleItemColorDisabled,borderColor:Ce.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:Ce.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,Le.Ro)()),{display:"inline-flex",alignItems:"center",color:Ce.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${je}`]:{verticalAlign:"-0.2em"},"&:hover":{color:Ce.colorIconHover}})},[`${Ve}-item + ${Ve}-item`]:{[`${Ne}-selection-search`]:{marginInlineStart:0}},[`${Ne}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:Ce.inputPaddingHorizontalBase-Ge,"\n &-input,\n &-mirror\n ":{height:Qe,fontFamily:Ce.fontFamily,lineHeight:`${Qe}px`,transition:`all ${Ce.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${Ne}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:Ce.inputPaddingHorizontalBase,insetInlineEnd:Ce.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${Ce.motionDurationSlow}`}}}}var ue=Ce=>{const{componentCls:ke}=Ce,Ne=(0,Ie.TS)(Ce,{controlHeight:Ce.controlHeightSM,multipleSelectItemHeight:Ce.controlHeightXS,borderRadius:Ce.borderRadiusSM,borderRadiusSM:Ce.borderRadiusXS}),je=(0,Ie.TS)(Ce,{fontSize:Ce.fontSizeLG,controlHeight:Ce.controlHeightLG,multipleSelectItemHeight:Ce.multipleItemHeightLG,borderRadius:Ce.borderRadiusLG,borderRadiusSM:Ce.borderRadius}),[,Ve]=ce(Ce);return[ve(Ce),ve(Ne,"sm"),{[`${ke}-multiple${ke}-sm`]:{[`${ke}-selection-placeholder`]:{insetInline:Ce.controlPaddingHorizontalSM-Ce.lineWidth},[`${ke}-selection-search`]:{marginInlineStart:Ve}}},ve(je,"lg")]};function z(Ce,ke){const{componentCls:Ne,inputPaddingHorizontalBase:je,borderRadius:Ve}=Ce,Qe=Ce.controlHeight-Ce.lineWidth*2,Ge=Math.ceil(Ce.fontSize*1.25),mt=ke?`${Ne}-${ke}`:"";return{[`${Ne}-single${mt}`]:{fontSize:Ce.fontSize,[`${Ne}-selector`]:Object.assign(Object.assign({},(0,Le.Wf)(Ce)),{display:"flex",borderRadius:Ve,[`${Ne}-selection-search`]:{position:"absolute",top:0,insetInlineStart:je,insetInlineEnd:je,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${Ne}-selection-item,
|
|
|
${Ne}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${Qe}px`,transition:`all ${Ce.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${Qe}px`}},[`${Ne}-selection-item`]:{position:"relative",userSelect:"none"},[`${Ne}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${Ne}-selection-item:after`,`${Ne}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${Ne}-show-arrow ${Ne}-selection-item,
|
|
|
&${Ne}-show-arrow ${Ne}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Ge},[`&${Ne}-open ${Ne}-selection-item`]:{color:Ce.colorTextPlaceholder},[`&:not(${Ne}-customize-input)`]:{[`${Ne}-selector`]:{width:"100%",height:Ce.controlHeight,padding:`0 ${je}px`,[`${Ne}-selection-search-input`]:{height:Qe},"&:after":{lineHeight:`${Qe}px`}}},[`&${Ne}-customize-input`]:{[`${Ne}-selector`]:{"&:after":{display:"none"},[`${Ne}-selection-search`]:{position:"static",width:"100%"},[`${Ne}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${je}px`,"&:after":{display:"none"}}}}}}}function ee(Ce){const{componentCls:ke}=Ce,Ne=Ce.controlPaddingHorizontalSM-Ce.lineWidth;return[z(Ce),z((0,Ie.TS)(Ce,{controlHeight:Ce.controlHeightSM,borderRadius:Ce.borderRadiusSM}),"sm"),{[`${ke}-single${ke}-sm`]:{[`&:not(${ke}-customize-input)`]:{[`${ke}-selection-search`]:{insetInlineStart:Ne,insetInlineEnd:Ne},[`${ke}-selector`]:{padding:`0 ${Ne}px`},[`&${ke}-show-arrow ${ke}-selection-search`]:{insetInlineEnd:Ne+Ce.fontSize*1.5},[`
|
|
|
&${ke}-show-arrow ${ke}-selection-item,
|
|
|
&${ke}-show-arrow ${ke}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Ce.fontSize*1.5}}}},z((0,Ie.TS)(Ce,{controlHeight:Ce.singleItemHeightLG,fontSize:Ce.fontSizeLG,borderRadius:Ce.borderRadiusLG}),"lg")]}const oe=Ce=>{const{componentCls:ke,selectorBg:Ne}=Ce;return{position:"relative",backgroundColor:Ne,border:`${Ce.lineWidth}px ${Ce.lineType} ${Ce.colorBorder}`,transition:`all ${Ce.motionDurationMid} ${Ce.motionEaseInOut}`,input:{cursor:"pointer"},[`${ke}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${ke}-disabled&`]:{color:Ce.colorTextDisabled,background:Ce.colorBgContainerDisabled,cursor:"not-allowed",[`${ke}-multiple&`]:{background:Ce.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},ie=function(Ce,ke){let Ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:je,borderHoverColor:Ve,outlineColor:Qe,antCls:Ge}=ke,mt=Ne?{[`${je}-selector`]:{borderColor:Ve}}:{};return{[Ce]:{[`&:not(${je}-disabled):not(${je}-customize-input):not(${Ge}-pagination-size-changer)`]:Object.assign(Object.assign({},mt),{[`${je}-focused& ${je}-selector`]:{borderColor:Ve,boxShadow:`0 0 0 ${ke.controlOutlineWidth}px ${Qe}`,outline:0},[`&:hover ${je}-selector`]:{borderColor:Ve}})}}},se=Ce=>{const{componentCls:ke}=Ce;return{[`${ke}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},le=Ce=>{const{componentCls:ke,inputPaddingHorizontalBase:Ne,iconCls:je}=Ce;return{[ke]:Object.assign(Object.assign({},(0,Le.Wf)(Ce)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${ke}-customize-input) ${ke}-selector`]:Object.assign(Object.assign({},oe(Ce)),se(Ce)),[`${ke}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},Le.vS),[`${ke}-selection-placeholder`]:Object.assign(Object.assign({},Le.vS),{flex:1,color:Ce.colorTextPlaceholder,pointerEvents:"none"}),[`${ke}-arrow`]:Object.assign(Object.assign({},(0,Le.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ne,height:Ce.fontSizeIcon,marginTop:-Ce.fontSizeIcon/2,color:Ce.colorTextQuaternary,fontSize:Ce.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[je]:{verticalAlign:"top",transition:`transform ${Ce.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${ke}-suffix)`]:{pointerEvents:"auto"}},[`${ke}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${ke}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ne,zIndex:1,display:"inline-block",width:Ce.fontSizeIcon,height:Ce.fontSizeIcon,marginTop:-Ce.fontSizeIcon/2,color:Ce.colorTextQuaternary,fontSize:Ce.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:Ce.clearBg,cursor:"pointer",opacity:0,transition:`color ${Ce.motionDurationMid} ease, opacity ${Ce.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:Ce.colorTextTertiary}},"&:hover":{[`${ke}-clear`]:{opacity:1}}}),[`${ke}-has-feedback`]:{[`${ke}-clear`]:{insetInlineEnd:Ne+Ce.fontSize+Ce.paddingXS}}}},ye=Ce=>{const{componentCls:ke}=Ce;return[{[ke]:{[`&-borderless ${ke}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${ke}-in-form-item`]:{width:"100%"}}},le(Ce),ee(Ce),ue(Ce),xe(Ce),{[`${ke}-rtl`]:{direction:"rtl"}},ie(ke,(0,Ie.TS)(Ce,{borderHoverColor:Ce.colorPrimaryHover,outlineColor:Ce.controlOutline})),ie(`${ke}-status-error`,(0,Ie.TS)(Ce,{borderHoverColor:Ce.colorErrorHover,outlineColor:Ce.colorErrorOutline}),!0),ie(`${ke}-status-warning`,(0,Ie.TS)(Ce,{borderHoverColor:Ce.colorWarningHover,outlineColor:Ce.colorWarningOutline}),!0),(0,me.c)(Ce,{borderElCls:`${ke}-selector`,focusElCls:`${ke}-focused`})]};var we=(0,Te.Z)("Select",(Ce,ke)=>{let{rootPrefixCls:Ne}=ke;const je=(0,Ie.TS)(Ce,{rootPrefixCls:Ne,inputPaddingHorizontalBase:Ce.paddingSM-1,multipleSelectItemHeight:Ce.multipleItemHeight});return[ye(je)]},Ce=>{const{fontSize:ke,lineHeight:Ne,controlHeight:je,controlPaddingHorizontal:Ve,zIndexPopupBase:Qe,colorText:Ge,fontWeightStrong:mt,controlItemBgActive:ct,controlItemBgHover:Ct,colorBgContainer:it,colorFillSecondary:St,controlHeightLG:ut,controlHeightSM:Ft,colorBgContainerDisabled:ht,colorTextDisabled:rt}=Ce;return{zIndexPopup:Qe+50,optionSelectedColor:Ge,optionSelectedFontWeight:mt,optionSelectedBg:ct,optionActiveBg:Ct,optionPadding:`${(je-ke*Ne)/2}px ${Ve}px`,optionFontSize:ke,optionLineHeight:Ne,optionHeight:je,selectorBg:it,clearBg:it,singleItemHeightLG:ut,multipleItemBg:St,multipleItemBorderColor:"transparent",multipleItemHeight:Ft,multipleItemHeightLG:je,multipleSelectorBgDisabled:ht,multipleItemColorDisabled:rt,multipleItemBorderColorDisabled:"transparent"}})},58582:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return me}});const Le=Ie=>{const be={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:Ie==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},be),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},be),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},be),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},be),{points:["br","tr"],offset:[0,-4]})}};function me(Ie,Te){return Ie||Le(Te)}},84443:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Le}});function Le(me,Ie){return Ie!==void 0?Ie:me!==null}},66339:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Se}});var Le=Ee(40001),me=Ee(19248),Ie=Ee(99267),Te=Ee(84105),be=Ee(58617),Pe=Ee(47472),he=Ee(59301);function Se(xe){let{suffixIcon:ge,clearIcon:ce,menuItemSelectedIcon:ve,removeIcon:de,loading:ue,multiple:z,hasFeedback:ee,prefixCls:oe,showSuffixIcon:ie,feedbackIcon:se,showArrow:le,componentName:ye}=xe;const we=ce!=null?ce:he.createElement(me.Z,null),Ce=Ve=>ge===null&&!ee&&!le?null:he.createElement(he.Fragment,null,ie!==!1&&Ve,ee&&se);let ke=null;if(ge!==void 0)ke=Ce(ge);else if(ue)ke=Ce(he.createElement(be.Z,{spin:!0}));else{const Ve=`${oe}-suffix`;ke=Qe=>{let{open:Ge,showSearch:mt}=Qe;return Ce(Ge&&mt?he.createElement(Pe.Z,{className:Ve}):he.createElement(Te.Z,{className:Ve}))}}let Ne=null;ve!==void 0?Ne=ve:z?Ne=he.createElement(Le.Z,null):Ne=null;let je=null;return de!==void 0?je=de:je=he.createElement(Ie.Z,null),{clearIcon:we,suffixIcon:ke,itemIcon:Ne,removeIcon:je}}},61621:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return qe}});var Le=Ee(92310),me=Ee.n(Le),Ie=Ee(59301),Te=Ee(36355),be=Ee(2738),he=et=>{const{prefixCls:He,className:Xe,style:Re,size:Ae,shape:Ue}=et,Ke=me()({[`${He}-lg`]:Ae==="large",[`${He}-sm`]:Ae==="small"}),Ze=me()({[`${He}-circle`]:Ue==="circle",[`${He}-square`]:Ue==="square",[`${He}-round`]:Ue==="round"}),lt=Ie.useMemo(()=>typeof Ae=="number"?{width:Ae,height:Ae,lineHeight:`${Ae}px`}:{},[Ae]);return Ie.createElement("span",{className:me()(He,Ke,Ze,Xe),style:Object.assign(Object.assign({},lt),Re)})},Se=Ee(93083),xe=Ee(83116),ge=Ee(37613);const ce=new Se.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),ve=et=>({height:et,lineHeight:`${et}px`}),de=et=>Object.assign({width:et},ve(et)),ue=et=>({background:et.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:ce,animationDuration:et.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),z=et=>Object.assign({width:et*5,minWidth:et*5},ve(et)),ee=et=>{const{skeletonAvatarCls:He,gradientFromColor:Xe,controlHeight:Re,controlHeightLG:Ae,controlHeightSM:Ue}=et;return{[`${He}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Xe},de(Re)),[`${He}${He}-circle`]:{borderRadius:"50%"},[`${He}${He}-lg`]:Object.assign({},de(Ae)),[`${He}${He}-sm`]:Object.assign({},de(Ue))}},oe=et=>{const{controlHeight:He,borderRadiusSM:Xe,skeletonInputCls:Re,controlHeightLG:Ae,controlHeightSM:Ue,gradientFromColor:Ke}=et;return{[`${Re}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Ke,borderRadius:Xe},z(He)),[`${Re}-lg`]:Object.assign({},z(Ae)),[`${Re}-sm`]:Object.assign({},z(Ue))}},ie=et=>Object.assign({width:et},ve(et)),se=et=>{const{skeletonImageCls:He,imageSizeBase:Xe,gradientFromColor:Re,borderRadiusSM:Ae}=et;return{[`${He}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:Re,borderRadius:Ae},ie(Xe*2)),{[`${He}-path`]:{fill:"#bfbfbf"},[`${He}-svg`]:Object.assign(Object.assign({},ie(Xe)),{maxWidth:Xe*4,maxHeight:Xe*4}),[`${He}-svg${He}-svg-circle`]:{borderRadius:"50%"}}),[`${He}${He}-circle`]:{borderRadius:"50%"}}},le=(et,He,Xe)=>{const{skeletonButtonCls:Re}=et;return{[`${Xe}${Re}-circle`]:{width:He,minWidth:He,borderRadius:"50%"},[`${Xe}${Re}-round`]:{borderRadius:He}}},ye=et=>Object.assign({width:et*2,minWidth:et*2},ve(et)),we=et=>{const{borderRadiusSM:He,skeletonButtonCls:Xe,controlHeight:Re,controlHeightLG:Ae,controlHeightSM:Ue,gradientFromColor:Ke}=et;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${Xe}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Ke,borderRadius:He,width:Re*2,minWidth:Re*2},ye(Re))},le(et,Re,Xe)),{[`${Xe}-lg`]:Object.assign({},ye(Ae))}),le(et,Ae,`${Xe}-lg`)),{[`${Xe}-sm`]:Object.assign({},ye(Ue))}),le(et,Ue,`${Xe}-sm`))},Ce=et=>{const{componentCls:He,skeletonAvatarCls:Xe,skeletonTitleCls:Re,skeletonParagraphCls:Ae,skeletonButtonCls:Ue,skeletonInputCls:Ke,skeletonImageCls:Ze,controlHeight:lt,controlHeightLG:xt,controlHeightSM:tn,gradientFromColor:en,padding:Jt,marginSM:gn,borderRadius:Mn,titleHeight:yn,blockRadius:kn,paragraphLiHeight:$n,controlHeightXS:An,paragraphMarginTop:oi}=et;return{[`${He}`]:{display:"table",width:"100%",[`${He}-header`]:{display:"table-cell",paddingInlineEnd:Jt,verticalAlign:"top",[`${Xe}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:en},de(lt)),[`${Xe}-circle`]:{borderRadius:"50%"},[`${Xe}-lg`]:Object.assign({},de(xt)),[`${Xe}-sm`]:Object.assign({},de(tn))},[`${He}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${Re}`]:{width:"100%",height:yn,background:en,borderRadius:kn,[`+ ${Ae}`]:{marginBlockStart:tn}},[`${Ae}`]:{padding:0,"> li":{width:"100%",height:$n,listStyle:"none",background:en,borderRadius:kn,"+ li":{marginBlockStart:An}}},[`${Ae}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${He}-content`]:{[`${Re}, ${Ae} > li`]:{borderRadius:Mn}}},[`${He}-with-avatar ${He}-content`]:{[`${Re}`]:{marginBlockStart:gn,[`+ ${Ae}`]:{marginBlockStart:oi}}},[`${He}${He}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},we(et)),ee(et)),oe(et)),se(et)),[`${He}${He}-block`]:{width:"100%",[`${Ue}`]:{width:"100%"},[`${Ke}`]:{width:"100%"}},[`${He}${He}-active`]:{[`
|
|
|
${Re},
|
|
|
${Ae} > li,
|
|
|
${Xe},
|
|
|
${Ue},
|
|
|
${Ke},
|
|
|
${Ze}
|
|
|
`]:Object.assign({},ue(et))}}};var ke=(0,xe.Z)("Skeleton",et=>{const{componentCls:He}=et,Xe=(0,ge.TS)(et,{skeletonAvatarCls:`${He}-avatar`,skeletonTitleCls:`${He}-title`,skeletonParagraphCls:`${He}-paragraph`,skeletonButtonCls:`${He}-button`,skeletonInputCls:`${He}-input`,skeletonImageCls:`${He}-image`,imageSizeBase:et.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${et.gradientFromColor} 25%, ${et.gradientToColor} 37%, ${et.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[Ce(Xe)]},et=>{const{colorFillContent:He,colorFill:Xe}=et,Re=He,Ae=Xe;return{color:Re,colorGradientEnd:Ae,gradientFromColor:Re,gradientToColor:Ae,titleHeight:et.controlHeight/2,blockRadius:et.borderRadiusSM,paragraphMarginTop:et.marginLG+et.marginXXS,paragraphLiHeight:et.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),je=et=>{const{prefixCls:He,className:Xe,rootClassName:Re,active:Ae,shape:Ue="circle",size:Ke="default"}=et,{getPrefixCls:Ze}=Ie.useContext(Te.E_),lt=Ze("skeleton",He),[xt,tn]=ke(lt),en=(0,be.Z)(et,["prefixCls","className"]),Jt=me()(lt,`${lt}-element`,{[`${lt}-active`]:Ae},Xe,Re,tn);return xt(Ie.createElement("div",{className:Jt},Ie.createElement(he,Object.assign({prefixCls:`${lt}-avatar`,shape:Ue,size:Ke},en))))},Qe=et=>{const{prefixCls:He,className:Xe,rootClassName:Re,active:Ae,block:Ue=!1,size:Ke="default"}=et,{getPrefixCls:Ze}=Ie.useContext(Te.E_),lt=Ze("skeleton",He),[xt,tn]=ke(lt),en=(0,be.Z)(et,["prefixCls"]),Jt=me()(lt,`${lt}-element`,{[`${lt}-active`]:Ae,[`${lt}-block`]:Ue},Xe,Re,tn);return xt(Ie.createElement("div",{className:Jt},Ie.createElement(he,Object.assign({prefixCls:`${lt}-button`,size:Ke},en))))};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 ct=et=>{const{prefixCls:He,className:Xe,rootClassName:Re,style:Ae,active:Ue}=et,{getPrefixCls:Ke}=Ie.useContext(Te.E_),Ze=Ke("skeleton",He),[lt,xt]=ke(Ze),tn=me()(Ze,`${Ze}-element`,{[`${Ze}-active`]:Ue},Xe,Re,xt);return lt(Ie.createElement("div",{className:tn},Ie.createElement("div",{className:me()(`${Ze}-image`,Xe),style:Ae},Ie.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${Ze}-image-svg`},Ie.createElement("path",{d:Ge,className:`${Ze}-image-path`})))))},it=et=>{const{prefixCls:He,className:Xe,rootClassName:Re,active:Ae,block:Ue,size:Ke="default"}=et,{getPrefixCls:Ze}=Ie.useContext(Te.E_),lt=Ze("skeleton",He),[xt,tn]=ke(lt),en=(0,be.Z)(et,["prefixCls"]),Jt=me()(lt,`${lt}-element`,{[`${lt}-active`]:Ae,[`${lt}-block`]:Ue},Xe,Re,tn);return xt(Ie.createElement("div",{className:Jt},Ie.createElement(he,Object.assign({prefixCls:`${lt}-input`,size:Ke},en))))},St=Ee(72308),ut={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"},Ft=ut,ht=Ee(7657),rt=function(He,Xe){return Ie.createElement(ht.Z,(0,St.Z)({},He,{ref:Xe,icon:Ft}))},dt=Ie.forwardRef(rt),yt=dt,vt=et=>{const{prefixCls:He,className:Xe,rootClassName:Re,style:Ae,active:Ue,children:Ke}=et,{getPrefixCls:Ze}=Ie.useContext(Te.E_),lt=Ze("skeleton",He),[xt,tn]=ke(lt),en=me()(lt,`${lt}-element`,{[`${lt}-active`]:Ue},tn,Xe,Re),Jt=Ke!=null?Ke:Ie.createElement(yt,null);return xt(Ie.createElement("div",{className:en},Ie.createElement("div",{className:me()(`${lt}-image`,Xe),style:Ae},Jt)))},Bt=Ee(80702),un=et=>{const He=Ze=>{const{width:lt,rows:xt=2}=et;if(Array.isArray(lt))return lt[Ze];if(xt-1===Ze)return lt},{prefixCls:Xe,className:Re,style:Ae,rows:Ue}=et,Ke=(0,Bt.Z)(Array(Ue)).map((Ze,lt)=>Ie.createElement("li",{key:lt,style:{width:He(lt)}}));return Ie.createElement("ul",{className:me()(Xe,Re),style:Ae},Ke)},xn=et=>{let{prefixCls:He,className:Xe,width:Re,style:Ae}=et;return Ie.createElement("h3",{className:me()(He,Xe),style:Object.assign({width:Re},Ae)})};function Ut(et){return et&&typeof et=="object"?et:{}}function Wt(et,He){return et&&!He?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function $t(et,He){return!et&&He?{width:"38%"}:et&&He?{width:"50%"}:{}}function ft(et,He){const Xe={};return(!et||!He)&&(Xe.width="61%"),!et&&He?Xe.rows=3:Xe.rows=2,Xe}const We=et=>{const{prefixCls:He,loading:Xe,className:Re,rootClassName:Ae,style:Ue,children:Ke,avatar:Ze=!1,title:lt=!0,paragraph:xt=!0,active:tn,round:en}=et,{getPrefixCls:Jt,direction:gn,skeleton:Mn}=Ie.useContext(Te.E_),yn=Jt("skeleton",He),[kn,$n]=ke(yn);if(Xe||!("loading"in et)){const An=!!Ze,oi=!!lt,ai=!!xt;let Di;if(An){const or=Object.assign(Object.assign({prefixCls:`${yn}-avatar`},Wt(oi,ai)),Ut(Ze));Di=Ie.createElement("div",{className:`${yn}-header`},Ie.createElement(he,Object.assign({},or)))}let Pi;if(oi||ai){let or;if(oi){const dr=Object.assign(Object.assign({prefixCls:`${yn}-title`},$t(An,ai)),Ut(lt));or=Ie.createElement(xn,Object.assign({},dr))}let ar;if(ai){const dr=Object.assign(Object.assign({prefixCls:`${yn}-paragraph`},ft(An,oi)),Ut(xt));ar=Ie.createElement(un,Object.assign({},dr))}Pi=Ie.createElement("div",{className:`${yn}-content`},or,ar)}const Xi=me()(yn,{[`${yn}-with-avatar`]:An,[`${yn}-active`]:tn,[`${yn}-rtl`]:gn==="rtl",[`${yn}-round`]:en},Mn==null?void 0:Mn.className,Re,Ae,$n);return kn(Ie.createElement("div",{className:Xi,style:Object.assign(Object.assign({},Mn==null?void 0:Mn.style),Ue)},Di,Pi))}return typeof Ke!="undefined"?Ke:null};We.Button=Qe,We.Avatar=je,We.Input=it,We.Image=ct,We.Node=vt;var Be=We,qe=Be},81327:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return oe}});var Le=Ee(59301),me=Ee(92310),Ie=Ee.n(me),Te=Ee(11592),be=Ee(36355),Pe=Ee(33234);const he=Le.createContext({latestIndex:0}),Se=he.Provider;var ge=ie=>{let{className:se,index:le,children:ye,split:we,style:Ce}=ie;const{latestIndex:ke}=Le.useContext(he);return ye==null?null:Le.createElement(Le.Fragment,null,Le.createElement("div",{className:se,style:Ce},ye),le<ke&&we&&Le.createElement("span",{className:`${se}-split`},we))},ce=Ee(2856);function ve(ie){return["small","middle","large"].includes(ie)}function de(ie){return ie?typeof ie=="number"&&!Number.isNaN(ie):!1}var ue=function(ie,se){var le={};for(var ye in ie)Object.prototype.hasOwnProperty.call(ie,ye)&&se.indexOf(ye)<0&&(le[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])&&(le[ye[we]]=ie[ye[we]]);return le};const ee=Le.forwardRef((ie,se)=>{var le,ye;const{getPrefixCls:we,space:Ce,direction:ke}=Le.useContext(be.E_),{size:Ne=(Ce==null?void 0:Ce.size)||"small",align:je,className:Ve,rootClassName:Qe,children:Ge,direction:mt="horizontal",prefixCls:ct,split:Ct,style:it,wrap:St=!1,classNames:ut,styles:Ft}=ie,ht=ue(ie,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[rt,dt]=Array.isArray(Ne)?Ne:[Ne,Ne],yt=ve(dt),_t=ve(rt),vt=de(dt),Bt=de(rt),jt=(0,Te.Z)(Ge,{keepEmpty:!0}),un=je===void 0&&mt==="horizontal"?"center":je,Kt=we("space",ct),[xn,Ut]=(0,ce.Z)(Kt),Wt=Ie()(Kt,Ce==null?void 0:Ce.className,Ut,`${Kt}-${mt}`,{[`${Kt}-rtl`]:ke==="rtl",[`${Kt}-align-${un}`]:un,[`${Kt}-gap-row-${dt}`]:yt,[`${Kt}-gap-col-${rt}`]:_t},Ve,Qe),$t=Ie()(`${Kt}-item`,(le=ut==null?void 0:ut.item)!==null&&le!==void 0?le:(ye=Ce==null?void 0:Ce.classNames)===null||ye===void 0?void 0:ye.item);let ft=0;const We=jt.map((et,He)=>{var Xe,Re;et!=null&&(ft=He);const Ae=et&&et.key||`${$t}-${He}`;return Le.createElement(ge,{className:$t,key:Ae,index:He,split:Ct,style:(Xe=Ft==null?void 0:Ft.item)!==null&&Xe!==void 0?Xe:(Re=Ce==null?void 0:Ce.styles)===null||Re===void 0?void 0:Re.item},et)}),Be=Le.useMemo(()=>({latestIndex:ft}),[ft]);if(jt.length===0)return null;const qe={};return St&&(qe.flexWrap="wrap"),!_t&&Bt&&(qe.columnGap=rt),!yt&&vt&&(qe.rowGap=dt),xn(Le.createElement("div",Object.assign({ref:se,className:Wt,style:Object.assign(Object.assign(Object.assign({},qe),Ce==null?void 0:Ce.style),it)},ht),Le.createElement(Se,{value:Be},We)))});ee.Compact=Pe.ZP;var oe=ee},31797:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{default:function(){return ke}});var Le=Ee(59301),me=Ee(56762),Ie=Ee(92343),Te=Ee(92310),be=Ee.n(Te),Pe=Ee(36355),he=Ee(61621),xe=Ne=>{const{value:je,formatter:Ve,precision:Qe,decimalSeparator:Ge,groupSeparator:mt="",prefixCls:ct}=Ne;let Ct;if(typeof Ve=="function")Ct=Ve(je);else{const it=String(je),St=it.match(/^(-?)(\d*)(\.(\d+))?$/);if(!St||it==="-")Ct=it;else{const ut=St[1];let Ft=St[2]||"0",ht=St[4]||"";Ft=Ft.replace(/\B(?=(\d{3})+(?!\d))/g,mt),typeof Qe=="number"&&(ht=ht.padEnd(Qe,"0").slice(0,Qe>0?Qe:0)),ht&&(ht=`${Ge}${ht}`),Ct=[Le.createElement("span",{key:"int",className:`${ct}-content-value-int`},ut,Ft),ht&&Le.createElement("span",{key:"decimal",className:`${ct}-content-value-decimal`},ht)]}}return Le.createElement("span",{className:`${ct}-content-value`},Ct)},ge=Ee(17313),ce=Ee(83116),ve=Ee(37613);const de=Ne=>{const{componentCls:je,marginXXS:Ve,padding:Qe,colorTextDescription:Ge,titleFontSize:mt,colorTextHeading:ct,contentFontSize:Ct,fontFamily:it}=Ne;return{[`${je}`]:Object.assign(Object.assign({},(0,ge.Wf)(Ne)),{[`${je}-title`]:{marginBottom:Ve,color:Ge,fontSize:mt},[`${je}-skeleton`]:{paddingTop:Qe},[`${je}-content`]:{color:ct,fontSize:Ct,fontFamily:it,[`${je}-content-value`]:{display:"inline-block",direction:"ltr"},[`${je}-content-prefix, ${je}-content-suffix`]:{display:"inline-block"},[`${je}-content-prefix`]:{marginInlineEnd:Ve},[`${je}-content-suffix`]:{marginInlineStart:Ve}}})}};var ue=(0,ce.Z)("Statistic",Ne=>{const je=(0,ve.TS)(Ne,{});return[de(je)]},Ne=>{const{fontSizeHeading3:je,fontSize:Ve}=Ne;return{titleFontSize:Ve,contentFontSize:je}}),ee=Ne=>{const{prefixCls:je,className:Ve,rootClassName:Qe,style:Ge,valueStyle:mt,value:ct=0,title:Ct,valueRender:it,prefix:St,suffix:ut,loading:Ft=!1,onMouseEnter:ht,onMouseLeave:rt,decimalSeparator:dt=".",groupSeparator:yt=","}=Ne,{getPrefixCls:_t,direction:vt,statistic:Bt}=Le.useContext(Pe.E_),jt=_t("statistic",je),[un,Kt]=ue(jt),xn=Le.createElement(xe,Object.assign({decimalSeparator:dt,groupSeparator:yt,prefixCls:jt},Ne,{value:ct})),Ut=be()(jt,{[`${jt}-rtl`]:vt==="rtl"},Bt==null?void 0:Bt.className,Ve,Qe,Kt);return un(Le.createElement("div",{className:Ut,style:Object.assign(Object.assign({},Bt==null?void 0:Bt.style),Ge),onMouseEnter:ht,onMouseLeave:rt},Ct&&Le.createElement("div",{className:`${jt}-title`},Ct),Le.createElement(he.Z,{paragraph:!1,loading:Ft,className:`${jt}-skeleton`},Le.createElement("div",{style:mt,className:`${jt}-content`},St&&Le.createElement("span",{className:`${jt}-content-prefix`},St),it?it(xn):xn,ut&&Le.createElement("span",{className:`${jt}-content-suffix`},ut)))))};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(Ne,je){let Ve=Ne;const Qe=/\[[^\]]*]/g,Ge=(je.match(Qe)||[]).map(it=>it.slice(1,-1)),mt=je.replace(Qe,"[]"),ct=oe.reduce((it,St)=>{let[ut,Ft]=St;if(it.includes(ut)){const ht=Math.floor(Ve/Ft);return Ve-=ht*Ft,it.replace(new RegExp(`${ut}+`,"g"),rt=>{const dt=rt.length;return ht.toString().padStart(dt,"0")})}return it},mt);let Ct=0;return ct.replace(Qe,()=>{const it=Ge[Ct];return Ct+=1,it})}function se(Ne,je){const{format:Ve=""}=je,Qe=new Date(Ne).getTime(),Ge=Date.now(),mt=Math.max(Qe-Ge,0);return ie(mt,Ve)}const le=1e3/30;function ye(Ne){return new Date(Ne).getTime()}const we=Ne=>{const{value:je,format:Ve="HH:mm:ss",onChange:Qe,onFinish:Ge}=Ne,mt=(0,me.Z)(),ct=Le.useRef(null),Ct=()=>{Ge==null||Ge(),ct.current&&(clearInterval(ct.current),ct.current=null)},it=()=>{const Ft=ye(je);Ft>=Date.now()&&(ct.current=setInterval(()=>{mt(),Qe==null||Qe(Ft-Date.now()),Ft<Date.now()&&Ct()},le))};Le.useEffect(()=>(it(),()=>{ct.current&&(clearInterval(ct.current),ct.current=null)}),[je]);const St=(Ft,ht)=>se(Ft,Object.assign(Object.assign({},ht),{format:Ve})),ut=Ft=>(0,Ie.Tm)(Ft,{title:void 0});return Le.createElement(ee,Object.assign({},Ne,{valueRender:ut,formatter:St}))};var Ce=Le.memo(we);ee.Countdown=Ce;var ke=ee},15969:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{N:function(){return Le}});const Le=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(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return mt}});var Le=Ee(58617),me=Ee(92310),Ie=Ee.n(me),Te=Ee(72308),be=Ee(49618),Pe=Ee(52487),he=Ee(74416),Se=Ee(59301),xe=Ee(18929),ge=Ee(10228),ce=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],ve=Se.forwardRef(function(ct,Ct){var it,St=ct.prefixCls,ut=St===void 0?"rc-switch":St,Ft=ct.className,ht=ct.checked,rt=ct.defaultChecked,dt=ct.disabled,yt=ct.loadingIcon,_t=ct.checkedChildren,vt=ct.unCheckedChildren,Bt=ct.onClick,jt=ct.onChange,un=ct.onKeyDown,Kt=(0,he.Z)(ct,ce),xn=(0,xe.Z)(!1,{value:ht,defaultValue:rt}),Ut=(0,Pe.Z)(xn,2),Wt=Ut[0],$t=Ut[1];function ft(et,He){var Xe=Wt;return dt||(Xe=et,$t(Xe),jt==null||jt(Xe,He)),Xe}function We(et){et.which===ge.Z.LEFT?ft(!1,et):et.which===ge.Z.RIGHT&&ft(!0,et),un==null||un(et)}function Be(et){var He=ft(!Wt,et);Bt==null||Bt(He,et)}var qe=Ie()(ut,Ft,(it={},(0,be.Z)(it,"".concat(ut,"-checked"),Wt),(0,be.Z)(it,"".concat(ut,"-disabled"),dt),it));return Se.createElement("button",(0,Te.Z)({},Kt,{type:"button",role:"switch","aria-checked":Wt,disabled:dt,className:qe,ref:Ct,onKeyDown:We,onClick:Be}),yt,Se.createElement("span",{className:"".concat(ut,"-inner")},Se.createElement("span",{className:"".concat(ut,"-inner-checked")},_t),Se.createElement("span",{className:"".concat(ut,"-inner-unchecked")},vt)))});ve.displayName="Switch";var de=ve,ue=Ee(14088),z=Ee(36355),ee=Ee(1684),oe=Ee(19716),ie=Ee(64993),se=Ee(17313),le=Ee(83116),ye=Ee(37613);const we=ct=>{const{componentCls:Ct,trackHeightSM:it,trackPadding:St,trackMinWidthSM:ut,innerMinMarginSM:Ft,innerMaxMarginSM:ht,handleSizeSM:rt}=ct,dt=`${Ct}-inner`;return{[Ct]:{[`&${Ct}-small`]:{minWidth:ut,height:it,lineHeight:`${it}px`,[`${Ct}-inner`]:{paddingInlineStart:ht,paddingInlineEnd:Ft,[`${dt}-checked`]:{marginInlineStart:`calc(-100% + ${rt+St*2}px - ${ht*2}px)`,marginInlineEnd:`calc(100% - ${rt+St*2}px + ${ht*2}px)`},[`${dt}-unchecked`]:{marginTop:-it,marginInlineStart:0,marginInlineEnd:0}},[`${Ct}-handle`]:{width:rt,height:rt},[`${Ct}-loading-icon`]:{top:(rt-ct.switchLoadingIconSize)/2,fontSize:ct.switchLoadingIconSize},[`&${Ct}-checked`]:{[`${Ct}-inner`]:{paddingInlineStart:Ft,paddingInlineEnd:ht,[`${dt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${dt}-unchecked`]:{marginInlineStart:`calc(100% - ${rt+St*2}px + ${ht*2}px)`,marginInlineEnd:`calc(-100% + ${rt+St*2}px - ${ht*2}px)`}},[`${Ct}-handle`]:{insetInlineStart:`calc(100% - ${rt+St}px)`}},[`&:not(${Ct}-disabled):active`]:{[`&:not(${Ct}-checked) ${dt}`]:{[`${dt}-unchecked`]:{marginInlineStart:ct.marginXXS/2,marginInlineEnd:-ct.marginXXS/2}},[`&${Ct}-checked ${dt}`]:{[`${dt}-checked`]:{marginInlineStart:-ct.marginXXS/2,marginInlineEnd:ct.marginXXS/2}}}}}}},Ce=ct=>{const{componentCls:Ct,handleSize:it}=ct;return{[Ct]:{[`${Ct}-loading-icon${ct.iconCls}`]:{position:"relative",top:(it-ct.fontSize)/2,color:ct.switchLoadingIconColor,verticalAlign:"top"},[`&${Ct}-checked ${Ct}-loading-icon`]:{color:ct.switchColor}}}},ke=ct=>{const{componentCls:Ct,motion:it,trackPadding:St,handleBg:ut,handleShadow:Ft,handleSize:ht}=ct,rt=`${Ct}-handle`;return{[Ct]:{[rt]:{position:"absolute",top:St,insetInlineStart:St,width:ht,height:ht,transition:`all ${ct.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:ut,borderRadius:ht/2,boxShadow:Ft,transition:`all ${ct.switchDuration} ease-in-out`,content:'""'}},[`&${Ct}-checked ${rt}`]:{insetInlineStart:`calc(100% - ${ht+St}px)`},[`&:not(${Ct}-disabled):active`]:it?{[`${rt}::before`]:{insetInlineEnd:ct.switchHandleActiveInset,insetInlineStart:0},[`&${Ct}-checked ${rt}::before`]:{insetInlineEnd:0,insetInlineStart:ct.switchHandleActiveInset}}:{}}}},Ne=ct=>{const{componentCls:Ct,trackHeight:it,trackPadding:St,innerMinMargin:ut,innerMaxMargin:Ft,handleSize:ht}=ct,rt=`${Ct}-inner`;return{[Ct]:{[rt]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Ft,paddingInlineEnd:ut,transition:`padding-inline-start ${ct.switchDuration} ease-in-out, padding-inline-end ${ct.switchDuration} ease-in-out`,[`${rt}-checked, ${rt}-unchecked`]:{display:"block",color:ct.colorTextLightSolid,fontSize:ct.fontSizeSM,transition:`margin-inline-start ${ct.switchDuration} ease-in-out, margin-inline-end ${ct.switchDuration} ease-in-out`,pointerEvents:"none"},[`${rt}-checked`]:{marginInlineStart:`calc(-100% + ${ht+St*2}px - ${Ft*2}px)`,marginInlineEnd:`calc(100% - ${ht+St*2}px + ${Ft*2}px)`},[`${rt}-unchecked`]:{marginTop:-it,marginInlineStart:0,marginInlineEnd:0}},[`&${Ct}-checked ${rt}`]:{paddingInlineStart:ut,paddingInlineEnd:Ft,[`${rt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${rt}-unchecked`]:{marginInlineStart:`calc(100% - ${ht+St*2}px + ${Ft*2}px)`,marginInlineEnd:`calc(-100% + ${ht+St*2}px - ${Ft*2}px)`}},[`&:not(${Ct}-disabled):active`]:{[`&:not(${Ct}-checked) ${rt}`]:{[`${rt}-unchecked`]:{marginInlineStart:St*2,marginInlineEnd:-St*2}},[`&${Ct}-checked ${rt}`]:{[`${rt}-checked`]:{marginInlineStart:-St*2,marginInlineEnd:St*2}}}}}},je=ct=>{const{componentCls:Ct,trackHeight:it,trackMinWidth:St}=ct;return{[Ct]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,se.Wf)(ct)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:St,height:it,lineHeight:`${it}px`,verticalAlign:"middle",background:ct.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${ct.motionDurationMid}`,userSelect:"none",[`&:hover:not(${Ct}-disabled)`]:{background:ct.colorTextTertiary}}),(0,se.Qy)(ct)),{[`&${Ct}-checked`]:{background:ct.switchColor,[`&:hover:not(${Ct}-disabled)`]:{background:ct.colorPrimaryHover}},[`&${Ct}-loading, &${Ct}-disabled`]:{cursor:"not-allowed",opacity:ct.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${Ct}-rtl`]:{direction:"rtl"}})}};var Ve=(0,le.Z)("Switch",ct=>{const Ct=(0,ye.TS)(ct,{switchDuration:ct.motionDurationMid,switchColor:ct.colorPrimary,switchDisabledOpacity:ct.opacityLoading,switchLoadingIconSize:ct.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${ct.opacityLoading})`,switchHandleActiveInset:"-30%"});return[je(Ct),Ne(Ct),ke(Ct),Ce(Ct),we(Ct)]},ct=>{const{fontSize:Ct,lineHeight:it,controlHeight:St,colorWhite:ut}=ct,Ft=Ct*it,ht=St/2,rt=2,dt=Ft-rt*2,yt=ht-rt*2;return{trackHeight:Ft,trackHeightSM:ht,trackMinWidth:dt*2+rt*4,trackMinWidthSM:yt*2+rt*2,trackPadding:rt,handleBg:ut,handleSize:dt,handleSizeSM:yt,handleShadow:`0 2px 4px 0 ${new ie.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:dt/2,innerMaxMargin:dt+rt+rt*2,innerMinMarginSM:yt/2,innerMaxMarginSM:yt+rt+rt*2}}),Qe=function(ct,Ct){var it={};for(var St in ct)Object.prototype.hasOwnProperty.call(ct,St)&&Ct.indexOf(St)<0&&(it[St]=ct[St]);if(ct!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,St=Object.getOwnPropertySymbols(ct);ut<St.length;ut++)Ct.indexOf(St[ut])<0&&Object.prototype.propertyIsEnumerable.call(ct,St[ut])&&(it[St[ut]]=ct[St[ut]]);return it};const Ge=Se.forwardRef((ct,Ct)=>{const{prefixCls:it,size:St,disabled:ut,loading:Ft,className:ht,rootClassName:rt,style:dt}=ct,yt=Qe(ct,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:_t,direction:vt,switch:Bt}=Se.useContext(z.E_),jt=Se.useContext(ee.Z),un=(ut!=null?ut:jt)||Ft,Kt=_t("switch",it),xn=Se.createElement("div",{className:`${Kt}-handle`},Ft&&Se.createElement(Le.Z,{className:`${Kt}-loading-icon`})),[Ut,Wt]=Ve(Kt),$t=(0,oe.Z)(St),ft=Ie()(Bt==null?void 0:Bt.className,{[`${Kt}-small`]:$t==="small",[`${Kt}-loading`]:Ft,[`${Kt}-rtl`]:vt==="rtl"},ht,rt,Wt),We=Object.assign(Object.assign({},Bt==null?void 0:Bt.style),dt);return Ut(Se.createElement(ue.Z,{component:"Switch"},Se.createElement(de,Object.assign({},yt,{prefixCls:Kt,className:ft,style:We,disabled:un,ref:Ct,loadingIcon:xn}))))});Ge.__ANT_SWITCH=!0;var mt=Ge},1710:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{default:function(){return gf}});var Le={},me="rc-table-internal-hook",Ie=Ee(52487),Te=Ee(6089),be=Ee(34280),Pe=Ee(13697),he=Ee(59301),Se=Ee(4676);function xe(Rt){var zt=he.createContext(void 0),ln=function(Pt){var Lt=Pt.value,Sn=Pt.children,hn=he.useRef(Lt);hn.current=Lt;var sn=he.useState(function(){return{getValue:function(){return hn.current},listeners:new Set}}),mn=(0,Ie.Z)(sn,1),vn=mn[0];return(0,be.Z)(function(){(0,Se.unstable_batchedUpdates)(function(){vn.listeners.forEach(function(wn){wn(Lt)})})},[Lt]),he.createElement(zt.Provider,{value:vn},Sn)};return{Context:zt,Provider:ln,defaultValue:Rt}}function ge(Rt,zt){var ln=(0,Te.Z)(typeof zt=="function"?zt:function(wn){if(zt===void 0)return wn;if(!Array.isArray(zt))return wn[zt];var zn={};return zt.forEach(function(ni){zn[ni]=wn[ni]}),zn}),gt=he.useContext(Rt==null?void 0:Rt.Context),Pt=gt||{},Lt=Pt.listeners,Sn=Pt.getValue,hn=he.useRef();hn.current=ln(gt?Sn():Rt==null?void 0:Rt.defaultValue);var sn=he.useState({}),mn=(0,Ie.Z)(sn,2),vn=mn[1];return(0,be.Z)(function(){if(!gt)return;function wn(zn){var ni=ln(zn);(0,Pe.Z)(hn.current,ni,!0)||vn({})}return Lt.add(wn),function(){Lt.delete(wn)}},[gt]),hn.current}var ce=Ee(72308),ve=Ee(8654);function de(){var Rt=he.createContext(null);function zt(){return he.useContext(Rt)}function ln(Pt,Lt){var Sn=(0,ve.Yr)(Pt),hn=function(mn,vn){var wn=Sn?{ref:vn}:{},zn=he.useRef(0),ni=he.useRef(mn),Wn=zt();return Wn!==null?he.createElement(Pt,(0,ce.Z)({},mn,wn)):((!Lt||Lt(ni.current,mn))&&(zn.current+=1),ni.current=mn,he.createElement(Rt.Provider,{value:zn.current},he.createElement(Pt,(0,ce.Z)({},mn,wn))))};return Sn?he.forwardRef(hn):hn}function gt(Pt,Lt){var Sn=(0,ve.Yr)(Pt),hn=function(mn,vn){var wn=Sn?{ref:vn}:{};return zt(),he.createElement(Pt,(0,ce.Z)({},mn,wn))};return Sn?he.memo(he.forwardRef(hn),Lt):he.memo(hn,Lt)}return{makeImmutable:ln,responseImmutable:gt,useImmutableMark:zt}}var ue=de(),z=ue.makeImmutable,ee=ue.responseImmutable,oe=ue.useImmutableMark,ie=de(),se=ie.makeImmutable,le=ie.responseImmutable,ye=ie.useImmutableMark,we=xe(),Ce=we;function ke(Rt,zt){var ln=he.useRef(0);ln.current+=1;var gt=he.useRef(Rt),Pt=[];Object.keys(Rt||{}).map(function(Sn){var hn;(Rt==null?void 0:Rt[Sn])!==((hn=gt.current)===null||hn===void 0?void 0:hn[Sn])&&Pt.push(Sn)}),gt.current=Rt;var Lt=he.useRef([]);return Pt.length&&(Lt.current=Pt),he.useDebugValue(ln.current),he.useDebugValue(Lt.current.join(", ")),zt&&console.log("".concat(zt,":"),ln.current,Lt.current),ln.current}var Ne=null,je=he.memo(function(){var Rt=ke();return he.createElement("h1",null,"Render Times: ",Rt)});je.displayName="RenderBlock";var Ve=Ee(62853),Qe=Ee(77321),Ge=Ee(49618),mt=Ee(92310),ct=Ee.n(mt),Ct=Ee(80547),it=Ee(97938),St=Ee(48736),ut=he.createContext({renderWithProps:!1}),Ft=ut,ht="RC_TABLE_KEY";function rt(Rt){return Rt==null?[]:Array.isArray(Rt)?Rt:[Rt]}function dt(Rt){var zt=[],ln={};return Rt.forEach(function(gt){for(var Pt=gt||{},Lt=Pt.key,Sn=Pt.dataIndex,hn=Lt||rt(Sn).join("-")||ht;ln[hn];)hn="".concat(hn,"_next");ln[hn]=!0,zt.push(hn)}),zt}function yt(Rt){return Rt!=null}function _t(Rt){return Rt&&(0,Ve.Z)(Rt)==="object"&&!Array.isArray(Rt)&&!he.isValidElement(Rt)}function vt(Rt,zt,ln,gt,Pt,Lt){var Sn=he.useContext(Ft),hn=ye(),sn=(0,Ct.Z)(function(){if(yt(gt))return[gt];var mn=zt==null||zt===""?[]:Array.isArray(zt)?zt:[zt],vn=(0,it.Z)(Rt,mn),wn=vn,zn=void 0;if(Pt){var ni=Pt(vn,Rt,ln);_t(ni)?(wn=ni.children,zn=ni.props,Sn.renderWithProps=!0):wn=ni}return[wn,zn]},[hn,Rt,gt,zt,Pt,ln],function(mn,vn){if(Lt){var wn=(0,Ie.Z)(mn,2),zn=wn[1],ni=(0,Ie.Z)(vn,2),Wn=ni[1];return Lt(Wn,zn)}return Sn.renderWithProps?!0:!(0,Pe.Z)(mn,vn,!0)});return sn}function Bt(Rt,zt,ln,gt){var Pt=Rt+zt-1;return Rt<=gt&&Pt>=ln}function jt(Rt,zt){return ge(Ce,function(ln){var gt=Bt(Rt,zt||1,ln.hoverStartRow,ln.hoverEndRow);return[gt,ln.onHover]})}var un=function(zt){var ln=zt.ellipsis,gt=zt.rowType,Pt=zt.children,Lt,Sn=ln===!0?{showTitle:!0}:ln;return Sn&&(Sn.showTitle||gt==="header")&&(typeof Pt=="string"||typeof Pt=="number"?Lt=Pt.toString():he.isValidElement(Pt)&&typeof Pt.props.children=="string"&&(Lt=Pt.props.children)),Lt};function Kt(Rt){var zt,ln,gt,Pt,Lt,Sn,hn,sn,mn=Rt.component,vn=Rt.children,wn=Rt.ellipsis,zn=Rt.scope,ni=Rt.prefixCls,Wn=Rt.className,wi=Rt.align,Zn=Rt.record,gi=Rt.render,si=Rt.dataIndex,Oi=Rt.renderIndex,Ni=Rt.shouldCellUpdate,Ui=Rt.index,ki=Rt.rowType,Ai=Rt.colSpan,rr=Rt.rowSpan,ti=Rt.fixLeft,ji=Rt.fixRight,Li=Rt.firstFixLeft,bi=Rt.lastFixLeft,$i=Rt.firstFixRight,pi=Rt.lastFixRight,sr=Rt.appendNode,Yi=Rt.additionalProps,Ci=Yi===void 0?{}:Yi,Gi=Rt.isSticky,vr="".concat(ni,"-cell"),qi=ge(Ce,["supportSticky","allColumnsFixedLeft"]),So=qi.supportSticky,Co=qi.allColumnsFixedLeft,is=vt(Zn,si,Oi,vn,gi,Ni),so=(0,Ie.Z)(is,2),Tr=so[0],No=so[1],Ar={},Yr=typeof ti=="number"&&So,rs=typeof ji=="number"&&So;Yr&&(Ar.position="sticky",Ar.left=ti),rs&&(Ar.position="sticky",Ar.right=ji);var Wr=(zt=(ln=(gt=No==null?void 0:No.colSpan)!==null&>!==void 0?gt:Ci.colSpan)!==null&&ln!==void 0?ln:Ai)!==null&&zt!==void 0?zt:1,Er=(Pt=(Lt=(Sn=No==null?void 0:No.rowSpan)!==null&&Sn!==void 0?Sn:Ci.rowSpan)!==null&&Lt!==void 0?Lt:rr)!==null&&Pt!==void 0?Pt:1,Xr=jt(Ui,Er),br=(0,Ie.Z)(Xr,2),ao=br[0],Lr=br[1],ho=function(Ss){var Js;Zn&&Lr(Ui,Ui+Er-1),Ci==null||(Js=Ci.onMouseEnter)===null||Js===void 0||Js.call(Ci,Ss)},Zo=function(Ss){var Js;Zn&&Lr(-1,-1),Ci==null||(Js=Ci.onMouseLeave)===null||Js===void 0||Js.call(Ci,Ss)};if(Wr===0||Er===0)return null;var Ko=(hn=Ci.title)!==null&&hn!==void 0?hn:un({rowType:ki,ellipsis:wn,children:Tr}),Jr=ct()(vr,Wn,(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"),bi&&So),(0,Ge.Z)(sn,"".concat(vr,"-fix-left-all"),bi&&Co&&So),(0,Ge.Z)(sn,"".concat(vr,"-fix-right"),rs&&So),(0,Ge.Z)(sn,"".concat(vr,"-fix-right-first"),$i&&So),(0,Ge.Z)(sn,"".concat(vr,"-fix-right-last"),pi&&So),(0,Ge.Z)(sn,"".concat(vr,"-ellipsis"),wn),(0,Ge.Z)(sn,"".concat(vr,"-with-append"),sr),(0,Ge.Z)(sn,"".concat(vr,"-fix-sticky"),(Yr||rs)&&Gi&&So),(0,Ge.Z)(sn,"".concat(vr,"-row-hover"),!No&&ao),sn),Ci.className,No==null?void 0:No.className),Io={};wi&&(Io.textAlign=wi);var Cs=(0,Qe.Z)((0,Qe.Z)((0,Qe.Z)((0,Qe.Z)({},Ar),Ci.style),Io),No==null?void 0:No.style),Lo=Tr;return(0,Ve.Z)(Lo)==="object"&&!Array.isArray(Lo)&&!he.isValidElement(Lo)&&(Lo=null),wn&&(bi||$i)&&(Lo=he.createElement("span",{className:"".concat(vr,"-content")},Lo)),he.createElement(mn,(0,ce.Z)({},No,Ci,{className:Jr,style:Cs,title:Ko,scope:zn,onMouseEnter:ho,onMouseLeave:Zo,colSpan:Wr!==1?Wr:null,rowSpan:Er!==1?Er:null}),sr,Lo)}var xn=he.memo(Kt);function Ut(Rt,zt,ln,gt,Pt,Lt){var Sn=ln[Rt]||{},hn=ln[zt]||{},sn,mn;Sn.fixed==="left"?sn=gt.left[Pt==="rtl"?zt:Rt]:hn.fixed==="right"&&(mn=gt.right[Pt==="rtl"?Rt:zt]);var vn=!1,wn=!1,zn=!1,ni=!1,Wn=ln[zt+1],wi=ln[Rt-1],Zn=!(Lt!=null&&Lt.children);if(Pt==="rtl"){if(sn!==void 0){var gi=wi&&wi.fixed==="left";ni=!gi&&Zn}else if(mn!==void 0){var si=Wn&&Wn.fixed==="right";zn=!si&&Zn}}else if(sn!==void 0){var Oi=Wn&&Wn.fixed==="left";vn=!Oi&&Zn}else if(mn!==void 0){var Ni=wi&&wi.fixed==="right";wn=!Ni&&Zn}return{fixLeft:sn,fixRight:mn,lastFixLeft:vn,firstFixRight:wn,lastFixRight:zn,firstFixLeft:ni,isSticky:gt.isSticky}}var Wt=he.createContext({}),$t=Wt;function ft(Rt){var zt=Rt.className,ln=Rt.index,gt=Rt.children,Pt=Rt.colSpan,Lt=Pt===void 0?1:Pt,Sn=Rt.rowSpan,hn=Rt.align,sn=ge(Ce,["prefixCls","direction"]),mn=sn.prefixCls,vn=sn.direction,wn=he.useContext($t),zn=wn.scrollColumnIndex,ni=wn.stickyOffsets,Wn=wn.flattenColumns,wi=wn.columns,Zn=ln+Lt-1,gi=Zn+1===zn?Lt+1:Lt,si=Ut(ln,ln+gi-1,Wn,ni,vn,wi==null?void 0:wi[ln]);return he.createElement(xn,(0,ce.Z)({className:zt,index:ln,component:"td",prefixCls:mn,record:null,dataIndex:null,align:hn,colSpan:gi,rowSpan:Sn,render:function(){return gt}},si))}var We=Ee(74416),Be=["children"];function qe(Rt){var zt=Rt.children,ln=(0,We.Z)(Rt,Be);return he.createElement("tr",ln,zt)}function et(Rt){var zt=Rt.children;return zt}et.Row=qe,et.Cell=ft;var He=et;function Xe(Rt){var zt=Rt.children,ln=Rt.stickyOffsets,gt=Rt.flattenColumns,Pt=Rt.columns,Lt=ge(Ce,"prefixCls"),Sn=gt.length-1,hn=gt[Sn],sn=he.useMemo(function(){return{stickyOffsets:ln,flattenColumns:gt,scrollColumnIndex:hn!=null&&hn.scrollbar?Sn:null,columns:Pt}},[hn,gt,Sn,ln,Pt]);return he.createElement($t.Provider,{value:sn},he.createElement("tfoot",{className:"".concat(Lt,"-summary")},zt))}var Re=le(Xe),Ae=He,Ue=Ee(70425),Ke=Ee(29301),Ze=Ee(29194),lt=Ee(24514),xt=Ee(75152),tn=Ee(26112);function en(Rt,zt,ln,gt,Pt,Lt,Sn){Rt.push({record:zt,indent:ln,index:Sn});var hn=Lt(zt),sn=Pt==null?void 0:Pt.has(hn);if(zt&&Array.isArray(zt[gt])&&sn)for(var mn=0;mn<zt[gt].length;mn+=1)en(Rt,zt[gt][mn],ln+1,gt,Pt,Lt,mn)}function Jt(Rt,zt,ln,gt){var Pt=he.useMemo(function(){if(ln!=null&&ln.size){for(var Lt=[],Sn=0;Sn<(Rt==null?void 0:Rt.length);Sn+=1){var hn=Rt[Sn];en(Lt,hn,0,zt,ln,gt,Sn)}return Lt}return Rt==null?void 0:Rt.map(function(sn,mn){return{record:sn,indent:0,index:mn}})},[Rt,zt,ln,gt]);return Pt}function gn(Rt){var zt=Rt.prefixCls,ln=Rt.children,gt=Rt.component,Pt=Rt.cellComponent,Lt=Rt.className,Sn=Rt.expanded,hn=Rt.colSpan,sn=Rt.isEmpty,mn=ge(Ce,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),vn=mn.scrollbarSize,wn=mn.fixHeader,zn=mn.fixColumn,ni=mn.componentWidth,Wn=mn.horizonScroll,wi=ln;return(sn?Wn&&ni:zn)&&(wi=he.createElement("div",{style:{width:ni-(wn?vn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(zt,"-expanded-row-fixed")},wi)),he.createElement(gt,{className:Lt,style:{display:Sn?null:"none"}},he.createElement(xn,{component:Pt,prefixCls:zt,colSpan:hn},wi))}var Mn=gn;function yn(Rt,zt,ln,gt){var Pt=ge(Ce,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Lt=Pt.flattenColumns,Sn=Pt.expandableType,hn=Pt.expandedKeys,sn=Pt.childrenColumnName,mn=Pt.onTriggerExpand,vn=Pt.rowExpandable,wn=Pt.onRow,zn=Pt.expandRowByClick,ni=Pt.rowClassName,Wn=Sn==="nest",wi=Sn==="row"&&(!vn||vn(Rt)),Zn=wi||Wn,gi=hn&&hn.has(zt),si=sn&&Rt&&Rt[sn],Oi=(0,Ue.useEvent)(mn),Ni=wn==null?void 0:wn(Rt,ln),Ui=Ni==null?void 0:Ni.onClick,ki=function(ji){zn&&Zn&&mn(Rt,ji);for(var Li=arguments.length,bi=new Array(Li>1?Li-1:0),$i=1;$i<Li;$i++)bi[$i-1]=arguments[$i];Ui==null||Ui.apply(void 0,[ji].concat(bi))},Ai;typeof ni=="string"?Ai=ni:typeof ni=="function"&&(Ai=ni(Rt,ln,gt));var rr=dt(Lt);return(0,Qe.Z)((0,Qe.Z)({},Pt),{},{columnsKey:rr,nestExpandable:Wn,expanded:gi,hasNestChildren:si,record:Rt,onTriggerExpand:Oi,rowSupportExpand:wi,expandable:Zn,rowProps:(0,Qe.Z)((0,Qe.Z)({},Ni),{},{className:ct()(Ai,Ni==null?void 0:Ni.className),onClick:ki})})}function kn(Rt,zt,ln,gt,Pt){var Lt=Rt.record,Sn=Rt.prefixCls,hn=Rt.columnsKey,sn=Rt.fixedInfoList,mn=Rt.expandIconColumnIndex,vn=Rt.nestExpandable,wn=Rt.indentSize,zn=Rt.expandIcon,ni=Rt.expanded,Wn=Rt.hasNestChildren,wi=Rt.onTriggerExpand,Zn=hn[ln],gi=sn[ln],si;ln===(mn||0)&&vn&&(si=he.createElement(he.Fragment,null,he.createElement("span",{style:{paddingLeft:"".concat(wn*gt,"px")},className:"".concat(Sn,"-row-indent indent-level-").concat(gt)}),zn({prefixCls:Sn,expanded:ni,expandable:Wn,record:Lt,onExpand:wi})));var Oi;return zt.onCell&&(Oi=zt.onCell(Lt,Pt)),{key:Zn,fixedInfo:gi,appendCellNode:si,additionalCellProps:Oi||{}}}function $n(Rt){var zt=Rt.className,ln=Rt.style,gt=Rt.record,Pt=Rt.index,Lt=Rt.renderIndex,Sn=Rt.rowKey,hn=Rt.indent,sn=hn===void 0?0:hn,mn=Rt.rowComponent,vn=Rt.cellComponent,wn=Rt.scopeCellComponent,zn=yn(gt,Sn,Pt,sn),ni=zn.prefixCls,Wn=zn.flattenColumns,wi=zn.expandedRowClassName,Zn=zn.expandedRowRender,gi=zn.rowProps,si=zn.expanded,Oi=zn.rowSupportExpand,Ni=he.useState(!1),Ui=(0,Ie.Z)(Ni,2),ki=Ui[0],Ai=Ui[1];he.useEffect(function(){si&&Ai(!0)},[si]);var rr=he.createElement(mn,(0,ce.Z)({},gi,{"data-row-key":Sn,className:ct()(zt,"".concat(ni,"-row"),"".concat(ni,"-row-level-").concat(sn),gi==null?void 0:gi.className),style:(0,Qe.Z)((0,Qe.Z)({},ln),gi==null?void 0:gi.style)}),Wn.map(function(bi,$i){var pi=bi.render,sr=bi.dataIndex,Yi=bi.className,Ci=kn(zn,bi,$i,sn,Pt),Gi=Ci.key,vr=Ci.fixedInfo,qi=Ci.appendCellNode,So=Ci.additionalCellProps;return he.createElement(xn,(0,ce.Z)({className:Yi,ellipsis:bi.ellipsis,align:bi.align,scope:bi.rowScope,component:bi.rowScope?wn:vn,prefixCls:ni,key:Gi,record:gt,index:Pt,renderIndex:Lt,dataIndex:sr,render:pi,shouldCellUpdate:bi.shouldCellUpdate},vr,{appendNode:qi,additionalProps:So}))})),ti;if(Oi&&(ki||si)){var ji=Zn(gt,Pt,sn+1,si),Li=wi&&wi(gt,Pt,sn);ti=he.createElement(Mn,{expanded:si,className:ct()("".concat(ni,"-expanded-row"),"".concat(ni,"-expanded-row-level-").concat(sn+1),Li),prefixCls:ni,component:mn,cellComponent:vn,colSpan:Wn.length,isEmpty:!1},ji)}return he.createElement(he.Fragment,null,rr,ti)}$n.displayName="BodyRow";var An=le($n);function oi(Rt){var zt=Rt.columnKey,ln=Rt.onColumnResize,gt=he.useRef();return he.useEffect(function(){gt.current&&ln(zt,gt.current.offsetWidth)},[]),he.createElement(Ke.Z,{data:zt},he.createElement("td",{ref:gt,style:{padding:0,border:0,height:0}},he.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function ai(Rt){var zt=Rt.prefixCls,ln=Rt.columnsKey,gt=Rt.onColumnResize;return he.createElement("tr",{"aria-hidden":"true",className:"".concat(zt,"-measure-row"),style:{height:0,fontSize:0}},he.createElement(Ke.Z.Collection,{onBatchResize:function(Lt){Lt.forEach(function(Sn){var hn=Sn.data,sn=Sn.size;gt(hn,sn.offsetWidth)})}},ln.map(function(Pt){return he.createElement(oi,{key:Pt,columnKey:Pt,onColumnResize:gt})})))}function Di(Rt){var zt=Rt.data,ln=Rt.measureColumnWidth,gt=ge(Ce,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),Pt=gt.prefixCls,Lt=gt.getComponent,Sn=gt.onColumnResize,hn=gt.flattenColumns,sn=gt.getRowKey,mn=gt.expandedKeys,vn=gt.childrenColumnName,wn=gt.emptyNode,zn=Jt(zt,vn,mn,sn),ni=he.useRef({renderWithProps:!1}),Wn=Lt(["body","wrapper"],"tbody"),wi=Lt(["body","row"],"tr"),Zn=Lt(["body","cell"],"td"),gi=Lt(["body","cell"],"th"),si;zt.length?si=zn.map(function(Ni,Ui){var ki=Ni.record,Ai=Ni.indent,rr=Ni.index,ti=sn(ki,Ui);return he.createElement(An,{key:ti,rowKey:ti,record:ki,index:Ui,renderIndex:rr,rowComponent:wi,cellComponent:Zn,scopeCellComponent:gi,getRowKey:sn,indent:Ai})}):si=he.createElement(Mn,{expanded:!0,className:"".concat(Pt,"-placeholder"),prefixCls:Pt,component:wi,cellComponent:Zn,colSpan:hn.length,isEmpty:!0},wn);var Oi=dt(hn);return he.createElement(Ft.Provider,{value:ni.current},he.createElement(Wn,{className:"".concat(Pt,"-tbody")},ln&&he.createElement(ai,{prefixCls:Pt,columnsKey:Oi,onColumnResize:Sn}),si))}Di.displayName="Body";var Pi=le(Di),Xi=["expandable"],or="RC_TABLE_INTERNAL_COL_DEFINE";function ar(Rt){var zt=Rt.expandable,ln=(0,We.Z)(Rt,Xi),gt;return"expandable"in Rt?gt=(0,Qe.Z)((0,Qe.Z)({},ln),zt):gt=ln,gt.showExpandColumn===!1&&(gt.expandIconColumnIndex=-1),gt}var dr=["columnType"];function no(Rt){for(var zt=Rt.colWidths,ln=Rt.columns,gt=Rt.columCount,Pt=[],Lt=gt||ln.length,Sn=!1,hn=Lt-1;hn>=0;hn-=1){var sn=zt[hn],mn=ln&&ln[hn],vn=mn&&mn[or];if(sn||vn||Sn){var wn=vn||{},zn=wn.columnType,ni=(0,We.Z)(wn,dr);Pt.unshift(he.createElement("col",(0,ce.Z)({key:hn,style:{width:sn}},ni))),Sn=!0}}return he.createElement("colgroup",null,Pt)}var Ir=no,xi=Ee(80702),wr=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Mr(Rt,zt){return(0,he.useMemo)(function(){for(var ln=[],gt=0;gt<zt;gt+=1){var Pt=Rt[gt];if(Pt!==void 0)ln[gt]=Pt;else return null}return ln},[Rt.join("_"),zt])}var ot=he.forwardRef(function(Rt,zt){var ln=Rt.className,gt=Rt.noData,Pt=Rt.columns,Lt=Rt.flattenColumns,Sn=Rt.colWidths,hn=Rt.columCount,sn=Rt.stickyOffsets,mn=Rt.direction,vn=Rt.fixHeader,wn=Rt.stickyTopOffset,zn=Rt.stickyBottomOffset,ni=Rt.stickyClassName,Wn=Rt.onScroll,wi=Rt.maxContentScroll,Zn=Rt.children,gi=(0,We.Z)(Rt,wr),si=ge(Ce,["prefixCls","scrollbarSize","isSticky"]),Oi=si.prefixCls,Ni=si.scrollbarSize,Ui=si.isSticky,ki=Ui&&!vn?0:Ni,Ai=he.useRef(null),rr=he.useCallback(function(Yi){(0,ve.mH)(zt,Yi),(0,ve.mH)(Ai,Yi)},[]);he.useEffect(function(){var Yi;function Ci(Gi){var vr=Gi,qi=vr.currentTarget,So=vr.deltaX;So&&(Wn({currentTarget:qi,scrollLeft:qi.scrollLeft+So}),Gi.preventDefault())}return(Yi=Ai.current)===null||Yi===void 0||Yi.addEventListener("wheel",Ci),function(){var Gi;(Gi=Ai.current)===null||Gi===void 0||Gi.removeEventListener("wheel",Ci)}},[]);var ti=he.useMemo(function(){return Lt.every(function(Yi){return Yi.width})},[Lt]),ji=Lt[Lt.length-1],Li={fixed:ji?ji.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Oi,"-cell-scrollbar")}}},bi=(0,he.useMemo)(function(){return ki?[].concat((0,xi.Z)(Pt),[Li]):Pt},[ki,Pt]),$i=(0,he.useMemo)(function(){return ki?[].concat((0,xi.Z)(Lt),[Li]):Lt},[ki,Lt]),pi=(0,he.useMemo)(function(){var Yi=sn.right,Ci=sn.left;return(0,Qe.Z)((0,Qe.Z)({},sn),{},{left:mn==="rtl"?[].concat((0,xi.Z)(Ci.map(function(Gi){return Gi+ki})),[0]):Ci,right:mn==="rtl"?Yi:[].concat((0,xi.Z)(Yi.map(function(Gi){return Gi+ki})),[0]),isSticky:Ui})},[ki,sn,Ui]),sr=Mr(Sn,hn);return he.createElement("div",{style:(0,Qe.Z)({overflow:"hidden"},Ui?{top:wn,bottom:zn}:{}),ref:rr,className:ct()(ln,(0,Ge.Z)({},ni,!!ni))},he.createElement("table",{style:{tableLayout:"fixed",visibility:gt||sr?null:"hidden"}},(!gt||!wi||ti)&&he.createElement(Ir,{colWidths:sr?[].concat((0,xi.Z)(sr),[ki]):[],columCount:hn+1,columns:$i}),Zn((0,Qe.Z)((0,Qe.Z)({},gi),{},{stickyOffsets:pi,columns:bi,flattenColumns:$i}))))});ot.displayName="FixedHolder";var Rr=he.memo(ot);function Nr(Rt){var zt=Rt.cells,ln=Rt.stickyOffsets,gt=Rt.flattenColumns,Pt=Rt.rowComponent,Lt=Rt.cellComponent,Sn=Rt.tdCellComponent,hn=Rt.onHeaderRow,sn=Rt.index,mn=ge(Ce,["prefixCls","direction"]),vn=mn.prefixCls,wn=mn.direction,zn;hn&&(zn=hn(zt.map(function(Wn){return Wn.column}),sn));var ni=dt(zt.map(function(Wn){return Wn.column}));return he.createElement(Pt,zn,zt.map(function(Wn,wi){var Zn=Wn.column,gi=Ut(Wn.colStart,Wn.colEnd,gt,ln,wn,Zn),si;return Zn&&Zn.onHeaderCell&&(si=Wn.column.onHeaderCell(Zn)),he.createElement(xn,(0,ce.Z)({},Wn,{scope:Zn.title?Wn.colSpan>1?"colgroup":"col":null,ellipsis:Zn.ellipsis,align:Zn.align,component:Zn.title?Lt:Sn,prefixCls:vn,key:ni[wi]},gi,{additionalProps:si,rowType:"header"}))}))}Nr.displayName="HeaderRow";var Hr=Nr;function uo(Rt){var zt=[];function ln(Sn,hn){var sn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;zt[sn]=zt[sn]||[];var mn=hn,vn=Sn.filter(Boolean).map(function(wn){var zn={key:wn.key,className:wn.className||"",children:wn.title,column:wn,colStart:mn},ni=1,Wn=wn.children;return Wn&&Wn.length>0&&(ni=ln(Wn,mn,sn+1).reduce(function(wi,Zn){return wi+Zn},0),zn.hasSubColumns=!0),"colSpan"in wn&&(ni=wn.colSpan),"rowSpan"in wn&&(zn.rowSpan=wn.rowSpan),zn.colSpan=ni,zn.colEnd=zn.colStart+ni-1,zt[sn].push(zn),mn+=ni,ni});return vn}ln(Rt,0);for(var gt=zt.length,Pt=function(hn){zt[hn].forEach(function(sn){!("rowSpan"in sn)&&!sn.hasSubColumns&&(sn.rowSpan=gt-hn)})},Lt=0;Lt<gt;Lt+=1)Pt(Lt);return zt}function po(Rt){var zt=Rt.stickyOffsets,ln=Rt.columns,gt=Rt.flattenColumns,Pt=Rt.onHeaderRow,Lt=ge(Ce,["prefixCls","getComponent"]),Sn=Lt.prefixCls,hn=Lt.getComponent,sn=he.useMemo(function(){return uo(ln)},[ln]),mn=hn(["header","wrapper"],"thead"),vn=hn(["header","row"],"tr"),wn=hn(["header","cell"],"th"),zn=hn(["header","cell"],"td");return he.createElement(mn,{className:"".concat(Sn,"-thead")},sn.map(function(ni,Wn){var wi=he.createElement(Hr,{key:Wn,flattenColumns:gt,cells:ni,stickyOffsets:zt,rowComponent:vn,cellComponent:wn,tdCellComponent:zn,onHeaderRow:Pt,index:Wn});return wi}))}var io=le(po),Do=Ee(11592);function Xn(Rt){var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof zt=="number"?zt:zt.endsWith("%")?Rt*parseFloat(zt)/100:null}function $e(Rt,zt){return he.useMemo(function(){if(zt&&zt>0){var ln=0,gt=0;Rt.forEach(function(mn){var vn=Xn(zt,mn.width);vn?ln+=vn:gt+=1});var Pt=zt-ln,Lt=gt,Sn=Pt/gt,hn=0,sn=Rt.map(function(mn){var vn=(0,Qe.Z)({},mn),wn=Xn(zt,vn.width);if(wn)vn.width=wn;else{var zn=Math.floor(Sn);vn.width=Lt===1?Pt:zn,Pt-=zn,Lt-=1}return hn+=vn.width,vn});return[sn,hn]}return[Rt,zt]},[Rt,zt])}var nt=["children"],Je=["fixed"];function wt(Rt){return(0,Do.Z)(Rt).filter(function(zt){return he.isValidElement(zt)}).map(function(zt){var ln=zt.key,gt=zt.props,Pt=gt.children,Lt=(0,We.Z)(gt,nt),Sn=(0,Qe.Z)({key:ln},Lt);return Pt&&(Sn.children=wt(Pt)),Sn})}function Nt(Rt){var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return Rt.filter(function(ln){return ln&&(0,Ve.Z)(ln)==="object"}).reduce(function(ln,gt,Pt){var Lt=gt.fixed,Sn=Lt===!0?"left":Lt,hn="".concat(zt,"-").concat(Pt),sn=gt.children;return sn&&sn.length>0?[].concat((0,xi.Z)(ln),(0,xi.Z)(Nt(sn,hn).map(function(mn){return(0,Qe.Z)({fixed:Sn},mn)}))):[].concat((0,xi.Z)(ln),[(0,Qe.Z)((0,Qe.Z)({key:hn},gt),{},{fixed:Sn})])},[])}function kt(Rt){for(var zt=!0,ln=0;ln<Rt.length;ln+=1){var gt=Rt[ln];if(zt&>.fixed!=="left")zt=!1;else if(!zt&>.fixed==="left"){warning(!1,"Index ".concat(ln-1," of `columns` missing `fixed='left'` prop."));break}}for(var Pt=!0,Lt=Rt.length-1;Lt>=0;Lt-=1){var Sn=Rt[Lt];if(Pt&&Sn.fixed!=="right")Pt=!1;else if(!Pt&&Sn.fixed==="right"){warning(!1,"Index ".concat(Lt+1," of `columns` missing `fixed='right'` prop."));break}}}function Et(Rt){return Rt.map(function(zt){var ln=zt.fixed,gt=(0,We.Z)(zt,Je),Pt=ln;return ln==="left"?Pt="right":ln==="right"&&(Pt="left"),(0,Qe.Z)({fixed:Pt},gt)})}function cn(Rt,zt){var ln=Rt.prefixCls,gt=Rt.columns,Pt=Rt.children,Lt=Rt.expandable,Sn=Rt.expandedKeys,hn=Rt.columnTitle,sn=Rt.getRowKey,mn=Rt.onTriggerExpand,vn=Rt.expandIcon,wn=Rt.rowExpandable,zn=Rt.expandIconColumnIndex,ni=Rt.direction,Wn=Rt.expandRowByClick,wi=Rt.columnWidth,Zn=Rt.fixed,gi=Rt.scrollWidth,si=he.useMemo(function(){return gt||wt(Pt)},[gt,Pt]),Oi=he.useMemo(function(){if(Lt){var ji,Li=si.slice();if(!Li.includes(Le)){var bi=zn||0;bi>=0&&Li.splice(bi,0,Le)}var $i=Li.indexOf(Le);Li=Li.filter(function(Ci,Gi){return Ci!==Le||Gi===$i});var pi=si[$i],sr;(Zn==="left"||Zn)&&!zn?sr="left":(Zn==="right"||Zn)&&zn===si.length?sr="right":sr=pi?pi.fixed:null;var Yi=(ji={},(0,Ge.Z)(ji,or,{className:"".concat(ln,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,Ge.Z)(ji,"title",hn),(0,Ge.Z)(ji,"fixed",sr),(0,Ge.Z)(ji,"className","".concat(ln,"-row-expand-icon-cell")),(0,Ge.Z)(ji,"width",wi),(0,Ge.Z)(ji,"render",function(Gi,vr,qi){var So=sn(vr,qi),Co=Sn.has(So),is=wn?wn(vr):!0,so=vn({prefixCls:ln,expanded:Co,expandable:is,record:vr,onExpand:mn});return Wn?he.createElement("span",{onClick:function(No){return No.stopPropagation()}},so):so}),ji);return Li.map(function(Ci){return Ci===Le?Yi:Ci})}return si.filter(function(Ci){return Ci!==Le})},[Lt,si,sn,Sn,vn,ni]),Ni=he.useMemo(function(){var ji=Oi;return zt&&(ji=zt(ji)),ji.length||(ji=[{render:function(){return null}}]),ji},[zt,Oi,ni]),Ui=he.useMemo(function(){return ni==="rtl"?Et(Nt(Ni)):Nt(Ni)},[Ni,ni,gi]),ki=$e(Ui,gi),Ai=(0,Ie.Z)(ki,2),rr=Ai[0],ti=Ai[1];return[Ni,rr,ti]}var bn=cn;function dn(Rt){var zt,ln=Rt.prefixCls,gt=Rt.record,Pt=Rt.onExpand,Lt=Rt.expanded,Sn=Rt.expandable,hn="".concat(ln,"-row-expand-icon");if(!Sn)return he.createElement("span",{className:ct()(hn,"".concat(ln,"-row-spaced"))});var sn=function(vn){Pt(gt,vn),vn.stopPropagation()};return he.createElement("span",{className:ct()(hn,(zt={},(0,Ge.Z)(zt,"".concat(ln,"-row-expanded"),Lt),(0,Ge.Z)(zt,"".concat(ln,"-row-collapsed"),!Lt),zt)),onClick:sn})}function rn(Rt,zt,ln){var gt=[];function Pt(Lt){(Lt||[]).forEach(function(Sn,hn){gt.push(zt(Sn,hn)),Pt(Sn[ln])})}return Pt(Rt),gt}function At(Rt,zt,ln){var gt=ar(Rt),Pt=gt.expandIcon,Lt=gt.expandedRowKeys,Sn=gt.defaultExpandedRowKeys,hn=gt.defaultExpandAllRows,sn=gt.expandedRowRender,mn=gt.onExpand,vn=gt.onExpandedRowsChange,wn=gt.childrenColumnName,zn=Pt||dn,ni=wn||"children",Wn=he.useMemo(function(){return sn?"row":Rt.expandable&&Rt.internalHooks===me&&Rt.expandable.__PARENT_RENDER_ICON__||zt.some(function(Ui){return Ui&&(0,Ve.Z)(Ui)==="object"&&Ui[ni]})?"nest":!1},[!!sn,zt]),wi=he.useState(function(){return Sn||(hn?rn(zt,ln,ni):[])}),Zn=(0,Ie.Z)(wi,2),gi=Zn[0],si=Zn[1],Oi=he.useMemo(function(){return new Set(Lt||gi||[])},[Lt,gi]),Ni=he.useCallback(function(Ui){var ki=ln(Ui,zt.indexOf(Ui)),Ai,rr=Oi.has(ki);rr?(Oi.delete(ki),Ai=(0,xi.Z)(Oi)):Ai=[].concat((0,xi.Z)(Oi),[ki]),si(Ai),mn&&mn(!rr,Ui),vn&&vn(Ai)},[ln,Oi,zt,mn,vn]);return[gt,Wn,Oi,zn,ni,Ni]}function an(Rt,zt,ln,gt){var Pt=Rt.map(function(Lt,Sn){return Ut(Sn,Sn,Rt,zt,ln,gt==null?void 0:gt[Sn])});return(0,Ct.Z)(function(){return Pt},[Pt],function(Lt,Sn){return!(0,Pe.Z)(Lt,Sn)})}function En(Rt){var zt=(0,he.useRef)(Rt),ln=(0,he.useState)({}),gt=(0,Ie.Z)(ln,2),Pt=gt[1],Lt=(0,he.useRef)(null),Sn=(0,he.useRef)([]);function hn(sn){Sn.current.push(sn);var mn=Promise.resolve();Lt.current=mn,mn.then(function(){if(Lt.current===mn){var vn=Sn.current,wn=zt.current;Sn.current=[],vn.forEach(function(zn){zt.current=zn(zt.current)}),Lt.current=null,wn!==zt.current&&Pt({})}})}return(0,he.useEffect)(function(){return function(){Lt.current=null}},[]),[zt.current,hn]}function Dn(Rt){var zt=(0,he.useRef)(Rt||null),ln=(0,he.useRef)();function gt(){window.clearTimeout(ln.current)}function Pt(Sn){zt.current=Sn,gt(),ln.current=window.setTimeout(function(){zt.current=null,ln.current=void 0},100)}function Lt(){return zt.current}return(0,he.useEffect)(function(){return gt},[]),[Pt,Lt]}function qt(){var Rt=he.useState(-1),zt=(0,Ie.Z)(Rt,2),ln=zt[0],gt=zt[1],Pt=he.useState(-1),Lt=(0,Ie.Z)(Pt,2),Sn=Lt[0],hn=Lt[1],sn=he.useCallback(function(mn,vn){gt(mn),hn(vn)},[]);return[ln,Sn,sn]}var on=Ee(47273),Nn=(0,on.Z)()?window:null;function On(Rt,zt){var ln=(0,Ve.Z)(Rt)==="object"?Rt:{},gt=ln.offsetHeader,Pt=gt===void 0?0:gt,Lt=ln.offsetSummary,Sn=Lt===void 0?0:Lt,hn=ln.offsetScroll,sn=hn===void 0?0:hn,mn=ln.getContainer,vn=mn===void 0?function(){return Nn}:mn,wn=vn()||Nn;return he.useMemo(function(){var zn=!!Rt;return{isSticky:zn,stickyClassName:zn?"".concat(zt,"-sticky-holder"):"",offsetHeader:Pt,offsetSummary:Sn,offsetScroll:sn,container:wn}},[sn,Pt,Sn,zt,wn])}function qn(Rt,zt,ln){var gt=(0,he.useMemo)(function(){for(var Pt=[],Lt=[],Sn=0,hn=0,sn=0;sn<zt;sn+=1)if(ln==="rtl"){Lt[sn]=hn,hn+=Rt[sn]||0;var mn=zt-sn-1;Pt[mn]=Sn,Sn+=Rt[mn]||0}else{Pt[sn]=Sn,Sn+=Rt[sn]||0;var vn=zt-sn-1;Lt[vn]=hn,hn+=Rt[vn]||0}return{left:Pt,right:Lt}},[Rt,zt,ln]);return gt}var Hn=qn;function ei(Rt){var zt=Rt.className,ln=Rt.children;return he.createElement("div",{className:zt},ln)}var Fn=ei,hi=Ee(8224),Ii=Ee(55468),Ri=function(zt,ln){var gt,Pt,Lt=zt.scrollBodyRef,Sn=zt.onScroll,hn=zt.offsetScroll,sn=zt.container,mn=ge(Ce,"prefixCls"),vn=((gt=Lt.current)===null||gt===void 0?void 0:gt.scrollWidth)||0,wn=((Pt=Lt.current)===null||Pt===void 0?void 0:Pt.clientWidth)||0,zn=vn&&wn*(wn/vn),ni=he.useRef(),Wn=En({scrollLeft:0,isHiddenScrollBar:!1}),wi=(0,Ie.Z)(Wn,2),Zn=wi[0],gi=wi[1],si=he.useRef({delta:0,x:0}),Oi=he.useState(!1),Ni=(0,Ie.Z)(Oi,2),Ui=Ni[0],ki=Ni[1],Ai=function(){ki(!1)},rr=function($i){$i.persist(),si.current.delta=$i.pageX-Zn.scrollLeft,si.current.x=0,ki(!0),$i.preventDefault()},ti=function($i){var pi,sr=$i||((pi=window)===null||pi===void 0?void 0:pi.event),Yi=sr.buttons;if(!Ui||Yi===0){Ui&&ki(!1);return}var Ci=si.current.x+$i.pageX-si.current.x-si.current.delta;Ci<=0&&(Ci=0),Ci+zn>=wn&&(Ci=wn-zn),Sn({scrollLeft:Ci/wn*(vn+2)}),si.current.x=$i.pageX},ji=function(){if(Lt.current){var $i=(0,Ii.os)(Lt.current).top,pi=$i+Lt.current.offsetHeight,sr=sn===window?document.documentElement.scrollTop+window.innerHeight:(0,Ii.os)(sn).top+sn.clientHeight;pi-(0,xt.Z)()<=sr||$i>=sr-hn?gi(function(Yi){return(0,Qe.Z)((0,Qe.Z)({},Yi),{},{isHiddenScrollBar:!0})}):gi(function(Yi){return(0,Qe.Z)((0,Qe.Z)({},Yi),{},{isHiddenScrollBar:!1})})}},Li=function($i){gi(function(pi){return(0,Qe.Z)((0,Qe.Z)({},pi),{},{scrollLeft:$i/vn*wn||0})})};return he.useImperativeHandle(ln,function(){return{setScrollLeft:Li}}),he.useEffect(function(){var bi=(0,hi.Z)(document.body,"mouseup",Ai,!1),$i=(0,hi.Z)(document.body,"mousemove",ti,!1);return ji(),function(){bi.remove(),$i.remove()}},[zn,Ui]),he.useEffect(function(){var bi=(0,hi.Z)(sn,"scroll",ji,!1),$i=(0,hi.Z)(window,"resize",ji,!1);return function(){bi.remove(),$i.remove()}},[sn]),he.useEffect(function(){Zn.isHiddenScrollBar||gi(function(bi){var $i=Lt.current;return $i?(0,Qe.Z)((0,Qe.Z)({},bi),{},{scrollLeft:$i.scrollLeft/$i.scrollWidth*$i.clientWidth}):bi})},[Zn.isHiddenScrollBar]),vn<=wn||!zn||Zn.isHiddenScrollBar?null:he.createElement("div",{style:{height:(0,xt.Z)(),width:wn,bottom:hn},className:"".concat(mn,"-sticky-scroll")},he.createElement("div",{onMouseDown:rr,ref:ni,className:ct()("".concat(mn,"-sticky-scroll-bar"),(0,Ge.Z)({},"".concat(mn,"-sticky-scroll-bar-active"),Ui)),style:{width:"".concat(zn,"px"),transform:"translate3d(".concat(Zn.scrollLeft,"px, 0, 0)")}}))},Pn=he.forwardRef(Ri);function Vi(Rt){return null}var Cr=Vi;function mr(Rt){return null}var _n=mr,Jn="rc-table",ui=[],yi={};function di(){return"No Data"}function Ei(Rt){var zt,ln=(0,Qe.Z)({rowKey:"key",prefixCls:Jn,emptyText:di},Rt),gt=ln.prefixCls,Pt=ln.className,Lt=ln.rowClassName,Sn=ln.style,hn=ln.data,sn=ln.rowKey,mn=ln.scroll,vn=ln.tableLayout,wn=ln.direction,zn=ln.title,ni=ln.footer,Wn=ln.summary,wi=ln.caption,Zn=ln.id,gi=ln.showHeader,si=ln.components,Oi=ln.emptyText,Ni=ln.onRow,Ui=ln.onHeaderRow,ki=ln.internalHooks,Ai=ln.transformColumns,rr=ln.internalRefs,ti=ln.tailor,ji=ln.sticky,Li=hn||ui,bi=!!Li.length,$i=ki===me,pi=he.useCallback(function(fs,Ys){return(0,it.Z)(si,fs)||Ys},[si]),sr=he.useMemo(function(){return typeof sn=="function"?sn:function(fs){var Ys=fs&&fs[sn];return Ys}},[sn]),Yi=pi(["body"]),Ci=qt(),Gi=(0,Ie.Z)(Ci,3),vr=Gi[0],qi=Gi[1],So=Gi[2],Co=At(ln,Li,sr),is=(0,Ie.Z)(Co,6),so=is[0],Tr=is[1],No=is[2],Ar=is[3],Yr=is[4],rs=is[5],Wr=mn==null?void 0:mn.x,Er=he.useState(0),Xr=(0,Ie.Z)(Er,2),br=Xr[0],ao=Xr[1],Lr=bn((0,Qe.Z)((0,Qe.Z)((0,Qe.Z)({},ln),so),{},{expandable:!!so.expandedRowRender,columnTitle:so.columnTitle,expandedKeys:No,getRowKey:sr,onTriggerExpand:rs,expandIcon:Ar,expandIconColumnIndex:so.expandIconColumnIndex,direction:wn,scrollWidth:$i&&ti&&typeof Wr=="number"?Wr:null}),$i?Ai:null),ho=(0,Ie.Z)(Lr,3),Zo=ho[0],Ko=ho[1],Jr=ho[2],Io=Jr!=null?Jr:Wr,Cs=he.useMemo(function(){return{columns:Zo,flattenColumns:Ko}},[Zo,Ko]),Lo=he.useRef(),Jo=he.useRef(),Ss=he.useRef(),Js=he.useRef(),Pl=he.useRef(),Qo=he.useState(!1),qo=(0,Ie.Z)(Qo,2),xs=qo[0],Ts=qo[1],ma=he.useState(!1),jo=(0,Ie.Z)(ma,2),As=jo[0],La=jo[1],_l=En(new Map),Xl=(0,Ie.Z)(_l,2),jl=Xl[0],cu=Xl[1],hu=dt(Ko),Jl=hu.map(function(fs){return jl.get(fs)}),gs=he.useMemo(function(){return Jl},[Jl.join("_")]),Ra=Hn(gs,Ko.length,wn),oa=mn&&yt(mn.y),Ns=mn&&yt(Io)||!!so.fixed,Ql=Ns&&Ko.some(function(fs){var Ys=fs.fixed;return Ys}),_c=he.useRef(),du=On(ji,gt),Zu=du.isSticky,sc=du.offsetHeader,zl=du.offsetSummary,ls=du.offsetScroll,js=du.stickyClassName,wa=du.container,zs=he.useMemo(function(){return Wn==null?void 0:Wn(Li)},[Wn,Li]),os=(oa||Zu)&&he.isValidElement(zs)&&zs.type===He&&zs.props.fixed,Ma,El,Nu;oa&&(El={overflowY:"scroll",maxHeight:mn.y}),Ns&&(Ma={overflowX:"auto"},oa||(El={overflowY:"hidden"}),Nu={width:Io===!0?"auto":Io,minWidth:"100%"});var mf=he.useCallback(function(fs,Ys){(0,Ze.Z)(Lo.current)&&cu(function(Va){if(Va.get(fs)!==Ys){var fu=new Map(Va);return fu.set(fs,Ys),fu}return Va})},[]),fn=Dn(null),Bc=(0,Ie.Z)(fn,2),ac=Bc[0],vf=Bc[1];function Ph(fs,Ys){Ys&&(typeof Ys=="function"?Ys(fs):Ys.scrollLeft!==fs&&(Ys.scrollLeft=fs,Ys.scrollLeft!==fs&&setTimeout(function(){Ys.scrollLeft=fs},0)))}var oh=(0,Te.Z)(function(fs){var Ys=fs.currentTarget,Va=fs.scrollLeft,fu=wn==="rtl",pu=typeof Va=="number"?Va:Ys.scrollLeft,Wd=Ys||yi;if(!vf()||vf()===Wd){var zc;ac(Wd),Ph(pu,Jo.current),Ph(pu,Ss.current),Ph(pu,Pl.current),Ph(pu,(zc=_c.current)===null||zc===void 0?void 0:zc.setScrollLeft)}var rd=Ys||Jo.current;if(rd){var Ou=rd.scrollWidth,Ec=rd.clientWidth;if(Ou===Ec){Ts(!1),La(!1);return}fu?(Ts(-pu<Ou-Ec),La(-pu>0)):(Ts(pu>0),La(pu<Ou-Ec))}}),Rd=function(){Ns&&Ss.current?oh({currentTarget:Ss.current}):(Ts(!1),La(!1))},Kp=function(Ys){var Va=Ys.width;Va!==br&&(Rd(),ao(Lo.current?Lo.current.offsetWidth:Va))},Ba=he.useRef(!1);he.useEffect(function(){Ba.current&&Rd()},[Ns,hn,Zo.length]),he.useEffect(function(){Ba.current=!0},[]);var nd=he.useState(0),Bd=(0,Ie.Z)(nd,2),id=Bd[0],yf=Bd[1],Yf=he.useState(!0),Sf=(0,Ie.Z)(Yf,2),Fd=Sf[0],ql=Sf[1];he.useEffect(function(){(!ti||!$i)&&(Ss.current instanceof Element?yf((0,xt.o)(Ss.current).width):yf((0,xt.o)(Js.current).width)),ql((0,lt.G)("position","sticky"))},[]),he.useEffect(function(){$i&&rr&&(rr.body.current=Ss.current)});var _h=he.useCallback(function(fs){return he.createElement(he.Fragment,null,he.createElement(io,fs),os==="top"&&he.createElement(Re,fs,zs))},[os,zs]),xf=he.useCallback(function(fs){return he.createElement(Re,fs,zs)},[zs]),Ku=pi(["table"],"table"),Fc=he.useMemo(function(){return vn||(Ql?Io==="max-content"?"auto":"fixed":oa||Zu||Ko.some(function(fs){var Ys=fs.ellipsis;return Ys})?"fixed":"auto")},[oa,Ql,Ko,vn,Zu]),Eh,sh={colWidths:gs,columCount:Ko.length,stickyOffsets:Ra,onHeaderRow:Ui,fixHeader:oa,scroll:mn},Ll=he.useMemo(function(){return bi?null:typeof Oi=="function"?Oi():Oi},[bi,Oi]),jd=he.createElement(Pi,{data:Li,measureColumnWidth:oa||Ns||Zu}),zd=he.createElement(Ir,{colWidths:Ko.map(function(fs){var Ys=fs.width;return Ys}),columns:Ko}),eu=wi!=null?he.createElement("caption",{className:"".concat(gt,"-caption")},wi):void 0,Lh=(0,tn.Z)(ln,{data:!0}),Hd=(0,tn.Z)(ln,{aria:!0});if(oa||Zu){var Ud;typeof Yi=="function"?(Ud=Yi(Li,{scrollbarSize:id,ref:Ss,onScroll:oh}),sh.colWidths=Ko.map(function(fs,Ys){var Va=fs.width,fu=Ys===Ko.length-1?Va-id:Va;return typeof fu=="number"&&!Number.isNaN(fu)?fu:0})):Ud=he.createElement("div",{style:(0,Qe.Z)((0,Qe.Z)({},Ma),El),onScroll:oh,ref:Ss,className:ct()("".concat(gt,"-body"))},he.createElement(Ku,(0,ce.Z)({style:(0,Qe.Z)((0,Qe.Z)({},Nu),{},{tableLayout:Fc})},Hd),eu,zd,jd,!os&&zs&&he.createElement(Re,{stickyOffsets:Ra,flattenColumns:Ko,columns:Zo},zs)));var jc=(0,Qe.Z)((0,Qe.Z)((0,Qe.Z)({noData:!Li.length,maxContentScroll:Ns&&Io==="max-content"},sh),Cs),{},{direction:wn,stickyClassName:js,onScroll:oh});Eh=he.createElement(he.Fragment,null,gi!==!1&&he.createElement(Rr,(0,ce.Z)({},jc,{stickyTopOffset:sc,className:"".concat(gt,"-header"),ref:Jo}),_h),Ud,os&&os!=="top"&&he.createElement(Rr,(0,ce.Z)({},jc,{stickyBottomOffset:zl,className:"".concat(gt,"-summary"),ref:Pl}),xf),Zu&&he.createElement(Pn,{ref:_c,offsetScroll:ls,scrollBodyRef:Ss,onScroll:oh,container:wa}))}else Eh=he.createElement("div",{style:(0,Qe.Z)((0,Qe.Z)({},Ma),El),className:ct()("".concat(gt,"-content")),onScroll:oh,ref:Ss},he.createElement(Ku,(0,ce.Z)({style:(0,Qe.Z)((0,Qe.Z)({},Nu),{},{tableLayout:Fc})},Hd),eu,zd,gi!==!1&&he.createElement(io,(0,ce.Z)({},sh,Cs)),jd,zs&&he.createElement(Re,{stickyOffsets:Ra,flattenColumns:Ko,columns:Zo},zs)));var fl=he.createElement("div",(0,ce.Z)({className:ct()(gt,Pt,(zt={},(0,Ge.Z)(zt,"".concat(gt,"-rtl"),wn==="rtl"),(0,Ge.Z)(zt,"".concat(gt,"-ping-left"),xs),(0,Ge.Z)(zt,"".concat(gt,"-ping-right"),As),(0,Ge.Z)(zt,"".concat(gt,"-layout-fixed"),vn==="fixed"),(0,Ge.Z)(zt,"".concat(gt,"-fixed-header"),oa),(0,Ge.Z)(zt,"".concat(gt,"-fixed-column"),Ql),(0,Ge.Z)(zt,"".concat(gt,"-scroll-horizontal"),Ns),(0,Ge.Z)(zt,"".concat(gt,"-has-fix-left"),Ko[0]&&Ko[0].fixed),(0,Ge.Z)(zt,"".concat(gt,"-has-fix-right"),Ko[Ko.length-1]&&Ko[Ko.length-1].fixed==="right"),zt)),style:Sn,id:Zn,ref:Lo},Lh),zn&&he.createElement(Fn,{className:"".concat(gt,"-title")},zn(Li)),he.createElement("div",{ref:Js,className:"".concat(gt,"-container")},Eh),ni&&he.createElement(Fn,{className:"".concat(gt,"-footer")},ni(Li)));Ns&&(fl=he.createElement(Ke.Z,{onResize:Kp},fl));var Gd=an(Ko,Ra,wn,Zo),ba=he.useMemo(function(){return{scrollX:Io,prefixCls:gt,getComponent:pi,scrollbarSize:id,direction:wn,fixedInfoList:Gd,isSticky:Zu,supportSticky:Fd,componentWidth:br,fixHeader:oa,fixColumn:Ql,horizonScroll:Ns,tableLayout:Fc,rowClassName:Lt,expandedRowClassName:so.expandedRowClassName,expandIcon:Ar,expandableType:Tr,expandRowByClick:so.expandRowByClick,expandedRowRender:so.expandedRowRender,onTriggerExpand:rs,expandIconColumnIndex:so.expandIconColumnIndex,indentSize:so.indentSize,allColumnsFixedLeft:Ko.every(function(fs){return fs.fixed==="left"}),emptyNode:Ll,columns:Zo,flattenColumns:Ko,onColumnResize:mf,hoverStartRow:vr,hoverEndRow:qi,onHover:So,rowExpandable:so.rowExpandable,onRow:Ni,getRowKey:sr,expandedKeys:No,childrenColumnName:Yr}},[Io,gt,pi,id,wn,Gd,Zu,Fd,br,oa,Ql,Ns,Fc,Lt,so.expandedRowClassName,Ar,Tr,so.expandRowByClick,so.expandedRowRender,rs,so.expandIconColumnIndex,so.indentSize,Ll,Zo,Ko,mf,vr,qi,So,so.rowExpandable,Ni,sr,No,Yr]);return he.createElement(Ce.Provider,{value:ba},fl)}function Qi(Rt){return se(Ei,Rt)}var Fi=Qi();Fi.EXPAND_COLUMN=Le,Fi.INTERNAL_HOOKS=me,Fi.Column=Cr,Fi.ColumnGroup=_n,Fi.Summary=Ae;var zi=Fi,fr=Ee(45680),Bn=xe(null),Br=xe(null);function In(Rt,zt,ln){var gt=zt||1;return ln[Rt+gt]-(ln[Rt]||0)}function pr(Rt){var zt=Rt.rowInfo,ln=Rt.column,gt=Rt.colIndex,Pt=Rt.indent,Lt=Rt.index,Sn=Rt.renderIndex,hn=Rt.record,sn=Rt.style,mn=Rt.className,vn=Rt.inverse,wn=Rt.getHeight,zn=ln.render,ni=ln.dataIndex,Wn=ln.className,wi=ln.width,Zn=ge(Br,["columnsOffset"]),gi=Zn.columnsOffset,si=kn(zt,ln,gt,Pt,Lt),Oi=si.key,Ni=si.fixedInfo,Ui=si.appendCellNode,ki=si.additionalCellProps,Ai=ki.style,rr=ki.colSpan,ti=rr===void 0?1:rr,ji=ki.rowSpan,Li=ji===void 0?1:ji,bi=gt-1,$i=In(bi,ti,gi),pi=ti>1?wi-$i:0,sr=(0,Qe.Z)((0,Qe.Z)((0,Qe.Z)({},Ai),sn),{},{flex:"0 0 ".concat($i,"px"),width:"".concat($i,"px"),marginRight:pi,pointerEvents:"auto"}),Yi=he.useMemo(function(){return vn?Li<=1:ti===0||Li===0||Li>1},[Li,ti,vn]);Yi?sr.visibility="hidden":vn&&(sr.height=wn==null?void 0:wn(Li));var Ci=Yi?function(){return null}:zn,Gi={};return(Li===0||ti===0)&&(Gi.rowSpan=1,Gi.colSpan=1),he.createElement(xn,(0,ce.Z)({className:ct()(Wn,mn),ellipsis:ln.ellipsis,align:ln.align,scope:ln.rowScope,component:"div",prefixCls:zt.prefixCls,key:Oi,record:hn,index:Lt,renderIndex:Sn,dataIndex:ni,render:Ci,shouldCellUpdate:ln.shouldCellUpdate},Ni,{appendNode:Ui,additionalProps:(0,Qe.Z)((0,Qe.Z)({},ki),{},{style:sr},Gi)}))}var yo=pr,Or=["data","index","className","rowKey","style","extra","getHeight"],bo=he.forwardRef(function(Rt,zt){var ln=Rt.data,gt=Rt.index,Pt=Rt.className,Lt=Rt.rowKey,Sn=Rt.style,hn=Rt.extra,sn=Rt.getHeight,mn=(0,We.Z)(Rt,Or),vn=ln.record,wn=ln.indent,zn=ln.index,ni=ge(Ce,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Wn=ni.scrollX,wi=ni.flattenColumns,Zn=ni.prefixCls,gi=ni.fixColumn,si=ni.componentWidth,Oi=yn(vn,Lt,gt,wn),Ni=Oi.rowSupportExpand,Ui=Oi.expanded,ki=Oi.rowProps,Ai=Oi.expandedRowRender,rr=Oi.expandedRowClassName,ti;if(Ni&&Ui){var ji=Ai(vn,gt,wn+1,Ui),Li=rr==null?void 0:rr(vn,gt,wn),bi={};gi&&(bi={style:(0,Ge.Z)({},"--virtual-width","".concat(si,"px"))});var $i="".concat(Zn,"-expanded-row-cell");ti=he.createElement("div",{className:ct()("".concat(Zn,"-expanded-row"),"".concat(Zn,"-expanded-row-level-").concat(wn+1),Li)},he.createElement(xn,{component:"div",prefixCls:Zn,className:ct()($i,(0,Ge.Z)({},"".concat($i,"-fixed"),gi)),additionalProps:bi},ji))}var pi=(0,Qe.Z)((0,Qe.Z)({},Sn),{},{width:Wn});hn&&(pi.position="absolute",pi.pointerEvents="none");var sr=he.createElement("div",(0,ce.Z)({},ki,mn,{ref:Ni?null:zt,className:ct()(Pt,"".concat(Zn,"-row"),ki==null?void 0:ki.className,(0,Ge.Z)({},"".concat(Zn,"-row-extra"),hn)),style:(0,Qe.Z)((0,Qe.Z)({},pi),ki==null?void 0:ki.style)}),wi.map(function(Yi,Ci){return he.createElement(yo,{key:Ci,rowInfo:Oi,column:Yi,colIndex:Ci,indent:wn,index:gt,renderIndex:zn,record:vn,inverse:hn,getHeight:sn})}));return Ni?he.createElement("div",{ref:zt},sr,ti):sr}),co=le(bo),Ki=co,Hi=he.forwardRef(function(Rt,zt){var ln=Rt.data,gt=Rt.onScroll,Pt=ge(Ce,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),Lt=Pt.flattenColumns,Sn=Pt.onColumnResize,hn=Pt.getRowKey,sn=Pt.expandedKeys,mn=Pt.prefixCls,vn=Pt.childrenColumnName,wn=Pt.emptyNode,zn=Pt.scrollX,ni=ge(Bn),Wn=ni.scrollY,wi=ni.listItemHeight,Zn=he.useRef(),gi=Jt(ln,vn,sn,hn),si=he.useMemo(function(){var ti=0;return Lt.map(function(ji){var Li=ji.width,bi=ji.key;return ti+=Li,[bi,Li,ti]})},[Lt]),Oi=he.useMemo(function(){return si.map(function(ti){return ti[2]})},[si]);he.useEffect(function(){si.forEach(function(ti){var ji=(0,Ie.Z)(ti,2),Li=ji[0],bi=ji[1];Sn(Li,bi)})},[si]),he.useImperativeHandle(zt,function(){var ti={};return Object.defineProperty(ti,"scrollLeft",{get:function(){var Li;return((Li=Zn.current)===null||Li===void 0?void 0:Li.getScrollInfo().x)||0},set:function(Li){var bi;(bi=Zn.current)===null||bi===void 0||bi.scrollTo({left:Li})}}),ti});var Ni=function(ji,Li){var bi,$i=(bi=gi[Li])===null||bi===void 0?void 0:bi.record,pi=ji.onCell;if(pi){var sr,Yi=pi($i,Li);return(sr=Yi==null?void 0:Yi.rowSpan)!==null&&sr!==void 0?sr:1}return 1},Ui=function(ji){var Li=ji.start,bi=ji.end,$i=ji.getSize,pi=ji.offsetY;if(bi<0)return null;for(var sr=Lt.filter(function(Wr){return Ni(Wr,Li)===0}),Yi=Li,Ci=function(Er){if(sr=sr.filter(function(Xr){return Ni(Xr,Er)===0}),!sr.length)return Yi=Er,"break"},Gi=Li;Gi>=0;Gi-=1){var vr=Ci(Gi);if(vr==="break")break}for(var qi=Lt.filter(function(Wr){return Ni(Wr,bi)!==1}),So=bi,Co=function(Er){if(qi=qi.filter(function(Xr){return Ni(Xr,Er)!==1}),!qi.length)return So=Math.max(Er-1,bi),"break"},is=bi;is<gi.length;is+=1){var so=Co(is);if(so==="break")break}for(var Tr=[],No=function(Er){var Xr=gi[Er];if(!Xr)return"continue";Lt.some(function(br){return Ni(br,Er)>1})&&Tr.push(Er)},Ar=Yi;Ar<=So;Ar+=1)var Yr=No(Ar);var rs=Tr.map(function(Wr){var Er=gi[Wr],Xr=hn(Er.record,Wr),br=function(ho){var Zo=Wr+ho-1,Ko=hn(gi[Zo].record,Zo),Jr=$i(Xr,Ko);return Jr.bottom-Jr.top},ao=$i(Xr);return he.createElement(Ki,{key:Wr,data:Er,rowKey:Xr,index:Wr,style:{top:-pi+ao.top},extra:!0,getHeight:br})});return rs},ki=he.useMemo(function(){return{columnsOffset:Oi}},[Oi]),Ai="".concat(mn,"-tbody"),rr;return gi.length?rr=he.createElement(fr.Z,{fullHeight:!1,ref:Zn,className:ct()(Ai,"".concat(Ai,"-virtual")),height:Wn,itemHeight:wi||24,data:gi,itemKey:function(ji){return hn(ji.record)},scrollWidth:zn,onVirtualScroll:function(ji){var Li=ji.x;gt({scrollLeft:Li})},extraRender:Ui},function(ti,ji,Li){var bi=hn(ti.record,ji);return he.createElement(Ki,(0,ce.Z)({data:ti,rowKey:bi,index:ji},Li))}):rr=he.createElement("div",{className:ct()("".concat(mn,"-placeholder"))},he.createElement(xn,{component:"div",prefixCls:mn},wn)),he.createElement(Br.Provider,{value:ki},rr)}),lr=le(Hi),Pr=lr,ci=function(zt,ln){var gt=ln.ref,Pt=ln.onScroll;return he.createElement(Pr,{ref:gt,data:zt,onScroll:Pt})},Tt=100;function Ur(Rt){var zt=Rt.columns,ln=Rt.scroll,gt=Rt.prefixCls,Pt=gt===void 0?Jn:gt,Lt=Rt.className,Sn=Rt.listItemHeight,hn=ln||{},sn=hn.x,mn=hn.y;typeof sn!="number"&&(sn=((zt||[]).length+1)*Tt),typeof mn!="number"&&(mn=500);var vn=he.useMemo(function(){return{scrollY:mn,listItemHeight:Sn}},[mn,Sn]);return he.createElement(Bn.Provider,{value:vn},he.createElement(zi,(0,ce.Z)({},Rt,{className:ct()(Lt,"".concat(Pt,"-virtual")),scroll:(0,Qe.Z)((0,Qe.Z)({},ln),{},{x:sn}),components:{body:ci},columns:zt,internalHooks:me,tailor:!0})))}function zr(Rt){return se(Ur,Rt)}var ts=zr(),ko=null;function ss(Rt){return null}var _r=ss;function ur(Rt){return null}var Kr=ur,cr=Ee(2738),qr=Ee(68031),Yo=Ee(36355),nr=Ee(93891),Wi=Ee(19716),Qn=Ee(8628),ir=Ee(31724),eo=Ee(58421),Ro=Ee(71418),Bo=Ee(88088);function Xo(Rt){return function(ln){let{prefixCls:gt,onExpand:Pt,record:Lt,expanded:Sn,expandable:hn}=ln;const sn=`${gt}-row-expand-icon`;return he.createElement("button",{type:"button",onClick:mn=>{Pt(Lt,mn),mn.stopPropagation()},className:ct()(sn,{[`${sn}-spaced`]:!hn,[`${sn}-expanded`]:hn&&Sn,[`${sn}-collapsed`]:hn&&!Sn}),"aria-label":Sn?Rt.collapse:Rt.expand,"aria-expanded":Sn})}}var as=Xo;function Ho(Rt,zt){return"key"in Rt&&Rt.key!==void 0&&Rt.key!==null?Rt.key:Rt.dataIndex?Array.isArray(Rt.dataIndex)?Rt.dataIndex.join("."):Rt.dataIndex:zt}function ia(Rt,zt){return zt?`${zt}-${Rt}`:`${Rt}`}function _s(Rt,zt){return typeof Rt=="function"?Rt(zt):Rt}function la(Rt,zt){const ln=_s(Rt,zt);return Object.prototype.toString.call(ln)==="[object Object]"?"":ln}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"},Is=Tn,Pu=Ee(7657),Ua=function(zt,ln){return he.createElement(Pu.Z,(0,ce.Z)({},zt,{ref:ln,icon:Is}))},Sa=he.forwardRef(Ua),us=Sa,Ws=Ee(56762);function Po(Rt){const zt=he.useRef(Rt),ln=(0,Ws.Z)();return[()=>zt.current,gt=>{zt.current=gt,ln()}]}var Ao=Ee(3113),Eo=Ee(24905),ua=Ee(38854),xr=Ee(64165),lo=Ee(20834),$r=Ee(40875),Mi=Ee(5112),Es=Ee(17574),Ls=Ee(47472),xa=Ee(92832);function xl(Rt){let{value:zt,onChange:ln,filterSearch:gt,tablePrefixCls:Pt,locale:Lt}=Rt;return gt?he.createElement("div",{className:`${Pt}-filter-dropdown-search`},he.createElement(xa.default,{prefix:he.createElement(Ls.Z,null),placeholder:Lt.filterSearchPlaceholder,onChange:ln,value:zt,htmlSize:1,className:`${Pt}-filter-dropdown-search-input`})):null}var Il=xl,vi=Ee(10228);const ms=Rt=>{const{keyCode:zt}=Rt;zt===vi.Z.ENTER&&Rt.stopPropagation()};var qa=he.forwardRef((Rt,zt)=>he.createElement("div",{className:Rt.className,onClick:ln=>ln.stopPropagation(),onKeyDown:ms,ref:zt},Rt.children));function wl(Rt){let zt=[];return(Rt||[]).forEach(ln=>{let{value:gt,children:Pt}=ln;zt.push(gt),Pt&&(zt=[].concat((0,xi.Z)(zt),(0,xi.Z)(wl(Pt))))}),zt}function Dl(Rt){return Rt.some(zt=>{let{children:ln}=zt;return ln})}function Fr(Rt,zt){return typeof zt=="string"||typeof zt=="number"?zt==null?void 0:zt.toString().toLowerCase().includes(Rt.trim().toLowerCase()):!1}function nc(Rt){let{filters:zt,prefixCls:ln,filteredKeys:gt,filterMultiple:Pt,searchValue:Lt,filterSearch:Sn}=Rt;return zt.map((hn,sn)=>{const mn=String(hn.value);if(hn.children)return{key:mn||sn,label:hn.text,popupClassName:`${ln}-dropdown-submenu`,children:nc({filters:hn.children,prefixCls:ln,filteredKeys:gt,filterMultiple:Pt,searchValue:Lt,filterSearch:Sn})};const vn=Pt?Eo.default:Mi.ZP,wn={key:hn.value!==void 0?mn:sn,label:he.createElement(he.Fragment,null,he.createElement(vn,{checked:gt.includes(mn)}),he.createElement("span",null,hn.text))};return Lt.trim()?typeof Sn=="function"?Sn(Lt,hn)?wn:null:Fr(Lt,hn.text)?wn:null:wn})}function Ia(Rt){var zt,ln;const{tablePrefixCls:gt,prefixCls:Pt,column:Lt,dropdownPrefixCls:Sn,columnKey:hn,filterMultiple:sn,filterMode:mn="menu",filterSearch:vn=!1,filterState:wn,triggerFilter:zn,locale:ni,children:Wn,getPopupContainer:wi}=Rt,{filterDropdownOpen:Zn,onFilterDropdownOpenChange:gi,filterResetToDefaultFilteredValue:si,defaultFilteredValue:Oi,filterDropdownVisible:Ni,onFilterDropdownVisibleChange:Ui}=Lt,[ki,Ai]=he.useState(!1),rr=!!(wn&&(!((zt=wn.filteredKeys)===null||zt===void 0)&&zt.length||wn.forceFiltered)),ti=Lr=>{Ai(Lr),gi==null||gi(Lr),Ui==null||Ui(Lr)},ji=(ln=Zn!=null?Zn:Ni)!==null&&ln!==void 0?ln:ki,Li=wn==null?void 0:wn.filteredKeys,[bi,$i]=Po(Li||[]),pi=Lr=>{let{selectedKeys:ho}=Lr;$i(ho)},sr=(Lr,ho)=>{let{node:Zo,checked:Ko}=ho;pi(sn?{selectedKeys:Lr}:{selectedKeys:Ko&&Zo.key?[Zo.key]:[]})};he.useEffect(()=>{ki&&pi({selectedKeys:Li||[]})},[Li]);const[Yi,Ci]=he.useState([]),Gi=Lr=>{Ci(Lr)},[vr,qi]=he.useState(""),So=Lr=>{const{value:ho}=Lr.target;qi(ho)};he.useEffect(()=>{ki||qi("")},[ki]);const Co=Lr=>{const ho=Lr&&Lr.length?Lr:null;if(ho===null&&(!wn||!wn.filteredKeys)||(0,Pe.Z)(ho,wn==null?void 0:wn.filteredKeys,!0))return null;zn({column:Lt,key:hn,filteredKeys:ho})},is=()=>{ti(!1),Co(bi())},so=function(){let{confirm:Lr,closeDropdown:ho}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};Lr&&Co([]),ho&&ti(!1),qi(""),$i(si?(Oi||[]).map(Zo=>String(Zo)):[])},Tr=function(){let{closeDropdown:Lr}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};Lr&&ti(!1),Co(bi())},No=Lr=>{Lr&&Li!==void 0&&$i(Li||[]),ti(Lr),!Lr&&!Lt.filterDropdown&&is()},Ar=ct()({[`${Sn}-menu-without-submenu`]:!Dl(Lt.filters||[])}),Yr=Lr=>{if(Lr.target.checked){const ho=wl(Lt==null?void 0:Lt.filters).map(Zo=>String(Zo));$i(ho)}else $i([])},rs=Lr=>{let{filters:ho}=Lr;return(ho||[]).map((Zo,Ko)=>{const Jr=String(Zo.value),Io={title:Zo.text,key:Zo.value!==void 0?Jr:Ko};return Zo.children&&(Io.children=rs({filters:Zo.children})),Io})},Wr=Lr=>{var ho;return Object.assign(Object.assign({},Lr),{text:Lr.title,value:Lr.key,children:((ho=Lr.children)===null||ho===void 0?void 0:ho.map(Zo=>Wr(Zo)))||[]})};let Er;if(typeof Lt.filterDropdown=="function")Er=Lt.filterDropdown({prefixCls:`${Sn}-custom`,setSelectedKeys:Lr=>pi({selectedKeys:Lr}),selectedKeys:bi(),confirm:Tr,clearFilters:so,filters:Lt.filters,visible:ji,close:()=>{ti(!1)}});else if(Lt.filterDropdown)Er=Lt.filterDropdown;else{const Lr=bi()||[],ho=()=>(Lt.filters||[]).length===0?he.createElement(xr.Z,{image:xr.Z.PRESENTED_IMAGE_SIMPLE,description:ni.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):mn==="tree"?he.createElement(he.Fragment,null,he.createElement(Il,{filterSearch:vn,value:vr,onChange:So,tablePrefixCls:gt,locale:ni}),he.createElement("div",{className:`${gt}-filter-dropdown-tree`},sn?he.createElement(Eo.default,{checked:Lr.length===wl(Lt.filters).length,indeterminate:Lr.length>0&&Lr.length<wl(Lt.filters).length,className:`${gt}-filter-dropdown-checkall`,onChange:Yr},ni.filterCheckall):null,he.createElement(Es.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:sn,checkStrictly:!sn,className:`${Sn}-menu`,onCheck:sr,checkedKeys:Lr,selectedKeys:Lr,showIcon:!1,treeData:rs({filters:Lt.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:vr.trim()?Ko=>typeof vn=="function"?vn(vr,Wr(Ko)):Fr(vr,Ko.title):void 0}))):he.createElement(he.Fragment,null,he.createElement(Il,{filterSearch:vn,value:vr,onChange:So,tablePrefixCls:gt,locale:ni}),he.createElement(lo.default,{selectable:!0,multiple:sn,prefixCls:`${Sn}-menu`,className:Ar,onSelect:pi,onDeselect:pi,selectedKeys:Lr,getPopupContainer:wi,openKeys:Yi,onOpenChange:Gi,items:nc({filters:Lt.filters||[],filterSearch:vn,prefixCls:Pt,filteredKeys:bi(),filterMultiple:sn,searchValue:vr})})),Zo=()=>si?(0,Pe.Z)((Oi||[]).map(Ko=>String(Ko)),Lr,!0):Lr.length===0;Er=he.createElement(he.Fragment,null,ho(),he.createElement("div",{className:`${Pt}-dropdown-btns`},he.createElement(Ao.ZP,{type:"link",size:"small",disabled:Zo(),onClick:()=>so()},ni.filterReset),he.createElement(Ao.ZP,{type:"primary",size:"small",onClick:is},ni.filterConfirm)))}Lt.filterDropdown&&(Er=he.createElement($r.J,{selectable:void 0},Er));const Xr=()=>he.createElement(qa,{className:`${Pt}-dropdown`},Er);let br;typeof Lt.filterIcon=="function"?br=Lt.filterIcon(rr):Lt.filterIcon?br=Lt.filterIcon:br=he.createElement(us,null);const{direction:ao}=he.useContext(Yo.E_);return he.createElement("div",{className:`${Pt}-column`},he.createElement("span",{className:`${gt}-column-title`},Wn),he.createElement(ua.Z,{dropdownRender:Xr,trigger:["click"],open:ji,onOpenChange:No,getPopupContainer:wi,placement:ao==="rtl"?"bottomLeft":"bottomRight"},he.createElement("span",{role:"button",tabIndex:-1,className:ct()(`${Pt}-trigger`,{active:rr}),onClick:Lr=>{Lr.stopPropagation()}},br)))}var Ga=Ia;function Na(Rt,zt,ln){let gt=[];return(Rt||[]).forEach((Pt,Lt)=>{var Sn;const hn=ia(Lt,ln);if(Pt.filters||"filterDropdown"in Pt||"onFilter"in Pt)if("filteredValue"in Pt){let sn=Pt.filteredValue;"filterDropdown"in Pt||(sn=(Sn=sn==null?void 0:sn.map(String))!==null&&Sn!==void 0?Sn:sn),gt.push({column:Pt,key:Ho(Pt,hn),filteredKeys:sn,forceFiltered:Pt.filtered})}else gt.push({column:Pt,key:Ho(Pt,hn),filteredKeys:zt&&Pt.defaultFilteredValue?Pt.defaultFilteredValue:void 0,forceFiltered:Pt.filtered});"children"in Pt&&(gt=[].concat((0,xi.Z)(gt),(0,xi.Z)(Na(Pt.children,zt,hn))))}),gt}function $l(Rt,zt,ln,gt,Pt,Lt,Sn,hn){return ln.map((sn,mn)=>{const vn=ia(mn,hn),{filterMultiple:wn=!0,filterMode:zn,filterSearch:ni}=sn;let Wn=sn;if(Wn.filters||Wn.filterDropdown){const wi=Ho(Wn,vn),Zn=gt.find(gi=>{let{key:si}=gi;return wi===si});Wn=Object.assign(Object.assign({},Wn),{title:gi=>he.createElement(Ga,{tablePrefixCls:Rt,prefixCls:`${Rt}-filter`,dropdownPrefixCls:zt,column:Wn,columnKey:wi,filterState:Zn,filterMultiple:wn,filterMode:zn,filterSearch:ni,triggerFilter:Lt,locale:Pt,getPopupContainer:Sn},_s(sn.title,gi))})}return"children"in Wn&&(Wn=Object.assign(Object.assign({},Wn),{children:$l(Rt,zt,Wn.children,gt,Pt,Lt,Sn,vn)})),Wn})}function _u(Rt){const zt={};return Rt.forEach(ln=>{let{key:gt,filteredKeys:Pt,column:Lt}=ln;const{filters:Sn,filterDropdown:hn}=Lt;if(hn)zt[gt]=Pt||null;else if(Array.isArray(Pt)){const sn=wl(Sn);zt[gt]=sn.filter(mn=>Pt.includes(String(mn)))}else zt[gt]=null}),zt}function Wa(Rt,zt){return zt.reduce((ln,gt)=>{const{column:{onFilter:Pt,filters:Lt},filteredKeys:Sn}=gt;return Pt&&Sn&&Sn.length?ln.filter(hn=>Sn.some(sn=>{const mn=wl(Lt),vn=mn.findIndex(zn=>String(zn)===String(sn)),wn=vn!==-1?mn[vn]:sn;return Pt(wn,hn)})):ln},Rt)}const Za=Rt=>Rt.flatMap(zt=>"children"in zt?[zt].concat((0,xi.Z)(Za(zt.children||[]))):[zt]);function Uu(Rt){let{prefixCls:zt,dropdownPrefixCls:ln,mergedColumns:gt,onFilterChange:Pt,getPopupContainer:Lt,locale:Sn}=Rt;const hn=he.useMemo(()=>Za(gt||[]),[gt]),[sn,mn]=he.useState(()=>Na(hn,!0)),vn=he.useMemo(()=>{const Wn=Na(hn,!1);if(Wn.length===0)return Wn;let wi=!0,Zn=!0;if(Wn.forEach(gi=>{let{filteredKeys:si}=gi;si!==void 0?wi=!1:Zn=!1}),wi){const gi=(hn||[]).map((si,Oi)=>Ho(si,ia(Oi)));return sn.filter(si=>{let{key:Oi}=si;return gi.includes(Oi)}).map(si=>{const Oi=hn[gi.findIndex(Ni=>Ni===si.key)];return Object.assign(Object.assign({},si),{column:Object.assign(Object.assign({},si.column),Oi),forceFiltered:Oi.filtered})})}return Wn},[hn,sn]),wn=he.useMemo(()=>_u(vn),[vn]),zn=Wn=>{const wi=vn.filter(Zn=>{let{key:gi}=Zn;return gi!==Wn.key});wi.push(Wn),mn(wi),Pt(_u(wi),wi)};return[Wn=>$l(zt,ln,Wn,vn,Sn,zn,Lt),vn,wn]}var yc=Uu;function Eu(Rt,zt,ln){const gt=he.useRef({});function Pt(Lt){if(!gt.current||gt.current.data!==Rt||gt.current.childrenColumnName!==zt||gt.current.getRowKey!==ln){let hn=function(sn){sn.forEach((mn,vn)=>{const wn=ln(mn,vn);Sn.set(wn,mn),mn&&typeof mn=="object"&&zt in mn&&hn(mn[zt]||[])})};const Sn=new Map;hn(Rt),gt.current={data:Rt,childrenColumnName:zt,kvMap:Sn,getRowKey:ln}}return gt.current.kvMap.get(Lt)}return[Pt]}var Rl=Ee(50371),Sc=function(Rt,zt){var ln={};for(var gt in Rt)Object.prototype.hasOwnProperty.call(Rt,gt)&&zt.indexOf(gt)<0&&(ln[gt]=Rt[gt]);if(Rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Pt=0,gt=Object.getOwnPropertySymbols(Rt);Pt<gt.length;Pt++)zt.indexOf(gt[Pt])<0&&Object.prototype.propertyIsEnumerable.call(Rt,gt[Pt])&&(ln[gt[Pt]]=Rt[gt[Pt]]);return ln};const Gu=10;function Lu(Rt,zt){const ln={current:Rt.current,pageSize:Rt.pageSize};return Object.keys(zt&&typeof zt=="object"?zt:{}).forEach(Pt=>{const Lt=Rt[Pt];typeof Lt!="function"&&(ln[Pt]=Lt)}),ln}function bl(Rt,zt,ln){const gt=ln&&typeof ln=="object"?ln:{},{total:Pt=0}=gt,Lt=Sc(gt,["total"]),[Sn,hn]=(0,he.useState)(()=>({current:"defaultCurrent"in Lt?Lt.defaultCurrent:1,pageSize:"defaultPageSize"in Lt?Lt.defaultPageSize:Gu})),sn=(0,Rl.Z)(Sn,Lt,{total:Pt>0?Pt:Rt}),mn=Math.ceil((Pt||Rt)/sn.pageSize);sn.current>mn&&(sn.current=mn||1);const vn=(zn,ni)=>{hn({current:zn!=null?zn:1,pageSize:ni||sn.pageSize})},wn=(zn,ni)=>{var Wn;ln&&((Wn=ln.onChange)===null||Wn===void 0||Wn.call(ln,zn,ni)),vn(zn,ni),zt(zn,ni||(sn==null?void 0:sn.pageSize))};return ln===!1?[{},()=>{}]:[Object.assign(Object.assign({},sn),{onChange:wn}),vn]}var th=bl,xc=Ee(84105),lu=Ee(35654),oo=Ee(90782),Uo=Ee(71430),ka=Ee(18929);const ra={},Ds="SELECT_ALL",bs="SELECT_INVERT",ks="SELECT_NONE",Zs=[],Ks=(Rt,zt)=>{let ln=[];return(zt||[]).forEach(gt=>{ln.push(gt),gt&&typeof gt=="object"&&Rt in gt&&(ln=[].concat((0,xi.Z)(ln),(0,xi.Z)(Ks(Rt,gt[Rt]))))}),ln};var Bl=(Rt,zt)=>{const{preserveSelectedRowKeys:ln,selectedRowKeys:gt,defaultSelectedRowKeys:Pt,getCheckboxProps:Lt,onChange:Sn,onSelect:hn,onSelectAll:sn,onSelectInvert:mn,onSelectNone:vn,onSelectMultiple:wn,columnWidth:zn,type:ni,selections:Wn,fixed:wi,renderCell:Zn,hideSelectAll:gi,checkStrictly:si=!0}=zt||{},{prefixCls:Oi,data:Ni,pageData:Ui,getRecordByKey:ki,getRowKey:Ai,expandType:rr,childrenColumnName:ti,locale:ji,getPopupContainer:Li}=Rt,[bi,$i]=(0,ka.Z)(gt||Pt||Zs,{value:gt}),pi=he.useRef(new Map),sr=(0,he.useCallback)(Wr=>{if(ln){const Er=new Map;Wr.forEach(Xr=>{let br=ki(Xr);!br&&pi.current.has(Xr)&&(br=pi.current.get(Xr)),Er.set(Xr,br)}),pi.current=Er}},[ki,ln]);he.useEffect(()=>{sr(bi)},[bi]);const{keyEntities:Yi}=(0,he.useMemo)(()=>{if(si)return{keyEntities:null};let Wr=Ni;if(ln){const Er=new Set(Ni.map((br,ao)=>Ai(br,ao))),Xr=Array.from(pi.current).reduce((br,ao)=>{let[Lr,ho]=ao;return Er.has(Lr)?br:br.concat(ho)},[]);Wr=[].concat((0,xi.Z)(Wr),(0,xi.Z)(Xr))}return(0,Uo.I8)(Wr,{externalGetKey:Ai,childrenPropName:ti})},[Ni,Ai,si,ti,ln]),Ci=(0,he.useMemo)(()=>Ks(ti,Ui),[ti,Ui]),Gi=(0,he.useMemo)(()=>{const Wr=new Map;return Ci.forEach((Er,Xr)=>{const br=Ai(Er,Xr),ao=(Lt?Lt(Er):null)||{};Wr.set(br,ao)}),Wr},[Ci,Ai,Lt]),vr=(0,he.useCallback)(Wr=>{var Er;return!!(!((Er=Gi.get(Ai(Wr)))===null||Er===void 0)&&Er.disabled)},[Gi,Ai]),[qi,So]=(0,he.useMemo)(()=>{if(si)return[bi||[],[]];const{checkedKeys:Wr,halfCheckedKeys:Er}=(0,oo.S)(bi,!0,Yi,vr);return[Wr||[],Er]},[bi,si,Yi,vr]),Co=(0,he.useMemo)(()=>{const Wr=ni==="radio"?qi.slice(0,1):qi;return new Set(Wr)},[qi,ni]),is=(0,he.useMemo)(()=>ni==="radio"?new Set:new Set(So),[So,ni]),[so,Tr]=(0,he.useState)(null);he.useEffect(()=>{zt||$i(Zs)},[!!zt]);const No=(0,he.useCallback)((Wr,Er)=>{let Xr,br;sr(Wr),ln?(Xr=Wr,br=Wr.map(ao=>pi.current.get(ao))):(Xr=[],br=[],Wr.forEach(ao=>{const Lr=ki(ao);Lr!==void 0&&(Xr.push(ao),br.push(Lr))})),$i(Xr),Sn==null||Sn(Xr,br,{type:Er})},[$i,ki,Sn,ln]),Ar=(0,he.useCallback)((Wr,Er,Xr,br)=>{if(hn){const ao=Xr.map(Lr=>ki(Lr));hn(ki(Wr),Er,ao,br)}No(Xr,"single")},[hn,ki,No]),Yr=(0,he.useMemo)(()=>!Wn||gi?null:(Wn===!0?[Ds,bs,ks]:Wn).map(Er=>Er===Ds?{key:"all",text:ji.selectionAll,onSelect(){No(Ni.map((Xr,br)=>Ai(Xr,br)).filter(Xr=>{const br=Gi.get(Xr);return!(br!=null&&br.disabled)||Co.has(Xr)}),"all")}}:Er===bs?{key:"invert",text:ji.selectInvert,onSelect(){const Xr=new Set(Co);Ui.forEach((ao,Lr)=>{const ho=Ai(ao,Lr),Zo=Gi.get(ho);Zo!=null&&Zo.disabled||(Xr.has(ho)?Xr.delete(ho):Xr.add(ho))});const br=Array.from(Xr);mn&&mn(br),No(br,"invert")}}:Er===ks?{key:"none",text:ji.selectNone,onSelect(){vn==null||vn(),No(Array.from(Co).filter(Xr=>{const br=Gi.get(Xr);return br==null?void 0:br.disabled}),"none")}}:Er).map(Er=>Object.assign(Object.assign({},Er),{onSelect:function(){for(var Xr,br,ao=arguments.length,Lr=new Array(ao),ho=0;ho<ao;ho++)Lr[ho]=arguments[ho];(br=Er.onSelect)===null||br===void 0||(Xr=br).call.apply(Xr,[Er].concat(Lr)),Tr(null)}})),[Wn,Co,Ui,Ai,mn,No]);return[(0,he.useCallback)(Wr=>{var Er;if(!zt)return Wr.filter(Qo=>Qo!==ra);let Xr=(0,xi.Z)(Wr);const br=new Set(Co),ao=Ci.map(Ai).filter(Qo=>!Gi.get(Qo).disabled),Lr=ao.every(Qo=>br.has(Qo)),ho=ao.some(Qo=>br.has(Qo)),Zo=()=>{const Qo=[];Lr?ao.forEach(xs=>{br.delete(xs),Qo.push(xs)}):ao.forEach(xs=>{br.has(xs)||(br.add(xs),Qo.push(xs))});const qo=Array.from(br);sn==null||sn(!Lr,qo.map(xs=>ki(xs)),Qo.map(xs=>ki(xs))),No(qo,"all"),Tr(null)};let Ko;if(ni!=="radio"){let Qo;if(Yr){const jo={getPopupContainer:Li,items:Yr.map((As,La)=>{const{key:_l,text:Xl,onSelect:jl}=As;return{key:_l!=null?_l:La,onClick:()=>{jl==null||jl(ao)},label:Xl}})};Qo=he.createElement("div",{className:`${Oi}-selection-extra`},he.createElement(ua.Z,{menu:jo,getPopupContainer:Li},he.createElement("span",null,he.createElement(xc.Z,null))))}const qo=Ci.map((jo,As)=>{const La=Ai(jo,As),_l=Gi.get(La)||{};return Object.assign({checked:br.has(La)},_l)}).filter(jo=>{let{disabled:As}=jo;return As}),xs=!!qo.length&&qo.length===Ci.length,Ts=xs&&qo.every(jo=>{let{checked:As}=jo;return As}),ma=xs&&qo.some(jo=>{let{checked:As}=jo;return As});Ko=!gi&&he.createElement("div",{className:`${Oi}-selection`},he.createElement(Eo.default,{checked:xs?Ts:!!Ci.length&&Lr,indeterminate:xs?!Ts&&ma:!Lr&&ho,onChange:Zo,disabled:Ci.length===0||xs,"aria-label":Qo?"Custom selection":"Select all",skipGroup:!0}),Qo)}let Jr;ni==="radio"?Jr=(Qo,qo,xs)=>{const Ts=Ai(qo,xs),ma=br.has(Ts);return{node:he.createElement(Mi.ZP,Object.assign({},Gi.get(Ts),{checked:ma,onClick:jo=>jo.stopPropagation(),onChange:jo=>{br.has(Ts)||Ar(Ts,!0,[Ts],jo.nativeEvent)}})),checked:ma}}:Jr=(Qo,qo,xs)=>{var Ts;const ma=Ai(qo,xs),jo=br.has(ma),As=is.has(ma),La=Gi.get(ma);let _l;return rr==="nest"?_l=As:_l=(Ts=La==null?void 0:La.indeterminate)!==null&&Ts!==void 0?Ts:As,{node:he.createElement(Eo.default,Object.assign({},La,{indeterminate:_l,checked:jo,skipGroup:!0,onClick:Xl=>Xl.stopPropagation(),onChange:Xl=>{let{nativeEvent:jl}=Xl;const{shiftKey:cu}=jl;let hu=-1,Jl=-1;if(cu&&si){const gs=new Set([so,ma]);ao.some((Ra,oa)=>{if(gs.has(Ra))if(hu===-1)hu=oa;else return Jl=oa,!0;return!1})}if(Jl!==-1&&hu!==Jl&&si){const gs=ao.slice(hu,Jl+1),Ra=[];jo?gs.forEach(Ns=>{br.has(Ns)&&(Ra.push(Ns),br.delete(Ns))}):gs.forEach(Ns=>{br.has(Ns)||(Ra.push(Ns),br.add(Ns))});const oa=Array.from(br);wn==null||wn(!jo,oa.map(Ns=>ki(Ns)),Ra.map(Ns=>ki(Ns))),No(oa,"multiple")}else{const gs=qi;if(si){const Ra=jo?(0,lu._5)(gs,ma):(0,lu.L0)(gs,ma);Ar(ma,!jo,Ra,jl)}else{const Ra=(0,oo.S)([].concat((0,xi.Z)(gs),[ma]),!0,Yi,vr),{checkedKeys:oa,halfCheckedKeys:Ns}=Ra;let Ql=oa;if(jo){const _c=new Set(oa);_c.delete(ma),Ql=(0,oo.S)(Array.from(_c),{checked:!1,halfCheckedKeys:Ns},Yi,vr).checkedKeys}Ar(ma,!jo,Ql,jl)}}Tr(jo?null:ma)}})),checked:jo}};const Io=(Qo,qo,xs)=>{const{node:Ts,checked:ma}=Jr(Qo,qo,xs);return Zn?Zn(ma,qo,xs,Ts):Ts};if(!Xr.includes(ra))if(Xr.findIndex(Qo=>{var qo;return((qo=Qo[or])===null||qo===void 0?void 0:qo.columnType)==="EXPAND_COLUMN"})===0){const[Qo,...qo]=Xr;Xr=[Qo,ra].concat((0,xi.Z)(qo))}else Xr=[ra].concat((0,xi.Z)(Xr));const Cs=Xr.indexOf(ra);Xr=Xr.filter((Qo,qo)=>Qo!==ra||qo===Cs);const Lo=Xr[Cs-1],Jo=Xr[Cs+1];let Ss=wi;Ss===void 0&&((Jo==null?void 0:Jo.fixed)!==void 0?Ss=Jo.fixed:(Lo==null?void 0:Lo.fixed)!==void 0&&(Ss=Lo.fixed)),Ss&&Lo&&((Er=Lo[or])===null||Er===void 0?void 0:Er.columnType)==="EXPAND_COLUMN"&&Lo.fixed===void 0&&(Lo.fixed=Ss);const Js=ct()(`${Oi}-selection-col`,{[`${Oi}-selection-col-with-dropdown`]:Wn&&ni==="checkbox"}),Pl={fixed:Ss,width:zn,className:`${Oi}-selection-column`,title:zt.columnTitle||Ko,render:Io,onCell:zt.onCell,[or]:{className:Js}};return Xr.map(Qo=>Qo===ra?Pl:Qo)},[Ai,Ci,zt,qi,Co,is,zn,Yr,rr,so,Gi,wn,Ar,vr]),Co]},Rs=Ee(89489),xh=Ee(59477),nh=Ee(6848);const wc="ascend",gr="descend";function bc(Rt){return typeof Rt.sorter=="object"&&typeof Rt.sorter.multiple=="number"?Rt.sorter.multiple:!1}function nn(Rt){return typeof Rt=="function"?Rt:Rt&&typeof Rt=="object"&&Rt.compare?Rt.compare:!1}function Yn(Rt,zt){return zt?Rt[Rt.indexOf(zt)+1]:Rt[0]}function wh(Rt,zt,ln){let gt=[];function Pt(Lt,Sn){gt.push({column:Lt,key:Ho(Lt,Sn),multiplePriority:bc(Lt),sortOrder:Lt.sortOrder})}return(Rt||[]).forEach((Lt,Sn)=>{const hn=ia(Sn,ln);Lt.children?("sortOrder"in Lt&&Pt(Lt,hn),gt=[].concat((0,xi.Z)(gt),(0,xi.Z)(wh(Lt.children,zt,hn)))):Lt.sorter&&("sortOrder"in Lt?Pt(Lt,hn):zt&&Lt.defaultSortOrder&>.push({column:Lt,key:Ho(Lt,hn),multiplePriority:bc(Lt),sortOrder:Lt.defaultSortOrder}))}),gt}function Qh(Rt,zt,ln,gt,Pt,Lt,Sn,hn){return(zt||[]).map((sn,mn)=>{const vn=ia(mn,hn);let wn=sn;if(wn.sorter){const zn=wn.sortDirections||Pt,ni=wn.showSorterTooltip===void 0?Sn:wn.showSorterTooltip,Wn=Ho(wn,vn),wi=ln.find(rr=>{let{key:ti}=rr;return ti===Wn}),Zn=wi?wi.sortOrder:null,gi=Yn(zn,Zn);let si;if(sn.sortIcon)si=sn.sortIcon({sortOrder:Zn});else{const rr=zn.includes(wc)&&he.createElement(xh.Z,{className:ct()(`${Rt}-column-sorter-up`,{active:Zn===wc})}),ti=zn.includes(gr)&&he.createElement(Rs.Z,{className:ct()(`${Rt}-column-sorter-down`,{active:Zn===gr})});si=he.createElement("span",{className:ct()(`${Rt}-column-sorter`,{[`${Rt}-column-sorter-full`]:!!(rr&&ti)})},he.createElement("span",{className:`${Rt}-column-sorter-inner`,"aria-hidden":"true"},rr,ti))}const{cancelSort:Oi,triggerAsc:Ni,triggerDesc:Ui}=Lt||{};let ki=Oi;gi===gr?ki=Ui:gi===wc&&(ki=Ni);const Ai=typeof ni=="object"?ni:{title:ki};wn=Object.assign(Object.assign({},wn),{className:ct()(wn.className,{[`${Rt}-column-sort`]:Zn}),title:rr=>{const ti=he.createElement("div",{className:`${Rt}-column-sorters`},he.createElement("span",{className:`${Rt}-column-title`},_s(sn.title,rr)),si);return ni?he.createElement(nh.Z,Object.assign({},Ai),ti):ti},onHeaderCell:rr=>{const ti=sn.onHeaderCell&&sn.onHeaderCell(rr)||{},ji=ti.onClick,Li=ti.onKeyDown;ti.onClick=pi=>{gt({column:sn,key:Wn,sortOrder:gi,multiplePriority:bc(sn)}),ji==null||ji(pi)},ti.onKeyDown=pi=>{pi.keyCode===vi.Z.ENTER&&(gt({column:sn,key:Wn,sortOrder:gi,multiplePriority:bc(sn)}),Li==null||Li(pi))};const bi=la(sn.title,{}),$i=bi==null?void 0:bi.toString();return Zn?ti["aria-sort"]=Zn==="ascend"?"ascending":"descending":ti["aria-label"]=$i||"",ti.className=ct()(ti.className,`${Rt}-column-has-sorters`),ti.tabIndex=0,sn.ellipsis&&(ti.title=(bi!=null?bi:"").toString()),ti}})}return"children"in wn&&(wn=Object.assign(Object.assign({},wn),{children:Qh(Rt,wn.children,ln,gt,Pt,Lt,Sn,vn)})),wn})}function Mu(Rt){const{column:zt,sortOrder:ln}=Rt;return{column:zt,order:ln,field:zt.dataIndex,columnKey:zt.key}}function Tu(Rt){const zt=Rt.filter(ln=>{let{sortOrder:gt}=ln;return gt}).map(Mu);return zt.length===0&&Rt.length?Object.assign(Object.assign({},Mu(Rt[Rt.length-1])),{column:void 0}):zt.length<=1?zt[0]||{}:zt}function Wu(Rt,zt,ln){const gt=zt.slice().sort((Sn,hn)=>hn.multiplePriority-Sn.multiplePriority),Pt=Rt.slice(),Lt=gt.filter(Sn=>{let{column:{sorter:hn},sortOrder:sn}=Sn;return nn(hn)&&sn});return Lt.length?Pt.sort((Sn,hn)=>{for(let sn=0;sn<Lt.length;sn+=1){const mn=Lt[sn],{column:{sorter:vn},sortOrder:wn}=mn,zn=nn(vn);if(zn&&wn){const ni=zn(Sn,hn,wn);if(ni!==0)return wn===wc?ni:-ni}}return 0}).map(Sn=>{const hn=Sn[ln];return hn?Object.assign(Object.assign({},Sn),{[ln]:Wu(hn,zt,ln)}):Sn}):Pt}function bh(Rt){let{prefixCls:zt,mergedColumns:ln,onSorterChange:gt,sortDirections:Pt,tableLocale:Lt,showSorterTooltip:Sn}=Rt;const[hn,sn]=he.useState(wh(ln,!0)),mn=he.useMemo(()=>{let Wn=!0;const wi=wh(ln,!1);if(!wi.length)return hn;const Zn=[];function gi(Oi){Wn?Zn.push(Oi):Zn.push(Object.assign(Object.assign({},Oi),{sortOrder:null}))}let si=null;return wi.forEach(Oi=>{si===null?(gi(Oi),Oi.sortOrder&&(Oi.multiplePriority===!1?Wn=!1:si=!0)):(si&&Oi.multiplePriority!==!1||(Wn=!1),gi(Oi))}),Zn},[ln,hn]),vn=he.useMemo(()=>{const Wn=mn.map(wi=>{let{column:Zn,sortOrder:gi}=wi;return{column:Zn,order:gi}});return{sortColumns:Wn,sortColumn:Wn[0]&&Wn[0].column,sortOrder:Wn[0]&&Wn[0].order}},[mn]);function wn(Wn){let wi;Wn.multiplePriority===!1||!mn.length||mn[0].multiplePriority===!1?wi=[Wn]:wi=[].concat((0,xi.Z)(mn.filter(Zn=>{let{key:gi}=Zn;return gi!==Wn.key})),[Wn]),sn(wi),gt(Tu(wi),wi)}return[Wn=>Qh(zt,Wn,mn,wn,Pt,Lt,Sn),mn,vn,()=>Tu(mn)]}function Cc(Rt,zt){return Rt.map(ln=>{const gt=Object.assign({},ln);return gt.title=_s(ln.title,zt),"children"in gt&&(gt.children=Cc(gt.children,zt)),gt})}function Vs(Rt){return[he.useCallback(ln=>Cc(ln,Rt),[Rt])]}var Vr=Qi((Rt,zt)=>{const{_renderTimes:ln}=Rt,{_renderTimes:gt}=zt;return ln!==gt}),Da=zr((Rt,zt)=>{const{_renderTimes:ln}=Rt,{_renderTimes:gt}=zt;return ln!==gt}),$s=Ee(64993),Ms=Ee(17313),xo=Ee(83116),ga=Ee(37613),cs=Rt=>{const{componentCls:zt}=Rt,ln=`${Rt.lineWidth}px ${Rt.lineType} ${Rt.tableBorderColor}`,gt=(Pt,Lt,Sn)=>({[`&${zt}-${Pt}`]:{[`> ${zt}-container`]:{[`> ${zt}-content, > ${zt}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${zt}-expanded-row-fixed`]:{margin:`-${Lt}px -${Sn+Rt.lineWidth}px`}}}}}});return{[`${zt}-wrapper`]:{[`${zt}${zt}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${zt}-title`]:{border:ln,borderBottom:0},[`> ${zt}-container`]:{borderInlineStart:ln,borderTop:ln,[`
|
|
|
> ${zt}-content,
|
|
|
> ${zt}-header,
|
|
|
> ${zt}-body,
|
|
|
> ${zt}-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:ln},"> thead":{"> tr:not(:last-child) > th":{borderBottom:ln},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${zt}-cell-fix-right-first::after`]:{borderInlineEnd:ln}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${zt}-expanded-row-fixed`]:{margin:`-${Rt.tablePaddingVertical}px -${Rt.tablePaddingHorizontal+Rt.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:Rt.lineWidth,bottom:0,borderInlineEnd:ln,content:'""'}}}}}},[`&${zt}-scroll-horizontal`]:{[`> ${zt}-container > ${zt}-body`]:{"> table > tbody":{[`
|
|
|
> tr${zt}-expanded-row,
|
|
|
> tr${zt}-placeholder
|
|
|
`]:{"> th, > td":{borderInlineEnd:0}}}}}},gt("middle",Rt.tablePaddingVerticalMiddle,Rt.tablePaddingHorizontalMiddle)),gt("small",Rt.tablePaddingVerticalSmall,Rt.tablePaddingHorizontalSmall)),{[`> ${zt}-footer`]:{border:ln,borderTop:0}}),[`${zt}-cell`]:{[`${zt}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${Rt.lineWidth}px 0 ${Rt.lineWidth}px ${Rt.tableHeaderBg}`}},[`${zt}-bordered ${zt}-cell-scrollbar`]:{borderInlineEnd:ln}}}},Ea=Rt=>{const{componentCls:zt}=Rt;return{[`${zt}-wrapper`]:{[`${zt}-cell-ellipsis`]:Object.assign(Object.assign({},Ms.vS),{wordBreak:"keep-all",[`
|
|
|
&${zt}-cell-fix-left-last,
|
|
|
&${zt}-cell-fix-right-first
|
|
|
`]:{overflow:"visible",[`${zt}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${zt}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},Go=Rt=>{const{componentCls:zt}=Rt;return{[`${zt}-wrapper`]:{[`${zt}-tbody > tr${zt}-placeholder`]:{textAlign:"center",color:Rt.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:Rt.colorBgContainer}}}}},Ka=Ee(15969),vs=Rt=>{const{componentCls:zt,antCls:ln,controlInteractiveSize:gt,motionDurationSlow:Pt,lineWidth:Lt,paddingXS:Sn,lineType:hn,tableBorderColor:sn,tableExpandIconBg:mn,tableExpandColumnWidth:vn,borderRadius:wn,fontSize:zn,fontSizeSM:ni,lineHeight:Wn,tablePaddingVertical:wi,tablePaddingHorizontal:Zn,tableExpandedRowBg:gi,paddingXXS:si}=Rt,Oi=gt/2-Lt,Ni=Oi*2+Lt*3,Ui=`${Lt}px ${hn} ${sn}`,ki=si-Lt;return{[`${zt}-wrapper`]:{[`${zt}-expand-icon-col`]:{width:vn},[`${zt}-row-expand-icon-cell`]:{textAlign:"center",[`${zt}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${zt}-row-indent`]:{height:1,float:"left"},[`${zt}-row-expand-icon`]:Object.assign(Object.assign({},(0,Ka.N)(Rt)),{position:"relative",float:"left",boxSizing:"border-box",width:Ni,height:Ni,padding:0,color:"inherit",lineHeight:`${Ni}px`,background:mn,border:Ui,borderRadius:wn,transform:`scale(${gt/Ni})`,transition:`all ${Pt}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${Pt} ease-out`,content:'""'},"&::before":{top:Oi,insetInlineEnd:ki,insetInlineStart:ki,height:Lt},"&::after":{top:ki,bottom:ki,insetInlineStart:Oi,width:Lt,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"}}),[`${zt}-row-indent + ${zt}-row-expand-icon`]:{marginTop:(zn*Wn-Lt*3)/2-Math.ceil((ni*1.4-Lt*3)/2),marginInlineEnd:Sn},[`tr${zt}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:gi}},[`${ln}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${zt}-expanded-row-fixed`]:{position:"relative",margin:`-${wi}px -${Zn}px`,padding:`${wi}px ${Zn}px`}}}},Bs=Rt=>{const{componentCls:zt,antCls:ln,iconCls:gt,tableFilterDropdownWidth:Pt,tableFilterDropdownSearchWidth:Lt,paddingXXS:Sn,paddingXS:hn,colorText:sn,lineWidth:mn,lineType:vn,tableBorderColor:wn,tableHeaderIconColor:zn,fontSizeSM:ni,tablePaddingHorizontal:Wn,borderRadius:wi,motionDurationSlow:Zn,colorTextDescription:gi,colorPrimary:si,tableHeaderFilterActiveBg:Oi,colorTextDisabled:Ni,tableFilterDropdownBg:Ui,tableFilterDropdownHeight:ki,controlItemBgHover:Ai,controlItemBgActive:rr,boxShadowSecondary:ti,filterDropdownMenuBg:ji}=Rt,Li=`${ln}-dropdown`,bi=`${zt}-filter-dropdown`,$i=`${ln}-tree`,pi=`${mn}px ${vn} ${wn}`;return[{[`${zt}-wrapper`]:{[`${zt}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${zt}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-Sn,marginInline:`${Sn}px ${-Wn/2}px`,padding:`0 ${Sn}px`,color:zn,fontSize:ni,borderRadius:wi,cursor:"pointer",transition:`all ${Zn}`,"&:hover":{color:gi,background:Oi},"&.active":{color:si}}}},{[`${ln}-dropdown`]:{[bi]:Object.assign(Object.assign({},(0,Ms.Wf)(Rt)),{minWidth:Pt,backgroundColor:Ui,borderRadius:wi,boxShadow:ti,overflow:"hidden",[`${Li}-menu`]:{maxHeight:ki,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:ji,"&:empty::after":{display:"block",padding:`${hn}px 0`,color:Ni,fontSize:ni,textAlign:"center",content:'"Not Found"'}},[`${bi}-tree`]:{paddingBlock:`${hn}px 0`,paddingInline:hn,[$i]:{padding:0},[`${$i}-treenode ${$i}-node-content-wrapper:hover`]:{backgroundColor:Ai},[`${$i}-treenode-checkbox-checked ${$i}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:rr}}},[`${bi}-search`]:{padding:hn,borderBottom:pi,"&-input":{input:{minWidth:Lt},[gt]:{color:Ni}}},[`${bi}-checkall`]:{width:"100%",marginBottom:Sn,marginInlineStart:Sn},[`${bi}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${hn-mn}px ${hn}px`,overflow:"hidden",borderTop:pi}})}},{[`${ln}-dropdown ${bi}, ${bi}-submenu`]:{[`${ln}-checkbox-wrapper + span`]:{paddingInlineStart:hn,color:sn},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},Rc=Rt=>{const{componentCls:zt,lineWidth:ln,colorSplit:gt,motionDurationSlow:Pt,zIndexTableFixed:Lt,tableBg:Sn,zIndexTableSticky:hn}=Rt,sn=gt;return{[`${zt}-wrapper`]:{[`
|
|
|
${zt}-cell-fix-left,
|
|
|
${zt}-cell-fix-right
|
|
|
`]:{position:"sticky !important",zIndex:Lt,background:Sn},[`
|
|
|
${zt}-cell-fix-left-first::after,
|
|
|
${zt}-cell-fix-left-last::after
|
|
|
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-ln,width:30,transform:"translateX(100%)",transition:`box-shadow ${Pt}`,content:'""',pointerEvents:"none"},[`${zt}-cell-fix-left-all::after`]:{display:"none"},[`
|
|
|
${zt}-cell-fix-right-first::after,
|
|
|
${zt}-cell-fix-right-last::after
|
|
|
`]:{position:"absolute",top:0,bottom:-ln,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${Pt}`,content:'""',pointerEvents:"none"},[`${zt}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:hn+1,width:30,transition:`box-shadow ${Pt}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${zt}-ping-left`]:{[`&:not(${zt}-has-fix-left) ${zt}-container`]:{position:"relative","&::before":{boxShadow:`inset 10px 0 8px -8px ${sn}`}},[`
|
|
|
${zt}-cell-fix-left-first::after,
|
|
|
${zt}-cell-fix-left-last::after
|
|
|
`]:{boxShadow:`inset 10px 0 8px -8px ${sn}`},[`${zt}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${zt}-ping-right`]:{[`&:not(${zt}-has-fix-right) ${zt}-container`]:{position:"relative","&::after":{boxShadow:`inset -10px 0 8px -8px ${sn}`}},[`
|
|
|
${zt}-cell-fix-right-first::after,
|
|
|
${zt}-cell-fix-right-last::after
|
|
|
`]:{boxShadow:`inset -10px 0 8px -8px ${sn}`}}}}},Ad=Rt=>{const{componentCls:zt,antCls:ln}=Rt;return{[`${zt}-wrapper`]:{[`${zt}-pagination${ln}-pagination`]:{margin:`${Rt.margin}px 0`},[`${zt}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:Rt.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},Nd=Rt=>{const{componentCls:zt,tableRadius:ln}=Rt;return{[`${zt}-wrapper`]:{[zt]:{[`${zt}-title, ${zt}-header`]:{borderRadius:`${ln}px ${ln}px 0 0`},[`${zt}-title + ${zt}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${zt}-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:ln,borderStartEndRadius:ln,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:ln},"> *:last-child":{borderStartEndRadius:ln}}},"&-footer":{borderRadius:`0 0 ${ln}px ${ln}px`}}}}},rh=Rt=>{const{componentCls:zt}=Rt;return{[`${zt}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${zt}-pagination-left`]:{justifyContent:"flex-end"},[`${zt}-pagination-right`]:{justifyContent:"flex-start"},[`${zt}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${zt}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${zt}-row-indent`]:{float:"right"}}}}},Ch=Rt=>{const{componentCls:zt,antCls:ln,iconCls:gt,fontSizeIcon:Pt,padding:Lt,paddingXS:Sn,tableHeaderIconColor:hn,tableHeaderIconColorHover:sn,tableSelectionColumnWidth:mn}=Rt;return{[`${zt}-wrapper`]:{[`${zt}-selection-col`]:{width:mn,[`&${zt}-selection-col-with-dropdown`]:{width:mn+Pt+Lt/4}},[`${zt}-bordered ${zt}-selection-col`]:{width:mn+Sn*2,[`&${zt}-selection-col-with-dropdown`]:{width:mn+Pt+Lt/4+Sn*2}},[`
|
|
|
table tr th${zt}-selection-column,
|
|
|
table tr td${zt}-selection-column
|
|
|
`]:{paddingInlineEnd:Rt.paddingXS,paddingInlineStart:Rt.paddingXS,textAlign:"center",[`${ln}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${zt}-selection-column${zt}-cell-fix-left`]:{zIndex:Rt.zIndexTableFixed+1},[`table tr th${zt}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${zt}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${zt}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${Rt.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${Rt.tablePaddingHorizontal/4}px`,[gt]:{color:hn,fontSize:Pt,verticalAlign:"baseline","&:hover":{color:sn}}}}}},ro=Rt=>{const{componentCls:zt}=Rt,ln=(gt,Pt,Lt,Sn)=>({[`${zt}${zt}-${gt}`]:{fontSize:Sn,[`
|
|
|
${zt}-title,
|
|
|
${zt}-footer,
|
|
|
${zt}-cell,
|
|
|
${zt}-thead > tr > th,
|
|
|
${zt}-tbody > tr > th,
|
|
|
${zt}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{padding:`${Pt}px ${Lt}px`},[`${zt}-filter-trigger`]:{marginInlineEnd:`-${Lt/2}px`},[`${zt}-expanded-row-fixed`]:{margin:`-${Pt}px -${Lt}px`},[`${zt}-tbody`]:{[`${zt}-wrapper:only-child ${zt}`]:{marginBlock:`-${Pt}px`,marginInline:`${Rt.tableExpandColumnWidth-Lt}px -${Lt}px`}},[`${zt}-selection-column`]:{paddingInlineStart:`${Lt/4}px`}}});return{[`${zt}-wrapper`]:Object.assign(Object.assign({},ln("middle",Rt.tablePaddingVerticalMiddle,Rt.tablePaddingHorizontalMiddle,Rt.tableFontSizeMiddle)),ln("small",Rt.tablePaddingVerticalSmall,Rt.tablePaddingHorizontalSmall,Rt.tableFontSizeSmall))}},ku=Rt=>{const{componentCls:zt,marginXXS:ln,fontSizeIcon:gt,tableHeaderIconColor:Pt,tableHeaderIconColorHover:Lt}=Rt;return{[`${zt}-wrapper`]:{[`${zt}-thead th${zt}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${Rt.motionDurationSlow}`,"&:hover":{background:Rt.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:Rt.colorPrimary},[`
|
|
|
&${zt}-cell-fix-left:hover,
|
|
|
&${zt}-cell-fix-right:hover
|
|
|
`]:{background:Rt.tableFixedHeaderSortActiveBg}},[`${zt}-thead th${zt}-column-sort`]:{background:Rt.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${zt}-column-sort`]:{background:Rt.tableBodySortBg},[`${zt}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${zt}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${zt}-column-sorter`]:{marginInlineStart:ln,color:Pt,fontSize:0,transition:`color ${Rt.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:gt,"&.active":{color:Rt.colorPrimary}},[`${zt}-column-sorter-up + ${zt}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${zt}-column-sorters:hover ${zt}-column-sorter`]:{color:Lt}}}},Au=Rt=>{const{componentCls:zt,opacityLoading:ln,tableScrollThumbBg:gt,tableScrollThumbBgHover:Pt,tableScrollThumbSize:Lt,tableScrollBg:Sn,zIndexTableSticky:hn,stickyScrollBarBorderRadius:sn}=Rt,mn=`${Rt.lineWidth}px ${Rt.lineType} ${Rt.tableBorderColor}`;return{[`${zt}-wrapper`]:{[`${zt}-sticky`]:{"&-holder":{position:"sticky",zIndex:hn,background:Rt.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${Lt}px !important`,zIndex:hn,display:"flex",alignItems:"center",background:Sn,borderTop:mn,opacity:ln,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:Lt,backgroundColor:gt,borderRadius:sn,transition:`all ${Rt.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:Pt}}}}}}},uu=Rt=>{const{componentCls:zt,lineWidth:ln,tableBorderColor:gt}=Rt,Pt=`${ln}px ${Rt.lineType} ${gt}`;return{[`${zt}-wrapper`]:{[`${zt}-summary`]:{position:"relative",zIndex:Rt.zIndexTableFixed,background:Rt.tableBg,"> tr":{"> th, > td":{borderBottom:Pt}}},[`div${zt}-summary`]:{boxShadow:`0 -${ln}px 0 ${gt}`}}}},ps=Rt=>{const{componentCls:zt}=Rt,ln=`${Rt.lineWidth}px ${Rt.lineType} ${Rt.tableBorderColor}`,gt=`${zt}-expanded-row-cell`;return{[`${zt}-wrapper`]:{[`${zt}-tbody-virtual`]:{[`${zt}-row`]:{display:"flex",boxSizing:"border-box",width:"100%"},[`${zt}-cell`]:{borderBottom:ln},[`${zt}-expanded-row`]:{[`${gt}${gt}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${Rt.lineWidth}px)`,borderInlineEnd:"none"}}},[`${zt}-bordered`]:{[`${zt}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:ln,position:"absolute"},[`${zt}-cell`]:{borderInlineEnd:ln,[`&${zt}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:-Rt.lineWidth,borderInlineStart:ln}}}}}}};const Fs=Rt=>{const{componentCls:zt,fontWeightStrong:ln,tablePaddingVertical:gt,tablePaddingHorizontal:Pt,lineWidth:Lt,lineType:Sn,tableBorderColor:hn,tableFontSize:sn,tableBg:mn,tableRadius:vn,tableHeaderTextColor:wn,motionDurationMid:zn,tableHeaderBg:ni,tableHeaderCellSplitColor:Wn,tableRowHoverBg:wi,tableSelectedRowBg:Zn,tableSelectedRowHoverBg:gi,tableFooterTextColor:si,tableFooterBg:Oi,paddingContentVerticalLG:Ni}=Rt,Ui=`${Lt}px ${Sn} ${hn}`;return{[`${zt}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,Ms.dF)()),{[zt]:Object.assign(Object.assign({},(0,Ms.Wf)(Rt)),{fontSize:sn,background:mn,borderRadius:`${vn}px ${vn}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${vn}px ${vn}px 0 0`,borderCollapse:"separate",borderSpacing:0},[`
|
|
|
${zt}-cell,
|
|
|
${zt}-thead > tr > th,
|
|
|
${zt}-tbody > tr > th,
|
|
|
${zt}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{position:"relative",padding:`${Ni}px ${Pt}px`,overflowWrap:"break-word"},[`${zt}-title`]:{padding:`${gt}px ${Pt}px`},[`${zt}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:wn,fontWeight:ln,textAlign:"start",background:ni,borderBottom:Ui,transition:`background ${zn} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${zt}-selection-column):not(${zt}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:Wn,transform:"translateY(-50%)",transition:`background-color ${zn}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${zt}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${zn}, border-color ${zn}`,borderBottom:Ui,[`
|
|
|
> ${zt}-wrapper:only-child,
|
|
|
> ${zt}-expanded-row-fixed > ${zt}-wrapper:only-child
|
|
|
`]:{[zt]:{marginBlock:`-${gt}px`,marginInline:`${Rt.tableExpandColumnWidth-Pt}px -${Pt}px`,[`${zt}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:wn,fontWeight:ln,textAlign:"start",background:ni,borderBottom:Ui,transition:`background ${zn} ease`},[`
|
|
|
&${zt}-row:hover > th,
|
|
|
&${zt}-row:hover > td,
|
|
|
> th${zt}-cell-row-hover,
|
|
|
> td${zt}-cell-row-hover
|
|
|
`]:{background:wi},[`&${zt}-row-selected`]:{"> th, > td":{background:Zn},"&:hover > th, &:hover > td":{background:gi}}}},[`${zt}-footer`]:{padding:`${gt}px ${Pt}px`,color:si,background:Oi}})}};var rc=(0,xo.Z)("Table",Rt=>{const{colorTextHeading:zt,colorSplit:ln,colorIcon:gt,colorIconHover:Pt,opacityLoading:Lt,colorBgContainer:Sn,controlInteractiveSize:hn,headerBg:sn,headerColor:mn,headerSortActiveBg:vn,headerSortHoverBg:wn,bodySortBg:zn,rowHoverBg:ni,rowSelectedBg:Wn,rowSelectedHoverBg:wi,rowExpandedBg:Zn,cellPaddingBlock:gi,cellPaddingInline:si,cellPaddingBlockMD:Oi,cellPaddingInlineMD:Ni,cellPaddingBlockSM:Ui,cellPaddingInlineSM:ki,borderColor:Ai,footerBg:rr,footerColor:ti,headerBorderRadius:ji,cellFontSize:Li,cellFontSizeMD:bi,cellFontSizeSM:$i,headerSplitColor:pi,fixedHeaderSortActiveBg:sr,headerFilterHoverBg:Yi,filterDropdownBg:Ci,expandIconBg:Gi,selectionColumnWidth:vr,stickyScrollBarBg:qi}=Rt,So=new $s.C(gt),Co=new $s.C(Pt),is=2,so=(0,ga.TS)(Rt,{tableFontSize:Li,tableBg:Sn,tableRadius:ji,tablePaddingVertical:gi,tablePaddingHorizontal:si,tablePaddingVerticalMiddle:Oi,tablePaddingHorizontalMiddle:Ni,tablePaddingVerticalSmall:Ui,tablePaddingHorizontalSmall:ki,tableBorderColor:Ai,tableHeaderTextColor:mn,tableHeaderBg:sn,tableFooterTextColor:ti,tableFooterBg:rr,tableHeaderCellSplitColor:pi,tableHeaderSortBg:vn,tableHeaderSortHoverBg:wn,tableHeaderIconColor:So.clone().setAlpha(So.getAlpha()*Lt).toRgbString(),tableHeaderIconColorHover:Co.clone().setAlpha(Co.getAlpha()*Lt).toRgbString(),tableBodySortBg:zn,tableFixedHeaderSortActiveBg:sr,tableHeaderFilterActiveBg:Yi,tableFilterDropdownBg:Ci,tableRowHoverBg:ni,tableSelectedRowBg:Wn,tableSelectedRowHoverBg:wi,zIndexTableFixed:is,zIndexTableSticky:is+1,tableFontSizeMiddle:bi,tableFontSizeSmall:$i,tableSelectionColumnWidth:vr,tableExpandIconBg:Gi,tableExpandColumnWidth:hn+2*Rt.padding,tableExpandedRowBg:Zn,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:qi,tableScrollThumbBgHover:zt,tableScrollBg:ln});return[Fs(so),Ad(so),uu(so),ku(so),Bs(so),cs(so),Nd(so),vs(so),uu(so),Go(so),Ch(so),Rc(so),Au(so),Ea(so),ro(so),rh(so),ps(so)]},Rt=>{const{colorFillAlter:zt,colorBgContainer:ln,colorTextHeading:gt,colorFillSecondary:Pt,colorFillContent:Lt,controlItemBgActive:Sn,controlItemBgActiveHover:hn,padding:sn,paddingSM:mn,paddingXS:vn,colorBorderSecondary:wn,borderRadiusLG:zn,fontSize:ni,controlHeight:Wn,colorTextPlaceholder:wi}=Rt,Zn=new $s.C(Pt).onBackground(ln).toHexShortString(),gi=new $s.C(Lt).onBackground(ln).toHexShortString(),si=new $s.C(zt).onBackground(ln).toHexShortString();return{headerBg:si,headerColor:gt,headerSortActiveBg:Zn,headerSortHoverBg:gi,bodySortBg:si,rowHoverBg:si,rowSelectedBg:Sn,rowSelectedHoverBg:hn,rowExpandedBg:zt,cellPaddingBlock:sn,cellPaddingInline:sn,cellPaddingBlockMD:mn,cellPaddingInlineMD:vn,cellPaddingBlockSM:vn,cellPaddingInlineSM:vn,borderColor:wn,headerBorderRadius:zn,footerBg:si,footerColor:gt,cellFontSize:ni,cellFontSizeMD:ni,cellFontSizeSM:ni,headerSplitColor:wn,fixedHeaderSortActiveBg:Zn,headerFilterHoverBg:Lt,filterDropdownMenuBg:ln,filterDropdownBg:ln,expandIconBg:ln,selectionColumnWidth:Wn,stickyScrollBarBg:wi,stickyScrollBarBorderRadius:100}});const el=[],Id=(Rt,zt)=>{const{prefixCls:ln,className:gt,rootClassName:Pt,style:Lt,size:Sn,bordered:hn,dropdownPrefixCls:sn,dataSource:mn,pagination:vn,rowSelection:wn,rowKey:zn="key",rowClassName:ni,columns:Wn,children:wi,childrenColumnName:Zn,onChange:gi,getPopupContainer:si,loading:Oi,expandIcon:Ni,expandable:Ui,expandedRowRender:ki,expandIconColumnIndex:Ai,indentSize:rr,scroll:ti,sortDirections:ji,locale:Li,showSorterTooltip:bi=!0,virtual:$i}=Rt,pi=he.useMemo(()=>Wn||wt(wi),[Wn,wi]),sr=he.useMemo(()=>pi.some(ls=>ls.responsive),[pi]),Yi=(0,Qn.Z)(sr),Ci=he.useMemo(()=>{const ls=new Set(Object.keys(Yi).filter(js=>Yi[js]));return pi.filter(js=>!js.responsive||js.responsive.some(wa=>ls.has(wa)))},[pi,Yi]),Gi=(0,cr.Z)(Rt,["className","style","columns"]),{locale:vr=ir.Z,direction:qi,table:So,renderEmpty:Co,getPrefixCls:is,getPopupContainer:so}=he.useContext(Yo.E_),Tr=(0,Wi.Z)(Sn),No=Object.assign(Object.assign({},vr.Table),Li),Ar=mn||el,Yr=is("table",ln),rs=is("dropdown",sn),Wr=Object.assign({childrenColumnName:Zn,expandIconColumnIndex:Ai},Ui),{childrenColumnName:Er="children"}=Wr,Xr=he.useMemo(()=>Ar.some(ls=>ls==null?void 0:ls[Er])?"nest":ki||Ui&&Ui.expandedRowRender?"row":null,[Ar]),br={body:he.useRef()},ao=he.useMemo(()=>typeof zn=="function"?zn:ls=>ls==null?void 0:ls[zn],[zn]),[Lr]=Eu(Ar,Er,ao),ho={},Zo=function(ls,js){let wa=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var zs,os,Ma;const El=Object.assign(Object.assign({},ho),ls);wa&&((zs=ho.resetPagination)===null||zs===void 0||zs.call(ho),!((os=El.pagination)===null||os===void 0)&&os.current&&(El.pagination.current=1),vn&&vn.onChange&&vn.onChange(1,(Ma=El.pagination)===null||Ma===void 0?void 0:Ma.pageSize)),ti&&ti.scrollToFirstRowOnChange!==!1&&br.body.current&&(0,qr.Z)(0,{getContainer:()=>br.body.current}),gi==null||gi(El.pagination,El.filters,El.sorter,{currentDataSource:Wa(Wu(Ar,El.sorterStates,Er),El.filterStates),action:js})},Ko=(ls,js)=>{Zo({sorter:ls,sorterStates:js},"sort",!1)},[Jr,Io,Cs,Lo]=bh({prefixCls:Yr,mergedColumns:Ci,onSorterChange:Ko,sortDirections:ji||["ascend","descend"],tableLocale:No,showSorterTooltip:bi}),Jo=he.useMemo(()=>Wu(Ar,Io,Er),[Ar,Io]);ho.sorter=Lo(),ho.sorterStates=Io;const Ss=(ls,js)=>{Zo({filters:ls,filterStates:js},"filter",!0)},[Js,Pl,Qo]=yc({prefixCls:Yr,locale:No,dropdownPrefixCls:rs,mergedColumns:Ci,onFilterChange:Ss,getPopupContainer:si||so}),qo=Wa(Jo,Pl);ho.filters=Qo,ho.filterStates=Pl;const xs=he.useMemo(()=>{const ls={};return Object.keys(Qo).forEach(js=>{Qo[js]!==null&&(ls[js]=Qo[js])}),Object.assign(Object.assign({},Cs),{filters:ls})},[Cs,Qo]),[Ts]=Vs(xs),ma=(ls,js)=>{Zo({pagination:Object.assign(Object.assign({},ho.pagination),{current:ls,pageSize:js})},"paginate")},[jo,As]=th(qo.length,ma,vn);ho.pagination=vn===!1?{}:Lu(jo,vn),ho.resetPagination=As;const La=he.useMemo(()=>{if(vn===!1||!jo.pageSize)return qo;const{current:ls=1,total:js,pageSize:wa=Gu}=jo;return qo.length<js?qo.length>wa?qo.slice((ls-1)*wa,ls*wa):qo:qo.slice((ls-1)*wa,ls*wa)},[!!vn,qo,jo&&jo.current,jo&&jo.pageSize,jo&&jo.total]),[_l,Xl]=Bl({prefixCls:Yr,data:qo,pageData:La,getRowKey:ao,getRecordByKey:Lr,expandType:Xr,childrenColumnName:Er,locale:No,getPopupContainer:si||so},wn),jl=(ls,js,wa)=>{let zs;return typeof ni=="function"?zs=ct()(ni(ls,js,wa)):zs=ct()(ni),ct()({[`${Yr}-row-selected`]:Xl.has(ao(ls,js))},zs)};Wr.__PARENT_RENDER_ICON__=Wr.expandIcon,Wr.expandIcon=Wr.expandIcon||Ni||as(No),Xr==="nest"&&Wr.expandIconColumnIndex===void 0?Wr.expandIconColumnIndex=wn?1:0:Wr.expandIconColumnIndex>0&&wn&&(Wr.expandIconColumnIndex-=1),typeof Wr.indentSize!="number"&&(Wr.indentSize=typeof rr=="number"?rr:15);const cu=he.useCallback(ls=>Ts(_l(Js(Jr(ls)))),[Jr,Js,_l]);let hu,Jl;if(vn!==!1&&(jo!=null&&jo.total)){let ls;jo.size?ls=jo.size:ls=Tr==="small"||Tr==="middle"?"small":void 0;const js=os=>he.createElement(eo.Z,Object.assign({},jo,{className:ct()(`${Yr}-pagination ${Yr}-pagination-${os}`,jo.className),size:ls})),wa=qi==="rtl"?"left":"right",{position:zs}=jo;if(zs!==null&&Array.isArray(zs)){const os=zs.find(Nu=>Nu.includes("top")),Ma=zs.find(Nu=>Nu.includes("bottom")),El=zs.every(Nu=>`${Nu}`=="none");!os&&!Ma&&!El&&(Jl=js(wa)),os&&(hu=js(os.toLowerCase().replace("top",""))),Ma&&(Jl=js(Ma.toLowerCase().replace("bottom","")))}else Jl=js(wa)}let gs;typeof Oi=="boolean"?gs={spinning:Oi}:typeof Oi=="object"&&(gs=Object.assign({spinning:!0},Oi));const[Ra,oa]=rc(Yr),[,Ns]=(0,Bo.Z)(),Ql=ct()(`${Yr}-wrapper`,So==null?void 0:So.className,{[`${Yr}-wrapper-rtl`]:qi==="rtl"},gt,Pt,oa),_c=Object.assign(Object.assign({},So==null?void 0:So.style),Lt),du=Li&&Li.emptyText||(Co==null?void 0:Co("Table"))||he.createElement(nr.Z,{componentName:"Table"}),Zu=$i?Da:Vr,sc={},zl=he.useMemo(()=>{const{fontSize:ls,lineHeight:js,padding:wa,paddingXS:zs,paddingSM:os}=Ns,Ma=Math.floor(ls*js);switch(Tr){case"large":return wa*2+Ma;case"small":return zs*2+Ma;default:return os*2+Ma}},[Ns,Tr]);return $i&&(sc.listItemHeight=zl),Ra(he.createElement("div",{ref:zt,className:Ql,style:_c},he.createElement(Ro.Z,Object.assign({spinning:!1},gs),hu,he.createElement(Zu,Object.assign({},sc,Gi,{columns:Ci,direction:qi,expandable:Wr,prefixCls:Yr,className:ct()({[`${Yr}-middle`]:Tr==="middle",[`${Yr}-small`]:Tr==="small",[`${Yr}-bordered`]:hn,[`${Yr}-empty`]:Ar.length===0}),data:La,rowKey:ao,rowClassName:jl,emptyText:du,internalHooks:me,internalRefs:br,transformColumns:cu})),Jl)))};var td=he.forwardRef(Id);const Dd=(Rt,zt)=>{const ln=he.useRef(0);return ln.current+=1,he.createElement(td,Object.assign({},Rt,{ref:zt,_renderTimes:ln.current}))},Oa=he.forwardRef(Dd);Oa.SELECTION_COLUMN=ra,Oa.EXPAND_COLUMN=Le,Oa.SELECTION_ALL=Ds,Oa.SELECTION_INVERT=bs,Oa.SELECTION_NONE=ks,Oa.Column=_r,Oa.ColumnGroup=Kr,Oa.Summary=Ae;var oc=Oa,gf=oc},12563:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{default:function(){return Qe}});var Le=Ee(59301),me=Ee(99267),Ie=Ee(92310),Te=Ee.n(Ie),be=Ee(36785),Pe=Ee(47729),he=Ee(14088),Se=Ee(36355),xe=Ee(17313),ge=Ee(37613),ce=Ee(83116);const ve=Ge=>{const{paddingXXS:mt,lineWidth:ct,tagPaddingHorizontal:Ct,componentCls:it}=Ge,St=Ct-ct,ut=mt-ct;return{[it]:Object.assign(Object.assign({},(0,xe.Wf)(Ge)),{display:"inline-block",height:"auto",marginInlineEnd:Ge.marginXS,paddingInline:St,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",[`&${it}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:Ge.defaultColor},[`${it}-close-icon`]:{marginInlineStart:ut,color:Ge.colorTextDescription,fontSize:Ge.tagIconSize,cursor:"pointer",transition:`all ${Ge.motionDurationMid}`,"&:hover":{color:Ge.colorTextHeading}},[`&${it}-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(${it}-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:St}}),[`${it}-borderless`]:{borderColor:"transparent",background:Ge.tagBorderlessBg}}},de=Ge=>{const{lineWidth:mt,fontSizeIcon:ct}=Ge,Ct=Ge.fontSizeSM,it=`${Ge.lineHeightSM*Ct}px`;return(0,ge.TS)(Ge,{tagFontSize:Ct,tagLineHeight:it,tagIconSize:ct-2*mt,tagPaddingHorizontal:8,tagBorderlessBg:Ge.colorFillTertiary})},ue=Ge=>({defaultBg:Ge.colorFillQuaternary,defaultColor:Ge.colorText});var z=(0,ce.Z)("Tag",Ge=>{const mt=de(Ge);return ve(mt)},ue),ee=function(Ge,mt){var ct={};for(var Ct in Ge)Object.prototype.hasOwnProperty.call(Ge,Ct)&&mt.indexOf(Ct)<0&&(ct[Ct]=Ge[Ct]);if(Ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var it=0,Ct=Object.getOwnPropertySymbols(Ge);it<Ct.length;it++)mt.indexOf(Ct[it])<0&&Object.prototype.propertyIsEnumerable.call(Ge,Ct[it])&&(ct[Ct[it]]=Ge[Ct[it]]);return ct},ie=Ge=>{const{prefixCls:mt,style:ct,className:Ct,checked:it,onChange:St,onClick:ut}=Ge,Ft=ee(Ge,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:ht,tag:rt}=Le.useContext(Se.E_),dt=jt=>{St==null||St(!it),ut==null||ut(jt)},yt=ht("tag",mt),[_t,vt]=z(yt),Bt=Te()(yt,`${yt}-checkable`,{[`${yt}-checkable-checked`]:it},rt==null?void 0:rt.className,Ct,vt);return _t(Le.createElement("span",Object.assign({},Ft,{style:Object.assign(Object.assign({},ct),rt==null?void 0:rt.style),className:Bt,onClick:dt})))},se=Ee(45157);const le=Ge=>(0,se.Z)(Ge,(mt,ct)=>{let{textColor:Ct,lightBorderColor:it,lightColor:St,darkColor:ut}=ct;return{[`${Ge.componentCls}-${mt}`]:{color:Ct,background:St,borderColor:it,"&-inverse":{color:Ge.colorTextLightSolid,background:ut,borderColor:ut},[`&${Ge.componentCls}-borderless`]:{borderColor:"transparent"}}}});var ye=(0,ce.b)(["Tag","preset"],Ge=>{const mt=de(Ge);return le(mt)},ue);function we(Ge){return typeof Ge!="string"?Ge:Ge.charAt(0).toUpperCase()+Ge.slice(1)}const Ce=(Ge,mt,ct)=>{const Ct=we(ct);return{[`${Ge.componentCls}-${mt}`]:{color:Ge[`color${ct}`],background:Ge[`color${Ct}Bg`],borderColor:Ge[`color${Ct}Border`],[`&${Ge.componentCls}-borderless`]:{borderColor:"transparent"}}}};var ke=(0,ce.b)(["Tag","status"],Ge=>{const mt=de(Ge);return[Ce(mt,"success","Success"),Ce(mt,"processing","Info"),Ce(mt,"error","Error"),Ce(mt,"warning","Warning")]},ue),Ne=function(Ge,mt){var ct={};for(var Ct in Ge)Object.prototype.hasOwnProperty.call(Ge,Ct)&&mt.indexOf(Ct)<0&&(ct[Ct]=Ge[Ct]);if(Ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var it=0,Ct=Object.getOwnPropertySymbols(Ge);it<Ct.length;it++)mt.indexOf(Ct[it])<0&&Object.prototype.propertyIsEnumerable.call(Ge,Ct[it])&&(ct[Ct[it]]=Ge[Ct[it]]);return ct};const je=(Ge,mt)=>{const{prefixCls:ct,className:Ct,rootClassName:it,style:St,children:ut,icon:Ft,color:ht,onClose:rt,closeIcon:dt,closable:yt,bordered:_t=!0}=Ge,vt=Ne(Ge,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:Bt,direction:jt,tag:un}=Le.useContext(Se.E_),[Kt,xn]=Le.useState(!0);Le.useEffect(()=>{"visible"in vt&&xn(vt.visible)},[vt.visible]);const Ut=(0,be.o2)(ht),Wt=(0,be.yT)(ht),$t=Ut||Wt,ft=Object.assign(Object.assign({backgroundColor:ht&&!$t?ht:void 0},un==null?void 0:un.style),St),We=Bt("tag",ct),[Be,qe]=z(We),et=Te()(We,un==null?void 0:un.className,{[`${We}-${ht}`]:$t,[`${We}-has-color`]:ht&&!$t,[`${We}-hidden`]:!Kt,[`${We}-rtl`]:jt==="rtl",[`${We}-borderless`]:!_t},Ct,it,qe),He=Ze=>{Ze.stopPropagation(),rt==null||rt(Ze),!Ze.defaultPrevented&&xn(!1)},[,Xe]=(0,Pe.Z)(yt,dt,Ze=>Ze===null?Le.createElement(me.Z,{className:`${We}-close-icon`,onClick:He}):Le.createElement("span",{className:`${We}-close-icon`,onClick:He},Ze),null,!1),Re=typeof vt.onClick=="function"||ut&&ut.type==="a",Ae=Ft||null,Ue=Ae?Le.createElement(Le.Fragment,null,Ae,ut&&Le.createElement("span",null,ut)):ut,Ke=Le.createElement("span",Object.assign({},vt,{ref:mt,className:et,style:ft}),Ue,Xe,Ut&&Le.createElement(ye,{key:"preset",prefixCls:We}),Wt&&Le.createElement(ke,{key:"status",prefixCls:We}));return Be(Re?Le.createElement(he.Z,{component:"Tag"},Ke):Ke)},Ve=Le.forwardRef(je);Ve.CheckableTag=ie;var Qe=Ve},17574:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{default:function(){return ht}});var Le=Ee(54844),me=Ee(80702),Ie=Ee(52671),Te=Ee(8657),be=Ee(72308),Pe=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(7657),ge=function(dt,yt){return Pe.createElement(xe.Z,(0,be.Z)({},dt,{ref:yt,icon:Se}))},ce=Pe.forwardRef(ge),ve=ce,de=Ee(92310),ue=Ee.n(de),z=Ee(35654),ee=Ee(71430),oe=Ee(36355),ie=Ee(56082),se=Ee(62892),le=Ee(20648);const ye=4;function we(rt){const{dropPosition:dt,dropLevelOffset:yt,prefixCls:_t,indent:vt,direction:Bt="ltr"}=rt,jt=Bt==="ltr"?"left":"right",un=Bt==="ltr"?"right":"left",Kt={[jt]:-yt*vt+ye,[un]:0};switch(dt){case-1:Kt.top=-3;break;case 1:Kt.bottom=-3;break;default:Kt.bottom=-3,Kt[jt]=vt+ye;break}return Pe.createElement("div",{style:Kt,className:`${_t}-drop-indicator`})}var Ce=Ee(71997),Ne=Pe.forwardRef((rt,dt)=>{const{getPrefixCls:yt,direction:_t,virtual:vt,tree:Bt}=Pe.useContext(oe.E_),{prefixCls:jt,className:un,showIcon:Kt=!1,showLine:xn,switcherIcon:Ut,blockNode:Wt=!1,children:$t,checkable:ft=!1,selectable:We=!0,draggable:Be,motion:qe,style:et}=rt,He=yt("tree",jt),Xe=yt(),Re=qe!=null?qe:Object.assign(Object.assign({},(0,se.Z)(Xe)),{motionAppear:!1}),Ae=Object.assign(Object.assign({},rt),{checkable:ft,selectable:We,showIcon:Kt,motion:Re,blockNode:Wt,showLine:!!xn,dropIndicatorRender:we}),[Ue,Ke]=(0,le.ZP)(He),Ze=Pe.useMemo(()=>{if(!Be)return!1;let xt={};switch(typeof Be){case"function":xt.nodeDraggable=Be;break;case"object":xt=Object.assign({},Be);break;default:break}return xt.icon!==!1&&(xt.icon=xt.icon||Pe.createElement(ie.Z,null)),xt},[Be]),lt=xt=>Pe.createElement(Ce.Z,{prefixCls:He,switcherIcon:Ut,treeNodeProps:xt,showLine:xn});return Ue(Pe.createElement(Le.Z,Object.assign({itemHeight:20,ref:dt,virtual:vt},Ae,{style:Object.assign(Object.assign({},Bt==null?void 0:Bt.style),et),prefixCls:He,className:ue()({[`${He}-icon-hide`]:!Kt,[`${He}-block-node`]:Wt,[`${He}-unselectable`]:!We,[`${He}-rtl`]:_t==="rtl"},Bt==null?void 0:Bt.className,un,Ke),direction:_t,checkable:ft&&Pe.createElement("span",{className:`${He}-checkbox-inner`}),selectable:We,switcherIcon:lt,draggable:Ze}),$t))}),je;(function(rt){rt[rt.None=0]="None",rt[rt.Start=1]="Start",rt[rt.End=2]="End"})(je||(je={}));function Ve(rt,dt){function yt(_t){const{key:vt,children:Bt}=_t;dt(vt,_t)!==!1&&Ve(Bt||[],dt)}rt.forEach(yt)}function Qe(rt){let{treeData:dt,expandedKeys:yt,startKey:_t,endKey:vt}=rt;const Bt=[];let jt=je.None;if(_t&&_t===vt)return[_t];if(!_t||!vt)return[];function un(Kt){return Kt===_t||Kt===vt}return Ve(dt,Kt=>{if(jt===je.End)return!1;if(un(Kt)){if(Bt.push(Kt),jt===je.None)jt=je.Start;else if(jt===je.Start)return jt=je.End,!1}else jt===je.Start&&Bt.push(Kt);return yt.includes(Kt)}),Bt}function Ge(rt,dt){const yt=(0,me.Z)(dt),_t=[];return Ve(rt,(vt,Bt)=>{const jt=yt.indexOf(vt);return jt!==-1&&(_t.push(Bt),yt.splice(jt,1)),!!yt.length}),_t}var mt=function(rt,dt){var yt={};for(var _t in rt)Object.prototype.hasOwnProperty.call(rt,_t)&&dt.indexOf(_t)<0&&(yt[_t]=rt[_t]);if(rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var vt=0,_t=Object.getOwnPropertySymbols(rt);vt<_t.length;vt++)dt.indexOf(_t[vt])<0&&Object.prototype.propertyIsEnumerable.call(rt,_t[vt])&&(yt[_t[vt]]=rt[_t[vt]]);return yt};function ct(rt){const{isLeaf:dt,expanded:yt}=rt;return dt?Pe.createElement(Ie.Z,null):yt?Pe.createElement(Te.Z,null):Pe.createElement(ve,null)}function Ct(rt){let{treeData:dt,children:yt}=rt;return dt||(0,ee.zn)(yt)}const it=(rt,dt)=>{var{defaultExpandAll:yt,defaultExpandParent:_t,defaultExpandedKeys:vt}=rt,Bt=mt(rt,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const jt=Pe.useRef(),un=Pe.useRef(),Kt=()=>{const{keyEntities:Ze}=(0,ee.I8)(Ct(Bt));let lt;return yt?lt=Object.keys(Ze):_t?lt=(0,z.r7)(Bt.expandedKeys||vt||[],Ze):lt=Bt.expandedKeys||vt,lt},[xn,Ut]=Pe.useState(Bt.selectedKeys||Bt.defaultSelectedKeys||[]),[Wt,$t]=Pe.useState(()=>Kt());Pe.useEffect(()=>{"selectedKeys"in Bt&&Ut(Bt.selectedKeys)},[Bt.selectedKeys]),Pe.useEffect(()=>{"expandedKeys"in Bt&&$t(Bt.expandedKeys)},[Bt.expandedKeys]);const ft=(Ze,lt)=>{var xt;return"expandedKeys"in Bt||$t(Ze),(xt=Bt.onExpand)===null||xt===void 0?void 0:xt.call(Bt,Ze,lt)},We=(Ze,lt)=>{var xt;const{multiple:tn}=Bt,{node:en,nativeEvent:Jt}=lt,{key:gn=""}=en,Mn=Ct(Bt),yn=Object.assign(Object.assign({},lt),{selected:!0}),kn=(Jt==null?void 0:Jt.ctrlKey)||(Jt==null?void 0:Jt.metaKey),$n=Jt==null?void 0:Jt.shiftKey;let An;tn&&kn?(An=Ze,jt.current=gn,un.current=An,yn.selectedNodes=Ge(Mn,An)):tn&&$n?(An=Array.from(new Set([].concat((0,me.Z)(un.current||[]),(0,me.Z)(Qe({treeData:Mn,expandedKeys:Wt,startKey:gn,endKey:jt.current}))))),yn.selectedNodes=Ge(Mn,An)):(An=[gn],jt.current=gn,un.current=An,yn.selectedNodes=Ge(Mn,An)),(xt=Bt.onSelect)===null||xt===void 0||xt.call(Bt,An,yn),"selectedKeys"in Bt||Ut(An)},{getPrefixCls:Be,direction:qe}=Pe.useContext(oe.E_),{prefixCls:et,className:He,showIcon:Xe=!0,expandAction:Re="click"}=Bt,Ae=mt(Bt,["prefixCls","className","showIcon","expandAction"]),Ue=Be("tree",et),Ke=ue()(`${Ue}-directory`,{[`${Ue}-directory-rtl`]:qe==="rtl"},He);return Pe.createElement(Ne,Object.assign({icon:ct,ref:dt,blockNode:!0},Ae,{showIcon:Xe,expandAction:Re,prefixCls:Ue,className:Ke,expandedKeys:Wt,selectedKeys:xn,onSelect:We,onExpand:ft}))};var ut=Pe.forwardRef(it);const Ft=Ne;Ft.DirectoryTree=ut,Ft.TreeNode=Le.O;var ht=Ft},20648:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{TM:function(){return de},Yk:function(){return ve}});var Le=Ee(93083),me=Ee(98447),Ie=Ee(17313),Te=Ee(8378),be=Ee(37613),Pe=Ee(83116);const he=new Le.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),Se=(ue,z)=>({[`.${ue}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${z.motionDurationSlow}`}}}),xe=(ue,z)=>({[`.${ue}-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=(ue,z)=>{const{treeCls:ee,treeNodeCls:oe,treeNodePadding:ie,titleHeight:se,nodeSelectedBg:le,nodeHoverBg:ye}=z,we=z.paddingXS;return{[ee]:Object.assign(Object.assign({},(0,Ie.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,Ie.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,Ie.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(ue,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:le},[`${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(ue,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`}}}}})}},ce=ue=>{const{treeCls:z,treeNodeCls:ee,treeNodePadding:oe,directoryNodeSelectedBg:ie,directoryNodeSelectedColor:se}=ue;return{[`${z}${z}-directory`]:{[ee]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:oe,insetInlineStart:0,transition:`background-color ${ue.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:ue.controlItemBgHover}},"> *":{zIndex:1},[`${z}-switcher`]:{transition:`color ${ue.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=(ue,z)=>{const ee=`.${ue}`,oe=`${ee}-treenode`,ie=z.paddingXS/2,se=(0,be.TS)(z,{treeCls:ee,treeNodeCls:oe,treeNodePadding:ie});return[ge(ue,se),ce(se)]},de=ue=>{const{controlHeightSM:z}=ue;return{titleHeight:z,nodeHoverBg:ue.controlItemBgHover,nodeSelectedBg:ue.controlItemBgActive}};Yt.ZP=(0,Pe.Z)("Tree",(ue,z)=>{let{prefixCls:ee}=z;return[{[ue.componentCls]:(0,me.C2)(`${ee}-checkbox`,ue)},ve(ee,ue),(0,Te.Z)(ue)]},ue=>{const{colorTextLightSolid:z,colorPrimary:ee}=ue;return Object.assign(Object.assign({},de(ue)),{directoryNodeSelectedColor:z,directoryNodeSelectedBg:ee})})},71997:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return oe}});var Le=Ee(72308),me=Ee(59301),Ie={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"},Te=Ie,be=Ee(7657),Pe=function(se,le){return me.createElement(be.Z,(0,Le.Z)({},se,{ref:le,icon:Te}))},he=me.forwardRef(Pe),Se=he,xe=Ee(52671),ge=Ee(58617),ce=Ee(15075),ve=Ee(43531),de=Ee(92310),ue=Ee.n(de),z=Ee(92343),oe=ie=>{const{prefixCls:se,switcherIcon:le,treeNodeProps:ye,showLine:we}=ie,{isLeaf:Ce,expanded:ke,loading:Ne}=ye;if(Ne)return me.createElement(ge.Z,{className:`${se}-switcher-loading-icon`});let je;if(we&&typeof we=="object"&&(je=we.showLeafIcon),Ce){if(!we)return null;if(typeof je!="boolean"&&je){const Ge=typeof je=="function"?je(ye):je,mt=`${se}-switcher-line-custom-icon`;return(0,z.l$)(Ge)?(0,z.Tm)(Ge,{className:ue()(Ge.props.className||"",mt)}):Ge}return je?me.createElement(xe.Z,{className:`${se}-switcher-line-icon`}):me.createElement("span",{className:`${se}-switcher-leaf-line`})}const Ve=`${se}-switcher-icon`,Qe=typeof le=="function"?le(ye):le;return(0,z.l$)(Qe)?(0,z.Tm)(Qe,{className:ue()(Qe.props.className||"",Ve)}):Qe!==void 0?Qe:we?ke?me.createElement(ce.Z,{className:`${se}-switcher-line-icon`}):me.createElement(ve.Z,{className:`${se}-switcher-line-icon`}):me.createElement(Se,{className:Ve})}},99498:function(Cn,Yt,Ee){(function(Le){Le(Ee(89780))})(function(Le){Le.defineOption("placeholder","",function(Se,xe,ge){var ce=ge&&ge!=Le.Init;if(xe&&!ce)Se.on("blur",be),Se.on("change",Pe),Se.on("swapDoc",Pe),Le.on(Se.getInputField(),"compositionupdate",Se.state.placeholderCompose=function(){Te(Se)}),Pe(Se);else if(!xe&&ce){Se.off("blur",be),Se.off("change",Pe),Se.off("swapDoc",Pe),Le.off(Se.getInputField(),"compositionupdate",Se.state.placeholderCompose),me(Se);var ve=Se.getWrapperElement();ve.className=ve.className.replace(" CodeMirror-empty","")}xe&&!Se.hasFocus()&&be(Se)});function me(Se){Se.state.placeholder&&(Se.state.placeholder.parentNode.removeChild(Se.state.placeholder),Se.state.placeholder=null)}function Ie(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 Te(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?Ie(Se):me(Se)},20)}function be(Se){he(Se)&&Ie(Se)}function Pe(Se){var xe=Se.getWrapperElement(),ge=he(Se);xe.className=xe.className.replace(" CodeMirror-empty","")+(ge?" CodeMirror-empty":""),ge?Ie(Se):me(Se)}function he(Se){return Se.lineCount()===1&&Se.getLine(0)===""}})},25717:function(Cn,Yt,Ee){(function(Le){Le(Ee(89780))})(function(Le){var me={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Ie=Le.Pos;Le.defineOption("autoCloseBrackets",!1,function(z,ee,oe){oe&&oe!=Le.Init&&(z.removeKeyMap(be),z.state.closeBrackets=null),ee&&(Pe(Te(ee,"pairs")),z.state.closeBrackets=ee,z.addKeyMap(be))});function Te(z,ee){return ee=="pairs"&&typeof z=="string"?z:typeof z=="object"&&z[ee]!=null?z[ee]:me[ee]}var be={Backspace:xe,Enter:ge};function Pe(z){for(var ee=0;ee<z.length;ee++){var oe=z.charAt(ee),ie="'"+oe+"'";be[ie]||(be[ie]=he(oe))}}Pe(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 Le.Pass;for(var oe=Te(ee,"pairs"),ie=z.listSelections(),se=0;se<ie.length;se++){if(!ie[se].empty())return Le.Pass;var le=de(z,ie[se].head);if(!le||oe.indexOf(le)%2!=0)return Le.Pass}for(var se=ie.length-1;se>=0;se--){var ye=ie[se].head;z.replaceRange("",Ie(ye.line,ye.ch-1),Ie(ye.line,ye.ch+1),"+delete")}}function ge(z){var ee=Se(z),oe=ee&&Te(ee,"explode");if(!oe||z.getOption("disableInput"))return Le.Pass;for(var ie=z.listSelections(),se=0;se<ie.length;se++){if(!ie[se].empty())return Le.Pass;var le=de(z,ie[se].head);if(!le||oe.indexOf(le)%2!=0)return Le.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 Ce=ie[we].head.line;z.indentLine(Ce,null,!0),z.indentLine(Ce+1,null,!0)}})}function ce(z){var ee=Le.cmpPos(z.anchor,z.head)>0;return{anchor:new Ie(z.anchor.line,z.anchor.ch+(ee?-1:1)),head:new Ie(z.head.line,z.head.ch+(ee?1:-1))}}function ve(z,ee){var oe=Se(z);if(!oe||z.getOption("disableInput"))return Le.Pass;var ie=Te(oe,"pairs"),se=ie.indexOf(ee);if(se==-1)return Le.Pass;for(var le=Te(oe,"closeBefore"),ye=Te(oe,"triples"),we=ie.charAt(se+1)==ee,Ce=z.listSelections(),ke=se%2==0,Ne,je=0;je<Ce.length;je++){var Ve=Ce[je],Qe=Ve.head,Ge,mt=z.getRange(Qe,Ie(Qe.line,Qe.ch+1));if(ke&&!Ve.empty())Ge="surround";else if((we||!ke)&&mt==ee)we&&ue(z,Qe)?Ge="both":ye.indexOf(ee)>=0&&z.getRange(Qe,Ie(Qe.line,Qe.ch+3))==ee+ee+ee?Ge="skipThree":Ge="skip";else if(we&&Qe.ch>1&&ye.indexOf(ee)>=0&&z.getRange(Ie(Qe.line,Qe.ch-2),Qe)==ee+ee){if(Qe.ch>2&&/\bstring/.test(z.getTokenTypeAt(Ie(Qe.line,Qe.ch-2))))return Le.Pass;Ge="addFour"}else if(we){var ct=Qe.ch==0?" ":z.getRange(Ie(Qe.line,Qe.ch-1),Qe);if(!Le.isWordChar(mt)&&ct!=ee&&!Le.isWordChar(ct))Ge="both";else return Le.Pass}else if(ke&&(mt.length===0||/\s/.test(mt)||le.indexOf(mt)>-1))Ge="both";else return Le.Pass;if(!Ne)Ne=Ge;else if(Ne!=Ge)return Le.Pass}var Ct=se%2?ie.charAt(se-1):ee,it=se%2?ee:ie.charAt(se+1);z.operation(function(){if(Ne=="skip")z.execCommand("goCharRight");else if(Ne=="skipThree")for(var St=0;St<3;St++)z.execCommand("goCharRight");else if(Ne=="surround"){for(var ut=z.getSelections(),St=0;St<ut.length;St++)ut[St]=Ct+ut[St]+it;z.replaceSelections(ut,"around"),ut=z.listSelections().slice();for(var St=0;St<ut.length;St++)ut[St]=ce(ut[St]);z.setSelections(ut)}else Ne=="both"?(z.replaceSelection(Ct+it,null),z.triggerElectric(Ct+it),z.execCommand("goCharLeft")):Ne=="addFour"&&(z.replaceSelection(Ct+Ct+Ct+Ct,"before"),z.execCommand("goCharRight"))})}function de(z,ee){var oe=z.getRange(Ie(ee.line,ee.ch-1),Ie(ee.line,ee.ch+1));return oe.length==2?oe:null}function ue(z,ee){var oe=z.getTokenAt(Ie(ee.line,ee.ch+1));return/\bstring/.test(oe.type)&&oe.start==ee.ch&&(ee.ch==0||!/\bstring/.test(z.getTokenTypeAt(ee)))}})},6313:function(Cn,Yt,Ee){(function(Le){Le(Ee(89780),Ee(32855))})(function(Le){Le.defineOption("autoCloseTags",!1,function(xe,ge,ce){if(ce!=Le.Init&&ce&&xe.removeKeyMap("autoCloseTags"),!!ge){var ve={name:"autoCloseTags"};(typeof ge!="object"||ge.whenClosing!==!1)&&(ve["'/'"]=function(de){return Pe(de)}),(typeof ge!="object"||ge.whenOpening!==!1)&&(ve["'>'"]=function(de){return Te(de)}),xe.addKeyMap(ve)}});var me=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Ie=["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 Te(xe){if(xe.getOption("disableInput"))return Le.Pass;for(var ge=xe.listSelections(),ce=[],ve=xe.getOption("autoCloseTags"),de=0;de<ge.length;de++){if(!ge[de].empty())return Le.Pass;var ue=ge[de].head,z=xe.getTokenAt(ue),ee=Le.innerMode(xe.getMode(),z.state),oe=ee.state,ie=ee.mode.xmlCurrentTag&&ee.mode.xmlCurrentTag(oe),se=ie&&ie.name;if(!se)return Le.Pass;var le=ee.mode.configuration=="html",ye=typeof ve=="object"&&ve.dontCloseTags||le&&me,we=typeof ve=="object"&&ve.indentTags||le&&Ie;z.end>ue.ch&&(se=se.slice(0,se.length-z.end+ue.ch));var Ce=se.toLowerCase();if(!se||z.type=="string"&&(z.end!=ue.ch||!/[\"\']/.test(z.string.charAt(z.string.length-1))||z.string.length==1)||z.type=="tag"&&ie.close||z.string.indexOf("/")==ue.ch-z.start-1||ye&&he(ye,Ce)>-1||Se(xe,ee.mode.xmlCurrentContext&&ee.mode.xmlCurrentContext(oe)||[],se,ue,!0))return Le.Pass;var ke=typeof ve=="object"&&ve.emptyTags;if(ke&&he(ke,se)>-1){ce[de]={text:"/>",newPos:Le.Pos(ue.line,ue.ch+2)};continue}var Ne=we&&he(we,Ce)>-1;ce[de]={indent:Ne,text:">"+(Ne?`
|
|
|
|
|
|
`:"")+"</"+se+">",newPos:Ne?Le.Pos(ue.line+1,0):Le.Pos(ue.line,ue.ch+1)}}for(var je=typeof ve=="object"&&ve.dontIndentOnAutoClose,de=ge.length-1;de>=0;de--){var Ve=ce[de];xe.replaceRange(Ve.text,ge[de].head,ge[de].anchor,"+insert");var Qe=xe.listSelections().slice(0);Qe[de]={head:Ve.newPos,anchor:Ve.newPos},xe.setSelections(Qe),!je&&Ve.indent&&(xe.indentLine(Ve.newPos.line,null,!0),xe.indentLine(Ve.newPos.line+1,null,!0))}}function be(xe,ge){for(var ce=xe.listSelections(),ve=[],de=ge?"/":"</",ue=xe.getOption("autoCloseTags"),z=typeof ue=="object"&&ue.dontIndentOnSlash,ee=0;ee<ce.length;ee++){if(!ce[ee].empty())return Le.Pass;var oe=ce[ee].head,ie=xe.getTokenAt(oe),se=Le.innerMode(xe.getMode(),ie.state),le=se.state;if(ge&&(ie.type=="string"||ie.string.charAt(0)!="<"||ie.start!=oe.ch-1))return Le.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 Ce=se.mode.xmlCurrentContext&&se.mode.xmlCurrentContext(le);if(!Ce||Ce.length&&Se(xe,Ce,Ce[Ce.length-1],oe))return Le.Pass;ye=de+Ce[Ce.length-1]}xe.getLine(oe.line).charAt(ie.end)!=">"&&(ye+=">"),ve[ee]=ye}if(xe.replaceSelections(ve),ce=xe.listSelections(),!z)for(var ee=0;ee<ce.length;ee++)(ee==ce.length-1||ce[ee].head.line<ce[ee+1].head.line)&&xe.indentLine(ce[ee].head.line)}function Pe(xe){return xe.getOption("disableInput")?Le.Pass:be(xe,!0)}Le.commands.closeTag=function(xe){return be(xe)};function he(xe,ge){if(xe.indexOf)return xe.indexOf(ge);for(var ce=0,ve=xe.length;ce<ve;++ce)if(xe[ce]==ge)return ce;return-1}function Se(xe,ge,ce,ve,de){if(!Le.scanForClosingTag)return!1;var ue=Math.min(xe.lastLine()+1,ve.line+500),z=Le.scanForClosingTag(xe,ve,null,ue);if(!z||z.tag!=ce)return!1;for(var ee=de?1:0,oe=ge.length-1;oe>=0&&ge[oe]==ce;oe--)++ee;ve=z.to;for(var oe=1;oe<ee;oe++){var ie=Le.scanForClosingTag(xe,ve,null,ue);if(!ie||ie.tag!=ce)return!1;ve=ie.to}return!0}})},32855:function(Cn,Yt,Ee){(function(Le){Le(Ee(89780))})(function(Le){"use strict";var me=Le.Pos;function Ie(oe,ie){return oe.line-ie.line||oe.ch-ie.ch}var Te="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",be=Te+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Pe=new RegExp("<(/?)(["+Te+"]["+be+"]*)","g");function he(oe,ie,se,le){this.line=ie,this.ch=se,this.cm=oe,this.text=oe.getLine(ie),this.min=le?Math.max(le.from,oe.firstLine()):oe.firstLine(),this.max=le?Math.min(le.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 ce(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),le=se>-1&&!/\S/.test(oe.text.slice(se+1,ie));return oe.ch=ie+1,le?"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}Pe.lastIndex=ie,oe.ch=ie;var se=Pe.exec(oe.text);if(se&&se.index==ie)return se}}function de(oe){for(;;){Pe.lastIndex=oe.ch;var ie=Pe.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 ue(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),le=se>-1&&!/\S/.test(oe.text.slice(se+1,ie));return oe.ch=ie+1,le?"selfClose":"regular"}}function z(oe,ie){for(var se=[];;){var le=de(oe),ye,we=oe.line,Ce=oe.ch-(le?le[0].length:0);if(!le||!(ye=ce(oe)))return;if(ye!="selfClose")if(le[1]){for(var ke=se.length-1;ke>=0;--ke)if(se[ke]==le[2]){se.length=ke;break}if(ke<0&&(!ie||ie==le[2]))return{tag:le[2],from:me(we,Ce),to:me(oe.line,oe.ch)}}else se.push(le[2])}}function ee(oe,ie){for(var se=[];;){var le=ue(oe);if(!le)return;if(le=="selfClose"){ve(oe);continue}var ye=oe.line,we=oe.ch,Ce=ve(oe);if(!Ce)return;if(Ce[1])se.push(Ce[2]);else{for(var ke=se.length-1;ke>=0;--ke)if(se[ke]==Ce[2]){se.length=ke;break}if(ke<0&&(!ie||ie==Ce[2]))return{tag:Ce[2],from:me(oe.line,oe.ch),to:me(ye,we)}}}}Le.registerHelper("fold","xml",function(oe,ie){for(var se=new he(oe,ie.line,0);;){var le=de(se);if(!le||se.line!=ie.line)return;var ye=ce(se);if(!ye)return;if(!le[1]&&ye!="selfClose"){var we=me(se.line,se.ch),Ce=z(se,le[2]);return Ce&&Ie(Ce.from,we)>0?{from:we,to:Ce.from}:null}}}),Le.findMatchingTag=function(oe,ie,se){var le=new he(oe,ie.line,ie.ch,se);if(!(le.text.indexOf(">")==-1&&le.text.indexOf("<")==-1)){var ye=ce(le),we=ye&&me(le.line,le.ch),Ce=ye&&ve(le);if(!(!ye||!Ce||Ie(le,ie)>0)){var ke={from:me(le.line,le.ch),to:we,tag:Ce[2]};return ye=="selfClose"?{open:ke,close:null,at:"open"}:Ce[1]?{open:ee(le,Ce[2]),close:ke,at:"close"}:(le=new he(oe,we.line,we.ch,se),{open:ke,close:z(le,Ce[2]),at:"open"})}}},Le.findEnclosingTag=function(oe,ie,se,le){for(var ye=new he(oe,ie.line,ie.ch,se);;){var we=ee(ye,le);if(!we)break;var Ce=new he(oe,ie.line,ie.ch,se),ke=z(Ce,we.tag);if(ke)return{open:we,close:ke}}},Le.scanForClosingTag=function(oe,ie,se,le){var ye=new he(oe,ie.line,ie.ch,le?{from:0,to:le}:null);return z(ye,se)}})},89780:function(Cn){(function(Yt,Ee){Cn.exports=Ee()})(this,function(){"use strict";var Yt=navigator.userAgent,Ee=navigator.platform,Le=/gecko\/\d/i.test(Yt),me=/MSIE \d/.test(Yt),Ie=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Yt),Te=/Edge\/(\d+)/.exec(Yt),be=me||Ie||Te,Pe=be&&(me?document.documentMode||6:+(Te||Ie)[1]),he=!Te&&/WebKit\//.test(Yt),Se=he&&/Qt\/\d+\.\d+/.test(Yt),xe=!Te&&/Chrome\//.test(Yt),ge=/Opera\//.test(Yt),ce=/Apple Computer/.test(navigator.vendor),ve=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Yt),de=/PhantomJS/.test(Yt),ue=!Te&&/AppleWebKit/.test(Yt)&&/Mobile\/\w+/.test(Yt),z=/Android/.test(Yt),ee=ue||z||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Yt),oe=ue||/Mac/.test(Ee),ie=/\bCrOS\b/.test(Yt),se=/win/i.test(Ee),le=ge&&Yt.match(/Version\/(\d*\.\d*)/);le&&(le=Number(le[1])),le&&le>=15&&(ge=!1,he=!0);var ye=oe&&(Se||ge&&(le==null||le<12.11)),we=Le||be&&Pe>=9;function Ce(re){return new RegExp("(^|\\s)"+re+"(?:$|\\s)\\s*")}var ke=function(re,pe){var De=re.className,Oe=Ce(pe).exec(De);if(Oe){var ze=De.slice(Oe.index+Oe[0].length);re.className=De.slice(0,Oe.index)+(ze?Oe[1]+ze:"")}};function Ne(re){for(var pe=re.childNodes.length;pe>0;--pe)re.removeChild(re.firstChild);return re}function je(re,pe){return Ne(re).appendChild(pe)}function Ve(re,pe,De,Oe){var ze=document.createElement(re);if(De&&(ze.className=De),Oe&&(ze.style.cssText=Oe),typeof pe=="string")ze.appendChild(document.createTextNode(pe));else if(pe)for(var at=0;at<pe.length;++at)ze.appendChild(pe[at]);return ze}function Qe(re,pe,De,Oe){var ze=Ve(re,pe,De,Oe);return ze.setAttribute("role","presentation"),ze}var Ge;document.createRange?Ge=function(re,pe,De,Oe){var ze=document.createRange();return ze.setEnd(Oe||re,De),ze.setStart(re,pe),ze}:Ge=function(re,pe,De){var Oe=document.body.createTextRange();try{Oe.moveToElementText(re.parentNode)}catch(ze){return Oe}return Oe.collapse(!0),Oe.moveEnd("character",De),Oe.moveStart("character",pe),Oe};function mt(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 ct(){var re;try{re=document.activeElement}catch(pe){re=document.body||null}for(;re&&re.shadowRoot&&re.shadowRoot.activeElement;)re=re.shadowRoot.activeElement;return re}function Ct(re,pe){var De=re.className;Ce(pe).test(De)||(re.className+=(De?" ":"")+pe)}function it(re,pe){for(var De=re.split(" "),Oe=0;Oe<De.length;Oe++)De[Oe]&&!Ce(De[Oe]).test(pe)&&(pe+=" "+De[Oe]);return pe}var St=function(re){re.select()};ue?St=function(re){re.selectionStart=0,re.selectionEnd=re.value.length}:be&&(St=function(re){try{re.select()}catch(pe){}});function ut(re){var pe=Array.prototype.slice.call(arguments,1);return function(){return re.apply(null,pe)}}function Ft(re,pe,De){pe||(pe={});for(var Oe in re)re.hasOwnProperty(Oe)&&(De!==!1||!pe.hasOwnProperty(Oe))&&(pe[Oe]=re[Oe]);return pe}function ht(re,pe,De,Oe,ze){pe==null&&(pe=re.search(/[^\s\u00a0]/),pe==-1&&(pe=re.length));for(var at=Oe||0,bt=ze||0;;){var Dt=re.indexOf(" ",at);if(Dt<0||Dt>=pe)return bt+(pe-at);bt+=Dt-at,bt+=De-bt%De,at=Dt+1}}var rt=function(){this.id=null,this.f=null,this.time=0,this.handler=ut(this.onTimeout,this)};rt.prototype.onTimeout=function(re){re.id=0,re.time<=+new Date?re.f():setTimeout(re.handler,re.time-+new Date)},rt.prototype.set=function(re,pe){this.f=pe;var De=+new Date+re;(!this.id||De<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,re),this.time=De)};function dt(re,pe){for(var De=0;De<re.length;++De)if(re[De]==pe)return De;return-1}var yt=50,_t={toString:function(){return"CodeMirror.Pass"}},vt={scroll:!1},Bt={origin:"*mouse"},jt={origin:"+move"};function un(re,pe,De){for(var Oe=0,ze=0;;){var at=re.indexOf(" ",Oe);at==-1&&(at=re.length);var bt=at-Oe;if(at==re.length||ze+bt>=pe)return Oe+Math.min(bt,pe-ze);if(ze+=at-Oe,ze+=De-ze%De,Oe=at+1,ze>=pe)return Oe}}var Kt=[""];function xn(re){for(;Kt.length<=re;)Kt.push(Ut(Kt)+" ");return Kt[re]}function Ut(re){return re[re.length-1]}function Wt(re,pe){for(var De=[],Oe=0;Oe<re.length;Oe++)De[Oe]=pe(re[Oe],Oe);return De}function $t(re,pe,De){for(var Oe=0,ze=De(pe);Oe<re.length&&De(re[Oe])<=ze;)Oe++;re.splice(Oe,0,pe)}function ft(){}function We(re,pe){var De;return Object.create?De=Object.create(re):(ft.prototype=re,De=new ft),pe&&Ft(pe,De),De}var Be=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function qe(re){return/\w/.test(re)||re>"\x80"&&(re.toUpperCase()!=re.toLowerCase()||Be.test(re))}function et(re,pe){return pe?pe.source.indexOf("\\w")>-1&&qe(re)?!0:pe.test(re):qe(re)}function He(re){for(var pe in re)if(re.hasOwnProperty(pe)&&re[pe])return!1;return!0}var Xe=/[\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 Re(re){return re.charCodeAt(0)>=768&&Xe.test(re)}function Ae(re,pe,De){for(;(De<0?pe>0:pe<re.length)&&Re(re.charAt(pe));)pe+=De;return pe}function Ue(re,pe,De){for(var Oe=pe>De?-1:1;;){if(pe==De)return pe;var ze=(pe+De)/2,at=Oe<0?Math.ceil(ze):Math.floor(ze);if(at==pe)return re(at)?pe:De;re(at)?De=at:pe=at+Oe}}function Ke(re,pe,De,Oe){if(!re)return Oe(pe,De,"ltr",0);for(var ze=!1,at=0;at<re.length;++at){var bt=re[at];(bt.from<De&&bt.to>pe||pe==De&&bt.to==pe)&&(Oe(Math.max(bt.from,pe),Math.min(bt.to,De),bt.level==1?"rtl":"ltr",at),ze=!0)}ze||Oe(pe,De,"ltr")}var Ze=null;function lt(re,pe,De){var Oe;Ze=null;for(var ze=0;ze<re.length;++ze){var at=re[ze];if(at.from<pe&&at.to>pe)return ze;at.to==pe&&(at.from!=at.to&&De=="before"?Oe=ze:Ze=ze),at.from==pe&&(at.from!=at.to&&De!="before"?Oe=ze:Ze=ze)}return Oe!=null?Oe:Ze}var xt=function(){var re="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",pe="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function De(Vt){return Vt<=247?re.charAt(Vt):1424<=Vt&&Vt<=1524?"R":1536<=Vt&&Vt<=1785?pe.charAt(Vt-1536):1774<=Vt&&Vt<=2220?"r":8192<=Vt&&Vt<=8203?"w":Vt==8204?"b":"L"}var Oe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,ze=/[stwN]/,at=/[LRr]/,bt=/[Lb1n]/,Dt=/[1n]/;function Ot(Vt,Ln,Qt){this.level=Vt,this.from=Ln,this.to=Qt}return function(Vt,Ln){var Qt=Ln=="ltr"?"L":"R";if(Vt.length==0||Ln=="ltr"&&!Oe.test(Vt))return!1;for(var Un=Vt.length,jn=[],mi=0;mi<Un;++mi)jn.push(De(Vt.charCodeAt(mi)));for(var _i=0,Bi=Qt;_i<Un;++_i){var tr=jn[_i];tr=="m"?jn[_i]=Bi:Bi=tr}for(var Dr=0,Sr=Qt;Dr<Un;++Dr){var Zr=jn[Dr];Zr=="1"&&Sr=="r"?jn[Dr]="n":at.test(Zr)&&(Sr=Zr,Zr=="r"&&(jn[Dr]="R"))}for(var wo=1,yr=jn[0];wo<Un-1;++wo){var zo=jn[wo];zo=="+"&&yr=="1"&&jn[wo+1]=="1"?jn[wo]="1":zo==","&&yr==jn[wo+1]&&(yr=="1"||yr=="n")&&(jn[wo]=yr),yr=zo}for(var ca=0;ca<Un;++ca){var Ya=jn[ca];if(Ya==",")jn[ca]="N";else if(Ya=="%"){var va=void 0;for(va=ca+1;va<Un&&jn[va]=="%";++va);for(var nu=ca&&jn[ca-1]=="!"||va<Un&&jn[va]=="1"?"1":"N",Ml=ca;Ml<va;++Ml)jn[Ml]=nu;ca=va-1}}for(var ja=0,gu=Qt;ja<Un;++ja){var pl=jn[ja];gu=="L"&&pl=="1"?jn[ja]="L":at.test(pl)&&(gu=pl)}for(var za=0;za<Un;++za)if(ze.test(jn[za])){var ws=void 0;for(ws=za+1;ws<Un&&ze.test(jn[ws]);++ws);for(var Ca=(za?jn[za-1]:Qt)=="L",tl=(ws<Un?jn[ws]:Qt)=="L",gl=Ca==tl?Ca?"L":"R":Qt,lc=za;lc<ws;++lc)jn[lc]=gl;za=ws-1}for(var ya=[],Vu,Ta=0;Ta<Un;)if(bt.test(jn[Ta])){var Ef=Ta;for(++Ta;Ta<Un&&bt.test(jn[Ta]);++Ta);ya.push(new Ot(0,Ef,Ta))}else{var Iu=Ta,mu=ya.length,iu=Ln=="rtl"?1:0;for(++Ta;Ta<Un&&jn[Ta]!="L";++Ta);for(var ea=Iu;ea<Ta;)if(Dt.test(jn[ea])){Iu<ea&&(ya.splice(mu,0,new Ot(1,Iu,ea)),mu+=iu);var nl=ea;for(++ea;ea<Ta&&Dt.test(jn[ea]);++ea);ya.splice(mu,0,new Ot(2,nl,ea)),mu+=iu,Iu=ea}else++ea;Iu<Ta&&ya.splice(mu,0,new Ot(1,Iu,Ta))}return Ln=="ltr"&&(ya[0].level==1&&(Vu=Vt.match(/^\s+/))&&(ya[0].from=Vu[0].length,ya.unshift(new Ot(0,0,Vu[0].length))),Ut(ya).level==1&&(Vu=Vt.match(/\s+$/))&&(Ut(ya).to-=Vu[0].length,ya.push(new Ot(0,Un-Vu[0].length,Un)))),Ln=="rtl"?ya.reverse():ya}}();function tn(re,pe){var De=re.order;return De==null&&(De=re.order=xt(re.text,pe)),De}var en=[],Jt=function(re,pe,De){if(re.addEventListener)re.addEventListener(pe,De,!1);else if(re.attachEvent)re.attachEvent("on"+pe,De);else{var Oe=re._handlers||(re._handlers={});Oe[pe]=(Oe[pe]||en).concat(De)}};function gn(re,pe){return re._handlers&&re._handlers[pe]||en}function Mn(re,pe,De){if(re.removeEventListener)re.removeEventListener(pe,De,!1);else if(re.detachEvent)re.detachEvent("on"+pe,De);else{var Oe=re._handlers,ze=Oe&&Oe[pe];if(ze){var at=dt(ze,De);at>-1&&(Oe[pe]=ze.slice(0,at).concat(ze.slice(at+1)))}}}function yn(re,pe){var De=gn(re,pe);if(De.length)for(var Oe=Array.prototype.slice.call(arguments,2),ze=0;ze<De.length;++ze)De[ze].apply(null,Oe)}function kn(re,pe,De){return typeof pe=="string"&&(pe={type:pe,preventDefault:function(){this.defaultPrevented=!0}}),yn(re,De||pe.type,re,pe),Pi(pe)||pe.codemirrorIgnore}function $n(re){var pe=re._handlers&&re._handlers.cursorActivity;if(pe)for(var De=re.curOp.cursorActivityHandlers||(re.curOp.cursorActivityHandlers=[]),Oe=0;Oe<pe.length;++Oe)dt(De,pe[Oe])==-1&&De.push(pe[Oe])}function An(re,pe){return gn(re,pe).length>0}function oi(re){re.prototype.on=function(pe,De){Jt(this,pe,De)},re.prototype.off=function(pe,De){Mn(this,pe,De)}}function ai(re){re.preventDefault?re.preventDefault():re.returnValue=!1}function Di(re){re.stopPropagation?re.stopPropagation():re.cancelBubble=!0}function Pi(re){return re.defaultPrevented!=null?re.defaultPrevented:re.returnValue==!1}function Xi(re){ai(re),Di(re)}function or(re){return re.target||re.srcElement}function ar(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 dr=function(){if(be&&Pe<9)return!1;var re=Ve("div");return"draggable"in re||"dragDrop"in re}(),no;function Ir(re){if(no==null){var pe=Ve("span","\u200B");je(re,Ve("span",[pe,document.createTextNode("x")])),re.firstChild.offsetHeight!=0&&(no=pe.offsetWidth<=1&&pe.offsetHeight>2&&!(be&&Pe<8))}var De=no?Ve("span","\u200B"):Ve("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return De.setAttribute("cm-text",""),De}var xi;function wr(re){if(xi!=null)return xi;var pe=je(re,document.createTextNode("A\u062EA")),De=Ge(pe,0,1).getBoundingClientRect(),Oe=Ge(pe,1,2).getBoundingClientRect();return Ne(re),!De||De.left==De.right?!1:xi=Oe.right-De.right<3}var Mr=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(re){for(var pe=0,De=[],Oe=re.length;pe<=Oe;){var ze=re.indexOf(`
|
|
|
`,pe);ze==-1&&(ze=re.length);var at=re.slice(pe,re.charAt(ze-1)=="\r"?ze-1:ze),bt=at.indexOf("\r");bt!=-1?(De.push(at.slice(0,bt)),pe+=bt+1):(De.push(at),pe=ze+1)}return De}:function(re){return re.split(/\r\n?|\n/)},ot=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(De){}return!pe||pe.parentElement()!=re?!1:pe.compareEndPoints("StartToEnd",pe)!=0},Rr=function(){var re=Ve("div");return"oncopy"in re?!0:(re.setAttribute("oncopy","return;"),typeof re.oncopy=="function")}(),Nr=null;function Hr(re){if(Nr!=null)return Nr;var pe=je(re,Ve("span","x")),De=pe.getBoundingClientRect(),Oe=Ge(pe,0,1).getBoundingClientRect();return Nr=Math.abs(De.left-Oe.left)>1}var uo={},po={};function io(re,pe){arguments.length>2&&(pe.dependencies=Array.prototype.slice.call(arguments,2)),uo[re]=pe}function Do(re,pe){po[re]=pe}function Xn(re){if(typeof re=="string"&&po.hasOwnProperty(re))re=po[re];else if(re&&typeof re.name=="string"&&po.hasOwnProperty(re.name)){var pe=po[re.name];typeof pe=="string"&&(pe={name:pe}),re=We(pe,re),re.name=pe.name}else{if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(re))return Xn("application/xml");if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(re))return Xn("application/json")}return typeof re=="string"?{name:re}:re||{name:"null"}}function $e(re,pe){pe=Xn(pe);var De=uo[pe.name];if(!De)return $e(re,"text/plain");var Oe=De(re,pe);if(nt.hasOwnProperty(pe.name)){var ze=nt[pe.name];for(var at in ze)ze.hasOwnProperty(at)&&(Oe.hasOwnProperty(at)&&(Oe["_"+at]=Oe[at]),Oe[at]=ze[at])}if(Oe.name=pe.name,pe.helperType&&(Oe.helperType=pe.helperType),pe.modeProps)for(var bt in pe.modeProps)Oe[bt]=pe.modeProps[bt];return Oe}var nt={};function Je(re,pe){var De=nt.hasOwnProperty(re)?nt[re]:nt[re]={};Ft(pe,De)}function wt(re,pe){if(pe===!0)return pe;if(re.copyState)return re.copyState(pe);var De={};for(var Oe in pe){var ze=pe[Oe];ze instanceof Array&&(ze=ze.concat([])),De[Oe]=ze}return De}function Nt(re,pe){for(var De;re.innerMode&&(De=re.innerMode(pe),!(!De||De.mode==re));)pe=De.state,re=De.mode;return De||{mode:re,state:pe}}function kt(re,pe,De){return re.startState?re.startState(pe,De):!0}var Et=function(re,pe,De){this.pos=this.start=0,this.string=re,this.tabSize=pe||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=De};Et.prototype.eol=function(){return this.pos>=this.string.length},Et.prototype.sol=function(){return this.pos==this.lineStart},Et.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Et.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Et.prototype.eat=function(re){var pe=this.string.charAt(this.pos),De;if(typeof re=="string"?De=pe==re:De=pe&&(re.test?re.test(pe):re(pe)),De)return++this.pos,pe},Et.prototype.eatWhile=function(re){for(var pe=this.pos;this.eat(re););return this.pos>pe},Et.prototype.eatSpace=function(){for(var re=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>re},Et.prototype.skipToEnd=function(){this.pos=this.string.length},Et.prototype.skipTo=function(re){var pe=this.string.indexOf(re,this.pos);if(pe>-1)return this.pos=pe,!0},Et.prototype.backUp=function(re){this.pos-=re},Et.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ht(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ht(this.string,this.lineStart,this.tabSize):0)},Et.prototype.indentation=function(){return ht(this.string,null,this.tabSize)-(this.lineStart?ht(this.string,this.lineStart,this.tabSize):0)},Et.prototype.match=function(re,pe,De){if(typeof re=="string"){var Oe=function(bt){return De?bt.toLowerCase():bt},ze=this.string.substr(this.pos,re.length);if(Oe(ze)==Oe(re))return pe!==!1&&(this.pos+=re.length),!0}else{var at=this.string.slice(this.pos).match(re);return at&&at.index>0?null:(at&&pe!==!1&&(this.pos+=at[0].length),at)}},Et.prototype.current=function(){return this.string.slice(this.start,this.pos)},Et.prototype.hideFirstChars=function(re,pe){this.lineStart+=re;try{return pe()}finally{this.lineStart-=re}},Et.prototype.lookAhead=function(re){var pe=this.lineOracle;return pe&&pe.lookAhead(re)},Et.prototype.baseToken=function(){var re=this.lineOracle;return re&&re.baseToken(this.pos)};function cn(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 De=re;!De.lines;)for(var Oe=0;;++Oe){var ze=De.children[Oe],at=ze.chunkSize();if(pe<at){De=ze;break}pe-=at}return De.lines[pe]}function bn(re,pe,De){var Oe=[],ze=pe.line;return re.iter(pe.line,De.line+1,function(at){var bt=at.text;ze==De.line&&(bt=bt.slice(0,De.ch)),ze==pe.line&&(bt=bt.slice(pe.ch)),Oe.push(bt),++ze}),Oe}function dn(re,pe,De){var Oe=[];return re.iter(pe,De,function(ze){Oe.push(ze.text)}),Oe}function rn(re,pe){var De=pe-re.height;if(De)for(var Oe=re;Oe;Oe=Oe.parent)Oe.height+=De}function At(re){if(re.parent==null)return null;for(var pe=re.parent,De=dt(pe.lines,re),Oe=pe.parent;Oe;pe=Oe,Oe=Oe.parent)for(var ze=0;Oe.children[ze]!=pe;++ze)De+=Oe.children[ze].chunkSize();return De+pe.first}function an(re,pe){var De=re.first;e:do{for(var Oe=0;Oe<re.children.length;++Oe){var ze=re.children[Oe],at=ze.height;if(pe<at){re=ze;continue e}pe-=at,De+=ze.chunkSize()}return De}while(!re.lines);for(var bt=0;bt<re.lines.length;++bt){var Dt=re.lines[bt],Ot=Dt.height;if(pe<Ot)break;pe-=Ot}return De+bt}function En(re,pe){return pe>=re.first&&pe<re.first+re.size}function Dn(re,pe){return String(re.lineNumberFormatter(pe+re.firstLineNumber))}function qt(re,pe,De){if(De===void 0&&(De=null),!(this instanceof qt))return new qt(re,pe,De);this.line=re,this.ch=pe,this.sticky=De}function on(re,pe){return re.line-pe.line||re.ch-pe.ch}function Nn(re,pe){return re.sticky==pe.sticky&&on(re,pe)==0}function On(re){return qt(re.line,re.ch)}function qn(re,pe){return on(re,pe)<0?pe:re}function Hn(re,pe){return on(re,pe)<0?re:pe}function ei(re,pe){return Math.max(re.first,Math.min(pe,re.first+re.size-1))}function Fn(re,pe){if(pe.line<re.first)return qt(re.first,0);var De=re.first+re.size-1;return pe.line>De?qt(De,cn(re,De).text.length):hi(pe,cn(re,pe.line).text.length)}function hi(re,pe){var De=re.ch;return De==null||De>pe?qt(re.line,pe):De<0?qt(re.line,0):re}function Ii(re,pe){for(var De=[],Oe=0;Oe<pe.length;Oe++)De[Oe]=Fn(re,pe[Oe]);return De}var Ri=function(re,pe){this.state=re,this.lookAhead=pe},Pn=function(re,pe,De,Oe){this.state=pe,this.doc=re,this.line=De,this.maxLookAhead=Oe||0,this.baseTokens=null,this.baseTokenPos=1};Pn.prototype.lookAhead=function(re){var pe=this.doc.getLine(this.line+re);return pe!=null&&re>this.maxLookAhead&&(this.maxLookAhead=re),pe},Pn.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}},Pn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Pn.fromSaved=function(re,pe,De){return pe instanceof Ri?new Pn(re,wt(re.mode,pe.state),De,pe.lookAhead):new Pn(re,wt(re.mode,pe),De)},Pn.prototype.save=function(re){var pe=re!==!1?wt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ri(pe,this.maxLookAhead):pe};function Vi(re,pe,De,Oe){var ze=[re.state.modeGen],at={};Qi(re,pe.text,re.doc.mode,De,function(Vt,Ln){return ze.push(Vt,Ln)},at,Oe);for(var bt=De.state,Dt=function(Vt){De.baseTokens=ze;var Ln=re.state.overlays[Vt],Qt=1,Un=0;De.state=!0,Qi(re,pe.text,Ln.mode,De,function(jn,mi){for(var _i=Qt;Un<jn;){var Bi=ze[Qt];Bi>jn&&ze.splice(Qt,1,jn,ze[Qt+1],Bi),Qt+=2,Un=Math.min(jn,Bi)}if(mi)if(Ln.opaque)ze.splice(_i,Qt-_i,jn,"overlay "+mi),Qt=_i+2;else for(;_i<Qt;_i+=2){var tr=ze[_i+1];ze[_i+1]=(tr?tr+" ":"")+"overlay "+mi}},at),De.state=bt,De.baseTokens=null,De.baseTokenPos=1},Ot=0;Ot<re.state.overlays.length;++Ot)Dt(Ot);return{styles:ze,classes:at.bgClass||at.textClass?at:null}}function Cr(re,pe,De){if(!pe.styles||pe.styles[0]!=re.state.modeGen){var Oe=mr(re,At(pe)),ze=pe.text.length>re.options.maxHighlightLength&&wt(re.doc.mode,Oe.state),at=Vi(re,pe,Oe);ze&&(Oe.state=ze),pe.stateAfter=Oe.save(!ze),pe.styles=at.styles,at.classes?pe.styleClasses=at.classes:pe.styleClasses&&(pe.styleClasses=null),De===re.doc.highlightFrontier&&(re.doc.modeFrontier=Math.max(re.doc.modeFrontier,++re.doc.highlightFrontier))}return pe.styles}function mr(re,pe,De){var Oe=re.doc,ze=re.display;if(!Oe.mode.startState)return new Pn(Oe,!0,pe);var at=Fi(re,pe,De),bt=at>Oe.first&&cn(Oe,at-1).stateAfter,Dt=bt?Pn.fromSaved(Oe,bt,at):new Pn(Oe,kt(Oe.mode),at);return Oe.iter(at,pe,function(Ot){_n(re,Ot.text,Dt);var Vt=Dt.line;Ot.stateAfter=Vt==pe-1||Vt%5==0||Vt>=ze.viewFrom&&Vt<ze.viewTo?Dt.save():null,Dt.nextLine()}),De&&(Oe.modeFrontier=Dt.line),Dt}function _n(re,pe,De,Oe){var ze=re.doc.mode,at=new Et(pe,re.options.tabSize,De);for(at.start=at.pos=Oe||0,pe==""&&Jn(ze,De.state);!at.eol();)ui(ze,at,De.state),at.start=at.pos}function Jn(re,pe){if(re.blankLine)return re.blankLine(pe);if(re.innerMode){var De=Nt(re,pe);if(De.mode.blankLine)return De.mode.blankLine(De.state)}}function ui(re,pe,De,Oe){for(var ze=0;ze<10;ze++){Oe&&(Oe[0]=Nt(re,De).mode);var at=re.token(pe,De);if(pe.pos>pe.start)return at}throw new Error("Mode "+re.name+" failed to advance stream.")}var yi=function(re,pe,De){this.start=re.start,this.end=re.pos,this.string=re.current(),this.type=pe||null,this.state=De};function di(re,pe,De,Oe){var ze=re.doc,at=ze.mode,bt;pe=Fn(ze,pe);var Dt=cn(ze,pe.line),Ot=mr(re,pe.line,De),Vt=new Et(Dt.text,re.options.tabSize,Ot),Ln;for(Oe&&(Ln=[]);(Oe||Vt.pos<pe.ch)&&!Vt.eol();)Vt.start=Vt.pos,bt=ui(at,Vt,Ot.state),Oe&&Ln.push(new yi(Vt,bt,wt(ze.mode,Ot.state)));return Oe?Ln:new yi(Vt,bt,Ot.state)}function Ei(re,pe){if(re)for(;;){var De=re.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!De)break;re=re.slice(0,De.index)+re.slice(De.index+De[0].length);var Oe=De[1]?"bgClass":"textClass";pe[Oe]==null?pe[Oe]=De[2]:new RegExp("(?:^|\\s)"+De[2]+"(?:$|\\s)").test(pe[Oe])||(pe[Oe]+=" "+De[2])}return re}function Qi(re,pe,De,Oe,ze,at,bt){var Dt=De.flattenSpans;Dt==null&&(Dt=re.options.flattenSpans);var Ot=0,Vt=null,Ln=new Et(pe,re.options.tabSize,Oe),Qt,Un=re.options.addModeClass&&[null];for(pe==""&&Ei(Jn(De,Oe.state),at);!Ln.eol();){if(Ln.pos>re.options.maxHighlightLength?(Dt=!1,bt&&_n(re,pe,Oe,Ln.pos),Ln.pos=pe.length,Qt=null):Qt=Ei(ui(De,Ln,Oe.state,Un),at),Un){var jn=Un[0].name;jn&&(Qt="m-"+(Qt?jn+" "+Qt:jn))}if(!Dt||Vt!=Qt){for(;Ot<Ln.start;)Ot=Math.min(Ln.start,Ot+5e3),ze(Ot,Vt);Vt=Qt}Ln.start=Ln.pos}for(;Ot<Ln.pos;){var mi=Math.min(Ln.pos,Ot+5e3);ze(mi,Vt),Ot=mi}}function Fi(re,pe,De){for(var Oe,ze,at=re.doc,bt=De?-1:pe-(re.doc.mode.innerMode?1e3:100),Dt=pe;Dt>bt;--Dt){if(Dt<=at.first)return at.first;var Ot=cn(at,Dt-1),Vt=Ot.stateAfter;if(Vt&&(!De||Dt+(Vt instanceof Ri?Vt.lookAhead:0)<=at.modeFrontier))return Dt;var Ln=ht(Ot.text,null,re.options.tabSize);(ze==null||Oe>Ln)&&(ze=Dt-1,Oe=Ln)}return ze}function zi(re,pe){if(re.modeFrontier=Math.min(re.modeFrontier,pe),!(re.highlightFrontier<pe-10)){for(var De=re.first,Oe=pe-1;Oe>De;Oe--){var ze=cn(re,Oe).stateAfter;if(ze&&(!(ze instanceof Ri)||Oe+ze.lookAhead<pe)){De=Oe+1;break}}re.highlightFrontier=Math.min(re.highlightFrontier,De)}}var fr=!1,Bn=!1;function Br(){fr=!0}function In(){Bn=!0}function pr(re,pe,De){this.marker=re,this.from=pe,this.to=De}function yo(re,pe){if(re)for(var De=0;De<re.length;++De){var Oe=re[De];if(Oe.marker==pe)return Oe}}function Or(re,pe){for(var De,Oe=0;Oe<re.length;++Oe)re[Oe]!=pe&&(De||(De=[])).push(re[Oe]);return De}function bo(re,pe){re.markedSpans=re.markedSpans?re.markedSpans.concat([pe]):[pe],pe.marker.attachLine(re)}function co(re,pe,De){var Oe;if(re)for(var ze=0;ze<re.length;++ze){var at=re[ze],bt=at.marker,Dt=at.from==null||(bt.inclusiveLeft?at.from<=pe:at.from<pe);if(Dt||at.from==pe&&bt.type=="bookmark"&&(!De||!at.marker.insertLeft)){var Ot=at.to==null||(bt.inclusiveRight?at.to>=pe:at.to>pe);(Oe||(Oe=[])).push(new pr(bt,at.from,Ot?null:at.to))}}return Oe}function Ki(re,pe,De){var Oe;if(re)for(var ze=0;ze<re.length;++ze){var at=re[ze],bt=at.marker,Dt=at.to==null||(bt.inclusiveRight?at.to>=pe:at.to>pe);if(Dt||at.from==pe&&bt.type=="bookmark"&&(!De||at.marker.insertLeft)){var Ot=at.from==null||(bt.inclusiveLeft?at.from<=pe:at.from<pe);(Oe||(Oe=[])).push(new pr(bt,Ot?null:at.from-pe,at.to==null?null:at.to-pe))}}return Oe}function Hi(re,pe){if(pe.full)return null;var De=En(re,pe.from.line)&&cn(re,pe.from.line).markedSpans,Oe=En(re,pe.to.line)&&cn(re,pe.to.line).markedSpans;if(!De&&!Oe)return null;var ze=pe.from.ch,at=pe.to.ch,bt=on(pe.from,pe.to)==0,Dt=co(De,ze,bt),Ot=Ki(Oe,at,bt),Vt=pe.text.length==1,Ln=Ut(pe.text).length+(Vt?ze:0);if(Dt)for(var Qt=0;Qt<Dt.length;++Qt){var Un=Dt[Qt];if(Un.to==null){var jn=yo(Ot,Un.marker);jn?Vt&&(Un.to=jn.to==null?null:jn.to+Ln):Un.to=ze}}if(Ot)for(var mi=0;mi<Ot.length;++mi){var _i=Ot[mi];if(_i.to!=null&&(_i.to+=Ln),_i.from==null){var Bi=yo(Dt,_i.marker);Bi||(_i.from=Ln,Vt&&(Dt||(Dt=[])).push(_i))}else _i.from+=Ln,Vt&&(Dt||(Dt=[])).push(_i)}Dt&&(Dt=lr(Dt)),Ot&&Ot!=Dt&&(Ot=lr(Ot));var tr=[Dt];if(!Vt){var Dr=pe.text.length-2,Sr;if(Dr>0&&Dt)for(var Zr=0;Zr<Dt.length;++Zr)Dt[Zr].to==null&&(Sr||(Sr=[])).push(new pr(Dt[Zr].marker,null,null));for(var wo=0;wo<Dr;++wo)tr.push(Sr);tr.push(Ot)}return tr}function lr(re){for(var pe=0;pe<re.length;++pe){var De=re[pe];De.from!=null&&De.from==De.to&&De.marker.clearWhenEmpty!==!1&&re.splice(pe--,1)}return re.length?re:null}function Pr(re,pe,De){var Oe=null;if(re.iter(pe.line,De.line+1,function(jn){if(jn.markedSpans)for(var mi=0;mi<jn.markedSpans.length;++mi){var _i=jn.markedSpans[mi].marker;_i.readOnly&&(!Oe||dt(Oe,_i)==-1)&&(Oe||(Oe=[])).push(_i)}}),!Oe)return null;for(var ze=[{from:pe,to:De}],at=0;at<Oe.length;++at)for(var bt=Oe[at],Dt=bt.find(0),Ot=0;Ot<ze.length;++Ot){var Vt=ze[Ot];if(!(on(Vt.to,Dt.from)<0||on(Vt.from,Dt.to)>0)){var Ln=[Ot,1],Qt=on(Vt.from,Dt.from),Un=on(Vt.to,Dt.to);(Qt<0||!bt.inclusiveLeft&&!Qt)&&Ln.push({from:Vt.from,to:Dt.from}),(Un>0||!bt.inclusiveRight&&!Un)&&Ln.push({from:Dt.to,to:Vt.to}),ze.splice.apply(ze,Ln),Ot+=Ln.length-3}}return ze}function ci(re){var pe=re.markedSpans;if(pe){for(var De=0;De<pe.length;++De)pe[De].marker.detachLine(re);re.markedSpans=null}}function Tt(re,pe){if(pe){for(var De=0;De<pe.length;++De)pe[De].marker.attachLine(re);re.markedSpans=pe}}function Ur(re){return re.inclusiveLeft?-1:0}function zr(re){return re.inclusiveRight?1:0}function ts(re,pe){var De=re.lines.length-pe.lines.length;if(De!=0)return De;var Oe=re.find(),ze=pe.find(),at=on(Oe.from,ze.from)||Ur(re)-Ur(pe);if(at)return-at;var bt=on(Oe.to,ze.to)||zr(re)-zr(pe);return bt||pe.id-re.id}function ko(re,pe){var De=Bn&&re.markedSpans,Oe;if(De)for(var ze=void 0,at=0;at<De.length;++at)ze=De[at],ze.marker.collapsed&&(pe?ze.from:ze.to)==null&&(!Oe||ts(Oe,ze.marker)<0)&&(Oe=ze.marker);return Oe}function ss(re){return ko(re,!0)}function _r(re){return ko(re,!1)}function ur(re,pe){var De=Bn&&re.markedSpans,Oe;if(De)for(var ze=0;ze<De.length;++ze){var at=De[ze];at.marker.collapsed&&(at.from==null||at.from<pe)&&(at.to==null||at.to>pe)&&(!Oe||ts(Oe,at.marker)<0)&&(Oe=at.marker)}return Oe}function Kr(re,pe,De,Oe,ze){var at=cn(re,pe),bt=Bn&&at.markedSpans;if(bt)for(var Dt=0;Dt<bt.length;++Dt){var Ot=bt[Dt];if(Ot.marker.collapsed){var Vt=Ot.marker.find(0),Ln=on(Vt.from,De)||Ur(Ot.marker)-Ur(ze),Qt=on(Vt.to,Oe)||zr(Ot.marker)-zr(ze);if(!(Ln>=0&&Qt<=0||Ln<=0&&Qt>=0)&&(Ln<=0&&(Ot.marker.inclusiveRight&&ze.inclusiveLeft?on(Vt.to,De)>=0:on(Vt.to,De)>0)||Ln>=0&&(Ot.marker.inclusiveRight&&ze.inclusiveLeft?on(Vt.from,Oe)<=0:on(Vt.from,Oe)<0)))return!0}}}function cr(re){for(var pe;pe=ss(re);)re=pe.find(-1,!0).line;return re}function qr(re){for(var pe;pe=_r(re);)re=pe.find(1,!0).line;return re}function Yo(re){for(var pe,De;pe=_r(re);)re=pe.find(1,!0).line,(De||(De=[])).push(re);return De}function nr(re,pe){var De=cn(re,pe),Oe=cr(De);return De==Oe?pe:At(Oe)}function Wi(re,pe){if(pe>re.lastLine())return pe;var De=cn(re,pe),Oe;if(!Qn(re,De))return pe;for(;Oe=_r(De);)De=Oe.find(1,!0).line;return At(De)+1}function Qn(re,pe){var De=Bn&&pe.markedSpans;if(De){for(var Oe=void 0,ze=0;ze<De.length;++ze)if(Oe=De[ze],!!Oe.marker.collapsed){if(Oe.from==null)return!0;if(!Oe.marker.widgetNode&&Oe.from==0&&Oe.marker.inclusiveLeft&&ir(re,pe,Oe))return!0}}}function ir(re,pe,De){if(De.to==null){var Oe=De.marker.find(1,!0);return ir(re,Oe.line,yo(Oe.line.markedSpans,De.marker))}if(De.marker.inclusiveRight&&De.to==pe.text.length)return!0;for(var ze=void 0,at=0;at<pe.markedSpans.length;++at)if(ze=pe.markedSpans[at],ze.marker.collapsed&&!ze.marker.widgetNode&&ze.from==De.to&&(ze.to==null||ze.to!=De.from)&&(ze.marker.inclusiveLeft||De.marker.inclusiveRight)&&ir(re,pe,ze))return!0}function eo(re){re=cr(re);for(var pe=0,De=re.parent,Oe=0;Oe<De.lines.length;++Oe){var ze=De.lines[Oe];if(ze==re)break;pe+=ze.height}for(var at=De.parent;at;De=at,at=De.parent)for(var bt=0;bt<at.children.length;++bt){var Dt=at.children[bt];if(Dt==De)break;pe+=Dt.height}return pe}function Ro(re){if(re.height==0)return 0;for(var pe=re.text.length,De,Oe=re;De=ss(Oe);){var ze=De.find(0,!0);Oe=ze.from.line,pe+=ze.from.ch-ze.to.ch}for(Oe=re;De=_r(Oe);){var at=De.find(0,!0);pe-=Oe.text.length-at.from.ch,Oe=at.to.line,pe+=Oe.text.length-at.to.ch}return pe}function Bo(re){var pe=re.display,De=re.doc;pe.maxLine=cn(De,De.first),pe.maxLineLength=Ro(pe.maxLine),pe.maxLineChanged=!0,De.iter(function(Oe){var ze=Ro(Oe);ze>pe.maxLineLength&&(pe.maxLineLength=ze,pe.maxLine=Oe)})}var Xo=function(re,pe,De){this.text=re,Tt(this,pe),this.height=De?De(this):1};Xo.prototype.lineNo=function(){return At(this)},oi(Xo);function as(re,pe,De,Oe){re.text=pe,re.stateAfter&&(re.stateAfter=null),re.styles&&(re.styles=null),re.order!=null&&(re.order=null),ci(re),Tt(re,De);var ze=Oe?Oe(re):1;ze!=re.height&&rn(re,ze)}function Ho(re){re.parent=null,ci(re)}var ia={},_s={};function la(re,pe){if(!re||/^\s*$/.test(re))return null;var De=pe.addModeClass?_s:ia;return De[re]||(De[re]=re.replace(/\S+/g,"cm-$&"))}function Tn(re,pe){var De=Qe("span",null,null,he?"padding-right: .1px":null),Oe={pre:Qe("pre",[De],"CodeMirror-line"),content:De,col:0,pos:0,cm:re,trailingSpace:!1,splitSpaces:re.getOption("lineWrapping")};pe.measure={};for(var ze=0;ze<=(pe.rest?pe.rest.length:0);ze++){var at=ze?pe.rest[ze-1]:pe.line,bt=void 0;Oe.pos=0,Oe.addToken=Pu,wr(re.display.measure)&&(bt=tn(at,re.doc.direction))&&(Oe.addToken=Sa(Oe.addToken,bt)),Oe.map=[];var Dt=pe!=re.display.externalMeasured&&At(at);Ws(at,Oe,Cr(re,at,Dt)),at.styleClasses&&(at.styleClasses.bgClass&&(Oe.bgClass=it(at.styleClasses.bgClass,Oe.bgClass||"")),at.styleClasses.textClass&&(Oe.textClass=it(at.styleClasses.textClass,Oe.textClass||""))),Oe.map.length==0&&Oe.map.push(0,0,Oe.content.appendChild(Ir(re.display.measure))),ze==0?(pe.measure.map=Oe.map,pe.measure.cache={}):((pe.measure.maps||(pe.measure.maps=[])).push(Oe.map),(pe.measure.caches||(pe.measure.caches=[])).push({}))}if(he){var Ot=Oe.content.lastChild;(/\bcm-tab\b/.test(Ot.className)||Ot.querySelector&&Ot.querySelector(".cm-tab"))&&(Oe.content.className="cm-tab-wrap-hack")}return yn(re,"renderLine",re,pe.line,Oe.pre),Oe.pre.className&&(Oe.textClass=it(Oe.pre.className,Oe.textClass||"")),Oe}function Is(re){var pe=Ve("span","\u2022","cm-invalidchar");return pe.title="\\u"+re.charCodeAt(0).toString(16),pe.setAttribute("aria-label",pe.title),pe}function Pu(re,pe,De,Oe,ze,at,bt){if(pe){var Dt=re.splitSpaces?Ua(pe,re.trailingSpace):pe,Ot=re.cm.state.specialChars,Vt=!1,Ln;if(!Ot.test(pe))re.col+=pe.length,Ln=document.createTextNode(Dt),re.map.push(re.pos,re.pos+pe.length,Ln),be&&Pe<9&&(Vt=!0),re.pos+=pe.length;else{Ln=document.createDocumentFragment();for(var Qt=0;;){Ot.lastIndex=Qt;var Un=Ot.exec(pe),jn=Un?Un.index-Qt:pe.length-Qt;if(jn){var mi=document.createTextNode(Dt.slice(Qt,Qt+jn));be&&Pe<9?Ln.appendChild(Ve("span",[mi])):Ln.appendChild(mi),re.map.push(re.pos,re.pos+jn,mi),re.col+=jn,re.pos+=jn}if(!Un)break;Qt+=jn+1;var _i=void 0;if(Un[0]==" "){var Bi=re.cm.options.tabSize,tr=Bi-re.col%Bi;_i=Ln.appendChild(Ve("span",xn(tr),"cm-tab")),_i.setAttribute("role","presentation"),_i.setAttribute("cm-text"," "),re.col+=tr}else Un[0]=="\r"||Un[0]==`
|
|
|
`?(_i=Ln.appendChild(Ve("span",Un[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),_i.setAttribute("cm-text",Un[0]),re.col+=1):(_i=re.cm.options.specialCharPlaceholder(Un[0]),_i.setAttribute("cm-text",Un[0]),be&&Pe<9?Ln.appendChild(Ve("span",[_i])):Ln.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,De||Oe||ze||Vt||at||bt){var Dr=De||"";Oe&&(Dr+=Oe),ze&&(Dr+=ze);var Sr=Ve("span",[Ln],Dr,at);if(bt)for(var Zr in bt)bt.hasOwnProperty(Zr)&&Zr!="style"&&Zr!="class"&&Sr.setAttribute(Zr,bt[Zr]);return re.content.appendChild(Sr)}re.content.appendChild(Ln)}}function Ua(re,pe){if(re.length>1&&!/ /.test(re))return re;for(var De=pe,Oe="",ze=0;ze<re.length;ze++){var at=re.charAt(ze);at==" "&&De&&(ze==re.length-1||re.charCodeAt(ze+1)==32)&&(at="\xA0"),Oe+=at,De=at==" "}return Oe}function Sa(re,pe){return function(De,Oe,ze,at,bt,Dt,Ot){ze=ze?ze+" cm-force-border":"cm-force-border";for(var Vt=De.pos,Ln=Vt+Oe.length;;){for(var Qt=void 0,Un=0;Un<pe.length&&(Qt=pe[Un],!(Qt.to>Vt&&Qt.from<=Vt));Un++);if(Qt.to>=Ln)return re(De,Oe,ze,at,bt,Dt,Ot);re(De,Oe.slice(0,Qt.to-Vt),ze,at,null,Dt,Ot),at=null,Oe=Oe.slice(Qt.to-Vt),Vt=Qt.to}}}function us(re,pe,De,Oe){var ze=!Oe&&De.widgetNode;ze&&re.map.push(re.pos,re.pos+pe,ze),!Oe&&re.cm.display.input.needsContentAttribute&&(ze||(ze=re.content.appendChild(document.createElement("span"))),ze.setAttribute("cm-marker",De.id)),ze&&(re.cm.display.input.setUneditable(ze),re.content.appendChild(ze)),re.pos+=pe,re.trailingSpace=!1}function Ws(re,pe,De){var Oe=re.markedSpans,ze=re.text,at=0;if(!Oe){for(var bt=1;bt<De.length;bt+=2)pe.addToken(pe,ze.slice(at,at=De[bt]),la(De[bt+1],pe.cm.options));return}for(var Dt=ze.length,Ot=0,Vt=1,Ln="",Qt,Un,jn=0,mi,_i,Bi,tr,Dr;;){if(jn==Ot){mi=_i=Bi=Un="",Dr=null,tr=null,jn=1/0;for(var Sr=[],Zr=void 0,wo=0;wo<Oe.length;++wo){var yr=Oe[wo],zo=yr.marker;if(zo.type=="bookmark"&&yr.from==Ot&&zo.widgetNode)Sr.push(zo);else if(yr.from<=Ot&&(yr.to==null||yr.to>Ot||zo.collapsed&&yr.to==Ot&&yr.from==Ot)){if(yr.to!=null&&yr.to!=Ot&&jn>yr.to&&(jn=yr.to,_i=""),zo.className&&(mi+=" "+zo.className),zo.css&&(Un=(Un?Un+";":"")+zo.css),zo.startStyle&&yr.from==Ot&&(Bi+=" "+zo.startStyle),zo.endStyle&&yr.to==jn&&(Zr||(Zr=[])).push(zo.endStyle,yr.to),zo.title&&((Dr||(Dr={})).title=zo.title),zo.attributes)for(var ca in zo.attributes)(Dr||(Dr={}))[ca]=zo.attributes[ca];zo.collapsed&&(!tr||ts(tr.marker,zo)<0)&&(tr=yr)}else yr.from>Ot&&jn>yr.from&&(jn=yr.from)}if(Zr)for(var Ya=0;Ya<Zr.length;Ya+=2)Zr[Ya+1]==jn&&(_i+=" "+Zr[Ya]);if(!tr||tr.from==Ot)for(var va=0;va<Sr.length;++va)us(pe,0,Sr[va]);if(tr&&(tr.from||0)==Ot){if(us(pe,(tr.to==null?Dt+1:tr.to)-Ot,tr.marker,tr.from==null),tr.to==null)return;tr.to==Ot&&(tr=!1)}}if(Ot>=Dt)break;for(var nu=Math.min(Dt,jn);;){if(Ln){var Ml=Ot+Ln.length;if(!tr){var ja=Ml>nu?Ln.slice(0,nu-Ot):Ln;pe.addToken(pe,ja,Qt?Qt+mi:mi,Bi,Ot+ja.length==jn?_i:"",Un,Dr)}if(Ml>=nu){Ln=Ln.slice(nu-Ot),Ot=nu;break}Ot=Ml,Bi=""}Ln=ze.slice(at,at=De[Vt++]),Qt=la(De[Vt++],pe.cm.options)}}}function Po(re,pe,De){this.line=pe,this.rest=Yo(pe),this.size=this.rest?At(Ut(this.rest))-De+1:1,this.node=this.text=null,this.hidden=Qn(re,pe)}function Ao(re,pe,De){for(var Oe=[],ze,at=pe;at<De;at=ze){var bt=new Po(re.doc,cn(re.doc,at),at);ze=at+bt.size,Oe.push(bt)}return Oe}var Eo=null;function ua(re){Eo?Eo.ops.push(re):re.ownsGroup=Eo={ops:[re],delayedCallbacks:[]}}function xr(re){var pe=re.delayedCallbacks,De=0;do{for(;De<pe.length;De++)pe[De].call(null);for(var Oe=0;Oe<re.ops.length;Oe++){var ze=re.ops[Oe];if(ze.cursorActivityHandlers)for(;ze.cursorActivityCalled<ze.cursorActivityHandlers.length;)ze.cursorActivityHandlers[ze.cursorActivityCalled++].call(null,ze.cm)}}while(De<pe.length)}function lo(re,pe){var De=re.ownsGroup;if(De)try{xr(De)}finally{Eo=null,pe(De)}}var $r=null;function Mi(re,pe){var De=gn(re,pe);if(De.length){var Oe=Array.prototype.slice.call(arguments,2),ze;Eo?ze=Eo.delayedCallbacks:$r?ze=$r:(ze=$r=[],setTimeout(Es,0));for(var at=function(Dt){ze.push(function(){return De[Dt].apply(null,Oe)})},bt=0;bt<De.length;++bt)at(bt)}}function Es(){var re=$r;$r=null;for(var pe=0;pe<re.length;++pe)re[pe]()}function Ls(re,pe,De,Oe){for(var ze=0;ze<pe.changes.length;ze++){var at=pe.changes[ze];at=="text"?vi(re,pe):at=="gutter"?Xs(re,pe,De,Oe):at=="class"?ms(re,pe):at=="widget"&&qa(re,pe,Oe)}pe.changes=null}function xa(re){return re.node==re.text&&(re.node=Ve("div",null,null,"position: relative"),re.text.parentNode&&re.text.parentNode.replaceChild(re.node,re.text),re.node.appendChild(re.text),be&&Pe<8&&(re.node.style.zIndex=2)),re.node}function xl(re,pe){var De=pe.bgClass?pe.bgClass+" "+(pe.line.bgClass||""):pe.line.bgClass;if(De&&(De+=" CodeMirror-linebackground"),pe.background)De?pe.background.className=De:(pe.background.parentNode.removeChild(pe.background),pe.background=null);else if(De){var Oe=xa(pe);pe.background=Oe.insertBefore(Ve("div",null,De),Oe.firstChild),re.display.input.setUneditable(pe.background)}}function Il(re,pe){var De=re.display.externalMeasured;return De&&De.line==pe.line?(re.display.externalMeasured=null,pe.measure=De.measure,De.built):Tn(re,pe)}function vi(re,pe){var De=pe.text.className,Oe=Il(re,pe);pe.text==pe.node&&(pe.node=Oe.pre),pe.text.parentNode.replaceChild(Oe.pre,pe.text),pe.text=Oe.pre,Oe.bgClass!=pe.bgClass||Oe.textClass!=pe.textClass?(pe.bgClass=Oe.bgClass,pe.textClass=Oe.textClass,ms(re,pe)):De&&(pe.text.className=De)}function ms(re,pe){xl(re,pe),pe.line.wrapClass?xa(pe).className=pe.line.wrapClass:pe.node!=pe.text&&(pe.node.className="");var De=pe.textClass?pe.textClass+" "+(pe.line.textClass||""):pe.line.textClass;pe.text.className=De||""}function Xs(re,pe,De,Oe){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 ze=xa(pe);pe.gutterBackground=Ve("div",null,"CodeMirror-gutter-background "+pe.line.gutterClass,"left: "+(re.options.fixedGutter?Oe.fixedPos:-Oe.gutterTotalWidth)+"px; width: "+Oe.gutterTotalWidth+"px"),re.display.input.setUneditable(pe.gutterBackground),ze.insertBefore(pe.gutterBackground,pe.text)}var at=pe.line.gutterMarkers;if(re.options.lineNumbers||at){var bt=xa(pe),Dt=pe.gutter=Ve("div",null,"CodeMirror-gutter-wrapper","left: "+(re.options.fixedGutter?Oe.fixedPos:-Oe.gutterTotalWidth)+"px");if(re.display.input.setUneditable(Dt),bt.insertBefore(Dt,pe.text),pe.line.gutterClass&&(Dt.className+=" "+pe.line.gutterClass),re.options.lineNumbers&&(!at||!at["CodeMirror-linenumbers"])&&(pe.lineNumber=Dt.appendChild(Ve("div",Dn(re.options,De),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+Oe.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+re.display.lineNumInnerWidth+"px"))),at)for(var Ot=0;Ot<re.display.gutterSpecs.length;++Ot){var Vt=re.display.gutterSpecs[Ot].className,Ln=at.hasOwnProperty(Vt)&&at[Vt];Ln&&Dt.appendChild(Ve("div",[Ln],"CodeMirror-gutter-elt","left: "+Oe.gutterLeft[Vt]+"px; width: "+Oe.gutterWidth[Vt]+"px"))}}}function qa(re,pe,De){pe.alignable&&(pe.alignable=null);for(var Oe=Ce("CodeMirror-linewidget"),ze=pe.node.firstChild,at=void 0;ze;ze=at)at=ze.nextSibling,Oe.test(ze.className)&&pe.node.removeChild(ze);Dl(re,pe,De)}function wl(re,pe,De,Oe){var ze=Il(re,pe);return pe.text=pe.node=ze.pre,ze.bgClass&&(pe.bgClass=ze.bgClass),ze.textClass&&(pe.textClass=ze.textClass),ms(re,pe),Xs(re,pe,De,Oe),Dl(re,pe,Oe),pe.node}function Dl(re,pe,De){if(Fr(re,pe.line,pe,De,!0),pe.rest)for(var Oe=0;Oe<pe.rest.length;Oe++)Fr(re,pe.rest[Oe],pe,De,!1)}function Fr(re,pe,De,Oe,ze){if(pe.widgets)for(var at=xa(De),bt=0,Dt=pe.widgets;bt<Dt.length;++bt){var Ot=Dt[bt],Vt=Ve("div",[Ot.node],"CodeMirror-linewidget"+(Ot.className?" "+Ot.className:""));Ot.handleMouseEvents||Vt.setAttribute("cm-ignore-events","true"),nc(Ot,Vt,De,Oe),re.display.input.setUneditable(Vt),ze&&Ot.above?at.insertBefore(Vt,De.gutter||De.text):at.appendChild(Vt),Mi(Ot,"redraw")}}function nc(re,pe,De,Oe){if(re.noHScroll){(De.alignable||(De.alignable=[])).push(pe);var ze=Oe.wrapperWidth;pe.style.left=Oe.fixedPos+"px",re.coverGutter||(ze-=Oe.gutterTotalWidth,pe.style.paddingLeft=Oe.gutterTotalWidth+"px"),pe.style.width=ze+"px"}re.coverGutter&&(pe.style.zIndex=5,pe.style.position="relative",re.noHScroll||(pe.style.marginLeft=-Oe.gutterTotalWidth+"px"))}function Ia(re){if(re.height!=null)return re.height;var pe=re.doc.cm;if(!pe)return 0;if(!mt(document.body,re.node)){var De="position: relative;";re.coverGutter&&(De+="margin-left: -"+pe.display.gutters.offsetWidth+"px;"),re.noHScroll&&(De+="width: "+pe.display.wrapper.clientWidth+"px;"),je(pe.display.measure,Ve("div",[re.node],null,De))}return re.height=re.node.parentNode.offsetHeight}function Ga(re,pe){for(var De=or(pe);De!=re.wrapper;De=De.parentNode)if(!De||De.nodeType==1&&De.getAttribute("cm-ignore-events")=="true"||De.parentNode==re.sizer&&De!=re.mover)return!0}function Na(re){return re.lineSpace.offsetTop}function $l(re){return re.mover.offsetHeight-re.lineSpace.offsetHeight}function _u(re){if(re.cachedPaddingH)return re.cachedPaddingH;var pe=je(re.measure,Ve("pre","x","CodeMirror-line-like")),De=window.getComputedStyle?window.getComputedStyle(pe):pe.currentStyle,Oe={left:parseInt(De.paddingLeft),right:parseInt(De.paddingRight)};return!isNaN(Oe.left)&&!isNaN(Oe.right)&&(re.cachedPaddingH=Oe),Oe}function Wa(re){return yt-re.display.nativeBarWidth}function Za(re){return re.display.scroller.clientWidth-Wa(re)-re.display.barWidth}function Uu(re){return re.display.scroller.clientHeight-Wa(re)-re.display.barHeight}function yc(re,pe,De){var Oe=re.options.lineWrapping,ze=Oe&&Za(re);if(!pe.measure.heights||Oe&&pe.measure.width!=ze){var at=pe.measure.heights=[];if(Oe){pe.measure.width=ze;for(var bt=pe.text.firstChild.getClientRects(),Dt=0;Dt<bt.length-1;Dt++){var Ot=bt[Dt],Vt=bt[Dt+1];Math.abs(Ot.bottom-Vt.bottom)>2&&at.push((Ot.bottom+Vt.top)/2-De.top)}}at.push(De.bottom-De.top)}}function Eu(re,pe,De){if(re.line==pe)return{map:re.measure.map,cache:re.measure.cache};for(var Oe=0;Oe<re.rest.length;Oe++)if(re.rest[Oe]==pe)return{map:re.measure.maps[Oe],cache:re.measure.caches[Oe]};for(var ze=0;ze<re.rest.length;ze++)if(At(re.rest[ze])>De)return{map:re.measure.maps[ze],cache:re.measure.caches[ze],before:!0}}function Rl(re,pe){pe=cr(pe);var De=At(pe),Oe=re.display.externalMeasured=new Po(re.doc,pe,De);Oe.lineN=De;var ze=Oe.built=Tn(re,Oe);return Oe.text=ze.pre,je(re.display.lineMeasure,ze.pre),Oe}function Sc(re,pe,De,Oe){return bl(re,Lu(re,pe),De,Oe)}function Gu(re,pe){if(pe>=re.display.viewFrom&&pe<re.display.viewTo)return re.display.view[$s(re,pe)];var De=re.display.externalMeasured;if(De&&pe>=De.lineN&&pe<De.lineN+De.size)return De}function Lu(re,pe){var De=At(pe),Oe=Gu(re,De);Oe&&!Oe.text?Oe=null:Oe&&Oe.changes&&(Ls(re,Oe,De,bh(re)),re.curOp.forceUpdate=!0),Oe||(Oe=Rl(re,pe));var ze=Eu(Oe,pe,De);return{line:pe,view:Oe,rect:null,map:ze.map,cache:ze.cache,before:ze.before,hasHeights:!1}}function bl(re,pe,De,Oe,ze){pe.before&&(De=-1);var at=De+(Oe||""),bt;return pe.cache.hasOwnProperty(at)?bt=pe.cache[at]:(pe.rect||(pe.rect=pe.view.text.getBoundingClientRect()),pe.hasHeights||(yc(re,pe.view,pe.rect),pe.hasHeights=!0),bt=oo(re,pe,De,Oe),bt.bogus||(pe.cache[at]=bt)),{left:bt.left,right:bt.right,top:ze?bt.rtop:bt.top,bottom:ze?bt.rbottom:bt.bottom}}var th={left:0,right:0,top:0,bottom:0};function xc(re,pe,De){for(var Oe,ze,at,bt,Dt,Ot,Vt=0;Vt<re.length;Vt+=3)if(Dt=re[Vt],Ot=re[Vt+1],pe<Dt?(ze=0,at=1,bt="left"):pe<Ot?(ze=pe-Dt,at=ze+1):(Vt==re.length-3||pe==Ot&&re[Vt+3]>pe)&&(at=Ot-Dt,ze=at-1,pe>=Ot&&(bt="right")),ze!=null){if(Oe=re[Vt+2],Dt==Ot&&De==(Oe.insertLeft?"left":"right")&&(bt=De),De=="left"&&ze==0)for(;Vt&&re[Vt-2]==re[Vt-3]&&re[Vt-1].insertLeft;)Oe=re[(Vt-=3)+2],bt="left";if(De=="right"&&ze==Ot-Dt)for(;Vt<re.length-3&&re[Vt+3]==re[Vt+4]&&!re[Vt+5].insertLeft;)Oe=re[(Vt+=3)+2],bt="right";break}return{node:Oe,start:ze,end:at,collapse:bt,coverStart:Dt,coverEnd:Ot}}function lu(re,pe){var De=th;if(pe=="left")for(var Oe=0;Oe<re.length&&(De=re[Oe]).left==De.right;Oe++);else for(var ze=re.length-1;ze>=0&&(De=re[ze]).left==De.right;ze--);return De}function oo(re,pe,De,Oe){var ze=xc(pe.map,De,Oe),at=ze.node,bt=ze.start,Dt=ze.end,Ot=ze.collapse,Vt;if(at.nodeType==3){for(var Ln=0;Ln<4;Ln++){for(;bt&&Re(pe.line.text.charAt(ze.coverStart+bt));)--bt;for(;ze.coverStart+Dt<ze.coverEnd&&Re(pe.line.text.charAt(ze.coverStart+Dt));)++Dt;if(be&&Pe<9&&bt==0&&Dt==ze.coverEnd-ze.coverStart?Vt=at.parentNode.getBoundingClientRect():Vt=lu(Ge(at,bt,Dt).getClientRects(),Oe),Vt.left||Vt.right||bt==0)break;Dt=bt,bt=bt-1,Ot="right"}be&&Pe<11&&(Vt=Uo(re.display.measure,Vt))}else{bt>0&&(Ot=Oe="right");var Qt;re.options.lineWrapping&&(Qt=at.getClientRects()).length>1?Vt=Qt[Oe=="right"?Qt.length-1:0]:Vt=at.getBoundingClientRect()}if(be&&Pe<9&&!bt&&(!Vt||!Vt.left&&!Vt.right)){var Un=at.parentNode.getClientRects()[0];Un?Vt={left:Un.left,right:Un.left+Wu(re.display),top:Un.top,bottom:Un.bottom}:Vt=th}for(var jn=Vt.top-pe.rect.top,mi=Vt.bottom-pe.rect.top,_i=(jn+mi)/2,Bi=pe.view.measure.heights,tr=0;tr<Bi.length-1&&!(_i<Bi[tr]);tr++);var Dr=tr?Bi[tr-1]:0,Sr=Bi[tr],Zr={left:(Ot=="right"?Vt.right:Vt.left)-pe.rect.left,right:(Ot=="left"?Vt.left:Vt.right)-pe.rect.left,top:Dr,bottom:Sr};return!Vt.left&&!Vt.right&&(Zr.bogus=!0),re.options.singleCursorHeightPerLine||(Zr.rtop=jn,Zr.rbottom=mi),Zr}function Uo(re,pe){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Hr(re))return pe;var De=screen.logicalXDPI/screen.deviceXDPI,Oe=screen.logicalYDPI/screen.deviceYDPI;return{left:pe.left*De,right:pe.right*De,top:pe.top*Oe,bottom:pe.bottom*Oe}}function ka(re){if(re.measure&&(re.measure.cache={},re.measure.heights=null,re.rest))for(var pe=0;pe<re.rest.length;pe++)re.measure.caches[pe]={}}function ra(re){re.display.externalMeasure=null,Ne(re.display.lineMeasure);for(var pe=0;pe<re.display.view.length;pe++)ka(re.display.view[pe])}function Ds(re){ra(re),re.display.cachedCharWidth=re.display.cachedTextHeight=re.display.cachedPaddingH=null,re.options.lineWrapping||(re.display.maxLineChanged=!0),re.display.lineNumChars=null}function bs(){return xe&&z?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ks(){return xe&&z?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Zs(re){var pe=0;if(re.widgets)for(var De=0;De<re.widgets.length;++De)re.widgets[De].above&&(pe+=Ia(re.widgets[De]));return pe}function Ks(re,pe,De,Oe,ze){if(!ze){var at=Zs(pe);De.top+=at,De.bottom+=at}if(Oe=="line")return De;Oe||(Oe="local");var bt=eo(pe);if(Oe=="local"?bt+=Na(re.display):bt-=re.display.viewOffset,Oe=="page"||Oe=="window"){var Dt=re.display.lineSpace.getBoundingClientRect();bt+=Dt.top+(Oe=="window"?0:ks());var Ot=Dt.left+(Oe=="window"?0:bs());De.left+=Ot,De.right+=Ot}return De.top+=bt,De.bottom+=bt,De}function Yl(re,pe,De){if(De=="div")return pe;var Oe=pe.left,ze=pe.top;if(De=="page")Oe-=bs(),ze-=ks();else if(De=="local"||!De){var at=re.display.sizer.getBoundingClientRect();Oe+=at.left,ze+=at.top}var bt=re.display.lineSpace.getBoundingClientRect();return{left:Oe-bt.left,top:ze-bt.top}}function Bl(re,pe,De,Oe,ze){return Oe||(Oe=cn(re.doc,pe.line)),Ks(re,Oe,Sc(re,Oe,pe.ch,ze),De)}function Rs(re,pe,De,Oe,ze,at){Oe=Oe||cn(re.doc,pe.line),ze||(ze=Lu(re,Oe));function bt(mi,_i){var Bi=bl(re,ze,mi,_i?"right":"left",at);return _i?Bi.left=Bi.right:Bi.right=Bi.left,Ks(re,Oe,Bi,De)}var Dt=tn(Oe,re.doc.direction),Ot=pe.ch,Vt=pe.sticky;if(Ot>=Oe.text.length?(Ot=Oe.text.length,Vt="before"):Ot<=0&&(Ot=0,Vt="after"),!Dt)return bt(Vt=="before"?Ot-1:Ot,Vt=="before");function Ln(mi,_i,Bi){var tr=Dt[_i],Dr=tr.level==1;return bt(Bi?mi-1:mi,Dr!=Bi)}var Qt=lt(Dt,Ot,Vt),Un=Ze,jn=Ln(Ot,Qt,Vt=="before");return Un!=null&&(jn.other=Ln(Ot,Un,Vt!="before")),jn}function xh(re,pe){var De=0;pe=Fn(re.doc,pe),re.options.lineWrapping||(De=Wu(re.display)*pe.ch);var Oe=cn(re.doc,pe.line),ze=eo(Oe)+Na(re.display);return{left:De,right:De,top:ze,bottom:ze+Oe.height}}function nh(re,pe,De,Oe,ze){var at=qt(re,pe,De);return at.xRel=ze,Oe&&(at.outside=Oe),at}function wc(re,pe,De){var Oe=re.doc;if(De+=re.display.viewOffset,De<0)return nh(Oe.first,0,null,-1,-1);var ze=an(Oe,De),at=Oe.first+Oe.size-1;if(ze>at)return nh(Oe.first+Oe.size-1,cn(Oe,at).text.length,null,1,1);pe<0&&(pe=0);for(var bt=cn(Oe,ze);;){var Dt=Yn(re,bt,ze,pe,De),Ot=ur(bt,Dt.ch+(Dt.xRel>0||Dt.outside>0?1:0));if(!Ot)return Dt;var Vt=Ot.find(1);if(Vt.line==ze)return Vt;bt=cn(Oe,ze=Vt.line)}}function gr(re,pe,De,Oe){Oe-=Zs(pe);var ze=pe.text.length,at=Ue(function(bt){return bl(re,De,bt-1).bottom<=Oe},ze,0);return ze=Ue(function(bt){return bl(re,De,bt).top>Oe},at,ze),{begin:at,end:ze}}function bc(re,pe,De,Oe){De||(De=Lu(re,pe));var ze=Ks(re,pe,bl(re,De,Oe),"line").top;return gr(re,pe,De,ze)}function nn(re,pe,De,Oe){return re.bottom<=De?!1:re.top>De?!0:(Oe?re.left:re.right)>pe}function Yn(re,pe,De,Oe,ze){ze-=eo(pe);var at=Lu(re,pe),bt=Zs(pe),Dt=0,Ot=pe.text.length,Vt=!0,Ln=tn(pe,re.doc.direction);if(Ln){var Qt=(re.options.lineWrapping?Qh:wh)(re,pe,De,at,Ln,Oe,ze);Vt=Qt.level!=1,Dt=Vt?Qt.from:Qt.to-1,Ot=Vt?Qt.to:Qt.from-1}var Un=null,jn=null,mi=Ue(function(wo){var yr=bl(re,at,wo);return yr.top+=bt,yr.bottom+=bt,nn(yr,Oe,ze,!1)?(yr.top<=ze&&yr.left<=Oe&&(Un=wo,jn=yr),!0):!1},Dt,Ot),_i,Bi,tr=!1;if(jn){var Dr=Oe-jn.left<jn.right-Oe,Sr=Dr==Vt;mi=Un+(Sr?0:1),Bi=Sr?"after":"before",_i=Dr?jn.left:jn.right}else{!Vt&&(mi==Ot||mi==Dt)&&mi++,Bi=mi==0?"after":mi==pe.text.length?"before":bl(re,at,mi-(Vt?1:0)).bottom+bt<=ze==Vt?"after":"before";var Zr=Rs(re,qt(De,mi,Bi),"line",pe,at);_i=Zr.left,tr=ze<Zr.top?-1:ze>=Zr.bottom?1:0}return mi=Ae(pe.text,mi,1),nh(De,mi,Bi,tr,Oe-_i)}function wh(re,pe,De,Oe,ze,at,bt){var Dt=Ue(function(Qt){var Un=ze[Qt],jn=Un.level!=1;return nn(Rs(re,qt(De,jn?Un.to:Un.from,jn?"before":"after"),"line",pe,Oe),at,bt,!0)},0,ze.length-1),Ot=ze[Dt];if(Dt>0){var Vt=Ot.level!=1,Ln=Rs(re,qt(De,Vt?Ot.from:Ot.to,Vt?"after":"before"),"line",pe,Oe);nn(Ln,at,bt,!0)&&Ln.top>bt&&(Ot=ze[Dt-1])}return Ot}function Qh(re,pe,De,Oe,ze,at,bt){var Dt=gr(re,pe,Oe,bt),Ot=Dt.begin,Vt=Dt.end;/\s/.test(pe.text.charAt(Vt-1))&&Vt--;for(var Ln=null,Qt=null,Un=0;Un<ze.length;Un++){var jn=ze[Un];if(!(jn.from>=Vt||jn.to<=Ot)){var mi=jn.level!=1,_i=bl(re,Oe,mi?Math.min(Vt,jn.to)-1:Math.max(Ot,jn.from)).right,Bi=_i<at?at-_i+1e9:_i-at;(!Ln||Qt>Bi)&&(Ln=jn,Qt=Bi)}}return Ln||(Ln=ze[ze.length-1]),Ln.from<Ot&&(Ln={from:Ot,to:Ln.to,level:Ln.level}),Ln.to>Vt&&(Ln={from:Ln.from,to:Vt,level:Ln.level}),Ln}var Mu;function Tu(re){if(re.cachedTextHeight!=null)return re.cachedTextHeight;if(Mu==null){Mu=Ve("pre",null,"CodeMirror-line-like");for(var pe=0;pe<49;++pe)Mu.appendChild(document.createTextNode("x")),Mu.appendChild(Ve("br"));Mu.appendChild(document.createTextNode("x"))}je(re.measure,Mu);var De=Mu.offsetHeight/50;return De>3&&(re.cachedTextHeight=De),Ne(re.measure),De||1}function Wu(re){if(re.cachedCharWidth!=null)return re.cachedCharWidth;var pe=Ve("span","xxxxxxxxxx"),De=Ve("pre",[pe],"CodeMirror-line-like");je(re.measure,De);var Oe=pe.getBoundingClientRect(),ze=(Oe.right-Oe.left)/10;return ze>2&&(re.cachedCharWidth=ze),ze||10}function bh(re){for(var pe=re.display,De={},Oe={},ze=pe.gutters.clientLeft,at=pe.gutters.firstChild,bt=0;at;at=at.nextSibling,++bt){var Dt=re.display.gutterSpecs[bt].className;De[Dt]=at.offsetLeft+at.clientLeft+ze,Oe[Dt]=at.clientWidth}return{fixedPos:Cc(pe),gutterTotalWidth:pe.gutters.offsetWidth,gutterLeft:De,gutterWidth:Oe,wrapperWidth:pe.wrapper.clientWidth}}function Cc(re){return re.scroller.getBoundingClientRect().left-re.sizer.getBoundingClientRect().left}function Vs(re){var pe=Tu(re.display),De=re.options.lineWrapping,Oe=De&&Math.max(5,re.display.scroller.clientWidth/Wu(re.display)-3);return function(ze){if(Qn(re.doc,ze))return 0;var at=0;if(ze.widgets)for(var bt=0;bt<ze.widgets.length;bt++)ze.widgets[bt].height&&(at+=ze.widgets[bt].height);return De?at+(Math.ceil(ze.text.length/Oe)||1)*pe:at+pe}}function Vr(re){var pe=re.doc,De=Vs(re);pe.iter(function(Oe){var ze=De(Oe);ze!=Oe.height&&rn(Oe,ze)})}function Da(re,pe,De,Oe){var ze=re.display;if(!De&&or(pe).getAttribute("cm-not-content")=="true")return null;var at,bt,Dt=ze.lineSpace.getBoundingClientRect();try{at=pe.clientX-Dt.left,bt=pe.clientY-Dt.top}catch(Qt){return null}var Ot=wc(re,at,bt),Vt;if(Oe&&Ot.xRel>0&&(Vt=cn(re.doc,Ot.line).text).length==Ot.ch){var Ln=ht(Vt,Vt.length,re.options.tabSize)-Vt.length;Ot=qt(Ot.line,Math.max(0,Math.round((at-_u(re.display).left)/Wu(re.display))-Ln))}return Ot}function $s(re,pe){if(pe>=re.display.viewTo||(pe-=re.display.viewFrom,pe<0))return null;for(var De=re.display.view,Oe=0;Oe<De.length;Oe++)if(pe-=De[Oe].size,pe<0)return Oe}function Ms(re,pe,De,Oe){pe==null&&(pe=re.doc.first),De==null&&(De=re.doc.first+re.doc.size),Oe||(Oe=0);var ze=re.display;if(Oe&&De<ze.viewTo&&(ze.updateLineNumbers==null||ze.updateLineNumbers>pe)&&(ze.updateLineNumbers=pe),re.curOp.viewChanged=!0,pe>=ze.viewTo)Bn&&nr(re.doc,pe)<ze.viewTo&&ga(re);else if(De<=ze.viewFrom)Bn&&Wi(re.doc,De+Oe)>ze.viewFrom?ga(re):(ze.viewFrom+=Oe,ze.viewTo+=Oe);else if(pe<=ze.viewFrom&&De>=ze.viewTo)ga(re);else if(pe<=ze.viewFrom){var at=dl(re,De,De+Oe,1);at?(ze.view=ze.view.slice(at.index),ze.viewFrom=at.lineN,ze.viewTo+=Oe):ga(re)}else if(De>=ze.viewTo){var bt=dl(re,pe,pe,-1);bt?(ze.view=ze.view.slice(0,bt.index),ze.viewTo=bt.lineN):ga(re)}else{var Dt=dl(re,pe,pe,-1),Ot=dl(re,De,De+Oe,1);Dt&&Ot?(ze.view=ze.view.slice(0,Dt.index).concat(Ao(re,Dt.lineN,Ot.lineN)).concat(ze.view.slice(Ot.index)),ze.viewTo+=Oe):ga(re)}var Vt=ze.externalMeasured;Vt&&(De<Vt.lineN?Vt.lineN+=Oe:pe<Vt.lineN+Vt.size&&(ze.externalMeasured=null))}function xo(re,pe,De){re.curOp.viewChanged=!0;var Oe=re.display,ze=re.display.externalMeasured;if(ze&&pe>=ze.lineN&&pe<ze.lineN+ze.size&&(Oe.externalMeasured=null),!(pe<Oe.viewFrom||pe>=Oe.viewTo)){var at=Oe.view[$s(re,pe)];if(at.node!=null){var bt=at.changes||(at.changes=[]);dt(bt,De)==-1&&bt.push(De)}}}function ga(re){re.display.viewFrom=re.display.viewTo=re.doc.first,re.display.view=[],re.display.viewOffset=0}function dl(re,pe,De,Oe){var ze=$s(re,pe),at,bt=re.display.view;if(!Bn||De==re.doc.first+re.doc.size)return{index:ze,lineN:De};for(var Dt=re.display.viewFrom,Ot=0;Ot<ze;Ot++)Dt+=bt[Ot].size;if(Dt!=pe){if(Oe>0){if(ze==bt.length-1)return null;at=Dt+bt[ze].size-pe,ze++}else at=Dt-pe;pe+=at,De+=at}for(;nr(re.doc,De)!=De;){if(ze==(Oe<0?0:bt.length-1))return null;De+=Oe*bt[ze-(Oe<0?1:0)].size,ze+=Oe}return{index:ze,lineN:De}}function cs(re,pe,De){var Oe=re.display,ze=Oe.view;ze.length==0||pe>=Oe.viewTo||De<=Oe.viewFrom?(Oe.view=Ao(re,pe,De),Oe.viewFrom=pe):(Oe.viewFrom>pe?Oe.view=Ao(re,pe,Oe.viewFrom).concat(Oe.view):Oe.viewFrom<pe&&(Oe.view=Oe.view.slice($s(re,pe))),Oe.viewFrom=pe,Oe.viewTo<De?Oe.view=Oe.view.concat(Ao(re,Oe.viewTo,De)):Oe.viewTo>De&&(Oe.view=Oe.view.slice(0,$s(re,De)))),Oe.viewTo=De}function Cl(re){for(var pe=re.display.view,De=0,Oe=0;Oe<pe.length;Oe++){var ze=pe[Oe];!ze.hidden&&(!ze.node||ze.changes)&&++De}return De}function Ea(re){re.display.input.showSelection(re.display.input.prepareSelection())}function Pc(re,pe){pe===void 0&&(pe=!0);for(var De=re.doc,Oe={},ze=Oe.cursors=document.createDocumentFragment(),at=Oe.selection=document.createDocumentFragment(),bt=0;bt<De.sel.ranges.length;bt++)if(!(!pe&&bt==De.sel.primIndex)){var Dt=De.sel.ranges[bt];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,ze),Ot||Vo(re,Dt,at)}}return Oe}function Go(re,pe,De){var Oe=Rs(re,pe,"div",null,null,!re.options.singleCursorHeightPerLine),ze=De.appendChild(Ve("div","\xA0","CodeMirror-cursor"));if(ze.style.left=Oe.left+"px",ze.style.top=Oe.top+"px",ze.style.height=Math.max(0,Oe.bottom-Oe.top)*re.options.cursorHeight+"px",Oe.other){var at=De.appendChild(Ve("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));at.style.display="",at.style.left=Oe.other.left+"px",at.style.top=Oe.other.top+"px",at.style.height=(Oe.other.bottom-Oe.other.top)*.85+"px"}}function Ka(re,pe){return re.top-pe.top||re.left-pe.left}function Vo(re,pe,De){var Oe=re.display,ze=re.doc,at=document.createDocumentFragment(),bt=_u(re.display),Dt=bt.left,Ot=Math.max(Oe.sizerWidth,Za(re)-Oe.sizer.offsetLeft)-bt.right,Vt=ze.direction=="ltr";function Ln(Sr,Zr,wo,yr){Zr<0&&(Zr=0),Zr=Math.round(Zr),yr=Math.round(yr),at.appendChild(Ve("div",null,"CodeMirror-selected","position: absolute; left: "+Sr+`px;
|
|
|
top: `+Zr+"px; width: "+(wo==null?Ot-Sr:wo)+`px;
|
|
|
height: `+(yr-Zr)+"px"))}function Qt(Sr,Zr,wo){var yr=cn(ze,Sr),zo=yr.text.length,ca,Ya;function va(ja,gu){return Bl(re,qt(Sr,ja),"div",yr,gu)}function nu(ja,gu,pl){var za=bc(re,yr,null,ja),ws=gu=="ltr"==(pl=="after")?"left":"right",Ca=pl=="after"?za.begin:za.end-(/\s/.test(yr.text.charAt(za.end-1))?2:1);return va(Ca,ws)[ws]}var Ml=tn(yr,ze.direction);return Ke(Ml,Zr||0,wo==null?zo:wo,function(ja,gu,pl,za){var ws=pl=="ltr",Ca=va(ja,ws?"left":"right"),tl=va(gu-1,ws?"right":"left"),gl=Zr==null&&ja==0,lc=wo==null&&gu==zo,ya=za==0,Vu=!Ml||za==Ml.length-1;if(tl.top-Ca.top<=3){var Ta=(Vt?gl:lc)&&ya,Ef=(Vt?lc:gl)&&Vu,Iu=Ta?Dt:(ws?Ca:tl).left,mu=Ef?Ot:(ws?tl:Ca).right;Ln(Iu,Ca.top,mu-Iu,Ca.bottom)}else{var iu,ea,nl,Hc;ws?(iu=Vt&&gl&&ya?Dt:Ca.left,ea=Vt?Ot:nu(ja,pl,"before"),nl=Vt?Dt:nu(gu,pl,"after"),Hc=Vt&&lc&&Vu?Ot:tl.right):(iu=Vt?nu(ja,pl,"before"):Dt,ea=!Vt&&gl&&ya?Ot:Ca.right,nl=!Vt&&lc&&Vu?Dt:tl.left,Hc=Vt?nu(gu,pl,"after"):Ot),Ln(iu,Ca.top,ea-iu,Ca.bottom),Ca.bottom<tl.top&&Ln(Dt,Ca.bottom,null,tl.top),Ln(nl,tl.top,Hc-nl,tl.bottom)}(!ca||Ka(Ca,ca)<0)&&(ca=Ca),Ka(tl,ca)<0&&(ca=tl),(!Ya||Ka(Ca,Ya)<0)&&(Ya=Ca),Ka(tl,Ya)<0&&(Ya=tl)}),{start:ca,end:Ya}}var Un=pe.from(),jn=pe.to();if(Un.line==jn.line)Qt(Un.line,Un.ch,jn.ch);else{var mi=cn(ze,Un.line),_i=cn(ze,jn.line),Bi=cr(mi)==cr(_i),tr=Qt(Un.line,Un.ch,Bi?mi.text.length+1:null).end,Dr=Qt(jn.line,Bi?0:null,jn.ch).start;Bi&&(tr.top<Dr.top-2?(Ln(tr.right,tr.top,null,tr.bottom),Ln(Dt,Dr.top,Dr.left,Dr.bottom)):Ln(tr.right,tr.top,Dr.left-tr.right,tr.bottom)),tr.bottom<Dr.top&&Ln(Dt,tr.bottom,null,Dr.top)}De.appendChild(at)}function vs(re){if(re.state.focused){var pe=re.display;clearInterval(pe.blinker);var De=!0;pe.cursorDiv.style.visibility="",re.options.cursorBlinkRate>0?pe.blinker=setInterval(function(){re.hasFocus()||Rc(re),pe.cursorDiv.style.visibility=(De=!De)?"":"hidden"},re.options.cursorBlinkRate):re.options.cursorBlinkRate<0&&(pe.cursorDiv.style.visibility="hidden")}}function ds(re){re.state.focused||(re.display.input.focus(),Fo(re))}function Bs(re){re.state.delayingBlurEvent=!0,setTimeout(function(){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1,Rc(re))},100)}function Fo(re,pe){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1),re.options.readOnly!="nocursor"&&(re.state.focused||(yn(re,"focus",re,pe),re.state.focused=!0,Ct(re.display.wrapper,"CodeMirror-focused"),!re.curOp&&re.display.selForContextMenu!=re.doc.sel&&(re.display.input.reset(),he&&setTimeout(function(){return re.display.input.reset(!0)},20)),re.display.input.receivedFocus()),vs(re))}function Rc(re,pe){re.state.delayingBlurEvent||(re.state.focused&&(yn(re,"blur",re,pe),re.state.focused=!1,ke(re.display.wrapper,"CodeMirror-focused")),clearInterval(re.display.blinker),setTimeout(function(){re.state.focused||(re.display.shift=!1)},150))}function Gr(re){for(var pe=re.display,De=pe.lineDiv.offsetTop,Oe=0;Oe<pe.view.length;Oe++){var ze=pe.view[Oe],at=re.options.lineWrapping,bt=void 0,Dt=0;if(!ze.hidden){if(be&&Pe<8){var Ot=ze.node.offsetTop+ze.node.offsetHeight;bt=Ot-De,De=Ot}else{var Vt=ze.node.getBoundingClientRect();bt=Vt.bottom-Vt.top,!at&&ze.text.firstChild&&(Dt=ze.text.firstChild.getBoundingClientRect().right-Vt.left-1)}var Ln=ze.line.height-bt;if((Ln>.005||Ln<-.005)&&(rn(ze.line,bt),Ad(ze.line),ze.rest))for(var Qt=0;Qt<ze.rest.length;Qt++)Ad(ze.rest[Qt]);if(Dt>re.display.sizerWidth){var Un=Math.ceil(Dt/Wu(re.display));Un>re.display.maxLineLength&&(re.display.maxLineLength=Un,re.display.maxLine=ze.line,re.display.maxLineChanged=!0)}}}}function Ad(re){if(re.widgets)for(var pe=0;pe<re.widgets.length;++pe){var De=re.widgets[pe],Oe=De.node.parentNode;Oe&&(De.height=Oe.offsetHeight)}}function Wo(re,pe,De){var Oe=De&&De.top!=null?Math.max(0,De.top):re.scroller.scrollTop;Oe=Math.floor(Oe-Na(re));var ze=De&&De.bottom!=null?De.bottom:Oe+re.wrapper.clientHeight,at=an(pe,Oe),bt=an(pe,ze);if(De&&De.ensure){var Dt=De.ensure.from.line,Ot=De.ensure.to.line;Dt<at?(at=Dt,bt=an(pe,eo(cn(pe,Dt))+re.wrapper.clientHeight)):Math.min(Ot,pe.lastLine())>=bt&&(at=an(pe,eo(cn(pe,Ot))-re.wrapper.clientHeight),bt=Ot)}return{from:at,to:Math.max(bt,at+1)}}function Nd(re,pe){if(!kn(re,"scrollCursorIntoView")){var De=re.display,Oe=De.sizer.getBoundingClientRect(),ze=null;if(pe.top+Oe.top<0?ze=!0:pe.bottom+Oe.top>(window.innerHeight||document.documentElement.clientHeight)&&(ze=!1),ze!=null&&!de){var at=Ve("div","\u200B",null,`position: absolute;
|
|
|
top: `+(pe.top-De.viewOffset-Na(re.display))+`px;
|
|
|
height: `+(pe.bottom-pe.top+Wa(re)+De.barHeight)+`px;
|
|
|
left: `+pe.left+"px; width: "+Math.max(2,pe.right-pe.left)+"px;");re.display.lineSpace.appendChild(at),at.scrollIntoView(ze),re.display.lineSpace.removeChild(at)}}}function ih(re,pe,De,Oe){Oe==null&&(Oe=0);var ze;!re.options.lineWrapping&&pe==De&&(pe=pe.ch?qt(pe.line,pe.sticky=="before"?pe.ch-1:pe.ch,"after"):pe,De=pe.sticky=="before"?qt(pe.line,pe.ch+1,"before"):pe);for(var at=0;at<5;at++){var bt=!1,Dt=Rs(re,pe),Ot=!De||De==pe?Dt:Rs(re,De);ze={left:Math.min(Dt.left,Ot.left),top:Math.min(Dt.top,Ot.top)-Oe,right:Math.max(Dt.left,Ot.left),bottom:Math.max(Dt.bottom,Ot.bottom)+Oe};var Vt=Od(re,ze),Ln=re.doc.scrollTop,Qt=re.doc.scrollLeft;if(Vt.scrollTop!=null&&(Au(re,Vt.scrollTop),Math.abs(re.doc.scrollTop-Ln)>1&&(bt=!0)),Vt.scrollLeft!=null&&(uu(re,Vt.scrollLeft),Math.abs(re.doc.scrollLeft-Qt)>1&&(bt=!0)),!bt)break}return ze}function rh(re,pe){var De=Od(re,pe);De.scrollTop!=null&&Au(re,De.scrollTop),De.scrollLeft!=null&&uu(re,De.scrollLeft)}function Od(re,pe){var De=re.display,Oe=Tu(re.display);pe.top<0&&(pe.top=0);var ze=re.curOp&&re.curOp.scrollTop!=null?re.curOp.scrollTop:De.scroller.scrollTop,at=Uu(re),bt={};pe.bottom-pe.top>at&&(pe.bottom=pe.top+at);var Dt=re.doc.height+$l(De),Ot=pe.top<Oe,Vt=pe.bottom>Dt-Oe;if(pe.top<ze)bt.scrollTop=Ot?0:pe.top;else if(pe.bottom>ze+at){var Ln=Math.min(pe.top,(Vt?Dt:pe.bottom)-at);Ln!=ze&&(bt.scrollTop=Ln)}var Qt=re.options.fixedGutter?0:De.gutters.offsetWidth,Un=re.curOp&&re.curOp.scrollLeft!=null?re.curOp.scrollLeft:De.scroller.scrollLeft-Qt,jn=Za(re)-De.gutters.offsetWidth,mi=pe.right-pe.left>jn;return mi&&(pe.right=pe.left+jn),pe.left<10?bt.scrollLeft=0:pe.left<Un?bt.scrollLeft=Math.max(0,pe.left+Qt-(mi?0:10)):pe.right>jn+Un-3&&(bt.scrollLeft=pe.right+(mi?0:10)-jn),bt}function Ch(re,pe){pe!=null&&(ku(re),re.curOp.scrollTop=(re.curOp.scrollTop==null?re.doc.scrollTop:re.curOp.scrollTop)+pe)}function ic(re){ku(re);var pe=re.getCursor();re.curOp.scrollToPos={from:pe,to:pe,margin:re.options.cursorScrollMargin}}function ro(re,pe,De){(pe!=null||De!=null)&&ku(re),pe!=null&&(re.curOp.scrollLeft=pe),De!=null&&(re.curOp.scrollTop=De)}function ns(re,pe){ku(re),re.curOp.scrollToPos=pe}function ku(re){var pe=re.curOp.scrollToPos;if(pe){re.curOp.scrollToPos=null;var De=xh(re,pe.from),Oe=xh(re,pe.to);qh(re,De,Oe,pe.margin)}}function qh(re,pe,De,Oe){var ze=Od(re,{left:Math.min(pe.left,De.left),top:Math.min(pe.top,De.top)-Oe,right:Math.max(pe.right,De.right),bottom:Math.max(pe.bottom,De.bottom)+Oe});ro(re,ze.scrollLeft,ze.scrollTop)}function Au(re,pe){Math.abs(re.doc.scrollTop-pe)<2||(Le||gi(re,{top:pe}),ed(re,pe,!0),Le&&gi(re),mn(re,100))}function ed(re,pe,De){pe=Math.max(0,Math.min(re.display.scroller.scrollHeight-re.display.scroller.clientHeight,pe)),!(re.display.scroller.scrollTop==pe&&!De)&&(re.doc.scrollTop=pe,re.display.scrollbars.setScrollTop(pe),re.display.scroller.scrollTop!=pe&&(re.display.scroller.scrollTop=pe))}function uu(re,pe,De,Oe){pe=Math.max(0,Math.min(pe,re.display.scroller.scrollWidth-re.display.scroller.clientWidth)),!((De?pe==re.doc.scrollLeft:Math.abs(re.doc.scrollLeft-pe)<2)&&!Oe)&&(re.doc.scrollLeft=pe,Ui(re),re.display.scroller.scrollLeft!=pe&&(re.display.scroller.scrollLeft=pe),re.display.scrollbars.setScrollLeft(pe))}function Fl(re){var pe=re.display,De=pe.gutters.offsetWidth,Oe=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?De:0,docHeight:Oe,scrollHeight:Oe+Wa(re)+pe.barHeight,nativeBarWidth:pe.nativeBarWidth,gutterWidth:De}}var ps=function(re,pe,De){this.cm=De;var Oe=this.vert=Ve("div",[Ve("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),ze=this.horiz=Ve("div",[Ve("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");Oe.tabIndex=ze.tabIndex=-1,re(Oe),re(ze),Jt(Oe,"scroll",function(){Oe.clientHeight&&pe(Oe.scrollTop,"vertical")}),Jt(ze,"scroll",function(){ze.clientWidth&&pe(ze.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,be&&Pe<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ps.prototype.update=function(re){var pe=re.scrollWidth>re.clientWidth+1,De=re.scrollHeight>re.clientHeight+1,Oe=re.nativeBarWidth;if(De){this.vert.style.display="block",this.vert.style.bottom=pe?Oe+"px":"0";var ze=re.viewHeight-(pe?Oe:0);this.vert.firstChild.style.height=Math.max(0,re.scrollHeight-re.clientHeight+ze)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(pe){this.horiz.style.display="block",this.horiz.style.right=De?Oe+"px":"0",this.horiz.style.left=re.barLeft+"px";var at=re.viewWidth-re.barLeft-(De?Oe:0);this.horiz.firstChild.style.width=Math.max(0,re.scrollWidth-re.clientWidth+at)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&re.clientHeight>0&&(Oe==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:De?Oe:0,bottom:pe?Oe:0}},ps.prototype.setScrollLeft=function(re){this.horiz.scrollLeft!=re&&(this.horiz.scrollLeft=re),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ps.prototype.setScrollTop=function(re){this.vert.scrollTop!=re&&(this.vert.scrollTop=re),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ps.prototype.zeroWidthHack=function(){var re=oe&&!ve?"12px":"18px";this.horiz.style.height=this.vert.style.width=re,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new rt,this.disableVert=new rt},ps.prototype.enableZeroWidthBar=function(re,pe,De){re.style.pointerEvents="auto";function Oe(){var ze=re.getBoundingClientRect(),at=De=="vert"?document.elementFromPoint(ze.right-1,(ze.top+ze.bottom)/2):document.elementFromPoint((ze.right+ze.left)/2,ze.bottom-1);at!=re?re.style.pointerEvents="none":pe.set(1e3,Oe)}pe.set(1e3,Oe)},ps.prototype.clear=function(){var re=this.horiz.parentNode;re.removeChild(this.horiz),re.removeChild(this.vert)};var Fs=function(){};Fs.prototype.update=function(){return{bottom:0,right:0}},Fs.prototype.setScrollLeft=function(){},Fs.prototype.setScrollTop=function(){},Fs.prototype.clear=function(){};function rc(re,pe){pe||(pe=Fl(re));var De=re.display.barWidth,Oe=re.display.barHeight;el(re,pe);for(var ze=0;ze<4&&De!=re.display.barWidth||Oe!=re.display.barHeight;ze++)De!=re.display.barWidth&&re.options.lineWrapping&&Gr(re),el(re,Fl(re)),De=re.display.barWidth,Oe=re.display.barHeight}function el(re,pe){var De=re.display,Oe=De.scrollbars.update(pe);De.sizer.style.paddingRight=(De.barWidth=Oe.right)+"px",De.sizer.style.paddingBottom=(De.barHeight=Oe.bottom)+"px",De.heightForcer.style.borderBottom=Oe.bottom+"px solid transparent",Oe.right&&Oe.bottom?(De.scrollbarFiller.style.display="block",De.scrollbarFiller.style.height=Oe.bottom+"px",De.scrollbarFiller.style.width=Oe.right+"px"):De.scrollbarFiller.style.display="",Oe.bottom&&re.options.coverGutterNextToScrollbar&&re.options.fixedGutter?(De.gutterFiller.style.display="block",De.gutterFiller.style.height=Oe.bottom+"px",De.gutterFiller.style.width=pe.gutterWidth+"px"):De.gutterFiller.style.display=""}var Id={native:ps,null:Fs};function td(re){re.display.scrollbars&&(re.display.scrollbars.clear(),re.display.scrollbars.addClass&&ke(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),Jt(pe,"mousedown",function(){re.state.focused&&setTimeout(function(){return re.display.input.focus()},0)}),pe.setAttribute("cm-not-content","true")},function(pe,De){De=="horizontal"?uu(re,pe):Au(re,pe)},re),re.display.scrollbars.addClass&&Ct(re.display.wrapper,re.display.scrollbars.addClass)}var Dd=0;function Oa(re){re.curOp={cm:re,viewChanged:!1,startHeight:re.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Dd},ua(re.curOp)}function oc(re){var pe=re.curOp;pe&&lo(pe,function(De){for(var Oe=0;Oe<De.ops.length;Oe++)De.ops[Oe].cm.curOp=null;gf(De)})}function gf(re){for(var pe=re.ops,De=0;De<pe.length;De++)Rt(pe[De]);for(var Oe=0;Oe<pe.length;Oe++)zt(pe[Oe]);for(var ze=0;ze<pe.length;ze++)ln(pe[ze]);for(var at=0;at<pe.length;at++)gt(pe[at]);for(var bt=0;bt<pe.length;bt++)Pt(pe[bt])}function Rt(re){var pe=re.cm,De=pe.display;zn(pe),re.updateMaxLine&&Bo(pe),re.mustUpdate=re.viewChanged||re.forceUpdate||re.scrollTop!=null||re.scrollToPos&&(re.scrollToPos.from.line<De.viewFrom||re.scrollToPos.to.line>=De.viewTo)||De.maxLineChanged&&pe.options.lineWrapping,re.update=re.mustUpdate&&new wn(pe,re.mustUpdate&&{top:re.scrollTop,ensure:re.scrollToPos},re.forceUpdate)}function zt(re){re.updatedDisplay=re.mustUpdate&&wi(re.cm,re.update)}function ln(re){var pe=re.cm,De=pe.display;re.updatedDisplay&&Gr(pe),re.barMeasure=Fl(pe),De.maxLineChanged&&!pe.options.lineWrapping&&(re.adjustWidthTo=Sc(pe,De.maxLine,De.maxLine.text.length).left+3,pe.display.sizerWidth=re.adjustWidthTo,re.barMeasure.scrollWidth=Math.max(De.scroller.clientWidth,De.sizer.offsetLeft+re.adjustWidthTo+Wa(pe)+pe.display.barWidth),re.maxScrollLeft=Math.max(0,De.sizer.offsetLeft+re.adjustWidthTo-Za(pe))),(re.updatedDisplay||re.selectionChanged)&&(re.preparedSelection=De.input.prepareSelection())}function gt(re){var pe=re.cm;re.adjustWidthTo!=null&&(pe.display.sizer.style.minWidth=re.adjustWidthTo+"px",re.maxScrollLeft<pe.doc.scrollLeft&&uu(pe,Math.min(pe.display.scroller.scrollLeft,re.maxScrollLeft),!0),pe.display.maxLineChanged=!1);var De=re.focus&&re.focus==ct();re.preparedSelection&&pe.display.input.showSelection(re.preparedSelection,De),(re.updatedDisplay||re.startHeight!=pe.doc.height)&&rc(pe,re.barMeasure),re.updatedDisplay&&Ni(pe,re.barMeasure),re.selectionChanged&&vs(pe),pe.state.focused&&re.updateInput&&pe.display.input.reset(re.typing),De&&ds(re.cm)}function Pt(re){var pe=re.cm,De=pe.display,Oe=pe.doc;if(re.updatedDisplay&&Zn(pe,re.update),De.wheelStartX!=null&&(re.scrollTop!=null||re.scrollLeft!=null||re.scrollToPos)&&(De.wheelStartX=De.wheelStartY=null),re.scrollTop!=null&&ed(pe,re.scrollTop,re.forceScroll),re.scrollLeft!=null&&uu(pe,re.scrollLeft,!0,!0),re.scrollToPos){var ze=ih(pe,Fn(Oe,re.scrollToPos.from),Fn(Oe,re.scrollToPos.to),re.scrollToPos.margin);Nd(pe,ze)}var at=re.maybeHiddenMarkers,bt=re.maybeUnhiddenMarkers;if(at)for(var Dt=0;Dt<at.length;++Dt)at[Dt].lines.length||yn(at[Dt],"hide");if(bt)for(var Ot=0;Ot<bt.length;++Ot)bt[Ot].lines.length&&yn(bt[Ot],"unhide");De.wrapper.offsetHeight&&(Oe.scrollTop=pe.display.scroller.scrollTop),re.changeObjs&&yn(pe,"changes",pe,re.changeObjs),re.update&&re.update.finish()}function Lt(re,pe){if(re.curOp)return pe();Oa(re);try{return pe()}finally{oc(re)}}function Sn(re,pe){return function(){if(re.curOp)return pe.apply(re,arguments);Oa(re);try{return pe.apply(re,arguments)}finally{oc(re)}}}function hn(re){return function(){if(this.curOp)return re.apply(this,arguments);Oa(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);Oa(pe);try{return re.apply(this,arguments)}finally{oc(pe)}}}function mn(re,pe){re.doc.highlightFrontier<re.display.viewTo&&re.state.highlight.set(pe,ut(vn,re))}function vn(re){var pe=re.doc;if(!(pe.highlightFrontier>=re.display.viewTo)){var De=+new Date+re.options.workTime,Oe=mr(re,pe.highlightFrontier),ze=[];pe.iter(Oe.line,Math.min(pe.first+pe.size,re.display.viewTo+500),function(at){if(Oe.line>=re.display.viewFrom){var bt=at.styles,Dt=at.text.length>re.options.maxHighlightLength?wt(pe.mode,Oe.state):null,Ot=Vi(re,at,Oe,!0);Dt&&(Oe.state=Dt),at.styles=Ot.styles;var Vt=at.styleClasses,Ln=Ot.classes;Ln?at.styleClasses=Ln:Vt&&(at.styleClasses=null);for(var Qt=!bt||bt.length!=at.styles.length||Vt!=Ln&&(!Vt||!Ln||Vt.bgClass!=Ln.bgClass||Vt.textClass!=Ln.textClass),Un=0;!Qt&&Un<bt.length;++Un)Qt=bt[Un]!=at.styles[Un];Qt&&ze.push(Oe.line),at.stateAfter=Oe.save(),Oe.nextLine()}else at.text.length<=re.options.maxHighlightLength&&_n(re,at.text,Oe),at.stateAfter=Oe.line%5==0?Oe.save():null,Oe.nextLine();if(+new Date>De)return mn(re,re.options.workDelay),!0}),pe.highlightFrontier=Oe.line,pe.modeFrontier=Math.max(pe.modeFrontier,Oe.line),ze.length&&Lt(re,function(){for(var at=0;at<ze.length;at++)xo(re,ze[at],"text")})}}var wn=function(re,pe,De){var Oe=re.display;this.viewport=pe,this.visible=Wo(Oe,re.doc,pe),this.editorIsHidden=!Oe.wrapper.offsetWidth,this.wrapperHeight=Oe.wrapper.clientHeight,this.wrapperWidth=Oe.wrapper.clientWidth,this.oldDisplayWidth=Za(re),this.force=De,this.dims=bh(re),this.events=[]};wn.prototype.signal=function(re,pe){An(re,pe)&&this.events.push(arguments)},wn.prototype.finish=function(){for(var re=0;re<this.events.length;re++)yn.apply(null,this.events[re])};function zn(re){var pe=re.display;!pe.scrollbarsClipped&&pe.scroller.offsetWidth&&(pe.nativeBarWidth=pe.scroller.offsetWidth-pe.scroller.clientWidth,pe.heightForcer.style.height=Wa(re)+"px",pe.sizer.style.marginBottom=-pe.nativeBarWidth+"px",pe.sizer.style.borderRightWidth=Wa(re)+"px",pe.scrollbarsClipped=!0)}function ni(re){if(re.hasFocus())return null;var pe=ct();if(!pe||!mt(re.display.lineDiv,pe))return null;var De={activeElt:pe};if(window.getSelection){var Oe=window.getSelection();Oe.anchorNode&&Oe.extend&&mt(re.display.lineDiv,Oe.anchorNode)&&(De.anchorNode=Oe.anchorNode,De.anchorOffset=Oe.anchorOffset,De.focusNode=Oe.focusNode,De.focusOffset=Oe.focusOffset)}return De}function Wn(re){if(!(!re||!re.activeElt||re.activeElt==ct())&&(re.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(re.activeElt.nodeName)&&re.anchorNode&&mt(document.body,re.anchorNode)&&mt(document.body,re.focusNode))){var pe=window.getSelection(),De=document.createRange();De.setEnd(re.anchorNode,re.anchorOffset),De.collapse(!1),pe.removeAllRanges(),pe.addRange(De),pe.extend(re.focusNode,re.focusOffset)}}function wi(re,pe){var De=re.display,Oe=re.doc;if(pe.editorIsHidden)return ga(re),!1;if(!pe.force&&pe.visible.from>=De.viewFrom&&pe.visible.to<=De.viewTo&&(De.updateLineNumbers==null||De.updateLineNumbers>=De.viewTo)&&De.renderedView==De.view&&Cl(re)==0)return!1;ki(re)&&(ga(re),pe.dims=bh(re));var ze=Oe.first+Oe.size,at=Math.max(pe.visible.from-re.options.viewportMargin,Oe.first),bt=Math.min(ze,pe.visible.to+re.options.viewportMargin);De.viewFrom<at&&at-De.viewFrom<20&&(at=Math.max(Oe.first,De.viewFrom)),De.viewTo>bt&&De.viewTo-bt<20&&(bt=Math.min(ze,De.viewTo)),Bn&&(at=nr(re.doc,at),bt=Wi(re.doc,bt));var Dt=at!=De.viewFrom||bt!=De.viewTo||De.lastWrapHeight!=pe.wrapperHeight||De.lastWrapWidth!=pe.wrapperWidth;cs(re,at,bt),De.viewOffset=eo(cn(re.doc,De.viewFrom)),re.display.mover.style.top=De.viewOffset+"px";var Ot=Cl(re);if(!Dt&&Ot==0&&!pe.force&&De.renderedView==De.view&&(De.updateLineNumbers==null||De.updateLineNumbers>=De.viewTo))return!1;var Vt=ni(re);return Ot>4&&(De.lineDiv.style.display="none"),si(re,De.updateLineNumbers,pe.dims),Ot>4&&(De.lineDiv.style.display=""),De.renderedView=De.view,Wn(Vt),Ne(De.cursorDiv),Ne(De.selectionDiv),De.gutters.style.height=De.sizer.style.minHeight=0,Dt&&(De.lastWrapHeight=pe.wrapperHeight,De.lastWrapWidth=pe.wrapperWidth,mn(re,400)),De.updateLineNumbers=null,!0}function Zn(re,pe){for(var De=pe.viewport,Oe=!0;;Oe=!1){if(!Oe||!re.options.lineWrapping||pe.oldDisplayWidth==Za(re)){if(De&&De.top!=null&&(De={top:Math.min(re.doc.height+$l(re.display)-Uu(re),De.top)}),pe.visible=Wo(re.display,re.doc,De),pe.visible.from>=re.display.viewFrom&&pe.visible.to<=re.display.viewTo)break}else Oe&&(pe.visible=Wo(re.display,re.doc,De));if(!wi(re,pe))break;Gr(re);var ze=Fl(re);Ea(re),rc(re,ze),Ni(re,ze),pe.force=!1}pe.signal(re,"update",re),(re.display.viewFrom!=re.display.reportedViewFrom||re.display.viewTo!=re.display.reportedViewTo)&&(pe.signal(re,"viewportChange",re,re.display.viewFrom,re.display.viewTo),re.display.reportedViewFrom=re.display.viewFrom,re.display.reportedViewTo=re.display.viewTo)}function gi(re,pe){var De=new wn(re,pe);if(wi(re,De)){Gr(re),Zn(re,De);var Oe=Fl(re);Ea(re),rc(re,Oe),Ni(re,Oe),De.finish()}}function si(re,pe,De){var Oe=re.display,ze=re.options.lineNumbers,at=Oe.lineDiv,bt=at.firstChild;function Dt(mi){var _i=mi.nextSibling;return he&&oe&&re.display.currentWheelTarget==mi?mi.style.display="none":mi.parentNode.removeChild(mi),_i}for(var Ot=Oe.view,Vt=Oe.viewFrom,Ln=0;Ln<Ot.length;Ln++){var Qt=Ot[Ln];if(!Qt.hidden)if(!Qt.node||Qt.node.parentNode!=at){var Un=wl(re,Qt,Vt,De);at.insertBefore(Un,bt)}else{for(;bt!=Qt.node;)bt=Dt(bt);var jn=ze&&pe!=null&&pe<=Vt&&Qt.lineNumber;Qt.changes&&(dt(Qt.changes,"gutter")>-1&&(jn=!1),Ls(re,Qt,Vt,De)),jn&&(Ne(Qt.lineNumber),Qt.lineNumber.appendChild(document.createTextNode(Dn(re.options,Vt)))),bt=Qt.node.nextSibling}Vt+=Qt.size}for(;bt;)bt=Dt(bt)}function Oi(re){var pe=re.gutters.offsetWidth;re.sizer.style.marginLeft=pe+"px"}function Ni(re,pe){re.display.sizer.style.minHeight=pe.docHeight+"px",re.display.heightForcer.style.top=pe.docHeight+"px",re.display.gutters.style.height=pe.docHeight+re.display.barHeight+Wa(re)+"px"}function Ui(re){var pe=re.display,De=pe.view;if(!(!pe.alignWidgets&&(!pe.gutters.firstChild||!re.options.fixedGutter))){for(var Oe=Cc(pe)-pe.scroller.scrollLeft+re.doc.scrollLeft,ze=pe.gutters.offsetWidth,at=Oe+"px",bt=0;bt<De.length;bt++)if(!De[bt].hidden){re.options.fixedGutter&&(De[bt].gutter&&(De[bt].gutter.style.left=at),De[bt].gutterBackground&&(De[bt].gutterBackground.style.left=at));var Dt=De[bt].alignable;if(Dt)for(var Ot=0;Ot<Dt.length;Ot++)Dt[Ot].style.left=at}re.options.fixedGutter&&(pe.gutters.style.left=Oe+ze+"px")}}function ki(re){if(!re.options.lineNumbers)return!1;var pe=re.doc,De=Dn(re.options,pe.first+pe.size-1),Oe=re.display;if(De.length!=Oe.lineNumChars){var ze=Oe.measure.appendChild(Ve("div",[Ve("div",De)],"CodeMirror-linenumber CodeMirror-gutter-elt")),at=ze.firstChild.offsetWidth,bt=ze.offsetWidth-at;return Oe.lineGutter.style.width="",Oe.lineNumInnerWidth=Math.max(at,Oe.lineGutter.offsetWidth-bt)+1,Oe.lineNumWidth=Oe.lineNumInnerWidth+bt,Oe.lineNumChars=Oe.lineNumInnerWidth?De.length:-1,Oe.lineGutter.style.width=Oe.lineNumWidth+"px",Oi(re.display),!0}return!1}function Ai(re,pe){for(var De=[],Oe=!1,ze=0;ze<re.length;ze++){var at=re[ze],bt=null;if(typeof at!="string"&&(bt=at.style,at=at.className),at=="CodeMirror-linenumbers")if(pe)Oe=!0;else continue;De.push({className:at,style:bt})}return pe&&!Oe&&De.push({className:"CodeMirror-linenumbers",style:null}),De}function rr(re){var pe=re.gutters,De=re.gutterSpecs;Ne(pe),re.lineGutter=null;for(var Oe=0;Oe<De.length;++Oe){var ze=De[Oe],at=ze.className,bt=ze.style,Dt=pe.appendChild(Ve("div",null,"CodeMirror-gutter "+at));bt&&(Dt.style.cssText=bt),at=="CodeMirror-linenumbers"&&(re.lineGutter=Dt,Dt.style.width=(re.lineNumWidth||1)+"px")}pe.style.display=De.length?"":"none",Oi(re)}function ti(re){rr(re.display),Ms(re),Ui(re)}function ji(re,pe,De,Oe){var ze=this;this.input=De,ze.scrollbarFiller=Ve("div",null,"CodeMirror-scrollbar-filler"),ze.scrollbarFiller.setAttribute("cm-not-content","true"),ze.gutterFiller=Ve("div",null,"CodeMirror-gutter-filler"),ze.gutterFiller.setAttribute("cm-not-content","true"),ze.lineDiv=Qe("div",null,"CodeMirror-code"),ze.selectionDiv=Ve("div",null,null,"position: relative; z-index: 1"),ze.cursorDiv=Ve("div",null,"CodeMirror-cursors"),ze.measure=Ve("div",null,"CodeMirror-measure"),ze.lineMeasure=Ve("div",null,"CodeMirror-measure"),ze.lineSpace=Qe("div",[ze.measure,ze.lineMeasure,ze.selectionDiv,ze.cursorDiv,ze.lineDiv],null,"position: relative; outline: none");var at=Qe("div",[ze.lineSpace],"CodeMirror-lines");ze.mover=Ve("div",[at],null,"position: relative"),ze.sizer=Ve("div",[ze.mover],"CodeMirror-sizer"),ze.sizerWidth=null,ze.heightForcer=Ve("div",null,null,"position: absolute; height: "+yt+"px; width: 1px;"),ze.gutters=Ve("div",null,"CodeMirror-gutters"),ze.lineGutter=null,ze.scroller=Ve("div",[ze.sizer,ze.heightForcer,ze.gutters],"CodeMirror-scroll"),ze.scroller.setAttribute("tabIndex","-1"),ze.wrapper=Ve("div",[ze.scrollbarFiller,ze.gutterFiller,ze.scroller],"CodeMirror"),be&&Pe<8&&(ze.gutters.style.zIndex=-1,ze.scroller.style.paddingRight=0),!he&&!(Le&&ee)&&(ze.scroller.draggable=!0),re&&(re.appendChild?re.appendChild(ze.wrapper):re(ze.wrapper)),ze.viewFrom=ze.viewTo=pe.first,ze.reportedViewFrom=ze.reportedViewTo=pe.first,ze.view=[],ze.renderedView=null,ze.externalMeasured=null,ze.viewOffset=0,ze.lastWrapHeight=ze.lastWrapWidth=0,ze.updateLineNumbers=null,ze.nativeBarWidth=ze.barHeight=ze.barWidth=0,ze.scrollbarsClipped=!1,ze.lineNumWidth=ze.lineNumInnerWidth=ze.lineNumChars=null,ze.alignWidgets=!1,ze.cachedCharWidth=ze.cachedTextHeight=ze.cachedPaddingH=null,ze.maxLine=null,ze.maxLineLength=0,ze.maxLineChanged=!1,ze.wheelDX=ze.wheelDY=ze.wheelStartX=ze.wheelStartY=null,ze.shift=!1,ze.selForContextMenu=null,ze.activeTouch=null,ze.gutterSpecs=Ai(Oe.gutters,Oe.lineNumbers),rr(ze),De.init(ze)}var Li=0,bi=null;be?bi=-.53:Le?bi=15:xe?bi=-.7:ce&&(bi=-1/3);function $i(re){var pe=re.wheelDeltaX,De=re.wheelDeltaY;return pe==null&&re.detail&&re.axis==re.HORIZONTAL_AXIS&&(pe=re.detail),De==null&&re.detail&&re.axis==re.VERTICAL_AXIS?De=re.detail:De==null&&(De=re.wheelDelta),{x:pe,y:De}}function pi(re){var pe=$i(re);return pe.x*=bi,pe.y*=bi,pe}function sr(re,pe){var De=$i(pe),Oe=De.x,ze=De.y,at=re.display,bt=at.scroller,Dt=bt.scrollWidth>bt.clientWidth,Ot=bt.scrollHeight>bt.clientHeight;if(Oe&&Dt||ze&&Ot){if(ze&&oe&&he){e:for(var Vt=pe.target,Ln=at.view;Vt!=bt;Vt=Vt.parentNode)for(var Qt=0;Qt<Ln.length;Qt++)if(Ln[Qt].node==Vt){re.display.currentWheelTarget=Vt;break e}}if(Oe&&!Le&&!ge&&bi!=null){ze&&Ot&&Au(re,Math.max(0,bt.scrollTop+ze*bi)),uu(re,Math.max(0,bt.scrollLeft+Oe*bi)),(!ze||ze&&Ot)&&ai(pe),at.wheelStartX=null;return}if(ze&&bi!=null){var Un=ze*bi,jn=re.doc.scrollTop,mi=jn+at.wrapper.clientHeight;Un<0?jn=Math.max(0,jn+Un-50):mi=Math.min(re.doc.height,mi+Un+50),gi(re,{top:jn,bottom:mi})}Li<20&&(at.wheelStartX==null?(at.wheelStartX=bt.scrollLeft,at.wheelStartY=bt.scrollTop,at.wheelDX=Oe,at.wheelDY=ze,setTimeout(function(){if(at.wheelStartX!=null){var _i=bt.scrollLeft-at.wheelStartX,Bi=bt.scrollTop-at.wheelStartY,tr=Bi&&at.wheelDY&&Bi/at.wheelDY||_i&&at.wheelDX&&_i/at.wheelDX;at.wheelStartX=at.wheelStartY=null,tr&&(bi=(bi*Li+tr)/(Li+1),++Li)}},200)):(at.wheelDX+=Oe,at.wheelDY+=ze))}}var Yi=function(re,pe){this.ranges=re,this.primIndex=pe};Yi.prototype.primary=function(){return this.ranges[this.primIndex]},Yi.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 De=this.ranges[pe],Oe=re.ranges[pe];if(!Nn(De.anchor,Oe.anchor)||!Nn(De.head,Oe.head))return!1}return!0},Yi.prototype.deepCopy=function(){for(var re=[],pe=0;pe<this.ranges.length;pe++)re[pe]=new Ci(On(this.ranges[pe].anchor),On(this.ranges[pe].head));return new Yi(re,this.primIndex)},Yi.prototype.somethingSelected=function(){for(var re=0;re<this.ranges.length;re++)if(!this.ranges[re].empty())return!0;return!1},Yi.prototype.contains=function(re,pe){pe||(pe=re);for(var De=0;De<this.ranges.length;De++){var Oe=this.ranges[De];if(on(pe,Oe.from())>=0&&on(re,Oe.to())<=0)return De}return-1};var Ci=function(re,pe){this.anchor=re,this.head=pe};Ci.prototype.from=function(){return Hn(this.anchor,this.head)},Ci.prototype.to=function(){return qn(this.anchor,this.head)},Ci.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Gi(re,pe,De){var Oe=re&&re.options.selectionsMayTouch,ze=pe[De];pe.sort(function(Un,jn){return on(Un.from(),jn.from())}),De=dt(pe,ze);for(var at=1;at<pe.length;at++){var bt=pe[at],Dt=pe[at-1],Ot=on(Dt.to(),bt.from());if(Oe&&!bt.empty()?Ot>0:Ot>=0){var Vt=Hn(Dt.from(),bt.from()),Ln=qn(Dt.to(),bt.to()),Qt=Dt.empty()?bt.from()==bt.head:Dt.from()==Dt.head;at<=De&&--De,pe.splice(--at,2,new Ci(Qt?Ln:Vt,Qt?Vt:Ln))}}return new Yi(pe,De)}function vr(re,pe){return new Yi([new Ci(re,pe||re)],0)}function qi(re){return re.text?qt(re.from.line+re.text.length-1,Ut(re.text).length+(re.text.length==1?re.from.ch:0)):re.to}function So(re,pe){if(on(re,pe.from)<0)return re;if(on(re,pe.to)<=0)return qi(pe);var De=re.line+pe.text.length-(pe.to.line-pe.from.line)-1,Oe=re.ch;return re.line==pe.to.line&&(Oe+=qi(pe).ch-pe.to.ch),qt(De,Oe)}function Co(re,pe){for(var De=[],Oe=0;Oe<re.sel.ranges.length;Oe++){var ze=re.sel.ranges[Oe];De.push(new Ci(So(ze.anchor,pe),So(ze.head,pe)))}return Gi(re.cm,De,re.sel.primIndex)}function is(re,pe,De){return re.line==pe.line?qt(De.line,re.ch-pe.ch+De.ch):qt(De.line+(re.line-pe.line),re.ch)}function so(re,pe,De){for(var Oe=[],ze=qt(re.first,0),at=ze,bt=0;bt<pe.length;bt++){var Dt=pe[bt],Ot=is(Dt.from,ze,at),Vt=is(qi(Dt),ze,at);if(ze=Dt.to,at=Vt,De=="around"){var Ln=re.sel.ranges[bt],Qt=on(Ln.head,Ln.anchor)<0;Oe[bt]=new Ci(Qt?Vt:Ot,Qt?Ot:Vt)}else Oe[bt]=new Ci(Ot,Ot)}return new Yi(Oe,re.sel.primIndex)}function Tr(re){re.doc.mode=$e(re.options,re.doc.modeOption),No(re)}function No(re){re.doc.iter(function(pe){pe.stateAfter&&(pe.stateAfter=null),pe.styles&&(pe.styles=null)}),re.doc.modeFrontier=re.doc.highlightFrontier=re.doc.first,mn(re,100),re.state.modeGen++,re.curOp&&Ms(re)}function Ar(re,pe){return pe.from.ch==0&&pe.to.ch==0&&Ut(pe.text)==""&&(!re.cm||re.cm.options.wholeLineUpdateBefore)}function Yr(re,pe,De,Oe){function ze(Dr){return De?De[Dr]:null}function at(Dr,Sr,Zr){as(Dr,Sr,Zr,Oe),Mi(Dr,"change",Dr,pe)}function bt(Dr,Sr){for(var Zr=[],wo=Dr;wo<Sr;++wo)Zr.push(new Xo(Vt[wo],ze(wo),Oe));return Zr}var Dt=pe.from,Ot=pe.to,Vt=pe.text,Ln=cn(re,Dt.line),Qt=cn(re,Ot.line),Un=Ut(Vt),jn=ze(Vt.length-1),mi=Ot.line-Dt.line;if(pe.full)re.insert(0,bt(0,Vt.length)),re.remove(Vt.length,re.size-Vt.length);else if(Ar(re,pe)){var _i=bt(0,Vt.length-1);at(Qt,Qt.text,jn),mi&&re.remove(Dt.line,mi),_i.length&&re.insert(Dt.line,_i)}else if(Ln==Qt)if(Vt.length==1)at(Ln,Ln.text.slice(0,Dt.ch)+Un+Ln.text.slice(Ot.ch),jn);else{var Bi=bt(1,Vt.length-1);Bi.push(new Xo(Un+Ln.text.slice(Ot.ch),jn,Oe)),at(Ln,Ln.text.slice(0,Dt.ch)+Vt[0],ze(0)),re.insert(Dt.line+1,Bi)}else if(Vt.length==1)at(Ln,Ln.text.slice(0,Dt.ch)+Vt[0]+Qt.text.slice(Ot.ch),ze(0)),re.remove(Dt.line+1,mi);else{at(Ln,Ln.text.slice(0,Dt.ch)+Vt[0],ze(0)),at(Qt,Un+Qt.text.slice(Ot.ch),jn);var tr=bt(1,Vt.length-1);mi>1&&re.remove(Dt.line+1,mi-1),re.insert(Dt.line+1,tr)}Mi(re,"change",re,pe)}function rs(re,pe,De){function Oe(ze,at,bt){if(ze.linked)for(var Dt=0;Dt<ze.linked.length;++Dt){var Ot=ze.linked[Dt];if(Ot.doc!=at){var Vt=bt&&Ot.sharedHist;De&&!Vt||(pe(Ot.doc,Vt),Oe(Ot.doc,ze,Vt))}}}Oe(re,null,!0)}function Wr(re,pe){if(pe.cm)throw new Error("This document is already in use.");re.doc=pe,pe.cm=re,Vr(re),Tr(re),Er(re),re.options.lineWrapping||Bo(re),re.options.mode=pe.modeOption,Ms(re)}function Er(re){(re.doc.direction=="rtl"?Ct:ke)(re.display.lineDiv,"CodeMirror-rtl")}function Xr(re){Lt(re,function(){Er(re),Ms(re)})}function br(re){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=re||1}function ao(re,pe){var De={from:On(pe.from),to:qi(pe),text:bn(re,pe.from,pe.to)};return Cs(re,De,pe.from.line,pe.to.line+1),rs(re,function(Oe){return Cs(Oe,De,pe.from.line,pe.to.line+1)},!0),De}function Lr(re){for(;re.length;){var pe=Ut(re);if(pe.ranges)re.pop();else break}}function ho(re,pe){if(pe)return Lr(re.done),Ut(re.done);if(re.done.length&&!Ut(re.done).ranges)return Ut(re.done);if(re.done.length>1&&!re.done[re.done.length-2].ranges)return re.done.pop(),Ut(re.done)}function Zo(re,pe,De,Oe){var ze=re.history;ze.undone.length=0;var at=+new Date,bt,Dt;if((ze.lastOp==Oe||ze.lastOrigin==pe.origin&&pe.origin&&(pe.origin.charAt(0)=="+"&&ze.lastModTime>at-(re.cm?re.cm.options.historyEventDelay:500)||pe.origin.charAt(0)=="*"))&&(bt=ho(ze,ze.lastOp==Oe)))Dt=Ut(bt.changes),on(pe.from,pe.to)==0&&on(pe.from,Dt.to)==0?Dt.to=qi(pe):bt.changes.push(ao(re,pe));else{var Ot=Ut(ze.done);for((!Ot||!Ot.ranges)&&Io(re.sel,ze.done),bt={changes:[ao(re,pe)],generation:ze.generation},ze.done.push(bt);ze.done.length>ze.undoDepth;)ze.done.shift(),ze.done[0].ranges||ze.done.shift()}ze.done.push(De),ze.generation=++ze.maxGeneration,ze.lastModTime=ze.lastSelTime=at,ze.lastOp=ze.lastSelOp=Oe,ze.lastOrigin=ze.lastSelOrigin=pe.origin,Dt||yn(re,"historyAdded")}function Ko(re,pe,De,Oe){var ze=pe.charAt(0);return ze=="*"||ze=="+"&&De.ranges.length==Oe.ranges.length&&De.somethingSelected()==Oe.somethingSelected()&&new Date-re.history.lastSelTime<=(re.cm?re.cm.options.historyEventDelay:500)}function Jr(re,pe,De,Oe){var ze=re.history,at=Oe&&Oe.origin;De==ze.lastSelOp||at&&ze.lastSelOrigin==at&&(ze.lastModTime==ze.lastSelTime&&ze.lastOrigin==at||Ko(re,at,Ut(ze.done),pe))?ze.done[ze.done.length-1]=pe:Io(pe,ze.done),ze.lastSelTime=+new Date,ze.lastSelOrigin=at,ze.lastSelOp=De,Oe&&Oe.clearRedo!==!1&&Lr(ze.undone)}function Io(re,pe){var De=Ut(pe);De&&De.ranges&&De.equals(re)||pe.push(re)}function Cs(re,pe,De,Oe){var ze=pe["spans_"+re.id],at=0;re.iter(Math.max(re.first,De),Math.min(re.first+re.size,Oe),function(bt){bt.markedSpans&&((ze||(ze=pe["spans_"+re.id]={}))[at]=bt.markedSpans),++at})}function Lo(re){if(!re)return null;for(var pe,De=0;De<re.length;++De)re[De].marker.explicitlyCleared?pe||(pe=re.slice(0,De)):pe&&pe.push(re[De]);return pe?pe.length?pe:null:re}function Jo(re,pe){var De=pe["spans_"+re.id];if(!De)return null;for(var Oe=[],ze=0;ze<pe.text.length;++ze)Oe.push(Lo(De[ze]));return Oe}function Ss(re,pe){var De=Jo(re,pe),Oe=Hi(re,pe);if(!De)return Oe;if(!Oe)return De;for(var ze=0;ze<De.length;++ze){var at=De[ze],bt=Oe[ze];if(at&&bt)e:for(var Dt=0;Dt<bt.length;++Dt){for(var Ot=bt[Dt],Vt=0;Vt<at.length;++Vt)if(at[Vt].marker==Ot.marker)continue e;at.push(Ot)}else bt&&(De[ze]=bt)}return De}function Js(re,pe,De){for(var Oe=[],ze=0;ze<re.length;++ze){var at=re[ze];if(at.ranges){Oe.push(De?Yi.prototype.deepCopy.call(at):at);continue}var bt=at.changes,Dt=[];Oe.push({changes:Dt});for(var Ot=0;Ot<bt.length;++Ot){var Vt=bt[Ot],Ln=void 0;if(Dt.push({from:Vt.from,to:Vt.to,text:Vt.text}),pe)for(var Qt in Vt)(Ln=Qt.match(/^spans_(\d+)$/))&&dt(pe,Number(Ln[1]))>-1&&(Ut(Dt)[Qt]=Vt[Qt],delete Vt[Qt])}}return Oe}function Pl(re,pe,De,Oe){if(Oe){var ze=re.anchor;if(De){var at=on(pe,ze)<0;at!=on(De,ze)<0?(ze=pe,pe=De):at!=on(pe,De)<0&&(pe=De)}return new Ci(ze,pe)}else return new Ci(De||pe,pe)}function Qo(re,pe,De,Oe,ze){ze==null&&(ze=re.cm&&(re.cm.display.shift||re.extend)),As(re,new Yi([Pl(re.sel.primary(),pe,De,ze)],0),Oe)}function qo(re,pe,De){for(var Oe=[],ze=re.cm&&(re.cm.display.shift||re.extend),at=0;at<re.sel.ranges.length;at++)Oe[at]=Pl(re.sel.ranges[at],pe[at],null,ze);var bt=Gi(re.cm,Oe,re.sel.primIndex);As(re,bt,De)}function xs(re,pe,De,Oe){var ze=re.sel.ranges.slice(0);ze[pe]=De,As(re,Gi(re.cm,ze,re.sel.primIndex),Oe)}function Ts(re,pe,De,Oe){As(re,vr(pe,De),Oe)}function ma(re,pe,De){var Oe={ranges:pe.ranges,update:function(ze){this.ranges=[];for(var at=0;at<ze.length;at++)this.ranges[at]=new Ci(Fn(re,ze[at].anchor),Fn(re,ze[at].head))},origin:De&&De.origin};return yn(re,"beforeSelectionChange",re,Oe),re.cm&&yn(re.cm,"beforeSelectionChange",re.cm,Oe),Oe.ranges!=pe.ranges?Gi(re.cm,Oe.ranges,Oe.ranges.length-1):pe}function jo(re,pe,De){var Oe=re.history.done,ze=Ut(Oe);ze&&ze.ranges?(Oe[Oe.length-1]=pe,La(re,pe,De)):As(re,pe,De)}function As(re,pe,De){La(re,pe,De),Jr(re,re.sel,re.cm?re.cm.curOp.id:NaN,De)}function La(re,pe,De){(An(re,"beforeSelectionChange")||re.cm&&An(re.cm,"beforeSelectionChange"))&&(pe=ma(re,pe,De));var Oe=De&&De.bias||(on(pe.primary().head,re.sel.primary().head)<0?-1:1);_l(re,jl(re,pe,Oe,!0)),!(De&&De.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,$n(re.cm)),Mi(re,"cursorActivity",re))}function Xl(re){_l(re,jl(re,re.sel,null,!1))}function jl(re,pe,De,Oe){for(var ze,at=0;at<pe.ranges.length;at++){var bt=pe.ranges[at],Dt=pe.ranges.length==re.sel.ranges.length&&re.sel.ranges[at],Ot=hu(re,bt.anchor,Dt&&Dt.anchor,De,Oe),Vt=hu(re,bt.head,Dt&&Dt.head,De,Oe);(ze||Ot!=bt.anchor||Vt!=bt.head)&&(ze||(ze=pe.ranges.slice(0,at)),ze[at]=new Ci(Ot,Vt))}return ze?Gi(re.cm,ze,pe.primIndex):pe}function cu(re,pe,De,Oe,ze){var at=cn(re,pe.line);if(at.markedSpans)for(var bt=0;bt<at.markedSpans.length;++bt){var Dt=at.markedSpans[bt],Ot=Dt.marker,Vt="selectLeft"in Ot?!Ot.selectLeft:Ot.inclusiveLeft,Ln="selectRight"in Ot?!Ot.selectRight:Ot.inclusiveRight;if((Dt.from==null||(Vt?Dt.from<=pe.ch:Dt.from<pe.ch))&&(Dt.to==null||(Ln?Dt.to>=pe.ch:Dt.to>pe.ch))){if(ze&&(yn(Ot,"beforeCursorEnter"),Ot.explicitlyCleared))if(at.markedSpans){--bt;continue}else break;if(!Ot.atomic)continue;if(De){var Qt=Ot.find(Oe<0?1:-1),Un=void 0;if((Oe<0?Ln:Vt)&&(Qt=Jl(re,Qt,-Oe,Qt&&Qt.line==pe.line?at:null)),Qt&&Qt.line==pe.line&&(Un=on(Qt,De))&&(Oe<0?Un<0:Un>0))return cu(re,Qt,pe,Oe,ze)}var jn=Ot.find(Oe<0?-1:1);return(Oe<0?Vt:Ln)&&(jn=Jl(re,jn,Oe,jn.line==pe.line?at:null)),jn?cu(re,jn,pe,Oe,ze):null}}return pe}function hu(re,pe,De,Oe,ze){var at=Oe||1,bt=cu(re,pe,De,at,ze)||!ze&&cu(re,pe,De,at,!0)||cu(re,pe,De,-at,ze)||!ze&&cu(re,pe,De,-at,!0);return bt||(re.cantEdit=!0,qt(re.first,0))}function Jl(re,pe,De,Oe){return De<0&&pe.ch==0?pe.line>re.first?Fn(re,qt(pe.line-1)):null:De>0&&pe.ch==(Oe||cn(re,pe.line)).text.length?pe.line<re.first+re.size-1?qt(pe.line+1,0):null:new qt(pe.line,pe.ch+De)}function gs(re){re.setSelection(qt(re.firstLine(),0),qt(re.lastLine()),vt)}function Ra(re,pe,De){var Oe={canceled:!1,from:pe.from,to:pe.to,text:pe.text,origin:pe.origin,cancel:function(){return Oe.canceled=!0}};return De&&(Oe.update=function(ze,at,bt,Dt){ze&&(Oe.from=Fn(re,ze)),at&&(Oe.to=Fn(re,at)),bt&&(Oe.text=bt),Dt!==void 0&&(Oe.origin=Dt)}),yn(re,"beforeChange",re,Oe),re.cm&&yn(re.cm,"beforeChange",re.cm,Oe),Oe.canceled?(re.cm&&(re.cm.curOp.updateInput=2),null):{from:Oe.from,to:Oe.to,text:Oe.text,origin:Oe.origin}}function oa(re,pe,De){if(re.cm){if(!re.cm.curOp)return Sn(re.cm,oa)(re,pe,De);if(re.cm.state.suppressEdits)return}if(!((An(re,"beforeChange")||re.cm&&An(re.cm,"beforeChange"))&&(pe=Ra(re,pe,!0),!pe))){var Oe=fr&&!De&&Pr(re,pe.from,pe.to);if(Oe)for(var ze=Oe.length-1;ze>=0;--ze)Ns(re,{from:Oe[ze].from,to:Oe[ze].to,text:ze?[""]:pe.text,origin:pe.origin});else Ns(re,pe)}}function Ns(re,pe){if(!(pe.text.length==1&&pe.text[0]==""&&on(pe.from,pe.to)==0)){var De=Co(re,pe);Zo(re,pe,De,re.cm?re.cm.curOp.id:NaN),du(re,pe,De,Hi(re,pe));var Oe=[];rs(re,function(ze,at){!at&&dt(Oe,ze.history)==-1&&(js(ze.history,pe),Oe.push(ze.history)),du(ze,pe,null,Hi(ze,pe))})}}function Ql(re,pe,De){var Oe=re.cm&&re.cm.state.suppressEdits;if(!(Oe&&!De)){for(var ze=re.history,at,bt=re.sel,Dt=pe=="undo"?ze.done:ze.undone,Ot=pe=="undo"?ze.undone:ze.done,Vt=0;Vt<Dt.length&&(at=Dt[Vt],!(De?at.ranges&&!at.equals(re.sel):!at.ranges));Vt++);if(Vt!=Dt.length){for(ze.lastOrigin=ze.lastSelOrigin=null;;)if(at=Dt.pop(),at.ranges){if(Io(at,Ot),De&&!at.equals(re.sel)){As(re,at,{clearRedo:!1});return}bt=at}else if(Oe){Dt.push(at);return}else break;var Ln=[];Io(bt,Ot),Ot.push({changes:Ln,generation:ze.generation}),ze.generation=at.generation||++ze.maxGeneration;for(var Qt=An(re,"beforeChange")||re.cm&&An(re.cm,"beforeChange"),Un=function(_i){var Bi=at.changes[_i];if(Bi.origin=pe,Qt&&!Ra(re,Bi,!1))return Dt.length=0,{};Ln.push(ao(re,Bi));var tr=_i?Co(re,Bi):Ut(Dt);du(re,Bi,tr,Ss(re,Bi)),!_i&&re.cm&&re.cm.scrollIntoView({from:Bi.from,to:qi(Bi)});var Dr=[];rs(re,function(Sr,Zr){!Zr&&dt(Dr,Sr.history)==-1&&(js(Sr.history,Bi),Dr.push(Sr.history)),du(Sr,Bi,null,Ss(Sr,Bi))})},jn=at.changes.length-1;jn>=0;--jn){var mi=Un(jn);if(mi)return mi.v}}}}function _c(re,pe){if(pe!=0&&(re.first+=pe,re.sel=new Yi(Wt(re.sel.ranges,function(ze){return new Ci(qt(ze.anchor.line+pe,ze.anchor.ch),qt(ze.head.line+pe,ze.head.ch))}),re.sel.primIndex),re.cm)){Ms(re.cm,re.first,re.first-pe,pe);for(var De=re.cm.display,Oe=De.viewFrom;Oe<De.viewTo;Oe++)xo(re.cm,Oe,"gutter")}}function du(re,pe,De,Oe){if(re.cm&&!re.cm.curOp)return Sn(re.cm,du)(re,pe,De,Oe);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 ze=pe.text.length-1-(re.first-pe.from.line);_c(re,ze),pe={from:qt(re.first,0),to:qt(pe.to.line+ze,pe.to.ch),text:[Ut(pe.text)],origin:pe.origin}}var at=re.lastLine();pe.to.line>at&&(pe={from:pe.from,to:qt(at,cn(re,at).text.length),text:[pe.text[0]],origin:pe.origin}),pe.removed=bn(re,pe.from,pe.to),De||(De=Co(re,pe)),re.cm?Zu(re.cm,pe,Oe):Yr(re,pe,Oe),La(re,De,vt),re.cantEdit&&hu(re,qt(re.firstLine(),0))&&(re.cantEdit=!1)}}function Zu(re,pe,De){var Oe=re.doc,ze=re.display,at=pe.from,bt=pe.to,Dt=!1,Ot=at.line;re.options.lineWrapping||(Ot=At(cr(cn(Oe,at.line))),Oe.iter(Ot,bt.line+1,function(jn){if(jn==ze.maxLine)return Dt=!0,!0})),Oe.sel.contains(pe.from,pe.to)>-1&&$n(re),Yr(Oe,pe,De,Vs(re)),re.options.lineWrapping||(Oe.iter(Ot,at.line+pe.text.length,function(jn){var mi=Ro(jn);mi>ze.maxLineLength&&(ze.maxLine=jn,ze.maxLineLength=mi,ze.maxLineChanged=!0,Dt=!1)}),Dt&&(re.curOp.updateMaxLine=!0)),zi(Oe,at.line),mn(re,400);var Vt=pe.text.length-(bt.line-at.line)-1;pe.full?Ms(re):at.line==bt.line&&pe.text.length==1&&!Ar(re.doc,pe)?xo(re,at.line,"text"):Ms(re,at.line,bt.line+1,Vt);var Ln=An(re,"changes"),Qt=An(re,"change");if(Qt||Ln){var Un={from:at,to:bt,text:pe.text,removed:pe.removed,origin:pe.origin};Qt&&Mi(re,"change",re,Un),Ln&&(re.curOp.changeObjs||(re.curOp.changeObjs=[])).push(Un)}re.display.selForContextMenu=null}function sc(re,pe,De,Oe,ze){var at;Oe||(Oe=De),on(Oe,De)<0&&(at=[Oe,De],De=at[0],Oe=at[1]),typeof pe=="string"&&(pe=re.splitLines(pe)),oa(re,{from:De,to:Oe,text:pe,origin:ze})}function zl(re,pe,De,Oe){De<re.line?re.line+=Oe:pe<re.line&&(re.line=pe,re.ch=0)}function ls(re,pe,De,Oe){for(var ze=0;ze<re.length;++ze){var at=re[ze],bt=!0;if(at.ranges){at.copied||(at=re[ze]=at.deepCopy(),at.copied=!0);for(var Dt=0;Dt<at.ranges.length;Dt++)zl(at.ranges[Dt].anchor,pe,De,Oe),zl(at.ranges[Dt].head,pe,De,Oe);continue}for(var Ot=0;Ot<at.changes.length;++Ot){var Vt=at.changes[Ot];if(De<Vt.from.line)Vt.from=qt(Vt.from.line+Oe,Vt.from.ch),Vt.to=qt(Vt.to.line+Oe,Vt.to.ch);else if(pe<=Vt.to.line){bt=!1;break}}bt||(re.splice(0,ze+1),ze=0)}}function js(re,pe){var De=pe.from.line,Oe=pe.to.line,ze=pe.text.length-(Oe-De)-1;ls(re.done,De,Oe,ze),ls(re.undone,De,Oe,ze)}function wa(re,pe,De,Oe){var ze=pe,at=pe;return typeof pe=="number"?at=cn(re,ei(re,pe)):ze=At(pe),ze==null?null:(Oe(at,ze)&&re.cm&&xo(re.cm,ze,De),at)}function zs(re){this.lines=re,this.parent=null;for(var pe=0,De=0;De<re.length;++De)re[De].parent=this,pe+=re[De].height;this.height=pe}zs.prototype={chunkSize:function(){return this.lines.length},removeInner:function(re,pe){for(var De=re,Oe=re+pe;De<Oe;++De){var ze=this.lines[De];this.height-=ze.height,Ho(ze),Mi(ze,"delete")}this.lines.splice(re,pe)},collapse:function(re){re.push.apply(re,this.lines)},insertInner:function(re,pe,De){this.height+=De,this.lines=this.lines.slice(0,re).concat(pe).concat(this.lines.slice(re));for(var Oe=0;Oe<pe.length;++Oe)pe[Oe].parent=this},iterN:function(re,pe,De){for(var Oe=re+pe;re<Oe;++re)if(De(this.lines[re]))return!0}};function os(re){this.children=re;for(var pe=0,De=0,Oe=0;Oe<re.length;++Oe){var ze=re[Oe];pe+=ze.chunkSize(),De+=ze.height,ze.parent=this}this.size=pe,this.height=De,this.parent=null}os.prototype={chunkSize:function(){return this.size},removeInner:function(re,pe){this.size-=pe;for(var De=0;De<this.children.length;++De){var Oe=this.children[De],ze=Oe.chunkSize();if(re<ze){var at=Math.min(pe,ze-re),bt=Oe.height;if(Oe.removeInner(re,at),this.height-=bt-Oe.height,ze==at&&(this.children.splice(De--,1),Oe.parent=null),(pe-=at)==0)break;re=0}else re-=ze}if(this.size-pe<25&&(this.children.length>1||!(this.children[0]instanceof zs))){var Dt=[];this.collapse(Dt),this.children=[new zs(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,De){this.size+=pe.length,this.height+=De;for(var Oe=0;Oe<this.children.length;++Oe){var ze=this.children[Oe],at=ze.chunkSize();if(re<=at){if(ze.insertInner(re,pe,De),ze.lines&&ze.lines.length>50){for(var bt=ze.lines.length%25+25,Dt=bt;Dt<ze.lines.length;){var Ot=new zs(ze.lines.slice(Dt,Dt+=25));ze.height-=Ot.height,this.children.splice(++Oe,0,Ot),Ot.parent=this}ze.lines=ze.lines.slice(0,bt),this.maybeSpill()}break}re-=at}},maybeSpill:function(){if(!(this.children.length<=10)){var re=this;do{var pe=re.children.splice(re.children.length-5,5),De=new os(pe);if(re.parent){re.size-=De.size,re.height-=De.height;var ze=dt(re.parent.children,re);re.parent.children.splice(ze+1,0,De)}else{var Oe=new os(re.children);Oe.parent=re,re.children=[Oe,De],re=Oe}De.parent=re.parent}while(re.children.length>10);re.parent.maybeSpill()}},iterN:function(re,pe,De){for(var Oe=0;Oe<this.children.length;++Oe){var ze=this.children[Oe],at=ze.chunkSize();if(re<at){var bt=Math.min(pe,at-re);if(ze.iterN(re,bt,De))return!0;if((pe-=bt)==0)break;re=0}else re-=at}}};var Ma=function(re,pe,De){if(De)for(var Oe in De)De.hasOwnProperty(Oe)&&(this[Oe]=De[Oe]);this.doc=re,this.node=pe};Ma.prototype.clear=function(){var re=this.doc.cm,pe=this.line.widgets,De=this.line,Oe=At(De);if(!(Oe==null||!pe)){for(var ze=0;ze<pe.length;++ze)pe[ze]==this&&pe.splice(ze--,1);pe.length||(De.widgets=null);var at=Ia(this);rn(De,Math.max(0,De.height-at)),re&&(Lt(re,function(){El(re,De,-at),xo(re,Oe,"widget")}),Mi(re,"lineWidgetCleared",re,this,Oe))}},Ma.prototype.changed=function(){var re=this,pe=this.height,De=this.doc.cm,Oe=this.line;this.height=null;var ze=Ia(this)-pe;ze&&(Qn(this.doc,Oe)||rn(Oe,Oe.height+ze),De&&Lt(De,function(){De.curOp.forceUpdate=!0,El(De,Oe,ze),Mi(De,"lineWidgetChanged",De,re,At(Oe))}))},oi(Ma);function El(re,pe,De){eo(pe)<(re.curOp&&re.curOp.scrollTop||re.doc.scrollTop)&&Ch(re,De)}function Nu(re,pe,De,Oe){var ze=new Ma(re,De,Oe),at=re.cm;return at&&ze.noHScroll&&(at.display.alignWidgets=!0),wa(re,pe,"widget",function(bt){var Dt=bt.widgets||(bt.widgets=[]);if(ze.insertAt==null?Dt.push(ze):Dt.splice(Math.min(Dt.length-1,Math.max(0,ze.insertAt)),0,ze),ze.line=bt,at&&!Qn(re,bt)){var Ot=eo(bt)<re.scrollTop;rn(bt,bt.height+Ia(ze)),Ot&&Ch(at,ze.height),at.curOp.forceUpdate=!0}return!0}),at&&Mi(at,"lineWidgetAdded",at,ze,typeof pe=="number"?pe:At(pe)),ze}var mf=0,fn=function(re,pe){this.lines=[],this.type=pe,this.doc=re,this.id=++mf};fn.prototype.clear=function(){if(!this.explicitlyCleared){var re=this.doc.cm,pe=re&&!re.curOp;if(pe&&Oa(re),An(this,"clear")){var De=this.find();De&&Mi(this,"clear",De.from,De.to)}for(var Oe=null,ze=null,at=0;at<this.lines.length;++at){var bt=this.lines[at],Dt=yo(bt.markedSpans,this);re&&!this.collapsed?xo(re,At(bt),"text"):re&&(Dt.to!=null&&(ze=At(bt)),Dt.from!=null&&(Oe=At(bt))),bt.markedSpans=Or(bt.markedSpans,Dt),Dt.from==null&&this.collapsed&&!Qn(this.doc,bt)&&re&&rn(bt,Tu(re.display))}if(re&&this.collapsed&&!re.options.lineWrapping)for(var Ot=0;Ot<this.lines.length;++Ot){var Vt=cr(this.lines[Ot]),Ln=Ro(Vt);Ln>re.display.maxLineLength&&(re.display.maxLine=Vt,re.display.maxLineLength=Ln,re.display.maxLineChanged=!0)}Oe!=null&&re&&this.collapsed&&Ms(re,Oe,ze+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,re&&Xl(re.doc)),re&&Mi(re,"markerCleared",re,this,Oe,ze),pe&&oc(re),this.parent&&this.parent.clear()}},fn.prototype.find=function(re,pe){re==null&&this.type=="bookmark"&&(re=1);for(var De,Oe,ze=0;ze<this.lines.length;++ze){var at=this.lines[ze],bt=yo(at.markedSpans,this);if(bt.from!=null&&(De=qt(pe?at:At(at),bt.from),re==-1))return De;if(bt.to!=null&&(Oe=qt(pe?at:At(at),bt.to),re==1))return Oe}return De&&{from:De,to:Oe}},fn.prototype.changed=function(){var re=this,pe=this.find(-1,!0),De=this,Oe=this.doc.cm;!pe||!Oe||Lt(Oe,function(){var ze=pe.line,at=At(pe.line),bt=Gu(Oe,at);if(bt&&(ka(bt),Oe.curOp.selectionChanged=Oe.curOp.forceUpdate=!0),Oe.curOp.updateMaxLine=!0,!Qn(De.doc,ze)&&De.height!=null){var Dt=De.height;De.height=null;var Ot=Ia(De)-Dt;Ot&&rn(ze,ze.height+Ot)}Mi(Oe,"markerChanged",Oe,re)})},fn.prototype.attachLine=function(re){if(!this.lines.length&&this.doc.cm){var pe=this.doc.cm.curOp;(!pe.maybeHiddenMarkers||dt(pe.maybeHiddenMarkers,this)==-1)&&(pe.maybeUnhiddenMarkers||(pe.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(re)},fn.prototype.detachLine=function(re){if(this.lines.splice(dt(this.lines,re),1),!this.lines.length&&this.doc.cm){var pe=this.doc.cm.curOp;(pe.maybeHiddenMarkers||(pe.maybeHiddenMarkers=[])).push(this)}},oi(fn);function Bc(re,pe,De,Oe,ze){if(Oe&&Oe.shared)return vf(re,pe,De,Oe,ze);if(re.cm&&!re.cm.curOp)return Sn(re.cm,Bc)(re,pe,De,Oe,ze);var at=new fn(re,ze),bt=on(pe,De);if(Oe&&Ft(Oe,at,!1),bt>0||bt==0&&at.clearWhenEmpty!==!1)return at;if(at.replacedWith&&(at.collapsed=!0,at.widgetNode=Qe("span",[at.replacedWith],"CodeMirror-widget"),Oe.handleMouseEvents||at.widgetNode.setAttribute("cm-ignore-events","true"),Oe.insertLeft&&(at.widgetNode.insertLeft=!0)),at.collapsed){if(Kr(re,pe.line,pe,De,at)||pe.line!=De.line&&Kr(re,De.line,pe,De,at))throw new Error("Inserting collapsed marker partially overlapping an existing one");In()}at.addToHistory&&Zo(re,{from:pe,to:De,origin:"markText"},re.sel,NaN);var Dt=pe.line,Ot=re.cm,Vt;if(re.iter(Dt,De.line+1,function(Qt){Ot&&at.collapsed&&!Ot.options.lineWrapping&&cr(Qt)==Ot.display.maxLine&&(Vt=!0),at.collapsed&&Dt!=pe.line&&rn(Qt,0),bo(Qt,new pr(at,Dt==pe.line?pe.ch:null,Dt==De.line?De.ch:null)),++Dt}),at.collapsed&&re.iter(pe.line,De.line+1,function(Qt){Qn(re,Qt)&&rn(Qt,0)}),at.clearOnEnter&&Jt(at,"beforeCursorEnter",function(){return at.clear()}),at.readOnly&&(Br(),(re.history.done.length||re.history.undone.length)&&re.clearHistory()),at.collapsed&&(at.id=++mf,at.atomic=!0),Ot){if(Vt&&(Ot.curOp.updateMaxLine=!0),at.collapsed)Ms(Ot,pe.line,De.line+1);else if(at.className||at.startStyle||at.endStyle||at.css||at.attributes||at.title)for(var Ln=pe.line;Ln<=De.line;Ln++)xo(Ot,Ln,"text");at.atomic&&Xl(Ot.doc),Mi(Ot,"markerAdded",Ot,at)}return at}var ac=function(re,pe){this.markers=re,this.primary=pe;for(var De=0;De<re.length;++De)re[De].parent=this};ac.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var re=0;re<this.markers.length;++re)this.markers[re].clear();Mi(this,"clear")}},ac.prototype.find=function(re,pe){return this.primary.find(re,pe)},oi(ac);function vf(re,pe,De,Oe,ze){Oe=Ft(Oe),Oe.shared=!1;var at=[Bc(re,pe,De,Oe,ze)],bt=at[0],Dt=Oe.widgetNode;return rs(re,function(Ot){Dt&&(Oe.widgetNode=Dt.cloneNode(!0)),at.push(Bc(Ot,Fn(Ot,pe),Fn(Ot,De),Oe,ze));for(var Vt=0;Vt<Ot.linked.length;++Vt)if(Ot.linked[Vt].isParent)return;bt=Ut(at)}),new ac(at,bt)}function Ph(re){return re.findMarks(qt(re.first,0),re.clipPos(qt(re.lastLine())),function(pe){return pe.parent})}function oh(re,pe){for(var De=0;De<pe.length;De++){var Oe=pe[De],ze=Oe.find(),at=re.clipPos(ze.from),bt=re.clipPos(ze.to);if(on(at,bt)){var Dt=Bc(re,at,bt,Oe.primary,Oe.primary.type);Oe.markers.push(Dt),Dt.parent=Oe}}}function Rd(re){for(var pe=function(Oe){var ze=re[Oe],at=[ze.primary.doc];rs(ze.primary.doc,function(Ot){return at.push(Ot)});for(var bt=0;bt<ze.markers.length;bt++){var Dt=ze.markers[bt];dt(at,Dt.doc)==-1&&(Dt.parent=null,ze.markers.splice(bt--,1))}},De=0;De<re.length;De++)pe(De)}var Kp=0,Ba=function(re,pe,De,Oe,ze){if(!(this instanceof Ba))return new Ba(re,pe,De,Oe,ze);De==null&&(De=0),os.call(this,[new zs([new Xo("",null)])]),this.first=De,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=De;var at=qt(De,0);this.sel=vr(at),this.history=new br(null),this.id=++Kp,this.modeOption=pe,this.lineSep=Oe,this.direction=ze=="rtl"?"rtl":"ltr",this.extend=!1,typeof re=="string"&&(re=this.splitLines(re)),Yr(this,{from:at,to:at,text:re}),As(this,vr(at),vt)};Ba.prototype=We(os.prototype,{constructor:Ba,iter:function(re,pe,De){De?this.iterN(re-this.first,pe-re,De):this.iterN(this.first,this.first+this.size,re)},insert:function(re,pe){for(var De=0,Oe=0;Oe<pe.length;++Oe)De+=pe[Oe].height;this.insertInner(re-this.first,pe,De)},remove:function(re,pe){this.removeInner(re-this.first,pe)},getValue:function(re){var pe=dn(this,this.first,this.first+this.size);return re===!1?pe:pe.join(re||this.lineSeparator())},setValue:sn(function(re){var pe=qt(this.first,0),De=this.first+this.size-1;oa(this,{from:pe,to:qt(De,cn(this,De).text.length),text:this.splitLines(re),origin:"setValue",full:!0},!0),this.cm&&ro(this.cm,0,0),As(this,vr(pe),vt)}),replaceRange:function(re,pe,De,Oe){pe=Fn(this,pe),De=De?Fn(this,De):pe,sc(this,re,pe,De,Oe)},getRange:function(re,pe,De){var Oe=bn(this,Fn(this,re),Fn(this,pe));return De===!1?Oe:Oe.join(De||this.lineSeparator())},getLine:function(re){var pe=this.getLineHandle(re);return pe&&pe.text},getLineHandle:function(re){if(En(this,re))return cn(this,re)},getLineNumber:function(re){return At(re)},getLineHandleVisualStart:function(re){return typeof re=="number"&&(re=cn(this,re)),cr(re)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(re){return Fn(this,re)},getCursor:function(re){var pe=this.sel.primary(),De;return re==null||re=="head"?De=pe.head:re=="anchor"?De=pe.anchor:re=="end"||re=="to"||re===!1?De=pe.to():De=pe.from(),De},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:sn(function(re,pe,De){Ts(this,Fn(this,typeof re=="number"?qt(re,pe||0):re),null,De)}),setSelection:sn(function(re,pe,De){Ts(this,Fn(this,re),Fn(this,pe||re),De)}),extendSelection:sn(function(re,pe,De){Qo(this,Fn(this,re),pe&&Fn(this,pe),De)}),extendSelections:sn(function(re,pe){qo(this,Ii(this,re),pe)}),extendSelectionsBy:sn(function(re,pe){var De=Wt(this.sel.ranges,re);qo(this,Ii(this,De),pe)}),setSelections:sn(function(re,pe,De){if(re.length){for(var Oe=[],ze=0;ze<re.length;ze++)Oe[ze]=new Ci(Fn(this,re[ze].anchor),Fn(this,re[ze].head));pe==null&&(pe=Math.min(re.length-1,this.sel.primIndex)),As(this,Gi(this.cm,Oe,pe),De)}}),addSelection:sn(function(re,pe,De){var Oe=this.sel.ranges.slice(0);Oe.push(new Ci(Fn(this,re),Fn(this,pe||re))),As(this,Gi(this.cm,Oe,Oe.length-1),De)}),getSelection:function(re){for(var pe=this.sel.ranges,De,Oe=0;Oe<pe.length;Oe++){var ze=bn(this,pe[Oe].from(),pe[Oe].to());De=De?De.concat(ze):ze}return re===!1?De:De.join(re||this.lineSeparator())},getSelections:function(re){for(var pe=[],De=this.sel.ranges,Oe=0;Oe<De.length;Oe++){var ze=bn(this,De[Oe].from(),De[Oe].to());re!==!1&&(ze=ze.join(re||this.lineSeparator())),pe[Oe]=ze}return pe},replaceSelection:function(re,pe,De){for(var Oe=[],ze=0;ze<this.sel.ranges.length;ze++)Oe[ze]=re;this.replaceSelections(Oe,pe,De||"+input")},replaceSelections:sn(function(re,pe,De){for(var Oe=[],ze=this.sel,at=0;at<ze.ranges.length;at++){var bt=ze.ranges[at];Oe[at]={from:bt.from(),to:bt.to(),text:this.splitLines(re[at]),origin:De}}for(var Dt=pe&&pe!="end"&&so(this,Oe,pe),Ot=Oe.length-1;Ot>=0;Ot--)oa(this,Oe[Ot]);Dt?jo(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,De=0,Oe=0;Oe<re.done.length;Oe++)re.done[Oe].ranges||++pe;for(var ze=0;ze<re.undone.length;ze++)re.undone[ze].ranges||++De;return{undo:pe,redo:De}},clearHistory:function(){var re=this;this.history=new br(this.history.maxGeneration),rs(this,function(pe){return pe.history=re.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(re){return re&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(re){return this.history.generation==(re||this.cleanGeneration)},getHistory:function(){return{done:Js(this.history.done),undone:Js(this.history.undone)}},setHistory:function(re){var pe=this.history=new br(this.history.maxGeneration);pe.done=Js(re.done.slice(0),null,!0),pe.undone=Js(re.undone.slice(0),null,!0)},setGutterMarker:sn(function(re,pe,De){return wa(this,re,"gutter",function(Oe){var ze=Oe.gutterMarkers||(Oe.gutterMarkers={});return ze[pe]=De,!De&&He(ze)&&(Oe.gutterMarkers=null),!0})}),clearGutter:sn(function(re){var pe=this;this.iter(function(De){De.gutterMarkers&&De.gutterMarkers[re]&&wa(pe,De,"gutter",function(){return De.gutterMarkers[re]=null,He(De.gutterMarkers)&&(De.gutterMarkers=null),!0})})}),lineInfo:function(re){var pe;if(typeof re=="number"){if(!En(this,re)||(pe=re,re=cn(this,re),!re))return null}else if(pe=At(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,De){return wa(this,re,pe=="gutter"?"gutter":"class",function(Oe){var ze=pe=="text"?"textClass":pe=="background"?"bgClass":pe=="gutter"?"gutterClass":"wrapClass";if(!Oe[ze])Oe[ze]=De;else{if(Ce(De).test(Oe[ze]))return!1;Oe[ze]+=" "+De}return!0})}),removeLineClass:sn(function(re,pe,De){return wa(this,re,pe=="gutter"?"gutter":"class",function(Oe){var ze=pe=="text"?"textClass":pe=="background"?"bgClass":pe=="gutter"?"gutterClass":"wrapClass",at=Oe[ze];if(at)if(De==null)Oe[ze]=null;else{var bt=at.match(Ce(De));if(!bt)return!1;var Dt=bt.index+bt[0].length;Oe[ze]=at.slice(0,bt.index)+(!bt.index||Dt==at.length?"":" ")+at.slice(Dt)||null}else return!1;return!0})}),addLineWidget:sn(function(re,pe,De){return Nu(this,re,pe,De)}),removeLineWidget:function(re){re.clear()},markText:function(re,pe,De){return Bc(this,Fn(this,re),Fn(this,pe),De,De&&De.type||"range")},setBookmark:function(re,pe){var De={replacedWith:pe&&(pe.nodeType==null?pe.widget:pe),insertLeft:pe&&pe.insertLeft,clearWhenEmpty:!1,shared:pe&&pe.shared,handleMouseEvents:pe&&pe.handleMouseEvents};return re=Fn(this,re),Bc(this,re,re,De,"bookmark")},findMarksAt:function(re){re=Fn(this,re);var pe=[],De=cn(this,re.line).markedSpans;if(De)for(var Oe=0;Oe<De.length;++Oe){var ze=De[Oe];(ze.from==null||ze.from<=re.ch)&&(ze.to==null||ze.to>=re.ch)&&pe.push(ze.marker.parent||ze.marker)}return pe},findMarks:function(re,pe,De){re=Fn(this,re),pe=Fn(this,pe);var Oe=[],ze=re.line;return this.iter(re.line,pe.line+1,function(at){var bt=at.markedSpans;if(bt)for(var Dt=0;Dt<bt.length;Dt++){var Ot=bt[Dt];!(Ot.to!=null&&ze==re.line&&re.ch>=Ot.to||Ot.from==null&&ze!=re.line||Ot.from!=null&&ze==pe.line&&Ot.from>=pe.ch)&&(!De||De(Ot.marker))&&Oe.push(Ot.marker.parent||Ot.marker)}++ze}),Oe},getAllMarks:function(){var re=[];return this.iter(function(pe){var De=pe.markedSpans;if(De)for(var Oe=0;Oe<De.length;++Oe)De[Oe].from!=null&&re.push(De[Oe].marker)}),re},posFromIndex:function(re){var pe,De=this.first,Oe=this.lineSeparator().length;return this.iter(function(ze){var at=ze.text.length+Oe;if(at>re)return pe=re,!0;re-=at,++De}),Fn(this,qt(De,pe))},indexFromPos:function(re){re=Fn(this,re);var pe=re.ch;if(re.line<this.first||re.ch<0)return 0;var De=this.lineSeparator().length;return this.iter(this.first,re.line,function(Oe){pe+=Oe.text.length+De}),pe},copy:function(re){var pe=new Ba(dn(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,De=this.first+this.size;re.from!=null&&re.from>pe&&(pe=re.from),re.to!=null&&re.to<De&&(De=re.to);var Oe=new Ba(dn(this,pe,De),re.mode||this.modeOption,pe,this.lineSep,this.direction);return re.sharedHist&&(Oe.history=this.history),(this.linked||(this.linked=[])).push({doc:Oe,sharedHist:re.sharedHist}),Oe.linked=[{doc:this,isParent:!0,sharedHist:re.sharedHist}],oh(Oe,Ph(this)),Oe},unlinkDoc:function(re){if(re instanceof ys&&(re=re.doc),this.linked)for(var pe=0;pe<this.linked.length;++pe){var De=this.linked[pe];if(De.doc==re){this.linked.splice(pe,1),re.unlinkDoc(this),Rd(Ph(this));break}}if(re.history==this.history){var Oe=[re.id];rs(re,function(ze){return Oe.push(ze.id)},!0),re.history=new br(null),re.history.done=Js(this.history.done,Oe),re.history.undone=Js(this.history.undone,Oe)}},iterLinkedDocs:function(re){rs(this,re)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(re){return this.lineSep?re.split(this.lineSep):Mr(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))})}),Ba.prototype.eachLine=Ba.prototype.iter;var nd=0;function Bd(re){var pe=this;if(Yf(pe),!(kn(pe,re)||Ga(pe.display,re))){ai(re),be&&(nd=+new Date);var De=Da(pe,re,!0),Oe=re.dataTransfer.files;if(!(!De||pe.isReadOnly()))if(Oe&&Oe.length&&window.FileReader&&window.File)for(var ze=Oe.length,at=Array(ze),bt=0,Dt=function(){++bt==ze&&Sn(pe,function(){De=Fn(pe.doc,De);var jn={from:De,to:De,text:pe.doc.splitLines(at.filter(function(mi){return mi!=null}).join(pe.doc.lineSeparator())),origin:"paste"};oa(pe.doc,jn),jo(pe.doc,vr(Fn(pe.doc,De),Fn(pe.doc,qi(jn))))})()},Ot=function(jn,mi){if(pe.options.allowDropFileTypes&&dt(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}at[mi]=Bi,Dt()},_i.readAsText(jn)},Vt=0;Vt<Oe.length;Vt++)Ot(Oe[Vt],Vt);else{if(pe.state.draggingText&&pe.doc.sel.contains(De)>-1){pe.state.draggingText(re),setTimeout(function(){return pe.display.input.focus()},20);return}try{var Ln=re.dataTransfer.getData("Text");if(Ln){var Qt;if(pe.state.draggingText&&!pe.state.draggingText.copy&&(Qt=pe.listSelections()),La(pe.doc,vr(De,De)),Qt)for(var Un=0;Un<Qt.length;++Un)sc(pe.doc,"",Qt[Un].anchor,Qt[Un].head,"drag");pe.replaceSelection(Ln,"around","paste"),pe.display.input.focus()}}catch(jn){}}}}function id(re,pe){if(be&&(!re.state.draggingText||+new Date-nd<100)){Xi(pe);return}if(!(kn(re,pe)||Ga(re.display,pe))&&(pe.dataTransfer.setData("Text",re.getSelection()),pe.dataTransfer.effectAllowed="copyMove",pe.dataTransfer.setDragImage&&!ce)){var De=Ve("img",null,null,"position: fixed; left: 0; top: 0;");De.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",ge&&(De.width=De.height=1,re.display.wrapper.appendChild(De),De._top=De.offsetTop),pe.dataTransfer.setDragImage(De,0,0),ge&&De.parentNode.removeChild(De)}}function yf(re,pe){var De=Da(re,pe);if(De){var Oe=document.createDocumentFragment();Go(re,De,Oe),re.display.dragCursor||(re.display.dragCursor=Ve("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),re.display.lineSpace.insertBefore(re.display.dragCursor,re.display.cursorDiv)),je(re.display.dragCursor,Oe)}}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"),De=[],Oe=0;Oe<pe.length;Oe++){var ze=pe[Oe].CodeMirror;ze&&De.push(ze)}De.length&&De[0].operation(function(){for(var at=0;at<De.length;at++)re(De[at])})}}var Fd=!1;function ql(){Fd||(_h(),Fd=!0)}function _h(){var re;Jt(window,"resize",function(){re==null&&(re=setTimeout(function(){re=null,Sf(xf)},100))}),Jt(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 De,Oe,ze,at,bt=0;bt<pe.length-1;bt++){var Dt=pe[bt];if(/^(cmd|meta|m)$/i.test(Dt))at=!0;else if(/^a(lt)?$/i.test(Dt))De=!0;else if(/^(c|ctrl|control)$/i.test(Dt))Oe=!0;else if(/^s(hift)?$/i.test(Dt))ze=!0;else throw new Error("Unrecognized modifier name: "+Dt)}return De&&(re="Alt-"+re),Oe&&(re="Ctrl-"+re),at&&(re="Cmd-"+re),ze&&(re="Shift-"+re),re}function zd(re){var pe={};for(var De in re)if(re.hasOwnProperty(De)){var Oe=re[De];if(/^(name|fallthrough|(de|at)tach)$/.test(De))continue;if(Oe=="..."){delete re[De];continue}for(var ze=Wt(De.split(" "),jd),at=0;at<ze.length;at++){var bt=void 0,Dt=void 0;at==ze.length-1?(Dt=ze.join(" "),bt=Oe):(Dt=ze.slice(0,at+1).join(" "),bt="...");var Ot=pe[Dt];if(!Ot)pe[Dt]=bt;else if(Ot!=bt)throw new Error("Inconsistent bindings for "+Dt)}delete re[De]}for(var Vt in pe)re[Vt]=pe[Vt];return re}function eu(re,pe,De,Oe){pe=jc(pe);var ze=pe.call?pe.call(re,Oe):pe[re];if(ze===!1)return"nothing";if(ze==="...")return"multi";if(ze!=null&&De(ze))return"handled";if(pe.fallthrough){if(Object.prototype.toString.call(pe.fallthrough)!="[object Array]")return eu(re,pe.fallthrough,De,Oe);for(var at=0;at<pe.fallthrough.length;at++){var bt=eu(re,pe.fallthrough[at],De,Oe);if(bt)return bt}}}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,De){var Oe=re;return pe.altKey&&Oe!="Alt"&&(re="Alt-"+re),(ye?pe.metaKey:pe.ctrlKey)&&Oe!="Ctrl"&&(re="Ctrl-"+re),(ye?pe.ctrlKey:pe.metaKey)&&Oe!="Mod"&&(re="Cmd-"+re),!De&&pe.shiftKey&&Oe!="Shift"&&(re="Shift-"+re),re}function Ud(re,pe){if(ge&&re.keyCode==34&&re.char)return!1;var De=Ku[re.keyCode];return De==null||re.altGraphKey?!1:(re.keyCode==3&&re.code&&(De=re.code),Hd(De,re,pe))}function jc(re){return typeof re=="string"?Ll[re]:re}function fl(re,pe){for(var De=re.doc.sel.ranges,Oe=[],ze=0;ze<De.length;ze++){for(var at=pe(De[ze]);Oe.length&&on(at.from,Ut(Oe).to)<=0;){var bt=Oe.pop();if(on(bt.from,at.from)<0){at.from=bt.from;break}}Oe.push(at)}Lt(re,function(){for(var Dt=Oe.length-1;Dt>=0;Dt--)sc(re.doc,"",Oe[Dt].from,Oe[Dt].to,"+delete");ic(re)})}function Gd(re,pe,De){var Oe=Ae(re.text,pe+De,De);return Oe<0||Oe>re.text.length?null:Oe}function ba(re,pe,De){var Oe=Gd(re,pe.ch,De);return Oe==null?null:new qt(pe.line,Oe,De<0?"after":"before")}function fs(re,pe,De,Oe,ze){if(re){pe.doc.direction=="rtl"&&(ze=-ze);var at=tn(De,pe.doc.direction);if(at){var bt=ze<0?Ut(at):at[0],Dt=ze<0==(bt.level==1),Ot=Dt?"after":"before",Vt;if(bt.level>0||pe.doc.direction=="rtl"){var Ln=Lu(pe,De);Vt=ze<0?De.text.length-1:0;var Qt=bl(pe,Ln,Vt).top;Vt=Ue(function(Un){return bl(pe,Ln,Un).top==Qt},ze<0==(bt.level==1)?bt.from:bt.to-1,Vt),Ot=="before"&&(Vt=Gd(De,Vt,1))}else Vt=ze<0?bt.to:bt.from;return new qt(Oe,Vt,Ot)}}return new qt(Oe,ze<0?De.text.length:0,ze<0?"before":"after")}function Ys(re,pe,De,Oe){var ze=tn(pe,re.doc.direction);if(!ze)return ba(pe,De,Oe);De.ch>=pe.text.length?(De.ch=pe.text.length,De.sticky="before"):De.ch<=0&&(De.ch=0,De.sticky="after");var at=lt(ze,De.ch,De.sticky),bt=ze[at];if(re.doc.direction=="ltr"&&bt.level%2==0&&(Oe>0?bt.to>De.ch:bt.from<De.ch))return ba(pe,De,Oe);var Dt=function(tr,Dr){return Gd(pe,tr instanceof qt?tr.ch:tr,Dr)},Ot,Vt=function(tr){return re.options.lineWrapping?(Ot=Ot||Lu(re,pe),bc(re,pe,Ot,tr)):{begin:0,end:pe.text.length}},Ln=Vt(De.sticky=="before"?Dt(De,-1):De.ch);if(re.doc.direction=="rtl"||bt.level==1){var Qt=bt.level==1==Oe<0,Un=Dt(De,Qt?1:-1);if(Un!=null&&(Qt?Un<=bt.to&&Un<=Ln.end:Un>=bt.from&&Un>=Ln.begin)){var jn=Qt?"before":"after";return new qt(De.line,Un,jn)}}var mi=function(tr,Dr,Sr){for(var Zr=function(ca,Ya){return Ya?new qt(De.line,Dt(ca,1),"before"):new qt(De.line,ca,"after")};tr>=0&&tr<ze.length;tr+=Dr){var wo=ze[tr],yr=Dr>0==(wo.level!=1),zo=yr?Sr.begin:Dt(Sr.end,-1);if(wo.from<=zo&&zo<wo.to||(zo=yr?wo.from:Dt(wo.to,-1),Sr.begin<=zo&&zo<Sr.end))return Zr(zo,yr)}},_i=mi(at+Oe,Oe,Ln);if(_i)return _i;var Bi=Oe>0?Ln.end:Dt(Ln.begin,-1);return Bi!=null&&!(Oe>0&&Bi==pe.text.length)&&(_i=mi(Oe>0?0:ze.length-1,Oe,Vt(Bi)),_i)?_i:null}var Va={selectAll:gs,singleSelection:function(re){return re.setSelection(re.getCursor("anchor"),re.getCursor("head"),vt)},killLine:function(re){return fl(re,function(pe){if(pe.empty()){var De=cn(re.doc,pe.head.line).text.length;return pe.head.ch==De&&pe.head.line<re.lastLine()?{from:pe.head,to:qt(pe.head.line+1,0)}:{from:pe.head,to:qt(pe.head.line,De)}}else return{from:pe.from(),to:pe.to()}})},deleteLine:function(re){return fl(re,function(pe){return{from:qt(pe.from().line,0),to:Fn(re.doc,qt(pe.to().line+1,0))}})},delLineLeft:function(re){return fl(re,function(pe){return{from:qt(pe.from().line,0),to:pe.from()}})},delWrappedLineLeft:function(re){return fl(re,function(pe){var De=re.charCoords(pe.head,"div").top+5,Oe=re.coordsChar({left:0,top:De},"div");return{from:Oe,to:pe.from()}})},delWrappedLineRight:function(re){return fl(re,function(pe){var De=re.charCoords(pe.head,"div").top+5,Oe=re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:De},"div");return{from:pe.from(),to:Oe}})},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(qt(re.firstLine(),0))},goDocEnd:function(re){return re.extendSelection(qt(re.lastLine()))},goLineStart:function(re){return re.extendSelectionsBy(function(pe){return fu(re,pe.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(re){return re.extendSelectionsBy(function(pe){return Wd(re,pe.head)},{origin:"+move",bias:1})},goLineEnd:function(re){return re.extendSelectionsBy(function(pe){return pu(re,pe.head.line)},{origin:"+move",bias:-1})},goLineRight:function(re){return re.extendSelectionsBy(function(pe){var De=re.cursorCoords(pe.head,"div").top+5;return re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:De},"div")},jt)},goLineLeft:function(re){return re.extendSelectionsBy(function(pe){var De=re.cursorCoords(pe.head,"div").top+5;return re.coordsChar({left:0,top:De},"div")},jt)},goLineLeftSmart:function(re){return re.extendSelectionsBy(function(pe){var De=re.cursorCoords(pe.head,"div").top+5,Oe=re.coordsChar({left:0,top:De},"div");return Oe.ch<re.getLine(Oe.line).search(/\S/)?Wd(re,pe.head):Oe},jt)},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=[],De=re.listSelections(),Oe=re.options.tabSize,ze=0;ze<De.length;ze++){var at=De[ze].from(),bt=ht(re.getLine(at.line),at.ch,Oe);pe.push(xn(Oe-bt%Oe))}re.replaceSelections(pe)},defaultTab:function(re){re.somethingSelected()?re.indentSelection("add"):re.execCommand("insertTab")},transposeChars:function(re){return Lt(re,function(){for(var pe=re.listSelections(),De=[],Oe=0;Oe<pe.length;Oe++)if(pe[Oe].empty()){var ze=pe[Oe].head,at=cn(re.doc,ze.line).text;if(at){if(ze.ch==at.length&&(ze=new qt(ze.line,ze.ch-1)),ze.ch>0)ze=new qt(ze.line,ze.ch+1),re.replaceRange(at.charAt(ze.ch-1)+at.charAt(ze.ch-2),qt(ze.line,ze.ch-2),ze,"+transpose");else if(ze.line>re.doc.first){var bt=cn(re.doc,ze.line-1).text;bt&&(ze=new qt(ze.line,1),re.replaceRange(at.charAt(0)+re.doc.lineSeparator()+bt.charAt(bt.length-1),qt(ze.line-1,bt.length-1),ze,"+transpose"))}}De.push(new Ci(ze,ze))}re.setSelections(De)})},newlineAndIndent:function(re){return Lt(re,function(){for(var pe=re.listSelections(),De=pe.length-1;De>=0;De--)re.replaceRange(re.doc.lineSeparator(),pe[De].anchor,pe[De].head,"+input");pe=re.listSelections();for(var Oe=0;Oe<pe.length;Oe++)re.indentLine(pe[Oe].from().line,null,!0);ic(re)})},openLine:function(re){return re.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(re){return re.toggleOverwrite()}};function fu(re,pe){var De=cn(re.doc,pe),Oe=cr(De);return Oe!=De&&(pe=At(Oe)),fs(!0,re,Oe,pe,1)}function pu(re,pe){var De=cn(re.doc,pe),Oe=qr(De);return Oe!=De&&(pe=At(Oe)),fs(!0,re,De,pe,-1)}function Wd(re,pe){var De=fu(re,pe.line),Oe=cn(re.doc,De.line),ze=tn(Oe,re.doc.direction);if(!ze||ze[0].level==0){var at=Math.max(De.ch,Oe.text.search(/\S/)),bt=pe.line==De.line&&pe.ch<=at&&pe.ch;return qt(De.line,bt?0:at,De.sticky)}return De}function zc(re,pe,De){if(typeof pe=="string"&&(pe=Va[pe],!pe))return!1;re.display.input.ensurePolled();var Oe=re.display.shift,ze=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),De&&(re.display.shift=!1),ze=pe(re)!=_t}finally{re.display.shift=Oe,re.state.suppressEdits=!1}return ze}function rd(re,pe,De){for(var Oe=0;Oe<re.state.keyMaps.length;Oe++){var ze=eu(pe,re.state.keyMaps[Oe],De,re);if(ze)return ze}return re.options.extraKeys&&eu(pe,re.options.extraKeys,De,re)||eu(pe,re.options.keyMap,De,re)}var Ou=new rt;function Ec(re,pe,De,Oe){var ze=re.state.keySeq;if(ze){if(Lh(pe))return"handled";if(/\'$/.test(pe)?re.state.keySeq=null:Ou.set(50,function(){re.state.keySeq==ze&&(re.state.keySeq=null,re.display.input.reset())}),Xf(re,ze+" "+pe,De,Oe))return!0}return Xf(re,pe,De,Oe)}function Xf(re,pe,De,Oe){var ze=rd(re,pe,Oe);return ze=="multi"&&(re.state.keySeq=pe),ze=="handled"&&Mi(re,"keyHandled",re,pe,De),(ze=="handled"||ze=="multi")&&(ai(De),vs(re)),!!ze}function Jf(re,pe){var De=Ud(pe,!0);return De?pe.shiftKey&&!re.state.keySeq?Ec(re,"Shift-"+De,pe,function(Oe){return zc(re,Oe,!0)})||Ec(re,De,pe,function(Oe){if(typeof Oe=="string"?/^go[A-Z]/.test(Oe):Oe.motion)return zc(re,Oe)}):Ec(re,De,pe,function(Oe){return zc(re,Oe)}):!1}function Qf(re,pe,De){return Ec(re,"'"+De+"'",pe,function(Oe){return zc(re,Oe,!0)})}var od=null;function Vp(re){var pe=this;if(!(re.target&&re.target!=pe.display.input.getField())&&(pe.curOp.focus=ct(),!kn(pe,re))){be&&Pe<11&&re.keyCode==27&&(re.returnValue=!1);var De=re.keyCode;pe.display.shift=De==16||re.shiftKey;var Oe=Jf(pe,re);ge&&(od=Oe?De:null,!Oe&&De==88&&!Rr&&(oe?re.metaKey:re.ctrlKey)&&pe.replaceSelection("",null,"cut")),Le&&!oe&&!Oe&&De==46&&re.shiftKey&&!re.ctrlKey&&document.execCommand&&document.execCommand("cut"),De==18&&!/\bCodeMirror-crosshair\b/.test(pe.display.lineDiv.className)&&$p(pe)}}function $p(re){var pe=re.display.lineDiv;Ct(pe,"CodeMirror-crosshair");function De(Oe){(Oe.keyCode==18||!Oe.altKey)&&(ke(pe,"CodeMirror-crosshair"),Mn(document,"keyup",De),Mn(document,"mouseover",De))}Jt(document,"keyup",De),Jt(document,"mouseover",De)}function Yp(re){re.keyCode==16&&(this.doc.sel.shift=!1),kn(this,re)}function Lc(re){var pe=this;if(!(re.target&&re.target!=pe.display.input.getField())&&!(Ga(pe.display,re)||kn(pe,re)||re.ctrlKey&&!re.altKey||oe&&re.metaKey)){var De=re.keyCode,Oe=re.charCode;if(ge&&De==od){od=null,ai(re);return}if(!(ge&&(!re.which||re.which<10)&&Jf(pe,re))){var ze=String.fromCharCode(Oe==null?De:Oe);ze!="\b"&&(Qf(pe,re,ze)||pe.display.input.onKeyPress(re))}}}var om=400,Xp=function(re,pe,De){this.time=re,this.pos=pe,this.button=De};Xp.prototype.compare=function(re,pe,De){return this.time+om>re&&on(pe,this.pos)==0&&De==this.button};var Zd,sd;function Jp(re,pe){var De=+new Date;return sd&&sd.compare(De,re,pe)?(Zd=sd=null,"triple"):Zd&&Zd.compare(De,re,pe)?(sd=new Xp(De,re,pe),Zd=null,"double"):(Zd=new Xp(De,re,pe),sd=null,"single")}function Mc(re){var pe=this,De=pe.display;if(!(kn(pe,re)||De.activeTouch&&De.input.supportsTouch())){if(De.input.ensurePolled(),De.shift=re.shiftKey,Ga(De,re)){he||(De.scroller.draggable=!1,setTimeout(function(){return De.scroller.draggable=!0},100));return}if(!tp(pe,re)){var Oe=Da(pe,re),ze=ar(re),at=Oe?Jp(Oe,ze):"single";window.focus(),ze==1&&pe.state.selectingText&&pe.state.selectingText(re),!(Oe&&Qp(pe,ze,Oe,at,re))&&(ze==1?Oe?sm(pe,Oe,at,re):or(re)==De.scroller&&ai(re):ze==2?(Oe&&Qo(pe.doc,Oe),setTimeout(function(){return De.input.focus()},20)):ze==3&&(we?pe.display.input.onContextMenu(re):Bs(pe)))}}}function Qp(re,pe,De,Oe,ze){var at="Click";return Oe=="double"?at="Double"+at:Oe=="triple"&&(at="Triple"+at),at=(pe==1?"Left":pe==2?"Middle":"Right")+at,Ec(re,Hd(at,ze),ze,function(bt){if(typeof bt=="string"&&(bt=Va[bt]),!bt)return!1;var Dt=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),Dt=bt(re,De)!=_t}finally{re.state.suppressEdits=!1}return Dt})}function qf(re,pe,De){var Oe=re.getOption("configureMouse"),ze=Oe?Oe(re,pe,De):{};if(ze.unit==null){var at=ie?De.shiftKey&&De.metaKey:De.altKey;ze.unit=at?"rectangle":pe=="single"?"char":pe=="double"?"word":"line"}return(ze.extend==null||re.doc.extend)&&(ze.extend=re.doc.extend||De.shiftKey),ze.addNew==null&&(ze.addNew=oe?De.metaKey:De.ctrlKey),ze.moveOnDrag==null&&(ze.moveOnDrag=!(oe?De.altKey:De.ctrlKey)),ze}function sm(re,pe,De,Oe){be?setTimeout(ut(ds,re),0):re.curOp.focus=ct();var ze=qf(re,De,Oe),at=re.doc.sel,bt;re.options.dragDrop&&dr&&!re.isReadOnly()&&De=="single"&&(bt=at.contains(pe))>-1&&(on((bt=at.ranges[bt]).from(),pe)<0||pe.xRel>0)&&(on(bt.to(),pe)>0||pe.xRel<0)?qp(re,Oe,pe,ze):nv(re,Oe,pe,ze)}function qp(re,pe,De,Oe){var ze=re.display,at=!1,bt=Sn(re,function(Vt){he&&(ze.scroller.draggable=!1),re.state.draggingText=!1,Mn(ze.wrapper.ownerDocument,"mouseup",bt),Mn(ze.wrapper.ownerDocument,"mousemove",Dt),Mn(ze.scroller,"dragstart",Ot),Mn(ze.scroller,"drop",bt),at||(ai(Vt),Oe.addNew||Qo(re.doc,De,null,null,Oe.extend),he&&!ce||be&&Pe==9?setTimeout(function(){ze.wrapper.ownerDocument.body.focus({preventScroll:!0}),ze.input.focus()},20):ze.input.focus())}),Dt=function(Vt){at=at||Math.abs(pe.clientX-Vt.clientX)+Math.abs(pe.clientY-Vt.clientY)>=10},Ot=function(){return at=!0};he&&(ze.scroller.draggable=!0),re.state.draggingText=bt,bt.copy=!Oe.moveOnDrag,ze.scroller.dragDrop&&ze.scroller.dragDrop(),Jt(ze.wrapper.ownerDocument,"mouseup",bt),Jt(ze.wrapper.ownerDocument,"mousemove",Dt),Jt(ze.scroller,"dragstart",Ot),Jt(ze.scroller,"drop",bt),Bs(re),setTimeout(function(){return ze.input.focus()},20)}function eg(re,pe,De){if(De=="char")return new Ci(pe,pe);if(De=="word")return re.findWordAt(pe);if(De=="line")return new Ci(qt(pe.line,0),Fn(re.doc,qt(pe.line+1,0)));var Oe=De(re,pe);return new Ci(Oe.from,Oe.to)}function nv(re,pe,De,Oe){var ze=re.display,at=re.doc;ai(pe);var bt,Dt,Ot=at.sel,Vt=Ot.ranges;if(Oe.addNew&&!Oe.extend?(Dt=at.sel.contains(De),Dt>-1?bt=Vt[Dt]:bt=new Ci(De,De)):(bt=at.sel.primary(),Dt=at.sel.primIndex),Oe.unit=="rectangle")Oe.addNew||(bt=new Ci(De,De)),De=Da(re,pe,!0,!0),Dt=-1;else{var Ln=eg(re,De,Oe.unit);Oe.extend?bt=Pl(bt,Ln.anchor,Ln.head,Oe.extend):bt=Ln}Oe.addNew?Dt==-1?(Dt=Vt.length,As(at,Gi(re,Vt.concat([bt]),Dt),{scroll:!1,origin:"*mouse"})):Vt.length>1&&Vt[Dt].empty()&&Oe.unit=="char"&&!Oe.extend?(As(at,Gi(re,Vt.slice(0,Dt).concat(Vt.slice(Dt+1)),0),{scroll:!1,origin:"*mouse"}),Ot=at.sel):xs(at,Dt,bt,Bt):(Dt=0,As(at,new Yi([bt],0),Bt),Ot=at.sel);var Qt=De;function Un(Sr){if(on(Qt,Sr)!=0)if(Qt=Sr,Oe.unit=="rectangle"){for(var Zr=[],wo=re.options.tabSize,yr=ht(cn(at,De.line).text,De.ch,wo),zo=ht(cn(at,Sr.line).text,Sr.ch,wo),ca=Math.min(yr,zo),Ya=Math.max(yr,zo),va=Math.min(De.line,Sr.line),nu=Math.min(re.lastLine(),Math.max(De.line,Sr.line));va<=nu;va++){var Ml=cn(at,va).text,ja=un(Ml,ca,wo);ca==Ya?Zr.push(new Ci(qt(va,ja),qt(va,ja))):Ml.length>ja&&Zr.push(new Ci(qt(va,ja),qt(va,un(Ml,Ya,wo))))}Zr.length||Zr.push(new Ci(De,De)),As(at,Gi(re,Ot.ranges.slice(0,Dt).concat(Zr),Dt),{origin:"*mouse",scroll:!1}),re.scrollIntoView(Sr)}else{var gu=bt,pl=eg(re,Sr,Oe.unit),za=gu.anchor,ws;on(pl.anchor,za)>0?(ws=pl.head,za=Hn(gu.from(),pl.anchor)):(ws=pl.anchor,za=qn(gu.to(),pl.head));var Ca=Ot.ranges.slice(0);Ca[Dt]=am(re,new Ci(Fn(at,za),ws)),As(at,Gi(re,Ca,Dt),Bt)}}var jn=ze.wrapper.getBoundingClientRect(),mi=0;function _i(Sr){var Zr=++mi,wo=Da(re,Sr,!0,Oe.unit=="rectangle");if(wo)if(on(wo,Qt)!=0){re.curOp.focus=ct(),Un(wo);var yr=Wo(ze,at);(wo.line>=yr.to||wo.line<yr.from)&&setTimeout(Sn(re,function(){mi==Zr&&_i(Sr)}),150)}else{var zo=Sr.clientY<jn.top?-20:Sr.clientY>jn.bottom?20:0;zo&&setTimeout(Sn(re,function(){mi==Zr&&(ze.scroller.scrollTop+=zo,_i(Sr))}),50)}}function Bi(Sr){re.state.selectingText=!1,mi=1/0,Sr&&(ai(Sr),ze.input.focus()),Mn(ze.wrapper.ownerDocument,"mousemove",tr),Mn(ze.wrapper.ownerDocument,"mouseup",Dr),at.history.lastSelOrigin=null}var tr=Sn(re,function(Sr){Sr.buttons===0||!ar(Sr)?Bi(Sr):_i(Sr)}),Dr=Sn(re,Bi);re.state.selectingText=Dr,Jt(ze.wrapper.ownerDocument,"mousemove",tr),Jt(ze.wrapper.ownerDocument,"mouseup",Dr)}function am(re,pe){var De=pe.anchor,Oe=pe.head,ze=cn(re.doc,De.line);if(on(De,Oe)==0&&De.sticky==Oe.sticky)return pe;var at=tn(ze);if(!at)return pe;var bt=lt(at,De.ch,De.sticky),Dt=at[bt];if(Dt.from!=De.ch&&Dt.to!=De.ch)return pe;var Ot=bt+(Dt.from==De.ch==(Dt.level!=1)?0:1);if(Ot==0||Ot==at.length)return pe;var Vt;if(Oe.line!=De.line)Vt=(Oe.line-De.line)*(re.doc.direction=="ltr"?1:-1)>0;else{var Ln=lt(at,Oe.ch,Oe.sticky),Qt=Ln-bt||(Oe.ch-De.ch)*(Dt.level==1?-1:1);Ln==Ot-1||Ln==Ot?Vt=Qt<0:Vt=Qt>0}var Un=at[Ot+(Vt?-1:0)],jn=Vt==(Un.level==1),mi=jn?Un.from:Un.to,_i=jn?"after":"before";return De.ch==mi&&De.sticky==_i?pe:new Ci(new qt(De.line,mi,_i),Oe)}function ep(re,pe,De,Oe){var ze,at;if(pe.touches)ze=pe.touches[0].clientX,at=pe.touches[0].clientY;else try{ze=pe.clientX,at=pe.clientY}catch(Un){return!1}if(ze>=Math.floor(re.display.gutters.getBoundingClientRect().right))return!1;Oe&&ai(pe);var bt=re.display,Dt=bt.lineDiv.getBoundingClientRect();if(at>Dt.bottom||!An(re,De))return Pi(pe);at-=Dt.top-bt.viewOffset;for(var Ot=0;Ot<re.display.gutterSpecs.length;++Ot){var Vt=bt.gutters.childNodes[Ot];if(Vt&&Vt.getBoundingClientRect().right>=ze){var Ln=an(re.doc,at),Qt=re.display.gutterSpecs[Ot];return yn(re,De,re,Ln,Qt.className,pe),Pi(pe)}}}function tp(re,pe){return ep(re,pe,"gutterClick",!0)}function np(re,pe){Ga(re.display,pe)||lm(re,pe)||kn(re,pe,"contextmenu")||we||re.display.input.onContextMenu(pe)}function lm(re,pe){return An(re,"gutterContextMenu")?ep(re,pe,"gutterContextMenu",!1):!1}function ip(re){re.display.wrapper.className=re.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+re.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ds(re)}var Mh={toString:function(){return"CodeMirror.Init"}},tg={},wf={};function um(re){var pe=re.optionHandlers;function De(Oe,ze,at,bt){re.defaults[Oe]=ze,at&&(pe[Oe]=bt?function(Dt,Ot,Vt){Vt!=Mh&&at(Dt,Ot,Vt)}:at)}re.defineOption=De,re.Init=Mh,De("value","",function(Oe,ze){return Oe.setValue(ze)},!0),De("mode",null,function(Oe,ze){Oe.doc.modeOption=ze,Tr(Oe)},!0),De("indentUnit",2,Tr,!0),De("indentWithTabs",!1),De("smartIndent",!0),De("tabSize",4,function(Oe){No(Oe),Ds(Oe),Ms(Oe)},!0),De("lineSeparator",null,function(Oe,ze){if(Oe.doc.lineSep=ze,!!ze){var at=[],bt=Oe.doc.first;Oe.doc.iter(function(Ot){for(var Vt=0;;){var Ln=Ot.text.indexOf(ze,Vt);if(Ln==-1)break;Vt=Ln+ze.length,at.push(qt(bt,Ln))}bt++});for(var Dt=at.length-1;Dt>=0;Dt--)sc(Oe.doc,ze,at[Dt],qt(at[Dt].line,at[Dt].ch+ze.length))}}),De("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(Oe,ze,at){Oe.state.specialChars=new RegExp(ze.source+(ze.test(" ")?"":"| "),"g"),at!=Mh&&Oe.refresh()}),De("specialCharPlaceholder",Is,function(Oe){return Oe.refresh()},!0),De("electricChars",!0),De("inputStyle",ee?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),De("spellcheck",!1,function(Oe,ze){return Oe.getInputField().spellcheck=ze},!0),De("autocorrect",!1,function(Oe,ze){return Oe.getInputField().autocorrect=ze},!0),De("autocapitalize",!1,function(Oe,ze){return Oe.getInputField().autocapitalize=ze},!0),De("rtlMoveVisually",!se),De("wholeLineUpdateBefore",!0),De("theme","default",function(Oe){ip(Oe),ti(Oe)},!0),De("keyMap","default",function(Oe,ze,at){var bt=jc(ze),Dt=at!=Mh&&jc(at);Dt&&Dt.detach&&Dt.detach(Oe,bt),bt.attach&&bt.attach(Oe,Dt||null)}),De("extraKeys",null),De("configureMouse",null),De("lineWrapping",!1,cm,!0),De("gutters",[],function(Oe,ze){Oe.display.gutterSpecs=Ai(ze,Oe.options.lineNumbers),ti(Oe)},!0),De("fixedGutter",!0,function(Oe,ze){Oe.display.gutters.style.left=ze?Cc(Oe.display)+"px":"0",Oe.refresh()},!0),De("coverGutterNextToScrollbar",!1,function(Oe){return rc(Oe)},!0),De("scrollbarStyle","native",function(Oe){td(Oe),rc(Oe),Oe.display.scrollbars.setScrollTop(Oe.doc.scrollTop),Oe.display.scrollbars.setScrollLeft(Oe.doc.scrollLeft)},!0),De("lineNumbers",!1,function(Oe,ze){Oe.display.gutterSpecs=Ai(Oe.options.gutters,ze),ti(Oe)},!0),De("firstLineNumber",1,ti,!0),De("lineNumberFormatter",function(Oe){return Oe},ti,!0),De("showCursorWhenSelecting",!1,Ea,!0),De("resetSelectionOnContextMenu",!0),De("lineWiseCopyCut",!0),De("pasteLinesPerSelection",!0),De("selectionsMayTouch",!1),De("readOnly",!1,function(Oe,ze){ze=="nocursor"&&(Rc(Oe),Oe.display.input.blur()),Oe.display.input.readOnlyChanged(ze)}),De("screenReaderLabel",null,function(Oe,ze){ze=ze===""?null:ze,Oe.display.input.screenReaderLabelChanged(ze)}),De("disableInput",!1,function(Oe,ze){ze||Oe.display.input.reset()},!0),De("dragDrop",!0,rp),De("allowDropFileTypes",null),De("cursorBlinkRate",530),De("cursorScrollMargin",0),De("cursorHeight",1,Ea,!0),De("singleCursorHeightPerLine",!0,Ea,!0),De("workTime",100),De("workDelay",100),De("flattenSpans",!0,No,!0),De("addModeClass",!1,No,!0),De("pollInterval",100),De("undoDepth",200,function(Oe,ze){return Oe.doc.history.undoDepth=ze}),De("historyEventDelay",1250),De("viewportMargin",10,function(Oe){return Oe.refresh()},!0),De("maxHighlightLength",1e4,No,!0),De("moveInputWithCursor",!0,function(Oe,ze){ze||Oe.display.input.resetPosition()}),De("tabindex",null,function(Oe,ze){return Oe.display.input.getField().tabIndex=ze||""}),De("autofocus",null),De("direction","ltr",function(Oe,ze){return Oe.doc.setDirection(ze)},!0),De("phrases",null)}function rp(re,pe,De){var Oe=De&&De!=Mh;if(!pe!=!Oe){var ze=re.display.dragFunctions,at=pe?Jt:Mn;at(re.display.scroller,"dragstart",ze.start),at(re.display.scroller,"dragenter",ze.enter),at(re.display.scroller,"dragover",ze.over),at(re.display.scroller,"dragleave",ze.leave),at(re.display.scroller,"drop",ze.drop)}}function cm(re){re.options.lineWrapping?(Ct(re.display.wrapper,"CodeMirror-wrap"),re.display.sizer.style.minWidth="",re.display.sizerWidth=null):(ke(re.display.wrapper,"CodeMirror-wrap"),Bo(re)),Vr(re),Ms(re),Ds(re),setTimeout(function(){return rc(re)},100)}function ys(re,pe){var De=this;if(!(this instanceof ys))return new ys(re,pe);this.options=pe=pe?Ft(pe):{},Ft(tg,pe,!1);var Oe=pe.value;typeof Oe=="string"?Oe=new Ba(Oe,pe.mode,null,pe.lineSeparator,pe.direction):pe.mode&&(Oe.modeOption=pe.mode),this.doc=Oe;var ze=new ys.inputStyles[pe.inputStyle](this),at=this.display=new ji(re,Oe,ze,pe);at.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 rt,keySeq:null,specialChars:null},pe.autofocus&&!ee&&at.input.focus(),be&&Pe<11&&setTimeout(function(){return De.display.input.reset(!0)},20),Kd(this),ql(),Oa(this),this.curOp.forceUpdate=!0,Wr(this,Oe),pe.autofocus&&!ee||this.hasFocus()?setTimeout(function(){De.hasFocus()&&!De.state.focused&&Fo(De)},20):Rc(this);for(var bt in wf)wf.hasOwnProperty(bt)&&wf[bt](this,pe[bt],Mh);ki(this),pe.finishInit&&pe.finishInit(this);for(var Dt=0;Dt<ad.length;++Dt)ad[Dt](this);oc(this),he&&pe.lineWrapping&&getComputedStyle(at.lineDiv).textRendering=="optimizelegibility"&&(at.lineDiv.style.textRendering="auto")}ys.defaults=tg,ys.optionHandlers=wf;function Kd(re){var pe=re.display;Jt(pe.scroller,"mousedown",Sn(re,Mc)),be&&Pe<11?Jt(pe.scroller,"dblclick",Sn(re,function(Ot){if(!kn(re,Ot)){var Vt=Da(re,Ot);if(!(!Vt||tp(re,Ot)||Ga(re.display,Ot))){ai(Ot);var Ln=re.findWordAt(Vt);Qo(re.doc,Ln.anchor,Ln.head)}}})):Jt(pe.scroller,"dblclick",function(Ot){return kn(re,Ot)||ai(Ot)}),Jt(pe.scroller,"contextmenu",function(Ot){return np(re,Ot)}),Jt(pe.input.getField(),"contextmenu",function(Ot){pe.scroller.contains(Ot.target)||np(re,Ot)});var De,Oe={end:0};function ze(){pe.activeTouch&&(De=setTimeout(function(){return pe.activeTouch=null},1e3),Oe=pe.activeTouch,Oe.end=+new Date)}function at(Ot){if(Ot.touches.length!=1)return!1;var Vt=Ot.touches[0];return Vt.radiusX<=1&&Vt.radiusY<=1}function bt(Ot,Vt){if(Vt.left==null)return!0;var Ln=Vt.left-Ot.left,Qt=Vt.top-Ot.top;return Ln*Ln+Qt*Qt>20*20}Jt(pe.scroller,"touchstart",function(Ot){if(!kn(re,Ot)&&!at(Ot)&&!tp(re,Ot)){pe.input.ensurePolled(),clearTimeout(De);var Vt=+new Date;pe.activeTouch={start:Vt,moved:!1,prev:Vt-Oe.end<=300?Oe:null},Ot.touches.length==1&&(pe.activeTouch.left=Ot.touches[0].pageX,pe.activeTouch.top=Ot.touches[0].pageY)}}),Jt(pe.scroller,"touchmove",function(){pe.activeTouch&&(pe.activeTouch.moved=!0)}),Jt(pe.scroller,"touchend",function(Ot){var Vt=pe.activeTouch;if(Vt&&!Ga(pe,Ot)&&Vt.left!=null&&!Vt.moved&&new Date-Vt.start<300){var Ln=re.coordsChar(pe.activeTouch,"page"),Qt;!Vt.prev||bt(Vt,Vt.prev)?Qt=new Ci(Ln,Ln):!Vt.prev.prev||bt(Vt,Vt.prev.prev)?Qt=re.findWordAt(Ln):Qt=new Ci(qt(Ln.line,0),Fn(re.doc,qt(Ln.line+1,0))),re.setSelection(Qt.anchor,Qt.head),re.focus(),ai(Ot)}ze()}),Jt(pe.scroller,"touchcancel",ze),Jt(pe.scroller,"scroll",function(){pe.scroller.clientHeight&&(Au(re,pe.scroller.scrollTop),uu(re,pe.scroller.scrollLeft,!0),yn(re,"scroll",re))}),Jt(pe.scroller,"mousewheel",function(Ot){return sr(re,Ot)}),Jt(pe.scroller,"DOMMouseScroll",function(Ot){return sr(re,Ot)}),Jt(pe.wrapper,"scroll",function(){return pe.wrapper.scrollTop=pe.wrapper.scrollLeft=0}),pe.dragFunctions={enter:function(Ot){kn(re,Ot)||Xi(Ot)},over:function(Ot){kn(re,Ot)||(yf(re,Ot),Xi(Ot))},start:function(Ot){return id(re,Ot)},drop:Sn(re,Bd),leave:function(Ot){kn(re,Ot)||Yf(re)}};var Dt=pe.input.getField();Jt(Dt,"keyup",function(Ot){return Yp.call(re,Ot)}),Jt(Dt,"keydown",Sn(re,Vp)),Jt(Dt,"keypress",Sn(re,Lc)),Jt(Dt,"focus",function(Ot){return Fo(re,Ot)}),Jt(Dt,"blur",function(Ot){return Rc(re,Ot)})}var ad=[];ys.defineInitHook=function(re){return ad.push(re)};function $a(re,pe,De,Oe){var ze=re.doc,at;De==null&&(De="add"),De=="smart"&&(ze.mode.indent?at=mr(re,pe).state:De="prev");var bt=re.options.tabSize,Dt=cn(ze,pe),Ot=ht(Dt.text,null,bt);Dt.stateAfter&&(Dt.stateAfter=null);var Vt=Dt.text.match(/^\s*/)[0],Ln;if(!Oe&&!/\S/.test(Dt.text))Ln=0,De="not";else if(De=="smart"&&(Ln=ze.mode.indent(at,Dt.text.slice(Vt.length),Dt.text),Ln==_t||Ln>150)){if(!Oe)return;De="prev"}De=="prev"?pe>ze.first?Ln=ht(cn(ze,pe-1).text,null,bt):Ln=0:De=="add"?Ln=Ot+re.options.indentUnit:De=="subtract"?Ln=Ot-re.options.indentUnit:typeof De=="number"&&(Ln=Ot+De),Ln=Math.max(0,Ln);var Qt="",Un=0;if(re.options.indentWithTabs)for(var jn=Math.floor(Ln/bt);jn;--jn)Un+=bt,Qt+=" ";if(Un<Ln&&(Qt+=xn(Ln-Un)),Qt!=Vt)return sc(ze,Qt,qt(pe,0),qt(pe,Vt.length),"+input"),Dt.stateAfter=null,!0;for(var mi=0;mi<ze.sel.ranges.length;mi++){var _i=ze.sel.ranges[mi];if(_i.head.line==pe&&_i.head.ch<Vt.length){var Bi=qt(pe,Vt.length);xs(ze,mi,new Ci(Bi,Bi));break}}}var tu=null;function ld(re){tu=re}function bf(re,pe,De,Oe,ze){var at=re.doc;re.display.shift=!1,Oe||(Oe=at.sel);var bt=+new Date-200,Dt=ze=="paste"||re.state.pasteIncoming>bt,Ot=Mr(pe),Vt=null;if(Dt&&Oe.ranges.length>1)if(tu&&tu.text.join(`
|
|
|
`)==pe){if(Oe.ranges.length%tu.text.length==0){Vt=[];for(var Ln=0;Ln<tu.text.length;Ln++)Vt.push(at.splitLines(tu.text[Ln]))}}else Ot.length==Oe.ranges.length&&re.options.pasteLinesPerSelection&&(Vt=Wt(Ot,function(tr){return[tr]}));for(var Qt=re.curOp.updateInput,Un=Oe.ranges.length-1;Un>=0;Un--){var jn=Oe.ranges[Un],mi=jn.from(),_i=jn.to();jn.empty()&&(De&&De>0?mi=qt(mi.line,mi.ch-De):re.state.overwrite&&!Dt?_i=qt(_i.line,Math.min(cn(at,_i.line).text.length,_i.ch+Ut(Ot).length)):Dt&&tu&&tu.lineWise&&tu.text.join(`
|
|
|
`)==Ot.join(`
|
|
|
`)&&(mi=_i=qt(mi.line,0)));var Bi={from:mi,to:_i,text:Vt?Vt[Un%Vt.length]:Ot,origin:ze||(Dt?"paste":re.state.cutIncoming>bt?"cut":"+input")};oa(re.doc,Bi),Mi(re,"inputRead",re,Bi)}pe&&!Dt&&ig(re,pe),ic(re),re.curOp.updateInput<2&&(re.curOp.updateInput=Qt),re.curOp.typing=!0,re.state.pasteIncoming=re.state.cutIncoming=-1}function ng(re,pe){var De=re.clipboardData&&re.clipboardData.getData("Text");if(De)return re.preventDefault(),!pe.isReadOnly()&&!pe.options.disableInput&&Lt(pe,function(){return bf(pe,De,0,null,"paste")}),!0}function ig(re,pe){if(!(!re.options.electricChars||!re.options.smartIndent))for(var De=re.doc.sel,Oe=De.ranges.length-1;Oe>=0;Oe--){var ze=De.ranges[Oe];if(!(ze.head.ch>100||Oe&&De.ranges[Oe-1].head.line==ze.head.line)){var at=re.getModeAt(ze.head),bt=!1;if(at.electricChars){for(var Dt=0;Dt<at.electricChars.length;Dt++)if(pe.indexOf(at.electricChars.charAt(Dt))>-1){bt=$a(re,ze.head.line,"smart");break}}else at.electricInput&&at.electricInput.test(cn(re.doc,ze.head.line).text.slice(0,ze.head.ch))&&(bt=$a(re,ze.head.line,"smart"));bt&&Mi(re,"electricInput",re,ze.head.line)}}}function rg(re){for(var pe=[],De=[],Oe=0;Oe<re.doc.sel.ranges.length;Oe++){var ze=re.doc.sel.ranges[Oe].head.line,at={anchor:qt(ze,0),head:qt(ze+1,0)};De.push(at),pe.push(re.getRange(at.anchor,at.head))}return{text:pe,ranges:De}}function og(re,pe,De,Oe){re.setAttribute("autocorrect",De?"":"off"),re.setAttribute("autocapitalize",Oe?"":"off"),re.setAttribute("spellcheck",!!pe)}function sg(){var re=Ve("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),pe=Ve("div",[re],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return he?re.style.width="1000px":re.setAttribute("wrap","off"),ue&&(re.style.border="1px solid black"),og(re),pe}function Th(re){var pe=re.optionHandlers,De=re.helpers={};re.prototype={constructor:re,focus:function(){window.focus(),this.display.input.focus()},setOption:function(Oe,ze){var at=this.options,bt=at[Oe];at[Oe]==ze&&Oe!="mode"||(at[Oe]=ze,pe.hasOwnProperty(Oe)&&Sn(this,pe[Oe])(this,ze,bt),yn(this,"optionChange",this,Oe))},getOption:function(Oe){return this.options[Oe]},getDoc:function(){return this.doc},addKeyMap:function(Oe,ze){this.state.keyMaps[ze?"push":"unshift"](jc(Oe))},removeKeyMap:function(Oe){for(var ze=this.state.keyMaps,at=0;at<ze.length;++at)if(ze[at]==Oe||ze[at].name==Oe)return ze.splice(at,1),!0},addOverlay:hn(function(Oe,ze){var at=Oe.token?Oe:re.getMode(this.options,Oe);if(at.startState)throw new Error("Overlays may not be stateful.");$t(this.state.overlays,{mode:at,modeSpec:Oe,opaque:ze&&ze.opaque,priority:ze&&ze.priority||0},function(bt){return bt.priority}),this.state.modeGen++,Ms(this)}),removeOverlay:hn(function(Oe){for(var ze=this.state.overlays,at=0;at<ze.length;++at){var bt=ze[at].modeSpec;if(bt==Oe||typeof Oe=="string"&&bt.name==Oe){ze.splice(at,1),this.state.modeGen++,Ms(this);return}}}),indentLine:hn(function(Oe,ze,at){typeof ze!="string"&&typeof ze!="number"&&(ze==null?ze=this.options.smartIndent?"smart":"prev":ze=ze?"add":"subtract"),En(this.doc,Oe)&&$a(this,Oe,ze,at)}),indentSelection:hn(function(Oe){for(var ze=this.doc.sel.ranges,at=-1,bt=0;bt<ze.length;bt++){var Dt=ze[bt];if(Dt.empty())Dt.head.line>at&&($a(this,Dt.head.line,Oe,!0),at=Dt.head.line,bt==this.doc.sel.primIndex&&ic(this));else{var Ot=Dt.from(),Vt=Dt.to(),Ln=Math.max(at,Ot.line);at=Math.min(this.lastLine(),Vt.line-(Vt.ch?0:1))+1;for(var Qt=Ln;Qt<at;++Qt)$a(this,Qt,Oe);var Un=this.doc.sel.ranges;Ot.ch==0&&ze.length==Un.length&&Un[bt].from().ch>0&&xs(this.doc,bt,new Ci(Ot,Un[bt].to()),vt)}}}),getTokenAt:function(Oe,ze){return di(this,Oe,ze)},getLineTokens:function(Oe,ze){return di(this,qt(Oe),ze,!0)},getTokenTypeAt:function(Oe){Oe=Fn(this.doc,Oe);var ze=Cr(this,cn(this.doc,Oe.line)),at=0,bt=(ze.length-1)/2,Dt=Oe.ch,Ot;if(Dt==0)Ot=ze[2];else for(;;){var Vt=at+bt>>1;if((Vt?ze[Vt*2-1]:0)>=Dt)bt=Vt;else if(ze[Vt*2+1]<Dt)at=Vt+1;else{Ot=ze[Vt*2+2];break}}var Ln=Ot?Ot.indexOf("overlay "):-1;return Ln<0?Ot:Ln==0?null:Ot.slice(0,Ln-1)},getModeAt:function(Oe){var ze=this.doc.mode;return ze.innerMode?re.innerMode(ze,this.getTokenAt(Oe).state).mode:ze},getHelper:function(Oe,ze){return this.getHelpers(Oe,ze)[0]},getHelpers:function(Oe,ze){var at=[];if(!De.hasOwnProperty(ze))return at;var bt=De[ze],Dt=this.getModeAt(Oe);if(typeof Dt[ze]=="string")bt[Dt[ze]]&&at.push(bt[Dt[ze]]);else if(Dt[ze])for(var Ot=0;Ot<Dt[ze].length;Ot++){var Vt=bt[Dt[ze][Ot]];Vt&&at.push(Vt)}else Dt.helperType&&bt[Dt.helperType]?at.push(bt[Dt.helperType]):bt[Dt.name]&&at.push(bt[Dt.name]);for(var Ln=0;Ln<bt._global.length;Ln++){var Qt=bt._global[Ln];Qt.pred(Dt,this)&&dt(at,Qt.val)==-1&&at.push(Qt.val)}return at},getStateAfter:function(Oe,ze){var at=this.doc;return Oe=ei(at,Oe==null?at.first+at.size-1:Oe),mr(this,Oe+1,ze).state},cursorCoords:function(Oe,ze){var at,bt=this.doc.sel.primary();return Oe==null?at=bt.head:typeof Oe=="object"?at=Fn(this.doc,Oe):at=Oe?bt.from():bt.to(),Rs(this,at,ze||"page")},charCoords:function(Oe,ze){return Bl(this,Fn(this.doc,Oe),ze||"page")},coordsChar:function(Oe,ze){return Oe=Yl(this,Oe,ze||"page"),wc(this,Oe.left,Oe.top)},lineAtHeight:function(Oe,ze){return Oe=Yl(this,{top:Oe,left:0},ze||"page").top,an(this.doc,Oe+this.display.viewOffset)},heightAtLine:function(Oe,ze,at){var bt=!1,Dt;if(typeof Oe=="number"){var Ot=this.doc.first+this.doc.size-1;Oe<this.doc.first?Oe=this.doc.first:Oe>Ot&&(Oe=Ot,bt=!0),Dt=cn(this.doc,Oe)}else Dt=Oe;return Ks(this,Dt,{top:0,left:0},ze||"page",at||bt).top+(bt?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(Oe,ze,at,bt,Dt){var Ot=this.display;Oe=Rs(this,Fn(this.doc,Oe));var Vt=Oe.bottom,Ln=Oe.left;if(ze.style.position="absolute",ze.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(ze),Ot.sizer.appendChild(ze),bt=="over")Vt=Oe.top;else if(bt=="above"||bt=="near"){var Qt=Math.max(Ot.wrapper.clientHeight,this.doc.height),Un=Math.max(Ot.sizer.clientWidth,Ot.lineSpace.clientWidth);(bt=="above"||Oe.bottom+ze.offsetHeight>Qt)&&Oe.top>ze.offsetHeight?Vt=Oe.top-ze.offsetHeight:Oe.bottom+ze.offsetHeight<=Qt&&(Vt=Oe.bottom),Ln+ze.offsetWidth>Un&&(Ln=Un-ze.offsetWidth)}ze.style.top=Vt+"px",ze.style.left=ze.style.right="",Dt=="right"?(Ln=Ot.sizer.clientWidth-ze.offsetWidth,ze.style.right="0px"):(Dt=="left"?Ln=0:Dt=="middle"&&(Ln=(Ot.sizer.clientWidth-ze.offsetWidth)/2),ze.style.left=Ln+"px"),at&&rh(this,{left:Ln,top:Vt,right:Ln+ze.offsetWidth,bottom:Vt+ze.offsetHeight})},triggerOnKeyDown:hn(Vp),triggerOnKeyPress:hn(Lc),triggerOnKeyUp:Yp,triggerOnMouseDown:hn(Mc),execCommand:function(Oe){if(Va.hasOwnProperty(Oe))return Va[Oe].call(null,this)},triggerElectric:hn(function(Oe){ig(this,Oe)}),findPosH:function(Oe,ze,at,bt){var Dt=1;ze<0&&(Dt=-1,ze=-ze);for(var Ot=Fn(this.doc,Oe),Vt=0;Vt<ze&&(Ot=Cf(this.doc,Ot,Dt,at,bt),!Ot.hitSide);++Vt);return Ot},moveH:hn(function(Oe,ze){var at=this;this.extendSelectionsBy(function(bt){return at.display.shift||at.doc.extend||bt.empty()?Cf(at.doc,bt.head,Oe,ze,at.options.rtlMoveVisually):Oe<0?bt.from():bt.to()},jt)}),deleteH:hn(function(Oe,ze){var at=this.doc.sel,bt=this.doc;at.somethingSelected()?bt.replaceSelection("",null,"+delete"):fl(this,function(Dt){var Ot=Cf(bt,Dt.head,Oe,ze,!1);return Oe<0?{from:Ot,to:Dt.head}:{from:Dt.head,to:Ot}})}),findPosV:function(Oe,ze,at,bt){var Dt=1,Ot=bt;ze<0&&(Dt=-1,ze=-ze);for(var Vt=Fn(this.doc,Oe),Ln=0;Ln<ze;++Ln){var Qt=Rs(this,Vt,"div");if(Ot==null?Ot=Qt.left:Qt.left=Ot,Vt=kh(this,Qt,Dt,at),Vt.hitSide)break}return Vt},moveV:hn(function(Oe,ze){var at=this,bt=this.doc,Dt=[],Ot=!this.display.shift&&!bt.extend&&bt.sel.somethingSelected();if(bt.extendSelectionsBy(function(Ln){if(Ot)return Oe<0?Ln.from():Ln.to();var Qt=Rs(at,Ln.head,"div");Ln.goalColumn!=null&&(Qt.left=Ln.goalColumn),Dt.push(Qt.left);var Un=kh(at,Qt,Oe,ze);return ze=="page"&&Ln==bt.sel.primary()&&Ch(at,Bl(at,Un,"div").top-Qt.top),Un},jt),Dt.length)for(var Vt=0;Vt<bt.sel.ranges.length;Vt++)bt.sel.ranges[Vt].goalColumn=Dt[Vt]}),findWordAt:function(Oe){var ze=this.doc,at=cn(ze,Oe.line).text,bt=Oe.ch,Dt=Oe.ch;if(at){var Ot=this.getHelper(Oe,"wordChars");(Oe.sticky=="before"||Dt==at.length)&&bt?--bt:++Dt;for(var Vt=at.charAt(bt),Ln=et(Vt,Ot)?function(Qt){return et(Qt,Ot)}:/\s/.test(Vt)?function(Qt){return/\s/.test(Qt)}:function(Qt){return!/\s/.test(Qt)&&!et(Qt)};bt>0&&Ln(at.charAt(bt-1));)--bt;for(;Dt<at.length&&Ln(at.charAt(Dt));)++Dt}return new Ci(qt(Oe.line,bt),qt(Oe.line,Dt))},toggleOverwrite:function(Oe){Oe!=null&&Oe==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ct(this.display.cursorDiv,"CodeMirror-overwrite"):ke(this.display.cursorDiv,"CodeMirror-overwrite"),yn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ct()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:hn(function(Oe,ze){ro(this,Oe,ze)}),getScrollInfo:function(){var Oe=this.display.scroller;return{left:Oe.scrollLeft,top:Oe.scrollTop,height:Oe.scrollHeight-Wa(this)-this.display.barHeight,width:Oe.scrollWidth-Wa(this)-this.display.barWidth,clientHeight:Uu(this),clientWidth:Za(this)}},scrollIntoView:hn(function(Oe,ze){Oe==null?(Oe={from:this.doc.sel.primary().head,to:null},ze==null&&(ze=this.options.cursorScrollMargin)):typeof Oe=="number"?Oe={from:qt(Oe,0),to:null}:Oe.from==null&&(Oe={from:Oe,to:null}),Oe.to||(Oe.to=Oe.from),Oe.margin=ze||0,Oe.from.line!=null?ns(this,Oe):qh(this,Oe.from,Oe.to,Oe.margin)}),setSize:hn(function(Oe,ze){var at=this,bt=function(Ot){return typeof Ot=="number"||/^\d+$/.test(String(Ot))?Ot+"px":Ot};Oe!=null&&(this.display.wrapper.style.width=bt(Oe)),ze!=null&&(this.display.wrapper.style.height=bt(ze)),this.options.lineWrapping&&ra(this);var Dt=this.display.viewFrom;this.doc.iter(Dt,this.display.viewTo,function(Ot){if(Ot.widgets){for(var Vt=0;Vt<Ot.widgets.length;Vt++)if(Ot.widgets[Vt].noHScroll){xo(at,Dt,"widget");break}}++Dt}),this.curOp.forceUpdate=!0,yn(this,"refresh",this)}),operation:function(Oe){return Lt(this,Oe)},startOperation:function(){return Oa(this)},endOperation:function(){return oc(this)},refresh:hn(function(){var Oe=this.display.cachedTextHeight;Ms(this),this.curOp.forceUpdate=!0,Ds(this),ro(this,this.doc.scrollLeft,this.doc.scrollTop),Oi(this.display),(Oe==null||Math.abs(Oe-Tu(this.display))>.5||this.options.lineWrapping)&&Vr(this),yn(this,"refresh",this)}),swapDoc:hn(function(Oe){var ze=this.doc;return ze.cm=null,this.state.selectingText&&this.state.selectingText(),Wr(this,Oe),Ds(this),this.display.input.reset(),ro(this,Oe.scrollLeft,Oe.scrollTop),this.curOp.forceScroll=!0,Mi(this,"swapDoc",this,ze),ze}),phrase:function(Oe){var ze=this.options.phrases;return ze&&Object.prototype.hasOwnProperty.call(ze,Oe)?ze[Oe]:Oe},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(Oe,ze,at){De.hasOwnProperty(Oe)||(De[Oe]=re[Oe]={_global:[]}),De[Oe][ze]=at},re.registerGlobalHelper=function(Oe,ze,at,bt){re.registerHelper(Oe,ze,bt),De[Oe]._global.push({pred:at,val:bt})}}function Cf(re,pe,De,Oe,ze){var at=pe,bt=De,Dt=cn(re,pe.line),Ot=ze&&re.direction=="rtl"?-De:De;function Vt(){var Dr=pe.line+Ot;return Dr<re.first||Dr>=re.first+re.size?!1:(pe=new qt(Dr,pe.ch,pe.sticky),Dt=cn(re,Dr))}function Ln(Dr){var Sr;if(Oe=="codepoint"){var Zr=Dt.text.charCodeAt(pe.ch+(Oe>0?0:-1));isNaN(Zr)?Sr=null:Sr=new qt(pe.line,Math.max(0,Math.min(Dt.text.length,pe.ch+De*(Zr>=55296&&Zr<56320?2:1))),-De)}else ze?Sr=Ys(re.cm,Dt,pe,De):Sr=ba(Dt,pe,De);if(Sr==null)if(!Dr&&Vt())pe=fs(ze,re.cm,Dt,pe.line,Ot);else return!1;else pe=Sr;return!0}if(Oe=="char"||Oe=="codepoint")Ln();else if(Oe=="column")Ln(!0);else if(Oe=="word"||Oe=="group")for(var Qt=null,Un=Oe=="group",jn=re.cm&&re.cm.getHelper(pe,"wordChars"),mi=!0;!(De<0&&!Ln(!mi));mi=!1){var _i=Dt.text.charAt(pe.ch)||`
|
|
|
`,Bi=et(_i,jn)?"w":Un&&_i==`
|
|
|
`?"n":!Un||/\s/.test(_i)?null:"p";if(Un&&!mi&&!Bi&&(Bi="s"),Qt&&Qt!=Bi){De<0&&(De=1,Ln(),pe.sticky="after");break}if(Bi&&(Qt=Bi),De>0&&!Ln(!mi))break}var tr=hu(re,pe,at,bt,!0);return Nn(at,tr)&&(tr.hitSide=!0),tr}function kh(re,pe,De,Oe){var ze=re.doc,at=pe.left,bt;if(Oe=="page"){var Dt=Math.min(re.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Ot=Math.max(Dt-.5*Tu(re.display),3);bt=(De>0?pe.bottom:pe.top)+De*Ot}else Oe=="line"&&(bt=De>0?pe.bottom+3:pe.top-3);for(var Vt;Vt=wc(re,at,bt),!!Vt.outside;){if(De<0?bt<=0:bt>=ze.height){Vt.hitSide=!0;break}bt+=De*5}return Vt}var Qs=function(re){this.cm=re,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new rt,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Qs.prototype.init=function(re){var pe=this,De=this,Oe=De.cm,ze=De.div=re.lineDiv;og(ze,Oe.options.spellcheck,Oe.options.autocorrect,Oe.options.autocapitalize);function at(Dt){for(var Ot=Dt.target;Ot;Ot=Ot.parentNode){if(Ot==ze)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Ot.className))break}return!1}Jt(ze,"paste",function(Dt){!at(Dt)||kn(Oe,Dt)||ng(Dt,Oe)||Pe<=11&&setTimeout(Sn(Oe,function(){return pe.updateFromDOM()}),20)}),Jt(ze,"compositionstart",function(Dt){pe.composing={data:Dt.data,done:!1}}),Jt(ze,"compositionupdate",function(Dt){pe.composing||(pe.composing={data:Dt.data,done:!1})}),Jt(ze,"compositionend",function(Dt){pe.composing&&(Dt.data!=pe.composing.data&&pe.readFromDOMSoon(),pe.composing.done=!0)}),Jt(ze,"touchstart",function(){return De.forceCompositionEnd()}),Jt(ze,"input",function(){pe.composing||pe.readFromDOMSoon()});function bt(Dt){if(!(!at(Dt)||kn(Oe,Dt))){if(Oe.somethingSelected())ld({lineWise:!1,text:Oe.getSelections()}),Dt.type=="cut"&&Oe.replaceSelection("",null,"cut");else if(Oe.options.lineWiseCopyCut){var Ot=rg(Oe);ld({lineWise:!0,text:Ot.text}),Dt.type=="cut"&&Oe.operation(function(){Oe.setSelections(Ot.ranges,0,vt),Oe.replaceSelection("",null,"cut")})}else return;if(Dt.clipboardData){Dt.clipboardData.clearData();var Vt=tu.text.join(`
|
|
|
`);if(Dt.clipboardData.setData("Text",Vt),Dt.clipboardData.getData("Text")==Vt){Dt.preventDefault();return}}var Ln=sg(),Qt=Ln.firstChild;Oe.display.lineSpace.insertBefore(Ln,Oe.display.lineSpace.firstChild),Qt.value=tu.text.join(`
|
|
|
`);var Un=document.activeElement;St(Qt),setTimeout(function(){Oe.display.lineSpace.removeChild(Ln),Un.focus(),Un==ze&&De.showPrimarySelection()},50)}}Jt(ze,"copy",bt),Jt(ze,"cut",bt)},Qs.prototype.screenReaderLabelChanged=function(re){re?this.div.setAttribute("aria-label",re):this.div.removeAttribute("aria-label")},Qs.prototype.prepareSelection=function(){var re=Pc(this.cm,!1);return re.focus=document.activeElement==this.div,re},Qs.prototype.showSelection=function(re,pe){!re||!this.cm.display.view.length||((re.focus||pe)&&this.showPrimarySelection(),this.showMultipleSelections(re))},Qs.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Qs.prototype.showPrimarySelection=function(){var re=this.getSelection(),pe=this.cm,De=pe.doc.sel.primary(),Oe=De.from(),ze=De.to();if(pe.display.viewTo==pe.display.viewFrom||Oe.line>=pe.display.viewTo||ze.line<pe.display.viewFrom){re.removeAllRanges();return}var at=Pf(pe,re.anchorNode,re.anchorOffset),bt=Pf(pe,re.focusNode,re.focusOffset);if(!(at&&!at.bad&&bt&&!bt.bad&&on(Hn(at,bt),Oe)==0&&on(qn(at,bt),ze)==0)){var Dt=pe.display.view,Ot=Oe.line>=pe.display.viewFrom&&op(pe,Oe)||{node:Dt[0].measure.map[2],offset:0},Vt=ze.line<pe.display.viewTo&&op(pe,ze);if(!Vt){var Ln=Dt[Dt.length-1].measure,Qt=Ln.maps?Ln.maps[Ln.maps.length-1]:Ln.map;Vt={node:Qt[Qt.length-1],offset:Qt[Qt.length-2]-Qt[Qt.length-3]}}if(!Ot||!Vt){re.removeAllRanges();return}var Un=re.rangeCount&&re.getRangeAt(0),jn;try{jn=Ge(Ot.node,Ot.offset,Vt.offset,Vt.node)}catch(mi){}jn&&(!Le&&pe.state.focused?(re.collapse(Ot.node,Ot.offset),jn.collapsed||(re.removeAllRanges(),re.addRange(jn))):(re.removeAllRanges(),re.addRange(jn)),Un&&re.anchorNode==null?re.addRange(Un):Le&&this.startGracePeriod()),this.rememberSelection()}},Qs.prototype.startGracePeriod=function(){var re=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){re.gracePeriod=!1,re.selectionChanged()&&re.cm.operation(function(){return re.cm.curOp.selectionChanged=!0})},20)},Qs.prototype.showMultipleSelections=function(re){je(this.cm.display.cursorDiv,re.cursors),je(this.cm.display.selectionDiv,re.selection)},Qs.prototype.rememberSelection=function(){var re=this.getSelection();this.lastAnchorNode=re.anchorNode,this.lastAnchorOffset=re.anchorOffset,this.lastFocusNode=re.focusNode,this.lastFocusOffset=re.focusOffset},Qs.prototype.selectionInEditor=function(){var re=this.getSelection();if(!re.rangeCount)return!1;var pe=re.getRangeAt(0).commonAncestorContainer;return mt(this.div,pe)},Qs.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Qs.prototype.blur=function(){this.div.blur()},Qs.prototype.getField=function(){return this.div},Qs.prototype.supportsTouch=function(){return!0},Qs.prototype.receivedFocus=function(){var re=this;this.selectionInEditor()?this.pollSelection():Lt(this.cm,function(){return re.cm.curOp.selectionChanged=!0});function pe(){re.cm.state.focused&&(re.pollSelection(),re.polling.set(re.cm.options.pollInterval,pe))}this.polling.set(this.cm.options.pollInterval,pe)},Qs.prototype.selectionChanged=function(){var re=this.getSelection();return re.anchorNode!=this.lastAnchorNode||re.anchorOffset!=this.lastAnchorOffset||re.focusNode!=this.lastFocusNode||re.focusOffset!=this.lastFocusOffset},Qs.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var re=this.getSelection(),pe=this.cm;if(z&&xe&&this.cm.display.gutterSpecs.length&&ag(re.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var De=Pf(pe,re.anchorNode,re.anchorOffset),Oe=Pf(pe,re.focusNode,re.focusOffset);De&&Oe&&Lt(pe,function(){As(pe.doc,vr(De,Oe),vt),(De.bad||Oe.bad)&&(pe.curOp.selectionChanged=!0)})}}},Qs.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var re=this.cm,pe=re.display,De=re.doc.sel.primary(),Oe=De.from(),ze=De.to();if(Oe.ch==0&&Oe.line>re.firstLine()&&(Oe=qt(Oe.line-1,cn(re.doc,Oe.line-1).length)),ze.ch==cn(re.doc,ze.line).text.length&&ze.line<re.lastLine()&&(ze=qt(ze.line+1,0)),Oe.line<pe.viewFrom||ze.line>pe.viewTo-1)return!1;var at,bt,Dt;Oe.line==pe.viewFrom||(at=$s(re,Oe.line))==0?(bt=At(pe.view[0].line),Dt=pe.view[0].node):(bt=At(pe.view[at].line),Dt=pe.view[at-1].node.nextSibling);var Ot=$s(re,ze.line),Vt,Ln;if(Ot==pe.view.length-1?(Vt=pe.viewTo-1,Ln=pe.lineDiv.lastChild):(Vt=At(pe.view[Ot+1].line)-1,Ln=pe.view[Ot+1].node.previousSibling),!Dt)return!1;for(var Qt=re.doc.splitLines($d(re,Dt,Ln,bt,Vt)),Un=bn(re.doc,qt(bt,0),qt(Vt,cn(re.doc,Vt).text.length));Qt.length>1&&Un.length>1;)if(Ut(Qt)==Ut(Un))Qt.pop(),Un.pop(),Vt--;else if(Qt[0]==Un[0])Qt.shift(),Un.shift(),bt++;else break;for(var jn=0,mi=0,_i=Qt[0],Bi=Un[0],tr=Math.min(_i.length,Bi.length);jn<tr&&_i.charCodeAt(jn)==Bi.charCodeAt(jn);)++jn;for(var Dr=Ut(Qt),Sr=Ut(Un),Zr=Math.min(Dr.length-(Qt.length==1?jn:0),Sr.length-(Un.length==1?jn:0));mi<Zr&&Dr.charCodeAt(Dr.length-mi-1)==Sr.charCodeAt(Sr.length-mi-1);)++mi;if(Qt.length==1&&Un.length==1&&bt==Oe.line)for(;jn&&jn>Oe.ch&&Dr.charCodeAt(Dr.length-mi-1)==Sr.charCodeAt(Sr.length-mi-1);)jn--,mi++;Qt[Qt.length-1]=Dr.slice(0,Dr.length-mi).replace(/^\u200b+/,""),Qt[0]=Qt[0].slice(jn).replace(/\u200b+$/,"");var wo=qt(bt,jn),yr=qt(Vt,Un.length?Ut(Un).length-mi:0);if(Qt.length>1||Qt[0]||on(wo,yr))return sc(re.doc,Qt,wo,yr,"+input"),!0},Qs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Qs.prototype.reset=function(){this.forceCompositionEnd()},Qs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Qs.prototype.readFromDOMSoon=function(){var re=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(re.readDOMTimeout=null,re.composing)if(re.composing.done)re.composing=null;else return;re.updateFromDOM()},80))},Qs.prototype.updateFromDOM=function(){var re=this;(this.cm.isReadOnly()||!this.pollContent())&&Lt(this.cm,function(){return Ms(re.cm)})},Qs.prototype.setUneditable=function(re){re.contentEditable="false"},Qs.prototype.onKeyPress=function(re){re.charCode==0||this.composing||(re.preventDefault(),this.cm.isReadOnly()||Sn(this.cm,bf)(this.cm,String.fromCharCode(re.charCode==null?re.keyCode:re.charCode),0))},Qs.prototype.readOnlyChanged=function(re){this.div.contentEditable=String(re!="nocursor")},Qs.prototype.onContextMenu=function(){},Qs.prototype.resetPosition=function(){},Qs.prototype.needsContentAttribute=!0;function op(re,pe){var De=Gu(re,pe.line);if(!De||De.hidden)return null;var Oe=cn(re.doc,pe.line),ze=Eu(De,Oe,pe.line),at=tn(Oe,re.doc.direction),bt="left";if(at){var Dt=lt(at,pe.ch);bt=Dt%2?"right":"left"}var Ot=xc(ze.map,pe.ch,bt);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,De,Oe,ze){var at="",bt=!1,Dt=re.doc.lineSeparator(),Ot=!1;function Vt(jn){return function(mi){return mi.id==jn}}function Ln(){bt&&(at+=Dt,Ot&&(at+=Dt),bt=Ot=!1)}function Qt(jn){jn&&(Ln(),at+=jn)}function Un(jn){if(jn.nodeType==1){var mi=jn.getAttribute("cm-text");if(mi){Qt(mi);return}var _i=jn.getAttribute("cm-marker"),Bi;if(_i){var tr=re.findMarks(qt(Oe,0),qt(ze+1,0),Vt(+_i));tr.length&&(Bi=tr[0].find(0))&&Qt(bn(re.doc,Bi.from,Bi.to).join(Dt));return}if(jn.getAttribute("contenteditable")=="false")return;var Dr=/^(pre|div|p|li|table|br)$/i.test(jn.nodeName);if(!/^br$/i.test(jn.nodeName)&&jn.textContent.length==0)return;Dr&&Ln();for(var Sr=0;Sr<jn.childNodes.length;Sr++)Un(jn.childNodes[Sr]);/^(pre|p)$/i.test(jn.nodeName)&&(Ot=!0),Dr&&(bt=!0)}else jn.nodeType==3&&Qt(jn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Un(pe),pe!=De;)pe=pe.nextSibling,Ot=!1;return at}function Pf(re,pe,De){var Oe;if(pe==re.display.lineDiv){if(Oe=re.display.lineDiv.childNodes[De],!Oe)return Vd(re.clipPos(qt(re.display.viewTo-1)),!0);pe=null,De=0}else for(Oe=pe;;Oe=Oe.parentNode){if(!Oe||Oe==re.display.lineDiv)return null;if(Oe.parentNode&&Oe.parentNode==re.display.lineDiv)break}for(var ze=0;ze<re.display.view.length;ze++){var at=re.display.view[ze];if(at.node==Oe)return hm(at,pe,De)}}function hm(re,pe,De){var Oe=re.text.firstChild,ze=!1;if(!pe||!mt(Oe,pe))return Vd(qt(At(re.line),0),!0);if(pe==Oe&&(ze=!0,pe=Oe.childNodes[De],De=0,!pe)){var at=re.rest?Ut(re.rest):re.line;return Vd(qt(At(at),at.text.length),ze)}var bt=pe.nodeType==3?pe:null,Dt=pe;for(!bt&&pe.childNodes.length==1&&pe.firstChild.nodeType==3&&(bt=pe.firstChild,De&&(De=bt.nodeValue.length));Dt.parentNode!=Oe;)Dt=Dt.parentNode;var Ot=re.measure,Vt=Ot.maps;function Ln(Bi,tr,Dr){for(var Sr=-1;Sr<(Vt?Vt.length:0);Sr++)for(var Zr=Sr<0?Ot.map:Vt[Sr],wo=0;wo<Zr.length;wo+=3){var yr=Zr[wo+2];if(yr==Bi||yr==tr){var zo=At(Sr<0?re.line:re.rest[Sr]),ca=Zr[wo]+Dr;return(Dr<0||yr!=Bi)&&(ca=Zr[wo+(Dr?1:0)]),qt(zo,ca)}}}var Qt=Ln(bt,Dt,De);if(Qt)return Vd(Qt,ze);for(var Un=Dt.nextSibling,jn=bt?bt.nodeValue.length-De:0;Un;Un=Un.nextSibling){if(Qt=Ln(Un,Un.firstChild,0),Qt)return Vd(qt(Qt.line,Qt.ch-jn),ze);jn+=Un.textContent.length}for(var mi=Dt.previousSibling,_i=De;mi;mi=mi.previousSibling){if(Qt=Ln(mi,mi.firstChild,-1),Qt)return Vd(qt(Qt.line,Qt.ch+_i),ze);_i+=mi.textContent.length}}var Fa=function(re){this.cm=re,this.prevInput="",this.pollingFast=!1,this.polling=new rt,this.hasSelection=!1,this.composing=null};Fa.prototype.init=function(re){var pe=this,De=this,Oe=this.cm;this.createField(re);var ze=this.textarea;re.wrapper.insertBefore(this.wrapper,re.wrapper.firstChild),ue&&(ze.style.width="0px"),Jt(ze,"input",function(){be&&Pe>=9&&pe.hasSelection&&(pe.hasSelection=null),De.poll()}),Jt(ze,"paste",function(bt){kn(Oe,bt)||ng(bt,Oe)||(Oe.state.pasteIncoming=+new Date,De.fastPoll())});function at(bt){if(!kn(Oe,bt)){if(Oe.somethingSelected())ld({lineWise:!1,text:Oe.getSelections()});else if(Oe.options.lineWiseCopyCut){var Dt=rg(Oe);ld({lineWise:!0,text:Dt.text}),bt.type=="cut"?Oe.setSelections(Dt.ranges,null,vt):(De.prevInput="",ze.value=Dt.text.join(`
|
|
|
`),St(ze))}else return;bt.type=="cut"&&(Oe.state.cutIncoming=+new Date)}}Jt(ze,"cut",at),Jt(ze,"copy",at),Jt(re.scroller,"paste",function(bt){if(!(Ga(re,bt)||kn(Oe,bt))){if(!ze.dispatchEvent){Oe.state.pasteIncoming=+new Date,De.focus();return}var Dt=new Event("paste");Dt.clipboardData=bt.clipboardData,ze.dispatchEvent(Dt)}}),Jt(re.lineSpace,"selectstart",function(bt){Ga(re,bt)||ai(bt)}),Jt(ze,"compositionstart",function(){var bt=Oe.getCursor("from");De.composing&&De.composing.range.clear(),De.composing={start:bt,range:Oe.markText(bt,Oe.getCursor("to"),{className:"CodeMirror-composing"})}}),Jt(ze,"compositionend",function(){De.composing&&(De.poll(),De.composing.range.clear(),De.composing=null)})},Fa.prototype.createField=function(re){this.wrapper=sg(),this.textarea=this.wrapper.firstChild},Fa.prototype.screenReaderLabelChanged=function(re){re?this.textarea.setAttribute("aria-label",re):this.textarea.removeAttribute("aria-label")},Fa.prototype.prepareSelection=function(){var re=this.cm,pe=re.display,De=re.doc,Oe=Pc(re);if(re.options.moveInputWithCursor){var ze=Rs(re,De.sel.primary().head,"div"),at=pe.wrapper.getBoundingClientRect(),bt=pe.lineDiv.getBoundingClientRect();Oe.teTop=Math.max(0,Math.min(pe.wrapper.clientHeight-10,ze.top+bt.top-at.top)),Oe.teLeft=Math.max(0,Math.min(pe.wrapper.clientWidth-10,ze.left+bt.left-at.left))}return Oe},Fa.prototype.showSelection=function(re){var pe=this.cm,De=pe.display;je(De.cursorDiv,re.cursors),je(De.selectionDiv,re.selection),re.teTop!=null&&(this.wrapper.style.top=re.teTop+"px",this.wrapper.style.left=re.teLeft+"px")},Fa.prototype.reset=function(re){if(!(this.contextMenuPending||this.composing)){var pe=this.cm;if(pe.somethingSelected()){this.prevInput="";var De=pe.getSelection();this.textarea.value=De,pe.state.focused&&St(this.textarea),be&&Pe>=9&&(this.hasSelection=De)}else re||(this.prevInput=this.textarea.value="",be&&Pe>=9&&(this.hasSelection=null))}},Fa.prototype.getField=function(){return this.textarea},Fa.prototype.supportsTouch=function(){return!1},Fa.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ee||ct()!=this.textarea))try{this.textarea.focus()}catch(re){}},Fa.prototype.blur=function(){this.textarea.blur()},Fa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Fa.prototype.receivedFocus=function(){this.slowPoll()},Fa.prototype.slowPoll=function(){var re=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){re.poll(),re.cm.state.focused&&re.slowPoll()})},Fa.prototype.fastPoll=function(){var re=!1,pe=this;pe.pollingFast=!0;function De(){var Oe=pe.poll();!Oe&&!re?(re=!0,pe.polling.set(60,De)):(pe.pollingFast=!1,pe.slowPoll())}pe.polling.set(20,De)},Fa.prototype.poll=function(){var re=this,pe=this.cm,De=this.textarea,Oe=this.prevInput;if(this.contextMenuPending||!pe.state.focused||ot(De)&&!Oe&&!this.composing||pe.isReadOnly()||pe.options.disableInput||pe.state.keySeq)return!1;var ze=De.value;if(ze==Oe&&!pe.somethingSelected())return!1;if(be&&Pe>=9&&this.hasSelection===ze||oe&&/[\uf700-\uf7ff]/.test(ze))return pe.display.input.reset(),!1;if(pe.doc.sel==pe.display.selForContextMenu){var at=ze.charCodeAt(0);if(at==8203&&!Oe&&(Oe="\u200B"),at==8666)return this.reset(),this.cm.execCommand("undo")}for(var bt=0,Dt=Math.min(Oe.length,ze.length);bt<Dt&&Oe.charCodeAt(bt)==ze.charCodeAt(bt);)++bt;return Lt(pe,function(){bf(pe,ze.slice(bt),Oe.length-bt,null,re.composing?"*compose":null),ze.length>1e3||ze.indexOf(`
|
|
|
`)>-1?De.value=re.prevInput="":re.prevInput=ze,re.composing&&(re.composing.range.clear(),re.composing.range=pe.markText(re.composing.start,pe.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Fa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Fa.prototype.onKeyPress=function(){be&&Pe>=9&&(this.hasSelection=null),this.fastPoll()},Fa.prototype.onContextMenu=function(re){var pe=this,De=pe.cm,Oe=De.display,ze=pe.textarea;pe.contextMenuPending&&pe.contextMenuPending();var at=Da(De,re),bt=Oe.scroller.scrollTop;if(!at||ge)return;var Dt=De.options.resetSelectionOnContextMenu;Dt&&De.doc.sel.contains(at)==-1&&Sn(De,As)(De.doc,vr(at),vt);var Ot=ze.style.cssText,Vt=pe.wrapper.style.cssText,Ln=pe.wrapper.offsetParent.getBoundingClientRect();pe.wrapper.style.cssText="position: static",ze.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(re.clientY-Ln.top-5)+"px; left: "+(re.clientX-Ln.left-5)+`px;
|
|
|
z-index: 1000; background: `+(be?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Qt;he&&(Qt=window.scrollY),Oe.input.focus(),he&&window.scrollTo(null,Qt),Oe.input.reset(),De.somethingSelected()||(ze.value=pe.prevInput=" "),pe.contextMenuPending=jn,Oe.selForContextMenu=De.doc.sel,clearTimeout(Oe.detectingSelectAll);function Un(){if(ze.selectionStart!=null){var _i=De.somethingSelected(),Bi="\u200B"+(_i?ze.value:"");ze.value="\u21DA",ze.value=Bi,pe.prevInput=_i?"":"\u200B",ze.selectionStart=1,ze.selectionEnd=Bi.length,Oe.selForContextMenu=De.doc.sel}}function jn(){if(pe.contextMenuPending==jn&&(pe.contextMenuPending=!1,pe.wrapper.style.cssText=Vt,ze.style.cssText=Ot,be&&Pe<9&&Oe.scrollbars.setScrollTop(Oe.scroller.scrollTop=bt),ze.selectionStart!=null)){(!be||be&&Pe<9)&&Un();var _i=0,Bi=function(){Oe.selForContextMenu==De.doc.sel&&ze.selectionStart==0&&ze.selectionEnd>0&&pe.prevInput=="\u200B"?Sn(De,gs)(De):_i++<10?Oe.detectingSelectAll=setTimeout(Bi,500):(Oe.selForContextMenu=null,Oe.input.reset())};Oe.detectingSelectAll=setTimeout(Bi,200)}}if(be&&Pe>=9&&Un(),we){Xi(re);var mi=function(){Mn(window,"mouseup",mi),setTimeout(jn,20)};Jt(window,"mouseup",mi)}else setTimeout(jn,50)},Fa.prototype.readOnlyChanged=function(re){re||this.reset(),this.textarea.disabled=re=="nocursor",this.textarea.readOnly=!!re},Fa.prototype.setUneditable=function(){},Fa.prototype.needsContentAttribute=!1;function dm(re,pe){if(pe=pe?Ft(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 De=ct();pe.autofocus=De==re||re.getAttribute("autofocus")!=null&&De==document.body}function Oe(){re.value=Dt.getValue()}var ze;if(re.form&&(Jt(re.form,"submit",Oe),!pe.leaveSubmitMethodAlone)){var at=re.form;ze=at.submit;try{var bt=at.submit=function(){Oe(),at.submit=ze,at.submit(),at.submit=bt}}catch(Ot){}}pe.finishInit=function(Ot){Ot.save=Oe,Ot.getTextArea=function(){return re},Ot.toTextArea=function(){Ot.toTextArea=isNaN,Oe(),re.parentNode.removeChild(Ot.getWrapperElement()),re.style.display="",re.form&&(Mn(re.form,"submit",Oe),!pe.leaveSubmitMethodAlone&&typeof re.form.submit=="function"&&(re.form.submit=ze))}},re.style.display="none";var Dt=ys(function(Ot){return re.parentNode.insertBefore(Ot,re.nextSibling)},pe);return Dt}function Yd(re){re.off=Mn,re.on=Jt,re.wheelEventPixels=pi,re.Doc=Ba,re.splitLines=Mr,re.countColumn=ht,re.findColumn=un,re.isWordChar=qe,re.Pass=_t,re.signal=yn,re.Line=Xo,re.changeEnd=qi,re.scrollbarModel=Id,re.Pos=qt,re.cmpPos=on,re.modes=uo,re.mimeModes=po,re.resolveMode=Xn,re.getMode=$e,re.modeExtensions=nt,re.extendMode=Je,re.copyState=wt,re.startState=kt,re.innerMode=Nt,re.commands=Va,re.keyMap=Ll,re.keyName=Ud,re.isModifierKey=Lh,re.lookupKey=eu,re.normalizeKeyMap=zd,re.StringStream=Et,re.SharedTextMarker=ac,re.TextMarker=fn,re.LineWidget=Ma,re.e_preventDefault=ai,re.e_stopPropagation=Di,re.e_stop=Xi,re.addClass=Ct,re.contains=mt,re.rmClass=ke,re.keyNames=Ku}um(ys),Th(ys);var ah="iter insert remove copy getEditor constructor".split(" ");for(var _f in Ba.prototype)Ba.prototype.hasOwnProperty(_f)&&dt(ah,_f)<0&&(ys.prototype[_f]=function(re){return function(){return re.apply(this.doc,arguments)}}(Ba.prototype[_f]));return oi(Ba),ys.inputStyles={textarea:Fa,contenteditable:Qs},ys.defineMode=function(re){!ys.defaults.mode&&re!="null"&&(ys.defaults.mode=re),io.apply(this,arguments)},ys.defineMIME=Do,ys.defineMode("null",function(){return{token:function(re){return re.skipToEnd()}}}),ys.defineMIME("text/plain","null"),ys.defineExtension=function(re,pe){ys.prototype[re]=pe},ys.defineDocExtension=function(re,pe){Ba.prototype[re]=pe},ys.fromTextArea=dm,Yd(ys),ys.version="5.58.2",ys})},25419:function(Cn,Yt,Ee){(function(Le){Le(Ee(89780),Ee(15525),Ee(98101))})(function(Le){"use strict";Le.defineMode("markdown",function(me,Ie){var Te=Le.getMode(me,"text/html"),be=Te.name=="null";function Pe(ht){if(Le.findModeByName){var rt=Le.findModeByName(ht);rt&&(ht=rt.mime||rt.mimes[0])}var dt=Le.getMode(me,ht);return dt.name=="null"?null:dt}Ie.highlightFormatting===void 0&&(Ie.highlightFormatting=!1),Ie.maxBlockquoteDepth===void 0&&(Ie.maxBlockquoteDepth=0),Ie.taskLists===void 0&&(Ie.taskLists=!1),Ie.strikethrough===void 0&&(Ie.strikethrough=!1),Ie.emoji===void 0&&(Ie.emoji=!1),Ie.fencedCodeBlockHighlighting===void 0&&(Ie.fencedCodeBlockHighlighting=!0),Ie.fencedCodeBlockDefaultMode===void 0&&(Ie.fencedCodeBlockDefaultMode="text/plain"),Ie.xml===void 0&&(Ie.xml=!0),Ie.tokenTypeOverrides===void 0&&(Ie.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)&&Ie.tokenTypeOverrides[Se]&&(he[Se]=Ie.tokenTypeOverrides[Se]);var xe=/^([*\-_])(?:\s*\1){2,}\s*$/,ge=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,ce=/^\[(x| )\](?=\s)/i,ve=Ie.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,de=/^ {0,3}(?:\={1,}|-{2,})\s*$/,ue=/^[^#!\[\]*_\\<>` "'(~:]+/,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(ht,rt,dt){return rt.f=rt.inline=dt,dt(ht,rt)}function le(ht,rt,dt){return rt.f=rt.block=dt,dt(ht,rt)}function ye(ht){return!ht||!/\S/.test(ht.string)}function we(ht){if(ht.linkTitle=!1,ht.linkHref=!1,ht.linkText=!1,ht.em=!1,ht.strong=!1,ht.strikethrough=!1,ht.quote=0,ht.indentedCode=!1,ht.f==ke){var rt=be;if(!rt){var dt=Le.innerMode(Te,ht.htmlState);rt=dt.mode.name=="xml"&&dt.state.tagStart===null&&!dt.state.context&&dt.state.tokenize.isInText}rt&&(ht.f=Qe,ht.block=Ce,ht.htmlState=null)}return ht.trailingSpace=0,ht.trailingSpaceNewLine=!1,ht.prevLine=ht.thisLine,ht.thisLine={stream:null},null}function Ce(ht,rt){var dt=ht.column()===rt.indentation,yt=ye(rt.prevLine.stream),_t=rt.indentedCode,vt=rt.prevLine.hr,Bt=rt.list!==!1,jt=(rt.listStack[rt.listStack.length-1]||0)+3;rt.indentedCode=!1;var un=rt.indentation;if(rt.indentationDiff===null&&(rt.indentationDiff=rt.indentation,Bt)){for(rt.list=null;un<rt.listStack[rt.listStack.length-1];)rt.listStack.pop(),rt.listStack.length?rt.indentation=rt.listStack[rt.listStack.length-1]:rt.list=!1;rt.list!==!1&&(rt.indentationDiff=un-rt.listStack[rt.listStack.length-1])}var Kt=!yt&&!vt&&!rt.prevLine.header&&(!Bt||!_t)&&!rt.prevLine.fencedCodeEnd,xn=(rt.list===!1||vt||yt)&&rt.indentation<=jt&&ht.match(xe),Ut=null;if(rt.indentationDiff>=4&&(_t||rt.prevLine.fencedCodeEnd||rt.prevLine.header||yt))return ht.skipToEnd(),rt.indentedCode=!0,he.code;if(ht.eatSpace())return null;if(dt&&rt.indentation<=jt&&(Ut=ht.match(ve))&&Ut[1].length<=6)return rt.quote=0,rt.header=Ut[1].length,rt.thisLine.header=!0,Ie.highlightFormatting&&(rt.formatting="header"),rt.f=rt.inline,je(rt);if(rt.indentation<=jt&&ht.eat(">"))return rt.quote=dt?1:rt.quote+1,Ie.highlightFormatting&&(rt.formatting="quote"),ht.eatSpace(),je(rt);if(!xn&&!rt.setext&&dt&&rt.indentation<=jt&&(Ut=ht.match(ge))){var Wt=Ut[1]?"ol":"ul";return rt.indentation=un+ht.current().length,rt.list=!0,rt.quote=0,rt.listStack.push(rt.indentation),rt.em=!1,rt.strong=!1,rt.code=!1,rt.strikethrough=!1,Ie.taskLists&&ht.match(ce,!1)&&(rt.taskList=!0),rt.f=rt.inline,Ie.highlightFormatting&&(rt.formatting=["list","list-"+Wt]),je(rt)}else{if(dt&&rt.indentation<=jt&&(Ut=ht.match(z,!0)))return rt.quote=0,rt.fencedEndRE=new RegExp(Ut[1]+"+ *$"),rt.localMode=Ie.fencedCodeBlockHighlighting&&Pe(Ut[2]||Ie.fencedCodeBlockDefaultMode),rt.localMode&&(rt.localState=Le.startState(rt.localMode)),rt.f=rt.block=Ne,Ie.highlightFormatting&&(rt.formatting="code-block"),rt.code=-1,je(rt);if(rt.setext||(!Kt||!Bt)&&!rt.quote&&rt.list===!1&&!rt.code&&!xn&&!ee.test(ht.string)&&(Ut=ht.lookAhead(1))&&(Ut=Ut.match(de)))return rt.setext?(rt.header=rt.setext,rt.setext=0,ht.skipToEnd(),Ie.highlightFormatting&&(rt.formatting="header")):(rt.header=Ut[0].charAt(0)=="="?1:2,rt.setext=rt.header),rt.thisLine.header=!0,rt.f=rt.inline,je(rt);if(xn)return ht.skipToEnd(),rt.hr=!0,rt.thisLine.hr=!0,he.hr;if(ht.peek()==="[")return se(ht,rt,it)}return se(ht,rt,rt.inline)}function ke(ht,rt){var dt=Te.token(ht,rt.htmlState);if(!be){var yt=Le.innerMode(Te,rt.htmlState);(yt.mode.name=="xml"&&yt.state.tagStart===null&&!yt.state.context&&yt.state.tokenize.isInText||rt.md_inside&&ht.current().indexOf(">")>-1)&&(rt.f=Qe,rt.block=Ce,rt.htmlState=null)}return dt}function Ne(ht,rt){var dt=rt.listStack[rt.listStack.length-1]||0,yt=rt.indentation<dt,_t=dt+3;if(rt.fencedEndRE&&rt.indentation<=_t&&(yt||ht.match(rt.fencedEndRE))){Ie.highlightFormatting&&(rt.formatting="code-block");var vt;return yt||(vt=je(rt)),rt.localMode=rt.localState=null,rt.block=Ce,rt.f=Qe,rt.fencedEndRE=null,rt.code=0,rt.thisLine.fencedCodeEnd=!0,yt?le(ht,rt,rt.block):vt}else return rt.localMode?rt.localMode.token(ht,rt.localState):(ht.skipToEnd(),he.code)}function je(ht){var rt=[];if(ht.formatting){rt.push(he.formatting),typeof ht.formatting=="string"&&(ht.formatting=[ht.formatting]);for(var dt=0;dt<ht.formatting.length;dt++)rt.push(he.formatting+"-"+ht.formatting[dt]),ht.formatting[dt]==="header"&&rt.push(he.formatting+"-"+ht.formatting[dt]+"-"+ht.header),ht.formatting[dt]==="quote"&&(!Ie.maxBlockquoteDepth||Ie.maxBlockquoteDepth>=ht.quote?rt.push(he.formatting+"-"+ht.formatting[dt]+"-"+ht.quote):rt.push("error"))}if(ht.taskOpen)return rt.push("meta"),rt.length?rt.join(" "):null;if(ht.taskClosed)return rt.push("property"),rt.length?rt.join(" "):null;if(ht.linkHref?rt.push(he.linkHref,"url"):(ht.strong&&rt.push(he.strong),ht.em&&rt.push(he.em),ht.strikethrough&&rt.push(he.strikethrough),ht.emoji&&rt.push(he.emoji),ht.linkText&&rt.push(he.linkText),ht.code&&rt.push(he.code),ht.image&&rt.push(he.image),ht.imageAltText&&rt.push(he.imageAltText,"link"),ht.imageMarker&&rt.push(he.imageMarker)),ht.header&&rt.push(he.header,he.header+"-"+ht.header),ht.quote&&(rt.push(he.quote),!Ie.maxBlockquoteDepth||Ie.maxBlockquoteDepth>=ht.quote?rt.push(he.quote+"-"+ht.quote):rt.push(he.quote+"-"+Ie.maxBlockquoteDepth)),ht.list!==!1){var yt=(ht.listStack.length-1)%3;yt?yt===1?rt.push(he.list2):rt.push(he.list3):rt.push(he.list1)}return ht.trailingSpaceNewLine?rt.push("trailing-space-new-line"):ht.trailingSpace&&rt.push("trailing-space-"+(ht.trailingSpace%2?"a":"b")),rt.length?rt.join(" "):null}function Ve(ht,rt){if(ht.match(ue,!0))return je(rt)}function Qe(ht,rt){var dt=rt.text(ht,rt);if(typeof dt!="undefined")return dt;if(rt.list)return rt.list=null,je(rt);if(rt.taskList){var yt=ht.match(ce,!0)[1]===" ";return yt?rt.taskOpen=!0:rt.taskClosed=!0,Ie.highlightFormatting&&(rt.formatting="task"),rt.taskList=!1,je(rt)}if(rt.taskOpen=!1,rt.taskClosed=!1,rt.header&&ht.match(/^#+$/,!0))return Ie.highlightFormatting&&(rt.formatting="header"),je(rt);var _t=ht.next();if(rt.linkTitle){rt.linkTitle=!1;var vt=_t;_t==="("&&(vt=")"),vt=(vt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Bt="^\\s*(?:[^"+vt+"\\\\]+|\\\\\\\\|\\\\.)"+vt;if(ht.match(new RegExp(Bt),!0))return he.linkHref}if(_t==="`"){var jt=rt.formatting;Ie.highlightFormatting&&(rt.formatting="code"),ht.eatWhile("`");var un=ht.current().length;if(rt.code==0&&(!rt.quote||un==1))return rt.code=un,je(rt);if(un==rt.code){var Kt=je(rt);return rt.code=0,Kt}else return rt.formatting=jt,je(rt)}else if(rt.code)return je(rt);if(_t==="\\"&&(ht.next(),Ie.highlightFormatting)){var xn=je(rt),Ut=he.formatting+"-escape";return xn?xn+" "+Ut:Ut}if(_t==="!"&&ht.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return rt.imageMarker=!0,rt.image=!0,Ie.highlightFormatting&&(rt.formatting="image"),je(rt);if(_t==="["&&rt.imageMarker&&ht.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return rt.imageMarker=!1,rt.imageAltText=!0,Ie.highlightFormatting&&(rt.formatting="image"),je(rt);if(_t==="]"&&rt.imageAltText){Ie.highlightFormatting&&(rt.formatting="image");var xn=je(rt);return rt.imageAltText=!1,rt.image=!1,rt.inline=rt.f=mt,xn}if(_t==="["&&!rt.image)return rt.linkText&&ht.match(/^.*?\]/)||(rt.linkText=!0,Ie.highlightFormatting&&(rt.formatting="link")),je(rt);if(_t==="]"&&rt.linkText){Ie.highlightFormatting&&(rt.formatting="link");var xn=je(rt);return rt.linkText=!1,rt.inline=rt.f=ht.match(/\(.*?\)| ?\[.*?\]/,!1)?mt:Qe,xn}if(_t==="<"&&ht.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){rt.f=rt.inline=Ge,Ie.highlightFormatting&&(rt.formatting="link");var xn=je(rt);return xn?xn+=" ":xn="",xn+he.linkInline}if(_t==="<"&&ht.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){rt.f=rt.inline=Ge,Ie.highlightFormatting&&(rt.formatting="link");var xn=je(rt);return xn?xn+=" ":xn="",xn+he.linkEmail}if(Ie.xml&&_t==="<"&&ht.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Wt=ht.string.indexOf(">",ht.pos);if(Wt!=-1){var $t=ht.string.substring(ht.start,Wt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test($t)&&(rt.md_inside=!0)}return ht.backUp(1),rt.htmlState=Le.startState(Te),le(ht,rt,ke)}if(Ie.xml&&_t==="<"&&ht.match(/^\/\w*?>/))return rt.md_inside=!1,"tag";if(_t==="*"||_t==="_"){for(var ft=1,We=ht.pos==1?" ":ht.string.charAt(ht.pos-2);ft<3&&ht.eat(_t);)ft++;var Be=ht.peek()||" ",qe=!/\s/.test(Be)&&(!oe.test(Be)||/\s/.test(We)||oe.test(We)),et=!/\s/.test(We)&&(!oe.test(We)||/\s/.test(Be)||oe.test(Be)),He=null,Xe=null;if(ft%2&&(!rt.em&&qe&&(_t==="*"||!et||oe.test(We))?He=!0:rt.em==_t&&et&&(_t==="*"||!qe||oe.test(Be))&&(He=!1)),ft>1&&(!rt.strong&&qe&&(_t==="*"||!et||oe.test(We))?Xe=!0:rt.strong==_t&&et&&(_t==="*"||!qe||oe.test(Be))&&(Xe=!1)),Xe!=null||He!=null){Ie.highlightFormatting&&(rt.formatting=He==null?"strong":Xe==null?"em":"strong em"),He===!0&&(rt.em=_t),Xe===!0&&(rt.strong=_t);var Kt=je(rt);return He===!1&&(rt.em=!1),Xe===!1&&(rt.strong=!1),Kt}}else if(_t===" "&&(ht.eat("*")||ht.eat("_"))){if(ht.peek()===" ")return je(rt);ht.backUp(1)}if(Ie.strikethrough){if(_t==="~"&&ht.eatWhile(_t)){if(rt.strikethrough){Ie.highlightFormatting&&(rt.formatting="strikethrough");var Kt=je(rt);return rt.strikethrough=!1,Kt}else if(ht.match(/^[^\s]/,!1))return rt.strikethrough=!0,Ie.highlightFormatting&&(rt.formatting="strikethrough"),je(rt)}else if(_t===" "&&ht.match(/^~~/,!0)){if(ht.peek()===" ")return je(rt);ht.backUp(2)}}if(Ie.emoji&&_t===":"&&ht.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){rt.emoji=!0,Ie.highlightFormatting&&(rt.formatting="emoji");var Re=je(rt);return rt.emoji=!1,Re}return _t===" "&&(ht.match(/^ +$/,!1)?rt.trailingSpace++:rt.trailingSpace&&(rt.trailingSpaceNewLine=!0)),je(rt)}function Ge(ht,rt){var dt=ht.next();if(dt===">"){rt.f=rt.inline=Qe,Ie.highlightFormatting&&(rt.formatting="link");var yt=je(rt);return yt?yt+=" ":yt="",yt+he.linkInline}return ht.match(/^[^>]+/,!0),he.linkInline}function mt(ht,rt){if(ht.eatSpace())return null;var dt=ht.next();return dt==="("||dt==="["?(rt.f=rt.inline=Ct(dt==="("?")":"]"),Ie.highlightFormatting&&(rt.formatting="link-string"),rt.linkHref=!0,je(rt)):"error"}var ct={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ct(ht){return function(rt,dt){var yt=rt.next();if(yt===ht){dt.f=dt.inline=Qe,Ie.highlightFormatting&&(dt.formatting="link-string");var _t=je(dt);return dt.linkHref=!1,_t}return rt.match(ct[ht]),dt.linkHref=!0,je(dt)}}function it(ht,rt){return ht.match(/^([^\]\\]|\\.)*\]:/,!1)?(rt.f=St,ht.next(),Ie.highlightFormatting&&(rt.formatting="link"),rt.linkText=!0,je(rt)):se(ht,rt,Qe)}function St(ht,rt){if(ht.match(/^\]:/,!0)){rt.f=rt.inline=ut,Ie.highlightFormatting&&(rt.formatting="link");var dt=je(rt);return rt.linkText=!1,dt}return ht.match(/^([^\]\\]|\\.)+/,!0),he.linkText}function ut(ht,rt){return ht.eatSpace()?null:(ht.match(/^[^\s]+/,!0),ht.peek()===void 0?rt.linkTitle=!0:ht.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),rt.f=rt.inline=Qe,he.linkHref+" url")}var Ft={startState:function(){return{f:Ce,prevLine:{stream:null},thisLine:{stream:null},block:Ce,htmlState:null,indentation:0,inline:Qe,text:Ve,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(ht){return{f:ht.f,prevLine:ht.prevLine,thisLine:ht.thisLine,block:ht.block,htmlState:ht.htmlState&&Le.copyState(Te,ht.htmlState),indentation:ht.indentation,localMode:ht.localMode,localState:ht.localMode?Le.copyState(ht.localMode,ht.localState):null,inline:ht.inline,text:ht.text,formatting:!1,linkText:ht.linkText,linkTitle:ht.linkTitle,linkHref:ht.linkHref,code:ht.code,em:ht.em,strong:ht.strong,strikethrough:ht.strikethrough,emoji:ht.emoji,header:ht.header,setext:ht.setext,hr:ht.hr,taskList:ht.taskList,list:ht.list,listStack:ht.listStack.slice(0),quote:ht.quote,indentedCode:ht.indentedCode,trailingSpace:ht.trailingSpace,trailingSpaceNewLine:ht.trailingSpaceNewLine,md_inside:ht.md_inside,fencedEndRE:ht.fencedEndRE}},token:function(ht,rt){if(rt.formatting=!1,ht!=rt.thisLine.stream){if(rt.header=0,rt.hr=!1,ht.match(/^\s*$/,!0))return we(rt),null;if(rt.prevLine=rt.thisLine,rt.thisLine={stream:ht},rt.taskList=!1,rt.trailingSpace=0,rt.trailingSpaceNewLine=!1,!rt.localState&&(rt.f=rt.block,rt.f!=ke)){var dt=ht.match(/^\s*/,!0)[0].replace(/\t/g,ie).length;if(rt.indentation=dt,rt.indentationDiff=null,dt>0)return null}}return rt.f(ht,rt)},innerMode:function(ht){return ht.block==ke?{state:ht.htmlState,mode:Te}:ht.localState?{state:ht.localState,mode:ht.localMode}:{state:ht,mode:Ft}},indent:function(ht,rt,dt){return ht.block==ke&&Te.indent?Te.indent(ht.htmlState,rt,dt):ht.localState&&ht.localMode.indent?ht.localMode.indent(ht.localState,rt,dt):Le.Pass},blankLine:we,getType:je,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Ft},"xml"),Le.defineMIME("text/markdown","markdown"),Le.defineMIME("text/x-markdown","markdown")})},98101:function(Cn,Yt,Ee){(function(Le){Le(Ee(89780))})(function(Le){"use strict";Le.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<Le.modeInfo.length;me++){var Ie=Le.modeInfo[me];Ie.mimes&&(Ie.mime=Ie.mimes[0])}Le.findModeByMIME=function(Te){Te=Te.toLowerCase();for(var be=0;be<Le.modeInfo.length;be++){var Pe=Le.modeInfo[be];if(Pe.mime==Te)return Pe;if(Pe.mimes){for(var he=0;he<Pe.mimes.length;he++)if(Pe.mimes[he]==Te)return Pe}}if(/\+xml$/.test(Te))return Le.findModeByMIME("application/xml");if(/\+json$/.test(Te))return Le.findModeByMIME("application/json")},Le.findModeByExtension=function(Te){Te=Te.toLowerCase();for(var be=0;be<Le.modeInfo.length;be++){var Pe=Le.modeInfo[be];if(Pe.ext){for(var he=0;he<Pe.ext.length;he++)if(Pe.ext[he]==Te)return Pe}}},Le.findModeByFileName=function(Te){for(var be=0;be<Le.modeInfo.length;be++){var Pe=Le.modeInfo[be];if(Pe.file&&Pe.file.test(Te))return Pe}var he=Te.lastIndexOf("."),Se=he>-1&&Te.substring(he+1,Te.length);if(Se)return Le.findModeByExtension(Se)},Le.findModeByName=function(Te){Te=Te.toLowerCase();for(var be=0;be<Le.modeInfo.length;be++){var Pe=Le.modeInfo[be];if(Pe.name.toLowerCase()==Te)return Pe;if(Pe.alias){for(var he=0;he<Pe.alias.length;he++)if(Pe.alias[he].toLowerCase()==Te)return Pe}}}})},67549:function(Cn,Yt,Ee){(function(Le){Le(Ee(89780))})(function(Le){"use strict";Le.defineMode("stex",function(me,Ie){"use strict";function Te(ue,z){ue.cmdState.push(z)}function be(ue){return ue.cmdState.length>0?ue.cmdState[ue.cmdState.length-1]:null}function Pe(ue){var z=ue.cmdState.pop();z&&z.closeBracket()}function he(ue){for(var z=ue.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(ue,z,ee){return function(){this.name=ue,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(ue,z){ue.f=z}function ce(ue,z){var ee;if(ue.match(/^\\[a-zA-Z@]+/)){var oe=ue.current().slice(1);return ee=xe.hasOwnProperty(oe)?xe[oe]:xe.DEFAULT,ee=new ee,Te(z,ee),ge(z,de),ee.style}if(ue.match(/^\\[$&%#{}_]/)||ue.match(/^\\[,;!\/\\]/))return"tag";if(ue.match("\\["))return ge(z,function(se,le){return ve(se,le,"\\]")}),"keyword";if(ue.match("\\("))return ge(z,function(se,le){return ve(se,le,"\\)")}),"keyword";if(ue.match("$$"))return ge(z,function(se,le){return ve(se,le,"$$")}),"keyword";if(ue.match("$"))return ge(z,function(se,le){return ve(se,le,"$")}),"keyword";var ie=ue.next();if(ie=="%")return ue.skipToEnd(),"comment";if(ie=="}"||ie=="]"){if(ee=be(z),ee)ee.closeBracket(ie),ge(z,de);else return"error";return"bracket"}else return ie=="{"||ie=="["?(ee=xe.DEFAULT,ee=new ee,Te(z,ee),"bracket"):/\d/.test(ie)?(ue.eatWhile(/[\w.%]/),"atom"):(ue.eatWhile(/[\w\-_]/),ee=he(z),ee.name=="begin"&&(ee.argument=ue.current()),ee.styleIdentifier())}function ve(ue,z,ee){if(ue.eatSpace())return null;if(ee&&ue.match(ee))return ge(z,ce),"keyword";if(ue.match(/^\\[a-zA-Z@]+/))return"tag";if(ue.match(/^[a-zA-Z]+/))return"variable-2";if(ue.match(/^\\[$&%#{}_]/)||ue.match(/^\\[,;!\/]/)||ue.match(/^[\^_&]/))return"tag";if(ue.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(ue.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var oe=ue.next();return oe=="{"||oe=="}"||oe=="["||oe=="]"||oe=="("||oe==")"?"bracket":oe=="%"?(ue.skipToEnd(),"comment"):"error"}function de(ue,z){var ee=ue.peek(),oe;return ee=="{"||ee=="["?(oe=be(z),oe.openBracket(ee),ue.eat(ee),ge(z,ce),"bracket"):/[ \t\r]/.test(ee)?(ue.eat(ee),null):(ge(z,ce),Pe(z),ce(ue,z))}return{startState:function(){var ue=Ie.inMathMode?function(z,ee){return ve(z,ee)}:ce;return{cmdState:[],f:ue}},copyState:function(ue){return{cmdState:ue.cmdState.slice(),f:ue.f}},token:function(ue,z){return z.f(ue,z)},blankLine:function(ue){ue.f=ce,ue.cmdState.length=0},lineComment:"%"}}),Le.defineMIME("text/x-stex","stex"),Le.defineMIME("text/x-latex","stex")})},15525:function(Cn,Yt,Ee){(function(Le){Le(Ee(89780))})(function(Le){"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},Ie={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};Le.defineMode("xml",function(Te,be){var Pe=Te.indentUnit,he={},Se=be.htmlMode?me:Ie;for(var xe in Se)he[xe]=Se[xe];for(var xe in be)he[xe]=be[xe];var ge,ce;function ve(Ge,mt){function ct(St){return mt.tokenize=St,St(Ge,mt)}var Ct=Ge.next();if(Ct=="<")return Ge.eat("!")?Ge.eat("[")?Ge.match("CDATA[")?ct(z("atom","]]>")):null:Ge.match("--")?ct(z("comment","-->")):Ge.match("DOCTYPE",!0,!0)?(Ge.eatWhile(/[\w\._\-]/),ct(ee(1))):null:Ge.eat("?")?(Ge.eatWhile(/[\w\._\-]/),mt.tokenize=z("meta","?>"),"meta"):(ge=Ge.eat("/")?"closeTag":"openTag",mt.tokenize=de,"tag bracket");if(Ct=="&"){var it;return Ge.eat("#")?Ge.eat("x")?it=Ge.eatWhile(/[a-fA-F\d]/)&&Ge.eat(";"):it=Ge.eatWhile(/[\d]/)&&Ge.eat(";"):it=Ge.eatWhile(/[\w\.\-:]/)&&Ge.eat(";"),it?"atom":"error"}else return Ge.eatWhile(/[^&<]/),null}ve.isInText=!0;function de(Ge,mt){var ct=Ge.next();if(ct==">"||ct=="/"&&Ge.eat(">"))return mt.tokenize=ve,ge=ct==">"?"endTag":"selfcloseTag","tag bracket";if(ct=="=")return ge="equals",null;if(ct=="<"){mt.tokenize=ve,mt.state=le,mt.tagName=mt.tagStart=null;var Ct=mt.tokenize(Ge,mt);return Ct?Ct+" tag error":"tag error"}else return/[\'\"]/.test(ct)?(mt.tokenize=ue(ct),mt.stringStartCol=Ge.column(),mt.tokenize(Ge,mt)):(Ge.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ue(Ge){var mt=function(ct,Ct){for(;!ct.eol();)if(ct.next()==Ge){Ct.tokenize=de;break}return"string"};return mt.isInAttribute=!0,mt}function z(Ge,mt){return function(ct,Ct){for(;!ct.eol();){if(ct.match(mt)){Ct.tokenize=ve;break}ct.next()}return Ge}}function ee(Ge){return function(mt,ct){for(var Ct;(Ct=mt.next())!=null;){if(Ct=="<")return ct.tokenize=ee(Ge+1),ct.tokenize(mt,ct);if(Ct==">")if(Ge==1){ct.tokenize=ve;break}else return ct.tokenize=ee(Ge-1),ct.tokenize(mt,ct)}return"meta"}}function oe(Ge,mt,ct){this.prev=Ge.context,this.tagName=mt,this.indent=Ge.indented,this.startOfLine=ct,(he.doNotIndent.hasOwnProperty(mt)||Ge.context&&Ge.context.noIndent)&&(this.noIndent=!0)}function ie(Ge){Ge.context&&(Ge.context=Ge.context.prev)}function se(Ge,mt){for(var ct;;){if(!Ge.context||(ct=Ge.context.tagName,!he.contextGrabbers.hasOwnProperty(ct)||!he.contextGrabbers[ct].hasOwnProperty(mt)))return;ie(Ge)}}function le(Ge,mt,ct){return Ge=="openTag"?(ct.tagStart=mt.column(),ye):Ge=="closeTag"?we:le}function ye(Ge,mt,ct){return Ge=="word"?(ct.tagName=mt.current(),ce="tag",Ne):he.allowMissingTagName&&Ge=="endTag"?(ce="tag bracket",Ne(Ge,mt,ct)):(ce="error",ye)}function we(Ge,mt,ct){if(Ge=="word"){var Ct=mt.current();return ct.context&&ct.context.tagName!=Ct&&he.implicitlyClosed.hasOwnProperty(ct.context.tagName)&&ie(ct),ct.context&&ct.context.tagName==Ct||he.matchClosing===!1?(ce="tag",Ce):(ce="tag error",ke)}else return he.allowMissingTagName&&Ge=="endTag"?(ce="tag bracket",Ce(Ge,mt,ct)):(ce="error",ke)}function Ce(Ge,mt,ct){return Ge!="endTag"?(ce="error",Ce):(ie(ct),le)}function ke(Ge,mt,ct){return ce="error",Ce(Ge,mt,ct)}function Ne(Ge,mt,ct){if(Ge=="word")return ce="attribute",je;if(Ge=="endTag"||Ge=="selfcloseTag"){var Ct=ct.tagName,it=ct.tagStart;return ct.tagName=ct.tagStart=null,Ge=="selfcloseTag"||he.autoSelfClosers.hasOwnProperty(Ct)?se(ct,Ct):(se(ct,Ct),ct.context=new oe(ct,Ct,it==ct.indented)),le}return ce="error",Ne}function je(Ge,mt,ct){return Ge=="equals"?Ve:(he.allowMissing||(ce="error"),Ne(Ge,mt,ct))}function Ve(Ge,mt,ct){return Ge=="string"?Qe:Ge=="word"&&he.allowUnquoted?(ce="string",Ne):(ce="error",Ne(Ge,mt,ct))}function Qe(Ge,mt,ct){return Ge=="string"?Qe:Ne(Ge,mt,ct)}return{startState:function(Ge){var mt={tokenize:ve,state:le,indented:Ge||0,tagName:null,tagStart:null,context:null};return Ge!=null&&(mt.baseIndent=Ge),mt},token:function(Ge,mt){if(!mt.tagName&&Ge.sol()&&(mt.indented=Ge.indentation()),Ge.eatSpace())return null;ge=null;var ct=mt.tokenize(Ge,mt);return(ct||ge)&&ct!="comment"&&(ce=null,mt.state=mt.state(ge||ct,Ge,mt),ce&&(ct=ce=="error"?ct+" error":ce)),ct},indent:function(Ge,mt,ct){var Ct=Ge.context;if(Ge.tokenize.isInAttribute)return Ge.tagStart==Ge.indented?Ge.stringStartCol+1:Ge.indented+Pe;if(Ct&&Ct.noIndent)return Le.Pass;if(Ge.tokenize!=de&&Ge.tokenize!=ve)return ct?ct.match(/^(\s*)/)[0].length:0;if(Ge.tagName)return he.multilineTagIndentPastTag!==!1?Ge.tagStart+Ge.tagName.length+2:Ge.tagStart+Pe*(he.multilineTagIndentFactor||1);if(he.alignCDATA&&/<!\[CDATA\[/.test(mt))return 0;var it=mt&&/^<(\/)?([\w_:\.-]*)/.exec(mt);if(it&&it[1])for(;Ct;)if(Ct.tagName==it[2]){Ct=Ct.prev;break}else if(he.implicitlyClosed.hasOwnProperty(Ct.tagName))Ct=Ct.prev;else break;else if(it)for(;Ct;){var St=he.contextGrabbers[Ct.tagName];if(St&&St.hasOwnProperty(it[2]))Ct=Ct.prev;else break}for(;Ct&&Ct.prev&&!Ct.startOfLine;)Ct=Ct.prev;return Ct?Ct.indent+Pe:Ge.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:he.htmlMode?"html":"xml",helperType:he.htmlMode?"html":"xml",skipAttribute:function(Ge){Ge.state==Ve&&(Ge.state=Ne)},xmlCurrentTag:function(Ge){return Ge.tagName?{name:Ge.tagName,close:Ge.type=="closeTag"}:null},xmlCurrentContext:function(Ge){for(var mt=[],ct=Ge.context;ct;ct=ct.prev)ct.tagName&&mt.push(ct.tagName);return mt.reverse()}}}),Le.defineMIME("text/xml","xml"),Le.defineMIME("application/xml","xml"),Le.mimeModes.hasOwnProperty("text/html")||Le.defineMIME("text/html",{name:"xml",htmlMode:!0})})},3867:function(Cn,Yt,Ee){var Le=Ee(97671);(function(me,Ie){Cn.exports=Ie()})(this,function(){"use strict";function me(Ae){var Ue=typeof Ae;return Ae!==null&&(Ue==="object"||Ue==="function")}function Ie(Ae){return typeof Ae=="function"}var Te=void 0;Array.isArray?Te=Array.isArray:Te=function(Ae){return Object.prototype.toString.call(Ae)==="[object Array]"};var be=Te,Pe=0,he=void 0,Se=void 0,xe=function(Ue,Ke){we[Pe]=Ue,we[Pe+1]=Ke,Pe+=2,Pe===2&&(Se?Se(Ce):Ne())};function ge(Ae){Se=Ae}function ce(Ae){xe=Ae}var ve=typeof window!="undefined"?window:void 0,de=ve||{},ue=de.MutationObserver||de.WebKitMutationObserver,z=typeof self=="undefined"&&typeof Le!="undefined"&&{}.toString.call(Le)==="[object process]",ee=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function oe(){return function(){return Le.nextTick(Ce)}}function ie(){return typeof he!="undefined"?function(){he(Ce)}:ye()}function se(){var Ae=0,Ue=new ue(Ce),Ke=document.createTextNode("");return Ue.observe(Ke,{characterData:!0}),function(){Ke.data=Ae=++Ae%2}}function le(){var Ae=new MessageChannel;return Ae.port1.onmessage=Ce,function(){return Ae.port2.postMessage(0)}}function ye(){var Ae=setTimeout;return function(){return Ae(Ce,1)}}var we=new Array(1e3);function Ce(){for(var Ae=0;Ae<Pe;Ae+=2){var Ue=we[Ae],Ke=we[Ae+1];Ue(Ke),we[Ae]=void 0,we[Ae+1]=void 0}Pe=0}function ke(){try{var Ae=Function("return this")().require("vertx");return he=Ae.runOnLoop||Ae.runOnContext,ie()}catch(Ue){return ye()}}var Ne=void 0;z?Ne=oe():ue?Ne=se():ee?Ne=le():ve===void 0?Ne=ke():Ne=ye();function je(Ae,Ue){var Ke=this,Ze=new this.constructor(Ge);Ze[Qe]===void 0&&Wt(Ze);var lt=Ke._state;if(lt){var xt=arguments[lt-1];xe(function(){return un(lt,Ze,xt,Ke._result)})}else Bt(Ke,Ze,Ae,Ue);return Ze}function Ve(Ae){var Ue=this;if(Ae&&typeof Ae=="object"&&Ae.constructor===Ue)return Ae;var Ke=new Ue(Ge);return dt(Ke,Ae),Ke}var Qe=Math.random().toString(36).substring(2);function Ge(){}var mt=void 0,ct=1,Ct=2;function it(){return new TypeError("You cannot resolve a promise with itself")}function St(){return new TypeError("A promises callback cannot return that same promise.")}function ut(Ae,Ue,Ke,Ze){try{Ae.call(Ue,Ke,Ze)}catch(lt){return lt}}function Ft(Ae,Ue,Ke){xe(function(Ze){var lt=!1,xt=ut(Ke,Ue,function(tn){lt||(lt=!0,Ue!==tn?dt(Ze,tn):_t(Ze,tn))},function(tn){lt||(lt=!0,vt(Ze,tn))},"Settle: "+(Ze._label||" unknown promise"));!lt&&xt&&(lt=!0,vt(Ze,xt))},Ae)}function ht(Ae,Ue){Ue._state===ct?_t(Ae,Ue._result):Ue._state===Ct?vt(Ae,Ue._result):Bt(Ue,void 0,function(Ke){return dt(Ae,Ke)},function(Ke){return vt(Ae,Ke)})}function rt(Ae,Ue,Ke){Ue.constructor===Ae.constructor&&Ke===je&&Ue.constructor.resolve===Ve?ht(Ae,Ue):Ke===void 0?_t(Ae,Ue):Ie(Ke)?Ft(Ae,Ue,Ke):_t(Ae,Ue)}function dt(Ae,Ue){if(Ae===Ue)vt(Ae,it());else if(me(Ue)){var Ke=void 0;try{Ke=Ue.then}catch(Ze){vt(Ae,Ze);return}rt(Ae,Ue,Ke)}else _t(Ae,Ue)}function yt(Ae){Ae._onerror&&Ae._onerror(Ae._result),jt(Ae)}function _t(Ae,Ue){Ae._state===mt&&(Ae._result=Ue,Ae._state=ct,Ae._subscribers.length!==0&&xe(jt,Ae))}function vt(Ae,Ue){Ae._state===mt&&(Ae._state=Ct,Ae._result=Ue,xe(yt,Ae))}function Bt(Ae,Ue,Ke,Ze){var lt=Ae._subscribers,xt=lt.length;Ae._onerror=null,lt[xt]=Ue,lt[xt+ct]=Ke,lt[xt+Ct]=Ze,xt===0&&Ae._state&&xe(jt,Ae)}function jt(Ae){var Ue=Ae._subscribers,Ke=Ae._state;if(Ue.length!==0){for(var Ze=void 0,lt=void 0,xt=Ae._result,tn=0;tn<Ue.length;tn+=3)Ze=Ue[tn],lt=Ue[tn+Ke],Ze?un(Ke,Ze,lt,xt):lt(xt);Ae._subscribers.length=0}}function un(Ae,Ue,Ke,Ze){var lt=Ie(Ke),xt=void 0,tn=void 0,en=!0;if(lt){try{xt=Ke(Ze)}catch(Jt){en=!1,tn=Jt}if(Ue===xt){vt(Ue,St());return}}else xt=Ze;Ue._state!==mt||(lt&&en?dt(Ue,xt):en===!1?vt(Ue,tn):Ae===ct?_t(Ue,xt):Ae===Ct&&vt(Ue,xt))}function Kt(Ae,Ue){try{Ue(function(Ze){dt(Ae,Ze)},function(Ze){vt(Ae,Ze)})}catch(Ke){vt(Ae,Ke)}}var xn=0;function Ut(){return xn++}function Wt(Ae){Ae[Qe]=xn++,Ae._state=void 0,Ae._result=void 0,Ae._subscribers=[]}function $t(){return new Error("Array Methods must be provided an Array")}var ft=function(){function Ae(Ue,Ke){this._instanceConstructor=Ue,this.promise=new Ue(Ge),this.promise[Qe]||Wt(this.promise),be(Ke)?(this.length=Ke.length,this._remaining=Ke.length,this._result=new Array(this.length),this.length===0?_t(this.promise,this._result):(this.length=this.length||0,this._enumerate(Ke),this._remaining===0&&_t(this.promise,this._result))):vt(this.promise,$t())}return Ae.prototype._enumerate=function(Ke){for(var Ze=0;this._state===mt&&Ze<Ke.length;Ze++)this._eachEntry(Ke[Ze],Ze)},Ae.prototype._eachEntry=function(Ke,Ze){var lt=this._instanceConstructor,xt=lt.resolve;if(xt===Ve){var tn=void 0,en=void 0,Jt=!1;try{tn=Ke.then}catch(Mn){Jt=!0,en=Mn}if(tn===je&&Ke._state!==mt)this._settledAt(Ke._state,Ze,Ke._result);else if(typeof tn!="function")this._remaining--,this._result[Ze]=Ke;else if(lt===Xe){var gn=new lt(Ge);Jt?vt(gn,en):rt(gn,Ke,tn),this._willSettleAt(gn,Ze)}else this._willSettleAt(new lt(function(Mn){return Mn(Ke)}),Ze)}else this._willSettleAt(xt(Ke),Ze)},Ae.prototype._settledAt=function(Ke,Ze,lt){var xt=this.promise;xt._state===mt&&(this._remaining--,Ke===Ct?vt(xt,lt):this._result[Ze]=lt),this._remaining===0&&_t(xt,this._result)},Ae.prototype._willSettleAt=function(Ke,Ze){var lt=this;Bt(Ke,void 0,function(xt){return lt._settledAt(ct,Ze,xt)},function(xt){return lt._settledAt(Ct,Ze,xt)})},Ae}();function We(Ae){return new ft(this,Ae).promise}function Be(Ae){var Ue=this;return be(Ae)?new Ue(function(Ke,Ze){for(var lt=Ae.length,xt=0;xt<lt;xt++)Ue.resolve(Ae[xt]).then(Ke,Ze)}):new Ue(function(Ke,Ze){return Ze(new TypeError("You must pass an array to race."))})}function qe(Ae){var Ue=this,Ke=new Ue(Ge);return vt(Ke,Ae),Ke}function et(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function He(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var Xe=function(){function Ae(Ue){this[Qe]=Ut(),this._result=this._state=void 0,this._subscribers=[],Ge!==Ue&&(typeof Ue!="function"&&et(),this instanceof Ae?Kt(this,Ue):He())}return Ae.prototype.catch=function(Ke){return this.then(null,Ke)},Ae.prototype.finally=function(Ke){var Ze=this,lt=Ze.constructor;return Ie(Ke)?Ze.then(function(xt){return lt.resolve(Ke()).then(function(){return xt})},function(xt){return lt.resolve(Ke()).then(function(){throw xt})}):Ze.then(Ke,Ke)},Ae}();Xe.prototype.then=je,Xe.all=We,Xe.race=Be,Xe.resolve=Ve,Xe.reject=qe,Xe._setScheduler=ge,Xe._setAsap=ce,Xe._asap=xe;function Re(){var Ae=void 0;if(typeof Ee.g!="undefined")Ae=Ee.g;else if(typeof self!="undefined")Ae=self;else try{Ae=Function("return this")()}catch(Ze){throw new Error("polyfill failed because global object is unavailable in this environment")}var Ue=Ae.Promise;if(Ue){var Ke=null;try{Ke=Object.prototype.toString.call(Ue.resolve())}catch(Ze){}if(Ke==="[object Promise]"&&!Ue.cast)return}Ae.Promise=Xe}return Xe.polyfill=Re,Xe.Promise=Xe,Xe})},86204:function(Cn){"use strict";var Yt=typeof Reflect=="object"?Reflect:null,Ee=Yt&&typeof Yt.apply=="function"?Yt.apply:function(le,ye,we){return Function.prototype.apply.call(le,ye,we)},Le;Yt&&typeof Yt.ownKeys=="function"?Le=Yt.ownKeys:Object.getOwnPropertySymbols?Le=function(le){return Object.getOwnPropertyNames(le).concat(Object.getOwnPropertySymbols(le))}:Le=function(le){return Object.getOwnPropertyNames(le)};function me(se){console&&console.warn&&console.warn(se)}var Ie=Number.isNaN||function(le){return le!==le};function Te(){Te.init.call(this)}Cn.exports=Te,Cn.exports.once=ee,Te.EventEmitter=Te,Te.prototype._events=void 0,Te.prototype._eventsCount=0,Te.prototype._maxListeners=void 0;var be=10;function Pe(se){if(typeof se!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof se)}Object.defineProperty(Te,"defaultMaxListeners",{enumerable:!0,get:function(){return be},set:function(se){if(typeof se!="number"||se<0||Ie(se))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+se+".");be=se}}),Te.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},Te.prototype.setMaxListeners=function(le){if(typeof le!="number"||le<0||Ie(le))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+le+".");return this._maxListeners=le,this};function he(se){return se._maxListeners===void 0?Te.defaultMaxListeners:se._maxListeners}Te.prototype.getMaxListeners=function(){return he(this)},Te.prototype.emit=function(le){for(var ye=[],we=1;we<arguments.length;we++)ye.push(arguments[we]);var Ce=le==="error",ke=this._events;if(ke!==void 0)Ce=Ce&&ke.error===void 0;else if(!Ce)return!1;if(Ce){var Ne;if(ye.length>0&&(Ne=ye[0]),Ne instanceof Error)throw Ne;var je=new Error("Unhandled error."+(Ne?" ("+Ne.message+")":""));throw je.context=Ne,je}var Ve=ke[le];if(Ve===void 0)return!1;if(typeof Ve=="function")Ee(Ve,this,ye);else for(var Qe=Ve.length,Ge=de(Ve,Qe),we=0;we<Qe;++we)Ee(Ge[we],this,ye);return!0};function Se(se,le,ye,we){var Ce,ke,Ne;if(Pe(ye),ke=se._events,ke===void 0?(ke=se._events=Object.create(null),se._eventsCount=0):(ke.newListener!==void 0&&(se.emit("newListener",le,ye.listener?ye.listener:ye),ke=se._events),Ne=ke[le]),Ne===void 0)Ne=ke[le]=ye,++se._eventsCount;else if(typeof Ne=="function"?Ne=ke[le]=we?[ye,Ne]:[Ne,ye]:we?Ne.unshift(ye):Ne.push(ye),Ce=he(se),Ce>0&&Ne.length>Ce&&!Ne.warned){Ne.warned=!0;var je=new Error("Possible EventEmitter memory leak detected. "+Ne.length+" "+String(le)+" listeners added. Use emitter.setMaxListeners() to increase limit");je.name="MaxListenersExceededWarning",je.emitter=se,je.type=le,je.count=Ne.length,me(je)}return se}Te.prototype.addListener=function(le,ye){return Se(this,le,ye,!1)},Te.prototype.on=Te.prototype.addListener,Te.prototype.prependListener=function(le,ye){return Se(this,le,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,le,ye){var we={fired:!1,wrapFn:void 0,target:se,type:le,listener:ye},Ce=xe.bind(we);return Ce.listener=ye,we.wrapFn=Ce,Ce}Te.prototype.once=function(le,ye){return Pe(ye),this.on(le,ge(this,le,ye)),this},Te.prototype.prependOnceListener=function(le,ye){return Pe(ye),this.prependListener(le,ge(this,le,ye)),this},Te.prototype.removeListener=function(le,ye){var we,Ce,ke,Ne,je;if(Pe(ye),Ce=this._events,Ce===void 0)return this;if(we=Ce[le],we===void 0)return this;if(we===ye||we.listener===ye)--this._eventsCount===0?this._events=Object.create(null):(delete Ce[le],Ce.removeListener&&this.emit("removeListener",le,we.listener||ye));else if(typeof we!="function"){for(ke=-1,Ne=we.length-1;Ne>=0;Ne--)if(we[Ne]===ye||we[Ne].listener===ye){je=we[Ne].listener,ke=Ne;break}if(ke<0)return this;ke===0?we.shift():ue(we,ke),we.length===1&&(Ce[le]=we[0]),Ce.removeListener!==void 0&&this.emit("removeListener",le,je||ye)}return this},Te.prototype.off=Te.prototype.removeListener,Te.prototype.removeAllListeners=function(le){var ye,we,Ce;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[le]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete we[le]),this;if(arguments.length===0){var ke=Object.keys(we),Ne;for(Ce=0;Ce<ke.length;++Ce)Ne=ke[Ce],Ne!=="removeListener"&&this.removeAllListeners(Ne);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(ye=we[le],typeof ye=="function")this.removeListener(le,ye);else if(ye!==void 0)for(Ce=ye.length-1;Ce>=0;Ce--)this.removeListener(le,ye[Ce]);return this};function ce(se,le,ye){var we=se._events;if(we===void 0)return[];var Ce=we[le];return Ce===void 0?[]:typeof Ce=="function"?ye?[Ce.listener||Ce]:[Ce]:ye?z(Ce):de(Ce,Ce.length)}Te.prototype.listeners=function(le){return ce(this,le,!0)},Te.prototype.rawListeners=function(le){return ce(this,le,!1)},Te.listenerCount=function(se,le){return typeof se.listenerCount=="function"?se.listenerCount(le):ve.call(se,le)},Te.prototype.listenerCount=ve;function ve(se){var le=this._events;if(le!==void 0){var ye=le[se];if(typeof ye=="function")return 1;if(ye!==void 0)return ye.length}return 0}Te.prototype.eventNames=function(){return this._eventsCount>0?Le(this._events):[]};function de(se,le){for(var ye=new Array(le),we=0;we<le;++we)ye[we]=se[we];return ye}function ue(se,le){for(;le+1<se.length;le++)se[le]=se[le+1];se.pop()}function z(se){for(var le=new Array(se.length),ye=0;ye<le.length;++ye)le[ye]=se[ye].listener||se[ye];return le}function ee(se,le){return new Promise(function(ye,we){function Ce(Ne){se.removeListener(le,ke),we(Ne)}function ke(){typeof se.removeListener=="function"&&se.removeListener("error",Ce),ye([].slice.call(arguments))}ie(se,le,ke,{once:!0}),le!=="error"&&oe(se,Ce,{once:!0})})}function oe(se,le,ye){typeof se.on=="function"&&ie(se,"error",le,ye)}function ie(se,le,ye,we){if(typeof se.on=="function")we.once?se.once(le,ye):se.on(le,ye);else if(typeof se.addEventListener=="function")se.addEventListener(le,function Ce(ke){we.once&&se.removeEventListener(le,Ce),ye(ke)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof se)}},12378:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{$u:function(){return xe},BD:function(){return ft},E9:function(){return Se},FF:function(){return no},FJ:function(){return le},Hn:function(){return se},KX:function(){return we},NB:function(){return Ke},S0:function(){return Ut},UL:function(){return ge},Vk:function(){return ie},Vm:function(){return lt},YI:function(){return Wt},ZA:function(){return Ie},Zt:function(){return ce},al:function(){return He},bn:function(){return et},bx:function(){return We},g2:function(){return $t},h1:function(){return Ve},hD:function(){return oi},l4:function(){return Pe},rU:function(){return Ze},s_:function(){return Be},uz:function(){return Ue},z6:function(){return ve}}),Cn=Ee.hmd(Cn),function(){var ot;function Rr(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Nr(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Rr(a)}}function Hr(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var uo=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},po;if(typeof Object.setPrototypeOf=="function")po=Object.setPrototypeOf;else{var io;e:{var Do={a:!0},Xn={};try{Xn.__proto__=Do,io=Xn.a;break e}catch(a){}io=!1}po=io?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var $e=po;function nt(a,y){if(a.prototype=uo(y.prototype),a.prototype.constructor=a,$e)$e(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 Je=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},Nt=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function kt(a,y){if(y){var x=Je;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&&Nt(x,a,{writable:!0,value:y})}}kt("Object.assign",function(a){return a||wt}),kt("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 Et=typeof globalThis=="object"&&globalThis||typeof Ee.g=="object"&&Ee.g.global===Ee.g&&Ee.g||typeof self=="object"&&self.self===self&&self||{};Et.requestAnimationFrame===void 0&&(Et.setImmediate===void 0?Et.requestAnimationFrame=function(a){Et.setTimeout(a,0)}:Et.requestAnimationFrame=Et.setImmediate);function cn(){}function bn(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&Et.clearTimeout(x),x=dn(function(){x=-1,a.apply(b,E)},y)}}function dn(a,y){return Et.setTimeout(a,y)}function rn(a){return Et.document.createElement(a)}function At(a){throw Error(a)}function an(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),At(a)}function En(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),At(x+" is not in the range "+y+": "+a)}function Dn(a){Et.console&&Et.console.log(a)}function qt(a){return typeof a=="object"&&a!==null}function on(a){return Array.isArray(a)||Et.NodeList&&a instanceof Et.NodeList||Et.HTMLCollection&&a instanceof Et.HTMLCollection}function Nn(a){return Array.prototype.slice.call(a)}function On(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):At("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):At("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Hn(){var a=mr.pop();return a===void 0?[]:a}function ei(a){a.length=0,mr.push(a)}function Fn(a){if(typeof a=="function"){if(a.className)return a.className;if(a.name)return a.name;var y=a.toString();if(y=y.substring(9,y.indexOf("(")).trim(),y!=="")return a._className=y}else if(qt(a)&&a.constructor)return Fn(a.constructor);return typeof a}function hi(a){var y=a;return qt(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 Ii(a,y){if(a.hasOwnProperty(y))return!0;for(a=Object.getPrototypeOf(a);a&&a!==Function;){if(a.hasOwnProperty(y))return!0;var x=a.CA;if(x&&x[y])return!0;a=Object.getPrototypeOf(a)}return!1}function Ri(a,y,x){Object.defineProperty(Wo.prototype,a,{get:y,set:x})}function Pn(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 Vi=Et.navigator!==void 0&&0<Et.navigator.userAgent.indexOf("Trident/7"),Cr=Et.navigator!==void 0&&Et.navigator.platform!==void 0&&Et.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,mr=[];Object.freeze([]),cn.className="Util",cn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",cn.adym="gojs.net",cn.vfo="28e645fdb266",cn.className="Util";function _n(a,y,x){pr(this),this.j=a,this.xa=y,this.o=x}_n.prototype.toString=function(){return"EnumValue."+this.xa};function Jn(a,y){return y==null||y===""?null:a[y]}Je.Object.defineProperties(_n.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),_n.className="EnumValue";function ui(){this.ew=[]}ui.prototype.toString=function(){return this.ew.join("")},ui.prototype.add=function(a){a!==""&&this.ew.push(a)},ui.className="StringBuilder";function yi(){}yi.className="PropertyCollection";var di={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){Et.console&&Et.console.log(a)},HA:function(a,y,x,b){a.strokeStyle="red",a.fillStyle="red",a.font="8px sans-serif",a.beginPath(),a.moveTo(-10,0),a.lineTo(10,0),a.moveTo(0,-10),a.lineTo(0,10),a.stroke(),a.setTransform(1,0,0,1,0,0),a.scale(x,x),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.lineWidth=2,a.beginPath(),a.moveTo(b.left,b.top+20),a.lineTo(b.left,b.top),a.lineTo(b.left+20,b.top),a.moveTo(b.right,b.bottom-20),a.lineTo(b.right,b.bottom),a.lineTo(b.right-20,b.bottom),a.stroke(),a.fillText("DB: "+Math.round(b.x)+", "+Math.round(b.y)+", "+Math.round(b.width)+", "+Math.round(b.height),b.left,b.top-5)},DA:function(a){var y={},x;for(x in a){if(y.x=x,y.x!=="licenseKey"){var b=a[y.x];if(b.prototype!==void 0){y.Zl=Object.getOwnPropertyNames(b.prototype);for(var E={Tj:0};E.Tj<y.Zl.length;E={Tj:E.Tj},E.Tj++){var te=Object.getOwnPropertyDescriptor(b.prototype,y.Zl[E.Tj]);te.get!==void 0&&te.set===void 0&&Object.defineProperty(b.prototype,y.Zl[E.Tj],{set:function(ne,ae){return function(){throw Error("Property "+ne.Zl[ae.Tj]+" of "+ne.x+" is read-only.")}}(y,E)})}}}y={Zl:y.Zl,x:y.x}}}};function Ei(){}Ei.prototype.reset=function(){},Ei.prototype.next=function(){return!1},Ei.prototype.Ad=function(){return!1},Ei.prototype.first=function(){return null},Ei.prototype.any=function(){return!1},Ei.prototype.all=function(){return!0},Ei.prototype.each=function(){return this},Ei.prototype.map=function(){return this},Ei.prototype.filter=function(){return this},Ei.prototype.de=function(){},Ei.prototype.toString=function(){return"EmptyIterator"},Je.Object.defineProperties(Ei.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Ei.prototype.first=Ei.prototype.first,Ei.prototype.hasNext=Ei.prototype.Ad,Ei.prototype.next=Ei.prototype.next,Ei.prototype.reset=Ei.prototype.reset;var Qi=null;Ei.className="EmptyIterator",Qi=new Ei;function Fi(a){this.key=-1,this.value=a}Fi.prototype.reset=function(){this.key=-1},Fi.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Fi.prototype.Ad=function(){return this.next()},Fi.prototype.first=function(){return this.key=0,this.value},Fi.prototype.any=function(a){return this.key=-1,a(this.value)},Fi.prototype.all=function(a){return this.key=-1,a(this.value)},Fi.prototype.each=function(a){return this.key=-1,a(this.value),this},Fi.prototype.map=function(a){return new Fi(a(this.value))},Fi.prototype.filter=function(a){return a(this.value)?new Fi(this.value):Qi},Fi.prototype.de=function(){this.value=null},Fi.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Je.Object.defineProperties(Fi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),Fi.prototype.first=Fi.prototype.first,Fi.prototype.hasNext=Fi.prototype.Ad,Fi.prototype.next=Fi.prototype.next,Fi.prototype.reset=Fi.prototype.reset,Fi.className="SingletonIterator";function zi(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}zi.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},zi.prototype.next=function(){var a=this.Bb;if(a.Ja!==this.qa&&0>this.key)return!1;a=a.s;var y=a.length,x=++this.Za,b=this.qf;if(b!==null)for(;x<y;){var E=a[x];if(b(E))return this.key=this.Za=x,this.value=E,!0;x++}else{if(x<y)return this.key=x,this.value=a[x],!0;this.de()}return!1},zi.prototype.Ad=function(){return this.next()},zi.prototype.first=function(){var a=this.Bb;this.qa=a.Ja,this.Za=0,a=a.s;var y=a.length,x=this.qf;if(x!==null){for(var b=0;b<y;){var E=a[b];if(x(E))return this.key=this.Za=b,this.value=E;b++}return null}return 0<y?(a=a[0],this.key=0,this.value=a):null},zi.prototype.any=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var te=y[E];if((b===null||b(te))&&a(te))return!0}return!1},zi.prototype.all=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var te=y[E];if((b===null||b(te))&&!a(te))return!1}return!0},zi.prototype.each=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var te=y[E];(b===null||b(te))&&a(te)}return this},zi.prototype.map=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,te=0;te<b;te++){var ne=y[te];(E===null||E(ne))&&x.push(a(ne))}return a=new Bn,a.s=x,a.xb(),a.iterator},zi.prototype.filter=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,te=0;te<b;te++){var ne=y[te];(E===null||E(ne))&&a(ne)&&x.push(ne)}return a=new Bn,a.s=x,a.xb(),a.iterator},zi.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},zi.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Je.Object.defineProperties(zi.prototype,{iterator:{get:function(){return this}},predicate:{get:function(){return this.qf},set:function(a){this.qf=a}},count:{get:function(){var a=this.qf;if(a!==null){for(var y=0,x=this.Bb.s,b=x.length,E=0;E<b;E++)a(x[E])&&y++;return y}return this.Bb.s.length}}}),zi.prototype.first=zi.prototype.first,zi.prototype.hasNext=zi.prototype.Ad,zi.prototype.next=zi.prototype.next,zi.prototype.reset=zi.prototype.reset,zi.className="ListIterator";function fr(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}fr.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},fr.prototype.next=function(){var a=this.Bb;if(a.Ja!==this.qa&&0>this.key)return!1;var y=--this.Za;return 0<=y?(this.key=y,this.value=a.s[y],!0):(this.de(),!1)},fr.prototype.Ad=function(){return this.next()},fr.prototype.first=function(){var a=this.Bb;this.qa=a.Ja;var y=a.s;return this.Za=a=y.length-1,0<=a?(y=y[a],this.key=a,this.value=y):null},fr.prototype.any=function(a){var y=this.Bb;y.Hg=null,y=y.s;var x=y.length;for(this.Za=x,--x;0<=x;x--)if(a(y[x]))return!0;return!1},fr.prototype.all=function(a){var y=this.Bb;y.Hg=null,y=y.s;var x=y.length;for(this.Za=x,--x;0<=x;x--)if(!a(y[x]))return!1;return!0},fr.prototype.each=function(a){var y=this.Bb;y.Hg=null,y=y.s;var x=y.length;for(this.Za=x,--x;0<=x;x--)a(y[x]);return this},fr.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--)x.push(a(y[b]));return a=new Bn,a.s=x,a.xb(),a.iterator},fr.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--){var E=y[b];a(E)&&x.push(E)}return a=new Bn,a.s=x,a.xb(),a.iterator},fr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},fr.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Je.Object.defineProperties(fr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),fr.prototype.first=fr.prototype.first,fr.prototype.hasNext=fr.prototype.Ad,fr.prototype.next=fr.prototype.next,fr.prototype.reset=fr.prototype.reset,fr.className="ListIteratorBackwards";function Bn(a){pr(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&At("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}ot=Bn.prototype,ot.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},ot.freeze=function(){return this._isFrozen=!0,this},ot.ka=function(){return this._isFrozen=!1,this},ot.toString=function(){return"List()#"+Or(this)},ot.add=function(a){return a===null?this:(this._isFrozen&&an(this,a),this.s.push(a),this.xb(),this)},ot.push=function(a){this.add(a)},ot.addAll=function(a){if(a===null)return this;this._isFrozen&&an(this);var y=this.s;if(on(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},ot.clear=function(){this._isFrozen&&an(this),this.s.length=0,this.xb()},ot.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},ot.has=function(a){return this.contains(a)},ot.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},ot.M=function(a){var y=this.s;return(0>a||a>=y.length)&&En(a,"0 <= i < length",Bn,"elt:i"),y[a]},ot.get=function(a){return this.M(a)},ot.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&En(a,"0 <= i < length",Bn,"setElt:i"),this._isFrozen&&an(this,a),x[a]=y},ot.set=function(a,y){this.cd(a,y)},ot.first=function(){var a=this.s;return a.length===0?null:a[0]},ot.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},ot.pop=function(){this._isFrozen&&an(this);var a=this.s;return 0<a.length?a.pop():null},Bn.prototype.any=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)if(a(y[b]))return!0;return!1},Bn.prototype.all=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)if(!a(y[b]))return!1;return!0},Bn.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},Bn.prototype.map=function(a){for(var y=new Bn,x=[],b=this.s,E=b.length,te=0;te<E;te++)x.push(a(b[te]));return y.s=x,y.xb(),y},Bn.prototype.filter=function(a){for(var y=new Bn,x=[],b=this.s,E=b.length,te=0;te<E;te++){var ne=b[te];a(ne)&&x.push(ne)}return y.s=x,y.xb(),y},ot=Bn.prototype,ot.Gb=function(a,y){0>a&&En(a,">= 0",Bn,"insertAt:i"),this._isFrozen&&an(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},ot.remove=function(a){if(a===null)return!1;this._isFrozen&&an(this,a);var y=this.s;return a=y.indexOf(a),a===-1?!1:(a===y.length-1?y.pop():y.splice(a,1),this.xb(),!0)},ot.delete=function(a){return this.remove(a)},ot.mb=function(a){var y=this.s;(0>a||a>=y.length)&&En(a,"0 <= i < length",Bn,"removeAt:i"),this._isFrozen&&an(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},ot.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&&an(this);for(var E=a,te=y+1;te<b;)x[E++]=x[te++];return x.length=b-(y-a+1),this.xb(),this},Bn.prototype.copy=function(){var a=new Bn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},ot=Bn.prototype,ot.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},ot.Iv=function(){for(var a=new In,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},ot.sort=function(a){return this._isFrozen&&an(this),this.s.sort(a),this.xb(),this},ot.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&an(this);var te=x-y;if(1>=te)return this;if((0>y||y>=E-1)&&En(y,"0 <= from < length",Bn,"sortRange:from"),te===2)return x=b[y],E=b[y+1],0<a(x,E)&&(b[y]=E,b[y+1]=x,this.xb()),this;if(y===0)if(x>=E)b.sort(a);else for(y=b.slice(0,x),y.sort(a),a=0;a<x;a++)b[a]=y[a];else if(x>=E)for(x=b.slice(y),x.sort(a),a=y;a<E;a++)b[a]=x[a-y];else for(E=b.slice(y,x),E.sort(a),a=y;a<x;a++)b[a]=E[a-y];return this.xb(),this},ot.reverse=function(){return this._isFrozen&&an(this),this.s.reverse(),this.xb(),this},Je.Object.defineProperties(Bn.prototype,{_dataArray:{get:function(){return this.s}},count:{get:function(){return this.s.length}},size:{get:function(){return this.s.length}},length:{get:function(){return this.s.length}},iterator:{get:function(){if(0>=this.s.length)return Qi;var a=this.Sa;return a!==null?(a.reset(),a):new zi(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Qi;var a=this.Hg;return a!==null?(a.reset(),a):new fr(this)}}}),Bn.prototype.reverse=Bn.prototype.reverse,Bn.prototype.sortRange=Bn.prototype.zi,Bn.prototype.sort=Bn.prototype.sort,Bn.prototype.toSet=Bn.prototype.Iv,Bn.prototype.toArray=Bn.prototype.Fa,Bn.prototype.removeRange=Bn.prototype.removeRange,Bn.prototype.removeAt=Bn.prototype.mb,Bn.prototype.delete=Bn.prototype.delete,Bn.prototype.remove=Bn.prototype.remove,Bn.prototype.insertAt=Bn.prototype.Gb,Bn.prototype.pop=Bn.prototype.pop,Bn.prototype.last=Bn.prototype.jc,Bn.prototype.first=Bn.prototype.first,Bn.prototype.set=Bn.prototype.set,Bn.prototype.setElt=Bn.prototype.cd,Bn.prototype.get=Bn.prototype.get,Bn.prototype.elt=Bn.prototype.M,Bn.prototype.indexOf=Bn.prototype.indexOf,Bn.prototype.has=Bn.prototype.has,Bn.prototype.contains=Bn.prototype.contains,Bn.prototype.clear=Bn.prototype.clear,Bn.prototype.addAll=Bn.prototype.addAll,Bn.prototype.push=Bn.prototype.push,Bn.prototype.add=Bn.prototype.add,Bn.prototype.thaw=Bn.prototype.ka,Bn.prototype.freeze=Bn.prototype.freeze,Bn.className="List";function Br(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Br.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Br.prototype.next=function(){var a=this.eg;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=y.value,this.key=y.key,!0):(this.de(),!1)},Br.prototype.Ad=function(){return this.next()},Br.prototype.first=function(){var a=this.eg;if(this.qa=a.Ja,a=a.ea,a!==null){this.sa=a;var y=a.value;return this.key=a.key,this.value=y}return null},Br.prototype.any=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Br.prototype.all=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Br.prototype.each=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;)a(y.value),y=y.va;return this},Br.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new Bn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Br.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new Bn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Br.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Br.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Je.Object.defineProperties(Br.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Br.prototype.first=Br.prototype.first,Br.prototype.hasNext=Br.prototype.Ad,Br.prototype.next=Br.prototype.next,Br.prototype.reset=Br.prototype.reset,Br.className="SetIterator";function In(a){pr(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&At("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}ot=In.prototype,ot.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},ot.freeze=function(){return this._isFrozen=!0,this},ot.ka=function(){return this._isFrozen=!1,this},ot.toString=function(){return"Set()#"+Or(this)},ot.add=function(a){if(a===null)return this;this._isFrozen&&an(this,a);var y=a;return qt(a)&&(y=yo(a)),this.Tb[y]===void 0&&(this.Sb++,a=new lr(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},ot.addAll=function(a){if(a===null)return this;if(this._isFrozen&&an(this),on(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},ot.contains=function(a){if(a===null)return!1;var y=a;return qt(a)&&(y=Or(a),y===void 0)?!1:this.Tb[y]!==void 0},ot.has=function(a){return this.contains(a)},ot.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},ot.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},ot.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},ot=In.prototype,ot.remove=function(a){if(a===null)return!1;this._isFrozen&&an(this,a);var y=a;if(qt(a)&&(y=Or(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},ot.delete=function(a){return this.remove(a)},ot.hp=function(a){if(a===null)return this;if(this._isFrozen&&an(this),on(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},ot.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&an(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},ot.clear=function(){this._isFrozen&&an(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},In.prototype.copy=function(){var a=new In,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},In.prototype.Fa=function(){var a=Array(this.Sb),y=this.Tb,x=0,b;for(b in y)a[x]=y[b].value,x++;return a},In.prototype.Hv=function(){var a=new Bn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function pr(a){a.__gohashid=bo++}function yo(a){var y=a.__gohashid;return y===void 0&&(y=bo++,a.__gohashid=y),y}function Or(a){return a.__gohashid}Je.Object.defineProperties(In.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return Qi;var a=this.Sa;return a!==null?(a.reset(),a):new Br(this)}}}),In.prototype.toList=In.prototype.Hv,In.prototype.toArray=In.prototype.Fa,In.prototype.clear=In.prototype.clear,In.prototype.retainAll=In.prototype.pA,In.prototype.removeAll=In.prototype.hp,In.prototype.delete=In.prototype.delete,In.prototype.remove=In.prototype.remove,In.prototype.first=In.prototype.first,In.prototype.containsAny=In.prototype.Ty,In.prototype.containsAll=In.prototype.Sy,In.prototype.has=In.prototype.has,In.prototype.contains=In.prototype.contains,In.prototype.addAll=In.prototype.addAll,In.prototype.add=In.prototype.add,In.prototype.thaw=In.prototype.ka,In.prototype.freeze=In.prototype.freeze;var bo=1;In.className="Set",In.uniqueHash=pr,In.hashIdUnique=yo,In.hashId=Or;function co(a){this.ma=a,this.qa=a.Ja,this.sa=null}co.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},co.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=this.key=a=y.key,!0):(this.de(),!1)},co.prototype.Ad=function(){return this.next()},co.prototype.first=function(){var a=this.ma;return this.qa=a.Ja,a=a.ea,a!==null?(this.sa=a,this.value=this.key=a=a.key):null},co.prototype.any=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},co.prototype.all=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},co.prototype.each=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;)a(y.key),y=y.va;return this},co.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new Bn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},co.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new Bn;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},co.prototype.de=function(){this.value=this.key=null,this.qa=-1},co.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Je.Object.defineProperties(co.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),co.prototype.first=co.prototype.first,co.prototype.hasNext=co.prototype.Ad,co.prototype.next=co.prototype.next,co.prototype.reset=co.prototype.reset,co.className="MapKeySetIterator";function Ki(a){In.call(this),pr(this),this._isFrozen=!0,this.ma=a}nt(Ki,In),ot=Ki.prototype,ot.freeze=function(){return this},ot.ka=function(){return this},ot.toString=function(){return"MapKeySet("+this.ma.toString()+")"},ot.add=function(){At("This Set is read-only: "+this.toString())},ot.contains=function(a){return this.ma.contains(a)},ot.has=function(a){return this.contains(a)},ot.remove=function(){At("This Set is read-only: "+this.toString())},ot.delete=function(a){return this.remove(a)},ot.clear=function(){At("This Set is read-only: "+this.toString())},ot.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 Bn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Je.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?Qi:new co(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 Hi(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Hi.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Hi.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=y.value,this.key=y.key,!0):(this.de(),!1)},Hi.prototype.Ad=function(){return this.next()},Hi.prototype.first=function(){var a=this.ma;if(this.qa=a.Ja,a=a.ea,a!==null){this.sa=a;var y=a.value;return this.key=a.key,this.value=y}return null},Hi.prototype.any=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Hi.prototype.all=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Hi.prototype.each=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;)a(y.value),y=y.va;return this},Hi.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Bn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Hi.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Bn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Hi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Hi.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Je.Object.defineProperties(Hi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Hi.prototype.first=Hi.prototype.first,Hi.prototype.hasNext=Hi.prototype.Ad,Hi.prototype.next=Hi.prototype.next,Hi.prototype.reset=Hi.prototype.reset,Hi.className="MapValueSetIterator";function lr(a,y){this.key=a,this.value=y,this.ll=this.va=null}lr.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},lr.className="KeyValuePair";function Pr(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Pr.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Pr.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.key=y.key,this.value=y.value,!0):(this.de(),!1)},Pr.prototype.Ad=function(){return this.next()},Pr.prototype.first=function(){var a=this.ma;return this.qa=a.Ja,a=a.ea,a!==null?(this.sa=a,this.key=a.key,this.value=a.value,a):null},Pr.prototype.any=function(a){var y=this.ma;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Pr.prototype.all=function(a){var y=this.ma;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Pr.prototype.each=function(a){var y=this.ma;for(this.sa=y.Sa=null,y=y.ea;y!==null;)a(y),y=y.va;return this},Pr.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Bn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},Pr.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Bn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},Pr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Pr.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Je.Object.defineProperties(Pr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Pr.prototype.first=Pr.prototype.first,Pr.prototype.hasNext=Pr.prototype.Ad,Pr.prototype.next=Pr.prototype.next,Pr.prototype.reset=Pr.prototype.reset,Pr.className="MapIterator";function ci(a){pr(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.jf=this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&At("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}ot=ci.prototype,ot.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},ot.freeze=function(){return this._isFrozen=!0,this},ot.ka=function(){return this._isFrozen=!1,this},ot.toString=function(){return"Map()#"+Or(this)},ot.add=function(a,y){this._isFrozen&&an(this,a);var x=a;qt(a)&&(x=yo(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new lr(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},ot.set=function(a,y){return this.add(a,y)},ot.addAll=function(a){if(a===null)return this;if(on(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];this.add(b.key,b.value)}else if(a instanceof ci)for(a=a.iterator;a.next();)this.add(a.key,a.value);else for(a=a.iterator;a.next();)y=a.value,this.add(y.key,y.value);return this},ot.first=function(){return this.ea},ci.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},ci.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},ci.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},ci.prototype.map=function(a){for(var y=new ci,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},ci.prototype.filter=function(a){for(var y=new ci,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},ot=ci.prototype,ot.contains=function(a){var y=a;return qt(a)&&(y=Or(a),y===void 0)?!1:this.Tb[y]!==void 0},ot.has=function(a){return this.contains(a)},ot.I=function(a){var y=a;return qt(a)&&(y=Or(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},ot.get=function(a){return this.I(a)},ot.remove=function(a){if(a===null)return!1;this._isFrozen&&an(this,a);var y=a;if(qt(a)&&(y=Or(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},ot.delete=function(a){return this.remove(a)},ot.clear=function(){this._isFrozen&&an(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.jf!==null&&this.jf.reset(),this.kf=this.ea=null,this.xb()},ci.prototype.copy=function(){var a=new ci,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},ci.prototype.Fa=function(){var a=this.Tb,y=Array(this.Sb),x=0,b;for(b in a){var E=a[b];y[x]=new lr(E.key,E.value),x++}return y},ci.prototype.Lf=function(){return new Ki(this)},Je.Object.defineProperties(ci.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return Qi;var a=this.Sa;return a!==null?(a.reset(),a):new Pr(this)}},iteratorKeys:{get:function(){return 0>=this.count?Qi:new co(this)}},iteratorValues:{get:function(){if(0>=this.count)return Qi;var a=this.jf;return a!==null?(a.reset(),a):new Hi(this)}}}),ci.prototype.toKeySet=ci.prototype.Lf,ci.prototype.toArray=ci.prototype.Fa,ci.prototype.clear=ci.prototype.clear,ci.prototype.delete=ci.prototype.delete,ci.prototype.remove=ci.prototype.remove,ci.prototype.get=ci.prototype.get,ci.prototype.getValue=ci.prototype.I,ci.prototype.has=ci.prototype.has,ci.prototype.contains=ci.prototype.contains,ci.prototype.first=ci.prototype.first,ci.prototype.addAll=ci.prototype.addAll,ci.prototype.set=ci.prototype.set,ci.prototype.add=ci.prototype.add,ci.prototype.thaw=ci.prototype.ka,ci.prototype.freeze=ci.prototype.freeze,ci.className="Map";function Tt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):At("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Ur,zr,ts,ko,ss;Tt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Tt.prototype.h=function(a,y){return this.x=a,this.y=y,this},Tt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Tt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Tt.prototype.copy=function(){var a=new Tt;return a.x=this.x,a.y=this.y,a},ot=Tt.prototype,ot.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},ot.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},ot.freeze=function(){return this._isFrozen=!0,this},ot.ka=function(){return Object.isFrozen(this)&&At("cannot thaw constant: "+this),this._isFrozen=!1,this};function _r(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new Tt(x,E)}return new Tt}function ur(a){return a.x.toString()+" "+a.y.toString()}ot.toString=function(){return"Point("+this.x+","+this.y+")"},ot.D=function(a){return a instanceof Tt?this.x===a.x&&this.y===a.y:!1},ot.hi=function(a,y){return this.x===a&&this.y===y},ot.Xa=function(a){return nn.B(this.x,a.x)&&nn.B(this.y,a.y)},ot.add=function(a){return this.x+=a.x,this.y+=a.y,this},ot.re=function(a){return this.x-=a.x,this.y-=a.y,this},ot.offset=function(a,y){return this.x+=a,this.y+=y,this},Tt.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},ot=Tt.prototype,ot.scale=function(a,y){return this.x*=a,this.y*=y,this},ot.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},ot.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},ot.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},ot.ab=function(a){return Kr(a.x-this.x,a.y-this.y)},ot.direction=function(a,y){return Kr(a-this.x,y-this.y)};function Kr(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}ot.Ry=function(a,y){return nn.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},ot.fA=function(a,y,x,b){return nn.qh(a,y,x,b,this.x,this.y,this),this},ot.gA=function(a,y){return nn.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},ot.uA=function(a,y,x,b){return nn.No(this.x,this.y,a,y,x,b,this),this},ot.vA=function(a,y){return nn.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},ot.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},ot.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},ot.transform=function(a){return a.Ga(this),this};function cr(a,y){return y.Cd(a),a}function qr(a,y,x,b,E,te){var ne=E-x,ae=te-b,fe=ne*ne+ae*ae;x-=a,b-=y;var _e=-x*ne-b*ae;return 0>=_e||_e>=fe?(ne=E-a,ae=te-y,Math.min(x*x+b*b,ne*ne+ae*ae)):(a=ne*b-ae*x,a*a/fe)}function Yo(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function nr(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)}ot.w=function(){return isFinite(this.x)&&isFinite(this.y)},Tt.alloc=function(){var a=Wi.pop();return a===void 0?new Tt:a},Tt.allocAt=function(a,y){var x=Wi.pop();return x===void 0?new Tt(a,y):(x.x=a,x.y=y,x)},Tt.free=function(a){Wi.push(a)},Tt.prototype.isReal=Tt.prototype.w,Tt.prototype.setSpot=Tt.prototype.yi,Tt.prototype.setRectSpot=Tt.prototype.xi,Tt.prototype.snapToGridPoint=Tt.prototype.vA,Tt.prototype.snapToGrid=Tt.prototype.uA,Tt.prototype.projectOntoLineSegmentPoint=Tt.prototype.gA,Tt.prototype.projectOntoLineSegment=Tt.prototype.fA,Tt.intersectingLineSegments=function(a,y,x,b,E,te,ne,ae){return nn.Rl(a,y,x,b,E,te,ne,ae)},Tt.prototype.compareWithLineSegmentPoint=Tt.prototype.Ry,Tt.compareWithLineSegment=function(a,y,x,b,E,te){return nn.Fl(a,y,x,b,E,te)},Tt.prototype.direction=Tt.prototype.direction,Tt.prototype.directionPoint=Tt.prototype.ab,Tt.prototype.normalize=Tt.prototype.normalize,Tt.prototype.distanceSquared=Tt.prototype.zd,Tt.prototype.distanceSquaredPoint=Tt.prototype.Bf,Tt.prototype.scale=Tt.prototype.scale,Tt.prototype.rotate=Tt.prototype.rotate,Tt.prototype.offset=Tt.prototype.offset,Tt.prototype.subtract=Tt.prototype.re,Tt.prototype.add=Tt.prototype.add,Tt.prototype.equalsApprox=Tt.prototype.Xa,Tt.prototype.equalTo=Tt.prototype.hi,Tt.prototype.equals=Tt.prototype.D,Tt.prototype.set=Tt.prototype.set,Tt.prototype.setTo=Tt.prototype.sg;var Wi=[];Tt.className="Point",Tt.parse=_r,Tt.stringify=ur,Tt.distanceLineSegmentSquared=qr,Tt.distanceSquared=Yo,Tt.direction=nr,Tt.Origin=Ur=new Tt(0,0).ja(),Tt.InfiniteTopLeft=zr=new Tt(-1/0,-1/0).ja(),Tt.InfiniteBottomRight=ts=new Tt(1/0,1/0).ja(),Tt.SixPoint=ko=new Tt(6,6).ja(),Tt.NoPoint=ss=new Tt(NaN,NaN).ja(),Tt.parse=_r,Tt.stringify=ur,Tt.distanceLineSegmentSquared=qr,Tt.distanceSquared=Yo,Tt.direction=nr;function Qn(a,y){a===void 0?this.height=this.width=0:typeof a=="number"&&(0<=a||isNaN(a))&&typeof y=="number"&&(0<=y||isNaN(y))?(this.width=a,this.height=y):At("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var ir,eo,Ro,Bo,Xo,as,Ho;Qn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},Qn.prototype.h=function(a,y){return this.width=a,this.height=y,this},Qn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},Qn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},Qn.prototype.copy=function(){var a=new Qn;return a.width=this.width,a.height=this.height,a},ot=Qn.prototype,ot.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},ot.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},ot.freeze=function(){return this._isFrozen=!0,this},ot.ka=function(){return Object.isFrozen(this)&&At("cannot thaw constant: "+this),this._isFrozen=!1,this};function ia(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new Qn(x,E)}return new Qn}function _s(a){return a.width.toString()+" "+a.height.toString()}ot.toString=function(){return"Size("+this.width+","+this.height+")"},ot.D=function(a){return a instanceof Qn?this.width===a.width&&this.height===a.height:!1},ot.hi=function(a,y){return this.width===a&&this.height===y},ot.Xa=function(a){return nn.B(this.width,a.width)&&nn.B(this.height,a.height)},ot.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},ot.w=function(){return isFinite(this.width)&&isFinite(this.height)},Qn.alloc=function(){var a=la.pop();return a===void 0?new Qn:a},Qn.free=function(a){la.push(a)},Qn.prototype.isReal=Qn.prototype.w,Qn.prototype.inflate=Qn.prototype.Bc,Qn.prototype.equalsApprox=Qn.prototype.Xa,Qn.prototype.equalTo=Qn.prototype.hi,Qn.prototype.equals=Qn.prototype.D,Qn.prototype.set=Qn.prototype.set,Qn.prototype.setTo=Qn.prototype.sg;var la=[];Qn.className="Size",Qn.parse=ia,Qn.stringify=_s,Qn.ZeroSize=ir=new Qn(0,0).ja(),Qn.OneSize=eo=new Qn(1,1).ja(),Qn.SixSize=Ro=new Qn(6,6).ja(),Qn.EightSize=Bo=new Qn(8,8).ja(),Qn.TenSize=Xo=new Qn(10,10).ja(),Qn.InfiniteSize=as=new Qn(1/0,1/0).ja(),Qn.NoSize=Ho=new Qn(NaN,NaN).ja(),Qn.parse=ia,Qn.stringify=_s;function 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 Tt?(x=a.x,a=a.y,y instanceof Tt?(b=y.x,y=y.y,this.x=Math.min(x,b),this.y=Math.min(a,y),this.width=Math.abs(x-b),this.height=Math.abs(a-y)):y instanceof Qn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):At("Incorrect second argument supplied to Rect constructor "+y)):At("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}ot=Tn.prototype,ot.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},ot.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function Is(a,y,x){a.width=y,a.height=x}ot.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},ot.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},ot.dd=function(a){return this.x=a.x,this.y=a.y,this},ot.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},ot=Tn.prototype,ot.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},ot.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},ot.freeze=function(){return this._isFrozen=!0,this},ot.ka=function(){return Object.isFrozen(this)&&At("cannot thaw constant: "+this),this._isFrozen=!1,this};function Pu(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;(b=a[y++])&&(E=parseFloat(b));for(var te=0;a[y]==="";)y++;(b=a[y++])&&(te=parseFloat(b));for(var ne=0;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),new Tn(x,E,te,ne)}return new Tn}function Ua(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}ot.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},ot.D=function(a){return a instanceof Tn?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},ot.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},ot.Xa=function(a){return nn.B(this.x,a.x)&&nn.B(this.y,a.y)&&nn.B(this.width,a.width)&&nn.B(this.height,a.height)};function Sa(a,y){return nn.$(a.x,y.x)&&nn.$(a.y,y.y)&&nn.$(a.width,y.width)&&nn.$(a.height,y.height)}ot.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},ot.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},ot.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},ot.offset=function(a,y){return this.x+=a,this.y+=y,this},ot.Bc=function(a,y){return us(this,y,a,y,a)},ot.Co=function(a){return us(this,a.top,a.right,a.bottom,a.left)},ot.Fv=function(a){return us(this,-a.top,-a.right,-a.bottom,-a.left)},ot.Hz=function(a,y,x,b){return us(this,a,y,x,b)};function us(a,y,x,b,E){var te=a.width;return x+E<=-te?(a.x+=te/2,a.width=0):(a.x-=E,a.width+=x+E),x=a.height,y+b<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+b),a}ot.Ex=function(a){return Ws(this,a.x,a.y,a.width,a.height)},ot.Uu=function(a,y,x,b){return Ws(this,a,y,x,b)};function Ws(a,y,x,b,E){var te=Math.max(a.x,y),ne=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+b),x=Math.min(a.y+a.height,x+E),a.x=te,a.y=ne,a.width=Math.max(0,y-te),a.height=Math.max(0,x-ne),a}ot.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},ot.Vu=function(a,y,x,b){var E=this.width,te=this.x;return E!==1/0&&x!==1/0&&(E+=te,x+=a,isNaN(x)||isNaN(E)||te>x||a>E)?!1:(a=this.height,x=this.y,!(a!==1/0&&b!==1/0&&(a+=x,b+=y,isNaN(b)||isNaN(a)||x>b||y>a)))};function Po(a,y){var x=a.width,b=a.x,E=y.x-10;return b>y.width+10+10+E||E>x+b?!1:(x=a.height,a=a.y,b=y.y-10,!(a>y.height+10+10+b||b>x+a))}ot.Ye=function(a){return Ao(this,a.x,a.y,0,0)},ot.ed=function(a){return Ao(this,a.x,a.y,a.width,a.height)},ot.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),Ao(this,a,y,x,b)};function Ao(a,y,x,b,E){var te=Math.min(a.x,y),ne=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+b),x=Math.max(a.y+a.height,x+E),a.x=te,a.y=ne,a.width=y-te,a.height=x-ne,a}ot.yi=function(a,y,x){return this.x=a-x.offsetX-x.x*this.width,this.y=y-x.offsetY-x.y*this.height,this};function Eo(a,y,x,b,E,te,ne,ae){return ne===void 0&&(ne=0),ae===void 0&&(ae=0),a<=E&&E+ne<=a+x&&y<=te&&te+ae<=y+b}function ua(a,y,x,b,E,te,ne,ae){return a>ne+E||E>x+a?!1:!(y>ae+te||te>b+y)}ot.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},ot.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)},Je.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 Tt(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new Qn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new Tt(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 nn.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 xr=null,lo=null,$r=[];Tn.className="Rect",Tn.parse=Pu,Tn.stringify=Ua,Tn.contains=Eo,Tn.intersects=ua,Tn.ZeroRect=xr=new Tn(0,0,0,0).ja(),Tn.NoRect=lo=new Tn(NaN,NaN,NaN,NaN).ja(),Tn.parse=Pu,Tn.stringify=Ua,Tn.contains=Eo,Tn.intersects=ua;function Mi(a,y,x,b){a===void 0?this.left=this.bottom=this.right=this.top=0:y===void 0?this.left=this.bottom=this.right=this.top=a:x===void 0?(this.top=a,this.right=y,this.bottom=a,this.left=y):b!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=b):At("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Mi.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Mi.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},Mi.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Mi.prototype.copy=function(){var a=new Mi;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},ot=Mi.prototype,ot.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},ot.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},ot.freeze=function(){return this._isFrozen=!0,this},ot.ka=function(){return Object.isFrozen(this)&&At("cannot thaw constant: "+this),this._isFrozen=!1,this};function Es(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=NaN;a[y]==="";)y++;var b=a[y++];if(b&&(x=parseFloat(b)),isNaN(x))return new Mi;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new Mi(x);for(var te=NaN;a[y]==="";)y++;if((b=a[y++])&&(te=parseFloat(b)),isNaN(te))return new Mi(x,E);for(var ne=NaN;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),isNaN(ne)?new Mi(x,E):new Mi(x,E,te,ne)}return new Mi}function Ls(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}ot.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},ot.D=function(a){return a instanceof Mi?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},ot.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},ot.Xa=function(a){return nn.B(this.top,a.top)&&nn.B(this.right,a.right)&&nn.B(this.bottom,a.bottom)&&nn.B(this.left,a.left)},ot.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Mi.alloc=function(){var a=Il.pop();return a===void 0?new Mi:a},Mi.free=function(a){Il.push(a)},Mi.prototype.isReal=Mi.prototype.w,Mi.prototype.equalsApprox=Mi.prototype.Xa,Mi.prototype.equalTo=Mi.prototype.hi,Mi.prototype.equals=Mi.prototype.D,Mi.prototype.set=Mi.prototype.set,Mi.prototype.setTo=Mi.prototype.sg;var xa=null,xl=null,Il=[];Mi.className="Margin",Mi.parse=Es,Mi.stringify=Ls,Mi.ZeroMargin=xa=new Mi(0,0,0,0).ja(),Mi.TwoMargin=xl=new Mi(2,2,2,2).ja(),Mi.parse=Es,Mi.stringify=Ls;function vi(a,y,x,b){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),b===void 0&&(b=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=b),this._isFrozen=!1}var ms,Xs,qa,wl,Dl,Fr,nc,Ia,Ga,Na,$l,_u,Wa,Za,Uu,yc,Eu,Rl,Sc,Gu,Lu,bl,th,xc,lu,oo,Uo,ka,ra,Ds,bs,ks,Zs,Ks,Yl,Bl;vi.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},vi.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},vi.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},vi.prototype.copy=function(){var a=new vi;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},ot=vi.prototype,ot.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},ot.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},ot.freeze=function(){return this._isFrozen=!0,this},ot.ka=function(){return Object.isFrozen(this)&&At("cannot thaw constant: "+this),this._isFrozen=!1,this};function Rs(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function xh(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return ms;if(a==="TopLeft")return Xs;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return qa;if(a==="TopRight")return wl;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Dl;if(a==="Center")return Fr;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return nc;if(a==="BottomLeft")return Ia;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return Ga;if(a==="BottomRight")return Na;if(a==="TopSide")return $l;if(a==="LeftSide")return _u;if(a==="RightSide")return Wa;if(a==="BottomSide")return Za;if(a==="TopBottomSides")return Uu;if(a==="LeftRightSides")return yc;if(a==="TopLeftSides")return Eu;if(a==="TopRightSides")return Rl;if(a==="BottomLeftSides")return Sc;if(a==="BottomRightSides")return Gu;if(a==="NotTopSide")return Lu;if(a==="NotLeftSide")return bl;if(a==="NotRightSide")return th;if(a==="NotBottomSide")return xc;if(a==="AllSides")return lu;if(a==="Default")return oo;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b!==void 0&&0<b.length&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(E=parseFloat(b));for(var te=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(te=parseFloat(b));for(var ne=0;a[y]==="";)y++;return b=a[y++],b!==void 0&&0<b.length&&(ne=parseFloat(b)),new vi(x,E,te,ne)}return new vi}function nh(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}ot.toString=function(){return this.sb()?this.offsetX===0&&this.offsetY===0?"Spot("+this.x+","+this.y+")":"Spot("+this.x+","+this.y+","+this.offsetX+","+this.offsetY+")":this.D(ms)?"None":this.D(Xs)?"TopLeft":this.D(qa)?"Top":this.D(wl)?"TopRight":this.D(Dl)?"Left":this.D(Fr)?"Center":this.D(nc)?"Right":this.D(Ia)?"BottomLeft":this.D(Ga)?"Bottom":this.D(Na)?"BottomRight":this.D($l)?"TopSide":this.D(_u)?"LeftSide":this.D(Wa)?"RightSide":this.D(Za)?"BottomSide":this.D(Uu)?"TopBottomSides":this.D(yc)?"LeftRightSides":this.D(Eu)?"TopLeftSides":this.D(Rl)?"TopRightSides":this.D(Sc)?"BottomLeftSides":this.D(Gu)?"BottomRightSides":this.D(Lu)?"NotTopSide":this.D(bl)?"NotLeftSide":this.D(th)?"NotRightSide":this.D(xc)?"NotBottomSide":this.D(lu)?"AllSides":this.D(oo)?"Default":"None"},ot.D=function(a){return a instanceof vi?(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},ot.gv=function(){return new vi(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},ot.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Uo))a=_u;else if(a.D(ka))a=Wa;else if(a.D(ra))a=$l;else if(a.D(Ds))a=Za;else return!1;return a=a.offsetY,(this.offsetY&a)===a},ot.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},ot.Mc=function(){return isNaN(this.x)||isNaN(this.y)},ot.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},ot.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},ot.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},vi.alloc=function(){var a=wc.pop();return a===void 0?new vi:a},vi.free=function(a){wc.push(a)},vi.prototype.isDefault=vi.prototype.Xb,vi.prototype.isNone=vi.prototype.ys,vi.prototype.isSide=vi.prototype.$c,vi.prototype.isNoSpot=vi.prototype.Mc,vi.prototype.isSpot=vi.prototype.sb,vi.prototype.includesSide=vi.prototype.Hf,vi.prototype.opposite=vi.prototype.gv,vi.prototype.equals=vi.prototype.D,vi.prototype.set=vi.prototype.set,vi.prototype.setTo=vi.prototype.sg;var wc=[];vi.className="Spot",vi.parse=xh,vi.stringify=nh,vi.None=ms=Rs(new vi(0,0,0,0),0).ja(),vi.Default=oo=Rs(new vi(0,0,-1,0),-1).ja(),vi.TopLeft=Xs=new vi(0,0,0,0).ja(),vi.TopCenter=qa=new vi(.5,0,0,0).ja(),vi.TopRight=wl=new vi(1,0,0,0).ja(),vi.LeftCenter=Dl=new vi(0,.5,0,0).ja(),vi.Center=Fr=new vi(.5,.5,0,0).ja(),vi.RightCenter=nc=new vi(1,.5,0,0).ja(),vi.BottomLeft=Ia=new vi(0,1,0,0).ja(),vi.BottomCenter=Ga=new vi(.5,1,0,0).ja(),vi.BottomRight=Na=new vi(1,1,0,0).ja(),vi.MiddleTop=bs=qa,vi.MiddleLeft=ks=Dl,vi.MiddleRight=Zs=nc,vi.MiddleBottom=Ks=Ga,vi.Top=ra=qa,vi.Left=Uo=Dl,vi.Right=ka=nc,vi.Bottom=Ds=Ga,vi.TopSide=$l=Rs(new vi(0,0,1,1),1).ja(),vi.LeftSide=_u=Rs(new vi(0,0,1,2),1).ja(),vi.RightSide=Wa=Rs(new vi(0,0,1,4),1).ja(),vi.BottomSide=Za=Rs(new vi(0,0,1,8),1).ja(),vi.TopBottomSides=Uu=Rs(new vi(0,0,1,9),1).ja(),vi.LeftRightSides=yc=Rs(new vi(0,0,1,6),1).ja(),vi.TopLeftSides=Eu=Rs(new vi(0,0,1,3),1).ja(),vi.TopRightSides=Rl=Rs(new vi(0,0,1,5),1).ja(),vi.BottomLeftSides=Sc=Rs(new vi(0,0,1,10),1).ja(),vi.BottomRightSides=Gu=Rs(new vi(0,0,1,12),1).ja(),vi.NotTopSide=Lu=Rs(new vi(0,0,1,14),1).ja(),vi.NotLeftSide=bl=Rs(new vi(0,0,1,13),1).ja(),vi.NotRightSide=th=Rs(new vi(0,0,1,11),1).ja(),vi.NotBottomSide=xc=Rs(new vi(0,0,1,7),1).ja(),vi.AllSides=lu=Rs(new vi(0,0,1,15),1).ja(),Yl=new vi(.156,.156).ja(),Bl=new vi(.844,.844).ja(),vi.parse=xh,vi.stringify=nh;function gr(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}gr.prototype.set=function(a){return this.m11=a.m11,this.m12=a.m12,this.m21=a.m21,this.m22=a.m22,this.dx=a.dx,this.dy=a.dy,this},gr.prototype.setTransform=function(a,y,x,b,E,te){return this.m11=a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=te,this},gr.prototype.copy=function(){var a=new gr;return a.m11=this.m11,a.m12=this.m12,a.m21=this.m21,a.m22=this.m22,a.dx=this.dx,a.dy=this.dy,a},gr.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},gr.prototype.D=function(a){return this.m11===a.m11&&this.m12===a.m12&&this.m21===a.m21&&this.m22===a.m22&&this.dx===a.dx&&this.dy===a.dy},gr.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},gr.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},gr.prototype.multiply=function(a){var y=this.m11*a.m11+this.m21*a.m12,x=this.m12*a.m11+this.m22*a.m12,b=this.m11*a.m21+this.m21*a.m22,E=this.m12*a.m21+this.m22*a.m22;return this.dx=this.m11*a.dx+this.m21*a.dy+this.dx,this.dy=this.m12*a.dx+this.m22*a.dy+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},gr.prototype.bv=function(a){var y=1/(a.m11*a.m22-a.m12*a.m21),x=a.m22*y,b=-a.m12*y,E=-a.m21*y,te=a.m11*y,ne=y*(a.m21*a.dy-a.m22*a.dx);return a=y*(a.m12*a.dx-a.m11*a.dy),y=this.m11*x+this.m21*b,x=this.m12*x+this.m22*b,b=this.m11*E+this.m21*te,E=this.m12*E+this.m22*te,this.dx=this.m11*ne+this.m21*a+this.dx,this.dy=this.m12*ne+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},gr.prototype.Vj=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),y=-this.m12*a,x=-this.m21*a,b=this.m11*a,E=a*(this.m21*this.dy-this.m22*this.dx),te=a*(this.m12*this.dx-this.m11*this.dy);return this.m11=this.m22*a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=te,this},gr.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a===0)return this;if(this.translate(y,x),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.m12*a+this.m22*b,te=this.m11*-b+this.m21*a,ne=this.m12*-b+this.m22*a;return this.m11=this.m11*a+this.m21*b,this.m12=E,this.m21=te,this.m22=ne,this.translate(-y,-x),this},ot=gr.prototype,ot.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},ot.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},ot.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)},ot.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))},ot.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))},ot.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,Me=this.dy,Fe=y*te+x*ae+_e,Ye=y*ne+x*fe+Me,tt=b*te+x*ae+_e,st=b*ne+x*fe+Me;return x=y*te+E*ae+_e,y=y*ne+E*fe+Me,te=b*te+E*ae+_e,b=b*ne+E*fe+Me,E=Math.min(Fe,tt),Fe=Math.max(Fe,tt),tt=Math.min(Ye,st),Ye=Math.max(Ye,st),E=Math.min(E,x),Fe=Math.max(Fe,x),tt=Math.min(tt,y),Ye=Math.max(Ye,y),E=Math.min(E,te),Fe=Math.max(Fe,te),tt=Math.min(tt,b),Ye=Math.max(Ye,b),a.h(E,tt,Fe-E,Ye-tt),a},gr.alloc=function(){var a=bc.pop();return a===void 0?new gr:a},gr.free=function(a){bc.push(a)},gr.prototype.transformRect=gr.prototype.pp,gr.prototype.transformPoint=gr.prototype.Ga,gr.prototype.scale=gr.prototype.scale,gr.prototype.translate=gr.prototype.translate,gr.prototype.rotate=gr.prototype.rotate,gr.prototype.invert=gr.prototype.Vj,gr.prototype.multiplyInverted=gr.prototype.bv,gr.prototype.multiply=gr.prototype.multiply,gr.prototype.reset=gr.prototype.reset,gr.prototype.isIdentity=gr.prototype.ws,gr.prototype.equals=gr.prototype.D,gr.prototype.setTransform=gr.prototype.setTransform,gr.prototype.set=gr.prototype.set;var bc=[];gr.className="Transform",gr.xF="54a702f3e53909c447824c6706603faf4c";var nn={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=nn.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);nn.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,Me=b;else _e=b,Me=y;if(a===x)return _e<=ne&&ne<=Me&&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&&(Me+=E,_e-=E,_e<=ne&&ne<=Me))if(fe-ae>Me-_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,Me,Fe){if(nn.Yb(a,y,ne,ae,Fe,x,b)&&nn.Yb(a,y,ne,ae,Fe,E,te))return nn.Yb(a,y,ne,ae,Fe,_e,Me);var Ye=(a+x)/2,tt=(y+b)/2,st=(x+E)/2,pt=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(Ye+st)/2,x=(tt+pt)/2,st=(st+E)/2,pt=(pt+te)/2;var It=(b+st)/2,Mt=(x+pt)/2;return nn.cs(a,y,Ye,tt,b,x,It,Mt,fe,_e,Me,Fe)||nn.cs(It,Mt,st,pt,E,te,ne,ae,fe,_e,Me,Fe)},ax:function(a,y,x,b,E,te,ne,ae,fe){var _e=(x+E)/2,Me=(b+te)/2;return fe.h((((a+x)/2+_e)/2+(_e+(E+ne)/2)/2)/2,(((y+b)/2+Me)/2+(Me+(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 nr(((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(nn.Yb(a,y,ne,ae,fe,x,b)&&nn.Yb(a,y,ne,ae,fe,E,te))Ao(_e,a,y,0,0),Ao(_e,ne,ae,0,0);else{var Me=(a+x)/2,Fe=(y+b)/2,Ye=(x+E)/2,tt=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(Me+Ye)/2,x=(Fe+tt)/2,Ye=(Ye+E)/2,tt=(tt+te)/2;var st=(b+Ye)/2,pt=(x+tt)/2;nn.Dl(a,y,Me,Fe,b,x,st,pt,fe,_e),nn.Dl(st,pt,Ye,tt,E,te,ne,ae,fe,_e)}return _e},Qe:function(a,y,x,b,E,te,ne,ae,fe,_e){if(nn.Yb(a,y,ne,ae,fe,x,b)&&nn.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 Me=(a+x)/2,Fe=(y+b)/2,Ye=(x+E)/2,tt=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(Me+Ye)/2,x=(Fe+tt)/2,Ye=(Ye+E)/2,tt=(tt+te)/2;var st=(b+Ye)/2,pt=(x+tt)/2;nn.Qe(a,y,Me,Fe,b,x,st,pt,fe,_e),nn.Qe(st,pt,Ye,tt,E,te,ne,ae,fe,_e)}return _e},jv:function(a,y,x,b,E,te,ne,ae,fe,_e){if(nn.Yb(a,y,E,te,_e,x,b))return nn.Yb(a,y,E,te,_e,ae,fe);var Me=(a+x)/2,Fe=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Ye=(Me+x)/2,tt=(Fe+b)/2;return nn.jv(a,y,Me,Fe,Ye,tt,ne,ae,fe,_e)||nn.jv(Ye,tt,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(nn.Yb(a,y,E,te,ne,x,b))Ao(ae,a,y,0,0),Ao(ae,E,te,0,0);else{var fe=(a+x)/2,_e=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Me=(fe+x)/2,Fe=(_e+b)/2;nn.iv(a,y,fe,_e,Me,Fe,ne,ae),nn.iv(Me,Fe,x,b,E,te,ne,ae)}return ae},ep:function(a,y,x,b,E,te,ne,ae){if(nn.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 Me=(fe+x)/2,Fe=(_e+b)/2;nn.ep(a,y,fe,_e,Me,Fe,ne,ae),nn.ep(Me,Fe,x,b,E,te,ne,ae)}return ae},Eo:function(a,y,x,b,E,te,ne,ae,fe,_e,Me,Fe,Ye,tt){if(nn.Yb(a,y,ne,ae,Ye,x,b)&&nn.Yb(a,y,ne,ae,Ye,E,te))return!nn.Rl(a,y,ne,ae,fe,_e,Me,Fe)||(Ye=(a-ne)*(_e-Fe)-(y-ae)*(fe-Me),Ye===0)?!1:(tt.h(((a*ae-y*ne)*(fe-Me)-(a-ne)*(fe*Fe-_e*Me))/Ye,((a*ae-y*ne)*(_e-Fe)-(y-ae)*(fe*Fe-_e*Me))/Ye),!0);var st=(a+x)/2,pt=(y+b)/2,It=(x+E)/2,Mt=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(st+It)/2,x=(pt+Mt)/2,It=(It+E)/2,Mt=(Mt+te)/2;var Ht=(b+It)/2,Gt=(x+Mt)/2,Zt=1/0,Xt=!1,pn=0,ii=0;return nn.Eo(a,y,st,pt,b,x,Ht,Gt,fe,_e,Me,Fe,Ye,tt)&&(a=(tt.x-fe)*(tt.x-fe)+(tt.y-_e)*(tt.y-_e),a<Zt&&(Zt=a,Xt=!0,pn=tt.x,ii=tt.y)),nn.Eo(Ht,Gt,It,Mt,E,te,ne,ae,fe,_e,Me,Fe,Ye,tt)&&(tt.x-fe)*(tt.x-fe)+(tt.y-_e)*(tt.y-_e)<Zt&&(Xt=!0,pn=tt.x,ii=tt.y),Xt&&(tt.x=pn,tt.y=ii),Xt},Fo:function(a,y,x,b,E,te,ne,ae,fe,_e,Me,Fe,Ye){var tt=0;if(nn.Yb(a,y,ne,ae,Ye,x,b)&&nn.Yb(a,y,ne,ae,Ye,E,te)){if(Ye=(a-ne)*(_e-Fe)-(y-ae)*(fe-Me),Ye===0)return tt;var st=((a*ae-y*ne)*(fe-Me)-(a-ne)*(fe*Fe-_e*Me))/Ye,pt=((a*ae-y*ne)*(_e-Fe)-(y-ae)*(fe*Fe-_e*Me))/Ye;if(st>=Me)return tt;if((fe>Me?fe-Me:Me-fe)<(_e>Fe?_e-Fe:Fe-_e)){if(y<ae?(fe=y,a=ae):(fe=ae,a=y),pt<fe||pt>a)return tt}else if(a<ne?(fe=a,a=ne):fe=ne,st<fe||st>a)return tt;0<Ye?tt++:0>Ye&&tt--}else{st=(a+x)/2,pt=(y+b)/2;var It=(x+E)/2,Mt=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(st+It)/2,x=(pt+Mt)/2,It=(It+E)/2,Mt=(Mt+te)/2;var Ht=(b+It)/2,Gt=(x+Mt)/2;tt+=nn.Fo(a,y,st,pt,b,x,Ht,Gt,fe,_e,Me,Fe,Ye),tt+=nn.Fo(Ht,Gt,It,Mt,E,te,ne,ae,fe,_e,Me,Fe,Ye)}return tt},qh:function(a,y,x,b,E,te,ne){return nn.$(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)):nn.$(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 nn.B(a,x)&&nn.B(y,b)?(fe.h(a,y),!1):nn.$(E,ne)?nn.$(a,x)?(nn.qh(a,y,x,b,E,te,fe),!1):nn.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,fe):(ae=(ae-te)/(ne-E),nn.$(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),nn.$(ae,ne)?(nn.qh(a,y,x,b,E,te,fe),!1):(E=(ne*a-ae*E+te-y)/(ne-ae),nn.$(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)):nn.qh(a,y,x,b,E,ne*(E-a)+y,fe))))},MA:function(a,y,x,b,E){return nn.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 Me(It,Mt){var Ht=(It-a)*(It-a)+(Mt-y)*(Mt-y);Ht<Fe&&(Fe=Ht,fe.h(It,Mt))}var Fe=1/0;Me(fe.x,fe.y);var Ye=0,tt=0,st=0,pt=0;if(E<ne?(Ye=E,tt=ne):(Ye=ne,tt=E),te<ae?(st=E,pt=ne):(st=ne,pt=E),Ye=(tt-Ye)/2+_e,_e=(pt-st)/2+_e,E=(E+ne)/2,te=(te+ae)/2,Ye===0||_e===0)return fe;if(.5>(x>a?x-a:a-x)){if(Ye=1-(x-E)*(x-E)/(Ye*Ye),0>Ye)return fe;Ye=Math.sqrt(Ye),b=-_e*Ye+te,Me(x,_e*Ye+te),Me(x,b)}else{if(x=(b-y)/(x-a),b=1/(Ye*Ye)+x*x/(_e*_e),ae=2*x*(y-x*a)/(_e*_e)-2*x*te/(_e*_e)-2*E/(Ye*Ye),Ye=ae*ae-4*b*(2*x*a*te/(_e*_e)-2*y*te/(_e*_e)+te*te/(_e*_e)+E*E/(Ye*Ye)-1+(y-x*a)*(y-x*a)/(_e*_e)),0>Ye)return fe;Ye=Math.sqrt(Ye),_e=(-ae+Ye)/(2*b),Me(_e,x*_e-x*a+y),Ye=(-ae-Ye)/(2*b),Me(Ye,x*Ye-x*a+y)}return fe},Ff:function(a,y,x,b,E,te,ne,ae,fe){var _e=1e21,Me=a,Fe=y;if(nn.Ve(a,y,a,b,E,te,ne,ae,fe)){var Ye=(fe.x-E)*(fe.x-E)+(fe.y-te)*(fe.y-te);Ye<_e&&(_e=Ye,Me=fe.x,Fe=fe.y)}return nn.Ve(x,y,x,b,E,te,ne,ae,fe)&&(Ye=(fe.x-E)*(fe.x-E)+(fe.y-te)*(fe.y-te),Ye<_e&&(_e=Ye,Me=fe.x,Fe=fe.y)),nn.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,Me=fe.x,Fe=fe.y)),nn.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,Me=fe.x,Fe=fe.y)),fe.h(Me,Fe),1e21>_e},us:function(a,y,x){return nn.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,b,E,te,ne,ae){var fe=a+x,_e=y+b;return E===ne?(te<ae?(ne=te,te=ae):ne=ae,a<=E&&E<=fe&&ne<=_e&&te>=y):te===ae?(E<ne?(ae=E,E=ne):ae=ne,y<=te&&te<=_e&&ae<=fe&&E>=a):!!(Eo(a,y,x,b,E,te)||Eo(a,y,x,b,ne,ae)||nn.Rl(a,y,fe,y,E,te,ne,ae)||nn.Rl(fe,y,fe,_e,E,te,ne,ae)||nn.Rl(fe,_e,a,_e,E,te,ne,ae)||nn.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>=nn.Fl(a,y,x,b,E,te)*nn.Fl(a,y,x,b,ne,ae)&&0>=nn.Fl(E,te,ne,ae,a,y)*nn.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(nn.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,Me=_e+ne*ne+fe*ae;return _e=4/3*(Math.sqrt(2*_e*Me)-Me)/(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),nn.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 Me=a/(y+E),Fe=ne/(y+te);if(Me=Me*Me+Fe*Fe-1,0<Me)ae=y;else if(0>Me)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 yi,um:new yi,Mf:new yi,Nf:0,vm:100};nn.za=nn.AA;function Yn(a){pr(this),this.l=2,a===void 0&&(a=Yn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===Yn.o?this.ee=new Bn:(Yn.V===null&&(Yn.V=new Bn().freeze()),this.ee=Yn.V),this.aq=this.ee.Ja,this.Ip=new Tn().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Xs,this.gg=Na,this.Rk=this.Sk=NaN,this.Uf=Un}Yn.prototype.copy=function(){var a=new Yn;if(a.l=this.l&-2,a.na=this.na,a.od=this.od,a.pd=this.pd,a.Dc=this.Dc,a.Ec=this.Ec,this.na===Yn.o){for(var y=this.ee.s,x=a.ee,b=0;b<y.length;b++)x.add(y[b].copy());a.ee=x}else a.ee=this.ee;return a.aq=this.aq,a.Ip.assign(this.Ip),a.tk=this.tk,a.ym=this.ym,a.zm=this.zm,a.fg=this.fg.J(),a.gg=this.gg.J(),a.Sk=this.Sk,a.Rk=this.Rk,a.Uf=this.Uf,a},Yn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},Yn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==Yn.o)return this;var a=this.figures;a.freeze(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].freeze();return this},Yn.prototype.ka=function(){if(Object.isFrozen(this)&&At("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==Yn.o)return this;var a=this.figures;a.ka(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].ka();return this},Yn.prototype.Xa=function(a){if(!(a instanceof Yn))return!1;if(this.type!==a.type)return this.type===Yn.j&&a.type===Yn.o?wh(this,a):a.type===Yn.j&&this.type===Yn.o?wh(a,this):!1;if(this.type===Yn.o){var y=this.figures.s;a=a.figures.s;var x=y.length;if(x!==a.length)return!1;for(var b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0}return nn.B(this.startX,a.startX)&&nn.B(this.startY,a.startY)&&nn.B(this.endX,a.endX)&&nn.B(this.endY,a.endY)};function wh(a,y){return a.type!==Yn.j||y.type!==Yn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&nn.B(a.startX,y.startX)&&nn.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===xo&&nn.B(a.endX,y.endX)&&nn.B(a.endY,y.endY))))}Yn.ia=function(a){return a.toString()},Yn.prototype.qb=function(a){a.classType===Yn&&(this.type=a)},Yn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Yn.j:return 0>a?"M"+this.startX.toString()+" "+this.startY.toString()+"L"+this.endX.toString()+" "+this.endY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a)+"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);case Yn.u:var y=new 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 Yn.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 Yn.o:y="",x=this.figures.s;for(var b=x.length,E=0;E<b;E++){var te=x[E];0<E&&(y+=" x "),te.isFilled&&(y+="F "),y+=te.toString(a)}return y;default:return this.type.toString()}},Yn.nb=function(a){a=a.split(/[Xx]/);for(var y=a.length,x="",b=0;b<y;b++){var E=a[b];x=E.match(/[Ff]/)!==null?b===0?x+E:x+("X"+(E[0]===" "?"":" ")+E):x+((b===0?"":"X ")+"F"+(E[0]===" "?"":" ")+E)}return x},Yn.parse=function(a,y){function x(){return pt>=Zt-1?!0:_e[pt+1].match(Xt)!==null}function b(){return pt++,_e[pt]}function E(Ji){var Zi=parseFloat(b()),to=parseFloat(b());It===It.toLowerCase()&&(Zi=Gt.x+Zi,to=Gt.y+to),Ji.h(Zi,to)}function te(){return E(Gt),Gt}function ne(){return E(Ht),Ht}function ae(){var Ji=Mt.toLowerCase();return Ji!=="c"&&Ji!=="s"&&Ji!=="q"&&Ji!=="t"?Gt:new Tt(2*Gt.x-Ht.x,2*Gt.y-Ht.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 Me=_e[a];if(Me.match(/(\.[0-9]*)(\.)/gm)!==null){fe=Hn();for(var Fe="",Ye=!1,tt=0;tt<Me.length;tt++){var st=Me[tt];st!=="."||Ye?st==="."?(fe.push(Fe),Fe="."):Fe+=st:(Ye=!0,Fe+=st)}for(fe.push(Fe),_e.splice(a,1),Me=0;Me<fe.length;Me++)_e.splice(a+Me,0,fe[Me]);a+=fe.length-1,ei(fe)}}var pt=-1,It="",Mt="";fe=new Tt(0,0);var Ht=new Tt(0,0),Gt=new Tt(0,0),Zt=_e.length;a=A1(null),Ye=Fe=Me=!1,tt=!0,st=null;for(var Xt=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(pt>=Zt-1);)if(Mt=It,It=b(),It!=="")switch(It.toUpperCase()){case"X":tt=!0,Fe=Me=!1;break;case"M":for(st=te(),a.mc===null||tt===!0?(Sp(a,st.x,st.y,Me,!Fe,Ye),tt=!1):a.moveTo(st.x,st.y),fe.assign(Gt);!x();)st=te(),a.lineTo(st.x,st.y);break;case"L":for(;!x();)st=te(),a.lineTo(st.x,st.y);break;case"H":for(;!x();)Gt=new Tt((It===It.toLowerCase()?Gt.x:0)+parseFloat(b()),Gt.y),a.lineTo(Gt.x,Gt.y);break;case"V":for(;!x();)Gt=new Tt(Gt.x,(It===It.toLowerCase()?Gt.y:0)+parseFloat(b())),a.lineTo(Gt.x,Gt.y);break;case"C":for(;!x();){st=new Tt,E(st);var pn=ne(),ii=te();Ih(a,st.x,st.y,pn.x,pn.y,ii.x,ii.y)}break;case"S":for(;!x();)st=ae(),pn=ne(),ii=te(),Ih(a,st.x,st.y,pn.x,pn.y,ii.x,ii.y);break;case"Q":for(;!x();)st=ne(),pn=te(),Um(a,st.x,st.y,pn.x,pn.y);break;case"T":for(;!x();)Ht=st=ae(),pn=te(),Um(a,st.x,st.y,pn.x,pn.y);break;case"B":for(;!x();){st=parseFloat(b()),pn=parseFloat(b()),ii=parseFloat(b());var fi=parseFloat(b()),li=parseFloat(b()),Kn=li,Rn=!1;x()||(Kn=parseFloat(b()),x()||(Rn=parseFloat(b())!==0)),It===It.toLowerCase()&&(ii+=Gt.x,fi+=Gt.y),a.arcTo(st,pn,ii,fi,li,Kn,Rn)}break;case"A":for(;!x();)st=Math.abs(parseFloat(b())),pn=Math.abs(parseFloat(b())),ii=parseFloat(b()),li=fi=!1,Rn=Kn=0,Kn=b(),Kn.length===1?(fi=!!parseFloat(Kn),li=!!parseFloat(b()),Kn=parseFloat(b())):Kn.length===2?(fi=!!parseFloat(Kn[0]),li=!!parseFloat(Kn[1]),Kn=parseFloat(b())):(fi=!!parseFloat(Kn[0]),li=!!parseFloat(Kn[1]),Kn=parseFloat(Kn.slice(2))),Rn=parseFloat(b()),It===It.toLowerCase()&&(Kn=Gt.x+Kn,Rn=Gt.y+Rn),Gt.h(Kn,Rn),Cx(a,st,pn,ii,fi,li,Kn,Rn);break;case"Z":bx(a),Gt.assign(fe);break;case"F":for(st="",pn=1;_e[pt+pn];)if(_e[pt+pn]==="0")Ye=!0,pn++;else if(_e[pt+pn].match(/[Uu]/)!==null)pn++;else if(_e[pt+pn].match(Xt)===null)pn++;else{st=_e[pt+pn];break}st.match(/[Mm]/)?Me=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(st="",pn=1;_e[pt+pn];)if(_e[pt+pn].match(/[Ff]/)!==null)pn++;else if(_e[pt+pn].match(Xt)===null)pn++;else{st=_e[pt+pn];break}st.match(/[Mm]/)?Fe=!0:a.mc.isShadowed=!1}if(fe=a.os,Gm=a,y)for(y=fe.figures.iterator;y.next();)y.value.isFilled=!0;return fe},Yn.Ha=function(a,y){for(var x=a.length,b=Tt.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}Tt.free(b)},Yn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===Yn.o){if(this.aq!==this.figures.Ja)return!0;for(var a=this.figures.s,y=a.length,x=0;x<y;x++)if(a[x].Zu())return!0}return!1},Yn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===Yn.o){this.aq=this.figures.Ja;for(var a=this.figures.s,y=a.length,x=0;x<y;x++){var b=a[x];b._isInvalidBounds=!1;var E=b.segments;b.sr=E.Ja,b=E.s,E=b.length;for(var te=0;te<E;te++){var ne=b[te];ne._isInvalidBounds=!1,ne.ae=null}}}a=this.Ip,a.ka(),isNaN(this.Sk)||isNaN(this.Rk)?a.h(0,0,0,0):a.h(0,0,this.Sk,this.Rk),Qh(this,a,!1),Ao(a,0,0,0,0),a.freeze()},Yn.prototype.ix=function(){var a=new Tn;return Qh(this,a,!0),a};function Qh(a,y,x){switch(a.type){case Yn.j:case Yn.u:case Yn.F:x?y.h(a.od,a.pd,0,0):Ao(y,a.od,a.pd,0,0),Ao(y,a.Dc,a.Ec,0,0);break;case Yn.o:var b=a.figures;a=b.s,b=b.length;for(var E=0;E<b;E++){var te=a[E];x&&E===0?y.h(te.startX,te.startY,0,0):Ao(y,te.startX,te.startY,0,0);for(var ne=te.segments.s,ae=ne.length,fe=te.startX,_e=te.startY,Me=0;Me<ae;Me++){var Fe=ne[Me];switch(Fe.type){case xo:case Ms:fe=Fe.endX,_e=Fe.endY,Ao(y,fe,_e,0,0);break;case ga:nn.Dl(fe,_e,Fe.point1X,Fe.point1Y,Fe.point2X,Fe.point2Y,Fe.endX,Fe.endY,.5,y),fe=Fe.endX,_e=Fe.endY;break;case dl:nn.iv(fe,_e,Fe.point1X,Fe.point1Y,Fe.endX,Fe.endY,.5,y),fe=Fe.endX,_e=Fe.endY;break;case cs:case Cl:var Ye=Fe.type===cs?Da(Fe,te):$s(Fe,te,fe,_e),tt=Ye.length;if(tt===0){fe=Fe.type===cs?Fe.centerX:Fe.endX,_e=Fe.type===cs?Fe.centerY:Fe.endY,Ao(y,fe,_e,0,0);break}Fe=null;for(var st=0;st<tt;st++)Fe=Ye[st],nn.Dl(Fe[0],Fe[1],Fe[2],Fe[3],Fe[4],Fe[5],Fe[6],Fe[7],.5,y);Fe!==null&&(fe=Fe[6],_e=Fe[7]);break;default:At("Unknown Segment type: "+Fe.type)}}}break;default:At("Unknown Geometry type: "+a.type)}}Yn.prototype.normalize=function(){this._isFrozen&&an(this);var a=this.ix();return this.offset(-a.x,-a.y),new Tt(-a.x,-a.y)},Yn.prototype.offset=function(a,y){return this._isFrozen&&an(this),this.transform(1,0,0,1,a,y),this},Yn.prototype.scale=function(a,y){return this._isFrozen&&an(this),this.transform(a,0,0,y,0,0),this},Yn.prototype.rotate=function(a,y,x){this._isFrozen&&an(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=gr.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),gr.free(b),this},ot=Yn.prototype,ot.transform=function(a,y,x,b,E,te){switch(this.type){case Yn.j:case Yn.u:case Yn.F:var ne=this.od,ae=this.pd;this.od=ne*a+ae*x+E,this.pd=ne*y+ae*b+te,ne=this.Dc,ae=this.Ec,this.Dc=ne*a+ae*x+E,this.Ec=ne*y+ae*b+te;break;case Yn.o:for(var fe=this.figures.s,_e=fe.length,Me=0;Me<_e;Me++){var Fe=fe[Me];ne=Fe.startX,ae=Fe.startY,Fe.startX=ne*a+ae*x+E,Fe.startY=ne*y+ae*b+te,Fe=Fe.segments.s;for(var Ye=Fe.length,tt=0;tt<Ye;tt++){var st=Fe[tt];switch(st.type){case xo:case Ms:ne=st.endX,ae=st.endY,st.endX=ne*a+ae*x+E,st.endY=ne*y+ae*b+te;break;case ga:ne=st.point1X,ae=st.point1Y,st.point1X=ne*a+ae*x+E,st.point1Y=ne*y+ae*b+te,ne=st.point2X,ae=st.point2Y,st.point2X=ne*a+ae*x+E,st.point2Y=ne*y+ae*b+te,ne=st.endX,ae=st.endY,st.endX=ne*a+ae*x+E,st.endY=ne*y+ae*b+te;break;case dl:ne=st.point1X,ae=st.point1Y,st.point1X=ne*a+ae*x+E,st.point1Y=ne*y+ae*b+te,ne=st.endX,ae=st.endY,st.endX=ne*a+ae*x+E,st.endY=ne*y+ae*b+te;break;case cs:ne=st.centerX,ae=st.centerY,st.centerX=ne*a+ae*x+E,st.centerY=ne*y+ae*b+te,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),st.startAngle+=ne),0>a&&(st.startAngle=180-st.startAngle,st.sweepAngle=-st.sweepAngle),0>b&&(st.startAngle=-st.startAngle,st.sweepAngle=-st.sweepAngle),st.radiusX*=Math.sqrt(a*a+x*x),st.radiusY!==void 0&&(st.radiusY*=Math.sqrt(y*y+b*b));break;case Cl:if(ne=st.endX,ae=st.endY,st.endX=ne*a+ae*x+E,st.endY=ne*y+ae*b+te,st.radiusX===0||st.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),st.xAxisRotation+=ne),0>a&&(st.xAxisRotation=180-st.xAxisRotation,st.isClockwiseArc=!st.isClockwiseArc),0>b&&(st.xAxisRotation=-st.xAxisRotation,st.isClockwiseArc=!st.isClockwiseArc),st.radiusX*=Math.sqrt(a*a+x*x),st.radiusY*=Math.sqrt(y*y+b*b);break;default:At("Unknown Segment type: "+st.type)}}}}return this._isInvalidBounds=!0,this},ot.ca=function(a,y){y===void 0&&(y=0);var x=this.od,b=this.pd,E=this.Dc,te=this.Ec;switch(this.type){case Yn.j:return nn.Yb(x,b,E,te,y,a.x,a.y);case Yn.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 Yn.F:ne=Math.min(x,E)-y;var ae=Math.min(b,te)-y;return x=(Math.abs(E-x)+2*y)/2,y=(Math.abs(te-b)+2*y)/2,0>=x||0>=y?!1:(ne=a.x-(ne+x),ae=a.y-(ae+y),1>=ne*ne/(x*x)+ae*ae/(y*y));case Yn.o:return Mu(this,a,y,!0,!1);default:return!1}};function Mu(a,y,x,b,E){var te=y.x;y=y.y;for(var ne=a.bounds.x-20,ae=0,fe,_e,Me,Fe,Ye=a.figures.s,tt=Ye.length,st=0;st<tt;st++){var pt=Ye[st],It=!pt.isEvenOdd;if(pt.isFilled){if(b&&pt.ca(te,y,x))return!0;var Mt=pt.segments;fe=pt.startX,_e=pt.startY;for(var Ht=fe,Gt=_e,Zt=Mt.s,Xt=0;Xt<=Mt.length;Xt++){var pn=void 0;if(Xt!==Mt.length){pn=Zt[Xt];var ii=pn.type;a=pn.endX,Fe=pn.endY}else ii=xo,a=Ht,Fe=Gt;switch(ii){case Ms:if(Ht=Tu(te,y,ne,y,fe,_e,Ht,Gt),isNaN(Ht))return!0;ae+=Ht,Ht=a,Gt=Fe;break;case xo:if(fe=Tu(te,y,ne,y,fe,_e,a,Fe),isNaN(fe))return!0;ae+=fe;break;case ga:Me=nn.Fo(fe,_e,pn.point1X,pn.point1Y,pn.point2X,pn.point2Y,a,Fe,ne,y,te,y,.5),ae+=Me;break;case dl:Me=nn.Fo(fe,_e,(fe+2*pn.point1X)/3,(_e+2*pn.point1Y)/3,(2*pn.point1X+a)/3,(2*pn.point1Y+Fe)/3,a,Fe,ne,y,te,y,.5),ae+=Me;break;case cs:case Cl:ii=pn.type===cs?Da(pn,pt):$s(pn,pt,fe,_e);var fi=ii.length;if(fi===0){if(fe=Tu(te,y,ne,y,fe,_e,pn.type===cs?pn.centerX:pn.endX,pn.type===cs?pn.centerY:pn.endY),isNaN(fe))return!0;ae+=fe;break}pn=null;for(var li=0;li<fi;li++){if(pn=ii[li],li===0){if(Me=Tu(te,y,ne,y,fe,_e,pn[0],pn[1]),isNaN(Me))return!0;ae+=Me}Me=nn.Fo(pn[0],pn[1],pn[2],pn[3],pn[4],pn[5],pn[6],pn[7],ne,y,te,y,.5),ae+=Me}pn!==null&&(a=pn[6],Fe=pn[7]);break;default:At("Unknown Segment type: "+pn.type)}fe=a,_e=Fe}if(It){if(ae!==0)return!0}else if(ae%2!==0)return!0;ae=0}else if(pt.ca(te,y,E?x:x+2))return!0}return!1}function Tu(a,y,x,b,E,te,ne,ae){if(nn.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}ot.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new Tt),this.type===Yn.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,b=this.flattenedLengths,E=x.length,te=this.flattenedTotalLength*a,ne=0,ae=0;ae<E;ae++){var fe=b[ae],_e=fe.length;for(a=0;a<_e;a++){var Me=fe[a];if(ne+Me>=te)return b=te-ne,b=Me===0?0:b/Me,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+=Me}}return y},ot.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===Yn.j)return 180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI;for(var y=this.flattenedSegments,x=this.flattenedLengths,b=y.length,E=this.flattenedTotalLength*a,te=0,ne=0;ne<b;ne++){var ae=x[ne],fe=ae.length;for(a=0;a<fe;a++){var _e=ae[a];if(te+_e>=E)return E=y[ne],y=E[2*a],x=E[2*a+1],b=E[2*a+2],a=E[2*a+3],1>Math.abs(b-y)&&1>Math.abs(a-x)?0:1>Math.abs(b-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=b-y?0:180:180*Math.atan2(a-x,b-y)/Math.PI;te+=_e}}return NaN},ot.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===Yn.j)return y[0]=this.startX+a*(this.endX-this.startX),y[1]=this.startY+a*(this.endY-this.startY),y[2]=180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI,y;for(var x=this.flattenedSegments,b=this.flattenedLengths,E=x.length,te=this.flattenedTotalLength*a,ne=0,ae=0;ae<E;ae++){var fe=b[ae],_e=fe.length;for(a=0;a<_e;a++){var Me=fe[a];if(ne+Me>=te)return b=te-ne,b=Me===0?0:b/Me,Me=x[ae],x=Me[2*a],ae=Me[2*a+1],E=Me[2*a+2],a=Me[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+=Me}}return y},ot.xx=function(a){if(this.type===Yn.j){var y=this.startX,x=this.startY,b=this.endX,E=this.endY;if(y!==b||x!==E){var te=a.x;if(a=a.y,y===b){if(x<E){var ne=x;b=E}else ne=E,b=x;return a<=ne?ne===x?0:1:a>=b?b===x?0:1:Math.abs(a-x)/(b-ne)}if(x===E)return y<b?ne=y:(ne=b,b=y),te<=ne?ne===y?0:1:te>=b?b===y?0:1:Math.abs(te-y)/(b-ne);ne=(b-y)*(b-y)+(E-x)*(E-x);var ae=Tt.alloc();return nn.qh(y,x,b,E,te,a,ae),a=ae.x,te=ae.y,Tt.free(ae),Math.sqrt(((a-y)*(a-y)+(te-x)*(te-x))/ne)}}else if(this.type===Yn.u){ne=this.startX,ae=this.startY;var fe=this.endX;if(E=this.endY,ne!==fe||ae!==E){y=fe-ne,x=E-ae,te=2*y+2*x,b=a.x,a=a.y,b=Math.min(Math.max(b,ne),fe),a=Math.min(Math.max(a,ae),E),ne=Math.abs(b-ne),fe=Math.abs(b-fe),ae=Math.abs(a-ae),E=Math.abs(a-E);var _e=Math.min(ne,fe,ae,E);if(_e===ae)return b/te;if(_e===fe)return(y+a)/te;if(_e===E)return(2*y+x-b)/te;if(_e===ne)return(2*y+2*x-a)/te}}else{y=this.flattenedSegments,x=this.flattenedLengths,te=this.flattenedTotalLength,b=Tt.alloc(),E=1/0,ae=ne=0,fe=y.length;for(var Me=_e=0,Fe=0;Fe<fe;Fe++)for(var Ye=y[Fe],tt=x[Fe],st=Ye.length,pt=0;pt<st;pt+=2){var It=Ye[pt],Mt=Ye[pt+1];if(pt!==0){nn.qh(_e,Me,It,Mt,a.x,a.y,b);var Ht=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);Ht<E&&(E=Ht,ne=ae,ne+=Math.sqrt((b.x-_e)*(b.x-_e)+(b.y-Me)*(b.y-Me))),ae+=tt[(pt-2)/2]}_e=It,Me=Mt}return Tt.free(b),a=ne/te,0>a?0:1<a?1:a}return 0};function bh(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],b=[],E=[];if(a.type===Yn.j)b.push(a.startX),b.push(a.startY),b.push(a.endX),b.push(a.endY),y.push(b),E.push(Math.sqrt((a.startX-a.endX)*(a.startX-a.endX)+(a.startY-a.endY)*(a.startY-a.endY))),x.push(E);else if(a.type===Yn.u)b.push(a.startX),b.push(a.startY),b.push(a.endX),b.push(a.startY),b.push(a.endX),b.push(a.endY),b.push(a.startX),b.push(a.endY),b.push(a.startX),b.push(a.startY),y.push(b),E.push(Math.abs(a.startX-a.endX)),E.push(Math.abs(a.startY-a.endY)),E.push(Math.abs(a.startX-a.endX)),E.push(Math.abs(a.startY-a.endY)),x.push(E);else if(a.type===Yn.F){var te=new Vs;te.startX=a.endX,te.startY=(a.startY+a.endY)/2;var ne=new Vr(cs);if(ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(a.startX+a.endX)/2,ne.centerY=(a.startY+a.endY)/2,ne.radiusX=Math.abs(a.startX-a.endX)/2,ne.radiusY=Math.abs(a.startY-a.endY)/2,te.add(ne),a=Da(ne,te),E=a.length,E===0)b.push(ne.centerX),b.push(ne.centerY);else{ne=te.startX,te=te.startY;for(var ae=0;ae<E;ae++){var fe=a[ae];nn.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,Me=_e.length,Fe=0;Fe<Me;Fe++){var Ye=_e[Fe];switch(Ye.type){case Ms:4<=b.length&&(y.push(b),x.push(Cc(b))),b=[],b.push(Ye.endX),b.push(Ye.endY),ne=Ye.endX,te=Ye.endY,ae=ne,fe=te;break;case xo:b.push(Ye.endX),b.push(Ye.endY),ne=Ye.endX,te=Ye.endY;break;case ga:nn.Qe(ne,te,Ye.point1X,Ye.point1Y,Ye.point2X,Ye.point2Y,Ye.endX,Ye.endY,.5,b),ne=Ye.endX,te=Ye.endY;break;case dl:nn.ep(ne,te,Ye.point1X,Ye.point1Y,Ye.endX,Ye.endY,.5,b),ne=Ye.endX,te=Ye.endY;break;case cs:var tt=Da(Ye,E),st=tt.length;if(st===0){b.push(Ye.centerX),b.push(Ye.centerY),ne=Ye.centerX,te=Ye.centerY;break}for(var pt=0;pt<st;pt++){var It=tt[pt];nn.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(tt=$s(Ye,E,ne,te),st=tt.length,pt=Ye.endX,It=Ye.endY,st===0){b.push(pt),b.push(It),ne=pt,te=It;break}for(pt=0;pt<st;pt++)It=tt[pt],nn.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:At("Segment not of valid type: "+Ye.type)}Ye.isClosed&&(b.push(ae),b.push(fe))}4<=b.length&&(y.push(b),x.push(Cc(b)))}}}function Cc(a){for(var y=[],x=0,b=0,E=a.length,te=0;te<E;te+=2){var ne=a[te],ae=a[te+1];te!==0&&y.push(Math.sqrt(Yo(x,b,ne,ae))),x=ne,b=ae}return y}ot.add=function(a){return this.ee.add(a),this},ot.pm=function(a,y,x,b,E,te,ne,ae){return this._isFrozen&&an(this),this.fg=new vi(a,y,E,te).freeze(),this.gg=new vi(x,b,ne,ae).freeze(),this},Je.Object.defineProperties(Yn.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},flattenedSegments:{get:function(){return bh(this),this.tk}},flattenedLengths:{get:function(){return bh(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===Yn.j){a=Math.abs(this.endX-this.startX);var y=Math.abs(this.endY-this.startY);a=Math.sqrt(a*a+y*y)}else if(this.type===Yn.u)a=2*Math.abs(this.endX-this.startX)+2*Math.abs(this.endY-this.startY);else{y=this.flattenedLengths;for(var x=y.length,b=a=0;b<x;b++)for(var E=y[b],te=E.length,ne=0;ne<te;ne++)a+=E[ne]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&an(this,a),this.na=a,a===Yn.o?this.ee=new Bn:(Yn.V===null&&(Yn.V=new Bn().freeze()),this.ee=Yn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&an(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&an(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&an(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&an(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&an(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&an(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&an(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&an(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),Yn.prototype.setSpots=Yn.prototype.pm,Yn.prototype.add=Yn.prototype.add,Yn.prototype.getFractionForPoint=Yn.prototype.xx,Yn.prototype.getPointAndAngleAlongPath=Yn.prototype.Qu,Yn.prototype.getAngleAlongPath=Yn.prototype.wx,Yn.prototype.getPointAlongPath=Yn.prototype.Pu,Yn.prototype.containsPoint=Yn.prototype.ca,Yn.prototype.transform=Yn.prototype.transform,Yn.prototype.rotate=Yn.prototype.rotate,Yn.prototype.scale=Yn.prototype.scale,Yn.prototype.offset=Yn.prototype.offset,Yn.prototype.normalize=Yn.prototype.normalize,Yn.prototype.computeBoundsWithoutOrigin=Yn.prototype.ix,Yn.prototype.equalsApprox=Yn.prototype.Xa,Yn.className="Geometry",Yn.j=new _n(Yn,"Line",0),Yn.u=new _n(Yn,"Rectangle",1),Yn.F=new _n(Yn,"Ellipse",2),Yn.o=new _n(Yn,"Path",3),Yn.V=null,Yn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",Yn.className="Geometry",Yn.stringify=Yn.ia,Yn.fillPath=Yn.nb,Yn.parse=Yn.parse,Yn.Line=Yn.j,Yn.Rectangle=Yn.u,Yn.Ellipse=Yn.F,Yn.Path=Yn.o;function Vs(a,y,x,b,E){pr(this),x===void 0&&(x=!0),b===void 0&&(b=!0),E===void 0&&(E=!1),this.l=2|(x?4:0)|(b?8:0)|(E?16:0),a!==void 0?this.od=a:this.od=0,y!==void 0?this.pd=y:this.pd=0,this.pl=new Bn,this.sr=this.pl.Ja,this.fw=null}Vs.prototype.copy=function(){var a=new Vs;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,b=a.pl,E=0;E<x;E++){var te=y[E].copy();b.add(te)}return a.sr=this.sr,a.fw=this.fw,a},ot=Vs.prototype,ot.Xa=function(a){if(!(a instanceof Vs&&nn.B(this.startX,a.startX)&&nn.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},ot.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},ot.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},ot.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},ot.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},ot.add=function(a){return this.pl.add(a),this},ot.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 Me=ae[_e];switch(Me.type){case Ms:te=Me.endX,ne=Me.endY,b=Me.endX,E=Me.endY;break;case xo:if(nn.Yb(b,E,Me.endX,Me.endY,x,a,y))return!0;b=Me.endX,E=Me.endY;break;case ga:if(nn.cs(b,E,Me.point1X,Me.point1Y,Me.point2X,Me.point2Y,Me.endX,Me.endY,.5,a,y,x))return!0;b=Me.endX,E=Me.endY;break;case dl:if(nn.jv(b,E,Me.point1X,Me.point1Y,Me.endX,Me.endY,.5,a,y,x))return!0;b=Me.endX,E=Me.endY;break;case cs:case Cl:var Fe=Me.type===cs?Da(Me,this):$s(Me,this,b,E),Ye=Fe.length,tt=Me.type===cs?Me.centerX:Me.endX,st=Me.type===cs?Me.centerY:Me.endY;if(Ye===0){if(nn.Yb(b,E,tt,st,x,a,y))return!0;b=tt,E=st;break}for(tt=null,st=0;st<Ye;st++)if(tt=Fe[st],st===0&&nn.Yb(b,E,tt[0],tt[1],x,a,y)||nn.cs(tt[0],tt[1],tt[2],tt[3],tt[4],tt[5],tt[6],tt[7],.5,a,y,x))return!0;tt!==null&&(b=tt[6],E=tt[7]);break;default:At("Unknown Segment type: "+Me.type)}if(Me.isClosed&&(b!==te||E!==ne)&&nn.Yb(b,E,te,ne,x,a,y))return!0}return!1},Je.Object.defineProperties(Vs.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},isFilled:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&an(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&an(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&an(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&an(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&an(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&an(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Vs.prototype.add=Vs.prototype.add,Vs.prototype.equalsApprox=Vs.prototype.Xa,Vs.className="PathFigure";function Vr(a,y,x,b,E,te,ne,ae){pr(this),a===void 0&&(a=xo),this.na=a,this.l=2,y!==void 0?this.Dc=y:this.Dc=0,x!==void 0?this.Ec=x:this.Ec=0,b===void 0&&(b=0),E===void 0&&(E=0),te===void 0&&(te=0),ne===void 0&&(ne=0),a===Cl?(a=te%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(b,0),this.Pg=Math.max(E,0),typeof ne=="boolean"?ne&&(this.isLargeArc=!0):typeof ne=="number"&&ne&&(this.isLargeArc=!0),ae&&(this.isClockwiseArc=!0)):(this.Ne=b,this.Vh=E,a===cs&&(te=Math.max(te,0)),this.Wh=te,typeof ne=="number"?(a===cs&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}Vr.prototype.copy=function(){var a=new Vr;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},ot=Vr.prototype,ot.Xa=function(a){if(!(a instanceof Vr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Ms:case xo:return nn.B(this.endX,a.endX)&&nn.B(this.endY,a.endY);case ga:return nn.B(this.endX,a.endX)&&nn.B(this.endY,a.endY)&&nn.B(this.point1X,a.point1X)&&nn.B(this.point1Y,a.point1Y)&&nn.B(this.point2X,a.point2X)&&nn.B(this.point2Y,a.point2Y);case dl:return nn.B(this.endX,a.endX)&&nn.B(this.endY,a.endY)&&nn.B(this.point1X,a.point1X)&&nn.B(this.point1Y,a.point1Y);case cs:return nn.B(this.startAngle,a.startAngle)&&nn.B(this.sweepAngle,a.sweepAngle)&&nn.B(this.centerX,a.centerX)&&nn.B(this.centerY,a.centerY)&&nn.B(this.radiusX,a.radiusX)&&nn.B(this.radiusY,a.radiusY);case Cl:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&nn.B(this.xAxisRotation,a.xAxisRotation)&&nn.B(this.endX,a.endX)&&nn.B(this.endY,a.endY)&&nn.B(this.radiusX,a.radiusX)&&nn.B(this.radiusY,a.radiusY);default:return!1}},ot.qb=function(a){a.classType===Vr&&(this.type=a)},ot.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Ms:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case xo:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ga:a=0>a?"C"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.point2X.toString()+" "+this.point2Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"C"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.point2X.toFixed(a)+" "+this.point2Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case dl:a=0>a?"Q"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"Q"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case cs:a=0>a?"B"+this.startAngle.toString()+" "+this.sweepAngle.toString()+" "+this.centerX.toString()+" "+this.centerY.toString()+" "+this.radiusX.toString()+" "+this.radiusY.toString():"B"+this.startAngle.toFixed(a)+" "+this.sweepAngle.toFixed(a)+" "+this.centerX.toFixed(a)+" "+this.centerY.toFixed(a)+" "+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a);break;case Cl:a=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.xAxisRotation.toString()+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toString()+" "+this.endY.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")},ot.freeze=function(){return this._isFrozen=!0,this},ot.ka=function(){return this._isFrozen=!1,this},ot.close=function(){return this.isClosed=!0,this};function Da(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,b=a.radiusY;if(b===void 0&&(b=x),x===0||b===0)return a.ae=[],a.ae;y=a.Ne;var E=a.Vh,te=nn.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var ne=gr.alloc();ne.reset(),x<b?ne.scale(1,b/x):ne.scale(x/b,1),Yn.Ha(te,ne),gr.free(ne)}for(x=te.length,b=0;b<x;b++)ne=te[b],ne[0]+=y,ne[1]+=E,ne[2]+=y,ne[3]+=E,ne[4]+=y,ne[5]+=E,ne[6]+=y,ne[7]+=E;return a.ae=te,a.ae}function $s(a,y,x,b){function E(pt,It,Mt,Ht){return(pt*Ht<It*Mt?-1:1)*Math.acos((pt*Mt+It*Ht)/(Math.sqrt(pt*pt+It*It)*Math.sqrt(Mt*Mt+Ht*Ht)))}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,Me=a.Ec,Fe=Math.cos(ne),Ye=Math.sin(ne),tt=Fe*(x-_e)/2+Ye*(b-Me)/2;ne=-Ye*(x-_e)/2+Fe*(b-Me)/2;var st=tt*tt/(y*y)+ne*ne/(te*te);return 1<st&&(y*=Math.sqrt(st),te*=Math.sqrt(st)),st=(ae===fe?-1:1)*Math.sqrt((y*y*te*te-y*y*ne*ne-te*te*tt*tt)/(y*y*ne*ne+te*te*tt*tt)),isNaN(st)&&(st=0),ae=st*y*ne/te,st=st*-te*tt/y,isNaN(ae)&&(ae=0),isNaN(st)&&(st=0),x=(x+_e)/2+Fe*ae-Ye*st,b=(b+Me)/2+Ye*ae+Fe*st,Me=E(1,0,(tt-ae)/y,(ne-st)/te),Fe=(tt-ae)/y,_e=(ne-st)/te,tt=(-tt-ae)/y,ae=(-ne-st)/te,ne=E(Fe,_e,tt,ae),tt=(Fe*tt+_e*ae)/(Math.sqrt(Fe*Fe+_e*_e)*Math.sqrt(tt*tt+ae*ae)),-1>=tt?ne=Math.PI:1<=tt&&(ne=0),!fe&&0<ne&&(ne-=2*Math.PI),fe&&0>ne&&(ne+=2*Math.PI),fe=y>te?1:y/te,tt=y>te?te/y:1,y=nn.jx(0,0,y>te?y:te,Me,Me+ne,!0),te=gr.alloc(),te.reset(),te.translate(x,b),te.rotate(a.Ne,0,0),te.scale(fe,tt),Yn.Ha(y,te),gr.free(te),a.ae=y,a.ae}Je.Object.defineProperties(Vr.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},isClosed:{get:function(){return(this.l&8)!==0},set:function(a){this.isClosed!==a&&(this.l=a?this.l|8:this.l&-9,this._isInvalidBounds=!0)}},type:{get:function(){return this.na},set:function(a){this._isFrozen&&an(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&an(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&an(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&an(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&an(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&an(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&an(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&an(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&an(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&En(a,">= zero",Vr,"radiusX"),this._isFrozen&&an(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&En(a,">= zero",Vr,"radiusY"),this._isFrozen&&an(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&an(this,a),a%=360,0>a&&(a+=360),this.Dc=a,this._isInvalidBounds=!0}},sweepAngle:{get:function(){return this.Ec},set:function(a){this._isFrozen&&an(this,a),360<a&&(a=360),-360>a&&(a=-360),this.Ec=a,this._isInvalidBounds=!0}},isClockwiseArc:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&an(this,a),this.l=a?this.l|4:this.l&-5,this._isInvalidBounds=!0}},isLargeArc:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&an(this,a),this.l=a?this.l|16:this.l&-17,this._isInvalidBounds=!0}},xAxisRotation:{get:function(){return this.Ne},set:function(a){this._isFrozen&&an(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Vr.prototype.equalsApprox=Vr.prototype.Xa;var Ms=new _n(Vr,"Move",0),xo=new _n(Vr,"Line",1),ga=new _n(Vr,"Bezier",2),dl=new _n(Vr,"QuadraticBezier",3),cs=new _n(Vr,"Arc",4),Cl=new _n(Vr,"SvgArc",4);Vr.className="PathSegment",Vr.Move=Ms,Vr.Line=xo,Vr.Bezier=ga,Vr.QuadraticBezier=dl,Vr.Arc=cs,Vr.SvgArc=Cl;function Ea(){this.H=null,this.xu=new Tt(0,0).freeze(),this.mt=new Tt(0,0).freeze(),this.Bp=this.Rq=0,this.Cp=1,this.xq="",this.Wr=this.Tp=!1,this.Rp=this.Ep=0,this.xg=this.nq=this.tq=!1,this.Zp=null,this.Rr=0,this.xd=this.Nr=null}Ea.prototype.copy=function(){var a=new Ea;return this.clone(a)},Ea.prototype.clone=function(a){return a.H=this.H,a.xu.assign(this.viewPoint),a.mt.assign(this.documentPoint),a.Rq=this.Rq,a.Bp=this.Bp,a.Cp=this.Cp,a.xq=this.xq,a.Tp=this.Tp,a.Wr=this.Wr,a.Ep=this.Ep,a.Rp=this.Rp,a.tq=this.tq,a.nq=this.nq,a.xg=this.xg,a.Zp=this.Zp,a.Rr=this.Rr,a.Nr=this.Nr,a.xd=this.xd,a},Ea.prototype.toString=function(){var a="^";return this.modifiers!==0&&(a+="M:"+this.modifiers),this.button!==0&&(a+="B:"+this.button),this.key!==""&&(a+="K:"+this.key),this.clickCount!==0&&(a+="C:"+this.clickCount),this.delta!==0&&(a+="D:"+this.delta),this.handled&&(a+="h"),this.bubbles&&(a+="b"),this.documentPoint!==null&&(a+="@"+this.documentPoint.toString()),a},Ea.prototype.So=function(a,y){var x=this.diagram;return x===null||Hd(x,a,y),y},Ea.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Hd(x,a,y),y.assign(x.Ps(y))),y},Je.Object.defineProperties(Ea.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{get:function(){return this.xu},set:function(a){this.xu.assign(a)}},documentPoint:{get:function(){return this.mt},set:function(a){this.mt.assign(a)}},modifiers:{get:function(){return this.Rq},set:function(a){this.Rq=a}},button:{get:function(){return this.Bp},set:function(a){if(this.Bp=a,this.event===null)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}}},buttons:{get:function(){return this.Cp},set:function(a){this.Cp=a}},key:{get:function(){return this.xq},set:function(a){this.xq=a}},down:{get:function(){return this.Tp},set:function(a){this.Tp=a}},up:{get:function(){return this.Wr},set:function(a){this.Wr=a}},clickCount:{get:function(){return this.Ep},set:function(a){this.Ep=a}},delta:{get:function(){return this.Rp},set:function(a){this.Rp=a}},isMultiTouch:{get:function(){return this.tq},set:function(a){this.tq=a}},handled:{get:function(){return this.nq},set:function(a){this.nq=a}},bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},event:{get:function(){return this.Zp},set:function(a){this.Zp=a}},isTouchEvent:{get:function(){var a=this.event;return a===null?!1:a.pointerType==="touch"||a.pointerType==="pen"}},timestamp:{get:function(){return this.Rr},set:function(a){this.Rr=a}},targetDiagram:{get:function(){return this.Nr},set:function(a){this.Nr=a}},targetObject:{get:function(){return this.xd},set:function(a){this.xd=a}},control:{get:function(){return(this.modifiers&1)!==0},set:function(a){this.modifiers=a?this.modifiers|1:this.modifiers&-2}},shift:{get:function(){return(this.modifiers&4)!==0},set:function(a){this.modifiers=a?this.modifiers|4:this.modifiers&-5}},alt:{get:function(){return(this.modifiers&2)!==0},set:function(a){this.modifiers=a?this.modifiers|2:this.modifiers&-3}},meta:{get:function(){return(this.modifiers&8)!==0},set:function(a){this.modifiers=a?this.modifiers|8:this.modifiers&-9}},left:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&1)!==0:this.button===0},set:function(a){this.buttons=a?this.buttons|1:this.buttons&-2}},right:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&2)!==0:this.button===2},set:function(a){this.buttons=a?this.buttons|2:this.buttons&-3}},middle:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&4)!==0:this.button===1},set:function(a){this.buttons=a?this.buttons|4:this.buttons&-5}}}),Ea.prototype.getMultiTouchDocumentPoint=Ea.prototype.Bz,Ea.prototype.getMultiTouchViewPoint=Ea.prototype.So,Ea.className="InputEvent";function Pc(){this.H=null,this.xa="",this.ar=this.Lr=null}Pc.prototype.copy=function(){var a=new Pc;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Pc.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},Je.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=qt(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=qt(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=qt(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=qt(y)&&typeof y.J=="function"?y.J():y,a},Go.prototype.qb=function(a){a.classType===Go&&(this.change=a)},Go.prototype.toString=function(){var a="";return a=this.change===Ka?a+"* ":this.change===Vo?a+(this.model!==null?"!m":"!d"):a+((this.model!==null?"!m":"!d")+this.change),this.propertyName&&typeof this.propertyName=="string"&&(a+=" "+this.propertyName),this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange),a+=": ",this.change===Ka?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=hi(this.object)),this.oldValue!==null&&(a+=" old: "+hi(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+hi(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Go.prototype.I=function(a){return a?this.oldValue:this.newValue},Go.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Go.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Go.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Go.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Go.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Je.Object.defineProperties(Go.prototype,{model:{get:function(){return this.cc},set:function(a){this.cc=a}},diagram:{get:function(){return this.H},set:function(a){this.H=a}},change:{get:function(){return this.Fm},set:function(a){this.Fm=a}},modelChange:{get:function(){return this.Qq},set:function(a){this.Qq=a}},propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},isTransactionFinished:{get:function(){return this.Fm===Ka&&(this.rf==="CommittedTransaction"||this.rf==="FinishedUndo"||this.rf==="FinishedRedo")}},object:{get:function(){return this.Qn},set:function(a){this.Qn=a}},oldValue:{get:function(){return this.Sn},set:function(a){this.Sn=a}},oldParam:{get:function(){return this.Rn},set:function(a){this.Rn=a}},newValue:{get:function(){return this.Mn},set:function(a){this.Mn=a}},newParam:{get:function(){return this.Ln},set:function(a){this.Ln=a}}}),Go.prototype.redo=Go.prototype.redo,Go.prototype.canRedo=Go.prototype.canRedo,Go.prototype.undo=Go.prototype.undo,Go.prototype.canUndo=Go.prototype.canUndo,Go.prototype.getParam=Go.prototype.Dz,Go.prototype.getValue=Go.prototype.I,Go.prototype.clear=Go.prototype.clear;var Ka=new _n(Go,"Transaction",-1),Vo=new _n(Go,"Property",0),vs=new _n(Go,"Insert",1),ds=new _n(Go,"Remove",2);Go.className="ChangedEvent",Go.Transaction=Ka,Go.Property=Vo,Go.Insert=vs,Go.Remove=ds;function Bs(){this.o=new Bn().freeze(),this.xa="",this.j=!1}Bs.prototype.toString=function(a){var y="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(a!==void 0&&0<a){a=this.changes.count;for(var x=0;x<a;x++){var b=this.changes.M(x);b!==null&&(y+=`
|
|
|
`+b.toString())}}return y},Bs.prototype.clear=function(){var a=this.changes;a.ka();for(var y=a.count-1;0<=y;y--){var x=a.M(y);x!==null&&x.clear()}a.clear(),a.freeze()},Bs.prototype.canUndo=function(){return this.isComplete},Bs.prototype.undo=function(){if(this.canUndo())for(var a=this.changes.count-1;0<=a;a--){var y=this.changes.M(a);y!==null&&y.undo()}},Bs.prototype.canRedo=function(){return this.isComplete},Bs.prototype.redo=function(){if(this.canRedo())for(var a=this.changes.count,y=0;y<a;y++){var x=this.changes.M(y);x!==null&&x.redo()}},Bs.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new ci,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===Vo&&b.object){var E=y.get(b.object);E||(E=new ci,y.set(b.object,E));var te=E.get(b.propertyName);te===null?E.set(b.propertyName,-1):(0<te&&a.cd(te,null),E.set(b.propertyName,x))}}for(x=y=0;x<a.count;x++)b=a.M(x),b!==null&&(x>y&&a.cd(y,b),y++);for(;a.length>y;)a.pop();a.freeze()}},Je.Object.defineProperties(Bs.prototype,{changes:{get:function(){return this.o}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isComplete:{get:function(){return this.j},set:function(a){this.j=a}}}),Bs.prototype.optimize=Bs.prototype.ak,Bs.prototype.redo=Bs.prototype.redo,Bs.prototype.canRedo=Bs.prototype.canRedo,Bs.prototype.undo=Bs.prototype.undo,Bs.prototype.canUndo=Bs.prototype.canUndo,Bs.prototype.clear=Bs.prototype.clear,Bs.className="Transaction";function Fo(){this.Pt=new In,this.Jd=!1,this.u=new Bn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new Bn().freeze(),this.hl=new Bn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Fo.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,b=0;b<x;b++)0<b&&(y+=" "),y+=this.nestedTransactionNames.M(b);if(y+="]",a!==void 0&&0<a)for(x=this.history.count,b=0;b<x;b++)y+=`
|
|
|
`+this.history.M(b).toString(a-1);return y},Fo.prototype.clear=function(){var a=this.history;a.ka();for(var y=a.count-1;0<=y;y--){var x=a.M(y);x!==null&&x.clear()}a.clear(),this.Ce=-1,a.freeze(),this.Fe=!1,this.Np=null,this.bi=0,this.Ie.ka(),this.Ie.clear(),this.Ie.freeze(),this.hl.clear(),this.Dt=this.rq=this.Gt=this.Ft=!1},Fo.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},ot=Fo.prototype,ot.Xw=function(a){this.Pt.add(a)},ot.Rx=function(a){this.Pt.remove(a)},ot.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},ot.eb=function(a){return a===void 0&&(a=""),Rc(this,!0,a)},ot.Kf=function(){return Rc(this,!1,"")};function Rc(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Dn("Ending transaction without having started a transaction: "+x);var b=a.transactionLevel===1,E=a.currentTransaction;b&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,E));var te=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var ne=a.Ie.count;0<ne&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(ne-1),a.Ie.freeze()),ne=a.hl.count,0<ne&&(te=a.hl.M(ne-1),a.hl.mb(ne-1))}if(b){if(y)a.rq=!1,E===null&&x!==""&&(E=a.currentTransaction),a.isEnabled&&E!==null&&(E.isComplete||(E.isComplete=!0,E.name=x),a.lx(),y=a.history,y.ka(),b=a.maxHistoryLength,0<=b&&(b===0?y.clear():y.count>=b&&(te=y.M(0),te!==null&&te.clear(),y.mb(0),a.Ce--)),b===0||y.count!==0&&y.get(y.count-1)===E||(y.add(E),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,E);else{a.Fe=!0;try{a.isEnabled&&E!==null&&(E.isComplete=!0,E.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,E),a.Fe=!1}E!==null&&E.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&E!==null){for(a=te,x=E.changes,E=x.count-1;E>=a;E--)y=x.M(E),y!==null&&y.undo(),x.ka(),x.mb(E);x.freeze()}return!1}ot.lx=function(){if(!this.isUndoingRedoing&&this.canRedo()){var a=this.history;a.ka();for(var y=a.count-1;y>this.historyIndex;y--){var x=a.M(y);x!==null&&x.clear(),a.mb(y),this.rq=!0}a.freeze()}},Fo.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Fo.prototype.undo=function(){if(this.canUndo()){var a=this.transactionToUndo;try{this.Fe=!0,this.Ob("StartingUndo","Undo",a),this.Ce--,a.undo()}catch(y){Dn("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Fo.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Fo.prototype.redo=function(){if(this.canRedo()){var a=this.transactionToRedo;try{this.Fe=!0,this.Ob("StartingRedo","Redo",a),this.Ce++,a.redo()}catch(y){Dn("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Fo.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new Go;for(b.change=Ka,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},Fo.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Bs);var x=a.copy();y=y.changes,y.ka(),y.add(x),y.freeze(),this.checksTransactionLevel&&0>=this.transactionLevel&&!this.tt&&(a=a.diagram,a!==null&&a.pi===!1||Dn("Change not within a transaction: "+x.toString()))}},Fo.prototype.skipsEvent=function(a){if(a===null||0>a.change.value)return!0;if(a=a.object,a===null)return!1;if(a.layer!==void 0){if(a=a.layer,a!==null&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1},Je.Object.defineProperties(Fo.prototype,{models:{get:function(){return this.Pt.iterator}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},transactionToUndo:{get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.M(this.historyIndex):null}},transactionToRedo:{get:function(){return this.historyIndex<this.history.count-1?this.history.M(this.historyIndex+1):null}},isUndoingRedoing:{get:function(){return this.Fe}},history:{get:function(){return this.u}},maxHistoryLength:{get:function(){return this.o},set:function(a){this.o=a}},historyIndex:{get:function(){return this.Ce}},currentTransaction:{get:function(){return this.Np}},transactionLevel:{get:function(){return this.bi}},isInTransaction:{get:function(){return 0<this.bi}},checksTransactionLevel:{get:function(){return this.j},set:function(a){this.j=a}},nestedTransactionNames:{get:function(){return this.Ie}},isPendingClear:{get:function(){return this.Ft},set:function(a){this.Ft=a}},isPendingUnmodified:{get:function(){return this.Gt},set:function(a){this.Gt=a}},isInternalTransaction:{get:function(){return this.Dt},set:function(a){this.Dt=a}},isJustDiscarded:{get:function(){return this.rq}}}),Fo.prototype.handleChanged=Fo.prototype.Tu,Fo.prototype.redo=Fo.prototype.redo,Fo.prototype.undo=Fo.prototype.undo,Fo.prototype.canUndo=Fo.prototype.canUndo,Fo.prototype.discardHistoryAfterIndex=Fo.prototype.lx,Fo.prototype.rollbackTransaction=Fo.prototype.Kf,Fo.prototype.commitTransaction=Fo.prototype.eb,Fo.prototype.startTransaction=Fo.prototype.Ea,Fo.prototype.removeModel=Fo.prototype.Rx,Fo.prototype.addModel=Fo.prototype.Xw,Fo.prototype.clear=Fo.prototype.clear,Fo.className="UndoManager";function Gr(){pr(this),this.H=ac,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new Ea,this.Zr=-1}Gr.prototype.toString=function(){return this.name!==""?this.name+" Tool":Fn(this.constructor)},Gr.prototype.updateAdornments=function(){},Gr.prototype.canStart=function(){return this.isEnabled},Gr.prototype.doStart=function(){},Gr.prototype.doActivate=function(){this.isActive=!0},Gr.prototype.doDeactivate=function(){this.isActive=!1},Gr.prototype.doStop=function(){},Gr.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Gr.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Gr.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Gr.prototype.doMouseMove=function(){},Gr.prototype.doMouseUp=function(){this.stopTool()},Gr.prototype.doMouseWheel=function(){},Gr.prototype.canStartMultiTouch=function(){return!0},Gr.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Tt.allocAt(NaN,NaN)),b=y.So(1,Tt.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}Tt.free(x),Tt.free(b)},Gr.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Tt.allocAt(NaN,NaN)),b=y.So(1,Tt.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 Tt((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}Tt.free(x),Tt.free(b)},Gr.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Gr.prototype.doKeyUp=function(){},Gr.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Gr.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Gr.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(Cr?y.meta:y.control){for(a.R("ChangingSelection",a.selection),y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&(y.isSelected=!y.isSelected),a.R("ChangedSelection",a.selection)}else if(y.shift){if(!x.isSelected){for(a.R("ChangingSelection",a.selection),y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&(y.isSelected=!0),a.R("ChangedSelection",a.selection)}}else if(!x.isSelected){for(y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&a.select(y)}}else!y.left||(Cr?y.meta:y.control)||y.shift||a.clearSelection()}},Gr.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)}}}Gr.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}},Gr.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Gr.prototype.doCurrentObjectChanged=function(){},Gr.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)}}},Gr.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Gr.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=dn(function(){x.doWaitAfter(b)},a)},Gr.prototype.cancelWaitAfter=function(){this.Zr!==-1&&Et.clearTimeout(this.Zr),this.Zr=-1},Gr.prototype.doWaitAfter=function(){},Gr.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},Gr.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},Je.Object.defineProperties(Gr.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof fn&&(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}}}),Gr.prototype.startTransaction=Gr.prototype.Ea,Gr.className="Tool";function Wo(){Gr.call(this),this.name="ToolManager",this.hb=new Bn,this.ob=new Bn,this.Hb=new Bn,this.F=this.V=850,this.o=new Qn(2,2).ja(),this.Ha=5e3,this.ia=ih,this.u=Ch,this.Mp=this.j=null,this.zj=-1}nt(Wo,Gr),Wo.prototype.initializeStandardTools=function(){},Wo.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Qr&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Wo.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===ic&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===ro){y.bubbles=!0;return}if(this.gestureBehavior===ic)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,b=0;b<x;b++){var E=this.mouseDownTools.M(b);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseDown());return}}a.lastInput.button===1&&(this.mouseWheelBehavior===ih?this.mouseWheelBehavior=rh:this.mouseWheelBehavior===rh&&(this.mouseWheelBehavior=ih)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Wo.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===ro){y.bubbles=!0;return}if(this.gestureBehavior===ic)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomMove();return}}if(this.isActive)for(var x=this.mouseMoveTools.length,b=0;b<x;b++){var E=this.mouseMoveTools.M(b);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseMove());return}}Nd(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Nd(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}Wo.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof Qr&&(y===a||y.rg(a))||this.hideToolTip()},Wo.prototype.doWaitAfter=function(a){var y=this.diagram;y.ta!==null&&(this.doMouseHover(),this.isActive||this.doToolTip(),a.isTouchEvent&&!y.lastInput.handled&&(a=a.copy(),a.button=2,a.buttons=2,y.lastInput=a,y.qu=!0,y.doMouseUp()))},Wo.prototype.doMouseHover=function(){var a=this.diagram,y=a.lastInput;y.targetObject===null&&(y.targetObject=a.ic(y.documentPoint,null,null));var x=y.targetObject;if(x!==null)for(y.handled=!1;x!==null&&(a=this.isActive?x.mouseHold:x.mouseHover,!(a!==null&&(a(y,x),y.handled)));)x=x.panel;else x=this.isActive?a.mouseHold:a.mouseHover,x!==null&&x(y)},Wo.prototype.doToolTip=function(){var a=this.diagram,y=a.lastInput;if(y.targetObject===null&&(y.targetObject=a.ic(y.documentPoint,null,null)),y=y.targetObject,y!==null){if(a=this.currentToolTip,!(a instanceof Qr)||y!==a&&!y.rg(a)){for(;y!==null;){if(a=y.toolTip,a!==null){this.showToolTip(a,y);return}y=y.panel}this.hideToolTip()}}else y=a.toolTip,y!==null?this.showToolTip(y,null):this.hideToolTip()},Wo.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof Qr){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category="ToolTip",a.placeholder!==null&&(a.placeholder.scale=x.scale);var b=a.diagram;b!==null&&b!==x&&b.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionToolTip(a,y)}else a instanceof $i&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(Et.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=dn(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&&(Et.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 $i&&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)},Je.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 _n(Wo,"WheelScroll",0),rh=new _n(Wo,"WheelZoom",1),Od=new _n(Wo,"WheelNone",2),Ch=new _n(Wo,"GestureZoom",3),ic=new _n(Wo,"GestureCancel",4),ro=new _n(Wo,"GestureNone",5);Wo.className="ToolManager",Wo.WheelScroll=ih,Wo.WheelZoom=rh,Wo.WheelNone=Od,Wo.GestureZoom=Ch,Wo.GestureCancel=ic,Wo.GestureNone=ro;function ns(){Gr.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 Tt(NaN,NaN),this.Fr=new Tt,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;nt(ns,Gr),ns.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly&&!a.allowDragOut||!a.allowMove&&!a.allowCopy&&!a.allowDragOut||!a.allowSelect)return!1;var y=a.lastInput;return!y.left||a.currentTool!==this&&(!this.isBeyondDragSize()||y.isTouchEvent&&y.timestamp-a.firstInput.timestamp<this.Ik)?!1:this.findDraggablePart()!==null},ns.prototype.findDraggablePart=function(){var a=this.diagram;if(a=a.Ol(a.firstInput.documentPoint,!1),a===null)return null;for(;a!==null&&!a.canSelect();)a=a.containingGroup;return a!==null&&(a.canMove()||a.canCopy())?a:null},ns.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.Ol(a.firstInput.documentPoint,!1);if(y!==null){for(;y!==null&&!y.canSelect();)y=y.containingGroup;this.currentPart=y,this.currentPart===null||this.currentPart.isSelected||(a.R("ChangingSelection",a.selection),y=a.lastInput,(Cr?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},ns.prototype.doActivate=function(){var a=this.diagram;this.Bn=null,this.currentPart===null&&this.standardMouseSelect();var y=this.currentPart;y!==null&&(y.canMove()||y.canCopy())&&(a.Fu(!0),gt=null,this.isActive=!0,this.tl.set(a.position),qh(this,a.selection),this.Cg.length=0,a.animationManager.Cc(),this.draggedParts=this.computeEffectiveCollection(a.selection,this.dragOptions),this.Sw=this.diagram.layout.isRealtime,this.diagram.layout.isRealtime=!1,a.Ns=!0,a.Gf("temporaryPixelRatio")===!0&&30<a.$w&&Ba(a),Qf(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,gt=this,Pt=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 Vn?(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 Wn,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}ns.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},ns.prototype.Pd=function(a){return a===void 0?new ah(Ur):this.isGridSnapEnabled?new ah(new Tt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new ah(a.copy())},ns.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),Au(this),od(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<ku.count){for(var y=ku,x=y.length,b=0;b<x;b++){var E=y.M(b);ps(E),Fl(E),Au(E),E.diagram.ug()}y.clear()}ps(this),this.tl.h(NaN,NaN),Pt!==null&&(Pt.currentCursor=""),gt=Pt=null,Fl(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),nd(a,!0)},ns.prototype.stopTransaction=function(){var a=this.diagram,y=Gr.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=gt;Fl(a),rc(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}ns.prototype.doCancel=function(){Fl(this),rc(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},ns.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},ns.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function uu(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var b=x.undoManager;for(b.isEnabled&&b.isInTransaction?b.currentTransaction!==null&&0<b.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):rc(a),x.skipsUndoManager=!y,x.partManager.addsToTemporaryLayer=!y,a.startPoint=x.firstInput.documentPoint,y=a.copiesEffectiveCollection?a.draggedParts.Lf():x.selection,y=x.Kj(y,x,!0),x=new ci,b=a.draggedParts.iterator;b.next();){var E=b.key;if(E.Zc()&&E.canCopy()){var te=y.I(E);te!==null&&(te.location=E.location,te.Va(),x.add(te,a.Pd(te.location)))}}for(y=y.iterator;y.next();)b=y.value,b instanceof Vn&&b.canCopy()&&x.add(b,a.Pd());a.copiedParts=x,qh(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Bh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function Fl(a){var y=a.diagram;if(a.copiedParts!==null){if(y.Is(a.copiedParts.Lf(),!1),a.copiedParts=null,a.draggedParts!==null)for(var x=a.draggedParts.iterator;x.next();)x.key instanceof Vn&&(x.value.point=new Tt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function ps(a){if(a.draggedLink!==null){if(a.dragsLink&&a.Oe!==null){var y=a.Oe;y.diagram.remove(y.temporaryFromNode),y.diagram.remove(y.temporaryToNode),a.Oe.originalLink=null}a.draggedLink=null,a.Oe=null}}function Fs(a,y,x){var b=a.diagram,E=a.startPoint,te=Tt.alloc();te.assign(b.lastInput.documentPoint),a.moveParts(y,te.re(E),x),Tt.free(te),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&(Ba(b),b.hk())}ns.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var b=this.diagram;b!==null&&Ec(b,a,y,this.dragOptions,x)};function rc(a){if(a.draggedParts!==null){for(var y=a.diagram,x=a.draggedParts.iterator;x.next();){var b=x.key;b.Zc()&&(b.location=x.value.point)}for(x=a.draggedParts.iterator;x.next();)if(b=x.key,b instanceof Vn&&b.suspendsRouting){var E=x.value.point;a.draggedParts.add(b,a.Pd()),Bh(b,-E.x,-E.y)}y.bd()}}function el(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),Oa(a,!1));var b=a.findDragOverObject(y),E=x.lastInput;E.targetObject=b,a.doUpdateCursor(b);var te=x.skipsUndoManager,ne=!1;try{if(x.skipsUndoManager=!0,ne=Id(a,E,b),!a.isActive&>===null)return;var ae=b!==null?b.part:null;if(ae===null||x.handlesDragDropForTopLevelParts&&ae.isTopLevel&&!(ae instanceof er)){var fe=x.mouseDragOver;fe!==null&&(fe(E),ne=!0)}if(!a.isActive&>===null||(a.doDragOver(y,b),!a.isActive&>===null))return}finally{x.skipsUndoManager=te,ne&&x.bd()}a.Bn=b,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(E.viewPoint)}ns.prototype.findDragOverObject=function(a){var y=this;return Ku(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof Qr||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},ns.prototype.doUpdateCursor=function(a){var y=this.diagram;(a===null||this.Bn!==a)&&(!this.diagram.currentTool.isActive||this.mayCopy()?y.currentCursor=this.copyCursor:this.mayMove()?y.currentCursor=this.moveCursor:this.mayDragOut()&&(y.currentCursor=this.nodropCursor))};function Id(a,y,x){var b=!1,E=a.Cg.length,te=0<E?a.Cg[0]:null;if(x===te)return!1;y.handled=!1;for(var ne=0;ne<E;ne++){var ae=a.Cg[ne],fe=ae.mouseDragLeave;if(fe!==null&&(fe(y,ae,x),b=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&>===null||x===null)return b;for(y.handled=!1,E=x;E!==null;)a.Cg.push(E),E=td(E);for(E=a.Cg.length,x=0;x<E&&(ne=a.Cg[x],ae=ne.mouseDragEnter,ae===null||(ae(y,ne,te),b=!0,!y.handled));x++);return b}function td(a){var y=a.panel;return y!==null?y:a instanceof Ti&&!(a instanceof er)&&(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=Tt.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 Tt.free(a),ne}function Oa(a,y){var x=a.draggedLink;if(x!==null&&!(2>x.pointsCount)){var b=a.diagram;if(!b.isReadOnly){var E=a.Oe;if(E!==null){var te=null,ne=null;x.fromNode===null&&(te=Dd(a,x.i(0),!1),te!==null&&(ne=te.part));var ae=null,fe=null;x.toNode===null&&(ae=Dd(a,x.i(x.pointsCount-1),!0),ae!==null&&(fe=ae.part)),E.isValidLink(ne,te,fe,ae)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=ne,te!==null&&(x.fromPortId=te.portId),x.toNode=fe,ae!==null&&(x.toPortId=ae.portId),x.fromPort!==b.Mx&&b.R("LinkRelinked",x,b.Mx),x.toPort!==b.Nx&&b.R("LinkRelinked",x,b.Nx)):wi(E,ne,te,fe,ae):wi(E,null,null,null,null)}}}}ns.prototype.doDragOver=function(){};function oc(a,y){var x=a.diagram;a.dragsLink&&Oa(a,!0),Au(a);var b=a.findDragOverObject(y),E=x.lastInput;if(E.targetObject=b,b!==null){E.handled=!1;for(var te=b;te!==null;){var ne=te.mouseDrop;if(ne!==null&&(ne(E,te),E.handled))break;gf(a,E,te),te=td(te)}}else te=x.mouseDrop,te!==null&&te(E);if(a.isActive||gt!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)te=E.key,te instanceof ri&&te.linksConnected.each(function(ae){ae.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||gt!==null){for(a=Tn.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof ri&&Rt(x,b,a);Tn.free(a)}}}function gf(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof er||(x=a.mouseDrop,x!==null&&x(y))}function Rt(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 Vn},!0,function(E){return E instanceof Vn},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}ns.prototype.doDropOnto=function(){},ns.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,y=a.lastInput;this.simulatedMouseMove(y.event,y.documentPoint,y.targetDiagram)||this.currentPart===null||this.draggedParts===null||(this.mayCopy()?(uu(this,!1),Qf(a,this.copiedParts),Fs(this,this.copiedParts,!1),od(a,this.copiedParts)):this.mayMove()?(Fl(this),Fs(this,this.draggedParts,!0)):this.mayDragOut()?(uu(this,!1),Fs(this,this.copiedParts,!1)):Fl(this),el(this,a.lastInput.documentPoint))}},ns.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=a.lastInput;if(!this.simulatedMouseUp(y.event,y.documentPoint,y.targetDiagram)){y=!1;var x=this.mayCopy();if(x&&this.copiedParts!==null?(Fl(this),uu(this,!0),Qf(a,this.copiedParts),Fs(this,this.copiedParts,!1),od(a,this.copiedParts),this.copiedParts!==null&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0}))):(y=!0,Fl(this),this.mayMove()&&(Fs(this,this.draggedParts,!0),el(this,a.lastInput.documentPoint))),this.Ym=!0,oc(this,a.lastInput.documentPoint),this.isActive){var b=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&zt(this),a.Ya(),od(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",b)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},ns.prototype.simulatedMouseMove=function(a,y,x){if(gt===null)return!1;var b=gt.diagram;x instanceof fn||(x=null);var E=Pt;return x!==E&&(E!==null&&E!==b&&(E.ug(),gt.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),Pt=x,x!==null&&x!==b&&(ed(),E=x.toolManager.findTool("Dragging"),E!==null&&(ku.contains(E)||ku.add(E),E.doSimulatedDragEnter())),this.doUpdateCursor(null)),x===null||x===b||!x.allowDrop||x.isReadOnly||!x.allowInsert?!1:(b=x.toolManager.findTool("Dragging"),b!==null&&(a!==null&&(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)),x.lastInput.documentPoint=y,x.lastInput.viewPoint=x.op(y),x.lastInput.down=!1,x.lastInput.up=!1,b.doSimulatedDragOver()),!0)},ns.prototype.simulatedMouseUp=function(a,y,x){if(gt===null)return!1;var b=Pt,E=gt.diagram;if(x===null)return gt.doCancel(),!0;if(x!==b){var te=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&te!==null)return b.ug(),gt.isDragOutStarted=!1,te.doSimulatedDragLeave(),!1;Pt=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 Tt),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=gt,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function zt(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof ri&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}ns.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Cr?!a.lastInput.alt:!a.lastInput.control))return!1;for(a=a.selection.iterator;a.next();)if(a.value.canCopy())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canCopy())},ns.prototype.mayDragOut=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(!a.allowDragOut||!a.allowCopy||a.allowMove)return!1;for(a=a.selection.iterator;a.next();)if(a.value.canCopy())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canCopy())},ns.prototype.mayMove=function(){var a=this.diagram;if(a.isReadOnly||!a.allowMove)return!1;for(a=a.selection.iterator;a.next();)if(a.value.canMove())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canMove())},ns.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},ns.prototype.Az=function(){return gt},ns.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=gt;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},ns.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),fl(a),a.animationManager.Cc(),a=gt,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},ns.prototype.doSimulatedDragLeave=function(){var a=gt;a!==null&&a.doSimulatedDragOut(),this.doCancel()},ns.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=gt;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;ln(this,y.draggedParts.Lf(),!1,a.firstInput),Fs(this,this.copiedParts,!1),el(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},ns.prototype.doSimulatedDrop=function(){var a=this.diagram,y=gt;if(y!==null){var x=y.diagram;if(y.Ym=!0,Fl(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),ln(this,y.draggedParts.Lf(),!0,a.lastInput),Fs(this,this.copiedParts,!1);var b=new In;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0,b.add(E)})),oc(this,a.lastInput.documentPoint),a.Ya(),this.copiedParts!==null&&(this.transactionResult="ExternalCopy"),this.copiedParts=null,a.doFocus(),a.R("ExternalObjectsDropped",b,x),this.stopTransaction(),a.R("ChangedSelection",a.selection)}a.animationManager.Dm=!1};function ln(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 Me=_e.location;_e=Me.x,Me=Me.y,isNaN(_e)||isNaN(Me)||(_e<b&&(b=_e),Me<E&&(E=Me),_e>ne&&(ne=_e),Me>ae&&(ae=Me))}}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 ci,ae=Tt.alloc(),fe=y.iterator;fe.next();)_e=fe.value,_e instanceof Vn&&_e.canCopy()&&(Me=x.I(_e),Me!==null&&(Me.points=_e.points,Bh(Me,te.x-b,te.y-E),Me.suspendsRouting=!0,ne.add(Me,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))));Tt.free(ae),a.copiedParts=ne,qh(a,ne.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Bh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}ns.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},ns.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new Tt},Je.Object.defineProperties(ns.prototype,{isCopyEnabled:{get:function(){return this.ob},set:function(a){this.ob=a}},copiesEffectiveCollection:{get:function(){return this.u},set:function(a){this.u=a}},dragOptions:{get:function(){return this.ia},set:function(a){this.ia=a}},isGridSnapEnabled:{get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){this.dragOptions.isGridSnapEnabled=a}},isComplexRoutingRealtime:{get:function(){return this.hb},set:function(a){this.hb=a}},isGridSnapRealtime:{get:function(){return this.dragOptions.isGridSnapRealtime},set:function(a){this.dragOptions.isGridSnapRealtime=a}},gridSnapCellSize:{get:function(){return this.dragOptions.gridSnapCellSize},set:function(a){this.dragOptions.gridSnapCellSize.D(a)||(a=a.J(),this.dragOptions.gridSnapCellSize=a)}},gridSnapCellSpot:{get:function(){return this.dragOptions.gridSnapCellSpot},set:function(a){this.dragOptions.gridSnapCellSpot.D(a)||(a=a.J(),this.dragOptions.gridSnapCellSpot=a)}},gridSnapOrigin:{get:function(){return this.dragOptions.gridSnapOrigin},set:function(a){this.dragOptions.gridSnapOrigin.D(a)||(a=a.J(),this.dragOptions.gridSnapOrigin=a)}},dragsLink:{get:function(){return this.dragOptions.dragsLink},set:function(a){this.dragOptions.dragsLink=a}},dragsTree:{get:function(){return this.dragOptions.dragsTree},set:function(a){this.dragOptions.dragsTree=a}},copyCursor:{get:function(){return this.F},set:function(a){this.F=a}},moveCursor:{get:function(){return this.Oc},set:function(a){this.Oc=a}},nodropCursor:{get:function(){return this.Pc},set:function(a){this.Pc=a}},currentPart:{get:function(){return this.V},set:function(a){this.V=a}},copiedParts:{get:function(){return this.o},set:function(a){this.o=a}},draggedParts:{get:function(){return this.Ha},set:function(a){this.Ha=a}},draggingParts:{get:function(){return this.copiedParts!==null?this.copiedParts.Lf():this.draggedParts!==null?this.draggedParts.Lf():this.te}},draggedLink:{get:function(){return this.diagram.draggedLink},set:function(a){this.diagram.draggedLink=a}},isDragOutStarted:{get:function(){return this.Hb},set:function(a){this.Hb=a}},startPoint:{get:function(){return this.Fr},set:function(a){this.Fr.D(a)||this.Fr.assign(a)}},delay:{get:function(){return this.Ik},set:function(a){this.Ik=a}}}),ns.prototype.getDraggingSource=ns.prototype.Az;var gt=null,Pt=null;ns.className="DraggingTool",ku=new Bn,Ri("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Wo.prototype.doCancel=function(){gt!==null&>.doCancel(),Gr.prototype.doCancel.call(this)};function Lt(){Gr.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Vn,y=new hr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new hr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new ri,y=new hr,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 ri,y=new hr,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 ci,this.Of=this.gj=this.Pf=null}nt(Lt,Gr),Lt.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},Lt.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var te=y.Df(),ne=Qn.alloc();ne.width=y.naturalBounds.width*te,ne.height=y.naturalBounds.height*te,b.desiredSize=ne,Qn.free(ne),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Fr,te=Tt.alloc(),x.location=y.ga(Fr,te),Tt.free(te),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},Lt.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=eo,y.fromSpot=ms,y.toSpot=ms),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},Lt.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},Lt.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof ri){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)}},Lt.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof ri))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof ri)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},Lt.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(Fe){return E.findValidLinkablePort(Fe,a)},null,!0);for(b=1/0,y=null,te=te.iterator;te.next();){var ne=te.value,ae=ne.part;if(ae instanceof ri){var fe=ne.ga(Fr,Tt.alloc()),_e=x.x-fe.x,Me=x.y-fe.y;Tt.free(fe),fe=_e*_e+Me*Me,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 ri&&(x.layer===null||x.layer.allowLink))?y:null},Lt.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},Lt.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},Lt.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},Lt.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof ri))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof ri))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},Lt.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)},Lt.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),Sn(this,x,y,b)};function Sn(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),Sn(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),Sn(a,y.labeledLink,x,b))))}Lt.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!hn(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!hn(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!hn(this,a,y,x,!1);if(b===rg)return a===y?a=!0:(b=new In,b.add(y),a=mn(this,b,a,y,x)),!a}return!0};function hn(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&&hn(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 mn(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&&mn(a,y,ae,b,E))return!0}}return!1}Je.Object.defineProperties(Lt.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}}}),Lt.className="LinkingBaseTool";function vn(){Lt.call(this),this.name="Linking",this.V={},this.F=null,this.K=wn,this.Xd=null}nt(vn,Lt),vn.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},vn.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 ri)))return null;var x=this.direction;if(x===wn||x===zn){var b=this.findValidLinkablePort(y,!1);if(b!==null||this.startObject===a&&(b=a.port,this.findValidLinkablePort(b,!1)))return this.isForwards=!0,b}return(x===wn||x===ni)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},vn.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 ri&&(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 ri&&(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)},vn.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()},vn.prototype.doStop=function(){Lt.prototype.doStop.call(this),this.startObject=null},vn.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 ri&&(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)}}},vn.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Vn)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)},vn.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},vn.prototype.doNoLink=function(){},Je.Object.defineProperties(vn.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 wn=new _n(vn,"Either",0),zn=new _n(vn,"ForwardsOnly",0),ni=new _n(vn,"BackwardsOnly",0);vn.className="LinkingTool",vn.Either=wn,vn.ForwardsOnly=zn,vn.BackwardsOnly=ni;function Wn(){Lt.call(this),this.name="Relinking";var a=new hr;a.figure="Diamond",a.desiredSize=Bo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new hr,a.figure="Diamond",a.desiredSize=Bo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new Tn}nt(Wn,Lt),Wn.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Vn){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)}},Wn.prototype.makeAdornment=function(a,y){var x=new Qr;return x.type=Gn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Wn.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},Wn.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 Vn))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=ir),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=ir),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},Wn.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===bp||x===Fh)&&(x=ol),y.curve=x,y.curviness=a.curviness,y.isTreeLink=a.isTreeLink,y.points=a.points,y.routing=a.routing,y.smoothness=a.smoothness,y.fromSpot=a.fromSpot,y.fromEndSegmentLength=a.fromEndSegmentLength,y.fromShortLength=a.fromShortLength,y.toSpot=a.toSpot,y.toEndSegmentLength=a.toEndSegmentLength,y.toShortLength=a.toShortLength}},Wn.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()},Wn.prototype.doStop=function(){Lt.prototype.doStop.call(this),this.handle=null},Wn.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 ri&&(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()}}},Wn.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},Wn.prototype.doNoRelink=function(){};function wi(a,y,x,b,E){y!==null?(a.copyPortProperties(y,x,a.temporaryFromNode,a.temporaryFromPort,!1),a.diagram.add(a.temporaryFromNode)):a.diagram.remove(a.temporaryFromNode),b!==null?(a.copyPortProperties(b,E,a.temporaryToNode,a.temporaryToPort,!0),a.diagram.add(a.temporaryToNode)):a.diagram.remove(a.temporaryToNode)}Je.Object.defineProperties(Wn.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}}}),Wn.className="RelinkingTool",Ri("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),Ri("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function Zn(){Gr.call(this),this.name="LinkReshaping";var a=new hr;a.figure="Rectangle",a.desiredSize=Ro,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new hr,a.figure="Diamond",a.desiredSize=Bo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new Tt,this.Yq=new Bn}nt(Zn,Gr),Zn.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:si},Zn.prototype.om=function(a,y){a.reshapingBehavior=y},Zn.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Vn){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)}},Zn.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=Gn.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);nn.B(fe.x,_e.x)&&nn.B(fe.y,_e.y)&&(_e=y.i(x-1)),nn.B(fe.x,_e.x)?(this.om(ae,Ni),ae.cursor="n-resize"):nn.B(fe.y,_e.y)&&(this.om(ae,Oi),ae.cursor="w-resize")}else ne===te-1&&b?(fe=y.i(te-1),_e=y.i(te),nn.B(fe.x,_e.x)&&nn.B(fe.y,_e.y)&&(fe=y.i(te+1)),nn.B(fe.x,_e.x)?(this.om(ae,Ni),ae.cursor="n-resize"):nn.B(fe.y,_e.y)&&(this.om(ae,Oi),ae.cursor="w-resize")):ne!==te&&(this.om(ae,Ui),ae.cursor="move");E.add(ae)}E.adornedObject=a}return E},Zn.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},Zn.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},Zn.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},Zn.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 Vn){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}}},Zn.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},Zn.prototype.stopTransaction=function(){var a=this.diagram,y=Gr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Zn.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},Zn.prototype.getResegmentingPoint=function(){return this.handle.ga(Fr)},Zn.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},Zn.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.computeReshape(a.lastInput.documentPoint);if(this.reshape(y),y=this.adornedLink,y!==null&&y.resegmentable){var x=this.handle.segmentIndex,b=y.i(x-1),E=y.i(x),te=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var ne=y.i(x-2);if(Math.abs(b.x-E.x)<this.resegmentingDistance&&Math.abs(b.y-E.y)<this.resegmentingDistance&&(gi(this,ne,b,E,te,!0)||gi(this,ne,b,E,te,!1))){var ae=y.points.copy();gi(this,ne,b,E,te,!0)?(ae.cd(x-2,new Tt(ne.x,(te.y+ne.y)/2)),ae.cd(x+1,new Tt(te.x,(te.y+ne.y)/2))):(ae.cd(x-2,new Tt((te.x+ne.x)/2,ne.y)),ae.cd(x+1,new Tt((te.x+ne.x)/2,te.y))),ae.mb(x),ae.mb(x-1),y.points=ae,y.Wb()}else ne=y.i(x+2),Math.abs(E.x-te.x)<this.resegmentingDistance&&Math.abs(E.y-te.y)<this.resegmentingDistance&&(gi(this,b,E,te,ne,!0)||gi(this,b,E,te,ne,!1))&&(ae=y.points.copy(),gi(this,b,E,te,ne,!0)?(ae.cd(x-1,new Tt(b.x,(b.y+ne.y)/2)),ae.cd(x+2,new Tt(ne.x,(b.y+ne.y)/2))):(ae.cd(x-1,new Tt((b.x+ne.x)/2,b.y)),ae.cd(x+2,new Tt((b.x+ne.x)/2,ne.y))),ae.mb(x+1),ae.mb(x),y.points=ae,y.Wb())}}else ne=Tt.alloc(),nn.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()),Tt.free(ne)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function gi(a,y,x,b,E,te){return te?Math.abs(y.y-x.y)<a.resegmentingDistance&&Math.abs(x.y-b.y)<a.resegmentingDistance&&Math.abs(b.y-E.y)<a.resegmentingDistance:Math.abs(y.x-x.x)<a.resegmentingDistance&&Math.abs(x.x-b.x)<a.resegmentingDistance&&Math.abs(b.x-E.x)<a.resegmentingDistance}Zn.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===Ni?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===Oi&&(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===Ni?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===Oi&&(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);nn.B(te.x,E.x)&&nn.B(E.y,ne.y)?(nn.B(te.x,y.i(b-2).x)&&!nn.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),nn.B(ne.y,y.i(b+2).y)&&!nn.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)):nn.B(te.y,E.y)&&nn.B(E.x,ne.x)?(nn.B(te.y,y.i(b-2).y)&&!nn.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),nn.B(ne.x,y.i(b+2).x)&&!nn.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):nn.B(te.x,E.x)&&nn.B(E.x,ne.x)?(nn.B(te.x,y.i(b-2).x)&&!nn.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),nn.B(ne.x,y.i(b+2).x)&&!nn.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):nn.B(te.y,E.y)&&nn.B(E.y,ne.y)&&(nn.B(te.y,y.i(b-2).y)&&!nn.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),nn.B(ne.y,y.i(b+2).y)&&!nn.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,Tt.alloc()),b=y.getLinkPointFromPoint(b,E,te,a,!0,Tt.alloc()),y.L(0,b.x,b.y),Tt.free(te),Tt.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,Tt.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,Tt.alloc()),y.L(y.pointsCount-1,a.x,a.y),Tt.free(x),Tt.free(a));y.zf()},Zn.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case Ui:return a;case Ni:return new Tt(y.i(x).x,a.y);case Oi:return new Tt(a.x,y.i(x).y);default:case si:return y.i(x)}},Je.Object.defineProperties(Zn.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}}}),Zn.prototype.setReshapingBehavior=Zn.prototype.om,Zn.prototype.getReshapingBehavior=Zn.prototype.Ru;var si=new _n(Zn,"None",0),Oi=new _n(Zn,"Horizontal",1),Ni=new _n(Zn,"Vertical",2),Ui=new _n(Zn,"All",3);Zn.className="LinkReshapingTool",Zn.None=si,Zn.Horizontal=Oi,Zn.Vertical=Ni,Zn.All=Ui,Ri("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function ki(){Gr.call(this),this.name="Resizing",this.o=new Qn(1,1).freeze(),this.j=new Qn(9999,9999).freeze(),this.yg=new Qn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new hr;a.alignmentFocus=Fr,a.figure="Rectangle",a.desiredSize=Ro,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new Tt,this.Dw=new Qn,this.Tn=new Tt,this.rt=new Qn(0,0),this.qt=new Qn(1/0,1/0),this.pt=new Qn(1,1)}nt(ki,Gr),ki.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Vn)){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)}},ki.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Qr,y.type=Gn.Spot,y.locationSpot=Fr;var x=new rl;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Xs)),y.add(this.makeHandle(a,wl)),y.add(this.makeHandle(a,Na)),y.add(this.makeHandle(a,Ia)),y.add(this.makeHandle(a,bs)),y.add(this.makeHandle(a,Zs)),y.add(this.makeHandle(a,Ks)),y.add(this.makeHandle(a,ks))}else if(Ru(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},ki.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},ki.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 Gn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},ki.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},ki.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))},ki.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},ki.prototype.stopTransaction=function(){var a=this.diagram,y=Gr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ki.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},ki.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,Tt.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),a.bd(),Tt.free(E)}},ki.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,Tt.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),Tt.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},ki.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 er){var b=new Bn;if(b.add(a),!this.dragsMembers&&a.placeholder===null){var E=new pe;E.dragsMembers=!1}y.moveParts(b,this.oppositePoint.copy().re(x),!0,E)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},ki.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,Me=ne.y+ne.height,Fe=1;if(!te){Fe=ne.width;var Ye=ne.height;0>=Fe&&(Fe=1),0>=Ye&&(Ye=1),Fe=Ye/Fe}return Ye=Tt.alloc(),nn.No(a.x,a.y,ae,fe,E.width,E.height,Ye),a=ne.copy(),0>=y.x?0>=y.y?(a.x=Math.max(Ye.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(Ye.y,Me-b.height),a.y=Math.min(a.y,Me-x.height),a.height=Math.max(Me-a.y,x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Fe*a.width,b.height),x.height),a.width=a.height/Fe):(a.width=Math.max(Math.min(a.height/Fe,b.width),x.width),a.height=Fe*a.width),a.x=_e-a.width,a.y=Me-a.height)):1<=y.y?(a.x=Math.max(Ye.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(Ye.y-fe,b.height),x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Fe*a.width,b.height),x.height),a.width=a.height/Fe):(a.width=Math.max(Math.min(a.height/Fe,b.width),x.width),a.height=Fe*a.width),a.x=_e-a.width)):(a.x=Math.max(Ye.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(Fe*a.width,b.height),x.height),a.width=a.height/Fe,a.y=fe+.5*(Me-fe-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(Ye.x-ae,b.width),x.width),a.y=Math.max(Ye.y,Me-b.height),a.y=Math.min(a.y,Me-x.height),a.height=Math.max(Me-a.y,x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Fe*a.width,b.height),x.height),a.width=a.height/Fe):(a.width=Math.max(Math.min(a.height/Fe,b.width),x.width),a.height=Fe*a.width),a.y=Me-a.height)):1<=y.y?(a.width=Math.max(Math.min(Ye.x-ae,b.width),x.width),a.height=Math.max(Math.min(Ye.y-fe,b.height),x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Fe*a.width,b.height),x.height),a.width=a.height/Fe):(a.width=Math.max(Math.min(a.height/Fe,b.width),x.width),a.height=Fe*a.width))):(a.width=Math.max(Math.min(Ye.x-ae,b.width),x.width),te||(a.height=Math.max(Math.min(Fe*a.width,b.height),x.height),a.width=a.height/Fe,a.y=fe+.5*(Me-fe-a.height))):0>=y.y?(a.y=Math.max(Ye.y,Me-b.height),a.y=Math.min(a.y,Me-x.height),a.height=Me-a.y,te||(a.width=Math.max(Math.min(a.height/Fe,b.width),x.width),a.height=Fe*a.width,a.x=ae+.5*(_e-ae-a.width))):1<=y.y&&(a.height=Math.max(Math.min(Ye.y-fe,b.height),x.height),te||(a.width=Math.max(Math.min(a.height/Fe,b.width),x.width),a.height=Fe*a.width,a.x=ae+.5*(_e-ae-a.width))),Tt.free(Ye),a},ki.prototype.computeReshape=function(){var a=jn;return this.adornedObject instanceof hr&&(a=_v(this.adornedObject)),!(a===mi||this.diagram.lastInput.shift)},ki.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},ki.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},ki.prototype.computeCellSize=function(){var a=new Qn(NaN,NaN),y=this.adornedObject.part;return y!==null&&(y=y.resizeCellSize,!isNaN(y.width)&&0<y.width&&(a.width=y.width),!isNaN(y.height)&&0<y.height&&(a.height=y.height)),y=this.cellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height),y=this.diagram,(isNaN(a.width)||isNaN(a.height))&&y&&(y=y.grid,y!==null&&y.visible&&this.isGridSnapEnabled&&(y=y.gridCellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height))),(isNaN(a.width)||a.width===0||a.width===1/0)&&(a.width=1),(isNaN(a.height)||a.height===0||a.height===1/0)&&(a.height=1),a},Je.Object.defineProperties(ki.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}}}),ki.className="ResizingTool",Ri("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Ai(){Gr.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Tt,this.ue=null;var a=new hr;a.figure="Ellipse",a.desiredSize=Bo,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new Tt(NaN,NaN),this.u=0,this.F=50}nt(Ai,Gr),Ai.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)}},Ai.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new Qr,y.type=Gn.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},Ai.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},Ai.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)},Ai.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)},Ai.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)},Ai.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Tt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Ai.prototype.stopTransaction=function(){var a=this.diagram,y=Gr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ai.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Ai.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Ai.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()},Ai.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()}},Ai.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},Je.Object.defineProperties(Ai.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}}}),Ai.className="RotatingTool",Ri("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function rr(){Gr.call(this),this.name="ClickSelecting"}nt(rr,Gr),rr.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},rr.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},rr.className="ClickSelectingTool";function ti(){Gr.call(this),this.name="Action",this.pk=null}nt(ti,Gr),ti.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,y=a.lastInput,x=a.ic(y.documentPoint,function(b){for(;b.panel!==null&&!b.isActionable;)b=b.panel;return b});return x!==null&&x.isActionable?(this.pk=x,a.Ck=a.ic(y.documentPoint,null,null),!0):!1},ti.prototype.doMouseDown=function(){if(this.isActive){var a=this.diagram.lastInput,y=this.pk;y!==null&&(a.targetObject=y,y.actionDown!==null&&y.actionDown(a,y))}else this.canStart()&&this.doActivate()},ti.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram.lastInput,y=this.pk;y!==null&&(a.targetObject=y,y.actionMove!==null&&y.actionMove(a,y))}},ti.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram.lastInput,y=this.pk;if(y===null)return;a.targetObject=y,y.actionUp!==null&&y.actionUp(a,y),this.standardMouseClick(function(x){for(;x.panel!==null&&(!x.isActionable||x!==y);)x=x.panel;return x},function(x){return x===y})}this.stopTool()},ti.prototype.doCancel=function(){var a=this.diagram.lastInput,y=this.pk;y!==null&&(a.targetObject=y,y.actionCancel!==null&&y.actionCancel(a,y),this.stopTool())},ti.prototype.doStop=function(){this.pk=null},ti.className="ActionTool";function ji(){Gr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Tt(0,0)}nt(ji,Gr),ji.prototype.canStart=function(){if(!this.isEnabled||this.archetypeNodeData===null)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.lastInput.left||this.isBeyondDragSize())return!1;if(this.isDoubleClick){if(a.lastInput.clickCount===1&&(this.mw=a.lastInput.viewPoint.copy()),a.lastInput.clickCount!==2||this.isBeyondDragSize(this.mw))return!1}else if(a.lastInput.clickCount!==1)return!1;return!(a.currentTool!==this&&a.Ol(a.lastInput.documentPoint,!0)!==null)},ji.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},ji.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var b=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof Ti)x.Zc()&&(Ru(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);qt(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var te=Tt.allocAt(a.x,a.y);this.isGridSnapEnabled&&Jf(this.diagram,b,a,te),b.location=te,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),Tt.free(te)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},Je.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(){Gr.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Ti;a.layerName="Tool",a.selectable=!1;var y=new hr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}nt(Li,Gr),Li.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(!a.allowSelect)return!1;var y=a.lastInput;return!(!y.left||a.currentTool!==this&&(!this.isBeyondDragSize()||y.timestamp-a.firstInput.timestamp<this.delay||a.Ol(y.documentPoint,!0)!==null))},Li.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},Li.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},Li.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive&&this.box!==null){var y=this.computeBoxBounds(),x=this.box.fb("SHAPE");x===null&&(x=this.box.Pb());var b=Qn.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),Qn.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Li.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;a.remove(this.box);try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),this.selectInRect(this.computeBoxBounds()),a.R("ChangedSelection",a.selection)}finally{a.currentCursor=""}}this.stopTool()},Li.prototype.computeBoxBounds=function(){var a=this.diagram;return new 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),Cr?x.meta:x.control)if(x.shift)for(a=a.iterator;a.next();)y=a.value,y.isSelected&&(y.isSelected=!1);else for(a=a.iterator;a.next();)y=a.value,y.isSelected=!y.isSelected;else if(x.shift)for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0);else{for(x=new Bn,y=y.selection.iterator;y.next();){var b=y.value;a.contains(b)||x.add(b)}for(y=x.iterator;y.next();)y.value.isSelected=!1;for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0)}},Je.Object.defineProperties(Li.prototype,{delay:{get:function(){return this.Ik},set:function(a){this.Ik=a}},isPartialInclusion:{get:function(){return this.o},set:function(a){this.o=a}},box:{get:function(){return this.j},set:function(a){this.j=a}}}),Li.className="DragSelectingTool";function bi(){Gr.call(this),this.name="Panning",this.Xt=new Tt,this.xy=new Tt,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(Et.document,"scroll",a.Kw,!1),a.stopTool()}}nt(bi,Gr),bi.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!(!a.allowHorizontalScroll&&!a.allowVerticalScroll||!a.lastInput.left||a.currentTool!==this&&!this.isBeyondDragSize())},bi.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(Et.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},bi.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},bi.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},bi.prototype.doMouseMove=function(){this.move()},bi.prototype.doMouseUp=function(){this.move(),this.stopTool()},bi.prototype.move=function(){var a=this.diagram;if(this.isActive&&a)if(this.xg)a.lastInput.bubbles=!0;else{var y=a.position,x=a.firstInput.documentPoint,b=a.lastInput.documentPoint,E=y.x+x.x-b.x;x=y.y+x.y-b.y,a.allowHorizontalScroll||(E=y.x),a.allowVerticalScroll||(x=y.y),a.position=this.xy.h(E,x)}},Je.Object.defineProperties(bi.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),bi.className="PanningTool",Ri("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),Ri("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),Ri("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),Ri("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),Ri("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function $i(){this.F=this.u=this.j=this.o=null}Je.Object.defineProperties($i.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}}}),$i.className="HTMLInfo";function pi(a,y,x){this.text=a,this.hx=y,this.visible=x}pi.className="ContextMenuButtonInfo";function sr(){Gr.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new Tt,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}nt(sr,Gr);function Yi(a){var y=new $i;y.show=function(E,te,ne){ne.showDefaultContextMenu()},y.hide=function(E,te){te.hideDefaultContextMenu()},So=y,a.tu=function(){a.stopTool()},y=rn("div");var x=rn("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=rn("style");Et.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",Ci,!1),b.addEventListener(y,"selectstart",Ci,!1),b.addEventListener(x,"contextmenu",Ci,!1)),y.className="goCXforeground",x.className="goCXbackground",Et.document.body&&(Et.document.body.appendChild(y),Et.document.body.appendChild(x)),so=y,is=x,Co=!0}function Ci(a){return a.preventDefault(),!1}sr.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)},sr.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},sr.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},sr.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof fn||(a instanceof Qt?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},sr.prototype.doActivate=function(){},sr.prototype.doMouseDown=function(){if(Gr.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof Qr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&Gi(this)},sr.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof Qr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}Gi(this)};function Gi(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof $i||(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())}sr.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 Qt?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()}}sr.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},sr.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 $i&&a.show(y,x,this);this.currentContextMenu=a},sr.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}},sr.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 $i&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function qi(a){var y=new Bn;return y.add(new pi("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new pi("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new pi("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new pi("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new pi("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new pi("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new pi("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new pi("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new pi("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new pi("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new pi("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new pi("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new pi("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}sr.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=qi(this)),so.innerHTML="",is.addEventListener("pointerdown",this.tu,!1);var y=this,x=rn("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=rn("li"),te.className="goCXli";var ne=rn("a");ne.className="goCXa",ne.href="#",ne.ky=E.hx,ne.addEventListener("pointerdown",function(ae){return this.ky(a),y.stopTool(),ae.preventDefault(),!1},!1),ne.textContent=E.text,te.appendChild(ne),x.appendChild(te)}}so.style.display="block",is.style.display="block"},sr.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===So){so.style.display="none",is.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(is,"pointerdown",this.tu,!1),this.currentContextMenu=null}},Je.Object.defineProperties(sr.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof Qr?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Co===!1&&So===null&&ys&&Yi(this),So},set:function(a){a===null&&(Co=!0),So=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var So=null,Co=!1,is=null,so=null;sr.className="ContextMenuTool",Ri("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function Tr(){Gr.call(this),this.name="TextEditing",this.Zh=new Mo,this.ia=null,this.V=br,this.vj=null,this.qa=Lr,this.u=1,this.F=!0,this.o=null,this.j=new $i,this.kt=null,No(this,this.j)}nt(Tr,Gr);function No(a,y){if(ys){var x=rn("textarea");a.kt=x,x.addEventListener("input",function(){if(a.textBlock!==null){var b=a.Lx(this.value);this.style.width=20+b.measuredBounds.width*this.wA+"px",this.rows=b.lineCount}},!1),x.addEventListener("keydown",function(b){if(!b.isComposing&&a.textBlock!==null){var E=b.key;E==="Enter"?(a.textBlock.isMultiline===!1&&b.preventDefault(),a.acceptText(Er)):E==="Tab"?(a.acceptText(Wr),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Lr){var b=a.kt;a.qa===ho&&(a.qa=Zo),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Lr){var b=a.kt;typeof b.focus=="function"&&b.focus(),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),y.valueFunction=function(){return x.value},y.mainElement=x,y.show=function(b,E,te){if(b instanceof Mo&&te instanceof Tr)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 Me=b.naturalBounds.width*_e+6,Fe=b.naturalBounds.height*_e+2,Ye=(ne.x-ae.x)*fe;ne=(ne.y-ae.y)*fe,ae=b.verticalAlignment,fe=(b.lineHeight+b.spacingAbove+b.spacingBelow)*b.lineCount*_e,Fe=ae.y*Fe-ae.y*fe+ae.offsetY-(.5*Fe-.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=Me+"px",x.style.left=(Ye-Me/2|0)-1+"px",x.style.top=(ne+Fe|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)}}}Tr.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||Cs&&Cs!==this&&(Cs.acceptText(rs),Cs&&Cs!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Mo&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===br&&!y.isSelected||this.starting===ao&&2>a.lastInput.clickCount)):!1},Tr.prototype.doStart=function(){Cs=this,this.textBlock!==null&&this.doActivate()},Tr.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(a!==null){var y=this.textBlock;if(y===null&&(y=a.ic(a.lastInput.documentPoint)),y!==null&&y instanceof Mo&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=ho;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new Tn(this.textBlock.ga(Xs),this.textBlock.ga(Na));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},Tr.prototype.doCancel=function(){this.stopTool()},Tr.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Tr.prototype.doMouseDown=function(){this.isActive&&this.acceptText(rs)},Tr.prototype.acceptText=function(a){switch(a){case rs:this.qa===Io?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===ho||this.qa===Jr||this.qa===Zo)&&(this.qa=Ko,Ar(this));break;case Yr:case Er:case Wr:(Er!==a||this.textBlock.isMultiline!==!0)&&(this.qa===ho||this.qa===Jr||this.qa===Zo)&&(this.qa=Ko,Ar(this))}};function Ar(a){var y=a.textBlock,x=a.diagram,b=a.currentTextEditor;if(y!==null&&b!==null){var E=y.text,te="";b.valueFunction!==null&&(te=b.valueFunction()),a.isValidText(y,E,te)?(a.Ea(a.name),a.qa=Io,a.transactionResult=a.name,y.text=te,a.doSuccess(E,te),x!==null&&x.R("TextEdited",y,E),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=Jr,a.doError(E,te))}}Tr.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)},Tr.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Tr.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Lr,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},Tr.prototype.doStop=function(){Cs=null},Tr.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)))},Tr.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Je.Object.defineProperties(Tr.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)}}}),Tr.prototype.measureTemporaryTextBlock=Tr.prototype.Lx;var Yr=new _n(Tr,"LostFocus",0),rs=new _n(Tr,"MouseDown",1),Wr=new _n(Tr,"Tab",2),Er=new _n(Tr,"Enter",3),Xr=new _n(Tr,"SingleClick",0),br=new _n(Tr,"SingleClickSelected",1),ao=new _n(Tr,"DoubleClick",2),Lr=new _n(Tr,"StateNone",0),ho=new _n(Tr,"StateActive",1),Zo=new _n(Tr,"StateEditing",2),Ko=new _n(Tr,"StateValidating",3),Jr=new _n(Tr,"StateInvalid",4),Io=new _n(Tr,"StateValidated",5),Cs=null;Tr.className="TextEditingTool",Tr.LostFocus=Yr,Tr.MouseDown=rs,Tr.Tab=Wr,Tr.Enter=Er,Tr.SingleClick=Xr,Tr.SingleClickSelected=br,Tr.DoubleClick=ao,Tr.StateNone=Lr,Tr.StateActive=ho,Tr.StateEditing=Zo,Tr.StateValidating=Ko,Tr.StateInvalid=Jr,Tr.StateValidated=Io,Ri("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Lo(a){jl||(_l(),jl=!0),this.H=ac,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=cu,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new In,this.ce=new gs,this.ce.Yd=this,this.Ei=new In,this.pu=new In,this.Sr=new In,this.pr=new In,a&&Object.assign(this,a)}Lo.prototype.Xe=function(a){this.H=a},Lo.prototype.canStart=function(){return!0};function Jo(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),ba(a.H),a.zb=!0)}function Ss(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===cu?(y.isViewportUnconstrained=!0,y.vc.clear(),y.add(x,"position",x.position.copy().offset(0,-200),x.position),y.add(x,"opacity",0,1)):a.Pk===Jl&&y.vc.clear(),a.Qw=!!(a.Pk===hu&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),b&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),Ra(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==$a&&b!==null&&(delete b.start.scale,delete b.end.scale),Et.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Ba(x),Bd(x),a.zb=!1,y.start(),y.bc&&(xs(a),x.Ya(),_c(y,0),fl(x,!0),Ts(a),x.R("AnimationStarting",a)))}))}}function Js(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function Pl(a,y,x,b){a.isTicking||Js(a)||y instanceof Vn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}ot=Lo.prototype,ot.fv=function(a){return this.ce.fv(a)},ot.Xu=function(a){return this.ce.Xu(a)};function Qo(a,y){function x(){if(0<E.Sr.count&&(b.addAll(E.Sr),E.Sr.clear(),E.bc=!0),E.bc!==!1&&b.count!==0){E.pu.addAll(b);for(var te=E.pu.iterator;te.next();){var ne=te.value;if(ne.bc!==!1){e:if(0<ne.yl.count)var ae=!0;else{for(ae=ne.vc.iterator;ae.next();){var fe=ae.key;if(fe instanceof Qt&&fe.diagram!==null||fe instanceof fn){ae=!0;break e}}ae=!1}ae?Ql(ne,!1):ne.Xk=!0}}E.pu.clear(),E.bc!==!1&&(xs(E),fl(E.H),Ts(E)),Et.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),Et.requestAnimationFrame(function(){x()}))}function qo(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function xs(a){if(!a.vq){var y=a.H;a.Ow=y.skipsUndoManager,a.cw=y.skipsModelSourceBindings,y.skipsUndoManager=!0,y.skipsModelSourceBindings=!0,a.vq=!0}}function Ts(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}ot.Cc=function(a){var y=this.ce;if(this.zb===!0&&(this.Ok=this.zb=!1,this.Zd.clear(),0<y.vc.count&&this.H.$b()),this.bc){if(y.Ml(!0),y.vc.clear(),Ra(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),Ra(y,this.H)},ot.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))},ot.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),As(this,a))},ot.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),oa(this.ce,y,"position",y.position,y.position),As(this,a))};function ma(a,y,x){!a.zb||y.D(x)||Js(a)||(a.H.pi||(y=x.copy()),oa(a.ce,a.H,"position",y,x))}function jo(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function As(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function La(a,y,x,b,E){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var te=a[0],ne=a[1],ae=a[2];a=a[3];var fe=y[0],_e=y[1],Me=y[2];return y=y[3],ae===0||ae===100?(te=fe,ne=_e):(Me===0||Me===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,Me-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 Tt(te(ne,b.x,E.x-b.x,ae),te(ne,b.y,E.y-b.y,ae))}var y=new ci;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,b,E,te,ne,ae){ne<ae?x.mm(te(ne,b.x,E.x-b.x,ae),te(ne,b.y,E.y-b.y,ae),!1):x.position=new Tt(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 Tt(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 Tt(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 Tt(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=La(b,E,ne,ae,te)}),y.add("stroke",function(x,b,E,te,ne,ae){x.stroke=La(b,E,ne,ae,te)}),y.add("strokeWidth",function(x,b,E,te,ne,ae){x.strokeWidth=te(ne,b,E-b,ae)}),y.add("strokeDashOffset",function(x,b,E,te,ne,ae){x.strokeDashOffset=te(ne,b,E-b,ae)}),y.add("background",function(x,b,E,te,ne,ae){x.background=La(b,E,ne,ae,te)}),y.add("areaBackground",function(x,b,E,te,ne,ae){x.areaBackground=La(b,E,ne,ae,te)}),y.add("opacity",function(x,b,E,te,ne,ae){x.opacity=te(ne,b,E-b,ae)}),y.add("scale",function(x,b,E,te,ne,ae){x.scale=te(ne,b,E-b,ae)}),y.add("angle",function(x,b,E,te,ne,ae){x.angle=te(ne,b,E-b,ae)}),Xl=y}Je.Object.defineProperties(Lo.prototype,{animationReasons:{get:function(){return this.Zd}},isEnabled:{get:function(){return this.Jd},set:function(a){(this.Jd=a)&&this.Ei.each(function(y){y.isAnimating||y.runCount!==1/0||y.start()})}},duration:{get:function(){return this.Dg},set:function(a){1>a&&En(a,">= 1",Lo,"duration"),this.Dg=a}},isAnimating:{get:function(){return this.bc}},isTicking:{get:function(){return this.vq}},isInitial:{get:function(){return this.Gh},set:function(a){this.Gh=a}},defaultAnimation:{get:function(){return this.ce}},activeAnimations:{get:function(){return this.Ei}},initialAnimationStyle:{get:function(){return this.Pk},set:function(a){this.Pk=a}}}),Lo.prototype.stopAnimation=Lo.prototype.Cc;var Xl=null,jl=!1,cu=new _n(Lo,"Default",1),hu=new _n(Lo,"AnimateLocations",2),Jl=new _n(Lo,"None",3);Lo.className="AnimationManager",Lo.defineAnimationEffect=function(a,y){jl||(_l(),jl=!0),Xl.add(a,y)},Lo.Default=cu,Lo.AnimateLocations=hu,Lo.None=Jl;function gs(a){this.vu=this.Nw=this.Yd=this.H=null,this.Xk=this.bc=this.j=!1,this.cn=this.Qd=0,this.Lp=this.ot=du,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Ur,this.vc=new ci,this.Tt=new ci,this.yl=new In,this.Ut=new In,this.dw=Th,a&&Object.assign(this,a)}gs.prototype.suspend=function(){this.Xk=!0},gs.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,Ql(this,!0),xs(this.Yd),fl(this.H),Ts(this.Yd),this.H.redraw()};function Ra(a,y){if(a.Tt.clear(),a.Wk=!1,a.au=0,a.Gd=NaN,0<a.yl.count&&a.yl.clear(),0<a.Ut.count&&a.Ut.clear(),y!==null)for(a=y.links;a.next();)a.value.Tg=null}ot=gs.prototype,ot.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 fn?a=x:x instanceof Qt&&(a=x.diagram))}if(a!==null)this.H=a,this.Yd=a.animationManager;else return this;return y=this.Yd,y.isEnabled===!1?this:(this.Gd=isNaN(this.Dg)?y.duration:this.Dg,this.Lp=this.ot,y.Ok&&y.Pk===cu&&this===y.defaultAnimation&&(this.Lp=Zu,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=Cf),xs(y),this.yl.each(function(b){b.data=null,a.add(b)}),Ts(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Qo(y,this),this)},ot.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},ot.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof fn?this.H=a:a instanceof Qt&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Ti){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return oa(this,a,y,x,b,E),this};function oa(a,y,x,b,E,te){var ne=a.vc;if(y instanceof fn&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(uh(b),av(),b=[ru.j,ru.u,ru.o,ru.F],uh(E),av(),E=[ru.j,ru.u,ru.o,ru.F]),ne.contains(y)){var ae=ne.I(y),fe=ae.start,_e=ae.end;fe[x]===void 0&&(fe[x]=Ns(b)),_e[x]=Ns(E)}else fe={},_e={},fe[x]=Ns(b),_e[x]=Ns(E),ae=fe.position,y instanceof Qt&&ae instanceof Tt&&!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 Tt&&!ne.w()&&ne.assign(a.o),te&&x.indexOf("position:")===0&&y instanceof Ti?ae.Ku.location=Ns(y.location):te&&(ae.Ku[x]=Ns(b))}function Ns(a){return a instanceof Tt||a instanceof Qn?a.copy():a}ot.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},ot.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function Ql(a,y){if(!a.Xk||y){var x=a.Yd;if(a.bc!==!1){var b=+new Date,E=b>a.cn?a.Gd:b-a.Qd;y&&(E=a.gw,E<a.Gd?(a.Qd=+new Date-E,a.cn=a.Qd+a.Gd):E=a.Gd),xs(x),_c(a,E),fl(a.H,!0),Ts(x),b>a.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function _c(a,y){for(var x=a.Gd,b=a.vc.iterator,E=a.Wk;b.next();){var te=b.key;if(!(te instanceof Qt&&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)}}}ot.stop=function(){return this.bc?(this.Ml(!0),this):this},ot.Ml=function(a){if(this.vu!==null&&this.vu.jo.remove(this.Nw),this.bc){var y=this.H,x=this.Yd;this.Xk=this.bc=x.Ok=!1,xs(x);for(var b=this.vc,E=this.yl.iterator;E.next();)y.remove(E.value);for(E=this.Ut.iterator;E.next();)E.value.v();E=this.ho,b=b.iterator;for(var te=Xl;b.next();){var ne=b.key,ae=b.value,fe=E?ae.end:ae.start,_e=E?ae.start:ae.end,Me=ae.Ku,Fe;for(Fe in _e)if(te.get(Fe)!==null){var Ye=Fe;!ae.Hu||Ye!=="position:nodeCollapse"&&Ye!=="position:placeholder"||(Ye="position"),te.get(Ye)(ne,fe[Fe],Me[Fe]!==void 0?Me[Fe]:ae.Hu?fe[Fe]:_e[Fe],this.Lp,this.Gd,this.Gd,this)}ae.Hu&&Me.location!==void 0&&ne instanceof Ti&&(ne.location=Me.location),ae.nv&&ne instanceof Ti&&ne.Zb(!1)}if(y.As.clear(),nd(y,!1),y.Ya(),y.N(),fl(y,!0),x.defaultAnimation===this){for(Fe=x.pr.iterator;Fe.next();)E=Fe.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}fl(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Ts(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),Ra(this,null),x.Ml(this),y.$b())}},ot.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof er&&(b=y.placeholder),b!==null?(x=b.ga(Xs),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new Tt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof er)for(a=a.memberParts;a.next();)b=a.value,b instanceof ri&&this.Cj(b,y)},ot.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof er&&(x=y.placeholder),x!==null){var b=x.ga(Xs);x=x.padding,b.x+=x.left,b.y+=x.top,this.add(a,"position:placeholder",a.position,b,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),b=this.vc,b.contains(a)&&(b.I(a).nv=!0),a instanceof er)for(a=a.memberParts;a.next();)b=a.value,b instanceof ri&&this.Aj(b,y)}},ot.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Je.Object.defineProperties(gs.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&En(a,">= 1",gs,"duration"),this.Dg=a}},reversible:{get:function(){return this.ho},set:function(a){this.ho=a}},runCount:{get:function(){return this.cu},set:function(a){0<a?this.cu=a:At("Animation.runCount value must be a positive integer.")}},finished:{get:function(){return this.dn},set:function(a){this.dn!==a&&(this.dn=a)}},easing:{get:function(){return this.ot},set:function(a){this.ot=a}},isViewportUnconstrained:{get:function(){return this.j},set:function(a){this.j=a}},isAnimating:{get:function(){return this.bc}}}),gs.prototype.getTemporaryState=gs.prototype.Ez,gs.prototype.stop=gs.prototype.stop,gs.prototype.add=gs.prototype.add,gs.prototype.addTemporaryPart=gs.prototype.Iy;function du(a,y,x,b){return a/=b/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Zu(a,y,x,b){return a===b?y+x:x*(-Math.pow(2,-10*a/b)+1)+y}gs.className="Animation",gs.EaseLinear=function(a,y,x,b){return x*a/b+y},gs.EaseInOutQuad=du,gs.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},gs.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},gs.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},gs.EaseOutExpo=Zu;function sc(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}sc.className="AnimationState";function zl(a,y,x){this.xd=null,this.rf=a,this.so=x||js,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=wa))}zl.prototype.copy=function(){var a=new zl(this.rf);a.so=this.so;var y=this.uk;if(y!==null){var x={};y.duration!==void 0&&(x.duration=y.duration),y.finished!==void 0&&(x.finished=y.finished),y.easing!==void 0&&(x.easing=y.easing),a.uk=x}return a};function ls(a,y){a=a.uk,a!==null&&(a.duration&&(y.duration=a.duration),a.finished&&(y.finished=a.finished),a.easing&&(y.easing=a.easing))}Je.Object.defineProperties(zl.prototype,{propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},animationSettings:{get:function(){return this.uk},set:function(a){this.uk=a}},startCondition:{get:function(){return this.so},set:function(a){this.so=a}}});var js=new _n(zl,"Default",1),wa=new _n(zl,"Immediate",2),zs=new _n(zl,"Bundled",3);zl.className="AnimationTrigger",zl.Default=js,zl.Immediate=wa,zl.Bundled=zs;function os(a){pr(this),this.H=null,this.Pa=new Bn,this.xa="",this.pb=1,this.o=!1,this.j=this.Uh=this.u=this.Oi=this.Ni=this.Mi=this.Li=this.Ji=this.Ki=this.Ii=this.Qi=this.Hi=this.Pi=this.Gi=this.Fi=!0,this.Zq=[],a&&Object.assign(this,a)}ot=os.prototype,ot.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,za(x)}a.clear(),this.Zq.length=0},ot.Xe=function(a){this.H=a},ot.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 er?E++:fe instanceof ri?b++:fe instanceof Vn?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&&Or(b)&&(ae+=" #"+Or(b)),x instanceof ri?ae+=" "+hi(b):x instanceof Vn&&(ae+=" "+hi(x.fromNode)+" "+hi(x.toNode));return y+" "+this.Pa.count+": "+ae},ot.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=Tt.alloc(),te=this.Pa.s,ne=te.length;ne--;){var ae=te[ne];if((b!==!0||hd(ae)!==!1)&&ae.isVisible()&&(E.assign(a),cr(E,ae.oe),ae=ae.ic(E,y,x),ae!==null&&(y!==null&&(ae=y(ae)),ae!==null&&(x===null||x(ae)))))return Tt.free(E),ae}return Tt.free(E),null},ot.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof Bn||b instanceof In||(b=new In),this.Uh===!1)return b;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var te=Tt.alloc(),ne=this.Pa.s,ae=ne.length;ae--;){var fe=ne[ae];if((E!==!0||hd(fe)!==!1)&&fe.isVisible()){te.assign(a),cr(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 Tt.free(te),b},ot.Cf=function(a,y,x,b,E){if(y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof Bn||E instanceof In||(E=new In),this.Uh===!1)return E;var te=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(te=!0);for(var ne=this.Pa.s,ae=ne.length;ae--;){var fe=ne[ae];if((te!==!0||hd(fe)!==!1)&&fe.isVisible()){var _e=fe;fe.Cf(a,y,x,b,E)&&(y!==null&&(_e=y(_e)),_e===null||x!==null&&!x(_e)||E.add(_e))}}return E},ot.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 Me=_e;_e.Cf(a,y,x,b,E)&&(y!==null&&(Me=y(Me)),Me===null||x!==null&&!x(Me)||E.add(Me))}}return E},ot.og=function(a,y,x,b,E,te){if(x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof Bn||E instanceof In)&&(te=E),E=!0),te instanceof Bn||te instanceof In||(te=new In),this.Uh===!1)return te;var ne=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ne=!0);for(var ae=Tt.alloc(),fe=Tt.alloc(),_e=this.Pa.s,Me=_e.length;Me--;){var Fe=_e[Me];if((ne!==!0||hd(Fe)!==!1)&&Fe.isVisible()){ae.assign(a),cr(ae,Fe.oe),fe.h(a.x+y,a.y),cr(fe,Fe.oe);var Ye=Fe;Fe.og(ae,fe,x,b,E,te)&&(x!==null&&(Ye=x(Ye)),Ye===null||b!==null&&!b(Ye)||te.add(Ye))}}return Tt.free(ae),Tt.free(fe),te},ot.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=Hn();for(var E=Hn(),te=0;te<b;te++){var ne=x[te];if(ne.vw=te,ne instanceof Vn){if(ne.fd===!1)continue}else if(ne instanceof Qr&&ne.adornedPart!==null)continue;var ae=ne.actualBounds;ne.isVisible()&&Po(ae,y)?(ne.Fd(!0),a.push(ne)):(ne.Fd(!1),ne.adornments!==null&&0<ne.adornments.count&&E.push(ne))}for(y=0;y<a.length;y++)for(x=a[y],Rv(x),x=x.adornments;x.next();)b=x.value,b.measure(1/0,1/0),b.arrange(),b.Fd(!0);for(y=0;y<E.length;y++)Rv(E[y]);ei(a),ei(E)}}};function Ma(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}ot.gc=function(a,y,x){if(this.visible&&this.pb!==0&&(x===void 0&&(x=!0),x||!this.isTemporary)){x=this.Pa.s;var b=x.length;if(b!==0){if(a.isTemporary)for(var E=0;E<b;E++)x[E].Gj();E=Ma(this,a);var te=this.Zq;te.length=0;for(var ne=y.scale,ae=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=Ma(a,y),ae=a.Zq;ae.length=0;for(var fe=x.scale,_e=Tn.alloc(),Me=0;Me<te;Me++){var Fe=E[Me];b.contains(Fe)&&a.Oj(y,Fe,x,ae,fe,_e,!1)}Tn.free(_e),y.globalAlpha=ne}}}ot.Oj=function(a,y,x,b,E,te,ne){if(ne&&!hd(y))a.Hs(y);else{if(b!==null&&y instanceof Vn&&(y.isOrthogonal&&b.push(y),y.fd===!1)){a.Hs(y);return}for(ne=!1,b=y.containingGroup;b!==null;)ne?b.tb!==null&&te.Ex(b.tb):b.tb!==null&&(ne=!0,te.assign(b.tb)),b=b.containingGroup;var ae=y.actualBounds;if(b=!1,ne&&y.isVisible()){if(!te.Yc(ae)){a.Hs(y);return}b=!te.Re(ae)}b&&(a.save(),a instanceof Hl?a.bk=te.copy():(a.beginPath(),a.rect(te.x,te.y,te.width,te.height),a.clip())),ae.width*E>x.Oq||ae.height*E>x.Oq?y.gc(a,x):(E=y.actualBounds,te=y.naturalBounds,E.width===0||E.height===0||isNaN(E.x)||isNaN(E.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(ws(y,a,y.areaBackground,!0,!0,te,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(ws(y,a,"rgba(0,0,0,0.3)",!0,!1,te,E),a.fillRect(E.x,E.y,E.width,E.height)),y.background!==null&&(a.transform(x.m11,x.m12,x.m21,x.m22,x.dx,x.dy),ws(y,a,y.background,!0,!1,te,E),a.fillRect(0,0,te.width/2,te.height/2),x.ws()||(y=1/(x.m11*x.m22-x.m12*x.m21),a.transform(x.m22*y,-x.m12*y,-x.m21*y,x.m11*y,y*(x.m21*x.dy-x.m22*x.dx),y*(x.m12*x.dx-x.m11*x.dy)))))),b&&(a.restore(),a.Vc(!0))}},ot.g=function(a,y,x,b,E){var te=this.diagram;te!==null&&te.cb(Vo,a,this,y,x,b,E)},ot.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&za(y),a>=b.count)a=b.count;else if(b.M(a)===y)return-1;return b.Gb(a,y),y.Vo(x),b=this.diagram,b!==null&&(x?b.N():b.oi(y)),Nu(this,a,y),a},ot.pc=function(a,y,x){if(!x&&y.layer!==this&&y.layer!==null)return y.layer.pc(a,y,x);var b=this.Pa;if(0>a||a>=b.length){if(a=b.indexOf(y),0>a)return-1}else if(b.M(a)!==y&&(a=b.indexOf(y),0>a))return-1;return y.Wo(x),b.mb(a),b=this.diagram,b!==null&&(x?b.N():b.pc(y)),y.Ig=null,za(y),a};function Nu(a,y,x){if(y=mf(a,y,x),x instanceof er&&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}Je.Object.defineProperties(os.prototype,{parts:{get:function(){return this.Pa.iterator}},partsBackwards:{get:function(){return this.Pa.iteratorBackwards}},diagram:{get:function(){return this.H}},name:{get:function(){return this.xa},set:function(a){var y=this.xa;if(y!==a){var x=this.diagram;if(x!==null)for(y===""&&At("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&At("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)&&En(a,"0 <= value <= 1",os,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,a!==null&&a.N())}},isTemporary:{get:function(){return this.o},set:function(a){var y=this.o;y!==a&&((this.o=a)&&(this.isInDocumentBounds=!1),this.g("isTemporary",y,a))}},visible:{get:function(){return this.u},set:function(a){var y=this.u;if(y!==a){for(this.u=a,this.g("visible",y,a),y=this.Pa.iterator;y.next();)y.value.Zb(a);a=this.diagram,a!==null&&a.N()}}},pickable:{get:function(){return this.Uh},set:function(a){var y=this.Uh;y!==a&&(this.Uh=a,this.g("pickable",y,a))}},isInDocumentBounds:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a,this.diagram!==null&&this.diagram.Ya())}},allowCopy:{get:function(){return this.Fi},set:function(a){var y=this.Fi;y!==a&&(this.Fi=a,this.g("allowCopy",y,a))}},allowDelete:{get:function(){return this.Gi},set:function(a){var y=this.Gi;y!==a&&(this.Gi=a,this.g("allowDelete",y,a))}},allowTextEdit:{get:function(){return this.Pi},set:function(a){var y=this.Pi;y!==a&&(this.Pi=a,this.g("allowTextEdit",y,a))}},allowGroup:{get:function(){return this.Hi},set:function(a){var y=this.Hi;y!==a&&(this.Hi=a,this.g("allowGroup",y,a))}},allowUngroup:{get:function(){return this.Qi},set:function(a){var y=this.Qi;y!==a&&(this.Qi=a,this.g("allowUngroup",y,a))}},allowLink:{get:function(){return this.Ii},set:function(a){var y=this.Ii;y!==a&&(this.Ii=a,this.g("allowLink",y,a))}},allowRelink:{get:function(){return this.Ki},set:function(a){var y=this.Ki;y!==a&&(this.Ki=a,this.g("allowRelink",y,a))}},allowMove:{get:function(){return this.Ji},set:function(a){var y=this.Ji;y!==a&&(this.Ji=a,this.g("allowMove",y,a))}},allowReshape:{get:function(){return this.Li},set:function(a){var y=this.Li;y!==a&&(this.Li=a,this.g("allowReshape",y,a))}},allowResize:{get:function(){return this.Mi},set:function(a){var y=this.Mi;y!==a&&(this.Mi=a,this.g("allowResize",y,a))}},allowRotate:{get:function(){return this.Ni},set:function(a){var y=this.Ni;y!==a&&(this.Ni=a,this.g("allowRotate",y,a))}},allowSelect:{get:function(){return this.Oi},set:function(a){var y=this.Oi;y!==a&&(this.Oi=a,this.g("allowSelect",y,a))}}}),os.prototype.findObjectsNear=os.prototype.og,os.prototype.findObjectsIn=os.prototype.Cf,os.prototype.findObjectsAt=os.prototype.ji,os.prototype.findObjectAt=os.prototype.ic,os.className="Layer";function fn(a,y){if(hm||(Fa(),hm=!0),pr(this),ac=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,ys){var x=this,b=function(){x.removeEventListener(Et.document,"DOMContentLoaded",b,!1),x.setRTL()};Et.document.body!==null?this.setRTL():x.addEventListener(Et.document,"DOMContentLoaded",b,!1)}this.ol=null,rp.add("Model",mo);var E=this;return this.Hb=function(te){var ne=E.partManager;if(te.model===ne.diagram.model&&ne.diagram.aa){ne.diagram.aa=!1;try{var ae=te.change;te.modelChange===""&&ae===Vo&&ne.updateDataBindings(te.object,te.propertyName)}finally{ne.diagram.aa=!0}}},this.Oc=function(te){E.partManager.doModelChanged(te)},this.hu=this.ku=null,vf(this),this.model=hy(),this.Wg=!0,id(this),this.layout=new es,this.Wg=!1,this.ck=this.ek=this.fk=this.dk=this.ui=this.aA=this.$j=this.Ov=null,this.hk=function(){},this.preventDefault=null,this.rn=!1,this.Yf=new dm,a!==void 0&&(typeof a=="string"||Et.Element&&a instanceof Element?Rd(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Bc,ac;function vf(a){a.Yd=new Lo,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new Bn,a.pj=new ci,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new Tt(NaN,NaN).freeze(),a.du=new Tt(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new Tt(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new gr,a.zu=new Tt(NaN,NaN).freeze(),a.ut=new Tn(NaN,NaN,NaN,NaN).freeze(),a.rj=new Mi(0,0,0,0).freeze(),a.sj=Th,a.nu=!1,a.Zt=null,a.fu=null,a.yh=$a,a.zk=oo,a.Fg=$a,a.pq=oo,a.yt=Xs,a.Bt=Xs,a.Fc=!0,a.pn=!1,a.De=new In,a.Eh=new ci,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Mi(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new Ea,a.bq.diagram=a,a.Qg=new Ea,a.Qg.diagram=a,a.cj=new Ea,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,nv(a),a.ai=new In,a.Ht=!0,a.uu=kh,a.pw=!1,a.wu=bf,a.it="auto",a.Op="auto",a.zh=null,a.Fh=null,a.Bh=null,a.Qh=null,a.Oh=null,a.Nh=null,a.Qt=null,a.Lh=null,a.xt=!1,a.Mh=null,a.Ph=null,a.$h=null,a.Ch=null,a.Rt=!1,a.Yt={},a.oj=[null,null],a.Wg=!1,a.Iw=!1,a.ou=!1,a.lt=!1,a.rw=!0,a.ld=!1,a.$i=!1,a.Tw=!0,a.Ce=-2,a.Og=new ci,a.Xn=new Bn,a.Gg=!1,a.Jd=!0,a.Us=!0,a.Fi=!0,a.Gi=!0,a.Vs=!1,a.Ws=!0,a.Pi=!0,a.Hi=!0,a.Qi=!0,a.Ys=!0,a.Ii=!0,a.Ki=!0,a.Ji=!0,a.Li=!0,a.Mi=!0,a.Ni=!0,a.Oi=!0,a.Zs=!0,a.at=!0,a.qw=!1,a.Vk=!1,a.mn=!0,a.nn=!0,a.Xs=!0,a.$s=!0,a.iu=16,a.mu=16,a.qr=!1,a.gu=!1,a.lu=0,a.ju=0,a.yb=new Mi(5).freeze(),a.Hw=new In().freeze(),a.Nt=999999999,a.nw=new In().freeze(),a.Zi=!0,a.Ee=!0,a.vd=!0,a.Be=!1,a.gf=!1,a.xh=!0,a.hf=!1,a.sy=new In,a.ow=new In,a.Xh=null,a.aw=new Qn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Tt,bounds:new Tn,Py:new Qn,bA:new Qn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new Tn(NaN,NaN,NaN,NaN).freeze(),a.wo=new Qn(NaN,NaN).freeze(),a.Sp=new Tn(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new ci;var y=new ri,x=new Mo;x.bind(new Hs("text","",hi)),y.add(x),a.ny=y,a.Lg.add("",y),y=new ri,x=new Mo,x.stroke="brown",x.bind(new Hs("text","",hi)),y.add(x),a.Lg.add("Comment",y),y=new ri,y.selectable=!1,y.avoidable=!1,x=new hr,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new Qn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new ci,y=new er,y.selectionObjectName="GROUPPANEL",y.type=Gn.Vertical,x=new Mo,x.font="bold 12pt sans-serif",x.bind(new Hs("text","",hi)),y.add(x),x=new Gn(Gn.Auto),x.name="GROUPPANEL";var b=new hr;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new rl,b.padding=new Mi(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new ci,y=new Vn,x=new hr,x.isPanelMain=!0,y.add(x),x=new hr,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Vn,x=new hr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Qr,y.type=Gn.Auto,x=new hr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new rl,x.margin=new Mi(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new Qr,y.type=Gn.Link,x=new hr,x.isPanelMain=!0,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),a.Kt=y,a.fe=null,a.mq=!1,a.Ck=null,a.partManager=new mo,a.toolManager=new Wo,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new pe,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=oh(),a.eq=null,a.fq=ss,a.Pw=!1,a.Mb=1,a.Yh=null,a.Oq=1,a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0,a.yq=1,a.tw=0,a.uw=new Tt,a.zy=500,a.wp=new Tt,a.wq=!1}fn.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Kd=null,ad="",Ph(this,!1),this.Xn.clear(),vp(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function Ph(a,y){a.animationManager.Cc(!0),a.Hw=new In().freeze(),a.nw=new In().freeze();var x=a.skipsUndoManager,b=a.cc!==null&&a.cc!==void 0;b&&(a.skipsUndoManager=!0);var E=null;a.fe!==null&&(E=a.fe.part,E!==null&&a.remove(E));var te=[],ne=a.Wa.length;if(y){for(y=0;y<ne;y++)for(var ae=a.Wa.s[y].parts;ae.next();){var fe=ae.value;fe!==E&&fe.data===null&&te.push(fe)}for(y=0;y<te.length;y++)a.remove(te[y])}for(y=0;y<ne;y++)a.Wa.s[y].clear();return a.partManager.clear(),a.De.clear(),a.Eh.clear(),a.ai.clear(),a.Ck=null,a.Xn.clear(),vp(),a.Og.clear(),mr=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),te}function oh(){return null}fn.prototype.reset=function(){this.clear(),this.vb=!0,vf(this),Mc(this),this.Wg=!0,id(this),this.layout=new es,this.Wg=!1,this.model=hy(),this.model.undoManager=new Fo,this.vb=this.rn=!1,this.N()},fn.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=Et.document.body);var y=rn("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},fn.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=Et.document.body);var y=0;if(ys){var x=cm;y=Bc,x===null&&(x=cm=rn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Bc=rn("div"),y.style.position="absolute",y.style.visibility="hidden",y.style.width="200px",y.style.height="150px",y.style.boxSizing="content-box",y.appendChild(x)),y.style.overflow="hidden",a.appendChild(y);var b=x.offsetWidth;y.style.overflow="scroll",x=x.offsetWidth,b===x&&(x=y.clientWidth),a.removeChild(y),y=b-x,y!==0||Cr||(y=11)}this.Db=y,this.Gw=!0},fn.prototype.qb=function(a){a.classType===fn&&(this.autoScale=a)},fn.prototype.toString=function(a){a===void 0&&(a=0);var y="";if(this.div&&this.div.id&&(y=this.div.id),y='Diagram "'+y+'"',0>=a)return y;for(var x=this.Wa.iterator;x.next();)y+=`
|
|
|
`+x.value.toString(a-1);return y};function Rd(a,y){if(ys){if(y!=null||At("Diagram setup requires an argument DIV."),a.Ka!==null&&At("Diagram has already completed setup."),typeof y=="string"?a.Ka=Et.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:At("No DIV or DIV id supplied: "+y),a.Ka===null&&At("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&At("Invalid div id; div already has a Diagram associated with it."),!a.ol&&Et.ResizeObserver){var x=bn(function(){a.$b()},250);a.ol=new Et.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}Et.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=Et.go;var E=new Du(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",Et.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),E.style.zIndex="2",E.style.userSelect="none",E.style.MozUserSelect="none",E.style.touchAction="none",E.style.letterSpacing="normal !important",E.style.wordSpacing="normal !important"),a.ta=E,a.ib=E.context,b=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),Wd(a,a.Aa,a.ya),a.Ka.insertBefore(E.Oa,a.Ka.firstChild),E=new Du(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,ys){E=rn("div");var te=rn("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=bn(function(){a.Yh=null,a.N()},300),a.Ov=bn(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=Et.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,Me=ne;fe&&fe.H&&(Me=ne,_e=fe.H),ae.targetDiagram=_e,Lh(a,Me,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=Et.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 fn&&_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)}}fn.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},fn.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(Et,"resize",a.Ov,!1)}function Ba(a){30<a.Sq&&(a.Yh=1)}function nd(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),di&&di.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}fn.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:Et.devicePixelRatio||1},fn.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},fn.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},fn.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},fn.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},fn.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},fn.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},fn.prototype.doFocus=function(){this.focus()},fn.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=Et.scrollX||Et.pageXOffset,y=Et.scrollY||Et.pageYOffset;this.ta.focus(),Et.scrollTo(a,y)}},fn.prototype.Oy=function(){this.H.R("GainedFocus")},fn.prototype.Ny=function(){this.H.R("LostFocus")};function Bd(a){if(a.ta!==null){var y=a.Ka;if(y!==null&&y.clientWidth!==0&&y.clientHeight!==0){a.Gw||a.setScrollWidth();var x=a.gf?a.Db:0,b=a.Be?a.Db:0,E=a.Mb;a.Mb=a.computePixelRatio(),a.Mb!==E&&(a.pn=!0,a.$b()),(y.clientWidth!==a.Aa+x||y.clientHeight!==a.ya+b)&&(a.Ee=!0,a.Fc=!0,y=a.layout,y!==null&&y.isViewportSized&&a.autoScale===$a&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function id(a){var y=new os;y.name="Background",a.Al(y),y=new os,y.name="",a.Al(y),y=new os,y.name="Foreground",a.Al(y),y=new os,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new os,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new os,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function yf(a){var y=new Gn(Gn.Grid);y.name="GRID";var x=new hr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new hr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new hr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new hr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new hr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new hr,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Ti,x.add(y),x.layerName="Grid",x.zOrder=0,x.isInDocumentBounds=!1,x.isAnimated=!1,x.pickable=!1,x.locationObjectName="GRID",a.add(x),a.partManager.parts.remove(x),y.visible=!1,y}function Yf(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):zc(this.H)}function Sf(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):zc(this.H)}fn.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,Me=b.right+te.right;te=b.bottom+te.bottom;var Fe=E.x;b=E.y;var Ye=E.width,tt=E.height,st=E.right,pt=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;Ye<fe||tt<_e?(It=Tt.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,Tt.free(It),this.Ee=this.qr=!1):(It=Tt.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<Fe&&(this.position=It.h(Mt+ne,this.position.y)),Me>st&&(this.position=It.h(-(y.scrollWidth-this.Aa)+Mt-this.Aa/E+Me,this.position.y))),a.vy&&this.allowVerticalScroll&&(ae<b&&(this.position=It.h(this.position.x,a.scrollTop+ae)),te>pt&&(this.position=It.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+te))),Tt.free(It),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,Me=b.right,st=E.right,te=b.bottom,pt=E.bottom,ne=b.x,Fe=E.x,ae=b.y,b=E.y,Ye>=fe&&ne>=Fe&&Me<=st&&(x.style.width="1px"),tt>=_e&&ae>=b&&te<=pt&&(x.style.height="1px"))}},fn.prototype.computeBounds=function(a){return a===void 0&&(a=new Tn),ba(this),Fd(this,a)};function Fd(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,b=a.Wa.s,E=b.length,te=0;te<E;te++){var ne=b[te];if(ne.visible&&ne.isInDocumentBounds){ne=ne.Pa.s;for(var ae=ne.length,fe=0;fe<ae;fe++){var _e=ne[fe];_e.isInDocumentBounds&&_e.isVisible()&&(_e=_e.actualBounds,_e.w()&&(x?(x=!1,y.assign(_e)):y.ed(_e)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}fn.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(on(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof Vn||(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 Vn||(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=Tt.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=Tn.allocAt(0,0,b.width,b.height);var E=Tt.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,Tn.free(b),Tt.free(E),Tt.free(x)}x=a.yh,y&&a.Fg!==$a&&(x=a.Fg);var te=x!==$a?_h(a,x):a.scale;x=a.pa.x,b=a.pa.y,E=a.Aa/te;var ne=a.ya/te,ae=a.zk,fe=a.pq;y&&!ae.sb()&&(fe.sb()||fe.Xb())&&(ae=fe.Xb()?Fr:fe),xf(a,a.documentBounds,E,ne,ae,y),y=a.scale,a.scale=te,a.vb=!1,te=a.viewportBounds,nn.B(te.x,x)&&nn.B(te.y,b)&&nn.B(te.width,E)&&nn.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}fn.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},ot=fn.prototype,ot.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 Tt(a.x,a.y)}},ot.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new Tt(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))},ot.zz=function(a){if(a instanceof Qt){this.eq=a;var y=Tt.alloc();this.fq=this.op(a.ga(Xs,y)),Tt.free(y)}else this.eq=null,this.fq=ss};function xf(a,y,x,b,E,te){var ne=Tt.allocAt(a.pa.x,a.pa.y),ae=ne.x,fe=ne.y;if(a.eq!==null){var _e=Tt.alloc();_e=a.eq.ga(Xs,_e),ae=_e.x-a.fq.x/a.scale,fe=_e.y-a.fq.y/a.scale,E=ms,Tt.free(_e)}(te||a.scrollMode===Th)&&(E.sb()&&(x>y.width&&(ae=y.x+(E.x*y.width+E.offsetX)-(E.x*x-E.offsetX)),b>y.height&&(fe=y.y+(E.y*y.height+E.offsetY)-(E.y*b-E.offsetY))),E=a.rj,te=x-y.width,x<y.width+E.left+E.right?(ae=Math.min(ae+x/2,y.right+Math.max(te,E.right)-x/2),ae=Math.max(ae,y.left-Math.max(te,E.left)+x/2),ae-=x/2):ae>y.left?ae=y.left:ae<y.right-x&&(ae=y.right-x),x=b-y.height,b<y.height+E.top+E.bottom?(fe=Math.min(fe+b/2,y.bottom+Math.max(x,E.bottom)-b/2),fe=Math.max(fe,y.top-Math.max(x,E.top)+b/2),fe-=b/2):fe>y.top?fe=y.top:fe<y.bottom-b&&(fe=y.bottom-b)),ne.x=isFinite(ae)?ae:-a.yb.left,ne.y=isFinite(fe)?fe:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,ne),ne.x=y.x,ne.y=y.y),ma(a.Yd,a.pa,ne),a.pa.h(ne.x,ne.y),Mc(a),Tt.free(ne)}ot.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=Ku(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof Ti)return a}else if(a=Ku(this,a,function(x){return x.part}),a instanceof Ti)return a;return null},ot.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),ba(this);for(var b=this.Wa.iteratorBackwards;b.next();){var E=b.value;if(E.visible&&(E=E.ic(a,y,x),E!==null))return E}return null};function Ku(a,y,x,b){for(x===void 0&&(x=null),b===void 0&&(b=null),ba(a),a=a.Wa.iteratorBackwards;a.next();){var E=a.value;if(E.visible&&!E.isTemporary&&(E=E.ic(y,x,b),E!==null))return E}return null}ot.lz=function(a,y,x){return y===void 0&&(y=!0),Fc(this,a,function(b){return b.part},y?function(b){return b instanceof Ti&&b.canSelect()}:null,x)};function Fc(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof Bn||E instanceof In||(E=new In),ba(a),a=a.Wa.iteratorBackwards;a.next();){var te=a.value;te.visible&&!te.isTemporary&&te.ji(y,x,b,E)}return E}ot.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof Bn||b instanceof In||(b=new In),ba(this);for(var E=this.Wa.iteratorBackwards;E.next();){var te=E.value;te.visible&&te.ji(a,y,x,b)}return b},ot.ux=function(a,y,x,b){return y===void 0&&(y=!1),x===void 0&&(x=!0),Eh(this,a,function(E){return E instanceof Ti&&(!x||E.canSelect())},y,b)},ot.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof Bn||E instanceof In||(E=new In),ba(this);for(var te=this.Wa.iteratorBackwards;te.next();){var ne=te.value;ne.visible&&ne.Cf(a,y,x,b,E)}return E},ot.Nu=function(a,y,x,b,E,te){var ne=new In;ba(this);for(var ae=this.Wa.iteratorBackwards;ae.next();){var fe=ae.value;fe.visible&&fe.Nu(a,y,x,b,ne,E,te)}return ne};function Eh(a,y,x,b,E){var te=null;for(te===void 0&&(te=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof Bn||E instanceof In||(E=new In),ba(a),a=a.Wa.iteratorBackwards;a.next();){var ne=a.value;ne.visible&&!ne.isTemporary&&ne.Cf(y,te,x,b,E)}return E}ot.mz=function(a,y,x,b,E){return x===void 0&&(x=!0),b===void 0&&(b=!0),sh(this,a,y,function(te){return te instanceof Ti&&(!b||te.canSelect())},x,E)},ot.og=function(a,y,x,b,E,te){x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof Bn||E instanceof In)&&(te=E),E=!0),te instanceof Bn||te instanceof In||(te=new In),ba(this);for(var ne=this.Wa.iteratorBackwards;ne.next();){var ae=ne.value;ae.visible&&ae.og(a,y,x,b,E,te)}return te};function sh(a,y,x,b,E,te){var ne=null;for(ne===void 0&&(ne=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof Bn||E instanceof In)&&(te=E),E=!0),te instanceof Bn||te instanceof In||(te=new In),ba(a),a=a.Wa.iteratorBackwards;a.next();){var ae=a.value;ae.visible&&!ae.isTemporary&&ae.og(y,x,ne,b,E,te)}return te}fn.prototype.acceptEvent=function(a){return Ll(this,a,a instanceof MouseEvent)};function Ll(a,y,x){var b=a.Qg;return a.Qg=a.cj,a.cj=b,b.diagram=a,b.event=y,x?Lh(a,y,b):(b.viewPoint=a.Qg.viewPoint,b.documentPoint=a.Qg.documentPoint),a=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),b.modifiers=a,b.button=y.button,y.buttons!==void 0&&(b.buttons=y.buttons),Cr&&y.button===0&&y.ctrlKey&&(b.button=2),b.down=!1,b.up=!1,b.clickCount=1,b.delta=0,b.handled=!1,b.bubbles=!1,b.timestamp=y.timeStamp,b.isMultiTouch=!1,b.targetDiagram=jd(y,y.target),b.targetObject=null,b}function jd(a,y){return y===null?null:(y=y.H)?y:((y=a.path)||typeof a.composedPath!="function"||(y=a.composedPath()),y&&y[0]&&y[0].H?y[0].H:null)}function zd(a,y,x,b,E,te){var ne=a.Qg;return a.Qg=a.cj,a.cj=ne,ne.diagram=a,ne.clickCount=1,a=ne.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),ne.modifiers=a,ne.event=y,ne.timestamp=y.timeStamp,ne.button=y.button,ne.buttons=y.buttons,Cr&&y.button===0&&y.ctrlKey&&(ne.button=2),ne.down=x,ne.up=b,ne.handled=!1,ne.bubbles=E,ne.isMultiTouch=te,ne}function eu(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}fn.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)},fn.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)},fn.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)},fn.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)},fn.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new Tt(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?cr(new Tt(y,a),this.Ab):new Tt(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=Tt.allocAt(ne,ae),a.Ab.Cd(y),x.documentPoint.assign(y),Tt.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))}}fn.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function Ud(a){a.ld||ba(a),a.Va()}fn.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},ot=fn.prototype,ot.Pz=function(){return this.kg},ot.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,fl(this),this.hf=!1,this.du=new Tt(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&dn(function(){b.ld=!1,Jo(y,"Model"),a(b)},1)},ot.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;Et.requestAnimationFrame(function(){y.kg&&y.bd()})}},ot.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),fl(this))};function jc(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||zc(a)||(y&&ba(a),x&&ql(a,!1))}function fl(a,y){if(!a.ld&&(a.kg=!1,a.Ka!==null||a.wo.w())){a.ld=!0;var x=a.animationManager,b=a.Xn;if(!x.isAnimating&&b.length!==0){for(var E=b.s,te=E.length,ne=0;ne<te;ne++){var ae=E[ne];ea(ae,!1),ae.v()}b.clear()}b=a.ow,0<b.count&&(b.each(function(fe){fe.Nv()}),b.clear()),E=b=!1,x.defaultAnimation.isAnimating&&(E=!0,b=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||Bd(a),jc(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(Lc(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),ba(a),te=!1,(!a.hf||a.xh)&&(a.hf?qp(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),qp(a,!1)),te=!0),a.Jk=!1,ba(a),a.ou||Ud(a),jc(a,!0,!1),ne=!1,te?(x=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!==$a?a.scale=_h(a,a.Fg):a.yh!==$a?a.scale=_h(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),ql(a,!0)),te&&ne&&a.eb("Initial Layout"),ba(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function Gd(a){if(a.Fg!==$a)a.scale=_h(a,a.Fg);else if(a.yh!==$a)a.scale=_h(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}ql(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Lc(a)}function ba(a){if(a.De.count!==0&&(a.ld||!a.animationManager.isTicking)){for(var y=0;23>y;y++){var x=a.De.iterator;if(x===null||a.De.count===0)break;a.De=new In,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof er&&b.U&65536&&(b.U=b.U^65536)})}}ot.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof er||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof er&&x.isVisible()&&fs(this,x);for(a.reset();a.next();)x=a.value,x instanceof Vn&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x));for(a.reset();a.next();)x=a.value,x instanceof Qr&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function fs(a,y){for(var x=Hn(),b=Hn(),E=y.memberParts;E.next();){var te=E.value;te.isVisible()&&(te instanceof er?(iu(te)||nl(te)||cd(te))&&fs(a,te):te instanceof Vn?te.fromNode===y||te.toNode===y?b.push(te):x.push(te):(te.measure(1/0,1/0),te.arrange()))}for(a=x.length,E=0;E<a;E++)te=x[E],te.measure(1/0,1/0),te.arrange();for(ei(x),y.measure(1/0,1/0),y.arrange(),a=b.length,y=0;y<a;y++)x=b[y],x.measure(1/0,1/0),x.arrange();ei(b)}ot.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},ot.gc=function(a){if(this.Ka!==null){if(this.ta===null&&At("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){pu(this);var x=this.Aa,b=this.ya;if(a.Gv.resize(x,b,x,b),x=this.Wa.s,b=x.length,this.Fd(x,b,this,this.viewportBounds),this.Fc||y.isAnimating){y=this.pa;var E=this.Ca,te=Math.round(y.x*E)/E,ne=Math.round(y.y*E)/E,ae=this.Ab;for(ae.reset(),E!==1&&ae.scale(E),y.x===0&&y.y===0||ae.translate(-te,-ne),a.ti=null,Yy(a,ae.m11,ae.m12,ae.m21,ae.m22,ae.dx,ae.dy),this.pb!==1&&(a.globalAlpha=this.pb),Va(this,a),y=this.Mb,this.ta.context.setTransform(y,0,0,y,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya),y=0;y<b;y++)x[y].gc(a,this);a=!1,this.Yf?Yd(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(gr.prototype.Cd=gr.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(te=this.animationManager,!te.zb&&(!te.isAnimating||te.isTicking)&&(x=new Date,pu(this),this.Ka.style.opacity!=="0")){if(b=a!==this.ib,y=this.Wa.s,E=y.length,this.Fd(y,E,this,this.viewportBounds),b)a.Vc(!0),this.vd=!0;else if(!this.Fc&&!te.isAnimating)break e;te=this.Ab,te.reset(),ne=this.Mb,ae=this.pa;var fe=this.Ca,_e=Math.round(ae.x*fe)/fe,Me=Math.round(ae.y*fe)/fe;for(fe!==1&&te.scale(fe),ae.x===0&&ae.y===0||te.translate(-_e,-Me),a.setTransform(ne,0,0,ne,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),Va(this,a),ae=0;ae<E;ae++)a.setTransform(ne,0,0,ne,0,0),a.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),a.yc(),y[ae].gc(a,this);if(y=!1,this.Yf?Yd(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(gr.prototype.Cd=gr.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=di&&di.nx,x=this.zw,b||this.Yh===null){for(x[this.Tq]=y,this.Tq=(this.Tq+1)%x.length,E=y=0;E<x.length;E++)y+=x[E];this.Sq=y/x.length}if(this.pb!==1&&(a.globalAlpha=1),b)for(a.setTransform(1,0,0,1,0,0),b=0;b<x.length;b++)a.fillText(x[b].toString(),20,150+ +(20*b))}}};function Ys(a,y,x,b,E,te,ne,ae,fe,_e){if(a.Ka!==null){a.ta===null&&At("No canvas specified"),ne===void 0&&(ne=null),ae===void 0&&(ae=null),fe===void 0&&(fe=!1),_e===void 0&&(_e=!1),pu(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var Me=a.Ca;a.Ca=E;var Fe=a.Wa.s,Ye=Fe.length;try{var tt=new Tn(te.x,te.y,b.width/E,b.height/E),st=tt.copy();st.Co(x),Lc(a,st),ba(a),a.Fd(Fe,Ye,a,tt),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 pt=a.Mb;y.scale(pt,pt);var It=gr.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 Hl&&Yy(y,It.m11,It.m12,It.m21,It.m22,It.dx,It.dy),gr.free(It),Va(a,y),y.globalAlpha=a.pb;var Mt=a.Qj("Grid");if(ne){var Ht=new In,Gt=ne.iterator;for(Gt.reset();Gt.next();){var Zt=Gt.value;Zt instanceof Ti&&(_e||Zt.layer!==Mt)&&(Zt.Gj(),Ht.add(Zt))}for(_e=0;_e<Ye;_e++)El(Fe[_e],y,a,Ht,fe);Ht.each(function(pn){return pn.Gj()})}else for(Ht=0;Ht<Ye;Ht++){var Xt=Fe[Ht];Xt===Mt?_e&&Xt.gc(y,a,!0):Xt.gc(y,a,fe)}a.$i=!1,a.Yf&&Yd(a.Yf,a)&&a.Vp()}finally{a.Ca=Me,a.ib.Vc(!0),a.vd=!0,a.Fd(Fe,Ye,a,a.viewportBounds),Lc(a),a.ib instanceof Hl&&(a.ib.Nj.PA(),a.redraw())}}}ot.Gf=function(a){return this.Rg[a]},ot.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},ot.Tx=function(){this.Rg=new yi,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Cr||Vi),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function Va(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}ot.Ql=function(a){return this.on[a]},ot.sA=function(a,y){this.on[a]=y},ot.Sx=function(){this.on=new yi,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},ot.set=function(a){return Object.assign(this,a),this},ot.Du=function(a){return this.nm(a)},ot.nm=function(a){return fu(this,a),this};function fu(a,y){var x=a instanceof Gn,b=a instanceof fn,E;for(E in y){E===""&&At("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])),qt(te)?ne=E.substr(ae+1):At("Unable to find object named: "+fe+" in "+a.toString()+" when trying to set property: "+E)}}if(ne[0]!=="_"&&!Ii(te,ne))if(b&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(b&&ne==="Changed"){a.Pe(y[ne]);continue}else if(b&&Ii(a.toolManager,ne))te=a.toolManager;else if(b&&am(a,ne)){a.Bj(ne,y[ne]);continue}else if(a instanceof Si&&ne==="Changed"){a.Pe(y[ne]);continue}else At('Trying to set undefined property "'+ne+'" on object: '+te.toString());te[ne]=y[E],ne[0]==="_"&&te instanceof Qt&&te.Vw(ne)}}ot.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new ci,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},ot.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")},fn.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,Me=Math.max(te,0),Fe=Math.max(y,0),Ye=Math.floor(E-Me),tt=Math.floor(ae-Fe);a.drawImage(b.Oa,Me,Fe,Ye,tt,0,0,Ye,tt),Yd(this.Yf,this)&&a.clearRect(0,0,fe,_e),b=Hn(),a=Hn(),tt=Math.abs(te),Ye=Math.abs(y);var st=Me===0?0:E-tt;Me=Tt.allocAt(st,0),tt=Tt.allocAt(tt+st,ae),a.push(new Tn(Math.min(Me.x,tt.x),Math.min(Me.y,tt.y),Math.abs(Me.x-tt.x),Math.abs(Me.y-tt.y)));var pt=this.Ab;if(pt.reset(),pt.scale(ne,ne),this.Ca!==1&&pt.scale(this.Ca),ne=this.pa,(ne.x!==0||ne.y!==0)&&isFinite(ne.x)&&isFinite(ne.y)&&pt.translate(-ne.x,-ne.y),cr(Me,pt),cr(tt,pt),b.push(new Tn(Math.min(Me.x,tt.x),Math.min(Me.y,tt.y),Math.abs(Me.x-tt.x),Math.abs(Me.y-tt.y))),st=Fe===0?0:ae-Ye,Me.h(0,st),tt.h(E,Ye+st),a.push(new Tn(Math.min(Me.x,tt.x),Math.min(Me.y,tt.y),Math.abs(Me.x-tt.x),Math.abs(Me.y-tt.y))),cr(Me,pt),cr(tt,pt),b.push(new Tn(Math.min(Me.x,tt.x),Math.min(Me.y,tt.y),Math.abs(Me.x-tt.x),Math.abs(Me.y-tt.y))),Yd(this.Yf,this)&&(E=0<te?0:-te,ae=0<y?0:-y,Me.h(E,ae),tt.h(fe+E,_e+ae),a.push(new Tn(Math.min(Me.x,tt.x),Math.min(Me.y,tt.y),Math.abs(Me.x-tt.x),Math.abs(Me.y-tt.y))),cr(Me,pt),cr(tt,pt),b.push(new Tn(Math.min(Me.x,tt.x),Math.min(Me.y,tt.y),Math.abs(Me.x-tt.x),Math.abs(Me.y-tt.y)))),Tt.free(Me),Tt.free(tt),jc(this,!1,!0),this.Ka===null&&At("No div specified"),this.ta===null&&At("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(pu(this),ae=this.Mb,E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,this.Aa*ae,this.ya*ae),E.drawImage(this.jw.Oa,0<te?0:Math.round(-te),0<y?0:Math.round(-y)),te=this.pa,ne=this.Ca,fe=Math.round(te.x*ne)/ne,_e=Math.round(te.y*ne)/ne,y=this.Ab,y.reset(),ne!==1&&y.scale(ne),te.x===0&&te.y===0||y.translate(-fe,-_e),E.save(),E.beginPath(),te=a.length,ne=0;ne<te;ne++)fe=a[ne],fe.width!==0&&fe.height!==0&&E.rect(Math.floor(fe.x),Math.floor(fe.y),Math.ceil(fe.width),Math.ceil(fe.height));for(E.clip(),E.setTransform(ae,0,0,ae,0,0),E.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),E.yc(),y=this.Wa.s,te=y.length,this.Fd(y,te,this,this.viewportBounds),Va(this,E),E.globalAlpha=this.pb,ae=0;ae<te;ae++)if(ne=y[ae],fe=b,ne.visible&&ne.pb!==0){_e=Ma(ne,E),Fe=ne.Zq,Fe.length=0,Me=this.scale,Ye=Tn.alloc(),tt=ne.Pa.s,pt=tt.length,st=fe.length;for(var It=0;It<pt;It++){var Mt=tt[It],Ht=nf(Mt,Mt.actualBounds);e:{for(var Gt=2/Me,Zt=4/Me,Xt=0;Xt<st;Xt++){var pn=fe[Xt];if(pn.width!==0&&pn.height!==0&&Ht.Vu(pn.x-Gt,pn.y-Gt,pn.width+Zt,pn.height+Zt)){Ht=!0;break e}}Ht=!1}Ht&&ne.Oj(E,Mt,this,Fe,Me,Ye,!0)}Tn.free(Ye),E.globalAlpha=_e}E.restore(),E.Vc(!0),this.Yf&&Yd(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}ei(b),ei(a),this.ld=!1}}else this.bd();x&&(Ba(this),this.bd(),nd(this,!0))}else x?(Ba(this),this.bd(),nd(this,!0)):this.bd()}};function pu(a){a.pn!==!1&&(a.pn=!1,Wd(a,a.Aa,a.ya))}function Wd(a,y,x){Mc(a);var b=a.Mb;a.ta.resize(y*b,x*b,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function zc(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,b=a.ya,E=a.Ka,te=!1,ne=a.gf?a.Db:0,ae=a.Be?a.Db:0,fe=E.clientWidth||x+ne,_e=E.clientHeight||b+ae,Me=a.viewportBounds;E=Me.x;var Fe=Me.y,Ye=Me.width,tt=Me.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 st=a.ku,pt=a.hu;if(a.Ee=!1,!(te||a.gf||a.Be||a.mn||a.nn))return!0;var It=a.documentBounds,Mt=0,Ht=0,Gt=0,Zt=0,Xt=Me.width,pn=Me.height,ii=a.rj;a.contentAlignment.sb()?(It.width>Xt&&(Mt=ii.left,Ht=ii.right),It.height>pn&&(Gt=ii.top,Zt=ii.bottom)):(Mt=ii.left,Ht=ii.right,Gt=ii.top,Zt=ii.bottom);var fi=It.width+Mt+Ht,li=It.height+Gt+Zt;ii=a.scale;var Kn=fi>fe/ii,Rn=li>_e/ii;if(!(te||a.gf||a.Be||Kn||Rn))return!0;Mt=It.x-Mt,fe=Me.x,Ht=It.right+Ht,_e=Me.right+ne,Gt=It.y-Gt;var Ji=Me.y;It=It.bottom+Zt,Me=Me.bottom+ae;var Zi="1px";if(Zt="1px",a.scrollMode===Th&&(Kn||Rn)&&(Kn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Kn=1,Mt+1<fe&&(Kn=Math.max((fe-Mt)*ii+a.Aa,Kn)),Ht>_e+1&&(Kn=Math.max((Ht-_e)*ii+a.Aa,Kn)),Xt+ne+1<fi&&(Kn=Math.max((fi-Xt)*ii+a.Aa,Kn)),Zi=Kn.toString()+"px"),Rn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Kn=1,Gt+1<Ji&&(Kn=Math.max((Ji-Gt)*ii+a.ya,Kn)),It>Me+1&&(Kn=Math.max((It-Me)*ii+a.ya,Kn)),pn+ae+1<li&&(Kn=Math.max((li-pn)*ii+a.ya,Kn)),Zt=Kn.toString()+"px")),Kn=Zi!=="1px",Rn=Zt!=="1px",Kn&&Rn||!Kn&&!Rn||(Rn&&(_e-=a.Db),Kn&&(Me-=a.Db),fi<Xt+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,Mt+1<fe&&(ne=Math.max((fe-Mt)*ii+a.Aa,ne)),Ht>_e+1&&(ne=Math.max((Ht-_e)*ii+a.Aa,ne)),Xt+1<fi&&(ne=Math.max((fi-Xt)*ii+a.Aa,ne)),Zi=ne.toString()+"px"),Kn=Zi!=="1px",ne=a.ya,Kn!==a.Be&&(ne=Kn?a.ya-a.Db:a.ya+a.Db),li<pn+ae||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(ae=1,Gt+1<Ji&&(ae=Math.max((Ji-Gt)*ii+ne,ae)),It>Me+1&&(ae=Math.max((It-Me)*ii+ne,ae)),pn+1<li&&(ae=Math.max((li-pn)*ii+ne,ae)),Zt=ae.toString()+"px"),Rn=Zt!=="1px"),a.qr&&Kn===a.Be&&Rn===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(Kn!==a.Be&&(Zi==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),te=!0),a.Be=Kn,pt.style.width=Zi,Rn!==a.gf&&(Zt==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),te=!0,a.tn&&(ae=Tt.alloc(),Rn?(y.style.left=a.Db+"px",a.position=ae.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=ae.h(a.pa.x-a.Db/a.scale,a.pa.y)),Tt.free(ae))),te&&Mc(a),a.gf=Rn,pt.style.height=Zt,a.gu=!0,te&&(a.pn=!0),y=st.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Xt+1<fi?y=(a.position.x-Mt)*ii:Mt+1<fe?y=st.scrollWidth-st.clientWidth:Ht>_e+1&&(y=a.position.x*ii)),a.tn)switch(a.bu){case"negative":y=-(st.scrollWidth-y-st.clientWidth);break;case"reverse":y=st.scrollWidth-y-st.clientWidth}return st.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(pn+1<li?st.scrollTop=(a.position.y-Gt)*ii:Gt+1<Ji?st.scrollTop=st.scrollHeight-st.clientHeight:It>Me+1&&(st.scrollTop=a.position.y*ii)),fe=a.Aa,_e=a.ya,st.style.width=fe+(a.gf?a.Db:0)+"px",st.style.height=_e+(a.Be?a.Db:0)+"px",x!==fe||b!==_e||a.animationManager.zb?(x=Tn.allocAt(E,Fe,Ye,tt),a.onViewportBoundsChanged(x,a.viewportBounds,ii,te),Tn.free(x),!1):!0}ot=fn.prototype,ot.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&At("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&&At('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==y)){var x=y.oi(99999999,a,a.diagram===this);0<=x&&this.cb(vs,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},ot.oi=function(a){this.partManager.oi(a);var y=this;qd(a,function(x){Zd(y,x)}),(a instanceof Qr||a instanceof er&&a.placeholder!==null)&&a.v(),a.data!==null&&qd(a,function(x){ly(y.partManager,x)}),nl(a)!==!0&&cd(a)!==!0||this.De.add(a),F1(a,!0,this),z1(a)?(a.actualBounds.w()&&this.N(nf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(nf(a,a.actualBounds)),this.$b()},ot.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()},ot.remove=function(a){rd(this,a,!0)};function rd(a,y,x){var b=y.layer;b!==null&&b.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=b.pc(-1,y,!1),0<=x&&a.cb(ds,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}ot.Is=function(a,y){if(y===void 0&&(y=!1),on(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)},ot.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},fn.prototype.moveParts=function(a,y,x,b){if(x===void 0&&(x=!1),b===void 0&&(b=Xf(this)),this.toolManager!==null){var E=new ci;if(a!==null)if(on(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 ri){if(y.add(x,a.Pd(E,x,x.location)),x instanceof er&&(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 Vn)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=Tt.alloc(),ne=Tt.alloc();ne.assign(x),isNaN(ne.x)&&(ne.x=0),isNaN(ne.y)&&(ne.y=0),(x=a.Mr)||Qf(a,y);for(var ae=Hn(),fe=Hn(),_e=y.iterator,Me=Tt.alloc();_e.next();){var Fe=_e.key,Ye=_e.value;if(Fe.Zc()){var tt=Vp(a,Fe,y);tt!==null?ae.push(new re(Fe,Ye,tt)):(!E||Fe.canMove())&&(tt=Ye.point,te.assign(tt),a.computeMove(Fe,te.add(ne),b,Me),Fe.location=Me,Ye.shifted===void 0&&(Ye.shifted=new Tt),Ye.shifted.assign(Me.re(tt)))}else _e.key instanceof Vn&&fe.push(_e.sa)}for(Tt.free(Me),E=ae.length,_e=0;_e<E;_e++)Fe=ae[_e],te.assign(Fe.info.point),Fe.Su.shifted===void 0&&(Fe.Su.shifted=new Tt),Fe.node.location=te.add(Fe.Su.shifted);for(E=Tt.alloc(),_e=Tt.alloc(),Fe=fe.length,Ye=0;Ye<Fe;Ye++){var st=fe[Ye];if(tt=st.key,tt instanceof Vn)if(tt.suspendsRouting){tt.Tg=null,Me=tt.fromNode;var pt=tt.toNode;if(a.draggedLink!==null&&b.dragsLink)if(pt=st.value.point,tt.dragComputation===null)y.add(tt,a.Pd(b,tt,ne)),Bh(tt,ne.x-pt.x,ne.y-pt.y);else{st=Tt.allocAt(0,0),(Me=tt.i(0))&&Me.w()&&st.assign(Me);var It=Me=Tt.alloc().assign(st).add(ne);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(It=Tt.alloc(),Jf(a,tt,Me,It,b)),Me.assign(tt.dragComputation(tt,Me,It)).re(st),y.add(tt,a.Pd(b,tt,Me)),Bh(tt,Me.x-pt.x,Me.y-pt.y),Tt.free(st),Tt.free(Me),It!==Me&&Tt.free(It)}else Me!==null&&(E.assign(Me.location),It=y.I(Me),It!==null&&E.re(It.point)),pt!==null&&(_e.assign(pt.location),It=y.I(pt),It!==null&&_e.re(It.point)),Me!==null&&pt!==null?E.Xa(_e)?(Me=st.value.point,pt=te,pt.assign(E),pt.re(Me),y.add(tt,a.Pd(b,tt,E)),Bh(tt,pt.x,pt.y)):(tt.suspendsRouting=!1,tt.bb()):(st=st.value.point,Me=Me!==null?E:pt!==null?_e:ne,y.add(tt,a.Pd(b,tt,Me)),Bh(tt,Me.x-st.x,Me.y-st.y))}else(tt.fromNode===null||tt.toNode===null)&&(Me=st.value.point,y.add(tt,a.Pd(b,tt,ne)),Bh(tt,ne.x-Me.x,ne.y-Me.y))}Tt.free(te),Tt.free(ne),Tt.free(E),Tt.free(_e),ei(ae),ei(fe),x||(ba(a),od(a,y))}}fn.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new Tt),b.assign(y),a===null)return b;var E=y,te=x.isGridSnapEnabled;te&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=Tt.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&&Tt.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=Tt.allocAt(0,0),te.yi(0,0,a,y,E),nn.No(x.x,x.y,ae+te.x,ne+te.y,a,y,b),Tt.free(te)}}function Qf(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Vn&&(y.suspendsRouting=!0)}function od(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Vn&&(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}ot=fn.prototype,ot.Pd=function(a,y,x){if(x===void 0)return new ah(Ur);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new ah(new Tt(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&&At("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&At("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&At("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&At("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&&At("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}ot.Al=function(a){$p(this,a,null),a.Xe(this);var y=this.Wa,x=y.count-1;if(!a.isTemporary)for(;0<=x&&y.M(x).isTemporary;)x--;return y.Gb(x+1,a),this.cc!==null&&this.cb(vs,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},ot.Ww=function(a,y){$p(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(ds,"layers",this,a,null,b,null));var E=x.count,te;for(te=0;te<E;te++)if(x.M(te)===y){x.Gb(te,a);break}return this.cc!==null&&this.cb(vs,"layers",this,null,a,null,te),this.N(),0>b&&this.Ya(),this},ot.Cy=function(a,y){$p(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(ds,"layers",this,a,null,b,null));var E=x.count,te;for(te=0;te<E;te++)if(x.M(te)===y){x.Gb(te+1,a);break}return this.cc!==null&&this.cb(vs,"layers",this,null,a,null,te+1),this.N(),0>b&&this.Ya(),this},ot.kA=function(a){if(a.diagram!==this&&At("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram),a.name!==""){var y=this.Wa,x=y.indexOf(a);if(y.remove(a)){for(y=a.Pa.copy().iterator;y.next();){var b=y.value,E=b.layerName;E!==a.name?b.layerName=E:b.layerName=""}this.cc!==null&&this.cb(ds,"layers",this,a,null,x,null),this.N(),this.Ya()}}},ot.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},ot.Yw=function(a){return this.pf===null&&(this.pf=new Bn),this.pf.add(a),this.model.Pe(a),this},ot.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},ot.Pe=function(a){return this.zg===null&&(this.zg=new Bn),this.zg.add(a),this},ot.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},ot.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==Ka&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},ot.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)},ot.g=function(a,y,x,b,E){this.cb(Vo,a,this,y,x,b,E)},fn.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 Qt){var te=E.part;te!==null&&te.Wb()}this.isModified=!0}else if(b===vs){var ne=a.object,ae=a.newParam,fe=a.newValue;if(ne instanceof Gn)if(typeof ae=="number"&&fe instanceof Qt){y?ne.pc(ae):ne.Gb(ae,fe);var _e=ne.part;_e!==null&&_e.Wb()}else typeof ae=="number"&&fe instanceof ta&&(fe.isRow?h1(ne,ae,y?void 0:fe):d1(ne,ae,y?void 0:fe));else if(ne instanceof os){var Me=a.oldParam===!0;typeof ae=="number"&&fe instanceof Ti&&(y?(fe.isSelected=!1,fe.isHighlighted=!1,fe.Wb(),ne.pc(Me?ae:-1,fe,Me)):ne.oi(ae,fe,Me))}else ne instanceof fn?typeof ae=="number"&&fe instanceof os&&(y?this.Wa.mb(ae):(fe.Xe(this),this.Wa.Gb(ae,fe))):At("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===ds){var Fe=a.object,Ye=a.oldParam,tt=a.oldValue;if(Fe instanceof Gn)typeof Ye=="number"&&tt instanceof Qt?y?Fe.Gb(Ye,tt):Fe.pc(Ye):typeof Ye=="number"&&tt instanceof ta&&(tt.isRow?h1(Fe,Ye,y?tt:void 0):d1(Fe,Ye,y?tt:void 0));else if(Fe instanceof os){var st=a.newParam===!0;typeof Ye=="number"&&tt instanceof Ti&&(y?0>Fe.Pa.indexOf(tt)&&Fe.oi(Ye,tt,st):(tt.isSelected=!1,tt.isHighlighted=!1,tt.Wb(),Fe.pc(st?Ye:-1,tt,st)))}else Fe instanceof fn?typeof Ye=="number"&&tt instanceof os&&(y?(tt.Xe(this),this.Wa.Gb(Ye,tt)):this.Wa.mb(Ye)):At("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==Ka&&At("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},fn.prototype.Ea=function(a){return this.undoManager.Ea(a)},fn.prototype.eb=function(a){return this.undoManager.eb(a)},fn.prototype.Kf=function(){return this.undoManager.Kf()},fn.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}},fn.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},fn.prototype.rp=function(){this.partManager.rp()};function Yp(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,Mc(a),a.N(),a.Ee=!0,b.zb&&(Js(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,Mc(a);else{a.vb=!0;var E=a.viewportBounds.copy(),te=a.Aa,ne=a.ya,ae=a.zoomPoint.x,fe=a.zoomPoint.y,_e=a.contentAlignment;isNaN(ae)&&(_e.$c()?_e.Hf(_u)?ae=0:_e.Hf(Wa)&&(ae=te-1):ae=_e.sb()?_e.x*(te-1):te/2),isNaN(fe)&&(_e.$c()?_e.Hf($l)?fe=0:_e.Hf(Za)&&(fe=ne-1):fe=_e.sb()?_e.y*(ne-1):ne/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),x<a.minScale&&(x=a.minScale),x>a.maxScale&&(x=a.maxScale),te=Tt.allocAt(a.pa.x+ae/y-ae/x,a.pa.y+fe/y-fe/x),a.position=te,Tt.free(te),a.Ca=x,Mc(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),ql(a,!1),b.zb&&(Js(b)||b.ce.add(b.H,"scale",y,a.Ca))}}fn.prototype.onViewportBoundsChanged=function(a,y,x,b){if(!a.D(y)){b===void 0&&(b=!1),b||(this.Ee=!0),this.vd=!0;var E=this.layout;E===null||!E.isViewportSized||this.autoScale!==$a||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof Wo&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Nd(E,this)),this.vb||this.invalidateViewport(a,y),Lc(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.canvasSize.width=Math.round(a.width*x),this.fc.canvasSize.height=Math.round(a.height*x),this.fc.newCanvasSize.width=this.Aa,this.fc.newCanvasSize.height=this.ya,this.fc.isScroll=b,this.R("ViewportBoundsChanged",this.fc,a),this.isVirtualized&&this.links.each(function(te){te.isAvoiding&&te.actualBounds.Yc(y)&&te.bb()})}};function Lc(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=Qn.alloc(),E=1,te=1,ne=x.O.s,ae=ne.length,fe=0;fe<ae;fe++){var _e=ne[fe],Me=Math.abs(_e.interval);2>Me||(mv(_e.figure)?te=te*Me/nn.vx(te,Me):E=E*Me/nn.vx(E,Me))}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=Tt.alloc(),nn.No(a,ne,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),Qn.free(b),x.part.location=y,Tt.free(y)}}fn.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)}},fn.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))},fn.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),on(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof Ti||At("Diagram.selectCollection given something that is not a Part: "+b),b.isSelected=!0}else for(a=a.iterator;a.next();)y=a.value,y instanceof Ti||At("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},fn.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()}},ot=fn.prototype,ot.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},ot.Jz=function(a){a=new In().addAll(a);for(var y=this.highlighteds.copy().hp(a).iterator;y.next();)y.value.isHighlighted=!1;for(a=a.iterator;a.next();)y=a.value,y instanceof Ti||At("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},ot.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,te=Tt.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)),Tt.free(te);return}At("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):At("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),Tt.free(te)},ot.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)},ot.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},ot.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)},ot.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,Me=y.dx,Fe=y.dy,Ye=x*ne+b*fe+Me;y=x*ae+b*_e+Fe;var tt=E*ne+b*fe+Me;return a=E*ae+b*_e+Fe,b=x*ne+te*fe+Me,x=x*ae+te*_e+Fe,ne=E*ne+te*fe+Me,E=E*ae+te*_e+Fe,te=Math.min(Ye,tt),Ye=Math.max(Ye,tt),tt=Math.min(y,a),y=Math.max(y,a),te=Math.min(te,b),Ye=Math.max(Ye,b),tt=Math.min(tt,x),y=Math.max(y,x),te=Math.min(te,ne),Ye=Math.max(Ye,ne),tt=Math.min(tt,E),y=Math.max(y,E),new Tn(te,tt,Ye-te,y-tt)},ot.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),cr(a.copy(),this.Ab)};function om(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Xp(a){return a=rp.get(a),a!==null?new a:new mo}fn.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===Ka&&b[0]==="S")if(b==="StartingFirstTransaction"){var E=this;a=this.toolManager,a.mouseDownTools.each(function(fe){return fe.diagram=E}),a.mouseMoveTools.each(function(fe){return fe.diagram=E}),a.mouseUpTools.each(function(fe){return fe.diagram=E}),this.ld||this.hf||(this.Jk=!0,this.fn&&(this.kg=!0))}else b==="StartingUndo"||b==="StartingRedo"?(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc(),this.R("ChangingSelection",this.selection)):b==="StartedTransaction"&&(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc());else if(this.aa){this.aa=!1;try{if(a.modelChange===""&&x===Ka){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),ba(this));var te=this.animationManager;b==="RolledBackTransaction"&&te.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||Ss(te),b==="CommittedTransaction"&&this.undoManager.isJustDiscarded&&(this.Ce=Math.min(this.Ce,this.undoManager.historyIndex-1)),b!=="CommittedTransaction"&&b!=="RolledBackTransaction"||!this.undoManager.isPendingUnmodified||setTimeout(function(){y.isModified=!1},1);var ne=a.isTransactionFinished;if(ne&&(om(this),this.As.clear(),qo(this.animationManager)),!this.Rt&&ne&&this.lastInput.targetDiagram){this.Rt=!0;var ae=this;dn(function(){ae.currentTool.standardMouseOver(),ae.Rt=!1},10)}}}finally{this.aa=!0}}}};function Zd(a,y){y=y.O.s;for(var x=y.length,b=0;b<x;b++)sd(a,y[b])}function sd(a,y){if(y instanceof vl){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof In&&x.Bg.add(a);var b=y.Eg;if(b!==null&&b.sq===!0&&y.diagram!==null&&y.diagram.Xn.add(y),x.hn)if(x=x.getAttribute("src")||"",b=a.Og.I(x),b===null)b=[],b.push(y),a.Og.add(x,b);else{for(a=0;a<b.length;a++)if(b[a]===y)return;b.push(y)}}}}function Jp(a,y){if(y instanceof vl){var x=y.element;if(x!==null&&x instanceof HTMLImageElement&&x.hn){var b=x.getAttribute("src")||"",E=a.Og.I(b);if(E!==null){for(var te=0;te<E.length;te++)if(E[te]===y){E.splice(te,1),E.length===0&&(a.Og.remove(b),x.Fq&&x.removeEventListener("load",x.Fq),x.Yp&&x.removeEventListener("error",x.Yp),delete x.Fq,delete x.Yp,x.Bg instanceof In&&x.Bg.remove(a),vp(b));break}}}}}fn.prototype.Wd=function(){this.partManager.Wd()},fn.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},fn.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},fn.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},fn.prototype.Vb=function(a){return this.partManager.Vb(a)},fn.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},ot=fn.prototype,ot.Lc=function(a){return this.partManager.Lc(a)},ot.ii=function(a){return this.partManager.ii(a)},ot.Kc=function(a){return this.partManager.Kc(a)},ot.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:Hr(Nr(y)))},ot.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:Hr(Nr(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())}ot.Va=function(){if(this.Zi){var a=Tn.alloc();Qp(this,this.computeBounds(a)),Tn.free(a)}},ot.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},ot.qz=function(){return this.ai.iterator},ot.Uz=function(a){ba(this),a&&qf(this,!0),this.ld?qp(this,!1):(this.Jk=!0,fl(this))};function qf(a,y){for(var x=a.ai.iterator;x.next();)sm(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function sm(a,y,x){if(y!==null){for(var b=y.gl.iterator;b.next();)sm(a,b.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function qp(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var b=a.undoManager.transactionLevel,E=a.layout,te=a.animationManager;try{b===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=b&&!te.defaultAnimation.isAnimating&&!te.zb&&(y||Jo(te,"Layout")),a.xh=!1;for(var ne=a.ai.iterator;ne.next();)eg(a,ne.value,y,b);E.isValidLayout||(!y||E.isRealtime||E.isRealtime===null||b===0?(E.doLayout(a),ba(a),E.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,b===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||b!==0&&b!==1||Ss(te),a.aa=x}}}function eg(a,y,x,b){if(y!==null){for(var E=y.gl.iterator;E.next();)eg(a,E.value,x,b);E=y.layout,E===null||E.isValidLayout||(!x||E.isRealtime||b===0?(y.rh=!y.location.w(),E.doLayout(y),y.C(32),fs(a,y),E.isValidLayout=!0):a.xh=!0)}}ot.yz=function(){for(var a=new Bn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function nv(a){function y(E){var te=E.toLowerCase(),ne=new Bn;x.add(E,ne),x.add(te,ne),b.add(E,E),b.add(te,E)}var x=new ci,b=new ci;y("InitialAnimationStarting"),y("AnimationStarting"),y("AnimationFinished"),y("BackgroundSingleClicked"),y("BackgroundDoubleClicked"),y("BackgroundContextClicked"),y("ClipboardChanged"),y("ClipboardPasted"),y("DocumentBoundsChanged"),y("ExternalObjectsDropped"),y("GainedFocus"),y("InitialLayoutCompleted"),y("LayoutCompleted"),y("LinkDrawn"),y("LinkRelinked"),y("LinkReshaped"),y("LostFocus"),y("Modified"),y("ObjectSingleClicked"),y("ObjectDoubleClicked"),y("ObjectContextClicked"),y("PartCreated"),y("PartResized"),y("PartRotated"),y("SelectionMoved"),y("SelectionCopied"),y("SelectionDeleting"),y("SelectionDeleted"),y("SelectionGrouped"),y("SelectionUngrouped"),y("ChangingSelection"),y("ChangedSelection"),y("SubGraphCollapsed"),y("SubGraphExpanded"),y("TextEdited"),y("TreeCollapsed"),y("TreeExpanded"),y("ViewportBoundsChanged"),y("InvalidateDraw"),a.iw=x,a.hw=b}function am(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function ep(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;At("Unknown DiagramEvent name: "+y)}ot.Bj=function(a,y){return a=ep(this,a),a!==null&&a.add(y),this},ot.am=function(a,y){a=ep(this,a),a!==null&&a.remove(y)},ot.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}ot.Yj=function(a,y){return np(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},fn.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 ri&&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 er)for(y=y.memberParts;y.next();)E=y.value,E instanceof ri&&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)}fn.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=dn(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))}fn.prototype.ug=function(){this.vk!==-1&&(Et.clearTimeout(this.vk),this.vk=-1)},fn.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=Tt.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(Ur)||(y=new Tt(y.x+te.x/E,y.y+te.y/E)),Tn.free(b),Tt.free(te),y},ot=fn.prototype,ot.Cs=function(){return null},ot.av=function(){return null},ot.bs=function(a,y){this.pj.add(a,y)},ot.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof er&&(y.$p=null)})};function wf(a,y,x){function b(){var Me=+new Date;for(te=!0,ne.reset();ne.next();)if(!ne.value[0].al){te=!1;break}te||Me-_e>fe?y(x,E,ae):Et.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 Et.requestAnimationFrame(function(){b()}),null}ot.Wz=function(a){return ys?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},ot.Jx=function(a){return a===void 0&&(a={}),wf(this,this.Xz,a)},ot.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"&&At('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"&&At("properties argument must be an Object.");var E=y.size||null,te=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(te="NaN");var ne=y.maxSize;y.maxSize===void 0&&(ne=x==="SVG"?new Qn(1/0,1/0):new Qn(2e3,2e3));var ae=y.position||null,fe=y.parts||null,_e=y.padding===void 0?1:y.padding,Me=y.background||null,Fe=y.omitTemporary;Fe===void 0&&(Fe=!0);var Ye=y.document||document,tt=y.elementFinished||null,st=y.showTemporary;st===void 0&&(st=!Fe),y=y.showGrid,y===void 0&&(y=st),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof _e=="number"?_e=new Mi(_e):_e instanceof Mi||At("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),Fe=new Du(null,Ye,void 0,!0);var pt=Fe.context;if(!(E||te||fe||ae))return Fe.width=a.Aa+Math.ceil(_e.left+_e.right),Fe.height=a.ya+Math.ceil(_e.top+_e.bottom),x==="SVG"?b===null?null:(b.resize(Fe.width,Fe.height,Fe.width,Fe.height),b.ownerDocument=Ye,b.hs=tt,Ys(a,b.context,_e,new Qn(Fe.width,Fe.height),a.Ca,a.pa,fe,Me,st,y),b.context):(a.Xm=!1,Ys(a,pt,_e,new Qn(Fe.width,Fe.height),a.Ca,a.pa,fe,Me,st,y),a.Xm=!0,Fe.context);var It=a.Pp,Mt=a.documentBounds.copy();if(Mt.Fv(a.yb),st)for(var Ht=a.Wa.s,Gt=Ht.length,Zt=0;Zt<Gt;Zt++){var Xt=Ht[Zt];if(Xt.visible&&Xt.isTemporary){Xt=Xt.Pa.s;for(var pn=Xt.length,ii=0;ii<pn;ii++){var fi=Xt[ii];fi.isInDocumentBounds&&fi.isVisible()&&(fi=fi.actualBounds,fi.w()&&Mt.ed(fi))}}}if(Ht=new Tt(Mt.x,Mt.y),fe!==null){for(Gt=new Tn(0,0,0,0),Zt=!0,Xt=fe.iterator,Xt.reset();Xt.next();)pn=Xt.value,pn instanceof Ti&&(ii=pn.layer,ii!==null&&!ii.visible||ii!==null&&!st&&ii.isTemporary||!pn.isVisible()||(pn=pn.actualBounds,pn.w()&&(Zt?(Zt=!1,Gt.assign(pn)):Gt.ed(pn))));Mt.width=Gt.width,Mt.height=Gt.height,Ht.x=Gt.x,Ht.y=Gt.y}return ae!==null&&ae.w()&&(Ht=ae,te||(te=It)),Gt=ae=0,_e!==null&&(ae=_e.left+_e.right,Gt=_e.top+_e.bottom),Zt=Xt=0,E!==null&&(Xt=E.width,Zt=E.height,isFinite(Xt)&&(Xt=Math.max(0,Xt-ae)),isFinite(Zt)&&(Zt=Math.max(0,Zt-Gt))),E!==null&&te!==null?(te==="NaN"&&(te=It),E.w()?(E=Xt,Mt=Zt):isNaN(Zt)?(E=Xt,Mt=Mt.height*te):(E=Mt.width*te,Mt=Zt)):E!==null?E.w()?(te=Math.min(Xt/Mt.width,Zt/Mt.height),E=Xt,Mt=Zt):isNaN(Zt)?(te=Xt/Mt.width,E=Xt,Mt=Mt.height*te):(te=Zt/Mt.height,E=Mt.width*te,Mt=Zt):te!==null?te==="NaN"&&ne.w()?(te=Math.min((ne.width-ae)/Mt.width,(ne.height-Gt)/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+=Gt):_e=new Mi(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))),Fe.width=Math.ceil(E),Fe.height=Math.ceil(Mt),x==="SVG"?b===null?null:(b.resize(Fe.width,Fe.height,Fe.width,Fe.height),b.ownerDocument=Ye,b.hs=tt,Ys(a,b.context,_e,new Qn(Math.ceil(E),Math.ceil(Mt)),te,Ht,fe,Me,st,y),b.context):(a.Xm=!1,Ys(a,pt,_e,new Qn(Math.ceil(E),Math.ceil(Mt)),te,Ht,fe,Me,st,y),a.Xm=!0,Fe.context)}Je.Object.defineProperties(fn.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof ze||(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,Et.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,Et.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(Et,"resize",this.Ov,!1),this.removeEventListener(Et,"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)&&En(a,"0 <= value <= 1",fn,"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&&En(a,">= 0",fn,"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&&En(a,">= 0",fn,"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 En(a,">= 0",fn,"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&&At("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=Ph(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var b=this.vb;this.vb=!0,Jo(this.animationManager,"Model"),y&&(this.pf!==null&&this.pf.each(function(te){return y.ik(te)}),y.ik(this.Oc)),this.cc=a,this.partManager=Xp(this.cc.type);for(var E=0;E<x.length;E++)this.add(x[E]);a.Pe(this.Hb),this.partManager.addAllModeledParts(),a.ik(this.Hb),a.Pe(this.Oc),this.pf!==null&&this.pf.each(function(te){return a.Pe(te)}),this.vb=b,this.Ya(),this.vb||this.N(),y&&a.undoManager.copyProperties(y.undoManager)}}},aa:{get:function(){return this.rw},set:function(a){this.rw=a}},As:{get:function(){return this.sy}},skipsModelSourceBindings:{get:function(){return this.Iw},set:function(a){this.Iw=a}},Ns:{get:function(){return this.ou},set:function(a){this.ou=a}},nodeTemplate:{get:function(){return this.Lg.I("")},set:function(a){var y=this.Lg.I("");y!==a&&(this.Lg.add("",a),this.g("nodeTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},nodeTemplateMap:{get:function(){return this.Lg},set:function(a){var y=this.Lg;y!==a&&(this.Lg=a,this.g("nodeTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplate:{get:function(){return this.Yi.I("")},set:function(a){var y=this.Yi.I("");y!==a&&(this.Yi.add("",a),this.g("groupTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplateMap:{get:function(){return this.Yi},set:function(a){var y=this.Yi;y!==a&&(this.Yi=a,this.g("groupTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplate:{get:function(){return this.Kh.I("")},set:function(a){var y=this.Kh.I("");y!==a&&(this.Kh.add("",a),this.g("linkTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplateMap:{get:function(){return this.Kh},set:function(a){var y=this.Kh;y!==a&&(this.Kh=a,this.g("linkTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},isMouseCaptured:{get:function(){return this.qw},set:function(a){var y=this.ta;y!==null&&(y=y.Oa,y instanceof SVGElement||(a?(this.lastInput.bubbles=!1,this.removeEventListener(y,"pointermove",this.dk,!1),this.removeEventListener(y,"pointerdown",this.ui,!1),this.removeEventListener(y,"pointerup",this.fk,!1),this.removeEventListener(y,"pointerout",this.ek,!1),this.removeEventListener(y,"pointercancel",this.ck,!1),this.addEventListener(Et,"pointermove",this.dk,!0),this.addEventListener(Et,"pointerdown",this.ui,!0),this.addEventListener(Et,"pointerup",this.fk,!0),this.addEventListener(Et,"pointerout",this.ek,!0),this.addEventListener(Et,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(Et,"wheel",this.$j,!0),this.addEventListener(Et,"selectstart",this.preventDefault,!1)):(this.removeEventListener(Et,"pointermove",this.dk,!0),this.removeEventListener(Et,"pointerdown",this.ui,!0),this.removeEventListener(Et,"pointerup",this.fk,!0),this.removeEventListener(Et,"pointerout",this.ek,!0),this.removeEventListener(Et,"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(Et,"wheel",this.$j,!0),this.removeEventListener(Et,"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=Tt.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),ma(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?Mc(this):(this.vb=!0,a=this.scale,xf(this,this.Sp,this.Aa/a,this.ya/a,this.zk,!1),this.vb=!1),this.vb||this.onViewportBoundsChanged(x,this.viewportBounds,this.Ca,!1)}Tt.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!==Gn.Grid&&At("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||At("fixedBounds width/height must not be Infinity"),this.ut=a=a.J(),this.Ya(),this.g("fixedBounds",y,a))}},scrollMargin:{get:function(){return this.rj},set:function(a){typeof a=="number"&&(a=new Mi(a));var y=this.rj;y.D(a)||(this.rj=a=a.J(),this.g("scrollMargin",y,a),this.hk())}},scrollMode:{get:function(){return this.sj},set:function(a){var y=this.sj;y!==a&&(this.sj=a,a===Th&&ql(this,!1),this.g("scrollMode",y,a),this.Ee=!0,this.N())}},scrollsPageOnFocus:{get:function(){return this.nu},set:function(a){var y=this.nu;y!==a&&(this.nu=a,this.g("scrollsPageOnFocus",y,a))}},positionComputation:{get:function(){return this.Zt},set:function(a){var y=this.Zt;y!==a&&(this.Zt=a,ql(this,!1),this.g("positionComputation",y,a))}},scaleComputation:{get:function(){return this.fu},set:function(a){var y=this.fu;y!==a&&(this.fu=a,Yp(this,this.scale,this.scale),this.g("scaleComputation",y,a))}},documentBounds:{get:function(){return this.Sp}},isVirtualized:{get:function(){return this.It},set:function(a){var y=this.It;y!==a&&(this.It=a,this.g("isVirtualized",y,a))}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&Yp(this,y,a)}},defaultScale:{get:function(){return this.Pp},set:function(a){this.Pp=a}},autoScale:{get:function(){return this.yh},set:function(a){var y=this.yh;y!==a&&(this.yh=a,this.g("autoScale",y,a),a!==$a&&ql(this,!1))}},initialAutoScale:{get:function(){return this.Fg},set:function(a){var y=this.Fg;y!==a&&(this.Fg=a,this.g("initialAutoScale",y,a))}},initialViewportSpot:{get:function(){return this.Bt},set:function(a){var y=this.Bt;y!==a&&(a.sb()||At("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()||At("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)):En(a,"> 0",fn,"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)):En(a,"> 0",fn,"maxScale"))}},zoomPoint:{get:function(){return this.zu},set:function(a){this.zu.D(a)||(this.zu=a=a.J())}},contentAlignment:{get:function(){return this.zk},set:function(a){var y=this.zk;y.D(a)||(this.zk=a=a.J(),this.g("contentAlignment",y,a),ql(this,!1))}},initialContentAlignment:{get:function(){return this.pq},set:function(a){var y=this.pq;y.D(a)||(this.pq=a=a.J(),this.g("initialContentAlignment",y,a))}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Mi(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.Ya(),this.g("padding",y,a))}},partManager:{get:function(){return this.Pc},set:function(a){var y=this.Pc;y!==a&&(a.diagram!==null&&At("Cannot share PartManagers between Diagrams: "+a.toString()),y&&y.Xe(null),this.Pc=a,a.Xe(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;y!==a&&(this.Sc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",y,a),this.$b())}},isTreePathToChildren:{get:function(){return this.Ht},set:function(a){var y=this.Ht;if(y!==a&&(this.Ht=a,this.g("isTreePathToChildren",y,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Sg(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==kh&&a!==Qs&&a!==op&&At("Unknown Diagram.treeCollapsePolicy: "+a),this.uu=a,this.g("treeCollapsePolicy",y,a))}},Ue:{get:function(){return this.pw},set:function(a){this.pw=a}},avoidanceCellSize:{get:function(){return this.aw},set:function(a){this.Xh=null,this.aw=new Qn(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.bw},set:function(a){this.bw=Math.max(1,a)}},autoScrollInterval:{get:function(){return this.vp},set:function(a){var y=this.vp;y!==a&&(this.vp=a,this.g("autoScrollInterval",y,a))}},autoScrollRegion:{get:function(){return this.xp},set:function(a){typeof a=="number"&&(a=new Mi(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Je.Object.defineProperties(fn,{licenseKey:{get:function(){return ag.jc()},set:function(a){ag.add(a.replace(/\s/g,""))}},version:{get:function(){return Vd}}}),fn.prototype.makeImageData=fn.prototype.Jx,fn.prototype.makeImage=fn.prototype.Wz,fn.prototype.cacheGroupExternalLinks=fn.prototype.Fu,fn.prototype.addRenderer=fn.prototype.bs,fn.prototype.makeSVG=fn.prototype.av,fn.prototype.makeSvg=fn.prototype.Cs,fn.prototype.stopAutoScroll=fn.prototype.ug,fn.prototype.doAutoScroll=fn.prototype.gs,fn.prototype.isUnoccupied=fn.prototype.Yj,fn.prototype.raiseDiagramEvent=fn.prototype.R,fn.prototype.removeDiagramListener=fn.prototype.am,fn.prototype.addDiagramListener=fn.prototype.Bj,fn.prototype.findTreeRoots=fn.prototype.yz,fn.prototype.layoutDiagram=fn.prototype.Uz,fn.prototype.findTopLevelGroups=fn.prototype.qz,fn.prototype.findTopLevelNodesAndLinks=fn.prototype.rz,fn.prototype.ensureBounds=fn.prototype.Va,fn.prototype.findLinksByExample=fn.prototype.ls,fn.prototype.findNodesByExample=fn.prototype.ms,fn.prototype.findLinkForData=fn.prototype.Kc,fn.prototype.findNodeForData=fn.prototype.ii,fn.prototype.findPartForData=fn.prototype.Lc,fn.prototype.findLinkForKey=fn.prototype.findLinkForKey,fn.prototype.findNodeForKey=fn.prototype.Vb,fn.prototype.findPartForKey=fn.prototype.findPartForKey,fn.prototype.rebuildParts=fn.prototype.Wd,fn.prototype.transformViewToDoc=fn.prototype.Ps,fn.prototype.transformRectDocToView=fn.prototype.zA,fn.prototype.transformDocToView=fn.prototype.op,fn.prototype.centerRect=fn.prototype.es,fn.prototype.scrollToRect=fn.prototype.tv,fn.prototype.scroll=fn.prototype.scroll,fn.prototype.highlightCollection=fn.prototype.Jz,fn.prototype.highlight=fn.prototype.Iz,fn.prototype.selectCollection=fn.prototype.rA,fn.prototype.select=fn.prototype.select,fn.prototype.updateAllRelationshipsFromData=fn.prototype.rp,fn.prototype.updateAllTargetBindings=fn.prototype.updateAllTargetBindings,fn.prototype.commit=fn.prototype.commit,fn.prototype.rollbackTransaction=fn.prototype.Kf,fn.prototype.commitTransaction=fn.prototype.eb,fn.prototype.startTransaction=fn.prototype.Ea,fn.prototype.raiseChanged=fn.prototype.g,fn.prototype.raiseChangedEvent=fn.prototype.cb,fn.prototype.removeChangedListener=fn.prototype.ik,fn.prototype.addChangedListener=fn.prototype.Pe,fn.prototype.removeModelChangedListener=fn.prototype.mA,fn.prototype.addModelChangedListener=fn.prototype.Yw,fn.prototype.findLayer=fn.prototype.Qj,fn.prototype.removeLayer=fn.prototype.kA,fn.prototype.addLayerAfter=fn.prototype.Cy,fn.prototype.addLayerBefore=fn.prototype.Ww,fn.prototype.addLayer=fn.prototype.Al,fn.prototype.moveParts=fn.prototype.moveParts,fn.prototype.copyParts=fn.prototype.Kj,fn.prototype.removeParts=fn.prototype.Is,fn.prototype.remove=fn.prototype.remove,fn.prototype.add=fn.prototype.add,fn.prototype.clearDelayedGeometries=fn.prototype.bx,fn.prototype.setProperties=fn.prototype.nm,fn.prototype.attach=fn.prototype.Du,fn.prototype.set=fn.prototype.set,fn.prototype.resetInputOptions=fn.prototype.Sx,fn.prototype.setInputOption=fn.prototype.sA,fn.prototype.getInputOption=fn.prototype.Ql,fn.prototype.resetRenderingHints=fn.prototype.Tx,fn.prototype.setRenderingHint=fn.prototype.Xx,fn.prototype.getRenderingHint=fn.prototype.Gf,fn.prototype.maybeUpdate=fn.prototype.bd,fn.prototype.requestUpdate=fn.prototype.$b,fn.prototype.delayInitialization=fn.prototype.Xy,fn.prototype.isUpdateRequested=fn.prototype.Pz,fn.prototype.invalidateDocumentBounds=fn.prototype.Ya,fn.prototype.findObjectsNear=fn.prototype.og,fn.prototype.findPartsNear=fn.prototype.mz,fn.prototype.findObjectsIn=fn.prototype.Cf,fn.prototype.findPartsIn=fn.prototype.ux,fn.prototype.findObjectsAt=fn.prototype.ji,fn.prototype.findPartsAt=fn.prototype.lz,fn.prototype.findObjectAt=fn.prototype.ic,fn.prototype.findPartAt=fn.prototype.Ol,fn.prototype.focusObject=fn.prototype.zz,fn.prototype.alignDocument=fn.prototype.Jy,fn.prototype.zoomToRect=fn.prototype.BA,fn.prototype.zoomToFit=fn.prototype.zoomToFit,fn.prototype.diagramScroll=fn.prototype.kx,fn.prototype.focus=fn.prototype.focus;var rp=new ci,cm=null,ys=Et.document!==void 0,Kd=null,ad="",$a=new _n(fn,"None",0),tu=new _n(fn,"Uniform",1),ld=new _n(fn,"UniformToFill",2),bf=new _n(fn,"CycleAll",10),ng=new _n(fn,"CycleNotDirected",11),ig=new _n(fn,"CycleNotDirectedFast",12),rg=new _n(fn,"CycleNotUndirected",13),og=new _n(fn,"CycleDestinationTree",14),sg=new _n(fn,"CycleSourceTree",15),Th=new _n(fn,"DocumentScroll",1),Cf=new _n(fn,"InfiniteScroll",2),kh=new _n(fn,"TreeParentCollapsed",21),Qs=new _n(fn,"AllParentsCollapsed",22),op=new _n(fn,"AnyParentsCollapsed",23),ag=new Bn,Vd="2.3.10",$d="image",Pf=null,hm=!1;function Fa(){if(ys){var a=Et.document.createElement("canvas"),y=a.getContext("2d"),x=Pn("7ca11abfd022028846");y[x]=Pn("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",cn.Dx+"4ae6247590da4bb21c324ba3a84e385776",gr.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",nn.za],E=1;5>E;E++)y[Pn("7ca11abfd7330390")](Pn(b[E-1]),10,15*E);for(y[x]=Pn("39f046ebb36e4b"),x=1;5>x;x++)y[Pn("7ca11abfd7330390")](Pn(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(gr.prototype.Cd=gr.prototype.Eu),Pf=a}}fn.className="Diagram",fn.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=Et.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof fn?y.H:null},fn.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},fn.useDOM=function(a){ys=a?Et.document!==void 0:!1},fn.isUsingDOM=function(){return ys},fn.None=$a,fn.Uniform=tu,fn.UniformToFill=ld,fn.CycleAll=bf,fn.CycleNotDirected=ng,fn.CycleNotDirectedFast=ig,fn.CycleNotUndirected=rg,fn.CycleDestinationTree=og,fn.CycleSourceTree=sg,fn.DocumentScroll=Th,fn.InfiniteScroll=Cf,fn.TreeParentCollapsed=kh,fn.AllParentsCollapsed=Qs,fn.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=Et[Pn("76a715b2f73f148a")][Pn("72ba13b5")]||"";if(a.Rc=!0,ys){var b=fn[Pn("76a115b6ed251eaf4692")];if(b)for(var E=ag.iterator;E.next()&&(b=E.value,b=Pn(b).split(Pn("39e9")),!(6>b.length));){var te=Pn(b[1]).split(".");if(b[4]!=="7da71ca0")break;var ne=Pn(cn[Pn("6cae19")]).split(".");if(te[0]>ne[0]||te[0]===ne[0]&&te[1]>=ne[1]){var ae=Et[Pn("74a900bae4370f8b51")][Pn("6fbb13a1c2311e8a57")].toLowerCase();if(ne=ae[Pn("73a612b6fb191d")](Pn("3aad1ab6e022098b4dc4")),te=Pn(b[2]),-1<ne&&(ae=ae[Pn("73a612b6fb191d")](te.toLowerCase()+"/"),a.Rc=!(-1<ae&&ae<ne),!a.Rc))break;for(ne=x[Pn("76ad18b4f73e")],ae=x[Pn("73a612b6fb191d")](Pn("35e7"))+2;ae<ne;ae++)y+=x[ae];if(ne=y[Pn("73a612b6fb191d")](te),0>ne&&te!==Pn("7da71ca0ad381e90")&&(ne=y[Pn("73a612b6fb191d")](Pn("76a715b2ef3e149757"))),0>ne&&(ne=y[Pn("73a612b6fb191d")](Pn("76a715b2ef3e149757"))),0>ne&&(ne=y[Pn("73a612b6fb191d")](Pn("2bfa41fdb3784bca12"))),0>ne&&(ne=x[Pn("73a612b6fb191d")](Pn("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[Pn("73a612b6fb191d")](Pn("35"))||y[Pn("73a612b6fb191d")](Pn("35"))===-1),!a.Rc||x[Pn("73a612b6fb191d")](Pn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[Pn("73a612b6fb191d")](te)),!a.Rc)||(ne=Et[Pn("76a715b2f73f148a")][Pn("69ad17a1e03e")],ae=ne[Pn("73a612b6fb191d")](Pn("7fb002b6ed25128b4da25b2e")),-1<ae&&(a.Rc=!(ne[Pn("73a612b6fb191d")](te)>ae),!a.Rc)))break;if(te[0]==="#"){ne=Et.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[Pn("79a417a0f0181a8946")]=b,Et.document[Pn("78a712aa")]){Et.document[Pn("78a712aa")][Pn("7bb806b6ed32388c4a875b")](ne),fe=Et.getComputedStyle(ne).getPropertyValue(Pn("78a704b7e62456904c9b12701b6532a8"));var _e=Et.getComputedStyle(ne).getPropertyValue(Pn("75b817b0ea2202"));if(Et.document[Pn("78a712aa")][Pn("68ad1bbcf533388c4a875b")](ne),fe){if(ne=Et[Pn("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(Pn("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(b="."+b,te=0;te<document.styleSheets.length;te++){ne=document.styleSheets[te].rules||document.styleSheets[te].cssRules;for(var Me in ne)if(b===ne[Me].selectorText){a.Rc=!1;break e}}}}else a.Rc=null,a.Rc=!1}}}else{for(Me=x[Pn("76ad18b4f73e")],E=x[Pn("73a612b6fb191d")](Pn("35e7"))+2;E<Me;E++)y+=x[E];x=y[Pn("73a612b6fb191d")](Pn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[Pn("73a612b6fb191d")](Pn("35")))}}}return 0<a.Rc&&a!==a.wy}dm.className="DiagramHelper";function ah(a){this.j=a===void 0?new Tt:a,this.o=new Tt}Je.Object.defineProperties(ah.prototype,{point:{get:function(){return this.j},set:function(a){this.j=a}},shifted:{get:function(){return this.o},set:function(a){this.o=a}}});var _f="DraggingInfo";ah.className="DraggingInfo";function re(a,y,x){this.node=a,this.info=y,this.Su=x}re.className="DraggingNodeInfoPair";function pe(){this.reset()}pe.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new Qn(NaN,NaN).freeze(),this.gridSnapCellSpot=Xs,this.gridSnapOrigin=new Tt(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},pe.className="DraggingOptions";function De(a,y){if(typeof a=="string"||Et.Element&&a instanceof Element)var x=fn.call(this,a)||this;else x=fn.call(this)||this,y=a;return Oe(x),y&&x.nm(y),x}nt(De,fn);function Oe(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=qa,a.layout=new Pa}De.prototype.reset=function(){fn.prototype.reset.call(this),Oe(this)},De.className="Palette";function ze(a,y){if(typeof a=="string"||Et.Element&&a instanceof Element)var x=fn.call(this,a)||this;else x=fn.call(this)||this,y=a;var b=x;x.animationManager.isEnabled=!1,x.vb=!0,x.V=null,x.mn=!1,x.nn=!1,x.F=!0,x.u=!0,x.ia=0,x.o=!1,x.ql=null,x.Xx("drawShadows",!1),a=new Ti;var E=new hr;return E.stroke="magenta",E.strokeWidth=2,E.fill="transparent",E.name="BOXSHAPE",a.selectable=!0,a.selectionAdorned=!1,a.selectionObjectName="BOXSHAPE",a.locationObjectName="BOXSHAPE",a.resizeObjectName="BOXSHAPE",a.cursor="move",a.add(E),x.j=a,x.allowCopy=!1,x.allowDelete=!1,x.allowSelect=!0,x.autoScrollRegion=new Mi(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new 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 Tt(ae.x-ne.width/2,ae.y-ne.height/2)}},x.Pf=function(){b.Ya(),bt(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&&bt(b)},x.autoScale=tu,x.vb=!1,y&&Object.assign(x,y),x}nt(ze,fn),ze.prototype.computePixelRatio=function(){return 1},ze.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.ta,y=this.ib;if(a!==null&&y!==null){if(pu(this),this.ql===null){var x=new Du(null);x.width=a.width,x.height=a.height,this.ql=x}try{this.ta=this.ql,this.ib=this.ta.context,this.ib.Vc(!0),this.ib.setTransform(1,0,0,1,0,0),this.ib.clearRect(0,0,this.ta.width,this.ta.height),at(this)}finally{this.ta=a,this.ib=y}}}fn.prototype.redraw.call(this)},ze.prototype.gc=function(){if(this.Ka===null&&At("No div specified"),this.ta===null&&At("No canvas specified"),!(this.ta instanceof Tc)&&(Rv(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){pu(this);var y=this.ta;a=this.ib,a.Vc(!0),a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,y.width,y.height),1>this.updateDelay?at(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 at(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),ba(y));var te=a.Ab;te.reset(),a.scale!==1&&te.scale(a.scale),a.position.x===0&&a.position.y===0||te.translate(-a.position.x,-a.position.y),E=a.ib,E.scale(a.Mb,a.Mb),E.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),E.yc(),y=y.Wa.s,te=y.length;for(var ne=0;ne<te;ne++){var ae=y[ne],fe=a;if(ae.visible&&ae.opacity!==0){var _e=ae.diagram.grid.part;if(!x&&ae.isTemporary)b&&_e.layer===ae&&(ae=Ma(ae,E),_e.gc(E,fe),E.globalAlpha=ae);else{for(var Me=Ma(ae,E),Fe=fe.scale,Ye=Tn.alloc(),tt=ae.Pa.s,st=tt.length,pt=0;pt<st;pt++){var It=tt[pt];(b||It!==_e)&&ae.Oj(E,It,fe,null,Fe,Ye,!1)}Tn.free(Ye),E.globalAlpha=Me}}}}}function bt(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var b=y.selectionObject,E=Qn.alloc();E.h(x.width,x.height),b.desiredSize=E,Qn.free(E),a=2/a.scale,b instanceof hr&&(b.strokeWidth=a),y.location=new Tt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}ze.prototype.computeBounds=function(){var a=this.observed;if(a===null)return xr;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},ze.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},ze.prototype.onViewportBoundsChanged=function(a,y,x,b){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),bt(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))},Je.Object.defineProperties(ze.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof ze&&At("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),bt(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),bt(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)}}}),ze.className="Overview";function Dt(){ns.call(this),this.j=null}nt(Dt,ns),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 Tt(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new Tt(a.x-this.j.x,a.y-this.j.y)),!0)},Dt.prototype.doActivate=function(){this.j=null,ns.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 Tt(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new Tt(a.x-this.j.x,a.y-this.j.y)}}},Dt.className="OverviewDraggingTool";function Ot(){pr(this),this.H=ac,this.Ha=this.u=this.o=!0,this.F=this.V=this.nb=this.ia=!1,this.ij=this.j=null,this.Hb=1.05,this.Jt=NaN,this.sw=null,this.Au=NaN,this.yu=xr,this.hb=!0,this.cg=null,this.ob=200}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=Cr?y.meta:y.control,b=y.shift,E=y.alt,te=y.key;!x||te!=="C"&&te!=="Insert"?x&&te==="X"||b&&te==="Del"?this.canCutSelection()&&this.cutSelection():x&&te==="V"||b&&te==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&te==="Y"||E&&b&&te==="Backspace"?this.canRedo()&&this.redo():x&&te==="Z"||E&&te==="Backspace"?this.canUndo()&&this.undo():te==="Del"||te==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&te==="A"?this.canSelectAll()&&this.selectAll():te==="Esc"?this.canStopCommand()&&this.stopCommand():te==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):te==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):te==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):te==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):te==="PageUp"?b&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):te==="PageDown"?b&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):te==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):te==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):te===" "?this.canScrollToPart()&&this.scrollToPart():te==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():te==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&te==="0"?this.canResetZoom()&&this.resetZoom():b&&te==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!b&&te==="G"?this.canGroupSelection()&&this.groupSelection():x&&b&&te==="G"?this.canUngroupSelection()&&this.ungroupSelection():te==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():te==="ContextMenu"||y.event&&y.event.key==="ContextMenu"?this.canShowContextMenu()&&this.showContextMenu():y.bubbles=!0:this.canCopySelection()&&this.copySelection()},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 Bn,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 Tt(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===$a&&(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!==$a?!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===$a&&(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!==$a?!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;Jo(y,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&b===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.sw,this.Au=NaN,this.yu=xr):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),Ss(y)},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;Jo(x,"Scroll To Part");var b=this.scrollToPartPause;if(0<b){var E=Vt(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 ri&&fe.isTreeExpanded&&(!(fe instanceof er)||fe.isSubGraphExpanded);)fe=E.pop();0<E.length?(fe instanceof Ti&&y.tv(fe.actualBounds),fe instanceof ri&&!fe.isTreeExpanded&&(fe.isTreeExpanded=!0),fe instanceof er&&!fe.isSubGraphExpanded&&(fe.isSubGraphExpanded=!0)):(fe instanceof Ti&&y.es(fe.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){dn(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 Vt(a,y,x){if(y.isVisible())return x;if(y instanceof Qr)Vt(a,y.adornedPart,x);else if(y instanceof Vn){var b=y.fromNode;b!==null&&Vt(a,b,x),y=y.toNode,y!==null&&Vt(a,y,x)}else y instanceof ri&&(b=y.labeledLink,b!==null&&Vt(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),Vt(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),Vt(a,y,x));return x}Ot.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Ti)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Ot.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),Jo(y.animationManager,"Collapse Tree");var x=new Bn;if(a!==null&&a.isTreeExpanded)a.collapseTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof ri&&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 ri&&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 ri&&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"),Jo(y.animationManager,"Expand Tree");var x=new Bn;if(a!==null&&!a.isTreeExpanded)a.expandTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof ri&&!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 ri)||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 ri&&!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 Bn,te=a.selection.iterator;te.next();){var ne=te.value;ne.Zc()&&ne.canGroup()&&E.add(ne)}for(var ae=new Bn,fe=E.iterator;fe.next();){var _e=fe.value;te=!1;for(var Me=E.iterator;Me.next();)if(_e.Td(Me.value)){te=!0;break}te||ae.add(_e)}if(0<ae.count){var Fe=ae.first().containingGroup;if(Fe!==null)for(;Fe!==null;){E=!1;for(var Ye=ae.iterator;Ye.next();)if(!Ye.value.Td(Fe)){E=!0;break}if(E)Fe=Fe.containingGroup;else break}if(x instanceof er)Ru(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var tt=y.copyNodeData(x);qt(tt)&&(y.xf(tt),b=a.ii(tt))}if(b!==null){Fe!==null&&this.isValidMember(Fe,b)&&(b.containingGroup=Fe);for(var st=ae.iterator;st.next();){var pt=st.value;this.isValidMember(b,pt)&&(pt.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 Ln(a){var y=Hn();for(a=a.iterator;a.next();){var x=a.value;x instanceof Vn||y.push(x)}a=new In,x=y.length;for(var b=0;b<x;b++){for(var E=y[b],te=!0,ne=0;ne<x;ne++)if(E.Td(y[ne])){te=!1;break}te&&a.add(E)}return ei(y),a}Ot.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Vn)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 Bn;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var te=E.value;te instanceof er&&te.canUngroup()&&b.add(te)}var ne=new Bn;if(0<b.count){y.clearSelection(!0);for(var ae=b.iterator;ae.next();){var fe=ae.value;fe.expandSubGraph();var _e=fe.containingGroup,Me=_e!==null&&_e.data!==null?x.wa(_e.data):void 0;ne.addAll(fe.memberParts);for(var Fe=ne.iterator;Fe.next();){var Ye=Fe.value;if(Ye.isSelected=!0,!(Ye instanceof Vn)){var tt=Ye.data;tt!==null?x.mp(tt,Me):Ye.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 er))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof er&&y.canUngroup())return!0;return!1},Ot.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=Ln(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"),Jo(y.animationManager,"Collapse SubGraph");var x=new Bn;if(a!==null&&a.isSubGraphExpanded)a.collapseSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof er&&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 er&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof er&&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"),Jo(y.animationManager,"Expand SubGraph");var x=new Bn;if(a!==null&&!a.isSubGraphExpanded)a.expandSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof er&&!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 er&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof er&&!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 Mo&&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 Mo))return!1;if(a=a.part,a!==null&&a.canEdit())return!0}else for(y=y.selection.iterator;y.next();)if(a=y.value,a.canEdit()&&(a=a.Nl(function(x){return x instanceof Mo&&x.editable}),a!==null))return!0;return!1},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 Qt?E=a.ga(Fr):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new Tt(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 ci,a===null)return b;for(var te=a.iterator;te.next();)Ou(x,b,te.value,E,y);if(x.draggedLink!==null&&y.dragsLink)return b;for(te=a.iterator;te.next();)a=te.value,a instanceof Vn&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},Je.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||At("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 Qt(){pr(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Tt(NaN,NaN).freeze(),this.jd=Ho,this.Ab=new gr,this.wh=new gr,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=xa,this.uc=new 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=oo,this.Ag=this.io=0,this.V=this.tb=this.Dh=this.A=this.Ua=null,this.Uc=!1,this.jo=this.Ng=null}var Un,jn,mi,_i,Bi,tr,Dr,Sr,Zr,wo;Qt.prototype.cloneProtected=function(a){a.l=this.l|6144,a.pb=this.pb,a.bn=this.bn,a.Ma=this.Ma,a.pa.assign(this.pa),a.jd=this.jd.J(),this.Lb!==null?a.Lb=this.Lb.copy():a.Lb=null,a.Ca=this.Ca,a.Kb=this.Kb,a.Kg=this.Kg.J(),a.uc.assign(this.uc),a.Ib.assign(this.Ib),a.dc.assign(this.dc),a.Yn=this.Yn,this.ba!==null&&(a.ba=this.ba.copy()),a.Jb=this.Jb.J(),a.sk=this.sk.J(),a.io=this.io,a.Ag=this.Ag,this.Ua!==null&&(a.Ua=this.Ua.copy()),this.A!==null&&(a.A=this.A.nc?this.A:this.A.copy()),this.Dh!==null&&(a.Dh=Nn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},Qt.prototype.Vw=function(a){var y=this.Dh;if(on(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},Qt.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},Qt.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},Qt.prototype.copy=function(){return this.clone()},ot=Qt.prototype,ot.qb=function(a){a.classType===Vn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:At("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===Qt&&(this.stretch=a)},ot.toString=function(){return Fn(this.constructor)+"#"+Or(this)},ot.th=function(){this.A!==null&&(this.A.nc=!0)};function yr(a){a.A===null?a.A=new Lf:a.A.nc&&(a.A=a.A.copy())}ot.Xc=function(){if(this.ba===null){var a=new lg;a.Xi=ms,a.yj=ms,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},ot.cb=function(a,y,x,b,E,te,ne){var ae=this.part;if(ae!==null&&(ae.gk(a,y,x,b,E,te,ne),x===this&&a===Vo&&Ta(this)&&zo(this,ae,y),te=this.diagram,this.animationTriggers===null||te===null||!te.pi||te.undoManager.isUndoingRedoing||te.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&te.animationManager.isEnabled&&!te.animationManager.isTicking&&(this.jo===null&&(this.jo=new ci),ne=te.undoManager.transactionLevel===0,a.startCondition===wa?ne=!0:a.startCondition===zs&&(ne=!1),ne?(te=new gs,ls(a,te),ne=this.jo.get(a),ne!==null&&ne.stop(),this.jo.add(a,te),te.vu=this,te.Nw=a,te.add(this,y,b,E),te.start()):(Jo(te.animationManager,"Trigger"),te.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof Gn&&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 Gn&&qd(ae,function(fe){fe.data!==null&&fe.l&16777216&&fe.La(y)})};function zo(a,y,x){var b=a.ih();if(b!==null)for(var E=a.localBindings.iterator;E.next();){var te=E.value,ne=null;if(te.sourceName!==null){if(ne=LS(te,b,a),ne===null)continue;te.sp(a,ne,x,null)}else if(te.isToModel){var ae=y.diagram;ae===null||ae.skipsModelSourceBindings||te.sp(a,ae.model.modelData,x,b)}else{if(ae=b.data,ae===null)continue;var fe=y.diagram;fe===null||fe.skipsModelSourceBindings||te.sp(a,ae,x,b)}ne===a&&(ae=b.ks(te.Ai),ae!==null&&te.Mv(ae,ne,x))}}ot.ks=function(a){return this.bindingId===a?this:null},ot.g=function(a,y,x){this.cb(Vo,a,this,y,x)},ot.Ge=function(a,y,x,b){var E=this.uc;if(E.h(a,y,x,b),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new gr);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),te.pp(E)}};function ca(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}ot.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?qr(a.x,a.y,0,0,0,b.height)<=y||qr(a.x,a.y,0,b.height,b.width,b.height)<=y||qr(a.x,a.y,b.width,b.height,b.width,0)<=y||qr(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},ot.se=function(){return!0},ot.ca=function(a){var y=Tt.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return Tt.free(y),!1;var b=this.diagram;if(b!==null&&b.wq){var E=b.Ql("extraTouchThreshold"),te=b.Ql("extraTouchArea"),ne=te/2,ae=this.naturalBounds;b=this.Df()*b.scale;var fe=1/b;if(ae.width*b<E&&ae.height*b<E)return a=Eo(x.x-ne*fe,x.y-ne*fe,x.width+te*fe,x.height+te*fe,y.x,y.y),Tt.free(y),a}return E=!1,(this instanceof Qr||this instanceof hr?Eo(x.x-5,x.y-5,x.width+10,x.height+10,y.x,y.y):x.ca(y))&&(this.tb&&!this.tb.ca(y)?E=!1:this.areaBackground!==null&&x.ca(y)||this.Ma!==null&&this.dc.ca(a)?E=!0:E=this.gh(a)),Tt.free(y),E},ot.gh=function(a){var y=this.naturalBounds;return Eo(0,0,y.width,y.height,a.x,a.y)},ot.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=Tt.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)))),Tt.free(E),Tn.free(y),b},ot.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=Tt.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)))),Tt.free(E),b},ot.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=Tt.allocAt(0,0),E=Tt.allocAt(0,x.height),te=Tt.allocAt(x.width,x.height),ne=Tt.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=Tt.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)))),Tt.free(fe),Tn.free(x),!ae&&(nn.us(a,b,E)||nn.us(a,E,te)||nn.us(a,te,ne)||nn.us(a,ne,b))&&(ae=!0)}return Tt.free(b),Tt.free(E),Tt.free(te),Tt.free(ne),ae},ot.ga=function(a,y){if(y===void 0&&(y=new Tt),a instanceof vi){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},ot.mi=function(a){a===void 0&&(a=new Tn);var y=this.naturalBounds,x=this.oe,b=Tt.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),Ao(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),Ao(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),Ao(a,b.x,b.y,0,0),Tt.free(b),a},ot.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},ot.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},ot.qs=function(a,y){return y===void 0&&(y=new Tt),y.assign(a),this.oe.Cd(y),y},ot.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},ot.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,Me=te.m11*ne,Fe=ne*(te.m21*te.dy-te.m22*te.dx),Ye=ne*(te.m12*te.dx-te.m11*te.dy);return this.areaBackground!==null?(te=this.actualBounds,nn.Ff(te.left,te.top,te.right,te.bottom,a,y,x,b,E)):(ne=a*ae+y*_e+Fe,a=a*fe+y*Me+Ye,y=x*ae+b*_e+Fe,x=x*fe+b*Me+Ye,E.h(0,0),b=this.naturalBounds,x=nn.Ff(0,0,b.width,b.height,ne,a,y,x,E),E.transform(te),x)},Qt.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 Gn;switch(gl(this,!0)){case jn:ne=E=0,ae&&(y=a=1/0);break;case Un: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()||At("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),ea(this,!1)}},Qt.prototype.Wl=function(){},Qt.prototype.Dd=function(){return!1},Qt.prototype.arrange=function(a,y,x,b,E){this.Uk();var te=Tn.alloc();te.assign(this.Ib),this.Ib.ka(),nl(this)===!1?this.Ib.h(a,y,x,b):this.eh(a,y,x,b),this.Ib.freeze(),E===void 0?this.tb=null:this.tb=E,x=!1,E!==void 0?x=!0:(E=this.panel,E!==null&&Oh(E)&&(E=E.panel),E!==null&&(E=E.dc,b=this.measuredBounds,this.areaBackground!==null&&(b=this.Ib),x=y+b.height,b=a+b.width,x=!(0<=a+.05&&b<=E.width+.05&&0<=y+.05&&x<=E.height+.05),this instanceof Mo&&(a=this.naturalBounds,this.Lq>a.height||this.Cb>a.width))&&(x=!0)),this.l=x?this.l|256:this.l&-257,this.Ib.w()||At("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(te,this.Ib),Hc(this,!1),Tn.free(te)},ot=Qt.prototype,ot.eh=function(){};function Ya(a,y,x,b,E){if(a.Ib.h(y,x,b,E),!a.desiredSize.w()){var te=a.uc;x=a.Kg,y=x.right+x.left;var ne=x.top+x.bottom;switch(x=te.width+y,te=te.height+ne,b+=y,E+=ne,y=gl(a,!0),x===b&&te===E&&(y=jn),y){case jn:(x>b||te>E)&&(ea(a,!0),a.measure(x>b?b:x,te>E?E:te,0,0));break;case Un:ea(a,!0),a.measure(b,E,0,0);break;case _i:ea(a,!0),a.measure(b,te,0,0);break;case Bi:ea(a,!0),a.measure(x,E,0,0)}}}ot.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||jv(x,!0),this.N(),Sa(a,y)||(x.oh(),this.Pn(x)))},ot.Pn=function(a){this.portId!==null&&(jv(a,!0),a instanceof ri&&W1(a,this))},ot.gc=function(a,y){if(!gu(this,a,y)&&this.visible){var x=this.opacity;if(x!==0){var b=1;x!==1&&(b=a.globalAlpha,a.globalAlpha=b*x);var E="";this.filter!==""&&(E=a.filter,a.filter=this.filter);var te=this instanceof Gn&&Oh(this),ne=this.Ib;if(te){var ae=this.Ib,fe=this.dc,_e=this.areaBackground,Me=this.Ma;_e===null&&Me===null||a.yc(),_e!==null&&(ws(this,a,_e,!0,!0,fe,ae),_e instanceof fo&&_e.type===yu?(a.beginPath(),a.rect(ae.x,ae.y,ae.width,ae.height),a.ng(_e)):a.fillRect(ae.x,ae.y,ae.width,ae.height)),Me!==null&&(ws(this,a,Me,!0,!1,fe,ae),Me instanceof fo&&Me.type===yu?(a.beginPath(),a.rect(ae.x,ae.y,ae.width,ae.height),a.ng(Me)):a.fillRect(ae.x,ae.y,ae.width,ae.height)),this.hh(a,y)}if(!te&&(te||ne.width!==0&&ne.height!==0&&!isNaN(ne.x)&&!isNaN(ne.y))){te=this.transform,ae=this.panel,this.l&4096&&Ca(this),_e=this.part,fe=!1;var Fe=0;_e&&y.Gf("drawShadows")&&(fe=_e.isShadowed)&&(Me=_e.shadowOffset,Fe=Math.max(Me.y,Me.x)*y.scale*y.Mb),Me=this.Dd();var Ye;if(!(Ye=y.$i||!Me)){var tt=this.naturalBounds;Ye=this.wh;var st=Ye.m11,pt=Ye.m21,It=Ye.dx,Mt=Ye.m12,Ht=Ye.m22,Gt=Ye.dy,Zt,Xt=Zt=0;Ye=Zt*st+Xt*pt+It;var pn=Zt*Mt+Xt*Ht+Gt;Zt=tt.width+Fe,Xt=0;var ii=Zt*st+Xt*pt+It;Zt=Zt*Mt+Xt*Ht+Gt,Xt=Math.min(Ye,ii);var fi=Math.min(pn,Zt),li=Math.max(Ye+0,ii)-Xt,Kn=Math.max(pn+0,Zt)-fi;Ye=Xt,pn=fi,Zt=tt.width+Fe,Xt=tt.height+Fe,ii=Zt*st+Xt*pt+It,Zt=Zt*Mt+Xt*Ht+Gt,Xt=Math.min(Ye,ii),fi=Math.min(pn,Zt),li=Math.max(Ye+li,ii)-Xt,Kn=Math.max(pn+Kn,Zt)-fi,Ye=Xt,pn=fi,Zt=0,Xt=tt.height+Fe,ii=Zt*st+Xt*pt+It,Zt=Zt*Mt+Xt*Ht+Gt,Xt=Math.min(Ye,ii),fi=Math.min(pn,Zt),li=Math.max(Ye+li,ii)-Xt,Kn=Math.max(pn+Kn,Zt)-fi,Ye=Xt,pn=fi,Fe=y.viewportBounds,tt=Fe.x,st=Fe.y,Ye=!(Ye>Fe.width+tt||tt>li+Ye||pn>Fe.height+st||st>Kn+pn)}if(Ye){if(Ye=(this.l&256)!==0,a.clipInsteadOfFill&&(Ye=!1),this instanceof Mo&&(a.font=this.font),Ye){if(pn=ae.se()?ae.naturalBounds:ae.actualBounds,li=Math.max(ne.x,pn.x),Kn=Math.max(ne.y,pn.y),Fe=Math.min(ne.right,pn.right)-li,tt=Math.min(ne.bottom,pn.bottom)-Kn,st=this.tb,st!==null&&(li=st.x,Kn=st.y,Fe=st.width,tt=st.height),li>ne.width+ne.x||ne.x>pn.width+pn.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(li,Kn,Fe,tt),a.clip()}if(Me){if(!_e.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}fe&&(pn=_e.shadowOffset,a.Ev(pn.x*y.scale*this.scale*y.Mb,pn.y*y.scale*this.scale*y.Mb,_e.shadowBlur),lh(a),a.shadowColor=_e.shadowColor)}fe&&this.shadowVisible===!0?lh(a):fe&&this.shadowVisible===!1&&Uc(a),_e=this.naturalBounds,this.areaBackground!==null&&(a.yc(),nu(this,a,_e,ne)),a.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),fe&&va(this,ae)&&this.shadowVisible===null&&Uc(a),this.Ma!==null&&(a.yc(),Ml(this,a,_e,ne)),fe&&(this.Ma!==null||this.areaBackground!==null||va(this,ae))?(Vu(this,!0),this.shadowVisible===null&&Uc(a)):Vu(this,!1),this.hh(a,y),fe&&this.l&512&&lh(a),Me&&fe&&Uc(a),Ye&&(a.restore(),a.Vc(this instanceof Gn)),te.ws()||(y=1/(te.m11*te.m22-te.m12*te.m21),a.transform(te.m22*y,-te.m12*y,-te.m21*y,te.m11*y,y*(te.m21*te.dy-te.m22*te.dx),y*(te.m12*te.dx-te.m11*te.dy)))}}x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E)}}};function va(a,y){return y===null?!1:(Oh(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Gn.Auto||y.type===Gn.Spot)&&y.Pb()!==a)}ot.Dv=function(){};function nu(a,y,x,b){ws(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof fo&&a.areaBackground.type===yu?(y.beginPath(),y.rect(b.x,b.y,b.width,b.height),y.ng(a.areaBackground)):y.fillRect(b.x,b.y,b.width,b.height)}function Ml(a,y,x,b){var E=a.kq(),te=x.x,ne=x.y,ae=x.width+E,fe=x.height+E;ws(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof fo&&a.Ma.type===yu?(y.beginPath(),y.rect(te-E/2,ne-E/2,ae,fe),y.ng(a.Ma)):y.fillRect(te-E/2,ne-E/2,ae,fe)}function ja(a,y,x){for(var b=y.O.s,E=b.length,te=-1,ne=0;ne<E;ne++)if(b[ne]===a){te=ne;break}if(a=te,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===Gn.Table?(y=y.svg.getElementsByClassName("gojs-ts"),y=y.length!==0?y[0]:null,y!==null&&y.after(x)):y.svg.prepend(x);else{for(;a!==0&&!y.M(a-1).Ed();)a--;a===0?y.svg.prepend(x):(a=y.M(a-1).svg,a!==null?a.after(x):y.svg.appendChild(x))}}function gu(a,y,x){if(!(y instanceof Hl))return!1;if(!a.visible||a.opacity===0||a.Dd()&&!a.isVisible())return a.svg!==null&&a.svg.parentNode!==null&&a.svg.remove(),!0;var b=a.panel,E=a.nk(y);if(a.kk(y,x,E))return a.svg.parentElement!==null?(a.Dd()&&(y.ti=a.svg),!0):(a.Dd()?(y.ti!==null?y.ti.after(a.svg):y.Nj.prepend(a.svg),y.ti=a.svg):b&&ja(a,b,a.svg),!0);if(a.Dd()&&a.isShadowed){var te=a.shadowOffset;y.Ev(te.x*x.scale*a.scale*x.Mb,te.y*x.scale*a.scale*x.Mb,a.shadowBlur),lh(y),y.shadowColor=a.shadowColor}a instanceof Mo&&(y.font=a.font),y.yd=null;var ne=a.transform;te=a instanceof Gn;var ae=a instanceof Gn?Oh(a):!1;a.l&4096&&Ca(a);var fe=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,E&&(y.o=!0,te&&ae?(ug(y,1,0,0,1,0,0),a.svg=y.ad):te?(ug(y,ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy),a.svg=y.ad):ug(y,1,0,0,1,0,0)),E=a.naturalBounds,a.areaBackground!==null){var _e=ne.copy().Vj();y.rb.ha=[_e.m11,_e.m12,_e.m21,_e.m22,_e.dx,_e.dy],nu(a,y,E,fe),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return te||(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),a.background!==null&&(te?(ae&&(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),Ml(a,y,E,fe),ae&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],Ml(a,y,E,fe)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),ne=y.yd,E=a.part,ae=!1,E&&x.Gf("drawShadows")&&(ae=E.isShadowed),y.clipInsteadOfFill&&(ae=!1),a.Dd()&&ae&&lh(y),ae&&a.shadowVisible===!0?lh(y):ae&&a.shadowVisible===!1&&Uc(y),E=a.panel,ae&&va(a,E)&&a.shadowVisible===null&&Uc(y),y.Il&&(_e=x.computePixelRatio(),_e="drop-shadow("+y.shadowOffsetX/_e+"px "+y.shadowOffsetY/_e+"px "+y.shadowBlur/_e/2+"px "+y.shadowColor+")",a.background!==null&&ne.Ma.setAttributeNS(null,"filter",_e),a.areaBackground!==null&&ne.gd.setAttributeNS(null,"filter",_e)),ae&&(a.Ma!==null||a.areaBackground!==null||va(a,E))?(Vu(a,!0),a.shadowVisible===null&&Uc(y)):Vu(a,!1),E=ae,a.hh(y,x),te&&y.nh.pop(),y.o&&y.nh.pop(),ne=y.Gv.hs,ae=te?a.svg:y.yd,_e=a.svg,!te&&_e!==null&&ae!==_e&&_e.parentNode===a.panel.svg?(a.svg.replaceWith(ae),a.svg=ae,ae!==null&&a.$o(y,b,fe,ae),pl(y,_e),!0):(a.svg=ae,ne!==null&&ae===null&&(pm(y),y.nh.pop()),ae===null||(a.$o(y,b,fe,ae),y.Il&&(x=x.computePixelRatio(),a.Dv(ae,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),E&&a.l&512&&lh(y),a.Dd()&&Uc(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&ae.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&ae.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(ae):y.Nj.prepend(ae),y.ti=ae):b!==null&&ja(a,b,ae),ne!==null&&ne(a,ae)),!0)}ot.$o=function(a,y,x,b){var E=(this.l&256)!==0;if(a.clipInsteadOfFill&&(E=!1),E){var te=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,te.x),E=Math.max(x.y,te.y);var ne=Math.min(x.right,te.right)-y;x=Math.min(x.bottom,te.bottom)-E,te=this.tb,te!==null&&(y=te.x,E=te.y,ne=te.width,x=te.height),te=b.getAttribute("clip-path");var ae=null;te!==null&&(ae=a.svg.getElementById(te.split("#")[1].slice(0,-1))),ae===null?(te="CLIP"+bo++,ae=a.Ud("clipPath",{id:te}),y=a.Ud("rect",{x:y,y:E,width:ne,height:x}),this instanceof Gn&&(E=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")),ae.appendChild(y),a.svg.appendChild(ae),b.setAttributeNS(null,"clip-path","url(#"+te+")")):(a=ae.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",E.toString()),a.setAttribute("width",ne.toString()),a.setAttribute("height",x.toString()))}else b.removeAttributeNS(null,"clip-path"),pl(a,b)};function pl(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function za(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Nr(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()}}ot.hh=function(){},ot.lv=function(){this.Uc=!0},ot.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 Gn?Oh(this):!1;if(!(this instanceof Gn&&E))if(this instanceof vl){var te=this.bt;a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy],te!==null&&Xy(a,te[0],te[1],te[2],te[3],te[4],te[5],te[6],te[7]),x?y.lastElementChild.setAttributeNS(null,"transform",Jy(a)):y.setAttributeNS(null,"transform",Jy(a))}else if(!x||this instanceof Gn)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof hr){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 Gn))&&(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},ot.nk=function(a){if(this.background!==null||this.areaBackground!==null)return!0;var y=(this.l&256)!==0;return a.clipInsteadOfFill&&(y=!1),!!y};function ws(a,y,x,b,E,te,ne){if(x!==null){var ae=1,fe=1;if(typeof x=="string")b?y.fillStyle=x:y.strokeStyle=x;else if(x.type===Nh)b?y.fillStyle=x.color:y.strokeStyle=x.color;else{var _e=a.kq();if(ae=te.width,fe=te.height,E?(ae=ne.width,fe=ne.height):b||(ae+=_e,fe+=_e),(te=y instanceof Qd)&&x.xe&&(x.type===dp||x.yk===ae&&x.ft===fe))var Me=x.xe;else{var Fe=0,Ye=0,tt=0,st=0,pt=0,It=0;if(It=pt=0,E?(pt=ne.x,It=ne.y):b||(pt-=_e/2,It-=_e/2),Fe=x.start.x*ae+x.start.offsetX,Ye=x.start.y*fe+x.start.offsetY,tt=x.end.x*ae+x.end.offsetX,st=x.end.y*fe+x.end.offsetY,Fe+=pt,tt+=pt,Ye+=It,st+=It,x.type===ch)Me=y.createLinearGradient(Fe,Ye,tt,st);else if(x.type===yu)It=isNaN(x.endRadius)?Math.max(ae,fe)/2:x.endRadius,isNaN(x.startRadius)?(pt=0,It=Math.max(ae,fe)/2):pt=x.startRadius,Me=y.createRadialGradient(Fe,Ye,pt,tt,st,It);else if(x.type===dp)try{Me=y.createPattern(x.pattern,"repeat")}catch(Ht){Me=null}if(x.type!==dp&&(E=x.colorStops,E!==null))for(E=E.iterator;E.next();)Me.addColorStop(E.key,E.value);if(te&&(x.xe=Me,Me!==null&&(x.yk=ae,x.ft=fe),Me===null&&x.type===dp&&x.yk!==-1)){x.yk=-1;var Mt=a.diagram;Mt!==null&&x.yk===-1&&dn(function(){Mt.redraw()},600)}}b?y.fillStyle=Me:y.strokeStyle=Me}}}ot.rg=function(a){if(a instanceof Gn)e:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break e}y=y.panel}a=!1}else a=!1;return a},ot.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},ot.If=function(){for(var a=this instanceof Gn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Ca(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Iu(a,!1);return}if(y.translate(a.Ib.x-a.uc.x,a.Ib.y-a.uc.y),a.scale!==1||a.angle!==0){var x=a.naturalBounds;a.no(y,x.x,x.y,x.width,x.height)}Iu(a,!1),mu(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,mu(a,!1)):y.oe!==null&&(x=a.wh,x.reset(),y.se()?x.multiply(y.wh):y.panel!==null&&x.multiply(y.panel.wh),x.multiply(a.Ab),a.Kk=a.scale*y.Kk,mu(a,!1)))}ot.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=Tt.alloc();te.yi(y,x,b,E,Fr),a.rotate(this.Kb,te.x,te.y),Tt.free(te)}},ot.v=function(a){if(!iu(this)){a===void 0&&(a=!1),ea(this,!0),Hc(this,!0);var y=this.panel;y===null||a||y.v()}},ot.Uj=function(){iu(this)||(ea(this,!0),Hc(this,!0))};function tl(a){if(!nl(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof ri&&a.Bd(),y.$b())),Hc(a,!0)}}ot.Uk=function(){!(this.l&2048)&&(Iu(this,!0),mu(this,!0))},ot.Wu=function(){mu(this,!0)},ot.N=function(){var a=this.part;a!==null&&a.N()};function gl(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===Gn.Table?lc(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===Gn.Auto&&b.Pb()===a?ya(a,Un,y):x===tr?b!==null?b.type===Gn.Spot&&b.Pb()===a?ya(a,Un,y):(x=b.defaultStretch,x===tr?ya(a,jn,y):ya(a,x,y)):ya(a,jn,y):ya(a,x,y)}function lc(a,y,x,b){var E=a.stretch;if(E!==tr)return ya(a,E,b);var te=E=null;switch(y.stretch){case Bi:te=!0;break;case Un:te=!0}switch(x.stretch){case _i:E=!0;break;case Un:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===_i||y===Un),te===null&&(te=y===Bi||y===Un),E===!0&&te===!0?ya(a,Un,b):E===!0?ya(a,_i,b):te===!0?ya(a,Bi,b):ya(a,jn,b)}function ya(a,y,x){if(x)return y;if(y===jn||(x=a.desiredSize,x.w()))return jn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===_i)return jn;if(y===Un)return Bi}else{if(y===Bi)return jn;if(y===Un)return _i}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Bi)return jn;if(y===Un)return _i}else{if(y===_i)return jn;if(y===Un)return Bi}return y}function Vu(a,y){a.l=y?a.l|512:a.l&-513}function Ta(a){return(a.l&1024)!==0}function Ef(a,y){a.l=y?a.l|1024:a.l&-1025}function Iu(a,y){a.l=y?a.l|2048:a.l&-2049}function mu(a,y){a.l=y?a.l|4096:a.l&-4097}function iu(a){return(a.l&8192)!==0}function ea(a,y){a.l=y?a.l|8192:a.l&-8193}function nl(a){return(a.l&16384)!==0}function Hc(a,y){a.l=y?a.l|16384:a.l&-16385}ot.Gj=function(){this.svg=null},ot.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},ot.Av=function(){},ot.zv=function(a){return this.pa=a,tl(this),!0},ot.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},ot.kq=function(){return 0};function Xd(a){var y=a.part;if(y instanceof ri&&(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 Gn?a instanceof ri?a.Bd():a.qm(a,function(x){Xd(x)}):Xd(a))}ot.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new Hs(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&f1(a)&&At("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new Bn),this.localBindings.add(E),this},ot.set=function(a){return Object.assign(this,a),this},ot.Du=function(a){return iv(this,a),this},ot.apply=function(a){return a(this),this},ot.nm=function(a){return fu(this,a),this},ot.pz=function(){return this.ih()},ot.ih=function(){for(var a=this instanceof Gn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},ot.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new ci),this.animationTriggers.add(a.propertyName,a),this};function vu(a,y){for(var x=1;x<arguments.length;++x);x=arguments;var b=null,E=null;if(typeof a=="function")E=a;else if(typeof a=="string"){var te=sp.I(a);typeof te=="function"?(x=Nn(arguments),b=te(x),qt(b)||At('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=Et.go[a]}if(b===null&&(E!=null&&E.constructor||At("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 fn&&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?At("Undefined value at argument "+E+" for object being constructed by GraphObject.make: "+b):iv(b,te);return b}function iv(a,y){if(typeof y=="string")if(a instanceof Mo)a.text=y;else if(a instanceof hr)a.figure=y;else if(a instanceof vl)a.source=y;else if(a instanceof Gn)y=$u.I(y),y!==null&&(a.type=y);else if(a instanceof fo){var x=Jn(fo,y);x!==null?a.type=x:At("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof Yn?(y=Jn(Yn,y),y!==null&&(a.type=y)):a instanceof Vr&&(y=Jn(Vr,y),y!==null&&(a.type=y));else if(y instanceof Qt)a instanceof Gn||At("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof ta){var b;y.isRow&&typeof a.getRowDefinition=="function"?b=a.getRowDefinition(y.index):y.isRow||typeof a.getColumnDefinition!="function"||(b=a.getColumnDefinition(y.index)),b instanceof ta?Am(b,y):At("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof _n)typeof a.qb=="function"&&a.qb(y);else if(y instanceof sa)a.type=y;else if(y instanceof Hs)a instanceof Qt||a instanceof ta?a.bind(y):At("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof zl)a instanceof Qt?a.Jv(y):At("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Vs)a instanceof Yn&&a.type===Yn.o?a.figures.add(y):At("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Vr)a instanceof Vs?a.segments.add(y):At("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof es)a instanceof fn||a instanceof er?a.layout=y:At("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 yi;for(var E in y)b=parseFloat(E),isNaN(b)?x[E]=y[E]:a.addColorStop(b,y[E]);fu(a,x)}else if(a instanceof ta){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&At("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)&&At("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new yi;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);fu(a,E)}else fu(a,y);else At('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}Je.Object.defineProperties(Qt.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new Lf),this.A.zp=a)}},localBindings:{get:function(){return this.A!==null?this.A.te:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new Lf),this.A.te=a)}},srcBindings:{get:function(){return this.A!==null?this.A.wm:null},set:function(a){this.srcBindings!==a&&(this.A===null&&(this.A=new Lf),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(yr(this),this.A.Ci=a,this.Uc=!0,this.N(),this.g("shadowVisible",y,a))}},enabledChanged:{get:function(){return this.A!==null?this.A.Hb:null},set:function(a){var y=this.enabledChanged;y!==a&&(yr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:ol},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new ud),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===ol&&(this.angle=0))}},segmentIndex:{get:function(){return this.Ua!==null?this.Ua.u:-1/0},set:function(a){a=Math.round(a);var y=this.segmentIndex;y!==a&&(this.Ua===null&&(this.Ua=new ud),this.Ua.u=a,this.v(),this.g("segmentIndex",y,a))}},segmentFraction:{get:function(){return this.Ua!==null?this.Ua.o:0},set:function(a){isNaN(a)||0>a?a=0:1<a&&(a=1);var y=this.segmentFraction;y!==a&&(this.Ua===null&&(this.Ua=new ud),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:Ur},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:tr},set:function(a){var y=this.stretch;y!==a&&(yr(this),this.A.hg=a,this.v(),this.g("stretch",y,a))}},name:{get:function(){return this.A!==null?this.A.xa:""},set:function(a){var y=this.name;y!==a&&(yr(this),this.A.xa=a,this.part!==null&&(this.part.Rh=null),this.g("name",y,a))}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&En(a,"0 <= value <= 1",Qt,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(nf(y,y.actualBounds)))}},filter:{get:function(){return this.bn},set:function(a){var y=this.bn;y!==a&&(this.bn=a,this.Uc=!0,this.g("filter",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(nf(y,y.actualBounds)))}},visible:{get:function(){return(this.l&1)!==0},set:function(a){var y=(this.l&1)!==0;y!==a&&(this.l^=1,this.g("visible",y,a),y=this.panel,y!==null?y.v():this.Dd()&&this.Zb(a),this.N(),$y(this))}},pickable:{get:function(){return(this.l&2)!==0},set:function(a){var y=(this.l&2)!==0;y!==a&&(this.l^=2,this.g("pickable",y,a))}},fromLinkableDuplicates:{get:function(){return(this.l&4)!==0},set:function(a){var y=(this.l&4)!==0;y!==a&&(this.l^=4,this.g("fromLinkableDuplicates",y,a))}},fromLinkableSelfNode:{get:function(){return(this.l&8)!==0},set:function(a){var y=(this.l&8)!==0;y!==a&&(this.l^=8,this.g("fromLinkableSelfNode",y,a))}},toLinkableDuplicates:{get:function(){return(this.l&16)!==0},set:function(a){var y=(this.l&16)!==0;y!==a&&(this.l^=16,this.g("toLinkableDuplicates",y,a))}},toLinkableSelfNode:{get:function(){return(this.l&32)!==0},set:function(a){var y=(this.l&32)!==0;y!==a&&(this.l^=32,this.g("toLinkableSelfNode",y,a))}},isPanelMain:{get:function(){return(this.l&64)!==0},set:function(a){var y=(this.l&64)!==0;y!==a&&(this.l^=64,this.v(),this.g("isPanelMain",y,a))}},isActionable:{get:function(){return(this.l&128)!==0},set:function(a){var y=(this.l&128)!==0;y!==a&&(this.l^=128,this.g("isActionable",y,a))}},areaBackground:{get:function(){return this.A!==null?this.A.gd:null},set:function(a){var y=this.areaBackground;y!==a&&(a!==null&&Tf(a,"GraphObject.areaBackground"),a instanceof fo&&a.freeze(),yr(this),this.A.gd=a,this.N(),this.g("areaBackground",y,a))}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&Tf(a,"GraphObject.background"),a instanceof fo&&a.freeze(),this.Ma=a,this.N(),this.g("background",y,a))}},part:{get:function(){if(this.Dd())return this;if(this.Ng!==null)return this.Ng;var a;for(a=this.panel;a;){if(a instanceof Ti)return this.Ng=a;a=a.panel}return null}},svg:{get:function(){return this.V},set:function(a){this.V=a}},panel:{get:function(){return this.Me}},layer:{get:function(){var a=this.part;return a!==null?a.layer:null}},diagram:{get:function(){var a=this.part;return a!==null?a.diagram:null}},position:{get:function(){return this.pa},set:function(a){var y=a.x,x=a.y,b=this.pa,E=b.x;b=b.y,(E===y||isNaN(E)&&isNaN(y))&&(b===x||isNaN(b)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,E,b)&&this.g("position",new Tt(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&&At("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 hr&&this.qc(),this.g("desiredSize",b,a),Ta(this)&&(a=this.part,a!==null&&(zo(this,a,"width"),zo(this,a,"height"))))}},width:{get:function(){return this.jd.width},set:function(a){var y=this.jd.width;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new Qn(a,this.jd.height).freeze(),this.v(),this instanceof hr&&this.qc(),this.g("desiredSize",y,a),Ta(this)&&(a=this.part,a!==null&&zo(this,a,"width")))}},height:{get:function(){return this.jd.height},set:function(a){var y=this.jd.height;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new Qn(this.jd.width,a).freeze(),this.v(),this instanceof hr&&this.qc(),this.g("desiredSize",y,a),Ta(this)&&(a=this.part,a!==null&&zo(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:ir},set:function(a){var y=this.minSize;y.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),yr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:as},set:function(a){var y=this.maxSize;y.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=1/0),isNaN(a.height)&&(a.height=1/0),a.freeze(),yr(this),this.A.o=a,this.v(),this.g("maxSize",y,a))}},measuredBounds:{get:function(){return this.uc}},naturalBounds:{get:function(){return this.dc}},margin:{get:function(){return this.Kg},set:function(a){typeof a=="number"&&(a=new Mi(a));var y=this.Kg;y.D(a)||(this.Kg=a=a.J(),this.v(),this.g("margin",y,a))}},transform:{get:function(){return this.l&2048&&Ca(this),this.Ab}},oe:{get:function(){return this.l&4096&&Ca(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(yr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:jn},set:function(a){this.reshapingBehavior!==a&&(yr(this),this.A.Pf=a)}},alignment:{get:function(){return this.Jb},set:function(a){var y=this.Jb;y.D(a)||(a.Mc()&&!a.Xb()&&At("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),tl(this),this.g("alignment",y,a))}},column:{get:function(){return this.Ag},set:function(a){a=Math.round(a);var y=this.Ag;y!==a&&(0>a&&En(a,">= 0",Qt,"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&&En(a,">= 1",Qt,"columnSpan"),yr(this),this.A.ob=a,this.v(),this.g("columnSpan",y,a))}},row:{get:function(){return this.io},set:function(a){a=Math.round(a);var y=this.io;y!==a&&(0>a&&En(a,">= 0",Qt,"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&&En(a,">= 1",Qt,"rowSpan"),yr(this),this.A.Bi=a,this.v(),this.g("rowSpan",y,a))}},spanAllocation:{get:function(){return this.A!==null?this.A.Di:null},set:function(a){var y=this.spanAllocation;y!==a&&(yr(this),this.A.Di=a,this.v(),this.g("spanAllocation",y,a))}},alignmentFocus:{get:function(){return this.sk},set:function(a){var y=this.sk;y.D(a)||(this.sk=a=a.J(),this.v(),this.g("alignmentFocus",y,a))}},portId:{get:function(){return this.Yn},set:function(a){var y=this.Yn;if(y!==a){var x=this.part;x===null||x instanceof ri||At("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Gv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,V1(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:ms},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Xd(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&En(a,">= 0",Qt,"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&&En(a,">= 0",Qt,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:ms},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Xd(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&En(a,">= 0",Qt,"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&&En(a,">= 0",Qt,"fromMaxLinks"),this.Xc(),this.ba.iq=a,this.g("fromMaxLinks",y,a))}},cursor:{get:function(){return this.A!==null?this.A.j:""},set:function(a){var y=this.cursor;y!==a&&(yr(this),this.A.j=a,this.g("cursor",y,a))}},click:{get:function(){return this.A!==null?this.A.zh:null},set:function(a){var y=this.click;y!==a&&(yr(this),this.A.zh=a,this.g("click",y,a))}},doubleClick:{get:function(){return this.A!==null?this.A.Fh:null},set:function(a){var y=this.doubleClick;y!==a&&(yr(this),this.A.Fh=a,this.g("doubleClick",y,a))}},contextClick:{get:function(){return this.A!==null?this.A.Bh:null},set:function(a){var y=this.contextClick;y!==a&&(yr(this),this.A.Bh=a,this.g("contextClick",y,a))}},mouseEnter:{get:function(){return this.A!==null?this.A.Mh:null},set:function(a){var y=this.mouseEnter;y!==a&&(yr(this),this.A.Mh=a,this.g("mouseEnter",y,a))}},mouseLeave:{get:function(){return this.A!==null?this.A.Ph:null},set:function(a){var y=this.mouseLeave;y!==a&&(yr(this),this.A.Ph=a,this.g("mouseLeave",y,a))}},mouseOver:{get:function(){return this.A!==null?this.A.Qh:null},set:function(a){var y=this.mouseOver;y!==a&&(yr(this),this.A.Qh=a,this.g("mouseOver",y,a))}},mouseHover:{get:function(){return this.A!==null?this.A.Oh:null},set:function(a){var y=this.mouseHover;y!==a&&(yr(this),this.A.Oh=a,this.g("mouseHover",y,a))}},mouseHold:{get:function(){return this.A!==null?this.A.Nh:null},set:function(a){var y=this.mouseHold;y!==a&&(yr(this),this.A.Nh=a,this.g("mouseHold",y,a))}},mouseDragEnter:{get:function(){return this.A!==null?this.A.Of:null},set:function(a){var y=this.mouseDragEnter;y!==a&&(yr(this),this.A.Of=a,this.g("mouseDragEnter",y,a))}},mouseDragLeave:{get:function(){return this.A!==null?this.A.Xd:null},set:function(a){var y=this.mouseDragLeave;y!==a&&(yr(this),this.A.Xd=a,this.g("mouseDragLeave",y,a))}},mouseDrop:{get:function(){return this.A!==null?this.A.Lh:null},set:function(a){var y=this.mouseDrop;y!==a&&(yr(this),this.A.Lh=a,this.g("mouseDrop",y,a))}},actionDown:{get:function(){return this.A!==null?this.A.V:null},set:function(a){var y=this.actionDown;y!==a&&(yr(this),this.A.V=a,this.g("actionDown",y,a))}},actionMove:{get:function(){return this.A!==null?this.A.ia:null},set:function(a){var y=this.actionMove;y!==a&&(yr(this),this.A.ia=a,this.g("actionMove",y,a))}},actionUp:{get:function(){return this.A!==null?this.A.Ha:null},set:function(a){var y=this.actionUp;y!==a&&(yr(this),this.A.Ha=a,this.g("actionUp",y,a))}},actionCancel:{get:function(){return this.A!==null?this.A.F:null},set:function(a){var y=this.actionCancel;y!==a&&(yr(this),this.A.F=a,this.g("actionCancel",y,a))}},toolTip:{get:function(){return this.A!==null?this.A.$h:null},set:function(a){var y=this.toolTip;y!==a&&(yr(this),this.A.$h=a,this.g("toolTip",y,a))}},contextMenu:{get:function(){return this.A!==null?this.A.Ch:null},set:function(a){var y=this.contextMenu;y!==a&&(yr(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),Qt.prototype.trigger=Qt.prototype.Jv,Qt.prototype.findBindingPanel=Qt.prototype.ih,Qt.prototype.findTemplateBinder=Qt.prototype.pz,Qt.prototype.setProperties=Qt.prototype.nm,Qt.prototype.apply=Qt.prototype.apply,Qt.prototype.attach=Qt.prototype.Du,Qt.prototype.set=Qt.prototype.set,Qt.prototype.isEnabledObject=Qt.prototype.If,Qt.prototype.isVisibleObject=Qt.prototype.Ed,Qt.prototype.isContainedBy=Qt.prototype.rg,Qt.prototype.getNearestIntersectionPoint=Qt.prototype.rs,Qt.prototype.getLocalPoint=Qt.prototype.qs,Qt.prototype.getDocumentScale=Qt.prototype.Df,Qt.prototype.getDocumentAngle=Qt.prototype.li,Qt.prototype.getDocumentBounds=Qt.prototype.mi,Qt.prototype.getDocumentPoint=Qt.prototype.ga,Qt.prototype.intersectsRect=Qt.prototype.Yc,Qt.prototype.containedInRect=Qt.prototype.fh,Qt.prototype.containsRect=Qt.prototype.Re,Qt.prototype.containsPoint=Qt.prototype.ca,Qt.prototype.raiseChanged=Qt.prototype.g,Qt.prototype.raiseChangedEvent=Qt.prototype.cb,Qt.prototype.addCopyProperty=Qt.prototype.Vw;var sp=null;Qt.className="GraphObject",sp=new ci,Ah("Button",function(){function a(x,b){return x.diagram.ic(x.documentPoint,function(E){for(;E.panel!==null&&!E.isActionable;)E=E.panel;return E},function(E){return E===b})!==null}var y=vu(Gn,Gn.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof Gn){var E=x.fb("ButtonBorder");E!==null&&(E.fill=b?x._buttonFillNormal:x._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD",_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},vu(hr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new vi(0,0,2.76142374915397,2.761423749153969),spot2:new vi(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 Gn&&(x=b.fb("ButtonBorder"),x instanceof hr)){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 Gn&&(x=b.fb("ButtonBorder"),x instanceof hr&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof Gn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof hr){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 Gn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof hr){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 Gn&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof hr){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 Gn&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof hr))){var te=E.skipsUndoManager;E.skipsUndoManager=!0;var ne=b._buttonFillPressed;x.fill!==ne&&(x.fill=ne),ne=b._buttonStrokePressed,x.stroke!==ne&&(x.stroke=ne),E.skipsUndoManager=te}}},y}),Ah("TreeExpanderButton",function(){var a=vu("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},vu(hr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Bo},new Hs("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Hs("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof Qr&&(x=x.adornedPart),x instanceof ri){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isTreeExpanded){if(!b.canCollapseTree(x))return}else if(!b.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?b.collapseTree(x):b.expandTree(x)}}},a}),Ah("SubGraphExpanderButton",function(){var a=vu("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},vu(hr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Bo},new Hs("figure","isSubGraphExpanded",function(y,x){return x=x.panel,y?x._subGraphExpandedFigure:x._subGraphCollapsedFigure}).cp()));return a.click=function(y,x){if(x=x.part,x instanceof Qr&&(x=x.adornedPart),x instanceof er){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isSubGraphExpanded){if(!b.canCollapseSubGraph(x))return}else if(!b.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?b.collapseSubGraph(x):b.expandSubGraph(x)}}},a}),Ah("ToolTip",function(){return vu(Qr,Gn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Tt(0,3),shadowBlur:5},vu(hr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new vi(0,0,4,6),spot2:new vi(1,1,-4,-4)}))}),Ah("ContextMenu",function(){return vu(Qr,Gn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Tt(0,3),shadowBlur:5},new Hs("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Ah("ContextMenuButton",function(){var a=vu("Button");a.stretch=_i;var y=a.fb("ButtonBorder");return y instanceof hr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new vi(0,0,2,3),y.spot2=new vi(1,1,-2,-2)),a}),Ah("PanelExpanderButton",function(a){var y=fm(a,"COLLAPSIBLE"),x=vu("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},vu(hr,{name:"ButtonIcon",strokeWidth:2},new Hs("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof hr&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(b,E){var te=E.diagram;if(te!==null&&!te.isReadOnly){var ne=E.ih();ne===null&&(ne=E.part),ne!==null&&(E=ne.fb(y),E!==null&&(b.handled=!0,te.Ea("Collapse/Expand Panel"),E.visible=!E.visible,te.eb("Collapse/Expand Panel")))}},x}),Ah("CheckBoxButton",function(a){var y=fm(a);return a=vu("Button",{desiredSize:new Qn(14,14)},vu(hr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Un,geometryStretch:mi,visible:!1},y!==""?new Hs("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof Gn){var E=x.diagram;if(!(E===null||E.isReadOnly||y!==""&&E.model.isReadOnly)){x.handled=!0;var te=b.fb("ButtonIcon");E.Ea("checkbox"),te.visible=!te.visible,typeof b._doClick=="function"&&b._doClick(x,b),E.eb("checkbox")}}},a}),Ah("CheckBox",function(a){a=fm(a),a=vu("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Mi(0,1,0,0)});var y=vu(Gn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Mi(1),_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave,actionDown:a.actionDown,actionUp:a.actionUp,actionCancel:a.actionCancel,actionMove:a.actionMove,click:a.click,_buttonClick:a.click});return a.mouseEnter=null,a.mouseLeave=null,a.actionDown=null,a.actionUp=null,a.actionCancel=null,a.actionMove=null,a.click=null,y}),Qt.None=jn=new _n(Qt,"None",0),Qt.Default=tr=new _n(Qt,"Default",0),Qt.Vertical=Bi=new _n(Qt,"Vertical",4),Qt.Horizontal=_i=new _n(Qt,"Horizontal",5),Qt.Fill=Un=new _n(Qt,"Fill",3),Qt.Uniform=mi=new _n(Qt,"Uniform",1),Qt.UniformToFill=Dr=new _n(Qt,"UniformToFill",2),Qt.FlipVertical=Sr=new _n(Qt,"FlipVertical",1),Qt.FlipHorizontal=Zr=new _n(Qt,"FlipHorizontal",2),Qt.FlipBoth=wo=new _n(Qt,"FlipBoth",3),Qt.make=vu,Qt.getBuilders=function(){var a=new ci,y;for(y in sp)if(y!==y.toLowerCase()){var x=sp.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},Qt.defineBuilder=Ah,Qt.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 Qt))return y&&b.set(y),b;At('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},Qt.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=ir,this.o=as,this.hg=tr,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=Ur,this.rr=ol,this.j=this.V="None"}ud.prototype.copy=function(){var a=new ud;return a.u=this.u,a.o=this.o,a.F=this.F.J(),a.rr=this.rr,a.V=this.V,a.j=this.j,a},ud.className="LinkElementSettings";function lg(){this.yj=this.Xi=oo,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}lg.prototype.copy=function(){var a=new lg;return a.Xi=this.Xi.J(),a.yj=this.yj.J(),a.Vi=this.Vi,a.wj=this.wj,a.Wi=this.Wi,a.xj=this.xj,a.hq=this.hq,a.Tr=this.Tr,a.iq=this.iq,a.Ur=this.Ur,a},lg.className="LinkSettings";function Jd(){this.ha=[1,0,0,1,0,0]}Jd.prototype.copy=function(){var a=new Jd;return a.ha[0]=this.ha[0],a.ha[1]=this.ha[1],a.ha[2]=this.ha[2],a.ha[3]=this.ha[3],a.ha[4]=this.ha[4],a.ha[5]=this.ha[5],a},Jd.prototype.translate=function(a,y){this.ha[4]+=this.ha[0]*a+this.ha[2]*y,this.ha[5]+=this.ha[1]*a+this.ha[3]*y},Jd.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},Jd.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a!==0){if(this.translate(y,x),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.ha[1]*a+this.ha[3]*b,te=this.ha[0]*-b+this.ha[2]*a,ne=this.ha[1]*-b+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*b,this.ha[1]=E,this.ha[2]=te,this.ha[3]=ne,this.translate(-y,-x)}},Jd.className="STransform";function Mf(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Mf.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Mf.className="SGradient";function Tc(a,y,x){this.ownerDocument=a=y===void 0?Et.document:y,this.cA="http://www.w3.org/2000/svg",a!==void 0&&(this.Oa=this.Ud("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.style.display="block",this.style.letterSpacing="normal",this.style.wordSpacing="normal",this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink")),this.hs=null,this.context=new Hl(this,x)}Tc.prototype.resize=function(a,y,x,b){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=b+"px",this.Oa.setAttributeNS(null,"width",x+"px"),this.Oa.setAttributeNS(null,"height",b+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+x+" "+b),this.context.ww.firstElementChild.setAttributeNS(null,"width",x+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",b+"px"),!0):!1},Tc.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),qt(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},Je.Object.defineProperties(Tc.prototype,{width:{get:function(){return this.Oa.width.baseVal.value},set:function(a){this.Oa.setAttribute("width",a+"px")}},height:{get:function(){return this.Oa.height.baseVal.value},set:function(a){this.Oa.setAttribute("height",a+"px")}},style:{get:function(){return this.Oa.style}}}),Tc.className="SVGSurface";function Hl(a,y){this.Gv=a,this.svg=a.Oa,this.stack=[],this.nh=[],this.fillStyle="#000000",this.font="10px sans-serif",this.globalAlpha=1,this.lineCap="butt",this.lineDashOffset=0,this.lineJoin="miter",this.lineWidth=1,this.miterLimit=10,this.shadowBlur=0,this.shadowColor="rgba(0, 0, 0, 0)",this.shadowOffsetY=this.shadowOffsetX=0,this.Il=!1,this.strokeStyle="#000000",this.textAlign="start",this.clipInsteadOfFill=!1,this.Vg=this.Br=this.Ar=0,this.yd=this.ad=null,this.path=[],this.Yl={},this.Ct=!1,this.Yg=null,this.uj=0,this.rb=new Jd,this.j=pm(this),this.Nj=pm(this,"gojs-diagram"),this.Hl=this.ti=null;var x=bo++,b=this.Ud("clipPath",{id:"mainClip"+x});b.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=b,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(b),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function Yy(a,y,x,b,E,te,ne){a.Nj===void 0?ug(a,y,x,b,E,te,ne):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+b+", "+E+", "+te+", "+ne+")")}ot=Hl.prototype,ot.arc=function(a,y,x,b,E,te,ne,ae){var fe=2*Math.PI,_e=fe-1e-6,Me=x*Math.cos(b),Fe=x*Math.sin(b),Ye=a+Me,tt=y+Fe,st=te?0:1;b=te?b-E:E-b,(1e-6<Math.abs(ne-Ye)||1e-6<Math.abs(ae-tt))&&this.path.push(["L",Ye,+tt]),0>b&&(b=b%fe+fe),b>_e?(this.path.push(["A",x,x,0,1,st,a-Me,y-Fe]),this.path.push(["A",x,x,0,1,st,Ye,tt])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),st,a+x*Math.cos(E),y+x*Math.sin(E)])},ot.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},ot.Se=function(a){this.addPath(this.path,this.rb,a||0)},ot.bezierCurveTo=function(a,y,x,b,E,te){this.path.push(["C",a,y,x,b,E,te])},ot.clearRect=function(){},ot.clip=function(){this.Yl.clipPath=!0},ot.closePath=function(){this.path.push(["z"])},ot.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},ot.createPattern=function(a){var y="";a instanceof HTMLCanvasElement&&(y=a.toDataURL()),a instanceof HTMLImageElement&&(y=a.getAttribute("src"));var x=this.eA;if(x[y])return"url(#"+x[y]+")";var b="PATTERN"+bo++,E={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:b,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud($d,E)),this.svg.appendChild(a),x[y]=b,"url(#"+b+")"},ot.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)}ot.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 Me=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,b===void 0&&(te=y,ne=x,ae=b=Me,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:Me||b,height:a||E,href:_e},nn.$(b,ae)&&nn.$(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!==Me||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)},ot.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),rv(this,this.Yl)},ot.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},ot.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)},ot.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))},ot.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])},ot.lineTo=function(a,y){this.path.push(["L",a,y])},ot.moveTo=function(a,y){this.path.push(["M",a,y])},ot.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},ot.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"])},ot.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},ot.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())},ot.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]+")"}ot.scale=function(a,y){this.rb.scale(a,y)},ot.translate=function(a,y){this.rb.translate(a,y)},ot.transform=function(){},ot.yc=function(){},ot.stroke=function(){qy(this,this.Yl)},ot.jk=function(){this.clipInsteadOfFill||this.stroke()},ot.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},ot.addElement=function(a,y,x){return a=this.Ud(a,y,x),this.yd!==null?this.yd.appendChild(a):this.yd=a,this.ad=a};function ap(a,y,x,b){y==="fill"?rv(a,x):y==="stroke"&&qy(a,x),b!==null&&(a=b.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function rv(a,y){a.fillStyle instanceof Mf?y.fill=ov(a,a.fillStyle,!0):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.fill="rgb("+a[1]+","+a[2]+","+a[3]+")",y["fill-opacity"]=a[4]):y.fill=a.fillStyle}function Qy(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof Mf?y.setAttributeNS(null,"fill",ov(a,a.fillStyle,!0)):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.setAttributeNS(null,x,"rgb("+a[1]+","+a[2]+","+a[3]+")"),y.setAttributeNS(null,x+"-opacity",a[4])):y.setAttributeNS(null,x,a.fillStyle)}function qy(a,y){if(a.strokeStyle instanceof Mf)y.stroke=ov(a,a.strokeStyle,!1);else if(/^rgba\(/.test(a.strokeStyle)){var x=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.strokeStyle);y.stroke="rgb("+x[1]+","+x[2]+","+x[3]+")",y["stroke-opacity"]=x[4]}else y.stroke=a.strokeStyle;y["stroke-width"]=a.lineWidth,y["stroke-linecap"]=a.lineCap,y["stroke-linejoin"]=a.lineJoin,y["stroke-miterlimit"]=a.miterLimit,a.Ct&&(y["stroke-dasharray"]=a.Yg.toString(),y["stroke-dashoffset"]=a.uj)}function ov(a,y,x){var b="";if(b=a.Hl!==null?a.Hl.getAttribute(x?"fill":"stroke"):null,b!==null&&b.indexOf("GRAD")!==-1?(b=b.split("#")[1].slice(0,-1),x=a.svg.getElementById(b),x!==null&&x.remove()):b="GRAD"+bo++,y.type==="linear")x=a.Ud("linearGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,id:b,gradientUnits:"userSpaceOnUse"});else if(y.type==="radial")x=a.Ud("radialGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,r1:y.r1,r2:y.r2,id:b});else throw Error("invalid gradient");var E=y.gx;y=E.length;for(var te=[],ne=0;ne<y;ne++){var ae=E[ne],fe=ae.color;ae={offset:ae.offset,"stop-color":fe},/^rgba\(/.test(fe)&&(fe=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(fe),ae["stop-color"]="rgb("+fe[1]+","+fe[2]+","+fe[3]+")",ae["stop-opacity"]=fe[4]),te.push(ae)}for(te.sort(function(_e,Me){return _e.offset>Me.offset?1:-1}),E=0;E<y;E++)x.appendChild(a.Ud("stop",te[E]));return a.svg.appendChild(x),"url(#"+b+")"}ot.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var te=Nn(a[E]),ne=[te.shift()];if(ne[0]==="A")ne.push(te.shift()+","+te.shift(),te.shift(),te.shift()+","+te.shift(),te.shift()+","+te.shift());else for(;te.length;)ne.push(te.shift()+","+te.shift());b.push(ne.join(" "))}if(b=b.join(" "),a=this.Yl,a.clipPath)0<this.nh.length&&this.nh[this.nh.length-1].setAttributeNS(null,"clip-path",'path("'+b+'")');else if(a.d=b,ap(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var ae in a)ae!=="transform"&&y.setAttributeNS(null,ae,a[ae]);else{ae=y.getElementsByTagName("path");for(var fe in a)fe!=="transform"&&ae[x].setAttributeNS(null,fe,a[fe])}else this.addElement("path",a)};function ug(a,y,x,b,E,te,ne){var ae=new Jd;ae.ha=[y,x,b,E,te,ne],y={},ap(a,"g",y,ae),ae=a.addElement("g",y),a.nh.push(ae)}function pm(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}ot.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}ot.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},ot.fs=function(){this.Ct=!1},ot.Vc=function(){},ot.Wx=function(){},Hl.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Hl.prototype.getImageData=function(){return null},Hl.prototype.measureText=function(){return null};function gm(a,y){y=y.getAttribute("fill"),y!==null&&(y=y.split("#"),y.length!==1&&(y=a.svg.getElementById(y[1].slice(0,-1)),y!==null&&a.svg.innerHTML.match(new RegExp(y.id,"g")).length===1&&y.remove()))}Hl.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Hl.className="SVGContext",fn.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Tc(this,Et.document));var y=new Tc(this,Et.document,!0);a===void 0&&(a=new yi);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)},fn.prototype.makeSvg=fn.prototype.Cs,fn.prototype.av=function(a){return this.Cs(a)},fn.prototype.makeSVG=fn.prototype.av;function Du(a,y,x,b){this.ownerDocument=y=y===void 0?Et.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},Je.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&&At("Browser does not support HTML Canvas Element"),this.ct=this.et=this.dt="",this.Hm=!1,this.Vg=this.Br=this.Ar=0,this.Il=!1,this.El=new gr,this.isTemporary=!!x}ot=Qd.prototype,ot.Wx=function(a){this.Z.imageSmoothingEnabled=a},ot.arc=function(a,y,x,b,E,te){this.Z.arc(a,y,x,b,E,te)},ot.beginPath=function(){this.Z.beginPath()},ot.Se=function(){},ot.bezierCurveTo=function(a,y,x,b,E,te){this.Z.bezierCurveTo(a,y,x,b,E,te)},ot.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},ot.clip=function(){this.Z.clip()},ot.closePath=function(){this.Z.closePath()},ot.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},ot.createPattern=function(a,y){return this.Z.createPattern(a,y)},ot.createRadialGradient=function(a,y,x,b,E,te){return this.Z.createRadialGradient(a,y,x,b,E,te)},ot.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)},ot.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},ot.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},ot.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},ot.fillText=function(a,y,x){this.Z.fillText(a,y,x)},ot.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},ot.lineTo=function(a,y){this.Z.lineTo(a,y)},ot.measureText=function(a){return this.Z.measureText(a)},ot.moveTo=function(a,y){this.Z.moveTo(a,y)},ot.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},ot.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},ot.restore=function(){this.Z.restore()},ot.save=function(){this.yc(),this.Z.save()},Qd.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},ot=Qd.prototype,ot.setTransform=function(a,y,x,b,E,te){this.El.setTransform(a,y,x,b,E,te)},ot.scale=function(a,y){this.El.scale(a,y)},ot.translate=function(a,y){this.El.translate(a,y)},ot.stroke=function(){this.Z.stroke()},ot.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}},ot.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},ot.ng=function(a,y){if(a instanceof fo&&a.type===yu){var x=a.yk;a=a.ft,a>x?(this.scale(x/a,1),this.translate((a-x)/2,0)):x>a&&(this.scale(1,a/x),this.translate(0,(x-a)/2)),this.Hm?this.clip():this.fill(y),a>x?(this.translate(-(a-x)/2,0),this.scale(1/(x/a),1)):x>a&&(this.translate(0,-(x-a)/2),this.scale(1,1/(a/x)))}else this.Hm?this.clip():this.fill(y)},ot.jk=function(){this.Hm||this.stroke()},ot.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},ot.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},ot.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vx),a.lineDashOffset=0)},ot.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},ot.Hs=function(){},Je.Object.defineProperties(Qd.prototype,{fillStyle:{get:function(){return this.Z.fillStyle},set:function(a){this.ct!==a&&(this.ct=this.Z.fillStyle=a)}},font:{get:function(){return this.Z.font},set:function(a){this.dt!==a&&(this.dt=this.Z.font=a)}},globalAlpha:{get:function(){return this.Z.globalAlpha},set:function(a){this.Z.globalAlpha=a}},lineCap:{get:function(){return this.Z.lineCap},set:function(a){this.Z.lineCap=a}},lineDashOffset:{get:function(){return this.Z.lineDashOffset},set:function(a){this.Z.lineDashOffset=a}},lineJoin:{get:function(){return this.Z.lineJoin},set:function(a){this.Z.lineJoin=a}},lineWidth:{get:function(){return this.Z.lineWidth},set:function(a){this.Z.lineWidth=a}},miterLimit:{get:function(){return this.Z.miterLimit},set:function(a){this.Z.miterLimit=a}},shadowBlur:{get:function(){return this.Z.shadowBlur},set:function(a){this.Z.shadowBlur=a}},shadowColor:{get:function(){return this.Z.shadowColor},set:function(a){this.Z.shadowColor=a}},shadowOffsetX:{get:function(){return this.Z.shadowOffsetX},set:function(a){this.Z.shadowOffsetX=a}},shadowOffsetY:{get:function(){return this.Z.shadowOffsetY},set:function(a){this.Z.shadowOffsetY=a}},strokeStyle:{get:function(){return this.Z.strokeStyle},set:function(a){this.et!==a&&(this.et=this.Z.strokeStyle=a)}},textAlign:{get:function(){return this.Z.textAlign},set:function(a){this.Z.textAlign=a}},imageSmoothingEnabled:{get:function(){return this.Z.imageSmoothingEnabled},set:function(a){this.Z.imageSmoothingEnabled=a}},filter:{get:function(){return this.Z.filter},set:function(a){this.Z.filter=a===""?"none":a}},clipInsteadOfFill:{get:function(){return this.Hm},set:function(a){this.Hm=a}}});var vx=Object.freeze([]);Qd.className="CanvasSurfaceContext";function cg(){this.F=this.o=this.u=this.j=0}cg.className="ColorNumbers";function fo(a,y){hp||(hv(),hp=!0),pr(this),this._isFrozen=!1,a===void 0?(this.na=Nh,this.xk="black"):typeof a=="string"?(this.na=Nh,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===ch?(this.Qd=qa,this.Lk=Ga):this.Lk=a===yu?this.Qd=Fr:this.Qd=ms,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}fo.prototype.copy=function(){var a=new fo;return a.na=this.na,a.xk=this.xk,a.Qd=this.Qd.J(),a.Lk=this.Lk.J(),a.Gr=this.Gr,a.Xp=this.Xp,this.we!==null&&(a.we=this.we.copy()),a.cr=this.cr,a},ot=fo.prototype,ot.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},ot.ka=function(){return Object.isFrozen(this)&&At("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},ot.qb=function(a){a.classType===fo&&(this.type=a)},ot.toString=function(){var a="Brush(";if(this.type===Nh)a+=this.color;else if(a=this.type===ch?a+"Linear ":this.type===yu?a+"Radial ":this.type===dp?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,this.colorStops!==null)for(var y=this.colorStops.iterator;y.next();)a+=" "+y.key+":"+y.value;return a+")"},ot.addColorStop=function(a,y){return this._isFrozen&&an(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&En(a,"0 <= loc <= 1",fo,"addColorStop:loc"),this.we===null&&(this.we=new ci),this.we.add(a,y),this.na===Nh&&(this.type=ch),this.xe=null,this},ot.Vz=function(a,y){if(this._isFrozen&&an(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?fp:y,this.type===Nh)uh(this.color),this.color=up(a,y);else if((this.type===ch||this.type===yu)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)uh(x.value),this.addColorStop(x.key,up(a,y));return this};function e1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?fp:x,uh(a),up(y,x)}ot.Wy=function(a,y){if(this._isFrozen&&an(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?fp:y,this.type===Nh)uh(this.color),this.color=up(-a,y);else if((this.type===ch||this.type===yu)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)uh(x.value),this.addColorStop(x.key,up(-a,y));return this};function t1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?fp:x,uh(a),up(-y,x)}function sv(a,y,x){uh(a),a=Oo.j;var b=Oo.u,E=Oo.o,te=Oo.F;return uh(y),x===void 0&&(x=.5),"rgba("+Math.round((Oo.j-a)*x+a)+", "+Math.round((Oo.u-b)*x+b)+", "+Math.round((Oo.o-E)*x+E)+", "+Math.round((Oo.F-te)*x+te)+")"}ot.Gx=function(){if(this.type===Nh)return lp(this.color);if((this.type===ch||this.type===yu)&&this.colorStops!==null){var a=this.colorStops;if(this.type===yu)return lp(a.first().value);if(a.get(.5)!==null)return lp(a.get(.5));if(a.count===2)return a=a.Fa(),lp(sv(a[0].value,a[1].value));for(var y=a.iterator,x=-1,b=-1,E=1,te=1;y.next();){var ne=y.key,ae=Math.abs(.5-y.key);E>te&&ae<E?(x=ne,E=ae):te>=E&&ae<te&&(b=ne,te=ae)}return x>b&&(te=x,x=b,b=te,te=E),E=b-x,lp(sv(a.get(x),a.get(b),1-te/E))}return!1};function lp(a){return a?a instanceof fo?a.Gx():(uh(a),128>(299*Oo.j+587*Oo.u+114*Oo.o)/1e3):!1}function up(a,y){switch(y){case fp:y=100*lv(Oo.j);var x=100*lv(Oo.u),b=100*lv(Oo.o);return il.j=.4124564*y+.3575761*x+.1804375*b,il.u=.2126729*y+.7151522*x+.072175*b,il.o=.0193339*y+.119192*x+.9503041*b,il.F=Oo.F,y=cv(il.j/cp[0]),x=cv(il.u/cp[1]),b=cv(il.o/cp[2]),Gc.j=116*x-16,Gc.u=500*(y-x),Gc.o=200*(x-b),Gc.F=il.F,Gc.j=Math.min(100,Math.max(0,Gc.j+100*a)),a=(Gc.j+16)/116,y=a-Gc.o/200,il.j=cp[0]*n1(Gc.u/500+a),il.u=cp[1]*(Gc.j>mm*dv?Math.pow(a,3):Gc.j/mm),il.o=cp[2]*n1(y),il.F=Gc.F,a=-.969266*il.j+1.8760108*il.u+.041556*il.o,y=.0556434*il.j+-.2040259*il.u+1.0572252*il.o,Oo.j=255*uv((3.2404542*il.j+-1.5371385*il.u+-.4985314*il.o)/100),Oo.u=255*uv(a/100),Oo.o=255*uv(y/100),Oo.F=il.F,Oo.j=Math.round(Oo.j),255<Oo.j?Oo.j=255:0>Oo.j&&(Oo.j=0),Oo.u=Math.round(Oo.u),255<Oo.u?Oo.u=255:0>Oo.u&&(Oo.u=0),Oo.o=Math.round(Oo.o),255<Oo.o?Oo.o=255:0>Oo.o&&(Oo.o=0),"rgba("+Oo.j+", "+Oo.u+", "+Oo.o+", "+Oo.F+")";case i1:return av(),ru.o=Math.min(100,Math.max(0,ru.o+100*a)),"hsla("+ru.j+", "+ru.u+"%, "+ru.o+"%, "+ru.F+")";default:At("Unknown color space: "+y)}}function uh(a){hp||(hv(),hp=!0);var y=fv;if(y!==null){y.clearRect(0,0,1,1),y.fillStyle="#000000";var x=y.fillStyle;y.fillStyle=a,y.fillStyle!==x?(y.fillRect(0,0,1,1),a=y.getImageData(0,0,1,1).data,Oo.j=a[0],Oo.u=a[1],Oo.o=a[2],Oo.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Oo.j=0,Oo.u=0,Oo.o=0,Oo.F=1)}}function av(){var a=Oo.j/255,y=Oo.u/255,x=Oo.o/255,b=Math.max(a,y,x),E=Math.min(a,y,x),te=b-E;if(E=(b+E)/2,te===0)var ne=a=0;else{switch(b){case a:ne=(y-x)/te%6;break;case y:ne=(x-a)/te+2;break;case x:ne=(a-y)/te+4}ne*=60,0>ne&&(ne+=360),a=te/(1-Math.abs(2*E-1))}ru.j=Math.round(ne),ru.u=Math.round(100*a),ru.o=Math.round(100*E),ru.F=Oo.F}function lv(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function uv(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function cv(a){return a>dv?Math.pow(a,1/3):(mm*a+16)/116}function n1(a){var y=a*a*a;return y>dv?y:(116*a-16)/mm}function Tf(a,y){typeof a!="string"&&(a instanceof fo||At("Value for "+y+" must be a color string or a Brush, not "+a))}function hv(){fv=ys?new Du(null,void 0,{willReadFrequently:!0}).context:null}Je.Object.defineProperties(fo.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&an(this,a),this.na=a,this.start.Mc()&&(a===ch?this.start=qa:a===yu&&(this.start=Fr)),this.end.Mc()&&(a===ch?this.end=Ga:a===yu&&(this.end=Fr)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&an(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&an(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&an(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&an(this,a),0>a&&En(a,">= zero",fo,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&an(this,a),0>a&&En(a,">= zero",fo,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&an(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&an(this,a),this.cr=a,this.xe=null}}}),fo.prototype.isDark=fo.prototype.Gx,fo.prototype.darkenBy=fo.prototype.Wy,fo.prototype.lightenBy=fo.prototype.Vz,fo.prototype.addColorStop=fo.prototype.addColorStop;var dv=216/24389,mm=24389/27,cp=[95.047,100,108.883],fv=null,Oo=new cg,ru=new cg,il=new cg,Gc=new cg,hp=!1;fo.className="Brush";var Nh;fo.Solid=Nh=new _n(fo,"Solid",0);var ch;fo.Linear=ch=new _n(fo,"Linear",1);var yu;fo.Radial=yu=new _n(fo,"Radial",2);var dp;fo.Pattern=dp=new _n(fo,"Pattern",4);var fp;fo.Lab=fp=new _n(fo,"Lab",5);var i1;fo.HSL=i1=new _n(fo,"HSL",6),fo.randomColor=function(a,y){a===void 0&&(a=128),y===void 0&&(y=Math.max(a,255));var x=Math.abs(y-a);y=Math.floor(a+Math.random()*x).toString(16);var b=Math.floor(a+Math.random()*x).toString(16);return a=Math.floor(a+Math.random()*x).toString(16),2>y.length&&(y="0"+y),2>b.length&&(b="0"+b),2>a.length&&(a="0"+a),"#"+y+b+a},fo.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;hp||(hv(),hp=!0);var y=fv;if(y===null)return!0;y.fillStyle="#000000";var x=y.fillStyle;return y.fillStyle=a,y.fillStyle!==x?!0:(y.fillStyle="#FFFFFF",x=y.fillStyle,y.fillStyle=a,y.fillStyle!==x)},fo.lighten=function(a){return e1(a)},fo.lightenBy=e1,fo.darken=function(a){return t1(a)},fo.darkenBy=t1,fo.mix=sv,fo.isDark=lp;function sa(){this.xa="Base"}sa.prototype.measure=function(){},sa.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},sa.prototype.arrange=function(){},sa.prototype.Ly=function(a,y,x,b,E,te){a.arrange(y,x,b,E,te)},sa.prototype.iA=function(a){a.Uj()},sa.prototype.gc=function(){},Je.Object.defineProperties(sa.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Gn}}}),sa.prototype.remeasureObject=sa.prototype.iA,sa.prototype.arrangeElement=sa.prototype.Ly,sa.prototype.measureElement=sa.prototype.Yz,sa.className="PanelLayout";function vm(){this.xa="Base"}nt(vm,sa),vm.prototype.measure=function(a,y,x,b,E,te,ne){var ae=b.length;a=hh(a);for(var fe=0;fe<ae;fe++){var _e=b[fe];if(_e.visible||_e===a){var Me=_e.margin,Fe=Me.right+Me.left;Me=Me.top+Me.bottom,_e.measure(y,x,te,ne);var Ye=_e.measuredBounds;Fe=Math.max(Ye.width+Fe,0),Me=Math.max(Ye.height+Me,0),Ye=_e.position.x;var tt=_e.position.y;isFinite(Ye)||(Ye=0),isFinite(tt)||(tt=0),_e instanceof hr&&_e.isGeometryPositioned&&(_e=_e.strokeWidth/2,Ye-=_e,tt-=_e),Ao(E,Ye,tt,Fe,Me)}}},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 hr&&te.isGeometryPositioned){var Me=te.strokeWidth/2;fe-=Me,_e-=Me}te.visible&&te.arrange(fe+ae.left,_e+ae.top,ne.width,ne.height)}};function ym(){this.xa="Base"}nt(ym,sa),ym.prototype.measure=function(a,y,x,b,E,te,ne){var ae=b.length;y=Hn(),te=hh(a);for(var fe=0;fe<ae;fe++){var _e=b[fe];if(_e.visible||_e===te){var Me=gl(_e,!1);if(Me!==jn&&Me!==_i)y.push(_e);else{_e.measure(1/0,x,0,ne),Me=_e.margin,_e=_e.measuredBounds;var Fe=Math.max(_e.height+Me.top+Me.bottom,0);E.width+=Math.max(_e.width+Me.right+Me.left,0),E.height=Math.max(E.height,Fe)}}}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)&&(Me=fe.margin,ae=Me.right+Me.left,Me=Me.top+Me.bottom,fe.measure(1/0,x,0,ne),fe=fe.measuredBounds,Me=Math.max(fe.height+Me,0),E.width+=Math.max(fe.width+ae,0),E.height=Math.max(E.height,Me));ei(y)},ym.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,te=E.top,ne=a.isOpposite,ae=ne?x.width:E.left,fe=0;fe<b;fe++){var _e=te,Me=y[fe];if(Me.visible){var Fe=Me.measuredBounds,Ye=Me.margin,tt=Ye.top+Ye.bottom,st=te+E.bottom,pt=Fe.height,It=gl(Me,!1);(isNaN(Me.desiredSize.height)&&It===Un||It===Bi)&&(pt=Math.max(x.height-tt-st,0)),tt=pt+tt+st,st=Me.alignment,st.Xb()&&(st=a.defaultAlignment),st.sb()||(st=Fr),ne&&(ae-=Fe.width+Ye.left+Ye.right),Me.arrange(ae+st.offsetX+Ye.left,_e+st.offsetY+Ye.top+(x.height*st.y-tt*st.y),Fe.width,pt),ne||(ae+=Fe.width+Ye.left+Ye.right)}}};function Sm(){this.xa="Base"}nt(Sm,sa),Sm.prototype.measure=function(a,y,x,b,E,te){var ne=b.length;x=Hn();for(var ae=hh(a),fe=0;fe<ne;fe++){var _e=b[fe];if(_e.visible||_e===ae){var Me=gl(_e,!1);if(Me!==jn&&Me!==Bi)x.push(_e);else{var Fe=_e.margin;Me=Fe.right+Fe.left,Fe=Fe.top+Fe.bottom,_e.measure(y,1/0,te,0),_e=_e.measuredBounds,Is(E,Math.max(E.width,Math.max(_e.width+Me,0)),E.height+Math.max(_e.height+Fe,0))}}}if(b=x.length,b!==0){for(a.desiredSize.width?y=Math.min(a.desiredSize.width,a.maxSize.width):E.width!==0&&(y=Math.min(E.width,a.maxSize.width)),a=0;a<b;a++)fe=x[a],(fe.visible||fe===ae)&&(_e=fe.margin,ne=_e.right+_e.left,_e=_e.top+_e.bottom,fe.measure(y,1/0,te,0),fe=fe.measuredBounds,_e=Math.max(fe.height+_e,0),E.width=Math.max(E.width,Math.max(fe.width+ne,0)),E.height+=_e);ei(x)}},Sm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,te=E.left,ne=a.isOpposite,ae=ne?x.height:E.top,fe=0;fe<b;fe++){var _e=te,Me=y[fe];if(Me.visible){var Fe=Me.measuredBounds,Ye=Me.margin,tt=Ye.left+Ye.right,st=te+E.right,pt=Fe.width,It=gl(Me,!1);(isNaN(Me.desiredSize.width)&&It===Un||It===_i)&&(pt=Math.max(x.width-tt-st,0)),tt=pt+tt+st,st=Me.alignment,st.Xb()&&(st=a.defaultAlignment),st.sb()||(st=Fr),ne&&(ae-=Fe.height+Ye.bottom+Ye.top),Me.arrange(_e+st.offsetX+Ye.left+(x.width*st.x-tt*st.x),ae+st.offsetY+Ye.top,pt,Fe.height),ne||(ae+=Fe.height+Ye.bottom+Ye.top)}}};function xm(){this.xa="Base"}nt(xm,sa),xm.prototype.measure=function(a,y,x,b,E,te,ne){var ae=b.length,fe=a.Pb(),_e=fe.margin,Me=_e.right+_e.left,Fe=_e.top+_e.bottom;fe.measure(y,x,te,ne);var Ye=fe.measuredBounds;te=Ye.width,ne=Ye.height;var tt=Math.max(te+Me,0),st=Math.max(ne+Fe,0),pt=a.isClipping,It=Tn.allocAt(-_e.left,-_e.top,tt,st),Mt=Tn.allocAt(0,0,te,ne);pv(fe,Mt,!0),te=Mt.width,ne=Mt.height;for(var Ht=!0,Gt=hh(a),Zt=0;Zt<ae;Zt++){var Xt=b[Zt];Ye=y;var pn=x;if(Xt!==fe&&(Xt.visible||Xt===Gt)){_e=Xt.margin;var ii=_e.left,fi=_e.top;switch(tt=_e.right+_e.left,st=_e.top+_e.bottom,_e=gl(Xt,!1),_e){case Un:Ye=te,pn=ne,fi=ii=st=tt=0;break;case _i:Ye=te,ii=tt=0;break;case Bi:pn=ne,fi=st=0}Xt.measure(Ye,pn,0,0),Ye=Xt.measuredBounds,tt=Math.max(Ye.width+tt,0),st=Math.max(Ye.height+st,0),_e=Xt.alignment,_e.Xb()&&(_e=a.defaultAlignment),_e.sb()||(_e=Fr);var li=Xt.alignmentFocus;if(li.Xb()&&(li=Fr),pn=null,Xt instanceof Gn&&Xt.$e!==""&&(pn=Xt.fb(Xt.$e),pn===Xt&&(pn=null)),ii=Mt.x-ii,fi=Mt.y-fi,pn!==null){for(Xt.arrange(0,0,Ye.width,Ye.height),Ye=pn.actualBounds,Ye=Tt.allocAt(Ye.x+(li.x*Ye.width-li.offsetX),Ye.y+(li.y*Ye.height-li.offsetY)),pn=pn.panel;pn!==Xt;)pn.transform.Ga(Ye),pn=pn.panel;ii+=_e.x*te+_e.offsetX-Ye.x,fi+=_e.y*ne+_e.offsetY-Ye.y,Tt.free(Ye)}else ii+=_e.x*te+_e.offsetX-(li.x*Ye.width+li.offsetX),fi+=_e.y*ne+_e.offsetY-(li.y*Ye.height+li.offsetY);Ht?(Ht=!1,E.h(ii,fi,tt,st)):Ao(E,ii,fi,tt,st)}}switch(Ht?E.assign(It):pt?E.Uu(Mt.x,Mt.y,Mt.width,Mt.height):Ao(E,It.x,It.y,It.width,It.height),Tn.free(It),Tn.free(Mt),_e=fe.stretch,_e===tr&&(_e=gl(fe,!1)),_e){case jn:return;case Un:if(!isFinite(y)&&!isFinite(x))return;break;case _i:if(!isFinite(y))return;break;case Bi:if(!isFinite(x))return}for(Ye=fe.measuredBounds,te=Ye.width,ne=Ye.height,tt=Math.max(te+Me,0),st=Math.max(ne+Fe,0),_e=fe.margin,Mt=Tn.allocAt(-_e.left,-_e.top,tt,st),pv(fe,Mt,!0),te=Mt.width,ne=Mt.height,y=0;y<ae;y++)x=b[y],x===fe||!x.visible&&x!==Gt||(_e=x.margin,tt=_e.right+_e.left,st=_e.top+_e.bottom,Ye=x.measuredBounds,tt=Math.max(Ye.width+tt,0),st=Math.max(Ye.height+st,0),Me=x.alignment,Me.Xb()&&(Me=a.defaultAlignment),Me.sb()||(Me=Fr),x=x.alignmentFocus,x.Xb()&&(x=Fr),Ht?(Ht=!1,E.h(Me.x*te+Me.offsetX-(x.x*Ye.width+x.offsetX)-_e.left,Me.y*ne+Me.offsetY-(x.y*Ye.height+x.offsetY)-_e.top,tt,st)):Ao(E,Me.x*te+Me.offsetX-(x.x*Ye.width+x.offsetX)-_e.left,Me.y*ne+Me.offsetY-(x.y*Ye.height+x.offsetY)-_e.top,tt,st));Ht?E.assign(It):pt?E.Uu(Mt.x,Mt.y,Mt.width,Mt.height):Ao(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,Me=fe-x.y;for(E.arrange(_e,Me,ne,ae),ne=Tn.allocAt(0,0,ne,ae),pv(E,ne,!1),ae=0;ae<b;ae++){var Fe=y[ae];if(Fe!==E){_e=Fe.measuredBounds;var Ye=_e.width,tt=_e.height;Me=Fe.alignment,Me.Xb()&&(Me=a.defaultAlignment),Me.sb()||(Me=Fr);var st=Fe.alignmentFocus;if(st.Xb()&&(st=Fr),_e=null,Fe instanceof Gn&&Fe.$e!==""&&(_e=Fe.fb(Fe.$e),_e===Fe&&(_e=null)),_e!==null){var pt=_e.actualBounds;for(st=Tt.allocAt(pt.x+(st.x*pt.width-st.offsetX),pt.y+(st.y*pt.height-st.offsetY)),_e=_e.panel;_e!==Fe;)_e.transform.Ga(st),_e=_e.panel;_e=Me.x*ne.width+Me.offsetX-st.x,Me=Me.y*ne.height+Me.offsetY-st.y,Tt.free(st)}else _e=Me.x*ne.width+Me.offsetX-(st.x*Ye+st.offsetX),Me=Me.y*ne.height+Me.offsetY-(st.y*tt+st.offsetY);_e+=ne.x-x.x,Me+=ne.y-x.y,Fe.visible&&Fe.arrange(te+_e,fe+Me,Ye,tt)}}Tn.free(ne)};function pv(a,y,x){var b=null;if(a instanceof Gn&&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"}nt(wm,sa),wm.prototype.measure=function(a,y,x,b,E,te,ne){var ae=b.length,fe=a.Pb(),_e=fe.margin,Me=y,Fe=x,Ye=_e.right+_e.left,tt=_e.top+_e.bottom;fe.measure(y,x,te,ne),_e=fe.measuredBounds;var st=0,pt=null;fe instanceof hr&&(pt=fe,st=pt.strokeWidth*pt.scale);var It=Math.max(_e.width+Ye,0);_e=Math.max(_e.height+tt,0);var Mt=yv(fe),Ht=Mt.x*It+Mt.offsetX;Mt=Mt.y*_e+Mt.offsetY;var Gt=Sv(fe),Zt=Gt.x*It+Gt.offsetX;for(Gt=Gt.y*_e+Gt.offsetY,isFinite(y)&&(Me=Math.max(Math.abs(Ht-Zt)-st,0)),isFinite(x)&&(Fe=Math.max(Math.abs(Mt-Gt)-st,0)),st=Qn.alloc(),st.h(0,0),a=hh(a),Gt=0;Gt<ae;Gt++)Mt=b[Gt],Mt===fe||!Mt.visible&&Mt!==a||(_e=Mt.margin,It=_e.right+_e.left,Ht=_e.top+_e.bottom,Mt.measure(Me,Fe,0,0),_e=Mt.measuredBounds,It=Math.max(_e.width+It,0),_e=Math.max(_e.height+Ht,0),st.h(Math.max(It,st.width),Math.max(_e,st.height)));if(ae===1)E.width=It,E.height=_e,Qn.free(st);else{switch(Mt=yv(fe),Gt=Sv(fe),ae=b=0,Gt.x!==Mt.x&&Gt.y!==Mt.y&&(b=st.width/Math.abs(Gt.x-Mt.x),ae=st.height/Math.abs(Gt.y-Mt.y)),Qn.free(st),st=0,pt!==null&&(st=pt.strokeWidth*pt.scale,_v(pt)===mi&&(b=ae=Math.max(b,ae))),b+=Math.abs(Mt.offsetX)+Math.abs(Gt.offsetX)+st,ae+=Math.abs(Mt.offsetY)+Math.abs(Gt.offsetY)+st,pt=fe.stretch,pt===tr&&(pt=gl(fe,!1)),pt){case jn:ne=te=0;break;case Un: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+Ye,E.height=fe.measuredBounds.height+tt}},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 Me=yv(b),Fe=Sv(b),Ye=Me.y*E.height+Me.offsetY,tt=Fe.x*E.width+Fe.offsetX;for(Fe=Fe.y*E.height+Fe.offsetY,te.x=Me.x*E.width+Me.offsetX,te.y=Ye,Ao(te,tt,Fe,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),Me=Math.max(_e.height+ne.top+ne.bottom,0),Ye=ae.alignment,Ye.Xb()&&(Ye=a.defaultAlignment),Ye.sb()||(Ye=Fr),fe=te.width*Ye.x+Ye.offsetX-fe*Ye.x+ne.left+te.x,ne=te.height*Ye.y+Ye.offsetY-Me*Ye.y+ne.top+te.y,ae.visible&&(Eo(te.x,te.y,te.width,te.height,fe,ne,_e.width,_e.height)?ae.arrange(fe,ne,_e.width,_e.height):ae.arrange(fe,ne,_e.width,_e.height,new Tn(te.x,te.y,te.width,te.height))));Tn.free(te)};function bm(){this.xa="Base",this.name="Table"}nt(bm,sa),bm.prototype.measure=function(a,y,x,b,E){for(var te=b.length,ne=Hn(),ae=Hn(),fe=0;fe<te;fe++){var _e=b[fe],Me=_e instanceof Gn?_e:null;if(Me!==null&&Oh(Me)&&_e.visible){ae.push(Me);for(var Fe=Me.O.s,Ye=Fe.length,tt=0;tt<Ye;tt++){var st=Fe[tt];Me.type===Gn.TableRow?st.row=_e.row:Me.type===Gn.TableColumn&&(st.column=_e.column),ne.push(st)}}else ne.push(_e)}te=ne.length,te===0&&(a.Fb(0),a.Eb(0));for(var pt=[],It=0;It<te;It++){var Mt=ne[It];Mt.visible&&(ea(Mt,!0),Hc(Mt,!0),pt[Mt.row]||(pt[Mt.row]=[]),pt[Mt.row][Mt.column]||(pt[Mt.row][Mt.column]=[]),pt[Mt.row][Mt.column].push(Mt))}ei(ne);var Ht=Hn(),Gt=Hn(),Zt=Hn(),Xt={count:0},pn={count:0},ii=y,fi=x,li=a.rowDefs,Kn=a.colDefs,Rn=null;te=li.length;for(var Ji=0;Ji<te;Ji++)Rn=li[Ji],Rn!==void 0&&(Rn.actual=0);te=Kn.length;for(var Zi=0;Zi<te;Zi++)Rn=Kn[Zi],Rn!==void 0&&(Rn.actual=0);for(var to=pt.length,_o=0,ha=0;ha<to;ha++)pt[ha]&&(_o=Math.max(_o,pt[ha].length));var pa=Math.min(a.topIndex,to-1),Xa=Math.min(a.leftIndex,_o-1),da=0;to=pt.length;for(var Gh=hh(a),Us=0;Us<to;Us++)if(pt[Us]){_o=pt[Us].length;var fc=a.Fb(Us);fc.actual=0;for(var Ja=fc.oc=0;Ja<_o;Ja++)if(pt[Us][Ja]){var Wh=a.Eb(Ja);Ht[Ja]===void 0&&(Wh.actual=0,Wh.oc=0,Ht[Ja]=!0);for(var au=pt[Us][Ja],ju=au.length,Wl=0;Wl<ju;Wl++){var kl=au[Wl];if(kl.visible||kl===Gh){var Cd=1<kl.rowSpan||1<kl.columnSpan;Cd&&(Us<pa||Ja<Xa||Gt.push(kl));var pc=kl.margin,Rp=pc.right+pc.left,Zl=pc.top+pc.bottom,Qa=lc(kl,fc,Wh,!1),Jg=kl.desiredSize,Hf=!isNaN(Jg.height),Nc=!isNaN(Jg.width)&&Hf;if(Cd||Qa===jn||Nc||Us<pa||Ja<Xa||(Xt[Ja]!==void 0||Qa!==Un&&Qa!==_i||(Xt[Ja]=-1,Xt.count++),pn[Us]!==void 0||Qa!==Un&&Qa!==Bi||(pn[Us]=-1,pn.count++),Zt.push(kl)),kl.measure(1/0,1/0,0,0),!(Us<pa||Ja<Xa)){var Al=kl.measuredBounds,lf=Math.max(Al.width+Rp,0),Kl=Math.max(Al.height+Zl,0);if(kl.rowSpan===1&&(Qa===jn||Qa===_i)){Rn=a.Fb(Us);var Pd=Rn.Wc();da=Math.max(Kl-Rn.actual,0),da+Pd>fi&&(da=Math.max(fi-Pd,0));var Z0=Rn.oa===0;Rn.oc=Rn.oc+da,Rn.actual=Rn.oa+da,fi=Math.max(fi-(da+(Z0?Pd:0)),0)}if(kl.columnSpan===1&&(Qa===jn||Qa===Bi)){Rn=a.Eb(Ja);var Qg=Rn.Wc();da=Math.max(lf-Rn.actual,0),da+Qg>ii&&(da=Math.max(ii-Qg,0));var Hy=Rn.oa===0;Rn.oc=Rn.oc+da,Rn.actual=Rn.oa+da,ii=Math.max(ii-(da+(Hy?Qg:0)),0)}Cd&&kl.Uj()}}}}}ei(Ht);var Qc=0,ph=0;te=a.columnCount;for(var Uf=0;Uf<te;Uf++){var _d=Kn[Uf];_d!==void 0&&(Qc+=isNaN(_d.Hc)?_d.oc:_d.Hc,_d.oc!==0&&(Qc+=_d.Wc()))}te=a.rowCount;for(var Bp=0;Bp<te;Bp++){var Ed=li[Bp];Ed!==void 0&&(ph+=isNaN(Ed.Hc)?Ed.oc:Ed.Hc,Ed.oc!==0&&(ph+=Ed.Wc()))}ii=Math.max(y-Qc,0);var qc=fi=Math.max(x-ph,0),Zh=ii;te=Zt.length;for(var Nl=0;Nl<te;Nl++){var Oc=Zt[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;Xt[Oc.column]=gh.oc===0&&Xt[Oc.column]!==void 0?Math.max(Fp.width+uf,Xt[Oc.column]):null,pn[Oc.row]=K0.oc===0&&pn[Oc.row]!==void 0?Math.max(Fp.height+Ic,pn[Oc.row]):null}var Gf=0,jp=0,ec;for(ec in pn)ec!=="count"&&(Gf+=pn[ec]);for(ec in Xt)ec!=="count"&&(jp+=Xt[ec]);for(var _a=Qn.alloc(),qg=0;qg<te;qg++){var cl=Zt[qg];if(cl.visible||cl===Gh){var Gs=a.Fb(cl.row),hl=a.Eb(cl.column),mh=0;isFinite(hl.width)?mh=hl.width:(isFinite(ii)&&Xt[cl.column]!==null?jp===0?mh=hl.actual+ii:mh=Xt[cl.column]/jp*Zh:Xt[cl.column]!==null?mh=ii:mh=hl.actual||ii,mh=Math.max(0,mh-hl.Wc()));var Kh=0;switch(isFinite(Gs.height)?Kh=Gs.height:(isFinite(fi)&&pn[cl.row]!==null?Gf===0?Kh=Gs.actual+fi:Kh=pn[cl.row]/Gf*qc:pn[cl.row]!==null?Kh=fi:Kh=Gs.actual||fi,Kh=Math.max(0,Kh-Gs.Wc())),_a.h(Math.max(hl.minimum,Math.min(mh,hl.maximum)),Math.max(Gs.minimum,Math.min(Kh,Gs.maximum))),Qa=lc(cl,Gs,hl,!1),Qa){case _i:_a.height=Math.max(_a.height,Gs.actual+fi);break;case Bi:_a.width=Math.max(_a.width,hl.actual+ii)}var cf=cl.margin,Uy=cf.right+cf.left,V0=cf.top+cf.bottom;cl.Uj(),cl.measure(_a.width,_a.height,hl.minimum,Gs.minimum);var zp=cl.measuredBounds,hf=Math.max(zp.width+Uy,0),Wf=Math.max(zp.height+V0,0);isFinite(ii)&&(hf=Math.min(hf,_a.width)),isFinite(fi)&&(Wf=Math.min(Wf,_a.height));var Ol=0;Ol=Gs.actual,Gs.actual=Math.max(Gs.actual,Wf),Gs.oc=Math.max(Gs.oc,Wf),da=Gs.actual-Ol,fi=Math.max(fi-da,0),pn[cl.row]===null&&(qc=Math.max(qc-da,0)),Ol=hl.actual,hl.actual=Math.max(hl.actual,hf),hl.oc=Math.max(hl.oc,hf),da=hl.actual-Ol,ii=Math.max(ii-da,0),Xt[cl.column]===null&&(Zh=Math.max(Zh-da,0))}}ei(Zt);var vh=Qn.alloc(),mc=Hn(),Cu=Hn();if(te=Gt.length,te!==0){for(var Ld=0;Ld<to;Ld++)if(pt[Ld]){_o=pt[Ld].length;var Hp=a.Fb(Ld);mc[Ld]=Hp.actual;for(var Md=0;Md<_o;Md++)if(pt[Ld][Md]){var $0=a.Eb(Md);Cu[Md]=$0.actual}}}for(var Up=0;Up<te;Up++){var Ps=Gt[Up];if(Ps.visible||Ps===Gh){var tc=a.Fb(Ps.row),zu=a.Eb(Ps.column);switch(_a.h(Math.max(zu.minimum,Math.min(y,zu.maximum)),Math.max(tc.minimum,Math.min(x,tc.maximum))),Qa=lc(Ps,tc,zu,!1),Qa){case Un:Cu[zu.index]!==0&&(_a.width=Math.min(_a.width,Cu[zu.index])),mc[tc.index]!==0&&(_a.height=Math.min(_a.height,mc[tc.index]));break;case _i:Cu[zu.index]!==0&&(_a.width=Math.min(_a.width,Cu[zu.index]));break;case Bi:mc[tc.index]!==0&&(_a.height=Math.min(_a.height,mc[tc.index]))}isFinite(zu.width)&&(_a.width=zu.width),isFinite(tc.height)&&(_a.height=tc.height),vh.h(0,0);for(var Y0=zu.minimum,Vl=tc.minimum,Vh=1;Vh<Ps.rowSpan&&!(Ps.row+Vh>=a.rowCount);Vh++)Rn=a.Fb(Ps.row+Vh),da=0,da=Qa===Un||Qa===Bi?Math.max(Rn.minimum,mc[Ps.row+Vh]===0?Rn.maximum:Math.min(mc[Ps.row+Vh],Rn.maximum)):Math.max(Rn.minimum,isNaN(Rn.Hc)?Rn.maximum:Math.min(Rn.Hc,Rn.maximum)),vh.height+=da,Vl+=Rn.minimum;for(var Hu=1;Hu<Ps.columnSpan&&!(Ps.column+Hu>=a.columnCount);Hu++)Rn=a.Eb(Ps.column+Hu),da=0,da=Qa===Un||Qa===_i?Math.max(Rn.minimum,Cu[Ps.column+Hu]===0?Rn.maximum:Math.min(Cu[Ps.column+Hu],Rn.maximum)):Math.max(Rn.minimum,isNaN(Rn.Hc)?Rn.maximum:Math.min(Rn.Hc,Rn.maximum)),vh.width+=da,Y0+=Rn.minimum;_a.width+=vh.width,_a.height+=vh.height;var Gp=Ps.margin,Td=Gp.right+Gp.left,em=Gp.top+Gp.bottom;Ps.measure(_a.width,_a.height,Y0,Vl);for(var Wp=Ps.measuredBounds,Dc=Math.max(Wp.width+Td,0),df=Math.max(Wp.height+em,0),kd=0,Zp=0;Zp<Ps.rowSpan&&!(Ps.row+Zp>=a.rowCount);Zp++)Rn=a.Fb(Ps.row+Zp),kd+=Rn.total||0;if(kd<df){var $h=df-kd,eh=df-kd;if(Ps.spanAllocation!==null)for(var Yh=Ps.spanAllocation,yh=0;yh<Ps.rowSpan&&!(0>=$h)&&!(Ps.row+yh>=a.rowCount);yh++){Rn=a.Fb(Ps.row+yh);var Xh=Rn.oa||0,ff=Yh(Ps,Rn,eh);Rn.actual=Math.min(Rn.maximum,Xh+ff),Rn.oa!==Xh&&($h-=Rn.oa-Xh)}for(;0<$h;){var vc=Rn.oa||0;if(isNaN(Rn.height)&&Rn.maximum>vc&&(Rn.actual=Math.min(Rn.maximum,vc+$h),Rn.oa!==vc&&($h-=Rn.oa-vc)),Rn.index===0)break;Rn=a.Fb(Rn.index-1)}}for(var Zf=0,Jh=0;Jh<Ps.columnSpan&&!(Ps.column+Jh>=a.columnCount);Jh++)Rn=a.Eb(Ps.column+Jh),Zf+=Rn.total||0;if(Zf<Dc){var Kf=Dc-Zf,Gy=Dc-Zf;if(Ps.spanAllocation!==null)for(var Sh=Ps.spanAllocation,pf=0;pf<Ps.columnSpan&&!(0>=Kf)&&!(Ps.column+pf>=a.columnCount);pf++){Rn=a.Eb(Ps.column+pf);var tm=Rn.oa||0,Wy=Sh(Ps,Rn,Gy);Rn.actual=Math.min(Rn.maximum,tm+Wy),Rn.oa!==tm&&(Kf-=Rn.oa-tm)}for(;0<Kf;){var X0=Rn.oa||0;if(isNaN(Rn.width)&&Rn.maximum>X0&&(Rn.actual=Math.min(Rn.maximum,X0+Kf),Rn.oa!==X0&&(Kf-=Rn.oa-X0)),Rn.index===0)break;Rn=a.Eb(Rn.index-1)}}}}ei(Gt),Qn.free(vh),Qn.free(_a),mc!==void 0&&ei(mc),Cu!==void 0&&ei(Cu);var Vf=0,$f=0,J0=a.desiredSize,gx=a.maxSize;Qa=gl(a,!0);var nm=ph=Qc=0,im=0;te=a.columnCount;for(var Q0=0;Q0<te;Q0++)Kn[Q0]!==void 0&&(Rn=a.Eb(Q0),isFinite(Rn.width)?(nm+=Rn.width,nm+=Rn.Wc()):Nm(Rn)===pg?(nm+=Rn.oa,nm+=Rn.Wc()):Rn.oa!==0&&(Qc+=Rn.oa,Qc+=Rn.Wc()));isFinite(J0.width)?Vf=Math.min(J0.width,gx.width):Vf=Qa!==jn&&isFinite(y)?y:Qc,Vf=Math.max(Vf,a.minSize.width),Vf=Math.max(Vf-nm,0);for(var Qx=Qc===0?1:Math.max(Vf/Qc,1),q0=0;q0<te;q0++)Kn[q0]!==void 0&&(Rn=a.Eb(q0),isFinite(Rn.width)||Nm(Rn)===pg||(Rn.actual=Rn.oa*Qx),Rn.position=E.width,Rn.oa!==0&&(E.width+=Rn.oa,E.width+=Rn.Wc()));te=a.rowCount;for(var ev=0;ev<te;ev++)li[ev]!==void 0&&(Rn=a.Fb(ev),isFinite(Rn.height)?(im+=Rn.height,im+=Rn.Wc()):Nm(Rn)===pg?(im+=Rn.oa,im+=Rn.Wc()):Rn.oa!==0&&(ph+=Rn.oa,ph+=Rn.Wc()));isFinite(J0.height)?$f=Math.min(J0.height,gx.height):$f=Qa!==jn&&isFinite(x)?x:ph,$f=Math.max($f,a.minSize.height),$f=Math.max($f-im,0);for(var qx=ph===0?1:Math.max($f/ph,1),tv=0;tv<te;tv++)li[tv]!==void 0&&(Rn=a.Fb(tv),isFinite(Rn.height)||Nm(Rn)===pg||(Rn.actual=Rn.oa*qx),Rn.position=E.height,Rn.oa!==0&&(E.height+=Rn.oa,E.height+=Rn.Wc()));te=ae.length;for(var Zy=0;Zy<te;Zy++){var rm=ae[Zy],Ky=0,Vy=0;rm.type===Gn.TableRow?(Ky=E.width,Rn=a.Fb(rm.row),Vy=Rn.actual):(Rn=a.Eb(rm.column),Ky=Rn.actual,Vy=E.height),rm.measuredBounds.h(0,0,Ky,Vy),ea(rm,!1)}ei(ae),a.inRowsCols=pt},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,Me=0,Fe=0;Fe<_e;Fe++)ne[Fe]&&(Me=Math.max(Me,ne[Fe].length));fe=a.rowDefs,ae=a.colDefs;var Ye=Fe=0,tt=Math.min(a.topIndex,_e-1);if(0<fe.length){for(;tt!==_e&&(fe[tt]===void 0||fe[tt].oa===0);)tt++;tt=Math.max(Math.min(tt,_e-1),0),Fe=-fe[tt].position}var st=Math.min(a.leftIndex,Me-1);if(0<ae.length){for(;st!==Me&&(ae[st]===void 0||ae[st].oa===0);)st++;st=Math.max(Math.min(st,Me-1),0),Ye=-ae[st].position}for(var pt=0,It=0;pt!==_e&&fe[pt]===void 0;)pt++;for(;It!==_e&&ae[It]===void 0;)It++;Me=a.part,a.Fb(pt),a.Eb(It);for(var Mt=0;Mt<y.length;Mt++){var Ht=y[Mt];if(Ht instanceof Gn&&Ht.visible&&Oh(Ht)){if(Ht.type===Gn.TableRow){ae=a.Fb(Ht.row);var Gt=a.Eb(It)}else ae=a.Fb(pt),Gt=a.Eb(Ht.column);fe=ae.position+Fe+E,ae.oa!==0&&(fe+=ae.Io(Math.max(pt,tt))),ae=Gt.position+Ye+te,Gt.oa!==0&&(ae+=Gt.Io(Math.max(It,st))),Gt=Ht.measuredBounds,Ht.Uk(),Ht.actualBounds.ka();var Zt=Ht.actualBounds,Xt=Tn.allocAt(Zt.x,Zt.y,Zt.width,Zt.height);Zt.x=Ht.type===Gn.TableRow?te:ae,Zt.y=Ht.type===Gn.TableColumn?E:fe,Zt.width=Gt.width,Zt.height=Gt.height,Ht.actualBounds.freeze(),Hc(Ht,!1),Sa(Xt,Zt)||Me===null||(Me.oh(),Ht.Pn(Me)),Tn.free(Xt)}}for(Mt=Qn.alloc(),Ht=0;Ht<_e;Ht++)if(ne[Ht]){for(Me=ne[Ht].length,Gt=a.Fb(Ht),fe=Gt.position+Fe+E,Gt.oa!==0&&(fe+=Gt.Io(Math.max(pt,tt))),Zt=0;Zt<Me;Zt++)if(ne[Ht][Zt]){Xt=a.Eb(Zt),ae=Xt.position+Ye+te,Xt.oa!==0&&(ae+=Xt.Io(Math.max(It,st)));for(var pn=ne[Ht][Zt],ii=pn.length,fi=0;fi<ii;fi++){var li=pn[fi],Kn=li.measuredBounds;Mt.h(0,0);for(var Rn=1;Rn<li.rowSpan&&!(Ht+Rn>=a.rowCount);Rn++){var Ji=a.Fb(Ht+Rn);Ji.oa!==0&&(Mt.height+=Ji.total)}for(Rn=1;Rn<li.columnSpan&&!(Zt+Rn>=a.columnCount);Rn++)Ji=a.Eb(Zt+Rn),Ji.oa!==0&&(Mt.width+=Ji.total);var Zi=Xt.oa+Mt.width,to=Gt.oa+Mt.height;Rn=ae,Ji=fe;var _o=Zi,ha=to,pa=ae,Xa=fe,da=Zi,Gh=to;ae+Zi>x.width&&(da=Math.max(x.width-ae,0)),fe+to>x.height&&(Gh=Math.max(x.height-fe,0));var Us=li.alignment;if(Us.Xb()){Us=a.defaultAlignment,Us.sb()||(Us=Fr);var fc=Us.x,Ja=Us.y,Wh=Us.offsetX;Us=Us.offsetY;var au=Xt.alignment,ju=Gt.alignment;au.sb()&&(fc=au.x,Wh=au.offsetX),ju.sb()&&(Ja=ju.y,Us=ju.offsetY)}else fc=Us.x,Ja=Us.y,Wh=Us.offsetX,Us=Us.offsetY;(isNaN(fc)||isNaN(Ja))&&(Ja=fc=.5,Us=Wh=0),au=Kn.width,ju=Kn.height;var Wl=li.margin,kl=Wl.left+Wl.right,Cd=Wl.top+Wl.bottom,pc=lc(li,Gt,Xt,!1);!isNaN(li.desiredSize.width)||pc!==Un&&pc!==_i||(au=Math.max(Zi-kl,0)),!isNaN(li.desiredSize.height)||pc!==Un&&pc!==Bi||(ju=Math.max(to-Cd,0)),Zi=li.maxSize,to=li.minSize,au=Math.min(Zi.width,au),ju=Math.min(Zi.height,ju),au=Math.max(to.width,au),ju=Math.max(to.height,ju),Zi=ju+Cd,Rn+=_o*fc-(au+kl)*fc+Wh+Wl.left,Ji+=ha*Ja-Zi*Ja+Us+Wl.top,li.visible&&(Eo(pa,Xa,da,Gh,Rn,Ji,Kn.width,Kn.height)?li.arrange(Rn,Ji,au,ju):li.arrange(Rn,Ji,au,ju,new Tn(pa,Xa,da,Gh)))}}}for(Qn.free(Mt),a=0;a<b;a++)x=y[a],te=x instanceof Gn?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"}nt(Cm,sa),Cm.prototype.measure=function(){},Cm.prototype.arrange=function(){};function Pm(){this.xa="Base"}nt(Pm,sa),Pm.prototype.measure=function(){},Pm.prototype.arrange=function(){};function _m(){this.xa="Base"}nt(_m,sa),_m.prototype.measure=function(a,y,x,b,E,te,ne){1<b.length&&At("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 Me=b.scale,Fe=ae.width;ae=ae.height;var Ye=Math.max(y-_e,0),tt=Math.max(x-fe,0),st=1;a.viewboxStretch===mi?Fe!==0&&ae!==0&&(st=Math.min(Ye/Fe,tt/ae)):Fe!==0&&ae!==0&&(st=Math.max(Ye/Fe,tt/ae)),st===0&&(st=1e-4),b.Ca*=st,Me!==b.scale&&(ea(b,!0),b.measure(1/0,1/0,te,ne))}ae=b.measuredBounds,E.width=isFinite(y)?y:Math.max(ae.width+_e,0),E.height=isFinite(x)?x:Math.max(ae.height+fe,0)},_m.prototype.arrange=function(a,y,x){y=y[0];var b=y.measuredBounds,E=y.margin,te=Math.max(b.width+(E.right+E.left),0);E=Math.max(b.height+(E.top+E.bottom),0);var ne=y.alignment;ne.Xb()&&(ne=a.defaultAlignment),ne.sb()||(ne=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"}nt(hg,sa),hg.prototype.measure=function(){},hg.prototype.arrange=function(){},hg.prototype.gc=function(a,y,x){x=a.Df()*x.scale,0>=x&&(x=1);var b=a.gridCellSize,E=b.width;b=b.height;var te=a.naturalBounds,ne=a.actualBounds,ae=te.width,fe=te.height,_e=Math.ceil(ae/E),Me=Math.ceil(fe/b),Fe=a.gridOrigin,Ye=Fe.x;Fe=Fe.y,y.save(),y.beginPath(),y.rect(0,0,ae,fe),y.clip(),y.Se();for(var tt=[],st=a.O.s,pt=st.length,It=0;It<pt;It++){var Mt=st[It],Ht=[];if(tt.push(Ht),Mt.visible){var Gt=Mt.interval;if(!(0>Gt)){Mt=mv(Mt.figure);for(var Zt=0;Zt<pt;Zt++)if(Zt!==It){var Xt=st[Zt];Xt.visible&&mv(Xt.figure)===Mt&&(Xt=Xt.interval,Xt>Gt&&Ht.push(Xt))}}}}for(st=a.O.s,pt=st.length,It=0;It<pt;It++){var pn=st[It];if(pn.visible&&(Ht=pn.interval||1,Mt=Math.abs(Ht),!(2>E*Mt*x))){if(Gt=pn.segmentIndex,(!isFinite(Gt)||isNaN(Gt))&&(Gt=0),0>Gt&&(Gt=Mt-Math.min(-Gt,Mt)),Gt=Math.round(Gt%Mt),Mt=pn.opacity,Zt=1,Mt!==1){if(Mt===0)continue;Zt=y.globalAlpha,y.globalAlpha=Zt*Mt}Xt=tt[It];var ii=!1,fi=pn.strokeDashArray;if(fi!==null&&(ii=!0,y.js(fi,pn.strokeDashOffset)),pn.figure==="LineV"&&pn.stroke!==null&&0<pn.strokeWidth){for(y.lineWidth=pn.strokeWidth,ws(a,y,pn.stroke,!1,!1,te,ne),y.beginPath(),fi=pn=Math.floor((Ye-E)/E);fi<=pn+_e;fi++){var li=fi*E+Ye;0<=li&&li<=ae&&Em(fi,Ht,Gt,Xt)&&(y.moveTo(li,0),y.lineTo(li,fe))}y.stroke(),y.Se()}else if(pn.figure==="LineH"&&pn.stroke!==null&&0<pn.strokeWidth){for(y.lineWidth=pn.strokeWidth,ws(a,y,pn.stroke,!1,!1,te,ne),y.beginPath(),fi=pn=Math.floor((Fe-b)/b);fi<=pn+Me;fi++)li=fi*b+Fe,0<=li&&li<=fe&&Em(fi,Ht,Gt,Xt)&&(y.moveTo(0,li),y.lineTo(ae,li));y.stroke(),y.Se()}else if(pn.figure==="BarV"&&pn.fill!==null)for(ws(a,y,pn.fill,!0,!1,te,ne),pn=pn.width,isNaN(pn)&&(pn=E),li=fi=Math.floor((Ye-E)/E);li<=fi+_e;li++){var Kn=li*E+Ye;0<=Kn+pn&&Kn<=ae&&Em(li,Ht,Gt,Xt)&&y.fillRect(Kn,0,pn,fe)}else if(pn.figure==="BarH"&&pn.fill!==null)for(ws(a,y,pn.fill,!0,!1,te,ne),pn=pn.height,isNaN(pn)&&(pn=b),li=fi=Math.floor((Fe-b)/b);li<=fi+Me;li++)Kn=li*b+Fe,0<=Kn+pn&&Kn<=fe&&Em(li,Ht,Gt,Xt)&&y.fillRect(0,Kn,ae,pn);ii&&y.fs(),Mt!==1&&(y.globalAlpha=Zt)}}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"}nt(Lm,sa),Lm.prototype.measure=function(a,y,x,b,E){var te=b.length;if(a instanceof Qr||a instanceof Vn){var ne=null,ae=null;if(a instanceof Vn&&(ne=a),a instanceof Qr&&(ae=a,ne=ae.adornedPart,a.j===null&&(a.j=[])),ne instanceof Vn){var fe=ne;if(te===0)Is(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var _e=a instanceof Qr?null:ne.path;y=ne.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var Me=fe.points,Fe=ne.pointsCount;ae!==null?ae.Ul(!1):ne!==null&&ne.Ul(!1),ae=y.width;var Ye=y.height,tt=a.j;if(tt.length=0,_e!==null){r1(a,ae,Ye,_e);var st=_e.measuredBounds;x.ed(st),tt.push(st)}st=gr.alloc();for(var pt=Tt.alloc(),It=Tt.alloc(),Mt=0;Mt<te;Mt++){var Ht=b[Mt];if(Ht!==_e)if(Ht.isPanelMain&&Ht instanceof hr){r1(a,ae,Ye,Ht);var Gt=Ht.measuredBounds;x.ed(Gt),tt.push(Gt)}else if(2>Fe)Ht.measure(1/0,1/0,0,0),Gt=Ht.measuredBounds,x.ed(Gt),tt.push(Gt);else{var Zt=Ht.segmentIndex,Xt=Ht.segmentFraction,pn=Ht.alignmentFocus;pn.Mc()&&(pn=Fr);var ii=Ht.segmentOrientation,fi=Ht.segmentOffset;if(isNaN(Zt)){var li=fe.ua;Gt=Hn(),li.Qu(Xt,Gt);var Kn=Tt.allocAt(Gt[0],Gt[1]);if(Kn.add(fe.i(0)),li.type===Yn.j?Kn.offset(-li.startX,-li.startY):(li=li.figures.first(),li!==null&&Kn.offset(-li.startX,-li.startY)),li=Gt[2],ii!==ol){var Rn=fe.computeAngle(Ht,ii,li);Ht.Kb=Rn}Rn=Kn.x-y.x;var Ji=Kn.y-y.y;Tt.free(Kn),ei(Gt)}else if(Zt<-Fe||Zt>=Fe)Gt=Tt.alloc(),fe.vg(),fe.computeMidPoint(Gt),li=fe.midAngle,ii!==ol&&(Rn=fe.computeAngle(Ht,ii,li),Ht.Kb=Rn),Rn=Gt.x-y.x,Ji=Gt.y-y.y,Tt.free(Gt);else{if(Rn=0,0<=Zt?(Ji=Me.M(Zt),Gt=Zt<Fe-1?Me.M(Zt+1):Ji):(Rn=Fe+Zt,Ji=Me.M(Rn),Gt=0<Rn?Me.M(Rn-1):Ji),Ji.Xa(Gt)){0<=Zt?(li=0<Zt?Me.M(Zt-1):Ji,Rn=Zt<Fe-2?Me.M(Zt+2):Gt):(li=Rn<Fe-1?Me.M(Rn+1):Ji,Rn=1<Rn?Me.M(Rn-2):Gt),Kn=li.Bf(Ji);var Zi=Gt.Bf(Rn);li=Kn>Zi+10?0<=Zt?li.ab(Ji):Ji.ab(li):Zi>Kn+10?0<=Zt?Gt.ab(Rn):Rn.ab(Gt):0<=Zt?li.ab(Rn):Rn.ab(li)}else li=0<=Zt?Ji.ab(Gt):Gt.ab(Ji);ii!==ol&&(Rn=fe.computeAngle(Ht,ii,li),Ht.Kb=Rn),Rn=Ji.x+(Gt.x-Ji.x)*Xt-y.x,Ji=Ji.y+(Gt.y-Ji.y)*Xt-y.y}Ht.measure(1/0,1/0,0,0),Gt=Ht.measuredBounds,Kn=Ht.naturalBounds;var to=0;Ht instanceof hr&&(to=Ht.strokeWidth),Zi=Kn.width+to;var _o=Kn.height+to;st.reset(),st.translate(-Gt.x,-Gt.y),st.scale(Ht.scale,Ht.scale),st.rotate(ii===ol?Ht.angle:li,Zi/2,_o/2),ii!==Pg&&ii!==Eg||st.rotate(90,Zi/2,_o/2),ii!==_g&&ii!==Lg||st.rotate(-90,Zi/2,_o/2),ii===i0&&(45<li&&135>li||225<li&&315>li)&&st.rotate(-li,Zi/2,_o/2),Kn=new Tn(0,0,Zi,_o),pt.xi(Kn,pn),st.Ga(pt),pn=-pt.x+to/2*Ht.scale,Ht=-pt.y+to/2*Ht.scale,It.assign(fi),to=isNaN(fi.x);var ha=isNaN(fi.y);if(to||ha){Zi=Zi/2+3,_o=_o/2+3;var pa=45<=li&&135>=li,Xa=225<=li&&315>=li;ii===ol&&(pa||Xa)?(It.x=ha?Zi:fi.y,It.y=to?_o:fi.x,pa?0<=Zt||isNaN(Zt)&&.5>Xt||!to||(It.y=-_o):Xa&&((0<=Zt||isNaN(Zt)&&.5>Xt)&&to&&(It.y=-_o),ha&&(It.x=-Zi))):(to&&(It.x=0<=Zt||isNaN(Zt)&&.5>Xt?Zi:-Zi),ha&&(It.y=-_o),It.rotate(li))}else It.rotate(li);Rn+=It.x,Ji+=It.y,Kn.set(Gt),Kn.h(Rn+pn,Ji+Ht,Gt.width,Gt.height),tt.push(Kn),x.ed(Kn)}}if(ne!==null)for(b=ne.labelNodes;b.next();)b.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),Is(E,x.width||0,x.height||0),gr.free(st),Tt.free(pt),Tt.free(It)}}}},Lm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Qr||a instanceof Vn){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 Me=ne[ae];ae++,_e.arrange(Me.x-a.jg.x,Me.y-a.jg.y,Me.width,Me.height)}}}if(y=b.points,x=y.count,2<=x&&a instanceof Vn)for(te=a.labelNodes;te.next();){var Fe=a;ne=te.value,ae=ne.segmentIndex,fe=ne.segmentFraction;var Ye=ne.alignmentFocus;if(_e=ne.segmentOrientation,Me=ne.segmentOffset,isNaN(ae)){var tt=Fe.ua,st=Hn();tt.Qu(fe,st);var pt=Tt.allocAt(st[0],st[1]);pt.add(Fe.i(0)),tt.type===Yn.j||(tt=tt.figures.first()),pt.offset(-tt.startX,-tt.startY),tt=st[2],_e!==ol&&(Fe=Fe.computeAngle(ne,_e,tt),ne.angle=Fe),Fe=pt.x;var It=pt.y;Tt.free(pt),ei(st)}else if(ae<-x||ae>=x)st=Tt.alloc(),tt=Fe,It=st,tt.vg(),tt.computeMidPoint(It),tt=Fe.midAngle,_e!==ol&&(Fe=Fe.computeAngle(ne,_e,tt),ne.angle=Fe),Fe=st.x,It=st.y,Tt.free(st);else{if(pt=0,0<=ae?(st=y.s[ae],It=ae<x-1?y.s[ae+1]:st):(pt=x+ae,st=y.s[pt],It=0<pt?y.s[pt-1]:st),st.Xa(It)){0<=ae?(tt=0<ae?y.s[ae-1]:st,pt=ae<x-2?y.s[ae+2]:It):(tt=pt<x-1?y.s[pt+1]:st,pt=1<pt?y.s[pt-2]:It);var Mt=tt.Bf(st),Ht=It.Bf(pt);tt=Mt>Ht+10?0<=ae?tt.ab(st):st.ab(tt):Ht>Mt+10?0<=ae?It.ab(pt):pt.ab(It):0<=ae?tt.ab(pt):pt.ab(tt)}else tt=0<=ae?st.ab(It):It.ab(st);_e!==ol&&(Fe=Fe.computeAngle(ne,_e,tt),ne.angle=Fe),Fe=st.x+(It.x-st.x)*fe,It=st.y+(It.y-st.y)*fe}if(Ye.ys())ne.location=new Tt(Fe,It);else{Ye.Mc()&&(Ye=Fr),st=gr.alloc(),st.reset(),st.scale(ne.scale,ne.scale),st.rotate(ne.angle,0,0);var Gt=ne.naturalBounds;pt=Tn.allocAt(0,0,Gt.width,Gt.height),Mt=Tt.alloc(),Mt.xi(pt,Ye),st.Ga(Mt),Ye=-Mt.x,Ht=-Mt.y;var Zt=Gt.width,Xt=Gt.height;Gt=Tt.alloc(),Gt.assign(Me);var pn=isNaN(Me.x),ii=isNaN(Me.y);if(pn||ii){Zt=Zt/2+3,Xt=Xt/2+3;var fi=45<=tt&&135>=tt,li=225<=tt&&315>=tt;_e===ol&&(fi||li)?(Gt.x=ii?Zt:Me.y,Gt.y=pn?Xt:Me.x,fi?0<=ae||isNaN(ae)&&.5>fe||!pn||(Gt.y=-Xt):li&&((0<=ae||isNaN(ae)&&.5>fe)&&pn&&(Gt.y=-Xt),ii&&(Gt.x=-Zt))):(pn&&(Gt.x=0<=ae||isNaN(ae)&&.5>fe?Zt:-Zt),ii&&(Gt.y=-Xt),Gt.rotate(tt))}else Gt.rotate(tt);Fe+=Gt.x,It+=Gt.y,st.pp(pt),Ye+=pt.x,Ht+=pt.y,ae=Tt.allocAt(Fe+Ye,It+Ht),ne.move(ae),Tt.free(ae),Tt.free(Gt),Tt.free(Mt),Tn.free(pt),gr.free(st)}}E!==null?E.Ul(!1):b.Ul(!1),b=O1(a),a.location.h(a.position.x+b.x,a.position.y+b.y),Tt.free(b)}};function r1(a,y,x,b){if(iu(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof Qr&&a.type===Gn.Link&&a.adornedObject instanceof hr&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof Vn&&a.ua!==null?(a=a.geometry.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):a instanceof Qr&&a.adornedPart.ua!==null?(a=a.adornedPart.ua.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):b.Ge(-(E/2),-(E/2),y+E,x+E),E=b.desiredSize,E.w()||b.ua===null?b.dc.h(0,0,E.width,E.height):b.dc.assign(b.ua.bounds),ea(b,!1)}}function dg(){this.xa="Base"}nt(dg,sa),dg.prototype.measure=function(a,y,x,b,E,te,ne){var ae=a.Pb();a.graduatedBounds=[];var fe=ae.margin,_e=fe.right+fe.left,Me=fe.top+fe.bottom;ae.measure(y,x,te,ne);var Fe=ae.measuredBounds,Ye=new Tn(-fe.left,-fe.top,Math.max(Fe.width+_e,0),Math.max(Fe.height+Me,0));a.graduatedBounds.push(Ye),E.assign(Ye);for(var tt=ae.geometry,st=ae.strokeWidth,pt=tt.flattenedSegments,It=tt.flattenedLengths,Mt=tt.flattenedTotalLength,Ht=pt.length,Gt=0,Zt=0,Xt=Hn(),pn=0;pn<Ht;pn++){var ii=pt[pn],fi=[];Zt=Gt=0;for(var li=ii.length,Kn=0;Kn<li;Kn+=2){var Rn=ii[Kn],Ji=ii[Kn+1];if(Kn!==0){var Zi=180*Math.atan2(Ji-Zt,Rn-Gt)/Math.PI;0>Zi&&(Zi+=360),fi.push(Zi)}Gt=Rn,Zt=Ji}Xt.push(fi)}if(a.graduatedIntervals===null){for(var to=[],_o=a.O.s,ha=_o.length,pa=0;pa<ha;pa++){var Xa=_o[pa],da=[];if(to.push(da),Xa.visible){var Gh=Xa.interval;if(!(0>Gh)){for(var Us=0;Us<ha;Us++)if(Us!==pa){var fc=_o[Us];if(fc.visible&&Xa.constructor===fc.constructor){var Ja=fc.interval;Ja>Gh&&da.push(Ja)}}}}}a.graduatedIntervals=to}var Wh=a.graduatedIntervals,au=a.O.s,ju=au.length,Wl=0,kl=0,Cd=Mt;a.graduatedMarks=[];for(var pc,Rp=0;Rp<ju;Rp++){var Zl=au[Rp];if(pc=[],Zl.visible&&Zl!==ae){var Qa=Math.abs(Zl.interval),Jg=a.graduatedTickUnit;if(!(2>Jg*Qa*Mt/a.graduatedRange&&Zl.graduatedSkip===null)){var Hf=It[0][0],Nc=0,Al=0;kl=Mt*Zl.graduatedStart-1e-4,Cd=Mt*Zl.graduatedEnd+1e-4;var lf=Jg*Qa,Kl=a.graduatedTickBase;if(Kl<a.graduatedMin){var Pd=(a.graduatedMin-Kl)/lf;Pd=Pd%1===0?Pd:Math.floor(Pd+1),Kl+=Pd*lf}else Kl>a.graduatedMin+lf&&(Kl-=Math.floor((Kl-a.graduatedMin)/lf)*lf);for(var Z0=Wh[Rp],Qg=Kl,Hy=1e-6*a.graduatedMax,Qc=1;Kl<=a.graduatedMax+Hy;Qc++){e:{for(var ph=Z0.length,Uf=0;Uf<ph;Uf++){var _d=(Kl-a.graduatedTickBase)%(Z0[Uf]*a.graduatedTickUnit),Bp=1e-6*a.graduatedTickUnit;if(_d<Bp&&_d>-Bp){var Ed=!1;break e}}Ed=!0}if(Ed&&(Kl>a.graduatedMax&&(Kl=a.graduatedMax),Zl.graduatedSkip===null||Zl instanceof Mo&&!Zl.graduatedSkip(Kl,Zl)||Zl instanceof hr&&!Zl.graduatedSkip(Kl,Zl))&&(Wl=(Kl-a.graduatedMin)*Mt/a.graduatedRange,Wl>Mt&&(Wl=Mt),kl<=Wl&&Wl<=Cd)){for(var qc=Xt[Nc][Al],Zh=It[Nc][Al];Nc<It.length;){for(;Wl>Hf&&Al<It[Nc].length-1;)Al++,qc=Xt[Nc][Al],Zh=It[Nc][Al],Hf+=Zh;if(Wl<=Hf)break;Nc++,Al=0,qc=Xt[Nc][Al],Zh=It[Nc][Al],Hf+=Zh}var Nl=pt[Nc],Oc=Nl[2*Al],K0=Nl[2*Al+1],gh=(Wl-(Hf-Zh))/Zh,Fp=new Tt(Oc+(Nl[2*Al+2]-Oc)*gh+st/2-tt.bounds.x,K0+(Nl[2*Al+3]-K0)*gh+st/2-tt.bounds.y);Fp.scale(ae.scale,ae.scale);e:{var gc=qc,uf=Xt[Nc];if(!(.5005>gh&&.4995<gh)){var Ic=gc;if(.5>gh?0<Al?Ic=uf[Al-1]:nn.$(Nl[0],Nl[Nl.length-2])&&nn.$(Nl[1],Nl[Nl.length-1])&&(Ic=uf[uf.length-1]):.5<gh&&(Al+1<uf.length?Ic=uf[Al+1]:nn.$(Nl[0],Nl[Nl.length-2])&&nn.$(Nl[1],Nl[Nl.length-1])&&(Ic=uf[0])),gc!==Ic){var Gf=Math.abs(gc-Ic);if(180<Gf&&(gc<Ic?gc+=360:Ic+=360,Gf=Math.abs(gc-Ic)),5e-4>gh||.9995<gh){qc=(gc+Ic)/2%360;break e}if(10>Gf){var jp=1-Math.abs(.5-gh);qc=(gc*jp+Ic*(1-jp))%360;break e}}}qc=gc}if(Zl instanceof Mo){var ec="";Zl.graduatedFunction!==null?(ec=Zl.graduatedFunction(Kl,Zl),ec=ec!=null?ec.toString():""):ec=(+Kl.toFixed(2)).toString(),ec!==""&&pc.push({$l:Fp,angle:qc,text:ec})}else pc.push({$l:Fp,angle:qc})}Kl=Qg+Qc*lf}}}a.graduatedMarks.push(pc)}ei(Xt);var _a=a.graduatedMarks;if(_a!==null)for(var qg=b.length,cl=0;cl<qg;cl++){var Gs=b[cl],hl=_a[cl];if(Gs.visible&&Gs!==ae&&hl.length!==0){if(Gs instanceof hr){var mh=a,Kh=E,cf=Gs.alignmentFocus;cf.Mc()&&(cf=qa);var Uy=Gs.angle;Gs.Kb=0,Gs.measure(1/0,1/0,0,0),Gs.Kb=Uy;var V0=Gs.measuredBounds,zp=V0.width,hf=V0.height,Wf=Tn.allocAt(0,0,zp,hf),Ol=Tt.alloc();Ol.xi(Wf,cf),Tn.free(Wf);for(var vh=-Ol.x,mc=-Ol.y,Cu=new Tn,Ld=hl.length,Hp=0;Hp<Ld;Hp++)for(var Md=hl[Hp],$0=Md.$l.x,Up=Md.$l.y,Ps=Md.angle,tc=0;4>tc;tc++){switch(tc){case 0:Ol.h(vh,mc);break;case 1:Ol.h(vh+zp,mc);break;case 2:Ol.h(vh,mc+hf);break;case 3:Ol.h(vh+zp,mc+hf)}Ol.rotate(Ps+Gs.angle),Ol.offset($0,Up),Hp===0&&tc===0?Cu.h(Ol.x,Ol.y,0,0):Cu.Ye(Ol),Ol.offset(-$0,-Up),Ol.rotate(-Ps-Gs.angle)}Tt.free(Ol),mh.graduatedBounds!==null&&mh.graduatedBounds.push(Cu),Ao(Kh,Cu.x,Cu.y,Cu.width,Cu.height)}else if(Gs instanceof Mo){var zu=a,Y0=E;zu.temporaryTextBlock===null&&(zu.temporaryTextBlock=new Mo);var Vl=zu.temporaryTextBlock;S1(Vl,Gs);var Vh=Gs.alignmentFocus;Vh.Mc()&&(Vh=qa);for(var Hu=Gs.segmentOrientation,Gp=Gs.segmentOffset,Td=new Tn,em=0,Wp=0,Dc=0,df=0,kd=0,Zp=hl.length,$h=0;$h<Zp;$h++){var eh=hl[$h];em=eh.$l.x,Wp=eh.$l.y,Dc=eh.angle,kd=df=Gs.angle,Hu!==ol&&(kd=Hu===Cg||Hu===n0?Dc+Gs.angle:Dc,df=Vn.computeAngle(Hu,kd)),Vl.Kb=df,Vl.text=eh.text||"",Vl.measure(1/0,1/0,0,0);var Yh=Vl.measuredBounds,yh=Vl.naturalBounds,Xh=yh.width,ff=yh.height,vc=gr.alloc();vc.reset(),vc.translate(-Yh.x,-Yh.y),vc.scale(Vl.scale,Vl.scale),vc.rotate(kd,Xh/2,ff/2),Hu!==Pg&&Hu!==Eg||vc.rotate(90,Xh/2,ff/2),Hu!==_g&&Hu!==Lg||vc.rotate(-90,Xh/2,ff/2),Hu===i0&&(45<Dc&&135>Dc||225<Dc&&315>Dc)&&vc.rotate(-Dc,Xh/2,ff/2);var Zf=Tn.allocAt(0,0,Xh,ff),Jh=Tt.alloc();Jh.xi(Zf,Vh),vc.Ga(Jh);var Kf=-Jh.x,Gy=-Jh.y,Sh=Tt.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=Vl.lineCount,eh.lines=[Vl.Cb,Vl.Ih,Vl.df,Vl.Le,Vl.Qc,Vl.Qb,Vl.ze],eh.actualBounds=pf,eh.measuredBounds=tm,eh.naturalBounds=Wy,$h===0?Td.assign(pf):Td.ed(pf),Tt.free(Sh),Tt.free(Jh),Tn.free(Zf),gr.free(vc)}zu.graduatedBounds!==null&&zu.graduatedBounds.push(Td),Ao(Y0,Td.x,Td.y,Td.width,Td.height)}ea(Gs,!1)}}},dg.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var b=a.Pb(),E=a.graduatedMarks;if(E!==null){var te=a.graduatedBounds,ne=0,ae=te[ne];ne++,b!==null&&b.arrange(ae.x-x.x,ae.y-x.y,ae.width,ae.height);for(var fe=y.length,_e=0;_e<fe;_e++){var Me=y[_e];ae=E[_e],Me.visible&&Me!==b&&ae.length!==0&&(ae=te[ne],ne++,Me.arrange(ae.x-x.x,ae.y-x.y,ae.width,ae.height))}a.graduatedBounds=null}}},dg.prototype.gc=function(a,y,x){var b=x.$i;x.$i=!0;var E=a.naturalBounds,te=E.width,ne=E.height;E=y instanceof Hl,y.save(),y.beginPath(),y.rect(-1,-1,te+1,ne+1),y.clip(),y.Se(),te=a.Pb(),te.gc(y,x),ne=a.Df()*x.scale,0>=ne&&(ne=1);for(var ae=te.actualBounds,fe=a.O.s,_e=a.graduatedMarks,Me=fe.length,Fe=0;Fe<Me;Fe++){var Ye=fe[Fe],tt=_e[Fe],st=tt.length;if(Ye.visible&&Ye!==te&&tt.length!==0){if(Ye instanceof hr){if(!(2>a.graduatedTickUnit*Ye.interval*te.geometry.flattenedTotalLength/a.graduatedRange*ne&&Ye.graduatedSkip===null)){var pt=Ye.measuredBounds,It=Ye.strokeWidth*Ye.scale,Mt=Ye.alignmentFocus;Mt.Mc()&&(Mt=qa);for(var Ht=0;Ht<st;Ht++){var Gt=tt[Ht].$l,Zt=tt[Ht].angle,Xt=Mt,pn=Ye.Ab;pn.reset(),pn.translate(Gt.x+ae.x,Gt.y+ae.y),pn.rotate(Zt+Ye.angle,0,0),pn.translate(-pt.width*Xt.x+Xt.offsetX+It/2,-pt.height*Xt.y+Xt.offsetY+It/2),pn.scale(Ye.scale,Ye.scale),Iu(Ye,!1),Ye.wh.set(Ye.Ab),Ye.Kk=Ye.scale,mu(Ye,!1),Ye.gc(y,x),E&&(a.svg.appendChild(Ye.svg),Ye.svg=null),Ye.Ab.reset()}}}else if(Ye instanceof Mo)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Mo),pt=a.temporaryTextBlock,S1(pt,Ye),It=0;It<st;It++)Mt=tt[It],Mt.actualBounds&&Mt.measuredBounds&&Mt.naturalBounds&&(pt.ec=Mt.text||"",pt.Kb=Mt.Sz||0,pt.Gc=Mt.lineCount||0,Ht=Mt.lines,Ht!==void 0&&(pt.Cb=Ht[0],pt.Ih=Ht[1],pt.df=Ht[2],pt.Le=Ht[3],pt.Qc=Ht[4],pt.Qb=Ht[5],pt.ze=Ht[6]),Mt.naturalBounds&&(pt.dc=Mt.naturalBounds),Mt.actualBounds&&(Ht=Mt.actualBounds,pt.arrange(Ht.x,Ht.y,Ht.width,Ht.height)),Ht=Mt.actualBounds,pt.arrange(Ht.x,Ht.y,Ht.width,Ht.height),Gt=Mt.measuredBounds,Mt=Mt.naturalBounds,Zt=pt.Ab,Zt.reset(),Zt.translate(Ht.x+ae.x,Ht.y+ae.y),Zt.translate(-Gt.x,-Gt.y),pt.no(Zt,Mt.x,Mt.y,Mt.width,Mt.height),Iu(pt,!1),pt.wh.set(pt.Ab),pt.Kk=pt.scale,mu(pt,!1),pt.Ng=Ye.part,pt.Me=Ye.panel,pt.gc(y,x),pt.Me=null,pt.Ng=null,E&&(a.svg.appendChild(pt.svg),pt.svg=null))}}x.$i=b,y.restore(),y.Vc(!0)};function Gn(a,y){if(Qt.call(this),this.na=null,a===void 0)this.na=Gn.Position;else if(typeof a=="string"){var x=$u.I(a);x!==null&&(this.na=x)}else a instanceof sa?this.na=a:a&&(this.na=Gn.Position,y=a);this.na===null&&At("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Gn.Grid?1048576:0),this.O=new Bn,this.yb=xa,this.Tm=oo,this.Uf=tr,this.$g=null,this.$e="",this.jg=new Tn(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=mi,this.jn=Xo,this.kn=Ur,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}nt(Gn,Qt),Gn.prototype.cloneProtected=function(a){Qt.prototype.cloneProtected.call(this,a),a.na=this.na,a.yb=this.yb.J(),a.Tm=this.Tm.J(),a.Uf=this.Uf,a.$e=this.$e,a.jg.assign(this.jg),this.T!==null&&(a.T=this.T.copy(a)),a.xo=this.xo,a.jn=this.jn.J(),a.kn=this.kn.J(),this.ra!==null&&(a.ra=this.ra.copy()),a.ub=this.ub,a.zn=this.zn,a.Hh=this.Hh},Gn.prototype.Af=function(a){Qt.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},Gn.prototype.copy=function(){var a=Qt.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 ri&&(te.Te=!0);var ae=a.diagram;ae!==null&&ae.undoManager.isUndoingRedoing||te.cb(vs,"elements",a,null,E,null,ne)}}return a}return null},ot=Gn.prototype,ot.toString=function(){return"Panel("+this.type.name+")#"+Or(this)},ot.Pn=function(a){Qt.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,b=0;b<x;b++)y[b].Pn(a)},ot.hh=function(a,y){if(this.na===Gn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Gn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Gn.Table)if(a.yc(),a instanceof Hl){var x=a.yd;a.yd=pm(a,"gojs-ts"),gv(this,a),a.nh.pop(),a.yd=x}else gv(this,a);(x=this.isClipping&&this.na===Gn.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 Me=_e.separatorStrokeWidth;isNaN(Me)&&(Me=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Fe=_e.separatorStroke;if(Fe===null&&(Fe=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),Me!==0&&Fe!==null){ws(a,y,Fe,!1,!1,ne,te),Fe=!1;var Ye=_e.separatorDashArray;Ye===null&&(Ye=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),Ye!==null&&(Fe=!0,y.js(Ye,0)),y.beginPath(),Ye=_e.position+Me,x?Ye>ne.height&&(Me-=Ye-ne.height):Ye>ne.width&&(Me-=Ye-ne.width),_e=_e.position+Me/2,y.lineWidth=Me,Me=a.yb,x?(_e+=Me.top,Ye=ne.width-Me.right,y.moveTo(Me.left,_e),y.lineTo(Ye,_e)):(_e+=Me.left,Ye=ne.height-Me.bottom,y.moveTo(_e,Me.top),y.lineTo(_e,Ye)),y.stroke(),y.Se(),Fe&&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),Me=0;Me<te;Me++){var Fe=b[Me];if(Fe!==void 0&&Fe.background!==null&&Fe.coversSeparators!==E&&Fe.actual!==0){var Ye=x?ne.height:ne.width;if(!(Fe.position>Ye)){var tt=Fe.Wc(),st=Fe.separatorStrokeWidth;isNaN(st)&&(st=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var pt=Fe.separatorStroke;pt===null&&(pt=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(pt===null||Fe.index===(x?fe:_e))&&(st=0),tt-=st,st=Fe.position+st,tt+=Fe.actual,st+tt>Ye&&(tt=Ye-st),0>=tt||(Ye=a.yb,ws(a,y,Fe.background,!0,!1,ae,ne),x?y.fillRect(Ye.left,st+Ye.top,ne.width-(Ye.left+Ye.right),tt):y.fillRect(st+Ye.left,Ye.top,tt,ne.height-(Ye.top+Ye.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"}ot.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},ot.kk=function(a,y,x){if(!Qt.prototype.kk.call(this,a,y,x))return!1;if(this.type===Gn.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,gv(this,a),a.yd=null;else if(this.na===Gn.Grid||this.na===Gn.Graduated)return this.svg.innerHTML="",this.svg.remove(),!1;x=this.O.s;for(var b=x.length,E=0;E<b;E++)x[E].gc(a,y);return!0},ot.nk=function(){return!0},ot.$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 Qt.prototype.$o.call(this,a,y,x,b)},ot.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,Me=-ne.m21*ae,Fe=ne.m11*ae,Ye=ae*(ne.m21*ne.dy-ne.m22*ne.dx),tt=ae*(ne.m12*ne.dx-ne.m11*ne.dy);if(this.areaBackground!==null)return ne=this.actualBounds,nn.Ff(ne.left,ne.top,ne.right,ne.bottom,a,y,x,b,E);if(this.background!==null)return te=a*fe+y*Me+Ye,ae=a*_e+y*Fe+tt,a=x*fe+b*Me+Ye,fe=x*_e+b*Fe+tt,E.h(0,0),x=this.naturalBounds,te=nn.Ff(0,0,x.width,x.height,te,ae,a,fe,E),E.transform(ne),te;te||(fe=1,Me=_e=0,Fe=1,tt=Ye=0),ae=a*fe+y*Me+Ye,a=a*_e+y*Fe+tt,fe=x*fe+b*Me+Ye,x=x*_e+b*Fe+tt,E.h(fe,x),b=(fe-ae)*(fe-ae)+(x-a)*(x-a),_e=!1,Fe=this.O.s,tt=Fe.length,Me=Tt.alloc(),Ye=null,y=1/0;var st=null,pt=this.isClipping&&this.na===Gn.Spot;pt&&(st=Tt.alloc(),Ye=this.Pb(),(_e=Ye.Sj(ae,a,fe,x,st))&&(y=(ae-st.x)*(ae-st.x)+(a-st.y)*(a-st.y)));for(var It=0;It<tt;It++){var Mt=Fe[It];Mt.visible&&Mt!==Ye&&Mt.Sj(ae,a,fe,x,Me)&&(_e=!0,Mt=(ae-Me.x)*(ae-Me.x)+(a-Me.y)*(a-Me.y),Mt<b&&(b=Mt,E.set(Me)))}return pt&&(y>b&&E.set(st),Tt.free(st)),Tt.free(Me),te&&E.transform(ne),_e},ot.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();Qt.prototype.Gj.call(this)},ot.v=function(a){if(!iu(this)){Qt.prototype.v.call(this,a),a=null,(this.na===Gn.Auto||this.na===Gn.Link)&&(a=this.Pb());for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];if((E===a||E.isPanelMain)&&E.v(!0),!E.desiredSize.w()){var te=gl(E,!1);(E instanceof rl||E instanceof Gn||E instanceof Mo||te!==jn)&&E.v(!0)}}}},ot.Uj=function(){if(!iu(this)){ea(this,!0),Hc(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},ot.Uk=function(){if(!(this.l&2048)){Iu(this,!0),mu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},ot.Wu=function(){mu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},ot.Wl=function(a,y,x,b){var E=this.jg;E.h(0,0,0,0);var te=this.desiredSize,ne=this.minSize;x===void 0&&(x=ne.width,b=ne.height),x=Math.max(x,ne.width),b=Math.max(b,ne.height);var ae=this.maxSize;isNaN(te.width)||(a=Math.min(te.width,ae.width)),isNaN(te.height)||(y=Math.min(te.height,ae.height)),a=Math.max(x,a),y=Math.max(b,y);var fe=this.yb;a=Math.max(a-fe.left-fe.right,0),y=Math.max(y-fe.top-fe.bottom,0);var _e=this.O.s;_e.length!==0&&this.na.measure(this,a,y,_e,E,x,b),a=E.width+fe.left+fe.right,fe=E.height+fe.top+fe.bottom,isFinite(te.width)&&(a=te.width),isFinite(te.height)&&(fe=te.height),a=Math.min(ae.width,a),fe=Math.min(ae.height,fe),a=Math.max(ne.width,a),fe=Math.max(ne.height,fe),a=Math.max(x,a),fe=Math.max(b,fe),Is(E,a,fe),Is(this.naturalBounds,a,fe),this.Ge(0,0,a,fe)},ot.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}ot.eh=function(a,y,x,b){var E=this.O.s;if(this.actualBounds.h(a,y,x,b),E.length!==0){if(!this.desiredSize.w()){a=gl(this,!0);var te=this.measuredBounds;y=te.width,te=te.height;var ne=this.Kg,ae=ne.left+ne.right;switch(ne=ne.top+ne.bottom,y===x&&te===b&&(a=jn),a){case jn:(y>x||te>b)&&(this.v(),this.measure(y>x?x:y,te>b?b:te,0,0));break;case Un: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)}},ot.gh=function(a){var y=this.naturalBounds,x=hh(this);if(Eo(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=Tt.allocAt(0,0);b--;){var te=y[b];if((te.visible||te===x)&&(cr(E.set(a),te.transform),te.ca(E)))return Tt.free(E),!0}return Tt.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},ot.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},ot.qm=function(a,y){if(y(this,a),a instanceof Gn){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 Gn&&a1(a,te,x)}}function yx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof Gn){y=y.O.s;for(var b=y.length,E=0;E<b;E++)l1(a,y[E],x)}}ot.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof Gn){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}ot.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 Gn){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 Gn?x=Math.max(x,c1(E)):E instanceof hr&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}ot.se=function(){return!(this.type===Gn.TableRow||this.type===Gn.TableColumn)};function Oh(a){return a.type===Gn.TableRow||a.type===Gn.TableColumn}ot.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),nl(this)))return null;var b=this.naturalBounds,E=1/this.Df(),te=this.se(),ne=te?a:cr(Tt.allocAt(a.x,a.y),this.transform),ae=this.diagram,fe=10,_e=5;if(ae!==null&&(fe=ae.Ql("extraTouchArea"),_e=fe/2),Eo(-(_e*E),-(_e*E),b.width+fe*E,b.height+fe*E,ne.x,ne.y)){if(!this.isAtomic){E=this.O.s;var Me=E.length;if(ae=Tt.alloc(),_e=(fe=this.isClipping&&this.na===Gn.Spot)?this.Pb():null,fe&&(_e.se()?cr(ae.set(a),_e.transform):ae.set(a),!_e.ca(ae)))return Tt.free(ae),te||Tt.free(ne),null;for(var Fe=hh(this);Me--;){var Ye=E[Me];if((Ye.visible||Ye===Fe)&&(Ye.se()?cr(ae.set(a),Ye.transform):ae.set(a),!fe||Ye!==_e)){var tt=null;if(Ye instanceof Gn?tt=Ye.ic(ae,y,x):Ye.pickable===!0&&Ye.ca(ae)&&(tt=Ye),tt!==null&&(y!==null&&(tt=y(tt)),tt!==null&&(x===null||x(tt))))return Tt.free(ae),te||Tt.free(ne),tt}}Tt.free(ae)}return this.background===null&&this.areaBackground===null?(te||Tt.free(ne),null):(a=Eo(0,0,b.width,b.height,ne.x,ne.y)?this:null,te||Tt.free(ne),a)}return te||Tt.free(ne),null},ot.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:cr(Tt.allocAt(a.x,a.y),this.transform);if(E=Eo(0,0,E.width,E.height,ne.x,ne.y),Oh(this)||E){if(!this.isAtomic){for(var ae=this.O.s,fe=ae.length,_e=Tt.alloc(),Me=hh(this);fe--;){var Fe=ae[fe];if(Fe.visible||Fe===Me){Fe.se()?cr(_e.set(a),Fe.transform):_e.set(a);var Ye=Fe;Fe=Fe instanceof Gn?Fe:null,(Fe!==null?Fe.ji(_e,y,x,b):Ye.ca(_e))&&Ye.pickable!==!1&&(y!==null&&(Ye=y(Ye)),Ye===null||x!==null&&!x(Ye)||b.add(Ye))}}Tt.free(_e)}return te||Tt.free(ne),E&&(this.background!==null||this.areaBackground!==null)}return te||Tt.free(ne),!1},ot.Cf=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=te;if(te===void 0&&(ne=gr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&gr.free(ne),!0;if(this.Yc(a,ne)){if(!this.isAtomic)for(var ae=hh(this),fe=this.O.s,_e=fe.length;_e--;){var Me=fe[_e];if(Me.visible||Me===ae){var Fe=Me.actualBounds,Ye=this.naturalBounds;Fe.x>Ye.width||Fe.y>Ye.height||0>Fe.x+Fe.width||0>Fe.y+Fe.height||(Fe=Me,Me=Me instanceof Gn?Me:null,Ye=gr.alloc(),Ye.set(ne),(Me!==null?Me.Cf(a,y,x,b,E,Ye):ca(Fe,a,b,Ye))&&(y!==null&&(Fe=y(Fe)),Fe===null||x!==null&&!x(Fe)||E.add(Fe)),gr.free(Ye))}}return te===void 0&&gr.free(ne),b}return te===void 0&&gr.free(ne),!1};function vv(a,y,x,b){for(var E=a.O.s,te=E.length;te--;){var ne=E[te];if(ne.visible){var ae=ne.actualBounds,fe=a.naturalBounds;ae.x>fe.width||ae.y>fe.height||0>ae.x+ae.width||0>ae.y+ae.height||(ne instanceof Gn&&vv(ne,y,x,b),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||b.add(ne))}}}ot.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:cr(Tt.allocAt(a.x,a.y),this.transform),_e=ae?y:cr(Tt.allocAt(y.x,y.y),this.transform),Me=fe.Bf(_e),Fe=0<fe.x&&fe.x<ne.width&&0<fe.y&&fe.y<ne.height||qr(fe.x,fe.y,0,0,0,ne.height)<=Me||qr(fe.x,fe.y,0,ne.height,ne.width,ne.height)<=Me||qr(fe.x,fe.y,ne.width,ne.height,ne.width,0)<=Me||qr(fe.x,fe.y,ne.width,0,0,0)<=Me;if(ne=fe.zd(0,0)<=Me&&fe.zd(0,ne.height)<=Me&&fe.zd(ne.width,0)<=Me&&fe.zd(ne.width,ne.height)<=Me,ae||(Tt.free(fe),Tt.free(_e)),Fe){if(!this.isAtomic){fe=Tt.alloc(),_e=Tt.alloc(),Me=hh(this);for(var Ye=this.O.s,tt=Ye.length;tt--;){var st=Ye[tt];if(st.visible||st===Me){var pt=st.actualBounds,It=this.naturalBounds;(!ae||!(pt.x>It.width||pt.y>It.height||0>pt.x+pt.width||0>pt.y+pt.height))&&(st.se()?(pt=st.transform,cr(fe.set(a),pt),cr(_e.set(y),pt)):(fe.set(a),_e.set(y)),pt=st,st=st instanceof Gn?st:null,(st!==null?st.og(fe,_e,x,b,E,te):pt.tx(fe,_e,E))&&(x!==null&&(pt=x(pt)),pt===null||b!==null&&!b(pt)||te.add(pt)))}}Tt.free(fe),Tt.free(_e)}return E?Fe:ne}return!1};function yv(a){var y=null;return a instanceof hr&&(y=a.spot1,y===oo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Xs),y}function Sv(a){var y=null;return a instanceof hr&&(y=a.spot2,y===oo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Na),y}ot.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},ot.M=function(a){return this.O.M(a)},ot.Gb=function(a,y){y instanceof Ti&&At("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&At("Cannot make a Panel contain itself: "+this.toString()),At("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&At("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+y.toString()+", already contained by "+x.toString()+", cannot be shared by this Panel: "+this.toString()),this.na!==Gn.Grid||y instanceof hr||At("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Gn.Graduated||y instanceof hr||y instanceof Mo||At("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+y),y.wi(this),y.Ng=null,this.itemArray!==null){var b=y.data;b!==null&&typeof b=="object"&&(this.ge===null&&(this.ge=new ci),this.ge.add(b,y))}var E=this.O;if(b=-1,x===this){for(var te=-1,ne=this.O.s,ae=ne.length,fe=0;fe<ae;fe++)if(ne[fe]===y){te=fe;break}if(te!==-1){if(te===a||te+1>=E.count&&a>=E.count)return;E.mb(te),b=te}else At("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 Gn&&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 ri&&(x.Te=!0),x.Te&&x instanceof ri&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(ds,"elements",this,y,null,b,null),x.cb(vs,"elements",this,null,y,null,a)))};function xv(a,y){a.l=y?a.l|16777216:a.l&-16777217}ot.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)},ot.mb=function(a){0<=a&&this.pc(a,!0)},ot.pc=function(a,y){var x=this.O,b=x.M(a);if(b.Ng=null,b.wi(null),this.ge!==null){var E=b.data;typeof E=="object"&&this.ge.remove(E)}x.mb(a),ea(this,!1),this.v(),this.$g===b&&(this.$g=null),this.graduatedIntervals=null;var te=this.part;te!==null&&(te.Rh=null,te.ag=NaN,te.Wb(),te instanceof ri&&(b instanceof Gn?b.qm(b,function(ne,ae){Gv(te,ae,y)}):Gv(te,b,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||te.cb(ds,"elements",this,b,null,a,null))},ot.Fb=function(a){0>a&&En(a,">= 0",Gn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new ta;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(vs,"rowdefs",this,null,x,null,a)}return y[a]},ot.oA=function(a){if(0>a&&En(a,">= 0",Gn,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(ds,"rowdefs",this,x,null,a,null),this.v()}}};function h1(a,y,x){var b=a.rowDefs;if(!(0>y)){if(b[y]=x instanceof ta?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}ot.Eb=function(a){0>a&&En(a,">= 0",Gn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new ta;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(vs,"coldefs",this,null,x,null,a)}return y[a]},ot.jA=function(a){if(0>a&&En(a,">= 0",Gn,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(ds,"coldefs",this,x,null,a,null),this.v()}}};function d1(a,y,x){var b=a.colDefs;if(!(0>y)){if(b[y]=x instanceof ta?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}ot.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},ot.Hy=function(a,y){return(a=this.Fb(a))&&Am(a,new ta(y)),this},ot.By=function(a,y){return(a=this.Eb(a))&&Am(a,new ta(y)),this},ot.nz=function(a){if(0>a||this.type!==Gn.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},ot.fz=function(a){if(0>a||this.type!==Gn.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},ot.Fz=function(a,y){if(y===void 0&&(y=new Tt(NaN,NaN)),this.type!==Gn.Graduated)return y.h(NaN,NaN),y;a=Math.min(Math.max(a,this.graduatedMin),this.graduatedMax);var x=this.Pb();return x.geometry.Pu((a-this.graduatedMin)/this.graduatedRange,y),x.transform.Ga(y)},ot.Gz=function(a){if(this.type!==Gn.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function f1(a){return a=a.allBindings,a!==null&&a._isFrozen}function Ru(a){var y=a.allBindings;if(y===null)a.data!==null&&At("Template cannot have .data be non-null: "+a),a.allBindings=y=new Bn;else if(y._isFrozen)return;var x=new Bn;xv(a,!1),a.qm(a,function(_e,Me){Me.th();var Fe=Me.localBindings;if(Fe!==null)for(Ef(Me,!1),Fe=Fe.iterator;Fe.next();){var Ye=Fe.value;Ye.mode===Dg&&Ef(Me,!0);var tt=Ye.sourceName;tt!==null&&(tt==="/"&&xv(_e,!0),tt=LS(Ye,_e,Me),tt!==null&&(x.add(tt),tt.srcBindings===null&&(tt.srcBindings=new Bn),tt.srcBindings.add(Ye))),y.add(Ye)}if(Me instanceof Gn&&Me.type===Gn.Table){if(0<Me.rowCount){for(_e=Me.rowDefs,Fe=_e.length,Ye=0;Ye<Fe;Ye++)if(tt=_e[Ye],tt!==void 0&&tt.be!==null)for(var st=tt.be.iterator;st.next();){var pt=st.value;pt.xd=tt,pt.to=2,pt.wl=tt.index,y.add(pt)}}if(0<Me.columnCount){for(Me=Me.colDefs,_e=Me.length,Fe=0;Fe<_e;Fe++)if(Ye=Me[Fe],Ye!==void 0&&Ye.be!==null)for(tt=Ye.be.iterator;tt.next();)st=tt.value,st.xd=Ye,st.to=1,st.wl=Ye.index,y.add(st)}}});for(var b=x.iterator;b.next();){var E=b.value;if(E.srcBindings!==null){Ef(E,!0);for(var te=E.srcBindings.iterator;te.next();){var ne=te.value;E.localBindings===null&&(E.localBindings=new Bn),E.localBindings.add(ne)}}E.srcBindings=null}for(b=y.iterator;b.next();)if(E=b.value,te=E.xd,te!==null){E.xd=null;var ae=E.targetProperty,fe=ae.indexOf(".");0<fe&&te instanceof Gn&&(ne=ae.substring(0,fe),ae=ae.substr(fe+1),fe=te.fb(ne),fe!==null?(te=fe,E.targetProperty=ae):Dn('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+E.toString())),te instanceof ta?(ne=Or(te.panel),E.Ai=ne===void 0?-1:ne,te.panel.bindingId=E.Ai):te instanceof Qt?(ne=Or(te),E.Ai=ne===void 0?-1:ne,te.bindingId=E.Ai):At("Unknown type of binding target: "+te)}y.freeze(),a instanceof Ti&&a.Zc()&&a.Va()}ot.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return yx(y,function(x){x instanceof Gn&&(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},ot.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 Gn))continue;E===1?te=te.Eb(x.wl):E===2&&(te=te.Fb(x.wl))}te!==void 0&&x.Mv(te,b)}}},ot.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 Gn&&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 Gn)||te.data!==y[ne])return!0;E++,ne++}return!1}function fg(a){if(a.type===Gn.Spot||a.type===Gn.Auto)return Math.min(a.O.length,1);if(a.type===Gn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof hr&&b.isPanelMain))break}return x}return a.type===Gn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Gn&&Oh(a))?1:0}ot.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 Gn){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 ri&&(y.Te=!0),y.Te&&y instanceof ri&&(y.wc=null))}}function Tm(a,y,x,b){if(!(y==null||0>x)){var E=bv(a,y);if(E=Cv(a,E),E!==null){if(Ru(E),E=E.copy(),E.l&16777216){var te=a.ih();te!==null&&xv(te,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new ci),a.ge.add(y,E)),te=x+fg(a),a.Gb(te,E),b&&(E.ub=y,wv(a,te,x),E.ub=null),E.data=y}}}function wv(a,y,x){for(a=a.O;y<a.length;){var b=a.M(y);if(b instanceof Gn){var E=y,te=x;b.type===Gn.TableRow?b.row=E:b.type===Gn.TableColumn&&(b.column=E),b.itemIndex=te}y++,x++}}function bv(a,y){if(y===null)return"";if(a=a.itemCategoryProperty,typeof a=="function")a=a(y);else if(typeof a=="string"&&typeof y=="object"){if(a==="")return"";a=Os(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;At("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function Cv(a,y){var x=a.itemTemplateMap,b=null;return x!==null&&(b=x.I(y)),b===null&&(x!==null&&(b=x.I("")),b===null&&(g1||(g1=!0,Dn('No item template Panel found for category "'+y+'" on '+a),Dn(" Using default item template."),a=new Gn,y=new Mo,y.bind(new Hs("text","",hi)),a.add(y),m1=a),b=m1)),b}function km(a,y,x){var b=y.enabledChanged;if(b!==null&&b(y,x),y instanceof Gn){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var te=y[E];x&&te instanceof Gn&&!te.isEnabled||km(a,te,x)}}}function kc(a,y){y.name=a,$u.add(a,y)}Je.Object.defineProperties(Gn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Gn.Grid,this.v(),this.g("type",y,a))}},elements:{get:function(){return this.O.iterator}},naturalBounds:{get:function(){return this.dc}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"?(0>a&&En(a,">= 0",Gn,"padding"),a=new Mi(a)):(0>a.left&&En(a.left,">= 0",Gn,"padding:value.left"),0>a.right&&En(a.right,">= 0",Gn,"padding:value.right"),0>a.top&&En(a.top,">= 0",Gn,"padding:value.top"),0>a.bottom&&En(a.bottom,">= 0",Gn,"padding:value.bottom"));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.v(),this.g("padding",y,a))}},defaultAlignment:{get:function(){return this.Tm},set:function(a){var y=this.Tm;y.D(a)||(this.Tm=a=a.J(),this.v(),this.g("defaultAlignment",y,a))}},defaultStretch:{get:function(){return this.Uf},set:function(a){var y=this.Uf;y!==a&&(this.Uf=a,this.v(),this.g("defaultStretch",y,a))}},defaultSeparatorPadding:{get:function(){return this.T!==null?this.T.Qp:xa},set:function(a){typeof a=="number"&&(a=new Mi(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new Su),this.T.Qp=a,this.v(),this.g("defaultSeparatorPadding",y,a))}},defaultRowSeparatorStroke:{get:function(){return this.T!==null?this.T.ia:null},set:function(a){var y=this.defaultRowSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof fo)&&(a instanceof fo&&a.freeze(),this.T===null&&(this.T=new Su),this.T.ia=a,this.N(),this.g("defaultRowSeparatorStroke",y,a))}},defaultRowSeparatorStrokeWidth:{get:function(){return this.T!==null?this.T.Ha:1},set:function(a){var y=this.defaultRowSeparatorStrokeWidth;y!==a&&isFinite(a)&&0<=a&&(this.T===null&&(this.T=new Su),this.T.Ha=a,this.v(),this.g("defaultRowSeparatorStrokeWidth",y,a))}},defaultRowSeparatorDashArray:{get:function(){return this.T!==null?this.T.V:null},set:function(a){var y=this.defaultRowSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var te=a[E];typeof te=="number"&&0<=te&&isFinite(te)||At("defaultRowSeparatorDashArray value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new Su),this.T.V=a,this.N(),this.g("defaultRowSeparatorDashArray",y,a)}}},defaultColumnSeparatorStroke:{get:function(){return this.T!==null?this.T.u:null},set:function(a){var y=this.defaultColumnSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof fo)&&(a instanceof fo&&a.freeze(),this.T===null&&(this.T=new Su),this.T.u=a,this.N(),this.g("defaultColumnSeparatorStroke",y,a))}},defaultColumnSeparatorStrokeWidth:{get:function(){return this.T!==null?this.T.F:1},set:function(a){var y=this.defaultColumnSeparatorStrokeWidth;y!==a&&isFinite(a)&&0<=a&&(this.T===null&&(this.T=new Su),this.T.F=a,this.v(),this.g("defaultColumnSeparatorStrokeWidth",y,a))}},defaultColumnSeparatorDashArray:{get:function(){return this.T!==null?this.T.o:null},set:function(a){var y=this.defaultColumnSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var te=a[E];typeof te=="number"&&0<=te&&isFinite(te)||At("defaultColumnSeparatorDashArray value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new Su),this.T.o=a,this.N(),this.g("defaultColumnSeparatorDashArray",y,a)}}},inRowsCols:{get:function(){return this.T!==null?this.T.nb:null},set:function(a){this.T===null&&(this.T=new Su),this.T.nb=a}},viewboxStretch:{get:function(){return this.xo},set:function(a){var y=this.xo;y!==a&&(this.xo=a,this.v(),this.g("viewboxStretch",y,a))}},gridCellSize:{get:function(){return this.jn},set:function(a){var y=this.jn;if(!y.D(a)){a.w()&&a.width!==0&&a.height!==0||At("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()||At("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Lc(x),this.N(),this.g("gridOrigin",y,a)}}},graduatedMin:{get:function(){return this.ra!==null?this.ra.lq:0},set:function(a){var y=this.graduatedMin;y!==a&&(this.ra===null&&(this.ra=new dh),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),Ta(this)&&(a=this.part,a!==null&&zo(this,a,"graduatedRange")))}},graduatedMax:{get:function(){return this.ra!==null?this.ra.F:100},set:function(a){var y=this.graduatedMax;y!==a&&(this.ra===null&&(this.ra=new dh),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),Ta(this)&&(a=this.part,a!==null&&zo(this,a,"graduatedRange")))}},graduatedRange:{get:function(){return this.graduatedMax-this.graduatedMin}},graduatedTickUnit:{get:function(){return this.ra!==null?this.ra.ia:10},set:function(a){var y=this.graduatedTickUnit;y!==a&&0<a&&(this.ra===null&&(this.ra=new dh),this.ra.ia=a,this.v(),this.g("graduatedTickUnit",y,a))}},graduatedTickBase:{get:function(){return this.ra!==null?this.ra.V:0},set:function(a){var y=this.graduatedTickBase;y!==a&&(this.ra===null&&(this.ra=new dh),this.ra.V=a,this.v(),this.g("graduatedTickBase",y,a))}},graduatedMarks:{get:function(){return this.ra!==null?this.ra.u:null},set:function(a){this.ra!==null?this.ra.u=a:a!==null&&(this.ra=new dh,this.ra.u=a)}},graduatedBounds:{get:function(){return this.ra!==null?this.ra.j:null},set:function(a){this.ra!==null?this.ra.j=a:a!==null&&(this.ra=new dh,this.ra.j=a)}},graduatedIntervals:{get:function(){return this.ra!==null?this.ra.o:null},set:function(a){this.ra!==null?this.ra.o=a:a!==null&&(this.ra=new dh,this.ra.o=a)}},temporaryTextBlock:{get:function(){return this.ra!==null?this.ra.Zh:null},set:function(a){this.ra!==null?this.ra.Zh=a:a!==null&&(this.ra=new dh,this.ra.Zh=a)}},panelLayoutState:{get:function(){return this.F},set:function(a){this.F=a}},Te:{get:function(){return(this.l&8388608)!==0},set:function(a){(this.l&8388608)!==0!==a&&(this.l^=8388608)}},rowDefs:{get:function(){return this.T===null&&(this.T=new Su),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new Su),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:Om},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new Su),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:Om},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new Su),this.T.j=a,this.v(),this.g("columnSizing",y,a))}},topIndex:{get:function(){return this.T!==null?this.T.Hb:0},set:function(a){var y=this.topIndex;y!==a&&((!isFinite(a)||0>a)&&At("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Su),this.T.Hb=a,this.v(),this.g("topIndex",y,a))}},leftIndex:{get:function(){return this.T!==null?this.T.hb:0},set:function(a){var y=this.leftIndex;y!==a&&((!isFinite(a)||0>a)&&At("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Su),this.T.hb=a,this.v(),this.g("leftIndex",y,a))}},data:{get:function(){return this.ub},set:function(a){var y=this.ub;if(y!==a){var x=this instanceof Ti&&!(this instanceof Qr);Ru(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof Vn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Ti&&(y!==null&&x.cf.remove(y),a!==null&&x.cf.add(a,this))):(x=this.panel,x!==null&&x.ge!==null&&(y!==null&&x.ge.remove(y),a!==null&&x.ge.add(a,this)))),this.g("data",y,a),b!==null&&b.undoManager.isUndoingRedoing||a!==null&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var y=this.zn;y!==a&&(this.zn=a,this.g("itemIndex",y,a))}},allBindings:{get:function(){return this.A!==null?this.A.nb:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new Lf),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&Sx(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&uy(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&ly(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||p1(this,a)}}},itemTemplate:{get:function(){return this.itemTemplateMap===null?null:this.itemTemplateMap.I("")},set:function(a){if(this.itemTemplateMap===null){if(a===null)return;this.itemTemplateMap=new ci}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Ti||a.isPanelMain)&&At("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.mv())}},itemTemplateMap:{get:function(){return this.A!==null?this.A.Pc:null},set:function(a){var y=this.itemTemplateMap;if(y!==a){for(var x=a.iterator;x.next(););yr(this),this.A.Pc=a,this.g("itemTemplateMap",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.mv()}}},itemCategoryProperty:{get:function(){return this.A!==null?this.A.Oc:"category"},set:function(a){var y=this.itemCategoryProperty;y!==a&&(yr(this),this.A.Oc=a,this.g("itemCategoryProperty",y,a))}},isAtomic:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.g("isAtomic",y,a))}},isClipping:{get:function(){return(this.l&2097152)!==0},set:function(a){var y=(this.l&2097152)!==0;y!==a&&(this.l^=2097152,this instanceof er&&(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))}}}),Je.Object.defineProperties(Gn,{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")}}}),Gn.prototype.rebuildItemElements=Gn.prototype.mv,Gn.prototype.findItemPanelForData=Gn.prototype.sx,Gn.prototype.updateTargetBindings=Gn.prototype.La,Gn.prototype.copyTemplate=Gn.prototype.Uy,Gn.prototype.graduatedValueForPoint=Gn.prototype.Gz,Gn.prototype.graduatedPointForValue=Gn.prototype.Fz,Gn.prototype.findColumnForLocalX=Gn.prototype.fz,Gn.prototype.findRowForLocalY=Gn.prototype.nz,Gn.prototype.addColumnDefinition=Gn.prototype.By,Gn.prototype.addRowDefinition=Gn.prototype.Hy,Gn.prototype.addRowColumnDefinition=Gn.prototype.Gy,Gn.prototype.removeColumnDefinition=Gn.prototype.jA,Gn.prototype.getColumnDefinition=Gn.prototype.Eb,Gn.prototype.removeRowDefinition=Gn.prototype.oA,Gn.prototype.getRowDefinition=Gn.prototype.Fb,Gn.prototype.removeAt=Gn.prototype.mb,Gn.prototype.remove=Gn.prototype.remove,Gn.prototype.insertAt=Gn.prototype.Gb,Gn.prototype.elt=Gn.prototype.M,Gn.prototype.add=Gn.prototype.add,Gn.prototype.findObject=Gn.prototype.fb,Gn.prototype.findInVisualTree=Gn.prototype.Nl,Gn.prototype.walkVisualTreeFrom=Gn.prototype.qm,Gn.prototype.findMainElement=Gn.prototype.Pb;var g1=!1,m1=null,$u=new ci;Gn.className="Panel",Gn.definePanelLayout=kc,kc("Position",new vm),kc("Vertical",new Sm),kc("Auto",new wm),kc("Link",new Lm);function dh(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}dh.prototype.copy=function(){var a=new dh;return a.lq=this.lq,a.F=this.F,a.ia=this.ia,a.V=this.V,a.u=this.u,a.j=this.j,a.o=this.o,a.Zh=this.Zh,a},dh.className="GradPanelSettings";function Su(){this.Pc=[],this.Oc=[],this.j=this.ob=Om,this.hb=this.Hb=0,this.Qp=xa,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}Su.prototype.copy=function(a){for(var y=new Su,x=this.Pc,b=x.length,E=y.Pc,te=0;te<b;te++)if(x[te]!==void 0){var ne=x[te].copy();ne.wi(a),E[te]=ne}for(x=this.Oc,b=x.length,E=y.Oc,te=0;te<b;te++)x[te]!==void 0&&(ne=x[te].copy(),ne.wi(a),E[te]=ne);return y.ob=this.ob,y.j=this.j,y.Hb=this.Hb,y.hb=this.hb,y.Qp=this.Qp.J(),y.Ha=this.Ha,y.ia=this.ia,y.V=this.V,y.F=this.F,y.u=this.u,y.o=this.o,y.nb=this.nb,y},Su.className="TablePanelSettings";function ta(a){pr(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=oo,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Pv,this.hg=tr,this.lo=this.dg=null,this.mo=NaN,this.Ma=this.tj=null,this.Pm=!1,a&&(Object.assign(this,a),a.column!==void 0?(this.isRow=!1,this.index=a.column):a.row!==void 0&&(this.isRow=!0,this.index=a.row))}ta.prototype.copy=function(){var a=new ta;return a.uq=this.uq,a.Za=this.Za,a.Hc=this.Hc,a.jj=this.jj,a.hj=this.hj,a.Jb=this.Jb,a.oa=this.oa,a.oc=this.oc,a.pa=this.pa,a.hg=this.hg,a.oo=this.oo,this.dg===null?a.dg=null:a.dg=this.dg.J(),a.lo=this.lo,a.mo=this.mo,a.tj=null,this.tj!==null&&(a.separatorDashArray=Nn(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function Am(a,y){y.isRow?a.height=y.height:a.width=y.width,a.minimum=y.minimum,a.maximum=y.maximum,a.alignment=y.alignment,a.stretch=y.stretch,a.sizing=y.sizing,a.dg=y.separatorPadding===null?null:y.separatorPadding.J(),a.separatorStroke=y.separatorStroke,a.separatorStrokeWidth=y.separatorStrokeWidth,a.tj=null,y.separatorDashArray&&(a.tj=Nn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}ot=ta.prototype,ot.qb=function(a){a.classType===ta&&(this.sizing=a)},ot.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Or(this)},ot.wi=function(a){this.Me=a},ot.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)},ot.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===Gn.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)},ot.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}ot.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new Hs(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&f1(y)&&At("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new Bn),this.be.add(E),this},Je.Object.defineProperties(ta.prototype,{panel:{get:function(){return this.Me}},isRow:{get:function(){return this.uq},set:function(a){this.uq=a}},index:{get:function(){return this.Za},set:function(a){this.Za=a}},height:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&En(a,">= 0",ta,"height"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("height",y,a))}},width:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&En(a,">= 0",ta,"width"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("width",y,a))}},minimum:{get:function(){return this.jj},set:function(a){var y=this.jj;y!==a&&((0>a||!isFinite(a))&&En(a,">= 0",ta,"minimum"),this.jj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("minimum",y,a))}},maximum:{get:function(){return this.hj},set:function(a){var y=this.hj;y!==a&&(0>a&&En(a,">= 0",ta,"maximum"),this.hj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("maximum",y,a))}},alignment:{get:function(){return this.Jb},set:function(a){var y=this.Jb;y.D(a)||(this.Jb=a.J(),this.panel!==null&&this.panel.v(),this.Ob("alignment",y,a))}},stretch:{get:function(){return this.hg},set:function(a){var y=this.hg;y!==a&&(this.hg=a,this.panel!==null&&this.panel.v(),this.Ob("stretch",y,a))}},separatorPadding:{get:function(){return this.dg},set:function(a){typeof a=="number"&&(a=new Mi(a));var y=this.dg;a!==null&&y!==null&&y.D(a)||(a!==null&&(a=a.J()),this.dg=a,this.panel!==null&&this.panel.v(),this.Ob("separatorPadding",y,a))}},separatorStroke:{get:function(){return this.lo},set:function(a){var y=this.lo;y!==a&&(a!==null&&Tf(a,"RowColumnDefinition.separatorStroke"),a instanceof fo&&a.freeze(),this.lo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStroke",y,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var y=this.mo;y!==a&&(this.mo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStrokeWidth",y,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var y=this.tj;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var te=a[E];typeof te=="number"&&0<=te&&isFinite(te)||At("separatorDashArray value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===0){if(y===null)return;a=null}}this.tj=a,this.panel!==null&&this.panel.N(),this.Ob("separatorDashArray",y,a)}}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&Tf(a,"RowColumnDefinition.background"),a instanceof fo&&a.freeze(),this.Ma=a,this.panel!==null&&this.panel.N(),this.Ob("background",y,a))}},coversSeparators:{get:function(){return this.Pm},set:function(a){var y=this.Pm;y!==a&&(this.Pm=a,this.panel!==null&&this.panel.N(),this.Ob("coversSeparators",y,a))}},sizing:{get:function(){return this.oo},set:function(a){var y=this.oo;y!==a&&(this.oo=a,this.panel!==null&&this.panel.v(),this.Ob("sizing",y,a))}},actual:{get:function(){return this.oa},set:function(a){this.oa=isNaN(this.Hc)?Math.max(Math.min(this.hj,a),this.jj):Math.max(Math.min(this.hj,this.Hc),this.jj)}},measured:{get:function(){return this.oc},set:function(a){this.oc=a}},total:{get:function(){return this.oa+this.Wc()}},position:{get:function(){return this.pa},set:function(a){this.pa=a}}}),ta.prototype.computeEffectiveSpacing=ta.prototype.Wc,ta.prototype.computeEffectiveSpacingTop=ta.prototype.Io;var Pv=new _n(ta,"Default",0),pg=new _n(ta,"None",1),Om=new _n(ta,"ProportionalExtra",2);ta.className="RowColumnDefinition",ta.Default=Pv,ta.None=pg,ta.ProportionalExtra=Om;function hr(a,y){Qt.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)}nt(hr,Qt),hr.prototype.cloneProtected=function(a){Qt.prototype.cloneProtected.call(this,a),a.ua=this.ua,a.Rd=this.Rd,a.an=this.an,a.Ui=this.Ui,a.xc=this.xc,a.ig=this.ig,this.Yg!==null&&(a.Yg=Nn(this.Yg)),this.Na!==null&&(a.Na=this.Na.nc?this.Na:this.Na.copy()),a.Un=this.Un,a.Vn=this.Vn,this.fa!==null&&(a.fa=this.fa.copy())};function ef(a){a.Na===null?a.Na=new Lv:a.Na.nc&&(a.Na=a.Na.copy())}ot=hr.prototype,ot.th=function(){Qt.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},ot.qb=function(a){a===jn||a===mi||a===Dr||a===tr?this.geometryStretch=a:Qt.prototype.qb.call(this,a)},ot.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Or(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,Me,Fe,Ye,tt,st,pt=0,It=Hn(),Mt=2;Mt<E;Mt+=2)_e=x[Mt],Me=x[Mt+1],Fe=_e-ae,ae=Me-fe,Fe===0&&(Fe=.001),Ye=ae/Fe,tt=Math.atan2(ae,Fe),st=Math.sqrt(Fe*Fe+ae*ae),It.push([Fe,tt,Ye,st]),pt+=st,ae=_e,fe=Me;ae=x[0],fe=x[1],Fe=b.measuredBounds.width,b instanceof hr&&(Fe-=b.strokeWidth),1>Fe&&(Fe=1),E=x=Fe,_e=ne/2,Me=_e!==0,Mt=0,st=It[Mt],Fe=st[0],tt=st[1],Ye=st[2],st=st[3];for(var Ht=0;.1<=pt;){if(Ht===0&&(Me?(E=x,E-=_e,pt-=_e,Me=!1):E=x,E===0&&(E=1)),E>pt){ei(It);return}E>st?(Ht=E-st,E=st):Ht=0;var Gt=Math.sqrt(E*E/(1+Ye*Ye));if(0>Fe&&(Gt=-Gt),ae+=Gt,fe+=Ye*Gt,a.translate(ae,fe),a.rotate(tt),a.translate(-(ne/2),-(te/2)),Ht===0&&b.hh(a,y),a.translate(ne/2,te/2),a.rotate(-tt),a.translate(-ae,-fe),pt-=E,st-=E,Ht!==0){if(Mt++,Mt===It.length){ei(It);return}st=It[Mt],Fe=st[0],tt=st[1],Ye=st[2],st=st[3],E=Ht}}ei(It)}}ot.hh=function(a,y){var x=this.xc,b=this.Ui;if(x!==null||b!==null){var E=this.ua;if(E!==null){a.yc();var te=this.actualBounds,ne=this.naturalBounds;b!==null&&ws(this,a,b,!0,!1,ne,te);var ae=this.part,fe=this.ig;if(x===null||fe!==0||ae===null||!this.isPanelMain&&ae.Pb()!==this||(fe=ae.type===Gn.Link&&ae instanceof Qr&&ae.category==="Selection"&&ae.adornedObject instanceof hr&&ae.adornedPart.Pb()===ae.adornedObject?ae.adornedObject.strokeWidth:0),fe===0&&(x=null),x!==null&&fe!==0&&(ws(this,a,x,!1,!1,ne,te),a.lineWidth=fe,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),te=!1,ae&&y.Gf("drawShadows")&&(te=ae.isShadowed),a.Il===!1&&(te=!1),ae=!0,x===null||b!==null&&b!=="transparent"||(ae=!1),ne=!1,fe=this.strokeDashArray,fe!==null&&(ne=!0,a.js(fe,this.strokeDashOffset)),E.type===Yn.j)a.beginPath(),a.moveTo(E.startX,E.startY),a.lineTo(E.endX,E.endY),x!==null&&a.jk(),a.Se();else if(E.type===Yn.u){var _e=E.startX;fe=E.startY;var Me=E.endX,Fe=E.endY;E=Math.min(_e,Me);var Ye=Math.min(fe,Fe);_e=Math.abs(Me-_e),fe=Math.abs(Fe-fe),a.beginPath(),a.rect(E,Ye,_e,fe),b!==null&&a.ng(b),x!==null&&(ae&&te&&Uc(a),a.jk(),ae&&te&&lh(a)),a.Se()}else if(E.type===Yn.F)_e=E.startX,fe=E.startY,Me=E.endX,Fe=E.endY,E=Math.abs(Me-_e)/2,Ye=Math.abs(Fe-fe)/2,_e=Math.min(_e,Me)+E,fe=Math.min(fe,Fe)+Ye,a.beginPath(),a.moveTo(_e,fe-Ye),a.bezierCurveTo(_e+nn.wg*E,fe-Ye,_e+E,fe-nn.wg*Ye,_e+E,fe),a.bezierCurveTo(_e+E,fe+nn.wg*Ye,_e+nn.wg*E,fe+Ye,_e,fe+Ye),a.bezierCurveTo(_e-nn.wg*E,fe+Ye,_e-E,fe+nn.wg*Ye,_e-E,fe),a.bezierCurveTo(_e-E,fe-nn.wg*Ye,_e-nn.wg*E,fe-Ye,_e,fe-Ye),a.closePath(),b!==null&&a.ng(b),x!==null&&(ae&&te&&Uc(a),a.jk(),ae&&te&&lh(a)),a.Se();else if(E.type===Yn.o)for(E=E.figures,fe=E.length,Ye=0;Ye<fe;Ye++){_e=E.s[Ye],a.beginPath(),a.moveTo(_e.startX,_e.startY),Me=_e.segments.s,Fe=Me.length;for(var tt=null,st=0;st<Fe;st++){var pt=Me[st];switch(pt.type){case Ms:a.moveTo(pt.endX,pt.endY);break;case xo:a.lineTo(pt.endX,pt.endY);break;case ga:a.bezierCurveTo(pt.point1X,pt.point1Y,pt.point2X,pt.point2Y,pt.endX,pt.endY);break;case dl:a.quadraticCurveTo(pt.point1X,pt.point1Y,pt.endX,pt.endY);break;case cs:if(pt.radiusX===pt.radiusY){var It=Math.PI/180;a.arc(pt.point1X,pt.point1Y,pt.radiusX,pt.startAngle*It,(pt.startAngle+pt.sweepAngle)*It,0>pt.sweepAngle,tt!==null?tt.endX:_e.startX,tt!==null?tt.endY:_e.startY)}else if(tt=Da(pt,_e),It=tt.length,It===0)a.lineTo(pt.centerX,pt.centerY);else for(var Mt=0;Mt<It;Mt++){var Ht=tt[Mt];Mt===0&&a.lineTo(Ht[0],Ht[1]),a.bezierCurveTo(Ht[2],Ht[3],Ht[4],Ht[5],Ht[6],Ht[7])}break;case Cl:if(Mt=It=0,tt!==null&&tt.type===cs){if(tt=Da(tt,_e),Ht=tt.length,Ht===0){a.lineTo(pt.endX,pt.endY);break}tt=tt[Ht-1]||null,tt!==null&&(It=tt[6],Mt=tt[7])}else It=tt!==null?tt.endX:_e.startX,Mt=tt!==null?tt.endY:_e.startY;if(tt=$s(pt,_e,It,Mt),It=tt.length,It===0){a.lineTo(pt.endX,pt.endY);break}for(Mt=0;Mt<It;Mt++)Ht=tt[Mt],a.bezierCurveTo(Ht[2],Ht[3],Ht[4],Ht[5],Ht[6],Ht[7]);break;default:At("Segment not of valid type: "+pt.type)}pt.isClosed&&a.closePath(),tt=pt}Me=_e.isFilled,te?_e.isShadowed?(Me===!0&&b!=="transparent"&&b!==null&&a.ng(b,_e.isEvenOdd),x!==null&&(Me&&ae&&Uc(a),a.jk(),Me&&ae&&lh(a))):(Uc(a),Me&&b!=="transparent"&&b!==null&&a.ng(b,_e.isEvenOdd),x!==null&&a.jk(),lh(a)):(Me&&b!==null&&a.ng(b,_e.isEvenOdd),x!==null&&a.jk()),a.Se(Ye)}if(ne&&a.fs(),this.pathPattern!==null){if(x=this.pathPattern,x.measure(1/0,1/0),b=x.measuredBounds,x.arrange(0,0,b.width,b.height),te=this.geometry,a.save(),a.beginPath(),b=Hn(),te.type===Yn.j)b.push(te.startX),b.push(te.startY),b.push(te.endX),b.push(te.endY),pp(a,y,b,x);else if(te.type===Yn.o)for(te=te.figures.iterator;te.next();){for(ae=te.value,b.length=0,b.push(ae.startX),b.push(ae.startY),ne=ae.startX,E=ae.startY,fe=ne,Ye=E,_e=ae.segments.s,Me=_e.length,Fe=0;Fe<Me;Fe++){switch(st=_e[Fe],st.type){case Ms:pp(a,y,b,x),b.length=0,b.push(st.endX),b.push(st.endY),ne=st.endX,E=st.endY,fe=ne,Ye=E;break;case xo:b.push(st.endX),b.push(st.endY),ne=st.endX,E=st.endY;break;case ga:nn.Qe(ne,E,st.point1X,st.point1Y,st.point2X,st.point2Y,st.endX,st.endY,.5,b),ne=st.endX,E=st.endY;break;case dl:nn.ep(ne,E,st.point1X,st.point1Y,st.endX,st.endY,.5,b),ne=st.endX,E=st.endY;break;case cs:if(pt=Da(st,ae),tt=pt.length,tt===0){b.push(st.centerX),b.push(st.centerY),ne=st.centerX,E=st.centerY;break}for(It=0;It<tt;It++)Mt=pt[It],nn.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(pt=$s(st,ae,ne,E),tt=pt.length,tt===0){b.push(st.endX),b.push(st.endY),ne=st.endX,E=st.endY;break}for(It=0;It<tt;It++)Mt=pt[It],nn.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:At("Segment not of valid type: "+st.type)}st.isClosed&&(b.push(fe),b.push(Ye),pp(a,y,b,x))}pp(a,y,b,x)}else if(te.type===Yn.u)b.push(te.startX),b.push(te.startY),b.push(te.endX),b.push(te.startY),b.push(te.endX),b.push(te.endY),b.push(te.startX),b.push(te.endY),b.push(te.startX),b.push(te.startY),pp(a,y,b,x);else if(te.type===Yn.F){if(E=new Vs,E.startX=te.endX,E.startY=(te.startY+te.endY)/2,ne=new Vr(cs),ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(te.startX+te.endX)/2,ne.centerY=(te.startY+te.endY)/2,ne.radiusX=Math.abs(te.startX-te.endX)/2,ne.radiusY=Math.abs(te.startY-te.endY)/2,E.add(ne),te=Da(ne,E),ae=te.length,ae===0)b.push(ne.centerX),b.push(ne.centerY);else for(ne=E.startX,E=E.startY,fe=0;fe<ae;fe++)Ye=te[fe],nn.Qe(ne,E,Ye[2],Ye[3],Ye[4],Ye[5],Ye[6],Ye[7],.5,b),ne=Ye[6],E=Ye[7];pp(a,y,b,x)}ei(b),a.restore(),a.Vc(!1)}}}},ot.kk=function(a,y,x){return!Qt.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)},ot.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:Qt.prototype.nk.call(this,a)},ot.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)}},ot.ga=function(a,y){if(y===void 0&&(y=new Tt),a instanceof vi){a.Mc()&&At("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},ot.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=Tt.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),Ao(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),Ao(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),Ao(a,b.x,b.y,0,0),Tn.free(y),Tt.free(b),a},ot.gh=function(a,y){var x=this.geometry;if(x===null||this.fill===null&&this.stroke===null)return!1;var b=x.bounds,E=this.strokeWidth/2;x.type!==Yn.j||y||(E+=2);var te=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===Yn.j)return this.stroke===null||(b=(x.endX-x.startX)*(a.x-x.startX)+(x.endY-x.startY)*(a.y-x.startY),0>(x.startX-x.endX)*(a.x-x.endX)+(x.startY-x.endY)*(a.y-x.endY)||0>b)?!1:(Tn.free(te),nn.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===Yn.u){y=x.startX;var ne=x.startY,ae=x.endX;if(x=x.endY,te.x=Math.min(y,ae),te.y=Math.min(ne,x),te.width=Math.abs(ae-y),te.height=Math.abs(x-ne),this.fill===null){if(te.Bc(-b,-b),te.ca(a))return 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===Yn.F){ne=x.startX,E=x.startY,ae=x.endX;var fe=x.endY;if(x=Math.min(ne,ae),y=Math.min(E,fe),ne=Math.abs(ae-ne)/2,E=Math.abs(fe-E)/2,x=a.x-(x+ne),y=a.y-(y+E),this.fill===null){if(ne-=b,E-=b,0>=ne||0>=E||1>=x*x/(ne*ne)+y*y/(E*E))return 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===Yn.o)return Tn.free(te),this.fill===null?Wu(x,a.x,a.y,E):Mu(x,a,E,1<this.strokeWidth,y);At("Unknown Geometry type: "+x.type)},ot.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=nn.Ze[ae];typeof _e=="string"&&(_e=nn.Ze[_e]),typeof _e=="function"?(fe=_e(null,100,100),Ev[ae]=fe):At("Unsupported Figure: "+ae)}ne=fe.bounds}ae=ne.width,fe=ne.height,_e=ne.width;var Me=ne.height;switch(gl(this,!0)){case jn:b=x=0;break;case Un:_e=Math.max(a-te,0),Me=Math.max(y-te,0);break;case _i:_e=Math.max(a-te,0),b=0;break;case Bi:x=0,Me=Math.max(y-te,0)}isFinite(E.width)&&(_e=E.width),isFinite(E.height)&&(Me=E.height);var Fe=this.maxSize,Ye=this.minSize;switch(x=Math.max(x-te,Ye.width),b=Math.max(b-te,Ye.height),_e=Math.min(Fe.width,_e),Me=Math.min(Fe.height,Me),_e=isFinite(_e)?Math.max(x,_e):Math.max(ae,x),Me=isFinite(Me)?Math.max(b,Me):Math.max(fe,b),x=_v(this),x){case jn:break;case Un:ae=_e,fe=Me;break;case mi:x=Math.min(_e/ae,Me/fe),isFinite(x)||(x=1),ae*=x,fe*=x;break;default:At(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&&nn.$(this.ua.Sk,a-te)&&nn.$(this.ua.Rk,y-te)||(this.ua=hr.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,Me+te),E.w()?(_e=E.width,Me=E.height,_e=Math.min(Fe.width,_e),Me=Math.min(Fe.height,Me),_e=Math.max(Ye.width,_e),Me=Math.max(Ye.height,Me),this.dc.h(0,0,_e,Me)):this.dc.assign(ne)};function _v(a){var y=a.geometryStretch;return a.Rd!==null?y===tr?Un:y:y===tr?Ev[a.figure].defaultStretch:y}ot.eh=function(a,y,x,b){Ya(this,a,y,x,b)},ot.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},ot.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,Me=te.m11*ne,Fe=ne*(te.m21*te.dy-te.m22*te.dx),Ye=ne*(te.m12*te.dx-te.m11*te.dy);te=a*ae+y*_e+Fe,ne=a*fe+y*Me+Ye,ae=x*ae+b*_e+Fe,fe=x*fe+b*Me+Ye,Fe=this.ig/2,_e=this.ua,_e===null&&(this.measure(1/0,1/0),_e=this.ua);var tt=_e.bounds;if(Me=!1,_e.type===Yn.j)if(1.5>=this.strokeWidth)Me=nn.Ve(_e.startX,_e.startY,_e.endX,_e.endY,te,ne,ae,fe,E);else{if(_e.startX===_e.endX?(b=Fe,Me=0):(y=(_e.endY-_e.startY)/(_e.endX-_e.startX),Me=Fe/Math.sqrt(1+y*y),b=Me*y),y=Hn(),a=new Tt,nn.Ve(_e.startX+b,_e.startY+Me,_e.endX+b,_e.endY+Me,te,ne,ae,fe,a)&&y.push(a),a=new Tt,nn.Ve(_e.startX-b,_e.startY-Me,_e.endX-b,_e.endY-Me,te,ne,ae,fe,a)&&y.push(a),a=new Tt,nn.Ve(_e.startX+b,_e.startY+Me,_e.startX-b,_e.startY-Me,te,ne,ae,fe,a)&&y.push(a),a=new Tt,nn.Ve(_e.endX+b,_e.endY+Me,_e.endX-b,_e.endY-Me,te,ne,ae,fe,a)&&y.push(a),ae=y.length,ae===0)return ei(y),!1;for(Me=!0,fe=1/0,b=0;b<ae;b++)a=y[b],x=(a.x-te)*(a.x-te)+(a.y-ne)*(a.y-ne),x<fe&&(fe=x,E.x=a.x,E.y=a.y);ei(y)}else if(_e.type===Yn.u)Me=nn.Ff(tt.x-Fe,tt.y-Fe,tt.x+tt.width+Fe,tt.y+tt.height+Fe,te,ne,ae,fe,E);else if(_e.type===Yn.F){y=Tn.allocAt(tt.x,tt.y,tt.width,tt.height).Bc(Fe,Fe);e:if(y.width===0)Me=nn.Ve(y.x,y.y,y.x,y.y+y.height,te,ne,ae,fe,E);else if(y.height===0)Me=nn.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,Me=y.y+_e,x=9999,te!==ae&&(x=(ne-fe)/(te-ae)),9999>Math.abs(x)){if(fe=ne-Me-x*(te-b),0>a*a*x*x+_e*_e-fe*fe){E.x=NaN,E.y=NaN,Me=!1;break e}Fe=Math.sqrt(a*a*x*x+_e*_e-fe*fe),ae=(-(a*a*x*fe)+a*_e*Fe)/(_e*_e+a*a*x*x)+b,a=(-(a*a*x*fe)-a*_e*Fe)/(_e*_e+a*a*x*x)+b,_e=x*(ae-b)+fe+Me,fe=x*(a-b)+fe+Me,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,Me=!1;break e}fe=Math.sqrt(ae),ae=Me+fe,fe=Me-fe,Math.abs(ae-ne)<Math.abs(fe-ne)?(E.x=te,E.y=ae):(E.x=te,E.y=fe)}Me=!0}Tn.free(y)}else if(_e.type===Yn.o){Ye=Tt.alloc();var st=ae-te,pt=fe-ne,It=st*st+pt*pt,Mt=te,Ht=ne;if(0<It&&tt.contains(Mt,Ht)&&(Ye.x=Mt,Ye.y=Ht,this.ca(Ye)))for(st!==0&&.5>Math.abs(st)?(pt*=.5/st,st=.5):pt!==0&&.5>Math.abs(pt)&&(st*=.5/pt,pt=.5),Mt-=st,Ht-=pt;tt.contains(Mt,Ht);)Mt-=st,Ht-=pt;for(E.x=ae,E.y=fe,pt=0;pt<_e.figures.count;pt++){var Gt=_e.figures.s[pt],Zt=Gt.isFilled?Mt:te,Xt=Gt.isFilled?Ht:ne,pn=Gt.segments;tt=Gt.startX,st=Gt.startY;for(var ii=tt,fi=st,li=0;li<pn.count;li++){var Kn=pn.s[li],Rn=Kn.type,Ji=Kn.endX,Zi=Kn.endY,to=!1;switch(Rn){case Ms:ii=Ji,fi=Zi;break;case xo:to=Dm(tt,st,Ji,Zi,Zt,Xt,ae,fe,Ye);break;case ga:to=nn.Eo(tt,st,Kn.point1X,Kn.point1Y,Kn.point2X,Kn.point2Y,Ji,Zi,Zt,Xt,ae,fe,.6,Ye);break;case dl:to=nn.Eo(tt,st,tt+2/3*(Kn.point1X-tt),st+2/3*(Kn.point1Y-st),Ji+2/3*(Kn.point1X-Ji),Zi+2/3*(Kn.point1Y-Zi),Ji,Zi,Zt,Xt,ae,fe,.6,Ye);break;case cs:case Cl:Rn=Kn.type===cs?Da(Kn,Gt):$s(Kn,Gt,tt,st);var _o=Rn.length;if(_o===0){to=Dm(tt,st,Kn.type===cs?Kn.centerX:Kn.endX,Kn.type===cs?Kn.centerY:Kn.endY,Zt,Xt,ae,fe,Ye);break}for(Zi=null,Ji=0;Ji<_o;Ji++){if(Zi=Rn[Ji],Ji===0&&Dm(tt,st,Zi[0],Zi[1],Zt,Xt,ae,fe,Ye)){var ha=Im(Zt,Xt,Ye,It,E);ha<It&&(It=ha,Me=!0)}nn.Eo(Zi[0],Zi[1],Zi[2],Zi[3],Zi[4],Zi[5],Zi[6],Zi[7],Zt,Xt,ae,fe,.6,Ye)&&(ha=Im(Zt,Xt,Ye,It,E),ha<It&&(It=ha,Me=!0))}Ji=Zi[6],Zi=Zi[7];break;default:At("Unknown Segment type: "+Rn)}tt=Ji,st=Zi,to&&(to=Im(Zt,Xt,Ye,It,E),to<It&&(It=to,Me=!0)),Kn.isClosed&&(Ji=ii,Zi=fi,Dm(tt,st,Ji,Zi,Zt,Xt,ae,fe,Ye)&&(Kn=Im(Zt,Xt,Ye,It,E),Kn<It&&(It=Kn,Me=!0)))}}te=x-a,ne=b-y,ae=Math.sqrt(te*te+ne*ne),ae!==0&&(te/=ae,ne/=ae),E.x-=te*Fe,E.y-=ne*Fe,Tt.free(Ye)}else At("Unknown Geometry type: "+_e.type);return Me?(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(nn.$(a,x)&&nn.$(y,b)||nn.$(E,ne)&&nn.$(te,ae))return!1;var _e=!1,Me=(E-ne)*(y-b)-(te-ae)*(a-x);return Me===0?!1:(fe.x=((E*ae-te*ne)*(a-x)-(E-ne)*(a*b-y*x))/Me,fe.y=((E*ae-te*ne)*(y-b)-(te-ae)*(a*b-y*x))/Me,(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||nn.$(fe.y,a))&&(fe.y<y||nn.$(fe.y,y))&&(_e=!0)):(y=a<x?a:x,a=a<x?x:a,(fe.x>y||nn.$(fe.x,y))&&(fe.x<a||nn.$(fe.x,a))&&(_e=!0)),_e)}ot.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=Tt.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)))),Tt.free(te),E},ot.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=gr.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,te=a.top;a=a.bottom;var ne=Tt.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 Tt.free(ne),!0;var ae=Tt.alloc(),fe=Tt.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)))),Tt.free(ne),gr.free(x),Tt.free(ae),Tt.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)}ot.tx=function(a,y,x){function b(It,Mt){for(var Ht=It.length,Gt=0;Gt<Ht;Gt+=2)if(Mt.zd(It[Gt],It[Gt+1])>E)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var E=a.Bf(y),te=E;if(1.5<this.strokeWidth&&(E=this.strokeWidth/2+Math.sqrt(E),E*=E),y=this.ua,y===null&&(this.measure(1/0,1/0),y=this.ua,y===null))return!1;if(!x){var ne=y.bounds,ae=ne.x,fe=ne.y,_e=ne.x+ne.width;if(ne=ne.y+ne.height,Yo(a.x,a.y,ae,fe)<=E&&Yo(a.x,a.y,_e,fe)<=E&&Yo(a.x,a.y,ae,ne)<=E&&Yo(a.x,a.y,_e,ne)<=E)return!0}if(ae=y.startX,fe=y.startY,_e=y.endX,ne=y.endY,y.type===Yn.j){if(x=(ae-_e)*(a.x-_e)+(fe-ne)*(a.y-ne),qr(a.x,a.y,ae,fe,_e,ne)<=(0<=(_e-ae)*(a.x-ae)+(ne-fe)*(a.y-fe)&&0<=x?E:te))return!0}else{if(y.type===Yn.u)return y=!1,x&&(y=qr(a.x,a.y,ae,fe,ae,ne)<=E||qr(a.x,a.y,ae,fe,_e,fe)<=E||qr(a.x,a.y,_e,fe,_e,ne)<=E||qr(a.x,a.y,ae,ne,_e,ne)<=E),y;if(y.type===Yn.F){y=a.x-(ae+_e)/2,te=a.y-(fe+ne)/2;var Me=Math.abs(_e-ae)/2,Fe=Math.abs(ne-fe)/2;if(Me===0||Fe===0)return qr(a.x,a.y,ae,fe,_e,ne)<=E;if(x){if(a=nn.$y(Me,Fe,y,te),a*a<=E)return!0}else return!(Yo(y,te,-Me,0)>=E||Yo(y,te,0,-Fe)>=E||Yo(y,te,0,Fe)>=E||Yo(y,te,Me,0)>=E)}else if(y.type===Yn.o){if(_e=y.bounds,te=_e.x,ae=_e.y,fe=_e.x+_e.width,_e=_e.y+_e.height,a.x>fe&&a.x<te&&a.y>_e&&a.y<ae&&qr(a.x,a.y,te,ae,te,_e)>E&&qr(a.x,a.y,te,ae,fe,ae)>E&&qr(a.x,a.y,fe,_e,te,_e)>E&&qr(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,Me=te.startY,a.zd(ne,Me)>E)return!1;for(ae=te.segments.s,fe=ae.length,_e=0;_e<fe;_e++)switch(Fe=ae[_e],Fe.type){case Ms:case xo:if(ne=Fe.endX,Me=Fe.endY,a.zd(ne,Me)>E)return!1;break;case ga:var Ye=Hn();if(nn.Qe(ne,Me,Fe.point1X,Fe.point1Y,Fe.point2X,Fe.point2Y,Fe.endX,Fe.endY,.8,Ye),ne=b(Ye,a),ei(Ye),ne||(ne=Fe.endX,Me=Fe.endY,a.zd(ne,Me)>E))return!1;break;case dl:if(Ye=Hn(),nn.ep(ne,Me,Fe.point1X,Fe.point1Y,Fe.endX,Fe.endY,.8,Ye),ne=b(Ye,a),ei(Ye),ne||(ne=Fe.endX,Me=Fe.endY,a.zd(ne,Me)>E))return!1;break;case cs:case Cl:Ye=Fe.type===cs?Da(Fe,te):$s(Fe,te,ne,Me);var tt=Ye.length;if(tt===0){if(ne=Fe.type===cs?Fe.centerX:Fe.endX,Me=Fe.type===cs?Fe.centerY:Fe.endY,a.zd(ne,Me)>E)return!1;break}Fe=null;for(var st=Hn(),pt=0;pt<tt;pt++)if(Fe=Ye[pt],st.length=0,nn.Qe(Fe[0],Fe[1],Fe[2],Fe[3],Fe[4],Fe[5],Fe[6],Fe[7],.8,st),b(st,a))return ei(st),!1;ei(st),Fe!==null&&(ne=Fe[6],Me=Fe[7]);break;default:At("Unknown Segment type: "+Fe.type)}}return!0}}}return!1},ot.qc=function(){this.ua=null},ot.kq=function(){return this.ig};function v1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=Cg,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=Zs):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new vi(1-Zs.x,Zs.y)))}hr.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=Wc[a.toArrow];else a.fromArrow!=="None"?b=Wc[a.fromArrow]:(b=nn.Ze[a.figure],typeof b=="string"&&(b=nn.Ze[b]),b===void 0&&At("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=nn.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 nn.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=Yn.parse(nn.um[b],!1),Wc[b]=a,x!==b&&(Wc[x]=b),b}}return typeof y=="string"?y:y instanceof Yn?a:null}Je.Object.defineProperties(hr.prototype,{geometry:{get:function(){return this.ua!==null?this.ua:this.Rd},set:function(a){var y=this.ua,x=this.Rd;if(y!==a){a!==null?this.Rd=this.ua=a.freeze():this.Rd=this.ua=null;var b=this.part;b!==null&&(b.ag=NaN),this.v(),this.g("geometry",y||x,a),Ta(this)&&(a=this.part,a!==null&&zo(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=Yn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=Tt.allocAt(-y.x,-y.y),Tt.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 En(a,"value >= 0",hr,"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"?En(a,'"butt", "round", or "square"',hr,"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"?En(a,'"miter", "bevel", or "round"',hr,"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)||At("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=nn.Ze[a];typeof x=="function"?x=a:(x=nn.Ze[a.toLowerCase()])||At("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?At("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?At("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new ud),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),v1(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:oo},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),ef(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:oo},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),ef(this),this.Na.gg=a,this.v(),this.g("spot2",y,a))}},parameter1:{get:function(){return this.Un},set:function(a){var y=this.Un;y!==a&&(this.Un=a,this.qc(),this.v(),this.g("parameter1",y,a))}},parameter2:{get:function(){return this.Vn},set:function(a){var y=this.Vn;y!==a&&(this.Vn=a,this.qc(),this.v(),this.g("parameter2",y,a))}},naturalBounds:{get:function(){return this.dc}},pathPattern:{get:function(){return this.Na!==null?this.Na.br:null},set:function(a){var y=this.pathPattern;y!==a&&(ef(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:tr},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))}}}),hr.prototype.intersectsRect=hr.prototype.Yc,hr.prototype.containedInRect=hr.prototype.fh,hr.prototype.getNearestIntersectionPoint=hr.prototype.rs,hr.prototype.getDocumentBounds=hr.prototype.mi,hr.prototype.getDocumentPoint=hr.prototype.ga;var Wc=new yi,Ev=new yi;hr.className="Shape",hr.getFigureGenerators=function(){var a=new ci,y;for(y in nn.Ze)y!==y.toLowerCase()&&a.add(y,nn.Ze[y]);return a.freeze(),a},hr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=nn.Ze;b[a]=y,b[x]=a},hr.getArrowheadGeometries=function(){var a=new ci;for(b in nn.um)if(Wc[b]===void 0){var y=Yn.parse(nn.um[b],!1);Wc[b]=y,y=b.toLowerCase(),y!==b&&(Wc[y]=b)}for(var x in Wc)if(x!==x.toLowerCase()){var b=Wc[x];b instanceof Yn&&a.add(x,b)}return a.freeze(),a},hr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=Yn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||At("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=tr,this.gg=this.fg=oo}Lv.prototype.copy=function(){var a=new Lv;return a.Hr=this.Hr,a.Ir=this.Ir,a.Jr=this.Jr,a.uj=this.uj,a.br=this.br,a.jq=this.jq,a.fg=this.fg.J(),a.gg=this.gg.J(),a};function Mo(a,y){return Qt.call(this),zm||(ml=ys?new Du(null).context:null,zm=!0),this.l|=2097152,this.ec="",this.xc="black",this.Ae="13px sans-serif",this.Lq=this.Cb=this.Gc=0,this.da=this.fa=this.Gm=null,this.Ih=0,this.df=null,this.Le=0,this.ze=this.Qb=this.Qc=null,typeof a=="string"?this.text=a:a&&Object.assign(this,a),y&&Object.assign(this,y),this}nt(Mo,Qt),Mo.prototype.cloneProtected=function(a){Qt.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())}ot=Mo.prototype,ot.th=function(){Qt.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}ot.qb=function(a){a.classType===Mo?this.wrap=a:Qt.prototype.qb.call(this,a)},ot.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},ot.v=function(){Qt.prototype.v.call(this)},ot.hh=function(a,y){if(this.xc!==null&&this.ec.length!==0&&this.Ae!==null){var x=this.naturalBounds,b=this.actualBounds,E=x.width,te=x.height,ne=mg(this),ae=a.textAlign=this.textAlign,fe=y.tn;ae==="start"?ae=fe?"right":"left":ae==="end"&&(ae=fe?"left":"right"),fe=this.isUnderline;var _e=this.isStrikethrough;ws(this,a,this.xc,!0,!1,x,b),(fe||_e)&&ws(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var Me=this.oe,Fe=Me.dx-(ne*Me.m21+Me.dx);Me=Me.dy-(ne*Me.m22+Me.dy);var Ye=y.scale;switch(8>(Fe*Fe+Me*Me)*Ye*Ye&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Hl&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,Fe=this.spacingBelow,this.flip){case Zr:a.translate(E,0),a.scale(-1,1);break;case Sr:a.translate(0,te),a.scale(1,-1);break;case wo:a.translate(E,te),a.scale(-1,-1)}if(a.yc(),Me=this.Gc,Ye=(y+ne+Fe)*Me,te>Ye&&(b=this.verticalAlignment,b=b.y*te-b.y*Ye+b.offsetY),Me===1&&this.ze!==null)Fe=this.Cb,Fe>E&&(Fe=E),this.Oj(this.ze,a,0,b+y,E,ne,Fe,x,ae,fe,_e);else if(this.Qc!==null&&this.Qb!==null)for(Ye=0;Ye<Me;Ye++){var tt=this.Qc[Ye];tt>E&&(tt=E),b+=y,this.Oj(this.Qb[Ye],a,0,b,E,ne,tt,x,ae,fe,_e),b+=ne+Fe}switch(this.flip){case Zr:a.scale(-1,1),a.translate(-E,0);break;case Sr:a.scale(1,-1),a.translate(0,-te);break;case wo:a.scale(-1,-1),a.translate(-E,-te)}}},ot.Oj=function(a,y,x,b,E,te,ne,ae,fe,_e,Me){var Fe=0;if(ae)fe==="left"?Fe=0:fe==="right"?Fe=E-ne:fe==="center"&&(Fe=(E-ne)/2),y.fillRect(x+Fe,b+.25*te,ne,1);else{if(fe==="left"?Fe=0:fe==="right"?Fe=E:fe==="center"&&(Fe=E/2),E=Rm!==null?Rm(this,te):.75*te,y.fillText(a,x+Fe,b+E),a=te/20|0,a===0&&(a=1),fe==="right"?Fe-=ne:fe==="center"&&(Fe-=ne/2),_e){ae=Bm!==null?Bm(this,te):.8*te,fe=x+Fe,_e=b+ae,E=x+Fe+ne,ae=b+ae;var Ye=a;y.beginPath(),y.lineWidth=Ye,y.moveTo(fe,_e),y.lineTo(E,ae),y.stroke(),y.Se(),y instanceof Hl&&y.ad.classList.add("gojs-td")}Me&&(Me=b+te-te/2.2|0,a%2!==0&&(Me+=.5),b=x+Fe,te=Me,x=x+Fe+ne,ne=Me,Fe=a,y.beginPath(),y.lineWidth=Fe,y.moveTo(b,te),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof Hl&&y.ad.classList.add("gojs-td"))}},ot.kk=function(a,y,x){if(!Qt.prototype.kk.call(this,a,y,x))return!1;if(ws(this,a,this.xc,!0,!1,this.naturalBounds,this.actualBounds),x){if(this.svg.getElementsByTagName("text").length===0)return!0;for(y=this.svg.getElementsByClassName("gojs-td"),x=0;x<y.length;x++)Qy(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,Qy(a,y,!0);return!0},ot.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:Qt.prototype.nk.call(this,a)},ot.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)}},ot.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var te=this.Ae;ml!==null&&E1!==te&&(E1=ml.font=te),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var ne;if(isNaN(this.desiredSize.width)){if(te=this.ec.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`),te.length===0)te=8;else if(this.isMultiline){for(var ae=ne=0,fe=!1;!fe;){var _e=te.indexOf(`
|
|
|
`,ae);_e===-1&&(_e=te.length,fe=!0),ae=te.substr(ae,_e-ae),this.formatting===vg&&(ae=ae.trim()),ne=Math.max(ne,Yu(ae)),ae=_e+1}te=ne}else ne=te.indexOf(`
|
|
|
`,0),0<=ne&&(te=te.substr(0,ne)),te=Yu(te);te=Math.min(te,a/this.scale)}else te=this.desiredSize.width;if(this.panel!==null&&(te=Math.min(te,this.panel.maxSize.width)),ne=w1(this,te),isNaN(this.desiredSize.height)?ne=Math.min(ne,y/this.scale):ne=this.desiredSize.height,fe=ne,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===Fm&&(y=this.Ae,y=this.overflow===Fm?x1(y):0,_e=this.spacingAbove+this.spacingBelow,_e=Math.max(0,mg(this)+_e),fe=Math.min(this.maxLines-1,Math.max(Math.floor(fe/_e+.01)-1,0)),!(fe+1>=this.Qb.length))){for(this.l|=16777216,_e=this.Qb[fe],y=Math.max(1,a-y);Yu(_e)>y&&1<_e.length;)_e=_e.substr(0,_e.length-1);_e+=yg,y=Yu(_e),this.Qb[fe]=_e,this.Qb=this.Qb.slice(0,fe+1),this.Qc[fe]=y,this.Qc=this.Qc.slice(0,fe+1),this.Le=this.Qb.length,this.Cb=Math.max(this.Cb,y),this.Gc=this.Le,this.Gc===1&&(this.ze=this.Qb[0])}(this.wrap===b1||isNaN(this.desiredSize.width))&&(te=isNaN(a)?this.Cb:Math.min(a,this.Cb)),te=Math.max(x,te),ne=Math.max(b,ne),Is(this.dc,te,ne),this.Ge(0,0,te,ne),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},ot.eh=function(a,y,x,b){Ya(this,a,y,x,b)};function gg(a,y,x){a.ze===null?(a.ze=y,a.Cb=x):((a.Qb===null||a.Qc===null)&&(a.Qb=[],a.Qc=[],a.Qb.push(a.ze),a.Qc.push(a.Cb)),a.Qb.push(y),a.Qc.push(x),a.Qb.length>a.maxLines&&(a.l|=16777216))}function Mv(a,y,x,b){var E=a.formatting===vg;E&&(y=y.trim());var te=0,ne=a.Ae,ae=a.spacingAbove+a.spacingBelow;ae=Math.max(0,mg(a)+ae);var fe=a.overflow===Fm?x1(ne):0;if(a.Gc>=a.maxLines)b!==null&&b.h(0,ae);else if(ne=y,a.wrap===Tv){a.Le=1;var _e=Yu(y);if(fe===0||_e<=x)a.Cb=Math.max(a.Cb,_e),gg(a,y,a.Cb),b!==null&&b.h(_e,ae);else{for(te=gp(a,ne),ne=ne.substr(te.length),y=gp(a,ne),_e=Yu(te+y);0<y.length&&_e<=x;)te+=y,ne=ne.substr(y.length),y=gp(a,ne),_e=te+y,E&&(_e=_e.trim()),_e=Yu(_e);for(E&&(y=y.trim()),te+=y,x=Math.max(1,x-fe);Yu(te)>x&&1<te.length;)te=te.substr(0,te.length-1);a.l|=16777216,te+=yg;var Me=Yu(te);a.Cb=Me,gg(a,te,Me),b!==null&&b.h(Me,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 Fe=1;for(_e=Yu(y.substr(0,Fe)),Me=0;_e<=x;)Fe++,Me=_e,_e=Yu(y.substr(0,Fe));if(Fe===1){var Ye=_e;te=Math.max(te,_e)}else Ye=Me,te=Math.max(te,Me);if(Fe--,1>Fe&&(Fe=1),gg(a,y.substr(0,Fe),Ye),fe++,y=y.substr(Fe),a.Gc+fe>a.maxLines)break}for(Me=gp(a,ne),_e=Yu(y+Me);0<Me.length&&_e<=x;)y+=Me,ne=ne.substr(Me.length),Me=gp(a,ne),_e=y+Me,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"),Me.length===0?(Fe=_e,te=Math.max(te,_e)):(Fe=Me=Yu(y),te=Math.max(te,Me)),gg(a,y,Fe),fe++,a.Gc+fe>a.maxLines))break}a.Le=Math.min(a.maxLines,fe),a.Cb=Math.max(a.Cb,te),b!==null&&b.h(a.Cb,ae*a.Le)}}function gp(a,y){if(a.wrap===C1)return y.substr(0,1);for(var x=y.length,b=0,E=xx;b<x&&!E.test(y.charAt(b));)b++;for(a.formatting===P1&&(x=Math.min(x,b+1));b<x&&E.test(y.charAt(b));)b++;return b>=y.length?y:y.substr(0,b)}function Yu(a){return ml===null?8*a.length:ml.measureText(a).width}function mg(a){if(a.df!==null)return a.df;var y=a.Ae;if(ml===null){var x=16;return a.df=x}return Nv[y]!==void 0&&5e3>_1?x=Nv[y]:(x=1.3*ml.measureText("M").width,Nv[y]=x,_1++),a.df=x}function x1(a){if(ml===null)return 6;if(jm[a]!==void 0&&5e3>Ov)var y=jm[a];else y=ml.measureText(yg).width,jm[a]=y,Ov++;return y}function w1(a,y){var x=a.ec.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`),b=a.spacingAbove+a.spacingBelow;if(b=Math.max(0,mg(a)+b),x.length===0)return a.Cb=0,a.Gc=1,b;if(!a.isMultiline){var E=x.indexOf(`
|
|
|
`,0);0<=E&&(x=x.substr(0,E))}E=0;for(var te=a.Gc=0,ne,ae=!1;!ae;){if(ne=x.indexOf(`
|
|
|
`,te),ne===-1&&(ne=x.length,ae=!0),te<=ne){if(te=x.substr(te,ne-te),a.wrap!==Tv){a.Le=0;var fe=Qn.alloc();Mv(a,te,y,fe),E+=fe.height,Qn.free(fe),a.Gc+=a.Le}else Mv(a,te,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(ae=!0)}te=ne+1}return a.Lq=E}Je.Object.defineProperties(Mo.prototype,{font:{get:function(){return this.Ae},set:function(a){var y=this.Ae;y!==a&&(this.Ae=a,this.df=null,this.v(),this.g("font",y,a))}},text:{get:function(){return this.ec},set:function(a){var y=this.ec;a!=null?a=a.toString():a="",y!==a&&(this.ec=a,this.v(),this.g("text",y,a),this.Uc=!0)}},textAlign:{get:function(){return this.da!==null?this.da.Or:"start"},set:function(a){var y=this.textAlign;y===a||a!=="start"&&a!=="end"&&a!=="left"&&a!=="right"&&a!=="center"||(Ac(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:jn},set:function(a){var y=this.flip;y!==a&&(Ac(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:ra},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),Ac(this),this.da.Yr=a,tl(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=Qn.alloc();Mv(this,this.ec,999999,a);var y=a.width;Qn.free(a),a=w1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Is(this.dc,y,a)}return this.dc}},isMultiline:{get:function(){return(this.l&2097152)!==0},set:function(a){var y=(this.l&2097152)!==0;y!==a&&(this.l^=2097152,this.v(),this.g("isMultiline",y,a))}},isUnderline:{get:function(){return(this.l&4194304)!==0},set:function(a){var y=(this.l&4194304)!==0;y!==a&&(this.l^=4194304,this.Uc=!0,this.N(),this.g("isUnderline",y,a))}},isStrikethrough:{get:function(){return(this.l&8388608)!==0},set:function(a){var y=(this.l&8388608)!==0;y!==a&&(this.l^=8388608,this.Uc=!0,this.N(),this.g("isStrikethrough",y,a))}},wrap:{get:function(){return this.da!==null?this.da.$r:kv},set:function(a){var y=this.wrap;y!==a&&(Ac(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Av},set:function(a){var y=this.overflow;y!==a&&(Ac(this),this.da.$q=a,this.v(),this.g("overflow",y,a))}},isOverflowed:{get:function(){return(this.l&16777216)!==0}},stroke:{get:function(){return this.xc},set:function(a){var y=this.xc;y!==a&&(a!==null&&Tf(a,"TextBlock.stroke"),a instanceof fo&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return mg(this)}},editable:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.g("editable",y,a))}},textEditor:{get:function(){return this.da!==null?this.da.Qr:null},set:function(a){var y=this.textEditor;y!==a&&(Ac(this),this.da.Qr=a,this.g("textEditor",y,a))}},errorFunction:{get:function(){return this.da!==null?this.da.Hd:null},set:function(a){var y=this.errorFunction;y!==a&&(Ac(this),this.da.Hd=a,this.g("errorFunction",y,a))}},interval:{get:function(){return this.fa!==null?this.fa.Tk:1},set:function(a){var y=this.interval;if(a=Math.round(a),y!==a&&a!==0&&isFinite(a)){this.fa===null&&(this.fa=new Zc),this.fa.Tk=a,this.v();var x=this.panel;x!==null&&(x.graduatedIntervals=null),this.g("interval",y,a)}}},graduatedStart:{get:function(){return this.fa!==null?this.fa.u:0},set:function(a){var y=this.graduatedStart;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new Zc),this.fa.u=a,this.v(),this.g("graduatedStart",y,a))}},graduatedEnd:{get:function(){return this.fa!==null?this.fa.j:1},set:function(a){var y=this.graduatedEnd;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new Zc),this.fa.j=a,this.v(),this.g("graduatedEnd",y,a))}},graduatedFunction:{get:function(){return this.fa!==null?this.fa.F:null},set:function(a){var y=this.graduatedFunction;y!==a&&(this.fa===null&&(this.fa=new Zc),this.fa.F=a,this.v(),this.g("graduatedFunction",y,a))}},graduatedSkip:{get:function(){return this.fa!==null?this.fa.o:null},set:function(a){var y=this.graduatedSkip;y!==a&&(this.fa===null&&(this.fa=new Zc),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}},textValidation:{get:function(){return this.da!==null?this.da.vj:null},set:function(a){var y=this.textValidation;y!==a&&(Ac(this),this.da.vj=a,this.g("textValidation",y,a))}},textEdited:{get:function(){return this.da!==null?this.da.Pr:null},set:function(a){var y=this.textEdited;y!==a&&(Ac(this),this.da.Pr=a,this.g("textEdited",y,a))}},spacingAbove:{get:function(){return this.da!==null?this.da.Dr:0},set:function(a){var y=this.spacingAbove;y!==a&&(Ac(this),this.da.Dr=a,this.v(),this.g("spacingAbove",y,a))}},spacingBelow:{get:function(){return this.da!==null?this.da.Er:0},set:function(a){var y=this.spacingBelow;y!==a&&(Ac(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:vg},set:function(a){var y=this.formatting;y!==a&&(Ac(this),this.da.gq=a,this.v(),this.g("formatting",y,a))}},maxLines:{get:function(){return this.da!==null?this.da.Jq:1/0},set:function(a){var y=this.maxLines;y!==a&&(a=Math.floor(a),0>=a&&En(a,"> 0",Mo,"maxLines"),Ac(this),this.da.Jq=a,this.v(),this.g("maxLines",y,a))}},metrics:{get:function(){return{arrSize:this.Qc!==null?this.Qc:[this.Cb],arrText:this.Qb!==null?this.Qb:[this.ze],maxLineWidth:this.Cb,fontHeight:this.df}}},choices:{get:function(){return this.Gm},set:function(a){var y=this.Gm;y!==a&&(this.Gm=a,this.g("choices",y,a))}}});var Rm=null,Bm=null,Tv=new _n(Mo,"None",0),b1=new _n(Mo,"WrapFit",1),kv=new _n(Mo,"WrapDesiredSize",2),C1=new _n(Mo,"WrapBreakAll",3),Av=new _n(Mo,"OverflowClip",0),Fm=new _n(Mo,"OverflowEllipsis",1),vg=new _n(Mo,"FormatTrim",0),P1=new _n(Mo,"FormatNone",0),xx=/[ \u200b\u00ad]/,Nv=new yi,_1=0,jm=new yi,Ov=0,yg="...",E1="",ml=null,zm=!1;Mo.className="TextBlock";function Iv(){this.nc=!1,this.Hd=null,this.Xf=jn,this.gq=vg,this.Jq=1/0,this.$q=Av,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=ra,this.$r=kv}Iv.prototype.copy=function(){var a=new Iv;return a.Hd=this.Hd,a.Xf=this.Xf,a.gq=this.gq,a.Jq=this.Jq,a.$q=this.$q,a.Dr=this.Dr,a.Er=this.Er,a.Or=this.Or,a.Pr=this.Pr,a.Qr=this.Qr,a.vj=this.vj,a.Yr=this.Yr,a.$r=this.$r,a},Mo.getEllipsis=function(){return yg},Mo.setEllipsis=function(a){yg=a,jm=new yi,Ov=0},Mo.getBaseline=function(){return Rm},Mo.setBaseline=function(a){Rm=a},Mo.getUnderline=function(){return Bm},Mo.setUnderline=function(a){Bm=a},Mo.isValidFont=function(a){if(zm||(ml=ys?new Du(null).context:null,zm=!0),ml===null)return!0;var y=ml.font;if(a===y||a==="10px sans-serif")return!0;ml.font="10px sans-serif",ml.font=a;var x=ml.font;if(x!=="10px sans-serif")return ml.font=y,!0;ml.font="19px serif";var b=ml.font;return ml.font=a,x=ml.font,ml.font=y,x!==b},Mo.FormatNone=P1,Mo.FormatTrim=vg,Mo.None=Tv,Mo.OverflowClip=Av,Mo.OverflowEllipsis=Fm,Mo.WrapBreakAll=C1,Mo.WrapDesiredSize=kv,Mo.WrapFit=b1;function Zc(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}Zc.prototype.copy=function(){var a=new Zc;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},Zc.className="GradElementSettings";function vl(a,y){Qt.call(this),this.Eg=null,this.qo="",this.Xg=lo,this.Nk=Un,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;nt(vl,Qt),vl.prototype.cloneProtected=function(a){Qt.prototype.cloneProtected.call(this,a),a.qo=this.qo,a.element=this.Eg,a.Xg=this.Xg.J(),a.Nk=this.Nk,a.Xf=this.Xf,a.Hd=this.Hd,a.Zg=this.Zg,a.Mk=this.Mk.J(),a.en=this.en,a.rl=this.rl},vl.prototype.qb=function(a){a===jn||a===mi||a===Dr?this.imageStretch=a:Qt.prototype.qb.call(this,a)},vl.prototype.toString=function(){return"Picture("+this.source+")#"+Or(this)};function vp(a){a===void 0&&(a=""),a!==""?mp[a]&&(delete mp[a],Hm--):(mp=new yi,Hm=0)}function L1(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var b=y.Bg.copy();if(b!=null){for(b=b.iterator;b.next();){var E=b.value;E.N();var te=y.getAttribute("src")||"",ne=E.Og.I(te);if(ne!==null)for(var ae=ne.length,fe=0;fe<ae;fe++)te=ne[fe],E.Xn.add(te),te.Uc=!0,E.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),te.Zg!==null&&te.Zg(te,x))}y.Bg.clear()}a.desiredSize.w()||(ea(a,!1),a.v())},y.Yp=function(x){y.ln=x;var b=y.Bg.copy();if(b!=null){for(b=b.iterator;b.next();){var E=b.value,te=y.getAttribute("src")||"",ne=E.Og.I(te);if(ne!==null){E=ne.length,te=Hn();for(var ae=0;ae<E;ae++)te.push(ne[ae]);if(y.hn)for(ae=0;ae<E;ae++)ne=te[ae],ne.Hd!==null&&ne.Hd(ne,x);ei(te)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}vl.prototype.hA=function(){if(this.source!==""){vp(this.source);var a=this.source;this.source="",this.source=a}},vl.prototype.redraw=function(){this.N(),this.Uc=!0},vl.prototype.hh=function(a,y){var x=this.Eg;if(x!==null){var b=x.getAttribute("src");if(!(x instanceof HTMLImageElement&&(b===null||b==="")||x.ln instanceof Event&&a instanceof Qd)){var E=a instanceof Hl;b=this.naturalBounds;var te=0,ne=0,ae=this.qn,fe=ae?+x.width:x.naturalWidth;if(ae=ae?+x.height:x.naturalHeight,fe===void 0&&x.videoWidth&&(fe=x.videoWidth),ae===void 0&&x.videoHeight&&(ae=x.videoHeight),fe=fe||b.width,ae=ae||b.height,fe!==0&&ae!==0){var _e=fe,Me=ae;this.sourceRect.w()&&(te=this.Xg.x,ne=this.Xg.y,fe=this.Xg.width,ae=this.Xg.height);var Fe=fe,Ye=ae,tt=this.Nk,st=this.Mk;switch(tt){case jn:if(this.sourceRect.w())break;Fe>=b.width&&(te=te+st.offsetX+(Fe*st.x-b.width*st.x)),Ye>=b.height&&(ne=ne+st.offsetY+(Ye*st.y-b.height*st.y)),fe=Math.min(b.width,Fe),ae=Math.min(b.height,Ye);break;case Un:Fe=b.width,Ye=b.height;break;case mi:case Dr:tt===mi?(tt=Math.min(b.height/Ye,b.width/Fe),Fe*=tt,Ye*=tt):tt===Dr&&(tt=Math.max(b.height/Ye,b.width/Fe),Fe*=tt,Ye*=tt,Fe>=b.width&&(te=(te+st.offsetX+(Fe*st.x-b.width*st.x)/Fe)*fe),Ye>=b.height&&(ne=(ne+st.offsetY+(Ye*st.y-b.height*st.y)/Ye)*ae),fe*=1/(Fe/b.width),ae*=1/(Ye/b.height),Fe=b.width,Ye=b.height)}tt=this.Df()*y.scale;var pt=Fe*tt*Ye*tt,It=fe*ae/pt,Mt=x.__goCache;tt=null;var Ht=wx;if(!E){if(x.sq&&Mt!==void 0&&4<pt&&It>Ht*Ht)for(Mt.gi===null&&(T1(Mt,4,_e,Me,x),T1(Mt,16,_e,Me,x)),E=Mt.gi,_e=E.length,Me=0;Me<_e&&E[Me].ratio*E[Me].ratio<It;Me++)tt=E[Me];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(Gt){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Gt){this.vl=!0}}if(this.vl)return}}switch(E=Fe<b.width?st.offsetX+(b.width*st.x-Fe*st.x):0,st=Ye<b.height?st.offsetY+(b.height*st.y-Ye*st.y):0,this.flip){case Zr:a.translate(Math.min(b.width,Fe),0),a.scale(-1,1);break;case Sr:a.translate(0,Math.min(b.height,Ye)),a.scale(1,-1);break;case wo:a.translate(Math.min(b.width,Fe),Math.min(b.height,Ye)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Mt!==void 0&&tt!==null&&tt.ratio!==1){a.save(),y=tt.ratio;try{a.drawImage(tt.source,te/y,ne/y,Math.min(tt.source.width,fe/y),Math.min(tt.source.height,ae/y),E,st,Math.min(b.width,Fe),Math.min(b.height,Ye)),a instanceof Hl&&(this.bt=[te/y,ne/y,Math.min(tt.source.width,fe/y),Math.min(tt.source.height,ae/y),E,st,Math.min(b.width,Fe),Math.min(b.height,Ye)])}catch(Gt){this.en=!1}a.restore()}else try{a.drawImage(x,te,ne,fe,ae,E,st,Math.min(b.width,Fe),Math.min(b.height,Ye)),a instanceof Hl&&(this.bt=[te,ne,fe,ae,E,st,Math.min(b.width,Fe),Math.min(b.height,Ye)])}catch(Gt){this.en=!1}switch(this.flip){case Zr:a.scale(-1,1),a.translate(-Math.min(b.width,Fe),0);break;case Sr:a.scale(1,-1),a.translate(0,-Math.min(b.height,Ye));break;case wo:a.scale(-1,-1),a.translate(-Math.min(b.width,Fe),-Math.min(b.height,Ye))}}}}},vl.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,te=gl(this,!0),ne=this.Eg,ae=this.qn,fe=0,_e=0;(ae||!this.al&&ne&&ne.complete)&&(this.al=!0),ne===null?(isFinite(E.width)||(a=0),isFinite(E.height)||(y=0)):(fe=ae?+ne.width:ne.naturalWidth,_e=ae?+ne.height:ne.naturalHeight),isFinite(E.width)||te===Un||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===Un||te===Bi?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:ne!==null&&(y=_e)),b=0):ne!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:_e),isFinite(E.width)&&(a=E.width),isFinite(E.height)&&(y=E.height),E=this.maxSize,te=this.minSize,x=Math.max(x||0,te.width),b=Math.max(b||0,te.height),a=Math.min(E.width,a),y=Math.min(E.height,y),a=Math.max(x,a),y=Math.max(b,y),ne===null||ne.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),Is(this.dc,a,y),this.Ge(0,0,a,y)},vl.prototype.eh=function(a,y,x,b){Ya(this,a,y,x,b)},Je.Object.defineProperties(vl.prototype,{element:{get:function(){return this.Eg},set:function(a){var y=this.Eg;if(this.Uc=!0,y!==a){this.qn=a instanceof HTMLCanvasElement;var x=a instanceof HTMLImageElement;a===null||x||a instanceof HTMLVideoElement||this.qn||At("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var b=this.diagram;b!==null&&Jp(b,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new In),b!==null&&x&&sd(b,this),a!==null&&(this.qn||a.complete===!0?(a.hn&&(a.ln instanceof Event&&this.Hd!==null?this.Hd(this,a.ln):a.sq===!0&&!a.ln&&this.Zg!==null&&a.eu&&this.Zg(this,a.eu)),a.sq=!0,this.desiredSize.w()||(ea(this,!1),this.v())):x&&L1(this,a)),this.g("element",y,a),this.N()}}},source:{get:function(){return this.qo},set:function(a){var y=this.qo;if(y!==a){this.Uc=!0,this.qo=a;var x=mp;if(ys){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<Hm&&(vp(),x=mp),b=rn("img"),b.hn=!0,L1(this,b);var E=this.rl;E!==null&&(b.crossOrigin=E(this)),b.src=a,x[a]=b,Hm++}this.element=b,b!==null&&b.__goCache===void 0&&(b.__goCache=new M1),this.v(),this.N()}this.g("source",y,a)}}},sourceCrossOrigin:{get:function(){return this.rl},set:function(a){if(this.rl!==a&&(this.rl=a,this.element!==null)){var y=this.element.getAttribute("src");a===null&&typeof y=="string"?this.element.crossOrigin=null:a!==null&&(this.element.crossOrigin=a(this)),this.element.src=y}}},sourceRect:{get:function(){return this.Xg},set:function(a){var y=this.Xg;y.D(a)||(this.Xg=a=a.J(),this.N(),this.g("sourceRect",y,a))}},imageStretch:{get:function(){return this.Nk},set:function(a){var y=this.Nk;y!==a&&(this.Nk=a,this.N(),this.g("imageStretch",y,a))}},flip:{get:function(){return this.Xf},set:function(a){var y=this.Xf;y!==a&&(this.Xf=a,this.N(),this.g("flip",y,a))}},imageAlignment:{get:function(){return this.Mk},set:function(a){var y=this.Mk;y.D(a)||(this.Mk=a=a.J(),this.N(),this.g("imageAlignment",y,a))}},errorFunction:{get:function(){return this.Hd},set:function(a){var y=this.Hd;y!==a&&(this.Hd=a,this.g("errorFunction",y,a))}},successFunction:{get:function(){return this.Zg},set:function(a){var y=this.Zg;y!==a&&(this.Zg=a,this.g("successFunction",y,a))}},naturalBounds:{get:function(){return this.dc}}}),vl.prototype.redraw=vl.prototype.redraw,vl.prototype.reloadSource=vl.prototype.hA;var Hm=0,wx=4;vl.className="Picture",mp=new yi,vl.clearCache=vp;function M1(){this.gi=null}function T1(a,y,x,b,E){a.gi===null&&(a.gi=[]);var te=new Du(null),ne=te.context,ae=1/y;te.width=x/y,te.height=b/y,te.width!==0&&te.height!==0&&(y=new k1(te.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],E=x.source,x=x.ratio),ne.setTransform(ae*x,0,0,ae*x,0,0),ne.yc(),ne.drawImage(E,0,0),a.gi.push(y))}M1.className="PictureCacheArray";function k1(a,y){this.source=a,this.ratio=y}k1.className="PictureCacheInstance";function yp(){this.os=new Yn,this.mc=null}yp.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new Yn,this.mc=null};function Sp(a,y,x,b,E,te){a.mc=new Vs,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=b,a.mc.isEvenOdd=te||!1,a.os.figures.add(a.mc),E!==void 0&&(a.mc.isShadowed=E)}function bx(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}yp.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var b=new Vr(Ms);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)},yp.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var b=new Vr(xo);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)};function Ih(a,y,x,b,E,te,ne){var ae;ae===void 0&&(ae=!1);var fe=new Vr(ga);fe.point1X=y,fe.point1Y=x,fe.point2X=b,fe.point2Y=E,fe.endX=te,fe.endY=ne,ae&&fe.close(),a.mc.segments.add(fe)}function Um(a,y,x,b,E){var te;te===void 0&&(te=!1);var ne=new Vr(dl);ne.point1X=y,ne.point1Y=x,ne.endX=b,ne.endY=E,te&&ne.close(),a.mc.segments.add(ne)}yp.prototype.arcTo=function(a,y,x,b,E,te,ne){te===void 0&&(te=0),ne===void 0&&(ne=!1);var ae=new Vr(cs);ae.startAngle=a,ae.sweepAngle=y,ae.centerX=x,ae.centerY=b,ae.radiusX=E,ae.radiusY=te!==0?te:E,ne&&ae.close(),this.mc.segments.add(ae)};function Cx(a,y,x,b,E,te,ne,ae){var fe;fe===void 0&&(fe=!1),y=new Vr(Cl,ne,ae,y,x,b,E,te),fe&&y.close(),a.mc.segments.add(y)}function A1(a){var y=Gm;return y!==null?(Gm=null,y.reset(a),y):(y=new yp,y.reset(a),y)}var Gm=null;yp.className="StreamGeometryContext";function Ha(a,y){var x=a.toLowerCase(),b=nn.Ze;b[a]=y,b[x]=a}Ha("Rectangle",function(a,y,x){a="r"+y+","+x;var b=nn.Mf[a];return b!==void 0||(b=new Yn(Yn.u),b.endX=y,b.endY=x,nn.Nf<nn.vm&&(nn.Mf[a]=b,nn.Nf++)),b}),Ha("Square",function(a,y,x){a="s"+y+","+x;var b=nn.Mf[a];return b!==void 0||(b=new Yn(Yn.u),b.endX=y,b.endY=x,b.defaultStretch=mi,nn.Nf<nn.vm&&(nn.Mf[a]=b,nn.Nf++)),b}),Ha("RoundedRectangle",function(a,y,x){a=a?a.parameter1:NaN,(isNaN(a)||0>a)&&(a=5),a=Math.min(a,y/3),a=Math.min(a,x/3);var b="rr"+y+","+x+","+a,E=nn.Mf[b];if(E!==void 0)return E;var te=a*nn.wg;return E=new Yn().add(new Vs(a,0,!0).add(new Vr(xo,y-a,0)).add(new Vr(ga,y,a,y-te,0,y,te)).add(new Vr(xo,y,x-a)).add(new Vr(ga,y-a,x,y,x-te,y-te,x)).add(new Vr(xo,a,x)).add(new Vr(ga,0,x-a,te,x,0,x-te)).add(new Vr(xo,0,a)).add(new Vr(ga,a,0,0,te,te,0).close())),1<te&&(E.spot1=new vi(0,0,te,te),E.spot2=new vi(1,1,-te,-te)),nn.Nf<nn.vm&&(nn.Mf[b]=E,nn.Nf++),E}),Ha("Border","RoundedRectangle"),Ha("Ellipse",function(a,y,x){a="e"+y+","+x;var b=nn.Mf[a];return b!==void 0||(b=new Yn(Yn.F),b.endX=y,b.endY=x,b.spot1=Yl,b.spot2=Bl,nn.Nf<nn.vm&&(nn.Mf[a]=b,nn.Nf++)),b}),Ha("Circle",function(a,y,x){a="c"+y+","+x;var b=nn.Mf[a];return b!==void 0||(b=new Yn(Yn.F),b.endX=y,b.endY=x,b.spot1=Yl,b.spot2=Bl,b.defaultStretch=mi,nn.Nf<nn.vm&&(nn.Mf[a]=b,nn.Nf++)),b}),Ha("TriangleRight",function(a,y,x){return new Yn().add(new Vs(0,0).add(new Vr(xo,y,.5*x)).add(new Vr(xo,0,x).close())).pm(0,.25,.5,.75)}),Ha("TriangleDown",function(a,y,x){return new Yn().add(new Vs(0,0).add(new Vr(xo,y,0)).add(new Vr(xo,.5*y,x).close())).pm(.25,0,.75,.5)}),Ha("TriangleLeft",function(a,y,x){return new Yn().add(new Vs(y,x).add(new Vr(xo,0,.5*x)).add(new Vr(xo,y,0).close())).pm(.5,.25,1,.75)}),Ha("TriangleUp",function(a,y,x){return new Yn().add(new Vs(y,x).add(new Vr(xo,0,x)).add(new Vr(xo,.5*y,0).close())).pm(.25,.5,.75,1)}),Ha("Triangle","TriangleUp"),Ha("Diamond",function(a,y,x){return new Yn().add(new Vs(.5*y,0).add(new Vr(xo,0,.5*x)).add(new Vr(xo,.5*y,x)).add(new Vr(xo,y,.5*x).close())).pm(.25,.25,.75,.75)}),Ha("LineH",function(a,y,x){return a=new Yn(Yn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),Ha("LineV",function(a,y,x){return a=new Yn(Yn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),Ha("None","Rectangle"),Ha("BarH","Rectangle"),Ha("BarV","Rectangle"),Ha("MinusLine","LineH"),Ha("PlusLine",function(a,y,x){return new Yn().add(new Vs(0,x/2,!1).add(new Vr(xo,y,x/2)).add(new Vr(Ms,y/2,0)).add(new Vr(xo,y/2,x)))}),Ha("XLine",function(a,y,x){return new Yn().add(new Vs(0,x,!1).add(new Vr(xo,y,0)).add(new Vr(Ms,0,0)).add(new Vr(xo,y,x)))}),Ha("LineRight",function(a,y,x){return new Yn().add(new Vs(.25*y,0,!1).add(new Vr(xo,.75*y,.5*x)).add(new Vr(xo,.25*y,x)))}),Ha("LineDown",function(a,y,x){return new Yn().add(new Vs(0,.25*x,!1).add(new Vr(xo,.5*y,.75*x)).add(new Vr(xo,y,.25*x)))}),Ha("LineLeft",function(a,y,x){return new Yn().add(new Vs(.75*y,0,!1).add(new Vr(xo,.25*y,.5*x)).add(new Vr(xo,.75*y,x)))}),Ha("LineUp",function(a,y,x){return new Yn().add(new Vs(0,.75*x,!1).add(new Vr(xo,.5*y,.25*x)).add(new Vr(xo,y,.75*x)))}),nn.um={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8",BackwardOpenTriangleLine:"m 8,0 l -8,4 8,4 m -8.5,0 l 0,-8",OpenTriangleTop:"m 0,0 l 8,4 m 0,4",BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4",OpenTriangleBottom:"m 0,8 l 8,-4",BackwardOpenTriangleBottom:"m 0,4 l 8,4",HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8",BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8",HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z",BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z",ForwardSemiCircle:"m 4,0 b 270 180 0 4 4",BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4",Feather:"m 0,0 l 3,4 -3,4",BackwardFeather:"m 3,0 l -3,4 3,4",DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",ForwardSlash:"m 0,8 l 5,-8",BackSlash:"m 0,0 l 5,8",DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8",DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8",TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8",TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleLineFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 m 7,-4 b 0 360 -3 0 3",Circle:"F1 m 8,4 b 0 360 -4 0 4 z",Block:"F1 m 0,0 l 0,8 8,0 0,-8 z",StretchedDiamond:"F1 m 0,3 l 5,-3 5,3 -5,3 -5,-3 z",Diamond:"F1 m 0,4 l 4,-4 4,4 -4,4 -4,-4 z",Chevron:"F1 m 0,0 l 5,0 3,4 -3,4 -5,0 3,-4 -3,-4 z",StretchedChevron:"F1 m 0,0 l 8,0 3,4 -3,4 -8,0 3,-4 -3,-4 z",NormalArrow:"F1 m 0,2 l 4,0 0,-2 4,4 -4,4 0,-2 -4,0 z",X:"m 0,0 l 8,8 m 0,-8 l -8,8",TailedNormalArrow:"F1 m 0,0 l 2,0 1,2 3,0 0,-2 2,4 -2,4 0,-2 -3,0 -1,2 -2,0 1,-4 -1,-4 z",DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z m 4,0 l 4,4 -4,4 0,-8 z",BigEndArrow:"F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z",ConcaveTailArrow:"F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z",RoundedTriangle:"F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z",SimpleArrow:"F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z",AccelerationArrow:"F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z",BoxArrow:"F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z",TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z",DynamicWidthArrow:"F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z",EquilibriumArrow:"m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3",FastForward:"F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z",Kite:"F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z",HalfArrowTop:"F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8",HalfArrowBottom:"F1 m 0,8 l 4,-4 4,0 -8,4 z",OpposingDirectionDoubleArrow:"F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z",PartialDoubleTriangle:"F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z",LineCircle:"F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z",DoubleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",TripleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",CircleLine:"F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8",DiamondCircle:"F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z",PlusCircle:"F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8",OpenRightTriangleTop:"m 8,0 l 0,4 -8,0 m 0,4",OpenRightTriangleBottom:"m 8,8 l 0,-4 -8,0",Line:"m 0,0 l 0,8",DoubleLine:"m 0,0 l 0,8 m 2,0 l 0,-8",TripleLine:"m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8",PentagonArrow:"F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"};function Dv(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=Ho,this.ir=null,this.jr="",this.lr=oo,this.Gq="",this.Hq=Xs,this.Pq=zr,this.Kq=ts,this.Up=null,this.Cq=127,this.zr=ko,this.yr="gray",this.Vg=4}Dv.prototype.copy=function(){var a=new Dv;return a.zq=this.zq,a.Kp=this.Kp,a.tr=this.tr,a.vr=this.vr,a.ur=this.ur,a.oq=this.oq,a.fr=this.fr,a.hr=this.hr,a.gr=this.gr.J(),a.ir=this.ir,a.jr=this.jr,a.lr=this.lr.J(),a.Gq=this.Gq,a.Hq=this.Hq.J(),a.Pq=this.Pq.J(),a.Kq=this.Kq.J(),a.Up=this.Up,a.Cq=this.Cq,a.zr=this.zr.J(),a.yr=this.yr,a.Vg=this.Vg,a};function Ti(a,y){a===void 0||a instanceof sa||typeof a=="string"?Gn.call(this,a):(Gn.call(this),a&&(y=a)),this.G=2408959,this.Tf="",this.P=null,this.Jg="",this.Qf=this.Ug=null,this.ec="",this.Ah=this.Ig=null,this.ke=new Tt(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)}nt(Ti,Gn),Ti.prototype.cloneProtected=function(a){Gn.prototype.cloneProtected.call(this,a),a.G=this.G&-4097|49152,a.Tf=this.Tf,this.P!==null&&(a.P=this.P.nc?this.P:this.P.copy()),a.Jg=this.Jg,a.Qf=null,a.ec=this.ec,a.ke.assign(this.ke),a.Ao=this.Ao},ot=Ti.prototype,ot.Af=function(a){Gn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},ot.toString=function(){var a=Fn(this.constructor)+"#"+Or(this);return this.data!==null&&(a+="("+hi(this.data)+")"),a};function yl(a){a.P===null?a.P=new Dv:a.P.nc&&(a.P=a.P.copy())}ot.th=function(){Gn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},ot.gk=function(a,y,x,b,E,te,ne){var ae=this.diagram;ae!==null&&(a===vs&&y==="elements"?E instanceof Gn?qd(E,function(fe){ly(ae.partManager,fe),Zd(ae,fe)}):sd(ae,E):a===ds&&y==="elements"&&(E instanceof Gn?qd(E,function(fe){uy(ae.partManager,fe,ae)}):Jp(ae,E)),ae.cb(a,y,x,b,E,te,ne))},ot.La=function(a){if(Gn.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 Gn&&qd(E,function(te){te.data!==null&&te.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Ti.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Ti.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Ti.prototype.bh=function(a,y){if(y!==null){var x=null,b=this.Qf;if(b!==null&&(x=b.I(a)),x!==y){if(x!==null){var E=x.diagram;E!==null&&E.remove(x)}b===null&&(this.Qf=b=new ci),y.Tf!==a&&(y.category=a),b.add(a,y),a=this.diagram,a!==null&&(a.add(y),a=y.adornedObject,a!==null&&(a=a.ih(),a!==null&&(y.data=a.data)))}}},Ti.prototype.Jf=function(a){var y=this.Qf;if(y!==null){var x=y.I(a);if(x!==null){var b=x.diagram;b!==null&&b.remove(x)}y.remove(a),y.count===0&&(this.Qf=null)}},Ti.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Hn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);ei(y)}},Ti.prototype.updateAdornments=function(){var a=this.diagram;if(a!==null){for(var y=this.adornments;y.next();){var x=y.value;x.v(),x.placeholder&&x.placeholder.v()}e:{if(this.isSelected&&this.selectionAdorned&&(y=this.selectionObject,y!==null&&this.actualBounds.w()&&this.isVisible()&&y.Ed()&&y.actualBounds.w())){if(x=this.Pj("Selection"),x===null){if(x=this.selectionAdornmentTemplate,x===null&&(x=this.ph()?a.linkSelectionAdornmentTemplate:this instanceof er?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof Qr))break e;Ru(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Gn.Link),x.adornedObject=y)}if(x!==null){x.type===Gn.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Px(this,a),y=this.adornments;y.next();)y.value.La()}},Ti.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Rv(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function Px(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function Wm(a){if(cd(a)===!1){Fv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function N1(a){if(a.G|=2097152,cd(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||D1(a,y,x),x=a.Ib;var b=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)}}Ti.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new gr);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),this.Lb=te,te.ws()||te.pp(E)},Ti.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=Fr;this.locationSpot.sb()&&(te=this.locationSpot);var ne=Tt.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),Tt.free(ne)}},Ti.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Ti.prototype.moveTo=function(a,y,x){a=Tt.allocAt(a,y),this.move(a,x),Tt.free(a)},Ti.prototype.isVisible=function(){if(!this.visible)return!1;var a=this.layer;if(a!==null){if(!a.visible)return!1;if(a=a.diagram,a!==null&&a.animationManager.fv(this))return!0}return a=this.containingGroup,!!(a===null||a.isSubGraphExpanded&&a.isVisible())},Ti.prototype.Zb=function(a){var y=this.diagram;a?(this.C(4),this.Wb(),y!==null&&y.De.add(this)):(this.C(8),this.Ej()),this.oh(),y!==null&&(y.Ya(),y.N())},Ti.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new ci),y.I(a)!==null)return y.I(a);var x=Gn.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 Tt),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}Ti.prototype.mi=function(a){return a===void 0&&(a=new Tn),a.assign(this.actualBounds)},Ti.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function O1(a){var y=Tt.alloc(),x=a.locationObject,b=x.naturalBounds,E=x instanceof hr?x.strokeWidth:0;if(y.yi(0,0,b.width+E,b.height+E,a.locationSpot),x!==a)for(y.offset(-E/2,-E/2),x.transform.Ga(y),x=x.panel;x!==null&&x!==a;)x.transform.Ga(y),x=x.panel;return a.Lb!==null&&a.Lb.Ga(y),y.offset(-a.uc.x,-a.uc.y),y}function nf(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=c1(a));var b=a.ag,E=2*b;if(!a.isShadowed)return x.h(y.x-1-b,y.y-1-b,y.width+2+E,y.height+2+E),x;b=y.x,E=y.y;var te=y.width;y=y.height;var ne=a.shadowBlur;return a=a.shadowOffset,te+=ne,y+=ne,b-=ne/2,E-=ne/2,0<a.x?te+=a.x:(b+=a.x,te-=a.x),0<a.y?y+=a.y:(E+=a.y,y-=a.y),x.h(b-1,E-1,te+2,y+2),x}Ti.prototype.arrange=function(){if(nl(this)===!1)N1(this);else{Hc(this,!1);var a=this.Ib,y=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()||nn.B(y.width,a.width)&&nn.B(y.height,a.height)||0<=this.vw&&this.C(16),Tn.free(y),Fv(this,!1)}},ot=Ti.prototype,ot.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()||Sa(a,y)||(this instanceof ri&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},ot.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 Tt(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),cd(this)===!1&&nl(this)===!1&&(Wm(this),N1(this)),!0};function I1(a,y,x,b,E){y===null||a instanceof Qr||(y=y.animationManager,y.zb&&Pl(y,a,new Tt(b,E),x))}ot.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;cd(this)||nl(this)?E.h(NaN,NaN):E.h(E.x+a-b.x,E.y+y-b.y),b.h(a,y)}else{if(E.x===a&&E.y===y)return;b.h(b.x+a-E.x,b.y+y-E.y),E.h(a,y)}Wm(this)},ot.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,Tt.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 Tt(te,ne),y),b||y.x===te&&y.y===ne||a.g("position",new Tt(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 ri&&Mh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?hd(a)?(Po(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}ot.si=function(){return!0},ot.Zc=function(){return!0},ot.ph=function(){return!1},ot.Dd=function(){return!0};function Bv(a,y,x,b){y.constructor===a.constructor||H1||(H1=!0,Dn('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),Dn(" Old class: "+Fn(a.constructor)+", new class: "+Fn(y.constructor)+", part: "+a.toString())),a.Ej();var E=a.data;x=a.layerName;var te=a.isSelected,ne=a.isHighlighted,ae=!0,fe=!0,_e=!1;a instanceof ri&&(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 ri&&(a.U=ae?a.U|4:a.U&-5,a.U=fe?a.U|1:a.U&-2,a.U=_e?a.U|2:a.U&-3),E!==null&&a.La(),E=a.layerName,E!==x&&(a.Jg=x,a.layerName=E),y!==null&&(y.skipsUndoManager=b),a.Zc()&&a.C(64)}Ti.prototype.canCopy=function(){if(!this.copyable)return!1;var a=this.layer;return a===null?!0:a.allowCopy?(a=a.diagram,a===null?!0:!!a.allowCopy):!1},Ti.prototype.canDelete=function(){if(!this.deletable)return!1;var a=this.layer;return a===null?!0:a.allowDelete?(a=a.diagram,a===null?!0:!!a.allowDelete):!1},Ti.prototype.canEdit=function(){if(!this.textEditable)return!1;var a=this.layer;return a===null?!0:a.allowTextEdit?(a=a.diagram,a===null?!0:!!a.allowTextEdit):!1},Ti.prototype.canGroup=function(){if(!this.groupable)return!1;var a=this.layer;return a===null?!0:a.allowGroup?(a=a.diagram,a===null?!0:!!a.allowGroup):!1},Ti.prototype.canMove=function(){if(!this.movable)return!1;var a=this.layer;return a===null?!0:a.allowMove?(a=a.diagram,a===null?!0:!!a.allowMove):!1},Ti.prototype.canReshape=function(){if(!this.reshapable)return!1;var a=this.layer;return a===null?!0:a.allowReshape?(a=a.diagram,a===null?!0:!!a.allowReshape):!1},Ti.prototype.canResize=function(){if(!this.resizable)return!1;var a=this.layer;return a===null?!0:a.allowResize?(a=a.diagram,a===null?!0:!!a.allowResize):!1},Ti.prototype.canRotate=function(){if(!this.rotatable)return!1;var a=this.layer;return a===null?!0:a.allowRotate?(a=a.diagram,a===null?!0:!!a.allowRotate):!1},Ti.prototype.canSelect=function(){if(!this.selectable)return!1;var a=this.layer;return a===null?!0:a.allowSelect?(a=a.diagram,a===null?!0:!!a.allowSelect):!1};function cd(a){return(a.G&32768)!==0}function Fv(a,y){a.G=y?a.G|32768:a.G&-32769}function jv(a,y){a.G=y?a.G|65536:a.G&-65537}function hd(a){return(a.G&131072)!==0}ot=Ti.prototype,ot.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}ot.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},ot.N=function(){var a=this.diagram;a!==null&&!nl(this)&&!cd(this)&&this.isVisible()&&this.Ib.w()&&a.N(nf(this,this.Ib))},ot.v=function(){Gn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof ri&&this.labeledLink!==null&&tl(this.labeledLink),a.$b(!0))},ot.Vo=function(a){a||(a=this.Ah,a!==null&&Zv(a,this))},ot.Wo=function(a){a||(a=this.Ah,a!==null&&Kv(a,this))},ot.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},ot.oz=function(){return zv(this,this)};function zv(a,y){var x=y.containingGroup;return x!==null?1+zv(a,x):y instanceof ri&&(y=y.labeledLink,y!==null)?zv(a,y):0}ot.sz=function(){return j1(this,this)};function j1(a,y){var x=y.containingGroup;return x!==null||y instanceof ri&&(x=y.labeledLink,x!==null)?j1(a,x):y}ot.Td=function(a){return a instanceof er?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 ri&&(y=y.labeledLink,y!==null)?Hv(a,y,x):!1:!0}ot.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof er&&Zm(y,!0),y instanceof ri){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 ri&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof er&&Zm(y,!1),y instanceof ri&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Ti.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof ri&&this.isLinkLabel)},Ti.prototype.C=function(a){if(a===void 0&&(a=16777215),this.isLayoutPositioned&&a&this.layoutConditions){var y=this.layer;y!==null&&y.isTemporary||this instanceof ri&&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 ri){if(x&&y instanceof er)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 Vn)for(y=y.labelNodes;y.next();)dd(a,y.value,x,b,E,te)}}Je.Object.defineProperties(Ti.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?Qi:this.Qf.iteratorValues}},layer:{get:function(){return this.Ig}},diagram:{get:function(){var a=this.Ig;return a==null?null:a.diagram}},layerName:{get:function(){return this.Jg},set:function(a){var y=this.Jg;if(y!==a){var x=this.diagram;if((x===null||x.Qj(a)!==null&&!x.partManager.addsToTemporaryLayer)&&(this.Jg=a,x!==null&&x.Ya(),this.g("layerName",y,a),y=this.layer,y!==null&&y.name!==a&&(x=y.diagram,x!==null&&(a=x.Qj(a),a!==null&&a!==y)))){var b=y.pc(-1,this,!0);if(0<=b&&x.cb(ds,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb(vs,"parts",a,null,this,!0,b),b=this.layerChanged,b!==null){var E=x.aa;x.aa=!0,b(this,y,a),x.aa=E}}}}},layerChanged:{get:function(){return this.P!==null?this.P.zq:null},set:function(a){var y=this.layerChanged;y!==a&&(yl(this),this.P.zq=a,this.g("layerChanged",y,a))}},zOrder:{get:function(){return this.Ao},set:function(a){var y=this.Ao;if(y!==a){this.Ao=a;var x=this.layer;x!==null&&Nu(x,-1,this),this.g("zOrder",y,a),a=this.diagram,a!==null&&a.N()}}},locationObject:{get:function(){if(this.nf===null){var a=this.locationObjectName;a!==""?(a=this.fb(a),a!==null?this.nf=a:this.nf=this):this instanceof Qr?this.type!==Gn.Link&&this.placeholder!==null?this.nf=this.placeholder:this.nf=this:this.nf=this}return this.nf.visible?this.nf:this}},minLocation:{get:function(){return this.P!==null?this.P.Pq:zr},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),yl(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:ts},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),yl(this),this.P.Kq=a,this.g("maxLocation",y,a))}},locationObjectName:{get:function(){return this.P!==null?this.P.Gq:""},set:function(a){var y=this.locationObjectName;y!==a&&(yl(this),this.P.Gq=a,this.nf=null,this.v(),this.g("locationObjectName",y,a))}},locationSpot:{get:function(){return this.P!==null?this.P.Hq:Xs},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),yl(this),this.P.Hq=a,this.v(),this.g("locationSpot",y,a))}},location:{get:function(){return this.ke},set:function(a){var y=a.x,x=a.y,b=this.ke;if(!(b.x===y||isNaN(b.x)&&isNaN(y))||!(b.y===x||isNaN(b.y)&&isNaN(x))){if(a=a.copy(),y=a,this.ph())y=!1;else{if(this.ke=y,this.G|=2097152,nl(this)===!1&&(Wm(this),x=this.pa,x.w())){var E=this.diagram;if(E===null||E.animationManager.isTicking||!E.undoManager.isUndoingRedoing){var te=x.copy();x.h(x.x+(y.x-b.x),x.y+(y.y-b.y)),I1(this,E,x,te.x,te.y),this.g("position",te,x.copy())}}y=!0}y&&this.g("location",b,a.copy())}}},category:{get:function(){return this.Tf},set:function(a){var y=this.Tf;if(y!==a){this.svg!==null&&(this.svg.remove(),this.Uc=!0);var x=this.diagram,b=this.data,E=null;if(x!==null&&b!==null&&!(this instanceof Qr)){var te=x.model.undoManager;te.isEnabled&&!te.isUndoingRedoing&&(E=this.clone(),E.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||b===null||this instanceof Qr?this instanceof Qr&&(E=this.adornedPart,E!==null&&(a=E.Qf,a!==null&&a.remove(y),E.bh(this.category,this))):(te=x.model,te.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(b,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(Ru(x),x=x.copy(),x!==null&&Bv(this,x,y,a))):(te!==null&&te.jm(b,a),x=dS(x.partManager,b,a),x!==null&&(Ru(x),x=x.copy(),x===null||x instanceof Vn||(b=this.location.copy(),Bv(this,x,y,a),this.location.w()||(this.location=b)))),E!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",E,y))))}}},self:{get:function(){return this},set:function(a){Bv(this,a,this.category,a.category)}},copyable:{get:function(){return(this.G&1)!==0},set:function(a){var y=(this.G&1)!==0;y!==a&&(this.G^=1,this.g("copyable",y,a))}},deletable:{get:function(){return(this.G&2)!==0},set:function(a){var y=(this.G&2)!==0;y!==a&&(this.G^=2,this.g("deletable",y,a))}},textEditable:{get:function(){return(this.G&4)!==0},set:function(a){var y=(this.G&4)!==0;y!==a&&(this.G^=4,this.g("textEditable",y,a),this.Wb())}},groupable:{get:function(){return(this.G&8)!==0},set:function(a){var y=(this.G&8)!==0;y!==a&&(this.G^=8,this.g("groupable",y,a))}},movable:{get:function(){return(this.G&16)!==0},set:function(a){var y=(this.G&16)!==0;y!==a&&(this.G^=16,this.g("movable",y,a))}},selectionAdorned:{get:function(){return(this.G&32)!==0},set:function(a){var y=(this.G&32)!==0;y!==a&&(this.G^=32,this.g("selectionAdorned",y,a),this.Wb())}},isInDocumentBounds:{get:function(){return(this.G&64)!==0},set:function(a){var y=(this.G&64)!==0;if(y!==a){this.G^=64;var x=this.diagram;x!==null&&x.Ya(),this.g("isInDocumentBounds",y,a)}}},isLayoutPositioned:{get:function(){return(this.G&128)!==0},set:function(a){var y=(this.G&128)!==0;y!==a&&(this.G^=128,this.g("isLayoutPositioned",y,a),this.C(a?4:8))}},selectable:{get:function(){return(this.G&256)!==0},set:function(a){var y=(this.G&256)!==0;y!==a&&(this.G^=256,this.g("selectable",y,a),this.Wb())}},reshapable:{get:function(){return(this.G&512)!==0},set:function(a){var y=(this.G&512)!==0;y!==a&&(this.G^=512,this.g("reshapable",y,a),this.Wb())}},resizable:{get:function(){return(this.G&1024)!==0},set:function(a){var y=(this.G&1024)!==0;y!==a&&(this.G^=1024,this.g("resizable",y,a),this.Wb())}},rotatable:{get:function(){return(this.G&2048)!==0},set:function(a){var y=(this.G&2048)!==0;y!==a&&(this.G^=2048,this.g("rotatable",y,a),this.Wb())}},isSelected:{get:function(){return(this.G&4096)!==0},set:function(a){var y=(this.G&4096)!==0;if(y!==a){var x=this.diagram;if(!a||this.canSelect()&&!(x!==null&&x.selection.count>=x.maxSelectionCount)){this.G^=4096;var b=!1;if(x!==null){b=x.skipsUndoManager,x.skipsUndoManager=!0;var E=x.selection;E.ka(),a?E.add(this):E.remove(this),E.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=b)}}}},isHighlighted:{get:function(){return(this.G&524288)!==0},set:function(a){var y=(this.G&524288)!==0;if(y!==a){this.G^=524288;var x=this.diagram;x!==null&&(x=x.highlighteds,x.ka(),a?x.add(this):x.remove(this),x.freeze()),this.g("isHighlighted",y,a),this.N(),a=this.highlightedChanged,a!==null&&a(this)}}},isShadowed:{get:function(){return(this.G&8192)!==0},set:function(a){var y=(this.G&8192)!==0;y!==a&&(this.G^=8192,this.Uc=!0,this.g("isShadowed",y,a),this.N())}},isAnimated:{get:function(){return(this.G&262144)!==0},set:function(a){var y=(this.G&262144)!==0;y!==a&&(this.G^=262144,this.g("isAnimated",y,a))}},highlightedChanged:{get:function(){return this.P!==null?this.P.oq:null},set:function(a){var y=this.highlightedChanged;y!==a&&(yl(this),this.P.oq=a,this.g("highlightedChanged",y,a))}},selectionObjectName:{get:function(){return this.P!==null?this.P.vr:""},set:function(a){var y=this.selectionObjectName;y!==a&&(yl(this),this.P.vr=a,this.Ug=null,this.g("selectionObjectName",y,a))}},selectionAdornmentTemplate:{get:function(){return this.P!==null?this.P.tr:null},set:function(a){var y=this.selectionAdornmentTemplate;y!==a&&(yl(this),this.P.tr=a,this.g("selectionAdornmentTemplate",y,a))}},selectionObject:{get:function(){if(this.Ug===null){var a=this.selectionObjectName;a!==null&&a!==""?(a=this.fb(a),a!==null?this.Ug=a:this.Ug=this):this instanceof Vn?(a=this.path,a!==null?this.Ug=a:this.Ug=this):this.Ug=this}return this.Ug}},selectionChanged:{get:function(){return this.P!==null?this.P.ur:null},set:function(a){var y=this.selectionChanged;y!==a&&(yl(this),this.P.ur=a,this.g("selectionChanged",y,a))}},resizeAdornmentTemplate:{get:function(){return this.P!==null?this.P.fr:null},set:function(a){var y=this.resizeAdornmentTemplate;y!==a&&(yl(this),this.P.fr=a,this.g("resizeAdornmentTemplate",y,a))}},resizeObjectName:{get:function(){return this.P!==null?this.P.hr:""},set:function(a){var y=this.resizeObjectName;y!==a&&(yl(this),this.P.hr=a,this.g("resizeObjectName",y,a))}},resizeObject:{get:function(){var a=this.resizeObjectName;return a!==""&&(a=this.fb(a),a!==null)?a:this}},resizeCellSize:{get:function(){return this.P!==null?this.P.gr:Ho},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),yl(this),this.P.gr=a,this.g("resizeCellSize",y,a))}},rotateAdornmentTemplate:{get:function(){return this.P!==null?this.P.ir:null},set:function(a){var y=this.rotateAdornmentTemplate;y!==a&&(yl(this),this.P.ir=a,this.g("rotateAdornmentTemplate",y,a))}},rotateObjectName:{get:function(){return this.P!==null?this.P.jr:""},set:function(a){var y=this.rotateObjectName;y!==a&&(yl(this),this.P.jr=a,this.g("rotateObjectName",y,a))}},rotateObject:{get:function(){var a=this.rotateObjectName;return a!==""&&(a=this.fb(a),a!==null)?a:this}},rotationSpot:{get:function(){return this.P!==null?this.P.lr:oo},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),yl(this),this.P.lr=a,this.g("rotationSpot",y,a))}},text:{get:function(){return this.ec},set:function(a){var y=this.ec;y!==a&&(this.ec=a,this.g("text",y,a))}},containingGroup:{get:function(){return this.Ah},set:function(a){if(this.Zc()){var y=this.Ah;if(y!==a){a===null||this!==a&&!a.Td(this)||(this===a&&At("Cannot make a Group a member of itself: "+this.toString()),At("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 er&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Zv(a,this):this instanceof er&&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 er){for(x=new In,dd(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof ri)for(b=b.linksConnected;b.next();)xp(b.value)}if(this instanceof ri){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 At("cannot set the Part.containingGroup of a Link or Adornment")}},containingGroupChanged:{get:function(){return this.P!==null?this.P.Kp:null},set:function(a){var y=this.containingGroupChanged;y!==a&&(yl(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof ri&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(yl(this),this.P.Cq=a,this.g("layoutConditions",y,a))}},dragComputation:{get:function(){return this.P!==null?this.P.Up:null},set:function(a){var y=this.dragComputation;y!==a&&(yl(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:ko},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),yl(this),this.P.zr=a,this.N(),this.g("shadowOffset",y,a))}},shadowColor:{get:function(){return this.P!==null?this.P.yr:"gray"},set:function(a){var y=this.shadowColor;y!==a&&(yl(this),this.P.yr=a,this.N(),this.g("shadowColor",y,a))}},shadowBlur:{get:function(){return this.P!==null?this.P.Vg:4},set:function(a){var y=this.shadowBlur;y!==a&&(yl(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Ti.prototype.invalidateLayout=Ti.prototype.C,Ti.prototype.findCommonContainingGroup=Ti.prototype.px,Ti.prototype.isMemberOf=Ti.prototype.Td,Ti.prototype.findTopLevelPart=Ti.prototype.sz,Ti.prototype.findSubGraphLevel=Ti.prototype.oz,Ti.prototype.ensureBounds=Ti.prototype.Va,Ti.prototype.getDocumentBounds=Ti.prototype.mi,Ti.prototype.findObject=Ti.prototype.fb,Ti.prototype.moveTo=Ti.prototype.moveTo,Ti.prototype.invalidateAdornments=Ti.prototype.Wb,Ti.prototype.clearAdornments=Ti.prototype.Ej,Ti.prototype.removeAdornment=Ti.prototype.Jf,Ti.prototype.addAdornment=Ti.prototype.bh,Ti.prototype.findAdornment=Ti.prototype.Pj,Ti.prototype.updateTargetBindings=Ti.prototype.La;var H1=!1;Ti.className="Part",Ti.LayoutNone=0,Ti.LayoutAdded=1,Ti.LayoutRemoved=2,Ti.LayoutShown=4,Ti.LayoutHidden=8,Ti.LayoutNodeSized=16,Ti.LayoutGroupLayout=32,Ti.LayoutNodeReplaced=64,Ti.LayoutStandard=127,Ti.LayoutAll=16777215;function Qr(a,y){a===void 0||a instanceof sa||typeof a=="string"?Ti.call(this,a):(Ti.call(this),a&&(y=a)),this.G&=-257,this.Jg="Adornment",this.ue=null,this.Aw=0,this.Uw=!1,this.j=this.$a=null,y&&Object.assign(this,y)}nt(Qr,Ti),Qr.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Qr.prototype.updateRelationshipsFromData=function(){},Qr.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Vn&&y instanceof hr){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 hr&&(E.ua=a)}}},Qr.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!nl(a))},Qr.prototype.Zc=function(){return!1},Qr.prototype.gk=function(a,y,x,b,E,te,ne){if(a===vs&&y==="elements"){if(E instanceof rl)this.$a===null&&(this.$a=E);else if(E instanceof Gn){var ae=E.Nl(function(fe){return fe instanceof rl});ae instanceof rl&&this.$a===null&&(this.$a=ae)}}else a===ds&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Gn&&this.$a.rg(b)&&(this.$a=null));Ti.prototype.gk.call(this,a,y,x,b,E,te,ne)},Qr.prototype.updateAdornments=function(){},Qr.prototype.Lj=function(){},Je.Object.defineProperties(Qr.prototype,{placeholder:{get:function(){return this.$a}},adornedObject:{get:function(){return this.ue},set:function(a){var y=this.adornedPart,x=null;a!==null&&(x=a.part),y===null||a!==null&&y===x||y.Jf(this.category),this.ue=a,x!==null&&x.bh(this.category,this)}},adornedPart:{get:function(){var a=this.ue;return a!==null?a.part:null}},containingGroup:{get:function(){return null}}}),Qr.className="Adornment";function Uv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=xl,this.er=$m,this.Kr=this.ij=this.Nq=this.Mq=null}Uv.prototype.copy=function(){var a=new Uv;return a.Dq=this.Dq,a.Eq=this.Eq,a.gj=this.gj,a.Vr=this.Vr,a.yp=this.yp.J(),a.er=this.er,a.Mq=this.Mq,a.Nq=this.Nq,a.ij=this.ij,a.Kr=this.Kr,a};function ri(a,y){a===void 0||a instanceof sa||typeof a=="string"?Ti.call(this,a):(Ti.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new Bn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}nt(ri,Ti),ri.prototype.cloneProtected=function(a){Ti.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},ot=ri.prototype,ot.Af=function(a){Ti.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function Rh(a){a.Ba===null?a.Ba=new Uv:a.Ba.nc&&(a.Ba=a.Ba.copy())}ot.th=function(){Ti.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function U1(a,y){y!==null&&(a.af===null&&(a.af=new In),a.af.add(y))}function G1(a,y,x,b){if(y===null||a.af===null)return null;for(var E=a.af.iterator;E.next();){var te=E.value;if(te.Ds===a&&te.cv===y&&te.Ox===x&&te.Px===b||te.Ds===y&&te.cv===a&&te.Ox===b&&te.Px===x)return te}return null}ot.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=G1(this,a,y,x),a!==null&&a.Sl()},ot.gk=function(a,y,x,b,E,te,ne){a===vs&&y==="elements"?this.wc=null:a===ds&&y==="elements"&&(this.wc=null),Ti.prototype.gk.call(this,a,y,x,b,E,te,ne)},ot.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Ul(x.fromPort),Ul(x.toPort),x.bb())}};function W1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Ul(x.fromPort),Ul(x.toPort),x.bb())}}function Ul(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Ul(y.port)}}ot.si=function(){return!0},ri.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},ri.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},ri.prototype.isVisible=function(){if(!Ti.prototype.isVisible.call(this))return!1;var a=!0,y=kh,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===kh){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Qs){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(b){return!b.isTreeExpanded}))return!1}else if(y===op&&(a=a?this.Oo():this.Po(),0<a.count&&a.any(function(b){return!b.isTreeExpanded})))return!1;return a=this.labeledLink,a!==null?a.isVisible():!0},ri.prototype.Zb=function(a){Ti.prototype.Zb.call(this,a);for(var y=this.linksConnected;y.next();){var x=y.value;if(a&&this.containingGroup!==null){var b=x.To(this);b===null||b.Td(this.containingGroup)||x.bb()}x.Zb(a)}},ri.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)})}}ri.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new zi(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},ot=ri.prototype,ot.Mo=function(a){a===void 0&&(a=null);var y=new zi(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},ot.Sd=function(a){a===void 0&&(a=null);var y=new zi(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},ot.Mu=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.fromNode===this?(a===null||E.fromPortId===a)&&(E=E.toNode,y!==null?y.add(E):x!==null&&x!==E?(y=new In,y.add(x),y.add(E)):x=E):E.toNode!==this||a!==null&&E.toPortId!==a||(E=E.fromNode,y!==null?y.add(E):x!==null&&x!==E?(y=new In,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Fi(x):Qi},ot.Po=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.fromNode!==this||a!==null&&E.fromPortId!==a||(E=E.toNode,y!==null?y.add(E):x!==null&&x!==E?(y=new In,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Fi(x):Qi},ot.Oo=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.toNode!==this||a!==null&&E.toPortId!==a||(E=E.fromNode,y!==null?y.add(E):x!==null&&x!==E?(y=new In,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Fi(x):Qi},ot.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new zi(this.jb),E=this;return b.predicate=function(te){return!((te.fromNode!==E||te.toNode!==a||y!==null&&te.fromPortId!==y||x!==null&&te.toPortId!==x)&&(te.fromNode!==a||te.toNode!==E||x!==null&&te.fromPortId!==x||y!==null&&te.toPortId!==y))},b},ot.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new zi(this.jb),E=this;return b.predicate=function(te){return!(te.fromNode!==E||te.toNode!==a||y!==null&&te.fromPortId!==y||x!==null&&te.toPortId!==x)},b};function Km(a,y,x){Ul(x);var b=a.jb.contains(y);if(b||a.jb.add(y),!b||y.fromNode===y.toNode){var E=a.linkConnected;if(E!==null){var te=!0,ne=a.diagram;ne!==null&&(te=ne.aa,ne.aa=!0),E(a,y,x),ne!==null&&(ne.aa=te)}}!b&&y.isTreeLink&&(x=y.fromNode,y=y.toNode,x!==null&&y!==null&&x!==y&&(b=!0,a=a.diagram,a!==null&&(b=a.isTreePathToChildren),E=b?y:x,te=b?x:y,E.ci||(E.ci=te),!te.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(b?x===te&&(te.isTreeLeaf=!1):y===te&&(te.isTreeLeaf=!1))))}function Vm(a,y,x){Ul(x);var b=a.jb.remove(y),E=null;if(b||y.toNode===y.fromNode){var te=a.linkDisconnected;if(E=a.diagram,te!==null){var ne=!0;E!==null&&(ne=E.aa,E.aa=!0),te(a,y,x),E!==null&&(E.aa=ne)}}b&&y.isTreeLink&&(x=!0,E!==null&&(x=E.isTreePathToChildren),a=x?y.toNode:y.fromNode,y=x?y.fromNode:y.toNode,a!==null&&(a.ci=!1),y===null||y.isTreeLeaf||(y.jb.count===0?(y.ci=null,E!==null&&E.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):Sg(y)))}function Sg(a){if(a.ci=!1,a.jb.count!==0){var y=!0,x=a.diagram;if(x===null||!x.undoManager.isUndoingRedoing){for(x!==null&&(y=x.isTreePathToChildren),x=a.jb.iterator;x.next();){var b=x.value;if(b.isTreeLink){if(y){if(b.fromNode===a){a.isTreeLeaf=!1;return}}else if(b.toNode===a){a.isTreeLeaf=!1;return}}}a.isTreeLeaf=!0}}}ri.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},ot=ri.prototype,ot.Vo=function(a){Ti.prototype.Vo.call(this,a),a||(Sg(this),a=this.Yk,a!==null&&eS(a,this))},ot.Wo=function(a){Ti.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},ot.Lj=function(){if(0<this.jb.count){var a=this.diagram;if(a!==null)for(var y=a.commandHandler!==null?a.commandHandler.deletesConnectedLinks:!0,x=this.jb.copy().iterator;x.next();){var b=x.value;y?a.remove(b):(b.fromNode===this&&(b.fromNode=null),b.toNode===this&&(b.toNode=null))}}this.labeledLink=null,Ti.prototype.Lj.call(this)},ot.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;K1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function K1(a){a.wc===null?a.wc=new ci:a.wc.clear(),a.qm(a,function(y,x){V1(y,x)}),a.wc.count===0&&a.wc.add("",a)}function V1(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function Gv(a,y,x){var b=y.portId;if(b!==null&&(a.wc!==null&&a.wc.remove(b),y=a.diagram,y!==null&&x)){for(x=null,a=a.findLinksConnected(b);a.next();)b=a.value,x===null&&(x=Hn()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);ei(x)}}}ot.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},ot.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}},ot.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},ot.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},ot.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof ri)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},ot.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},ot.uz=function(){return $1(this,this)};function $1(a,y){return y=y.pg(),y===null?0:1+$1(a,y)}ot.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new zi(this.jb);var x=this;return y.predicate=a?function(b){return!!(b.isTreeLink&&b.fromNode===x)}:function(b){return!!(b.isTreeLink&&b.toNode===x)},y},ot.Ou=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren);var x=y=null,b=this.jb.iterator;if(a)for(;b.next();)a=b.value,a.isTreeLink&&a.fromNode===this&&(a=a.toNode,y!==null?y.add(a):x!==null&&x!==a?(y=new Bn,y.add(x),y.add(a)):x=a);else for(;b.next();)a=b.value,a.isTreeLink&&a.toNode===this&&(a=a.fromNode,y!==null?y.add(a):x!==null&&x!==a?(y=new Bn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Fi(x):Qi},ot.wz=function(a){a===void 0&&(a=1/0);var y=new In;return dd(y,this,!1,a,!0),y},ri.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 Me=y.contains(_e);if(Me||y.add(_e),ne){var Fe=x?_e.Oo():_e.Po();fe.uv=a,Fe.all(function(Ye){return function(tt){return tt===Ye.uv||!tt.isTreeExpanded}}(fe))&&b.Aj(_e,E),_e.oh(),_e.Zb(!1)}_e.isTreeExpanded&&(_e.wasTreeExpanded=_e.isTreeExpanded,Me||X1(_e,y,x,b,E,te))}fe={uv:fe.uv}}a.isTreeExpanded=!1}ri.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 Me=fe.value;if(Me.isTreeLink&&(ae||Me.fd||Me.bb(),Me=Me.To(a),Me!==null&&Me!==a&&!y.contains(Me))){if(y.add(Me),!ae){Me.Zb(!0),Me.oh();var Fe=x?Me.Oo():Me.Po();_e.vv=a,Fe.all(function(Ye){return function(tt){return tt===Ye.vv||!tt.isTreeExpanded}}(_e))&&E.Cj(Me,te)}(2<b||Me.wasTreeExpanded)&&(Me.wasTreeExpanded=!1,J1(Me,y,x,b-1,E,te,ne))}_e={vv:_e.vv}}a.isTreeExpanded=!0}Je.Object.defineProperties(ri.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:$m},set:function(a){var y=this.portSpreading;y!==a&&(Rh(this),this.Ba.er=a,this.g("portSpreading",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.Bd())}},avoidable:{get:function(){return(this.U&8)!==0},set:function(a){var y=(this.U&8)!==0;if(y!==a){this.U^=8;var x=this.diagram;x!==null&&Mh(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:xl},set:function(a){typeof a=="number"&&(a=new Mi(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),Rh(this),this.Ba.yp=a;var x=this.diagram;x!==null&&Mh(x,this),this.g("avoidableMargin",y,a)}}},linksConnected:{get:function(){return this.jb.iterator}},linkConnected:{get:function(){return this.Ba!==null?this.Ba.Dq:null},set:function(a){var y=this.linkConnected;y!==a&&(Rh(this),this.Ba.Dq=a,this.g("linkConnected",y,a))}},linkDisconnected:{get:function(){return this.Ba!==null?this.Ba.Eq:null},set:function(a){var y=this.linkDisconnected;y!==a&&(Rh(this),this.Ba.Eq=a,this.g("linkDisconnected",y,a))}},linkValidation:{get:function(){return this.Ba!==null?this.Ba.gj:null},set:function(a){var y=this.linkValidation;y!==a&&(Rh(this),this.Ba.gj=a,this.g("linkValidation",y,a))}},isLinkLabel:{get:function(){return this.Yk!==null}},labeledLink:{get:function(){return this.Yk},set:function(a){var y=this.Yk;if(y!==a){var x=this.diagram,b=this.data;if(y!==null){if(y.wd!==null&&(y.wd.remove(this),y.v()),x!==null&&b!==null&&!x.undoManager.isUndoingRedoing){var E=y.data,te=x.model;if(E!==null&&te.ri()){var ne=te.wa(b);ne!==void 0&&te.Qx(E,ne)}}this.containingGroup=null}this.Yk=a,a!==null&&(eS(a,this),x===null||b===null||x.undoManager.isUndoingRedoing||(E=a.data,x=x.model,E!==null&&x.ri()&&(b=x.wa(b),b!==void 0&&x.Bu(E,b))),this.containingGroup=a.containingGroup),tl(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&K1(this),this.wc.iteratorValues}},isTreeExpanded:{get:function(){return(this.U&1)!==0},set:function(a){var y=(this.U&1)!==0;if(y!==a){this.U^=1;var x=this.diagram;if(this.g("isTreeExpanded",y,a),y=this.treeExpandedChanged,y!==null){var b=!0;x!==null&&(b=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=b)}x!==null&&x.undoManager.isUndoingRedoing?this.Zb(a):a?this.expandTree():this.collapseTree()}}},wasTreeExpanded:{get:function(){return(this.U&2)!==0},set:function(a){var y=(this.U&2)!==0;y!==a&&(this.U^=2,this.g("wasTreeExpanded",y,a))}},treeExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Vr:null},set:function(a){var y=this.treeExpandedChanged;y!==a&&(Rh(this),this.Ba.Vr=a,this.g("treeExpandedChanged",y,a))}},isTreeLeaf:{get:function(){return(this.U&4)!==0},set:function(a){var y=(this.U&4)!==0;y!==a&&(this.U^=4,this.g("isTreeLeaf",y,a))}}}),ri.prototype.expandTree=ri.prototype.expandTree,ri.prototype.collapseTree=ri.prototype.collapseTree,ri.prototype.findTreeParts=ri.prototype.wz,ri.prototype.findTreeChildrenNodes=ri.prototype.Ou,ri.prototype.findTreeChildrenLinks=ri.prototype.Qo,ri.prototype.findTreeLevel=ri.prototype.uz,ri.prototype.findTreeParentChain=ri.prototype.vz,ri.prototype.findTreeParentNode=ri.prototype.pg,ri.prototype.findTreeParentLink=ri.prototype.kh,ri.prototype.findCommonTreeParent=ri.prototype.gz,ri.prototype.findTreeRoot=ri.prototype.xz,ri.prototype.isInTreeOf=ri.prototype.Nz,ri.prototype.findPort=ri.prototype.ns,ri.prototype.findLinksTo=ri.prototype.kz,ri.prototype.findLinksBetween=ri.prototype.jz,ri.prototype.findNodesInto=ri.prototype.Oo,ri.prototype.findNodesOutOf=ri.prototype.Po,ri.prototype.findNodesConnected=ri.prototype.Mu,ri.prototype.findLinksInto=ri.prototype.Sd,ri.prototype.findLinksOutOf=ri.prototype.Mo,ri.prototype.findExternalTreeLinksConnected=ri.prototype.qx,ri.prototype.invalidateConnectedLinks=ri.prototype.Bd,ri.prototype.invalidateLinkBundle=ri.prototype.Lz;var _x=new _n(ri,"SpreadingNone",10),$m=new _n(ri,"SpreadingEvenly",11),Wv=new _n(ri,"SpreadingPacked",12);ri.className="Node",ri.SpreadingNone=_x,ri.SpreadingEvenly=$m,ri.SpreadingPacked=Wv;function er(a,y){a===void 0||a instanceof sa||typeof a=="string"?ri.call(this,a):(ri.call(this),a&&(y=a)),this.U|=4608,this.Gn=new In,this.$a=null,this.Sc=new es,this.Sc.group=this,this.gl=new In,this.tb=this.$p=null,y&&Object.assign(this,y)}nt(er,ri),er.prototype.cloneProtected=function(a){ri.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof rl});y instanceof rl?a.$a=y:a.$a=null,this.Sc!==null?(a.Sc=this.Sc.copy(),a.Sc.group=a):(a.Sc!==null&&(a.Sc.group=null),a.Sc=null),this.tb!==null&&(a.tb=this.tb.copy())},ot=er.prototype,ot.Af=function(a){ri.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 ri)x.Bd(y);else if(x instanceof Vn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},ot.gk=function(a,y,x,b,E,te,ne){if(a===vs&&y==="elements"){if(E instanceof rl)this.$a===null?this.$a=E:this.$a!==E&&At("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof Gn){var ae=E.Nl(function(fe){return fe instanceof rl});ae instanceof rl&&(this.$a===null?this.$a=ae:this.$a!==ae&&At("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===ds&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Gn&&this.$a.rg(b)&&(this.$a=null));ri.prototype.gk.call(this,a,y,x,b,E,te,ne)},ot.Xl=function(a,y){ri.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Gn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Gn&&(a=a.Pb()),this.tb===null&&(this.tb=new Tn),a.mi(this.tb),a instanceof hr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},ot.eh=function(a,y,x,b){this.nf=this.$a,ri.prototype.eh.call(this,a,y,x,b)},ot.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Vn||y.Va()}),ri.prototype.Va.call(this)},ot.si=function(){if(!ri.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof ri){if(y.isVisible()&&nl(y))return!1}else if(y instanceof Vn&&y.isVisible()&&nl(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function Zv(a,y){if(a.Gn.add(y)){y instanceof er&&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 Vn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function Kv(a,y){if(a.Gn.remove(y)){y instanceof er&&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 Vn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}ot.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)}ri.prototype.Lj.call(this)},er.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=Ln(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},er.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=Ln(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},er.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))},ot=er.prototype,ot.Bd=function(a){var y=(this.U&65536)!==0;if(ri.prototype.Bd.call(this,a),!y)for(!(this.U&65536)&&(this.U=this.U^65536),y=this.Lu();y.next();){var x=y.value;if(a===void 0||!a.contains(x)){var b=x.fromNode;b!==null&&b!==this&&b.Td(this)&&!b.isVisible()?(Ul(x.fromPort),Ul(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(Ul(x.fromPort),Ul(x.toPort),x.bb()))}}},ot.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 ri)for(E=E.linksConnected;E.next();){var te=E.value;y.contains(te)||x.add(te)}}return a&&(this.$p=x),x.iterator},ot.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 ri)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},ot.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new In;return a(this,y),y},ot.Rj=function(){var a=new In;return dd(a,this,!0,0,!0),a.remove(this),a},ot.Zb=function(a){ri.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},er.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 er&&te.isSubGraphExpanded&&(te.wasSubGraphExpanded=te.isSubGraphExpanded,Q1(te,y,x,b)),te instanceof ri)te.Bd(y),x.Aj(te,b);else if(te instanceof Vn)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!1}er.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 er&&te.wasSubGraphExpanded&&(te.wasSubGraphExpanded=!1,q1(te,y,x,b)),te instanceof ri)te.Bd(y),x.Cj(te,b);else if(te instanceof Vn)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!0}er.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=Tt.alloc(),ri.prototype.move.call(this,a,y),a=new In,y=this.Rj().iterator;y.next();)E=y.value,E instanceof Vn&&(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 ri&&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 Vn&&(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());Tt.free(te)}},Je.Object.defineProperties(er.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&&At("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)}}}),er.prototype.expandSubGraph=er.prototype.expandSubGraph,er.prototype.collapseSubGraph=er.prototype.collapseSubGraph,er.prototype.findSubGraphParts=er.prototype.Rj,er.prototype.findContainingGroupChain=er.prototype.hz,er.prototype.findExternalNodesConnected=er.prototype.iz,er.prototype.findExternalLinksConnected=er.prototype.Lu,er.prototype.ensureBounds=er.prototype.Va,er.className="Group";function rl(a){Qt.call(this),this.yb=xa,this.ko=new Tn(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}nt(rl,Qt),rl.prototype.cloneProtected=function(a){Qt.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},rl.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Eo(0,0,y.width,y.height,a.x,a.y)},rl.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof er||a instanceof Qr)||At("Placeholder is not inside a Group or Adornment."),a instanceof er){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(Is(b,(isFinite(x.width)?Math.max(x.width,y.width):y.width)||0,(isFinite(x.height)?Math.max(x.height,y.height):y.height)||0),this.Ge(0,0,b.width,b.height),b=a.memberParts,x=!1;b.next();)if(b.value.isVisible()){x=!0;break}b=a.diagram,!x||b===null||b.animationManager.Xu(a)||isNaN(y.x)||isNaN(y.y)||(x=Tt.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),Tt.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 hr&&(ne=te.strokeWidth);var ae=te.Df(),fe=te.naturalBounds,_e=(fe.width+ne)*ae;ne=(fe.height+ne)*ae,a.type!==Gn.Link&&(ae=te.ga(a.category==="Selection"?Xs:a.locationSpot,Tt.alloc()),a.location=ae,Tt.free(ae)),isNaN(_e)||isNaN(ne)?(a=te.ga(Xs,Tt.alloc()),_e=Tn.allocAt(a.x,a.y,0,0),_e.Ye(te.ga(Na,a)),_e.Ye(te.ga(wl,a)),_e.Ye(te.ga(Ia,a)),Is(y,_e.width+b||0,_e.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),Tt.free(a),Tn.free(_e)):(Is(y,_e+b||0,ne+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},rl.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},rl.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof er&&!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 er&&!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 er&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},rl.prototype.computeMemberBounds=function(a){if(!(this.part instanceof er))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 Vn&&(!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},Je.Object.defineProperties(rl.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Mi(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),rl.className="Placeholder";function Vn(a){Ti.call(this,Gn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=ol,this.Om=0,this.Qm=ol,this.Rm=NaN,this.qj=Jv,this.po=.5,this.wd=null,this.Nb=new Bn().freeze(),this.Tg=this.Mg=null,this.ml=new Tn,this.ua=new Yn,this.u=this.o=this.Sf=this.Wf=null,this.su=new Tt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}nt(Vn,Ti),Vn.prototype.cloneProtected=function(a){Ti.prototype.cloneProtected.call(this,a),a.Qa=this.Qa&-113,a.ff=this.ff,a.gn=this.gn,a.vf=this.vf,a.uo=this.uo,a.qk=this.qk,a.Om=this.Om,a.Qm=this.Qm,a.Rm=this.Rm,a.qj=this.qj,a.po=this.po,this.ba!==null&&(a.ba=this.ba.copy())},ot=Vn.prototype,ot.Af=function(a){Ti.prototype.Af.call(this,a),this.ff=a.ff,this.vf=a.vf,a.Mg=null,a.bb(),a.Sf=this.Sf;var y=a.fromPort;y!==null&&Ul(y),a=a.toPort,a!==null&&Ul(a)},ot.qb=function(a){a.classType===Vn?(a.value&2)===2?this.routing=a:a===ou||a===Fh||a===bp?this.curve=a:a===bg||a===e0||a===t0?this.adjusting=a:a!==Jv&&a!==ol&&At("Unknown Link enum value for a Link property: "+a):Ti.prototype.qb.call(this,a)},ot.Xc=function(){this.ba===null&&(this.ba=new lg)},ot.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),nl(a)||cd(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),nl(a)||cd(a)))},ot.zv=function(){return!1},ot.Av=function(){},ot.Zc=function(){return!1},Vn.prototype.computeAngle=function(a,y,x){return Vn.computeAngle(y,x)},Vn.computeAngle=function(a,y){switch(a){default:case ol:a=0;break;case Cg:a=y;break;case Pg:a=y+90;break;case _g:a=y-90;break;case Qv:a=y+180;break;case n0:a=nn.bp(y),90<a&&270>a&&(a-=180);break;case Eg:a=nn.bp(y+90),90<a&&270>a&&(a-=180);break;case Lg:a=nn.bp(y-90),90<a&&270>a&&(a-=180);break;case i0:if(a=nn.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return nn.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}ot=Vn.prototype,ot.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Ti.prototype.oh.call(this)},ot.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},ot.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()}ot.Vo=function(a){if(Ti.prototype.Vo.call(this,a),rf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Km(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Km(x,this,b)}xg(this)}},ot.Wo=function(a){if(Ti.prototype.Wo.call(this,a),rf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Vm(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Vm(x,this,b)}wg(this)}},ot.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))},Vn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Vn.prototype.move=function(a,y){var x=y?this.location:this.position,b=x.x;isNaN(b)&&(b=0);var E=x.y;for(isNaN(E)&&(E=0),b=a.x-b,E=a.y-E,y===!0?Ti.prototype.move.call(this,a,!1):(a=Tt.allocAt(x.x+b,x.y+E),Ti.prototype.move.call(this,a,!1),Tt.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)},Vn.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},Vn.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},Vn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(ss),a;if(y===1)return a.assign(this.i(0)),a;if(y===2){var x=this.i(0),b=this.i(1);return a.h((x.x+b.x)/2,(x.y+b.y)/2),a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===ou))return this.ua.Pu(.5,a),a.add(this.i(0)),x=this.ua.figures.first(),a.offset(-x.startX,-x.startY),a;if(this.computeCurve()===ou){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return nn.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),nn.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},Vn.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),nn.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)},ot=Vn.prototype,ot.i=function(a){return this.Nb.s[a]},ot.dd=function(a,y){this.Nb.cd(a,y)},ot.L=function(a,y,x){this.Nb.cd(a,new Tt(y,x))},ot.Kz=function(a,y){this.Nb.Gb(a,y)},ot.m=function(a,y,x){this.Nb.Gb(a,new Tt(y,x))},ot.ne=function(a){this.Nb.add(a)},ot.yf=function(a,y){this.Nb.add(new Tt(a,y))},ot.pv=function(a){this.Nb.mb(a)},ot.Fj=function(){this.Nb.clear()};function Bh(a,y,x){if(y!==0||x!==0)if(a.pointsCount===0)a.defaultFromPoint&&a.defaultFromPoint.offset(y,x),a.defaultToPoint&&a.defaultToPoint.offset(y,x);else{for(var b=a.fd,E=new Bn,te=a.Nb.iterator;te.next();){var ne=te.value;E.add(new Tt(ne.x+y,ne.y+x).freeze())}E.freeze(),te=a.Nb,a.Nb=E,ne=a.diagram,isNaN(y)||isNaN(x)||ne!==null&&ne.animationManager.zb?a.v():(a.ke.h(a.ke.x+y,a.ke.y+x),a.pa.h(a.pa.x+y,a.pa.y+x),tl(a)),b?Ym(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),ne!==null&&ne.animationManager.zb&&jo(ne.animationManager,a,E),a.g("points",te,E)}}ot.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},ot.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,Me=0;Me<_e;Me++){var Fe=fe[Me];ne=Math.min(Fe.x,ne),ae=Math.min(Fe.y,ae),Fe.freeze()}if(y.freeze(),_e===te){for(te=0;te<_e;te++)if(Me=E[te],Fe=fe[te],Me.x-x!==Fe.x-ne||Me.y-b!==Fe.y-ae){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&jo(x.animationManager,this,y),Ym(this),this.g("points",a,y)}},ot.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))}ot.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())}},ot.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()}}},Vn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Nf||(Nf=new ri,Nf.desiredSize=ir,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 ri,Of.desiredSize=ir,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,Me=this.isOrthogonal,Fe=this.curve===ou;this.Wf=_e&&!Me?Fe=!0:!1;var Ye=this.computeAdjusting()===ol||_e;if(!Me&&!_e&&ae&&fe){if(ae=!1,!Ye&&3<=te&&(Ye=this.getLinkPoint(a,y,ne,!0,!1,b,E),fe=this.getLinkPoint(b,E,x,!1,!1,a,y),ae=this.adjustPoints(0,Ye,te-1,fe))&&(Ye=this.getLinkPoint(a,y,ne,!0,!1,b,E),fe=this.getLinkPoint(b,E,x,!1,!1,a,y),this.adjustPoints(0,Ye,te-1,fe)),!ae)if(this.Fj(),Fe){te=this.getLinkPoint(a,y,ne,!0,!1,b,E),Ye=this.getLinkPoint(b,E,x,!1,!1,a,y),ae=Ye.x-te.x,fe=Ye.y-te.y,_e=this.computeCurviness(),Fe=Me=0;var tt=te.x+ae/3,st=te.y+fe/3,pt=tt,It=st;nn.B(fe,0)?It=0<ae?It-_e:It+_e:(Me=-ae/fe,Fe=Math.sqrt(_e*_e/(Me*Me+1)),0>_e&&(Fe=-Fe),pt=(0>fe?-1:1)*Fe+tt,It=Me*(pt-tt)+st),tt=te.x+2*ae/3,st=te.y+2*fe/3;var Mt=tt,Ht=st;nn.B(fe,0)?Ht=0<ae?Ht-_e:Ht+_e:(Mt=(0>fe?-1:1)*Fe+tt,Ht=Me*(Mt-tt)+st),this.Fj(),this.ne(te),this.yf(pt,It),this.yf(Mt,Ht),this.ne(Ye),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,Ye=E,b=this.getLinkPoint(a,y,ne,!0,!1,te,Ye),E=this.getLinkPoint(te,Ye,x,!1,!1,a,y),this.hasCurviness()?(Ye=E.x-b.x,x=E.y-b.y,ne=this.computeCurviness(),a=b.x+Ye/2,y=b.y+x/2,te=a,ae=y,nn.B(x,0)?ae=0<Ye?ae-ne:ae+ne:(Ye=-Ye/x,te=Math.sqrt(ne*ne/(Ye*Ye+1)),0>ne&&(te=-te),te=(0>x?-1:1)*te+a,ae=Ye*(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),Ye.mi(ae),_e=ae.ca(b),(fe||_e)&&(ne=y.ga(Jm(ne),new Tt),this.dd(0,this.getLinkPointFromPoint(a,y,ne,E,!0,ne)),x=Ye.ga(Jm(x),new Tt),this.dd(1,this.getLinkPointFromPoint(te,Ye,x,b,!1,x))),Tn.free(ae))}else{Fe=this.isAvoiding,Ye&&(Me&&Fe||_e)&&this.Fj();var Gt=_e?this.computeCurviness():0;Fe=this.getLinkPoint(a,y,ne,!0,Me,b,E),tt=pt=st=0,(Me||!ae||_e)&&(It=this.computeEndSegmentLength(a,y,ne,!0),tt=this.getLinkDirection(a,y,Fe,ne,!0,Me,b,E),_e&&(ae||ne.D(x)||!Me&&ne.x+x.x===1&&ne.y+x.y===1)&&(tt-=Me?90:30,0>Gt&&(tt-=180)),0>tt?tt+=360:360<=tt&&(tt-=360),_e&&(It+=Math.abs(Gt)*(Me?1:2)),tt===0?st=It:tt===90?pt=It:tt===180?st=-It:tt===270?pt=-It:(st=It*Math.cos(tt*Math.PI/180),pt=It*Math.sin(tt*Math.PI/180)),ne.Mc()&&_e&&(It=y.ga(Fr,Tt.alloc()),Mt=Tt.allocAt(It.x+1e3*st,It.y+1e3*pt),this.getLinkPointFromPoint(a,y,It,Mt,!0,Fe),Tt.free(It),Tt.free(Mt))),It=this.getLinkPoint(b,E,x,!1,Me,a,y);var Zt=Ht=Mt=0;if(Me||!fe||_e){var Xt=this.computeEndSegmentLength(b,E,x,!1);Zt=this.getLinkDirection(b,E,It,x,!1,Me,a,y),_e&&(fe||ne.D(x)||!Me&&ne.x+x.x===1&&ne.y+x.y===1)&&(Zt+=Me?0:30,0>Gt&&(Zt+=180)),0>Zt?Zt+=360:360<=Zt&&(Zt-=360),_e&&(Xt+=Math.abs(Gt)*(Me?1:2)),Zt===0?Mt=Xt:Zt===90?Ht=Xt:Zt===180?Mt=-Xt:Zt===270?Ht=-Xt:(Mt=Xt*Math.cos(Zt*Math.PI/180),Ht=Xt*Math.sin(Zt*Math.PI/180)),x.Mc()&&_e&&(x=E.ga(Fr,Tt.alloc()),ne=Tt.allocAt(x.x+1e3*Mt,x.y+1e3*Ht),this.getLinkPointFromPoint(b,E,x,ne,!1,It),Tt.free(x),Tt.free(ne))}x=Fe,(Me||!ae||_e)&&(x=new Tt(Fe.x+st,Fe.y+pt)),ne=It,(Me||!fe||_e)&&(ne=new Tt(It.x+Mt,It.y+Ht)),!Ye&&!Me&&ae&&3<te&&this.adjustPoints(0,Fe,te-2,ne)?this.dd(te-1,It):!Ye&&!Me&&fe&&3<te&&this.adjustPoints(1,x,te-1,It)?this.dd(0,Fe):!Ye&&(Me?6<=te:4<te)&&this.adjustPoints(1,x,te-2,ne)?(this.dd(0,Fe),this.dd(te-1,It)):(this.Fj(),this.ne(Fe),(Me||!ae||_e)&&this.ne(x),Me&&this.addOrthoPoints(x,tt,ne,Zt,a,b),(Me||!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}Vn.prototype.getLinkPointFromPoint=function(a,y,x,b,E,te){if(te===void 0&&(te=new Tt),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,Me=E*(a.m21*a.dy-a.m22*a.dx),Fe=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*ne+b.y*fe+Me,b=b.x*ae+b.y*_e+Fe,ne=x.x*ne+x.y*fe+Me,x=x.x*ae+x.y*_e+Fe}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)}Vn.prototype.getLinkPoint=function(a,y,x,b,E,te,ne,ae){if(ae===void 0&&(ae=new Tt),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=Tt.alloc(),_e=Tt.alloc();var Me=new Tn(y.ga(Xs,fe),y.ga(Na,_e)),Fe=this.computeSpot(!b,ne);a=this.getLinkPoint(te,ne,Fe,!b,E,a,y,_e),(x.Hf(_u)||x.Hf(Wa))&&a.y>=Me.y&&a.y<=Me.y+Me.height?ae.y=a.y:(x.Hf($l)||x.Hf(Za))&&a.x>=Me.x&&a.x<=Me.x+Me.width&&(ae.x=a.x),Tt.free(fe),Tt.free(_e)}}return ae}}return x=y.ga(Jm(x),Tt.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=Tt.alloc(),ne=ne.ga(Jm(fe),te),E&&(ne=Vv(x,ne)),Tt.free(te)),this.getLinkPointFromPoint(a,y,x,ne,b,ae),Tt.free(x),ae},Vn.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,Tt.alloc()),this.pointsCount>(te?6:2)?(ae=E?this.i(1):this.i(this.pointsCount-2),ae=te?Vv(fe,ae.copy()):x):(x=Tt.alloc(),ae=ae.ga(Fr,x),Tt.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,Tt.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},Vn.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)},Vn.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===oo?ms:y)):(a=y||this.toPort,a===null?a=Fr:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===oo?ms:y)),a};function wp(a){return a===ms||a.x===.5&&a.y===.5}function Jm(a){return a.x===.5&&a.y===.5?a:Fr}Vn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==ol&&4<this.pointsCount?this.computeMidPoint(new Tt):(a=y.Zn,a=a!==null?lS(a,this):null,a!==null?a.Zo:y.ga(Fr))},Vn.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},Vn.prototype.Cf=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=te;if(te===void 0&&(ne=gr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&gr.free(ne),!0;if(this.Yc(a,ne)){var ae=!1;if(!this.isAtomic)for(var fe=this.O.s,_e=fe.length;_e--;){var Me=fe[_e];if(Me.visible||Me===this.locationObject){var Fe=Me.actualBounds,Ye=this.naturalBounds;if(!(Fe.x>Ye.width||Fe.y>Ye.height||0>Fe.x+Fe.width||0>Fe.y+Fe.height)){if(Fe=gr.alloc(),Fe.set(ne),Me instanceof Gn)ae=Me.Cf(a,y,x,b,E,Fe);else if(this.path===Me){if(Me instanceof hr)if(ae=a,Ye=b,Me.pickable===!1)ae=!1;else if(Fe.multiply(Me.transform),Ye)e:{var tt=ae,st=Fe;if(Me.fh(tt,st))ae=!0;else{if(st===void 0&&(st=Me.transform,tt.Re(Me.actualBounds))){ae=!0;break e}ae=tt.left,Ye=tt.right;var pt=tt.top;tt=tt.bottom;var It=Tt.alloc(),Mt=Tt.alloc(),Ht=Tt.alloc(),Gt=gr.alloc();Gt.set(st),Gt.bv(Me.transform),Gt.Vj(),Mt.x=Ye,Mt.y=pt,Mt.transform(Gt),It.x=ae,It.y=pt,It.transform(Gt),st=!1,tf(Me,It,Mt,Ht)?st=!0:(It.x=Ye,It.y=tt,It.transform(Gt),tf(Me,It,Mt,Ht)?st=!0:(Mt.x=ae,Mt.y=tt,Mt.transform(Gt),tf(Me,It,Mt,Ht)?st=!0:(It.x=ae,It.y=pt,It.transform(Gt),tf(Me,It,Mt,Ht)&&(st=!0)))),gr.free(Gt),Tt.free(It),Tt.free(Mt),Tt.free(Ht),ae=st}}else ae=Me.fh(ae,Fe)}else ae=ca(Me,a,b,Fe);ae&&(Ye=Me,y!==null&&(Ye=y(Me)),Ye&&(x===null||x(Ye))&&E.add(Ye)),gr.free(Fe)}}}return te===void 0&&gr.free(ne),ae||this.background!==null||this.areaBackground!==null}return te===void 0&&gr.free(ne),!1},Vn.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},Vn.prototype.computeCorner=function(){if(this.curve===ou)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Vn.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},Vn.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},Vn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===ol&&x.bb()}},Vn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=iS;var y=this.Sf;if(y!==null){for(var x=Hn(),b=0,E=y.links,te=0;te<E.length;te++){var ne=E[te].computeSpacing();x.push(ne),b+=ne}for(b=-b/2,te=0;te<E.length;te++){if(E[te]===this){a=b+x[te]/2;break}b+=x[te]}y.Ds===this.fromNode&&(a=-a),ei(x)}}return a},Vn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Vn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Vn.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(!nn.$(_e,0)){if(nn.$(ae,0))var Me=0>fe?-Math.PI/2:Math.PI/2;else Me=Math.atan(fe/Math.abs(ae)),0>ae&&(Me=Math.PI-Me);ne=y.x;var Fe=y.y;ae=b.x-ne;var Ye=b.y-Fe;for(fe=Math.sqrt(ae*ae+Ye*Ye),nn.$(ae,0)?Ye=0>Ye?-Math.PI/2:Math.PI/2:(Ye=Math.atan(Ye/Math.abs(ae)),0>ae&&(Ye=Math.PI-Ye)),_e=fe/_e,Me=Ye-Me,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),nn.$(y,0)||(nn.$(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+Me,y*=_e,this.L(a,ne+y*Math.cos(ae),Fe+y*Math.sin(ae)));this.dd(x,b)}}return!0;case t0:if(te=this.i(a),Fe=this.i(x),!te.Xa(y)||!Fe.Xa(b)){E=te.x,te=te.y,ne=Fe.x,Fe=Fe.y,_e=(ne-E)*(ne-E)+(Fe-te)*(Fe-te),ae=y.x,Me=y.y,fe=b.x,Ye=b.y;var tt=1;if(fe-ae!==0){var st=(Ye-Me)/(fe-ae);tt=Math.sqrt(1+1/(st*st))}else st=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var pt=y.x,It=y.y,Mt=.5;_e!==0&&(Mt=((E-pt)*(E-ne)+(te-It)*(te-Fe))/_e);var Ht=E+Mt*(ne-E),Gt=te+Mt*(Fe-te);y=Math.sqrt((pt-Ht)*(pt-Ht)+(It-Gt)*(It-Gt)),It<st*(pt-Ht)+Gt&&(y=-y),0<st&&(y=-y),pt=ae+Mt*(fe-ae),Mt=Me+Mt*(Ye-Me),st!==0?(y=pt+y/tt,this.L(a,y,Mt-(y-pt)/st)):this.L(a,pt,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,Me=te.y,Fe=ae,_e=Me,nn.B(E.y,te.y)?nn.B(te.x,ne.x)?Me=y.y:nn.B(te.y,ne.y)&&(ae=y.x):nn.B(E.x,te.x)&&(nn.B(te.y,ne.y)?ae=y.x:nn.B(te.x,ne.x)&&(Me=y.y)),this.L(a+1,ae,Me),E=this.i(x),te=this.i(x-1),ne=this.i(x-2),ae=te.x,Me=te.y,fe=ae,Ye=Me,nn.B(E.y,te.y)?nn.B(te.x,ne.x)?Me=b.y:nn.B(te.y,ne.y)&&(ae=b.x):nn.B(E.x,te.x)&&(nn.B(te.y,ne.y)?ae=b.x:nn.B(te.x,ne.x)&&(Me=b.y)),this.L(x-1,ae,Me),$v(this))){this.L(a+1,Fe,_e),this.L(x-1,fe,Ye),x=!1;break e}this.dd(a,y),this.dd(x,b),x=!0}return x;default:return!1}},Vn.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=Tt.alloc(),Me=Tt.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),Me.h(x.x,(a.y+x.y)/2),b===180?(_e.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),Me.x=_e.x,Me.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,Me.x=_e.x,Me.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),Me.y=_e.y)):(_e.h(a.x,x.y),Me.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)),Me.x=x.x,Me.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),Me.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)),Me.x=x.x,Me.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),Me.h(x.x,(a.y+x.y)/2),b===0?(_e.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),Me.x=_e.x,Me.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,Me.x=_e.x,Me.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),Me.y=_e.y)):(_e.h(a.x,x.y),Me.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)),Me.x=x.x,Me.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),Me.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)),Me.x=x.x,Me.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),Me.h((a.x+x.x)/2,x.y),b===270?(_e.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),Me.x=x.x,Me.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,Me.x=x.x,Me.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,Me.x=_e.x)):(_e.h(x.x,a.y),Me.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)),Me.x=_e.x,Me.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)),Me.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)),Me.x=_e.x,Me.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),Me.h((a.x+x.x)/2,x.y),b===90?(_e.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),Me.x=x.x,Me.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,Me.x=x.x,Me.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,Me.x=_e.x)):(_e.h(x.x,a.y),Me.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)),Me.x=_e.x,Me.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)),Me.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)),Me.x=_e.x,Me.y=x.y)));var Fe=x;if(this.isAvoiding){var Ye=this.diagram;if(Ye===null||E===te||this.layer.isTemporary||!tp(Ye)||ae.ca(Fe)&&!te.Td(E)||fe.ca(a)&&!E.Td(te))y=!1;else{var tt=np(Ye,!0,this.containingGroup,null);if(this.segmentIndex!==17&&tt.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))&&tt.Yj(Math.min(_e.x,Me.x),Math.min(_e.y,Me.y),Math.abs(_e.x-Me.x),Math.abs(_e.y-Me.y))&&tt.Yj(Math.min(Me.x,Fe.x),Math.min(Me.y,Fe.y),Math.abs(Me.x-Fe.x),Math.abs(Me.y-Fe.y)))y=!1;else{E=a,te=Fe;var st=x=null;if(Ye.isVirtualized){Ye=tt.bounds.copy(),Ye.Bc(-tt.Ho,-tt.Go);var pt=Tt.alloc();Cp(tt,a.x,a.y)||(nn.Ff(Ye.x,Ye.y,Ye.x+Ye.width,Ye.y+Ye.height,a.x,a.y,_e.x,_e.y,pt)?(x=a=pt.copy(),y=pt.ab(_e)):nn.Ff(Ye.x,Ye.y,Ye.x+Ye.width,Ye.y+Ye.height,_e.x,_e.y,Me.x,Me.y,pt)?(x=a=pt.copy(),y=pt.ab(Me)):nn.Ff(Ye.x,Ye.y,Ye.x+Ye.width,Ye.y+Ye.height,Me.x,Me.y,Fe.x,Fe.y,pt)&&(x=a=pt.copy(),y=pt.ab(Fe))),Cp(tt,Fe.x,Fe.y)||(nn.Ff(Ye.x,Ye.y,Ye.x+Ye.width,Ye.y+Ye.height,Fe.x,Fe.y,Me.x,Me.y,pt)?(st=Fe=pt.copy(),b=Me.ab(pt)):nn.Ff(Ye.x,Ye.y,Ye.x+Ye.width,Ye.y+Ye.height,Me.x,Me.y,_e.x,_e.y,pt)?(st=Fe=pt.copy(),b=_e.ab(pt)):nn.Ff(Ye.x,Ye.y,Ye.x+Ye.width,Ye.y+Ye.height,_e.x,_e.y,a.x,a.y,pt)&&(st=Fe=pt.copy(),b=a.ab(pt))),Tt.free(pt)}ae=ae.copy().ed(fe),ae.Bc(tt.Ho*tt.Os,tt.Go*tt.Os),sS(tt,a,y,Fe,b,ae,!0),fe=Kc(tt,Fe.x,Fe.y),!tt.abort&&fe>=Pp&&(oS(tt),ae.Bc(tt.Ho*tt.Hx,tt.Go*tt.Ix),sS(tt,a,y,Fe,b,ae,!1),fe=Kc(tt,Fe.x,Fe.y)),!tt.abort&&fe<Pp&&Kc(tt,Fe.x,Fe.y)!==jh?(Yv(this,tt,Fe.x,Fe.y,b,!0,ne),ae=this.i(2),4>this.pointsCount?(y===0||y===180?(ae.x=a.x,ae.y=Fe.y):(ae.x=Fe.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?nn.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)):nn.B(ae.y,ne.y)?(Math.abs(a.y-ae.y)<=tt.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)&&(nn.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)):nn.B(ae.x,ne.x)?(Math.abs(a.x-ae.x)<=tt.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)),st!==null&&(b===0||b===180?this.yf(te.x,st.y):this.yf(st.x,te.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(_e.copy()),this.ne(Me.copy())),Tt.free(_e),Tt.free(Me)}},Vn.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),Me=x,Fe=b;for(E===0?Me+=ae:E===90?Fe+=fe:E===180?Me-=ae:Fe-=fe,E!==ne&&_e>of&&Kc(y,Me,Fe)!==_e-1&&(Kc(y,x-ae,b)===_e-1?(E=180,Me=x-ae,Fe=b):Kc(y,x+ae,b)===_e-1?(E=0,Me=x+ae,Fe=b):Kc(y,x,b-fe)===_e-1?(E=270,Me=x,Fe=b-fe):Kc(y,x,b+fe)===_e-1&&(E=90,Me=x,Fe=b+fe));_e>of&&Kc(y,Me,Fe)===_e-1;)x=Me,b=Fe,E===0?Me+=ae:E===90?Fe+=fe:E===180?Me-=ae:Fe-=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,Me=b,E===0?(te=90,Me+=fe):E===90?(te=180,ne-=ae):E===180?(te=270,Me-=fe):E===270&&(te=0,ne+=ae),Kc(y,ne,Me)===_e-1?Yv(a,y,ne,Me,te,!1,te):(ne=x,Me=b,E===0?(te=270,Me-=fe):E===90?(te=0,ne+=ae):E===180?(te=90,Me+=fe):E===270&&(te=180,ne-=ae),Kc(y,ne,Me)===_e-1&&Yv(a,y,ne,Me,te,!1,te))),a.yf(x,b)}Vn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=qr(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=qr(y,a,b.x,b.y,x.x,x.y);b=x,ae<E&&(te=ne,E=ae)}return te},Vn.prototype.qc=function(){this.lk=!1,this.v()},Vn.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 hr&&(E.ua=this.ua)}}},Vn.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&&!nn.$(this.smoothness,0))if(y===3){var ae=this.i(1);b=Math.min(E.x,ae.x);var fe=Math.min(E.y,ae.y);ae=this.i(2),b=Math.min(b,ae.x),fe=Math.min(fe,ae.y)}else{if(this.isOrthogonal)for(fe=0;fe<y;fe++)ae=b[fe],te.x=Math.min(ae.x,te.x),te.y=Math.min(ae.y,te.y);else for(b=3;b<y;b+=3)b+3>=y&&(b=y-1),fe=this.i(b),te.x=Math.min(fe.x,te.x),te.y=Math.min(fe.y,te.y);b=te.x,fe=te.y}else{for(fe=0;fe<y;fe++)ae=b[fe],te.x=Math.min(ae.x,te.x),te.y=Math.min(ae.y,te.y);b=te.x,fe=te.y}if(b-=this.su.x,fe-=this.su.y,E.x-=b,E.y-=fe,y!==2||rf(this)){if(a.type=Yn.o,ae=A1(a),this.computeShortLength(!0)!==0&&(E=kf(this,E,!0,te)),Sp(ae,E.x,E.y,!1),ne===ou&&3<=y&&!nn.$(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=Tt.allocAt(b,fe),x=Tt.alloc(),x.assign(this.i(1)),te=Tt.allocAt(b,fe),E=Tt.allocAt(b,fe),ne=this.i(0);for(var _e,Me=this.smoothness/3,Fe=1;Fe<this.pointsCount-1;Fe++){_e=this.i(Fe);var Ye=ne,tt=_e,st=this.i(Xv(this,_e,Fe,!1));if((!nn.$(Ye.x,tt.x)||!nn.$(tt.x,st.x))&&(!nn.$(Ye.y,tt.y)||!nn.$(tt.y,st.y))){var pt=Me;isNaN(pt)&&(pt=this.smoothness/3);var It=Ye.x;Ye=Ye.y;var Mt=tt.x;tt=tt.y;var Ht=st.x;st=st.y;var Gt=pt*Qm(It,Ye,Mt,tt);pt*=Qm(Mt,tt,Ht,st),nn.$(Ye,tt)&&nn.$(Mt,Ht)&&(Mt>It?st>tt?(te.x=Mt-Gt,te.y=tt-Gt,E.x=Mt+pt,E.y=tt+pt):(te.x=Mt-Gt,te.y=tt+Gt,E.x=Mt+pt,E.y=tt-pt):st>tt?(te.x=Mt+Gt,te.y=tt-Gt,E.x=Mt-pt,E.y=tt+pt):(te.x=Mt+Gt,te.y=tt+Gt,E.x=Mt-pt,E.y=tt-pt)),nn.$(It,Mt)&&nn.$(tt,st)&&(tt>Ye?(Ht>Mt?(te.x=Mt-Gt,te.y=tt-Gt,E.x=Mt+pt):(te.x=Mt+Gt,te.y=tt-Gt,E.x=Mt-pt),E.y=tt+pt):(Ht>Mt?(te.x=Mt-Gt,te.y=tt+Gt,E.x=Mt+pt):(te.x=Mt+Gt,te.y=tt+Gt,E.x=Mt-pt),E.y=tt-pt)),(nn.$(It,Mt)&&nn.$(Mt,Ht)||nn.$(Ye,tt)&&nn.$(tt,st))&&(It=.5*(It+Ht),Ye=.5*(Ye+st),te.x=It,te.y=Ye,E.x=It,E.y=Ye),(Fe===1||Fe===2&&nn.$(ne.x,this.i(0).x)&&nn.$(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,Me=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(Me=kf(this,Me.copy(),!1,Ur)),_e=.5*(_e+Me.x),ne=.5*(ne+Me.y),Ih(ae,E.x-b,E.y-fe,_e-b,ne-fe,Me.x-b,Me.y-fe),Tt.free(y),Tt.free(x),Tt.free(te),Tt.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,Ur)),Ih(ae,te.x-b,te.y-fe,E.x-b,E.y-fe,ne.x-b,ne.y-fe);else{for(te=Tt.alloc(),te.assign(this.i(0)),E=Tt.alloc(),E.assign(te),ne=this.computeCorner(),Fe=1,_e=0;Fe<y;){if(Fe=Xv(this,te,Fe,1<Fe),Me=this.i(Fe),Fe>=y-1){if(!te.D(Me))this.computeShortLength(!1)!==0&&(Me=kf(this,Me.copy(),!1,Ur)),Af(this,ae,-b,-fe,te,Me,x);else if(_e===0)for(Fe=1;Fe<y;)E.assign(te),Me=this.i(Fe++),Af(this,ae,-b,-fe,te,Me,x),te.assign(Me);break}if(_e=Xv(this,Me,Fe+1,Fe<y-3),Fe=-b,It=-fe,Ye=Me,Mt=this.i(_e),pt=x,nn.B(te.y,Ye.y)&&nn.B(Ye.x,Mt.x))if(st=Math.min(ne,Math.abs(Ye.x-E.x)/2),st=Gt=Math.min(st,Math.abs(Mt.y-Ye.y)/2),nn.B(st,0))Af(this,ae,Fe,It,te,Ye,pt),te.assign(Ye);else{var Zt=Ye.x,Xt=Ye.y;tt=Zt,Ht=Xt,Ye.x>te.x?Zt=Ye.x-st:Zt=Ye.x+st,Mt.y>Ye.y?Ht=Ye.y+Gt:Ht=Ye.y-Gt,Mt=Tt.allocAt(Zt,Xt),Af(this,ae,Fe,It,te,Mt,pt),Tt.free(Mt),Um(ae,Ye.x+Fe,Ye.y+It,tt+Fe,Ht+It),te.h(tt,Ht)}else nn.B(te.x,Ye.x)&&nn.B(Ye.y,Mt.y)?(st=Math.min(ne,Math.abs(Ye.y-E.y)/2),st=Gt=Math.min(st,Math.abs(Mt.x-Ye.x)/2),nn.B(Gt,0)?(Af(this,ae,Fe,It,te,Ye,pt),te.assign(Ye)):(Zt=Ye.x,Xt=Ye.y,tt=Zt,Ht=Xt,Ye.y>te.y?Xt=Ye.y-st:Xt=Ye.y+st,Mt.x>Ye.x?tt=Ye.x+Gt:tt=Ye.x-Gt,Mt=Tt.allocAt(Zt,Xt),Af(this,ae,Fe,It,te,Mt,pt),Tt.free(Mt),Um(ae,Ye.x+Fe,Ye.y+It,tt+Fe,Ht+It),te.h(tt,Ht))):(Af(this,ae,Fe,It,te,Ye,pt),te.assign(Ye));E.assign(Me),Fe=_e}Tt.free(te)}Gm=ae}else ae=this.i(1).copy(),ae.x-=b,ae.y-=fe,this.computeShortLength(!0)!==0&&(E=kf(this,E,!0,te)),this.computeShortLength(!1)!==0&&(ae=kf(this,ae,!1,te)),a.type=Yn.j,a.startX=E.x,a.startY=E.y,a.endX=ae.x,a.endY=ae.y;return this.lk=!0,a};function Qm(a,y,x,b){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=b-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),nn.$(a,0)?y:nn.$(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;nn.$(y.x,te.x)&&nn.$(y.y,te.y);){if(x>=E)return E-1;te=a.i(x++)}if(!nn.$(y.x,te.x)&&!nn.$(y.y,te.y))return x-1;for(var ne=te;nn.$(y.x,te.x)&&nn.$(te.x,ne.x)&&(!b||(y.y>=te.y?te.y>=ne.y:te.y<=ne.y))||nn.$(y.y,te.y)&&nn.$(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}Vn.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(nn.B(E.y,te.y))if(E.x<te.x)for(var Me=0;Me<_e;){var Fe=Math.max(E.x,Math.min(fe[Me++]-ae,te.x-ne));y.lineTo(Fe+x,te.y+b);for(var Ye=Fe+x,tt=Math.min(Fe+ne,te.x);Me<_e&&(Fe=fe[Me],Fe<tt+ne);)Me++,tt=Math.min(Fe+ae,te.x);Fe=te.y-ne+b,tt+=x;var st=te.y+b;a.curve===Fh?Sp(y,tt,st,!1):Ih(y,Ye,Fe,tt,Fe,tt,st)}else for(--_e;0<=_e;){for(Me=Math.min(E.x,Math.max(fe[_e--]+ae,te.x+ne)),y.lineTo(Me+x,te.y+b),Ye=Me+x,Fe=Math.max(Me-ne,te.x);0<=_e&&(Me=fe[_e],Me>Fe-ne);)_e--,Fe=Math.max(Me-ae,te.x);Me=te.y-ne+b,Fe+=x,tt=te.y+b,a.curve===Fh?Sp(y,Fe,tt,!1):Ih(y,Ye,Me,Fe,Me,Fe,tt)}else if(nn.B(E.x,te.x))if(E.y<te.y)for(Me=0;Me<_e;){for(Fe=Math.max(E.y,Math.min(fe[Me++]-ae,te.y-ne)),y.lineTo(te.x+x,Fe+b),Ye=Fe+b,Fe=Math.min(Fe+ne,te.y);Me<_e&&(tt=fe[Me],tt<Fe+ne);)Me++,Fe=Math.min(tt+ae,te.y);tt=te.x-ne+x,st=te.x+x,Fe+=b,a.curve===Fh?Sp(y,st,Fe,!1):Ih(y,tt,Ye,tt,Fe,st,Fe)}else for(--_e;0<=_e;){for(Me=Math.min(E.y,Math.max(fe[_e--]+ae,te.y+ne)),y.lineTo(te.x+x,Me+b),Ye=Me+b,Me=Math.max(Me-ne,te.y);0<=_e&&(Fe=fe[_e],Fe>Me-ne);)_e--,Me=Math.max(Fe-ae,te.y);Fe=te.x-ne+x,tt=te.x+x,Me+=b,a.curve===Fh?Sp(y,tt,Me,!1):Ih(y,Fe,Ye,Fe,Me,tt,Me)}}}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 Vn){if(fe===a)return 0<b.length&&b.sort(function(Me,Fe){return Me-Fe}),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(Me,Fe){return Me-Fe}),b.length}function Lx(a,y,x,b){for(var E=nn.B(a.y,y.y),te=b.pointsCount,ne=b.i(0),ae=Tt.alloc(),fe=1;fe<te;fe++){var _e=b.i(fe);if(fe<te-1){var Me=b.i(fe+1);if(ne.y===_e.y&&_e.y===Me.y){if(_e.x>ne.x&&Me.x>=_e.x||_e.x<ne.x&&Me.x<=_e.x)continue}else if(ne.x===_e.x&&_e.x===Me.x&&(_e.y>ne.y&&Me.y>=_e.y||_e.y<ne.y&&Me.y<=_e.y))continue}e:{Me=a.x;var Fe=a.y,Ye=y.x,tt=y.y,st=ne.x;ne=ne.y;var pt=_e.x,It=_e.y;if(nn.B(Me,Ye)){if(!nn.B(Fe,tt)&&nn.B(ne,It)&&Math.min(Fe,tt)<ne&&Math.max(Fe,tt)>ne&&Math.min(st,pt)<Me&&Math.max(st,pt)>Me&&!nn.B(st,pt)){ae.x=Me,ae.y=ne,Me=!0;break e}}else if(nn.B(Fe,tt)&&nn.B(st,pt)&&Math.min(Me,Ye)<st&&Math.max(Me,Ye)>st&&Math.min(ne,It)<Fe&&Math.max(ne,It)>Fe&&!nn.B(ne,It)){ae.x=st,ae.y=Fe,Me=!0;break e}ae.x=0,ae.y=0,Me=!1}Me&&(E?x.push(ae.x):x.push(ae.y)),ne=_e}Tt.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()))}Vn.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 Vn&&(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 Vn&&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())}}Vn.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},Vn.prototype.isVisible=function(){if(!Ti.prototype.isVisible.call(this))return!1;var a=this.containingGroup,y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this.fromNode,x!==null){if(this.isTreeLink&&y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(var b=x;b!==null;){if(b.labeledLink===this)return!0;b=b.containingGroup}if(x=x.findVisibleNode(),x===null||x===a)return!1}if(x=this.toNode,x!==null){if(this.isTreeLink&&!y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(y=x;y!==null;){if(y.labeledLink===this)return!0;y=y.containingGroup}if(y=x.findVisibleNode(),y===null||y===a)return!1}return!0},Vn.prototype.Zb=function(a){if(Ti.prototype.Zb.call(this,a),a&&qm(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},Vn.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()))}Vn.prototype.ph=function(){return!0},Je.Object.defineProperties(Vn.prototype,{fromNode:{get:function(){return this.ef},set:function(a){var y=this.ef;if(y!==a){var x=this.fromPort;y!==null&&(this.uf!==y&&Vm(y,this,x),wg(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setFromNodeForLink(this,a,y);var E=this.fromPort,te=this.fromPortChanged;if(te!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),te(this,x,E),b!==null&&(b.aa=ne)}a!==null&&(this.uf!==a&&Km(a,this,E),xg(this),this.C(1)),this.g("fromNode",y,a),xp(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&Ul(x),wg(this),this.ff=a;var b=this.fromPort;b!==null&&Ul(b);var E=this.diagram;if(E!==null){var te=this.data,ne=E.model;te!==null&&ne.ri()&&ne.xv(te,a)}x!==b&&(this.Wf=null,this.bb(),te=this.fromPortChanged,te!==null&&(ne=!0,E!==null&&(ne=E.aa,E.aa=!0),te(this,x,b),E!==null&&(E.aa=ne))),xg(this),this.g("fromPortId",y,a)}}},fromPort:{get:function(){var a=this.ef;return a===null?null:a.ns(this.ff)}},fromPortChanged:{get:function(){return this.gn},set:function(a){var y=this.gn;y!==a&&(this.gn=a,this.g("fromPortChanged",y,a))}},toNode:{get:function(){return this.uf},set:function(a){var y=this.uf;if(y!==a){var x=this.toPort;y!==null&&(this.ef!==y&&Vm(y,this,x),wg(this),this.C(2)),this.uf=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setToNodeForLink(this,a,y);var E=this.toPort,te=this.toPortChanged;if(te!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),te(this,x,E),b!==null&&(b.aa=ne)}a!==null&&(this.ef!==a&&Km(a,this,E),xg(this),this.C(1)),this.g("toNode",y,a),xp(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&Ul(x),wg(this),this.vf=a;var b=this.toPort;b!==null&&Ul(b);var E=this.diagram;if(E!==null){var te=this.data,ne=E.model;te!==null&&ne.ri()&&ne.Cv(te,a)}x!==b&&(this.Wf=null,this.bb(),te=this.toPortChanged,te!==null&&(ne=!0,E!==null&&(ne=E.aa,E.aa=!0),te(this,x,b),E!==null&&(E.aa=ne))),xg(this),this.g("toPortId",y,a)}}},toPort:{get:function(){var a=this.uf;return a===null?null:a.ns(this.vf)}},toPortChanged:{get:function(){return this.uo},set:function(a){var y=this.uo;y!==a&&(this.uo=a,this.g("toPortChanged",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:oo},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),(y.$c()||a.$c())&&this.fromNode!==null&&Ul(this.fromPort),this.bb())}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:NaN},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&En(a,">= 0",Vn,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),this.bb())}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:NaN},set:function(a){var y=this.fromShortLength;y!==a&&(this.Xc(),this.ba.Wi=a,this.qc(),this.g("fromShortLength",y,a))}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:oo},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),(y.$c()||a.$c())&&this.toNode!==null&&Ul(this.toPort),this.bb())}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:NaN},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&En(a,">= 0",Vn,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),this.bb())}},toShortLength:{get:function(){return this.ba!==null?this.ba.xj:NaN},set:function(a){var y=this.toShortLength;y!==a&&(this.Xc(),this.ba.xj=a,this.qc(),this.g("toShortLength",y,a))}},isLabeledLink:{get:function(){return this.wd===null?!1:0<this.wd.count}},labelNodes:{get:function(){return this.wd===null?Qi:this.wd.iterator}},relinkableFrom:{get:function(){return(this.Qa&1)!==0},set:function(a){var y=(this.Qa&1)!==0;y!==a&&(this.Qa^=1,this.g("relinkableFrom",y,a),this.Wb())}},relinkableTo:{get:function(){return(this.Qa&2)!==0},set:function(a){var y=(this.Qa&2)!==0;y!==a&&(this.Qa^=2,this.g("relinkableTo",y,a),this.Wb())}},resegmentable:{get:function(){return(this.Qa&4)!==0},set:function(a){var y=(this.Qa&4)!==0;y!==a&&(this.Qa^=4,this.g("resegmentable",y,a),this.Wb())}},isTreeLink:{get:function(){return(this.Qa&8)!==0},set:function(a){var y=(this.Qa&8)!==0;y!==a&&(this.Qa^=8,this.g("isTreeLink",y,a),this.fromNode!==null&&Sg(this.fromNode),this.toNode!==null&&Sg(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof hr?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),nn.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);nn.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 Tt)}},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);nn.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):nn.$(b.y,E.y)?(b=E.x-b.x,0>b&&(b=-b)):b=Math.sqrt(b.Bf(E)),a.push(b)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,b=a=0;b<x;b++)a+=y[b];this.vt=a}return a}},points:{get:function(){return this.Nb},set:function(a){var y=this.Nb;if(y!==a){var x=null;if(Array.isArray(a)){var b=a.length%2===0;if(b){for(var E=0;E<a.length;E++)if(typeof a[E]!="number"||isNaN(a[E])){b=!1;break}}if(b)for(x=new Bn,b=0;b<a.length/2;b++)E=new Tt(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(!qt(te)||typeof te.x!="number"||isNaN(te.x)||typeof te.y!="number"||isNaN(te.y)){b=!1;break}}if(b)for(x=new Bn,b=0;b<a.length;b++)E=a[b],x.add(new Tt(E.x,E.y).freeze())}}else if(a instanceof Bn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else At("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),Ym(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&jo(a.animationManager,this,x)),this.g("points",y,x)}}},pointsCount:{get:function(){return this.Nb.count}},fd:{get:function(){return(this.Qa&16)!==0},set:function(a){(this.Qa&16)!==0!==a&&(this.Qa^=16)}},suspendsRouting:{get:function(){return(this.Qa&32)!==0},set:function(a){(this.Qa&32)!==0!==a&&(this.Qa^=32)}},computingPoints:{get:function(){return(this.Qa&64)!==0},set:function(a){(this.Qa&64)!==0!==a&&(this.Qa^=64)}},defaultFromPoint:{get:function(){return this.o},set:function(a){this.o=a.copy()}},defaultToPoint:{get:function(){return this.u},set:function(a){this.u=a.copy()}},isOrthogonal:{get:function(){return(this.qj.value&2)===2}},isAvoiding:{get:function(){return(this.qj.value&4)===4}},lk:{get:function(){return(this.Qa&128)!==0},set:function(a){(this.Qa&128)!==0!==a&&(this.Qa^=128)}},geometry:{get:function(){if(!this.lk){if(this.vg(),2>this.pointsCount)return this.lk=!0,this.ua;this.ua=this.makeGeometry()}return this.ua}},firstPickIndex:{get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!wp(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!wp(this.computeSpot(!1))?a-2:a-1}},adjusting:{get:function(){return this.qk},set:function(a){var y=this.qk;y!==a&&(this.qk=a,this.g("adjusting",y,a))}},corner:{get:function(){return this.Om},set:function(a){var y=this.Om;y!==a&&(this.Om=a,this.qc(),this.g("corner",y,a))}},curve:{get:function(){return this.Qm},set:function(a){var y=this.Qm;y!==a&&(this.Qm=a,this.bb(),this.qc(),qm(this,y===Fh||y===bp||a===Fh||a===bp),this.g("curve",y,a))}},curviness:{get:function(){return this.Rm},set:function(a){var y=this.Rm;y!==a&&(this.Rm=a,this.bb(),this.qc(),this.g("curviness",y,a))}},routing:{get:function(){return this.qj},set:function(a){var y=this.qj;y!==a&&(this.qj=a,this.Wf=null,this.bb(),qm(this,(y.value&2)===2||(a.value&2)===2),this.g("routing",y,a))}},smoothness:{get:function(){return this.po},set:function(a){var y=this.po;y!==a&&(this.po=a,this.qc(),this.g("smoothness",y,a))}},key:{get:function(){var a=this.diagram;if(a!==null&&a.model.ri())return a.model.Ac(this.data)}}}),Vn.prototype.invalidateOtherJumpOvers=Vn.prototype.Xo,Vn.prototype.findClosestSegment=Vn.prototype.ez,Vn.prototype.updateRoute=Vn.prototype.vg,Vn.prototype.invalidateRoute=Vn.prototype.bb,Vn.prototype.rollbackRoute=Vn.prototype.rv,Vn.prototype.commitRoute=Vn.prototype.zf,Vn.prototype.startRoute=Vn.prototype.uh,Vn.prototype.clearPoints=Vn.prototype.Fj,Vn.prototype.removePoint=Vn.prototype.pv,Vn.prototype.addPointAt=Vn.prototype.yf,Vn.prototype.addPoint=Vn.prototype.ne,Vn.prototype.insertPointAt=Vn.prototype.m,Vn.prototype.insertPoint=Vn.prototype.Kz,Vn.prototype.setPointAt=Vn.prototype.L,Vn.prototype.setPoint=Vn.prototype.dd,Vn.prototype.getPoint=Vn.prototype.i,Vn.prototype.getOtherPort=Vn.prototype.Cz,Vn.prototype.getOtherNode=Vn.prototype.To;var Nf=null,Of=null,Jv=new _n(Vn,"Normal",1),Mx=new _n(Vn,"Orthogonal",2),Tx=new _n(Vn,"AvoidsNodes",6),nS=new _n(Vn,"AvoidsNodesStraight",7),ol=new _n(Vn,"None",0),ou=new _n(Vn,"Bezier",9),Fh=new _n(Vn,"JumpGap",10),bp=new _n(Vn,"JumpOver",11),bg=new _n(Vn,"End",17),e0=new _n(Vn,"Scale",18),t0=new _n(Vn,"Stretch",19),Cg=new _n(Vn,"OrientAlong",21),Pg=new _n(Vn,"OrientPlus90",22),_g=new _n(Vn,"OrientMinus90",23),Qv=new _n(Vn,"OrientOpposite",24),n0=new _n(Vn,"OrientUpright",25),Eg=new _n(Vn,"OrientPlus90Upright",26),Lg=new _n(Vn,"OrientMinus90Upright",27),i0=new _n(Vn,"OrientUpright45",28),iS=16,rS=14,Mg=8;Vn.className="Link",Vn.Normal=Jv,Vn.Orthogonal=Mx,Vn.AvoidsNodes=Tx,Vn.AvoidsNodesStraight=nS,Vn.None=ol,Vn.Bezier=ou,Vn.JumpGap=Fh,Vn.JumpOver=bp,Vn.End=bg,Vn.Scale=e0,Vn.Stretch=t0,Vn.OrientAlong=Cg,Vn.OrientPlus90=Pg,Vn.OrientMinus90=_g,Vn.OrientOpposite=Qv,Vn.OrientUpright=n0,Vn.OrientPlus90Upright=Eg,Vn.OrientMinus90Upright=Lg,Vn.OrientUpright45=i0,Vn.EndSegmentStep=8,Vn.CurvinessStart=iS,Vn.SpacingMin=rS,Vn.OrthoShortCut=Mg;function r0(a,y,x,b){pr(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=b,this.links=[]}r0.prototype.Sl=function(){if(!this.qq){var a=this.links;0<a.length&&(a=a[0].diagram,a!==null&&(a.ow.add(this),this.Fe=a.undoManager.isUndoingRedoing))}this.qq=!0},r0.prototype.Nv=function(){if(this.qq){this.qq=!1;var a=this.links;if(0<a.length){var y=a[0],x=y.diagram;x=x===null||x.pi&&!this.Fe,this.Fe=!1,y.arrangeBundledLinks(a,x),a.length===1&&(y.Sf=null,a.length=0)}a.length===0&&(a=this.Ds,this!==null&&a.af!==null&&a.af.remove(this),a=this.cv,this!==null&&a.af!==null&&a.af.remove(this))}},r0.className="LinkBundle";function Tg(a){pr(this),this.Yx=this.group=null,this.vs=!0,this.abort=!1,this.Od=this.Nd=1,this.Fn=this.En=-1,this.rc=a.width,this.sc=a.height,this.ac=null,this.ei=this.di=0,this.Os=11,this.Ix=this.Hx=22}Tg.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,b=a.y+a.height;if(this.Nd=Math.floor((a.x-this.rc)/this.rc)*this.rc,this.Od=Math.floor((y-this.sc)/this.sc)*this.sc,this.En=Math.ceil((x+2*this.rc)/this.rc)*this.rc,this.Fn=Math.ceil((b+2*this.sc)/this.sc)*this.sc,a=1+(Math.ceil((this.En-this.Nd)/this.rc)|0),y=1+(Math.ceil((this.Fn-this.Od)/this.sc)|0),this.ac===null||this.di<a-1||this.ei<y-1){for(x=[],b=0;b<=a;b++)x[b]=new Uint32Array(y);this.ac=x,this.di=a-1,this.ei=y-1}if(a=qv,this.ac!==null)for(y=0;y<=this.di;y++)if(x=this.ac[y],x.fill)x.fill(a);else for(b=0;b<=this.ei;b++)x[b]=a}};function Cp(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function Kc(a,y,x){return Cp(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):qv}function oS(a){if(a.ac!==null)for(var y=0;y<=a.di;y++)for(var x=a.ac[y],b=0;b<=a.ei;b++)x[b]>=of&&(x[b]=qv)}Tg.prototype.Yj=function(a,y,x,b){if(a>this.En||a+x<this.Nd||y>this.Fn||y+b<this.Od)return!0;a=(a-this.Nd)/this.rc|0,y=(y-this.Od)/this.sc|0,x=Math.max(0,x)/this.rc+1|0;var E=Math.max(0,b)/this.sc+1|0;if(0>a&&(x+=a,a=0),0>y&&(E+=y,y=0),0>x||0>E)return!0;for(b=Math.min(a+x-1,this.di)|0,x=Math.min(y+E-1,this.ei)|0;a<=b;a++){E=this.ac[a];for(var te=y;te<=x;te++)if(E[te]===jh)return!1}return!0};function Vc(a,y,x,b,E,te,ne,ae,fe){if(!(y<te||y>ne||x<ae||x>fe)){var _e=y|0,Me=x|0,Fe=a.ac[_e][Me];if(Fe>=of&&Fe<Pp)for(E?Me+=b:_e+=b,Fe+=1;te<=_e&&_e<=ne&&ae<=Me&&Me<=fe&&!(Fe>=a.ac[_e][Me]);)a.ac[_e][Me]=Fe,Fe+=1,E?Me+=b:_e+=b;if(_e=E?Me:_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,Me=of;for(a.ac[y][x]=Me;_e===jh&&y>te&&y<ne&&x>ae&&x<fe;)Me+=1,a.ac[y][x]=Me,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,Me=Pp;for(a.ac[y][x]=Me;_e===jh&&y>te&&y<ne&&x>ae&&x<fe;)a.ac[y][x]=Me,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,Me=b.y;if(Cp(a,_e,Me))if(_e-=a.Nd,_e/=a.rc,Me-=a.Od,Me/=a.sc,1>=Math.abs(ae-_e)&&1>=Math.abs(fe-Me))a.abort=!0;else{var Fe=te.x;b=te.y,y=te.x+te.width;var Ye=te.y+te.height;Fe-=a.Nd,Fe/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,Ye-=a.Od,Ye/=a.sc,te=Math.max(0,Math.min(a.di,Fe|0)),y=Math.min(a.di,Math.max(0,y|0)),Fe=Math.max(0,Math.min(a.ei,b|0)),Ye=Math.min(a.ei,Math.max(0,Ye|0)),b=a.ac,ae|=0,fe|=0,_e|=0,Me|=0;var tt=x===0||x===90?1:-1;if(x=x===90||x===270,b[ae][fe]===jh?(o0(a,ae,fe,tt,x,te,y,Fe,Ye),o0(a,ae,fe,1,!x,te,y,Fe,Ye),o0(a,ae,fe,-1,!x,te,y,Fe,Ye)):o0(a,ae,fe,tt,x,ae,fe,ae,fe),b[_e][Me]===jh?(s0(a,_e,Me,E===0||E===90?1:-1,E===90||E===270,te,y,Fe,Ye),s0(a,_e,Me,1,!(E===90||E===270),te,y,Fe,Ye),s0(a,_e,Me,-1,!(E===90||E===270),te,y,Fe,Ye)):s0(a,_e,Me,tt,x,_e,Me,_e,Me),x=Hn(),ne&&aS(a,_e,Me,E,ae,fe,x))for((x[0]!==_e||x[1]!==Me)&&(x.unshift(Me),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,Fe,Ye),Vc(a,ae,fe,-1,!1,te,y,Fe,Ye),Vc(a,ae,fe,1,!0,te,y,Fe,Ye),Vc(a,ae,fe,-1,!0,te,y,Fe,Ye);ei(x)}}}}function aS(a,y,x,b,E,te,ne){for(var ae=a.ac,fe=y,_e=x;;){if(fe===E&&_e===te)return!0;var Me=fe,Fe=_e;if(b===0)if(Me<E)Me++;else break;else if(b===90)if(Fe<te)Fe++;else break;else if(b===180)if(Me>E)Me--;else break;else if(Fe>te)Fe--;else break;var Ye=ae[Me][Fe];if(Ye===0||Ye===ey)break;fe=Me,_e=Fe}for(;;){if(Me=b,Fe=fe,Ye=_e,b===0?Ye<te?(Me=90,Ye++):Ye>te&&(Me=270,Ye--):b===90?Fe<E?(Me=0,Fe++):Fe>E&&(Me=180,Fe--):b===180?Ye<te?(Me=90,Ye++):Ye>te&&(Me=270,Ye--):Fe<E?(Me=0,Fe++):Fe>E&&(Me=180,Fe--),Fe=ae[Fe][Ye],Me!==b&&Fe!==0&&Fe!==ey){if(ne.push(fe),ne.push(_e),aS(a,fe,_e,Me,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++}}}Je.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(){pr(this),this.port=this.node=null,this.pe=[],this.ap=!1}If.prototype.toString=function(){for(var a=this.pe,y=this.node.toString()+" "+a.length.toString()+":",x=0;x<a.length;x++){var b=a[x];b!==null&&(y+=`
|
|
|
`+b.toString())}return y};function kx(a,y,x,b){switch(y=y.offsetY,y){case 8:return 90;case 2:return 180;case 1:return 270;case 4:return 0}switch(y){case 9:return 180<x?270:90;case 6:return 90<x&&270>=x?180:0}switch(a=180*Math.atan2(a.height,a.width)/Math.PI,y){case 3:return x>a&&x<=180+a?180:270;case 5:return x>180-a&&x<=360-a?270:0;case 12:return x>a&&x<=180+a?90:0;case 10:return x>180-a&&x<=360-a?180:90;case 7:return 90<x&&x<=180+a?180:x>180+a&&x<=360-a?270:0;case 13:return 180<x&&x<=360-a?270:x>a&&180>=x?90:0;case 14:return x>a&&x<=180-a?90:x>180-a&&270>=x?180:0;case 11:return x>180-a&&x<=180+a?180:x>180+a?270:90}return b&&y!==15&&(x-=15,0>x&&(x+=360)),x>a&&x<180-a?90:x>=180-a&&x<=180+a?180:x>180+a&&x<360-a?270:0}If.prototype.Sl=function(){this.pe.length=0};function lS(a,y){var x=a.pe;if(x.length===0){e:if(!a.ap){x=a.ap,a.ap=!0;var b=null,E=a.node,te=E instanceof er?E:null;if(te===null||te.isSubGraphExpanded)var ne=E.isTreeExpanded?E.findLinksConnected(a.port.portId):E.qx();else{if(!te.actualBounds.w()){a.ap=x;break e}b=te,ne=b.Lu()}te=a.pe.length=0;var ae=a.port.ga(Xs,Tt.alloc()),fe=a.port.ga(Na,Tt.alloc());for(E=Tn.allocAt(ae.x,ae.y,0,0),E.Ye(fe),Tt.free(ae),Tt.free(fe),ae=Tt.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 Me=_e.fromPort===a.port||_e.fromNode!==null&&_e.fromNode.Td(b),Fe=_e.computeSpot(Me,a.port);if(Fe.$c()&&(Me=Me?_e.toPort:_e.fromPort,Me!==null)){var Ye=Me.part;if(Ye!==null){var tt=Ye.findVisibleNode();tt!==null&&tt!==Ye&&(Ye=tt,Me=Ye.port),Me=_e.computeOtherPoint(Ye,Me),Ye=ae.ab(Me),Ye-=fe,0>Ye?Ye+=360:360<=Ye&&(Ye-=360),Fe=kx(E,Fe,Ye,_e.isOrthogonal),Fe===0?(Fe=4,180<Ye&&(Ye-=360)):Fe===90?(Fe=8,270<Ye&&(Ye-=360)):Fe===180?Fe=2:(Fe=1,90>Ye&&(Ye+=360)),tt=a.pe[te],tt===void 0?(tt=new ty(_e,Ye,Fe),a.pe[te]=tt):(tt.link=_e,tt.angle=Ye,tt.Nc=Fe),tt.hv.set(Me),te++}}}}for(Tt.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,Fe=a.port,b=a.node.portSpreading,ae=Tt.alloc(),fe=Tt.alloc(),ne=Tt.alloc(),_e=Tt.alloc(),Fe.ga(Xs,ae),Fe.ga(wl,fe),Fe.ga(Na,ne),Fe.ga(Ia,_e),tt=Ye=Me=Fe=0,b===Wv)for(var st=0;st<te.length;st++){var pt=te[st];if(pt!==null){var It=pt.link.computeThickness();switch(pt.Nc){case 8:Ye+=It;break;case 2:tt+=It;break;case 1:Fe+=It;break;default:case 4:Me+=It}}}var Mt=st=0,Ht=1,Gt=pt=0;for(It=0;It<te.length;It++){var Zt=te[It];if(Zt!==null){if(st!==Zt.Nc){switch(st=Zt.Nc,st){case 8:var Xt=ne;Mt=_e;break;case 2:Xt=_e,Mt=ae;break;case 1:Xt=ae,Mt=fe;break;default:case 4:Xt=fe,Mt=ne}switch(pt=Mt.x-Xt.x,Gt=Mt.y-Xt.y,st){case 8:Ye>Math.abs(pt)?(Ht=Math.abs(pt)/Ye,Ye=Math.abs(pt)):Ht=1;break;case 2:tt>Math.abs(Gt)?(Ht=Math.abs(Gt)/tt,tt=Math.abs(Gt)):Ht=1;break;case 1:Fe>Math.abs(pt)?(Ht=Math.abs(pt)/Fe,Fe=Math.abs(pt)):Ht=1;break;default:case 4:Me>Math.abs(Gt)?(Ht=Math.abs(Gt)/Me,Me=Math.abs(Gt)):Ht=1}Mt=0}var pn=Zt.Zo;if(b===Wv){switch(Zt=Zt.link.computeThickness(),Zt*=Ht,pn.set(Xt),st){case 8:pn.x=Xt.x+pt/2+Ye/2-Mt-Zt/2;break;case 2:pn.y=Xt.y+Gt/2+tt/2-Mt-Zt/2;break;case 1:pn.x=Xt.x+pt/2-Fe/2+Mt+Zt/2;break;default:case 4:pn.y=Xt.y+Gt/2-Me/2+Mt+Zt/2}Mt+=Zt}else{var ii=.5;b===$m&&(ii=(Zt.Uo+1)/(Zt.Gl+1)),pn.x=Xt.x+pt*ii,pn.y=Xt.y+Gt*ii}}}for(Tt.free(ae),Tt.free(fe),Tt.free(ne),Tt.free(_e),Xt=a.pe,te=0;te<Xt.length;te++)b=Xt[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,ms,y.fromPort===this.port),b=a.Uo;if(0>b)return x;var E=a.Gl;if(1>=E||!y.isOrthogonal)return x;y=a.hv;var te=a.Zo;return(a.Nc===2||a.Nc===8)&&(b=E-1-b),((a=a.Nc===2||a.Nc===4)?y.y<te.y:y.x<te.x)?x+8*b:(a?y.y===te.y:y.x===te.x)?x:x+8*(E-1-b)},If.className="Knot";function ty(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new Tt,this.Gl=this.Uo=0,this.Zo=new Tt,this.Ju=0}ty.prototype.toString=function(){return this.link.toString()+" "+this.angle.toString()+" "+this.Nc.toString()+":"+this.Uo.toString()+"/"+this.Gl.toString()+" "+this.Zo.toString()+" "+this.Ju.toString()+" "+this.hv.toString()},ty.className="LinkInfo";function es(a){pr(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new Tt(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}es.prototype.cloneProtected=function(a){a.sn=this.sn,a.Gh=this.Gh,a.yn=this.yn,a.Am.assign(this.Am),a.vn=this.vn,a.un=this.un,a.Em=this.Em,a.xn=!0},es.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},es.prototype.qb=function(){},es.prototype.toString=function(){var a=Fn(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},es.prototype.C=function(){if(this.isValidLayout){var a=this.diagram;if(a!==null&&!a.undoManager.isUndoingRedoing){var y=a.animationManager;!y.isTicking&&(y.defaultAnimation.isAnimating&&y.Cc(),this.isOngoing&&a.pi||this.isInitial&&!a.pi)&&(this.isValidLayout=!1,a.$b())}}},es.prototype.createNetwork=function(){return new To(this)},es.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof fn?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof er?y.lg(a.memberParts):y.lg(a.iterator),y},es.prototype.updateParts=function(){this.isValidLayout=!0;var a=this.diagram;if(a===null&&this.network!==null)for(var y=this.network.vertexes.iterator;y.next();){var x=y.value.node;if(x!==null&&(a=x.diagram,a!==null))break}try{a!==null&&a.Ea("Layout"),this.commitLayout()}finally{a!==null&&a.eb("Layout")}},es.prototype.commitLayout=function(){if(this.network!==null){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();if(this.isRouting)for(a=this.network.edges.iterator;a.next();)a.value.commit()}},es.prototype.doLayout=function(a){var y=new In;a instanceof fn?(fd(this,y,a.nodes,!0,this.rh,!0,!1,!0),fd(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof er?fd(this,y,a.memberParts,!1,this.rh,!0,!1,!0):y.addAll(a.iterator),0<y.count&&(a=this.diagram,a!==null&&a.Ea("Layout"),this.doMinimalNoNetworkLayout(y),a!==null&&a.eb("Layout")),this.isValidLayout=!0},es.prototype.doMinimalNoNetworkLayout=function(a){var y=Math.ceil(Math.sqrt(a.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var x=this.arrangementOrigin.x,b=x,E=this.arrangementOrigin.y,te=0,ne=0;for(a=a.iterator;a.next();){var ae=a.value;kg(ae);var fe=ae.measuredBounds,_e=fe.width;fe=fe.height,ae.moveTo(b,E),ae instanceof er&&(ae.rh=!1),b+=Math.max(_e,50)+20,ne=Math.max(ne,Math.max(fe,50)),te>=y-1?(te=0,b=x,E+=ne+20,ne=0):te++}},es.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var y=this.arrangementOrigin.x,x=y,b=this.arrangementOrigin.y,E=0,te=0,ne=this.network.vertexes.iterator;ne.next();){var ae=ne.value.node;if(!(ae===null||ae instanceof Vn)&&(kg(ae),this.rh(ae))){var fe=ae.measuredBounds,_e=fe.width;fe=fe.height,ae.moveTo(x,b),ae instanceof er&&(ae.rh=!1),x+=Math.max(_e,50)+20,te=Math.max(te,Math.max(fe,50)),E>=a-1?(E=0,x=y,b+=te+20,te=0):E++}}},es.prototype.rh=function(a){return!!(!a.location.w()||a instanceof er&&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 ri?fe.isLinkLabel||(fe instanceof er&&fe.layout===null?fd(a,y,fe.memberParts,!1,E,te,ne,ae):(kg(fe),y.add(fe))):ne&&fe instanceof Vn?y.add(fe):!ae||!fe.Zc()||fe instanceof ri||(kg(fe),y.add(fe)))}}function kg(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}es.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new Tn),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},es.prototype.ex=function(a){var y=new In;return a instanceof fn?(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 er?fd(this,y,a.memberParts,!1,null,!0,!0,!0):fd(this,y,a.iterator,!1,null,!0,!0,!0),y},es.prototype.initialOrigin=function(a){var y=this.group;if(y!==null){var x=y.position.copy();return(isNaN(x.x)||isNaN(x.y))&&x.set(a),y=y.placeholder,y!==null&&(x=y.ga(Xs),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Je.Object.defineProperties(es.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},group:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a,a!==null&&(this.H=a.diagram))}},isOngoing:{get:function(){return this.sn},set:function(a){this.sn!==a&&(this.sn=a)}},isInitial:{get:function(){return this.Gh},set:function(a){this.Gh=a,a||(this.xn=!0)}},isViewportSized:{get:function(){return this.yn},set:function(a){this.yn!==a&&(this.yn=a)&&this.C()}},isRouting:{get:function(){return this.vn},set:function(a){this.vn!==a&&(this.vn=a)}},isRealtime:{get:function(){return this.un},set:function(a){this.un!==a&&(this.un=a)}},isValidLayout:{get:function(){return this.xn},set:function(a){this.xn!==a&&(this.xn=a,a||(a=this.diagram,a!==null&&(a.xh=!0)))}},network:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a,a!==null&&(a.layout=this))}},boundsComputation:{get:function(){return this.Em},set:function(a){this.Em!==a&&(this.Em=a,this.C())}},arrangementOrigin:{get:function(){return this.Am},set:function(a){this.Am.D(a)||(this.Am.assign(a),this.C())}}}),es.prototype.collectParts=es.prototype.ex,es.prototype.getLayoutBounds=es.prototype.ni,es.prototype.invalidateLayout=es.prototype.C,es.className="Layout";function To(a){pr(this),this.Sc=a,this.wf=new In,this.ye=new In,this.Es=new ci,this.zs=new ci}To.prototype.clear=function(){if(this.wf)for(var a=this.wf.iterator;a.next();)a.value.clear();if(this.ye)for(a=this.ye.iterator;a.next();)a.value.clear();this.wf=new In,this.ye=new In,this.Es=new ci,this.zs=new ci},To.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutNetwork"+(this.layout!==null?"("+this.layout.toString()+")":"");if(0>=a)return y;if(y+=" vertexes: "+this.wf.count+" edges: "+this.ye.count,1<a){for(var x=this.wf.iterator;x.next();)y+=`
|
|
|
`+x.value.toString(a-1);for(x=this.ye.iterator;x.next();)y+=`
|
|
|
`+x.value.toString(a-1)}return y},To.prototype.createVertex=function(){return new aa(this)},To.prototype.createEdge=function(){return new Gl(this)},To.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(ne){if(ne instanceof ri)return!ne.isLinkLabel;if(ne instanceof Vn){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 ri&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof er&&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 Vn&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)&&this.Lo(b)===null){var te=b.fromNode;E=b.toNode,te!==null&&E!==null&&te!==E&&(te=this.findGroupVertex(te),E=this.findGroupVertex(E),te!==null&&E!==null&&this.Zj(te,E,b))}}},To.prototype.findGroupVertex=function(a){if(a===null)return null;var y=a.findVisibleNode();if(y===null)return null;if(a=this.ki(y),a!==null)return a;for(y=y.containingGroup;y!==null;){if(a=this.ki(y),a!==null)return a;y=y.containingGroup}return null},ot=To.prototype,ot.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},ot.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},ot.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}ot.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},ot.ki=function(a){return a===null?null:this.Es.I(a)},ot.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}}ot.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},ot.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))}ot.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},ot.Lo=function(a){return a===null?null:this.zs.I(a)},ot.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},ot.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))}},ot.Ko=function(){for(var a=Hn(),y=this.ye.iterator;y.next();){var x=y.value;x.fromVertex===x.toVertex&&a.push(x)}for(y=a.length,x=0;x<y;x++)this.Mj(a[x]);ei(a)},To.prototype.deleteArtificialVertexes=function(){for(var a=Hn(),y=this.wf.iterator;y.next();){var x=y.value;x.node===null&&x.data===null&&a.push(x)}for(x=a.length,y=0;y<x;y++)this.Iu(a[y]);for(y=Hn(),x=this.ye.iterator;x.next();){var b=x.value;b.link===null&&b.data===null&&y.push(b)}for(x=y.length,b=0;b<x;b++)this.Mj(y[b]);ei(a),ei(y)};function Ax(a){for(var y=Hn(),x=a.ye.iterator;x.next();){var b=x.value;b.fromVertex!==null&&b.toVertex!==null||y.push(b)}for(x=y.length,b=0;b<x;b++)a.Mj(y[b]);ei(y)}To.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Ax(this),this.Ko()),a=new Bn;for(var y=!0;y;){y=!1;for(var x=this.wf.iterator;x.next();){var b=x.value;if(0<b.tg.count||0<b.mg.count){y=this.layout.createNetwork(),a.add(y),ry(this,y,b),y=!0;break}}}return a.sort(function(E,te){return E===null||te===null||E===te?0:te.vertexes.count-E.vertexes.count}),a};function ry(a,y,x){if(x!==null&&x.network!==y){uS(a,x),y.dh(x);for(var b=x.sourceEdges;b.next();){var E=b.value;E.network!==y&&(iy(a,E),ny(y,E),ry(a,y,E.fromVertex))}for(b=x.destinationEdges;b.next();)x=b.value,x.network!==y&&(iy(a,x),ny(y,x),ry(a,y,x.toVertex))}}To.prototype.dz=function(){for(var a=new In,y=this.wf.iterator;y.next();)a.add(y.value.node);for(y=this.ye.iterator;y.next();)a.add(y.value.link);return a},Je.Object.defineProperties(To.prototype,{layout:{get:function(){return this.Sc},set:function(a){a!==null&&(this.Sc=a)}},vertexes:{get:function(){return this.wf}},edges:{get:function(){return this.ye}}}),To.prototype.findAllParts=To.prototype.dz,To.prototype.splitIntoSubNetworks=To.prototype.Zx,To.prototype.deleteSelfEdges=To.prototype.Ko,To.prototype.reverseEdge=To.prototype.gm,To.prototype.linkVertexes=To.prototype.Zj,To.prototype.findEdge=To.prototype.Lo,To.prototype.deleteLink=To.prototype.Yy,To.prototype.deleteEdge=To.prototype.Mj,To.prototype.addLink=To.prototype.Dy,To.prototype.addEdge=To.prototype.Bo,To.prototype.findVertex=To.prototype.ki,To.prototype.deleteNode=To.prototype.Zy,To.prototype.deleteVertex=To.prototype.Iu,To.prototype.addNode=To.prototype.Bl,To.prototype.addVertex=To.prototype.dh,To.prototype.addParts=To.prototype.lg,To.className="LayoutNetwork";function aa(a){pr(this),this.ob=a,this.j=new Tn(0,0,10,10).freeze(),this.o=new Tt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new Bn,this.mg=new Bn}aa.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new Bn,this.mg=new Bn},aa.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Or(this);if(0<a&&(y+=this.node!==null?"("+this.node.toString()+")":"",1<a)){a="";for(var x=!0,b=this.tg.iterator;b.next();){var E=b.value;x?x=!1:a+=",",a+=E.toString(0)}for(E="",x=!0,b=this.mg.iterator;b.next();){var te=b.value;x?x=!1:E+=",",E+=te.toString(0)}y+=" sources: "+a+" destinations: "+E}return y},aa.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;qt(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 er)){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)}},aa.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},aa.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},aa.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},aa.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function oy(a,y){return a=a.Sh,y=y.Sh,a?y?(a=a.text,y=y.text,a<y?-1:a>y?1:0):1:y!==null?-1:0}Je.Object.defineProperties(aa.prototype,{sourceEdgesArrayAccess:{get:function(){return this.tg._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.mg._dataArray}},data:{get:function(){return this.ub},set:function(a){if(this.ub=a,a!==null&&a.bounds){var y=a.bounds;a=y.x;var x=y.y,b=y.width;y=y.height,this.o.h(b/2,y/2),this.j.h(a,x,b,y)}}},node:{get:function(){return this.Sh},set:function(a){if(this.Sh!==a){this.Sh=a,a.Va();var y=this.network.layout,x=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 er)&&(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 Bn,y=this.sourceEdges;y.next();)a.add(y.value);for(y=this.destinationEdges;y.next();)a.add(y.value);return a.iterator}},edgesCount:{get:function(){return this.tg.count+this.mg.count}}}),aa.prototype.deleteDestinationEdge=aa.prototype.Jl,aa.prototype.addDestinationEdge=aa.prototype.zl,aa.prototype.deleteSourceEdge=aa.prototype.Kl,aa.prototype.addSourceEdge=aa.prototype.Cl,aa.className="LayoutVertex",aa.standardComparer=oy,aa.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.Sh;var x=y.Sh;if(a!==null){if(x!==null){for(y=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),a=x.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),x=0;x<y.length;x++)if(a[x]!==""&&a[x]!==void 0){var b=parseFloat(y[x]),E=parseFloat(a[x]);if(isNaN(b))if(isNaN(E)){if(y[x].localeCompare(a[x])!==0)return y[x].localeCompare(a[x])}else return 1;else{if(isNaN(E))return-1;if(b-E!==0)return b-E}}else if(y[x]!=="")return 1;return a[x]!==""&&a[x]!==void 0?-1:0}return 1}return x!==null?-1:0}return 1}return y!==null?-1:0};function Gl(a){pr(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Gl.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Gl.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Or(this);return 0<a&&(y+=this.$k!==null?"("+this.$k.toString()+")":"",1<a&&(y+=" "+(this.kd?this.kd.toString():"null")+" --> "+(this.qd?this.qd.toString():"null"))),y},Gl.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Gl.prototype.commit=function(){},Gl.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},Je.Object.defineProperties(Gl.prototype,{network:{get:function(){return this.nb},set:function(a){this.nb=a}},data:{get:function(){return this.ub},set:function(a){this.ub!==a&&(this.ub=a)}},link:{get:function(){return this.$k},set:function(a){this.$k!==a&&(this.$k=a)}},fromVertex:{get:function(){return this.kd},set:function(a){this.kd!==a&&(this.kd=a)}},toVertex:{get:function(){return this.qd},set:function(a){this.qd!==a&&(this.qd=a)}}}),Gl.prototype.getOtherVertex=Gl.prototype.Ax,Gl.className="LayoutEdge";function Pa(a){es.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new Qn(NaN,NaN).freeze(),this.tf=new Qn(10,10).freeze(),this.Jb=Ag,this.Rb=l0,this.nd=Ng,this.hd=cS,a&&Object.assign(this,a)}nt(Pa,es),Pa.prototype.cloneProtected=function(a){es.prototype.cloneProtected.call(this,a),a.zo=this.zo,a.yo=this.yo,a.yg.assign(this.yg),a.tf.assign(this.tf),a.Jb=this.Jb,a.Rb=this.Rb,a.nd=this.nd,a.hd=this.hd},Pa.prototype.qb=function(a){a.classType===Pa?a===Ng||a===c0||a===sy||a===u0?this.sorting=a:a===l0||a===uc?this.arrangement=a:a===Ag||a===a0?this.alignment=a:At("Unknown enum value: "+a):es.prototype.qb.call(this,a)},Pa.prototype.doLayout=function(a){this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var y=this.ex(a);a=this.diagram;for(var x=y.copy().iterator;x.next();){var b=x.value;if(!b.ph()||b.fromNode===null&&b.toNode===null){if(b.Va(),b instanceof er)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(),Me=Math.max(this.cellSize.width,1);if(!isFinite(Me))for(var Fe=Me=0;Fe<E.length;Fe++){var Ye=this.ni(E[Fe],_e);Me=Math.max(Me,Ye.width)}if(Me=Math.max(Me+ae,1),Fe=Math.max(this.cellSize.height,1),!isFinite(Fe))for(Ye=Fe=0;Ye<E.length;Ye++){var tt=this.ni(E[Ye],_e);Fe=Math.max(Fe,tt.height)}Fe=Math.max(Fe+fe,1),Ye=this.arrangement;for(var st=tt=this.arrangementOrigin.x,pt=this.arrangementOrigin.y,It=0,Mt=0,Ht=0;Ht<E.length;Ht++){var Gt=E[Ht],Zt=this.ni(Gt,_e),Xt=Math.ceil((Zt.width+ae)/Me)*Me,pn=Math.ceil((Zt.height+fe)/Fe)*Fe;switch(Ye){case uc:var ii=Math.abs(st-Zt.width);break;default:ii=st+Zt.width}switch((0<te&&It>te-1||0<ne&&0<It&&ii-tt>ne)&&(b.push(new Tn(0,pt,ne+ae,Mt)),It=0,st=tt,pt+=Mt,Mt=0),Mt=Math.max(Mt,pn),Ye){case uc:Zt=-Zt.width;break;default:Zt=0}switch(Gt.moveTo(st+Zt,pt),Ye){case uc:st-=Xt;break;default:st+=Xt}It++}b.push(new Tn(0,pt,ne+ae,Mt)),Tn.free(_e);break;case Ag:for(fe=ne,Me=te,Fe=y,Ye=x,ne=Tn.alloc(),tt=Math.max(this.cellSize.width,1),te=pt=_e=0,ae=Tt.alloc(),st=0;st<E.length;st++)Mt=E[st],It=this.ni(Mt,ne),Mt=Dh(Mt,Mt.locationObject,Mt.locationSpot,ae),_e=Math.max(_e,Mt.x),pt=Math.max(pt,It.width-Mt.x),te=Math.max(te,Mt.y);switch(st=this.arrangement,st){case uc:_e+=Fe;break;default:pt+=Fe}tt=isFinite(tt)?Math.max(tt+Fe,1):Math.max(_e+pt,1);var fi=Mt=this.arrangementOrigin.x;for(Ht=this.arrangementOrigin.y,pt=0,fe>=_e&&(fe-=_e),_e=Gt=0,Xt=Math.max(this.cellSize.height,1),Zt=te=0,pn=!0,It=Tt.alloc(),ii=0;ii<E.length;ii++){var li=E[ii],Kn=this.ni(li,ne),Rn=Dh(li,li.locationObject,li.locationSpot,ae);if(0<pt)switch(st){case uc:fi=(fi-Mt-(Kn.width-Rn.x))/tt,fi=nn.$(Math.round(fi),fi)?Math.round(fi):Math.floor(fi),fi=fi*tt+Mt;break;default:fi=(fi-Mt+Rn.x)/tt,fi=nn.$(Math.round(fi),fi)?Math.round(fi):Math.ceil(fi),fi=fi*tt+Mt}else switch(st){case uc:Gt=fi+Rn.x+Kn.width;break;default:Gt=fi-Rn.x}switch(st){case uc:var Ji=-(fi+Rn.x)+Gt;break;default:Ji=fi+Kn.width-Rn.x-Gt}if(0<Me&&pt>Me-1||0<fe&&0<pt&&Ji>fe){for(b.push(new Tn(0,pn?Ht-te:Ht,fe+Fe,Zt+te+Ye)),fi=0;fi<pt&&ii!==pt;fi++){Ji=E[ii-pt+fi];var Zi=Dh(Ji,Ji.locationObject,Ji.locationSpot,It);Ji.moveTo(Ji.position.x,Ji.position.y+te-Zi.y)}Zt+=Ye,Ht=pn?Ht+Zt:Ht+(Zt+te),pt=Zt=te=0,fi=Mt,pn=!1}switch(fi===Mt&&(_e=st===uc?Math.max(_e,Kn.width-Rn.x):Math.min(_e,-Rn.x)),te=Math.max(te,Rn.y),Zt=Math.max(Zt,Kn.height-Rn.y),isFinite(Xt)&&(Zt=Math.max(Zt,Math.max(Kn.height,Xt)-Rn.y)),pn?li.moveTo(fi-Rn.x,Ht-Rn.y):li.moveTo(fi-Rn.x,Ht),st){case uc:fi-=Rn.x+Fe;break;default:fi+=Kn.width-Rn.x+Fe}pt++}if(b.push(new Tn(0,Ht,fe+Fe,(pn?Zt:Zt+te)+Ye)),E.length!==pt)for(fe=0;fe<pt;fe++)Me=E[E.length-pt+fe],Fe=Dh(Me,Me.locationObject,Me.locationSpot,ae),Me.moveTo(Me.position.x,Me.position.y+te-Fe.y);if(Tt.free(ae),Tt.free(It),st===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 Tt(E+y/2-(te+E),ne-x/2)):this.commitLayers(b,new Tt(E-y/2,ne-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},Pa.prototype.commitLayers=function(){};function cS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}Je.Object.defineProperties(Pa.prototype,{wrappingWidth:{get:function(){return this.zo},set:function(a){this.zo!==a&&(0<a||isNaN(a))&&(this.zo=a,this.isViewportSized=isNaN(a),this.C())}},wrappingColumn:{get:function(){return this.yo},set:function(a){this.yo!==a&&(0<a||isNaN(a))&&(this.yo=a,this.C())}},cellSize:{get:function(){return this.yg},set:function(a){this.yg.D(a)||(this.yg.assign(a),this.C())}},spacing:{get:function(){return this.tf},set:function(a){this.tf.D(a)||(this.tf.assign(a),this.C())}},alignment:{get:function(){return this.Jb},set:function(a){this.Jb===a||a!==Ag&&a!==a0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==l0&&a!==uc||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==sy&&a!==u0&&a!==Ng&&a!==c0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var a0=new _n(Pa,"Position",0),Ag=new _n(Pa,"Location",1),l0=new _n(Pa,"LeftToRight",2),uc=new _n(Pa,"RightToLeft",3),sy=new _n(Pa,"Forward",4),u0=new _n(Pa,"Reverse",5),Ng=new _n(Pa,"Ascending",6),c0=new _n(Pa,"Descending",7);Pa.className="GridLayout",Pa.standardComparer=cS,Pa.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),y=y.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);for(var x=0;x<a.length;x++)if(y[x]!==""&&y[x]!==void 0){var b=parseFloat(a[x]),E=parseFloat(y[x]);if(isNaN(b))if(isNaN(E)){if(a[x].localeCompare(y[x])!==0)return a[x].localeCompare(y[x])}else return 1;else{if(isNaN(E))return-1;if(b-E!==0)return b-E}}else if(a[x]!=="")return 1;return y[x]!==""&&y[x]!==void 0?-1:0}return 1}return y!==null?-1:0},Pa.Position=a0,Pa.Location=Ag,Pa.LeftToRight=l0,Pa.RightToLeft=uc,Pa.Forward=sy,Pa.Reverse=u0,Pa.Ascending=Ng,Pa.Descending=c0;function mo(){this.On=new In,this.Dn=new In,this.Pa=new In,this.cf=new ci,this.bf=new ci,this.aj=new ci,this.H=null,this.tp=!1}ot=mo.prototype,ot.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},ot.Xe=function(a){this.H=a},ot.oi=function(a){if(a instanceof ri){if(this.On.add(a),a instanceof er){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 Vn?this.Dn.add(a):a instanceof Qr||this.Pa.add(a);y=a.data,y===null||a instanceof Qr||(a instanceof Vn?this.bf.add(y,a):this.cf.add(y,a))},ot.pc=function(a){if(a.Ej(),a instanceof ri){if(this.On.remove(a),a instanceof er){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 Vn?this.Dn.remove(a):a instanceof Qr||this.Pa.remove(a);y=a.data,y===null||a instanceof Qr||(a instanceof Vn?this.bf.remove(y):this.cf.remove(y))},ot.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 er)&&At('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 er||At('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 Vn||At('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Hn(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=Hn(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=Hn(),b=this.nodes.iterator;b.next();){var E=b.value;E.data!==null&&(a.push(E.data),a.push(E.location))}for(b=this.links.iterator;b.next();)E=b.value,E.data!==null&&(a.push(E.data),a.push(E.location));for(b=this.parts.iterator;b.next();)E=b.value,E.data!==null&&(a.push(E.data),a.push(E.location));for(this.removeAllModeledParts(),this.addAllModeledParts(),b=0;b<y.length;b++)E=this.Lc(y[b]),E!==null&&(E.isSelected=!0);for(b=0;b<x.length;b++)E=this.Lc(x[b]),E!==null&&(E.isHighlighted=!0);for(b=0;b<a.length;b+=2)E=this.Lc(a[b]),E!==null&&(E.location=a[b+1]);ei(y),ei(x),ei(a)}},mo.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},mo.prototype.addModeledParts=function(a,y){var x=this,b=this.diagram.model;a.forEach(function(E){b.lb(E)&&hS(x,E,!1)}),a.forEach(function(E){b.lb(E)&&x.resolveReferencesForData(E)}),y!==!1&&qf(this.diagram,!1)};function hS(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);e:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var b=a.Ro(y),E=dS(a,y,b);if(E!==null&&(Ru(E),E=E.copy(),E!==null)){var te=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,E.Tf=b,E.ub=y,a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=te,b=E;break e}}b=null}b!==null&&x&&a.resolveReferencesForData(y)}}mo.prototype.insertLink=function(){return null},mo.prototype.resolveReferencesForData=function(){},mo.prototype.Ro=function(a){return this.H.model.Ro(a)};function dS(a,y,x){a=a.H;var b=a.model;return b.Xj()&&b.Yu(y)?(y=a.groupTemplateMap.I(x),y===null&&(y=a.groupTemplateMap.I(""),y===null&&(gS||(gS=!0,Dn('No Group template found for category "'+x+'"'),Dn(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,Dn('No Node template found for category "'+x+'"'),Dn(" Using default node template")),y=a.ny))),y}mo.prototype.getLinkCategoryForData=function(){return""},mo.prototype.setLinkCategoryForData=function(){},mo.prototype.setFromNodeForLink=function(){},mo.prototype.setToNodeForLink=function(){},mo.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(mS||(mS=!0,Dn('No Link template found for category "'+a+'"'),Dn(" Using default link template")),x=y.my)),x},mo.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},mo.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},mo.prototype.ip=function(a){a=this.Lc(a),a!==null&&(rd(this.diagram,a,!1),this.unresolveReferencesForPart(a))},mo.prototype.unresolveReferencesForPart=function(){},mo.prototype.removeDataForLink=function(){},mo.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},mo.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof ri?a:null)},mo.prototype.findLinkForKey=function(){return null},ot=mo.prototype,ot.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},ot.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof ri?a:null)},ot.Kc=function(a){return a===null?null:this.bf.I(a)},ot.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(qt(ne)&&ay(this,E,ne)){y.add(b);break}}}return y.iterator},ot.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(qt(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(on(te)){if(!on(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(qt(y)&&qt(x)){if(!ay(a,y,x))return!1}else if(y!==x)return!1;return!0}mo.prototype.doModelChanged=function(a){if(this.H){var y=this.H;if(a.model===y.model){var x=a.change;if(y.doModelChanged(a),y.aa){y.aa=!1;try{var b=a.modelChange;if(b!=="")if(x===Vo){if(b==="nodeCategory"){var E=this.Lc(a.object),te=a.newValue;E!==null&&typeof te=="string"&&(E.category=te)}else b==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===vs){var ne=a.newValue;b==="nodeDataArray"&&qt(ne)&&hS(this,ne),y.isModified=!0}else if(x===ds){var ae=a.oldValue;b==="nodeDataArray"&&qt(ae)&&this.ip(ae),y.isModified=!0}else x===Ka&&(b==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):b==="ModelDisplaced"&&this.Wd());else if(x===Vo){var fe=a.propertyName,_e=a.object;_e===y.model?(fe==="nodeKeyProperty"||fe==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(_e,fe),y.isModified=!0}else if(x===vs||x===ds){var Me=a.change===vs,Fe=Me?a.newParam:a.oldParam,Ye=Me?a.newValue:a.oldValue,tt=this.aj.I(a.object);if(Array.isArray(tt))for(a=0;a<tt.length;a++){var st=tt[a];if(Me)Tm(st,Ye,Fe,!0);else if(!(0>Fe)){var pt=Fe+fg(st);st.pc(pt,!0),wv(st,pt,Fe)}}y.isModified=!0}}finally{y.aa=!0}}}}},mo.prototype.updateAllTargetBindings=function(a){a===void 0&&(a="");for(var y=this.parts.iterator;y.next();)y.value.La(a);for(y=this.nodes.iterator;y.next();)y.value.La(a);for(y=this.links.iterator;y.next();)y.value.La(a)},mo.prototype.rp=function(){for(var a=this.H.model,y=new In,x=a.nodeDataArray,b=0;b<x.length;b++)y.add(x[b]);var E=[];for(this.nodes.each(function(ne){ne.data===null||y.contains(ne.data)||E.push(ne.data)}),this.parts.each(function(ne){ne.data===null||y.contains(ne.data)||E.push(ne.data)}),E.forEach(function(ne){_S(a,ne,!1)}),b=0;b<x.length;b++){var te=x[b];this.Lc(te)===null&&PS(a,te,!1)}for(this.refreshDataBoundLinks(),x=this.parts.iterator;x.next();)x.value.updateRelationshipsFromData();for(x=this.nodes.iterator;x.next();)x.value.updateRelationshipsFromData();for(x=this.links.iterator;x.next();)x.value.updateRelationshipsFromData()},mo.prototype.refreshDataBoundLinks=function(){},mo.prototype.updateRelationshipsFromData=function(){},mo.prototype.updateDataBindings=function(a,y){if(typeof y=="string"){var x=this.Lc(a);if(x!==null)x.La(y);else{x=null;for(var b=this.aj.iterator;b.next();){for(var E=b.value,te=0;te<E.length;te++){var ne=E[te].sx(a);ne!==null&&(x===null&&(x=Hn()),x.push(ne))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);ei(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ly(a,y){var x=y.Hh;if(on(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(on(b)){var E=a.aj.I(b);if(E!==null){for(var te=0;te<E.length;te++)if(E[te]===y){E.splice(te,1),E.length===0&&a.aj.remove(b);break}}}}mo.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new ci;if(on(a))for(var E=0;E<a.length;E++)h0(this,a[E],y,b,x);else for(a=a.iterator;a.next();)h0(this,a.value,y,b,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,E=new In;for(var te=new ci,ne=b.iterator;ne.next();){var ae=ne.value;if(ae instanceof Vn)a||ae.fromNode!==null&&ae.toNode!==null||E.add(ae);else if(ae instanceof ri&&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 Me=new ci;b.each(function(Fe){Fe.key.data!==null&&Me.add(Fe.key.data,Fe.value.data)}),x(Me,y,this.H.model)}for(y=b.iterator;y.next();)y.value.La();return b};function h0(a,y,x,b,E){if(y===null||E&&!y.canCopy())return null;if(b.contains(y))return b.I(y);var te=a.copyPartData(y,x);if(!(te instanceof Ti))return null;if(te.isSelected=!1,te.isHighlighted=!1,b.add(y,te),y instanceof ri){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 er&&te instanceof er)for(y=y.memberParts;y.next();)ne=h0(a,y.value,x,b,E),ne instanceof Vn||ne===null||(ne.containingGroup=te)}else if(y instanceof Vn&&te instanceof Vn)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 ri&&(ne.labeledLink=te);return te}mo.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof Vn||(b=E.copyNodeData(b),qt(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 Vn||(E=y.copyNodeData(b)),qt(E)&&(x.data=E)));return x},Je.Object.defineProperties(mo.prototype,{nodes:{get:function(){return this.On}},links:{get:function(){return this.Dn}},parts:{get:function(){return this.Pa}},diagram:{get:function(){return this.H}},addsToTemporaryLayer:{get:function(){return this.tp},set:function(a){this.tp=a}}}),mo.prototype.updateAllRelationshipsFromData=mo.prototype.rp,mo.prototype.findLinksByExample=mo.prototype.ls,mo.prototype.findNodesByExample=mo.prototype.ms,mo.prototype.findLinkForData=mo.prototype.Kc,mo.prototype.findNodeForData=mo.prototype.ii,mo.prototype.findPartForData=mo.prototype.Lc,mo.prototype.findNodeForKey=mo.prototype.Vb,mo.prototype.removeModeledPart=mo.prototype.ip,mo.prototype.removeModeledParts=mo.prototype.Gs,mo.prototype.rebuildParts=mo.prototype.Wd;var pS=!1,gS=!1,mS=!1;mo.className="PartManager";function fa(a){mo.apply(this,arguments)}nt(fa,mo),fa.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},fa.prototype.addModeledParts=function(a){for(mo.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)xp(a.value);qf(this.diagram,!1)};function vS(a,y){y.forEach(function(x){yS(a,x)}),qf(a.diagram,!1)}function yS(a,y){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.bf.contains(y)){var x=a.getLinkCategoryForData(y),b=a.findLinkTemplateForCategory(x);if(b!==null){Ru(b);var E=b.copy();if(E!==null){b=a.diagram.skipsModelSourceBindings,a.diagram.skipsModelSourceBindings=!0,E.Tf=x,E.ub=y,x=a.diagram.model;var te=g0(x,y,!0);te!==""&&(E.fromPortId=te),te=su(x,y,!0),te!==void 0&&(te=a.Vb(te),te instanceof ri&&(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 ri&&(E.toNode=te)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(ne){ne=a.Vb(ne),ne!==null&&(ne.labeledLink=E)}),a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=b}}}}fa.prototype.removeAllModeledParts=function(){var a=this.diagram.model;SS(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function SS(a,y){y.forEach(function(x){a.ip(x)})}fa.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},fa.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},fa.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},fa.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},fa.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},fa.prototype.findPartForKey=function(a){var y=mo.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},fa.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},fa.prototype.doModelChanged=function(a){var y=this;if(mo.prototype.doModelChanged.call(this,a),this.diagram){var x=this.diagram;if(a.model===x.model){var b=a.change;if(x.aa){x.aa=!1;try{var E=a.modelChange;if(E!==""){if(b===Vo){if(E==="linkFromKey"){var te=this.Kc(a.object);if(te!==null){var ne=this.Vb(a.newValue);te.fromNode=ne}}else if(E==="linkToKey"){var ae=this.Kc(a.object);if(ae!==null){var fe=this.Vb(a.newValue);ae.toNode=fe}}else if(E==="linkFromPortId"){var _e=this.Kc(a.object);if(_e!==null){var Me=a.newValue;typeof Me=="string"&&(_e.fromPortId=Me)}}else if(E==="linkToPortId"){var Fe=this.Kc(a.object);if(Fe!==null){var Ye=a.newValue;typeof Ye=="string"&&(Fe.toPortId=Ye)}}else if(E==="nodeGroupKey"){var tt=this.Lc(a.object);if(tt!==null){var st=a.newValue;if(st!==void 0){var pt=this.Vb(st);pt instanceof er?tt.containingGroup=pt:tt.containingGroup=null}else tt.containingGroup=null}}else if(E==="linkLabelKeys"){var It=this.Kc(a.object);if(It!==null){var Mt=a.oldValue,Ht=a.newValue;Array.isArray(Mt)&&Mt.forEach(function(Rn){0<=Ht.indexOf(Rn)||(Rn=y.Vb(Rn),Rn!==null&&(Rn.labeledLink=null))}),Array.isArray(Ht)&&Ht.forEach(function(Rn){Rn=y.Vb(Rn),Rn!==null&&(Rn.labeledLink=It)})}}else if(E==="linkCategory"){var Gt=this.Kc(a.object),Zt=a.newValue;Gt!==null&&typeof Zt=="string"&&(Gt.category=Zt)}else E==="linkDataArray"&&(SS(this,a.oldValue),vS(this,a.newValue));x.isModified=!0}else if(b===vs){var Xt=a.newValue;if(E==="linkDataArray"&&typeof Xt=="object"&&Xt!==null)yS(this,Xt);else if(E==="linkLabelKeys"&&gd(Xt)){var pn=this.Kc(a.object),ii=this.Vb(Xt);pn!==null&&ii!==null&&(ii.labeledLink=pn)}x.isModified=!0}else if(b===ds){var fi=a.oldValue;if(E==="linkDataArray"&&typeof fi=="object"&&fi!==null)this.ip(fi);else if(E==="linkLabelKeys"&&gd(fi)){var li=this.Vb(fi);li!==null&&(li.labeledLink=null)}x.isModified=!0}}else if(b===Vo){var Kn=a.propertyName;a.object!==x.model||Kn!=="linkFromKeyProperty"&&Kn!=="linkToKeyProperty"&&Kn!=="linkFromPortIdProperty"&&Kn!=="linkToPortIdProperty"&&Kn!=="linkLabelKeysProperty"&&Kn!=="nodeIsGroupProperty"&&Kn!=="nodeGroupKeyProperty"&&Kn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},fa.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new In,b=y.linkDataArray;b.forEach(function(te){x.add(te)});var E=[];this.links.each(function(te){te.data===null||x.contains(te.data)||E.push(te.data)}),E.forEach(function(te){AS(y,te,!1)}),b.forEach(function(te){a.Kc(te)===null&&kS(y,te,!1)})},fa.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;if(a instanceof Vn){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 er)&&(a.containingGroup=y)}}},fa.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=Og(y,x),E=this.Lc(a);if(b!==null&&E!==null){b=b.iterator;for(var te={};b.next();){var ne=b.value;y.lb(ne)?E instanceof er&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=E)):(te.link=this.Kc(ne),te.link!==null&&E instanceof ri&&(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 er&&(E.containingGroup=a))}},fa.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof ri){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 er)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&cc(y,x,b)}}},fa.prototype.copyPartData=function(a,y){var x=mo.prototype.copyPartData.call(this,a,y);if(a instanceof Vn)if(a=a.data,a!==null&&y!==null){var b=y.model;a=b.Jo(a),typeof a=="object"&&a!==null&&(b.fi(a),x=y.Kc(a))}else x!==null&&(y=this.diagram,a!==null&&y!==null&&y.commandHandler!==null&&y.commandHandler.copiesClipboardData&&(y=y.model.Jo(a),typeof y=="object"&&y!==null&&(x.data=y)));return x},fa.prototype.insertLink=function(a,y,x,b){var E=this.diagram,te=E.model,ne=E.toolManager.findTool("Linking"),ae="";if(a!==null&&(y===null&&(y=a),ae=y.portId,ae===null&&(ae="")),y="",x!==null&&(b===null&&(b=x),y=b.portId,y===null&&(y="")),b=ne.archetypeLinkData,b instanceof Vn){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 ri&&(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 ri||(a=te.copyNodeData(a),typeof a=="object"&&a!==null&&(te.xf(a),a=te.wa(a),a!==void 0&&te.Bu(b,a))),E.Kc(b);return null},fa.prototype.findLinkForKey=fa.prototype.findLinkForKey,fa.prototype.findPartForKey=fa.prototype.findPartForKey,fa.prototype.removeAllModeledParts=fa.prototype.removeAllModeledParts,fa.prototype.addModeledParts=fa.prototype.addModeledParts,fa.prototype.addAllModeledParts=fa.prototype.addAllModeledParts,fa.className="GraphLinksPartManager";function xu(){mo.apply(this,arguments),this.Sg=null}nt(xu,mo);function d0(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var b=a.diagram.toolManager.findTool("Linking"),E=y,te=x;if(a.diagram.isTreePathToChildren||(E=x,te=y),(b===null||!hn(b,E,te,null,!0))&&(y=a.getLinkCategoryForData(x.data),b=a.findLinkTemplateForCategory(y),b!==null&&(Ru(b),b=b.copy(),b!==null))){var ne=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=y,b.ub=x.data,b.fromNode=E,b.toNode=te,a.diagram.add(b),b.ub=null,b.data=x.data,a.diagram.skipsModelSourceBindings=ne}}}xu.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},xu.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},xu.prototype.setFromNodeForLink=function(a,y,x){var b=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren)b.qe(a.data,b.wa(y));else{var E=this.Sg;this.Sg=a,x!==null&&b.qe(x.data,void 0),b.qe(y,b.wa(a.toNode!==null?a.toNode.data:null)),this.Sg=E}},xu.prototype.setToNodeForLink=function(a,y,x){var b=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren){var E=this.Sg;this.Sg=a,x!==null&&b.qe(x.data,void 0),b.qe(y,b.wa(a.fromNode!==null?a.fromNode.data:null)),this.Sg=E}else b.qe(a.data,b.wa(y))},xu.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},xu.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},xu.prototype.doModelChanged=function(a){if(mo.prototype.doModelChanged.call(this,a),this.diagram){var y=this.diagram;if(a.model===y.model){var x=a.change;if(y.aa){y.aa=!1;try{var b=a.modelChange;if(b!==""){if(x===Vo){if(b==="nodeParentKey"){var E=a.object,te=this.Vb(a.newValue),ne=this.ii(E);if(this.Sg!==null)te!==null&&(this.Sg.data=E,this.Sg.category=this.getLinkCategoryForData(E));else if(ne!==null){var ae=ne.kh();ae!==null?te===null?y.remove(ae):y.isTreePathToChildren?ae.fromNode=te:ae.toNode=te:d0(this,te,ne)}}else if(b==="parentLinkCategory"){var fe=this.ii(a.object),_e=a.newValue;if(fe!==null&&typeof _e=="string"){var Me=fe.kh();Me!==null&&(Me.category=_e)}}y.isModified=!0}}else if(x===Vo){var Fe=a.propertyName;a.object===y.model&&Fe==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},xu.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;a instanceof ri&&(y=b.mh(y),y=x.Vb(y),b=a.pg(),y!==b&&(b=a.kh(),y!==null?b!==null?x.isTreePathToChildren?b.fromNode=y:b.toNode=y:d0(this,y,a):b!==null&&rd(x,b,!1)))}}},xu.prototype.updateDataBindings=function(a,y){mo.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},xu.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=Og(y,x),E=this.Lc(a);if(b!==null&&E!==null){for(b=b.iterator;b.next();){var te=b.value;y.lb(te)&&E instanceof ri&&y.mh(te)===x&&d0(this,E,this.ii(te))}hc(y,x)}a=y.mh(a),a!==void 0&&E instanceof ri&&(a=this.Vb(a),d0(this,a,E))}},xu.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof ri){var x=y.wa(a.data),b=this.Kc(a.data);if(b!==null){b.isSelected=!1,b.isHighlighted=!1;var E=b.layer;if(E!==null){var te=E.pc(-1,b,!1);0<=te&&this.diagram.cb(ds,"parts",E,b,null,te,null),te=b.layerChanged,te!==null&&te(b,E,null)}}for(b=this.diagram.isTreePathToChildren,a=a.linksConnected;a.next();)E=a.value,E=(b?E.toNode:E.fromNode).data,y.lb(E)&&cc(y,x,E)}},xu.prototype.insertLink=function(a,y,x){y=this.diagram.model;var b=a,E=x;return this.diagram.isTreePathToChildren||(b=x,E=a),b!==null&&E!==null?(y.qe(E.data,y.wa(b.data)),E.kh()):null},xu.prototype.findLinkForKey=xu.prototype.findLinkForKey,xu.className="TreePartManager";function Si(a,y){this.kl=new In,this.il=new In,this.Wv=`,
|
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
|
"removedNodeKeys": `,this.vh=null,pr(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new ci,this.Th="key",this.Bk=this.bl=null,this.Jm=this.Km=!1,this.Mm=!0,this.xm=null,this.lj="category",this.Vf=new ci,this.Lt=new Bn,this.Wg=!1,this.o=null,this.undoManager=new Fo,a!==void 0&&(on(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Si.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},Si.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Si.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},Si.prototype.toString=function(a){if(a===void 0&&(a=0),1<a)return this.np();var y=(this.name!==""?this.name:"")+" Model";if(0<a){y+=`
|
|
|
node data:`,a=this.nodeDataArray;for(var x=a.length,b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+hi(E)}}return y},Si.prototype.xA=function(a){a.change!==Ka&&At("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Bs?(wS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},Si.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(Fe){Fe.model===x&&(Fe.modelChange==="nodeDataArray"?Fe.change===vs?E.add(Fe.newValue):Fe.change===ds&&ne.add(Fe.oldValue):x.lb(Fe.object)?te.add(Fe.object):Fe.change!==Vo||x.modelData!==Fe.object&&Fe.propertyName!=="modelData"?Fe.object!==null&&(ae&&ae.contains(Fe.object)?ae.get(Fe.object).each(function(Ye){x.lb(Ye)&&te.add(Ye)}):Fe.object instanceof Si||x.ri()&&x.Jc(Fe.object)||bS(x,Fe.object).each(function(Ye){te.add(Ye)})):b=!0)});var fe=this.il;fe.clear(),E.each(function(Fe){fe.add(x.wa(Fe)),y||te.add(Fe)});var _e=this.kl;_e.clear(),ne.each(function(Fe){_e.add(x.wa(Fe)),y&&te.add(Fe)}),a=x.cloneDeep(te.Fa());var Me=null;return b&&(Me===null&&(Me={}),Me.modelData=this.cloneDeep(this.modelData)),0<fe.count&&(Me===null&&(Me={}),y?Me.removedNodeKeys=fe.Fa():Me.insertedNodeKeys=fe.Fa()),0<a.length&&(Me===null&&(Me={}),Me.modifiedNodeData=a),0<_e.count&&(Me===null&&(Me={}),y?Me.insertedNodeKeys=_e.Fa():Me.removedNodeKeys=_e.Fa()),_e.clear(),fe.clear(),Me},Si.prototype.cloneDeep=function(a){return _p(this,a,!0)};function _p(a,y,x,b,E,te){function ne(Fe,Ye){ae?(Fe.__gohashid===void 0&&te.push(Fe),b.set(Fe,Ye)):(Fe=bo++,b.set(Fe,Ye),E.set(Fe,y))}if(!qt(y))return y;te||(te=[]);var ae=Object.isExtensible(y);if(b||(b=new ci),ae){var fe=b.get(y);if(fe)return fe}else for(E||(E=new ci),fe=E.iterator;fe.next();){var _e=fe.key;if(fe.value===y&&(_e=b.get(_e)))return _e}if(Array.isArray(y)){fe=[],ne(y,fe);for(var Me=0;Me<y.length;Me++)fe.push(_p(a,y[Me],!1,b,E,te))}else if(y instanceof Tt||y instanceof Qn||y instanceof Tn||y instanceof Mi||y instanceof vi)fe=y.copy(),ne(y,fe);else{if(y instanceof fo||y instanceof Yn||y instanceof _n)return y;if(y instanceof Bn)fe=new Bn().addAll(_p(a,y.Fa(),!1,b,E,te)),ne(y,fe);else if(y instanceof In)fe=new In().addAll(_p(a,y.Fa(),!1,b,E,te)),ne(y,fe);else if(y instanceof ci)fe=new ci().addAll(_p(a,y.Fa(),!1,b,E,te)),ne(y,fe);else if(y instanceof Date)fe=new Date(y.getTime()),ne(y,fe);else if(y instanceof RegExp)fe=new RegExp(y),ne(y,fe),fe.lastIndex=y.lastIndex;else if(typeof y.copy=="function")fe=y.copy(),ne(y,fe);else for(Me in fe={},ne(y,fe),y)Me!=="__gohashid"&&(fe[Me]=_p(a,y[Me],!1,b,E,te))}return x&&te.forEach(function(Fe){delete Fe.__gohashid}),fe}ot=Si.prototype,ot.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},ot.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},ot.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,qt(y)&&(a.dm(y),a.modelData=y)}ot.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)},ot.kv=function(a){xS(this,a),a=a.nodeDataArray,on(a)&&(this.dm(a),this.nodeDataArray=a)};function wS(a,y){function x(E,te){if((te=te.part)&&(te=te.data,E!==te)){var ne=b.get(E);ne===null?(ne=new In,ne.add(te),b.add(E,ne)):ne.add(te)}}var b=a.vh;b===null&&(b=new ci,y.changes.each(function(E){if(E.diagram!==null){var te=E.change;te===Vo?(E=E.object.panel)&&(te=E.data)&&x(te,E):(te===vs||te===ds)&&(E=E.object,(te=E.itemArray)&&x(te,E))}}),a.vh=b)}function bS(a,y){for(var x=new In,b=0;b<a.nodeDataArray.length;b++){var E=a.nodeDataArray[b];f0(a,y,E,E,x)}return x}function f0(a,y,x,b,E){if(Array.isArray(x))for(var te=0;te<x.length;te++){var ne=x[te];if(ne===y)return E.add(b),!0;if(f0(a,y,ne,b,E))return!0}else if(qt(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}ot.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(Me){Me.model===x&&(Me.modelChange==="nodeDataArray"?Me.change===vs?E.add(Me.newValue):Me.change===ds&&ne.add(Me.oldValue):x.lb(Me.object)?te.add(Me.object):Me.change!==Vo||x.modelData!==Me.object&&Me.propertyName!=="modelData"?Me.object!==null&&(ae&&ae.contains(Me.object)?ae.get(Me.object).each(function(Fe){x.lb(Fe)&&te.add(Fe)}):Me.object instanceof Si||x.ri()&&x.Jc(Me.object)||bS(x,Me.object).each(function(Fe){te.add(Fe)})):b=!0)});var fe=this.il;fe.clear(),E.each(function(Me){fe.add(x.wa(Me)),y||te.add(Me)});var _e=this.kl;return _e.clear(),ne.each(function(Me){_e.add(x.wa(Me)),y&&te.add(Me)}),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},ot.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)&&At("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new ci;if(Array.isArray(x))for(var E=0;E<x.length;E++){var te=x[E],ne=this.wa(te);ne!=null&&b.set(ne,te)}if(Array.isArray(y))for(E=y.length,te=0;te<E;te++){ne=y[te];var ae=this.hc(ne);ae===null&&(ae=(ae=b.get(ne))?ae:this.copyNodeData({}),this.km(ae,ne),this.xf(ae))}if(Array.isArray(x)){for(y=x.length,b=0;b<y;b++)if(E=x[b],te=this.wa(E),te=this.hc(te),te!==null){for(var fe in E)fe==="__gohashid"||fe===this.nodeKeyProperty||this.Wj()&&fe===this.nodeIsGroupProperty||this.setDataProperty(te,fe,E[fe]);this.lm(E,te)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,fe=0;fe<x;fe++)y=this.hc(a[fe]),y!==null&&this.cm(y)},ot.$x=function(a,y){a.change!==Ka&&At("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Bs?(y===void 0&&(y=Ig(this,this)),wS(this,x),a=this.Pv(x,a.propertyName==="FinishedUndo"),this.vh=null,y==="2"?'{ "incremental": 2'+a+"}":'{ "class": '+this.quote(y)+', "incremental": 1'+this.rm()+a+"}"):'{ "incremental": 0 }'},ot.yA=function(a,y){return this.$x(a,y)},ot.np=function(a){return a===void 0&&(a=Ig(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},ot.toJSON=function(a){return this.np(a)},ot.Zw=function(a){var y=null;if(typeof a=="string")try{y=Et.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:At("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&At("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},ot.Ky=function(a){return this.Zw(a)},Si.constructGraphLinksModel=function(){return new Si},ot=Si.prototype,ot.dm=function(a){if(on(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(qt(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:At("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(qt(a)){for(y in a)if(x=a[y],qt(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(E=x.length%2===0,b=0;b<x.length;b++)if(typeof x[b]!="number"){E=!1;break}if(E){for(E=new Bn,b=0;b<x.length/2;b++)E.add(new Tt(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return Nx(a)}return a},ot.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()):on(a)?pd(this,a):qt(a)?cy(this,a):typeof a=="function"?"null":a.toString()};function pd(a,y,x){x===void 0&&(x=!1);var b=y.length;if(0>=b)return"[]";var E=new ui;E.add("["),x&&1<b&&E.add(`
|
|
|
`);for(var te=0;te<b;te++){var ne=y[te];ne!==void 0&&(0<te&&(E.add(","),x&&E.add(`
|
|
|
`)),E.add(a.sm(ne)))}return x&&1<b&&E.add(`
|
|
|
`),E.add("]"),E.toString()}function CS(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function sl(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function cy(a,y){var x=y;if(x instanceof Tt)y={class:"go.Point",x:sl(x.x),y:sl(x.y)};else if(x instanceof Qn)y={class:"go.Size",width:sl(x.width),height:sl(x.height)};else if(x instanceof Tn)y={class:"go.Rect",x:sl(x.x),y:sl(x.y),width:sl(x.width),height:sl(x.height)};else if(x instanceof Mi)y={class:"go.Margin",top:sl(x.top),right:sl(x.right),bottom:sl(x.bottom),left:sl(x.left)};else if(x instanceof vi)x.sb()?y={class:"go.Spot",x:sl(x.x),y:sl(x.y),offsetX:sl(x.offsetX),offsetY:sl(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof fo){if(y={class:"go.Brush",type:x.type.name},x.type===Nh?y.color=x.color:(x.type===ch||x.type===yu)&&(y.start=x.start,y.end=x.end,x.type===yu&&(x.startRadius!==0&&(y.startRadius=sl(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=sl(x.endRadius)))),x.colorStops!==null){var b={};for(x=x.colorStops.iterator;x.next();)b[x.key]=x.value;y.colorStops=b}}else x instanceof Yn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=sl(x.startX)),x.startY!==0&&(y.startY=sl(x.startY)),x.endX!==0&&(y.endX=sl(x.endX)),x.endY!==0&&(y.endY=sl(x.endY)),x.spot1.D(Xs)||(y.spot1=x.spot1),x.spot2.D(Na)||(y.spot2=x.spot2),x.type===Yn.o&&(y.path=Yn.ia(x))):x instanceof _n&&(y={class:"go.EnumValue",classType:Ig(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var te=Os(y,E);if(!CS(E,te))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&te instanceof Bn){var ne="[";for(te=te.iterator;te.next();){var ae=te.value;1<ne.length&&(ne+=","),ne+=a.sm(ae.x),ne+=",",ne+=a.sm(ae.y)}ne+="]",b+=ne}else b+=a.sm(te)}return b+"}"}function al(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function Nx(a){if(typeof a!="object")return a;var y=a.class||"";if(y==="NaN")return NaN;if(y==="Date")return new Date(a.value);if(y.indexOf("go.")!==0)return a;y=y.substr(3);var x=a;if(y==="Point")x=new Tt(al(a.x),al(a.y));else if(y==="Size")x=new Qn(al(a.width),al(a.height));else if(y==="Rect")x=new Tn(al(a.x),al(a.y),al(a.width),al(a.height));else if(y==="Margin")x=new Mi(al(a.top),al(a.right),al(a.bottom),al(a.left));else if(y==="Spot")typeof a.enum=="string"?x=xh(a.enum):x=new vi(al(a.x),al(a.y),al(a.offsetX),al(a.offsetY));else if(y==="Brush"){if(x=new fo,x.type=Jn(fo,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof vi&&(x.start=a.start),a.end instanceof vi&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=al(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=al(a.endRadius)),a=a.colorStops,qt(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=Yn.parse(a.path):x=new Yn,x.type=Jn(Yn,a.type),typeof a.startX=="number"&&(x.startX=al(a.startX)),typeof a.startY=="number"&&(x.startY=al(a.startY)),typeof a.endX=="number"&&(x.endX=al(a.endX)),typeof a.endY=="number"&&(x.endY=al(a.endY)),a.spot1 instanceof vi&&(x.spot1=a.spot1),a.spot2 instanceof vi&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=dy(b),typeof b=="function"&&(x=Jn(b,a.name)));return x}ot.Pe=function(a){return this.Lt.add(a),this},ot.ik=function(a){this.Lt.remove(a)},ot.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)},ot.cb=function(a,y,x,b,E,te,ne){na(this,"",a,y,x,b,E,te,ne)},ot.g=function(a,y,x,b,E){na(this,"",Vo,a,this,y,x,b,E)},ot.Fs=function(a,y,x,b,E,te){na(this,"",Vo,y,a,x,b,E,te)};function na(a,y,x,b,E,te,ne,ae,fe){ae===void 0&&(ae=null),fe===void 0&&(fe=null);var _e=new Go;_e.model=a,_e.change=x,_e.modelChange=y,_e.propertyName=b,_e.object=E,_e.oldValue=te,_e.oldParam=ae,_e.newValue=ne,_e.newParam=fe,a.ds(_e)}Si.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===Vo){var x=a.object,b=a.propertyName,E=a.I(y);b===this.nodeKeyProperty&&this.lb(x)&&(y=a.I(!y),y!==void 0&&this.kb.remove(y),E!==void 0&&this.kb.add(E,x)),$o(x,b,E)}else a.change===vs?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,qt(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&qn(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&On(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!on(b)&&a.propertyName&&(b=Os(a.object,a.propertyName)),on(b)&&typeof x=="number"&&(a=a.newValue,y?qn(b,x):On(b,x,a))):At("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===ds?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,qt(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&On(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&qn(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!on(b)&&a.propertyName&&(b=Os(a.object,a.propertyName)),on(b)&&typeof x=="number"&&(a=a.oldValue,y?On(b,x,a):qn(b,x))):At("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Ka&&At("unknown ChangedEvent: "+a.toString())},Si.prototype.Ea=function(a){return this.undoManager.Ea(a)},Si.prototype.eb=function(a){return this.undoManager.eb(a)},Si.prototype.Kf=function(){return this.undoManager.Kf()},Si.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}},ot=Si.prototype,ot.La=function(a,y){y===void 0&&(y=""),na(this,"SourceChanged",Ka,y,a,null,null)},ot.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Os(a,y),y!==void 0)){if(gd(y))return y;At("Key value for node data "+a+" is not a number or a string: "+y)}}},ot.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=Os(a,x);b!==y&&this.hc(y)===null&&($o(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),na(this,"nodeKey",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else $o(a,x,y)}};function gd(a){return typeof a=="number"||typeof a=="string"}ot.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},ot.hc=function(a){return a===null&&At("Model.findNodeDataForKey:key must not be null"),a!==void 0&&gd(a)?this.kb.I(a):null},ot.$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)}}}}},ot.xf=function(a){a!==null&&(yo(a),this.lb(a)||PS(this,a,!0))};function PS(a,y,x){var b=a.wa(y);(b===void 0||a.kb.I(b)!==y)&&(a.$u(y),b=a.wa(y),b===void 0&&At("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,On(a.Tc,b,y)),na(a,"nodeDataArray",vs,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}ot.Fy=function(a){if(on(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)},ot.cm=function(a){a!==null&&_S(this,a,!0)};function _S(a,y,x){var b=a.wa(y);if(b!==void 0&&a.kb.remove(b),b=null,x){e:if(x=a.Tc,Array.isArray(x))b=x.indexOf(y);else{b=x.length;for(var E=0;E<b;E++)if(x[E]===y){b=E;break e}b=-1}if(0>b)return;qn(a.Tc,b)}na(a,"nodeDataArray",ds,"nodeDataArray",a,y,null,b,null),a.qp(y)}ot.nA=function(a){if(on(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)},ot.$z=function(a){if(a!==this.nodeDataArray&&on(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()}},ot.jp=function(a,y){y!==void 0&&(a=Og(this,a),a instanceof In&&this.Vf.add(y,a))},ot.Lv=function(){},ot.fm=function(){},ot.em=function(){},ot.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)}ot.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},Si.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):p0(this,a,!0),qt(a)&&pr(a),a};function p0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var b=[];for(x=0;x<y.length;x++){var E=p0(a,y[x],a.copiesArrayObjects);b.push(E)}return pr(b),b}if(x&&qt(y)){x=(x=y.constructor)?new x:{},E=a.copiesKey||typeof a.nodeKeyProperty!="string"?null:a.nodeKeyProperty;for(b in y)if(b==="__gohashid")x.__gohashid=void 0;else if(b===E)x[E]=void 0;else{var te=Os(y,b),ne=Ig(a,te);ne==="GraphObject"||ne==="Diagram"||ne==="Layer"||ne==="RowColumnDefinition"||ne==="AnimationManager"||ne==="Tool"||ne==="CommandHandler"||ne==="Layout"||ne==="InputEvent"||ne==="DiagramEvent"||te instanceof Si||te instanceof Fo||te instanceof Bs||te instanceof Go||(te=p0(a,te,!1)),$o(x,b,te)}return pr(x),x}return y instanceof Tt||y instanceof Qn||y instanceof Tn||y instanceof vi||y instanceof Mi?y.copy():y}Si.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 Qt&&(ES=!0,Dn('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Dn(" Is that really your intent?"));var b=Os(a,y);b!==x&&($o(a,y,x),this.Fs(a,y,b,x))},ot=Si.prototype,ot.set=function(a,y,x){this.setDataProperty(a,y,x)},ot.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])}},ot.Ay=function(a,y){this.ts(a,-1,y)},ot.ts=function(a,y,x){0>y&&(y=a.length),On(a,y,x),na(this,"",vs,"",a,null,x,null,y)},ot.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&At("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];qn(a,y),na(this,"",ds,"",a,x,null,y,null)},ot.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Os(a,y),y===void 0))return"";if(typeof y=="string")return y;At("getCategoryForNodeData found a non-string category for "+a+": "+y)},ot.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=Os(a,x);b===void 0&&(b=""),b!==y&&($o(a,x,y),na(this,"nodeCategory",Vo,x,a,b,y))}else $o(a,x,y)}},ot.lm=function(a,y){this.jm(y,this.Ro(a))},ot.Tl=function(){return!1},ot.Wj=function(){return!1},ot.ri=function(){return!1},ot.xs=function(){return!1},ot.Xj=function(){return!1};function hy(){return new Si}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]:Et.go!==void 0&&Et.go[a]?Et.go[a]:null}function Os(a,y){if(!a||!y)return null;try{if(typeof y=="function")var x=y(a);else typeof a.getAttribute=="function"?(x=a.getAttribute(y),x===null&&(x=void 0)):x=a[y]}catch(b){}return x}function $o(a,y,x){if(a&&y)try{typeof y=="function"?y(a,x):typeof a.setAttribute=="function"?a.setAttribute(y,x):a[y]=x}catch(b){}}Je.Object.defineProperties(Si.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===""&&At("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&At("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];qt(E)||At("Model.nodeDataArray must only contain Objects, not: "+E),yo(E)}for(this.Tc=a,b=new Bn,E=0;E<x;E++){var te=a[E],ne=this.wa(te);ne===void 0||this.kb.I(ne)!==null?b.add(te):this.kb.add(ne,te)}for(b=b.iterator;b.next();)E=b.value,this.$u(E),te=this.wa(E),te!==void 0&&this.kb.add(te,E);for(na(this,"nodeDataArray",Vo,"nodeDataArray",this,y,a),y=0;y<x;y++)b=a[y],this.fm(b),this.em(b);Array.isArray(a)||(this.isReadOnly=!0)}}},copyNodeDataFunction:{get:function(){return this.Bk},set:function(a){var y=this.Bk;y!==a&&(this.Bk=a,this.g("copyNodeDataFunction",y,a))}},copiesArrays:{get:function(){return this.Km},set:function(a){var y=this.Km;y!==a&&(this.Km=a,this.g("copiesArrays",y,a))}},copiesArrayObjects:{get:function(){return this.Jm},set:function(a){var y=this.Jm;y!==a&&(this.Jm=a,this.g("copiesArrayObjects",y,a))}},copiesKey:{get:function(){return this.Mm},set:function(a){var y=this.Mm;y!==a&&(this.Mm=a,this.g("copiesKey",y,a))}},afterCopyFunction:{get:function(){return this.xm},set:function(a){var y=this.xm;y!==a&&(this.xm=a,this.g("afterCopyFunction",y,a))}},nodeCategoryProperty:{get:function(){return this.lj},set:function(a){var y=this.lj;y!==a&&(this.lj=a,this.g("nodeCategoryProperty",y,a))}},type:{get:function(){return"Model"}}}),Si.prototype.setCategoryForNodeData=Si.prototype.jm,Si.prototype.getCategoryForNodeData=Si.prototype.Ro,Si.prototype.removeArrayItem=Si.prototype.ov,Si.prototype.insertArrayItem=Si.prototype.ts,Si.prototype.addArrayItem=Si.prototype.Ay,Si.prototype.assignAllDataProperties=Si.prototype.Do,Si.prototype.set=Si.prototype.set,Si.prototype.clearUnresolvedReferences=Si.prototype.Qy,Si.prototype.mergeNodeDataArray=Si.prototype.$z,Si.prototype.removeNodeDataCollection=Si.prototype.nA,Si.prototype.removeNodeData=Si.prototype.cm,Si.prototype.addNodeDataCollection=Si.prototype.Fy,Si.prototype.addNodeData=Si.prototype.xf,Si.prototype.makeNodeDataKeyUnique=Si.prototype.$u,Si.prototype.findNodeDataForKey=Si.prototype.hc,Si.prototype.containsNodeData=Si.prototype.lb,Si.prototype.setKeyForNodeData=Si.prototype.km,Si.prototype.getKeyForNodeData=Si.prototype.wa,Si.prototype.updateTargetBindings=Si.prototype.La,Si.prototype.commit=Si.prototype.commit,Si.prototype.rollbackTransaction=Si.prototype.Kf,Si.prototype.commitTransaction=Si.prototype.eb,Si.prototype.startTransaction=Si.prototype.Ea,Si.prototype.raiseDataChanged=Si.prototype.Fs,Si.prototype.raiseChanged=Si.prototype.g,Si.prototype.raiseChangedEvent=Si.prototype.cb,Si.prototype.removeChangedListener=Si.prototype.ik,Si.prototype.addChangedListener=Si.prototype.Pe,Si.prototype.writeJsonValue=Si.prototype.sm,Si.prototype.replaceJsonObjects=Si.prototype.dm,Si.prototype.applyIncrementalJSON=Si.prototype.Ky,Si.prototype.applyIncrementalJson=Si.prototype.Zw,Si.prototype.toJSON=Si.prototype.toJSON,Si.prototype.toJson=Si.prototype.np,Si.prototype.toIncrementalJSON=Si.prototype.yA,Si.prototype.toIncrementalJson=Si.prototype.$x,Si.prototype.toIncrementalData=Si.prototype.xA,Si.prototype.clear=Si.prototype.clear;var ES=!1,Xu={};Si.className="Model",Si.fromJSON=Si.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=Et.JSON.parse(a)}catch(te){}else typeof a=="object"?x=a:At("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=Et[b])),typeof E=="function"&&(a=new E)}catch(te){}a===null||a instanceof Si?y=a:At("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=Si.constructGraphLinksModel()),y.gp(x),y.kv(x),y},Si.safePropertyValue=Os,Si.safePropertySet=$o,Xu.Brush=fo,Xu.ChangedEvent=Go,Xu.Geometry=Yn,Xu.Margin=Mi,Xu.Panel=Gn,Xu.Point=Tt,Xu.Rect=Tn,Xu.Size=Qn,Xu.Spot=vi,Xu.Transaction=Bs,Xu.UndoManager=Fo;function Hs(a,y,x,b){pr(this),this._isFrozen=!1,a===void 0&&(a=""),y===void 0&&(y=a),x===void 0&&(x=null),this.j=-1,this.xd=null,this.xl=a,this.wl=this.to=0,this.Cr=null,this.wn=!1,this.sl=y,this.Im=x,b===void 0?(this.el=MS,this.wk=null):(this.el=Dg,this.wk=b),this.st=new In}Hs.prototype.copy=function(){var a=new Hs;return a.xl=this.xl,a.to=this.to,a.wl=this.wl,a.Cr=this.Cr,a.wn=this.wn,a.sl=this.sl,a.Im=this.Im,a.el=this.el,a.wk=this.wk,a},ot=Hs.prototype,ot.qb=function(a){a.classType===Hs&&(this.mode=a)},ot.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},ot.freeze=function(){return this._isFrozen=!0,this},ot.ka=function(){return this._isFrozen=!1,this},ot.Kx=function(a){return a===void 0&&(a=null),this.mode=Dg,this.backConverter=a,this},ot.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},ot.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)}ot.Mv=function(a,y,x){var b=this.sl;if(x===void 0||b===""||b===x){x=this.xl;var E=this.Im;if(E===null&&x==="")Dn("Binding error: target property is the empty string: "+this.toString());else{var te=y;if(b!==""&&(te=Os(y,b)),te!==void 0)if(E===null)x!==""&&$o(a,x,te);else try{if(x!==""){var ne=E(te,a);$o(a,x,ne)}else E(te,a)}catch(ae){}}}},ot.sp=function(a,y,x,b){if(this.el===Dg){var E=this.xl;if(x===void 0||E===x){x=this.sl;var te=this.wk,ne=a;if(E!==""&&(ne=Os(a,E)),ne!==void 0&&!this.st.contains(a))try{this.st.add(a);var ae=b!==null?b.diagram:null,fe=ae!==null?ae.model:null;if(te===null){if(x!=="")fe!==null?fe.setDataProperty(y,x,ne):$o(y,x,ne);else if(fe!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var _e=b.itemIndex,Me=b.panel.itemArray;fe.ov(Me,_e),fe.ts(Me,_e,ne)}}else try{if(x!==""){var Fe=te(ne,y,fe);fe!==null?fe.setDataProperty(y,x,Fe):$o(y,x,Fe)}else{var Ye=te(ne,y,fe);if(Ye!==void 0&&fe!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var tt=b.itemIndex,st=b.panel.itemArray;fe.ov(st,tt),fe.ts(st,tt,Ye)}}}catch(pt){}}finally{this.st.remove(a)}}}},Je.Object.defineProperties(Hs.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&an(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&an(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&an(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&an(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&an(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&an(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&an(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&an(this),this.el=a}}}),Hs.prototype.updateSource=Hs.prototype.sp,Hs.prototype.updateTarget=Hs.prototype.Mv,Hs.prototype.ofModel=Hs.prototype.dA,Hs.prototype.ofObject=Hs.prototype.cp,Hs.prototype.makeTwoWay=Hs.prototype.Kx;var Ox="Binding",MS=new _n(Hs,"OneWay",1),Dg=new _n(Hs,"TwoWay",2);Hs.className="Binding",Hs.parseEnum=function(a,y){return function(x){return x=Jn(a,x),x===null?y:x}},Hs.toString=hi,Hs.OneWay=MS,Hs.TwoWay=Dg;function jr(a,y,x){Si.call(this),this.Vv=`,
|
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
|
"removedLinkKeys": `,this.md=[],this.$f=new In,this.wb=new ci,this.Jh="",this.Ri=this.Ak=this.cl=null,this.lf="from",this.mf="to",this.fj=this.ej="",this.dj="category",this.je="",this.jl="isGroup",this.Je="group",this.Lm=!1,y!==void 0&&(this.linkDataArray=y),a!==void 0&&(on(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}nt(jr,Si),jr.constructGraphLinksModel=Si.constructGraphLinksModel,jr.prototype.cloneProtected=function(a){Si.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},ot=jr.prototype,ot.clear=function(){Si.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},ot.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" GraphLinksModel";if(0<a){y+=`
|
|
|
node data:`,a=this.nodeDataArray;var x=a.length,b;for(b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+hi(E)}for(y+=`
|
|
|
link data:`,a=this.linkDataArray,x=a.length,b=0;b<x;b++)E=a[b],y+=" "+su(this,E,!0)+"-->"+su(this,E,!1)}return y},ot.Qv=function(a,y){this.linkKeyProperty===""&&At("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=Si.prototype.Qv.call(this,a,y),b=this,E=new In,te=new In,ne=new In,ae=this.vh;a.changes.each(function(Me){Me.model===b&&(Me.modelChange==="linkDataArray"?Me.change===vs?E.add(Me.newValue):Me.change===ds&&ne.add(Me.oldValue):b.Jc(Me.object)?te.add(Me.object):Me.object!==null&&(Me.object!==null&&ae&&ae.contains(Me.object)?ae.get(Me.object).each(function(Fe){b.Jc(Fe)&&te.add(Fe)}):Me.object instanceof Si||b.lb(Me.object)||TS(b,Me.object).each(function(Fe){te.add(Fe)})))});var fe=this.il;fe.clear(),E.each(function(Me){fe.add(b.Ac(Me)),y||te.add(Me)});var _e=this.kl;return _e.clear(),ne.each(function(Me){_e.add(b.Ac(Me)),y&&te.add(Me)}),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},ot.rm=function(){var a=Si.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},ot.gp=function(a){Si.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)},ot.Rv=function(){var a=Si.prototype.Rv.call(this),y=`,
|
|
|
"linkDataArray": `+pd(this,this.linkDataArray,!0);return a+y},ot.kv=function(a){Si.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}ot.Pv=function(a,y){this.linkKeyProperty===""&&At("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=Si.prototype.Pv.call(this,a,y),b=this,E=new In,te=new In,ne=new In,ae=this.vh;a.changes.each(function(Me){Me.model===b&&(Me.modelChange==="linkDataArray"?Me.change===vs?E.add(Me.newValue):Me.change===ds&&ne.add(Me.oldValue):b.Jc(Me.object)?te.add(Me.object):Me.object!==null&&(Me.object!==null&&ae&&ae.contains(Me.object)?ae.get(Me.object).each(function(Fe){b.Jc(Fe)&&te.add(Fe)}):Me.object instanceof Si||b.lb(Me.object)||TS(b,Me.object).each(function(Fe){te.add(Fe)})))});var fe=this.il;fe.clear(),E.each(function(Me){fe.add(b.Ac(Me)),y||te.add(Me)});var _e=this.kl;return _e.clear(),ne.each(function(Me){_e.add(b.Ac(Me)),y&&te.add(Me)}),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},ot.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)&&At("applyIncrementalJson cannot change Model properties"),Si.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===vs){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,qt(a)&&typeof x=="number"&&(b=this.Ac(a),y?(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),b!==void 0&&this.wb.remove(b)):(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),b!==void 0&&this.wb.add(b,a)));return}if(a.modelChange==="linkLabelKeys"){b=this.Ef(a.object),Array.isArray(b)&&typeof x=="number"&&(y?(x=b.indexOf(a.newValue),0<=x&&b.splice(x,1)):0>b.indexOf(a.newValue)&&b.splice(x,0,a.newValue));return}}else if(a.change===ds){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,qt(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}}Si.prototype.changeState.call(this,a,y)}},ot=jr.prototype,ot.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}},ot.yx=function(a){return su(this,a,!0)},ot.wv=function(a,y){Ep(this,a,y,!0)},ot.Bx=function(a){return su(this,a,!1)},ot.Bv=function(a,y){Ep(this,a,y,!1)};function su(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Os(y,a),a!==void 0))){if(gd(a))return a;At((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Ep(a,y,x,b){if(x===null&&(x=void 0),y!==null){var E=b?a.lf:a.mf;if(E!=="")if(x=a.Vl(x),a.Jc(y)){var te=Os(y,E);te!==x&&(hc(a,te,y),$o(y,E,x),a.hc(x)===null&&cc(a,x,y),na(a,b?"linkFromKey":"linkToKey",Vo,E,y,te,x),typeof E=="string"&&a.La(y,E))}else $o(y,E,x)}}ot.zx=function(a){return g0(this,a,!0)},ot.xv=function(a,y){Lp(this,a,y,!0)},ot.Cx=function(a){return g0(this,a,!1)},ot.Cv=function(a,y){Lp(this,a,y,!1)};function g0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=Os(y,a),y===void 0?"":y)}function Lp(a,y,x,b){if(y!==null){var E=b?a.ej:a.fj;if(E!=="")if(a.Jc(y)){var te=Os(y,E);te===void 0&&(te=""),te!==x&&($o(y,E,x),na(a,b?"linkFromPortId":"linkToPortId",Vo,E,y,te,x),typeof E=="string"&&a.La(y,E))}else $o(y,E,x)}}ot.Ef=function(a){if(a===null)return m0;var y=this.je;return y===""?m0:(a=Os(a,y),a===void 0?m0:a)},ot.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=Os(a,x);if(b===void 0&&(b=m0),b!==y){if(Array.isArray(b))for(var E=b.length,te=0;te<E;te++)hc(this,b[te],a);for($o(a,x,y),E=y.length,te=0;te<E;te++){var ne=y[te];this.hc(ne)===null&&cc(this,ne,a)}na(this,"linkLabelKeys",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else $o(a,x,y)}},ot.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Os(a,x);if(b===void 0)x=[],x.push(y),this.Ls(a,x);else if(Array.isArray(b)){var E=b.indexOf(y);0<=E||(E=b.length,b.push(y),this.Jc(a)&&(this.hc(y)===null&&cc(this,y,a),na(this,"linkLabelKeys",vs,x,a,null,y,null,E)))}else At(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},ot.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Os(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(hc(this,y,a),na(this,"linkLabelKeys",ds,x,a,y,null,E,null)))}else b!==void 0&&At(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},ot.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Os(a,y),y!==void 0)){if(gd(y))return y;At("Key value for link data "+a+" is not a number or a string: "+y)}}},ot.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=Os(a,x);b!==y&&this.jh(y)===null&&($o(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),na(this,"linkKey",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},ot.jh=function(a){return a===null&&At("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&gd(a)?this.wb.I(a):null},ot.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)}}}}},ot.Jc=function(a){return a===null?!1:this.$f.contains(a)},ot.fi=function(a){a!==null&&(yo(a),this.Jc(a)||kS(this,a,!0))};function kS(a,y,x){if(a.linkKeyProperty!==""){var b=a.Ac(y);if(b!==void 0&&a.wb.I(b)===y)return;a.Bs(y),b=a.Ac(y),b===void 0&&At("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(b,y)}a.$f.add(y),b=null,x&&(b=a.md.length,a.md.splice(b,0,y)),na(a,"linkDataArray",vs,"linkDataArray",a,null,y,null,b),fy(a,y)}ot.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)},ot.bm=function(a){a!==null&&AS(this,a,!0)};function AS(a,y,x){a.$f.remove(y);var b=a.Ac(y);if(b!==void 0&&a.wb.remove(b),b=null,x){if(b=a.md.indexOf(y),0>b)return;a.md.splice(b,1)}if(na(a,"linkDataArray",ds,"linkDataArray",a,y,null,b,null),x=su(a,y,!0),hc(a,x,y),x=su(a,y,!1),hc(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,te=0;te<E;te++)x=b[te],hc(a,x,y)}ot.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)},ot.Zz=function(a){if(this.linkKeyProperty===""&&At("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&on(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)}ot.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):p0(this,a,!0),qt(a)&&(pr(a),this.lf!==""&&$o(a,this.lf,void 0),this.mf!==""&&$o(a,this.mf,void 0),this.je!==""&&$o(a,this.je,[])),a},ot.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Os(a,y)},ot.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Os(a,y),y!==void 0)){if(gd(y))return y;At("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},ot.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=Os(a,x);b!==y&&(hc(this,b,a),$o(a,x,y),this.hc(y)===null&&cc(this,y,a),na(this,"nodeGroupKey",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},jr.prototype.copyNodeData=function(a){return a===null?null:(a=Si.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Os(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=Os(a,y);b!==x&&($o(a,y,x),this.Fs(a,y,b,x))},ot=jr.prototype,ot.Do=function(a,y){if(y){var x=this.lb(a),b=this.Jc(a),E;for(E in y)E==="__gohashid"||x&&E===this.nodeKeyProperty||x&&E===this.nodeIsGroupProperty&&Os(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},ot.jp=function(a,y){Si.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y);for(x=this.$f.iterator;x.next();){var b=x.value,E=a,te=y;if(su(this,b,!0)===E){var ne=this.lf;$o(b,ne,te),na(this,"linkFromKey",Vo,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)}if(su(this,b,!1)===E&&(ne=this.mf,$o(b,ne,te),na(this,"linkToKey",Vo,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)),ne=this.Ef(b),Array.isArray(ne))for(var ae=ne.length,fe=this.je,_e=0;_e<ae;_e++)ne[_e]===E&&(ne[_e]=te,na(this,"linkLabelKeys",vs,fe,b,E,te,_e,_e))}},ot.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;$o(a,b,x),na(this,"nodeGroupKey",Vo,b,a,y,x),typeof b=="string"&&this.La(a,b)}},ot.Lv=function(){Si.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)fy(this,a[x])},ot.fm=function(a){Si.prototype.fm.call(this,a),a=this.wa(a);var y=Og(this,a);if(y!==null){var x=Hn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;na(this,"nodeGroupKey",Vo,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(su(this,b,!0)===a&&(E=this.lf,na(this,"linkFromKey",Vo,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),su(this,b,!1)===a&&(E=this.mf,na(this,"linkToKey",Vo,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),E=this.Ef(b),Array.isArray(E))for(var te=E.length,ne=this.je,ae=0;ae<te;ae++)E[ae]===a&&(na(this,"linkLabelKeys",vs,ne,b,a,a,ae,ae),x.push(b))}for(y=0;y<x.length;y++)hc(this,a,x[y]);ei(x)}},ot.em=function(a){Si.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&cc(this,y,a)},ot.qp=function(a){Si.prototype.qp.call(this,a);var y=this.lh(a);hc(this,y,a)},ot.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Os(a,y),y===void 0))return"";if(typeof y=="string")return y;At("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=Os(a,x);b===void 0&&(b=""),b!==y&&($o(a,x,y),na(this,"linkCategory",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},jr.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},ot=jr.prototype,ot.lm=function(a,y){Si.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))}ot.Wj=function(){return!0},ot.ri=function(){return!0},ot.xs=function(){return!0},ot.Xj=function(){return!0},Je.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];qt(E)||At("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),yo(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new Bn,E=0;E<x;E++){var te=a[E],ne=this.Ac(te);ne===void 0||this.wb.I(ne)!==null?b.add(te):this.wb.add(ne,te)}for(b=b.iterator;b.next();)E=b.value,this.Bs(E),te=this.Ac(E),te!==void 0&&this.wb.add(te,E)}for(b=new In,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,na(this,"linkDataArray",Vo,"linkDataArray",this,y,a),y=0;y<x;y++)fy(this,a[y])}}},linkKeyProperty:{get:function(){return this.Jh},set:function(a){var y=this.Jh;if(y!==a){this.Jh=a,this.wb.clear();for(var x=this.linkDataArray.length,b=0;b<x;b++){var E=this.linkDataArray[b],te=this.Ac(E);te===void 0&&(this.Bs(E),te=this.Ac(E)),te!==void 0&&this.wb.add(te,E)}this.g("linkKeyProperty",y,a)}}},makeUniqueLinkKeyFunction:{get:function(){return this.cl},set:function(a){var y=this.cl;y!==a&&(this.cl=a,this.g("makeUniqueLinkKeyFunction",y,a))}},copyLinkDataFunction:{get:function(){return this.Ak},set:function(a){var y=this.Ak;y!==a&&(this.Ak=a,this.g("copyLinkDataFunction",y,a))}},nodeIsGroupProperty:{get:function(){return this.jl},set:function(a){var y=this.jl;y!==a&&(this.jl=a,this.g("nodeIsGroupProperty",y,a))}},nodeGroupKeyProperty:{get:function(){return this.Je},set:function(a){var y=this.Je;y!==a&&(this.Je=a,this.g("nodeGroupKeyProperty",y,a))}},Ij:{get:function(){return this.Lm},set:function(a){this.Lm!==a&&(this.Lm=a)}},linkCategoryProperty:{get:function(){return this.dj},set:function(a){var y=this.dj;y!==a&&(this.dj=a,this.g("linkCategoryProperty",y,a))}},type:{get:function(){return"GraphLinksModel"}}}),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,Si.constructGraphLinksModel=Si.constructGraphLinksModel=function(){return new jr},Si.initDiagramModel=hy=function(){return new jr};function ll(a,y){Si.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(on(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}nt(ll,Si),ll.constructGraphLinksModel=Si.constructGraphLinksModel,ll.prototype.cloneProtected=function(a){Si.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},ot=ll.prototype,ot.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" TreeModel";if(0<a){y+=`
|
|
|
node data:`,a=this.nodeDataArray;for(var x=a.length,b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+hi(E)}}return y},ot.rm=function(){var a=Si.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},ot.gp=function(a){Si.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},ot.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&At("applyIncrementalJson cannot change Model properties"),Si.prototype.fp.call(this,a)},ot.Vl=function(a){return a},ot.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Os(a,y),y!==void 0)){if(gd(y))return y;At("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},ot.qe=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Ke;if(x!=="")if(y=this.Vl(y),this.lb(a)){var b=Os(a,x);b!==y&&(hc(this,b,a),$o(a,x,y),this.hc(y)===null&&cc(this,y,a),na(this,"nodeParentKey",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},ot.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Os(a,y),y===void 0)?"":typeof y=="string"?y:(At("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},ll.prototype.getLinkCategoryForData=function(a){return this.ss(a)},ll.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=Os(a,x);b===void 0&&(b=""),b!==y&&($o(a,x,y),na(this,"parentLinkCategory",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},ll.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},ll.prototype.copyNodeData=function(a){return a===null?null:(a=Si.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Os(a,this.Ke)===void 0||$o(a,this.Ke,void 0),a)},ll.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeParentKeyProperty){this.qe(a,x);return}}var b=Os(a,y);b!==x&&($o(a,y,x),this.Fs(a,y,b,x))},ot=ll.prototype,ot.jp=function(a,y){Si.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},ot.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;$o(a,b,x),na(this,"nodeParentKey",Vo,b,a,y,x),typeof b=="string"&&this.La(a,b)}},ot.fm=function(a){Si.prototype.fm.call(this,a),a=this.wa(a);var y=Og(this,a);if(y!==null){var x=Hn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;na(this,"nodeParentKey",Vo,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)hc(this,a,x[y]);ei(x)}},ot.em=function(a){Si.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&cc(this,y,a)},ot.qp=function(a){Si.prototype.qp.call(this,a);var y=this.mh(a);hc(this,y,a)},ot.lm=function(a,y){Si.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},ot.Tl=function(){return!0},ot.xs=function(){return!0},Je.Object.defineProperties(ll.prototype,{nodeParentKeyProperty:{get:function(){return this.Ke},set:function(a){var y=this.Ke;y!==a&&(this.Ke=a,this.g("nodeParentKeyProperty",y,a))}},Jj:{get:function(){return this.Nm},set:function(a){this.Nm!==a&&(this.Nm=a)}},parentLinkCategoryProperty:{get:function(){return this.nj},set:function(a){var y=this.nj;y!==a&&(this.nj=a,this.g("parentLinkCategoryProperty",y,a))}},linkCategoryProperty:{get:function(){return this.parentLinkCategoryProperty},set:function(a){this.parentLinkCategoryProperty=a}},type:{get:function(){return"TreeModel"}}}),ll.prototype.setParentLinkCategoryForNodeData=ll.prototype.Ms,ll.prototype.getParentLinkCategoryForNodeData=ll.prototype.ss,ll.prototype.setParentKeyForNodeData=ll.prototype.qe,ll.prototype.getParentKeyForNodeData=ll.prototype.mh,ll.className="TreeModel",Xu.TreeModel=ll;function hs(a){es.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=Ju,this.Ti=0,this.Zv=new Tt,this.Jp=this.me=0,this.Xr=new jg,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=Ju,this.K=ul,this.nd=Tp,this.hd=oy,this.tf=6,this.Nn=C0,a&&Object.assign(this,a)}nt(hs,es),hs.prototype.cloneProtected=function(a){es.prototype.cloneProtected.call(this,a),a.eo=this.eo,a.Cm=this.Cm,a.ro=this.ro,a.ul=this.ul,a.Rb=this.Rb,a.K=this.K,a.nd=this.nd,a.hd=this.hd,a.tf=this.tf,a.Nn=this.Nn},hs.prototype.qb=function(a){a.classType===hs?a===w0||a===b0||a===S0||a===x0||a===Tp?this.sorting=a:a===sf||a===Mp||a===ul||a===vd?this.direction=a:a===zh||a===md||a===Ju||a===Qu?this.arrangement=a:(a===Df||a===C0)&&(this.nodeDiameterFormula=a):es.prototype.qb.call(this,a)},hs.prototype.createNetwork=function(){return new kp(this)},hs.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin),a=this.network.vertexes,1>=a.count)a.count===1&&(a=a.first(),a.centerX=0,a.centerY=0);else{var y=new Bn;y.addAll(a.iterator),a=new Bn;var x=new Bn,b=this.sort(y),E,te,ne=this.Jp,ae=this.arrangement,fe=this.nodeDiameterFormula,_e=this.radius;(!isFinite(_e)||0>=_e)&&(_e=NaN);var Me=this.aspectRatio;(!isFinite(Me)||0>=Me)&&(Me=1);var Fe=this.startAngle;isFinite(Fe)||(Fe=0);var Ye=this.sweepAngle;if((!isFinite(Ye)||360<Ye||1>Ye)&&(Ye=360),y=this.spacing,isFinite(y)||(y=NaN),ae===Qu&&fe===Df?ae=Ju:ae===Qu&&fe!==Df&&(ae=this.arrangement),(this.direction===sf||this.direction===Mp)&&this.sorting!==Tp){for(fe=0;!(fe>=b.length)&&(a.add(b.M(fe)),!(fe+1>=b.length));fe+=2)x.add(b.M(fe+1));this.direction===sf?(this.arrangement===Qu&&a.reverse(),b=new Bn,b.addAll(a),b.addAll(x)):(this.arrangement===Qu&&x.reverse(),b=new Bn,b.addAll(x),b.addAll(a))}fe=b.length;for(var tt=te=E=0;tt<b.length;tt++){var st=Fe+Ye*te*(this.direction===ul?1:-1)/fe,pt=b.M(tt).diameter;isNaN(pt)&&(pt=yd(b.M(tt),st)),360>Ye&&(tt===0||tt===b.length-1)&&(pt/=2),E+=pt,te++}if(isNaN(_e)||ae===Qu){if(isNaN(y)&&(y=6),ae!==Ju&&ae!==Qu){for(te=-1/0,ne=0;ne<fe;ne++)tt=b.M(ne),E=b.M(ne===fe-1?0:ne+1),isNaN(tt.diameter)&&yd(tt,0),isNaN(E.diameter)&&yd(E,0),te=Math.max(te,(tt.diameter+E.diameter)/2);ne=te+y,ae===zh?_e=(te+y)/(2*Math.PI/fe):_e=v0(this,ne*(360<=Ye?fe:fe-1),Me,Fe*Math.PI/180,Ye*Math.PI/180)}else _e=v0(this,E+(360<=Ye?fe:fe-1)*(ae!==Qu?y:1.6*y),Me,Fe*Math.PI/180,Ye*Math.PI/180);te=_e*Me}else if(te=_e*Me,tt=py(this,_e,te,Fe*Math.PI/180,Ye*Math.PI/180),isNaN(y))(ae===Ju||ae===Qu)&&(y=(tt-E)/(360<=Ye?fe:fe-1));else if(ae===Ju||ae===Qu)tt=(tt-E)/(360<=Ye?fe:fe-1),tt<y?(_e=v0(this,E+y*(360<=Ye?fe:fe-1),Me,Fe*Math.PI/180,Ye*Math.PI/180),te=_e*Me):y=tt;else{for(ne=-1/0,E=0;E<fe;E++)st=b.M(E),pt=b.M(E===fe-1?0:E+1),isNaN(st.diameter)&&yd(st,0),isNaN(pt.diameter)&&yd(pt,0),ne=Math.max(ne,(st.diameter+pt.diameter)/2);ne+=y,E=v0(this,ne*(360<=Ye?fe:fe-1),Me,Fe*Math.PI/180,Ye*Math.PI/180),E>_e?(_e=E,te=_e*Me):ne=tt/(360<=Ye?fe:fe-1)}if(this.kw=ae,this.lc=_e,this.Zm=Me,this.lw=Fe,this.Wp=Ye,this.Ti=y,this.me=te,this.Jp=ne,y=b,b=this.kw,ae=this.lc,_e=this.lw,Me=this.Wp,Fe=this.Ti,Ye=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,Ye,_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,Ye,_e,Fe+(y+fe)/2)/Math.PI;break;case zh:ne=Me/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,Me/2,_e,vd)}switch(b){case md:Fg(this,x,_e+ne,ul);break;case Ju:Bg(this,x,_e+ne,ul);break;case zh:Rg(this,x,Me/2,_e+ne,ul)}}else{switch(b){case md:Fg(this,x,_e,vd);break;case Ju:Bg(this,x,_e,vd);break;case zh:Rg(this,x,Me/2,_e,vd)}switch(b){case md:Fg(this,a,_e+ne,ul);break;case Ju:Bg(this,a,_e+ne,ul);break;case zh:Rg(this,a,Me/2,_e+ne,ul)}}}else switch(b){case md:Fg(this,y,_e,this.direction);break;case Ju:Bg(this,y,_e,this.direction);break;case zh:Rg(this,y,Me,_e,this.direction);break;case Qu:OS(this,y,Me,_e,this.direction)}else OS(this,y,Me,_e-Me/2,ul)}this.updateParts(),this.network=null,this.isValidLayout=!0};function Rg(a,y,x,b,E){var te=a.Wp,ne=a.lc;a=a.me,b=b*Math.PI/180,x=x*Math.PI/180;for(var ae=y.length,fe=0;fe<ae;fe++){var _e=b+(E===ul?fe*x/(360<=te?ae:ae-1):-(fe*x)/ae),Me=y.M(fe),Fe=ne*Math.tan(_e)/a;Fe=Math.sqrt((ne*ne+a*a*Fe*Fe)/(1+Fe*Fe)),Me.centerX=Fe*Math.cos(_e),Me.centerY=Fe*Math.sin(_e),Me.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),Me=y.M(fe===ae-1?0:fe+1),Fe=te*Math.sin(x);_e.centerX=E*Math.cos(x),_e.centerY=Fe,_e.actualAngle=180*x/Math.PI,isNaN(_e.diameter)&&yd(_e,0),isNaN(Me.diameter)&&yd(Me,0),_e=y0(a,E,te,b===ul?x:-x,(_e.diameter+Me.diameter)/2+ne),x+=b===ul?_e:-_e}}function Fg(a,y,x,b){var E=a.lc,te=a.me,ne=a.Jp;x=x*Math.PI/180;for(var ae=y.length,fe=0;fe<ae;fe++){var _e=y.M(fe);_e.centerX=E*Math.cos(x),_e.centerY=te*Math.sin(x),_e.actualAngle=180*x/Math.PI,_e=y0(a,E,te,b===ul?x:-x,ne),x+=b===ul?_e:-_e}}function OS(a,y,x,b,E){var te=a.Wp;if(a.mj=0,a.Xr=new jg,360>x){for(te=b+(E===ul?te:-te);0>te;)te+=360;te%=360,180<te&&(te-=360),te*=Math.PI/180,a.gt=te,DS(a,y,x,b,E)}else IS(a,y,x,b,E);a.Xr.commit(y)}function IS(a,y,x,b,E){var te=a.lc,ne=a.Ti,ae=a.Zm,fe=te*Math.cos(b*Math.PI/180),_e=a.me*Math.sin(b*Math.PI/180),Me=y.Fa();if(Me.length===3)Me[0].centerX=te,Me[0].centerY=0,Me[1].centerX=Me[0].centerX-Me[0].width/2-Me[1].width/2-ne,Me[1].y=Me[0].y,Me[2].centerX=(Me[0].centerX+Me[1].centerX)/2,Me[2].y=Me[0].y-Me[2].height-ne;else if(Me.length===4)Me[0].centerX=te,Me[0].centerY=0,Me[2].centerX=-Me[0].centerX,Me[2].centerY=Me[0].centerY,Me[1].centerX=0,Me[1].y=Math.min(Me[0].y,Me[2].y)-Me[1].height-ne,Me[3].centerX=0,Me[3].y=Math.max(Me[0].y+Me[0].height+ne,Me[2].y+Me[2].height+ne);else{te=Tt.alloc();for(var Fe=0;Fe<Me.length&&(Me[Fe].centerX=fe,Me[Fe].centerY=_e,!(Fe>=Me.length-1));Fe++)RS(a,fe,_e,Me,Fe,E,te)||BS(a,fe,_e,Me,Fe,E,te),fe=te.x,_e=te.y;if(Tt.free(te),a.mj++,!(23<a.mj)){fe=Me[0].centerX,_e=Me[0].centerY,te=Me[Me.length-1].centerX,Fe=Me[Me.length-1].centerY;var Ye=Math.abs(fe-te)-((Me[0].width+Me[Me.length-1].width)/2+ne),tt=Math.abs(_e-Fe)-((Me[0].height+Me[Me.length-1].height)/2+ne);ne=0,1>Math.abs(tt)?Math.abs(fe-te)<(Me[0].width+Me[Me.length-1].width)/2&&(ne=0):ne=0<tt?tt:1>Math.abs(Ye)?0:Ye,fe=Math.abs(te)>Math.abs(Fe)?0<te!=_e>Fe:0<Fe!=fe<te,(fe=E===ul?fe:!fe)&&(ne=-Math.abs(ne),ne=Math.min(ne,-Me[Me.length-1].width),ne=Math.min(ne,-Me[Me.length-1].height)),a.Xr.compare(ne,Me),1<Math.abs(ne)&&(a.lc=8>a.mj?a.lc-ne/(2*Math.PI):5>Me.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),Me=Tt.alloc(),Fe=y.Fa(),Ye=0;Ye<Fe.length&&(Fe[Ye].centerX=fe,Fe[Ye].centerY=_e,!(Ye>=Fe.length-1));Ye++)RS(a,fe,_e,Fe,Ye,E,Me)||BS(a,fe,_e,Fe,Ye,E,Me),fe=Me.x,_e=Me.y;if(Tt.free(Me),a.mj++,!(23<a.mj)){if(fe=Math.atan2(_e,fe),fe=E===ul?a.gt-fe:fe-a.gt,fe=Math.abs(fe)<Math.abs(fe-2*Math.PI)?fe:fe-2*Math.PI,te=fe*(te+ne)/2,ne=a.Xr,Math.abs(te)<Math.abs(ne.Pl))for(ne.Pl=te,ne.mk=[],ne.tm=[],fe=0;fe<Fe.length;fe++)ne.mk[fe]=Fe[fe].bounds.x,ne.tm[fe]=Fe[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 Me=!1;if(0<=x!=(te===ul)){if(te=y+a,te>ae){if(te=y-a,te<-ae)return ne.x=te,ne.y=_e,!1;Me=!0}}else if(te=y-a,te<-ae){if(te=y+a,te>ae)return ne.x=te,ne.y=_e,!1;Me=!0}return _e=Math.sqrt(1-Math.min(1,te*te/(ae*ae)))*fe,0>x!==Me&&(_e=-_e),Math.abs(x-_e)>(b[E].height+b[E+1].height)/2?(ne.x=te,ne.y=_e,!1):(ne.x=te,ne.y=_e,!0)}function BS(a,y,x,b,E,te,ne){var ae=a.lc,fe=a.me,_e=0;if(a=(b[E].height+b[E+1].height)/2+a.Ti,b=!1,0<=y!=(te===ul)){if(te=x-a,te<-fe){if(te=x+a,te>fe){ne.x=_e,ne.y=te;return}b=!0}}else if(te=x+a,te>fe){if(te=x-a,te<-fe){ne.x=_e,ne.y=te;return}b=!0}_e=Math.sqrt(1-Math.min(1,te*te/(fe*fe)))*ae,0>y!==b&&(_e=-_e),ne.x=_e,ne.y=te}hs.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},hs.prototype.commitNodes=function(){var a=this.group!==null&&this.group.placeholder!==null&&this.group.isSubGraphExpanded,y=a?this.group.location.copy():null,x=this.actualCenter;a?x=new Tt(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;E.x+=x.x,E.y+=x.y,E.commit()}a&&(this.group.Va(),a=this.group.position.copy(),x=this.group.location.copy(),y=y.re(x.re(a)),this.group.move(y),this.Zv=y.re(a))},hs.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function py(a,y,x,b,E){var te=a.ty;if(.001>Math.abs(a.Zm-1))return b!==void 0&&E!==void 0?E*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var ne=0,ae=b!==void 0&&E!==void 0?E/(te+1):Math.PI/(2*(te+1)),fe=0,_e=0;_e<=te;_e++){b!==void 0&&E!==void 0?fe=b+_e*E/te:fe=_e*Math.PI/(2*te);var Me=Math.sin(fe);ne+=Math.sqrt(1-a*a*Me*Me)*ae}return b!==void 0&&E!==void 0?(y>x?y:x)*ne:4*(y>x?y:x)*ne}function v0(a,y,x,b,E){return y/(b!==void 0&&E!==void 0?py(a,1,x,b,E):py(a,1,x))}function y0(a,y,x,b,E){if(.001>Math.abs(a.Zm-1))return E/y;var te=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,ne=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(b+=Math.PI/2);for(var ae=0;;ae++){var fe=Math.sin(b+ae*a);if(ne+=(y>x?y:x)*Math.sqrt(1-te*te*fe*fe)*a,ne>=E)return ae*a}}hs.prototype.sort=function(a){switch(this.sorting){case S0:break;case x0:a.reverse();break;case w0:a.sort(this.comparer);break;case b0:a.sort(this.comparer),a.reverse();break;case Tp:return this.ak(Ix(a));default:At("Invalid sorting type.")}return a};function Ix(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new Bn;for(var b=0;b<a.length;b++){var E=-1,te=-1;if(b===0)for(var ne=0;ne<a.length;ne++){var ae=a.M(ne).edgesCount;ae>E&&(E=ae,te=ne)}else for(ne=0;ne<a.length;ne++)ae=y[ne],ae>E&&(E=ae,te=ne);for(x.add(a.M(te)),y[te]=-1,te=a.M(te),ne=te.sourceEdges;ne.next();)E=a.indexOf(ne.value.fromVertex),0>E||0<=y[E]&&y[E]++;for(te=te.destinationEdges;te.next();)E=a.indexOf(te.value.toVertex),0>E||0<=y[E]&&y[E]++}return x}hs.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var b=a.M(x);y[x]=[];for(var E,te=b.destinationEdges;te.next();)E=a.indexOf(te.value.toVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E);for(b=b.sourceEdges;b.next();)E=a.indexOf(b.value.fromVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E)}for(te=[],x=0;x<y.length;x++)te[x]=0;x=[];var ne=[],ae=[];b=[],E=new Bn;for(var fe=0,_e=0;_e<y.length;_e++){var Me=y[_e].length;if(Me===1)b.push(_e);else if(Me===0)E.add(a.M(_e));else{if(fe===0)x.push(_e);else{for(var Fe=Me=1/0,Ye=-1,tt=[],st=0;st<x.length;st++)0>y[x[st]].indexOf(x[st===x.length-1?0:st+1])&&tt.push(st===x.length-1?0:st+1);if(tt.length===0)for(st=0;st<x.length;st++)tt.push(st);for(st=0;st<tt.length;st++){for(var pt=tt[st],It=y[_e],Mt=0,Ht=0;Ht<ne.length;Ht++){var Gt=te[ne[Ht]],Zt=te[ae[Ht]];if(Gt<Zt){var Xt=Gt;Gt=Zt}else Xt=Zt;if(Xt<pt&&pt<=Gt)for(Zt=0;Zt<It.length;Zt++){var pn=It[Zt];0>x.indexOf(pn)||Xt<te[pn]&&te[pn]<Gt||Xt===te[pn]||Gt===te[pn]||Mt++}else for(Zt=0;Zt<It.length;Zt++)pn=It[Zt],0>x.indexOf(pn)||Xt<te[pn]&&te[pn]<Gt&&Xt!==te[pn]&&Gt!==te[pn]&&Mt++}for(It=Mt,Ht=Mt=0;Ht<y[_e].length;Ht++)Xt=x.indexOf(y[_e][Ht]),0<=Xt&&(Xt=Math.abs(pt-(Xt>=pt?Xt+1:Xt)),Mt+=Xt<x.length+1-Xt?Xt:x.length+1-Xt);for(Ht=0;Ht<ne.length;Ht++)Xt=te[ne[Ht]],Gt=te[ae[Ht]],Xt>=pt&&Xt++,Gt>=pt&&Gt++,Xt>Gt&&(Zt=Gt,Gt=Xt,Xt=Zt),Gt-Xt<(x.length+2)/2==(Xt<pt&&pt<=Gt)&&Mt++;(It<Me||It===Me&&Mt<Fe)&&(Me=It,Fe=Mt,Ye=pt)}for(x.splice(Ye,0,_e),Me=0;Me<x.length;Me++)te[x[Me]]=Me;for(Me=0;Me<y[_e].length;Me++)Fe=y[_e][Me],0<=x.indexOf(Fe)&&(ne.push(_e),ae.push(Fe))}fe++}}for(ne=x.length;;){for(te=!0,ae=0;ae<b.length;ae++)if(fe=b[ae],_e=y[fe][0],Me=x.indexOf(_e),0<=Me){for(Ye=Fe=0;Ye<y[_e].length;Ye++)tt=x.indexOf(y[_e][Ye]),0>tt||tt===Me||(st=tt>Me?tt-Me:Me-tt,Fe+=tt<Me!=st>ne-st?1:-1);x.splice(0>Fe?Me:Me+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},Je.Object.defineProperties(hs.prototype,{radius:{get:function(){return this.eo},set:function(a){this.eo!==a&&(0<a||isNaN(a))&&(this.eo=a,this.C())}},aspectRatio:{get:function(){return this.Cm},set:function(a){this.Cm!==a&&0<a&&(this.Cm=a,this.C())}},startAngle:{get:function(){return this.ro},set:function(a){this.ro!==a&&(this.ro=a,this.C())}},sweepAngle:{get:function(){return this.ul},set:function(a){this.ul!==a&&(0<a&&360>=a?this.ul=a:this.ul=360,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==Qu&&a!==Ju&&a!==md&&a!==zh||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==ul&&a!==vd&&a!==sf&&a!==Mp||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==S0&&a!==x0&&a!==w0&&!b0&&a!==Tp||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}},spacing:{get:function(){return this.tf},set:function(a){this.tf!==a&&(this.tf=a,this.C())}},nodeDiameterFormula:{get:function(){return this.Nn},set:function(a){this.Nn===a||a!==C0&&a!==Df||(this.Nn=a,this.C())}},actualXRadius:{get:function(){return this.lc}},actualYRadius:{get:function(){return this.me}},actualSpacing:{get:function(){return this.Ti}},actualCenter:{get:function(){return this.Zv}}});var Ju=new _n(hs,"ConstantSpacing",0),md=new _n(hs,"ConstantDistance",1),zh=new _n(hs,"ConstantAngle",2),Qu=new _n(hs,"Packed",3),ul=new _n(hs,"Clockwise",4),vd=new _n(hs,"Counterclockwise",5),sf=new _n(hs,"BidirectionalLeft",6),Mp=new _n(hs,"BidirectionalRight",7),S0=new _n(hs,"Forwards",8),x0=new _n(hs,"Reverse",9),w0=new _n(hs,"Ascending",10),b0=new _n(hs,"Descending",11),Tp=new _n(hs,"Optimized",12),C0=new _n(hs,"Pythagorean",13),Df=new _n(hs,"Circular",14);hs.className="CircularLayout",hs.ConstantSpacing=Ju,hs.ConstantDistance=md,hs.ConstantAngle=zh,hs.Packed=Qu,hs.Clockwise=ul,hs.Counterclockwise=vd,hs.BidirectionalLeft=sf,hs.BidirectionalRight=Mp,hs.Forwards=S0,hs.Reverse=x0,hs.Ascending=w0,hs.Descending=b0,hs.Optimized=Tp,hs.Pythagorean=C0,hs.Circular=Df;function jg(){this.Pl=-1/0,this.tm=this.mk=null}jg.prototype.compare=function(a,y){if(0<a&&0>this.Pl||Math.abs(a)<Math.abs(this.Pl)&&!(0>a&&0<this.Pl))for(this.Pl=a,this.mk=[],this.tm=[],a=0;a<y.length;a++)this.mk[a]=y[a].bounds.x,this.tm[a]=y[a].bounds.y},jg.prototype.commit=function(a){if(this.mk!==null&&this.tm!==null)for(var y=0;y<this.mk.length;y++){var x=a.M(y);x.x=this.mk[y],x.y=this.tm[y]}},jg.className="VertexArrangement";function kp(a){To.call(this,a)}nt(kp,To),kp.prototype.createVertex=function(){return new zg(this)},kp.prototype.createEdge=function(){return new P0(this)},kp.className="CircularNetwork";function zg(a){aa.call(this,a),this.u=this.Si=NaN}nt(zg,aa);function yd(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===Qu)if(x.nodeDiameterFormula===Df)a.Si=Math.max(a.width,a.height);else{if(x=Math.abs(Math.sin(y)),y=Math.abs(Math.cos(y)),x===0)return a.width;if(y===0)return a.height;a.Si=Math.min(a.height/x,a.width/y)}else a.Si=x.nodeDiameterFormula===Df?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}Je.Object.defineProperties(zg.prototype,{diameter:{get:function(){return this.Si},set:function(a){this.Si!==a&&(this.Si=a)}},actualAngle:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}}}),zg.className="CircularVertex";function P0(a){Gl.call(this,a)}nt(P0,Gl),P0.className="CircularEdge";function Aa(a){es.call(this),this.ah=null,this.An=0,this.$d=new Qn(100,100).freeze(),this.Bm=!1,this.sf=!0,this.td=!1,this.dl=100,this.$m=1,this.Zf=1e3,this.In=10,this.fo=Math,this.Hk=.05,this.Gk=50,this.Ek=150,this.Fk=0,this.Vm=10,this.Um=5,a&&Object.assign(this,a)}nt(Aa,es),Aa.prototype.cloneProtected=function(a){es.prototype.cloneProtected.call(this,a),a.$d.assign(this.$d),a.Bm=this.Bm,a.sf=this.sf,a.td=this.td,a.dl=this.dl,a.$m=this.$m,a.Zf=this.Zf,a.In=this.In,a.fo=this.fo,a.Hk=this.Hk,a.Gk=this.Gk,a.Ek=this.Ek,a.Fk=this.Fk,a.Vm=this.Vm,a.Um=this.Um},Aa.prototype.createNetwork=function(){return new Rf(this)},Aa.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),a=this.maxIterations,0<this.network.vertexes.count){this.network.Ko();for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;x.charge=this.electricalCharge(x),x.mass=this.gravitationalMass(x)}for(y=this.network.edges.iterator;y.next();)x=y.value,x.stiffness=this.springStiffness(x),x.length=this.springLength(x);if(this.Cu(),this.An=0,this.needsClusterLayout()){y=this.network,x=y.Zx();for(var b=x.iterator;b.next();){this.network=b.value;for(var E=this.network.vertexes.iterator;E.next();){var te=E.value;te.Vd=te.vertexes.count,te.sh=1,te.Hj=null,te.We=null}FS(this,0,a)}this.network=y;var ne=b=x.iterator;b=this.arrangementSpacing;var ae=ne.count,fe=!0;te=E=0;for(var _e=Hn(),Me=0;Me<ae+y.vertexes.count+2;Me++)_e[Me]=null;ae=0,ne.reset();for(var Fe=Tn.alloc();ne.next();)if(Me=ne.value,this.computeBounds(Me,Fe),fe)fe=!1,E=Fe.x+Fe.width/2,te=Fe.y+Fe.height/2,_e[0]=new Tt(Fe.x+Fe.width+b.width,Fe.y),_e[1]=new Tt(Fe.x,Fe.y+Fe.height+b.height),ae=2;else{var Ye=jS(_e,ae,E,te,Fe.width,Fe.height,b),tt=_e[Ye],st=new Tt(tt.x+Fe.width+b.width,tt.y),pt=new Tt(tt.x,tt.y+Fe.height+b.height);for(Ye+1<ae&&_e.splice(Ye+1,0,null),_e[Ye]=st,_e[Ye+1]=pt,ae++,Ye=tt.x-Fe.x,tt=tt.y-Fe.y,Me=Me.vertexes.iterator;Me.next();)st=Me.value,st.centerX+=Ye,st.centerY+=tt}for(Tn.free(Fe),Me=y.vertexes.iterator;Me.next();)ne=Me.value,Ye=ne.bounds,2>ae?(E=Ye.x+Ye.width/2,te=Ye.y+Ye.height/2,_e[0]=new Tt(Ye.x+Ye.width+b.width,Ye.y),_e[1]=new Tt(Ye.x,Ye.y+Ye.height+b.height),ae=2):(fe=jS(_e,ae,E,te,Ye.width,Ye.height,b),Fe=_e[fe],tt=new Tt(Fe.x+Ye.width+b.width,Fe.y),Ye=new Tt(Fe.x,Fe.y+Ye.height+b.height),fe+1<ae&&_e.splice(fe+1,0,null),_e[fe]=tt,_e[fe+1]=Ye,ae++,ne.centerX=Fe.x+ne.width/2,ne.centerY=Fe.y+ne.height/2);for(ei(_e),b=x.iterator;b.next();){for(x=b.value,E=x.vertexes.iterator;E.next();)y.dh(E.value);for(x=x.edges.iterator;x.next();)y.Bo(x.value)}}HS(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},Aa.prototype.needsClusterLayout=function(){if(3>this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,b=this.network.vertexes.iterator;b.next();){if(b.value.bounds.Yc(x)&&(a++,2<a))return!0;if(10<y)break;y++}return!1},Aa.prototype.computeBounds=function(a,y){var x=!0;for(a=a.vertexes.iterator;a.next();){var b=a.value;x?(x=!1,y.set(b.bounds)):y.ed(b.bounds)}return y};function FS(a,y,x){if(Dx(a,y)){var b=a.Zf;a.Zf*=1+1/(y+1);var E=Rx(a,y),te=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=te,FS(a,y+1,x),HS(a,te),Bx(a,E),y=E.vertexes.Fa(),y.sort(function(ne,ae){return ne===null||ae===null||ne===ae?0:ae.Vd-ne.Vd}),x=0;x<y.length;x++)Fx(a,y[x]);a.Zf=b}}function Dx(a,y){if(10<y||3>a.network.vertexes.count)return!1;for(a.ah=a.network.vertexes.Fa(),a=a.ah,a.sort(function(x,b){return x===null||b===null||x===b?0:b.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1<a.length-y}function Rx(a,y){for(var x=a.network,b=new Rf(a),E=0;E<a.ah.length;E++){var te=a.ah[E];if(1<te.Vd){b.dh(te);var ne=new US;ne.Rs=te.Vd,ne.Ss=te.width,ne.Qs=te.height,ne.Sv=te.focus.x,ne.Tv=te.focus.y,te.We===null&&(te.We=new Bn),te.We.add(ne),te.sv=te.We.count-1}else break}for(te=x.edges.iterator;te.next();){var ae=te.value;E=ae.fromVertex,ne=ae.toVertex,E.network===b&&ne.network===b?b.Bo(ae):E.network===b?(ae=E.Hj,ae===null&&(ae=new Bn,E.Hj=ae),ae.add(ne),E.Vd--,E.sh+=ne.sh):ne.network===b&&(ae=ne.Hj,ae===null&&(ae=new Bn,ne.Hj=ae),ae.add(E),ne.Vd--,ne.sh+=E.sh)}for(E=b.edges.iterator;E.next();)te=E.value,te.length*=Math.max(1,nn.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,Me=fe.count-ne;Me<fe.count;Me++){var Fe=fe.M(Me),Ye=null;for(te=Fe.edges.iterator;te.next();){var tt=te.value;if(tt.Ax(Fe)===E){Ye=tt;break}}Ye!==null&&(_e+=Ye.length,ae+=Fe.width*Fe.height)}te=E.centerX,fe=E.centerY,Me=E.width,Fe=E.height,Ye=E.focus,tt=Me*Fe,1>tt&&(tt=1),ae=nn.sqrt((ae+tt+_e*_e*4/(ne*ne))/tt),ne=(ae-1)*Me/2,ae=(ae-1)*Fe/2,E.bounds=new Tn(te-Ye.x-ne,fe-Ye.y-ae,Me+2*ne,Fe+2*ae),E.focus=new Tt(Ye.x+ne,Ye.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 Tt(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=nn.sqrt(te*te+ne*ne)/2;for(var ae=!1,fe=ne=0,_e=0,Me=y.vertexes.iterator;Me.next();){var Fe=Me.value;1>=Fe.Vd?fe++:(ae=!0,_e++,ne+=Math.atan2(y.centerY-Fe.centerY,y.centerX-Fe.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(tt,st){return tt===null||st===null||tt===st?0:st.width*st.height-tt.width*tt.height}),ae=fe%2===0?0:1,x=x.iterator;x.next();)if(fe=x.value,!(1<fe.Vd||a.isFixed(fe))){for(Me=null,Fe=fe.edges.iterator;Fe.next();){Me=Fe.value;break}Fe=fe.width;var Ye=fe.height;Fe=nn.sqrt(Fe*Fe+Ye*Ye)/2,Me=te+Me.length+Fe,Fe=ne+(y*(ae/2>>1)+_e)*(ae%2===0?1:-1),fe.centerX=b+Me*Math.cos(Fe),fe.centerY=E+Me*Math.sin(Fe),ae++}}}}function jS(a,y,x,b,E,te,ne){var ae=9e19,fe=-1,_e=0;e:for(;_e<y;_e++){var Me=a[_e],Fe=Me.x-x,Ye=Me.y-b;if(Fe=Fe*Fe+Ye*Ye,Fe<ae){for(Ye=_e-1;0<=Ye;Ye--)if(a[Ye].y>Me.y&&a[Ye].x-Me.x<E+ne.width)continue e;for(Ye=_e+1;Ye<y;Ye++)if(a[Ye].x>Me.x&&a[Ye].y-Me.y<te+ne.height)continue e;fe=_e,ae=Fe}}return fe}Aa.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Aa.prototype.addComments=function(a){var y=a.node;if(y!==null)for(y=y.Mu();y.next();){var x=y.value;if(x.category==="Comment"&&x.isVisible()){var b=this.network.ki(x);b===null&&(b=this.network.Bl(x)),b.charge=this.defaultCommentElectricalCharge,x=null;for(var E=b.destinationEdges;E.next();){var te=E.value;if(te.toVertex===a){x=te;break}}if(x===null){for(E=b.sourceEdges;E.next();)if(te=E.value,te.fromVertex===a){x=te;break}}x===null&&(x=this.network.Zj(a,b,null)),x.length=this.defaultCommentSpringLength}}};function zS(a,y){var x=a.bounds,b=x.x;a=x.y;var E=x.width;x=x.height;var te=y.bounds,ne=te.x;y=te.y;var ae=te.width;return te=te.height,b+E<ne?a>y+te?(x=b+E-ne,a=a-y-te,nn.sqrt(x*x+a*a)):a+x<y?(b=b+E-ne,a=a+x-y,nn.sqrt(b*b+a*a)):ne-(b+E):b>ne+ae?a>y+te?(x=b-ne-ae,a=a-y-te,nn.sqrt(x*x+a*a)):a+x<y?(b=b-ne-ae,a=a+x-y,nn.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(pt,It){return pt===null||It===null||pt===It?0:pt.centerX-It.centerX}):y.sort(function(pt,It){return pt===null||It===null||pt===It?0:pt.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 Me=b.y+ae.y;b=ne.charge*a.electricalFieldX(fe,Me),_e=ne.charge*a.electricalFieldY(fe,Me),b+=ne.mass*a.gravitationalFieldX(fe,Me),_e+=ne.mass*a.gravitationalFieldY(fe,Me),ne.forceX+=b,ne.forceY+=_e;for(var Fe=te+1;Fe<y.length;Fe++){var Ye=y[Fe];if(Ye!==ne){b=Ye.bounds,ae=Ye.focus,_e=b.x+ae.x;var tt=b.y+ae.y;if(fe-_e>x||_e-fe>x){if(E)break}else if(Me-tt>x||tt-Me>x){if(!E)break}else{var st=zS(ne,Ye);1>st?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new _0),st=b.random(),ae=b.random(),fe>_e?(b=Math.abs(Ye.bounds.right-ne.bounds.x),b=(1+b)*st):fe<_e?(b=Math.abs(Ye.bounds.x-ne.bounds.right),b=-(1+b)*st):(b=Math.max(Ye.width,ne.width),b=(1+b)*st-b/2),Me>tt?(_e=Math.abs(Ye.bounds.bottom-ne.bounds.y),_e=(1+_e)*ae):fe<_e?(_e=Math.abs(Ye.bounds.y-ne.bounds.bottom),_e=-(1+_e)*ae):(_e=Math.max(Ye.height,ne.height),_e=(1+_e)*ae-_e/2)):(ae=-(ne.charge*Ye.charge)/(st*st),b=(_e-fe)/st*ae,_e=(tt-Me)/st*ae),ne.forceX+=b,ne.forceY+=_e,Ye.forceX-=b,Ye.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,Me=te.bounds,Fe=te.focus,fe=Me.x+Fe.x,Me=Me.y+Fe.y,Fe=zS(x,te),1>Fe?(Fe=a.randomNumberGenerator,Fe===null&&(a.randomNumberGenerator=Fe=new _0),ae=Fe.random(),Fe=Fe.random(),b=(b>fe?1:-1)*(1+(te.width>x.width?te.width:x.width))*ae,_e=(ne>Me?1:-1)*(1+(te.height>x.height?te.height:x.height))*Fe):(ae=ae.stiffness*(Fe-ae.length),b=(fe-b)/Fe*ae,_e=(Me-ne)/Fe*ae),x.forceX+=b,x.forceY+=_e,te.forceX-=b,te.forceY-=_e;for(E=b=0;E<y.length;E++)x=y[E],a.isFixed(x)?a.moveFixedVertex(x):b=Math.max(b,a.moveVertex(x)||0);return b>a.epsilonDistance*a.epsilonDistance}Aa.prototype.moveVertex=function(a){var y=a.forceX,x=a.forceY,b=this.moveLimit;return y<-b?y=-b:y>b&&(y=b),x<-b?x=-b:x>b&&(x=b),a.centerX+=y,a.centerY+=x,y*y+x*x},Aa.prototype.moveFixedVertex=function(){},Aa.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Aa.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=oo,y.toSpot=oo)}},Aa.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=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)},Aa.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Aa.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Aa.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Aa.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Aa.prototype.electricalFieldX=function(){return 0},Aa.prototype.electricalFieldY=function(){return 0},Aa.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Aa.prototype.gravitationalFieldX=function(){return 0},Aa.prototype.gravitationalFieldY=function(){return 0},Aa.prototype.isFixed=function(a){return a.isFixed},Je.Object.defineProperties(Aa.prototype,{currentIteration:{get:function(){return this.An}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},arrangesToOrigin:{get:function(){return this.Bm},set:function(a){this.Bm!==a&&(this.Bm=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},maxIterations:{get:function(){return this.dl},set:function(a){this.dl!==a&&0<=a&&(this.dl=a,this.C())}},epsilonDistance:{get:function(){return this.$m},set:function(a){this.$m!==a&&0<a&&(this.$m=a,this.C())}},infinityDistance:{get:function(){return this.Zf},set:function(a){this.Zf!==a&&1<a&&(this.Zf=a,this.C())}},moveLimit:{get:function(){return this.In},set:function(a){this.In!==a&&1<a&&(this.In=a,this.C())}},randomNumberGenerator:{get:function(){return this.fo},set:function(a){this.fo!==a&&(a!==null&&typeof a.random!="function"&&At('ForceDirectedLayout.randomNumberGenerator must have a "random()" function on it: '+a),this.fo=a)}},defaultSpringStiffness:{get:function(){return this.Hk},set:function(a){this.Hk!==a&&(this.Hk=a,this.C())}},defaultSpringLength:{get:function(){return this.Gk},set:function(a){this.Gk!==a&&(this.Gk=a,this.C())}},defaultElectricalCharge:{get:function(){return this.Ek},set:function(a){this.Ek!==a&&(this.Ek=a,this.C())}},defaultGravitationalMass:{get:function(){return this.Fk},set:function(a){this.Fk!==a&&(this.Fk=a,this.C())}},defaultCommentSpringLength:{get:function(){return this.Vm},set:function(a){this.Vm!==a&&(this.Vm=a,this.C())}},defaultCommentElectricalCharge:{get:function(){return this.Um},set:function(a){this.Um!==a&&(this.Um=a,this.C())}}}),Aa.className="ForceDirectedLayout";function US(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}US.className="ForceDirectedSubnet";function Rf(a){To.call(this,a)}nt(Rf,To),Rf.prototype.createVertex=function(){return new Hg(this)},Rf.prototype.createEdge=function(){return new Ug(this)},Rf.className="ForceDirectedNetwork";function Hg(a){aa.call(this,a),this.ia=!1,this.Ha=this.u=NaN,this.sh=this.Vd=this.V=this.F=0,this.We=this.Hj=null,this.sv=0}nt(Hg,aa),Je.Object.defineProperties(Hg.prototype,{isFixed:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}},charge:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},mass:{get:function(){return this.Ha},set:function(a){this.Ha!==a&&(this.Ha=a)}},forceX:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}},forceY:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}}}),Hg.className="ForceDirectedVertex";function Ug(a){Gl.call(this,a),this.j=this.o=NaN}nt(Ug,Gl),Je.Object.defineProperties(Ug.prototype,{stiffness:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},length:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}}}),Ug.className="ForceDirectedEdge";function _0(){var a=0;a===void 0&&(a=42),this.seed=a,this.ay=48271,this.ey=2147483647,this.Q=44488.07041494893,this.gy=3399,this.by=1/2147483647,this.random()}_0.prototype.random=function(){var a=this.seed%this.Q*this.ay-this.seed/this.Q*this.gy;return 0<a?this.seed=a:this.seed=a+this.ey,this.seed*this.by},_0.className="RandomNumberGenerator";function vo(a){es.call(this),this.kc=this.ie=25,this.K=0,this.Dk=k0,this.Zk=A0,this.Qk=N0,this.bj=4,this.rk=O0,this.bg=15,this.sf=!0,this.Cn=4,this.Ra=this.Iq=this.Ia=-1,this.Md=this.Hn=0,this.Ta=this.Kd=this.Ld=this.he=this.tc=null,this.Kn=0,this.Jn=this.kj=null,this.le=0,this.fl=null,this.Rf=new Tt,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}nt(vo,es),vo.prototype.cloneProtected=function(a){es.prototype.cloneProtected.call(this,a),a.ie=this.ie,a.kc=this.kc,a.K=this.K,a.Dk=this.Dk,a.Zk=this.Zk,a.Qk=this.Qk,a.bj=this.bj,a.rk=this.rk,a.bg=this.bg,a.sf=this.sf,a.Cn=this.Cn,a.ve=this.ve},vo.prototype.qb=function(a){a.classType===vo?a.name.indexOf("Aggressive")===0?this.aggressiveOption=a:a.name.indexOf("Cycle")===0?this.cycleRemoveOption=a:a.name.indexOf("Init")===0?this.initializeOption=a:a.name.indexOf("Layer")===0?this.layeringOption=a:At("Unknown enum value: "+a):es.prototype.qb.call(this,a)},vo.prototype.createNetwork=function(){return new Np(this)},vo.prototype.doLayout=function(a){for(this.network===null&&(this.network=this.makeNetwork(a)),this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin),this.Iq=-1,this.Md=this.Hn=0,this.fl=this.Jn=this.kj=null,a=0;a<this.He.length;a++)this.He[a]=null;if(0<this.network.vertexes.count){for(this.network.Ko(),this.cycleRemoveOption!==Wg&&this.removeCycles(),a=this.network.vertexes.iterator;a.next();)a.value.layer=-1;for(this.Ia=-1,this.assignLayers(),a.reset();a.next();)this.Ia=Math.max(this.Ia,a.value.layer);this.cycleRemoveOption===Wg&&this.removeCycles(),a=this.network;for(var y=[],x=a.edges.iterator;x.next();){var b=x.value;b.valid=!1,y.push(b)}for(x=0;x<y.length;x++){b=y[x];var E=b.fromVertex,te=b.toVertex;if(!(b.valid||(E.node===null&&E.data===null||te.node===null&&te.data===null)&&E.layer===te.layer)){var ne=0,ae=0,fe=0,_e=0;if(b.link!==null){if(ae=b.link,ae===null)continue;var Me=E.node;if(ne=te.node,Me===null||ne===null)continue;var Fe=ae.fromNode;fe=ae.toNode;for(var Ye=ae.fromPort;Ye!==null&&!Ye.Ed();)Ye=Ye.panel;for(ae=ae.toPort;ae!==null&&!ae.Ed();)ae=ae.panel;if(b.rev){_e=Fe;var tt=Ye;Fe=fe,Ye=ae,fe=_e,ae=tt}var st=E.focus;_e=te.focus;var pt=b.rev?te.bounds:E.bounds;tt=Tt.alloc(),Me!==Fe?pt.w()&&Fe.isVisible()?Fe.actualBounds.w()?(Dh(Fe,Ye,Fr,tt),tt.x+=Fe.actualBounds.x-pt.x,tt.y+=Fe.actualBounds.y-pt.y):(Dh(Fe,Ye,Fr,tt),tt.w()||tt.assign(st)):tt.assign(st):pt.w()?(Dh(Fe,Ye,Fr,tt),tt.w()||tt.assign(st)):tt.assign(st),Fe=b.rev?E.bounds:te.bounds,Me=Tt.alloc(),ne!==fe?Fe.w()&&fe.isVisible()?fe.actualBounds.w()?(Dh(fe,ae,Fr,Me),Me.x+=fe.actualBounds.x-Fe.x,Me.y+=fe.actualBounds.y-Fe.y):(Dh(fe,ae,Fr,Me),Me.w()||Me.assign(_e)):Me.assign(_e):Fe.w()?(Dh(fe,ae,Fr,Me),Me.w()||Me.assign(_e)):Me.assign(_e),this.K===90||this.K===270?(ne=Math.round((tt.x-st.x)/this.kc),fe=tt.x,ae=Math.round((Me.x-_e.x)/this.kc),_e=Me.x):(ne=Math.round((tt.y-st.y)/this.kc),fe=tt.y,ae=Math.round((Me.y-_e.y)/this.kc),_e=Me.y),Tt.free(tt),Tt.free(Me),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(tt=E.layer,Me=te.layer,Fe=0,pt=b.link,pt!==null){var It=pt.fromPort,Mt=pt.toPort;if(It!==null&&Mt!==null){var Ht=pt.fromNode;if(Ye=pt.toNode,Ht!==null&&Ye!==null){var Gt=T0(this,!0),Zt=T0(this,!1),Xt=this.setsPortSpots?Gt:pt.computeSpot(!0,It);st=this.setsPortSpots?Zt:pt.computeSpot(!1,Mt);var pn=pt.isOrthogonal;Xt.$c()&&Xt.Hf(Zt)&&st.$c()&&st.Hf(Gt)?Fe=0:(Gt=pt.getLinkPoint(Ht,It,Xt,!0,pn,Ye,Mt,Tt.alloc()),Zt=pt.getLinkDirection(Ht,It,Gt,Xt,!0,pn,Ye,Mt),Tt.free(Gt),Xt.ys()||Zt!==JS(this,b,!0)?this.setsPortSpots&&Ht!==null&&Ht.ports.count===1&&b.rev&&(Fe+=1):Fe+=1,Xt=pt.getLinkPoint(Ye,Mt,st,!1,pn,Ht,It,Tt.alloc()),pt=pt.getLinkDirection(Ye,Mt,Xt,st,!1,pn,Ht,It),Tt.free(Xt),st.ys()||pt!==JS(this,b,!1)?this.setsPortSpots&&Ye!==null&&Ye.ports.count===1&&b.rev&&(Fe+=2):Fe+=2)}}}if(Ye=Fe,Fe=Ye===1||Ye===3,(Ye=Ye===2||Ye===3)&&(st=a.createVertex(),st.node=null,st.Dj=1,st.layer=tt,st.near=E,a.dh(st),E=a.Zj(E,st,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=ne,E.portToColOffset=0,E.portFromPos=fe,E.portToPos=0,E=st),pt=1,Fe&&pt--,tt-Me>pt&&0<tt){for(b.valid=!1,st=a.createVertex(),st.node=null,st.Dj=2,st.layer=tt-1,a.dh(st),E=a.Zj(E,st,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=Ye?0:ne,E.portToColOffset=0,E.portFromPos=Ye?0:fe,E.portToPos=0,E=st,tt--;tt-Me>pt&&0<tt;)st=a.createVertex(),st.node=null,st.Dj=3,st.layer=tt-1,a.dh(st),E=a.Zj(E,st,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=st,tt--;E=a.Zj(st,te,b.link),E.valid=!Fe,Fe&&(st.near=te),E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=ae,E.portFromPos=0,E.portToPos=_e}else b.valid=!0}}for(a=this.tc=[],y=0;y<=this.Ia;y++)a[y]=0;for(y=this.network.vertexes.iterator;y.next();)y.value.index=-1;for(this.initializeIndices(),this.Iq=-1,x=this.Md=this.Hn=0;x<=this.Ia;x++)a[x]>a[this.Md]&&(this.Iq=a[x]-1,this.Md=x),a[x]<a[this.Hn]&&(this.Hn=x);for(this.fl=[],x=0;x<a.length;x++)this.fl[x]=[];for(y.reset();y.next();)a=y.value,this.fl[a.layer][a.index]=a;for(this.Ra=-1,a=0;a<=this.Ia;a++){for(y=Sd(this,a),x=0,b=this.tc[a],te=0;te<b;te++)E=y[te],x+=this.nodeMinColumnSpace(E,!0),E.column=x,x+=1,x+=this.nodeMinColumnSpace(E,!1);this.Ra=Math.max(this.Ra,x-1),xd(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},vo.prototype.linkMinLength=function(){return 1};function gy(a){var y=a.fromVertex.node||a.fromVertex.data;return a=a.toVertex.node||a.toVertex.data,y===null&&a===null?8:y===null||a===null?4:1}vo.prototype.nodeMinLayerSpace=function(a,y){return a.node===null&&a.data===null?0:this.K===90||this.K===270?y?a.focus.y+10:a.bounds.height-a.focus.y+10:y?a.focus.x+10:a.bounds.width-a.focus.x+10},vo.prototype.nodeMinColumnSpace=function(a,y){if(a.node===null&&a.data===null)return 0;var x=y?a.ev:a.dv;return x!==null?x:(x=this.K,x===90||x===270?y?a.ev=a.focus.x/this.kc+1|0:a.dv=(a.bounds.width-a.focus.x)/this.kc+1|0:y?a.ev=a.focus.y/this.kc+1|0:a.dv=(a.bounds.height-a.focus.y)/this.kc+1|0)};function Sl(a){a.kj===null&&(a.kj=[]);for(var y=0,x=a.network.vertexes.iterator;x.next();){var b=x.value;a.kj[y]=b.layer,y++,a.kj[y]=b.column,y++,a.kj[y]=b.index,y++}return a.kj}function wu(a,y){var x=0;for(a=a.network.vertexes.iterator;a.next();){var b=a.value;b.layer=y[x],x++,b.column=y[x],x++,b.index=y[x],x++}}function GS(a,y,x){var b=Sd(a,y),E=a.tc[y];(a.Jn===null||a.Jn.length<E*E)&&(a.Jn=[]);for(var te=a.Jn,ne=0;ne<E;ne++){var ae=0,fe=b[ne],_e=fe.near;if(_e!==null&&_e.layer===fe.layer)if(fe=_e.index,fe>ne)for(var Me=ne+1;Me<fe;Me++){var Fe=b[Me];Fe.near===_e&&Fe.Dj===_e.Dj||ae++}else for(Me=ne-1;Me>fe;Me--)Fe=b[Me],Fe.near===_e&&Fe.Dj===_e.Dj||ae++;var Ye;if(0<=x)for(fe=b[ne].sourceEdgesArrayAccess,_e=0;_e<fe.length;_e++){var tt=fe[_e];if(tt.valid&&tt.fromVertex.layer!==y)for(Fe=tt.fromVertex.index,Me=tt.portToPos,tt=tt.portFromPos,Ye=_e+1;Ye<fe.length;Ye++){var st=fe[Ye];if(st.valid&&st.fromVertex.layer!==y){var pt=st.fromVertex.index,It=st.portToPos;st=st.portFromPos,Me<It&&(Fe>pt||Fe===pt&&tt>st)&&ae++,It<Me&&(pt>Fe||pt===Fe&&st>tt)&&ae++}}}if(0>=x){for(fe=b[ne].destinationEdgesArrayAccess,_e=0;_e<fe.length;_e++)if(tt=fe[_e],tt.valid&&tt.toVertex.layer!==y)for(Fe=tt.toVertex.index,Me=tt.portToPos,tt=tt.portFromPos,Ye=_e+1;Ye<fe.length;Ye++)st=fe[Ye],st.valid&&st.toVertex.layer!==y&&(pt=st.toVertex.index,It=st.portToPos,st=st.portFromPos,tt<st&&(Fe>pt||Fe===pt&&Me>It)&&ae++,st<tt&&(pt>Fe||pt===Fe&&It>Me)&&ae++)}for(te[ne*E+ne]=ae,fe=ne+1;fe<E;fe++){var Mt=0,Ht=0;if(0<=x){ae=b[ne].sourceEdgesArrayAccess;var Gt=b[fe].sourceEdgesArrayAccess;for(_e=0;_e<ae.length;_e++)if(tt=ae[_e],tt.valid&&tt.fromVertex.layer!==y)for(Fe=tt.fromVertex.index,tt=tt.portFromPos,Ye=0;Ye<Gt.length;Ye++)st=Gt[Ye],st.valid&&st.fromVertex.layer!==y&&(pt=st.fromVertex.index,st=st.portFromPos,(Fe<pt||Fe===pt&&tt<st)&&Ht++,(pt<Fe||pt===Fe&&st<tt)&&Mt++)}if(0>=x){for(ae=b[ne].destinationEdgesArrayAccess,Gt=b[fe].destinationEdgesArrayAccess,_e=0;_e<ae.length;_e++)if(tt=ae[_e],tt.valid&&tt.toVertex.layer!==y)for(Fe=tt.toVertex.index,Me=tt.portToPos,Ye=0;Ye<Gt.length;Ye++)st=Gt[Ye],st.valid&&st.toVertex.layer!==y&&(pt=st.toVertex.index,It=st.portToPos,(Fe<pt||Fe===pt&&Me<It)&&Ht++,(pt<Fe||pt===Fe&&It<Me)&&Mt++)}te[ne*E+fe]=Mt,te[fe*E+ne]=Ht}}return xd(a,y,b),te}vo.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=GS(this,y,1),b=this.tc[y],E=0;E<b;E++)for(var te=E;te<b;te++)a+=x[E*b+te];return a};function E0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var b=a,E=x,te=Sd(b,E),ne=b.tc[E],ae=0,fe=0;fe<ne;fe++){var _e=te[fe].destinationEdgesArrayAccess;if(_e!==null)for(var Me=0;Me<_e.length;Me++){var Fe=_e[Me];if(Fe.valid&&Fe.toVertex.layer!==E){var Ye=Fe.fromVertex.column+Fe.portFromColOffset,tt=Fe.toVertex.column+Fe.portToColOffset;ae+=(Math.abs(Ye-tt)+1)*gy(Fe)}}}xd(b,E,te),y+=ae}return y}vo.prototype.normalize=function(){var a=1/0;this.Ra=-1;for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;a=Math.min(a,x.column-this.nodeMinColumnSpace(x,!0)),this.Ra=Math.max(this.Ra,x.column+this.nodeMinColumnSpace(x,!1))}for(y.reset();y.next();)y.value.column-=a;this.Ra-=a};function my(a,y,x){for(var b=Sd(a,y),E=a.tc[y],te=[],ne=0;ne<E;ne++){var ae=b[ne],fe=null;0>=x&&(fe=ae.sourceEdgesArrayAccess);var _e=null;0<=x&&(_e=ae.destinationEdgesArrayAccess);var Me=0,Fe=0,Ye=ae.near;if(Ye!==null&&Ye.layer===ae.layer&&(Me+=Ye.column-1,Fe++),fe!==null)for(Ye=0;Ye<fe.length;Ye++){ae=fe[Ye];var tt=ae.fromVertex;ae.valid&&!ae.rev&&tt.layer!==y&&(Me+=tt.column,Fe++)}if(_e!==null)for(fe=0;fe<_e.length;fe++)ae=_e[fe],Ye=ae.toVertex,ae.valid&&!ae.rev&&Ye.layer!==y&&(Me+=Ye.column,Fe++);te[ne]=Fe===0?-1:Me/Fe}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 Me=0,Fe=[],Ye=ae.near;if(Ye!==null&&Ye.layer===ae.layer&&(Fe[Me]=Ye.column-1,Me++),ae=void 0,fe!==null)for(Ye=0;Ye<fe.length;Ye++){ae=fe[Ye];var tt=ae.fromVertex;ae.valid&&!ae.rev&&tt.layer!==y&&(Fe[Me]=tt.column+ae.portFromColOffset,Me++)}if(_e!==null)for(fe=0;fe<_e.length;fe++)ae=_e[fe],Ye=ae.toVertex,ae.valid&&!ae.rev&&Ye.layer!==y&&(Fe[Me]=Ye.column+ae.portToColOffset,Me++);Me===0?te[ne]=-1:(Fe.sort(function(st,pt){return st-pt}),_e=Me>>1,te[ne]=Me&1?Fe[_e]:Fe[_e-1]+Fe[_e]>>1)}return xd(a,y,b),te}function Gg(a,y,x,b,E,te){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();){var ae=ne.value,fe=ae.toVertex,_e=y.layer-fe.layer;ae=a.linkMinLength(ae),_e===ae&&Gg(a,fe,x,b,E,te)}if(te)for(ne=y.sourceEdges;ne.next();)ae=ne.value,fe=ae.fromVertex,_e=fe.layer-y.layer,ae=a.linkMinLength(ae),_e===ae&&Gg(a,fe,x,b,E,te)}}function vy(a,y,x,b,E,te){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();)vy(a,ne.value.toVertex,x,b,E,te);if(te)for(y=y.sourceEdges;y.next();)vy(a,y.value.fromVertex,x,b,E,te)}}vo.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case xy:a=this.network;var y=0,x=a.vertexes.count-1,b=[];b.length=x+1;for(var E=a.vertexes.iterator;E.next();)E.value.valid=!0;for(;zx(a)!==null;){for(E=ZS(a);E!==null;)b[x]=E,x--,E.valid=!1,E=ZS(a);for(E=KS(a);E!==null;)b[y]=E,y++,E.valid=!1,E=KS(a);E=null;for(var te=0,ne=this.network.vertexes.iterator;ne.next();){var ae=ne.value;if(ae.valid){for(var fe=0,_e=ae.destinationEdges;_e.next();)_e.value.toVertex.valid&&fe++;_e=0;for(var Me=ae.sourceEdges;Me.next();)Me.value.fromVertex.valid&&_e++;(E===null||te<fe-_e)&&(E=ae,te=fe-_e)}}E!==null&&(b[y]=E,y++,E.valid=!1)}for(y=0;y<a.vertexes.count;y++)b[y].index=y;for(b=a.edges.iterator;b.next();)y=b.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case k0:for(b=this.network.vertexes.iterator;b.next();)a=b.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,b.reset();b.next();)y=b.value,y.sourceEdges.count===0&&yy(this,y);for(b.reset();b.next();)y=b.value,y.Ll===-1&&yy(this,y);for(a.reset();a.next();)b=a.value,b.forest||(y=b.fromVertex,x=y.finish,E=b.toVertex,te=E.finish,E.Ll<y.Ll&&x<te&&(this.network.gm(b),b.rev=!0));break;case Wg:for(a=this.network,y=a.vertexes.iterator,b=1/0;y.next();)b=Math.min(b,y.value.layer);if(1/0>b){if(0>b)for(y.reset();y.next();)y.value.layer-=b;for(b=[],y.reset();y.next();)x=y.value,E=b[x.layer],E===void 0?b[x.layer]=[x]:E.push(x);for(x=y=0;x<b.length;x++)if(E=b[x],!E||E.length===0)y++;else if(0<x)for(te=0;te<E.length;te++)E[te].layer-=y;for(b=a.edges.iterator;b.next();)y=b.value,y.fromVertex.layer<y.toVertex.layer&&(a.gm(y),y.rev=!0)}}};function zx(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function ZS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.destinationEdges;b.next();)if(b.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function KS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.sourceEdges;b.next();)if(b.value.fromVertex.valid){x=!1;break}if(x)return y}}return null}function yy(a,y){y.Ll=a.Kn,a.Kn++;for(var x=y.destinationEdges;x.next();){var b=x.value,E=b.toVertex;E.Ll===-1&&(b.forest=!0,yy(a,E))}y.finish=a.Kn,a.Kn++}vo.prototype.assignLayers=function(){switch(this.Zk){case wy:VS(this);break;case by:for(var a,y=this.network.vertexes.iterator;y.next();)a=YS(this,y.value),this.Ia=Math.max(a,this.Ia);for(y.reset();y.next();)a=y.value,a.layer=this.Ia-a.layer;break;default:case A0:for(VS(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&XS(this,a);for(a=1/0,y.reset();y.next();)a=Math.min(a,y.value.layer);for(this.Ia=-1,y.reset();y.next();){var x=y.value;x.layer-=a,this.Ia=Math.max(this.Ia,x.layer)}}};function VS(a){for(var y=a.network.vertexes.iterator;y.next();){var x=$S(a,y.value);a.Ia=Math.max(x,a.Ia)}}function $S(a,y){var x=0;if(y.layer===-1){for(var b=y.destinationEdges;b.next();){var E=b.value,te=E.toVertex;E=a.linkMinLength(E),x=Math.max(x,$S(a,te)+E)}y.layer=x}else x=y.layer;return x}function YS(a,y){var x=0;if(y.layer===-1){for(var b=y.sourceEdges;b.next();){var E=b.value,te=E.fromVertex;E=a.linkMinLength(E),x=Math.max(x,YS(a,te)+E)}y.layer=x}else x=y.layer;return x}function XS(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)XS(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var b=y.sourceEdgesArrayAccess,E=b.length,te=0;te<E;te++){var ne=b[te],ae=ne.fromVertex,fe=ne.toVertex;ne=a.linkMinLength(ne),ae.layer-fe.layer>ne&&Gg(a,ae,0,-1,!0,!1)}for(Gg(a,y,1,-1,!0,!0);y.component!==0;){for(te=0,b=1/0,ae=0,fe=null,ne=a.network.vertexes.iterator;ne.next();){var _e=ne.value;if(_e.component===1){var Me=0,Fe=!1,Ye=_e.sourceEdgesArrayAccess;E=Ye.length;for(var tt=0;tt<E;tt++){var st=Ye[tt],pt=st.fromVertex;Me+=1,pt.component!==1&&(te+=1,pt=pt.layer-_e.layer,st=a.linkMinLength(st),b=Math.min(b,pt-st))}for(Ye=_e.destinationEdgesArrayAccess,E=Ye.length,tt=0;tt<E;tt++)st=Ye[tt].toVertex,--Me,st.component!==1?--te:Fe=!0;(fe===null||Me<ae)&&!Fe&&(fe=_e,ae=Me)}}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,Me=!1,Ye=ne.sourceEdgesArrayAccess,Fe=Ye.length,tt=0;tt<Fe;tt++)st=Ye[tt].fromVertex,_e+=1,st.component!==1?b+=1:Me=!0;for(Ye=ne.destinationEdgesArrayAccess,Fe=Ye.length,tt=0;tt<Fe;tt++)st=Ye[tt],pt=st.toVertex,--_e,pt.component!==1&&(--b,pt=ne.layer-pt.layer,st=a.linkMinLength(st),E=Math.min(E,pt-st));(ae===null||_e>te)&&!Me&&(ae=ne,te=_e)}if(0>b){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer-=E);y.component=0}else ae.component=0}}}function JS(a,y,x){return a.K===90?x&&!y.rev||!x&&y.rev?270:90:a.K===180?x&&!y.rev||!x&&y.rev?0:180:a.K===270?x&&!y.rev||!x&&y.rev?90:270:x&&!y.rev||!x&&y.rev?180:0}vo.prototype.initializeIndices=function(){switch(this.Qk){default:case Py:for(var a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;y.index=this.tc[x],this.tc[x]++}break;case N0:for(a=this.network.vertexes.iterator,y=this.Ia;0<=y;y--)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&QS(this,x);break;case Cy:for(a=this.network.vertexes.iterator,y=0;y<=this.Ia;y++)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&qS(this,x)}};function QS(a,y){var x=y.layer;for(y.index=a.tc[x],a.tc[x]++,y=y.destinationEdgesArrayAccess,x=!0;x;){x=!1;for(var b=0;b<y.length-1;b++){var E=y[b],te=y[b+1];E.portFromColOffset>te.portFromColOffset&&(x=!0,y[b]=te,y[b+1]=E)}}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.toVertex,b.index===-1&&QS(a,b))}function qS(a,y){var x=y.layer;y.index=a.tc[x],a.tc[x]++,y=y.sourceEdgesArrayAccess;for(var b=!0;b;)for(b=!1,x=0;x<y.length-1;x++){var E=y[x],te=y[x+1];E.portToColOffset>te.portToColOffset&&(b=!0,y[x]=te,y[x+1]=E)}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.fromVertex,b.index===-1&&qS(a,b))}vo.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=Sl(this),x,b;for(x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)L0(this,b,1),Bu(this,b,1);var E=this.countCrossings();for(E<a&&(a=E,y=Sl(this)),b=this.Ia;0<=b;b--)L0(this,b,-1),Bu(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=Sl(this))}for(wu(this,y),x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)L0(this,b,0),Bu(this,b,0);for(E=this.countCrossings(),E<a&&(a=E,y=Sl(this)),b=this.Ia;0<=b;b--)L0(this,b,0),Bu(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=Sl(this))}wu(this,y);var te,ne,ae;switch(this.rk){case _y:break;case Ey:for(ae=a+1;(b=this.countCrossings())<ae;)for(ae=b,x=this.Ia;0<=x;x--)for(ne=0;ne<=x;ne++){for(te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,-1)||te;for(E=this.countCrossings(),E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,1)||te;for(E=this.countCrossings(),E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,1)||te;for(E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,-1)||te;for(E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,0)||te;for(E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,0)||te;E>=a?wu(this,y):(a=E,y=Sl(this))}break;default:case O0:for(x=this.Ia,ne=0,ae=a+1;(b=this.countCrossings())<ae;){for(ae=b,te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,-1)||te;for(E=this.countCrossings(),E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,1)||te;for(E=this.countCrossings(),E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,1)||te;for(E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,-1)||te;for(E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,0)||te;for(E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,0)||te;E>=a?wu(this,y):(a=E,y=Sl(this))}}wu(this,y)};function L0(a,y,x){var b=Sd(a,y),E=a.tc[y],te=WS(a,y,x),ne=my(a,y,x);for(x=0;x<E;x++)ne[x]===-1&&(ne[x]=b[x].column),te[x]===-1&&(te[x]=b[x].column);for(var ae=!0,fe;ae;)for(ae=!1,x=0;x<E-1;x++)(te[x+1]<te[x]||te[x+1]===te[x]&&ne[x+1]<ne[x])&&(ae=!0,fe=te[x],te[x]=te[x+1],te[x+1]=fe,fe=ne[x],ne[x]=ne[x+1],ne[x+1]=fe,fe=b[x],b[x]=b[x+1],b[x+1]=fe);for(x=te=0;x<E;x++)fe=b[x],fe.index=x,te+=a.nodeMinColumnSpace(fe,!0),fe.column=te,te+=1,te+=a.nodeMinColumnSpace(fe,!1);xd(a,y,b)}function Bu(a,y,x){var b=Sd(a,y),E=a.tc[y];x=GS(a,y,x);var te,ne=[];for(te=0;te<E;te++)ne[te]=-1;var ae=[];for(te=0;te<E;te++)ae[te]=-1;for(var fe=!1,_e=!0;_e;)for(_e=!1,te=0;te<E-1;te++){var Me=x[b[te].index*E+b[te+1].index],Fe=x[b[te+1].index*E+b[te].index],Ye=0,tt=0,st=b[te].column,pt=b[te+1].column,It=a.nodeMinColumnSpace(b[te],!0),Mt=a.nodeMinColumnSpace(b[te],!1),Ht=a.nodeMinColumnSpace(b[te+1],!0),Gt=a.nodeMinColumnSpace(b[te+1],!1);It=st-It+Ht,Mt=pt-Mt+Gt;var Zt=b[te].sourceEdges.iterator;for(Zt.reset();Zt.next();)if(Ht=Zt.value,Gt=Ht.fromVertex,Ht.valid&&Gt.layer===y){for(Ht=0;b[Ht]!==Gt;)Ht++;Ht<te&&(Ye+=2*(te-Ht),tt+=2*(te+1-Ht)),Ht===te+1&&(Ye+=1),Ht>te+1&&(Ye+=4*(Ht-te),tt+=4*(Ht-(te+1)))}for(Zt=b[te].destinationEdges.iterator,Zt.reset();Zt.next();)if(Ht=Zt.value,Gt=Ht.toVertex,Ht.valid&&Gt.layer===y){for(Ht=0;b[Ht]!==Gt;)Ht++;Ht===te+1&&(tt+=1)}for(Zt=b[te+1].sourceEdges.iterator,Zt.reset();Zt.next();)if(Ht=Zt.value,Gt=Ht.fromVertex,Ht.valid&&Gt.layer===y){for(Ht=0;b[Ht]!==Gt;)Ht++;Ht<te&&(Ye+=2*(te+1-Ht),tt+=2*(te-Ht)),Ht===te&&(tt+=1),Ht>te+1&&(Ye+=4*(Ht-(te+1)),tt+=4*(Ht-te))}for(Zt=b[te+1].destinationEdges.iterator,Zt.reset();Zt.next();)if(Ht=Zt.value,Gt=Ht.toVertex,Ht.valid&&Gt.layer===y){for(Ht=0;b[Ht]!==Gt;)Ht++;Ht===te&&(Ye+=1)}Ht=Gt=0,Zt=ne[b[te].index];var Xt=ae[b[te].index],pn=ne[b[te+1].index],ii=ae[b[te+1].index];Zt!==-1&&(Gt+=Math.abs(Zt-st),Ht+=Math.abs(Zt-Mt)),Xt!==-1&&(Gt+=Math.abs(Xt-st),Ht+=Math.abs(Xt-Mt)),pn!==-1&&(Gt+=Math.abs(pn-pt),Ht+=Math.abs(pn-It)),ii!==-1&&(Gt+=Math.abs(ii-pt),Ht+=Math.abs(ii-It)),(tt<Ye-.5||tt===Ye&&Fe<Me-.5||tt===Ye&&Fe===Me&&Ht<Gt-.5)&&(_e=fe=!0,b[te].column=Mt,b[te+1].column=It,Me=b[te],b[te]=b[te+1],b[te+1]=Me)}for(te=0;te<E;te++)b[te].index=te;return xd(a,y,b),fe}vo.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&$x)!==0;if(1e3<this.network.edges.count&&y&&(a=!1),a){var x=[];for(y=0;y<=this.Ia;y++)x[y]=0;for(var b,E=this.network.vertexes.iterator;E.next();){var te=E.value;y=te.layer,b=te.column,te=this.nodeMinColumnSpace(te,!1),x[y]=Math.max(x[y],b+te)}for(E.reset();E.next();)te=E.value,y=te.layer,b=te.column,te.column=(8*(this.Ra-x[y])>>1)+8*b;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=Ap(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Ap(this,y,-1)||x;x=Ap(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)Sy(this,y,1);for(y=this.Md-1;0<=y;y--)Sy(this,y,-1);Sy(this,this.Md,0)}if(a&&(ex(this,-1),ex(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Ap(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Ap(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Ap(this,y,0)||x}}else Wx(this)};function Ap(a,y,x){for(var b=!1;Hx(a,y,x);)b=!0;return b}function Hx(a,y,x){var b,E=Sd(a,y),te=a.tc[y],ne=my(a,y,-1);if(0<x)for(b=0;b<te;b++)ne[b]=-1;var ae=my(a,y,1);if(0>x)for(b=0;b<te;b++)ae[b]=-1;for(var fe=!1,_e=!0;_e;)for(_e=!1,b=0;b<te;b++){var Me=E[b].column,Fe=a.nodeMinColumnSpace(E[b],!0),Ye=a.nodeMinColumnSpace(E[b],!1),tt=0;0>b-1||Me-E[b-1].column-1>Fe+a.nodeMinColumnSpace(E[b-1],!1)?tt=Me-1:tt=Me,Fe=b+1>=te||E[b+1].column-Me-1>Ye+a.nodeMinColumnSpace(E[b+1],!0)?Me+1:Me;var st=Ye=0,pt=0;if(0>=x)for(var It=E[b].sourceEdges.iterator;It.next();){var Mt=It.value,Ht=Mt.fromVertex;if(Mt.valid&&Ht.layer!==y){var Gt=gy(Mt),Zt=Mt.portFromColOffset;Mt=Mt.portToColOffset,Ht=Ht.column,Ye+=(Math.abs(Me+Mt-(Ht+Zt))+1)*Gt,st+=(Math.abs(tt+Mt-(Ht+Zt))+1)*Gt,pt+=(Math.abs(Fe+Mt-(Ht+Zt))+1)*Gt}}if(0<=x)for(It=E[b].destinationEdges.iterator;It.next();)Mt=It.value,Ht=Mt.toVertex,Mt.valid&&Ht.layer!==y&&(Gt=gy(Mt),Zt=Mt.portFromColOffset,Mt=Mt.portToColOffset,Ht=Ht.column,Ye+=(Math.abs(Me+Zt-(Ht+Mt))+1)*Gt,st+=(Math.abs(tt+Zt-(Ht+Mt))+1)*Gt,pt+=(Math.abs(Fe+Zt-(Ht+Mt))+1)*Gt);Mt=Zt=Gt=0,It=ne[E[b].index],Ht=ae[E[b].index],It!==-1&&(Gt+=Math.abs(It-Me),Zt+=Math.abs(It-tt),Mt+=Math.abs(It-Fe)),Ht!==-1&&(Gt+=Math.abs(Ht-Me),Zt+=Math.abs(Ht-tt),Mt+=Math.abs(Ht-Fe)),st<Ye||st===Ye&&Zt<Gt?(_e=fe=!0,E[b].column=tt):(pt<Ye||pt===Ye&&Mt<Gt)&&(_e=fe=!0,E[b].column=Fe)}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),Me=0;if(ne[x]===-1)if(x===0&&x===E-1)Me=ae;else if(x===0){var Fe=b[x+1].column;Fe-ae===_e+a.nodeMinColumnSpace(b[x+1],!0)?Me=ae-1:Me=ae}else x===E-1?(Fe=b[x-1].column,Me=ae-Fe===fe+a.nodeMinColumnSpace(b[x-1],!1)?ae+1:ae):(Fe=b[x-1].column,fe=Fe+a.nodeMinColumnSpace(b[x-1],!1)+fe+1,Fe=b[x+1].column,_e=Fe-a.nodeMinColumnSpace(b[x+1],!0)-_e-1,Me=(fe+_e)/2|0);else x===0&&x===E-1?Me=ne[x]:x===0?(Fe=b[x+1].column,_e=Fe-a.nodeMinColumnSpace(b[x+1],!0)-_e-1,Me=Math.min(ne[x],_e)):x===E-1?(Fe=b[x-1].column,fe=Fe+a.nodeMinColumnSpace(b[x-1],!1)+fe+1,Me=Math.max(ne[x],fe)):(Fe=b[x-1].column,fe=Fe+a.nodeMinColumnSpace(b[x-1],!1)+fe+1,Fe=b[x+1].column,_e=Fe-a.nodeMinColumnSpace(b[x+1],!0)-_e-1,fe<ne[x]&&ne[x]<_e?Me=ne[x]:fe>=ne[x]?Me=fe:_e<=ne[x]&&(Me=_e));Me!==ae&&(te=!0,b[x].column=Me)}xd(a,y,b),a.normalize()}function Ux(a,y){for(var x=!0,b=a.network.vertexes.iterator;b.next();){var E=b.value,te=a.nodeMinColumnSpace(E,!0),ne=a.nodeMinColumnSpace(E,!1);if(E.column-te<=y&&E.column+ne>=y){x=!1;break}}if(a=!1,x)for(b.reset();b.next();)x=b.value,x.column>y&&(--x.column,a=!0);return a}function Gx(a,y){var x=y+1,b,E=[],te=[];for(b=0;b<=a.Ia;b++)E[b]=!1,te[b]=!1;for(var ne=a.network.vertexes.iterator;ne.next();){b=ne.value;var ae=b.column-a.nodeMinColumnSpace(b,!0),fe=b.column+a.nodeMinColumnSpace(b,!1);ae<=y&&fe>=y&&(E[b.layer]=!0),ae<=x&&fe>=x&&(te[b.layer]=!0)}for(ae=!0,x=!1,b=0;b<=a.Ia;b++)ae=ae&&!(E[b]&&te[b]);if(ae)for(ne.reset();ne.next();)a=ne.value,a.column>y&&(--a.column,x=!0);return x}function ex(a,y){for(var x=0;x<=a.Ra;x++)for(;Ux(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Gx(a,x););a.normalize();var b;if(0<y)for(x=0;x<=a.Ra;x++){var E=Sl(a),te=E0(a);for(b=te+1;te<b;){b=te,tx(a,x,1);var ne=E0(a);ne>te?wu(a,E):ne<te&&(te=ne,E=Sl(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=Sl(a),te=E0(a),b=te+1;te<b;)b=te,tx(a,x,-1),ne=E0(a),ne>te?wu(a,E):ne<te&&(te=ne,E=Sl(a));a.normalize()}function tx(a,y,x){a.le=0;for(var b=a.network.vertexes.iterator;b.next();)b.value.component=-1;if(0<x)for(b.reset();b.next();){var E=b.value;E.column-a.nodeMinColumnSpace(E,!0)<=y&&(E.component=a.le)}if(0>x)for(b.reset();b.next();)E=b.value,E.column+a.nodeMinColumnSpace(E,!1)>=y&&(E.component=a.le);for(a.le++,b.reset();b.next();)y=b.value,y.component===-1&&(vy(a,y,a.le,-1,!0,!0),a.le++);var te;for(y=[],te=0;te<a.le*a.le;te++)y[te]=!1;for(E=[],te=0;te<(a.Ia+1)*(a.Ra+1);te++)E[te]=-1;for(b.reset();b.next();){te=b.value;for(var ne=te.layer,ae=Math.max(0,te.column-a.nodeMinColumnSpace(te,!0)),fe=Math.min(a.Ra,te.column+a.nodeMinColumnSpace(te,!1));ae<=fe;ae++)E[ne*(a.Ra+1)+ae]=te.component}for(te=0;te<=a.Ia;te++){if(0<x)for(ne=0;ne<a.Ra;ne++)E[te*(a.Ra+1)+ne]!==-1&&E[te*(a.Ra+1)+ne+1]!==-1&&E[te*(a.Ra+1)+ne]!==E[te*(a.Ra+1)+ne+1]&&(y[E[te*(a.Ra+1)+ne]*a.le+E[te*(a.Ra+1)+ne+1]]=!0);if(0>x)for(ne=a.Ra;0<ne;ne--)E[te*(a.Ra+1)+ne]!==-1&&E[te*(a.Ra+1)+ne-1]!==-1&&E[te*(a.Ra+1)+ne]!==E[te*(a.Ra+1)+ne-1]&&(y[E[te*(a.Ra+1)+ne]*a.le+E[te*(a.Ra+1)+ne-1]]=!0)}for(E=[],te=0;te<a.le;te++)E[te]=!0;for(ne=[],ne.push(0);ne.length!==0;)if(fe=ne[ne.length-1],ne.pop(),E[fe])for(E[fe]=!1,te=0;te<a.le;te++)y[fe*a.le+te]&&ne.splice(0,0,te);if(0<x)for(b.reset();b.next();)a=b.value,E[a.component]&&--a.column;if(0>x)for(b.reset();b.next();)x=b.value,E[x.component]&&(x.column+=1)}function Wx(a){for(var y=Hn(),x=a.fl.length,b=0;b<=x;b++)y[b]=[];for(b=a.network.vertexes.iterator;b.next();){var E=b.value;y[x-E.layer][E.index]=E}x=new In,Zx(y,x);var te=null,ne=null,ae=null,fe=null,_e=(a.ve&1)!==0,Me=(a.ve&2)!==0,Fe=(a.ve&4)!==0,Ye=(a.ve&8)!==0;for(_e&&(a.verticalAlignment(y,x,!0),te=M0(a,y,!0,!1)),y.reverse(),Fe&&(a.verticalAlignment(y,x,!1),ae=M0(a,y,!1,!1)),b=Nr(y),E=b.next();!E.done;E=b.next())E.value.reverse();Ye&&(a.verticalAlignment(y,x,!1),fe=M0(a,y,!1,!0)),y.reverse(),Me&&(a.verticalAlignment(y,x,!0),ne=M0(a,y,!0,!0)),ei(y),a.u(te,ne,ae,fe),a.network.vertexes.each(function(tt){var st=Hn();_e&&st.push(te.get(tt)),Me&&st.push(ne.get(tt)),Fe&&st.push(ae.get(tt)),Ye&&st.push(fe.get(tt)),st.sort(function(It,Mt){return It-Mt});var pt=st.length;pt=(st[Math.floor((pt-1)/2)]+st[Math.ceil((pt-1)/2)])/2,ei(st),tt.zc=pt})}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 Me=Ly(_e);if(0<Me.length){Me=Me[0].node===null;break e}}Me=!1}var Fe=Me;if(fe===ae.length-1||Fe){for(Me=ne.length-1,Fe&&(Me=Ly(_e)[0].index);te<=fe;){if(_e=ae[te],!_e.bo){Fe=[];for(var Ye=Nr(_e.sourceEdgesArrayAccess),tt=Ye.next();!tt.done;tt=Ye.next())tt=tt.value,tt.valid&&Fe.push(tt);_e.bo=Fe}for(_e=Nr(_e.bo),Fe=_e.next();!Fe.done;Fe=_e.next())Fe=Fe.value,Ye=Fe.fromVertex.index,(Ye<E||Ye>Me)&&y.add(Fe);te++}E=Me}}}vo.prototype.verticalAlignment=function(a,y,x){Kx(a),a=Nr(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=Nr(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(Fe,Ye){return Fe.vi-Ye.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],Me=void 0;Me=x?I0(_e,te):I0(te,_e),!y.contains(Me)&&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=Nr(y),ne=te.next();!ne.done;ne=te.next()){var ae=Nr(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=Nr(y),ae=te.next();!ae.done;ae=te.next()){ae=Nr(ae.value);for(var fe=ae.next();!fe.done;fe=ae.next())if(fe=fe.value,fe.root===fe){for(var _e=0,Me=fe;Me.align!==fe;){var Fe=Me.align,Ye=ne?Me.width:Me.height,tt=ne?Fe.width:Fe.height;if(x){var st=I0(Me,Fe),pt=st.portFromPos,It=st.portToPos;st.link!==null&&(Me.node&&Me.node!==st.link.fromNode&&(pt=ne?Me.focusX:Me.focusY),Fe.node&&Fe.node!==st.link.toNode&&(It=ne?Fe.focusX:Fe.focusY))}else st=I0(Fe,Me),pt=st.portToPos,It=st.portFromPos,st.link!==null&&(Me.node&&Me.node!==st.link.toNode&&(pt=ne?Me.focusX:Me.focusY),Fe.node&&Fe.node!==st.link.fromNode&&(It=ne?Fe.focusX:Fe.focusY));Ye=b?Me.qg+(Ye-pt)-(tt-It):Me.qg+pt-It,Fe.qg=Ye,_e=Math.min(_e,Ye),Me=Me.align}Me=fe;do Me.qg=Me.qg-_e,Me=Me.align;while(Me!==fe)}}for(x=Nr(y),ne=x.next();!ne.done;ne=x.next())for(te=Nr(ne.value),ne=te.next();!ne.done;ne=te.next())ne=ne.value,ne.root===ne&&nx(a,ne,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(ne=y[x][0],ne.sd===ne)){ne.sd.shift===1/0&&(ne.sd.shift=0),ne=x,ae=0;do{for(te=y[ne][ae];te.align!==te.root;)te=te.align,ne++,0<te.vi&&(ae=ix(te,y),ae.sd.shift=Math.min(ae.sd.shift,te.sd.shift+te.zc+te.qg-(ae.zc+ae.qg+(E?ae.width:ae.height)+a.columnSpacing)));ae=te.vi+1}while(ne<y.length&&ae<y[ne].length&&te.sd===y[ne][ae].sd)}for(a=new ci,y=Nr(y),ne=y.next();!ne.done;ne=y.next())for(x=Nr(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&&At("Could not determine previous vertex in layer"),y[x][a-1]}vo.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=Hn(),E=Hn(),te=1/0,ne=0;4>ne;ne++)if(y[ne]){var ae=Vx(this,y[ne],b,E,ne);ae<te&&(x=ne,te=ae)}for(te={},ne=0;4>ne;te={delta:te.delta},ne++)y[ne]&&(te.delta=ne===0||ne===2?b[x]-b[ne]:E[x]-E[ne],te.delta!==0&&y[ne].each(function(fe){return function(_e){_e.value+=fe.delta}}(te)));ei(b),ei(E)};function Vx(a,y,x,b,E){if(!y||y.count===0)return x[E]=0,b[E]=0,1/0;var te=1/0,ne=-1/0;return y.each(function(ae){var fe=ae.key;ae=ae.value,fe=a.K===90||a.K===270?fe.width:fe.height,ae<te&&(te=ae),ae+fe>ne&&(ne=ae+fe)}),x[E]=te,b[E]=ne,ne-te}vo.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=T0(this,!0),y=T0(this,!1),x=this.network.edges.iterator;x.next();){var b=x.value.link;b!==null&&(b.fromSpot=a,b.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function T0(a,y){return a.K===270?y?bs:Ks:a.K===90?y?Ks:bs:a.K===180?y?ks:Zs:y?Zs:ks}vo.prototype.commitNodes=function(){this.he=[],this.Ld=[],this.Kd=[],this.Ta=[];for(var a=0;a<=this.Ia;a++)this.he[a]=0,this.Ld[a]=0,this.Kd[a]=0,this.Ta[a]=0;for(a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;this.he[x]=Math.max(this.he[x],this.nodeMinLayerSpace(y,!0)),this.Ld[x]=Math.max(this.Ld[x],this.nodeMinLayerSpace(y,!1))}y=0,x=this.ie;for(var b=0;b<=this.Ia;b++){var E=x;0>=this.he[b]+this.Ld[b]&&(E=0),0<b&&(y+=E/2),this.K===90||this.K===0?(y+=this.Ld[b],this.Kd[b]=y,y+=this.he[b]):(y+=this.he[b],this.Kd[b]=y,y+=this.Ld[b]),b<this.Ia&&(y+=E/2),this.Ta[b]=y}for(x=y,y=this.arrangementOrigin,b=0;b<=this.Ia;b++)this.K===270?this.Kd[b]=y.y+this.Kd[b]:this.K===90?(this.Kd[b]=y.y+x-this.Kd[b],this.Ta[b]=x-this.Ta[b]):this.K===180?this.Kd[b]=y.x+this.Kd[b]:(this.Kd[b]=y.x+x-this.Kd[b],this.Ta[b]=x-this.Ta[b]);x=this.ve!==0,a.reset(),b=this.K===270||this.K===90;for(var te=1/0,ne=E=1/0,ae=-1/0;a.next();){var fe=a.value,_e=fe.layer,Me=fe.column|0;b?(ne=y.x+this.kc*Me,_e=this.Kd[_e]):(ne=this.Kd[_e],_e=y.y+this.kc*Me),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 Tt(x&&b?0:te,x&&!b?0:y),a.reset();a.next();)x=a.value,x.x+=te,x.y+=y,x.commit()},vo.prototype.Gu=function(){for(var a=0,y=this.ie,x=0;x<=this.Ia;x++)a+=this.he[x],a+=this.Ld[x];a+=this.Ia*y,y=[],x=this.ve!==0?this.xw:this.kc*this.Ra;for(var b=this.maxLayer;0<=b;b--)this.K===270?b===0?y.push(new 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)},vo.prototype.commitLayers=function(){},vo.prototype.commitLinks=function(){for(var a=this.network.edges.iterator,y;a.next();)y=a.value.link,y!==null&&(y.uh(),y.Fj(),y.zf());for(a.reset();a.next();)y=a.value.link,y!==null&&y.vg();for(a.reset();a.next();){var x=a.value;if(y=x.link,y!==null){y.uh();var b=y,E=b.fromNode,te=b.toNode,ne=b.fromPort,ae=b.toPort;if(E!==null){var fe=E.findVisibleNode();fe!==null&&fe!==E&&(E=fe,ne=fe.port)}te!==null&&(fe=te.findVisibleNode(),fe!==null&&fe!==te&&(te=fe,ae=fe.port));var _e=y.computeSpot(!0,ne);fe=y.computeSpot(!1,ae);var Me=x.fromVertex,Fe=x.toVertex;if(x.valid)y.curve===ou&&y.pointsCount===4&&(Me.column===Fe.column&&this.alignOption===0?(x=y.getLinkPoint(E,ne,_e,!0,!1,te,ae),ae=y.getLinkPoint(te,ae,fe,!1,!1,E,ne),x.w()||x.set(E.actualBounds.center),ae.w()||ae.set(te.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+ae.x)/3,(2*x.y+ae.y)/3),y.yf((x.x+2*ae.x)/3,(x.y+2*ae.y)/3),y.yf(ae.x,ae.y)):(x=b=!1,ne!==null&&_e===ms&&(b=!0),ae!==null&&fe===ms&&(x=!0),(b||x)&&(fe=null,b&&(fe=y.getLinkPointFromPoint(E,ne,ne.ga(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(Me.layer===Fe.layer)y.zf();else{var Ye=!1,tt=!1,st=this.ie,pt=y.firstPickIndex+1;if(y.isOrthogonal){tt=!0;var It=y.pointsCount;4<It&&y.points.removeRange(2,It-3)}else if(y.curve===ou)Ye=!0,It=y.pointsCount,4<It&&y.points.removeRange(2,It-3),It===4&&(pt=2);else{It=y.pointsCount;var Mt=_e===ms,Ht=fe===ms;2<It&&Mt&&Ht?y.points.removeRange(1,It-2):3<It&&Mt&&!Ht?y.points.removeRange(1,It-3):3<It&&!Mt&&Ht?y.points.removeRange(2,It-2):4<It&&!Mt&&!Ht&&y.points.removeRange(2,It-3)}if(x.rev){for(;Fe!==null&&Me!==Fe;){var Gt=It=null;for(Mt=Fe.sourceEdges.iterator;Mt.next()&&(Ht=Mt.value,Ht.link!==x.link||(It=Ht.fromVertex,Gt=Ht.toVertex,It.node!==null)););if(It===null)break;if(It!==Me){Mt=y.i(pt-1).x,Ht=y.i(pt-1).y;var Zt=It.centerX,Xt=It.centerY;if(tt)this.K===180||this.K===0?pt===y.firstPickIndex+1?(y.m(pt++,Mt,Ht),y.m(pt++,Mt,Xt)):(Gt!==null?Gt.centerY:Ht)!==Xt&&(Gt=this.Ta[It.layer-1]+this.Rf.x,y.m(pt++,Gt,Ht),y.m(pt++,Gt,Xt)):pt===y.firstPickIndex+1?(y.m(pt++,Mt,Ht),y.m(pt++,Zt,Ht)):(Gt!==null?Gt.centerX:Mt)!==Zt&&(Gt=this.Ta[It.layer-1]+this.Rf.y,y.m(pt++,Mt,Gt),y.m(pt++,Zt,Gt));else if(pt===y.firstPickIndex+1){Gt=Math.max(10,this.he[Fe.layer]);var pn=Math.max(10,this.Ld[Fe.layer]);if(Ye)this.K===180?Zt<=Fe.bounds.x?(Fe=Fe.bounds.x,y.m(pt++,Fe-Gt,Xt),y.m(pt++,Fe,Xt),y.m(pt++,Fe+pn,Xt)):(y.m(pt++,Zt-Gt,Xt),y.m(pt++,Zt,Xt),y.m(pt++,Zt+pn,Xt)):this.K===90?Xt>=Fe.bounds.bottom?(Fe=Fe.bounds.y+Fe.bounds.height,y.m(pt++,Zt,Fe+pn),y.m(pt++,Zt,Fe),y.m(pt++,Zt,Fe-Gt)):(y.m(pt++,Zt,Xt+pn),y.m(pt++,Zt,Xt),y.m(pt++,Zt,Xt-Gt)):this.K===270?Xt<=Fe.bounds.y?(Fe=Fe.bounds.y,y.m(pt++,Zt,Fe-Gt),y.m(pt++,Zt,Fe),y.m(pt++,Zt,Fe+pn)):(y.m(pt++,Zt,Xt-Gt),y.m(pt++,Zt,Xt),y.m(pt++,Zt,Xt+pn)):this.K===0&&(Zt>=Fe.bounds.right?(Fe=Fe.bounds.x+Fe.bounds.width,y.m(pt++,Fe+pn,Xt),y.m(pt++,Fe,Xt),y.m(pt++,Fe-Gt,Xt)):(y.m(pt++,Zt+pn,Xt),y.m(pt++,Zt,Xt),y.m(pt++,Zt-Gt,Xt)));else{y.m(pt++,Mt,Ht);var ii=0;this.K===180||this.K===0?((this.K===180?Zt>=Fe.bounds.right:Zt<=Fe.bounds.x)&&(ii=(this.K===0?-Gt:pn)/2),y.m(pt++,Mt+ii,Xt)):((this.K===270?Xt>=Fe.bounds.bottom:Xt<=Fe.bounds.y)&&(ii=(this.K===90?-Gt:pn)/2),y.m(pt++,Zt,Ht+ii)),y.m(pt++,Zt,Xt)}}else Gt=Math.max(10,this.he[It.layer]),pn=Math.max(10,this.Ld[It.layer]),Ye?this.K===180?(y.m(pt++,Zt-Gt-st,Xt),y.m(pt++,Math.min(Zt-Gt+st/2,Zt),Xt),y.m(pt++,Zt,Xt),y.m(pt++,Zt,Xt),y.m(pt++,Math.max(Zt+pn-st/2,Zt),Xt),y.m(pt++,Zt+pn+st,Xt)):this.K===90?(y.m(pt++,Zt,Xt+pn+st),y.m(pt++,Zt,Math.max(Xt+pn-st/2,Xt)),y.m(pt++,Zt,Xt),y.m(pt++,Zt,Xt),y.m(pt++,Zt,Math.min(Xt-Gt+st/2,Xt)),y.m(pt++,Zt,Xt-Gt-st)):this.K===270?(y.m(pt++,Zt,Xt-Gt-st),y.m(pt++,Zt,Math.min(Xt-Gt+st/2,Xt)),y.m(pt++,Zt,Xt),y.m(pt++,Zt,Xt),y.m(pt++,Zt,Math.max(Xt+pn-st/2,Xt)),y.m(pt++,Zt,Xt+pn+st)):(y.m(pt++,Zt+pn+st,Xt),y.m(pt++,Math.max(Zt+pn-st/2,Zt),Xt),y.m(pt++,Zt,Xt),y.m(pt++,Zt,Xt),y.m(pt++,Math.min(Zt-Gt+st/2,Zt),Xt),y.m(pt++,Zt-Gt-st,Xt)):y.m(pt++,Zt,Xt)}Fe=It}(ae===null||_e!==ms||tt)&&(Mt=y.i(pt-1).x,Ht=y.i(pt-1).y,Zt=y.i(pt).x,Xt=y.i(pt).y,tt?(st=this.Ld[Me.layer],this.K===180||this.K===0?(tt=Ht,tt>=Me.bounds.y&&tt<=Me.bounds.bottom&&(this.K===180?Zt>=Me.bounds.x:Zt<=Me.bounds.right)&&(Fe=Me.centerX+(this.K===180?-st:st),tt<Me.bounds.y+Me.bounds.height/2?tt=Me.bounds.y-this.kc/2:tt=Me.bounds.bottom+this.kc/2,y.m(pt++,Fe,Ht),y.m(pt++,Fe,tt)),y.m(pt++,Zt,tt)):(tt=Mt,tt>=Me.bounds.x&&tt<=Me.bounds.right&&(this.K===270?Xt>=Me.bounds.y:Xt<=Me.bounds.bottom)&&(Fe=Me.centerY+(this.K===270?-st:st),tt<Me.bounds.x+Me.bounds.width/2?tt=Me.bounds.x-this.kc/2:tt=Me.bounds.right+this.kc/2,y.m(pt++,Mt,Fe),y.m(pt++,tt,Fe)),y.m(pt++,tt,Xt)),y.m(pt++,Zt,Xt)):Ye?(Gt=Math.max(10,this.he[Me.layer]),pn=Math.max(10,this.Ld[Me.layer]),this.K===180&&Zt>=Me.bounds.x?(Fe=Me.bounds.x+Me.bounds.width,y.L(pt-2,Fe,Ht),y.L(pt-1,Fe+pn,Ht)):this.K===90&&Xt<=Me.bounds.bottom?(Fe=Me.bounds.y,y.L(pt-2,Mt,Fe),y.L(pt-1,Mt,Fe-Gt)):this.K===270&&Xt>=Me.bounds.y?(Fe=Me.bounds.y+Me.bounds.height,y.L(pt-2,Mt,Fe),y.L(pt-1,Mt,Fe+pn)):this.K===0&&Zt<=Me.bounds.right&&(Fe=Me.bounds.x,y.L(pt-2,Fe,Ht),y.L(pt-1,Fe-Gt,Ht))):(Gt=Math.max(10,this.he[Me.layer]),pn=Math.max(10,this.Ld[Me.layer]),tt=0,this.K===180||this.K===0?((this.K===180?Zt<=Me.bounds.x:Zt>=Me.bounds.right)&&(tt=(this.K===0?pn:-Gt)/2),y.m(pt++,Zt+tt,Ht)):((this.K===270?Xt<=Me.bounds.y:Xt>=Me.bounds.bottom)&&(tt=(this.K===90?pn:-Gt)/2),y.m(pt++,Mt,Xt+tt)),y.m(pt++,Zt,Xt)))}else{for(;Me!==null&&Me!==Fe;){for(Gt=It=null,Me=Me.destinationEdges.iterator;Me.next()&&(Mt=Me.value,Mt.link!==x.link||(It=Mt.toVertex,Gt=Mt.fromVertex,Gt.node!==null&&(Gt=null),It.node!==null)););if(It===null)break;It!==Fe&&(Mt=y.i(pt-1).x,Ht=y.i(pt-1).y,Zt=It.centerX,Xt=It.centerY,tt?this.K===180||this.K===0?(Gt!==null?Gt.centerY:Ht)!==Xt&&(Gt=this.Ta[It.layer]+this.Rf.x,pt===y.firstPickIndex+1&&(Gt=this.K===0?Math.max(Gt,Mt):Math.min(Gt,Mt)),y.m(pt++,Gt,Ht),y.m(pt++,Gt,Xt)):(Gt!==null?Gt.centerX:Mt)!==Zt&&(Gt=this.Ta[It.layer]+this.Rf.y,pt===y.firstPickIndex+1&&(Gt=this.K===90?Math.max(Gt,Ht):Math.min(Gt,Ht)),y.m(pt++,Mt,Gt),y.m(pt++,Zt,Gt)):(Gt=Math.max(10,this.he[It.layer]),pn=Math.max(10,this.Ld[It.layer]),Ye?this.K===180?(y.m(pt++,Zt+pn+st,Xt),y.m(pt++,Math.max(Zt+pn-st/2,Zt),Xt),y.m(pt++,Zt,Xt),y.m(pt++,Zt,Xt),y.m(pt++,Math.min(Zt-Gt+st/2,Zt),Xt),y.m(pt++,Zt-Gt-st,Xt)):this.K===90?(y.m(pt++,Zt,Xt-Gt-st),y.m(pt++,Zt,Math.min(Xt-Gt+st/2,Xt)),y.m(pt++,Zt,Xt),y.m(pt++,Zt,Xt),y.m(pt++,Zt,Math.max(Xt+pn-st/2,Xt)),y.m(pt++,Zt,Xt+pn+st)):this.K===270?(y.m(pt++,Zt,Xt+pn+st),y.m(pt++,Zt,Math.max(Xt+pn-st/2,Xt)),y.m(pt++,Zt,Xt),y.m(pt++,Zt,Xt),y.m(pt++,Zt,Math.min(Xt-Gt+st/2,Xt)),y.m(pt++,Zt,Xt-Gt-st)):(y.m(pt++,Zt-Gt-st,Xt),y.m(pt++,Math.min(Zt-Gt+st/2,Zt),Xt),y.m(pt++,Zt,Xt),y.m(pt++,Zt,Xt),y.m(pt++,Math.max(Zt+pn-st/2,Zt),Xt),y.m(pt++,Zt+pn+st,Xt)):this.K===180?(y.m(pt++,Zt+pn,Xt),y.m(pt++,Zt-Gt,Xt)):this.K===90?(y.m(pt++,Zt,Xt-Gt),y.m(pt++,Zt,Xt+pn)):this.K===270?(y.m(pt++,Zt,Xt+pn),y.m(pt++,Zt,Xt-Gt)):(y.m(pt++,Zt-Gt,Xt),y.m(pt++,Zt+pn,Xt)))),Me=It}tt&&(Mt=y.i(pt-1).x,Ht=y.i(pt-1).y,Zt=y.i(pt).x,Xt=y.i(pt).y,this.K===180||this.K===0?Ht!==Xt&&(Gt=this.K===0?Math.min(Math.max((Zt+Mt)/2,this.Ta[Fe.layer]+this.Rf.x),Zt):Math.max(Math.min((Zt+Mt)/2,this.Ta[Fe.layer]+this.Rf.x),Zt),y.m(pt++,Gt,Ht),y.m(pt++,Gt,Xt)):Mt!==Zt&&(Gt=this.K===90?Math.min(Math.max((Xt+Ht)/2,this.Ta[Fe.layer]+this.Rf.y),Xt):Math.max(Math.min((Xt+Ht)/2,this.Ta[Fe.layer]+this.Rf.y),Xt),y.m(pt++,Mt,Gt),y.m(pt++,Zt,Gt)))}b!==null&&Ye&&4<=y.pointsCount&&(ne!==null&&(ne=_e===ms?y.getLinkPointFromPoint(E,ne,ne.ga(Fr),y.i(3),!0):y.i(0),_e===ms&&(_e=y.i(2),b=y.i(3),this.direction===90||this.direction===270?(y.L(1,(ne.x+_e.x)/2,_e.y),y.L(2,b.x,(_e.y+b.y)/2)):(y.L(1,_e.x,(ne.y+_e.y)/2),y.L(2,(_e.x+b.x)/2,b.y))),ne.w()||ne.set(E.actualBounds.center),y.L(0,ne.x,ne.y)),ae!==null&&(E=fe===ms?y.getLinkPointFromPoint(te,ae,ae.ga(Fr),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),fe===ms&&(ae=y.i(y.pointsCount-3),fe=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(E.x+ae.x)/2,ae.y),y.L(y.pointsCount-2,fe.x,(ae.y+fe.y)/2)):(y.L(y.pointsCount-2,ae.x,(E.y+ae.y)/2),y.L(y.pointsCount-3,(ae.x+fe.x)/2,fe.y))),E.w()||E.set(te.actualBounds.center),y.L(y.pointsCount-1,E.x,E.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},vo.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new Bn,y=this.network.edges.iterator;y.next();){var x=y.value.link;x!==null&&x.isOrthogonal&&!a.contains(x)&&a.add(x)}if(0<a.count)if(this.K===90||this.K===270){for(y=0,x=[],a=a.iterator;a.next();){var b=a.value;if(b!==null&&b.isOrthogonal)for(var E=2;E<b.pointsCount-3;E++){var te=b.i(E),ne=b.i(E+1);if(this.B(te.y,ne.y)&&!this.B(te.x,ne.x)){var ae=new wd;ae.layer=Math.floor(te.y/2);var fe=b.i(0),_e=b.i(b.pointsCount-1);if(ae.first=fe.x*fe.x+fe.y,ae.jc=_e.x*_e.x+_e.y,ae.rd=Math.min(te.x,ne.x),ae.Ic=Math.max(te.x,ne.x),ae.index=E,ae.link=b,E+2<b.pointsCount){fe=b.i(E-1),_e=b.i(E+2);var Me=0;fe.y<te.y?Me=_e.y<te.y?3:te.x<ne.x?2:1:fe.y>te.y&&(Me=_e.y>te.y?0:ne.x<te.x?2:1),ae.j=Me}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),Me=1,ae=x[te].jc,fe=te;fe<E;fe++)_e=x[fe],_e.jc!==ae&&(Me++,ae=_e.jc);this.zi(x,this.Ux,te,te+ne);var Fe=1;for(ae=x[te].first,fe=te;fe<E;fe++)_e=x[fe],_e.first!==ae&&(Fe++,ae=_e.first);for(fe=!0,_e=Fe,Me<Fe?(fe=!1,_e=Me,ae=x[te].jc,this.zi(x,this.Js,te,te+ne)):ae=x[te].first,Me=0,Fe=te;Fe<E;Fe++){var Ye=x[Fe];(fe?Ye.first:Ye.jc)!==ae&&(Me++,ae=fe?Ye.first:Ye.jc);var tt=Ye.link;te=tt.i(Ye.index),ne=tt.i(Ye.index+1);var st=this.linkSpacing*(Me-(_e-1)/2);y++,tt.uh(),tt.L(Ye.index,te.x,te.y+st),tt.L(Ye.index+1,ne.x,ne.y+st),tt.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),Me=0,fe.x<te.x?Me=_e.x<te.x?3:te.y<ne.y?2:1:fe.x>te.x&&(Me=_e.x>te.x?0:ne.y<te.y?2:1),ae.j=Me),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),Me=1,ae=x[te].jc,fe=te;fe<E;fe++)_e=x[fe],_e.jc!==ae&&(Me++,ae=_e.jc);for(this.zi(x,this.Ux,te,te+ne),Fe=1,ae=x[te].first,fe=te;fe<E;fe++)_e=x[fe],_e.first!==ae&&(Fe++,ae=_e.first);for(fe=!0,_e=Fe,Me<Fe?(fe=!1,_e=Me,ae=x[te].jc,this.zi(x,this.Js,te,te+ne)):ae=x[te].first,Me=0,Fe=te;Fe<E;Fe++)Ye=x[Fe],(fe?Ye.first:Ye.jc)!==ae&&(Me++,ae=fe?Ye.first:Ye.jc),tt=Ye.link,te=tt.i(Ye.index),ne=tt.i(Ye.index+1),st=this.linkSpacing*(Me-(_e-1)/2),y++,tt.uh(),tt.L(Ye.index,te.x+st,te.y),tt.L(Ye.index+1,ne.x+st,ne.y),tt.zf()}te=E}a=b}}}},ot=vo.prototype,ot.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},ot.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},ot.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},ot.B=function(a,y){return a-=y,-1<a&&1>a},ot.zi=function(a,y,x,b){var E=a.length,te=b-x;if(!(1>=te))if((0>x||x>=E-1)&&At("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}Je.Object.defineProperties(vo.prototype,{layerSpacing:{get:function(){return this.ie},set:function(a){this.ie!==a&&0<=a&&(this.ie=a,this.C())}},columnSpacing:{get:function(){return this.kc},set:function(a){this.kc!==a&&0<a&&(this.kc=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K!==a&&(a===0||a===90||a===180||a===270?(this.K=a,this.C()):At("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 _n(vo,"CycleDepthFirst",0),xy=new _n(vo,"CycleGreedy",1),Wg=new _n(vo,"CycleFromLayers",2),A0=new _n(vo,"LayerOptimalLinkLength",0),wy=new _n(vo,"LayerLongestPathSink",1),by=new _n(vo,"LayerLongestPathSource",2),N0=new _n(vo,"InitDepthFirstOut",0),Cy=new _n(vo,"InitDepthFirstIn",1),Py=new _n(vo,"InitNaive",2),_y=new _n(vo,"AggressiveNone",0),O0=new _n(vo,"AggressiveLess",1),Ey=new _n(vo,"AggressiveMore",2),$x=8;vo.className="LayeredDigraphLayout",vo.CycleDepthFirst=k0,vo.CycleGreedy=xy,vo.CycleFromLayers=Wg,vo.LayerOptimalLinkLength=A0,vo.LayerLongestPathSink=wy,vo.LayerLongestPathSource=by,vo.InitDepthFirstOut=N0,vo.InitDepthFirstIn=Cy,vo.InitNaive=Py,vo.AggressiveNone=_y,vo.AggressiveLess=O0,vo.AggressiveMore=Ey,vo.PackNone=0,vo.PackExpand=1,vo.PackStraighten=2,vo.PackMedian=4,vo.PackAll=15,vo.AlignNone=0,vo.AlignUpperLeft=1,vo.AlignUpperRight=2,vo.AlignLowerLeft=4,vo.AlignLowerRight=8,vo.AlignAll=15;function wd(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}wd.className="SegInfo";function Np(a){To.call(this,a)}nt(Np,To),Np.prototype.createVertex=function(){return new bu(this)},Np.prototype.createEdge=function(){return new Zg(this)},Np.className="LayeredDigraphNetwork";function bu(a){aa.call(this,a),this.$n=this.bo=this.ao=this.co=null,this.Za=this.Ag=this.Ig=-1,this.u=NaN,this.F=null,this.valid=!1,this.finish=this.Ll=NaN,this.Dj=0,this.dv=this.ev=null}nt(bu,aa);function rx(a,y){return a.index-y.index}function I0(a,y){if(!a.$n){for(var x=[],b=Nr(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=Nr(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;At("Unable to find destination edge to given vertex")}function Ly(a){if(!a.co){for(var y=[],x=Nr(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=Nr(a.destinationEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.toVertex);y.sort(rx),a.ao=y}return a.ao}bu.prototype.Cl=function(a){aa.prototype.Cl.call(this,a),this.bo=this.co=null},bu.prototype.Kl=function(a){aa.prototype.Kl.call(this,a),this.bo=this.co=null},bu.prototype.zl=function(a){aa.prototype.zl.call(this,a),this.$n=this.ao=null},bu.prototype.Jl=function(a){aa.prototype.Jl.call(this,a),this.$n=this.ao=null},Je.Object.defineProperties(bu.prototype,{layer:{get:function(){return this.Ig},set:function(a){this.Ig!==a&&(this.Ig=a)}},column:{get:function(){return this.Ag},set:function(a){this.Ag!==a&&(this.Ag=a)}},index:{get:function(){return this.Za},set:function(a){this.Za!==a&&(this.Za=a)}},component:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},near:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}}}),bu.prototype.deleteDestinationEdge=bu.prototype.Jl,bu.prototype.addDestinationEdge=bu.prototype.zl,bu.prototype.deleteSourceEdge=bu.prototype.Kl,bu.prototype.addSourceEdge=bu.prototype.Cl,bu.className="LayeredDigraphVertex";function Zg(a){Gl.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}nt(Zg,Gl),Je.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 kr(a){es.call(this),this.Ub=new In,this.Wn=F0,this.ud=$c,this.vo=z0,this.Bq=Fy,this.$v=[],this.td=!0,this.Rb=H0,this.$d=new Qn(10,10).freeze();var y=new zf(this);this.W=new Fu(y),this.Y=new Fu(y),this.ru=[],a&&Object.assign(this,a)}nt(kr,es),kr.prototype.cloneProtected=function(a){es.prototype.cloneProtected.call(this,a),a.Wn=this.Wn,a.vo=this.vo,a.Bq=this.Bq,a.td=this.td,a.Rb=this.Rb,a.$d.assign(this.$d),a.W.copyInheritedPropertiesFrom(this.W),a.Y.copyInheritedPropertiesFrom(this.Y)},kr.prototype.qb=function(a){a.classType===kr?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:At("Unknown enum value: "+a):es.prototype.qb.call(this,a)},kr.prototype.createNetwork=function(){return new zf(this)},kr.prototype.makeNetwork=function(a){function y(b){if(b instanceof ri)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof Vn){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 fn?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof er?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},kr.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 fn&&(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 ri?(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}kr.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:At("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:At("Unhandled path value "+a.ud.toString())}}return b}function My(a,y){if(y!==null){switch(a.ud){case $c:if(0<y.destinationEdges.count){for(var x=new Bn,b=y.destinationVertexes;b.next();){var E=b.value;sx(a,y,E)&&x.add(E)}0<x.count&&(y.children=x.Fa())}break;case Ff:if(0<y.sourceEdges.count){for(x=new Bn,b=y.sourceVertexes;b.next();)E=b.value,sx(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:At("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}kr.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}}kr.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])}}kr.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])}}kr.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:At("Unhandled sorting value "+a.sorting.toString())}},kr.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},kr.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 Me=_e.value;Me.category==="Comment"&&Me.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(Me),Me.Va(),Me=Me.measuredBounds,y&&!x||!E&&!b&&x||E&&b&&x?(te=Math.max(te,Me.width),ne+=Me.height+Math.abs(ae)):(te+=Me.width+Math.abs(ae),ne=Math.max(ne,Me.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}kr.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,Me=_e.length,Fe=Tt.alloc(),Ye=0;Ye<Me;Ye++){var tt=_e[Ye],st=tt.measuredBounds;if(b&&!ne||!te&&!x&&ne||te&&x&&ne){if(135<E&&!te||x&&ae)if(0<=a.commentMargin)for(Fe.h(a.bounds.x-a.commentMargin-st.width,a.bounds.y+fe),tt.move(Fe),tt=tt.Sd();tt.next();){var pt=tt.value;pt.fromSpot=ks,pt.toSpot=Zs}else for(Fe.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+fe),tt.move(Fe),tt=tt.Sd();tt.next();)pt=tt.value,pt.fromSpot=Zs,pt.toSpot=ks;else if(0<=a.commentMargin)for(Fe.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+fe),tt.move(Fe),tt=tt.Sd();tt.next();)pt=tt.value,pt.fromSpot=Zs,pt.toSpot=ks;else for(Fe.h(a.bounds.x+a.commentMargin-st.width,a.bounds.y+fe),tt.move(Fe),tt=tt.Sd();tt.next();)pt=tt.value,pt.fromSpot=ks,pt.toSpot=Zs;fe=0<=a.commentSpacing?fe+(st.height+a.commentSpacing):fe+(a.commentSpacing-st.height)}else{if(135<E&&!te||!x&&ae)if(0<=a.commentMargin)for(Fe.h(a.bounds.x+fe,a.bounds.y-a.commentMargin-st.height),tt.move(Fe),tt=tt.Sd();tt.next();)pt=tt.value,pt.fromSpot=bs,pt.toSpot=Ks;else for(Fe.h(a.bounds.x+fe,a.bounds.y+2*a.focus.y-a.commentMargin),tt.move(Fe),tt=tt.Sd();tt.next();)pt=tt.value,pt.fromSpot=Ks,pt.toSpot=bs;else if(0<=a.commentMargin)for(Fe.h(a.bounds.x+fe,a.bounds.y+2*a.focus.y+a.commentMargin),tt.move(Fe),tt=tt.Sd();tt.next();)pt=tt.value,pt.fromSpot=Ks,pt.toSpot=bs;else for(Fe.h(a.bounds.x+fe,a.bounds.y+a.commentMargin-st.height),tt.move(Fe),tt=tt.Sd();tt.next();)pt=tt.value,pt.fromSpot=bs,pt.toSpot=Ks;fe=0<=a.commentSpacing?fe+(st.width+a.commentSpacing):fe+(a.commentSpacing-st.width)}}if(Tt.free(Fe),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)}},kr.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,Me=bd(fe),Fe=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var Ye=a.nodeSpacing,tt=this.computeNodeIndent(a),st=a.rowSpacing,pt=0;(b||_e||a.hm||a.im&&a.maxGenerationCount===1)&&(pt=Math.max(0,a.rowIndent)),b=a.width;var It=a.height,Mt=0,Ht=0,Gt=0,Zt=null,Xt=null,pn=0,ii=0,fi=0,li=0,Kn=0,Rn=0,Ji=0,Zi=0;if(Me&&!Kg(fe)&&135<E&&ne.reverse(),Kg(fe))if(1<ae)for(var to=0;to<ae;to++)to%2===0&&to!==ae-1&&(Zi=Math.max(Zi,y?ne[to].Da.width:ne[to].Da.height));else ae===1&&(Zi=y?ne[0].Da.width:ne[0].Da.height);if(Me){switch(fe){case Hh:Ht=135>E?hx(this,a,ne,Zi,Mt,Ht):dx(this,a,ne,Zi,Mt,Ht),Zi=Ht.x,Mt=Ht.width,Ht=Ht.height;break;case Uh:for(Zt=0;Zt<ae;Zt++)Xt=ne[Zt],Fe=Xt.Da,Gt=Rn===0?0:st,y?(Xt.S.h(te-Fe.width,li+Gt),Mt=Math.max(Mt,Fe.width),Ht=Math.max(Ht,li+Gt+Fe.height),li+=Gt+Fe.height):(Xt.S.h(fi+Gt,te-Fe.height),Mt=Math.max(Mt,fi+Gt+Fe.width),Ht=Math.max(Ht,Fe.height),fi+=Gt+Fe.width),Rn++;break;case fh:for(Zt=0;Zt<ae;Zt++)Xt=ne[Zt],te=Xt.Da,Fe=Rn===0?0:st,y?(Xt.S.h(Ye/2+a.focus.x,li+Fe),Mt=Math.max(Mt,te.width),Ht=Math.max(Ht,li+Fe+te.height),li+=Fe+te.height):(Xt.S.h(fi+Fe,Ye/2+a.focus.y),Mt=Math.max(Mt,fi+Fe+te.width),Ht=Math.max(Ht,te.height),fi+=Fe+te.width),Rn++}Zt=Tl(this,2),Xt=Tl(this,2),y?(Zt[0].h(0,0),Zt[1].h(0,Ht),Xt[0].h(Mt,0)):(Zt[0].h(0,0),Zt[1].h(Mt,0),Xt[0].h(0,Ht)),Xt[1].h(Mt,Ht)}else for(to=0;to<ae;to++){var _o=ne[to],ha=_o.Da;if(y){0<Fe&&0<Rn&&fi+Ye+ha.width>Fe&&(fi<te&&af(a,fe,te-fi,0,Ji,to-1),Kn++,Rn=0,Ji=to,Gt=Ht,fi=0,li=135<E?-Ht-st:Ht+st),R0(this,_o,0,li);var pa=0;if(Rn===0)Zt=_o.Yo,Xt=_o.kp,pn=ha.width,ii=ha.height,(Zt===null||Xt===null||E!==qu(_o))&&(Zt=Tl(this,2),Xt=Tl(this,2),Zt[0].h(0,0),Zt[1].h(0,ii),Xt[0].h(pn,0),Xt[1].h(pn,ii));else{var Xa=Hn();ii=fx(this,a,_o,Zt,Xt,pn,ii,Xa),pa=ii.x,Zt=Xa[0],Xt=Xa[1],pn=ii.width,ii=ii.height,ei(Xa),fi<ha.width&&0>pa&&(Bf(a,-pa,0,Ji,to-1),B0(Zt,-pa,0),B0(Xt,-pa,0),pa=0)}_o.S.h(pa,li),Mt=Math.max(Mt,pn),Ht=Math.max(Ht,Gt+(Kn===0?0:st)+ha.height),fi=pn}else 0<Fe&&0<Rn&&li+Ye+ha.height>Fe&&(li<te&&af(a,fe,0,te-li,Ji,to-1),Kn++,Rn=0,Ji=to,Gt=Mt,li=0,fi=135<E?-Mt-st:Mt+st),R0(this,_o,fi,0),pa=0,Rn===0?(Zt=_o.Yo,Xt=_o.kp,pn=ha.width,ii=ha.height,(Zt===null||Xt===null||E!==qu(_o))&&(Zt=Tl(this,2),Xt=Tl(this,2),Zt[0].h(0,0),Zt[1].h(pn,0),Xt[0].h(0,ii),Xt[1].h(pn,ii))):(Xa=Hn(),ii=fx(this,a,_o,Zt,Xt,pn,ii,Xa),pa=ii.x,Zt=Xa[0],Xt=Xa[1],pn=ii.width,ii=ii.height,ei(Xa),li<ha.height&&0>pa&&(Bf(a,0,-pa,Ji,to-1),B0(Zt,0,-pa),B0(Xt,0,-pa),pa=0)),_o.S.h(fi,pa),Ht=Math.max(Ht,ii),Mt=Math.max(Mt,Gt+(Kn===0?0:st)+ha.width),li=ii;Rn++}switch(0<Kn&&(y?(Ht+=Math.max(0,x),fi<Mt&&af(a,fe,Mt-fi,0,Ji,ae-1),0<pt&&(_e||Bf(a,pt,0,0,ae-1),Mt+=pt)):(Mt+=Math.max(0,x),li<Ht&&af(a,fe,0,Ht-li,Ji,ae-1),0<pt&&(_e||Bf(a,0,pt,0,ae-1),Ht+=pt))),pt=_e=0,fe){case Ip:y?_e+=Mt/2-a.focus.x-tt/2:pt+=Ht/2-a.focus.y-tt/2;break;case jf:0<Kn?y?_e+=Mt/2-a.focus.x-tt/2:pt+=Ht/2-a.focus.y-tt/2:y?(Zi=ne[0].S.x+ne[0].la.x,_e+=Zi+(ne[ae-1].S.x+ne[ae-1].la.x+2*ne[ae-1].focus.x-Zi)/2-a.focus.x-tt/2):(Zi=ne[0].S.y+ne[0].la.y,pt+=Zi+(ne[ae-1].S.y+ne[ae-1].la.y+2*ne[ae-1].focus.y-Zi)/2-a.focus.y-tt/2);break;case Yc:y?(_e-=tt,Mt+=tt):(pt-=tt,Ht+=tt);break;case Xc:y?(_e+=Mt-a.width+tt,Mt+=tt):(pt+=Ht-a.height+tt,Ht+=tt);break;case Hh:y?1<ae?_e+=Zi+Ye/2-a.focus.x:_e+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<ae?pt+=Zi+Ye/2-a.focus.y:pt+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case Uh:y?_e+=Mt+Ye/2-a.focus.x:pt+=Ht+Ye/2-a.focus.y;break;case fh:break;default:Ht=this.customAlignment(a,_e,pt,Mt,Ht),_e=Ht[0],pt=Ht[1],Mt=Ht[2],Ht=Ht[3]}for(tt=0;tt<ae;tt++)Zi=ne[tt],y?Zi.S.h(Zi.S.x+Zi.la.x-_e,Zi.S.y+(135<E?(Me?-Ht:-Zi.Da.height)+Zi.la.y-x:It+x+Zi.la.y)):Zi.S.h(Zi.S.x+(135<E?(Me?-Mt:-Zi.Da.width)+Zi.la.x-x:b+x+Zi.la.x),Zi.S.y+Zi.la.y-pt);if(ae=ne=0,Me?y?(Mt=ky(a,Mt,_e),0>_e&&(_e=0),135<E&&(pt+=Ht+x),Ht+=It+x,fe===fh&&(ne+=Ye/2+a.focus.x),ae+=It+x):(135<E&&(_e+=Mt+x),Mt+=b+x,Ht=Ay(a,Ht,pt),0>pt&&(pt=0),fe===fh&&(ae+=Ye/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&&(pt+=Ht+x),Ht=Math.max(Math.max(Ht,It),Ht+It+x),ae+=It+x):(135<E&&(_e+=Mt+x),Mt=Math.max(Math.max(Mt,b),Mt+b+x),a.comments===null?It>Ht&&(Ht=Ny(fe,0,It-Ht),ne=Ht.x,ae=Ht.y,Ht=It,pt=0):Ht=Ay(a,Ht,pt),0>pt&&(ae-=pt,pt=0),ne+=b+x),0<Kn)E=Tl(this,4),Kn=Tl(this,4),y?(E[2].h(0,It+x),E[3].h(E[2].x,Ht),Kn[2].h(Mt,E[2].y),Kn[3].h(Kn[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(Mt,E[2].y),Kn[2].h(E[2].x,Ht),Kn[3].h(E[3].x,Kn[2].y));else{for(E=Tl(this,Zt.length+2),Kn=Tl(this,Xt.length+2),fe=0;fe<Zt.length;fe++)Me=Zt[fe],E[fe+2].h(Me.x+ne,Me.y+ae);for(fe=0;fe<Xt.length;fe++)Me=Xt[fe],Kn[fe+2].h(Me.x+ne,Me.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])),Kn[0].h(_e+b,0),Kn[1].h(Kn[0].x,It),Kn[2].y<Kn[1].y&&(Kn[2].x<Kn[0].x?Kn[2].assign(Kn[1]):Kn[1].assign(Kn[2])),Kn[3].y<Kn[2].y&&(Kn[3].x<Kn[0].x?Kn[3].assign(Kn[2]):Kn[2].assign(Kn[3])),E[2].y-=x/2,Kn[2].y-=x/2):(E[0].h(0,pt),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])),Kn[0].h(0,pt+It),Kn[1].h(b,Kn[0].y),Kn[2].x<Kn[1].x&&(Kn[2].y<Kn[0].y?Kn[2].assign(Kn[1]):Kn[1].assign(Kn[2])),Kn[3].x<Kn[2].x&&(Kn[3].y<Kn[0].y?Kn[3].assign(Kn[2]):Kn[2].assign(Kn[3])),E[2].x-=x/2,Kn[2].x-=x/2),dc(this,Zt),dc(this,Xt),a.Yo=E,a.kp=Kn,a.la.h(_e,pt),a.Da.h(Mt,Ht)}break;default:At("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,Me=_e===Yc,Fe=_e===Xc;ae=bd(_e);var Ye=Math.max(0,y.breadthLimit);fe=a.computeLayerSpacing(y);var tt=y.nodeSpacing,st=a.computeNodeIndent(y),pt=Me||Fe?0:st/2,It=y.rowSpacing,Mt=0;(Me||Fe||y.hm||y.im&&y.maxGenerationCount===1)&&(Mt=Math.max(0,y.rowIndent)),Me=y.width;var Ht=y.height,Gt=0,Zt=0,Xt=0,pn=0,ii=0,fi=0,li=0,Kn=0,Rn=0,Ji=0;if(ae&&!Kg(_e)&&135<b&&E.reverse(),Kg(_e))if(1<ne)for(var Zi=0;Zi<ne;Zi++){var to=E[Zi],_o=to.Da;Zi%2===0&&Zi!==ne-1?Rn=Math.max(Rn,(x?_o.width:_o.height)+a.computeBusNodeSpacing(to)-tt):Zi%2!==0&&(Ji=Math.max(Ji,(x?_o.width:_o.height)+a.computeBusNodeSpacing(to)-tt))}else ne===1&&(Rn=x?E[0].Da.width:E[0].Da.height);if(ae)switch(_e){case Hh:case Jc:Zt=135>b?hx(a,y,E,Rn,Gt,Zt):dx(a,y,E,Rn,Gt,Zt),Rn=Zt.x,Gt=Zt.width,Zt=Zt.height;break;case Uh:for(Ye=0;Ye<ne;Ye++)pt=E[Ye],Xt=pt.Da,Ji=li===0?0:It,x?(pt.S.h(te-Xt.width,ii+Ji),Gt=Math.max(Gt,Xt.width),Zt=Math.max(Zt,ii+Ji+Xt.height),ii+=Ji+Xt.height):(pt.S.h(pn+Ji,te-Xt.height),Gt=Math.max(Gt,pn+Ji+Xt.width),Zt=Math.max(Zt,Xt.height),pn+=Ji+Xt.width),li++;break;case fh:for(te=0;te<ne;te++)Ye=E[te],pt=Ye.Da,Xt=li===0?0:It,x?(Ye.S.h(tt/2+y.focus.x,ii+Xt),Gt=Math.max(Gt,pt.width),Zt=Math.max(Zt,ii+Xt+pt.height),ii+=Xt+pt.height):(Ye.S.h(pn+Xt,tt/2+y.focus.y),Gt=Math.max(Gt,pn+Xt+pt.width),Zt=Math.max(Zt,pt.height),pn+=Xt+pt.width),li++}else for(Ji=0;Ji<ne;Ji++)Zi=E[Ji],to=Zi.Da,x?(0<Ye&&0<li&&pn+tt+to.width>Ye&&(pn<te&&af(y,_e,te-pn,0,Kn,Ji-1),fi++,li=0,Kn=Ji,Xt=Zt,pn=0,ii=135<b?-Zt-It:Zt+It),_o=li===0?pt:tt,R0(a,Zi,0,ii),Zi.S.h(pn+_o,ii),Gt=Math.max(Gt,pn+_o+to.width),Zt=Math.max(Zt,Xt+(fi===0?0:It)+to.height),pn+=_o+to.width):(0<Ye&&0<li&&ii+tt+to.height>Ye&&(ii<te&&af(y,_e,0,te-ii,Kn,Ji-1),fi++,li=0,Kn=Ji,Xt=Gt,ii=0,pn=135<b?-Gt-It:Gt+It),_o=li===0?pt:tt,R0(a,Zi,pn,0),Zi.S.h(pn,ii+_o),Zt=Math.max(Zt,ii+_o+to.height),Gt=Math.max(Gt,Xt+(fi===0?0:It)+to.width),ii+=_o+to.height),li++;switch(0<fi&&(x?(Zt+=Math.max(0,fe),pn<Gt&&af(y,_e,Gt-pn,0,Kn,ne-1),0<Mt&&(Fe||Bf(y,Mt,0,0,ne-1),Gt+=Mt)):(Gt+=Math.max(0,fe),ii<Zt&&af(y,_e,0,Zt-ii,Kn,ne-1),0<Mt&&(Fe||Bf(y,0,Mt,0,ne-1),Zt+=Mt))),Mt=Fe=0,_e){case Ip:x?Fe+=Gt/2-y.focus.x-st/2:Mt+=Zt/2-y.focus.y-st/2;break;case jf:0<fi?x?Fe+=Gt/2-y.focus.x-st/2:Mt+=Zt/2-y.focus.y-st/2:x?(a=E[0].S.x+E[0].la.x,Fe+=a+(E[ne-1].S.x+E[ne-1].la.x+2*E[ne-1].focus.x-a)/2-y.focus.x-st/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-st/2);break;case Yc:x?(Fe-=st,Gt+=st):(Mt-=st,Zt+=st);break;case Xc:x?(Fe+=Gt-y.width+st,Gt+=st):(Mt+=Zt-y.height+st,Zt+=st);break;case Hh:case Jc:x?1<ne?Fe+=Rn+tt/2-y.focus.x:Fe+=E[0].focus.x-y.focus.x+E[0].la.x:1<ne?Mt+=Rn+tt/2-y.focus.y:Mt+=E[0].focus.y-y.focus.y+E[0].la.y;break;case Uh:x?Fe+=Gt+tt/2-y.focus.x:Mt+=Zt+tt/2-y.focus.y;break;case fh:break;default:a=a.customAlignment(y,Fe,Mt,Gt,Zt),Fe=a[0],Mt=a[1],Gt=a[2],Zt=a[3]}for(a=0;a<ne;a++)st=E[a],x?st.S.h(st.S.x+st.la.x-Fe,st.S.y+(135<b?(ae?-Zt:-st.Da.height)+st.la.y-fe:Ht+fe+st.la.y)):st.S.h(st.S.x+(135<b?(ae?-Gt:-st.Da.width)+st.la.x-fe:Me+fe+st.la.x),st.S.y+st.la.y-Mt);x?(Gt=ky(y,Gt,Fe),0>Fe&&(Fe=0),135<b&&(Mt+=Zt+fe),Zt=Math.max(Math.max(Zt,Ht),Zt+Ht+fe)):(135<b&&(Fe+=Gt+fe),Gt=Math.max(Math.max(Gt,Me),Gt+Me+fe),Zt=Ay(y,Zt,Mt),0>Mt&&(Mt=0)),y.la.h(Fe,Mt),y.Da.h(Gt,Zt)}}kr.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,Me=0,Fe=0,Ye=0,tt=0;tt<ne;tt++)if(!(tt%2!==0||1<ne&&tt===ne-1)){var st=x[tt],pt=st.Da,It=Me===0?0:fe;if(_e){var Mt=a.computeBusNodeSpacing(st)-ae;st.S.h(b-(pt.width+Mt),Ye+It),E=Math.max(E,pt.width+Mt),te=Math.max(te,Ye+It+pt.height),Ye+=It+pt.height}else Mt=a.computeBusNodeSpacing(st)-ae,st.S.h(Fe+It,b-(pt.height+Mt)),te=Math.max(te,pt.height+Mt),E=Math.max(E,Fe+It+pt.width),Fe+=It+pt.width;Me++}for(Me=0,st=Fe,tt=Ye,_e?(Fe=b+ae,Ye=0):(Fe=0,Ye=b+ae),pt=0;pt<ne;pt++)if(pt%2!==0){It=x[pt],Mt=It.Da;var Ht=Me===0?0:fe;if(_e){var Gt=a.computeBusNodeSpacing(It)-ae;It.S.h(Fe+Gt,Ye+Ht),E=Math.max(E,Fe+Mt.width+Gt),te=Math.max(te,Ye+Ht+Mt.height),Ye+=Ht+Mt.height}else Gt=a.computeBusNodeSpacing(It)-ae,It.S.h(Fe+Ht,Ye+Gt),E=Math.max(E,Fe+Ht+Mt.width),te=Math.max(te,Ye+Mt.height+Gt),Fe+=Ht+Mt.width;Me++}return 1<ne&&ne%2===1&&(x=x[ne-1],ne=x.Da,a=a.computeBusLastRowSpacing(x,_e?Math.max(Math.abs(tt),Math.abs(Ye)):Math.max(Math.abs(st),Math.abs(Fe))),_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(tt,Ye)+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(st,Fe)+a+ne.width),Ye=b+ae/2-x.focus.y-x.la.y,te=Math.max(te,Ye+ne.height),0>Ye&&(te-=Ye),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,Me=0,Fe=0,Ye=0,tt=0;tt<ne;tt++)if(!(tt%2!==0||1<ne&&tt===ne-1)){var st=x[tt],pt=st.Da,It=Me===0?0:fe;if(_e){var Mt=a.computeBusNodeSpacing(st)-ae;Ye-=It+pt.height,st.S.h(b-(pt.width+Mt),Ye),E=Math.max(E,pt.width+Mt),te=Math.max(te,Math.abs(Ye))}else Mt=a.computeBusNodeSpacing(st)-ae,Fe-=It+pt.width,st.S.h(Fe,b-(pt.height+Mt)),te=Math.max(te,pt.height+Mt),E=Math.max(E,Math.abs(Fe));Me++}for(Me=0,st=Fe,tt=Ye,_e?(Fe=b+ae,Ye=0):(Fe=0,Ye=b+ae),pt=0;pt<ne;pt++)if(pt%2!==0){It=x[pt],Mt=It.Da;var Ht=Me===0?0:fe;if(_e){var Gt=a.computeBusNodeSpacing(It)-ae;Ye-=Ht+Mt.height,It.S.h(Fe+Gt,Ye),E=Math.max(E,Fe+Mt.width+Gt),te=Math.max(te,Math.abs(Ye))}else Gt=a.computeBusNodeSpacing(It)-ae,Fe-=Ht+Mt.width,It.S.h(Fe,Ye+Gt),te=Math.max(te,Ye+Mt.height+Gt),E=Math.max(E,Math.abs(Fe));Me++}for(1<ne&&ne%2===1&&(fe=x[ne-1],Me=fe.Da,a=a.computeBusLastRowSpacing(fe,_e?Math.max(Math.abs(tt),Math.abs(Ye)):Math.max(Math.abs(st),Math.abs(Fe))),_e?(fe.S.h(b+ae/2-fe.focus.x-fe.la.x,-te-Me.height-a),Fe=b+ae/2-fe.focus.x-fe.la.x,E=Math.max(E,Fe+Me.width),0>Fe&&(E-=Fe),te=Math.max(te,Math.abs(Math.min(tt,Ye))+a+Me.height),0>fe.S.x&&(b=D0(y,fe.S.x,!1,b,ae))):(fe.S.h(-E-Me.width-a,b+ae/2-fe.focus.y-fe.la.y),E=Math.max(E,Math.abs(Math.min(st,Fe))+a+Me.width),Ye=b+ae/2-fe.focus.y-fe.la.y,te=Math.max(te,Ye+Me.height),0>Ye&&(te-=Ye),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)}kr.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},kr.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:At("Unhandled alignment value "+a.toString())}return new Tt(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:At("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,Me=y.nodeSpacing;y=b;var Fe=E;b=te;var Ye=ne,tt=x.Yo,st=x.kp;ne=x.Da;var pt=_e?Math.max(Ye,ne.height):Math.max(b,ne.width);if((tt===null||fe!==qu(x))&&(tt=Tl(a,2),st=Tl(a,2),_e?(tt[0].h(0,0),tt[1].h(0,ne.height),st[0].h(ne.width,0),st[1].h(st[0].x,tt[1].y)):(tt[0].h(0,0),tt[1].h(ne.width,0),st[0].h(0,ne.height),st[1].h(tt[1].x,st[0].y))),_e){if(Ye=9999999,!(Fe===null||2>Fe.length||tt===null||2>tt.length))for(E=x=0;x<Fe.length&&E<tt.length;){te=Fe[x];var It=tt[E];fe=It.x,_e=It.y,fe+=b;var Mt=te;x+1<Fe.length&&(Mt=Fe[x+1]);var Ht=It;It=Ht.x,Ht=Ht.y,E+1<tt.length&&(Ht=tt[E+1],It=Ht.x,Ht=Ht.y,It+=b);var Gt=Ye;te.y===_e?Gt=fe-te.x:te.y>_e&&te.y<Ht?Gt=fe+(te.y-_e)/(Ht-_e)*(It-fe)-te.x:_e>te.y&&_e<Mt.y&&(Gt=fe-(te.x+(_e-te.y)/(Mt.y-te.y)*(Mt.x-te.x))),Gt<Ye&&(Ye=Gt),Mt.y<=te.y?x++:Ht<=_e?E++:(Mt.y<=Ht&&x++,Ht<=Mt.y&&E++)}if(Ye=b-Ye,Ye+=Me,x=tt,E=Ye,y===null||2>y.length||x===null||2>x.length)b=null;else{for(Me=Tl(a,y.length+x.length),b=te=fe=0;te<x.length&&x[te].y<y[0].y;)_e=x[te++],Me[b++].h(_e.x+E,_e.y);for(;fe<y.length;)_e=y[fe++],Me[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++],Me[b++].h(_e.x+E,_e.y);for(x=Tl(a,b),fe=0;fe<b;fe++)x[fe].assign(Me[fe]);dc(a,Me),b=x}if(te=st,fe=Ye,Fe===null||2>Fe.length||te===null||2>te.length)E=null;else{for(Me=Tl(a,Fe.length+te.length),E=_e=x=0;x<Fe.length&&Fe[x].y<te[0].y;)Mt=Fe[x++],Me[E++].h(Mt.x,Mt.y);for(;_e<te.length;)Mt=te[_e++],Me[E++].h(Mt.x+fe,Mt.y);for(te=te[te.length-1].y;x<Fe.length&&Fe[x].y<=te;)x++;for(;x<Fe.length&&Fe[x].y>te;)fe=Fe[x++],Me[E++].h(fe.x,fe.y);for(te=Tl(a,E),x=0;x<E;x++)te[x].assign(Me[x]);dc(a,Me),E=te}return te=Math.max(0,Ye)+ne.width,ne=pt,dc(a,y),dc(a,tt),dc(a,Fe),dc(a,st),ae[0]=b,ae[1]=E,new Tn(Ye,0,te,ne)}if(b=9999999,!(Fe===null||2>Fe.length||tt===null||2>tt.length))for(E=x=0;x<Fe.length&&E<tt.length;)te=Fe[x],It=tt[E],fe=It.x,_e=It.y,_e+=Ye,Mt=te,x+1<Fe.length&&(Mt=Fe[x+1]),Ht=It,It=Ht.x,Ht=Ht.y,E+1<tt.length&&(Ht=tt[E+1],It=Ht.x,Ht=Ht.y,Ht+=Ye),Gt=b,te.x===fe?Gt=_e-te.y:te.x>fe&&te.x<It?Gt=_e+(te.x-fe)/(It-fe)*(Ht-_e)-te.y:fe>te.x&&fe<Mt.x&&(Gt=_e-(te.y+(fe-te.x)/(Mt.x-te.x)*(Mt.y-te.y))),Gt<b&&(b=Gt),Mt.x<=te.x?x++:It<=fe?E++:(Mt.x<=It&&x++,It<=Mt.x&&E++);if(Ye-=b,Ye+=Me,x=tt,E=Ye,y===null||2>y.length||x===null||2>x.length)b=null;else{for(Me=Tl(a,y.length+x.length),b=te=fe=0;te<x.length&&x[te].x<y[0].x;)_e=x[te++],Me[b++].h(_e.x,_e.y+E);for(;fe<y.length;)_e=y[fe++],Me[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++],Me[b++].h(_e.x,_e.y+E);for(x=Tl(a,b),fe=0;fe<b;fe++)x[fe].assign(Me[fe]);dc(a,Me),b=x}if(te=st,fe=Ye,Fe===null||2>Fe.length||te===null||2>te.length)E=null;else{for(Me=Tl(a,Fe.length+te.length),E=_e=x=0;x<Fe.length&&Fe[x].x<te[0].x;)Mt=Fe[x++],Me[E++].h(Mt.x,Mt.y);for(;_e<te.length;)Mt=te[_e++],Me[E++].h(Mt.x,Mt.y+fe);for(te=te[te.length-1].x;x<Fe.length&&Fe[x].x<=te;)x++;for(;x<Fe.length&&Fe[x].x>te;)fe=Fe[x++],Me[E++].h(fe.x,fe.y);for(te=Tl(a,E),x=0;x<E;x++)te[x].assign(Me[x]);dc(a,Me),E=te}return te=pt,ne=Math.max(0,Ye)+ne.height,dc(a,y),dc(a,tt),dc(a,Fe),dc(a,st),ae[0]=b,ae[1]=E,new Tn(Ye,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 Tt;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)}kr.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:At("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:At("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)}}}kr.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},kr.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},kr.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 Tt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new Tt(-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)}},kr.prototype.commitLayers=function(){},kr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},kr.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])}}kr.prototype.setPortSpots=function(a){var y=a.alignment;if(bd(y)){var x=this.ud===$c,b=qu(a);switch(b){case 0:var E=Zs;break;case 90:E=Ks;break;case 180:E=ks;break;default:E=bs}var te=a.children,ne=te.length;switch(y){case Hh:case Jc:for(y=0;y<ne;y++){var ae=te[y];if(ae=(x?ae.sourceEdges:ae.destinationEdges).first(),ae!==null&&(ae=ae.link,ae!==null)){var fe=b===90||b===270?ks:bs;if(ne===1||y===ne-1&&ne%2===1)switch(b){case 0:fe=ks;break;case 90:fe=bs;break;case 180:fe=Zs;break;default:fe=Ks}else y%2===0&&(fe=b===90||b===270?Zs:Ks);x?(a.setsPortSpot&&(ae.fromSpot=E),a.setsChildPortSpot&&(ae.toSpot=fe)):(a.setsPortSpot&&(ae.fromSpot=fe),a.setsChildPortSpot&&(ae.toSpot=E))}}break;case Uh:for(b=b===90||b===270?Zs:Ks,te=x?a.destinationEdges:a.sourceEdges;te.next();)ne=te.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)):(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)));break;case fh:for(b=b===90||b===270?ks:bs,te=x?a.destinationEdges:a.sourceEdges;te.next();)ne=te.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)):(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)))}}else if(x=qu(a),this.ud===$c){for(E=a.destinationEdges;E.next();)if(b=E.value.link,b!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:b.fromSpot=Zs;break;case 90:b.fromSpot=Ks;break;case 180:b.fromSpot=ks;break;default:b.fromSpot=bs}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=ks;break;case 90:b.toSpot=bs;break;case 180:b.toSpot=Zs;break;default:b.toSpot=Ks}else b.toSpot=a.childPortSpot}}else for(E=a.sourceEdges;E.next();)if(b=E.value.link,b!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:b.toSpot=Zs;break;case 90:b.toSpot=Ks;break;case 180:b.toSpot=ks;break;default:b.toSpot=bs}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=ks;break;case 90:b.fromSpot=bs;break;case 180:b.fromSpot=Zs;break;default:b.fromSpot=Ks}else b.fromSpot=a.childPortSpot}};function qu(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}kr.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},kr.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)},Je.Object.defineProperties(kr.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()):At("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 _n(kr,"PathDefault",-1),$c=new _n(kr,"PathDestination",0),Ff=new _n(kr,"PathSource",1),Op=new _n(kr,"SortingForwards",10),Vg=new _n(kr,"SortingReverse",11),$g=new _n(kr,"SortingAscending",12),Yg=new _n(kr,"SortingDescending",13),Ip=new _n(kr,"AlignmentCenterSubtrees",20),jf=new _n(kr,"AlignmentCenterChildren",21),Yc=new _n(kr,"AlignmentStart",22),Xc=new _n(kr,"AlignmentEnd",23),Hh=new _n(kr,"AlignmentBus",24),Jc=new _n(kr,"AlignmentBusBranching",25),Uh=new _n(kr,"AlignmentTopLeftBus",26),fh=new _n(kr,"AlignmentBottomRightBus",27),j0=new _n(kr,"CompactionNone",30),Xg=new _n(kr,"CompactionBlock",31),z0=new _n(kr,"StyleLayered",40),Iy=new _n(kr,"StyleLastParents",41),Dy=new _n(kr,"StyleAlternating",42),Ry=new _n(kr,"StyleRootOnly",43),H0=new _n(kr,"ArrangementVertical",50),By=new _n(kr,"ArrangementHorizontal",51),U0=new _n(kr,"ArrangementFixedRoots",52),Fy=new _n(kr,"LayerIndividual",60),jy=new _n(kr,"LayerSiblings",61),G0=new _n(kr,"LayerUniform",62);kr.className="TreeLayout",kr.PathDefault=F0,kr.PathDestination=$c,kr.PathSource=Ff,kr.SortingForwards=Op,kr.SortingReverse=Vg,kr.SortingAscending=$g,kr.SortingDescending=Yg,kr.AlignmentCenterSubtrees=Ip,kr.AlignmentCenterChildren=jf,kr.AlignmentStart=Yc,kr.AlignmentEnd=Xc,kr.AlignmentBus=Hh,kr.AlignmentBusBranching=Jc,kr.AlignmentTopLeftBus=Uh,kr.AlignmentBottomRightBus=fh,kr.CompactionNone=j0,kr.CompactionBlock=Xg,kr.StyleLayered=z0,kr.StyleLastParents=Iy,kr.StyleAlternating=Dy,kr.StyleRootOnly=Ry,kr.ArrangementVertical=H0,kr.ArrangementHorizontal=By,kr.ArrangementFixedRoots=U0,kr.LayerIndividual=Fy,kr.LayerSiblings=jy,kr.LayerUniform=G0;function zf(a){To.call(this,a)}nt(zf,To),zf.prototype.createVertex=function(){return new Fu(this)},zf.prototype.createEdge=function(){return new Dp(this)},zf.className="TreeNetwork";function Fu(a){aa.call(this,a),this.V=!1,this.hb=null,this.u=[],this.nb=this.Ha=this.F=this.ia=0,this.td=null,this.S=new Tt(0,0),this.Da=new Qn(0,0),this.la=new Tt(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Op,this.hd=oy,this.Kb=0,this.Jb=jf,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Xg,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=oo,this.wr=!0,this.Dp=oo}nt(Fu,aa),Fu.prototype.copyInheritedPropertiesFrom=function(a){a!==null&&(this.nd=a.sorting,this.hd=a.comparer,this.Kb=a.angle,this.Jb=a.alignment,this.Uq=a.nodeIndent,this.Vq=a.nodeIndentPastParent,this.Wq=a.nodeSpacing,this.ie=a.layerSpacing,this.Aq=a.layerSpacingParentOverlap,this.Hp=a.compaction,this.Ap=a.breadthLimit,this.nr=a.rowSpacing,this.mr=a.rowIndent,this.Gp=a.commentSpacing,this.Fp=a.commentMargin,this.xr=a.setsPortSpot,this.dr=a.portSpot,this.wr=a.setsChildPortSpot,this.Dp=a.childPortSpot)},Je.Object.defineProperties(Fu.prototype,{initialized:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}},parent:{get:function(){return this.hb},set:function(a){this.hb!==a&&(this.hb=a)}},children:{get:function(){return this.u},set:function(a){if(this.u!==a){if(a!==null)for(var y=a.length,x=0;x<y;x++);this.u=a}}},level:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}},descendantCount:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}},maxChildrenCount:{get:function(){return this.Ha},set:function(a){this.Ha!==a&&(this.Ha=a)}},maxGenerationCount:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a)}},comments:{get:function(){return this.td},set:function(a){if(this.td!==a){if(a!==null)for(var y=a.length,x=0;x<y;x++);this.td=a}}},sorting:{get:function(){return this.nd},set:function(a){this.nd!==a&&(this.nd=a)}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a)}},angle:{get:function(){return this.Kb},set:function(a){this.Kb!==a&&(this.Kb=a)}},alignment:{get:function(){return this.Jb},set:function(a){this.Jb!==a&&(this.Jb=a)}},nodeIndent:{get:function(){return this.Uq},set:function(a){this.Uq!==a&&(this.Uq=a)}},nodeIndentPastParent:{get:function(){return this.Vq},set:function(a){this.Vq!==a&&(this.Vq=a)}},nodeSpacing:{get:function(){return this.Wq},set:function(a){this.Wq!==a&&(this.Wq=a)}},layerSpacing:{get:function(){return this.ie},set:function(a){this.ie!==a&&(this.ie=a)}},layerSpacingParentOverlap:{get:function(){return this.Aq},set:function(a){this.Aq!==a&&(this.Aq=a)}},compaction:{get:function(){return this.Hp},set:function(a){this.Hp!==a&&(this.Hp=a)}},breadthLimit:{get:function(){return this.Ap},set:function(a){this.Ap!==a&&(this.Ap=a)}},rowSpacing:{get:function(){return this.nr},set:function(a){this.nr!==a&&(this.nr=a)}},rowIndent:{get:function(){return this.mr},set:function(a){this.mr!==a&&(this.mr=a)}},commentSpacing:{get:function(){return this.Gp},set:function(a){this.Gp!==a&&(this.Gp=a)}},commentMargin:{get:function(){return this.Fp},set:function(a){this.Fp!==a&&(this.Fp=a)}},setsPortSpot:{get:function(){return this.xr},set:function(a){this.xr!==a&&(this.xr=a)}},portSpot:{get:function(){return this.dr},set:function(a){this.dr.D(a)||(this.dr=a)}},setsChildPortSpot:{get:function(){return this.wr},set:function(a){this.wr!==a&&(this.wr=a)}},childPortSpot:{get:function(){return this.Dp},set:function(a){this.Dp.D(a)||(this.Dp=a)}},childrenCount:{get:function(){return this.children.length}},relativePosition:{get:function(){return this.S},set:function(a){this.S.set(a)}},subtreeSize:{get:function(){return this.Da},set:function(a){this.Da.set(a)}},subtreeOffset:{get:function(){return this.la},set:function(a){this.la.set(a)}}}),Fu.className="TreeVertex";function Dp(a){Gl.call(this,a),this.$t=new Tt(0,0)}nt(Dp,Gl),Dp.prototype.commit=function(){var a=this.link;if(a!==null&&!a.isAvoiding){var y=this.network.layout,x=null,b=null;switch(y.ud){case $c:x=this.fromVertex,b=this.toVertex;break;case Ff:x=this.toVertex,b=this.fromVertex;break;default:At("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,Me;if(a.uh(),_e||fe){for(Me=2;4<a.pointsCount;)a.pv(2);var Fe=a.i(1),Ye=a.i(2)}else{for(Me=1;3<a.pointsCount;)a.pv(1);Fe=a.i(0),Ye=a.i(a.pointsCount-1)}var tt=a.i(a.pointsCount-1);te===0?(x.alignment===Xc?(te=b.bottom+E.y,E.y===0&&Fe.y>tt.y+x.rowIndent&&(te=Math.min(te,Math.max(Fe.y,te-y.computeNodeIndent(x))))):x.alignment===Yc?(te=b.top+E.y,E.y===0&&Fe.y<tt.y-x.rowIndent&&(te=Math.max(te,Math.min(Fe.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(Me,Fe.x,te),Me++,a.m(Me,b.right+ne,te),Me++,a.m(Me,b.right+ne+(E.x-ae)/3,te),Me++,a.m(Me,b.right+ne+2*(E.x-ae)/3,te),Me++,a.m(Me,b.right+ne+(E.x-ae),te),Me++,a.m(Me,Ye.x,te)):(_e&&(a.m(Me,b.right+ne/2,Fe.y),Me++),a.m(Me,b.right+ne/2,te),Me++,a.m(Me,b.right+ne+E.x-(_e?ae/2:ae),te),Me++,_e&&a.m(Me,a.i(Me-1).x,Ye.y))):te===90?(x.alignment===Xc?(te=b.right+E.x,E.x===0&&Fe.x>tt.x+x.rowIndent&&(te=Math.min(te,Math.max(Fe.x,te-y.computeNodeIndent(x))))):x.alignment===Yc?(te=b.left+E.x,E.x===0&&Fe.x<tt.x-x.rowIndent&&(te=Math.max(te,Math.min(Fe.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(Me,te,Fe.y),Me++,a.m(Me,te,b.bottom+ne),Me++,a.m(Me,te,b.bottom+ne+(E.y-ae)/3),Me++,a.m(Me,te,b.bottom+ne+2*(E.y-ae)/3),Me++,a.m(Me,te,b.bottom+ne+(E.y-ae)),Me++,a.m(Me,te,Ye.y)):(_e&&(a.m(Me,Fe.x,b.bottom+ne/2),Me++),a.m(Me,te,b.bottom+ne/2),Me++,a.m(Me,te,b.bottom+ne+E.y-(_e?ae/2:ae)),Me++,_e&&a.m(Me,Ye.x,a.i(Me-1).y))):te===180?(x.alignment===Xc?(te=b.bottom+E.y,E.y===0&&Fe.y>tt.y+x.rowIndent&&(te=Math.min(te,Math.max(Fe.y,te-y.computeNodeIndent(x))))):x.alignment===Yc?(te=b.top+E.y,E.y===0&&Fe.y<tt.y-x.rowIndent&&(te=Math.max(te,Math.min(Fe.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(Me,Fe.x,te),Me++,a.m(Me,b.left-ne,te),Me++,a.m(Me,b.left-ne+(E.x+ae)/3,te),Me++,a.m(Me,b.left-ne+2*(E.x+ae)/3,te),Me++,a.m(Me,b.left-ne+(E.x+ae),te),Me++,a.m(Me,Ye.x,te)):(_e&&(a.m(Me,b.left-ne/2,Fe.y),Me++),a.m(Me,b.left-ne/2,te),Me++,a.m(Me,b.left-ne+E.x+(_e?ae/2:ae),te),Me++,_e&&a.m(Me,a.i(Me-1).x,Ye.y))):te===270?(x.alignment===Xc?(te=b.right+E.x,E.x===0&&Fe.x>tt.x+x.rowIndent&&(te=Math.min(te,Math.max(Fe.x,te-y.computeNodeIndent(x))))):x.alignment===Yc?(te=b.left+E.x,E.x===0&&Fe.x<tt.x-x.rowIndent&&(te=Math.max(te,Math.min(Fe.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(Me,te,Fe.y),Me++,a.m(Me,te,b.top-ne),Me++,a.m(Me,te,b.top-ne+(E.y+ae)/3),Me++,a.m(Me,te,b.top-ne+2*(E.y+ae)/3),Me++,a.m(Me,te,b.top-ne+(E.y+ae)),Me++,a.m(Me,te,Ye.y)):(_e&&(a.m(Me,Fe.x,b.top-ne/2),Me++),a.m(Me,te,b.top-ne/2),Me++,a.m(Me,te,b.top-ne+E.y+(_e?ae/2:ae)),Me++,_e&&a.m(Me,Ye.x,a.i(Me-1).y))):At("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()))}}},Je.Object.defineProperties(Dp.prototype,{fromVertex:{get:function(){return this.kd},set:function(a){this.kd!==a&&(this.kd=a)}},toVertex:{get:function(){return this.qd},set:function(a){this.qd!==a&&(this.qd=a)}},relativePoint:{get:function(){return this.$t},set:function(a){this.$t.set(a)}}}),Dp.className="TreeEdge",Wo.prototype.initializeStandardTools=function(){this.gb("Action",new ti,this.mouseDownTools),this.gb("Relinking",new Wn,this.mouseDownTools),this.gb("LinkReshaping",new Zn,this.mouseDownTools),this.gb("Rotating",new Ai,this.mouseDownTools),this.gb("Resizing",new ki,this.mouseDownTools),this.gb("Linking",new vn,this.mouseMoveTools),this.gb("Dragging",new ns,this.mouseMoveTools),this.gb("DragSelecting",new Li,this.mouseMoveTools),this.gb("Panning",new bi,this.mouseMoveTools),this.gb("ContextMenu",new sr,this.mouseUpTools),this.gb("TextEditing",new Tr,this.mouseUpTools),this.gb("ClickCreating",new ji,this.mouseUpTools),this.gb("ClickSelecting",new rr,this.mouseUpTools)},kc("Horizontal",new ym),kc("Spot",new xm),kc("Table",new bm),kc("Viewbox",new _m),kc("TableRow",new Cm),kc("TableColumn",new Pm),kc("Graduated",new dg),kc("Grid",new hg),rp.add("GraphLinksModel",fa),rp.add("TreeModel",xu);var W0=Et.go,zy={get licenseKey(){return fn.licenseKey},set licenseKey(a){fn.licenseKey=a},get version(){return fn.version},Group:er,EnumValue:_n,List:Bn,Set:In,Map:ci,Point:Tt,Size:Qn,Rect:Tn,Margin:Mi,Spot:vi,Geometry:Yn,PathFigure:Vs,PathSegment:Vr,InputEvent:Ea,DiagramEvent:Pc,ChangedEvent:Go,Model:Si,GraphLinksModel:jr,TreeModel:ll,Binding:Hs,Transaction:Bs,UndoManager:Fo,CommandHandler:Ot,Tool:Gr,DraggingTool:ns,DraggingInfo:ah,DraggingOptions:pe,LinkingBaseTool:Lt,LinkingTool:vn,RelinkingTool:Wn,LinkReshapingTool:Zn,ResizingTool:ki,RotatingTool:Ai,ClickSelectingTool:rr,ActionTool:ti,ClickCreatingTool:ji,HTMLInfo:$i,ContextMenuTool:sr,DragSelectingTool:Li,PanningTool:bi,TextEditingTool:Tr,ToolManager:Wo,Animation:gs,AnimationManager:Lo,AnimationTrigger:zl,Layer:os,Diagram:fn,Palette:De,Overview:ze,Brush:fo,GraphObject:Qt,Panel:Gn,RowColumnDefinition:ta,Shape:hr,TextBlock:Mo,Picture:vl,Part:Ti,Adornment:Qr,Node:ri,Link:Vn,Placeholder:rl,Layout:es,LayoutNetwork:To,LayoutVertex:aa,LayoutEdge:Gl,GridLayout:Pa,PanelLayout:sa,CircularLayout:hs,CircularNetwork:kp,CircularVertex:zg,CircularEdge:P0,ForceDirectedLayout:Aa,ForceDirectedNetwork:Rf,ForceDirectedVertex:Hg,ForceDirectedEdge:Ug,LayeredDigraphLayout:vo,LayeredDigraphNetwork:Np,LayeredDigraphVertex:bu,LayeredDigraphEdge:Zg,TreeLayout:kr,TreeNetwork:zf,TreeVertex:Fu,TreeEdge:Dp};typeof W0=="object"&&W0.version&&Dn("WARNING: a `go` object on the root object is already defined. "+("Debug"in W0?"debug ":"")+"version: "+W0.version+", replaced with version: "+zy.version),fn.prototype.go=zy,Et.go=zy,typeof Cn.exports=="object"&&(Cn.exports=typeof Ee.g!="undefined"?Ee.g.go:self.go)}();var Le=typeof Ee.g!="undefined"?Ee.g.go:self.go;const me=typeof Ee.g!="undefined"?Ee.g.go:self.go,Ie=me.Group,Te=me.EnumValue,be=me.List,Pe=me.Set,he=me.Map,Se=me.Point,xe=me.Size,ge=me.Rect,ce=me.Margin,ve=me.Spot,de=me.Geometry,ue=me.PathFigure,z=me.PathSegment,ee=me.InputEvent,oe=me.DiagramEvent,ie=me.ChangedEvent,se=me.Model,le=me.GraphLinksModel,ye=me.TreeModel,we=me.Binding,Ce=me.Transaction,ke=me.UndoManager,Ne=me.CommandHandler,je=me.Tool,Ve=me.DraggingTool,Qe=me.DraggingInfo,Ge=me.LinkingBaseTool,mt=me.LinkingTool,ct=me.RelinkingTool,Ct=me.LinkReshapingTool,it=me.ResizingTool,St=me.RotatingTool,ut=me.ClickSelectingTool,Ft=me.ActionTool,ht=me.ClickCreatingTool,rt=me.HTMLInfo,dt=me.ContextMenuTool,yt=me.DragSelectingTool,_t=me.PanningTool,vt=me.TextEditingTool,Bt=me.ToolManager,jt=me.Animation,un=me.AnimationManager,Kt=me.AnimationTrigger,xn=me.Layer,Ut=me.Diagram,Wt=me.Palette,$t=me.Overview,ft=me.Brush,We=me.GraphObject,Be=me.Panel,qe=me.RowColumnDefinition,et=me.Shape,He=me.TextBlock,Xe=me.TextBlockMetrics,Re=me.Picture,Ae=me.Part,Ue=me.Adornment,Ke=me.Node,Ze=me.Link,lt=me.Placeholder,xt=me.Layout,tn=me.LayoutNetwork,en=me.LayoutVertex,Jt=me.LayoutEdge,gn=me.GridLayout,Mn=me.PanelLayout,yn=me.CircularLayout,kn=me.CircularNetwork,$n=me.CircularVertex,An=me.CircularEdge,oi=me.ForceDirectedLayout,ai=me.ForceDirectedNetwork,Di=me.ForceDirectedVertex,Pi=me.ForceDirectedEdge,Xi=me.LayeredDigraphLayout,or=me.LayeredDigraphNetwork,ar=me.LayeredDigraphVertex,dr=me.LayeredDigraphEdge,no=me.TreeLayout,Ir=me.TreeNetwork,xi=me.TreeVertex,wr=me.TreeEdge,Mr=me.version},24334:function(Cn,Yt,Ee){var Le,me;(function(Ie,Te){Cn.exports=Te(Ie)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof Ee.g!="undefined"?Ee.g:this,function(Ie){"use strict";Ie=Ie||{};var Te=Ie.Base64,be="2.6.4",Pe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",he=function(ct){for(var Ct={},it=0,St=ct.length;it<St;it++)Ct[ct.charAt(it)]=it;return Ct}(Pe),Se=String.fromCharCode,xe=function(ct){if(ct.length<2){var Ct=ct.charCodeAt(0);return Ct<128?ct:Ct<2048?Se(192|Ct>>>6)+Se(128|Ct&63):Se(224|Ct>>>12&15)+Se(128|Ct>>>6&63)+Se(128|Ct&63)}else{var Ct=65536+(ct.charCodeAt(0)-55296)*1024+(ct.charCodeAt(1)-56320);return Se(240|Ct>>>18&7)+Se(128|Ct>>>12&63)+Se(128|Ct>>>6&63)+Se(128|Ct&63)}},ge=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,ce=function(ct){return ct.replace(ge,xe)},ve=function(ct){var Ct=[0,2,1][ct.length%3],it=ct.charCodeAt(0)<<16|(ct.length>1?ct.charCodeAt(1):0)<<8|(ct.length>2?ct.charCodeAt(2):0),St=[Pe.charAt(it>>>18),Pe.charAt(it>>>12&63),Ct>=2?"=":Pe.charAt(it>>>6&63),Ct>=1?"=":Pe.charAt(it&63)];return St.join("")},de=Ie.btoa&&typeof Ie.btoa=="function"?function(ct){return Ie.btoa(ct)}:function(ct){if(ct.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return ct.replace(/[\s\S]{1,3}/g,ve)},ue=function(ct){return de(ce(String(ct)))},z=function(ct){return ct.replace(/[+\/]/g,function(Ct){return Ct=="+"?"-":"_"}).replace(/=/g,"")},ee=function(ct,Ct){return Ct?z(ue(ct)):ue(ct)},oe=function(ct){return ee(ct,!0)},ie;Ie.Uint8Array&&(ie=function(ct,Ct){for(var it="",St=0,ut=ct.length;St<ut;St+=3){var Ft=ct[St],ht=ct[St+1],rt=ct[St+2],dt=Ft<<16|ht<<8|rt;it+=Pe.charAt(dt>>>18)+Pe.charAt(dt>>>12&63)+(typeof ht!="undefined"?Pe.charAt(dt>>>6&63):"=")+(typeof rt!="undefined"?Pe.charAt(dt&63):"=")}return Ct?z(it):it});var se=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,le=function(ct){switch(ct.length){case 4:var Ct=(7&ct.charCodeAt(0))<<18|(63&ct.charCodeAt(1))<<12|(63&ct.charCodeAt(2))<<6|63&ct.charCodeAt(3),it=Ct-65536;return Se((it>>>10)+55296)+Se((it&1023)+56320);case 3:return Se((15&ct.charCodeAt(0))<<12|(63&ct.charCodeAt(1))<<6|63&ct.charCodeAt(2));default:return Se((31&ct.charCodeAt(0))<<6|63&ct.charCodeAt(1))}},ye=function(ct){return ct.replace(se,le)},we=function(ct){var Ct=ct.length,it=Ct%4,St=(Ct>0?he[ct.charAt(0)]<<18:0)|(Ct>1?he[ct.charAt(1)]<<12:0)|(Ct>2?he[ct.charAt(2)]<<6:0)|(Ct>3?he[ct.charAt(3)]:0),ut=[Se(St>>>16),Se(St>>>8&255),Se(St&255)];return ut.length-=[0,0,2,1][it],ut.join("")},Ce=Ie.atob&&typeof Ie.atob=="function"?function(ct){return Ie.atob(ct)}:function(ct){return ct.replace(/\S{1,4}/g,we)},ke=function(ct){return Ce(String(ct).replace(/[^A-Za-z0-9\+\/]/g,""))},Ne=function(ct){return ye(Ce(ct))},je=function(ct){return String(ct).replace(/[-_]/g,function(Ct){return Ct=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ve=function(ct){return Ne(je(ct))},Qe;Ie.Uint8Array&&(Qe=function(ct){return Uint8Array.from(ke(je(ct)),function(Ct){return Ct.charCodeAt(0)})});var Ge=function(){var ct=Ie.Base64;return Ie.Base64=Te,ct};if(Ie.Base64={VERSION:be,atob:ke,btoa:de,fromBase64:Ve,toBase64:ee,utob:ce,encode:ee,encodeURI:oe,btou:ye,decode:Ve,noConflict:Ge,fromUint8Array:ie,toUint8Array:Qe},typeof Object.defineProperty=="function"){var mt=function(ct){return{value:ct,enumerable:!1,writable:!0,configurable:!0}};Ie.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",mt(function(){return Ve(this)})),Object.defineProperty(String.prototype,"toBase64",mt(function(ct){return ee(this,ct)})),Object.defineProperty(String.prototype,"toBase64URI",mt(function(){return ee(this,!0)}))}}return Ie.Meteor&&(Base64=Ie.Base64),Cn.exports?Cn.exports.Base64=Ie.Base64:(Le=[],me=function(){return Ie.Base64}.apply(Yt,Le),me!==void 0&&(Cn.exports=me)),{Base64:Ie.Base64}})},2859:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{hP:function(){return $t}});var Le=function(ft,We){return(Le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Be,qe){Be.__proto__=qe}||function(Be,qe){for(var et in qe)Object.prototype.hasOwnProperty.call(qe,et)&&(Be[et]=qe[et])})(ft,We)};function me(ft,We){function Be(){this.constructor=ft}Le(ft,We),ft.prototype=We===null?Object.create(We):(Be.prototype=We.prototype,new Be)}function Ie(ft,We,Be,qe){return new(Be||(Be=Promise))(function(et,He){function Xe(Ue){try{Ae(qe.next(Ue))}catch(Ke){He(Ke)}}function Re(Ue){try{Ae(qe.throw(Ue))}catch(Ke){He(Ke)}}function Ae(Ue){var Ke;Ue.done?et(Ue.value):(Ke=Ue.value,Ke instanceof Be?Ke:new Be(function(Ze){Ze(Ke)})).then(Xe,Re)}Ae((qe=qe.apply(ft,We||[])).next())})}function Te(ft,We){var Be,qe,et,He,Xe={label:0,sent:function(){if(1&et[0])throw et[1];return et[1]},trys:[],ops:[]};return He={next:Re(0),throw:Re(1),return:Re(2)},typeof Symbol=="function"&&(He[Symbol.iterator]=function(){return this}),He;function Re(Ae){return function(Ue){return function(Ke){if(Be)throw new TypeError("Generator is already executing.");for(;Xe;)try{if(Be=1,qe&&(et=2&Ke[0]?qe.return:Ke[0]?qe.throw||((et=qe.return)&&et.call(qe),0):qe.next)&&!(et=et.call(qe,Ke[1])).done)return et;switch(qe=0,et&&(Ke=[2&Ke[0],et.value]),Ke[0]){case 0:case 1:et=Ke;break;case 4:return Xe.label++,{value:Ke[1],done:!1};case 5:Xe.label++,qe=Ke[1],Ke=[0];continue;case 7:Ke=Xe.ops.pop(),Xe.trys.pop();continue;default:if(et=Xe.trys,!((et=et.length>0&&et[et.length-1])||Ke[0]!==6&&Ke[0]!==2)){Xe=0;continue}if(Ke[0]===3&&(!et||Ke[1]>et[0]&&Ke[1]<et[3])){Xe.label=Ke[1];break}if(Ke[0]===6&&Xe.label<et[1]){Xe.label=et[1],et=Ke;break}if(et&&Xe.label<et[2]){Xe.label=et[2],Xe.ops.push(Ke);break}et[2]&&Xe.ops.pop(),Xe.trys.pop();continue}Ke=We.call(ft,Xe)}catch(Ze){Ke=[6,Ze],qe=0}finally{Be=et=0}if(5&Ke[0])throw Ke[1];return{value:Ke[0]?Ke[1]:void 0,done:!0}}([Ae,Ue])}}}function be(){for(var ft=0,We=0,Be=arguments.length;We<Be;We++)ft+=arguments[We].length;var qe=Array(ft),et=0;for(We=0;We<Be;We++)for(var He=arguments[We],Xe=0,Re=He.length;Xe<Re;Xe++,et++)qe[et]=He[Xe];return qe}var Pe=function(){function ft(){}return ft.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ft.setAttributes=function(We,Be){for(var qe=0,et=Be;qe<et.length;qe++){var He=et[qe],Xe=He[0],Re=He[1];We.setAttribute(Xe,Re)}},ft.createRect=function(We,Be,qe){var et=document.createElementNS("http://www.w3.org/2000/svg","rect");return et.setAttribute("width",We.toString()),et.setAttribute("height",Be.toString()),qe&&ft.setAttributes(et,qe),et},ft.createLine=function(We,Be,qe,et,He){var Xe=document.createElementNS("http://www.w3.org/2000/svg","line");return Xe.setAttribute("x1",We.toString()),Xe.setAttribute("y1",Be.toString()),Xe.setAttribute("x2",qe.toString()),Xe.setAttribute("y2",et.toString()),He&&ft.setAttributes(Xe,He),Xe},ft.createPolygon=function(We,Be){var qe=document.createElementNS("http://www.w3.org/2000/svg","polygon");return qe.setAttribute("points",We),Be&&ft.setAttributes(qe,Be),qe},ft.createCircle=function(We,Be){var qe=document.createElementNS("http://www.w3.org/2000/svg","circle");return qe.setAttribute("cx",(We/2).toString()),qe.setAttribute("cy",(We/2).toString()),qe.setAttribute("r",We.toString()),Be&&ft.setAttributes(qe,Be),qe},ft.createEllipse=function(We,Be,qe){var et=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return et.setAttribute("cx",(We/2).toString()),et.setAttribute("cy",(Be/2).toString()),et.setAttribute("rx",(We/2).toString()),et.setAttribute("ry",(Be/2).toString()),qe&&ft.setAttributes(et,qe),et},ft.createGroup=function(We){var Be=document.createElementNS("http://www.w3.org/2000/svg","g");return We&&ft.setAttributes(Be,We),Be},ft.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ft.createMarker=function(We,Be,qe,et,He,Xe,Re){var Ae=document.createElementNS("http://www.w3.org/2000/svg","marker");return ft.setAttributes(Ae,[["id",We],["orient",Be],["markerWidth",qe.toString()],["markerHeight",et.toString()],["refX",He.toString()],["refY",Xe.toString()]]),Ae.appendChild(Re),Ae},ft.createText=function(We){var Be=document.createElementNS("http://www.w3.org/2000/svg","text");return Be.setAttribute("x","0"),Be.setAttribute("y","0"),We&&ft.setAttributes(Be,We),Be},ft.createTSpan=function(We,Be){var qe=document.createElementNS("http://www.w3.org/2000/svg","tspan");return qe.textContent=We,Be&&ft.setAttributes(qe,Be),qe},ft.createImage=function(We){var Be=document.createElementNS("http://www.w3.org/2000/svg","image");return We&&ft.setAttributes(Be,We),Be},ft.createPoint=function(We,Be){var qe=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return qe.x=We,qe.y=Be,qe},ft.createPath=function(We,Be){var qe=document.createElementNS("http://www.w3.org/2000/svg","path");return qe.setAttribute("d",We),Be&&ft.setAttributes(qe,Be),qe},ft}(),he=function(){function ft(){}return ft.addKey=function(We){ft.key=We},Object.defineProperty(ft,"isLicensed",{get:function(){return!!ft.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ft.key)},enumerable:!1,configurable:!0}),ft}(),Se=function(){function ft(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ft.prototype.rasterize=function(We,Be,qe){var et=this;return new Promise(function(He){var Xe=qe!==void 0?qe:document.createElement("canvas");We===null&&(et.markersOnly=!0,et.naturalSize=!1);var Re=document.createElementNS("http://www.w3.org/2000/svg","svg");Re.setAttribute("xmlns","http://www.w3.org/2000/svg"),Re.setAttribute("width",Be.width.baseVal.valueAsString),Re.setAttribute("height",Be.height.baseVal.valueAsString),Re.setAttribute("viewBox","0 0 "+Be.viewBox.baseVal.width.toString()+" "+Be.viewBox.baseVal.height.toString()),Re.innerHTML=Be.innerHTML,et.naturalSize===!0?(Re.width.baseVal.value=We.naturalWidth,Re.height.baseVal.value=We.naturalHeight):et.width!==void 0&&et.height!==void 0&&(Re.width.baseVal.value=et.width,Re.height.baseVal.value=et.height),Xe.width=Re.width.baseVal.value,Xe.height=Re.height.baseVal.value;var Ae=Re.outerHTML,Ue=Xe.getContext("2d");et.markersOnly!==!0&&Ue.drawImage(We,0,0,Xe.width,Xe.height);var Ke=window.URL,Ze=new Image(Xe.width,Xe.height);Ze.setAttribute("crossOrigin","anonymous");var lt=new Blob([Ae],{type:"image/svg+xml"}),xt=Ke.createObjectURL(lt);Ze.onload=function(){Ue.drawImage(Ze,0,0),Ke.revokeObjectURL(xt);var tn=Xe.toDataURL(et.imageType,et.imageQuality);He(tn)},Ze.src=xt})},ft}(),xe=function(){},ge=function(){function ft(We){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+We+"_"}return Object.defineProperty(ft.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ft.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ft.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(ft.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ft.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),ft.prototype.addClass=function(We){return this.styleSheet===void 0&&this.addStyleSheet(),We.name=""+this.classNamePrefix+We.localName,this.classes.push(We),this.styleSheet.sheet.insertRule("."+We.name+" {"+We.style+"}",this.styleSheet.sheet.cssRules.length),We},ft.prototype.addRule=function(We){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(We),this.styleSheet.sheet.insertRule(We.selector+" {"+We.style+"}",this.styleSheet.sheet.cssRules.length)},ft.prototype.addStyleSheet=function(){var We;this.styleSheet=document.createElement("style"),((We=this.styleSheetRoot)!==null&&We!==void 0?We:document.head).appendChild(this.styleSheet),this.addRule(new ce("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new ce("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new ce("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new ve("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new ve("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},ft.prototype.removeStyleSheet=function(){var We;this.styleSheet&&(((We=this.styleSheetRoot)!==null&&We!==void 0?We:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ft}(),ce=function(ft,We){this.selector=ft,this.style=We},ve=function(ft,We){this.localName=ft,this.style=We},de=function(){function ft(We,Be,qe,et,He){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=We,this.displayMode=Be,this.markerItems=qe,this.uiStyleSettings=et,this.styles=He,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return ft.prototype.show=function(We){var Be=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=We,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var qe=document.createElement("div");qe.className=this.toolbarBlockStyleClass.name,qe.style.whiteSpace="nowrap",this.uiContainer.appendChild(qe),this.addActionButton(qe,'<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(qe,'<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(qe,'<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(qe,'<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(qe,'<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(qe,'<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(qe,'<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(qe,'<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(He){var Xe=document.createElement("div");Xe.className=""+Be.toolbarButtonStyleClass.name,Xe.setAttribute("data-type-name",He.typeName),Xe.innerHTML=He.icon,Xe.addEventListener("click",function(){Be.markerToolbarButtonClicked(Xe,He)}),Be.buttons.push(Xe),Be.markerButtons.push(Xe)}),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 et=document.createElement("div");et.className=this.toolbarBlockStyleClass.name,et.style.whiteSpace="nowrap",et.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(et),this.addActionButton(et,'<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(et,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},ft.prototype.addButtonClickListener=function(We){this.buttonClickListeners.push(We)},ft.prototype.removeButtonClickListener=function(We){this.buttonClickListeners.indexOf(We)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(We),1)},ft.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ft.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var We=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Be=0;Be<this.markerButtons.length;Be++)Be<We||Be===We&&this.markerButtons.length-1===We?this.markerButtonBlock.appendChild(this.markerButtons[Be]):(Be===We&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Be]))}},ft.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},ft.prototype.resetButtonStyles=function(){var We=this;this.buttons.forEach(function(Be){Be.className=Be.className.replace(We.uiStyleSettings.toolbarButtonStyleColorsClassName?We.uiStyleSettings.toolbarButtonStyleColorsClassName:We.toolbarButtonStyleColorsClass.name,"").trim(),Be.className=Be.className.replace(We.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?We.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:We.toolbarActiveButtonStyleColorsClass.name,"").trim(),Be.className+=" "+(We.uiStyleSettings.toolbarButtonStyleColorsClassName?We.uiStyleSettings.toolbarButtonStyleColorsClassName:We.toolbarButtonStyleColorsClass.name)})},ft.prototype.addActionButton=function(We,Be,qe){var et=this,He=document.createElement("div");switch(He.className=""+this.toolbarButtonStyleClass.name,He.innerHTML=Be,He.setAttribute("data-action",qe),He.addEventListener("click",function(){et.actionToolbarButtonClicked(He,qe)}),qe){case"select":He.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":He.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":He.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":He.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":He.style.fill=this.uiStyleSettings.closeButtonColor}We.appendChild(He),this.buttons.push(He)},ft.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ve("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 ve("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ve("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ve("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 ve("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var We=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ve("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*We)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*We)+`px;
|
|
|
padding: `+We+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ve("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ve("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new ce("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new ce("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},ft.prototype.markerToolbarButtonClicked=function(We,Be){this.setActiveButton(We),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(qe){return qe("marker",Be)}),this.markerButtonOverflowBlock.style.display="none"},ft.prototype.actionToolbarButtonClicked=function(We,Be){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(qe){return qe("action",Be)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ft.prototype.setActiveButton=function(We){this.resetButtonStyles(),We.className=We.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),We.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ft.prototype.setActiveMarkerButton=function(We){var Be=this.markerButtons.find(function(qe){return qe.getAttribute("data-type-name")===We});Be&&this.setActiveButton(Be)},ft.prototype.setCurrentMarker=function(We){var Be=this;this.currentMarker=We,this.buttons.filter(function(qe){return/delete|notes/.test(qe.getAttribute("data-action"))}).forEach(function(qe){Be.currentMarker===void 0?(qe.style.fillOpacity="0.4",qe.style.pointerEvents="none"):(qe.style.fillOpacity="1",qe.style.pointerEvents="all")})},ft}(),ue=function(){function ft(We,Be,qe,et){this.panels=[],this.panelButtons=[],this.markerjsContainer=We,this.displayMode=Be,this.uiStyleSettings=qe,this.styles=et,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ft.prototype.addStyles=function(){var We;this.toolboxStyleClass=this.styles.addClass(new ve("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 ve("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var Be=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ve("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ve("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ve("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 ve("toolbox-panel-row_colors",`
|
|
|
background-color: `+((We=this.uiStyleSettings.toolboxBackgroundColor)!==null&&We!==void 0?We:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ve("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Be)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Be)+`px;
|
|
|
padding: `+Be+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ve("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ve("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new ce("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new ce("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},ft.prototype.show=function(We){var Be;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=We,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Be=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Be!==void 0?Be:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ft.prototype.setPanelButtons=function(We){var Be,qe,et=this;this.panels=We,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Be=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Be!==void 0?Be:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((qe=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&qe!==void 0?qe:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(He){var Xe;He.uiStyleSettings=et.uiStyleSettings;var Re=document.createElement("div");Re.className=et.toolboxButtonStyleClass.name+" "+((Xe=et.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Xe!==void 0?Xe:et.toolboxButtonStyleColorsClass.name),Re.innerHTML=He.icon,Re.title=He.title,Re.addEventListener("click",function(){et.panelButtonClick(He)}),et.panelButtons.push(Re),et.buttonRow.appendChild(Re)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ft.prototype.panelButtonClick=function(We){var Be=this,qe=-1;if(We!==this.activePanel){qe=this.panels.indexOf(We),this.panelRow.innerHTML="";var et=We.getUi();et.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(et),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=We}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Be.displayMode==="inline"?Be.panelRow.style.display="none":Be.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(He,Xe){var Re,Ae;He.className=Be.toolboxButtonStyleClass.name+" "+(Xe===qe?""+((Re=Be.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Re!==void 0?Re:Be.toolboxActiveButtonStyleColorsClass.name):""+((Ae=Be.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ae!==void 0?Ae:Be.toolboxButtonStyleColorsClass.name))})},ft}(),z=function(ft,We){this.title=ft,this.icon=We},ee=function(ft){function We(Be,qe,et,He){var Xe=ft.call(this,Be,He||'<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 Xe.colors=[],Xe.addTransparent=!1,Xe.colorBoxes=[],Xe.colors=qe,Xe.currentColor=et,Xe.setCurrentColor=Xe.setCurrentColor.bind(Xe),Xe.getColorBox=Xe.getColorBox.bind(Xe),Xe}return me(We,ft),We.prototype.getUi=function(){var Be=this,qe=document.createElement("div");return qe.style.overflow="hidden",qe.style.whiteSpace="nowrap",this.colors.forEach(function(et){var He=Be.getColorBox(et);qe.appendChild(He),Be.colorBoxes.push(He)}),qe},We.prototype.getColorBox=function(Be){var qe=this,et=this.uiStyleSettings.toolbarHeight/4,He=this.uiStyleSettings.toolbarHeight-et,Xe=document.createElement("div");Xe.style.display="inline-block",Xe.style.boxSizing="content-box",Xe.style.width=He-2+"px",Xe.style.height=He-2+"px",Xe.style.padding="1px",Xe.style.marginRight="2px",Xe.style.marginBottom="2px",Xe.style.borderWidth="2px",Xe.style.borderStyle="solid",Xe.style.borderRadius=(He+2)/2+"px",Xe.style.borderColor=Be===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Xe.addEventListener("click",function(){qe.setCurrentColor(Be,Xe)});var Re=document.createElement("div");return Re.style.display="inline-block",Re.style.width=He-2+"px",Re.style.height=He-2+"px",Re.style.backgroundColor=Be,Re.style.borderRadius=He/2+"px",Be==="transparent"&&(Re.style.fill=this.uiStyleSettings.toolboxAccentColor,Re.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>`),Xe.appendChild(Re),Xe},We.prototype.setCurrentColor=function(Be,qe){var et=this;this.currentColor=Be,this.colorBoxes.forEach(function(He){He.style.borderColor=He===qe?et.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Be)},We}(z),oe=function(){function ft(We,Be,qe){this._state="new",this._isSelected=!1,this._container=We,this._overlayContainer=Be,this.globalSettings=qe,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ft.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ft.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ft.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ft.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ft.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ft.prototype.ownsTarget=function(We){return!1},Object.defineProperty(ft.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ft.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ft.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ft.prototype.pointerDown=function(We,Be){},ft.prototype.dblClick=function(We,Be){},ft.prototype.manipulate=function(We){},ft.prototype.pointerUp=function(We){this.stateChanged()},ft.prototype.dispose=function(){},ft.prototype.addMarkerVisualToContainer=function(We){this.container.childNodes.length>0?this.container.insertBefore(We,this.container.childNodes[0]):this.container.appendChild(We)},ft.prototype.getState=function(){return{typeName:ft.typeName,state:this.state,notes:this.notes}},ft.prototype.restoreState=function(We){this._state=We.state,this.notes=We.notes},ft.prototype.scale=function(We,Be){},ft.prototype.colorChanged=function(We){this.onColorChanged&&this.onColorChanged(We),this.stateChanged()},ft.prototype.fillColorChanged=function(We){this.onFillColorChanged&&this.onFillColorChanged(We),this.stateChanged()},ft.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var We=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),We.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(We)&&this.onStateChanged(this)}},ft.typeName="MarkerBase",ft}(),ie=function(){function ft(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ft.prototype.findGripByVisual=function(We){return this.topLeft.ownsTarget(We)?this.topLeft:this.topCenter.ownsTarget(We)?this.topCenter:this.topRight.ownsTarget(We)?this.topRight:this.centerLeft.ownsTarget(We)?this.centerLeft:this.centerRight.ownsTarget(We)?this.centerRight:this.bottomLeft.ownsTarget(We)?this.bottomLeft:this.bottomCenter.ownsTarget(We)?this.bottomCenter:this.bottomRight.ownsTarget(We)?this.bottomRight:void 0},ft}(),se=function(){function ft(){this.GRIP_SIZE=10,this.visual=Pe.createGroup(),this.visual.appendChild(Pe.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Pe.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ft.prototype.ownsTarget=function(We){return We===this.visual||We===this.visual.childNodes[0]||We===this.visual.childNodes[1]},ft}(),le=function(){function ft(){}return ft.toITransformMatrix=function(We){return{a:We.a,b:We.b,c:We.c,d:We.d,e:We.e,f:We.f}},ft.toSVGMatrix=function(We,Be){return We.a=Be.a,We.b=Be.b,We.c=Be.c,We.d=Be.d,We.e=Be.e,We.f=Be.f,We},ft}(),ye=function(ft){function We(Be,qe,et){var He=ft.call(this,Be,qe,et)||this;return He.left=0,He.top=0,He.width=0,He.height=0,He.defaultSize={x:50,y:20},He.offsetX=0,He.offsetY=0,He.rotationAngle=0,He.CB_DISTANCE=10,He._suppressMarkerCreateEvent=!1,He.container.transform.baseVal.appendItem(Pe.createTransform()),He.setupControlBox(),He}return me(We,ft),Object.defineProperty(We.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"visual",{get:function(){return this._visual},set:function(Be){this._visual=Be;var qe=Pe.createTransform();this._visual.transform.baseVal.appendItem(qe)},enumerable:!1,configurable:!0}),We.prototype.ownsTarget=function(Be){return!!ft.prototype.ownsTarget.call(this,Be)||!!(this.controlGrips.findGripByVisual(Be)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Be))},We.prototype.pointerDown=function(Be,qe){ft.prototype.pointerDown.call(this,Be,qe),this.state==="new"&&(this.left=Be.x,this.top=Be.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var et=this.unrotatePoint(Be);if(this.manipulationStartX=et.x,this.manipulationStartY=et.y,this.offsetX=et.x-this.left,this.offsetY=et.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(qe),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(qe)){this.activeGrip=this.rotatorGrip;var He=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=He.x-this.width/2,this.top=He.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Xe=this.container.transform.baseVal.getItem(0);Xe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Xe,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},We.prototype.pointerUp=function(Be){var qe=this.state;ft.prototype.pointerUp.call(this,Be),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Be),this._state="select",qe==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},We.prototype.moveVisual=function(Be){this.visual.style.transform="translate("+Be.x+"px, "+Be.y+"px)"},We.prototype.manipulate=function(Be){var qe=this.unrotatePoint(Be);this.state==="creating"?this.resize(Be):this.state==="move"?(this.left=this.manipulationStartLeft+(qe.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(qe.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(qe):this.state==="rotate"&&this.rotate(Be)},We.prototype.resize=function(Be){var qe=this.manipulationStartLeft,et=this.manipulationStartWidth,He=this.manipulationStartTop,Xe=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:qe=this.manipulationStartLeft+Be.x-this.manipulationStartX,et=this.manipulationStartWidth+this.manipulationStartLeft-qe;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:et=this.manipulationStartWidth+Be.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:He=this.manipulationStartTop+Be.y-this.manipulationStartY,Xe=this.manipulationStartHeight+this.manipulationStartTop-He;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Xe=this.manipulationStartHeight+Be.y-this.manipulationStartY}et>=0?(this.left=qe,this.width=et):(this.left=qe+et,this.width=-et),Xe>=0?(this.top=He,this.height=Xe):(this.top=He+Xe,this.height=-Xe),this.setSize()},We.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},We.prototype.rotate=function(Be){if(Math.abs(Be.x-this.centerX)>.1){var qe=Math.sign(Be.x-this.centerX);this.rotationAngle=180*Math.atan((Be.y-this.centerY)/(Be.x-this.centerX))/Math.PI+90*qe,this.applyRotation()}},We.prototype.applyRotation=function(){var Be=this.container.transform.baseVal.getItem(0);Be.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Be,0)},We.prototype.rotatePoint=function(Be){if(this.rotationAngle===0)return Be;var qe=this.container.getCTM(),et=Pe.createPoint(Be.x,Be.y);return{x:(et=et.matrixTransform(qe)).x,y:et.y}},We.prototype.unrotatePoint=function(Be){if(this.rotationAngle===0)return Be;var qe=this.container.getCTM();qe=qe.inverse();var et=Pe.createPoint(Be.x,Be.y);return{x:(et=et.matrixTransform(qe)).x,y:et.y}},We.prototype.select=function(){ft.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},We.prototype.deselect=function(){ft.prototype.deselect.call(this),this.controlBox.style.display="none"},We.prototype.setupControlBox=function(){this.controlBox=Pe.createGroup();var Be=Pe.createTransform();Be.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Be),this.container.appendChild(this.controlBox),this.controlRect=Pe.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=Pe.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 ie,this.addControlGrips(),this.controlBox.style.display="none"},We.prototype.adjustControlBox=function(){var Be=this.controlBox.transform.baseVal.getItem(0);Be.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Be,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()},We.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()},We.prototype.createGrip=function(){var Be=new se;return Be.visual.transform.baseVal.appendItem(Pe.createTransform()),this.controlBox.appendChild(Be.visual),Be},We.prototype.positionGrips=function(){var Be=this.controlGrips.topLeft.GRIP_SIZE,qe=-Be/2,et=qe,He=(this.width+this.CB_DISTANCE)/2-Be/2,Xe=(this.height+this.CB_DISTANCE)/2-Be/2,Re=this.height+this.CB_DISTANCE-Be/2,Ae=this.width+this.CB_DISTANCE-Be/2;this.positionGrip(this.controlGrips.topLeft.visual,qe,et),this.positionGrip(this.controlGrips.topCenter.visual,He,et),this.positionGrip(this.controlGrips.topRight.visual,Ae,et),this.positionGrip(this.controlGrips.centerLeft.visual,qe,Xe),this.positionGrip(this.controlGrips.centerRight.visual,Ae,Xe),this.positionGrip(this.controlGrips.bottomLeft.visual,qe,Re),this.positionGrip(this.controlGrips.bottomCenter.visual,He,Re),this.positionGrip(this.controlGrips.bottomRight.visual,Ae,Re),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,He,et-3*this.CB_DISTANCE)},We.prototype.positionGrip=function(Be,qe,et){var He=Be.transform.baseVal.getItem(0);He.setTranslate(qe,et),Be.transform.baseVal.replaceItem(He,0)},We.prototype.hideControlBox=function(){this.controlBox.style.display="none"},We.prototype.showControlBox=function(){this.controlBox.style.display=""},We.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:le.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:le.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ft.prototype.getState.call(this))},We.prototype.restoreState=function(Be){ft.prototype.restoreState.call(this,Be);var qe=Be;this.left=qe.left,this.top=qe.top,this.width=qe.width,this.height=qe.height,this.rotationAngle=qe.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(le.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,qe.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(le.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,qe.containerTransformMatrix))},We.prototype.scale=function(Be,qe){ft.prototype.scale.call(this,Be,qe);var et=this.rotatePoint({x:this.left,y:this.top}),He=this.unrotatePoint({x:et.x*Be,y:et.y*qe});this.left=He.x,this.top=He.y,this.width=this.width*Be,this.height=this.height*qe,this.adjustControlBox()},We}(oe),we=function(ft){function We(Be,qe,et){var He=ft.call(this,Be,qe,et)||this;return He.fillColor="transparent",He.strokeColor="transparent",He.strokeWidth=0,He.strokeDasharray="",He.opacity=1,He.setStrokeColor=He.setStrokeColor.bind(He),He.setFillColor=He.setFillColor.bind(He),He.setStrokeWidth=He.setStrokeWidth.bind(He),He.setStrokeDasharray=He.setStrokeDasharray.bind(He),He.createVisual=He.createVisual.bind(He),He}return me(We,ft),We.prototype.ownsTarget=function(Be){return!(!ft.prototype.ownsTarget.call(this,Be)&&Be!==this.visual)},We.prototype.createVisual=function(){this.visual=Pe.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)},We.prototype.pointerDown=function(Be,qe){ft.prototype.pointerDown.call(this,Be,qe),this.state==="new"&&(this.createVisual(),this.moveVisual(Be),this._state="creating")},We.prototype.manipulate=function(Be){ft.prototype.manipulate.call(this,Be)},We.prototype.resize=function(Be){ft.prototype.resize.call(this,Be),this.setSize()},We.prototype.setSize=function(){ft.prototype.setSize.call(this),Pe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},We.prototype.pointerUp=function(Be){ft.prototype.pointerUp.call(this,Be),this.setSize()},We.prototype.setStrokeColor=function(Be){this.strokeColor=Be,this.visual&&Pe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Be),this.stateChanged()},We.prototype.setFillColor=function(Be){this.fillColor=Be,this.visual&&Pe.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},We.prototype.setStrokeWidth=function(Be){this.strokeWidth=Be,this.visual&&Pe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},We.prototype.setStrokeDasharray=function(Be){this.strokeDasharray=Be,this.visual&&Pe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},We.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ft.prototype.getState.call(this))},We.prototype.restoreState=function(Be){var qe=Be;this.fillColor=qe.fillColor,this.strokeColor=qe.strokeColor,this.strokeWidth=qe.strokeWidth,this.strokeDasharray=qe.strokeDasharray,this.opacity=qe.opacity,this.createVisual(),ft.prototype.restoreState.call(this,Be),this.setSize()},We.prototype.scale=function(Be,qe){ft.prototype.scale.call(this,Be,qe),this.setSize()},We.title="Rectangle marker",We}(ye),Ce=function(ft){function We(Be,qe,et,He){var Xe=ft.call(this,Be,He||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Xe.widths=[],Xe.widthBoxes=[],Xe.widths=qe,Xe.currentWidth=et,Xe.setCurrentWidth=Xe.setCurrentWidth.bind(Xe),Xe}return me(We,ft),We.prototype.getUi=function(){var Be=this,qe=document.createElement("div");return qe.style.display="flex",qe.style.overflow="hidden",qe.style.flexGrow="2",this.widths.forEach(function(et){var He=document.createElement("div");He.style.display="flex",He.style.flexGrow="2",He.style.alignItems="center",He.style.justifyContent="space-between",He.style.padding="5px",He.style.borderWidth="2px",He.style.borderStyle="solid",He.style.borderColor=et===Be.currentWidth?Be.uiStyleSettings.toolboxAccentColor:"transparent",He.addEventListener("click",function(){Be.setCurrentWidth(et,He)}),qe.appendChild(He);var Xe=document.createElement("div");Xe.innerText=et.toString(),Xe.style.marginRight="5px",He.appendChild(Xe);var Re=document.createElement("div");Re.style.minHeight="20px",Re.style.flexGrow="2",Re.style.display="flex",Re.style.alignItems="center";var Ae=document.createElement("hr");Ae.style.minWidth="20px",Ae.style.border="0px",Ae.style.borderTop=et+"px solid "+Be.uiStyleSettings.toolboxColor,Ae.style.flexGrow="2",Re.appendChild(Ae),He.appendChild(Re),Be.widthBoxes.push(He)}),qe},We.prototype.setCurrentWidth=function(Be,qe){var et=this;this.currentWidth=Be,this.widthBoxes.forEach(function(He){He.style.borderColor=He===qe?et.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},We}(z),ke=function(ft){function We(Be,qe,et,He){var Xe=ft.call(this,Be,He||'<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 Xe.styles=[],Xe.styleBoxes=[],Xe.styles=qe,Xe.currentStyle=et,Xe.setCurrentStyle=Xe.setCurrentStyle.bind(Xe),Xe}return me(We,ft),We.prototype.getUi=function(){var Be=this,qe=document.createElement("div");return qe.style.display="flex",qe.style.overflow="hidden",qe.style.flexGrow="2",this.styles.forEach(function(et){var He=document.createElement("div");He.style.display="flex",He.style.alignItems="center",He.style.justifyContent="space-between",He.style.padding="5px",He.style.borderWidth="2px",He.style.borderStyle="solid",He.style.overflow="hidden",He.style.maxWidth=100/Be.styles.length-5+"%",He.style.borderColor=et===Be.currentStyle?Be.uiStyleSettings.toolboxAccentColor:"transparent",He.addEventListener("click",function(){Be.setCurrentStyle(et,He)}),qe.appendChild(He);var Xe=document.createElement("div");Xe.style.minHeight="20px",Xe.style.flexGrow="2",Xe.style.overflow="hidden";var Re=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Be.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(et!==""?'stroke-dasharray="'+et+'"':"")+` />
|
|
|
</svg>`;Xe.innerHTML=Re,He.appendChild(Xe),Be.styleBoxes.push(He)}),qe},We.prototype.setCurrentStyle=function(Be,qe){var et=this;this.currentStyle=Be,this.styleBoxes.forEach(function(He){He.style.borderColor=He===qe?et.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},We}(z),Ne=function(ft){function We(Be,qe,et){var He=ft.call(this,Be,qe,et)||this;return He.strokeColor=et.defaultColor,He.strokeWidth=et.defaultStrokeWidth,He.strokeDasharray=et.defaultStrokeDasharray,He.strokePanel=new ee("Line color",et.defaultColorSet,et.defaultColor),He.strokePanel.onColorChanged=He.setStrokeColor,He.strokeWidthPanel=new Ce("Line width",et.defaultStrokeWidths,et.defaultStrokeWidth),He.strokeWidthPanel.onWidthChanged=He.setStrokeWidth,He.strokeStylePanel=new ke("Line style",et.defaultStrokeDasharrays,et.defaultStrokeDasharray),He.strokeStylePanel.onStyleChanged=He.setStrokeDasharray,He}return me(We,ft),Object.defineProperty(We.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),We.prototype.getState=function(){var Be=ft.prototype.getState.call(this);return Be.typeName=We.typeName,Be},We.typeName="FrameMarker",We.title="Frame marker",We.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',We}(we),je=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},Ve=function(ft){function We(Be,qe,et){var He=ft.call(this,Be,qe,et)||this;return He.x1=0,He.y1=0,He.x2=0,He.y2=0,He.defaultLength=50,He.manipulationStartX=0,He.manipulationStartY=0,He.manipulationStartX1=0,He.manipulationStartY1=0,He.manipulationStartX2=0,He.manipulationStartY2=0,He.setupControlBox(),He}return me(We,ft),We.prototype.ownsTarget=function(Be){return!!ft.prototype.ownsTarget.call(this,Be)||!(!this.grip1.ownsTarget(Be)&&!this.grip2.ownsTarget(Be))},We.prototype.pointerDown=function(Be,qe){ft.prototype.pointerDown.call(this,Be,qe),this.manipulationStartX=Be.x,this.manipulationStartY=Be.y,this.state==="new"&&(this.x1=Be.x,this.y1=Be.y,this.x2=Be.x,this.y2=Be.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(qe)?this.activeGrip=this.grip1:this.grip2.ownsTarget(qe)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},We.prototype.pointerUp=function(Be){var qe=this.state;ft.prototype.pointerUp.call(this,Be),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(Be),this._state="select",qe==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},We.prototype.adjustVisual=function(){},We.prototype.manipulate=function(Be){this.state==="creating"?this.resize(Be):this.state==="move"?(this.x1=this.manipulationStartX1+Be.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Be.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Be.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Be.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Be)},We.prototype.resize=function(Be){switch(this.activeGrip){case this.grip1:this.x1=Be.x,this.y1=Be.y;break;case this.grip2:case void 0:this.x2=Be.x,this.y2=Be.y}this.adjustVisual(),this.adjustControlBox()},We.prototype.select=function(){ft.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},We.prototype.deselect=function(){ft.prototype.deselect.call(this),this.controlBox.style.display="none"},We.prototype.setupControlBox=function(){this.controlBox=Pe.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},We.prototype.adjustControlBox=function(){this.positionGrips()},We.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},We.prototype.createGrip=function(){var Be=new se;return Be.visual.transform.baseVal.appendItem(Pe.createTransform()),this.controlBox.appendChild(Be.visual),Be},We.prototype.positionGrips=function(){var Be=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Be/2,this.y1-Be/2),this.positionGrip(this.grip2.visual,this.x2-Be/2,this.y2-Be/2)},We.prototype.positionGrip=function(Be,qe,et){var He=Be.transform.baseVal.getItem(0);He.setTranslate(qe,et),Be.transform.baseVal.replaceItem(He,0)},We.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ft.prototype.getState.call(this))},We.prototype.restoreState=function(Be){ft.prototype.restoreState.call(this,Be);var qe=Be;this.x1=qe.x1,this.y1=qe.y1,this.x2=qe.x2,this.y2=qe.y2},We.prototype.scale=function(Be,qe){ft.prototype.scale.call(this,Be,qe),this.x1=this.x1*Be,this.y1=this.y1*qe,this.x2=this.x2*Be,this.y2=this.y2*qe,this.adjustVisual(),this.adjustControlBox()},We}(oe),Qe=function(ft){function We(Be,qe,et){var He=ft.call(this,Be,qe,et)||this;return He.strokeColor="transparent",He.strokeWidth=0,He.strokeDasharray="",He.setStrokeColor=He.setStrokeColor.bind(He),He.setStrokeWidth=He.setStrokeWidth.bind(He),He.setStrokeDasharray=He.setStrokeDasharray.bind(He),He.strokeColor=et.defaultColor,He.strokeWidth=et.defaultStrokeWidth,He.strokeDasharray=et.defaultStrokeDasharray,He.strokePanel=new ee("Line color",et.defaultColorSet,et.defaultColor),He.strokePanel.onColorChanged=He.setStrokeColor,He.strokeWidthPanel=new Ce("Line width",et.defaultStrokeWidths,et.defaultStrokeWidth),He.strokeWidthPanel.onWidthChanged=He.setStrokeWidth,He.strokeStylePanel=new ke("Line style",et.defaultStrokeDasharrays,et.defaultStrokeDasharray),He.strokeStylePanel.onStyleChanged=He.setStrokeDasharray,He}return me(We,ft),We.prototype.ownsTarget=function(Be){return!(!ft.prototype.ownsTarget.call(this,Be)&&Be!==this.visual&&Be!==this.selectorLine&&Be!==this.visibleLine)},We.prototype.createVisual=function(){this.visual=Pe.createGroup(),this.selectorLine=Pe.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Pe.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)},We.prototype.pointerDown=function(Be,qe){ft.prototype.pointerDown.call(this,Be,qe),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},We.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()),Pe.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Pe.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Pe.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},We.prototype.setStrokeColor=function(Be){this.strokeColor=Be,this.adjustVisual(),this.colorChanged(Be)},We.prototype.setStrokeWidth=function(Be){this.strokeWidth=Be,this.adjustVisual()},We.prototype.setStrokeDasharray=function(Be){this.strokeDasharray=Be,this.adjustVisual(),this.stateChanged()},Object.defineProperty(We.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),We.prototype.getState=function(){var Be=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ft.prototype.getState.call(this));return Be.typeName=We.typeName,Be},We.prototype.restoreState=function(Be){ft.prototype.restoreState.call(this,Be);var qe=Be;this.strokeColor=qe.strokeColor,this.strokeWidth=qe.strokeWidth,this.strokeDasharray=qe.strokeDasharray,this.createVisual(),this.adjustVisual()},We.typeName="LineMarker",We.title="Line marker",We.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',We}(Ve),Ge=function(ft){function We(Be,qe,et,He){var Xe=ft.call(this,Be,He||'<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 Xe.fonts=[],Xe.fontBoxes=[],Xe.fonts=qe,Xe.currentFont=et,Xe.setCurrentFont=Xe.setCurrentFont.bind(Xe),Xe}return me(We,ft),We.prototype.getUi=function(){var Be=this,qe=document.createElement("div");return qe.style.overflow="hidden",qe.style.flexGrow="2",this.fonts.forEach(function(et){var He=document.createElement("div");He.style.display="inline-block",He.style.alignItems="center",He.style.justifyContent="space-between",He.style.padding="5px",He.style.borderWidth="2px",He.style.borderStyle="solid",He.style.overflow="hidden",He.style.maxWidth=100/Be.fonts.length-5+"%",He.style.borderColor=et===Be.currentFont?Be.uiStyleSettings.toolboxAccentColor:"transparent",He.addEventListener("click",function(){Be.setCurrentFont(et,He)}),qe.appendChild(He);var Xe=document.createElement("div");Xe.style.display="flex",Xe.style.minHeight="20px",Xe.style.flexGrow="2",Xe.style.fontFamily=et,Xe.style.overflow="hidden";var Re=document.createElement("div");Re.style.whiteSpace="nowrap",Re.style.overflow="hidden",Re.style.textOverflow="ellipsis",Re.innerHTML="The quick brown fox jumps over the lazy dog",Xe.appendChild(Re),He.appendChild(Xe),Be.fontBoxes.push(He)}),qe},We.prototype.setCurrentFont=function(Be,qe){var et=this;this.currentFont=Be,this.fontBoxes.forEach(function(He){He.style.borderColor=He===qe?et.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},We}(z),mt=function(ft){function We(Be,qe,et){var He=ft.call(this,Be,qe,et)||this;return He.color="transparent",He.padding=5,He.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",He.text=He.DEFAULT_TEXT,He.isMoved=!1,He.color=et.defaultColor,He.fontFamily=et.defaultFontFamily,He.defaultSize={x:100,y:30},He.setColor=He.setColor.bind(He),He.setFont=He.setFont.bind(He),He.renderText=He.renderText.bind(He),He.sizeText=He.sizeText.bind(He),He.textEditDivClicked=He.textEditDivClicked.bind(He),He.showTextEditor=He.showTextEditor.bind(He),He.setSize=He.setSize.bind(He),He.positionTextEditor=He.positionTextEditor.bind(He),He.colorPanel=new ee("Color",et.defaultColorSet,et.defaultColor),He.colorPanel.onColorChanged=He.setColor,He.fontFamilyPanel=new Ge("Font",et.defaultFontFamilies,et.defaultFontFamily),He.fontFamilyPanel.onFontChanged=He.setFont,He}return me(We,ft),We.prototype.ownsTarget=function(Be){if(ft.prototype.ownsTarget.call(this,Be)||Be===this.visual||Be===this.textElement||Be===this.bgRectangle)return!0;var qe=!1;return this.textElement.childNodes.forEach(function(et){et===Be&&(qe=!0)}),qe},We.prototype.createVisual=function(){this.visual=Pe.createGroup(),this.bgRectangle=Pe.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Pe.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Pe.createTransform()),this.textElement.transform.baseVal.appendItem(Pe.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},We.prototype.pointerDown=function(Be,qe){ft.prototype.pointerDown.call(this,Be,qe),this.isMoved=!1,this.pointerDownPoint=Be,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Be),this._state="creating")},We.prototype.renderText=function(){var Be=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(qe){Be.textElement.appendChild(Pe.createTSpan(qe.trim()===""?" ":qe.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},We.prototype.getTextScale=function(){var Be=this.textElement.getBBox(),qe=1;if(Be.width>0&&Be.height>0){var et=(1*this.width-this.width*this.padding*2/100)/Be.width,He=(1*this.height-this.height*this.padding*2/100)/Be.height;qe=Math.min(et,He)}return qe},We.prototype.getTextPosition=function(Be){var qe=this.textElement.getBBox(),et=0,He=0;return qe.width>0&&qe.height>0&&(et=(this.width-qe.width*Be)/2,He=this.height/2-qe.height*Be/2),{x:et,y:He}},We.prototype.sizeText=function(){var Be=this.textElement.getBBox(),qe=this.getTextScale(),et=this.getTextPosition(qe);et.y-=Be.y*qe,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+et.x+"px, "+et.y+"px) scale("+qe+", "+qe+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(et.x,et.y),this.textElement.transform.baseVal.getItem(1).setScale(qe,qe))},We.prototype.manipulate=function(Be){ft.prototype.manipulate.call(this,Be),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Be.x-this.pointerDownPoint.x)>5||Math.abs(Be.y-this.pointerDownPoint.y)>5)},We.prototype.resize=function(Be){ft.prototype.resize.call(this,Be),this.isMoved=!0,this.setSize(),this.sizeText()},We.prototype.setSize=function(){ft.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Pe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Pe.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},We.prototype.pointerUp=function(Be){var qe=this.state;qe==="creating"&&(this._suppressMarkerCreateEvent=!0),ft.prototype.pointerUp.call(this,Be),this.setSize(),(qe==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},We.prototype.showTextEditor=function(){var Be=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(qe){qe.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var qe=Number.parseFloat(Be.textEditor.style.fontSize);Be.textEditor.clientWidth>=Number.parseInt(Be.textEditor.style.maxWidth)&&qe>.9;)qe-=.1,Be.textEditor.style.fontSize=Math.max(qe,.9)+"em"}),this.textEditor.addEventListener("keyup",function(qe){qe.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(qe){if(qe.clipboardData){var et=qe.clipboardData.getData("text"),He=window.getSelection();if(!He.rangeCount)return!1;He.deleteFromDocument(),He.getRangeAt(0).insertNode(document.createTextNode(et)),qe.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Be.textEditDivClicked(Be.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},We.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Be=this.getTextScale(),qe=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),et=this.textElement.getBBox(),He={x:et.width*Be,y:et.height*Be};qe.x-=He.x/2,qe.y-=He.y/2,this.textEditor.style.top=qe.y+"px",this.textEditor.style.left=qe.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-qe.x+"px",this.textEditor.style.fontSize=Math.max(16*Be,12)+"px",this.textElement.style.display="none"}},We.prototype.textEditDivClicked=function(Be){this.text=Be.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},We.prototype.select=function(){ft.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},We.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ft.prototype.deselect.call(this)},We.prototype.dblClick=function(Be,qe){ft.prototype.dblClick.call(this,Be,qe),this.showTextEditor()},We.prototype.setColor=function(Be){this.textElement&&Pe.setAttributes(this.textElement,[["fill",Be]]),this.color=Be,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Be)},We.prototype.setFont=function(Be){this.textElement&&Pe.setAttributes(this.textElement,[["font-family",Be]]),this.fontFamily=Be,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},We.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},We.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(We.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),We.prototype.getState=function(){var Be=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ft.prototype.getState.call(this));return Be.typeName=We.typeName,Be},We.prototype.restoreState=function(Be){var qe=Be;this.color=qe.color,this.fontFamily=qe.fontFamily,this.padding=qe.padding,this.text=qe.text,this.createVisual(),ft.prototype.restoreState.call(this,Be),this.setSize()},We.prototype.scale=function(Be,qe){ft.prototype.scale.call(this,Be,qe),this.setSize(),this.sizeText(),this.positionTextEditor()},We.typeName="TextMarker",We.title="Text marker",We.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>',We}(ye),ct=function(ft){function We(Be,qe,et){var He=ft.call(this,Be,qe,et)||this;return He.color="transparent",He.lineWidth=3,He.drawing=!1,He.pixelRatio=1,He.color=et.defaultColor,He.lineWidth=et.defaultStrokeWidth,He.pixelRatio=et.freehandPixelRatio,He.setColor=He.setColor.bind(He),He.addCanvas=He.addCanvas.bind(He),He.finishCreation=He.finishCreation.bind(He),He.setLineWidth=He.setLineWidth.bind(He),He.colorPanel=new ee("Color",et.defaultColorSet,et.defaultColor),He.colorPanel.onColorChanged=He.setColor,He.lineWidthPanel=new Ce("Line width",et.defaultStrokeWidths,et.defaultStrokeWidth),He.lineWidthPanel.onWidthChanged=He.setLineWidth,He}return me(We,ft),We.prototype.ownsTarget=function(Be){return!(!ft.prototype.ownsTarget.call(this,Be)&&Be!==this.visual&&Be!==this.drawingImage)},We.prototype.createVisual=function(){this.visual=Pe.createGroup(),this.drawingImage=Pe.createImage(),this.visual.appendChild(this.drawingImage);var Be=Pe.createTransform();this.visual.transform.baseVal.appendItem(Be),this.addMarkerVisualToContainer(this.visual)},We.prototype.pointerDown=function(Be,qe){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(Be.x,Be.y),this.drawing=!0):ft.prototype.pointerDown.call(this,Be,qe)},We.prototype.manipulate=function(Be){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Be.x,Be.y),this.canvasContext.stroke()):ft.prototype.manipulate.call(this,Be)},We.prototype.resize=function(Be){ft.prototype.resize.call(this,Be),Pe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Pe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},We.prototype.pointerUp=function(Be){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ft.prototype.pointerUp.call(this,Be)},We.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)},We.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ft.prototype.select.call(this)},We.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ft.prototype.deselect.call(this)},We.prototype.finishCreation=function(){for(var Be=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),qe=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],et=qe[0],He=qe[1],Xe=qe[2],Re=qe[3],Ae=!1,Ue=0;Ue<this.canvasElement.height;Ue++)for(var Ke=0;Ke<this.canvasElement.width;Ke++)Be.data[Ue*this.canvasElement.width*4+4*Ke+3]>0&&(Ae=!0,Ue<He&&(He=Ue),Ke<et&&(et=Ke),Ue>Re&&(Re=Ue),Ke>Xe&&(Xe=Ke));if(Ae){this.left=et/this.pixelRatio,this.top=He/this.pixelRatio,this.width=(Xe-et)/this.pixelRatio,this.height=(Re-He)/this.pixelRatio;var Ze=document.createElement("canvas");Ze.width=Xe-et,Ze.height=Re-He,Ze.getContext("2d").putImageData(this.canvasContext.getImageData(et,He,Xe-et,Re-He),0,0),this.drawingImgUrl=Ze.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},We.prototype.setDrawingImage=function(){Pe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Pe.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},We.prototype.setColor=function(Be){this.color=Be,this.colorChanged(Be)},We.prototype.setLineWidth=function(Be){this.lineWidth=Be},Object.defineProperty(We.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),We.prototype.getState=function(){var Be=Object.assign({drawingImgUrl:this.drawingImgUrl},ft.prototype.getState.call(this));return Be.typeName=We.typeName,Be},We.prototype.restoreState=function(Be){this.createVisual(),ft.prototype.restoreState.call(this,Be),this.drawingImgUrl=Be.drawingImgUrl,this.setDrawingImage()},We.prototype.scale=function(Be,qe){ft.prototype.scale.call(this,Be,qe),this.setDrawingImage()},We.typeName="FreehandMarker",We.title="Freehand marker",We.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>',We}(ye),Ct=function(ft){function We(Be,qe,et){var He=ft.call(this,Be,et||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return He.typeBoxes=[],He.currentType=qe,He.setCurrentType=He.setCurrentType.bind(He),He}return me(We,ft),We.prototype.getUi=function(){var Be=this,qe=document.createElement("div");qe.style.display="flex",qe.style.overflow="hidden",qe.style.flexGrow="2";for(var et=function(Re){var Ae="both";switch(Re){case 0:Ae="both";break;case 1:Ae="start";break;case 2:Ae="end";break;case 3:Ae="none"}var Ue=document.createElement("div");if(Ue.style.display="flex",Ue.style.flexGrow="2",Ue.style.alignItems="center",Ue.style.justifyContent="space-between",Ue.style.padding="5px",Ue.style.borderWidth="2px",Ue.style.borderStyle="solid",Ue.style.borderColor=Ae===He.currentType?He.uiStyleSettings.toolboxAccentColor:"transparent",Ue.addEventListener("click",function(){Be.setCurrentType(Ae,Ue)}),qe.appendChild(Ue),Ae==="both"||Ae==="start"){var Ke=document.createElement("div");Ke.style.display="flex",Ke.style.alignItems="center",Ke.style.minHeight="20px",Ke.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="`+(He.uiStyleSettings!==void 0?He.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Ke.style.marginLeft="5px",Ue.appendChild(Ke)}var Ze=document.createElement("div");Ze.style.display="flex",Ze.style.alignItems="center",Ze.style.minHeight="20px",Ze.style.flexGrow="2";var lt=document.createElement("hr");if(lt.style.minWidth="20px",lt.style.border="0px",lt.style.borderTop="3px solid "+(He.uiStyleSettings!==void 0?He.uiStyleSettings.toolboxColor:"#eeeeee"),lt.style.flexGrow="2",Ze.appendChild(lt),Ue.appendChild(Ze),Ae==="both"||Ae==="end"){var xt=document.createElement("div");xt.style.display="flex",xt.style.alignItems="center",xt.style.minHeight="20px",xt.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="`+(He.uiStyleSettings!==void 0?He.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,xt.style.marginRight="5px",Ue.appendChild(xt)}He.typeBoxes.push(Ue)},He=this,Xe=0;Xe<4;Xe++)et(Xe);return qe},We.prototype.setCurrentType=function(Be,qe){var et=this;this.currentType=Be,this.typeBoxes.forEach(function(He){He.style.borderColor=He===qe?et.uiStyleSettings!==void 0?et.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},We}(z),it=function(ft){function We(Be,qe,et){var He=ft.call(this,Be,qe,et)||this;return He.arrowType="end",He.arrowBaseHeight=10,He.arrowBaseWidth=10,He.getArrowPoints=He.getArrowPoints.bind(He),He.setArrowType=He.setArrowType.bind(He),He.arrowTypePanel=new Ct("Arrow type","end"),He.arrowTypePanel.onArrowTypeChanged=He.setArrowType,He}return me(We,ft),We.prototype.ownsTarget=function(Be){return!(!ft.prototype.ownsTarget.call(this,Be)&&Be!==this.arrow1&&Be!==this.arrow2)},We.prototype.getArrowPoints=function(Be,qe){var et=this.arrowBaseWidth+2*this.strokeWidth,He=this.arrowBaseHeight+2*this.strokeWidth;return Be-et/2+","+(qe+He/2)+" "+Be+","+(qe-He/2)+" "+(Be+et/2)+","+(qe+He/2)},We.prototype.createTips=function(){this.arrow1=Pe.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Pe.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Pe.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Pe.createTransform()),this.visual.appendChild(this.arrow2)},We.prototype.pointerDown=function(Be,qe){ft.prototype.pointerDown.call(this,Be,qe),this.state==="creating"&&this.createTips()},We.prototype.adjustVisual=function(){if(ft.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",Pe.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Pe.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Be=0;Math.abs(this.x1-this.x2)>.1&&(Be=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var qe=this.arrow1.transform.baseVal.getItem(0);qe.setRotate(Be,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(qe,0);var et=this.arrow2.transform.baseVal.getItem(0);et.setRotate(Be+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(et,0)}},We.prototype.setArrowType=function(Be){this.arrowType=Be,this.adjustVisual(),this.stateChanged()},Object.defineProperty(We.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),We.prototype.getState=function(){var Be=Object.assign({arrowType:this.arrowType},ft.prototype.getState.call(this));return Be.typeName=We.typeName,Be},We.prototype.restoreState=function(Be){ft.prototype.restoreState.call(this,Be);var qe=Be;this.arrowType=qe.arrowType,this.createTips(),this.adjustVisual()},We.typeName="ArrowMarker",We.title="Arrow marker",We.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',We}(Qe),St=function(ft){function We(Be,qe,et){var He=ft.call(this,Be,qe,et)||this;return He.fillColor=et.defaultFillColor,He.strokeWidth=0,He.fillPanel=new ee("Color",et.defaultColorSet,et.defaultFillColor),He.fillPanel.onColorChanged=He.setFillColor,He}return me(We,ft),Object.defineProperty(We.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),We.prototype.getState=function(){var Be=ft.prototype.getState.call(this);return Be.typeName=We.typeName,Be},We.typeName="CoverMarker",We.title="Cover marker",We.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',We}(we),ut=function(ft){function We(Be,qe,et,He){var Xe=ft.call(this,Be,He||'<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 Xe.opacities=[],Xe.opacityBoxes=[],Xe.opacities=qe,Xe.currentOpacity=et,Xe.setCurrentOpacity=Xe.setCurrentOpacity.bind(Xe),Xe}return me(We,ft),We.prototype.getUi=function(){var Be=this,qe=document.createElement("div");return qe.style.display="flex",qe.style.overflow="hidden",qe.style.flexGrow="2",qe.style.justifyContent="space-between",this.opacities.forEach(function(et){var He=document.createElement("div");He.style.display="flex",He.style.alignItems="center",He.style.justifyContent="center",He.style.padding="5px",He.style.borderWidth="2px",He.style.borderStyle="solid",He.style.borderColor=et===Be.currentOpacity?Be.uiStyleSettings.toolboxAccentColor:"transparent",He.addEventListener("click",function(){Be.setCurrentOpacity(et,He)}),qe.appendChild(He);var Xe=document.createElement("div");Xe.innerText=100*et+"%",He.appendChild(Xe),Be.opacityBoxes.push(He)}),qe},We.prototype.setCurrentOpacity=function(Be,qe){var et=this;this.currentOpacity=Be,this.opacityBoxes.forEach(function(He){He.style.borderColor=He===qe?et.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},We}(z),Ft=function(ft){function We(Be,qe,et){var He=ft.call(this,Be,qe,et)||this;return He.setOpacity=He.setOpacity.bind(He),He.fillColor=et.defaultHighlightColor,He.strokeWidth=0,He.opacity=et.defaultHighlightOpacity,He.fillPanel=new ee("Color",et.defaultColorSet,He.fillColor),He.fillPanel.onColorChanged=He.setFillColor,He.opacityPanel=new ut("Opacity",et.defaultOpacitySteps,He.opacity),He.opacityPanel.onOpacityChanged=He.setOpacity,He}return me(We,ft),We.prototype.setOpacity=function(Be){this.opacity=Be,this.visual&&Pe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(We.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),We.prototype.getState=function(){var Be=ft.prototype.getState.call(this);return Be.typeName=We.typeName,Be},We.typeName="HighlightMarker",We.title="Highlight marker",We.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>',We}(St),ht='<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>',rt='<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>',dt=function(ft){function We(Be,qe,et){var He=ft.call(this,Be,qe,et)||this;return He.bgColor="transparent",He.tipPosition={x:0,y:0},He.tipBase1Position={x:0,y:0},He.tipBase2Position={x:0,y:0},He.tipMoving=!1,He.color=et.defaultStrokeColor,He.bgColor=et.defaultFillColor,He.fontFamily=et.defaultFontFamily,He.defaultSize={x:100,y:30},He.setBgColor=He.setBgColor.bind(He),He.getTipPoints=He.getTipPoints.bind(He),He.positionTip=He.positionTip.bind(He),He.setTipPoints=He.setTipPoints.bind(He),He.colorPanel=new ee("Text color",et.defaultColorSet,He.color,ht),He.colorPanel.onColorChanged=He.setColor,He.bgColorPanel=new ee("Fill color",et.defaultColorSet,He.bgColor,rt),He.bgColorPanel.onColorChanged=He.setBgColor,He.fontFamilyPanel=new Ge("Font",et.defaultFontFamilies,et.defaultFontFamily),He.fontFamilyPanel.onFontChanged=He.setFont,He.tipGrip=new se,He.tipGrip.visual.transform.baseVal.appendItem(Pe.createTransform()),He.controlBox.appendChild(He.tipGrip.visual),He}return me(We,ft),We.prototype.ownsTarget=function(Be){return ft.prototype.ownsTarget.call(this,Be)||this.tipGrip.ownsTarget(Be)||this.tip===Be},We.prototype.createTip=function(){Pe.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Pe.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},We.prototype.pointerDown=function(Be,qe){this.state==="new"&&ft.prototype.pointerDown.call(this,Be,qe),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(qe)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ft.prototype.pointerDown.call(this,Be,qe)},We.prototype.pointerUp=function(Be){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ft.prototype.pointerUp.call(this,Be);else{var qe=this.state==="creating";ft.prototype.pointerUp.call(this,Be),this.setTipPoints(qe),this.positionTip()}},We.prototype.manipulate=function(Be){if(this.tipMoving){var qe=this.unrotatePoint(Be);this.tipPosition={x:qe.x-this.manipulationStartLeft,y:qe.y-this.manipulationStartTop},this.positionTip()}else ft.prototype.manipulate.call(this,Be)},We.prototype.setBgColor=function(Be){this.bgRectangle&&this.tip&&(Pe.setAttributes(this.bgRectangle,[["fill",Be]]),Pe.setAttributes(this.tip,[["fill",Be]])),this.bgColor=Be,this.fillColorChanged(Be)},We.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},We.prototype.setTipPoints=function(Be){Be===void 0&&(Be=!1);var qe=Math.min(this.height/2,15),et=this.height/5;Be&&(this.tipPosition={x:qe+et/2,y:this.height+20});var He=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?He<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(et=this.width/5,qe=Math.min(this.width/2,15),this.tipBase1Position={x:qe,y:0},this.tipBase2Position={x:qe+et,y:0}):(this.tipBase1Position={x:0,y:qe},this.tipBase2Position={x:0,y:qe+et}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?He<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(et=this.width/5,qe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-qe-et,y:0},this.tipBase2Position={x:this.width-qe,y:0}):(this.tipBase1Position={x:this.width,y:qe},this.tipBase2Position={x:this.width,y:qe+et}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?He<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(et=this.width/5,qe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-qe-et,y:this.height},this.tipBase2Position={x:this.width-qe,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-qe-et},this.tipBase2Position={x:this.width,y:this.height-qe}):He<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(et=this.width/5,qe=Math.min(this.width/2,15),this.tipBase1Position={x:qe,y:this.height},this.tipBase2Position={x:qe+et,y:this.height}):(this.tipBase1Position={x:0,y:this.height-qe},this.tipBase2Position={x:0,y:this.height-qe-et})},We.prototype.resize=function(Be){ft.prototype.resize.call(this,Be),this.positionTip()},We.prototype.positionTip=function(){Pe.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Be=this.tipGrip.visual.transform.baseVal.getItem(0);Be.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Be,0)},Object.defineProperty(We.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),We.prototype.select=function(){this.positionTip(),ft.prototype.select.call(this)},We.prototype.getState=function(){var Be=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ft.prototype.getState.call(this));return Be.typeName=We.typeName,Be},We.prototype.restoreState=function(Be){var qe=Be;this.bgColor=qe.bgColor,this.tipPosition=qe.tipPosition,ft.prototype.restoreState.call(this,Be),this.createTip(),this.setTipPoints()},We.prototype.scale=function(Be,qe){ft.prototype.scale.call(this,Be,qe),this.tipPosition={x:this.tipPosition.x*Be,y:this.tipPosition.y*qe},this.positionTip()},We.typeName="CalloutMarker",We.title="Callout marker",We.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>',We}(mt),yt=function(ft){function We(Be,qe,et){var He=ft.call(this,Be,qe,et)||this;return He.fillColor="transparent",He.strokeColor="transparent",He.strokeWidth=0,He.strokeDasharray="",He.opacity=1,He.strokeColor=et.defaultColor,He.strokeWidth=et.defaultStrokeWidth,He.strokeDasharray=et.defaultStrokeDasharray,He.fillColor=et.defaultFillColor,He.setStrokeColor=He.setStrokeColor.bind(He),He.setFillColor=He.setFillColor.bind(He),He.setStrokeWidth=He.setStrokeWidth.bind(He),He.setStrokeDasharray=He.setStrokeDasharray.bind(He),He.setOpacity=He.setOpacity.bind(He),He.createVisual=He.createVisual.bind(He),He.strokePanel=new ee("Line color",be(et.defaultColorSet,["transparent"]),et.defaultColor),He.strokePanel.onColorChanged=He.setStrokeColor,He.fillPanel=new ee("Fill color",be(et.defaultColorSet,["transparent"]),He.fillColor,rt),He.fillPanel.onColorChanged=He.setFillColor,He.strokeWidthPanel=new Ce("Line width",et.defaultStrokeWidths,et.defaultStrokeWidth),He.strokeWidthPanel.onWidthChanged=He.setStrokeWidth,He.strokeStylePanel=new ke("Line style",et.defaultStrokeDasharrays,et.defaultStrokeDasharray),He.strokeStylePanel.onStyleChanged=He.setStrokeDasharray,He.opacityPanel=new ut("Opacity",et.defaultOpacitySteps,He.opacity),He.opacityPanel.onOpacityChanged=He.setOpacity,He}return me(We,ft),We.prototype.ownsTarget=function(Be){return!(!ft.prototype.ownsTarget.call(this,Be)&&Be!==this.visual)},We.prototype.createVisual=function(){this.visual=Pe.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)},We.prototype.pointerDown=function(Be,qe){ft.prototype.pointerDown.call(this,Be,qe),this.state==="new"&&(this.createVisual(),this.moveVisual(Be),this._state="creating")},We.prototype.manipulate=function(Be){ft.prototype.manipulate.call(this,Be)},We.prototype.resize=function(Be){ft.prototype.resize.call(this,Be),this.setSize()},We.prototype.setSize=function(){ft.prototype.setSize.call(this),Pe.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},We.prototype.pointerUp=function(Be){ft.prototype.pointerUp.call(this,Be),this.setSize()},We.prototype.setStrokeColor=function(Be){this.strokeColor=Be,this.visual&&Pe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Be),this.stateChanged()},We.prototype.setFillColor=function(Be){this.fillColor=Be,this.visual&&Pe.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Be),this.stateChanged()},We.prototype.setStrokeWidth=function(Be){this.strokeWidth=Be,this.visual&&Pe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},We.prototype.setStrokeDasharray=function(Be){this.strokeDasharray=Be,this.visual&&Pe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},We.prototype.setOpacity=function(Be){this.opacity=Be,this.visual&&Pe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(We.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),We.prototype.getState=function(){var Be=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ft.prototype.getState.call(this));return Be.typeName=We.typeName,Be},We.prototype.restoreState=function(Be){var qe=Be;this.fillColor=qe.fillColor,this.strokeColor=qe.strokeColor,this.strokeWidth=qe.strokeWidth,this.strokeDasharray=qe.strokeDasharray,this.opacity=qe.opacity,this.createVisual(),ft.prototype.restoreState.call(this,Be),this.setSize()},We.prototype.scale=function(Be,qe){ft.prototype.scale.call(this,Be,qe),this.setSize()},We.typeName="EllipseMarker",We.title="Ellipse marker",We.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>',We}(ye),_t=function(ft){function We(Be,qe,et){return ft.call(this,Be,qe,et)||this}return me(We,ft),Object.defineProperty(We.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),We.prototype.ownsTarget=function(Be){return!(!ft.prototype.ownsTarget.call(this,Be)&&Be!==this.tip1&&Be!==this.tip2)},We.prototype.createTips=function(){this.tip1=Pe.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(Pe.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Pe.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(Pe.createTransform()),this.visual.appendChild(this.tip2)},We.prototype.pointerDown=function(Be,qe){ft.prototype.pointerDown.call(this,Be,qe),this.state==="creating"&&this.createTips()},We.prototype.adjustVisual=function(){if(ft.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Pe.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()]]),Pe.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 Be=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),qe=this.tip1.transform.baseVal.getItem(0);qe.setRotate(Be,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(qe,0);var et=this.tip2.transform.baseVal.getItem(0);et.setRotate(Be+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(et,0)}},Object.defineProperty(We.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),We.prototype.getState=function(){var Be=ft.prototype.getState.call(this);return Be.typeName=We.typeName,Be},We.prototype.restoreState=function(Be){ft.prototype.restoreState.call(this,Be),this.createTips(),this.adjustVisual()},We.typeName="MeasurementMarker",We.title="Measurement marker",We.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>',We}(Qe),vt=function(ft){function We(Be,qe,et){var He=ft.call(this,Be,qe,et)||this;return He.strokePanel.colors=et.defaultColorSet,He.fillColor="transparent",He}return me(We,ft),Object.defineProperty(We.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),We.prototype.getState=function(){var Be=ft.prototype.getState.call(this);return Be.typeName=We.typeName,Be},We.typeName="EllipseFrameMarker",We.title="Ellipse frame marker",We.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>',We}(yt),Bt=function(){function ft(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ft.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ft.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ft.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ft.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ft.prototype.addUndoStep=function(We){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(We)||(this.undoStack.push(We),JSON.stringify(this.lastRedoStep)!==JSON.stringify(We)&&this.redoStack.splice(0,this.redoStack.length))},ft.prototype.replaceLastUndoStep=function(We){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=We)},ft.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ft.prototype.undo=function(){if(this.undoStack.length>1){var We=this.undoStack.pop();return We!==void 0&&this.redoStack.push(We),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ft.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ft}(),jt=function(ft){function We(Be,qe,et){var He=ft.call(this,Be,qe,et)||this;return He.strokeColor="transparent",He.strokeWidth=0,He.strokeDasharray="",He.curveX=0,He.curveY=0,He.manipulationStartCurveX=0,He.manipulationStartCurveY=0,He.setStrokeColor=He.setStrokeColor.bind(He),He.setStrokeWidth=He.setStrokeWidth.bind(He),He.setStrokeDasharray=He.setStrokeDasharray.bind(He),He.positionGrips=He.positionGrips.bind(He),He.addControlGrips=He.addControlGrips.bind(He),He.adjustVisual=He.adjustVisual.bind(He),He.setupControlBox=He.setupControlBox.bind(He),He.resize=He.resize.bind(He),He.strokeColor=et.defaultColor,He.strokeWidth=et.defaultStrokeWidth,He.strokeDasharray=et.defaultStrokeDasharray,He.strokePanel=new ee("Line color",et.defaultColorSet,et.defaultColor),He.strokePanel.onColorChanged=He.setStrokeColor,He.strokeWidthPanel=new Ce("Line width",et.defaultStrokeWidths,et.defaultStrokeWidth),He.strokeWidthPanel.onWidthChanged=He.setStrokeWidth,He.strokeStylePanel=new ke("Line style",et.defaultStrokeDasharrays,et.defaultStrokeDasharray),He.strokeStylePanel.onStyleChanged=He.setStrokeDasharray,He}return me(We,ft),We.prototype.ownsTarget=function(Be){return!(!ft.prototype.ownsTarget.call(this,Be)&&Be!==this.visual&&Be!==this.selectorCurve&&Be!==this.visibleCurve&&!this.curveGrip.ownsTarget(Be))},We.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},We.prototype.createVisual=function(){this.visual=Pe.createGroup(),this.selectorCurve=Pe.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Pe.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)},We.prototype.pointerDown=function(Be,qe){ft.prototype.pointerDown.call(this,Be,qe),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Be.x,this.curveY=Be.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(qe)&&(this.activeGrip=this.curveGrip,this._state="resize")},We.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Pe.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Pe.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Pe.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},We.prototype.setupControlBox=function(){ft.prototype.setupControlBox.call(this),this.curveControlLine1=Pe.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Pe.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)},We.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ft.prototype.addControlGrips.call(this)},We.prototype.positionGrips=function(){ft.prototype.positionGrips.call(this);var Be=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Be/2,this.curveY-Be/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()))},We.prototype.manipulate=function(Be){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Be.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Be.y-this.manipulationStartY),ft.prototype.manipulate.call(this,Be)},We.prototype.resize=function(Be){this.activeGrip===this.curveGrip&&(this.curveX=Be.x,this.curveY=Be.y),ft.prototype.resize.call(this,Be),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},We.prototype.setStrokeColor=function(Be){this.strokeColor=Be,this.adjustVisual(),this.colorChanged(Be)},We.prototype.setStrokeWidth=function(Be){this.strokeWidth=Be,this.adjustVisual()},We.prototype.setStrokeDasharray=function(Be){this.strokeDasharray=Be,this.adjustVisual()},We.prototype.scale=function(Be,qe){this.curveX=this.curveX*Be,this.curveY=this.curveY*qe,ft.prototype.scale.call(this,Be,qe)},Object.defineProperty(We.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),We.prototype.getState=function(){var Be=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ft.prototype.getState.call(this));return Be.typeName=We.typeName,Be},We.prototype.restoreState=function(Be){ft.prototype.restoreState.call(this,Be);var qe=Be;this.strokeColor=qe.strokeColor,this.strokeWidth=qe.strokeWidth,this.strokeDasharray=qe.strokeDasharray,this.curveX=qe.curveX,this.curveY=qe.curveY,this.createVisual(),this.adjustVisual()},We.typeName="CurveMarker",We.title="Curve marker",We.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>',We}(Ve),un=function(ft){function We(Be,qe,et){var He=ft.call(this,Be,qe,et)||this;return He.fillColor="transparent",He.strokeColor="transparent",He.strokeWidth=0,He.strokeDasharray="",He.textColor="transparent",He.fontSize="1rem",He.isMoved=!1,He.captionText="Caption",He.PADDING=5,He.captionBoxWidth=0,He.captionBoxHeight=0,He.strokeColor=et.defaultColor,He.strokeWidth=et.defaultStrokeWidth,He.strokeDasharray=et.defaultStrokeDasharray,He.fillColor=et.defaultFillColor,He.textColor=et.defaultStrokeColor,He.fontFamily=et.defaultFontFamily,He.fontSize=et.defaultCaptionFontSize,He.captionText=et.defaultCaptionText,He.setStrokeColor=He.setStrokeColor.bind(He),He.setFillColor=He.setFillColor.bind(He),He.setStrokeWidth=He.setStrokeWidth.bind(He),He.setStrokeDasharray=He.setStrokeDasharray.bind(He),He.createVisual=He.createVisual.bind(He),He.sizeCaption=He.sizeCaption.bind(He),He.setCaptionText=He.setCaptionText.bind(He),He.showTextEditor=He.showTextEditor.bind(He),He.positionTextEditor=He.positionTextEditor.bind(He),He.finishTextEditing=He.finishTextEditing.bind(He),He.setFont=He.setFont.bind(He),He.setTextColor=He.setTextColor.bind(He),He.strokePanel=new ee("Line color",be(et.defaultColorSet,["transparent"]),He.strokeColor),He.strokePanel.onColorChanged=He.setStrokeColor,He.fillPanel=new ee("Fill color",be(et.defaultColorSet,["transparent"]),He.fillColor,rt),He.fillPanel.onColorChanged=He.setFillColor,He.strokeWidthPanel=new Ce("Line width",et.defaultStrokeWidths,et.defaultStrokeWidth),He.strokeWidthPanel.onWidthChanged=He.setStrokeWidth,He.strokeStylePanel=new ke("Line style",et.defaultStrokeDasharrays,et.defaultStrokeDasharray),He.strokeStylePanel.onStyleChanged=He.setStrokeDasharray,He.fontFamilyPanel=new Ge("Font",et.defaultFontFamilies,et.defaultFontFamily),He.fontFamilyPanel.onFontChanged=He.setFont,He.textColorPanel=new ee("Text color",et.defaultColorSet,He.textColor,ht),He.textColorPanel.onColorChanged=He.setTextColor,He}return me(We,ft),We.prototype.ownsTarget=function(Be){return!(!ft.prototype.ownsTarget.call(this,Be)&&Be!==this.visual&&Be!==this.frame&&Be!==this.captionBg&&Be!==this.captionElement)},We.prototype.createVisual=function(){this.visual=Pe.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Pe.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Pe.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=Pe.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()},We.prototype.setCaptionText=function(Be){this.captionText=Be,this.captionElement.textContent=this.captionText,this.sizeCaption()},We.prototype.pointerDown=function(Be,qe){ft.prototype.pointerDown.call(this,Be,qe),this.isMoved=!1,this.pointerDownPoint=Be,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Be),this._state="creating")},We.prototype.manipulate=function(Be){ft.prototype.manipulate.call(this,Be),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Be.x-this.pointerDownPoint.x)>5||Math.abs(Be.y-this.pointerDownPoint.y)>5)},We.prototype.resize=function(Be){ft.prototype.resize.call(this,Be),this.setSize()},We.prototype.sizeCaption=function(){var Be=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Be.width+2*this.PADDING,this.captionBoxHeight=Be.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Pe.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')"]]),Pe.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')"]])},We.prototype.showTextEditor=function(){var Be=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(qe){qe.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(qe){qe.key==="Enter"&&Be.finishTextEditing(Be.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(qe){qe.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Be.finishTextEditing(Be.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Be.finishTextEditing(Be.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},We.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"))},We.prototype.finishTextEditing=function(Be){this.setCaptionText(Be.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},We.prototype.setFont=function(Be){this.captionElement&&Pe.setAttributes(this.captionElement,[["font-family",Be]]),this.fontFamily=Be,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},We.prototype.setTextColor=function(Be){this.captionElement&&Pe.setAttributes(this.captionElement,[["fill",Be]]),this.textColor=Be,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},We.prototype.setSize=function(){ft.prototype.setSize.call(this),Pe.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},We.prototype.pointerUp=function(Be){ft.prototype.pointerUp.call(this,Be),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},We.prototype.dblClick=function(Be,qe){ft.prototype.dblClick.call(this,Be,qe),this.showTextEditor()},We.prototype.setStrokeColor=function(Be){this.strokeColor=Be,this.frame&&Pe.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Be),this.stateChanged()},We.prototype.setFillColor=function(Be){this.fillColor=Be,this.captionBg&&Pe.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Be),this.stateChanged()},We.prototype.setStrokeWidth=function(Be){this.strokeWidth=Be,this.frame&&Pe.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},We.prototype.setStrokeDasharray=function(Be){this.strokeDasharray=Be,this.frame&&Pe.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(We.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),We.prototype.getState=function(){var Be=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},ft.prototype.getState.call(this));return Be.typeName=this.typeName,Be},We.prototype.restoreState=function(Be){var qe=Be;this.fillColor=qe.fillColor,this.strokeColor=qe.strokeColor,this.strokeWidth=qe.strokeWidth,this.strokeDasharray=qe.strokeDasharray,this.textColor=qe.textColor,this.fontFamily=qe.fontFamily,this.captionText=qe.captionText,this.fontSize=qe.fontSize,this.createVisual(),ft.prototype.restoreState.call(this,Be),this.setSize()},We.prototype.scale=function(Be,qe){ft.prototype.scale.call(this,Be,qe),this.setSize()},We.typeName="CaptionFrameMarker",We.title="Caption frame marker",We.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>',We}(ye),Kt=function(){function ft(We,Be){Be===void 0&&(Be=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=We,this.cancelable=Be}return Object.defineProperty(ft.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ft.prototype.preventDefault=function(){this._defaultPrevented=!0},ft}(),xn=function(ft){function We(Be,qe,et){var He=ft.call(this,Be,!1)||this;return He.dataUrl=qe,He.state=et,He}return me(We,ft),We}(Kt),Ut=function(ft){function We(Be,qe,et){et===void 0&&(et=!1);var He=ft.call(this,Be,et)||this;return He.marker=qe,He}return me(We,ft),We}(Kt),Wt=function(){function ft(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return ft.prototype.addEventListener=function(We,Be){this[We].push(Be)},ft.prototype.removeEventListener=function(We,Be){var qe=this[We].indexOf(Be);qe>-1&&this[We].splice(qe,1)},ft}(),$t=function(){function ft(We){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new je,this._isOpen=!1,this.undoRedoManager=new Bt,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 Wt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ft.instanceCounter++,this.styles=new ge(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=We,this.targetRoot=document.body,this.width=We.clientWidth,this.height=We.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(ft.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ne,ct,it,mt,vt,yt,Ft,dt,_t,St,Qe,jt,un]},enumerable:!1,configurable:!0}),Object.defineProperty(ft.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ne,ct,it,mt,yt,Ft,dt]},enumerable:!1,configurable:!0}),Object.defineProperty(ft.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ne,ct,it,mt,Ft]},enumerable:!1,configurable:!0}),Object.defineProperty(ft.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(We){var Be=this;this._availableMarkerTypes.splice(0),We.forEach(function(qe){if(typeof qe=="string"){var et=Be.ALL_MARKER_TYPES.find(function(He){return He.typeName===qe});et!==void 0&&Be._availableMarkerTypes.push(et)}else Be._availableMarkerTypes.push(qe)})},enumerable:!1,configurable:!0}),Object.defineProperty(ft.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ft.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ft.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ft.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ft.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(We){this._zoomLevel=We,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(ft.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ft.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),he.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ft.prototype.show=function(){var We=this;this.styles.styleSheetRoot===void 0&&xe.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=xe.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Be){return Be(new Kt(We))})},ft.prototype.render=function(){return Ie(this,void 0,void 0,function(){var We;return Te(this,function(Be){switch(Be.label){case 0:return this.setCurrentMarker(),(We=new Se).naturalSize=this.renderAtNaturalSize,We.imageType=this.renderImageType,We.imageQuality=this.renderImageQuality,We.markersOnly=this.renderMarkersOnly,We.width=this.renderWidth,We.height=this.renderHeight,[4,We.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Be.sent(),[4,We.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Be.sent()]}})})},ft.prototype.close=function(We){var Be=this;if(We===void 0&&(We=!1),this.isOpen){var qe=!1;We||this.eventListeners.beforeclose.forEach(function(et){var He=new Kt(Be,!0);et(He),He.defaultPrevented&&(qe=!0)}),qe||(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(et){return et(new Kt(Be))}),this.detachEvents(),this._isOpen=!1)}},ft.prototype.addMarkersToToolbar=function(){for(var We,Be=[],qe=0;qe<arguments.length;qe++)Be[qe]=arguments[qe];(We=this._availableMarkerTypes).push.apply(We,Be)},ft.prototype.addRenderEventListener=function(We){this.addEventListener("render",function(Be){We(Be.dataUrl,Be.state)})},ft.prototype.removeRenderEventListener=function(We){},ft.prototype.addCloseEventListener=function(We){this.addEventListener("close",function(){We()})},ft.prototype.removeCloseEventListener=function(We){},ft.prototype.setupResizeObserver=function(){var We=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){We.resize(We.target.clientWidth,We.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return We.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},ft.prototype.onPopupTargetResize=function(){var We=1*this.target.clientWidth/this.target.clientHeight,Be=this.editorCanvas.clientWidth/We>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*We:this.editorCanvas.clientWidth,qe=Be<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/We;this.resize(Be,qe)},ft.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ft.prototype.resize=function(We,Be){this._isResizing=!0;var qe=We/this.imageWidth,et=Be/this.imageHeight;this.imageWidth=Math.round(We),this.imageHeight=Math.round(Be),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(qe,et),this._isResizing=!1},ft.prototype.scaleMarkers=function(We,Be){var qe,et=this;this._currentMarker&&this._currentMarker instanceof mt?this._currentMarker.scale(We,Be):(qe=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(He){He!==et._currentMarker&&He.scale(We,Be)}),qe!==void 0&&this.setCurrentMarker(qe)},ft.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},ft.prototype.setTopLeft=function(){var We=this.editingTarget.getBoundingClientRect(),Be=this.editorCanvas.getBoundingClientRect();this.left=We.left-Be.left,this.top=We.top-Be.top},ft.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},ft.prototype.addDefs=function(){for(var We,Be=[],qe=0;qe<arguments.length;qe++)Be[qe]=arguments[qe];this.defs=Pe.createDefs(),this.addDefsToImage(),(We=this.defs).append.apply(We,Be)},ft.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},ft.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},ft.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},ft.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},ft.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},ft.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},ft.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},ft.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var We=document.createElement("a");We.href="https://markerjs.com/",We.target="_blank",We.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>',We.title="Powered by marker.js",We.style.display="grid",We.style.alignItems="center",We.style.justifyItems="center",We.style.padding="3px",We.style.width="20px",We.style.height="20px",this.logoUI.appendChild(We),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},ft.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},ft.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},ft.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ft.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var We=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=We+"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 de(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 ue(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},ft.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ft.prototype.removeMarker=function(We){this.markerImage.removeChild(We.container),this.markers.indexOf(We)>-1&&this.markers.splice(this.markers.indexOf(We),1),We.dispose()},ft.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},ft.prototype.toolbarButtonClicked=function(We,Be){if(We==="marker"&&Be!==void 0)this.createNewMarker(Be);else if(We==="action")switch(Be){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},ft.prototype.deleteSelectedMarker=function(){var We=this;if(this._currentMarker!==void 0){var Be=!1;if(this.eventListeners.markerbeforedelete.forEach(function(et){var He=new Ut(We,We._currentMarker,!0);et(He),He.defaultPrevented&&(Be=!0)}),!Be){var qe=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(et){return et(new Ut(We,qe))})}}},ft.prototype.clear=function(){var We=this,Be=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Xe){var Re=new Ut(We,void 0,!0);Xe(Re),Re.defaultPrevented&&(Be=!0)}),!Be)){this.setCurrentMarker();for(var qe=function(Xe){var Re=et.markers[Xe];et.setCurrentMarker(et.markers[Xe]),et._currentMarker.dispose(),et.markerImage.removeChild(et._currentMarker.container),et.markers.splice(et.markers.indexOf(et._currentMarker),1),et.eventListeners.markerdelete.forEach(function(Ae){return Ae(new Ut(We,Re))})},et=this,He=this.markers.length-1;He>=0;He--)qe(He);this.addUndoStep()}},Object.defineProperty(ft.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ft.prototype.showNotesEditor=function(){var We;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=(We=this._currentMarker.notes)!==null&&We!==void 0?We:"",this.overlayContainer.appendChild(this.notesArea))},ft.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},ft.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ft.prototype.addUndoStep=function(){var We=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Be=this.getState(),qe=this.undoRedoManager.getLastUndoStep();if(!qe||qe.width===Be.width&&qe.height===Be.height){var et=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Be),et<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(He){return He(new Kt(We))})}else this.undoRedoManager.replaceLastUndoStep(Be),this.eventListeners.statechange.forEach(function(He){return He(new Kt(We))})}},ft.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ft.prototype.undoStep=function(){var We=this,Be=this.undoRedoManager.undo();Be!==void 0&&(this.restoreState(Be),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(qe){return qe(new Kt(We))}))},ft.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ft.prototype.redoStep=function(){var We=this,Be=this.undoRedoManager.redo();Be!==void 0&&(this.restoreState(Be),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(qe){return qe(new Kt(We))}))},ft.prototype.stepZoom=function(){var We=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=We<this.zoomSteps.length-1?this.zoomSteps[We+1]:this.zoomSteps[0]},ft.prototype.panTo=function(We){this.contentDiv.scrollBy({left:this.prevPanPoint.x-We.x,top:this.prevPanPoint.y-We.y}),this.prevPanPoint=We},ft.prototype.startRenderAndClose=function(){return Ie(this,void 0,void 0,function(){var We,Be,qe=this;return Te(this,function(et){switch(et.label){case 0:return[4,this.render()];case 1:return We=et.sent(),Be=this.getState(),this.eventListeners.render.forEach(function(He){return He(new xn(qe,We,Be))}),this.close(!0),[2]}})})},ft.prototype.getState=function(We){We===!0&&this.setCurrentMarker();var Be={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(qe){return Be.markers.push(qe.getState())}),Be},ft.prototype.restoreState=function(We){var Be=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);We.markers.forEach(function(qe){var et=Be._availableMarkerTypes.find(function(Xe){return Xe.typeName===qe.typeName});if(et!==void 0){var He=Be.addNewMarker(et);He.restoreState(qe),Be.markers.push(He)}}),We.width&&We.height&&(We.width!==this.imageWidth||We.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/We.width,this.imageHeight/We.height),this.eventListeners.restorestate.forEach(function(qe){return qe(new Kt(Be))})},ft.prototype.addNewMarker=function(We){var Be=Pe.createGroup();return this.markerImage.appendChild(Be),new We(Be,this.overlayContainer,this.settings)},ft.prototype.createNewMarker=function(We){var Be,qe=this;(Be=typeof We=="string"?this._availableMarkerTypes.find(function(et){return et.typeName===We}):We)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Be),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(Be.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(et){return et(new Ut(qe,qe._currentMarker))}))},ft.prototype.markerCreated=function(We){var Be=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(We),this.setCurrentMarker(We),We instanceof ct&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(ct):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(qe){return qe(new Ut(Be,Be._currentMarker))})},ft.prototype.colorChanged=function(We){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=We,this.settings.defaultStrokeColor=We)},ft.prototype.fillColorChanged=function(We){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=We)},ft.prototype.markerStateChanged=function(We){var Be=this;this.eventListeners.markerchange.forEach(function(qe){return qe(new Ut(Be,We))})},ft.prototype.setCurrentMarker=function(We){var Be=this;this._currentMarker!==We&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(qe){return qe(new Ut(Be,Be._currentMarker))})),this._currentMarker=We,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(qe){return qe(new Ut(Be,Be._currentMarker))}))},ft.prototype.onPointerDown=function(We){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||We.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Be=this.markers.find(function(qe){return qe.ownsTarget(We.target)});Be!==void 0?(this.setCurrentMarker(Be),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(We.clientX,We.clientY),We.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:We.clientX,y:We.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(We.clientX,We.clientY))},ft.prototype.onDblClick=function(We){if(this._isFocused||this.focus(),this.mode==="select"){var Be=this.markers.find(function(qe){return qe.ownsTarget(We.target)});Be!==void 0&&Be!==this._currentMarker&&this.setCurrentMarker(Be),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(We.clientX,We.clientY),We.target):this.setCurrentMarker()}},ft.prototype.onPointerMove=function(We){this.touchPoints!==1&&We.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||We.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(We.clientX,We.clientY)):this.zoomLevel>1&&this.panTo({x:We.clientX,y:We.clientY}))},ft.prototype.onPointerUp=function(We){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(We.clientX,We.clientY)),this.isDragging=!1,this.addUndoStep()},ft.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ft.prototype.onKeyUp=function(We){this._currentMarker===void 0||this.notesArea!==void 0||We.key!=="Delete"&&We.key!=="Backspace"||this.deleteSelectedMarker()},ft.prototype.clientToLocalCoordinates=function(We,Be){var qe=this.markerImage.getBoundingClientRect();return{x:(We-qe.left)/this.zoomLevel,y:(Be-qe.top)/this.zoomLevel}},ft.prototype.onWindowResize=function(){this.positionUI()},ft.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var We=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=We+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},ft.prototype.addLicenseKey=function(We){he.addKey(We)},ft.prototype.addEventListener=function(We,Be){this.eventListeners.addEventListener(We,Be)},ft.prototype.removeEventListener=function(We,Be){this.eventListeners.removeEventListener(We,Be)},ft.prototype.renderState=function(We){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(We),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ft.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ft.prototype.focus=function(){var We=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Be){return Be(new Kt(We))}))},ft.prototype.blur=function(){var We=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Be){return Be(new Kt(We))}))},ft.instanceCounter=0,ft}()},17115:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{ZP:function(){return he}});var Le=Ee(52487),me=Ee(59301),Ie=Ee(47273),Te=0,be=(0,Ie.Z)();function Pe(){var Se;return be?(Se=Te,Te+=1):Se="TEST_OR_SSR",Se}function he(Se){var xe=me.useState(),ge=(0,Le.Z)(xe,2),ce=ge[0],ve=ge[1];return me.useEffect(function(){ve("rc_select_".concat(Pe()))},[]),Se||ce}},77861:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Ac:function(){return xt},Xo:function(){return Pi},Wx:function(){return or},ZP:function(){return Nt},lk:function(){return ye}});var Le=Ee(72308),me=Ee(80702),Ie=Ee(49618),Te=Ee(77321),be=Ee(52487),Pe=Ee(74416),he=Ee(62853),Se=Ee(18929),xe=Ee(48736),ge=Ee(59301),ce=Ee(92310),ve=Ee.n(ce),de=Ee(34280),ue=Ee(49658),z=Ee(10228),ee=Ee(8654),oe=function(Et){var cn=Et.className,bn=Et.customizeIcon,dn=Et.customizeIconProps,rn=Et.onMouseDown,At=Et.onClick,an=Et.children,En;return typeof bn=="function"?En=bn(dn):En=bn,ge.createElement("span",{className:cn,onMouseDown:function(qt){qt.preventDefault(),rn&&rn(qt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:At,"aria-hidden":!0},En!==void 0?En:ge.createElement("span",{className:ve()(cn.split(/\s+/).map(function(Dn){return"".concat(Dn,"-icon")}))},an))},ie=oe;function se(kt,Et,cn,bn,dn){var rn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,At=arguments.length>6?arguments[6]:void 0,an=arguments.length>7?arguments[7]:void 0,En=ge.useMemo(function(){if((0,he.Z)(bn)==="object")return bn.clearIcon;if(dn)return dn},[bn,dn]),Dn=ge.useMemo(function(){return!!(!rn&&bn&&(cn.length||At)&&!(an==="combobox"&&At===""))},[bn,rn,cn.length,At,an]);return{allowClear:Dn,clearIcon:ge.createElement(ie,{className:"".concat(kt,"-clear"),onMouseDown:Et,customizeIcon:En},"\xD7")}}var le=ge.createContext(null);function ye(){return ge.useContext(le)}function we(){var kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Et=ge.useState(!1),cn=(0,be.Z)(Et,2),bn=cn[0],dn=cn[1],rn=ge.useRef(null),At=function(){window.clearTimeout(rn.current)};ge.useEffect(function(){return At},[]);var an=function(Dn,qt){At(),rn.current=window.setTimeout(function(){dn(Dn),qt&&qt()},kt)};return[bn,an,At]}function Ce(){var kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Et=ge.useRef(null),cn=ge.useRef(null);ge.useEffect(function(){return function(){window.clearTimeout(cn.current)}},[]);function bn(dn){(dn||Et.current===null)&&(Et.current=dn),window.clearTimeout(cn.current),cn.current=window.setTimeout(function(){Et.current=null},kt)}return[function(){return Et.current},bn]}function ke(kt,Et,cn,bn){var dn=ge.useRef(null);dn.current={open:Et,triggerOpen:cn,customizedTrigger:bn},ge.useEffect(function(){function rn(At){var an;if(!((an=dn.current)!==null&&an!==void 0&&an.customizedTrigger)){var En=At.target;En.shadowRoot&&At.composed&&(En=At.composedPath()[0]||En),dn.current.open&&kt().filter(function(Dn){return Dn}).every(function(Dn){return!Dn.contains(En)&&Dn!==En})&&dn.current.triggerOpen(!1)}}return window.addEventListener("mousedown",rn),function(){return window.removeEventListener("mousedown",rn)}},[])}var Ne=Ee(26112),je=Ee(11780),Ve=function(Et,cn){var bn,dn,rn=Et.prefixCls,At=Et.id,an=Et.inputElement,En=Et.disabled,Dn=Et.tabIndex,qt=Et.autoFocus,on=Et.autoComplete,Nn=Et.editable,On=Et.activeDescendantId,qn=Et.value,Hn=Et.maxLength,ei=Et.onKeyDown,Fn=Et.onMouseDown,hi=Et.onChange,Ii=Et.onPaste,Ri=Et.onCompositionStart,Pn=Et.onCompositionEnd,Vi=Et.open,Cr=Et.attrs,mr=an||ge.createElement("input",null),_n=mr,Jn=_n.ref,ui=_n.props,yi=ui.onKeyDown,di=ui.onChange,Ei=ui.onMouseDown,Qi=ui.onCompositionStart,Fi=ui.onCompositionEnd,zi=ui.style;return(0,xe.Kp)(!("maxLength"in mr.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),mr=ge.cloneElement(mr,(0,Te.Z)((0,Te.Z)((0,Te.Z)({type:"search"},ui),{},{id:At,ref:(0,ee.sQ)(cn,Jn),disabled:En,tabIndex:Dn,autoComplete:on||"off",autoFocus:qt,className:ve()("".concat(rn,"-selection-search-input"),(bn=mr)===null||bn===void 0||(dn=bn.props)===null||dn===void 0?void 0:dn.className),role:"combobox","aria-label":"Search","aria-expanded":Vi||!1,"aria-haspopup":"listbox","aria-owns":"".concat(At,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(At,"_list"),"aria-activedescendant":Vi?On:void 0},Cr),{},{value:Nn?qn:"",maxLength:Hn,readOnly:!Nn,unselectable:Nn?null:"on",style:(0,Te.Z)((0,Te.Z)({},zi),{},{opacity:Nn?null:0}),onKeyDown:function(Bn){ei(Bn),yi&&yi(Bn)},onMouseDown:function(Bn){Fn(Bn),Ei&&Ei(Bn)},onChange:function(Bn){hi(Bn),di&&di(Bn)},onCompositionStart:function(Bn){Ri(Bn),Qi&&Qi(Bn)},onCompositionEnd:function(Bn){Pn(Bn),Fi&&Fi(Bn)},onPaste:Ii})),mr},Qe=ge.forwardRef(Ve);Qe.displayName="Input";var Ge=Qe;function mt(kt){return Array.isArray(kt)?kt:kt!==void 0?[kt]:[]}var ct=typeof window!="undefined"&&window.document&&window.document.documentElement,Ct=ct;function it(kt){return kt!=null}function St(kt){return!kt&&kt!==0}function ut(kt){return["string","number"].includes((0,he.Z)(kt))}function Ft(kt){var Et=void 0;return kt&&(ut(kt.title)?Et=kt.title.toString():ut(kt.label)&&(Et=kt.label.toString())),Et}function ht(kt,Et){Ct?ge.useLayoutEffect(kt,Et):ge.useEffect(kt,Et)}function rt(kt){var Et;return(Et=kt.key)!==null&&Et!==void 0?Et:kt.value}var dt=function(Et){Et.preventDefault(),Et.stopPropagation()},yt=function(Et){var cn=Et.id,bn=Et.prefixCls,dn=Et.values,rn=Et.open,At=Et.searchValue,an=Et.autoClearSearchValue,En=Et.inputRef,Dn=Et.placeholder,qt=Et.disabled,on=Et.mode,Nn=Et.showSearch,On=Et.autoFocus,qn=Et.autoComplete,Hn=Et.activeDescendantId,ei=Et.tabIndex,Fn=Et.removeIcon,hi=Et.maxTagCount,Ii=Et.maxTagTextLength,Ri=Et.maxTagPlaceholder,Pn=Ri===void 0?function(Ur){return"+ ".concat(Ur.length," ...")}:Ri,Vi=Et.tagRender,Cr=Et.onToggleOpen,mr=Et.onRemove,_n=Et.onInputChange,Jn=Et.onInputPaste,ui=Et.onInputKeyDown,yi=Et.onInputMouseDown,di=Et.onInputCompositionStart,Ei=Et.onInputCompositionEnd,Qi=ge.useRef(null),Fi=(0,ge.useState)(0),zi=(0,be.Z)(Fi,2),fr=zi[0],Bn=zi[1],Br=(0,ge.useState)(!1),In=(0,be.Z)(Br,2),pr=In[0],yo=In[1],Or="".concat(bn,"-selection"),bo=rn||on==="multiple"&&an===!1||on==="tags"?At:"",co=on==="tags"||on==="multiple"&&an===!1||Nn&&(rn||pr);ht(function(){Bn(Qi.current.scrollWidth)},[bo]);function Ki(Ur,zr,ts,ko,ss){return ge.createElement("span",{className:ve()("".concat(Or,"-item"),(0,Ie.Z)({},"".concat(Or,"-item-disabled"),ts)),title:Ft(Ur)},ge.createElement("span",{className:"".concat(Or,"-item-content")},zr),ko&&ge.createElement(ie,{className:"".concat(Or,"-item-remove"),onMouseDown:dt,onClick:ss,customizeIcon:Fn},"\xD7"))}function Hi(Ur,zr,ts,ko,ss){var _r=function(Kr){dt(Kr),Cr(!rn)};return ge.createElement("span",{onMouseDown:_r},Vi({label:zr,value:Ur,disabled:ts,closable:ko,onClose:ss}))}function lr(Ur){var zr=Ur.disabled,ts=Ur.label,ko=Ur.value,ss=!qt&&!zr,_r=ts;if(typeof Ii=="number"&&(typeof ts=="string"||typeof ts=="number")){var ur=String(_r);ur.length>Ii&&(_r="".concat(ur.slice(0,Ii),"..."))}var Kr=function(qr){qr&&qr.stopPropagation(),mr(Ur)};return typeof Vi=="function"?Hi(ko,_r,zr,ss,Kr):Ki(Ur,_r,zr,ss,Kr)}function Pr(Ur){var zr=typeof Pn=="function"?Pn(Ur):Pn;return Ki({title:zr},zr,!1)}var ci=ge.createElement("div",{className:"".concat(Or,"-search"),style:{width:fr},onFocus:function(){yo(!0)},onBlur:function(){yo(!1)}},ge.createElement(Ge,{ref:En,open:rn,prefixCls:bn,id:cn,inputElement:null,disabled:qt,autoFocus:On,autoComplete:qn,editable:co,activeDescendantId:Hn,value:bo,onKeyDown:ui,onMouseDown:yi,onChange:_n,onPaste:Jn,onCompositionStart:di,onCompositionEnd:Ei,tabIndex:ei,attrs:(0,Ne.Z)(Et,!0)}),ge.createElement("span",{ref:Qi,className:"".concat(Or,"-search-mirror"),"aria-hidden":!0},bo,"\xA0")),Tt=ge.createElement(je.Z,{prefixCls:"".concat(Or,"-overflow"),data:dn,renderItem:lr,renderRest:Pr,suffix:ci,itemKey:rt,maxCount:hi});return ge.createElement(ge.Fragment,null,Tt,!dn.length&&!bo&&ge.createElement("span",{className:"".concat(Or,"-placeholder")},Dn))},_t=yt,vt=function(Et){var cn=Et.inputElement,bn=Et.prefixCls,dn=Et.id,rn=Et.inputRef,At=Et.disabled,an=Et.autoFocus,En=Et.autoComplete,Dn=Et.activeDescendantId,qt=Et.mode,on=Et.open,Nn=Et.values,On=Et.placeholder,qn=Et.tabIndex,Hn=Et.showSearch,ei=Et.searchValue,Fn=Et.activeValue,hi=Et.maxLength,Ii=Et.onInputKeyDown,Ri=Et.onInputMouseDown,Pn=Et.onInputChange,Vi=Et.onInputPaste,Cr=Et.onInputCompositionStart,mr=Et.onInputCompositionEnd,_n=Et.title,Jn=ge.useState(!1),ui=(0,be.Z)(Jn,2),yi=ui[0],di=ui[1],Ei=qt==="combobox",Qi=Ei||Hn,Fi=Nn[0],zi=ei||"";Ei&&Fn&&!yi&&(zi=Fn),ge.useEffect(function(){Ei&&di(!1)},[Ei,Fn]);var fr=qt!=="combobox"&&!on&&!Hn?!1:!!zi,Bn=_n===void 0?Ft(Fi):_n,Br=function(){if(Fi)return null;var pr=fr?{visibility:"hidden"}:void 0;return ge.createElement("span",{className:"".concat(bn,"-selection-placeholder"),style:pr},On)};return ge.createElement(ge.Fragment,null,ge.createElement("span",{className:"".concat(bn,"-selection-search")},ge.createElement(Ge,{ref:rn,prefixCls:bn,id:dn,open:on,inputElement:cn,disabled:At,autoFocus:an,autoComplete:En,editable:Qi,activeDescendantId:Dn,value:zi,onKeyDown:Ii,onMouseDown:Ri,onChange:function(pr){di(!0),Pn(pr)},onPaste:Vi,onCompositionStart:Cr,onCompositionEnd:mr,tabIndex:qn,attrs:(0,Ne.Z)(Et,!0),maxLength:Ei?hi:void 0})),!Ei&&Fi?ge.createElement("span",{className:"".concat(bn,"-selection-item"),title:Bn,style:fr?{visibility:"hidden"}:void 0},Fi.label):null,Br())},Bt=vt;function jt(kt){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(kt)}var un=function(Et,cn){var bn=(0,ge.useRef)(null),dn=(0,ge.useRef)(!1),rn=Et.prefixCls,At=Et.open,an=Et.mode,En=Et.showSearch,Dn=Et.tokenWithEnter,qt=Et.autoClearSearchValue,on=Et.onSearch,Nn=Et.onSearchSubmit,On=Et.onToggleOpen,qn=Et.onInputKeyDown,Hn=Et.domRef;ge.useImperativeHandle(cn,function(){return{focus:function(){bn.current.focus()},blur:function(){bn.current.blur()}}});var ei=Ce(0),Fn=(0,be.Z)(ei,2),hi=Fn[0],Ii=Fn[1],Ri=function(zi){var fr=zi.which;(fr===z.Z.UP||fr===z.Z.DOWN)&&zi.preventDefault(),qn&&qn(zi),fr===z.Z.ENTER&&an==="tags"&&!dn.current&&!At&&(Nn==null||Nn(zi.target.value)),jt(fr)&&On(!0)},Pn=function(){Ii(!0)},Vi=(0,ge.useRef)(null),Cr=function(zi){on(zi,!0,dn.current)!==!1&&On(!0)},mr=function(){dn.current=!0},_n=function(zi){dn.current=!1,an!=="combobox"&&Cr(zi.target.value)},Jn=function(zi){var fr=zi.target.value;if(Dn&&Vi.current&&/[\r\n]/.test(Vi.current)){var Bn=Vi.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");fr=fr.replace(Bn,Vi.current)}Vi.current=null,Cr(fr)},ui=function(zi){var fr=zi.clipboardData,Bn=fr.getData("text");Vi.current=Bn},yi=function(zi){var fr=zi.target;if(fr!==bn.current){var Bn=document.body.style.msTouchAction!==void 0;Bn?setTimeout(function(){bn.current.focus()}):bn.current.focus()}},di=function(zi){var fr=hi();zi.target!==bn.current&&!fr&&an!=="combobox"&&zi.preventDefault(),(an!=="combobox"&&(!En||!fr)||!At)&&(At&&qt!==!1&&on("",!0,!1),On())},Ei={inputRef:bn,onInputKeyDown:Ri,onInputMouseDown:Pn,onInputChange:Jn,onInputPaste:ui,onInputCompositionStart:mr,onInputCompositionEnd:_n},Qi=an==="multiple"||an==="tags"?ge.createElement(_t,(0,Le.Z)({},Et,Ei)):ge.createElement(Bt,(0,Le.Z)({},Et,Ei));return ge.createElement("div",{ref:Hn,className:"".concat(rn,"-selector"),onClick:yi,onMouseDown:di},Qi)},Kt=ge.forwardRef(un);Kt.displayName="Selector";var xn=Kt,Ut=Ee(35593),Wt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],$t=function(Et){var cn=Et===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:cn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:cn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:cn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:cn,adjustY:1},htmlRegion:"scroll"}}},ft=function(Et,cn){var bn=Et.prefixCls,dn=Et.disabled,rn=Et.visible,At=Et.children,an=Et.popupElement,En=Et.animation,Dn=Et.transitionName,qt=Et.dropdownStyle,on=Et.dropdownClassName,Nn=Et.direction,On=Nn===void 0?"ltr":Nn,qn=Et.placement,Hn=Et.builtinPlacements,ei=Et.dropdownMatchSelectWidth,Fn=Et.dropdownRender,hi=Et.dropdownAlign,Ii=Et.getPopupContainer,Ri=Et.empty,Pn=Et.getTriggerDOMNode,Vi=Et.onPopupVisibleChange,Cr=Et.onPopupMouseEnter,mr=(0,Pe.Z)(Et,Wt),_n="".concat(bn,"-dropdown"),Jn=an;Fn&&(Jn=Fn(an));var ui=ge.useMemo(function(){return Hn||$t(ei)},[Hn,ei]),yi=En?"".concat(_n,"-").concat(En):Dn,di=typeof ei=="number",Ei=ge.useMemo(function(){return di?null:ei===!1?"minWidth":"width"},[ei,di]),Qi=qt;di&&(Qi=(0,Te.Z)((0,Te.Z)({},Qi),{},{width:ei}));var Fi=ge.useRef(null);return ge.useImperativeHandle(cn,function(){return{getPopupElement:function(){return Fi.current}}}),ge.createElement(Ut.Z,(0,Le.Z)({},mr,{showAction:Vi?["click"]:[],hideAction:Vi?["click"]:[],popupPlacement:qn||(On==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:ui,prefixCls:_n,popupTransitionName:yi,popup:ge.createElement("div",{ref:Fi,onMouseEnter:Cr},Jn),stretch:Ei,popupAlign:hi,popupVisible:rn,getPopupContainer:Ii,popupClassName:ve()(on,(0,Ie.Z)({},"".concat(_n,"-empty"),Ri)),popupStyle:Qi,getTriggerDOMNode:Pn,onPopupVisibleChange:Vi}),At)},We=ge.forwardRef(ft);We.displayName="SelectTrigger";var Be=We,qe=Ee(68413);function et(kt,Et){var cn=kt.key,bn;return"value"in kt&&(bn=kt.value),cn!=null?cn:bn!==void 0?bn:"rc-index-key-".concat(Et)}function He(kt,Et){var cn=kt||{},bn=cn.label,dn=cn.value,rn=cn.options,At=cn.groupLabel,an=bn||(Et?"children":"label");return{label:an,value:dn||"value",options:rn||"options",groupLabel:At||an}}function Xe(kt){var Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},cn=Et.fieldNames,bn=Et.childrenAsData,dn=[],rn=He(cn,!1),At=rn.label,an=rn.value,En=rn.options,Dn=rn.groupLabel;function qt(on,Nn){on.forEach(function(On){if(Nn||!(En in On)){var qn=On[an];dn.push({key:et(On,dn.length),groupOption:Nn,data:On,label:On[At],value:qn})}else{var Hn=On[Dn];Hn===void 0&&bn&&(Hn=On.label),dn.push({key:et(On,dn.length),group:!0,data:On,label:Hn}),qt(On[En],!0)}})}return qt(kt,!1),dn}function Re(kt){var Et=(0,Te.Z)({},kt);return"props"in Et||Object.defineProperty(Et,"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`."),Et}}),Et}function Ae(kt,Et){if(!Et||!Et.length)return null;var cn=!1;function bn(rn,At){var an=(0,qe.Z)(At),En=an[0],Dn=an.slice(1);if(!En)return[rn];var qt=rn.split(En);return cn=cn||qt.length>1,qt.reduce(function(on,Nn){return[].concat((0,me.Z)(on),(0,me.Z)(bn(Nn,Dn)))},[]).filter(function(on){return on})}var dn=bn(kt,Et);return cn?dn:null}var Ue=["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"],Ke=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function Ze(kt){return kt==="tags"||kt==="multiple"}var lt=ge.forwardRef(function(kt,Et){var cn,bn,dn=kt.id,rn=kt.prefixCls,At=kt.className,an=kt.showSearch,En=kt.tagRender,Dn=kt.direction,qt=kt.omitDomProps,on=kt.displayValues,Nn=kt.onDisplayValuesChange,On=kt.emptyOptions,qn=kt.notFoundContent,Hn=qn===void 0?"Not Found":qn,ei=kt.onClear,Fn=kt.mode,hi=kt.disabled,Ii=kt.loading,Ri=kt.getInputElement,Pn=kt.getRawInputElement,Vi=kt.open,Cr=kt.defaultOpen,mr=kt.onDropdownVisibleChange,_n=kt.activeValue,Jn=kt.onActiveValueChange,ui=kt.activeDescendantId,yi=kt.searchValue,di=kt.autoClearSearchValue,Ei=kt.onSearch,Qi=kt.onSearchSplit,Fi=kt.tokenSeparators,zi=kt.allowClear,fr=kt.suffixIcon,Bn=kt.clearIcon,Br=kt.OptionList,In=kt.animation,pr=kt.transitionName,yo=kt.dropdownStyle,Or=kt.dropdownClassName,bo=kt.dropdownMatchSelectWidth,co=kt.dropdownRender,Ki=kt.dropdownAlign,Hi=kt.placement,lr=kt.builtinPlacements,Pr=kt.getPopupContainer,ci=kt.showAction,Tt=ci===void 0?[]:ci,Ur=kt.onFocus,zr=kt.onBlur,ts=kt.onKeyUp,ko=kt.onKeyDown,ss=kt.onMouseDown,_r=(0,Pe.Z)(kt,Ue),ur=Ze(Fn),Kr=(an!==void 0?an:ur)||Fn==="combobox",cr=(0,Te.Z)({},_r);Ke.forEach(function(oo){delete cr[oo]}),qt==null||qt.forEach(function(oo){delete cr[oo]});var qr=ge.useState(!1),Yo=(0,be.Z)(qr,2),nr=Yo[0],Wi=Yo[1];ge.useEffect(function(){Wi((0,ue.Z)())},[]);var Qn=ge.useRef(null),ir=ge.useRef(null),eo=ge.useRef(null),Ro=ge.useRef(null),Bo=ge.useRef(null),Xo=we(),as=(0,be.Z)(Xo,3),Ho=as[0],ia=as[1],_s=as[2];ge.useImperativeHandle(Et,function(){var oo,Uo;return{focus:(oo=Ro.current)===null||oo===void 0?void 0:oo.focus,blur:(Uo=Ro.current)===null||Uo===void 0?void 0:Uo.blur,scrollTo:function(ra){var Ds;return(Ds=Bo.current)===null||Ds===void 0?void 0:Ds.scrollTo(ra)}}});var la=ge.useMemo(function(){var oo;if(Fn!=="combobox")return yi;var Uo=(oo=on[0])===null||oo===void 0?void 0:oo.value;return typeof Uo=="string"||typeof Uo=="number"?String(Uo):""},[yi,Fn,on]),Tn=Fn==="combobox"&&typeof Ri=="function"&&Ri()||null,Is=typeof Pn=="function"&&Pn(),Pu=(0,ee.x1)(ir,Is==null||(cn=Is.props)===null||cn===void 0?void 0:cn.ref),Ua=ge.useState(!1),Sa=(0,be.Z)(Ua,2),us=Sa[0],Ws=Sa[1];(0,de.Z)(function(){Ws(!0)},[]);var Po=(0,Se.Z)(!1,{defaultValue:Cr,value:Vi}),Ao=(0,be.Z)(Po,2),Eo=Ao[0],ua=Ao[1],xr=us?Eo:!1,lo=!Hn&&On;(hi||lo&&xr&&Fn==="combobox")&&(xr=!1);var $r=lo?!1:xr,Mi=ge.useCallback(function(oo){var Uo=oo!==void 0?oo:!xr;hi||(ua(Uo),xr!==Uo&&(mr==null||mr(Uo)))},[hi,xr,ua,mr]),Es=ge.useMemo(function(){return(Fi||[]).some(function(oo){return[`
|
|
|
`,`\r
|
|
|
`].includes(oo)})},[Fi]),Ls=function(Uo,ka,ra){var Ds=!0,bs=Uo;Jn==null||Jn(null);var ks=ra?null:Ae(Uo,Fi);return Fn!=="combobox"&&ks&&(bs="",Qi==null||Qi(ks),Mi(!1),Ds=!1),Ei&&la!==bs&&Ei(bs,{source:ka?"typing":"effect"}),Ds},xa=function(Uo){!Uo||!Uo.trim()||Ei(Uo,{source:"submit"})};ge.useEffect(function(){!xr&&!ur&&Fn!=="combobox"&&Ls("",!1,!1)},[xr]),ge.useEffect(function(){Eo&&hi&&ua(!1),hi&&ia(!1)},[hi]);var xl=Ce(),Il=(0,be.Z)(xl,2),vi=Il[0],ms=Il[1],Xs=function(Uo){var ka=vi(),ra=Uo.which;if(ra===z.Z.ENTER&&(Fn!=="combobox"&&Uo.preventDefault(),xr||Mi(!0)),ms(!!la),ra===z.Z.BACKSPACE&&!ka&&ur&&!la&&on.length){for(var Ds=(0,me.Z)(on),bs=null,ks=Ds.length-1;ks>=0;ks-=1){var Zs=Ds[ks];if(!Zs.disabled){Ds.splice(ks,1),bs=Zs;break}}bs&&Nn(Ds,{type:"remove",values:[bs]})}for(var Ks=arguments.length,Yl=new Array(Ks>1?Ks-1:0),Bl=1;Bl<Ks;Bl++)Yl[Bl-1]=arguments[Bl];if(xr&&Bo.current){var Rs;(Rs=Bo.current).onKeyDown.apply(Rs,[Uo].concat(Yl))}ko==null||ko.apply(void 0,[Uo].concat(Yl))},qa=function(Uo){for(var ka=arguments.length,ra=new Array(ka>1?ka-1:0),Ds=1;Ds<ka;Ds++)ra[Ds-1]=arguments[Ds];if(xr&&Bo.current){var bs;(bs=Bo.current).onKeyUp.apply(bs,[Uo].concat(ra))}ts==null||ts.apply(void 0,[Uo].concat(ra))},wl=function(Uo){var ka=on.filter(function(ra){return ra!==Uo});Nn(ka,{type:"remove",values:[Uo]})},Dl=ge.useRef(!1),Fr=function(){ia(!0),hi||(Ur&&!Dl.current&&Ur.apply(void 0,arguments),Tt.includes("focus")&&Mi(!0)),Dl.current=!0},nc=function(){ia(!1,function(){Dl.current=!1,Mi(!1)}),!hi&&(la&&(Fn==="tags"?Ei(la,{source:"submit"}):Fn==="multiple"&&Ei("",{source:"blur"})),zr&&zr.apply(void 0,arguments))},Ia=[];ge.useEffect(function(){return function(){Ia.forEach(function(oo){return clearTimeout(oo)}),Ia.splice(0,Ia.length)}},[]);var Ga=function(Uo){var ka,ra=Uo.target,Ds=(ka=eo.current)===null||ka===void 0?void 0:ka.getPopupElement();if(Ds&&Ds.contains(ra)){var bs=setTimeout(function(){var Yl=Ia.indexOf(bs);if(Yl!==-1&&Ia.splice(Yl,1),_s(),!nr&&!Ds.contains(document.activeElement)){var Bl;(Bl=Ro.current)===null||Bl===void 0||Bl.focus()}});Ia.push(bs)}for(var ks=arguments.length,Zs=new Array(ks>1?ks-1:0),Ks=1;Ks<ks;Ks++)Zs[Ks-1]=arguments[Ks];ss==null||ss.apply(void 0,[Uo].concat(Zs))},Na=ge.useState({}),$l=(0,be.Z)(Na,2),_u=$l[1];function Wa(){_u({})}var Za;Is&&(Za=function(Uo){Mi(Uo)}),ke(function(){var oo;return[Qn.current,(oo=eo.current)===null||oo===void 0?void 0:oo.getPopupElement()]},$r,Mi,!!Is);var Uu=ge.useMemo(function(){return(0,Te.Z)((0,Te.Z)({},kt),{},{notFoundContent:Hn,open:xr,triggerOpen:$r,id:dn,showSearch:Kr,multiple:ur,toggleOpen:Mi})},[kt,Hn,$r,xr,dn,Kr,ur,Mi]),yc=!!fr||Ii,Eu;yc&&(Eu=ge.createElement(ie,{className:ve()("".concat(rn,"-arrow"),(0,Ie.Z)({},"".concat(rn,"-arrow-loading"),Ii)),customizeIcon:fr,customizeIconProps:{loading:Ii,searchValue:la,open:xr,focused:Ho,showSearch:Kr}}));var Rl=function(){var Uo;ei==null||ei(),(Uo=Ro.current)===null||Uo===void 0||Uo.focus(),Nn([],{type:"clear",values:on}),Ls("",!1,!1)},Sc=se(rn,Rl,on,zi,Bn,hi,la,Fn),Gu=Sc.allowClear,Lu=Sc.clearIcon,bl=ge.createElement(Br,{ref:Bo}),th=ve()(rn,At,(bn={},(0,Ie.Z)(bn,"".concat(rn,"-focused"),Ho),(0,Ie.Z)(bn,"".concat(rn,"-multiple"),ur),(0,Ie.Z)(bn,"".concat(rn,"-single"),!ur),(0,Ie.Z)(bn,"".concat(rn,"-allow-clear"),zi),(0,Ie.Z)(bn,"".concat(rn,"-show-arrow"),yc),(0,Ie.Z)(bn,"".concat(rn,"-disabled"),hi),(0,Ie.Z)(bn,"".concat(rn,"-loading"),Ii),(0,Ie.Z)(bn,"".concat(rn,"-open"),xr),(0,Ie.Z)(bn,"".concat(rn,"-customize-input"),Tn),(0,Ie.Z)(bn,"".concat(rn,"-show-search"),Kr),bn)),xc=ge.createElement(Be,{ref:eo,disabled:hi,prefixCls:rn,visible:$r,popupElement:bl,animation:In,transitionName:pr,dropdownStyle:yo,dropdownClassName:Or,direction:Dn,dropdownMatchSelectWidth:bo,dropdownRender:co,dropdownAlign:Ki,placement:Hi,builtinPlacements:lr,getPopupContainer:Pr,empty:On,getTriggerDOMNode:function(){return ir.current},onPopupVisibleChange:Za,onPopupMouseEnter:Wa},Is?ge.cloneElement(Is,{ref:Pu}):ge.createElement(xn,(0,Le.Z)({},kt,{domRef:ir,prefixCls:rn,inputElement:Tn,ref:Ro,id:dn,showSearch:Kr,autoClearSearchValue:di,mode:Fn,activeDescendantId:ui,tagRender:En,values:on,open:xr,onToggleOpen:Mi,activeValue:_n,searchValue:la,onSearch:Ls,onSearchSubmit:xa,onRemove:wl,tokenWithEnter:Es}))),lu;return Is?lu=xc:lu=ge.createElement("div",(0,Le.Z)({className:th},cr,{ref:Qn,onMouseDown:Ga,onKeyDown:Xs,onKeyUp:qa,onFocus:Fr,onBlur:nc}),Ho&&!xr&&ge.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(on.map(function(oo){var Uo=oo.label,ka=oo.value;return["number","string"].includes((0,he.Z)(Uo))?Uo:ka}).join(", "))),xc,Eu,Gu&&Lu),ge.createElement(le.Provider,{value:Uu},lu)}),xt=lt,tn=function(kt,Et){var cn=ge.useRef({values:new Map,options:new Map}),bn=ge.useMemo(function(){var rn=cn.current,At=rn.values,an=rn.options,En=kt.map(function(on){if(on.label===void 0){var Nn;return(0,Te.Z)((0,Te.Z)({},on),{},{label:(Nn=At.get(on.value))===null||Nn===void 0?void 0:Nn.label})}return on}),Dn=new Map,qt=new Map;return En.forEach(function(on){Dn.set(on.value,on),qt.set(on.value,Et.get(on.value)||an.get(on.value))}),cn.current.values=Dn,cn.current.options=qt,En},[kt,Et]),dn=ge.useCallback(function(rn){return Et.get(rn)||cn.current.options.get(rn)},[Et]);return[bn,dn]};function en(kt,Et){return mt(kt).join("").toUpperCase().includes(Et)}var Jt=function(kt,Et,cn,bn,dn){return ge.useMemo(function(){if(!cn||bn===!1)return kt;var rn=Et.options,At=Et.label,an=Et.value,En=[],Dn=typeof bn=="function",qt=cn.toUpperCase(),on=Dn?bn:function(On,qn){return dn?en(qn[dn],qt):qn[rn]?en(qn[At!=="children"?At:"label"],qt):en(qn[an],qt)},Nn=Dn?function(On){return Re(On)}:function(On){return On};return kt.forEach(function(On){if(On[rn]){var qn=on(cn,Nn(On));if(qn)En.push(On);else{var Hn=On[rn].filter(function(ei){return on(cn,Nn(ei))});Hn.length&&En.push((0,Te.Z)((0,Te.Z)({},On),{},(0,Ie.Z)({},rn,Hn)))}return}on(cn,Nn(On))&&En.push(On)}),En},[kt,bn,dn,cn,Et])},gn=Ee(17115),Mn=Ee(11592),yn=["children","value"],kn=["children"];function $n(kt){var Et=kt,cn=Et.key,bn=Et.props,dn=bn.children,rn=bn.value,At=(0,Pe.Z)(bn,yn);return(0,Te.Z)({key:cn,value:rn!==void 0?rn:cn,children:dn},At)}function An(kt){var Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Mn.Z)(kt).map(function(cn,bn){if(!ge.isValidElement(cn)||!cn.type)return null;var dn=cn,rn=dn.type.isSelectOptGroup,At=dn.key,an=dn.props,En=an.children,Dn=(0,Pe.Z)(an,kn);return Et||!rn?$n(cn):(0,Te.Z)((0,Te.Z)({key:"__RC_SELECT_GRP__".concat(At===null?bn:At,"__"),label:At},Dn),{},{options:An(En)})}).filter(function(cn){return cn})}function oi(kt,Et,cn,bn,dn){return ge.useMemo(function(){var rn=kt,At=!kt;At&&(rn=An(Et));var an=new Map,En=new Map,Dn=function(Nn,On,qn){qn&&typeof qn=="string"&&Nn.set(On[qn],On)};function qt(on){for(var Nn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,On=0;On<on.length;On+=1){var qn=on[On];!qn[cn.options]||Nn?(an.set(qn[cn.value],qn),Dn(En,qn,cn.label),Dn(En,qn,bn),Dn(En,qn,dn)):qt(qn[cn.options],!0)}}return qt(rn),{options:rn,valueOptions:an,labelOptions:En}},[kt,Et,cn,bn,dn])}function ai(kt){var Et=ge.useRef();Et.current=kt;var cn=ge.useCallback(function(){return Et.current.apply(Et,arguments)},[]);return cn}var Di=function(){return null};Di.isSelectOptGroup=!0;var Pi=Di,Xi=function(){return null};Xi.isSelectOption=!0;var or=Xi,ar=Ee(80547),dr=Ee(2738),no=Ee(45680),Ir=ge.createContext(null),xi=Ir;function wr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Mr=["disabled","title","children","style","className"];function ot(kt){return typeof kt=="string"||typeof kt=="number"}var Rr=function(Et,cn){var bn=ye(),dn=bn.prefixCls,rn=bn.id,At=bn.open,an=bn.multiple,En=bn.mode,Dn=bn.searchValue,qt=bn.toggleOpen,on=bn.notFoundContent,Nn=bn.onPopupScroll,On=ge.useContext(xi),qn=On.flattenOptions,Hn=On.onActiveValue,ei=On.defaultActiveFirstOption,Fn=On.onSelect,hi=On.menuItemSelectedIcon,Ii=On.rawValues,Ri=On.fieldNames,Pn=On.virtual,Vi=On.direction,Cr=On.listHeight,mr=On.listItemHeight,_n="".concat(dn,"-item"),Jn=(0,ar.Z)(function(){return qn},[At,qn],function(Ki,Hi){return Hi[0]&&Ki[1]!==Hi[1]}),ui=ge.useRef(null),yi=function(Hi){Hi.preventDefault()},di=function(Hi){ui.current&&ui.current.scrollTo(typeof Hi=="number"?{index:Hi}:Hi)},Ei=function(Hi){for(var lr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Pr=Jn.length,ci=0;ci<Pr;ci+=1){var Tt=(Hi+ci*lr+Pr)%Pr,Ur=Jn[Tt],zr=Ur.group,ts=Ur.data;if(!zr&&!ts.disabled)return Tt}return-1},Qi=ge.useState(function(){return Ei(0)}),Fi=(0,be.Z)(Qi,2),zi=Fi[0],fr=Fi[1],Bn=function(Hi){var lr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;fr(Hi);var Pr={source:lr?"keyboard":"mouse"},ci=Jn[Hi];if(!ci){Hn(null,-1,Pr);return}Hn(ci.value,Hi,Pr)};(0,ge.useEffect)(function(){Bn(ei!==!1?Ei(0):-1)},[Jn.length,Dn]);var Br=ge.useCallback(function(Ki){return Ii.has(Ki)&&En!=="combobox"},[En,(0,me.Z)(Ii).toString(),Ii.size]);(0,ge.useEffect)(function(){var Ki=setTimeout(function(){if(!an&&At&&Ii.size===1){var lr=Array.from(Ii)[0],Pr=Jn.findIndex(function(ci){var Tt=ci.data;return Tt.value===lr});Pr!==-1&&(Bn(Pr),di(Pr))}});if(At){var Hi;(Hi=ui.current)===null||Hi===void 0||Hi.scrollTo(void 0)}return function(){return clearTimeout(Ki)}},[At,Dn,qn.length]);var In=function(Hi){Hi!==void 0&&Fn(Hi,{selected:!Ii.has(Hi)}),an||qt(!1)};if(ge.useImperativeHandle(cn,function(){return{onKeyDown:function(Hi){var lr=Hi.which,Pr=Hi.ctrlKey;switch(lr){case z.Z.N:case z.Z.P:case z.Z.UP:case z.Z.DOWN:{var ci=0;if(lr===z.Z.UP?ci=-1:lr===z.Z.DOWN?ci=1:wr()&&Pr&&(lr===z.Z.N?ci=1:lr===z.Z.P&&(ci=-1)),ci!==0){var Tt=Ei(zi+ci,ci);di(Tt),Bn(Tt,!0)}break}case z.Z.ENTER:{var Ur=Jn[zi];Ur&&!Ur.data.disabled?In(Ur.value):In(void 0),At&&Hi.preventDefault();break}case z.Z.ESC:qt(!1),At&&Hi.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Hi){di(Hi)}}}),Jn.length===0)return ge.createElement("div",{role:"listbox",id:"".concat(rn,"_list"),className:"".concat(_n,"-empty"),onMouseDown:yi},on);var pr=Object.keys(Ri).map(function(Ki){return Ri[Ki]}),yo=function(Hi){return Hi.label};function Or(Ki,Hi){var lr=Ki.group;return{role:lr?"presentation":"option",id:"".concat(rn,"_list_").concat(Hi)}}var bo=function(Hi){var lr=Jn[Hi];if(!lr)return null;var Pr=lr.data||{},ci=Pr.value,Tt=lr.group,Ur=(0,Ne.Z)(Pr,!0),zr=yo(lr);return lr?ge.createElement("div",(0,Le.Z)({"aria-label":typeof zr=="string"&&!Tt?zr:null},Ur,{key:Hi},Or(lr,Hi),{"aria-selected":Br(ci)}),ci):null},co={role:"listbox",id:"".concat(rn,"_list")};return ge.createElement(ge.Fragment,null,Pn&&ge.createElement("div",(0,Le.Z)({},co,{style:{height:0,width:0,overflow:"hidden"}}),bo(zi-1),bo(zi),bo(zi+1)),ge.createElement(no.Z,{itemKey:"key",ref:ui,data:Jn,height:Cr,itemHeight:mr,fullHeight:!1,onMouseDown:yi,onScroll:Nn,virtual:Pn,direction:Vi,innerProps:Pn?null:co},function(Ki,Hi){var lr,Pr=Ki.group,ci=Ki.groupOption,Tt=Ki.data,Ur=Ki.label,zr=Ki.value,ts=Tt.key;if(Pr){var ko,ss=(ko=Tt.title)!==null&&ko!==void 0?ko:ot(Ur)?Ur.toString():void 0;return ge.createElement("div",{className:ve()(_n,"".concat(_n,"-group")),title:ss},Ur!==void 0?Ur:ts)}var _r=Tt.disabled,ur=Tt.title,Kr=Tt.children,cr=Tt.style,qr=Tt.className,Yo=(0,Pe.Z)(Tt,Mr),nr=(0,dr.Z)(Yo,pr),Wi=Br(zr),Qn="".concat(_n,"-option"),ir=ve()(_n,Qn,qr,(lr={},(0,Ie.Z)(lr,"".concat(Qn,"-grouped"),ci),(0,Ie.Z)(lr,"".concat(Qn,"-active"),zi===Hi&&!_r),(0,Ie.Z)(lr,"".concat(Qn,"-disabled"),_r),(0,Ie.Z)(lr,"".concat(Qn,"-selected"),Wi),lr)),eo=yo(Ki),Ro=!hi||typeof hi=="function"||Wi,Bo=typeof eo=="number"?eo:eo||zr,Xo=ot(Bo)?Bo.toString():void 0;return ur!==void 0&&(Xo=ur),ge.createElement("div",(0,Le.Z)({},(0,Ne.Z)(nr),Pn?{}:Or(Ki,Hi),{"aria-selected":Wi,className:ir,title:Xo,onMouseMove:function(){zi===Hi||_r||Bn(Hi)},onClick:function(){_r||In(zr)},style:cr}),ge.createElement("div",{className:"".concat(Qn,"-content")},Bo),ge.isValidElement(hi)||Wi,Ro&&ge.createElement(ie,{className:"".concat(_n,"-option-state"),customizeIcon:hi,customizeIconProps:{isSelected:Wi}},Wi?"\u2713":null))}))},Nr=ge.forwardRef(Rr);Nr.displayName="OptionList";var Hr=Nr;function uo(kt){var Et=kt.mode,cn=kt.options,bn=kt.children,dn=kt.backfill,rn=kt.allowClear,At=kt.placeholder,an=kt.getInputElement,En=kt.showSearch,Dn=kt.onSearch,qt=kt.defaultOpen,on=kt.autoFocus,Nn=kt.labelInValue,On=kt.value,qn=kt.inputValue,Hn=kt.optionLabelProp,ei=isMultiple(Et),Fn=En!==void 0?En:ei||Et==="combobox",hi=cn||convertChildrenToData(bn);if(warning(Et!=="tags"||hi.every(function(Vi){return!Vi.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Et==="tags"||Et==="combobox"){var Ii=hi.some(function(Vi){return Vi.options?Vi.options.some(function(Cr){return typeof("value"in Cr?Cr.value:Cr.key)=="number"}):typeof("value"in Vi?Vi.value:Vi.key)=="number"});warning(!Ii,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Et!=="combobox"||!Hn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Et==="combobox"||!dn,"`backfill` only works with `combobox` mode."),warning(Et==="combobox"||!an,"`getInputElement` only work with `combobox` mode."),noteOnce(Et!=="combobox"||!an||!rn||!At,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Dn&&!Fn&&Et!=="combobox"&&Et!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!qt||on,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),On!=null){var Ri=toArray(On);warning(!Nn||Ri.every(function(Vi){return _typeof(Vi)==="object"&&("key"in Vi||"value"in Vi)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!ei||Array.isArray(On),"`value` should be array when `mode` is `multiple` or `tags`")}if(bn){var Pn=null;toNodeArray(bn).some(function(Vi){if(!React.isValidElement(Vi)||!Vi.type)return!1;var Cr=Vi,mr=Cr.type;if(mr.isSelectOption)return!1;if(mr.isSelectOptGroup){var _n=toNodeArray(Vi.props.children).every(function(Jn){return!React.isValidElement(Jn)||!Vi.type||Jn.type.isSelectOption?!0:(Pn=Jn.type,!1)});return!_n}return Pn=mr,!0}),Pn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Pn.displayName||Pn.name||Pn,"`.")),warning(qn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function po(kt,Et){if(kt){var cn=function bn(dn){for(var rn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,At=0;At<dn.length;At++){var an=dn[At];if(an[Et==null?void 0:Et.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!rn&&Array.isArray(an[Et==null?void 0:Et.options])&&bn(an[Et==null?void 0:Et.options],!0))break}};cn(kt)}}var io=null,Do=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],Xn=["inputValue"];function $e(kt){return!kt||(0,he.Z)(kt)!=="object"}var nt=ge.forwardRef(function(kt,Et){var cn=kt.id,bn=kt.mode,dn=kt.prefixCls,rn=dn===void 0?"rc-select":dn,At=kt.backfill,an=kt.fieldNames,En=kt.inputValue,Dn=kt.searchValue,qt=kt.onSearch,on=kt.autoClearSearchValue,Nn=on===void 0?!0:on,On=kt.onSelect,qn=kt.onDeselect,Hn=kt.dropdownMatchSelectWidth,ei=Hn===void 0?!0:Hn,Fn=kt.filterOption,hi=kt.filterSort,Ii=kt.optionFilterProp,Ri=kt.optionLabelProp,Pn=kt.options,Vi=kt.children,Cr=kt.defaultActiveFirstOption,mr=kt.menuItemSelectedIcon,_n=kt.virtual,Jn=kt.direction,ui=kt.listHeight,yi=ui===void 0?200:ui,di=kt.listItemHeight,Ei=di===void 0?20:di,Qi=kt.value,Fi=kt.defaultValue,zi=kt.labelInValue,fr=kt.onChange,Bn=(0,Pe.Z)(kt,Do),Br=(0,gn.ZP)(cn),In=Ze(bn),pr=!!(!Pn&&Vi),yo=ge.useMemo(function(){return Fn===void 0&&bn==="combobox"?!1:Fn},[Fn,bn]),Or=ge.useMemo(function(){return He(an,pr)},[JSON.stringify(an),pr]),bo=(0,Se.Z)("",{value:Dn!==void 0?Dn:En,postState:function(lo){return lo||""}}),co=(0,be.Z)(bo,2),Ki=co[0],Hi=co[1],lr=oi(Pn,Vi,Or,Ii,Ri),Pr=lr.valueOptions,ci=lr.labelOptions,Tt=lr.options,Ur=ge.useCallback(function(xr){var lo=mt(xr);return lo.map(function($r){var Mi,Es,Ls,xa,xl;if($e($r))Mi=$r;else{var Il;Ls=$r.key,Es=$r.label,Mi=(Il=$r.value)!==null&&Il!==void 0?Il:Ls}var vi=Pr.get(Mi);if(vi){var ms;if(Es===void 0&&(Es=vi==null?void 0:vi[Ri||Or.label]),Ls===void 0&&(Ls=(ms=vi==null?void 0:vi.key)!==null&&ms!==void 0?ms:Mi),xa=vi==null?void 0:vi.disabled,xl=vi==null?void 0:vi.title,0)var Xs}return{label:Es,value:Mi,key:Ls,disabled:xa,title:xl}})},[Or,Ri,Pr]),zr=(0,Se.Z)(Fi,{value:Qi}),ts=(0,be.Z)(zr,2),ko=ts[0],ss=ts[1],_r=ge.useMemo(function(){var xr,lo=Ur(ko);return bn==="combobox"&&St((xr=lo[0])===null||xr===void 0?void 0:xr.value)?[]:lo},[ko,Ur,bn]),ur=tn(_r,Pr),Kr=(0,be.Z)(ur,2),cr=Kr[0],qr=Kr[1],Yo=ge.useMemo(function(){if(!bn&&cr.length===1){var xr=cr[0];if(xr.value===null&&(xr.label===null||xr.label===void 0))return[]}return cr.map(function(lo){var $r;return(0,Te.Z)((0,Te.Z)({},lo),{},{label:($r=lo.label)!==null&&$r!==void 0?$r:lo.value})})},[bn,cr]),nr=ge.useMemo(function(){return new Set(cr.map(function(xr){return xr.value}))},[cr]);ge.useEffect(function(){if(bn==="combobox"){var xr,lo=(xr=cr[0])===null||xr===void 0?void 0:xr.value;Hi(it(lo)?String(lo):"")}},[cr]);var Wi=ai(function(xr,lo){var $r,Mi=lo!=null?lo:xr;return $r={},(0,Ie.Z)($r,Or.value,xr),(0,Ie.Z)($r,Or.label,Mi),$r}),Qn=ge.useMemo(function(){if(bn!=="tags")return Tt;var xr=(0,me.Z)(Tt),lo=function(Mi){return Pr.has(Mi)};return(0,me.Z)(cr).sort(function($r,Mi){return $r.value<Mi.value?-1:1}).forEach(function($r){var Mi=$r.value;lo(Mi)||xr.push(Wi(Mi,$r.label))}),xr},[Wi,Tt,Pr,cr,bn]),ir=Jt(Qn,Or,Ki,yo,Ii),eo=ge.useMemo(function(){return bn!=="tags"||!Ki||ir.some(function(xr){return xr[Ii||"value"]===Ki})||ir.some(function(xr){return xr[Or.value]===Ki})?ir:[Wi(Ki)].concat((0,me.Z)(ir))},[Wi,Ii,bn,ir,Ki,Or]),Ro=ge.useMemo(function(){return hi?(0,me.Z)(eo).sort(function(xr,lo){return hi(xr,lo)}):eo},[eo,hi]),Bo=ge.useMemo(function(){return Xe(Ro,{fieldNames:Or,childrenAsData:pr})},[Ro,Or,pr]),Xo=function(lo){var $r=Ur(lo);if(ss($r),fr&&($r.length!==cr.length||$r.some(function(Ls,xa){var xl;return((xl=cr[xa])===null||xl===void 0?void 0:xl.value)!==(Ls==null?void 0:Ls.value)}))){var Mi=zi?$r:$r.map(function(Ls){return Ls.value}),Es=$r.map(function(Ls){return Re(qr(Ls.value))});fr(In?Mi:Mi[0],In?Es:Es[0])}},as=ge.useState(null),Ho=(0,be.Z)(as,2),ia=Ho[0],_s=Ho[1],la=ge.useState(0),Tn=(0,be.Z)(la,2),Is=Tn[0],Pu=Tn[1],Ua=Cr!==void 0?Cr:bn!=="combobox",Sa=ge.useCallback(function(xr,lo){var $r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Mi=$r.source,Es=Mi===void 0?"keyboard":Mi;Pu(lo),At&&bn==="combobox"&&xr!==null&&Es==="keyboard"&&_s(String(xr))},[At,bn]),us=function(lo,$r,Mi){var Es=function(){var Dl,Fr=qr(lo);return[zi?{label:Fr==null?void 0:Fr[Or.label],value:lo,key:(Dl=Fr==null?void 0:Fr.key)!==null&&Dl!==void 0?Dl:lo}:lo,Re(Fr)]};if($r&&On){var Ls=Es(),xa=(0,be.Z)(Ls,2),xl=xa[0],Il=xa[1];On(xl,Il)}else if(!$r&&qn&&Mi!=="clear"){var vi=Es(),ms=(0,be.Z)(vi,2),Xs=ms[0],qa=ms[1];qn(Xs,qa)}},Ws=ai(function(xr,lo){var $r,Mi=In?lo.selected:!0;Mi?$r=In?[].concat((0,me.Z)(cr),[xr]):[xr]:$r=cr.filter(function(Es){return Es.value!==xr}),Xo($r),us(xr,Mi),bn==="combobox"?_s(""):(!Ze||Nn)&&(Hi(""),_s(""))}),Po=function(lo,$r){Xo(lo);var Mi=$r.type,Es=$r.values;(Mi==="remove"||Mi==="clear")&&Es.forEach(function(Ls){us(Ls.value,!1,Mi)})},Ao=function(lo,$r){if(Hi(lo),_s(null),$r.source==="submit"){var Mi=(lo||"").trim();if(Mi){var Es=Array.from(new Set([].concat((0,me.Z)(nr),[Mi])));Xo(Es),us(Mi,!0),Hi("")}return}$r.source!=="blur"&&(bn==="combobox"&&Xo(lo),qt==null||qt(lo))},Eo=function(lo){var $r=lo;bn!=="tags"&&($r=lo.map(function(Es){var Ls=ci.get(Es);return Ls==null?void 0:Ls.value}).filter(function(Es){return Es!==void 0}));var Mi=Array.from(new Set([].concat((0,me.Z)(nr),(0,me.Z)($r))));Xo(Mi),Mi.forEach(function(Es){us(Es,!0)})},ua=ge.useMemo(function(){var xr=_n!==!1&&ei!==!1;return(0,Te.Z)((0,Te.Z)({},lr),{},{flattenOptions:Bo,onActiveValue:Sa,defaultActiveFirstOption:Ua,onSelect:Ws,menuItemSelectedIcon:mr,rawValues:nr,fieldNames:Or,virtual:xr,direction:Jn,listHeight:yi,listItemHeight:Ei,childrenAsData:pr})},[lr,Bo,Sa,Ua,Ws,mr,nr,Or,_n,ei,yi,Ei,pr]);return ge.createElement(xi.Provider,{value:ua},ge.createElement(xt,(0,Le.Z)({},Bn,{id:Br,prefixCls:rn,ref:Et,omitDomProps:Xn,mode:bn,displayValues:Yo,onDisplayValuesChange:Po,direction:Jn,searchValue:Ki,onSearch:Ao,autoClearSearchValue:Nn,onSearchSplit:Eo,dropdownMatchSelectWidth:ei,OptionList:Hr,emptyOptions:!Bo.length,activeValue:ia,activeDescendantId:"".concat(Br,"_list_").concat(Is)})))}),Je=nt;Je.Option=or,Je.OptGroup=Pi;var wt=Je,Nt=wt},9296:function(Cn,Yt,Ee){"use strict";Ee.r(Yt),Ee.d(Yt,{ResizableTextArea:function(){return Qe},default:function(){return St}});var Le=Ee(72308),me=Ee(77321),Ie=Ee(49618),Te=Ee(62853),be=Ee(52487),Pe=Ee(74416),he=Ee(80702),Se=Ee(92310),xe=Ee.n(Se),ge=Ee(93681),ce=Ee(5643),ve=Ee(18929),de=Ee(59301),ue=Ee(29301),z=Ee(34280),ee=Ee(16089),oe=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important;
|
|
|
pointer-events: none !important;
|
|
|
`,ie=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],se={},le;function ye(ut){var Ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ht=ut.getAttribute("id")||ut.getAttribute("data-reactid")||ut.getAttribute("name");if(Ft&&se[ht])return se[ht];var rt=window.getComputedStyle(ut),dt=rt.getPropertyValue("box-sizing")||rt.getPropertyValue("-moz-box-sizing")||rt.getPropertyValue("-webkit-box-sizing"),yt=parseFloat(rt.getPropertyValue("padding-bottom"))+parseFloat(rt.getPropertyValue("padding-top")),_t=parseFloat(rt.getPropertyValue("border-bottom-width"))+parseFloat(rt.getPropertyValue("border-top-width")),vt=ie.map(function(jt){return"".concat(jt,":").concat(rt.getPropertyValue(jt))}).join(";"),Bt={sizingStyle:vt,paddingSize:yt,borderSize:_t,boxSizing:dt};return Ft&&ht&&(se[ht]=Bt),Bt}function we(ut){var Ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ht=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,rt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;le||(le=document.createElement("textarea"),le.setAttribute("tab-index","-1"),le.setAttribute("aria-hidden","true"),document.body.appendChild(le)),ut.getAttribute("wrap")?le.setAttribute("wrap",ut.getAttribute("wrap")):le.removeAttribute("wrap");var dt=ye(ut,Ft),yt=dt.paddingSize,_t=dt.borderSize,vt=dt.boxSizing,Bt=dt.sizingStyle;le.setAttribute("style","".concat(Bt,";").concat(oe)),le.value=ut.value||ut.placeholder||"";var jt=void 0,un=void 0,Kt,xn=le.scrollHeight;if(vt==="border-box"?xn+=_t:vt==="content-box"&&(xn-=yt),ht!==null||rt!==null){le.value=" ";var Ut=le.scrollHeight-yt;ht!==null&&(jt=Ut*ht,vt==="border-box"&&(jt=jt+yt+_t),xn=Math.max(jt,xn)),rt!==null&&(un=Ut*rt,vt==="border-box"&&(un=un+yt+_t),Kt=xn>un?"":"hidden",xn=Math.min(un,xn))}var Wt={height:xn,overflowY:Kt,resize:"none"};return jt&&(Wt.minHeight=jt),un&&(Wt.maxHeight=un),Wt}var Ce=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],ke=0,Ne=1,je=2,Ve=de.forwardRef(function(ut,Ft){var ht=ut,rt=ht.prefixCls,dt=ht.onPressEnter,yt=ht.defaultValue,_t=ht.value,vt=ht.autoSize,Bt=ht.onResize,jt=ht.className,un=ht.style,Kt=ht.disabled,xn=ht.onChange,Ut=ht.onInternalAutoSize,Wt=(0,Pe.Z)(ht,Ce),$t=(0,ve.Z)(yt,{value:_t,postState:function(Pi){return Pi!=null?Pi:""}}),ft=(0,be.Z)($t,2),We=ft[0],Be=ft[1],qe=function(Pi){Be(Pi.target.value),xn==null||xn(Pi)},et=de.useRef();de.useImperativeHandle(Ft,function(){return{textArea:et.current}});var He=de.useMemo(function(){return vt&&(0,Te.Z)(vt)==="object"?[vt.minRows,vt.maxRows]:[]},[vt]),Xe=(0,be.Z)(He,2),Re=Xe[0],Ae=Xe[1],Ue=!!vt,Ke=function(){try{if(document.activeElement===et.current){var Pi=et.current,Xi=Pi.selectionStart,or=Pi.selectionEnd,ar=Pi.scrollTop;et.current.setSelectionRange(Xi,or),et.current.scrollTop=ar}}catch(dr){}},Ze=de.useState(je),lt=(0,be.Z)(Ze,2),xt=lt[0],tn=lt[1],en=de.useState(),Jt=(0,be.Z)(en,2),gn=Jt[0],Mn=Jt[1],yn=function(){tn(ke)};(0,z.Z)(function(){Ue&&yn()},[_t,Re,Ae,Ue]),(0,z.Z)(function(){if(xt===ke)tn(Ne);else if(xt===Ne){var Di=we(et.current,!1,Re,Ae);tn(je),Mn(Di)}else Ke()},[xt]);var kn=de.useRef(),$n=function(){ee.Z.cancel(kn.current)},An=function(Pi){xt===je&&(Bt==null||Bt(Pi),vt&&($n(),kn.current=(0,ee.Z)(function(){yn()})))};de.useEffect(function(){return $n},[]);var oi=Ue?gn:null,ai=(0,me.Z)((0,me.Z)({},un),oi);return(xt===ke||xt===Ne)&&(ai.overflowY="hidden",ai.overflowX="hidden"),de.createElement(ue.Z,{onResize:An,disabled:!(vt||Bt)},de.createElement("textarea",(0,Le.Z)({},Wt,{ref:et,style:ai,className:xe()(rt,jt,(0,Ie.Z)({},"".concat(rt,"-disabled"),Kt)),disabled:Kt,value:We,onChange:qe})))}),Qe=Ve,Ge=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function mt(ut,Ft){return(0,he.Z)(ut||"").slice(0,Ft).join("")}function ct(ut,Ft,ht,rt){var dt=ht;return ut?dt=mt(ht,rt):(0,he.Z)(Ft||"").length<ht.length&&(0,he.Z)(ht||"").length>rt&&(dt=Ft),dt}var Ct=de.forwardRef(function(ut,Ft){var ht,rt=ut.defaultValue,dt=ut.value,yt=ut.onFocus,_t=ut.onBlur,vt=ut.onChange,Bt=ut.allowClear,jt=ut.maxLength,un=ut.onCompositionStart,Kt=ut.onCompositionEnd,xn=ut.suffix,Ut=ut.prefixCls,Wt=Ut===void 0?"rc-textarea":Ut,$t=ut.classes,ft=ut.showCount,We=ut.className,Be=ut.style,qe=ut.disabled,et=ut.hidden,He=ut.classNames,Xe=ut.styles,Re=ut.onResize,Ae=(0,Pe.Z)(ut,Ge),Ue=(0,ve.Z)(rt,{value:dt,defaultValue:rt}),Ke=(0,be.Z)(Ue,2),Ze=Ke[0],lt=Ke[1],xt=(0,de.useRef)(null),tn=de.useState(!1),en=(0,be.Z)(tn,2),Jt=en[0],gn=en[1],Mn=de.useState(!1),yn=(0,be.Z)(Mn,2),kn=yn[0],$n=yn[1],An=de.useRef(),oi=de.useRef(0),ai=de.useState(null),Di=(0,be.Z)(ai,2),Pi=Di[0],Xi=Di[1],or=function(){var $e;($e=xt.current)===null||$e===void 0||$e.textArea.focus()};(0,de.useImperativeHandle)(Ft,function(){return{resizableTextArea:xt.current,focus:or,blur:function(){var $e;($e=xt.current)===null||$e===void 0||$e.textArea.blur()}}}),(0,de.useEffect)(function(){gn(function(Xn){return!qe&&Xn})},[qe]);var ar=Number(jt)>0,dr=function($e){$n(!0),An.current=Ze,oi.current=$e.currentTarget.selectionStart,un==null||un($e)},no=function($e){$n(!1);var nt=$e.currentTarget.value;if(ar){var Je,wt=oi.current>=jt+1||oi.current===((Je=An.current)===null||Je===void 0?void 0:Je.length);nt=ct(wt,An.current,nt,jt)}nt!==Ze&&(lt(nt),(0,ce.rJ)($e.currentTarget,$e,vt,nt)),Kt==null||Kt($e)},Ir=function($e){var nt=$e.target.value;if(!kn&&ar){var Je=$e.target.selectionStart>=jt+1||$e.target.selectionStart===nt.length||!$e.target.selectionStart;nt=ct(Je,Ze,nt,jt)}lt(nt),(0,ce.rJ)($e.currentTarget,$e,vt,nt)},xi=function($e){var nt=Ae.onPressEnter,Je=Ae.onKeyDown;$e.key==="Enter"&&nt&&nt($e),Je==null||Je($e)},wr=function($e){gn(!0),yt==null||yt($e)},Mr=function($e){gn(!1),_t==null||_t($e)},ot=function($e){var nt;lt(""),or(),(0,ce.rJ)((nt=xt.current)===null||nt===void 0?void 0:nt.textArea,$e,vt)},Rr=(0,ce.D7)(Ze);!kn&&ar&&dt==null&&(Rr=mt(Rr,jt));var Nr=xn,Hr;if(ft){var uo=(0,he.Z)(Rr).length;(0,Te.Z)(ft)==="object"?Hr=ft.formatter({value:Rr,count:uo,maxLength:jt}):Hr="".concat(uo).concat(ar?" / ".concat(jt):""),Nr=de.createElement(de.Fragment,null,Nr,de.createElement("span",{className:xe()("".concat(Wt,"-data-count"),He==null?void 0:He.count),style:Xe==null?void 0:Xe.count},Hr))}var po=function($e){var nt;Re==null||Re($e),(nt=xt.current)!==null&&nt!==void 0&&nt.textArea.style.height&&Xi(!0)},io=!Ae.autoSize&&!ft&&!Bt,Do=de.createElement(ge.BaseInput,{value:Rr,allowClear:Bt,handleReset:ot,suffix:Nr,prefixCls:Wt,classes:{affixWrapper:xe()($t==null?void 0:$t.affixWrapper,(ht={},(0,Ie.Z)(ht,"".concat(Wt,"-show-count"),ft),(0,Ie.Z)(ht,"".concat(Wt,"-textarea-allow-clear"),Bt),ht))},disabled:qe,focused:Jt,className:We,style:(0,me.Z)((0,me.Z)({},Be),Pi&&!io?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Hr=="string"?Hr:void 0}},hidden:et,inputElement:de.createElement(Qe,(0,Le.Z)({},Ae,{onKeyDown:xi,onChange:Ir,onFocus:wr,onBlur:Mr,onCompositionStart:dr,onCompositionEnd:no,className:He==null?void 0:He.textarea,style:(0,me.Z)((0,me.Z)({},Xe==null?void 0:Xe.textarea),{},{resize:Be==null?void 0:Be.resize}),disabled:qe,prefixCls:Wt,onResize:po,ref:xt}))});return Do}),it=Ct,St=it},39417:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Ne}});var Le=Ee(72308),me=Ee(49618),Ie=Ee(74416),Te=Ee(77321),be=Ee(96949),Pe=Ee(55090),he=Ee(80237),Se=Ee(77205),xe=Ee(38793),ge=Ee(92310),ce=Ee.n(ge),ve=Ee(26112),de=Ee(59301),ue=Ee(39378),z=function(Ve){for(var Qe=Ve.prefixCls,Ge=Ve.level,mt=Ve.isStart,ct=Ve.isEnd,Ct="".concat(Qe,"-indent-unit"),it=[],St=0;St<Ge;St+=1){var ut;it.push(de.createElement("span",{key:St,className:ce()(Ct,(ut={},(0,me.Z)(ut,"".concat(Ct,"-start"),mt[St]),(0,me.Z)(ut,"".concat(Ct,"-end"),ct[St]),ut))}))}return de.createElement("span",{"aria-hidden":"true",className:"".concat(Qe,"-indent")},it)},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"],le="open",ye="close",we="---",Ce=function(je){(0,Se.Z)(Qe,je);var Ve=(0,xe.Z)(Qe);function Qe(){var Ge;(0,be.Z)(this,Qe);for(var mt=arguments.length,ct=new Array(mt),Ct=0;Ct<mt;Ct++)ct[Ct]=arguments[Ct];return Ge=Ve.call.apply(Ve,[this].concat(ct)),Ge.state={dragNodeHighlight:!1},Ge.selectHandle=void 0,Ge.cacheIndent=void 0,Ge.onSelectorClick=function(it){var St=Ge.props.context.onNodeClick;St(it,(0,ie.F)(Ge.props)),Ge.isSelectable()?Ge.onSelect(it):Ge.onCheck(it)},Ge.onSelectorDoubleClick=function(it){var St=Ge.props.context.onNodeDoubleClick;St(it,(0,ie.F)(Ge.props))},Ge.onSelect=function(it){if(!Ge.isDisabled()){var St=Ge.props.context.onNodeSelect;St(it,(0,ie.F)(Ge.props))}},Ge.onCheck=function(it){if(!Ge.isDisabled()){var St=Ge.props,ut=St.disableCheckbox,Ft=St.checked,ht=Ge.props.context.onNodeCheck;if(!(!Ge.isCheckable()||ut)){var rt=!Ft;ht(it,(0,ie.F)(Ge.props),rt)}}},Ge.onMouseEnter=function(it){var St=Ge.props.context.onNodeMouseEnter;St(it,(0,ie.F)(Ge.props))},Ge.onMouseLeave=function(it){var St=Ge.props.context.onNodeMouseLeave;St(it,(0,ie.F)(Ge.props))},Ge.onContextMenu=function(it){var St=Ge.props.context.onNodeContextMenu;St(it,(0,ie.F)(Ge.props))},Ge.onDragStart=function(it){var St=Ge.props.context.onNodeDragStart;it.stopPropagation(),Ge.setState({dragNodeHighlight:!0}),St(it,(0,he.Z)(Ge));try{it.dataTransfer.setData("text/plain","")}catch(ut){}},Ge.onDragEnter=function(it){var St=Ge.props.context.onNodeDragEnter;it.preventDefault(),it.stopPropagation(),St(it,(0,he.Z)(Ge))},Ge.onDragOver=function(it){var St=Ge.props.context.onNodeDragOver;it.preventDefault(),it.stopPropagation(),St(it,(0,he.Z)(Ge))},Ge.onDragLeave=function(it){var St=Ge.props.context.onNodeDragLeave;it.stopPropagation(),St(it,(0,he.Z)(Ge))},Ge.onDragEnd=function(it){var St=Ge.props.context.onNodeDragEnd;it.stopPropagation(),Ge.setState({dragNodeHighlight:!1}),St(it,(0,he.Z)(Ge))},Ge.onDrop=function(it){var St=Ge.props.context.onNodeDrop;it.preventDefault(),it.stopPropagation(),Ge.setState({dragNodeHighlight:!1}),St(it,(0,he.Z)(Ge))},Ge.onExpand=function(it){var St=Ge.props,ut=St.loading,Ft=St.context.onNodeExpand;ut||Ft(it,(0,ie.F)(Ge.props))},Ge.setSelectHandle=function(it){Ge.selectHandle=it},Ge.getNodeState=function(){var it=Ge.props.expanded;return Ge.isLeaf()?null:it?le:ye},Ge.hasChildren=function(){var it=Ge.props.eventKey,St=Ge.props.context.keyEntities,ut=(0,oe.Z)(St,it)||{},Ft=ut.children;return!!(Ft||[]).length},Ge.isLeaf=function(){var it=Ge.props,St=it.isLeaf,ut=it.loaded,Ft=Ge.props.context.loadData,ht=Ge.hasChildren();return St===!1?!1:St||!Ft&&!ht||Ft&&ut&&!ht},Ge.isDisabled=function(){var it=Ge.props.disabled,St=Ge.props.context.disabled;return!!(St||it)},Ge.isCheckable=function(){var it=Ge.props.checkable,St=Ge.props.context.checkable;return!St||it===!1?!1:St},Ge.syncLoadData=function(it){var St=it.expanded,ut=it.loading,Ft=it.loaded,ht=Ge.props.context,rt=ht.loadData,dt=ht.onNodeLoad;ut||rt&&St&&!Ge.isLeaf()&&!Ge.hasChildren()&&!Ft&&dt((0,ie.F)(Ge.props))},Ge.isDraggable=function(){var it=Ge.props,St=it.data,ut=it.context.draggable;return!!(ut&&(!ut.nodeDraggable||ut.nodeDraggable(St)))},Ge.renderDragHandler=function(){var it=Ge.props.context,St=it.draggable,ut=it.prefixCls;return St!=null&&St.icon?de.createElement("span",{className:"".concat(ut,"-draggable-icon")},St.icon):null},Ge.renderSwitcherIconDom=function(it){var St=Ge.props.switcherIcon,ut=Ge.props.context.switcherIcon,Ft=St||ut;return typeof Ft=="function"?Ft((0,Te.Z)((0,Te.Z)({},Ge.props),{},{isLeaf:it})):Ft},Ge.renderSwitcher=function(){var it=Ge.props.expanded,St=Ge.props.context.prefixCls;if(Ge.isLeaf()){var ut=Ge.renderSwitcherIconDom(!0);return ut!==!1?de.createElement("span",{className:ce()("".concat(St,"-switcher"),"".concat(St,"-switcher-noop"))},ut):null}var Ft=ce()("".concat(St,"-switcher"),"".concat(St,"-switcher_").concat(it?le:ye)),ht=Ge.renderSwitcherIconDom(!1);return ht!==!1?de.createElement("span",{onClick:Ge.onExpand,className:Ft},ht):null},Ge.renderCheckbox=function(){var it=Ge.props,St=it.checked,ut=it.halfChecked,Ft=it.disableCheckbox,ht=Ge.props.context.prefixCls,rt=Ge.isDisabled(),dt=Ge.isCheckable();if(!dt)return null;var yt=typeof dt!="boolean"?dt:null;return de.createElement("span",{className:ce()("".concat(ht,"-checkbox"),St&&"".concat(ht,"-checkbox-checked"),!St&&ut&&"".concat(ht,"-checkbox-indeterminate"),(rt||Ft)&&"".concat(ht,"-checkbox-disabled")),onClick:Ge.onCheck},yt)},Ge.renderIcon=function(){var it=Ge.props.loading,St=Ge.props.context.prefixCls;return de.createElement("span",{className:ce()("".concat(St,"-iconEle"),"".concat(St,"-icon__").concat(Ge.getNodeState()||"docu"),it&&"".concat(St,"-icon_loading"))})},Ge.renderSelector=function(){var it=Ge.state.dragNodeHighlight,St=Ge.props,ut=St.title,Ft=ut===void 0?we:ut,ht=St.selected,rt=St.icon,dt=St.loading,yt=St.data,_t=Ge.props.context,vt=_t.prefixCls,Bt=_t.showIcon,jt=_t.icon,un=_t.loadData,Kt=_t.titleRender,xn=Ge.isDisabled(),Ut="".concat(vt,"-node-content-wrapper"),Wt;if(Bt){var $t=rt||jt;Wt=$t?de.createElement("span",{className:ce()("".concat(vt,"-iconEle"),"".concat(vt,"-icon__customize"))},typeof $t=="function"?$t(Ge.props):$t):Ge.renderIcon()}else un&&dt&&(Wt=Ge.renderIcon());var ft;typeof Ft=="function"?ft=Ft(yt):Kt?ft=Kt(yt):ft=Ft;var We=de.createElement("span",{className:"".concat(vt,"-title")},ft);return de.createElement("span",{ref:Ge.setSelectHandle,title:typeof Ft=="string"?Ft:"",className:ce()("".concat(Ut),"".concat(Ut,"-").concat(Ge.getNodeState()||"normal"),!xn&&(ht||it)&&"".concat(vt,"-node-selected")),onMouseEnter:Ge.onMouseEnter,onMouseLeave:Ge.onMouseLeave,onContextMenu:Ge.onContextMenu,onClick:Ge.onSelectorClick,onDoubleClick:Ge.onSelectorDoubleClick},Wt,We,Ge.renderDropIndicator())},Ge.renderDropIndicator=function(){var it=Ge.props,St=it.disabled,ut=it.eventKey,Ft=Ge.props.context,ht=Ft.draggable,rt=Ft.dropLevelOffset,dt=Ft.dropPosition,yt=Ft.prefixCls,_t=Ft.indent,vt=Ft.dropIndicatorRender,Bt=Ft.dragOverNodeKey,jt=Ft.direction,un=!!ht,Kt=!St&&un&&Bt===ut,xn=_t!=null?_t:Ge.cacheIndent;return Ge.cacheIndent=_t,Kt?vt({dropPosition:dt,dropLevelOffset:rt,indent:xn,prefixCls:yt,direction:jt}):null},Ge}return(0,Pe.Z)(Qe,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var mt=this.props.selectable,ct=this.props.context.selectable;return typeof mt=="boolean"?mt:ct}},{key:"render",value:function(){var mt,ct=this.props,Ct=ct.eventKey,it=ct.className,St=ct.style,ut=ct.dragOver,Ft=ct.dragOverGapTop,ht=ct.dragOverGapBottom,rt=ct.isLeaf,dt=ct.isStart,yt=ct.isEnd,_t=ct.expanded,vt=ct.selected,Bt=ct.checked,jt=ct.halfChecked,un=ct.loading,Kt=ct.domRef,xn=ct.active,Ut=ct.data,Wt=ct.onMouseMove,$t=ct.selectable,ft=(0,Ie.Z)(ct,se),We=this.props.context,Be=We.prefixCls,qe=We.filterTreeNode,et=We.keyEntities,He=We.dropContainerKey,Xe=We.dropTargetKey,Re=We.draggingNodeKey,Ae=this.isDisabled(),Ue=(0,ve.Z)(ft,{aria:!0,data:!0}),Ke=(0,oe.Z)(et,Ct)||{},Ze=Ke.level,lt=yt[yt.length-1],xt=this.isDraggable(),tn=!Ae&&xt,en=Re===Ct,Jt=$t!==void 0?{"aria-selected":!!$t}:void 0;return de.createElement("div",(0,Le.Z)({ref:Kt,className:ce()(it,"".concat(Be,"-treenode"),(mt={},(0,me.Z)(mt,"".concat(Be,"-treenode-disabled"),Ae),(0,me.Z)(mt,"".concat(Be,"-treenode-switcher-").concat(_t?"open":"close"),!rt),(0,me.Z)(mt,"".concat(Be,"-treenode-checkbox-checked"),Bt),(0,me.Z)(mt,"".concat(Be,"-treenode-checkbox-indeterminate"),jt),(0,me.Z)(mt,"".concat(Be,"-treenode-selected"),vt),(0,me.Z)(mt,"".concat(Be,"-treenode-loading"),un),(0,me.Z)(mt,"".concat(Be,"-treenode-active"),xn),(0,me.Z)(mt,"".concat(Be,"-treenode-leaf-last"),lt),(0,me.Z)(mt,"".concat(Be,"-treenode-draggable"),xt),(0,me.Z)(mt,"dragging",en),(0,me.Z)(mt,"drop-target",Xe===Ct),(0,me.Z)(mt,"drop-container",He===Ct),(0,me.Z)(mt,"drag-over",!Ae&&ut),(0,me.Z)(mt,"drag-over-gap-top",!Ae&&Ft),(0,me.Z)(mt,"drag-over-gap-bottom",!Ae&&ht),(0,me.Z)(mt,"filter-node",qe&&qe((0,ie.F)(this.props))),mt)),style:St,draggable:tn,"aria-grabbed":en,onDragStart:tn?this.onDragStart:void 0,onDragEnter:xt?this.onDragEnter:void 0,onDragOver:xt?this.onDragOver:void 0,onDragLeave:xt?this.onDragLeave:void 0,onDrop:xt?this.onDrop:void 0,onDragEnd:xt?this.onDragEnd:void 0,onMouseMove:Wt},Jt,Ue),de.createElement(ee,{prefixCls:Be,level:Ze,isStart:dt,isEnd:yt}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),Qe}(de.Component),ke=function(Ve){return de.createElement(ue.k.Consumer,null,function(Qe){return de.createElement(Ce,(0,Le.Z)({},Ve,{context:Qe}))})};ke.displayName="TreeNode",ke.isTreeNode=1;var Ne=ke},39378:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{k:function(){return me}});var Le=Ee(59301),me=Le.createContext(null)},54844:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{O:function(){return Ne.Z},Z:function(){return We}});var Le=Ee(72308),me=Ee(49618),Ie=Ee(62853),Te=Ee(77321),be=Ee(80702),Pe=Ee(96949),he=Ee(55090),Se=Ee(80237),xe=Ee(77205),ge=Ee(38793),ce=Ee(92310),ve=Ee.n(ce),de=Ee(10228),ue=Ee(26112),z=Ee(48736),ee=Ee(59301),oe=Ee(39378);function ie(Be){var qe=Be.dropPosition,et=Be.dropLevelOffset,He=Be.indent,Xe={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(qe){case-1:Xe.top=0,Xe.left=-et*He;break;case 1:Xe.bottom=0,Xe.left=-et*He;break;case 0:Xe.bottom=0,Xe.left=He;break}return ee.createElement("div",{style:Xe})}function se(Be){if(Be==null)throw new TypeError("Cannot destructure "+Be)}var le=Ee(52487),ye=Ee(74416),we=Ee(34280),Ce=Ee(45680),ke=Ee(77900),Ne=Ee(39417);function je(Be,qe){var et=ee.useState(!1),He=(0,le.Z)(et,2),Xe=He[0],Re=He[1];ee.useLayoutEffect(function(){if(Xe)return Be(),function(){qe()}},[Xe]),ee.useLayoutEffect(function(){return Re(!0),function(){Re(!1)}},[])}var Ve=Ee(71430),Qe=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ge=function(qe,et){var He=qe.className,Xe=qe.style,Re=qe.motion,Ae=qe.motionNodes,Ue=qe.motionType,Ke=qe.onMotionStart,Ze=qe.onMotionEnd,lt=qe.active,xt=qe.treeNodeRequiredProps,tn=(0,ye.Z)(qe,Qe),en=ee.useState(!0),Jt=(0,le.Z)(en,2),gn=Jt[0],Mn=Jt[1],yn=ee.useContext(oe.k),kn=yn.prefixCls,$n=Ae&&Ue!=="hide";(0,we.Z)(function(){Ae&&$n!==gn&&Mn($n)},[Ae]);var An=function(){Ae&&Ke()},oi=ee.useRef(!1),ai=function(){Ae&&!oi.current&&(oi.current=!0,Ze())};je(An,ai);var Di=function(Xi){$n===Xi&&ai()};return Ae?ee.createElement(ke.default,(0,Le.Z)({ref:et,visible:gn},Re,{motionAppear:Ue==="show",onVisibleChanged:Di}),function(Pi,Xi){var or=Pi.className,ar=Pi.style;return ee.createElement("div",{ref:Xi,className:ve()("".concat(kn,"-treenode-motion"),or),style:ar},Ae.map(function(dr){var no=(0,Le.Z)({},(se(dr.data),dr.data)),Ir=dr.title,xi=dr.key,wr=dr.isStart,Mr=dr.isEnd;delete no.children;var ot=(0,Ve.H8)(xi,xt);return ee.createElement(Ne.Z,(0,Le.Z)({},no,ot,{title:Ir,active:lt,data:dr.data,key:xi,isStart:wr,isEnd:Mr}))}))}):ee.createElement(Ne.Z,(0,Le.Z)({domRef:et,className:He,style:Xe},tn,{active:lt}))};Ge.displayName="MotionTreeNode";var mt=ee.forwardRef(Ge),ct=mt;function Ct(){var Be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],et=Be.length,He=qe.length;if(Math.abs(et-He)!==1)return{add:!1,key:null};function Xe(Re,Ae){var Ue=new Map;Re.forEach(function(Ze){Ue.set(Ze,!0)});var Ke=Ae.filter(function(Ze){return!Ue.has(Ze)});return Ke.length===1?Ke[0]:null}return et<He?{add:!0,key:Xe(Be,qe)}:{add:!1,key:Xe(qe,Be)}}function it(Be,qe,et){var He=Be.findIndex(function(Ue){return Ue.key===et}),Xe=Be[He+1],Re=qe.findIndex(function(Ue){return Ue.key===et});if(Xe){var Ae=qe.findIndex(function(Ue){return Ue.key===Xe.key});return qe.slice(Re+1,Ae)}return qe.slice(Re+1)}var St=["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"],ut={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Ft=function(){},ht="RC_TREE_MOTION_".concat(Math.random()),rt={key:ht},dt={key:ht,level:0,index:0,pos:"0",node:rt,nodes:[rt]},yt={parent:null,children:[],pos:dt.pos,data:rt,title:null,key:ht,isStart:[],isEnd:[]};function _t(Be,qe,et,He){return qe===!1||!et?Be:Be.slice(0,Math.ceil(et/He)+1)}function vt(Be){var qe=Be.key,et=Be.pos;return(0,Ve.km)(qe,et)}function Bt(Be){for(var qe=String(Be.data.key),et=Be;et.parent;)et=et.parent,qe="".concat(et.data.key," > ").concat(qe);return qe}var jt=ee.forwardRef(function(Be,qe){var et=Be.prefixCls,He=Be.data,Xe=Be.selectable,Re=Be.checkable,Ae=Be.expandedKeys,Ue=Be.selectedKeys,Ke=Be.checkedKeys,Ze=Be.loadedKeys,lt=Be.loadingKeys,xt=Be.halfCheckedKeys,tn=Be.keyEntities,en=Be.disabled,Jt=Be.dragging,gn=Be.dragOverNodeKey,Mn=Be.dropPosition,yn=Be.motion,kn=Be.height,$n=Be.itemHeight,An=Be.virtual,oi=Be.focusable,ai=Be.activeItem,Di=Be.focused,Pi=Be.tabIndex,Xi=Be.onKeyDown,or=Be.onFocus,ar=Be.onBlur,dr=Be.onActiveChange,no=Be.onListChangeStart,Ir=Be.onListChangeEnd,xi=(0,ye.Z)(Be,St),wr=ee.useRef(null),Mr=ee.useRef(null);ee.useImperativeHandle(qe,function(){return{scrollTo:function(on){wr.current.scrollTo(on)},getIndentWidth:function(){return Mr.current.offsetWidth}}});var ot=ee.useState(Ae),Rr=(0,le.Z)(ot,2),Nr=Rr[0],Hr=Rr[1],uo=ee.useState(He),po=(0,le.Z)(uo,2),io=po[0],Do=po[1],Xn=ee.useState(He),$e=(0,le.Z)(Xn,2),nt=$e[0],Je=$e[1],wt=ee.useState([]),Nt=(0,le.Z)(wt,2),kt=Nt[0],Et=Nt[1],cn=ee.useState(null),bn=(0,le.Z)(cn,2),dn=bn[0],rn=bn[1],At=ee.useRef(He);At.current=He;function an(){var qt=At.current;Do(qt),Je(qt),Et([]),rn(null),Ir()}(0,we.Z)(function(){Hr(Ae);var qt=Ct(Nr,Ae);if(qt.key!==null)if(qt.add){var on=io.findIndex(function(Fn){var hi=Fn.key;return hi===qt.key}),Nn=_t(it(io,He,qt.key),An,kn,$n),On=io.slice();On.splice(on+1,0,yt),Je(On),Et(Nn),rn("show")}else{var qn=He.findIndex(function(Fn){var hi=Fn.key;return hi===qt.key}),Hn=_t(it(He,io,qt.key),An,kn,$n),ei=He.slice();ei.splice(qn+1,0,yt),Je(ei),Et(Hn),rn("hide")}else io!==He&&(Do(He),Je(He))},[Ae,He]),ee.useEffect(function(){Jt||an()},[Jt]);var En=yn?nt:He,Dn={expandedKeys:Ae,selectedKeys:Ue,loadedKeys:Ze,loadingKeys:lt,checkedKeys:Ke,halfCheckedKeys:xt,dragOverNodeKey:gn,dropPosition:Mn,keyEntities:tn};return ee.createElement(ee.Fragment,null,Di&&ai&&ee.createElement("span",{style:ut,"aria-live":"assertive"},Bt(ai)),ee.createElement("div",null,ee.createElement("input",{style:ut,disabled:oi===!1||en,tabIndex:oi!==!1?Pi:null,onKeyDown:Xi,onFocus:or,onBlur:ar,value:"",onChange:Ft,"aria-label":"for screen reader"})),ee.createElement("div",{className:"".concat(et,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},ee.createElement("div",{className:"".concat(et,"-indent")},ee.createElement("div",{ref:Mr,className:"".concat(et,"-indent-unit")}))),ee.createElement(Ce.Z,(0,Le.Z)({},xi,{data:En,itemKey:vt,height:kn,fullHeight:!1,virtual:An,itemHeight:$n,prefixCls:"".concat(et,"-list"),ref:wr,onVisibleChange:function(on,Nn){var On=new Set(on),qn=Nn.filter(function(Hn){return!On.has(Hn)});qn.some(function(Hn){return vt(Hn)===ht})&&an()}}),function(qt){var on=qt.pos,Nn=(0,Le.Z)({},(se(qt.data),qt.data)),On=qt.title,qn=qt.key,Hn=qt.isStart,ei=qt.isEnd,Fn=(0,Ve.km)(qn,on);delete Nn.key,delete Nn.children;var hi=(0,Ve.H8)(Fn,Dn);return ee.createElement(ct,(0,Le.Z)({},Nn,hi,{title:On,active:!!ai&&qn===ai.key,pos:on,data:qt.data,isStart:Hn,isEnd:ei,motion:yn,motionNodes:qn===ht?kt:null,motionType:dn,onMotionStart:no,onMotionEnd:an,treeNodeRequiredProps:Dn,onMouseMove:function(){dr(null)}}))}))});jt.displayName="NodeList";var un=jt,Kt=Ee(35654),xn=Ee(90782),Ut=Ee(67841),Wt=10,$t=function(Be){(0,xe.Z)(et,Be);var qe=(0,ge.Z)(et);function et(){var He;(0,Pe.Z)(this,et);for(var Xe=arguments.length,Re=new Array(Xe),Ae=0;Ae<Xe;Ae++)Re[Ae]=arguments[Ae];return He=qe.call.apply(qe,[this].concat(Re)),He.destroyed=!1,He.delayedDragEnterLogic=void 0,He.loadingRetryTimes={},He.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,Ve.w$)()},He.dragStartMousePosition=null,He.dragNode=void 0,He.currentMouseOverDroppableNodeKey=null,He.listRef=ee.createRef(),He.onNodeDragStart=function(Ue,Ke){var Ze=He.state,lt=Ze.expandedKeys,xt=Ze.keyEntities,tn=He.props.onDragStart,en=Ke.props.eventKey;He.dragNode=Ke,He.dragStartMousePosition={x:Ue.clientX,y:Ue.clientY};var Jt=(0,Kt._5)(lt,en);He.setState({draggingNodeKey:en,dragChildrenKeys:(0,Kt.wA)(en,xt),indent:He.listRef.current.getIndentWidth()}),He.setExpandedKeys(Jt),window.addEventListener("dragend",He.onWindowDragEnd),tn==null||tn({event:Ue,node:(0,Ve.F)(Ke.props)})},He.onNodeDragEnter=function(Ue,Ke){var Ze=He.state,lt=Ze.expandedKeys,xt=Ze.keyEntities,tn=Ze.dragChildrenKeys,en=Ze.flattenNodes,Jt=Ze.indent,gn=He.props,Mn=gn.onDragEnter,yn=gn.onExpand,kn=gn.allowDrop,$n=gn.direction,An=Ke.props,oi=An.pos,ai=An.eventKey,Di=(0,Se.Z)(He),Pi=Di.dragNode;if(He.currentMouseOverDroppableNodeKey!==ai&&(He.currentMouseOverDroppableNodeKey=ai),!Pi){He.resetDragState();return}var Xi=(0,Kt.OM)(Ue,Pi,Ke,Jt,He.dragStartMousePosition,kn,en,xt,lt,$n),or=Xi.dropPosition,ar=Xi.dropLevelOffset,dr=Xi.dropTargetKey,no=Xi.dropContainerKey,Ir=Xi.dropTargetPos,xi=Xi.dropAllowed,wr=Xi.dragOverNodeKey;if(tn.indexOf(dr)!==-1||!xi){He.resetDragState();return}if(He.delayedDragEnterLogic||(He.delayedDragEnterLogic={}),Object.keys(He.delayedDragEnterLogic).forEach(function(Mr){clearTimeout(He.delayedDragEnterLogic[Mr])}),Pi.props.eventKey!==Ke.props.eventKey&&(Ue.persist(),He.delayedDragEnterLogic[oi]=window.setTimeout(function(){if(He.state.draggingNodeKey!==null){var Mr=(0,be.Z)(lt),ot=(0,Ut.Z)(xt,Ke.props.eventKey);ot&&(ot.children||[]).length&&(Mr=(0,Kt.L0)(lt,Ke.props.eventKey)),"expandedKeys"in He.props||He.setExpandedKeys(Mr),yn==null||yn(Mr,{node:(0,Ve.F)(Ke.props),expanded:!0,nativeEvent:Ue.nativeEvent})}},800)),Pi.props.eventKey===dr&&ar===0){He.resetDragState();return}He.setState({dragOverNodeKey:wr,dropPosition:or,dropLevelOffset:ar,dropTargetKey:dr,dropContainerKey:no,dropTargetPos:Ir,dropAllowed:xi}),Mn==null||Mn({event:Ue,node:(0,Ve.F)(Ke.props),expandedKeys:lt})},He.onNodeDragOver=function(Ue,Ke){var Ze=He.state,lt=Ze.dragChildrenKeys,xt=Ze.flattenNodes,tn=Ze.keyEntities,en=Ze.expandedKeys,Jt=Ze.indent,gn=He.props,Mn=gn.onDragOver,yn=gn.allowDrop,kn=gn.direction,$n=(0,Se.Z)(He),An=$n.dragNode;if(An){var oi=(0,Kt.OM)(Ue,An,Ke,Jt,He.dragStartMousePosition,yn,xt,tn,en,kn),ai=oi.dropPosition,Di=oi.dropLevelOffset,Pi=oi.dropTargetKey,Xi=oi.dropContainerKey,or=oi.dropAllowed,ar=oi.dropTargetPos,dr=oi.dragOverNodeKey;lt.indexOf(Pi)!==-1||!or||(An.props.eventKey===Pi&&Di===0?He.state.dropPosition===null&&He.state.dropLevelOffset===null&&He.state.dropTargetKey===null&&He.state.dropContainerKey===null&&He.state.dropTargetPos===null&&He.state.dropAllowed===!1&&He.state.dragOverNodeKey===null||He.resetDragState():ai===He.state.dropPosition&&Di===He.state.dropLevelOffset&&Pi===He.state.dropTargetKey&&Xi===He.state.dropContainerKey&&ar===He.state.dropTargetPos&&or===He.state.dropAllowed&&dr===He.state.dragOverNodeKey||He.setState({dropPosition:ai,dropLevelOffset:Di,dropTargetKey:Pi,dropContainerKey:Xi,dropTargetPos:ar,dropAllowed:or,dragOverNodeKey:dr}),Mn==null||Mn({event:Ue,node:(0,Ve.F)(Ke.props)}))}},He.onNodeDragLeave=function(Ue,Ke){He.currentMouseOverDroppableNodeKey===Ke.props.eventKey&&!Ue.currentTarget.contains(Ue.relatedTarget)&&(He.resetDragState(),He.currentMouseOverDroppableNodeKey=null);var Ze=He.props.onDragLeave;Ze==null||Ze({event:Ue,node:(0,Ve.F)(Ke.props)})},He.onWindowDragEnd=function(Ue){He.onNodeDragEnd(Ue,null,!0),window.removeEventListener("dragend",He.onWindowDragEnd)},He.onNodeDragEnd=function(Ue,Ke){var Ze=He.props.onDragEnd;He.setState({dragOverNodeKey:null}),He.cleanDragState(),Ze==null||Ze({event:Ue,node:(0,Ve.F)(Ke.props)}),He.dragNode=null,window.removeEventListener("dragend",He.onWindowDragEnd)},He.onNodeDrop=function(Ue,Ke){var Ze,lt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,xt=He.state,tn=xt.dragChildrenKeys,en=xt.dropPosition,Jt=xt.dropTargetKey,gn=xt.dropTargetPos,Mn=xt.dropAllowed;if(Mn){var yn=He.props.onDrop;if(He.setState({dragOverNodeKey:null}),He.cleanDragState(),Jt!==null){var kn=(0,Te.Z)((0,Te.Z)({},(0,Ve.H8)(Jt,He.getTreeNodeRequiredProps())),{},{active:((Ze=He.getActiveItem())===null||Ze===void 0?void 0:Ze.key)===Jt,data:(0,Ut.Z)(He.state.keyEntities,Jt).node}),$n=tn.indexOf(Jt)!==-1;(0,z.ZP)(!$n,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var An=(0,Kt.yx)(gn),oi={event:Ue,node:(0,Ve.F)(kn),dragNode:He.dragNode?(0,Ve.F)(He.dragNode.props):null,dragNodesKeys:[He.dragNode.props.eventKey].concat(tn),dropToGap:en!==0,dropPosition:en+Number(An[An.length-1])};lt||yn==null||yn(oi),He.dragNode=null}}},He.cleanDragState=function(){var Ue=He.state.draggingNodeKey;Ue!==null&&He.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),He.dragStartMousePosition=null,He.currentMouseOverDroppableNodeKey=null},He.triggerExpandActionExpand=function(Ue,Ke){var Ze=He.state,lt=Ze.expandedKeys,xt=Ze.flattenNodes,tn=Ke.expanded,en=Ke.key,Jt=Ke.isLeaf;if(!(Jt||Ue.shiftKey||Ue.metaKey||Ue.ctrlKey)){var gn=xt.filter(function(yn){return yn.key===en})[0],Mn=(0,Ve.F)((0,Te.Z)((0,Te.Z)({},(0,Ve.H8)(en,He.getTreeNodeRequiredProps())),{},{data:gn.data}));He.setExpandedKeys(tn?(0,Kt._5)(lt,en):(0,Kt.L0)(lt,en)),He.onNodeExpand(Ue,Mn)}},He.onNodeClick=function(Ue,Ke){var Ze=He.props,lt=Ze.onClick,xt=Ze.expandAction;xt==="click"&&He.triggerExpandActionExpand(Ue,Ke),lt==null||lt(Ue,Ke)},He.onNodeDoubleClick=function(Ue,Ke){var Ze=He.props,lt=Ze.onDoubleClick,xt=Ze.expandAction;xt==="doubleClick"&&He.triggerExpandActionExpand(Ue,Ke),lt==null||lt(Ue,Ke)},He.onNodeSelect=function(Ue,Ke){var Ze=He.state.selectedKeys,lt=He.state,xt=lt.keyEntities,tn=lt.fieldNames,en=He.props,Jt=en.onSelect,gn=en.multiple,Mn=Ke.selected,yn=Ke[tn.key],kn=!Mn;kn?gn?Ze=(0,Kt.L0)(Ze,yn):Ze=[yn]:Ze=(0,Kt._5)(Ze,yn);var $n=Ze.map(function(An){var oi=(0,Ut.Z)(xt,An);return oi?oi.node:null}).filter(function(An){return An});He.setUncontrolledState({selectedKeys:Ze}),Jt==null||Jt(Ze,{event:"select",selected:kn,node:Ke,selectedNodes:$n,nativeEvent:Ue.nativeEvent})},He.onNodeCheck=function(Ue,Ke,Ze){var lt=He.state,xt=lt.keyEntities,tn=lt.checkedKeys,en=lt.halfCheckedKeys,Jt=He.props,gn=Jt.checkStrictly,Mn=Jt.onCheck,yn=Ke.key,kn,$n={event:"check",node:Ke,checked:Ze,nativeEvent:Ue.nativeEvent};if(gn){var An=Ze?(0,Kt.L0)(tn,yn):(0,Kt._5)(tn,yn),oi=(0,Kt._5)(en,yn);kn={checked:An,halfChecked:oi},$n.checkedNodes=An.map(function(ar){return(0,Ut.Z)(xt,ar)}).filter(function(ar){return ar}).map(function(ar){return ar.node}),He.setUncontrolledState({checkedKeys:An})}else{var ai=(0,xn.S)([].concat((0,be.Z)(tn),[yn]),!0,xt),Di=ai.checkedKeys,Pi=ai.halfCheckedKeys;if(!Ze){var Xi=new Set(Di);Xi.delete(yn);var or=(0,xn.S)(Array.from(Xi),{checked:!1,halfCheckedKeys:Pi},xt);Di=or.checkedKeys,Pi=or.halfCheckedKeys}kn=Di,$n.checkedNodes=[],$n.checkedNodesPositions=[],$n.halfCheckedKeys=Pi,Di.forEach(function(ar){var dr=(0,Ut.Z)(xt,ar);if(dr){var no=dr.node,Ir=dr.pos;$n.checkedNodes.push(no),$n.checkedNodesPositions.push({node:no,pos:Ir})}}),He.setUncontrolledState({checkedKeys:Di},!1,{halfCheckedKeys:Pi})}Mn==null||Mn(kn,$n)},He.onNodeLoad=function(Ue){var Ke=Ue.key,Ze=new Promise(function(lt,xt){He.setState(function(tn){var en=tn.loadedKeys,Jt=en===void 0?[]:en,gn=tn.loadingKeys,Mn=gn===void 0?[]:gn,yn=He.props,kn=yn.loadData,$n=yn.onLoad;if(!kn||Jt.indexOf(Ke)!==-1||Mn.indexOf(Ke)!==-1)return null;var An=kn(Ue);return An.then(function(){var oi=He.state.loadedKeys,ai=(0,Kt.L0)(oi,Ke);$n==null||$n(ai,{event:"load",node:Ue}),He.setUncontrolledState({loadedKeys:ai}),He.setState(function(Di){return{loadingKeys:(0,Kt._5)(Di.loadingKeys,Ke)}}),lt()}).catch(function(oi){if(He.setState(function(Di){return{loadingKeys:(0,Kt._5)(Di.loadingKeys,Ke)}}),He.loadingRetryTimes[Ke]=(He.loadingRetryTimes[Ke]||0)+1,He.loadingRetryTimes[Ke]>=Wt){var ai=He.state.loadedKeys;(0,z.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),He.setUncontrolledState({loadedKeys:(0,Kt.L0)(ai,Ke)}),lt()}xt(oi)}),{loadingKeys:(0,Kt.L0)(Mn,Ke)}})});return Ze.catch(function(){}),Ze},He.onNodeMouseEnter=function(Ue,Ke){var Ze=He.props.onMouseEnter;Ze==null||Ze({event:Ue,node:Ke})},He.onNodeMouseLeave=function(Ue,Ke){var Ze=He.props.onMouseLeave;Ze==null||Ze({event:Ue,node:Ke})},He.onNodeContextMenu=function(Ue,Ke){var Ze=He.props.onRightClick;Ze&&(Ue.preventDefault(),Ze({event:Ue,node:Ke}))},He.onFocus=function(){var Ue=He.props.onFocus;He.setState({focused:!0});for(var Ke=arguments.length,Ze=new Array(Ke),lt=0;lt<Ke;lt++)Ze[lt]=arguments[lt];Ue==null||Ue.apply(void 0,Ze)},He.onBlur=function(){var Ue=He.props.onBlur;He.setState({focused:!1}),He.onActiveChange(null);for(var Ke=arguments.length,Ze=new Array(Ke),lt=0;lt<Ke;lt++)Ze[lt]=arguments[lt];Ue==null||Ue.apply(void 0,Ze)},He.getTreeNodeRequiredProps=function(){var Ue=He.state,Ke=Ue.expandedKeys,Ze=Ue.selectedKeys,lt=Ue.loadedKeys,xt=Ue.loadingKeys,tn=Ue.checkedKeys,en=Ue.halfCheckedKeys,Jt=Ue.dragOverNodeKey,gn=Ue.dropPosition,Mn=Ue.keyEntities;return{expandedKeys:Ke||[],selectedKeys:Ze||[],loadedKeys:lt||[],loadingKeys:xt||[],checkedKeys:tn||[],halfCheckedKeys:en||[],dragOverNodeKey:Jt,dropPosition:gn,keyEntities:Mn}},He.setExpandedKeys=function(Ue){var Ke=He.state,Ze=Ke.treeData,lt=Ke.fieldNames,xt=(0,Ve.oH)(Ze,Ue,lt);He.setUncontrolledState({expandedKeys:Ue,flattenNodes:xt},!0)},He.onNodeExpand=function(Ue,Ke){var Ze=He.state.expandedKeys,lt=He.state,xt=lt.listChanging,tn=lt.fieldNames,en=He.props,Jt=en.onExpand,gn=en.loadData,Mn=Ke.expanded,yn=Ke[tn.key];if(!xt){var kn=Ze.indexOf(yn),$n=!Mn;if((0,z.ZP)(Mn&&kn!==-1||!Mn&&kn===-1,"Expand state not sync with index check"),$n?Ze=(0,Kt.L0)(Ze,yn):Ze=(0,Kt._5)(Ze,yn),He.setExpandedKeys(Ze),Jt==null||Jt(Ze,{node:Ke,expanded:$n,nativeEvent:Ue.nativeEvent}),$n&&gn){var An=He.onNodeLoad(Ke);An&&An.then(function(){var oi=(0,Ve.oH)(He.state.treeData,Ze,tn);He.setUncontrolledState({flattenNodes:oi})}).catch(function(){var oi=He.state.expandedKeys,ai=(0,Kt._5)(oi,yn);He.setExpandedKeys(ai)})}}},He.onListChangeStart=function(){He.setUncontrolledState({listChanging:!0})},He.onListChangeEnd=function(){setTimeout(function(){He.setUncontrolledState({listChanging:!1})})},He.onActiveChange=function(Ue){var Ke=He.state.activeKey,Ze=He.props.onActiveChange;Ke!==Ue&&(He.setState({activeKey:Ue}),Ue!==null&&He.scrollTo({key:Ue}),Ze==null||Ze(Ue))},He.getActiveItem=function(){var Ue=He.state,Ke=Ue.activeKey,Ze=Ue.flattenNodes;return Ke===null?null:Ze.find(function(lt){var xt=lt.key;return xt===Ke})||null},He.offsetActiveKey=function(Ue){var Ke=He.state,Ze=Ke.flattenNodes,lt=Ke.activeKey,xt=Ze.findIndex(function(Jt){var gn=Jt.key;return gn===lt});xt===-1&&Ue<0&&(xt=Ze.length),xt=(xt+Ue+Ze.length)%Ze.length;var tn=Ze[xt];if(tn){var en=tn.key;He.onActiveChange(en)}else He.onActiveChange(null)},He.onKeyDown=function(Ue){var Ke=He.state,Ze=Ke.activeKey,lt=Ke.expandedKeys,xt=Ke.checkedKeys,tn=Ke.fieldNames,en=He.props,Jt=en.onKeyDown,gn=en.checkable,Mn=en.selectable;switch(Ue.which){case de.Z.UP:{He.offsetActiveKey(-1),Ue.preventDefault();break}case de.Z.DOWN:{He.offsetActiveKey(1),Ue.preventDefault();break}}var yn=He.getActiveItem();if(yn&&yn.data){var kn=He.getTreeNodeRequiredProps(),$n=yn.data.isLeaf===!1||!!(yn.data[tn.children]||[]).length,An=(0,Ve.F)((0,Te.Z)((0,Te.Z)({},(0,Ve.H8)(Ze,kn)),{},{data:yn.data,active:!0}));switch(Ue.which){case de.Z.LEFT:{$n&<.includes(Ze)?He.onNodeExpand({},An):yn.parent&&He.onActiveChange(yn.parent.key),Ue.preventDefault();break}case de.Z.RIGHT:{$n&&!lt.includes(Ze)?He.onNodeExpand({},An):yn.children&&yn.children.length&&He.onActiveChange(yn.children[0].key),Ue.preventDefault();break}case de.Z.ENTER:case de.Z.SPACE:{gn&&!An.disabled&&An.checkable!==!1&&!An.disableCheckbox?He.onNodeCheck({},An,!xt.includes(Ze)):!gn&&Mn&&!An.disabled&&An.selectable!==!1&&He.onNodeSelect({},An);break}}}Jt==null||Jt(Ue)},He.setUncontrolledState=function(Ue){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ze=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!He.destroyed){var lt=!1,xt=!0,tn={};Object.keys(Ue).forEach(function(en){if(en in He.props){xt=!1;return}lt=!0,tn[en]=Ue[en]}),lt&&(!Ke||xt)&&He.setState((0,Te.Z)((0,Te.Z)({},tn),Ze))}},He.scrollTo=function(Ue){He.listRef.current.scrollTo(Ue)},He}return(0,he.Z)(et,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Xe=this.props.activeKey;Xe!==void 0&&Xe!==this.state.activeKey&&(this.setState({activeKey:Xe}),Xe!==null&&this.scrollTo({key:Xe}))}},{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 Xe,Re=this.state,Ae=Re.focused,Ue=Re.flattenNodes,Ke=Re.keyEntities,Ze=Re.draggingNodeKey,lt=Re.activeKey,xt=Re.dropLevelOffset,tn=Re.dropContainerKey,en=Re.dropTargetKey,Jt=Re.dropPosition,gn=Re.dragOverNodeKey,Mn=Re.indent,yn=this.props,kn=yn.prefixCls,$n=yn.className,An=yn.style,oi=yn.showLine,ai=yn.focusable,Di=yn.tabIndex,Pi=Di===void 0?0:Di,Xi=yn.selectable,or=yn.showIcon,ar=yn.icon,dr=yn.switcherIcon,no=yn.draggable,Ir=yn.checkable,xi=yn.checkStrictly,wr=yn.disabled,Mr=yn.motion,ot=yn.loadData,Rr=yn.filterTreeNode,Nr=yn.height,Hr=yn.itemHeight,uo=yn.virtual,po=yn.titleRender,io=yn.dropIndicatorRender,Do=yn.onContextMenu,Xn=yn.onScroll,$e=yn.direction,nt=yn.rootClassName,Je=yn.rootStyle,wt=(0,ue.Z)(this.props,{aria:!0,data:!0}),Nt;return no&&((0,Ie.Z)(no)==="object"?Nt=no:typeof no=="function"?Nt={nodeDraggable:no}:Nt={}),ee.createElement(oe.k.Provider,{value:{prefixCls:kn,selectable:Xi,showIcon:or,icon:ar,switcherIcon:dr,draggable:Nt,draggingNodeKey:Ze,checkable:Ir,checkStrictly:xi,disabled:wr,keyEntities:Ke,dropLevelOffset:xt,dropContainerKey:tn,dropTargetKey:en,dropPosition:Jt,dragOverNodeKey:gn,indent:Mn,direction:$e,dropIndicatorRender:io,loadData:ot,filterTreeNode:Rr,titleRender:po,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},ee.createElement("div",{role:"tree",className:ve()(kn,$n,nt,(Xe={},(0,me.Z)(Xe,"".concat(kn,"-show-line"),oi),(0,me.Z)(Xe,"".concat(kn,"-focused"),Ae),(0,me.Z)(Xe,"".concat(kn,"-active-focused"),lt!==null),Xe)),style:Je},ee.createElement(un,(0,Le.Z)({ref:this.listRef,prefixCls:kn,style:An,data:Ue,disabled:wr,selectable:Xi,checkable:!!Ir,motion:Mr,dragging:Ze!==null,height:Nr,itemHeight:Hr,virtual:uo,focusable:ai,focused:Ae,tabIndex:Pi,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Do,onScroll:Xn},this.getTreeNodeRequiredProps(),wt))))}}],[{key:"getDerivedStateFromProps",value:function(Xe,Re){var Ae=Re.prevProps,Ue={prevProps:Xe};function Ke(ai){return!Ae&&ai in Xe||Ae&&Ae[ai]!==Xe[ai]}var Ze,lt=Re.fieldNames;if(Ke("fieldNames")&&(lt=(0,Ve.w$)(Xe.fieldNames),Ue.fieldNames=lt),Ke("treeData")?Ze=Xe.treeData:Ke("children")&&((0,z.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Ze=(0,Ve.zn)(Xe.children)),Ze){Ue.treeData=Ze;var xt=(0,Ve.I8)(Ze,{fieldNames:lt});Ue.keyEntities=(0,Te.Z)((0,me.Z)({},ht,dt),xt.keyEntities)}var tn=Ue.keyEntities||Re.keyEntities;if(Ke("expandedKeys")||Ae&&Ke("autoExpandParent"))Ue.expandedKeys=Xe.autoExpandParent||!Ae&&Xe.defaultExpandParent?(0,Kt.r7)(Xe.expandedKeys,tn):Xe.expandedKeys;else if(!Ae&&Xe.defaultExpandAll){var en=(0,Te.Z)({},tn);delete en[ht],Ue.expandedKeys=Object.keys(en).map(function(ai){return en[ai].key})}else!Ae&&Xe.defaultExpandedKeys&&(Ue.expandedKeys=Xe.autoExpandParent||Xe.defaultExpandParent?(0,Kt.r7)(Xe.defaultExpandedKeys,tn):Xe.defaultExpandedKeys);if(Ue.expandedKeys||delete Ue.expandedKeys,Ze||Ue.expandedKeys){var Jt=(0,Ve.oH)(Ze||Re.treeData,Ue.expandedKeys||Re.expandedKeys,lt);Ue.flattenNodes=Jt}if(Xe.selectable&&(Ke("selectedKeys")?Ue.selectedKeys=(0,Kt.BT)(Xe.selectedKeys,Xe):!Ae&&Xe.defaultSelectedKeys&&(Ue.selectedKeys=(0,Kt.BT)(Xe.defaultSelectedKeys,Xe))),Xe.checkable){var gn;if(Ke("checkedKeys")?gn=(0,Kt.E6)(Xe.checkedKeys)||{}:!Ae&&Xe.defaultCheckedKeys?gn=(0,Kt.E6)(Xe.defaultCheckedKeys)||{}:Ze&&(gn=(0,Kt.E6)(Xe.checkedKeys)||{checkedKeys:Re.checkedKeys,halfCheckedKeys:Re.halfCheckedKeys}),gn){var Mn=gn,yn=Mn.checkedKeys,kn=yn===void 0?[]:yn,$n=Mn.halfCheckedKeys,An=$n===void 0?[]:$n;if(!Xe.checkStrictly){var oi=(0,xn.S)(kn,!0,tn);kn=oi.checkedKeys,An=oi.halfCheckedKeys}Ue.checkedKeys=kn,Ue.halfCheckedKeys=An}}return Ke("loadedKeys")&&(Ue.loadedKeys=Xe.loadedKeys),Ue}}]),et}(ee.Component);$t.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},$t.TreeNode=Ne.Z;var ft=$t,We=ft},35654:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{BT:function(){return ee},E6:function(){return se},L0:function(){return ge},OM:function(){return z},_5:function(){return xe},r7:function(){return le},wA:function(){return ve},yx:function(){return ce}});var Le=Ee(80702),me=Ee(62853),Ie=Ee(48736),Te=Ee(59301),be=Ee(39417),Pe=Ee(67841),he=Ee(71430),Se=null;function xe(ye,we){if(!ye)return[];var Ce=ye.slice(),ke=Ce.indexOf(we);return ke>=0&&Ce.splice(ke,1),Ce}function ge(ye,we){var Ce=(ye||[]).slice();return Ce.indexOf(we)===-1&&Ce.push(we),Ce}function ce(ye){return ye.split("-")}function ve(ye,we){var Ce=[],ke=(0,Pe.Z)(we,ye);function Ne(){var je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];je.forEach(function(Ve){var Qe=Ve.key,Ge=Ve.children;Ce.push(Qe),Ne(Ge)})}return Ne(ke.children),Ce}function de(ye){if(ye.parent){var we=ce(ye.pos);return Number(we[we.length-1])===ye.parent.children.length-1}return!1}function ue(ye){var we=ce(ye.pos);return Number(we[we.length-1])===0}function z(ye,we,Ce,ke,Ne,je,Ve,Qe,Ge,mt){var ct,Ct=ye.clientX,it=ye.clientY,St=ye.target.getBoundingClientRect(),ut=St.top,Ft=St.height,ht=(mt==="rtl"?-1:1)*(((Ne==null?void 0:Ne.x)||0)-Ct),rt=(ht-12)/ke,dt=(0,Pe.Z)(Qe,Ce.props.eventKey);if(it<ut+Ft/2){var yt=Ve.findIndex(function(We){return We.key===dt.key}),_t=yt<=0?0:yt-1,vt=Ve[_t].key;dt=(0,Pe.Z)(Qe,vt)}var Bt=dt.key,jt=dt,un=dt.key,Kt=0,xn=0;if(!Ge.includes(Bt))for(var Ut=0;Ut<rt&&de(dt);Ut+=1)dt=dt.parent,xn+=1;var Wt=we.props.data,$t=dt.node,ft=!0;return ue(dt)&&dt.level===0&&it<ut+Ft/2&&je({dragNode:Wt,dropNode:$t,dropPosition:-1})&&dt.key===Ce.props.eventKey?Kt=-1:(jt.children||[]).length&&Ge.includes(un)?je({dragNode:Wt,dropNode:$t,dropPosition:0})?Kt=0:ft=!1:xn===0?rt>-1.5?je({dragNode:Wt,dropNode:$t,dropPosition:1})?Kt=1:ft=!1:je({dragNode:Wt,dropNode:$t,dropPosition:0})?Kt=0:je({dragNode:Wt,dropNode:$t,dropPosition:1})?Kt=1:ft=!1:je({dragNode:Wt,dropNode:$t,dropPosition:1})?Kt=1:ft=!1,{dropPosition:Kt,dropLevelOffset:xn,dropTargetKey:dt.key,dropTargetPos:dt.pos,dragOverNodeKey:un,dropContainerKey:Kt===0?null:((ct=dt.parent)===null||ct===void 0?void 0:ct.key)||null,dropAllowed:ft}}function ee(ye,we){if(ye){var Ce=we.multiple;return Ce?ye.slice():ye.length?[ye[0]]:ye}}var oe=function(we){return we};function ie(ye,we){if(!ye)return[];var Ce=we||{},ke=Ce.processProps,Ne=ke===void 0?oe:ke,je=Array.isArray(ye)?ye:[ye];return je.map(function(Ve){var Qe=Ve.children,Ge=_objectWithoutProperties(Ve,Se),mt=ie(Qe,we);return React.createElement(TreeNode,_extends({key:Ge.key},Ne(Ge)),mt)})}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,Ie.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return we}function le(ye,we){var Ce=new Set;function ke(Ne){if(!Ce.has(Ne)){var je=(0,Pe.Z)(we,Ne);if(je){Ce.add(Ne);var Ve=je.parent,Qe=je.node;Qe.disabled||Ve&&ke(Ve.key)}}}return(ye||[]).forEach(function(Ne){ke(Ne)}),(0,Le.Z)(Ce)}},90782:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{S:function(){return he}});var Le=Ee(48736),me=Ee(67841);function Ie(Se,xe){var ge=new Set;return Se.forEach(function(ce){xe.has(ce)||ge.add(ce)}),ge}function Te(Se){var xe=Se||{},ge=xe.disabled,ce=xe.disableCheckbox,ve=xe.checkable;return!!(ge||ce)||ve===!1}function be(Se,xe,ge,ce){for(var ve=new Set(Se),de=new Set,ue=0;ue<=ge;ue+=1){var z=xe.get(ue)||new Set;z.forEach(function(se){var le=se.key,ye=se.node,we=se.children,Ce=we===void 0?[]:we;ve.has(le)&&!ce(ye)&&Ce.filter(function(ke){return!ce(ke.node)}).forEach(function(ke){ve.add(ke.key)})})}for(var ee=new Set,oe=ge;oe>=0;oe-=1){var ie=xe.get(oe)||new Set;ie.forEach(function(se){var le=se.parent,ye=se.node;if(!(ce(ye)||!se.parent||ee.has(se.parent.key))){if(ce(se.parent.node)){ee.add(le.key);return}var we=!0,Ce=!1;(le.children||[]).filter(function(ke){return!ce(ke.node)}).forEach(function(ke){var Ne=ke.key,je=ve.has(Ne);we&&!je&&(we=!1),!Ce&&(je||de.has(Ne))&&(Ce=!0)}),we&&ve.add(le.key),Ce&&de.add(le.key),ee.add(le.key)}})}return{checkedKeys:Array.from(ve),halfCheckedKeys:Array.from(Ie(de,ve))}}function Pe(Se,xe,ge,ce,ve){for(var de=new Set(Se),ue=new Set(xe),z=0;z<=ce;z+=1){var ee=ge.get(z)||new Set;ee.forEach(function(le){var ye=le.key,we=le.node,Ce=le.children,ke=Ce===void 0?[]:Ce;!de.has(ye)&&!ue.has(ye)&&!ve(we)&&ke.filter(function(Ne){return!ve(Ne.node)}).forEach(function(Ne){de.delete(Ne.key)})})}ue=new Set;for(var oe=new Set,ie=ce;ie>=0;ie-=1){var se=ge.get(ie)||new Set;se.forEach(function(le){var ye=le.parent,we=le.node;if(!(ve(we)||!le.parent||oe.has(le.parent.key))){if(ve(le.parent.node)){oe.add(ye.key);return}var Ce=!0,ke=!1;(ye.children||[]).filter(function(Ne){return!ve(Ne.node)}).forEach(function(Ne){var je=Ne.key,Ve=de.has(je);Ce&&!Ve&&(Ce=!1),!ke&&(Ve||ue.has(je))&&(ke=!0)}),Ce||de.delete(ye.key),ke&&ue.add(ye.key),oe.add(ye.key)}})}return{checkedKeys:Array.from(de),halfCheckedKeys:Array.from(Ie(ue,de))}}function he(Se,xe,ge,ce){var ve=[],de;ce?de=ce:de=Te;var ue=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],le=se.level,ye=z.get(le);ye||(ye=new Set,z.set(le,ye)),ye.add(se),ee=Math.max(ee,le)}),(0,Le.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=be(ue,z,ee,de):oe=Pe(ue,xe.halfCheckedKeys,z,ee,de),oe}},67841:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Le}});function Le(me,Ie){return me[Ie]}},71430:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{F:function(){return le},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 Le=Ee(62853),me=Ee(80702),Ie=Ee(77321),Te=Ee(74416),be=Ee(11592),Pe=Ee(2738),he=Ee(48736),Se=Ee(67841),xe=["children"];function ge(ye,we){return"".concat(ye,"-").concat(we)}function ce(ye){return ye&&ye.type&&ye.type.isTreeNode}function ve(ye,we){return ye!=null?ye:we}function de(ye){var we=ye||{},Ce=we.title,ke=we._title,Ne=we.key,je=we.children,Ve=Ce||"title";return{title:Ve,_title:ke||[Ve],key:Ne||"key",children:je||"children"}}function ue(ye,we){var Ce=new Map;function ke(Ne){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Ne||[]).forEach(function(Ve){var Qe=Ve[we.key],Ge=Ve[we.children];warning(Qe!=null,"Tree node must have a certain key: [".concat(je).concat(Qe,"]"));var mt=String(Qe);warning(!Ce.has(mt)||Qe===null||Qe===void 0,"Same 'key' exist in the Tree: ".concat(mt)),Ce.set(mt,!0),ke(Ge,"".concat(je).concat(mt," > "))})}ke(ye)}function z(ye){function we(Ce){var ke=(0,be.Z)(Ce);return ke.map(function(Ne){if(!ce(Ne))return(0,he.ZP)(!Ne,"Tree/TreeNode can only accept TreeNode as children."),null;var je=Ne.key,Ve=Ne.props,Qe=Ve.children,Ge=(0,Te.Z)(Ve,xe),mt=(0,Ie.Z)({key:je},Ge),ct=we(Qe);return ct.length&&(mt.children=ct),mt}).filter(function(Ne){return Ne})}return we(ye)}function ee(ye,we,Ce){var ke=de(Ce),Ne=ke._title,je=ke.key,Ve=ke.children,Qe=new Set(we===!0?[]:we),Ge=[];function mt(ct){var Ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return ct.map(function(it,St){for(var ut=ge(Ct?Ct.pos:"0",St),Ft=ve(it[je],ut),ht,rt=0;rt<Ne.length;rt+=1){var dt=Ne[rt];if(it[dt]!==void 0){ht=it[dt];break}}var yt=(0,Ie.Z)((0,Ie.Z)({},(0,Pe.Z)(it,[].concat((0,me.Z)(Ne),[je,Ve]))),{},{title:ht,key:Ft,parent:Ct,pos:ut,children:null,data:it,isStart:[].concat((0,me.Z)(Ct?Ct.isStart:[]),[St===0]),isEnd:[].concat((0,me.Z)(Ct?Ct.isEnd:[]),[St===ct.length-1])});return Ge.push(yt),we===!0||Qe.has(Ft)?yt.children=mt(it[Ve]||[],yt):yt.children=[],yt})}return mt(ye),Ge}function oe(ye,we,Ce){var ke={};(0,Le.Z)(Ce)==="object"?ke=Ce:ke={externalGetKey:Ce},ke=ke||{};var Ne=ke,je=Ne.childrenPropName,Ve=Ne.externalGetKey,Qe=Ne.fieldNames,Ge=de(Qe),mt=Ge.key,ct=Ge.children,Ct=je||ct,it;Ve?typeof Ve=="string"?it=function(Ft){return Ft[Ve]}:typeof Ve=="function"&&(it=function(Ft){return Ve(Ft)}):it=function(Ft,ht){return ve(Ft[mt],ht)};function St(ut,Ft,ht,rt){var dt=ut?ut[Ct]:ye,yt=ut?ge(ht.pos,Ft):"0",_t=ut?[].concat((0,me.Z)(rt),[ut]):[];if(ut){var vt=it(ut,yt),Bt={node:ut,index:Ft,pos:yt,key:vt,parentPos:ht.node?ht.pos:null,level:ht.level+1,nodes:_t};we(Bt)}dt&&dt.forEach(function(jt,un){St(jt,un,{node:ut,pos:yt,level:ht?ht.level+1:-1},_t)})}St(null)}function ie(ye){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ce=we.initWrapper,ke=we.processEntity,Ne=we.onProcessFinished,je=we.externalGetKey,Ve=we.childrenPropName,Qe=we.fieldNames,Ge=arguments.length>2?arguments[2]:void 0,mt=je||Ge,ct={},Ct={},it={posEntities:ct,keyEntities:Ct};return Ce&&(it=Ce(it)||it),oe(ye,function(St){var ut=St.node,Ft=St.index,ht=St.pos,rt=St.key,dt=St.parentPos,yt=St.level,_t=St.nodes,vt={node:ut,nodes:_t,index:Ft,key:rt,pos:ht,level:yt},Bt=ve(rt,ht);ct[ht]=vt,Ct[Bt]=vt,vt.parent=ct[dt],vt.parent&&(vt.parent.children=vt.parent.children||[],vt.parent.children.push(vt)),ke&&ke(vt,it)},{externalGetKey:mt,childrenPropName:Ve,fieldNames:Qe}),Ne&&Ne(it),it}function se(ye,we){var Ce=we.expandedKeys,ke=we.selectedKeys,Ne=we.loadedKeys,je=we.loadingKeys,Ve=we.checkedKeys,Qe=we.halfCheckedKeys,Ge=we.dragOverNodeKey,mt=we.dropPosition,ct=we.keyEntities,Ct=(0,Se.Z)(ct,ye),it={eventKey:ye,expanded:Ce.indexOf(ye)!==-1,selected:ke.indexOf(ye)!==-1,loaded:Ne.indexOf(ye)!==-1,loading:je.indexOf(ye)!==-1,checked:Ve.indexOf(ye)!==-1,halfChecked:Qe.indexOf(ye)!==-1,pos:String(Ct?Ct.pos:""),dragOver:Ge===ye&&mt===0,dragOverGapTop:Ge===ye&&mt===-1,dragOverGapBottom:Ge===ye&&mt===1};return it}function le(ye){var we=ye.data,Ce=ye.expanded,ke=ye.selected,Ne=ye.checked,je=ye.loaded,Ve=ye.loading,Qe=ye.halfChecked,Ge=ye.dragOver,mt=ye.dragOverGapTop,ct=ye.dragOverGapBottom,Ct=ye.pos,it=ye.active,St=ye.eventKey,ut=(0,Ie.Z)((0,Ie.Z)({},we),{},{expanded:Ce,selected:ke,checked:Ne,loaded:je,loading:Ve,halfChecked:Qe,dragOver:Ge,dragOverGapTop:mt,dragOverGapBottom:ct,pos:Ct,active:it,key:St});return"props"in ut||Object.defineProperty(ut,"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}}),ut}},8224:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return me}});var Le=Ee(4676);function me(Ie,Te,be,Pe){var he=Le.unstable_batchedUpdates?function(xe){Le.unstable_batchedUpdates(be,xe)}:be;return Ie!=null&&Ie.addEventListener&&Ie.addEventListener(Te,he,Pe),{remove:function(){Ie!=null&&Ie.removeEventListener&&Ie.removeEventListener(Te,he,Pe)}}}},55468:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{g1:function(){return ce},os:function(){return de}});var Le=/margin|padding|width|height|max|min|offset/,me={left:!0,top:!0},Ie={cssFloat:1,styleFloat:1,float:1};function Te(ue){return ue.nodeType===1?ue.ownerDocument.defaultView.getComputedStyle(ue,null):{}}function be(ue,z,ee){if(z=z.toLowerCase(),ee==="auto"){if(z==="height")return ue.offsetHeight;if(z==="width")return ue.offsetWidth}return z in me||(me[z]=Le.test(z)),me[z]?parseFloat(ee)||0:ee}function Pe(ue,z){var ee=arguments.length,oe=Te(ue);return z=Ie[z]?"cssFloat"in ue.style?"cssFloat":"styleFloat":z,ee===1?oe:be(ue,z,oe[z]||ue.style[z])}function he(ue,z,ee){var oe=arguments.length;if(z=Ie[z]?"cssFloat"in ue.style?"cssFloat":"styleFloat":z,oe===3)return typeof ee=="number"&&Le.test(z)&&(ee="".concat(ee,"px")),ue.style[z]=ee,ee;for(var ie in z)z.hasOwnProperty(ie)&&he(ue,ie,z[ie]);return Te(ue)}function Se(ue){return ue===document.body?document.documentElement.clientWidth:ue.offsetWidth}function xe(ue){return ue===document.body?window.innerHeight||document.documentElement.clientHeight:ue.offsetHeight}function ge(){var ue=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),z=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:ue,height:z}}function ce(){var ue=document.documentElement.clientWidth,z=window.innerHeight||document.documentElement.clientHeight;return{width:ue,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(ue){var z=ue.getBoundingClientRect(),ee=document.documentElement;return{left:z.left+(window.pageXOffset||ee.scrollLeft)-(ee.clientLeft||document.body.clientLeft||0),top:z.top+(window.pageYOffset||ee.scrollTop)-(ee.clientTop||document.body.clientTop||0)}}},24514:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{G:function(){return Te}});var Le=Ee(47273),me=function(Pe){if((0,Le.Z)()&&window.document.documentElement){var he=Array.isArray(Pe)?Pe:[Pe],Se=window.document.documentElement;return he.some(function(xe){return xe in Se.style})}return!1},Ie=function(Pe,he){if(!me(Pe))return!1;var Se=document.createElement("div"),xe=Se.style[Pe];return Se.style[Pe]=he,Se.style[Pe]!==xe};function Te(be,Pe){return!Array.isArray(be)&&Pe!==void 0?Ie(be,Pe):me(be)}},45680:function(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return $t}});var Le=Ee(72308),me=Ee(62853),Ie=Ee(77321),Te=Ee(49618),be=Ee(52487),Pe=Ee(74416),he=Ee(92310),Se=Ee.n(he),xe=Ee(29301),ge=Ee(70425),ce=Ee(34280),ve=Ee(59301),de=Ee(4676),ue=ve.forwardRef(function(ft,We){var Be=ft.height,qe=ft.offsetY,et=ft.offsetX,He=ft.children,Xe=ft.prefixCls,Re=ft.onInnerResize,Ae=ft.innerProps,Ue=ft.rtl,Ke=ft.extra,Ze={},lt={display:"flex",flexDirection:"column"};return qe!==void 0&&(Ze={height:Be,position:"relative",overflow:"hidden"},lt=(0,Ie.Z)((0,Ie.Z)({},lt),{},(0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)({transform:"translateY(".concat(qe,"px)")},Ue?"marginRight":"marginLeft",-et),"position","absolute"),"left",0),"right",0),"top",0))),ve.createElement("div",{style:Ze},ve.createElement(xe.Z,{onResize:function(tn){var en=tn.offsetHeight;en&&Re&&Re()}},ve.createElement("div",(0,Le.Z)({style:lt,className:Se()((0,Te.Z)({},"".concat(Xe,"-holder-inner"),Xe)),ref:We},Ae),He,Ke)))});ue.displayName="Filler";var z=ue;function ee(ft){var We=ft.children,Be=ft.setRef,qe=ve.useCallback(function(et){Be(et)},[]);return ve.cloneElement(We,{ref:qe})}function oe(ft,We,Be,qe,et,He,Xe,Re){var Ae=Re.getKey;return ft.slice(We,Be+1).map(function(Ue,Ke){var Ze=We+Ke,lt=Xe(Ue,Ze,{style:{width:qe},offsetX:et}),xt=Ae(Ue);return ve.createElement(ee,{key:xt,setRef:function(en){return He(Ue,en)}},lt)})}function ie(ft,We,Be,qe){var et=Be-ft,He=We-Be,Xe=Math.min(et,He)*2;if(qe<=Xe){var Re=Math.floor(qe/2);return qe%2?Be+Re+1:Be-Re}return et>He?Be-(qe-He):Be+(qe-et)}function se(ft,We,Be){var qe=ft.length,et=We.length,He,Xe;if(qe===0&&et===0)return null;qe<et?(He=ft,Xe=We):(He=We,Xe=ft);var Re={__EMPTY_ITEM__:!0};function Ae(tn){return tn!==void 0?Be(tn):Re}for(var Ue=null,Ke=Math.abs(qe-et)!==1,Ze=0;Ze<Xe.length;Ze+=1){var lt=Ae(He[Ze]),xt=Ae(Xe[Ze]);if(lt!==xt){Ue=Ze,Ke=Ke||lt!==Ae(Xe[Ze+1]);break}}return Ue===null?null:{index:Ue,multiple:Ke}}function le(ft,We,Be){var qe=ve.useState(ft),et=(0,be.Z)(qe,2),He=et[0],Xe=et[1],Re=ve.useState(null),Ae=(0,be.Z)(Re,2),Ue=Ae[0],Ke=Ae[1];return ve.useEffect(function(){var Ze=se(He||[],ft||[],We);(Ze==null?void 0:Ze.index)!==void 0&&(Be==null||Be(Ze.index),Ke(ft[Ze.index])),Xe(ft)},[ft]),[Ue]}var ye=Ee(16089),we=(typeof navigator=="undefined"?"undefined":(0,me.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Ce=we,ke=function(ft,We,Be,qe){var et=(0,ve.useRef)(!1),He=(0,ve.useRef)(null);function Xe(){clearTimeout(He.current),et.current=!0,He.current=setTimeout(function(){et.current=!1},50)}var Re=(0,ve.useRef)({top:ft,bottom:We,left:Be,right:qe});return Re.current.top=ft,Re.current.bottom=We,Re.current.left=Be,Re.current.right=qe,function(Ae,Ue){var Ke=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ze=Ae?Ue<0&&Re.current.left||Ue>0&&Re.current.right:Ue<0&&Re.current.top||Ue>0&&Re.current.bottom;return Ke&&Ze?(clearTimeout(He.current),et.current=!1):(!Ze||et.current)&&Xe(),!et.current&&Ze}};function Ne(ft,We,Be,qe,et,He,Xe){var Re=(0,ve.useRef)(0),Ae=(0,ve.useRef)(null),Ue=(0,ve.useRef)(null),Ke=(0,ve.useRef)(!1),Ze=ke(We,Be,qe,et);function lt(Mn,yn){if(ye.Z.cancel(Ae.current),!Ze(!1,yn)){var kn=Mn;if(!kn._virtualHandled)kn._virtualHandled=!0;else return;Re.current+=yn,Ue.current=yn,Ce||kn.preventDefault(),Ae.current=(0,ye.Z)(function(){var $n=Ke.current?10:1;Xe(Re.current*$n,!1),Re.current=0})}}function xt(Mn,yn){Xe(yn,!0),Ce||Mn.preventDefault()}var tn=(0,ve.useRef)(null),en=(0,ve.useRef)(null);function Jt(Mn){if(ft){ye.Z.cancel(en.current),en.current=(0,ye.Z)(function(){tn.current=null},2);var yn=Mn.deltaX,kn=Mn.deltaY,$n=Mn.shiftKey,An=yn,oi=kn;(tn.current==="sx"||!tn.current&&$n&&kn&&!yn)&&(An=kn,oi=0,tn.current="sx");var ai=Math.abs(An),Di=Math.abs(oi);tn.current===null&&(tn.current=He&&ai>Di?"x":"y"),tn.current==="y"?lt(Mn,oi):xt(Mn,An)}}function gn(Mn){ft&&(Ke.current=Mn.detail===Ue.current)}return[Jt,gn]}function je(ft,We,Be,qe){var et=ve.useMemo(function(){return[new Map,[]]},[ft,Be.id,qe]),He=(0,be.Z)(et,2),Xe=He[0],Re=He[1],Ae=function(Ke){var Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ke,lt=Xe.get(Ke),xt=Xe.get(Ze);if(lt===void 0||xt===void 0)for(var tn=ft.length,en=Re.length;en<tn;en+=1){var Jt,gn=ft[en],Mn=We(gn);Xe.set(Mn,en);var yn=(Jt=Be.get(Mn))!==null&&Jt!==void 0?Jt:qe;if(Re[en]=(Re[en-1]||0)+yn,Mn===Ke&&(lt=en),Mn===Ze&&(xt=en),lt!==void 0&&xt!==void 0)break}return{top:Re[lt-1]||0,bottom:Re[xt]}};return Ae}var Ve=Ee(96949),Qe=Ee(55090),Ge=function(){function ft(){(0,Ve.Z)(this,ft),(0,Te.Z)(this,"maps",void 0),(0,Te.Z)(this,"id",0),(0,Te.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,Qe.Z)(ft,[{key:"set",value:function(Be,qe){this.maps[Be]=qe,this.id+=1,this.diffKeys.add(Be)}},{key:"get",value:function(Be){return this.maps[Be]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),ft}(),mt=Ge;function ct(ft){var We=parseFloat(ft);return isNaN(We)?0:We}function Ct(ft,We,Be){var qe=ve.useState(0),et=(0,be.Z)(qe,2),He=et[0],Xe=et[1],Re=(0,ve.useRef)(new Map),Ae=(0,ve.useRef)(new mt),Ue=(0,ve.useRef)(0);function Ke(){Ue.current+=1}function Ze(){var xt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Ke();var tn=function(){var gn=!1;Re.current.forEach(function(Mn,yn){if(Mn&&Mn.offsetParent){var kn=Mn.offsetHeight,$n=getComputedStyle(Mn),An=$n.marginTop,oi=$n.marginBottom,ai=ct(An),Di=ct(oi),Pi=kn+ai+Di;Ae.current.get(yn)!==Pi&&(Ae.current.set(yn,Pi),gn=!0)}}),gn&&Xe(function(Mn){return Mn+1})};if(xt)tn();else{Ue.current+=1;var en=Ue.current;Promise.resolve().then(function(){en===Ue.current&&tn()})}}function lt(xt,tn){var en=ft(xt),Jt=Re.current.get(en);tn?(Re.current.set(en,tn),Ze()):Re.current.delete(en),!Jt!=!tn&&(tn?We==null||We(xt):Be==null||Be(xt))}return(0,ve.useEffect)(function(){return Ke},[]),[lt,Ze,Ae.current,He]}var it=14/15;function St(ft,We,Be){var qe=(0,ve.useRef)(!1),et=(0,ve.useRef)(0),He=(0,ve.useRef)(0),Xe=(0,ve.useRef)(null),Re=(0,ve.useRef)(null),Ae,Ue=function(xt){if(qe.current){var tn=Math.ceil(xt.touches[0].pageX),en=Math.ceil(xt.touches[0].pageY),Jt=et.current-tn,gn=He.current-en,Mn=Math.abs(Jt)>Math.abs(gn);Mn?et.current=tn:He.current=en;var yn=Be(Mn,Mn?Jt:gn,!1,xt);yn&&xt.preventDefault(),clearInterval(Re.current),yn&&(Re.current=setInterval(function(){Mn?Jt*=it:gn*=it;var kn=Math.floor(Mn?Jt:gn);(!Be(Mn,kn,!0)||Math.abs(kn)<=.1)&&clearInterval(Re.current)},16))}},Ke=function(){qe.current=!1,Ae()},Ze=function(xt){Ae(),xt.touches.length===1&&!qe.current&&(qe.current=!0,et.current=Math.ceil(xt.touches[0].pageX),He.current=Math.ceil(xt.touches[0].pageY),Xe.current=xt.target,Xe.current.addEventListener("touchmove",Ue,{passive:!1}),Xe.current.addEventListener("touchend",Ke,{passive:!0}))};Ae=function(){Xe.current&&(Xe.current.removeEventListener("touchmove",Ue),Xe.current.removeEventListener("touchend",Ke))},(0,ce.Z)(function(){return ft&&We.current.addEventListener("touchstart",Ze,{passive:!0}),function(){var lt;(lt=We.current)===null||lt===void 0||lt.removeEventListener("touchstart",Ze),Ae(),clearInterval(Re.current)}},[ft])}function ut(ft){return Math.floor(Math.pow(ft,.5))}function Ft(ft,We){var Be="touches"in ft?ft.touches[0]:ft;return Be[We?"pageX":"pageY"]-window[We?"scrollX":"scrollY"]}function ht(ft,We,Be){ve.useEffect(function(){var qe=We.current;if(ft&&qe){var et=!1,He,Xe,Re=function(){ye.Z.cancel(He)},Ae=function lt(){Re(),He=(0,ye.Z)(function(){Be(Xe),lt()})},Ue=function(xt){if(!(xt.target.draggable||xt.button!==0)){var tn=xt;tn._virtualHandled||(tn._virtualHandled=!0,et=!0)}},Ke=function(){et=!1,Re()},Ze=function(xt){if(et){var tn=Ft(xt,!1),en=qe.getBoundingClientRect(),Jt=en.top,gn=en.bottom;if(tn<=Jt){var Mn=Jt-tn;Xe=-ut(Mn),Ae()}else if(tn>=gn){var yn=tn-gn;Xe=ut(yn),Ae()}else Re()}};return qe.addEventListener("mousedown",Ue),qe.ownerDocument.addEventListener("mouseup",Ke),qe.ownerDocument.addEventListener("mousemove",Ze),function(){qe.removeEventListener("mousedown",Ue),qe.ownerDocument.removeEventListener("mouseup",Ke),qe.ownerDocument.removeEventListener("mousemove",Ze),Re()}}},[ft])}var rt=10;function dt(ft,We,Be,qe,et,He,Xe,Re){var Ae=ve.useRef(),Ue=ve.useState(null),Ke=(0,be.Z)(Ue,2),Ze=Ke[0],lt=Ke[1];return(0,ce.Z)(function(){if(Ze&&Ze.times<rt){if(!ft.current){lt(function(Mr){return(0,Ie.Z)({},Mr)});return}He();var xt=Ze.targetAlign,tn=Ze.originAlign,en=Ze.index,Jt=Ze.offset,gn=ft.current.clientHeight,Mn=!1,yn=xt,kn=null;if(gn){for(var $n=xt||tn,An=0,oi=0,ai=0,Di=Math.min(We.length-1,en),Pi=0;Pi<=Di;Pi+=1){var Xi=et(We[Pi]);oi=An;var or=Be.get(Xi);ai=oi+(or===void 0?qe:or),An=ai}for(var ar=$n==="top"?Jt:gn-Jt,dr=Di;dr>=0;dr-=1){var no=et(We[dr]),Ir=Be.get(no);if(Ir===void 0){Mn=!0;break}if(ar-=Ir,ar<=0)break}switch($n){case"top":kn=oi-Jt;break;case"bottom":kn=ai-gn+Jt;break;default:{var xi=ft.current.scrollTop,wr=xi+gn;oi<xi?yn="top":ai>wr&&(yn="bottom")}}kn!==null&&Xe(kn),kn!==Ze.lastTop&&(Mn=!0)}Mn&<((0,Ie.Z)((0,Ie.Z)({},Ze),{},{times:Ze.times+1,targetAlign:yn,lastTop:kn}))}},[Ze,ft.current]),function(xt){if(xt==null){Re();return}if(ye.Z.cancel(Ae.current),typeof xt=="number")Xe(xt);else if(xt&&(0,me.Z)(xt)==="object"){var tn,en=xt.align;"index"in xt?tn=xt.index:tn=We.findIndex(function(Mn){return et(Mn)===xt.key});var Jt=xt.offset,gn=Jt===void 0?0:Jt;lt({times:0,index:tn,offset:gn,originAlign:en})}}}var yt=ve.forwardRef(function(ft,We){var Be=ft.prefixCls,qe=ft.rtl,et=ft.scrollOffset,He=ft.scrollRange,Xe=ft.onStartMove,Re=ft.onStopMove,Ae=ft.onScroll,Ue=ft.horizontal,Ke=ft.spinSize,Ze=ft.containerSize,lt=ft.style,xt=ft.thumbStyle,tn=ft.showScrollBar,en=ve.useState(!1),Jt=(0,be.Z)(en,2),gn=Jt[0],Mn=Jt[1],yn=ve.useState(null),kn=(0,be.Z)(yn,2),$n=kn[0],An=kn[1],oi=ve.useState(null),ai=(0,be.Z)(oi,2),Di=ai[0],Pi=ai[1],Xi=!qe,or=ve.useRef(),ar=ve.useRef(),dr=ve.useState(tn),no=(0,be.Z)(dr,2),Ir=no[0],xi=no[1],wr=ve.useRef(),Mr=function(){tn===!0||tn===!1||(clearTimeout(wr.current),xi(!0),wr.current=setTimeout(function(){xi(!1)},3e3))},ot=He-Ze||0,Rr=Ze-Ke||0,Nr=ve.useMemo(function(){if(et===0||ot===0)return 0;var Je=et/ot;return Je*Rr},[et,ot,Rr]),Hr=function(wt){wt.stopPropagation(),wt.preventDefault()},uo=ve.useRef({top:Nr,dragging:gn,pageY:$n,startTop:Di});uo.current={top:Nr,dragging:gn,pageY:$n,startTop:Di};var po=function(wt){Mn(!0),An(Ft(wt,Ue)),Pi(uo.current.top),Xe(),wt.stopPropagation(),wt.preventDefault()};ve.useEffect(function(){var Je=function(Et){Et.preventDefault()},wt=or.current,Nt=ar.current;return wt.addEventListener("touchstart",Je,{passive:!1}),Nt.addEventListener("touchstart",po,{passive:!1}),function(){wt.removeEventListener("touchstart",Je),Nt.removeEventListener("touchstart",po)}},[]);var io=ve.useRef();io.current=ot;var Do=ve.useRef();Do.current=Rr,ve.useEffect(function(){if(gn){var Je,wt=function(Et){var cn=uo.current,bn=cn.dragging,dn=cn.pageY,rn=cn.startTop;ye.Z.cancel(Je);var At=or.current.getBoundingClientRect(),an=Ze/(Ue?At.width:At.height);if(bn){var En=(Ft(Et,Ue)-dn)*an,Dn=rn;!Xi&&Ue?Dn-=En:Dn+=En;var qt=io.current,on=Do.current,Nn=on?Dn/on:0,On=Math.ceil(Nn*qt);On=Math.max(On,0),On=Math.min(On,qt),Je=(0,ye.Z)(function(){Ae(On,Ue)})}},Nt=function(){Mn(!1),Re()};return window.addEventListener("mousemove",wt,{passive:!0}),window.addEventListener("touchmove",wt,{passive:!0}),window.addEventListener("mouseup",Nt,{passive:!0}),window.addEventListener("touchend",Nt,{passive:!0}),function(){window.removeEventListener("mousemove",wt),window.removeEventListener("touchmove",wt),window.removeEventListener("mouseup",Nt),window.removeEventListener("touchend",Nt),ye.Z.cancel(Je)}}},[gn]),ve.useEffect(function(){return Mr(),function(){clearTimeout(wr.current)}},[et]),ve.useImperativeHandle(We,function(){return{delayHidden:Mr}});var Xn="".concat(Be,"-scrollbar"),$e={position:"absolute",visibility:Ir?null:"hidden"},nt={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Ue?($e.height=8,$e.left=0,$e.right=0,$e.bottom=0,nt.height="100%",nt.width=Ke,Xi?nt.left=Nr:nt.right=Nr):($e.width=8,$e.top=0,$e.bottom=0,Xi?$e.right=0:$e.left=0,nt.width="100%",nt.height=Ke,nt.top=Nr),ve.createElement("div",{ref:or,className:Se()(Xn,(0,Te.Z)((0,Te.Z)((0,Te.Z)({},"".concat(Xn,"-horizontal"),Ue),"".concat(Xn,"-vertical"),!Ue),"".concat(Xn,"-visible"),Ir)),style:(0,Ie.Z)((0,Ie.Z)({},$e),lt),onMouseDown:Hr,onMouseMove:Mr},ve.createElement("div",{ref:ar,className:Se()("".concat(Xn,"-thumb"),(0,Te.Z)({},"".concat(Xn,"-thumb-moving"),gn)),style:(0,Ie.Z)((0,Ie.Z)({},nt),xt),onMouseDown:po}))}),_t=yt,vt=20;function Bt(){var ft=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Be=ft/We*ft;return isNaN(Be)&&(Be=0),Be=Math.max(Be,vt),Math.floor(Be)}var jt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],un=[],Kt={overflowY:"auto",overflowAnchor:"none"};function xn(ft,We){var Be=ft.prefixCls,qe=Be===void 0?"rc-virtual-list":Be,et=ft.className,He=ft.height,Xe=ft.itemHeight,Re=ft.fullHeight,Ae=Re===void 0?!0:Re,Ue=ft.style,Ke=ft.data,Ze=ft.children,lt=ft.itemKey,xt=ft.virtual,tn=ft.direction,en=ft.scrollWidth,Jt=ft.component,gn=Jt===void 0?"div":Jt,Mn=ft.onScroll,yn=ft.onVirtualScroll,kn=ft.onVisibleChange,$n=ft.innerProps,An=ft.extraRender,oi=ft.styles,ai=ft.showScrollBar,Di=ai===void 0?"optional":ai,Pi=(0,Pe.Z)(ft,jt),Xi=ve.useCallback(function(_r){return typeof lt=="function"?lt(_r):_r==null?void 0:_r[lt]},[lt]),or=Ct(Xi,null,null),ar=(0,be.Z)(or,4),dr=ar[0],no=ar[1],Ir=ar[2],xi=ar[3],wr=!!(xt!==!1&&He&&Xe),Mr=ve.useMemo(function(){return Object.values(Ir.maps).reduce(function(_r,ur){return _r+ur},0)},[Ir.id,Ir.maps]),ot=wr&&Ke&&(Math.max(Xe*Ke.length,Mr)>He||!!en),Rr=tn==="rtl",Nr=Se()(qe,(0,Te.Z)({},"".concat(qe,"-rtl"),Rr),et),Hr=Ke||un,uo=(0,ve.useRef)(),po=(0,ve.useRef)(),io=(0,ve.useRef)(),Do=(0,ve.useState)(0),Xn=(0,be.Z)(Do,2),$e=Xn[0],nt=Xn[1],Je=(0,ve.useState)(0),wt=(0,be.Z)(Je,2),Nt=wt[0],kt=wt[1],Et=(0,ve.useState)(!1),cn=(0,be.Z)(Et,2),bn=cn[0],dn=cn[1],rn=function(){dn(!0)},At=function(){dn(!1)},an={getKey:Xi};function En(_r){nt(function(ur){var Kr;typeof _r=="function"?Kr=_r(ur):Kr=_r;var cr=Ei(Kr);return uo.current.scrollTop=cr,cr})}var Dn=(0,ve.useRef)({start:0,end:Hr.length}),qt=(0,ve.useRef)(),on=le(Hr,Xi),Nn=(0,be.Z)(on,1),On=Nn[0];qt.current=On;var qn=ve.useMemo(function(){if(!wr)return{scrollHeight:void 0,start:0,end:Hr.length-1,offset:void 0};if(!ot){var _r;return{scrollHeight:((_r=po.current)===null||_r===void 0?void 0:_r.offsetHeight)||0,start:0,end:Hr.length-1,offset:void 0}}for(var ur=0,Kr,cr,qr,Yo=Hr.length,nr=0;nr<Yo;nr+=1){var Wi=Hr[nr],Qn=Xi(Wi),ir=Ir.get(Qn),eo=ur+(ir===void 0?Xe:ir);eo>=$e&&Kr===void 0&&(Kr=nr,cr=ur),eo>$e+He&&qr===void 0&&(qr=nr),ur=eo}return Kr===void 0&&(Kr=0,cr=0,qr=Math.ceil(He/Xe)),qr===void 0&&(qr=Hr.length-1),qr=Math.min(qr+1,Hr.length-1),{scrollHeight:ur,start:Kr,end:qr,offset:cr}},[ot,wr,$e,Hr,xi,He]),Hn=qn.scrollHeight,ei=qn.start,Fn=qn.end,hi=qn.offset;Dn.current.start=ei,Dn.current.end=Fn,ve.useLayoutEffect(function(){var _r=Ir.getRecord();if(_r.size===1){var ur=Array.from(_r)[0],Kr=Hr[ei];if(Kr){var cr=Xi(Kr);if(cr===ur){var qr=Ir.get(ur),Yo=qr-Xe;En(function(nr){return nr+Yo})}}}Ir.resetRecord()},[Hn]);var Ii=ve.useState({width:0,height:He}),Ri=(0,be.Z)(Ii,2),Pn=Ri[0],Vi=Ri[1],Cr=function(ur){Vi({width:ur.offsetWidth,height:ur.offsetHeight})},mr=(0,ve.useRef)(),_n=(0,ve.useRef)(),Jn=ve.useMemo(function(){return Bt(Pn.width,en)},[Pn.width,en]),ui=ve.useMemo(function(){return Bt(Pn.height,Hn)},[Pn.height,Hn]),yi=Hn-He,di=(0,ve.useRef)(yi);di.current=yi;function Ei(_r){var ur=_r;return Number.isNaN(di.current)||(ur=Math.min(ur,di.current)),ur=Math.max(ur,0),ur}var Qi=$e<=0,Fi=$e>=yi,zi=Nt<=0,fr=Nt>=en,Bn=ke(Qi,Fi,zi,fr),Br=function(){return{x:Rr?-Nt:Nt,y:$e}},In=(0,ve.useRef)(Br()),pr=(0,ge.useEvent)(function(_r){if(yn){var ur=(0,Ie.Z)((0,Ie.Z)({},Br()),_r);(In.current.x!==ur.x||In.current.y!==ur.y)&&(yn(ur),In.current=ur)}});function yo(_r,ur){var Kr=_r;ur?((0,de.flushSync)(function(){kt(Kr)}),pr()):En(Kr)}function Or(_r){var ur=_r.currentTarget.scrollTop;ur!==$e&&En(ur),Mn==null||Mn(_r),pr()}var bo=function(ur){var Kr=ur,cr=en?en-Pn.width:0;return Kr=Math.max(Kr,0),Kr=Math.min(Kr,cr),Kr},co=(0,ge.useEvent)(function(_r,ur){ur?((0,de.flushSync)(function(){kt(function(Kr){var cr=Kr+(Rr?-_r:_r);return bo(cr)})}),pr()):En(function(Kr){var cr=Kr+_r;return cr})}),Ki=Ne(wr,Qi,Fi,zi,fr,!!en,co),Hi=(0,be.Z)(Ki,2),lr=Hi[0],Pr=Hi[1];St(wr,uo,function(_r,ur,Kr,cr){var qr=cr;return Bn(_r,ur,Kr)?!1:!qr||!qr._virtualHandled?(qr&&(qr._virtualHandled=!0),lr({preventDefault:function(){},deltaX:_r?ur:0,deltaY:_r?0:ur}),!0):!1}),ht(ot,uo,function(_r){En(function(ur){return ur+_r})}),(0,ce.Z)(function(){function _r(Kr){var cr=Qi&&Kr.detail<0,qr=Fi&&Kr.detail>0;wr&&!cr&&!qr&&Kr.preventDefault()}var ur=uo.current;return ur.addEventListener("wheel",lr,{passive:!1}),ur.addEventListener("DOMMouseScroll",Pr,{passive:!0}),ur.addEventListener("MozMousePixelScroll",_r,{passive:!1}),function(){ur.removeEventListener("wheel",lr),ur.removeEventListener("DOMMouseScroll",Pr),ur.removeEventListener("MozMousePixelScroll",_r)}},[wr,Qi,Fi]),(0,ce.Z)(function(){if(en){var _r=bo(Nt);kt(_r),pr({x:_r})}},[Pn.width,en]);var ci=function(){var ur,Kr;(ur=mr.current)===null||ur===void 0||ur.delayHidden(),(Kr=_n.current)===null||Kr===void 0||Kr.delayHidden()},Tt=dt(uo,Hr,Ir,Xe,Xi,function(){return no(!0)},En,ci);ve.useImperativeHandle(We,function(){return{nativeElement:io.current,getScrollInfo:Br,scrollTo:function(ur){function Kr(cr){return cr&&(0,me.Z)(cr)==="object"&&("left"in cr||"top"in cr)}Kr(ur)?(ur.left!==void 0&&kt(bo(ur.left)),Tt(ur.top)):Tt(ur)}}}),(0,ce.Z)(function(){if(kn){var _r=Hr.slice(ei,Fn+1);kn(_r,Hr)}},[ei,Fn,Hr]);var Ur=je(Hr,Xi,Ir,Xe),zr=An==null?void 0:An({start:ei,end:Fn,virtual:ot,offsetX:Nt,offsetY:hi,rtl:Rr,getSize:Ur}),ts=oe(Hr,ei,Fn,en,Nt,dr,Ze,an),ko=null;He&&(ko=(0,Ie.Z)((0,Te.Z)({},Ae?"height":"maxHeight",He),Kt),wr&&(ko.overflowY="hidden",en&&(ko.overflowX="hidden"),bn&&(ko.pointerEvents="none")));var ss={};return Rr&&(ss.dir="rtl"),ve.createElement("div",(0,Le.Z)({ref:io,style:(0,Ie.Z)((0,Ie.Z)({},Ue),{},{position:"relative"}),className:Nr},ss,Pi),ve.createElement(xe.Z,{onResize:Cr},ve.createElement(gn,{className:"".concat(qe,"-holder"),style:ko,ref:uo,onScroll:Or,onMouseEnter:ci},ve.createElement(z,{prefixCls:qe,height:Hn,offsetX:Nt,offsetY:hi,scrollWidth:en,onInnerResize:no,ref:po,innerProps:$n,rtl:Rr,extra:zr},ts))),ot&&Hn>He&&ve.createElement(_t,{ref:mr,prefixCls:qe,scrollOffset:$e,scrollRange:Hn,rtl:Rr,onScroll:yo,onStartMove:rn,onStopMove:At,spinSize:ui,containerSize:Pn.height,style:oi==null?void 0:oi.verticalScrollBar,thumbStyle:oi==null?void 0:oi.verticalScrollBarThumb,showScrollBar:Di}),ot&&en>Pn.width&&ve.createElement(_t,{ref:_n,prefixCls:qe,scrollOffset:Nt,scrollRange:en,rtl:Rr,onScroll:yo,onStartMove:rn,onStopMove:At,spinSize:Jn,containerSize:Pn.width,horizontal:!0,style:oi==null?void 0:oi.horizontalScrollBar,thumbStyle:oi==null?void 0:oi.horizontalScrollBarThumb,showScrollBar:Di}))}var Ut=ve.forwardRef(xn);Ut.displayName="List";var Wt=Ut,$t=Wt},7062:function(Cn,Yt,Ee){var Le=Ee(19637),me=Ee(97573),Ie=[Ee(96627)];Cn.exports=Le.createStore(me,Ie)},96627:function(Cn,Yt,Ee){Cn.exports=Le;function Le(){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(Cn){return Cn<10?"0"+Cn:Cn}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(Cn){return rx_escapable.lastIndex=0,rx_escapable.test(Cn)?'"'+Cn.replace(rx_escapable,function(Yt){var Ee=meta[Yt];return typeof Ee=="string"?Ee:"\\u"+("0000"+Yt.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+Cn+'"'}function str(Cn,Yt){var Ee,Le,me,Ie,Te=gap,be,Pe=Yt[Cn];switch(Pe&&typeof Pe=="object"&&typeof Pe.toJSON=="function"&&(Pe=Pe.toJSON(Cn)),typeof rep=="function"&&(Pe=rep.call(Yt,Cn,Pe)),typeof Pe){case"string":return quote(Pe);case"number":return isFinite(Pe)?String(Pe):"null";case"boolean":case"null":return String(Pe);case"object":if(!Pe)return"null";if(gap+=indent,be=[],Object.prototype.toString.apply(Pe)==="[object Array]"){for(Ie=Pe.length,Ee=0;Ee<Ie;Ee+=1)be[Ee]=str(Ee,Pe)||"null";return me=be.length===0?"[]":gap?`[
|
|
|
`+gap+be.join(`,
|
|
|
`+gap)+`
|
|
|
`+Te+"]":"["+be.join(",")+"]",gap=Te,me}if(rep&&typeof rep=="object")for(Ie=rep.length,Ee=0;Ee<Ie;Ee+=1)typeof rep[Ee]=="string"&&(Le=rep[Ee],me=str(Le,Pe),me&&be.push(quote(Le)+(gap?": ":":")+me));else for(Le in Pe)Object.prototype.hasOwnProperty.call(Pe,Le)&&(me=str(Le,Pe),me&&be.push(quote(Le)+(gap?": ":":")+me));return me=be.length===0?"{}":gap?`{
|
|
|
`+gap+be.join(`,
|
|
|
`+gap)+`
|
|
|
`+Te+"}":"{"+be.join(",")+"}",gap=Te,me}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(Cn,Yt,Ee){var Le;if(gap="",indent="",typeof Ee=="number")for(Le=0;Le<Ee;Le+=1)indent+=" ";else typeof Ee=="string"&&(indent=Ee);if(rep=Yt,Yt&&typeof Yt!="function"&&(typeof Yt!="object"||typeof Yt.length!="number"))throw new Error("JSON.stringify");return str("",{"":Cn})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(Cn,Yt){var Ee,Le,me=Cn[Yt];if(me&&typeof me=="object")for(Ee in me)Object.prototype.hasOwnProperty.call(me,Ee)&&(Le=walk(me,Ee),Le!==void 0?me[Ee]=Le:delete me[Ee]);return reviver.call(Cn,Yt,me)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(Cn){return"\\u"+("0000"+Cn.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(Cn,Yt,Ee){var Le=Ee(67039),me=Le.slice,Ie=Le.pluck,Te=Le.each,be=Le.bind,Pe=Le.create,he=Le.isList,Se=Le.isFunction,xe=Le.isObject;Cn.exports={createStore:ve};var ge={version:"2.0.12",enabled:!1,get:function(de,ue){var z=this.storage.read(this._namespacePrefix+de);return this._deserialize(z,ue)},set:function(de,ue){return ue===void 0?this.remove(de):(this.storage.write(this._namespacePrefix+de,this._serialize(ue)),ue)},remove:function(de){this.storage.remove(this._namespacePrefix+de)},each:function(de){var ue=this;this.storage.each(function(z,ee){de.call(ue,ue._deserialize(z),(ee||"").replace(ue._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 ce(){var de=typeof console=="undefined"?null:console;if(de){var ue=de.warn?de.warn:de.log;ue.apply(de,arguments)}}function ve(de,ue,z){z||(z=""),de&&!he(de)&&(de=[de]),ue&&!he(ue)&&(ue=[ue]);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 Ce=ye.read(we)===we;return ye.remove(we),Ce}catch(ke){return!1}},_assignPluginFnProp:function(ye,we){var Ce=this[we];this[we]=function(){var Ne=me(arguments,0),je=this;function Ve(){if(Ce)return Te(arguments,function(Ge,mt){Ne[mt]=Ge}),Ce.apply(je,Ne)}var Qe=[Ve].concat(Ne);return ye.apply(je,Qe)}},_serialize:function(ye){return JSON.stringify(ye)},_deserialize:function(ye,we){if(!ye)return we;var Ce="";try{Ce=JSON.parse(ye)}catch(ke){Ce=ye}return Ce!==void 0?Ce:we},_addStorage:function(ye){this.enabled||this._testStorage(ye)&&(this.storage=ye,this.enabled=!0)},_addPlugin:function(ye){var we=this;if(he(ye)){Te(ye,function(Ne){we._addPlugin(Ne)});return}var Ce=Ie(this.plugins,function(Ne){return ye===Ne});if(!Ce){if(this.plugins.push(ye),!Se(ye))throw new Error("Plugins must be function values that return objects");var ke=ye.call(this);if(!xe(ke))throw new Error("Plugins must return an object of function properties");Te(ke,function(Ne,je){if(!Se(Ne))throw new Error("Bad plugin property: "+je+" from plugin "+ye.name+". Plugins should only return functions.");we._assignPluginFnProp(Ne,je)})}},addStorage:function(ye){ce("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(ye)}},le=Pe(se,ge,{plugins:[]});return le.raw={},Te(le,function(ye,we){Se(ye)&&(le.raw[we]=be(le,ye))}),Te(de,function(ye){le._addStorage(ye)}),Te(ue,function(ye){le._addPlugin(ye)}),le}},67039:function(Cn,Yt,Ee){var Le=be(),me=Pe(),Ie=he(),Te=typeof window!="undefined"?window:Ee.g;Cn.exports={assign:Le,create:me,trim:Ie,bind:Se,slice:xe,each:ge,map:ce,pluck:ve,isList:de,isFunction:ue,isObject:z,Global:Te};function be(){return Object.assign?Object.assign:function(oe,ie,se,le){for(var ye=1;ye<arguments.length;ye++)ge(Object(arguments[ye]),function(we,Ce){oe[Ce]=we});return oe}}function Pe(){if(Object.create)return function(ie,se,le,ye){var we=xe(arguments,1);return Le.apply(this,[Object.create(ie)].concat(we))};{let oe=function(){};var ee=oe;return function(se,le,ye,we){var Ce=xe(arguments,1);return oe.prototype=se,Le.apply(this,[new oe].concat(Ce))}}}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 ce(ee,oe){var ie=de(ee)?[]:{};return ve(ee,function(se,le){return ie[le]=oe(se,le),!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 ue(ee){return ee&&{}.toString.call(ee)==="[object Function]"}function z(ee){return ee&&{}.toString.call(ee)==="[object Object]"}},97573:function(Cn,Yt,Ee){Cn.exports=[Ee(52496),Ee(16436),Ee(76673),Ee(35701),Ee(65578),Ee(65300)]},35701:function(Cn,Yt,Ee){var Le=Ee(67039),me=Le.Global,Ie=Le.trim;Cn.exports={name:"cookieStorage",read:be,write:he,each:Pe,remove:Se,clearAll:xe};var Te=me.document;function be(ce){if(!ce||!ge(ce))return null;var ve="(?:^|.*;\\s*)"+escape(ce).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(Te.cookie.replace(new RegExp(ve),"$1"))}function Pe(ce){for(var ve=Te.cookie.split(/; ?/g),de=ve.length-1;de>=0;de--)if(Ie(ve[de])){var ue=ve[de].split("="),z=unescape(ue[0]),ee=unescape(ue[1]);ce(ee,z)}}function he(ce,ve){ce&&(Te.cookie=escape(ce)+"="+escape(ve)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function Se(ce){!ce||!ge(ce)||(Te.cookie=escape(ce)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function xe(){Pe(function(ce,ve){Se(ve)})}function ge(ce){return new RegExp("(?:^|;\\s*)"+escape(ce).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(Te.cookie)}},52496:function(Cn,Yt,Ee){var Le=Ee(67039),me=Le.Global;Cn.exports={name:"localStorage",read:Te,write:be,each:Pe,remove:he,clearAll:Se};function Ie(){return me.localStorage}function Te(xe){return Ie().getItem(xe)}function be(xe,ge){return Ie().setItem(xe,ge)}function Pe(xe){for(var ge=Ie().length-1;ge>=0;ge--){var ce=Ie().key(ge);xe(Te(ce),ce)}}function he(xe){return Ie().removeItem(xe)}function Se(){return Ie().clear()}},65300:function(Cn){Cn.exports={name:"memoryStorage",read:Ee,write:Le,each:me,remove:Ie,clearAll:Te};var Yt={};function Ee(be){return Yt[be]}function Le(be,Pe){Yt[be]=Pe}function me(be){for(var Pe in Yt)Yt.hasOwnProperty(Pe)&&be(Yt[Pe],Pe)}function Ie(be){delete Yt[be]}function Te(be){Yt={}}},16436:function(Cn,Yt,Ee){var Le=Ee(67039),me=Le.Global;Cn.exports={name:"oldFF-globalStorage",read:Te,write:be,each:Pe,remove:he,clearAll:Se};var Ie=me.globalStorage;function Te(xe){return Ie[xe]}function be(xe,ge){Ie[xe]=ge}function Pe(xe){for(var ge=Ie.length-1;ge>=0;ge--){var ce=Ie.key(ge);xe(Ie[ce],ce)}}function he(xe){return Ie.removeItem(xe)}function Se(){Pe(function(xe,ge){delete Ie[xe]})}},76673:function(Cn,Yt,Ee){var Le=Ee(67039),me=Le.Global;Cn.exports={name:"oldIE-userDataStorage",write:he,read:Se,each:xe,remove:ge,clearAll:ce};var Ie="storejs",Te=me.document,be=ue(),Pe=(me.navigator?me.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function he(z,ee){if(!Pe){var oe=de(z);be(function(ie){ie.setAttribute(oe,ee),ie.save(Ie)})}}function Se(z){if(!Pe){var ee=de(z),oe=null;return be(function(ie){oe=ie.getAttribute(ee)}),oe}}function xe(z){be(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);be(function(oe){oe.removeAttribute(ee),oe.save(Ie)})}function ce(){be(function(z){var ee=z.XMLDocument.documentElement.attributes;z.load(Ie);for(var oe=ee.length-1;oe>=0;oe--)z.removeAttribute(ee[oe].name);z.save(Ie)})}var ve=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function de(z){return z.replace(/^\d/,"___$&").replace(ve,"___")}function ue(){if(!Te||!Te.documentElement||!Te.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=Te.createElement("div"),ee=Te.body}return function(se){var le=[].slice.call(arguments,0);le.unshift(ie),ee.appendChild(ie),ie.addBehavior("#default#userData"),ie.load(Ie),se.apply(this,le),ee.removeChild(ie)}}},65578:function(Cn,Yt,Ee){var Le=Ee(67039),me=Le.Global;Cn.exports={name:"sessionStorage",read:Te,write:be,each:Pe,remove:he,clearAll:Se};function Ie(){return me.sessionStorage}function Te(xe){return Ie().getItem(xe)}function be(xe,ge){return Ie().setItem(xe,ge)}function Pe(xe){for(var ge=Ie().length-1;ge>=0;ge--){var ce=Ie().key(ge);xe(Te(ce),ce)}}function he(xe){return Ie().removeItem(xe)}function Se(){return Ie().clear()}},82059:function(Cn){var Yt=arguments[3],Ee=arguments[4],Le=arguments[5],me=JSON.stringify;Cn.exports=function(Ie,Te){for(var be,Pe=Object.keys(Le),he=0,Se=Pe.length;he<Se;he++){var xe=Pe[he],ge=Le[xe].exports;if(ge===Ie||ge&&ge.default===Ie){be=xe;break}}if(!be){be=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var ce={},he=0,Se=Pe.length;he<Se;he++){var xe=Pe[he];ce[xe]=xe}Ee[be]=["function(require,module,exports){"+Ie+"(self); }",ce]}var ve=Math.floor(Math.pow(16,8)*Math.random()).toString(16),de={};de[be]=be,Ee[ve]=["function(require,module,exports){var f = require("+me(be)+");(f.default ? f.default : f)(self);}",de];var ue={};z(ve);function z(ye){ue[ye]=!0;for(var we in Ee[ye][1]){var Ce=Ee[ye][1][we];ue[Ce]||z(Ce)}}var ee="("+Yt+")({"+Object.keys(ue).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(Te&&Te.bare)return ie;var se=oe.createObjectURL(ie),le=new Worker(se);return le.objectURL=se,le}},34376:function(Cn){(function(Yt,Ee){if(1)Cn.exports=Ee();else var Le,me})(window,function(){return function(Yt){var Ee={};function Le(me){if(Ee[me])return Ee[me].exports;var Ie=Ee[me]={i:me,l:!1,exports:{}};return Yt[me].call(Ie.exports,Ie,Ie.exports,Le),Ie.l=!0,Ie.exports}return Le.m=Yt,Le.c=Ee,Le.d=function(me,Ie,Te){Le.o(me,Ie)||Object.defineProperty(me,Ie,{enumerable:!0,get:Te})},Le.r=function(me){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(me,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(me,"__esModule",{value:!0})},Le.t=function(me,Ie){if(1&Ie&&(me=Le(me)),8&Ie||4&Ie&&typeof me=="object"&&me&&me.__esModule)return me;var Te=Object.create(null);if(Le.r(Te),Object.defineProperty(Te,"default",{enumerable:!0,value:me}),2&Ie&&typeof me!="string")for(var be in me)Le.d(Te,be,function(Pe){return me[Pe]}.bind(null,be));return Te},Le.n=function(me){var Ie=me&&me.__esModule?function(){return me.default}:function(){return me};return Le.d(Ie,"a",Ie),Ie},Le.o=function(me,Ie){return Object.prototype.hasOwnProperty.call(me,Ie)},Le.p="",Le(Le.s=34)}([function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.forwardEvent=Ee.EventEmitter=void 0;var me=function(){function Ie(){this._listeners=[],this._disposed=!1}return Object.defineProperty(Ie.prototype,"event",{get:function(){var Te=this;return this._event||(this._event=function(be){return Te._listeners.push(be),{dispose:function(){if(!Te._disposed){for(var Pe=0;Pe<Te._listeners.length;Pe++)if(Te._listeners[Pe]===be)return void Te._listeners.splice(Pe,1)}}}}),this._event},enumerable:!1,configurable:!0}),Ie.prototype.fire=function(Te,be){for(var Pe=[],he=0;he<this._listeners.length;he++)Pe.push(this._listeners[he]);for(he=0;he<Pe.length;he++)Pe[he].call(void 0,Te,be)},Ie.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},Ie}();Ee.EventEmitter=me,Ee.forwardEvent=function(Ie,Te){return Ie(function(be){return Te.fire(be)})}},function(Yt,Ee,Le){"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=Le(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(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.getDisposeArrayDisposable=Ee.disposeArray=Ee.Disposable=void 0;var me=function(){function Te(){this._disposables=[],this._isDisposed=!1}return Te.prototype.dispose=function(){this._isDisposed=!0;for(var be=0,Pe=this._disposables;be<Pe.length;be++)Pe[be].dispose();this._disposables.length=0},Te.prototype.register=function(be){return this._disposables.push(be),be},Te.prototype.unregister=function(be){var Pe=this._disposables.indexOf(be);Pe!==-1&&this._disposables.splice(Pe,1)},Te}();function Ie(Te){for(var be=0,Pe=Te;be<Pe.length;be++)Pe[be].dispose();Te.length=0}Ee.Disposable=me,Ee.disposeArray=Ie,Ee.getDisposeArrayDisposable=function(Te){return{dispose:function(){return Ie(Te)}}}},function(Yt,Ee,Le){"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(Yt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(Se,xe){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ge,ce){ge.__proto__=ce}||function(ge,ce){for(var ve in ce)ce.hasOwnProperty(ve)&&(ge[ve]=ce[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 Te=Le(8),be=Le(3),Pe=Le(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 Pe.ExtendedAttrs,ge.combinedData="",ge}return Ie(xe,Se),xe.fromCharData=function(ge){var ce=new xe;return ce.setFromCharData(ge),ce},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?Te.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[be.CHAR_DATA_ATTR_INDEX],this.bg=0;var ce=!1;if(ge[be.CHAR_DATA_CHAR_INDEX].length>2)ce=!0;else if(ge[be.CHAR_DATA_CHAR_INDEX].length===2){var ve=ge[be.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=ve&&ve<=56319){var de=ge[be.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=de&&de<=57343?this.content=1024*(ve-55296)+de-56320+65536|ge[be.CHAR_DATA_WIDTH_INDEX]<<22:ce=!0}else ce=!0}else this.content=ge[be.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|ge[be.CHAR_DATA_WIDTH_INDEX]<<22;ce&&(this.combinedData=ge[be.CHAR_DATA_CHAR_INDEX],this.content=2097152|ge[be.CHAR_DATA_WIDTH_INDEX]<<22)},xe.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},xe}(Pe.AttributeData);Ee.CellData=he},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.ISoundService=Ee.ISelectionService=Ee.IRenderService=Ee.IMouseService=Ee.ICoreBrowserService=Ee.ICharSizeService=void 0;var me=Le(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(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.ExtendedAttrs=Ee.AttributeData=void 0;var me=function(){function Te(){this.fg=0,this.bg=0,this.extended=new Ie}return Te.toColorRGB=function(be){return[be>>>16&255,be>>>8&255,255&be]},Te.fromColorRGB=function(be){return(255&be[0])<<16|(255&be[1])<<8|255&be[2]},Te.prototype.clone=function(){var be=new Te;return be.fg=this.fg,be.bg=this.bg,be.extended=this.extended.clone(),be},Te.prototype.isInverse=function(){return 67108864&this.fg},Te.prototype.isBold=function(){return 134217728&this.fg},Te.prototype.isUnderline=function(){return 268435456&this.fg},Te.prototype.isBlink=function(){return 536870912&this.fg},Te.prototype.isInvisible=function(){return 1073741824&this.fg},Te.prototype.isItalic=function(){return 67108864&this.bg},Te.prototype.isDim=function(){return 134217728&this.bg},Te.prototype.getFgColorMode=function(){return 50331648&this.fg},Te.prototype.getBgColorMode=function(){return 50331648&this.bg},Te.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},Te.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},Te.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},Te.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},Te.prototype.isFgDefault=function(){return(50331648&this.fg)==0},Te.prototype.isBgDefault=function(){return(50331648&this.bg)==0},Te.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},Te.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},Te.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},Te.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},Te.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},Te.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()},Te.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},Te.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},Te.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},Te.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},Te.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},Te}();Ee.AttributeData=me;var Ie=function(){function Te(be,Pe){be===void 0&&(be=0),Pe===void 0&&(Pe=-1),this.underlineStyle=be,this.underlineColor=Pe}return Te.prototype.clone=function(){return new Te(this.underlineStyle,this.underlineColor)},Te.prototype.isEmpty=function(){return this.underlineStyle===0},Te}();Ee.ExtendedAttrs=Ie},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.addDisposableDomListener=void 0,Ee.addDisposableDomListener=function(me,Ie,Te,be){me.addEventListener(Ie,Te,be);var Pe=!1;return{dispose:function(){Pe||(Pe=!0,me.removeEventListener(Ie,Te,be))}}}},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Utf8ToUtf32=Ee.StringToUtf32=Ee.utf32ToString=Ee.stringFromCodePoint=void 0,Ee.stringFromCodePoint=function(Te){return Te>65535?(Te-=65536,String.fromCharCode(55296+(Te>>10))+String.fromCharCode(Te%1024+56320)):String.fromCharCode(Te)},Ee.utf32ToString=function(Te,be,Pe){be===void 0&&(be=0),Pe===void 0&&(Pe=Te.length);for(var he="",Se=be;Se<Pe;++Se){var xe=Te[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 Te(){this._interim=0}return Te.prototype.clear=function(){this._interim=0},Te.prototype.decode=function(be,Pe){var he=be.length;if(!he)return 0;var Se=0,xe=0;this._interim&&(56320<=(ve=be.charCodeAt(xe++))&&ve<=57343?Pe[Se++]=1024*(this._interim-55296)+ve-56320+65536:(Pe[Se++]=this._interim,Pe[Se++]=ve),this._interim=0);for(var ge=xe;ge<he;++ge){var ce=be.charCodeAt(ge);if(55296<=ce&&ce<=56319){if(++ge>=he)return this._interim=ce,Se;var ve;56320<=(ve=be.charCodeAt(ge))&&ve<=57343?Pe[Se++]=1024*(ce-55296)+ve-56320+65536:(Pe[Se++]=ce,Pe[Se++]=ve)}else Pe[Se++]=ce}return Se},Te}();Ee.StringToUtf32=me;var Ie=function(){function Te(){this.interim=new Uint8Array(3)}return Te.prototype.clear=function(){this.interim.fill(0)},Te.prototype.decode=function(be,Pe){var he=be.length;if(!he)return 0;var Se,xe,ge,ce,ve=0,de=0,ue=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,le=se-oe;ue<le;){if(ue>=he)return 0;if((192&(ie=be[ue++]))!=128){ue--,z=!0;break}this.interim[oe++]=ie,ee<<=6,ee|=63&ie}z||(se===2?ee<128?ue--:Pe[ve++]=ee:se===3?ee<2048||ee>=55296&&ee<=57343||(Pe[ve++]=ee):ee<65536||ee>1114111||(Pe[ve++]=ee)),this.interim.fill(0)}for(var ye=he-4,we=ue;we<he;){for(;!(!(we<ye)||128&(Se=be[we])||128&(xe=be[we+1])||128&(ge=be[we+2])||128&(ce=be[we+3]));)Pe[ve++]=Se,Pe[ve++]=xe,Pe[ve++]=ge,Pe[ve++]=ce,we+=4;if((Se=be[we++])<128)Pe[ve++]=Se;else if((224&Se)==192){if(we>=he)return this.interim[0]=Se,ve;if((192&(xe=be[we++]))!=128){we--;continue}if((de=(31&Se)<<6|63&xe)<128){we--;continue}Pe[ve++]=de}else if((240&Se)==224){if(we>=he)return this.interim[0]=Se,ve;if((192&(xe=be[we++]))!=128){we--;continue}if(we>=he)return this.interim[0]=Se,this.interim[1]=xe,ve;if((192&(ge=be[we++]))!=128){we--;continue}if((de=(15&Se)<<12|(63&xe)<<6|63&ge)<2048||de>=55296&&de<=57343)continue;Pe[ve++]=de}else if((248&Se)==240){if(we>=he)return this.interim[0]=Se,ve;if((192&(xe=be[we++]))!=128){we--;continue}if(we>=he)return this.interim[0]=Se,this.interim[1]=xe,ve;if((192&(ge=be[we++]))!=128){we--;continue}if(we>=he)return this.interim[0]=Se,this.interim[1]=xe,this.interim[2]=ge,ve;if((192&(ce=be[we++]))!=128){we--;continue}if((de=(7&Se)<<18|(63&xe)<<12|(63&ge)<<6|63&ce)<65536||de>1114111)continue;Pe[ve++]=de}}return ve},Te}();Ee.Utf8ToUtf32=Ie},function(Yt,Ee,Le){"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(Yt,Ee,Le){"use strict";var me,Ie,Te,be;function Pe(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,ce,ve){return ve!==void 0?"#"+Pe(xe)+Pe(ge)+Pe(ce)+Pe(ve):"#"+Pe(xe)+Pe(ge)+Pe(ce)},Se.toRgba=function(xe,ge,ce,ve){return ve===void 0&&(ve=255),(xe<<24|ge<<16|ce<<8|ve)>>>0}}(me=Ee.channels||(Ee.channels={})),(Ie=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 ce=xe.rgba>>24&255,ve=xe.rgba>>16&255,de=xe.rgba>>8&255,ue=Se.rgba>>24&255,z=Se.rgba>>16&255,ee=Se.rgba>>8&255,oe=ue+Math.round((ce-ue)*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)}},Ie.isOpaque=function(Se){return(255&Se.rgba)==255},Ie.ensureContrastRatio=function(Se,xe,ge){var ce=be.ensureContrastRatio(Se.rgba,xe.rgba,ge);if(ce)return be.toColor(ce>>24&255,ce>>16&255,ce>>8&255)},Ie.opaque=function(Se){var xe=(255|Se.rgba)>>>0,ge=be.toChannels(xe),ce=ge[0],ve=ge[1],de=ge[2];return{css:me.toCss(ce,ve,de),rgba:xe}},Ie.opacity=function(Se,xe){var ge=Math.round(255*xe),ce=be.toChannels(Se.rgba),ve=ce[0],de=ce[1],ue=ce[2];return{css:me.toCss(ve,de,ue,ge),rgba:me.toRgba(ve,de,ue,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,ce,ve){var de=ge/255,ue=ce/255,z=ve/255;return .2126*(de<=.03928?de/12.92:Math.pow((de+.055)/1.055,2.4))+.7152*(ue<=.03928?ue/12.92:Math.pow((ue+.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}(Te=Ee.rgb||(Ee.rgb={})),function(Se){function xe(ce,ve,de){for(var ue=ce>>24&255,z=ce>>16&255,ee=ce>>8&255,oe=ve>>24&255,ie=ve>>16&255,se=ve>>8&255,le=he(Te.relativeLuminance2(oe,se,ie),Te.relativeLuminance2(ue,z,ee));le<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)),le=he(Te.relativeLuminance2(oe,se,ie),Te.relativeLuminance2(ue,z,ee));return(oe<<24|ie<<16|se<<8|255)>>>0}function ge(ce,ve,de){for(var ue=ce>>24&255,z=ce>>16&255,ee=ce>>8&255,oe=ve>>24&255,ie=ve>>16&255,se=ve>>8&255,le=he(Te.relativeLuminance2(oe,se,ie),Te.relativeLuminance2(ue,z,ee));le<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))),le=he(Te.relativeLuminance2(oe,se,ie),Te.relativeLuminance2(ue,z,ee));return(oe<<24|ie<<16|se<<8|255)>>>0}Se.ensureContrastRatio=function(ce,ve,de){var ue=Te.relativeLuminance(ce>>8),z=Te.relativeLuminance(ve>>8);if(he(ue,z)<de)return z<ue?xe(ce,ve,de):ge(ce,ve,de)},Se.reduceLuminance=xe,Se.increaseLuminance=ge,Se.toChannels=function(ce){return[ce>>24&255,ce>>16&255,ce>>8&255,255&ce]},Se.toColor=function(ce,ve,de){return{css:me.toCss(ce,ve,de),rgba:me.toRgba(ce,ve,de)}}}(be=Ee.rgba||(Ee.rgba={})),Ee.toPaddedHex=Pe,Ee.contrastRatio=he},function(Yt,Ee,Le){"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",Ie=me?"node":navigator.userAgent,Te=me?"node":navigator.platform;function be(Pe,he){return Pe.indexOf(he)>=0}Ee.isFirefox=!!~Ie.indexOf("Firefox"),Ee.isSafari=/^((?!chrome|android).)*safari/i.test(Ie),Ee.isMac=be(["Macintosh","MacIntel","MacPPC","Mac68K"],Te),Ee.isIpad=Te==="iPad",Ee.isIphone=Te==="iPhone",Ee.isWindows=be(["Windows","Win16","Win32","WinCE"],Te),Ee.isLinux=Te.indexOf("Linux")>=0},function(Yt,Ee,Le){"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(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BaseRenderLayer=void 0;var me=Le(3),Ie=Le(9),Te=Le(25),be=Le(6),Pe=Le(28),he=Le(10),Se=Le(17),xe=function(){function ge(ce,ve,de,ue,z,ee,oe,ie){this._container=ce,this._alpha=ue,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 ce;Se.removeElementFromParent(this._canvas),(ce=this._charAtlas)===null||ce===void 0||ce.dispose()},ge.prototype._initCanvas=function(){this._ctx=Pe.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(ce,ve){},ge.prototype.onSelectionChanged=function(ce,ve,de){de===void 0&&(de=!1)},ge.prototype.setColors=function(ce){this._refreshCharAtlas(ce)},ge.prototype._setTransparency=function(ce){if(ce!==this._alpha){var ve=this._canvas;this._alpha=ce,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(ce){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=Te.acquireCharAtlas(this._optionsService.options,this._rendererId,ce,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},ge.prototype.resize=function(ce){this._scaledCellWidth=ce.scaledCellWidth,this._scaledCellHeight=ce.scaledCellHeight,this._scaledCharWidth=ce.scaledCharWidth,this._scaledCharHeight=ce.scaledCharHeight,this._scaledCharLeft=ce.scaledCharLeft,this._scaledCharTop=ce.scaledCharTop,this._canvas.width=ce.scaledCanvasWidth,this._canvas.height=ce.scaledCanvasHeight,this._canvas.style.width=ce.canvasWidth+"px",this._canvas.style.height=ce.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},ge.prototype._fillCells=function(ce,ve,de,ue){this._ctx.fillRect(ce*this._scaledCellWidth,ve*this._scaledCellHeight,de*this._scaledCellWidth,ue*this._scaledCellHeight)},ge.prototype._fillBottomLineAtCells=function(ce,ve,de){de===void 0&&(de=1),this._ctx.fillRect(ce*this._scaledCellWidth,(ve+1)*this._scaledCellHeight-window.devicePixelRatio-1,de*this._scaledCellWidth,window.devicePixelRatio)},ge.prototype._fillLeftLineAtCell=function(ce,ve,de){this._ctx.fillRect(ce*this._scaledCellWidth,ve*this._scaledCellHeight,window.devicePixelRatio*de,this._scaledCellHeight)},ge.prototype._strokeRectAtCell=function(ce,ve,de,ue){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(ce*this._scaledCellWidth+window.devicePixelRatio/2,ve*this._scaledCellHeight+window.devicePixelRatio/2,de*this._scaledCellWidth-window.devicePixelRatio,ue*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(ce,ve,de,ue){this._alpha?this._ctx.clearRect(ce*this._scaledCellWidth,ve*this._scaledCellHeight,de*this._scaledCellWidth,ue*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(ce*this._scaledCellWidth,ve*this._scaledCellHeight,de*this._scaledCellWidth,ue*this._scaledCellHeight))},ge.prototype._fillCharTrueColor=function(ce,ve,de){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(de),this._ctx.fillText(ce.getChars(),ve*this._scaledCellWidth+this._scaledCharLeft,de*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},ge.prototype._drawChars=function(ce,ve,de){var ue,z,ee=this._getContrastColor(ce);ee||ce.isFgRGB()||ce.isBgRGB()?this._drawUncachedChars(ce,ve,de,ee):(ce.isInverse()?(ue=ce.isBgDefault()?Ie.INVERTED_DEFAULT_COLOR:ce.getBgColor(),z=ce.isFgDefault()?Ie.INVERTED_DEFAULT_COLOR:ce.getFgColor()):(z=ce.isBgDefault()?me.DEFAULT_COLOR:ce.getBgColor(),ue=ce.isFgDefault()?me.DEFAULT_COLOR:ce.getFgColor()),ue+=this._optionsService.options.drawBoldTextInBrightColors&&ce.isBold()&&ue<8?8:0,this._currentGlyphIdentifier.chars=ce.getChars()||me.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=ce.getCode()||me.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=z,this._currentGlyphIdentifier.fg=ue,this._currentGlyphIdentifier.bold=!!ce.isBold(),this._currentGlyphIdentifier.dim=!!ce.isDim(),this._currentGlyphIdentifier.italic=!!ce.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,ve*this._scaledCellWidth+this._scaledCharLeft,de*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(ce,ve,de))},ge.prototype._drawUncachedChars=function(ce,ve,de,ue){if(this._ctx.save(),this._ctx.font=this._getFont(!!ce.isBold(),!!ce.isItalic()),this._ctx.textBaseline="middle",ce.isInverse())if(ue)this._ctx.fillStyle=ue.css;else if(ce.isBgDefault())this._ctx.fillStyle=he.color.opaque(this._colors.background).css;else if(ce.isBgRGB())this._ctx.fillStyle="rgb("+be.AttributeData.toColorRGB(ce.getBgColor()).join(",")+")";else{var z=ce.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&ce.isBold()&&z<8&&(z+=8),this._ctx.fillStyle=this._colors.ansi[z].css}else if(ue)this._ctx.fillStyle=ue.css;else if(ce.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(ce.isFgRGB())this._ctx.fillStyle="rgb("+be.AttributeData.toColorRGB(ce.getFgColor()).join(",")+")";else{var ee=ce.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&ce.isBold()&&ee<8&&(ee+=8),this._ctx.fillStyle=this._colors.ansi[ee].css}this._clipRow(de),ce.isDim()&&(this._ctx.globalAlpha=Ie.DIM_OPACITY),this._ctx.fillText(ce.getChars(),ve*this._scaledCellWidth+this._scaledCharLeft,de*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},ge.prototype._clipRow=function(ce){this._ctx.beginPath(),this._ctx.rect(0,ce*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},ge.prototype._getFont=function(ce,ve){return(ve?"italic":"")+" "+(ce?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},ge.prototype._getContrastColor=function(ce){if(this._optionsService.options.minimumContrastRatio!==1){var ve=this._colors.contrastCache.getColor(ce.bg,ce.fg);if(ve!==void 0)return ve||void 0;var de=ce.getFgColor(),ue=ce.getFgColorMode(),z=ce.getBgColor(),ee=ce.getBgColorMode(),oe=!!ce.isInverse(),ie=!!ce.isInverse();if(oe){var se=de;de=z,z=se;var le=ue;ue=ee,ee=le}var ye=this._resolveBackgroundRgba(ee,z,oe),we=this._resolveForegroundRgba(ue,de,oe,ie),Ce=he.rgba.ensureContrastRatio(ye,we,this._optionsService.options.minimumContrastRatio);if(Ce){var ke={css:he.channels.toCss(Ce>>24&255,Ce>>16&255,Ce>>8&255),rgba:Ce};return this._colors.contrastCache.setColor(ce.bg,ce.fg,ke),ke}this._colors.contrastCache.setColor(ce.bg,ce.fg,null)}},ge.prototype._resolveBackgroundRgba=function(ce,ve,de){switch(ce){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(ce,ve,de,ue){switch(ce){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&ue&&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(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.createDecorator=Ee.getServiceDependencies=Ee.serviceRegistry=void 0;function me(Ie,Te,be){Te.di$target===Te?Te.di$dependencies.push({id:Ie,index:be}):(Te.di$dependencies=[{id:Ie,index:be}],Te.di$target=Te)}Ee.serviceRegistry=new Map,Ee.getServiceDependencies=function(Ie){return Ie.di$dependencies||[]},Ee.createDecorator=function(Ie){if(Ee.serviceRegistry.has(Ie))return Ee.serviceRegistry.get(Ie);var Te=function(be,Pe,he){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");me(Te,be,he)};return Te.toString=function(){return Ie},Ee.serviceRegistry.set(Ie,Te),Te}},function(Yt,Ee,Le){"use strict";function me(Ie,Te,be,Pe){if(be===void 0&&(be=0),Pe===void 0&&(Pe=Ie.length),be>=Ie.length)return Ie;be=(Ie.length+be)%Ie.length,Pe=Pe>=Ie.length?Ie.length:(Ie.length+Pe)%Ie.length;for(var he=be;he<Pe;++he)Ie[he]=Te;return Ie}Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.concat=Ee.fillFallback=Ee.fill=void 0,Ee.fill=function(Ie,Te,be,Pe){return Ie.fill?Ie.fill(Te,be,Pe):me(Ie,Te,be,Pe)},Ee.fillFallback=me,Ee.concat=function(Ie,Te){var be=new Ie.constructor(Ie.length+Te.length);return be.set(Ie),be.set(Te,Ie.length),be}},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BufferLine=Ee.DEFAULT_ATTR_DATA=void 0;var me=Le(8),Ie=Le(3),Te=Le(4),be=Le(6);Ee.DEFAULT_ATTR_DATA=Object.freeze(new be.AttributeData);var Pe=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 ce=xe||Te.CellData.fromCharData([0,Ie.NULL_CELL_CHAR,Ie.NULL_CELL_WIDTH,Ie.NULL_CELL_CODE]),ve=0;ve<Se;++ve)this.setCell(ve,ce);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[Ie.CHAR_DATA_ATTR_INDEX],xe[Ie.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[Se]=xe[1],this._data[3*Se+0]=2097152|Se|xe[Ie.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*Se+0]=xe[Ie.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|xe[Ie.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,ce,ve,de){268435456&ve&&(this._extendedAttrs[Se]=de),this._data[3*Se+0]=xe|ge<<22,this._data[3*Se+1]=ce,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,ce){if((Se%=this.length)&&this.getWidth(Se-1)===2&&this.setCellFromCodePoint(Se-1,0,1,(ce==null?void 0:ce.fg)||0,(ce==null?void 0:ce.bg)||0,(ce==null?void 0:ce.extended)||new be.ExtendedAttrs),xe<this.length-Se){for(var ve=new Te.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,(ce==null?void 0:ce.fg)||0,(ce==null?void 0:ce.bg)||0,(ce==null?void 0:ce.extended)||new be.ExtendedAttrs)},he.prototype.deleteCells=function(Se,xe,ge,ce){if(Se%=this.length,xe<this.length-Se){for(var ve=new Te.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,(ce==null?void 0:ce.fg)||0,(ce==null?void 0:ce.bg)||0,(ce==null?void 0:ce.extended)||new be.ExtendedAttrs),this.getWidth(Se)!==0||this.hasContent(Se)||this.setCellFromCodePoint(Se,0,1,(ce==null?void 0:ce.fg)||0,(ce==null?void 0:ce.bg)||0,(ce==null?void 0:ce.extended)||new be.ExtendedAttrs)},he.prototype.replaceCells=function(Se,xe,ge,ce){for(Se&&this.getWidth(Se-1)===2&&this.setCellFromCodePoint(Se-1,0,1,(ce==null?void 0:ce.fg)||0,(ce==null?void 0:ce.bg)||0,(ce==null?void 0:ce.extended)||new be.ExtendedAttrs),xe<this.length&&this.getWidth(xe-1)===2&&this.setCellFromCodePoint(xe,0,1,(ce==null?void 0:ce.fg)||0,(ce==null?void 0:ce.bg)||0,(ce==null?void 0:ce.extended)||new be.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 ce=this.length;ce<Se;++ce)this.setCell(ce,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(ce=0;ce<ve.length;ce++){var de=parseInt(ve[ce],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,ce,ve){var de=Se._data;if(ve)for(var ue=ce-1;ue>=0;ue--)for(var z=0;z<3;z++)this._data[3*(ge+ue)+z]=de[3*(xe+ue)+z];else for(ue=0;ue<ce;ue++)for(z=0;z<3;z++)this._data[3*(ge+ue)+z]=de[3*(xe+ue)+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 ce="";xe<ge;){var ve=this._data[3*xe+0],de=2097151&ve;ce+=2097152&ve?this._combined[xe]:de?me.stringFromCodePoint(de):Ie.WHITESPACE_CELL_CHAR,xe+=ve>>22||1}return ce},he}();Ee.BufferLine=Pe},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.removeElementFromParent=void 0,Ee.removeElementFromParent=function(){for(var me,Ie=[],Te=0;Te<arguments.length;Te++)Ie[Te]=arguments[Te];for(var be=0,Pe=Ie;be<Pe.length;be++){var he=Pe[be];(me=he==null?void 0:he.parentElement)===null||me===void 0||me.removeChild(he)}}},function(Yt,Ee,Le){"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(Yt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(we,Ce){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ke,Ne){ke.__proto__=Ne}||function(ke,Ne){for(var je in Ne)Ne.hasOwnProperty(je)&&(ke[je]=Ne[je])})(we,Ce)},function(we,Ce){function ke(){this.constructor=we}me(we,Ce),we.prototype=Ce===null?Object.create(Ce):(ke.prototype=Ce.prototype,new ke)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.InputHandler=Ee.WindowsOptionsReportType=void 0;var Te,be=Le(12),Pe=Le(20),he=Le(39),Se=Le(2),xe=Le(15),ge=Le(8),ce=Le(16),ve=Le(0),de=Le(3),ue=Le(4),z=Le(6),ee=Le(22),oe=Le(24),ie={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function se(we,Ce){if(we>24)return Ce.setWinLines||!1;switch(we){case 1:return!!Ce.restoreWin;case 2:return!!Ce.minimizeWin;case 3:return!!Ce.setWinPosition;case 4:return!!Ce.setWinSizePixels;case 5:return!!Ce.raiseWin;case 6:return!!Ce.lowerWin;case 7:return!!Ce.refreshWin;case 8:return!!Ce.setWinSizeChars;case 9:return!!Ce.maximizeWin;case 10:return!!Ce.fullscreenWin;case 11:return!!Ce.getWinState;case 13:return!!Ce.getWinPosition;case 14:return!!Ce.getWinSizePixels;case 15:return!!Ce.getScreenSizePixels;case 16:return!!Ce.getCellSizePixels;case 18:return!!Ce.getWinSizeChars;case 19:return!!Ce.getScreenSizeChars;case 20:return!!Ce.getIconTitle;case 21:return!!Ce.getWinTitle;case 22:return!!Ce.pushTitle;case 23:return!!Ce.popTitle;case 24:return!!Ce.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"})(Te=Ee.WindowsOptionsReportType||(Ee.WindowsOptionsReportType={}));var le=function(){function we(Ce,ke,Ne,je){this._bufferService=Ce,this._coreService=ke,this._logService=Ne,this._optionsService=je,this._data=new Uint32Array(0)}return we.prototype.hook=function(Ce){this._data=new Uint32Array(0)},we.prototype.put=function(Ce,ke,Ne){this._data=xe.concat(this._data,Ce.subarray(ke,Ne))},we.prototype.unhook=function(Ce){if(Ce){var ke=ge.utf32ToString(this._data);switch(this._data=new Uint32Array(0),ke){case'"q':return this._coreService.triggerDataEvent(be.C0.ESC+'P1$r0"q'+be.C0.ESC+"\\");case'"p':return this._coreService.triggerDataEvent(be.C0.ESC+'P1$r61;1"p'+be.C0.ESC+"\\");case"r":var Ne=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(be.C0.ESC+"P1$r"+Ne+be.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(be.C0.ESC+"P1$r0m"+be.C0.ESC+"\\");case" q":var je={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];return je-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(be.C0.ESC+"P1$r"+je+" q"+be.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",ke),this._coreService.triggerDataEvent(be.C0.ESC+"P0$r"+be.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},we}(),ye=function(we){function Ce(ke,Ne,je,Ve,Qe,Ge,mt,ct,Ct){Ct===void 0&&(Ct=new he.EscapeSequenceParser);var it=we.call(this)||this;it._bufferService=ke,it._charsetService=Ne,it._coreService=je,it._dirtyRowService=Ve,it._logService=Qe,it._optionsService=Ge,it._coreMouseService=mt,it._unicodeService=ct,it._parser=Ct,it._parseBuffer=new Uint32Array(4096),it._stringDecoder=new ge.StringToUtf32,it._utf8Decoder=new ge.Utf8ToUtf32,it._workCell=new ue.CellData,it._windowTitle="",it._iconName="",it._windowTitleStack=[],it._iconNameStack=[],it._curAttrData=ce.DEFAULT_ATTR_DATA.clone(),it._eraseAttrDataInternal=ce.DEFAULT_ATTR_DATA.clone(),it._onRequestBell=new ve.EventEmitter,it._onRequestRefreshRows=new ve.EventEmitter,it._onRequestReset=new ve.EventEmitter,it._onRequestScroll=new ve.EventEmitter,it._onRequestSyncScrollBar=new ve.EventEmitter,it._onRequestWindowsOptionsReport=new ve.EventEmitter,it._onA11yChar=new ve.EventEmitter,it._onA11yTab=new ve.EventEmitter,it._onCursorMove=new ve.EventEmitter,it._onLineFeed=new ve.EventEmitter,it._onScroll=new ve.EventEmitter,it._onTitleChange=new ve.EventEmitter,it.register(it._parser),it._parser.setCsiHandlerFallback(function(ht,rt){it._logService.debug("Unknown CSI code: ",{identifier:it._parser.identToString(ht),params:rt.toArray()})}),it._parser.setEscHandlerFallback(function(ht){it._logService.debug("Unknown ESC code: ",{identifier:it._parser.identToString(ht)})}),it._parser.setExecuteHandlerFallback(function(ht){it._logService.debug("Unknown EXECUTE code: ",{code:ht})}),it._parser.setOscHandlerFallback(function(ht,rt,dt){it._logService.debug("Unknown OSC code: ",{identifier:ht,action:rt,data:dt})}),it._parser.setDcsHandlerFallback(function(ht,rt,dt){rt==="HOOK"&&(dt=dt.toArray()),it._logService.debug("Unknown DCS code: ",{identifier:it._parser.identToString(ht),action:rt,payload:dt})}),it._parser.setPrintHandler(function(ht,rt,dt){return it.print(ht,rt,dt)}),it._parser.setCsiHandler({final:"@"},function(ht){return it.insertChars(ht)}),it._parser.setCsiHandler({intermediates:" ",final:"@"},function(ht){return it.scrollLeft(ht)}),it._parser.setCsiHandler({final:"A"},function(ht){return it.cursorUp(ht)}),it._parser.setCsiHandler({intermediates:" ",final:"A"},function(ht){return it.scrollRight(ht)}),it._parser.setCsiHandler({final:"B"},function(ht){return it.cursorDown(ht)}),it._parser.setCsiHandler({final:"C"},function(ht){return it.cursorForward(ht)}),it._parser.setCsiHandler({final:"D"},function(ht){return it.cursorBackward(ht)}),it._parser.setCsiHandler({final:"E"},function(ht){return it.cursorNextLine(ht)}),it._parser.setCsiHandler({final:"F"},function(ht){return it.cursorPrecedingLine(ht)}),it._parser.setCsiHandler({final:"G"},function(ht){return it.cursorCharAbsolute(ht)}),it._parser.setCsiHandler({final:"H"},function(ht){return it.cursorPosition(ht)}),it._parser.setCsiHandler({final:"I"},function(ht){return it.cursorForwardTab(ht)}),it._parser.setCsiHandler({final:"J"},function(ht){return it.eraseInDisplay(ht)}),it._parser.setCsiHandler({prefix:"?",final:"J"},function(ht){return it.eraseInDisplay(ht)}),it._parser.setCsiHandler({final:"K"},function(ht){return it.eraseInLine(ht)}),it._parser.setCsiHandler({prefix:"?",final:"K"},function(ht){return it.eraseInLine(ht)}),it._parser.setCsiHandler({final:"L"},function(ht){return it.insertLines(ht)}),it._parser.setCsiHandler({final:"M"},function(ht){return it.deleteLines(ht)}),it._parser.setCsiHandler({final:"P"},function(ht){return it.deleteChars(ht)}),it._parser.setCsiHandler({final:"S"},function(ht){return it.scrollUp(ht)}),it._parser.setCsiHandler({final:"T"},function(ht){return it.scrollDown(ht)}),it._parser.setCsiHandler({final:"X"},function(ht){return it.eraseChars(ht)}),it._parser.setCsiHandler({final:"Z"},function(ht){return it.cursorBackwardTab(ht)}),it._parser.setCsiHandler({final:"`"},function(ht){return it.charPosAbsolute(ht)}),it._parser.setCsiHandler({final:"a"},function(ht){return it.hPositionRelative(ht)}),it._parser.setCsiHandler({final:"b"},function(ht){return it.repeatPrecedingCharacter(ht)}),it._parser.setCsiHandler({final:"c"},function(ht){return it.sendDeviceAttributesPrimary(ht)}),it._parser.setCsiHandler({prefix:">",final:"c"},function(ht){return it.sendDeviceAttributesSecondary(ht)}),it._parser.setCsiHandler({final:"d"},function(ht){return it.linePosAbsolute(ht)}),it._parser.setCsiHandler({final:"e"},function(ht){return it.vPositionRelative(ht)}),it._parser.setCsiHandler({final:"f"},function(ht){return it.hVPosition(ht)}),it._parser.setCsiHandler({final:"g"},function(ht){return it.tabClear(ht)}),it._parser.setCsiHandler({final:"h"},function(ht){return it.setMode(ht)}),it._parser.setCsiHandler({prefix:"?",final:"h"},function(ht){return it.setModePrivate(ht)}),it._parser.setCsiHandler({final:"l"},function(ht){return it.resetMode(ht)}),it._parser.setCsiHandler({prefix:"?",final:"l"},function(ht){return it.resetModePrivate(ht)}),it._parser.setCsiHandler({final:"m"},function(ht){return it.charAttributes(ht)}),it._parser.setCsiHandler({final:"n"},function(ht){return it.deviceStatus(ht)}),it._parser.setCsiHandler({prefix:"?",final:"n"},function(ht){return it.deviceStatusPrivate(ht)}),it._parser.setCsiHandler({intermediates:"!",final:"p"},function(ht){return it.softReset(ht)}),it._parser.setCsiHandler({intermediates:" ",final:"q"},function(ht){return it.setCursorStyle(ht)}),it._parser.setCsiHandler({final:"r"},function(ht){return it.setScrollRegion(ht)}),it._parser.setCsiHandler({final:"s"},function(ht){return it.saveCursor(ht)}),it._parser.setCsiHandler({final:"t"},function(ht){return it.windowOptions(ht)}),it._parser.setCsiHandler({final:"u"},function(ht){return it.restoreCursor(ht)}),it._parser.setCsiHandler({intermediates:"'",final:"}"},function(ht){return it.insertColumns(ht)}),it._parser.setCsiHandler({intermediates:"'",final:"~"},function(ht){return it.deleteColumns(ht)}),it._parser.setExecuteHandler(be.C0.BEL,function(){return it.bell()}),it._parser.setExecuteHandler(be.C0.LF,function(){return it.lineFeed()}),it._parser.setExecuteHandler(be.C0.VT,function(){return it.lineFeed()}),it._parser.setExecuteHandler(be.C0.FF,function(){return it.lineFeed()}),it._parser.setExecuteHandler(be.C0.CR,function(){return it.carriageReturn()}),it._parser.setExecuteHandler(be.C0.BS,function(){return it.backspace()}),it._parser.setExecuteHandler(be.C0.HT,function(){return it.tab()}),it._parser.setExecuteHandler(be.C0.SO,function(){return it.shiftOut()}),it._parser.setExecuteHandler(be.C0.SI,function(){return it.shiftIn()}),it._parser.setExecuteHandler(be.C1.IND,function(){return it.index()}),it._parser.setExecuteHandler(be.C1.NEL,function(){return it.nextLine()}),it._parser.setExecuteHandler(be.C1.HTS,function(){return it.tabSet()}),it._parser.setOscHandler(0,new ee.OscHandler(function(ht){it.setTitle(ht),it.setIconName(ht)})),it._parser.setOscHandler(1,new ee.OscHandler(function(ht){return it.setIconName(ht)})),it._parser.setOscHandler(2,new ee.OscHandler(function(ht){return it.setTitle(ht)})),it._parser.setEscHandler({final:"7"},function(){return it.saveCursor()}),it._parser.setEscHandler({final:"8"},function(){return it.restoreCursor()}),it._parser.setEscHandler({final:"D"},function(){return it.index()}),it._parser.setEscHandler({final:"E"},function(){return it.nextLine()}),it._parser.setEscHandler({final:"H"},function(){return it.tabSet()}),it._parser.setEscHandler({final:"M"},function(){return it.reverseIndex()}),it._parser.setEscHandler({final:"="},function(){return it.keypadApplicationMode()}),it._parser.setEscHandler({final:">"},function(){return it.keypadNumericMode()}),it._parser.setEscHandler({final:"c"},function(){return it.fullReset()}),it._parser.setEscHandler({final:"n"},function(){return it.setgLevel(2)}),it._parser.setEscHandler({final:"o"},function(){return it.setgLevel(3)}),it._parser.setEscHandler({final:"|"},function(){return it.setgLevel(3)}),it._parser.setEscHandler({final:"}"},function(){return it.setgLevel(2)}),it._parser.setEscHandler({final:"~"},function(){return it.setgLevel(1)}),it._parser.setEscHandler({intermediates:"%",final:"@"},function(){return it.selectDefaultCharset()}),it._parser.setEscHandler({intermediates:"%",final:"G"},function(){return it.selectDefaultCharset()});var St=function(ht){ut._parser.setEscHandler({intermediates:"(",final:ht},function(){return it.selectCharset("("+ht)}),ut._parser.setEscHandler({intermediates:")",final:ht},function(){return it.selectCharset(")"+ht)}),ut._parser.setEscHandler({intermediates:"*",final:ht},function(){return it.selectCharset("*"+ht)}),ut._parser.setEscHandler({intermediates:"+",final:ht},function(){return it.selectCharset("+"+ht)}),ut._parser.setEscHandler({intermediates:"-",final:ht},function(){return it.selectCharset("-"+ht)}),ut._parser.setEscHandler({intermediates:".",final:ht},function(){return it.selectCharset("."+ht)}),ut._parser.setEscHandler({intermediates:"/",final:ht},function(){return it.selectCharset("/"+ht)})},ut=this;for(var Ft in Pe.CHARSETS)St(Ft);return it._parser.setEscHandler({intermediates:"#",final:"8"},function(){return it.screenAlignmentPattern()}),it._parser.setErrorHandler(function(ht){return it._logService.error("Parsing error: ",ht),ht}),it._parser.setDcsHandler({intermediates:"$",final:"q"},new le(it._bufferService,it._coreService,it._logService,it._optionsService)),it}return Ie(Ce,we),Object.defineProperty(Ce.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Ce.prototype.dispose=function(){we.prototype.dispose.call(this)},Ce.prototype.parse=function(ke){var Ne=this._bufferService.buffer,je=Ne.x,Ve=Ne.y;if(this._logService.debug("parsing data",ke),this._parseBuffer.length<ke.length&&this._parseBuffer.length<131072&&(this._parseBuffer=new Uint32Array(Math.min(ke.length,131072))),this._dirtyRowService.clearRange(),ke.length>131072)for(var Qe=0;Qe<ke.length;Qe+=131072){var Ge=Qe+131072<ke.length?Qe+131072:ke.length,mt=typeof ke=="string"?this._stringDecoder.decode(ke.substring(Qe,Ge),this._parseBuffer):this._utf8Decoder.decode(ke.subarray(Qe,Ge),this._parseBuffer);this._parser.parse(this._parseBuffer,mt)}else mt=typeof ke=="string"?this._stringDecoder.decode(ke,this._parseBuffer):this._utf8Decoder.decode(ke,this._parseBuffer),this._parser.parse(this._parseBuffer,mt);(Ne=this._bufferService.buffer).x===je&&Ne.y===Ve||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},Ce.prototype.print=function(ke,Ne,je){var Ve,Qe,Ge=this._bufferService.buffer,mt=this._charsetService.charset,ct=this._optionsService.options.screenReaderMode,Ct=this._bufferService.cols,it=this._coreService.decPrivateModes.wraparound,St=this._coreService.modes.insertMode,ut=this._curAttrData,Ft=Ge.lines.get(Ge.ybase+Ge.y);this._dirtyRowService.markDirty(Ge.y),Ge.x&&je-Ne>0&&Ft.getWidth(Ge.x-1)===2&&Ft.setCellFromCodePoint(Ge.x-1,0,1,ut.fg,ut.bg,ut.extended);for(var ht=Ne;ht<je;++ht){if(Ve=ke[ht],Qe=this._unicodeService.wcwidth(Ve),Ve<127&&mt){var rt=mt[String.fromCharCode(Ve)];rt&&(Ve=rt.charCodeAt(0))}if(ct&&this._onA11yChar.fire(ge.stringFromCodePoint(Ve)),Qe||!Ge.x){if(Ge.x+Qe-1>=Ct){if(it){for(;Ge.x<Ct;)Ft.setCellFromCodePoint(Ge.x++,0,1,ut.fg,ut.bg,ut.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),Ft=Ge.lines.get(Ge.ybase+Ge.y)}else if(Ge.x=Ct-1,Qe===2)continue}if(St&&(Ft.insertCells(Ge.x,Qe,Ge.getNullCell(ut),ut),Ft.getWidth(Ct-1)===2&&Ft.setCellFromCodePoint(Ct-1,de.NULL_CELL_CODE,de.NULL_CELL_WIDTH,ut.fg,ut.bg,ut.extended)),Ft.setCellFromCodePoint(Ge.x++,Ve,Qe,ut.fg,ut.bg,ut.extended),Qe>0)for(;--Qe;)Ft.setCellFromCodePoint(Ge.x++,0,0,ut.fg,ut.bg,ut.extended)}else Ft.getWidth(Ge.x-1)?Ft.addCodepointToCell(Ge.x-1,Ve):Ft.addCodepointToCell(Ge.x-2,Ve)}je-Ne>0&&(Ft.loadCell(Ge.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),Ge.x<Ct&&je-Ne>0&&Ft.getWidth(Ge.x)===0&&!Ft.hasContent(Ge.x)&&Ft.setCellFromCodePoint(Ge.x,0,1,ut.fg,ut.bg,ut.extended),this._dirtyRowService.markDirty(Ge.y)},Ce.prototype.addCsiHandler=function(ke,Ne){var je=this;return ke.final!=="t"||ke.prefix||ke.intermediates?this._parser.addCsiHandler(ke,Ne):this._parser.addCsiHandler(ke,function(Ve){return!se(Ve.params[0],je._optionsService.options.windowOptions)||Ne(Ve)})},Ce.prototype.addDcsHandler=function(ke,Ne){return this._parser.addDcsHandler(ke,new oe.DcsHandler(Ne))},Ce.prototype.addEscHandler=function(ke,Ne){return this._parser.addEscHandler(ke,Ne)},Ce.prototype.addOscHandler=function(ke,Ne){return this._parser.addOscHandler(ke,new ee.OscHandler(Ne))},Ce.prototype.bell=function(){this._onRequestBell.fire()},Ce.prototype.lineFeed=function(){var ke=this._bufferService.buffer;this._dirtyRowService.markDirty(ke.y),this._optionsService.options.convertEol&&(ke.x=0),ke.y++,ke.y===ke.scrollBottom+1?(ke.y--,this._onRequestScroll.fire(this._eraseAttrData())):ke.y>=this._bufferService.rows&&(ke.y=this._bufferService.rows-1),ke.x>=this._bufferService.cols&&ke.x--,this._dirtyRowService.markDirty(ke.y),this._onLineFeed.fire()},Ce.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},Ce.prototype.backspace=function(){var ke,Ne=this._bufferService.buffer;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),void(Ne.x>0&&Ne.x--);if(this._restrictCursor(this._bufferService.cols),Ne.x>0)Ne.x--;else if(Ne.x===0&&Ne.y>Ne.scrollTop&&Ne.y<=Ne.scrollBottom&&(!((ke=Ne.lines.get(Ne.ybase+Ne.y))===null||ke===void 0)&&ke.isWrapped)){Ne.lines.get(Ne.ybase+Ne.y).isWrapped=!1,Ne.y--,Ne.x=this._bufferService.cols-1;var je=Ne.lines.get(Ne.ybase+Ne.y);je.hasWidth(Ne.x)&&!je.hasContent(Ne.x)&&Ne.x--}this._restrictCursor()},Ce.prototype.tab=function(){if(!(this._bufferService.buffer.x>=this._bufferService.cols)){var ke=this._bufferService.buffer.x;this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._bufferService.buffer.x-ke)}},Ce.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},Ce.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},Ce.prototype._restrictCursor=function(ke){ke===void 0&&(ke=this._bufferService.cols-1),this._bufferService.buffer.x=Math.min(ke,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)},Ce.prototype._setCursor=function(ke,Ne){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=ke,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+Ne):(this._bufferService.buffer.x=ke,this._bufferService.buffer.y=Ne),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},Ce.prototype._moveCursor=function(ke,Ne){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+ke,this._bufferService.buffer.y+Ne)},Ce.prototype.cursorUp=function(ke){var Ne=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;Ne>=0?this._moveCursor(0,-Math.min(Ne,ke.params[0]||1)):this._moveCursor(0,-(ke.params[0]||1))},Ce.prototype.cursorDown=function(ke){var Ne=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;Ne>=0?this._moveCursor(0,Math.min(Ne,ke.params[0]||1)):this._moveCursor(0,ke.params[0]||1)},Ce.prototype.cursorForward=function(ke){this._moveCursor(ke.params[0]||1,0)},Ce.prototype.cursorBackward=function(ke){this._moveCursor(-(ke.params[0]||1),0)},Ce.prototype.cursorNextLine=function(ke){this.cursorDown(ke),this._bufferService.buffer.x=0},Ce.prototype.cursorPrecedingLine=function(ke){this.cursorUp(ke),this._bufferService.buffer.x=0},Ce.prototype.cursorCharAbsolute=function(ke){this._setCursor((ke.params[0]||1)-1,this._bufferService.buffer.y)},Ce.prototype.cursorPosition=function(ke){this._setCursor(ke.length>=2?(ke.params[1]||1)-1:0,(ke.params[0]||1)-1)},Ce.prototype.charPosAbsolute=function(ke){this._setCursor((ke.params[0]||1)-1,this._bufferService.buffer.y)},Ce.prototype.hPositionRelative=function(ke){this._moveCursor(ke.params[0]||1,0)},Ce.prototype.linePosAbsolute=function(ke){this._setCursor(this._bufferService.buffer.x,(ke.params[0]||1)-1)},Ce.prototype.vPositionRelative=function(ke){this._moveCursor(0,ke.params[0]||1)},Ce.prototype.hVPosition=function(ke){this.cursorPosition(ke)},Ce.prototype.tabClear=function(ke){var Ne=ke.params[0];Ne===0?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:Ne===3&&(this._bufferService.buffer.tabs={})},Ce.prototype.cursorForwardTab=function(ke){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var Ne=ke.params[0]||1;Ne--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},Ce.prototype.cursorBackwardTab=function(ke){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var Ne=ke.params[0]||1,je=this._bufferService.buffer;Ne--;)je.x=je.prevStop()},Ce.prototype._eraseInBufferLine=function(ke,Ne,je,Ve){Ve===void 0&&(Ve=!1);var Qe=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+ke);Qe.replaceCells(Ne,je,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Ve&&(Qe.isWrapped=!1)},Ce.prototype._resetBufferLine=function(ke){var Ne=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+ke);Ne.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),Ne.isWrapped=!1},Ce.prototype.eraseInDisplay=function(ke){var Ne;switch(this._restrictCursor(),ke.params[0]){case 0:for(Ne=this._bufferService.buffer.y,this._dirtyRowService.markDirty(Ne),this._eraseInBufferLine(Ne++,this._bufferService.buffer.x,this._bufferService.cols,this._bufferService.buffer.x===0);Ne<this._bufferService.rows;Ne++)this._resetBufferLine(Ne);this._dirtyRowService.markDirty(Ne);break;case 1:for(Ne=this._bufferService.buffer.y,this._dirtyRowService.markDirty(Ne),this._eraseInBufferLine(Ne,0,this._bufferService.buffer.x+1,!0),this._bufferService.buffer.x+1>=this._bufferService.cols&&(this._bufferService.buffer.lines.get(Ne+1).isWrapped=!1);Ne--;)this._resetBufferLine(Ne);this._dirtyRowService.markDirty(0);break;case 2:for(Ne=this._bufferService.rows,this._dirtyRowService.markDirty(Ne-1);Ne--;)this._resetBufferLine(Ne);this._dirtyRowService.markDirty(0);break;case 3:var je=this._bufferService.buffer.lines.length-this._bufferService.rows;je>0&&(this._bufferService.buffer.lines.trimStart(je),this._bufferService.buffer.ybase=Math.max(this._bufferService.buffer.ybase-je,0),this._bufferService.buffer.ydisp=Math.max(this._bufferService.buffer.ydisp-je,0),this._onScroll.fire(0))}},Ce.prototype.eraseInLine=function(ke){switch(this._restrictCursor(),ke.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)},Ce.prototype.insertLines=function(ke){this._restrictCursor();var Ne=ke.params[0]||1,je=this._bufferService.buffer;if(!(je.y>je.scrollBottom||je.y<je.scrollTop)){for(var Ve=je.ybase+je.y,Qe=this._bufferService.rows-1-je.scrollBottom,Ge=this._bufferService.rows-1+je.ybase-Qe+1;Ne--;)je.lines.splice(Ge-1,1),je.lines.splice(Ve,0,je.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(je.y,je.scrollBottom),je.x=0}},Ce.prototype.deleteLines=function(ke){this._restrictCursor();var Ne=ke.params[0]||1,je=this._bufferService.buffer;if(!(je.y>je.scrollBottom||je.y<je.scrollTop)){var Ve,Qe=je.ybase+je.y;for(Ve=this._bufferService.rows-1-je.scrollBottom,Ve=this._bufferService.rows-1+je.ybase-Ve;Ne--;)je.lines.splice(Qe,1),je.lines.splice(Ve,0,je.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(je.y,je.scrollBottom),je.x=0}},Ce.prototype.insertChars=function(ke){this._restrictCursor();var Ne=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);Ne&&(Ne.insertCells(this._bufferService.buffer.x,ke.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},Ce.prototype.deleteChars=function(ke){this._restrictCursor();var Ne=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);Ne&&(Ne.deleteCells(this._bufferService.buffer.x,ke.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},Ce.prototype.scrollUp=function(ke){for(var Ne=ke.params[0]||1,je=this._bufferService.buffer;Ne--;)je.lines.splice(je.ybase+je.scrollTop,1),je.lines.splice(je.ybase+je.scrollBottom,0,je.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(je.scrollTop,je.scrollBottom)},Ce.prototype.scrollDown=function(ke){for(var Ne=ke.params[0]||1,je=this._bufferService.buffer;Ne--;)je.lines.splice(je.ybase+je.scrollBottom,1),je.lines.splice(je.ybase+je.scrollTop,0,je.getBlankLine(ce.DEFAULT_ATTR_DATA));this._dirtyRowService.markRangeDirty(je.scrollTop,je.scrollBottom)},Ce.prototype.scrollLeft=function(ke){var Ne=this._bufferService.buffer;if(!(Ne.y>Ne.scrollBottom||Ne.y<Ne.scrollTop)){for(var je=ke.params[0]||1,Ve=Ne.scrollTop;Ve<=Ne.scrollBottom;++Ve){var Qe=Ne.lines.get(Ne.ybase+Ve);Qe.deleteCells(0,je,Ne.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Qe.isWrapped=!1}this._dirtyRowService.markRangeDirty(Ne.scrollTop,Ne.scrollBottom)}},Ce.prototype.scrollRight=function(ke){var Ne=this._bufferService.buffer;if(!(Ne.y>Ne.scrollBottom||Ne.y<Ne.scrollTop)){for(var je=ke.params[0]||1,Ve=Ne.scrollTop;Ve<=Ne.scrollBottom;++Ve){var Qe=Ne.lines.get(Ne.ybase+Ve);Qe.insertCells(0,je,Ne.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Qe.isWrapped=!1}this._dirtyRowService.markRangeDirty(Ne.scrollTop,Ne.scrollBottom)}},Ce.prototype.insertColumns=function(ke){var Ne=this._bufferService.buffer;if(!(Ne.y>Ne.scrollBottom||Ne.y<Ne.scrollTop)){for(var je=ke.params[0]||1,Ve=Ne.scrollTop;Ve<=Ne.scrollBottom;++Ve){var Qe=this._bufferService.buffer.lines.get(Ne.ybase+Ve);Qe.insertCells(Ne.x,je,Ne.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Qe.isWrapped=!1}this._dirtyRowService.markRangeDirty(Ne.scrollTop,Ne.scrollBottom)}},Ce.prototype.deleteColumns=function(ke){var Ne=this._bufferService.buffer;if(!(Ne.y>Ne.scrollBottom||Ne.y<Ne.scrollTop)){for(var je=ke.params[0]||1,Ve=Ne.scrollTop;Ve<=Ne.scrollBottom;++Ve){var Qe=Ne.lines.get(Ne.ybase+Ve);Qe.deleteCells(Ne.x,je,Ne.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Qe.isWrapped=!1}this._dirtyRowService.markRangeDirty(Ne.scrollTop,Ne.scrollBottom)}},Ce.prototype.eraseChars=function(ke){this._restrictCursor();var Ne=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);Ne&&(Ne.replaceCells(this._bufferService.buffer.x,this._bufferService.buffer.x+(ke.params[0]||1),this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},Ce.prototype.repeatPrecedingCharacter=function(ke){if(this._parser.precedingCodepoint){for(var Ne=ke.params[0]||1,je=new Uint32Array(Ne),Ve=0;Ve<Ne;++Ve)je[Ve]=this._parser.precedingCodepoint;this.print(je,0,je.length)}},Ce.prototype.sendDeviceAttributesPrimary=function(ke){ke.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(be.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(be.C0.ESC+"[?6c"))},Ce.prototype.sendDeviceAttributesSecondary=function(ke){ke.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(be.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(be.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(ke.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(be.C0.ESC+"[>83;40003;0c"))},Ce.prototype._is=function(ke){return(this._optionsService.options.termName+"").indexOf(ke)===0},Ce.prototype.setMode=function(ke){for(var Ne=0;Ne<ke.length;Ne++)switch(ke.params[Ne]){case 4:this._coreService.modes.insertMode=!0}},Ce.prototype.setModePrivate=function(ke){for(var Ne=0;Ne<ke.length;Ne++)switch(ke.params[Ne]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,Pe.DEFAULT_CHARSET),this._charsetService.setgCharset(1,Pe.DEFAULT_CHARSET),this._charsetService.setgCharset(2,Pe.DEFAULT_CHARSET),this._charsetService.setgCharset(3,Pe.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}},Ce.prototype.resetMode=function(ke){for(var Ne=0;Ne<ke.length;Ne++)switch(ke.params[Ne]){case 4:this._coreService.modes.insertMode=!1}},Ce.prototype.resetModePrivate=function(ke){for(var Ne=0;Ne<ke.length;Ne++)switch(ke.params[Ne]){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(),ke.params[Ne]===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}},Ce.prototype._updateAttrColor=function(ke,Ne,je,Ve,Qe){return Ne===2?(ke|=50331648,ke&=-16777216,ke|=z.AttributeData.fromColorRGB([je,Ve,Qe])):Ne===5&&(ke&=-50331904,ke|=33554432|255&je),ke},Ce.prototype._extractColor=function(ke,Ne,je){var Ve=[0,0,-1,0,0,0],Qe=0,Ge=0;do{if(Ve[Ge+Qe]=ke.params[Ne+Ge],ke.hasSubParams(Ne+Ge)){var mt=ke.getSubParams(Ne+Ge),ct=0;do Ve[1]===5&&(Qe=1),Ve[Ge+ct+1+Qe]=mt[ct];while(++ct<mt.length&&ct+Ge+1+Qe<Ve.length);break}if(Ve[1]===5&&Ge+Qe>=2||Ve[1]===2&&Ge+Qe>=5)break;Ve[1]&&(Qe=1)}while(++Ge+Ne<ke.length&&Ge+Qe<Ve.length);for(ct=2;ct<Ve.length;++ct)Ve[ct]===-1&&(Ve[ct]=0);switch(Ve[0]){case 38:je.fg=this._updateAttrColor(je.fg,Ve[1],Ve[3],Ve[4],Ve[5]);break;case 48:je.bg=this._updateAttrColor(je.bg,Ve[1],Ve[3],Ve[4],Ve[5]);break;case 58:je.extended=je.extended.clone(),je.extended.underlineColor=this._updateAttrColor(je.extended.underlineColor,Ve[1],Ve[3],Ve[4],Ve[5])}return Ge},Ce.prototype._processUnderline=function(ke,Ne){Ne.extended=Ne.extended.clone(),(!~ke||ke>5)&&(ke=1),Ne.extended.underlineStyle=ke,Ne.fg|=268435456,ke===0&&(Ne.fg&=-268435457),Ne.updateExtended()},Ce.prototype.charAttributes=function(ke){if(ke.length===1&&ke.params[0]===0)return this._curAttrData.fg=ce.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=ce.DEFAULT_ATTR_DATA.bg);for(var Ne,je=ke.length,Ve=this._curAttrData,Qe=0;Qe<je;Qe++)(Ne=ke.params[Qe])>=30&&Ne<=37?(Ve.fg&=-50331904,Ve.fg|=16777216|Ne-30):Ne>=40&&Ne<=47?(Ve.bg&=-50331904,Ve.bg|=16777216|Ne-40):Ne>=90&&Ne<=97?(Ve.fg&=-50331904,Ve.fg|=16777224|Ne-90):Ne>=100&&Ne<=107?(Ve.bg&=-50331904,Ve.bg|=16777224|Ne-100):Ne===0?(Ve.fg=ce.DEFAULT_ATTR_DATA.fg,Ve.bg=ce.DEFAULT_ATTR_DATA.bg):Ne===1?Ve.fg|=134217728:Ne===3?Ve.bg|=67108864:Ne===4?(Ve.fg|=268435456,this._processUnderline(ke.hasSubParams(Qe)?ke.getSubParams(Qe)[0]:1,Ve)):Ne===5?Ve.fg|=536870912:Ne===7?Ve.fg|=67108864:Ne===8?Ve.fg|=1073741824:Ne===2?Ve.bg|=134217728:Ne===21?this._processUnderline(2,Ve):Ne===22?(Ve.fg&=-134217729,Ve.bg&=-134217729):Ne===23?Ve.bg&=-67108865:Ne===24?Ve.fg&=-268435457:Ne===25?Ve.fg&=-536870913:Ne===27?Ve.fg&=-67108865:Ne===28?Ve.fg&=-1073741825:Ne===39?(Ve.fg&=-67108864,Ve.fg|=16777215&ce.DEFAULT_ATTR_DATA.fg):Ne===49?(Ve.bg&=-67108864,Ve.bg|=16777215&ce.DEFAULT_ATTR_DATA.bg):Ne===38||Ne===48||Ne===58?Qe+=this._extractColor(ke,Qe,Ve):Ne===59?(Ve.extended=Ve.extended.clone(),Ve.extended.underlineColor=-1,Ve.updateExtended()):Ne===100?(Ve.fg&=-67108864,Ve.fg|=16777215&ce.DEFAULT_ATTR_DATA.fg,Ve.bg&=-67108864,Ve.bg|=16777215&ce.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",Ne)},Ce.prototype.deviceStatus=function(ke){switch(ke.params[0]){case 5:this._coreService.triggerDataEvent(be.C0.ESC+"[0n");break;case 6:var Ne=this._bufferService.buffer.y+1,je=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(be.C0.ESC+"["+Ne+";"+je+"R")}},Ce.prototype.deviceStatusPrivate=function(ke){switch(ke.params[0]){case 6:var Ne=this._bufferService.buffer.y+1,je=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(be.C0.ESC+"[?"+Ne+";"+je+"R")}},Ce.prototype.softReset=function(ke){this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._bufferService.buffer.scrollTop=0,this._bufferService.buffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=ce.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},Ce.prototype.setCursorStyle=function(ke){var Ne=ke.params[0]||1;switch(Ne){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 je=Ne%2==1;this._optionsService.options.cursorBlink=je},Ce.prototype.setScrollRegion=function(ke){var Ne,je=ke.params[0]||1;(ke.length<2||(Ne=ke.params[1])>this._bufferService.rows||Ne===0)&&(Ne=this._bufferService.rows),Ne>je&&(this._bufferService.buffer.scrollTop=je-1,this._bufferService.buffer.scrollBottom=Ne-1,this._setCursor(0,0))},Ce.prototype.windowOptions=function(ke){if(se(ke.params[0],this._optionsService.options.windowOptions)){var Ne=ke.length>1?ke.params[1]:0;switch(ke.params[0]){case 14:Ne!==2&&this._onRequestWindowsOptionsReport.fire(Te.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(Te.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(be.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:Ne!==0&&Ne!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),Ne!==0&&Ne!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:Ne!==0&&Ne!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),Ne!==0&&Ne!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}}},Ce.prototype.saveCursor=function(ke){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},Ce.prototype.restoreCursor=function(ke){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()},Ce.prototype.setTitle=function(ke){this._windowTitle=ke,this._onTitleChange.fire(ke)},Ce.prototype.setIconName=function(ke){this._iconName=ke},Ce.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},Ce.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},Ce.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},Ce.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,Pe.DEFAULT_CHARSET)},Ce.prototype.selectCharset=function(ke){ke.length===2?ke[0]!=="/"&&this._charsetService.setgCharset(ie[ke[0]],Pe.CHARSETS[ke[1]]||Pe.DEFAULT_CHARSET):this.selectDefaultCharset()},Ce.prototype.index=function(){this._restrictCursor();var ke=this._bufferService.buffer;this._bufferService.buffer.y++,ke.y===ke.scrollBottom+1?(ke.y--,this._onRequestScroll.fire(this._eraseAttrData())):ke.y>=this._bufferService.rows&&(ke.y=this._bufferService.rows-1),this._restrictCursor()},Ce.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},Ce.prototype.reverseIndex=function(){this._restrictCursor();var ke=this._bufferService.buffer;if(ke.y===ke.scrollTop){var Ne=ke.scrollBottom-ke.scrollTop;ke.lines.shiftElements(ke.ybase+ke.y,Ne,1),ke.lines.set(ke.ybase+ke.y,ke.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(ke.scrollTop,ke.scrollBottom)}else ke.y--,this._restrictCursor()},Ce.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},Ce.prototype.reset=function(){this._curAttrData=ce.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=ce.DEFAULT_ATTR_DATA.clone()},Ce.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},Ce.prototype.setgLevel=function(ke){this._charsetService.setgLevel(ke)},Ce.prototype.screenAlignmentPattern=function(){var ke=new ue.CellData;ke.content=1<<22|69,ke.fg=this._curAttrData.fg,ke.bg=this._curAttrData.bg;var Ne=this._bufferService.buffer;this._setCursor(0,0);for(var je=0;je<this._bufferService.rows;++je){var Ve=Ne.ybase+Ne.y+je,Qe=Ne.lines.get(Ve);Qe&&(Qe.fill(ke),Qe.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},Ce}(Se.Disposable);Ee.InputHandler=ye},function(Yt,Ee,Le){"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(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Params=void 0;var me=function(){function Ie(Te,be){if(Te===void 0&&(Te=32),be===void 0&&(be=32),this.maxLength=Te,this.maxSubParamsLength=be,be>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(Te),this.length=0,this._subParams=new Int32Array(be),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(Te),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return Ie.fromArray=function(Te){var be=new Ie;if(!Te.length)return be;for(var Pe=Te[0]instanceof Array?1:0;Pe<Te.length;++Pe){var he=Te[Pe];if(he instanceof Array)for(var Se=0;Se<he.length;++Se)be.addSubParam(he[Se]);else be.addParam(he)}return be},Ie.prototype.clone=function(){var Te=new Ie(this.maxLength,this.maxSubParamsLength);return Te.params.set(this.params),Te.length=this.length,Te._subParams.set(this._subParams),Te._subParamsLength=this._subParamsLength,Te._subParamsIdx.set(this._subParamsIdx),Te._rejectDigits=this._rejectDigits,Te._rejectSubDigits=this._rejectSubDigits,Te._digitIsSub=this._digitIsSub,Te},Ie.prototype.toArray=function(){for(var Te=[],be=0;be<this.length;++be){Te.push(this.params[be]);var Pe=this._subParamsIdx[be]>>8,he=255&this._subParamsIdx[be];he-Pe>0&&Te.push(Array.prototype.slice.call(this._subParams,Pe,he))}return Te},Ie.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},Ie.prototype.addParam=function(Te){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(Te<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=Te>2147483647?2147483647:Te}},Ie.prototype.addSubParam=function(Te){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(Te<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=Te>2147483647?2147483647:Te,this._subParamsIdx[this.length-1]++}},Ie.prototype.hasSubParams=function(Te){return(255&this._subParamsIdx[Te])-(this._subParamsIdx[Te]>>8)>0},Ie.prototype.getSubParams=function(Te){var be=this._subParamsIdx[Te]>>8,Pe=255&this._subParamsIdx[Te];return Pe-be>0?this._subParams.subarray(be,Pe):null},Ie.prototype.getSubParamsAll=function(){for(var Te={},be=0;be<this.length;++be){var Pe=this._subParamsIdx[be]>>8,he=255&this._subParamsIdx[be];he-Pe>0&&(Te[be]=this._subParams.slice(Pe,he))}return Te},Ie.prototype.addDigit=function(Te){var be;if(!(this._rejectDigits||!(be=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var Pe=this._digitIsSub?this._subParams:this.params,he=Pe[be-1];Pe[be-1]=~he?Math.min(10*he+Te,2147483647):Te}},Ie}();Ee.Params=me},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.OscHandler=Ee.OscParser=void 0;var me=Le(23),Ie=Le(8),Te=function(){function Pe(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return Pe.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)}}},Pe.prototype.setHandler=function(he,Se){this._handlers[he]=[Se]},Pe.prototype.clearHandler=function(he){this._handlers[he]&&delete this._handlers[he]},Pe.prototype.setHandlerFallback=function(he){this._handlerFb=he},Pe.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},Pe.prototype.reset=function(){this._state===2&&this.end(!1),this._id=-1,this._state=0},Pe.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")},Pe.prototype._put=function(he,Se,xe){var ge=this._handlers[this._id];if(ge)for(var ce=ge.length-1;ce>=0;ce--)ge[ce].put(he,Se,xe);else this._handlerFb(this._id,"PUT",Ie.utf32ToString(he,Se,xe))},Pe.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)},Pe.prototype.start=function(){this.reset(),this._id=-1,this._state=1},Pe.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)}},Pe.prototype.end=function(he){this._state!==0&&(this._state!==3&&(this._state===1&&this._start(),this._end(he)),this._id=-1,this._state=0)},Pe}();Ee.OscParser=Te;var be=function(){function Pe(he){this._handler=he,this._data="",this._hitLimit=!1}return Pe.prototype.start=function(){this._data="",this._hitLimit=!1},Pe.prototype.put=function(he,Se,xe){this._hitLimit||(this._data+=Ie.utf32ToString(he,Se,xe),this._data.length>me.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},Pe.prototype.end=function(he){var Se;return this._hitLimit?Se=!1:he&&(Se=this._handler(this._data)),this._data="",this._hitLimit=!1,Se},Pe}();Ee.OscHandler=be},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.PAYLOAD_LIMIT=void 0,Ee.PAYLOAD_LIMIT=1e7},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.DcsHandler=Ee.DcsParser=void 0;var me=Le(8),Ie=Le(21),Te=Le(23),be=[],Pe=function(){function Se(){this._handlers=Object.create(null),this._active=be,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 ce=this._handlers[xe];return ce.push(ge),{dispose:function(){var ve=ce.indexOf(ge);ve!==-1&&ce.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=be,this._ident=0},Se.prototype.hook=function(xe,ge){if(this.reset(),this._ident=xe,this._active=this._handlers[xe]||be,this._active.length)for(var ce=this._active.length-1;ce>=0;ce--)this._active[ce].hook(ge);else this._handlerFb(this._ident,"HOOK",ge)},Se.prototype.put=function(xe,ge,ce){if(this._active.length)for(var ve=this._active.length-1;ve>=0;ve--)this._active[ve].put(xe,ge,ce);else this._handlerFb(this._ident,"PUT",me.utf32ToString(xe,ge,ce))},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=be,this._ident=0},Se}();Ee.DcsParser=Pe;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,ce){this._hitLimit||(this._data+=me.utf32ToString(xe,ge,ce),this._data.length>Te.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 Ie.Params)),this._params=void 0,this._data="",this._hitLimit=!1,ge},Se}();Ee.DcsHandler=he},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.removeTerminalFromCache=Ee.acquireCharAtlas=void 0;var me=Le(26),Ie=Le(43),Te=[];Ee.acquireCharAtlas=function(be,Pe,he,Se,xe){for(var ge=me.generateConfig(Se,xe,be,he),ce=0;ce<Te.length;ce++){var ve=(de=Te[ce]).ownedBy.indexOf(Pe);if(ve>=0){if(me.configEquals(de.config,ge))return de.atlas;de.ownedBy.length===1?(de.atlas.dispose(),Te.splice(ce,1)):de.ownedBy.splice(ve,1);break}}for(ce=0;ce<Te.length;ce++){var de=Te[ce];if(me.configEquals(de.config,ge))return de.ownedBy.push(Pe),de.atlas}var ue={atlas:new Ie.DynamicCharAtlas(document,ge),config:ge,ownedBy:[Pe]};return Te.push(ue),ue.atlas},Ee.removeTerminalFromCache=function(be){for(var Pe=0;Pe<Te.length;Pe++){var he=Te[Pe].ownedBy.indexOf(be);if(he!==-1){Te[Pe].ownedBy.length===1?(Te[Pe].atlas.dispose(),Te.splice(Pe,1)):Te[Pe].ownedBy.splice(he,1);break}}}},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.is256Color=Ee.configEquals=Ee.generateConfig=void 0;var me=Le(3);Ee.generateConfig=function(Ie,Te,be,Pe){var he={foreground:Pe.foreground,background:Pe.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:Pe.ansi.slice(0,16)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:Ie,scaledCharHeight:Te,fontFamily:be.fontFamily,fontSize:be.fontSize,fontWeight:be.fontWeight,fontWeightBold:be.fontWeightBold,allowTransparency:be.allowTransparency,colors:he}},Ee.configEquals=function(Ie,Te){for(var be=0;be<Ie.colors.ansi.length;be++)if(Ie.colors.ansi[be].rgba!==Te.colors.ansi[be].rgba)return!1;return Ie.devicePixelRatio===Te.devicePixelRatio&&Ie.fontFamily===Te.fontFamily&&Ie.fontSize===Te.fontSize&&Ie.fontWeight===Te.fontWeight&&Ie.fontWeightBold===Te.fontWeightBold&&Ie.allowTransparency===Te.allowTransparency&&Ie.scaledCharWidth===Te.scaledCharWidth&&Ie.scaledCharHeight===Te.scaledCharHeight&&Ie.colors.foreground===Te.colors.foreground&&Ie.colors.background===Te.colors.background},Ee.is256Color=function(Ie){return Ie<me.DEFAULT_COLOR}},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.ColorManager=Ee.DEFAULT_ANSI_COLORS=void 0;var me=Le(10),Ie=Le(45),Te=me.css.toColor("#ffffff"),be=me.css.toColor("#000000"),Pe=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")],ce=[0,95,135,175,215,255],ve=0;ve<216;ve++){var de=ce[ve/36%6|0],ue=ce[ve/6%6|0],z=ce[ve%6];ge.push({css:me.channels.toCss(de,ue,z),rgba:me.channels.toRgba(de,ue,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(ce,ve){this.allowTransparency=ve;var de=ce.createElement("canvas");de.width=1,de.height=1;var ue=de.getContext("2d");if(!ue)throw new Error("Could not get rendering context");this._ctx=ue,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new Ie.ColorContrastCache,this.colors={foreground:Te,background:be,cursor:Pe,cursorAccent:he,selectionTransparent:Se,selectionOpaque:me.color.blend(be,Se),ansi:Ee.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return ge.prototype.onOptionsChange=function(ce){ce==="minimumContrastRatio"&&this._contrastCache.clear()},ge.prototype.setTheme=function(ce){ce===void 0&&(ce={}),this.colors.foreground=this._parseColor(ce.foreground,Te),this.colors.background=this._parseColor(ce.background,be),this.colors.cursor=this._parseColor(ce.cursor,Pe,!0),this.colors.cursorAccent=this._parseColor(ce.cursorAccent,he,!0),this.colors.selectionTransparent=this._parseColor(ce.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(ce.black,Ee.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(ce.red,Ee.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(ce.green,Ee.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(ce.yellow,Ee.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(ce.blue,Ee.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(ce.magenta,Ee.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(ce.cyan,Ee.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(ce.white,Ee.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(ce.brightBlack,Ee.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(ce.brightRed,Ee.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(ce.brightGreen,Ee.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(ce.brightYellow,Ee.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(ce.brightBlue,Ee.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(ce.brightMagenta,Ee.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(ce.brightCyan,Ee.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(ce.brightWhite,Ee.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},ge.prototype._parseColor=function(ce,ve,de){if(de===void 0&&(de=this.allowTransparency),ce===void 0)return ve;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=ce,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+ce+" is invalid using fallback "+ve.css),ve;this._ctx.fillRect(0,0,1,1);var ue=this._ctx.getImageData(0,0,1,1).data;if(ue[3]!==255){if(!de)return console.warn("Color: "+ce+" 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],le=Math.round(255*se);return{rgba:me.channels.toRgba(ee,oe,ie,le),css:ce}}return{css:this._ctx.fillStyle,rgba:me.channels.toRgba(ue[0],ue[1],ue[2],ue[3])}},ge}();Ee.ColorManager=xe},function(Yt,Ee,Le){"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(Yt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(xe,ge){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ce,ve){ce.__proto__=ve}||function(ce,ve){for(var de in ve)ve.hasOwnProperty(de)&&(ce[de]=ve[de])})(xe,ge)},function(xe,ge){function ce(){this.constructor=xe}me(xe,ge),xe.prototype=ge===null?Object.create(ge):(ce.prototype=ge.prototype,new ce)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CharacterJoinerRegistry=Ee.JoinedCellData=void 0;var Te=Le(6),be=Le(3),Pe=Le(4),he=function(xe){function ge(ce,ve,de){var ue=xe.call(this)||this;return ue.content=0,ue.combinedData="",ue.fg=ce.fg,ue.bg=ce.bg,ue.combinedData=ve,ue._width=de,ue}return Ie(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(ce){throw new Error("not implemented")},ge.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},ge}(Te.AttributeData);Ee.JoinedCellData=he;var Se=function(){function xe(ge){this._bufferService=ge,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new Pe.CellData}return xe.prototype.registerCharacterJoiner=function(ge){var ce={id:this._nextCharacterJoinerId++,handler:ge};return this._characterJoiners.push(ce),ce.id},xe.prototype.deregisterCharacterJoiner=function(ge){for(var ce=0;ce<this._characterJoiners.length;ce++)if(this._characterJoiners[ce].id===ge)return this._characterJoiners.splice(ce,1),!0;return!1},xe.prototype.getJoinedCharacters=function(ge){if(this._characterJoiners.length===0)return[];var ce=this._bufferService.buffer.lines.get(ge);if(!ce||ce.length===0)return[];for(var ve=[],de=ce.translateToString(!0),ue=0,z=0,ee=0,oe=ce.getFg(0),ie=ce.getBg(0),se=0;se<ce.getTrimmedLength();se++)if(ce.loadCell(se,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==oe||this._workCell.bg!==ie){if(se-ue>1)for(var le=this._getJoinedRanges(de,ee,z,ce,ue),ye=0;ye<le.length;ye++)ve.push(le[ye]);ue=se,ee=z,oe=this._workCell.fg,ie=this._workCell.bg}z+=this._workCell.getChars().length||be.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-ue>1)for(le=this._getJoinedRanges(de,ee,z,ce,ue),ye=0;ye<le.length;ye++)ve.push(le[ye]);return ve},xe.prototype._getJoinedRanges=function(ge,ce,ve,de,ue){for(var z=ge.substring(ce,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,ue),ee},xe.prototype._stringRangesToCellRanges=function(ge,ce,ve){var de=0,ue=!1,z=0,ee=ge[de];if(ee){for(var oe=ve;oe<this._bufferService.cols;oe++){var ie=ce.getWidth(oe),se=ce.getString(oe).length||be.WHITESPACE_CELL_CHAR.length;if(ie!==0){if(!ue&&ee[0]<=z&&(ee[0]=oe,ue=!0),ee[1]<=z){if(ee[1]=oe,!(ee=ge[++de]))break;ee[0]<=z?(ee[0]=oe,ue=!0):ue=!1}z+=se}}ee&&(ee[1]=this._bufferService.cols)}},xe._mergeRanges=function(ge,ce){for(var ve=!1,de=0;de<ge.length;de++){var ue=ge[de];if(ve){if(ce[1]<=ue[0])return ge[de-1][1]=ce[1],ge;if(ce[1]<=ue[1])return ge[de-1][1]=Math.max(ce[1],ue[1]),ge.splice(de,1),ge;ge.splice(de,1),de--}else{if(ce[1]<=ue[0])return ge.splice(de,0,ce),ge;if(ce[1]<=ue[1])return ue[0]=Math.min(ce[0],ue[0]),ge;ce[0]<ue[1]&&(ue[0]=Math.min(ce[0],ue[0]),ve=!0)}}return ve?ge[ge.length-1][1]=ce[1]:ge.push(ce),ge},xe}();Ee.CharacterJoinerRegistry=Se},function(Yt,Ee,Le){"use strict";function me(Ie,Te){var be=Te.getBoundingClientRect();return[Ie.clientX-be.left,Ie.clientY-be.top]}Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.getRawByteCoords=Ee.getCoords=Ee.getCoordsRelativeToElement=void 0,Ee.getCoordsRelativeToElement=me,Ee.getCoords=function(Ie,Te,be,Pe,he,Se,xe,ge){if(he){var ce=me(Ie,Te);if(ce)return ce[0]=Math.ceil((ce[0]+(ge?Se/2:0))/Se),ce[1]=Math.ceil(ce[1]/xe),ce[0]=Math.min(Math.max(ce[0],1),be+(ge?1:0)),ce[1]=Math.min(Math.max(ce[1],1),Pe),ce}},Ee.getRawByteCoords=function(Ie){if(Ie)return{x:Ie[0]+32,y:Ie[1]+32}}},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.RenderDebouncer=void 0;var me=function(){function Ie(Te){this._renderCallback=Te}return Ie.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},Ie.prototype.refresh=function(Te,be,Pe){var he=this;this._rowCount=Pe,Te=Te!==void 0?Te:0,be=be!==void 0?be:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,Te):Te,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,be):be,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return he._innerRefresh()}))},Ie.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var Te=Math.max(this._rowStart,0),be=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(Te,be)}},Ie}();Ee.RenderDebouncer=me},function(Yt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(be,Pe){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])})(be,Pe)},function(be,Pe){function he(){this.constructor=be}me(be,Pe),be.prototype=Pe===null?Object.create(Pe):(he.prototype=Pe.prototype,new he)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.ScreenDprMonitor=void 0;var Te=function(be){function Pe(){var he=be!==null&&be.apply(this,arguments)||this;return he._currentDevicePixelRatio=window.devicePixelRatio,he}return Ie(Pe,be),Pe.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()},Pe.prototype.dispose=function(){be.prototype.dispose.call(this),this.clearListener()},Pe.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))},Pe.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)},Pe}(Le(2).Disposable);Ee.ScreenDprMonitor=Te},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.clone=void 0,Ee.clone=function me(Ie,Te){if(Te===void 0&&(Te=5),typeof Ie!="object")return Ie;var be=Array.isArray(Ie)?[]:{};for(var Pe in Ie)be[Pe]=Te<=1?Ie[Pe]:Ie[Pe]?me(Ie[Pe],Te-1):Ie[Pe];return be}},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Terminal=void 0;var me=Le(4),Ie=Le(35),Te=Le(18),be=Le(0),Pe=Le(83),he=function(){function de(ue){this._core=new Ie.Terminal(ue),this._addonManager=new Pe.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 ce(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(ue,z){this._verifyIntegers(ue,z),this._core.resize(ue,z)},de.prototype.open=function(ue){this._core.open(ue)},de.prototype.attachCustomKeyEventHandler=function(ue){this._core.attachCustomKeyEventHandler(ue)},de.prototype.registerLinkMatcher=function(ue,z,ee){return this._checkProposedApi(),this._core.registerLinkMatcher(ue,z,ee)},de.prototype.deregisterLinkMatcher=function(ue){this._checkProposedApi(),this._core.deregisterLinkMatcher(ue)},de.prototype.registerLinkProvider=function(ue){return this._checkProposedApi(),this._core.registerLinkProvider(ue)},de.prototype.registerCharacterJoiner=function(ue){return this._checkProposedApi(),this._core.registerCharacterJoiner(ue)},de.prototype.deregisterCharacterJoiner=function(ue){this._checkProposedApi(),this._core.deregisterCharacterJoiner(ue)},de.prototype.registerMarker=function(ue){return this._checkProposedApi(),this._verifyIntegers(ue),this._core.addMarker(ue)},de.prototype.addMarker=function(ue){return this.registerMarker(ue)},de.prototype.hasSelection=function(){return this._core.hasSelection()},de.prototype.select=function(ue,z,ee){this._verifyIntegers(ue,z,ee),this._core.select(ue,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(ue,z){this._verifyIntegers(ue,z),this._core.selectLines(ue,z)},de.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},de.prototype.scrollLines=function(ue){this._verifyIntegers(ue),this._core.scrollLines(ue)},de.prototype.scrollPages=function(ue){this._verifyIntegers(ue),this._core.scrollPages(ue)},de.prototype.scrollToTop=function(){this._core.scrollToTop()},de.prototype.scrollToBottom=function(){this._core.scrollToBottom()},de.prototype.scrollToLine=function(ue){this._verifyIntegers(ue),this._core.scrollToLine(ue)},de.prototype.clear=function(){this._core.clear()},de.prototype.write=function(ue,z){this._core.write(ue,z)},de.prototype.writeUtf8=function(ue,z){this._core.write(ue,z)},de.prototype.writeln=function(ue,z){this._core.write(ue),this._core.write(`\r
|
|
|
`,z)},de.prototype.paste=function(ue){this._core.paste(ue)},de.prototype.getOption=function(ue){return this._core.optionsService.getOption(ue)},de.prototype.setOption=function(ue,z){this._core.optionsService.setOption(ue,z)},de.prototype.refresh=function(ue,z){this._verifyIntegers(ue,z),this._core.refresh(ue,z)},de.prototype.reset=function(){this._core.reset()},de.prototype.loadAddon=function(ue){return this._addonManager.loadAddon(this,ue)},Object.defineProperty(de,"strings",{get:function(){return Te},enumerable:!1,configurable:!0}),de.prototype._verifyIntegers=function(){for(var ue=[],z=0;z<arguments.length;z++)ue[z]=arguments[z];for(var ee=0,oe=ue;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(ue,z){this._buffer=ue,this.type=z}return de.prototype.init=function(ue){return this._buffer=ue,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(ue){var z=this._buffer.lines.get(ue);if(z)return new ge(z)},de.prototype.getNullCell=function(){return new me.CellData},de}(),xe=function(){function de(ue){var z=this;this._buffers=ue,this._onBufferChange=new be.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(ue){this._line=ue}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(ue,z){if(!(ue<0||ue>=this._line.length))return z?(this._line.loadCell(ue,z),z):this._line.loadCell(ue,new me.CellData)},de.prototype.translateToString=function(ue,z,ee){return this._line.translateToString(ue,z,ee)},de}(),ce=function(){function de(ue){this._core=ue}return de.prototype.registerCsiHandler=function(ue,z){return this._core.addCsiHandler(ue,function(ee){return z(ee.toArray())})},de.prototype.addCsiHandler=function(ue,z){return this.registerCsiHandler(ue,z)},de.prototype.registerDcsHandler=function(ue,z){return this._core.addDcsHandler(ue,function(ee,oe){return z(ee,oe.toArray())})},de.prototype.addDcsHandler=function(ue,z){return this.registerDcsHandler(ue,z)},de.prototype.registerEscHandler=function(ue,z){return this._core.addEscHandler(ue,z)},de.prototype.addEscHandler=function(ue,z){return this.registerEscHandler(ue,z)},de.prototype.registerOscHandler=function(ue,z){return this._core.addOscHandler(ue,z)},de.prototype.addOscHandler=function(ue,z){return this.registerOscHandler(ue,z)},de}(),ve=function(){function de(ue){this._core=ue}return de.prototype.register=function(ue){this._core.unicodeService.register(ue)},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(ue){this._core.unicodeService.activeVersion=ue},enumerable:!1,configurable:!0}),de}()},function(Yt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(Ct,it){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(St,ut){St.__proto__=ut}||function(St,ut){for(var Ft in ut)ut.hasOwnProperty(Ft)&&(St[Ft]=ut[Ft])})(Ct,it)},function(Ct,it){function St(){this.constructor=Ct}me(Ct,it),Ct.prototype=it===null?Object.create(it):(St.prototype=it.prototype,new St)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Terminal=void 0;var Te=Le(36),be=Le(37),Pe=Le(38),he=Le(12),Se=Le(19),xe=Le(40),ge=Le(50),ce=Le(51),ve=Le(11),de=Le(7),ue=Le(18),z=Le(54),ee=Le(55),oe=Le(56),ie=Le(57),se=Le(59),le=Le(0),ye=Le(16),we=Le(27),Ce=Le(60),ke=Le(5),Ne=Le(61),je=Le(62),Ve=Le(63),Qe=Le(64),Ge=Le(65),mt=typeof window!="undefined"?window.document:null,ct=function(Ct){function it(St){St===void 0&&(St={});var ut=Ct.call(this,St)||this;return ut.browser=ve,ut._keyDownHandled=!1,ut._onCursorMove=new le.EventEmitter,ut._onKey=new le.EventEmitter,ut._onRender=new le.EventEmitter,ut._onSelectionChange=new le.EventEmitter,ut._onTitleChange=new le.EventEmitter,ut._onFocus=new le.EventEmitter,ut._onBlur=new le.EventEmitter,ut._onA11yCharEmitter=new le.EventEmitter,ut._onA11yTabEmitter=new le.EventEmitter,ut._setup(),ut.linkifier=ut._instantiationService.createInstance(ge.Linkifier),ut.linkifier2=ut.register(ut._instantiationService.createInstance(Ve.Linkifier2)),ut.register(ut._inputHandler.onRequestBell(function(){return ut.bell()})),ut.register(ut._inputHandler.onRequestRefreshRows(function(Ft,ht){return ut.refresh(Ft,ht)})),ut.register(ut._inputHandler.onRequestReset(function(){return ut.reset()})),ut.register(ut._inputHandler.onRequestScroll(function(Ft,ht){return ut.scroll(Ft,ht||void 0)})),ut.register(ut._inputHandler.onRequestWindowsOptionsReport(function(Ft){return ut._reportWindowsOptions(Ft)})),ut.register(le.forwardEvent(ut._inputHandler.onCursorMove,ut._onCursorMove)),ut.register(le.forwardEvent(ut._inputHandler.onTitleChange,ut._onTitleChange)),ut.register(le.forwardEvent(ut._inputHandler.onA11yChar,ut._onA11yCharEmitter)),ut.register(le.forwardEvent(ut._inputHandler.onA11yTab,ut._onA11yTabEmitter)),ut.register(ut._bufferService.onResize(function(Ft){return ut._afterResize(Ft.cols,Ft.rows)})),ut}return Ie(it,Ct),Object.defineProperty(it.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),it.prototype.dispose=function(){var St,ut,Ft;this._isDisposed||(Ct.prototype.dispose.call(this),(St=this._renderService)===null||St===void 0||St.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(Ft=(ut=this.element)===null||ut===void 0?void 0:ut.parentNode)===null||Ft===void 0||Ft.removeChild(this.element))},it.prototype._setup=function(){Ct.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(it.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),it.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},it.prototype._updateOptions=function(St){var ut,Ft,ht,rt;switch(Ct.prototype._updateOptions.call(this,St),St){case"fontFamily":case"fontSize":(ut=this._renderService)===null||ut===void 0||ut.clear(),(Ft=this._charSizeService)===null||Ft===void 0||Ft.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":(ht=this.viewport)===null||ht===void 0||ht.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new oe.AccessibilityManager(this,this._renderService)):((rt=this._accessibilityManager)===null||rt===void 0||rt.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},it.prototype._onTextAreaFocus=function(St){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(he.C0.ESC+"[I"),this.updateCursorStyle(St),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},it.prototype.blur=function(){var St;return(St=this.textarea)===null||St===void 0?void 0:St.blur()},it.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()},it.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var St=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),ut=this._bufferService.buffer.y*St,Ft=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=Ft+"px",this.textarea.style.top=ut+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=St+"px",this.textarea.style.lineHeight=St+"px",this.textarea.style.zIndex="-5"}},it.prototype._initGlobal=function(){var St=this;this._bindKeys(),this.register(de.addDisposableDomListener(this.element,"copy",function(Ft){St.hasSelection()&&Pe.copyHandler(Ft,St._selectionService)}));var ut=function(Ft){return Pe.handlePasteEvent(Ft,St.textarea,St._coreService)};this.register(de.addDisposableDomListener(this.textarea,"paste",ut)),this.register(de.addDisposableDomListener(this.element,"paste",ut)),ve.isFirefox?this.register(de.addDisposableDomListener(this.element,"mousedown",function(Ft){Ft.button===2&&Pe.rightClickHandler(Ft,St.textarea,St.screenElement,St._selectionService,St.options.rightClickSelectsWord)})):this.register(de.addDisposableDomListener(this.element,"contextmenu",function(Ft){Pe.rightClickHandler(Ft,St.textarea,St.screenElement,St._selectionService,St.options.rightClickSelectsWord)})),ve.isLinux&&this.register(de.addDisposableDomListener(this.element,"auxclick",function(Ft){Ft.button===1&&Pe.moveTextAreaUnderMouseCursor(Ft,St.textarea,St.screenElement)}))},it.prototype._bindKeys=function(){var St=this;this.register(de.addDisposableDomListener(this.textarea,"keyup",function(ut){return St._keyUp(ut)},!0)),this.register(de.addDisposableDomListener(this.textarea,"keydown",function(ut){return St._keyDown(ut)},!0)),this.register(de.addDisposableDomListener(this.textarea,"keypress",function(ut){return St._keyPress(ut)},!0)),this.register(de.addDisposableDomListener(this.textarea,"compositionstart",function(){return St._compositionHelper.compositionstart()})),this.register(de.addDisposableDomListener(this.textarea,"compositionupdate",function(ut){return St._compositionHelper.compositionupdate(ut)})),this.register(de.addDisposableDomListener(this.textarea,"compositionend",function(){return St._compositionHelper.compositionend()})),this.register(this.onRender(function(){return St._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(ut){return St._queueLinkification(ut.start,ut.end)}))},it.prototype.open=function(St){var ut=this;if(!St)throw new Error("Terminal requires a parent element.");mt.body.contains(St)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=St.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"),St.appendChild(this.element);var Ft=mt.createDocumentFragment();this._viewportElement=mt.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),Ft.appendChild(this._viewportElement),this._viewportScrollArea=mt.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=mt.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=mt.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),Ft.appendChild(this.screenElement),this.textarea=mt.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",ue.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(dt){return ut._onTextAreaFocus(dt)})),this.register(de.addDisposableDomListener(this.textarea,"blur",function(){return ut._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var ht=this._instantiationService.createInstance(Qe.CoreBrowserService,this.textarea);this._instantiationService.setService(ke.ICoreBrowserService,ht),this._charSizeService=this._instantiationService.createInstance(Ne.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(ke.ICharSizeService,this._charSizeService),this._compositionView=mt.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(Te.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(Ft),this._theme=this.options.theme||this._theme,this._colorManager=new we.ColorManager(mt,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(dt){return ut._colorManager.onOptionsChange(dt)})),this._colorManager.setTheme(this._theme);var rt=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(Ce.RenderService,rt,this.rows,this.screenElement)),this._instantiationService.setService(ke.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(dt){return ut._onRender.fire(dt)})),this.onResize(function(dt){return ut._renderService.resize(dt.cols,dt.rows)}),this._soundService=this._instantiationService.createInstance(z.SoundService),this._instantiationService.setService(ke.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(je.MouseService),this._instantiationService.setService(ke.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(be.Viewport,function(dt,yt){return ut.scrollLines(dt,yt)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return ut.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){ut._renderService.onCursorMove(),ut._syncTextArea()})),this.register(this.onResize(function(){return ut._renderService.onResize(ut.cols,ut.rows)})),this.register(this.onBlur(function(){return ut._renderService.onBlur()})),this.register(this.onFocus(function(){return ut._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return ut.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(ce.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(ke.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(dt){return ut.scrollLines(dt.amount,dt.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return ut._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(dt){return ut._renderService.onSelectionChanged(dt.start,dt.end,dt.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(dt){ut.textarea.value=dt,ut.textarea.focus(),ut.textarea.select()})),this.register(this.onScroll(function(){ut.viewport.syncScrollArea(),ut._selectionService.refresh()})),this.register(de.addDisposableDomListener(this._viewportElement,"scroll",function(){return ut._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(ee.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return ut._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(dt){return ut._selectionService.onMouseDown(dt)})),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()},it.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+'"')}},it.prototype._setTheme=function(St){var ut,Ft,ht;this._theme=St,(ut=this._colorManager)===null||ut===void 0||ut.setTheme(St),(Ft=this._renderService)===null||Ft===void 0||Ft.setColors(this._colorManager.colors),(ht=this.viewport)===null||ht===void 0||ht.onThemeChange(this._colorManager.colors)},it.prototype.bindMouse=function(){var St=this,ut=this,Ft=this.element;function ht(Bt){var jt,un,Kt=ut._mouseService.getRawByteCoords(Bt,ut.screenElement,ut.cols,ut.rows);if(!Kt)return!1;switch(Bt.overrideType||Bt.type){case"mousemove":un=32,Bt.buttons===void 0?(jt=3,Bt.button!==void 0&&(jt=Bt.button<3?Bt.button:3)):jt=1&Bt.buttons?0:4&Bt.buttons?1:2&Bt.buttons?2:3;break;case"mouseup":un=0,jt=Bt.button<3?Bt.button:3;break;case"mousedown":un=1,jt=Bt.button<3?Bt.button:3;break;case"wheel":Bt.deltaY!==0&&(un=Bt.deltaY<0?0:1),jt=4;break;default:return!1}return!(un===void 0||jt===void 0||jt>4)&&ut._coreMouseService.triggerMouseEvent({col:Kt.x-33,row:Kt.y-33,button:jt,action:un,ctrl:Bt.ctrlKey,alt:Bt.altKey,shift:Bt.shiftKey})}var rt={mouseup:null,wheel:null,mousedrag:null,mousemove:null},dt=function(Bt){return ht(Bt),Bt.buttons||(St._document.removeEventListener("mouseup",rt.mouseup),rt.mousedrag&&St._document.removeEventListener("mousemove",rt.mousedrag)),St.cancel(Bt)},yt=function(Bt){return ht(Bt),Bt.preventDefault(),St.cancel(Bt)},_t=function(Bt){Bt.buttons&&ht(Bt)},vt=function(Bt){Bt.buttons||ht(Bt)};this.register(this._coreMouseService.onProtocolChange(function(Bt){Bt?(St.optionsService.options.logLevel==="debug"&&St._logService.debug("Binding to mouse events:",St._coreMouseService.explainEvents(Bt)),St.element.classList.add("enable-mouse-events"),St._selectionService.disable()):(St._logService.debug("Unbinding from mouse events."),St.element.classList.remove("enable-mouse-events"),St._selectionService.enable()),8&Bt?rt.mousemove||(Ft.addEventListener("mousemove",vt),rt.mousemove=vt):(Ft.removeEventListener("mousemove",rt.mousemove),rt.mousemove=null),16&Bt?rt.wheel||(Ft.addEventListener("wheel",yt,{passive:!1}),rt.wheel=yt):(Ft.removeEventListener("wheel",rt.wheel),rt.wheel=null),2&Bt?rt.mouseup||(rt.mouseup=dt):(St._document.removeEventListener("mouseup",rt.mouseup),rt.mouseup=null),4&Bt?rt.mousedrag||(rt.mousedrag=_t):(St._document.removeEventListener("mousemove",rt.mousedrag),rt.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(de.addDisposableDomListener(Ft,"mousedown",function(Bt){if(Bt.preventDefault(),St.focus(),St._coreMouseService.areMouseEventsActive&&!St._selectionService.shouldForceSelection(Bt))return ht(Bt),rt.mouseup&&St._document.addEventListener("mouseup",rt.mouseup),rt.mousedrag&&St._document.addEventListener("mousemove",rt.mousedrag),St.cancel(Bt)})),this.register(de.addDisposableDomListener(Ft,"wheel",function(Bt){if(!rt.wheel){if(!St.buffer.hasScrollback){var jt=St.viewport.getLinesScrolled(Bt);if(jt===0)return;for(var un=he.C0.ESC+(St._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Bt.deltaY<0?"A":"B"),Kt="",xn=0;xn<Math.abs(jt);xn++)Kt+=un;St._coreService.triggerDataEvent(Kt,!0)}}},{passive:!0})),this.register(de.addDisposableDomListener(Ft,"wheel",function(Bt){if(!rt.wheel)return St.viewport.onWheel(Bt)?void 0:St.cancel(Bt)},{passive:!1})),this.register(de.addDisposableDomListener(Ft,"touchstart",function(Bt){if(!St._coreMouseService.areMouseEventsActive)return St.viewport.onTouchStart(Bt),St.cancel(Bt)},{passive:!0})),this.register(de.addDisposableDomListener(Ft,"touchmove",function(Bt){if(!St._coreMouseService.areMouseEventsActive)return St.viewport.onTouchMove(Bt)?void 0:St.cancel(Bt)},{passive:!1}))},it.prototype.refresh=function(St,ut){var Ft;(Ft=this._renderService)===null||Ft===void 0||Ft.refreshRows(St,ut)},it.prototype._queueLinkification=function(St,ut){var Ft;(Ft=this.linkifier)===null||Ft===void 0||Ft.linkifyRows(St,ut)},it.prototype.updateCursorStyle=function(St){this._selectionService&&this._selectionService.shouldColumnSelect(St)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},it.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},it.prototype.scrollLines=function(St,ut){Ct.prototype.scrollLines.call(this,St,ut),this.refresh(0,this.rows-1)},it.prototype.paste=function(St){Pe.paste(St,this.textarea,this._coreService)},it.prototype.attachCustomKeyEventHandler=function(St){this._customKeyEventHandler=St},it.prototype.registerLinkMatcher=function(St,ut,Ft){var ht=this.linkifier.registerLinkMatcher(St,ut,Ft);return this.refresh(0,this.rows-1),ht},it.prototype.deregisterLinkMatcher=function(St){this.linkifier.deregisterLinkMatcher(St)&&this.refresh(0,this.rows-1)},it.prototype.registerLinkProvider=function(St){return this.linkifier2.registerLinkProvider(St)},it.prototype.registerCharacterJoiner=function(St){var ut=this._renderService.registerCharacterJoiner(St);return this.refresh(0,this.rows-1),ut},it.prototype.deregisterCharacterJoiner=function(St){this._renderService.deregisterCharacterJoiner(St)&&this.refresh(0,this.rows-1)},Object.defineProperty(it.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),it.prototype.addMarker=function(St){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+St)},it.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},it.prototype.select=function(St,ut,Ft){this._selectionService.setSelection(St,ut,Ft)},it.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},it.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]}},it.prototype.clearSelection=function(){var St;(St=this._selectionService)===null||St===void 0||St.clearSelection()},it.prototype.selectAll=function(){var St;(St=this._selectionService)===null||St===void 0||St.selectAll()},it.prototype.selectLines=function(St,ut){var Ft;(Ft=this._selectionService)===null||Ft===void 0||Ft.selectLines(St,ut)},it.prototype._keyDown=function(St){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(St)===!1)return!1;if(!this._compositionHelper.keydown(St))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var ut=se.evaluateKeyboardEvent(St,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(St),ut.type===3||ut.type===2){var Ft=this.rows-1;return this.scrollLines(ut.type===2?-Ft:Ft),this.cancel(St,!0)}return ut.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,St)||(ut.cancel&&this.cancel(St,!0),!ut.key||(ut.key!==he.C0.ETX&&ut.key!==he.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ut.key,domEvent:St}),this._showCursor(),this._coreService.triggerDataEvent(ut.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(St,!0)))},it.prototype._isThirdLevelShift=function(St,ut){var Ft=St.isMac&&!this.options.macOptionIsMeta&&ut.altKey&&!ut.ctrlKey&&!ut.metaKey||St.isWindows&&ut.altKey&&ut.ctrlKey&&!ut.metaKey;return ut.type==="keypress"?Ft:Ft&&(!ut.keyCode||ut.keyCode>47)},it.prototype._keyUp=function(St){this._customKeyEventHandler&&this._customKeyEventHandler(St)===!1||(function(ut){return ut.keyCode===16||ut.keyCode===17||ut.keyCode===18}(St)||this.focus(),this.updateCursorStyle(St))},it.prototype._keyPress=function(St){var ut;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(St)===!1)return!1;if(this.cancel(St),St.charCode)ut=St.charCode;else if(St.which===null||St.which===void 0)ut=St.keyCode;else{if(St.which===0||St.charCode===0)return!1;ut=St.which}return!(!ut||(St.altKey||St.ctrlKey||St.metaKey)&&!this._isThirdLevelShift(this.browser,St))&&(ut=String.fromCharCode(ut),this._onKey.fire({key:ut,domEvent:St}),this._showCursor(),this._coreService.triggerDataEvent(ut,!0),!0)},it.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},it.prototype.resize=function(St,ut){St!==this.cols||ut!==this.rows?Ct.prototype.resize.call(this,St,ut):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},it.prototype._afterResize=function(St,ut){var Ft,ht;(Ft=this._charSizeService)===null||Ft===void 0||Ft.measure(),(ht=this.viewport)===null||ht===void 0||ht.syncScrollArea(!0)},it.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 St=1;St<this.rows;St++)this.buffer.lines.push(this.buffer.getBlankLine(ye.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},it.prototype.reset=function(){var St,ut;this.options.rows=this.rows,this.options.cols=this.cols;var Ft=this._customKeyEventHandler;this._setup(),Ct.prototype.reset.call(this),(St=this._selectionService)===null||St===void 0||St.reset(),this._customKeyEventHandler=Ft,this.refresh(0,this.rows-1),(ut=this.viewport)===null||ut===void 0||ut.syncScrollArea()},it.prototype._reportWindowsOptions=function(St){if(this._renderService)switch(St){case Se.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var ut=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),Ft=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(he.C0.ESC+"[4;"+Ft+";"+ut+"t");break;case Se.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var ht=this._renderService.dimensions.scaledCellWidth.toFixed(0),rt=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(he.C0.ESC+"[6;"+rt+";"+ht+"t")}},it.prototype.cancel=function(St,ut){if(this.options.cancelEvents||ut)return St.preventDefault(),St.stopPropagation(),!1},it.prototype._visualBell=function(){return!1},it.prototype._soundBell=function(){return this.options.bellStyle==="sound"},it}(Ge.CoreTerminal);Ee.Terminal=ct},function(Yt,Ee,Le){"use strict";var me=this&&this.__decorate||function(he,Se,xe,ge){var ce,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 ue=he.length-1;ue>=0;ue--)(ce=he[ue])&&(de=(ve<3?ce(de):ve>3?ce(Se,xe,de):ce(Se,xe))||de);return ve>3&&de&&Object.defineProperty(Se,xe,de),de},Ie=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 Te=Le(5),be=Le(1),Pe=function(){function he(Se,xe,ge,ce,ve,de){this._textarea=Se,this._compositionView=xe,this._bufferService=ge,this._optionsService=ce,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 ce=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(ce,!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),ce=this._bufferService.buffer.y*ge,ve=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=ve+"px",this._compositionView.style.top=ce+"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=ce+"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([Ie(2,be.IBufferService),Ie(3,be.IOptionsService),Ie(4,Te.ICharSizeService),Ie(5,be.ICoreService)],he)}();Ee.CompositionHelper=Pe},function(Yt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(ce,ve){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ue){de.__proto__=ue}||function(de,ue){for(var z in ue)ue.hasOwnProperty(z)&&(de[z]=ue[z])})(ce,ve)},function(ce,ve){function de(){this.constructor=ce}me(ce,ve),ce.prototype=ve===null?Object.create(ve):(de.prototype=ve.prototype,new de)}),Te=this&&this.__decorate||function(ce,ve,de,ue){var z,ee=arguments.length,oe=ee<3?ve:ue===null?ue=Object.getOwnPropertyDescriptor(ve,de):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(ce,ve,de,ue);else for(var ie=ce.length-1;ie>=0;ie--)(z=ce[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(ce,ve){return function(de,ue){ve(de,ue,ce)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Viewport=void 0;var Pe=Le(2),he=Le(7),Se=Le(5),xe=Le(1),ge=function(ce){function ve(de,ue,z,ee,oe,ie,se){var le=ce.call(this)||this;return le._scrollLines=de,le._viewportElement=ue,le._scrollArea=z,le._bufferService=ee,le._optionsService=oe,le._charSizeService=ie,le._renderService=se,le.scrollBarWidth=0,le._currentRowHeight=0,le._lastRecordedBufferLength=0,le._lastRecordedViewportHeight=0,le._lastRecordedBufferHeight=0,le._lastTouchY=0,le._lastScrollTop=0,le._wheelPartialScroll=0,le._refreshAnimationFrame=null,le._ignoreNextScrollEvent=!1,le.scrollBarWidth=le._viewportElement.offsetWidth-le._scrollArea.offsetWidth||15,le.register(he.addDisposableDomListener(le._viewportElement,"scroll",le._onScroll.bind(le))),setTimeout(function(){return le.syncScrollArea()},0),le}return Ie(ve,ce),ve.prototype.onThemeChange=function(de){this._viewportElement.style.backgroundColor=de.background.css},ve.prototype._refresh=function(de){var ue=this;if(de)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return ue._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 ue=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==ue&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=ue),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 ue=this._bufferService.buffer.ydisp*this._currentRowHeight;this._lastScrollTop===ue&&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 ue=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(ue,!0)}},ve.prototype._bubbleScroll=function(de,ue){var z=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(ue<0&&this._viewportElement.scrollTop!==0||ue>0&&z<this._lastRecordedBufferHeight)||(de.cancelable&&de.preventDefault(),!1)},ve.prototype.onWheel=function(de){var ue=this._getPixelsScrolled(de);return ue!==0&&(this._viewportElement.scrollTop+=ue,this._bubbleScroll(de,ue))},ve.prototype._getPixelsScrolled=function(de){if(de.deltaY===0)return 0;var ue=this._applyScrollModifier(de.deltaY,de);return de.deltaMode===WheelEvent.DOM_DELTA_LINE?ue*=this._currentRowHeight:de.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(ue*=this._currentRowHeight*this._bufferService.rows),ue},ve.prototype.getLinesScrolled=function(de){if(de.deltaY===0)return 0;var ue=this._applyScrollModifier(de.deltaY,de);return de.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(ue/=this._currentRowHeight+0,this._wheelPartialScroll+=ue,ue=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):de.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(ue*=this._bufferService.rows),ue},ve.prototype._applyScrollModifier=function(de,ue){var z=this._optionsService.options.fastScrollModifier;return z==="alt"&&ue.altKey||z==="ctrl"&&ue.ctrlKey||z==="shift"&&ue.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 ue=this._lastTouchY-de.touches[0].pageY;return this._lastTouchY=de.touches[0].pageY,ue!==0&&(this._viewportElement.scrollTop+=ue,this._bubbleScroll(de,ue))},ve=Te([be(3,xe.IBufferService),be(4,xe.IOptionsService),be(5,Se.ICharSizeService),be(6,Se.IRenderService)],ve)}(Pe.Disposable);Ee.Viewport=ge},function(Yt,Ee,Le){"use strict";function me(Pe){return Pe.replace(/\r?\n/g,"\r")}function Ie(Pe,he){return he?"\x1B[200~"+Pe+"\x1B[201~":Pe}function Te(Pe,he,Se){Pe=Ie(Pe=me(Pe),Se.decPrivateModes.bracketedPasteMode),Se.triggerDataEvent(Pe,!0),he.value=""}function be(Pe,he,Se){var xe=Se.getBoundingClientRect(),ge=Pe.clientX-xe.left-10,ce=Pe.clientY-xe.top-10;he.style.width="20px",he.style.height="20px",he.style.left=ge+"px",he.style.top=ce+"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=Ie,Ee.copyHandler=function(Pe,he){Pe.clipboardData&&Pe.clipboardData.setData("text/plain",he.selectionText),Pe.preventDefault()},Ee.handlePasteEvent=function(Pe,he,Se){Pe.stopPropagation(),Pe.clipboardData&&Te(Pe.clipboardData.getData("text/plain"),he,Se)},Ee.paste=Te,Ee.moveTextAreaUnderMouseCursor=be,Ee.rightClickHandler=function(Pe,he,Se,xe,ge){be(Pe,he,Se),ge&&!xe.isClickInSelection(Pe)&&xe.selectWordAtCursor(Pe),he.value=xe.selectionText,he.select()}},function(Yt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(ce,ve){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ue){de.__proto__=ue}||function(de,ue){for(var z in ue)ue.hasOwnProperty(z)&&(de[z]=ue[z])})(ce,ve)},function(ce,ve){function de(){this.constructor=ce}me(ce,ve),ce.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 Te=Le(2),be=Le(15),Pe=Le(21),he=Le(22),Se=Le(24),xe=function(){function ce(ve){this.table=new Uint8Array(ve)}return ce.prototype.setDefault=function(ve,de){be.fill(this.table,ve<<4|de)},ce.prototype.add=function(ve,de,ue,z){this.table[de<<8|ve]=ue<<4|z},ce.prototype.addMany=function(ve,de,ue,z){for(var ee=0;ee<ve.length;ee++)this.table[de<<8|ve[ee]]=ue<<4|z},ce}();Ee.TransitionTable=xe,Ee.VT500_TRANSITION_TABLE=function(){var ce=new xe(4095),ve=Array.apply(null,Array(256)).map(function(ie,se){return se}),de=function(ie,se){return ve.slice(ie,se)},ue=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 ce.setDefault(1,0),ce.addMany(ue,0,2,0),oe)ce.addMany([24,26,153,154],ee,3,0),ce.addMany(de(128,144),ee,3,0),ce.addMany(de(144,152),ee,3,0),ce.add(156,ee,0,0),ce.add(27,ee,11,1),ce.add(157,ee,4,8),ce.addMany([152,158,159],ee,0,7),ce.add(155,ee,11,3),ce.add(144,ee,11,9);return ce.addMany(z,0,3,0),ce.addMany(z,1,3,1),ce.add(127,1,0,1),ce.addMany(z,8,0,8),ce.addMany(z,3,3,3),ce.add(127,3,0,3),ce.addMany(z,4,3,4),ce.add(127,4,0,4),ce.addMany(z,6,3,6),ce.addMany(z,5,3,5),ce.add(127,5,0,5),ce.addMany(z,2,3,2),ce.add(127,2,0,2),ce.add(93,1,4,8),ce.addMany(ue,8,5,8),ce.add(127,8,5,8),ce.addMany([156,27,24,26,7],8,6,0),ce.addMany(de(28,32),8,0,8),ce.addMany([88,94,95],1,0,7),ce.addMany(ue,7,0,7),ce.addMany(z,7,0,7),ce.add(156,7,0,0),ce.add(127,7,0,7),ce.add(91,1,11,3),ce.addMany(de(64,127),3,7,0),ce.addMany(de(48,60),3,8,4),ce.addMany([60,61,62,63],3,9,4),ce.addMany(de(48,60),4,8,4),ce.addMany(de(64,127),4,7,0),ce.addMany([60,61,62,63],4,0,6),ce.addMany(de(32,64),6,0,6),ce.add(127,6,0,6),ce.addMany(de(64,127),6,0,0),ce.addMany(de(32,48),3,9,5),ce.addMany(de(32,48),5,9,5),ce.addMany(de(48,64),5,0,6),ce.addMany(de(64,127),5,7,0),ce.addMany(de(32,48),4,9,5),ce.addMany(de(32,48),1,9,2),ce.addMany(de(32,48),2,9,2),ce.addMany(de(48,127),2,10,0),ce.addMany(de(48,80),1,10,0),ce.addMany(de(81,88),1,10,0),ce.addMany([89,90,92],1,10,0),ce.addMany(de(96,127),1,10,0),ce.add(80,1,11,9),ce.addMany(z,9,0,9),ce.add(127,9,0,9),ce.addMany(de(28,32),9,0,9),ce.addMany(de(32,48),9,9,12),ce.addMany(de(48,60),9,8,10),ce.addMany([60,61,62,63],9,9,10),ce.addMany(z,11,0,11),ce.addMany(de(32,128),11,0,11),ce.addMany(de(28,32),11,0,11),ce.addMany(z,10,0,10),ce.add(127,10,0,10),ce.addMany(de(28,32),10,0,10),ce.addMany(de(48,60),10,8,10),ce.addMany([60,61,62,63],10,0,11),ce.addMany(de(32,48),10,9,12),ce.addMany(z,12,0,12),ce.add(127,12,0,12),ce.addMany(de(28,32),12,0,12),ce.addMany(de(32,48),12,9,12),ce.addMany(de(48,64),12,0,11),ce.addMany(de(64,127),12,12,13),ce.addMany(de(64,127),10,12,13),ce.addMany(de(64,127),9,12,13),ce.addMany(z,13,13,13),ce.addMany(ue,13,13,13),ce.add(127,13,0,13),ce.addMany([27,156,24,26],13,14,0),ce.add(160,0,2,0),ce.add(160,8,5,8),ce.add(160,6,0,6),ce.add(160,11,0,11),ce.add(160,13,13,13),ce}();var ge=function(ce){function ve(de){de===void 0&&(de=Ee.VT500_TRANSITION_TABLE);var ue=ce.call(this)||this;return ue._transitions=de,ue.initialState=0,ue.currentState=ue.initialState,ue._params=new Pe.Params,ue._params.addParam(0),ue._collect=0,ue.precedingCodepoint=0,ue._printHandlerFb=function(z,ee,oe){},ue._executeHandlerFb=function(z){},ue._csiHandlerFb=function(z,ee){},ue._escHandlerFb=function(z){},ue._errorHandlerFb=function(z){return z},ue._printHandler=ue._printHandlerFb,ue._executeHandlers=Object.create(null),ue._csiHandlers=Object.create(null),ue._escHandlers=Object.create(null),ue._oscParser=new he.OscParser,ue._dcsParser=new Se.DcsParser,ue._errorHandler=ue._errorHandlerFb,ue.setEscHandler({final:"\\"},function(){}),ue}return Ie(ve,ce),ve.prototype._identifier=function(de,ue){ue===void 0&&(ue=[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(ue[0]>ie||ie>ue[1])throw new Error("final must be in range "+ue[0]+" .. "+ue[1]);return z<<=8,z|=ie},ve.prototype.identToString=function(de){for(var ue=[];de;)ue.push(String.fromCharCode(255&de)),de>>=8;return ue.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,ue){var z=this._identifier(de,[48,126]);this._escHandlers[z]===void 0&&(this._escHandlers[z]=[]);var ee=this._escHandlers[z];return ee.push(ue),{dispose:function(){var oe=ee.indexOf(ue);oe!==-1&&ee.splice(oe,1)}}},ve.prototype.setEscHandler=function(de,ue){this._escHandlers[this._identifier(de,[48,126])]=[ue]},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,ue){this._executeHandlers[de.charCodeAt(0)]=ue},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,ue){var z=this._identifier(de);this._csiHandlers[z]===void 0&&(this._csiHandlers[z]=[]);var ee=this._csiHandlers[z];return ee.push(ue),{dispose:function(){var oe=ee.indexOf(ue);oe!==-1&&ee.splice(oe,1)}}},ve.prototype.setCsiHandler=function(de,ue){this._csiHandlers[this._identifier(de)]=[ue]},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,ue){return this._dcsParser.addHandler(this._identifier(de),ue)},ve.prototype.setDcsHandler=function(de,ue){this._dcsParser.setHandler(this._identifier(de),ue)},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,ue){return this._oscParser.addHandler(de,ue)},ve.prototype.setOscHandler=function(de,ue){this._oscParser.setHandler(de,ue)},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,ue){for(var z=0,ee=0,oe=this.currentState,ie=this._oscParser,se=this._dcsParser,le=this._collect,ye=this._params,we=this._transitions.table,Ce=0;Ce<ue;++Ce){switch((ee=we[oe<<8|((z=de[Ce])<160?z:160)])>>4){case 2:for(var ke=Ce+1;;++ke){if(ke>=ue||(z=de[ke])<32||z>126&&z<160){this._printHandler(de,Ce,ke),Ce=ke-1;break}if(++ke>=ue||(z=de[ke])<32||z>126&&z<160){this._printHandler(de,Ce,ke),Ce=ke-1;break}if(++ke>=ue||(z=de[ke])<32||z>126&&z<160){this._printHandler(de,Ce,ke),Ce=ke-1;break}if(++ke>=ue||(z=de[ke])<32||z>126&&z<160){this._printHandler(de,Ce,ke),Ce=ke-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:Ce,code:z,currentState:oe,collect:le,params:ye,abort:!1}).abort)return;break;case 7:for(var Ne=this._csiHandlers[le<<8|z],je=Ne?Ne.length-1:-1;je>=0&&Ne[je](ye)===!1;je--);je<0&&this._csiHandlerFb(le<<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(++Ce<ue&&(z=de[Ce])>47&&z<60);Ce--;break;case 9:le<<=8,le|=z;break;case 10:for(var Ve=this._escHandlers[le<<8|z],Qe=Ve?Ve.length-1:-1;Qe>=0&&Ve[Qe]()===!1;Qe--);Qe<0&&this._escHandlerFb(le<<8|z),this.precedingCodepoint=0;break;case 11:ye.reset(),ye.addParam(0),le=0;break;case 12:se.hook(le<<8|z,ye);break;case 13:for(var Ge=Ce+1;;++Ge)if(Ge>=ue||(z=de[Ge])===24||z===26||z===27||z>127&&z<160){se.put(de,Ce,Ge),Ce=Ge-1;break}break;case 14:se.unhook(z!==24&&z!==26),z===27&&(ee|=1),ye.reset(),ye.addParam(0),le=0,this.precedingCodepoint=0;break;case 4:ie.start();break;case 5:for(var mt=Ce+1;;mt++)if(mt>=ue||(z=de[mt])<32||z>127&&z<=159){ie.put(de,Ce,mt),Ce=mt-1;break}break;case 6:ie.end(z!==24&&z!==26),z===27&&(ee|=1),ye.reset(),ye.addParam(0),le=0,this.precedingCodepoint=0}oe=15&ee}this._collect=le,this.currentState=oe},ve}(Te.Disposable);Ee.EscapeSequenceParser=ge},function(Yt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(ie,se){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(le,ye){le.__proto__=ye}||function(le,ye){for(var we in ye)ye.hasOwnProperty(we)&&(le[we]=ye[we])})(ie,se)},function(ie,se){function le(){this.constructor=ie}me(ie,se),ie.prototype=se===null?Object.create(se):(le.prototype=se.prototype,new le)}),Te=this&&this.__decorate||function(ie,se,le,ye){var we,Ce=arguments.length,ke=Ce<3?se:ye===null?ye=Object.getOwnPropertyDescriptor(se,le):ye;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ke=Reflect.decorate(ie,se,le,ye);else for(var Ne=ie.length-1;Ne>=0;Ne--)(we=ie[Ne])&&(ke=(Ce<3?we(ke):Ce>3?we(se,le,ke):we(se,le))||ke);return Ce>3&&ke&&Object.defineProperty(se,le,ke),ke},be=this&&this.__param||function(ie,se){return function(le,ye){se(le,ye,ie)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Renderer=void 0;var Pe=Le(41),he=Le(47),Se=Le(48),xe=Le(49),ge=Le(29),ce=Le(2),ve=Le(5),de=Le(1),ue=Le(25),z=Le(0),ee=1,oe=function(ie){function se(le,ye,we,Ce,ke,Ne,je,Ve,Qe){var Ge=ie.call(this)||this;Ge._colors=le,Ge._screenElement=ye,Ge._bufferService=ke,Ge._charSizeService=Ne,Ge._optionsService=je,Ge._id=ee++,Ge._onRequestRedraw=new z.EventEmitter;var mt=Ge._optionsService.options.allowTransparency;return Ge._characterJoinerRegistry=new ge.CharacterJoinerRegistry(Ge._bufferService),Ge._renderLayers=[new Pe.TextRenderLayer(Ge._screenElement,0,Ge._colors,Ge._characterJoinerRegistry,mt,Ge._id,Ge._bufferService,je),new he.SelectionRenderLayer(Ge._screenElement,1,Ge._colors,Ge._id,Ge._bufferService,je),new xe.LinkRenderLayer(Ge._screenElement,2,Ge._colors,Ge._id,we,Ce,Ge._bufferService,je),new Se.CursorRenderLayer(Ge._screenElement,3,Ge._colors,Ge._id,Ge._onRequestRedraw,Ge._bufferService,je,Ve,Qe)],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 Ie(se,ie),Object.defineProperty(se.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),se.prototype.dispose=function(){for(var le=0,ye=this._renderLayers;le<ye.length;le++)ye[le].dispose();ie.prototype.dispose.call(this),ue.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(le){this._colors=le;for(var ye=0,we=this._renderLayers;ye<we.length;ye++){var Ce=we[ye];Ce.setColors(this._colors),Ce.reset()}},se.prototype.onResize=function(le,ye){this._updateDimensions();for(var we=0,Ce=this._renderLayers;we<Ce.length;we++)Ce[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(le){return le.onBlur()})},se.prototype.onFocus=function(){this._runOperation(function(le){return le.onFocus()})},se.prototype.onSelectionChanged=function(le,ye,we){we===void 0&&(we=!1),this._runOperation(function(Ce){return Ce.onSelectionChanged(le,ye,we)})},se.prototype.onCursorMove=function(){this._runOperation(function(le){return le.onCursorMove()})},se.prototype.onOptionsChanged=function(){this._runOperation(function(le){return le.onOptionsChanged()})},se.prototype.clear=function(){this._runOperation(function(le){return le.reset()})},se.prototype._runOperation=function(le){for(var ye=0,we=this._renderLayers;ye<we.length;ye++)le(we[ye])},se.prototype.renderRows=function(le,ye){for(var we=0,Ce=this._renderLayers;we<Ce.length;we++)Ce[we].onGridChanged(le,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(le){return this._characterJoinerRegistry.registerCharacterJoiner(le)},se.prototype.deregisterCharacterJoiner=function(le){return this._characterJoinerRegistry.deregisterCharacterJoiner(le)},se=Te([be(4,de.IBufferService),be(5,ve.ICharSizeService),be(6,de.IOptionsService),be(7,de.ICoreService),be(8,ve.ICoreBrowserService)],se)}(ce.Disposable);Ee.Renderer=oe},function(Yt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(ce,ve){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ue){de.__proto__=ue}||function(de,ue){for(var z in ue)ue.hasOwnProperty(z)&&(de[z]=ue[z])})(ce,ve)},function(ce,ve){function de(){this.constructor=ce}me(ce,ve),ce.prototype=ve===null?Object.create(ve):(de.prototype=ve.prototype,new de)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.TextRenderLayer=void 0;var Te=Le(42),be=Le(13),Pe=Le(6),he=Le(3),Se=Le(29),xe=Le(4),ge=function(ce){function ve(de,ue,z,ee,oe,ie,se,le){var ye=ce.call(this,de,"text",ue,oe,z,ie,se,le)||this;return ye._characterWidth=0,ye._characterFont="",ye._characterOverlapCache={},ye._workCell=new xe.CellData,ye._state=new Te.GridCache,ye._characterJoinerRegistry=ee,ye}return Ie(ve,ce),ve.prototype.resize=function(de){ce.prototype.resize.call(this,de);var ue=this._getFont(!1,!1);this._characterWidth===de.scaledCharWidth&&this._characterFont===ue||(this._characterWidth=de.scaledCharWidth,this._characterFont=ue,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,ue,z,ee){for(var oe=de;oe<=ue;oe++)for(var ie=oe+this._bufferService.buffer.ydisp,se=this._bufferService.buffer.lines.get(ie),le=z?z.getJoinedCharacters(ie):[],ye=0;ye<this._bufferService.cols;ye++){se.loadCell(ye,this._workCell);var we=this._workCell,Ce=!1,ke=ye;if(we.getWidth()!==0){if(le.length>0&&ye===le[0][0]){Ce=!0;var Ne=le.shift();we=new Se.JoinedCellData(this._workCell,se.translateToString(!0,Ne[0],Ne[1]),Ne[1]-Ne[0]),ke=Ne[1]-1}!Ce&&this._isOverlapping(we)&&ke<se.length-1&&se.getCodePoint(ke+1)===he.NULL_CELL_CODE&&(we.content&=-12582913,we.content|=2<<22),ee(we,ye,oe),ye=ke}}},ve.prototype._drawBackground=function(de,ue){var z=this,ee=this._ctx,oe=this._bufferService.cols,ie=0,se=0,le=null;ee.save(),this._forEachCell(de,ue,null,function(ye,we,Ce){var ke=null;ye.isInverse()?ke=ye.isFgDefault()?z._colors.foreground.css:ye.isFgRGB()?"rgb("+Pe.AttributeData.toColorRGB(ye.getFgColor()).join(",")+")":z._colors.ansi[ye.getFgColor()].css:ye.isBgRGB()?ke="rgb("+Pe.AttributeData.toColorRGB(ye.getBgColor()).join(",")+")":ye.isBgPalette()&&(ke=z._colors.ansi[ye.getBgColor()].css),le===null&&(ie=we,se=Ce),Ce!==se?(ee.fillStyle=le||"",z._fillCells(ie,se,oe-ie,1),ie=we,se=Ce):le!==ke&&(ee.fillStyle=le||"",z._fillCells(ie,se,we-ie,1),ie=we,se=Ce),le=ke}),le!==null&&(ee.fillStyle=le,this._fillCells(ie,se,oe-ie,1)),ee.restore()},ve.prototype._drawForeground=function(de,ue){var z=this;this._forEachCell(de,ue,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("+Pe.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("+Pe.AttributeData.toColorRGB(ee.getFgColor()).join(",")+")";else{var le=ee.getFgColor();z._optionsService.options.drawBoldTextInBrightColors&&ee.isBold()&&le<8&&(le+=8),z._ctx.fillStyle=z._colors.ansi[le].css}z._fillBottomLineAtCells(oe,ie,ee.getWidth()),z._ctx.restore()}})},ve.prototype.onGridChanged=function(de,ue){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,de,this._bufferService.cols,ue-de+1),this._drawBackground(de,ue),this._drawForeground(de,ue))},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 ue=de.getChars();if(this._characterOverlapCache.hasOwnProperty(ue))return this._characterOverlapCache[ue];this._ctx.save(),this._ctx.font=this._characterFont;var z=Math.floor(this._ctx.measureText(ue).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[ue]=z,z},ve}(be.BaseRenderLayer);Ee.TextRenderLayer=ge},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.GridCache=void 0;var me=function(){function Ie(){this.cache=[]}return Ie.prototype.resize=function(Te,be){for(var Pe=0;Pe<Te;Pe++){this.cache.length<=Pe&&this.cache.push([]);for(var he=this.cache[Pe].length;he<be;he++)this.cache[Pe].push(void 0);this.cache[Pe].length=be}this.cache.length=Te},Ie.prototype.clear=function(){for(var Te=0;Te<this.cache.length;Te++)for(var be=0;be<this.cache[Te].length;be++)this.cache[Te][be]=void 0},Ie}();Ee.GridCache=me},function(Yt,Ee,Le){"use strict";var me,Ie=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 Te=Le(9),be=Le(44),Pe=Le(27),he=Le(46),Se=Le(11),xe=Le(28),ge=Le(10),ce={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 le=oe.createElement("canvas");le.width=se._config.scaledCharWidth,le.height=se._config.scaledCharHeight,se._tmpCtx=xe.throwIfFalsy(le.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 Ie(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,le){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,le),!0;if(this._drawToCacheCount<100){var Ce=void 0;Ce=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var ke=this._drawToCache(ie,Ce);return this._cacheMap.set(ye,ke),this._drawFromCache(oe,ke,se,le),!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,le){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,le,this._config.scaledCharWidth,this._config.scaledCharHeight)}},ee.prototype._getColorFromAnsiIndex=function(oe){return oe<this._config.colors.ansi.length?this._config.colors.ansi[oe]:Pe.DEFAULT_ANSI_COLORS[oe]},ee.prototype._getBackgroundColor=function(oe){return this._config.allowTransparency?ce:oe.bg===Te.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===Te.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 le=oe.bold?this._config.fontWeightBold:this._config.fontWeight,ye=oe.italic?"italic":"";this._tmpCtx.font=ye+" "+le+" "+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=Te.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),Ce=!1;this._config.allowTransparency||(Ce=function(Ve,Qe){for(var Ge=!0,mt=Qe.rgba>>>24,ct=Qe.rgba>>>16&255,Ct=Qe.rgba>>>8&255,it=0;it<Ve.data.length;it+=4)Ve.data[it]===mt&&Ve.data[it+1]===ct&&Ve.data[it+2]===Ct?Ve.data[it+3]=0:Ge=!1;return Ge}(we,se));var ke=this._toCoordinateX(ie),Ne=this._toCoordinateY(ie);this._cacheCtx.putImageData(we,ke,Ne);var je={index:ie,isEmpty:Ce,inBitmap:!1};return this._addGlyphToBitmap(je),je},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 le=0;le<ie.length;le++)ie[le].inBitmap=!0}),this._bitmapCommitTimeout=null},ee}(be.BaseCharAtlas);Ee.DynamicCharAtlas=de;var ue=function(z){function ee(oe,ie){return z.call(this)||this}return Ie(ee,z),ee.prototype.draw=function(oe,ie,se,le){return!1},ee}(be.BaseCharAtlas);Ee.NoneCharAtlas=ue},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BaseCharAtlas=void 0;var me=function(){function Ie(){this._didWarmUp=!1}return Ie.prototype.dispose=function(){},Ie.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},Ie.prototype._doWarmUp=function(){},Ie.prototype.beginFrame=function(){},Ie}();Ee.BaseCharAtlas=me},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.ColorContrastCache=void 0;var me=function(){function Ie(){this._color={},this._rgba={}}return Ie.prototype.clear=function(){this._color={},this._rgba={}},Ie.prototype.setCss=function(Te,be,Pe){this._rgba[Te]||(this._rgba[Te]={}),this._rgba[Te][be]=Pe},Ie.prototype.getCss=function(Te,be){return this._rgba[Te]?this._rgba[Te][be]:void 0},Ie.prototype.setColor=function(Te,be,Pe){this._color[Te]||(this._color[Te]={}),this._color[Te][be]=Pe},Ie.prototype.getColor=function(Te,be){return this._color[Te]?this._color[Te][be]:void 0},Ie}();Ee.ColorContrastCache=me},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.LRUMap=void 0;var me=function(){function Ie(Te){this.capacity=Te,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return Ie.prototype._unlinkNode=function(Te){var be=Te.prev,Pe=Te.next;Te===this._head&&(this._head=Pe),Te===this._tail&&(this._tail=be),be!==null&&(be.next=Pe),Pe!==null&&(Pe.prev=be)},Ie.prototype._appendNode=function(Te){var be=this._tail;be!==null&&(be.next=Te),Te.prev=be,Te.next=null,this._tail=Te,this._head===null&&(this._head=Te)},Ie.prototype.prealloc=function(Te){for(var be=this._nodePool,Pe=0;Pe<Te;Pe++)be.push({prev:null,next:null,key:null,value:null})},Ie.prototype.get=function(Te){var be=this._map[Te];return be!==void 0?(this._unlinkNode(be),this._appendNode(be),be.value):null},Ie.prototype.peekValue=function(Te){var be=this._map[Te];return be!==void 0?be.value:null},Ie.prototype.peek=function(){var Te=this._head;return Te===null?null:Te.value},Ie.prototype.set=function(Te,be){var Pe=this._map[Te];if(Pe!==void 0)Pe=this._map[Te],this._unlinkNode(Pe),Pe.value=be;else if(this.size>=this.capacity)Pe=this._head,this._unlinkNode(Pe),delete this._map[Pe.key],Pe.key=Te,Pe.value=be,this._map[Te]=Pe;else{var he=this._nodePool;he.length>0?((Pe=he.pop()).key=Te,Pe.value=be):Pe={prev:null,next:null,key:Te,value:be},this._map[Te]=Pe,this.size++}this._appendNode(Pe)},Ie}();Ee.LRUMap=me},function(Yt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(be,Pe){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])})(be,Pe)},function(be,Pe){function he(){this.constructor=be}me(be,Pe),be.prototype=Pe===null?Object.create(Pe):(he.prototype=Pe.prototype,new he)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.SelectionRenderLayer=void 0;var Te=function(be){function Pe(he,Se,xe,ge,ce,ve){var de=be.call(this,he,"selection",Se,!0,xe,ge,ce,ve)||this;return de._clearState(),de}return Ie(Pe,be),Pe.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},Pe.prototype.resize=function(he){be.prototype.resize.call(this,he),this._clearState()},Pe.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},Pe.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,ce=Se[1]-this._bufferService.buffer.ydisp,ve=Math.max(ge,0),de=Math.min(ce,this._bufferService.rows-1);if(!(ve>=this._bufferService.rows||de<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,xe){var ue=he[0],z=Se[0]-ue,ee=de-ve+1;this._fillCells(ue,ve,z,ee)}else{ue=ge===ve?he[0]:0;var oe=ve===de?Se[0]:this._bufferService.cols;this._fillCells(ue,ve,oe-ue,1);var ie=Math.max(de-ve-1,0);if(this._fillCells(0,ve+1,this._bufferService.cols,ie),ve!==de){var se=ce===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()},Pe.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},Pe.prototype._areCoordinatesEqual=function(he,Se){return!(!he||!Se)&&he[0]===Se[0]&&he[1]===Se[1]},Pe}(Le(13).BaseRenderLayer);Ee.SelectionRenderLayer=Te},function(Yt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(Se,xe){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ge,ce){ge.__proto__=ce}||function(ge,ce){for(var ve in ce)ce.hasOwnProperty(ve)&&(ge[ve]=ce[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 Te=Le(13),be=Le(4),Pe=function(Se){function xe(ge,ce,ve,de,ue,z,ee,oe,ie){var se=Se.call(this,ge,"cursor",ce,!0,ve,de,z,ee)||this;return se._onRequestRedraw=ue,se._coreService=oe,se._coreBrowserService=ie,se._cell=new be.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 Ie(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,ce=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new he(this._coreBrowserService.isFocused,function(){ce._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,ce){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},xe.prototype._render=function(ge){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var ce=this._bufferService.buffer.ybase+this._bufferService.buffer.y,ve=ce-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(ce).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 ue=this._optionsService.options.cursorStyle;return ue&&ue!=="block"?this._cursorRenderers[ue](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=ue,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,ce,ve){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(ge,ce,this._optionsService.options.cursorWidth),this._ctx.restore()},xe.prototype._renderBlockCursor=function(ge,ce,ve){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(ge,ce,ve.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(ve,ge,ce),this._ctx.restore()},xe.prototype._renderUnderlineCursor=function(ge,ce,ve){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(ge,ce),this._ctx.restore()},xe.prototype._renderBlurCursor=function(ge,ce,ve){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(ge,ce,ve.getWidth(),1),this._ctx.restore()},xe}(Te.BaseRenderLayer);Ee.CursorRenderLayer=Pe;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 ce=600-(Date.now()-ge._animationTimeRestarted);if(ge._animationTimeRestarted=void 0,ce>0)return void ge._restartInterval(ce)}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(Yt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(Se,xe){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ge,ce){ge.__proto__=ce}||function(ge,ce){for(var ve in ce)ce.hasOwnProperty(ve)&&(ge[ve]=ce[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 Te=Le(13),be=Le(9),Pe=Le(26),he=function(Se){function xe(ge,ce,ve,de,ue,z,ee,oe){var ie=Se.call(this,ge,"link",ce,!0,ve,de,ee,oe)||this;return ue.onShowLinkUnderline(function(se){return ie._onShowLinkUnderline(se)}),ue.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 Ie(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===be.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:ge.fg&&Pe.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 ce=ge.y1+1;ce<ge.y2;ce++)this._fillBottomLineAtCells(0,ce,ge.cols);this._fillBottomLineAtCells(0,ge.y2,ge.x2)}this._state=ge},xe.prototype._onHideLinkUnderline=function(ge){this._clearCurrentLink()},xe}(Te.BaseRenderLayer);Ee.LinkRenderLayer=he},function(Yt,Ee,Le){"use strict";var me=this&&this.__decorate||function(Se,xe,ge,ce){var ve,de=arguments.length,ue=de<3?xe:ce===null?ce=Object.getOwnPropertyDescriptor(xe,ge):ce;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ue=Reflect.decorate(Se,xe,ge,ce);else for(var z=Se.length-1;z>=0;z--)(ve=Se[z])&&(ue=(de<3?ve(ue):de>3?ve(xe,ge,ue):ve(xe,ge))||ue);return de>3&&ue&&Object.defineProperty(xe,ge,ue),ue},Ie=this&&this.__param||function(Se,xe){return function(ge,ce){xe(ge,ce,Se)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.MouseZone=Ee.Linkifier=void 0;var Te=Le(0),be=Le(1),Pe=function(){function Se(xe,ge,ce){this._bufferService=xe,this._logService=ge,this._unicodeService=ce,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new Te.EventEmitter,this._onHideLinkUnderline=new Te.EventEmitter,this._onLinkTooltip=new Te.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 ce=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 ce._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 ce=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,ce,ve,ve);de.hasNext();)for(var ue=de.next(),z=0;z<this._linkMatchers.length;z++)this._doLinkifyRow(ue.range.first,ue.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,ce){if(ce===void 0&&(ce={}),!ge)throw new Error("handler must be defined");var ve={id:this._nextLinkMatcherId++,regex:xe,handler:ge,matchIndex:ce.matchIndex,validationCallback:ce.validationCallback,hoverTooltipCallback:ce.tooltipCallback,hoverLeaveCallback:ce.leaveCallback,willLinkActivate:ce.willLinkActivate,priority:ce.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,ce){for(var ve,de=this,ue=new RegExp(ce.regex.source,(ce.regex.flags||"")+"g"),z=-1,ee=function(){var ie=ve[typeof ce.matchIndex!="number"?0:ce.matchIndex];if(!ie)return oe._logService.debug("match found without corresponding matchIndex",ve,ce),"break";if(z=ge.indexOf(ie,z+1),ue.lastIndex=z+ie.length,z<0)return"break";var se=oe._bufferService.buffer.stringIndexToBufferIndex(xe,z);if(se[0]<0)return"break";var le=oe._bufferService.buffer.lines.get(se[0]);if(!le)return"break";var ye=le.getFg(se[1]),we=ye?ye>>9&511:void 0;ce.validationCallback?ce.validationCallback(ie,function(Ce){de._rowsTimeoutId||Ce&&de._addLink(se[1],se[0]-de._bufferService.buffer.ydisp,ie,ce,we)}):oe._addLink(se[1],se[0]-oe._bufferService.buffer.ydisp,ie,ce,we)},oe=this;(ve=ue.exec(ge))!==null&&ee()!=="break";);},Se.prototype._addLink=function(xe,ge,ce,ve,de){var ue=this;if(this._mouseZoneManager&&this._element){var z=this._unicodeService.getStringCellWidth(ce),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(le){if(ve.handler)return ve.handler(le,ce);var ye=window.open();ye?(ye.opener=null,ye.location.href=ce):console.warn("Opening link blocked as opener could not be cleared")},function(){ue._onShowLinkUnderline.fire(ue._createLinkHoverEvent(ee,oe,ie,se,de)),ue._element.classList.add("xterm-cursor-pointer")},function(le){ue._onLinkTooltip.fire(ue._createLinkHoverEvent(ee,oe,ie,se,de)),ve.hoverTooltipCallback&&ve.hoverTooltipCallback(le,ce,{start:{x:ee,y:oe},end:{x:ie,y:se}})},function(){ue._onHideLinkUnderline.fire(ue._createLinkHoverEvent(ee,oe,ie,se,de)),ue._element.classList.remove("xterm-cursor-pointer"),ve.hoverLeaveCallback&&ve.hoverLeaveCallback()},function(le){return!ve.willLinkActivate||ve.willLinkActivate(le,ce)}))}},Se.prototype._createLinkHoverEvent=function(xe,ge,ce,ve,de){return{x1:xe,y1:ge,x2:ce,y2:ve,cols:this._bufferService.cols,fg:de}},Se._timeBeforeLatency=200,Se=me([Ie(0,be.IBufferService),Ie(1,be.ILogService),Ie(2,be.IUnicodeService)],Se)}();Ee.Linkifier=Pe;var he=function(Se,xe,ge,ce,ve,de,ue,z,ee){this.x1=Se,this.y1=xe,this.x2=ge,this.y2=ce,this.clickCallback=ve,this.hoverCallback=de,this.tooltipCallback=ue,this.leaveCallback=z,this.willLinkActivate=ee};Ee.MouseZone=he},function(Yt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(ie,se){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(le,ye){le.__proto__=ye}||function(le,ye){for(var we in ye)ye.hasOwnProperty(we)&&(le[we]=ye[we])})(ie,se)},function(ie,se){function le(){this.constructor=ie}me(ie,se),ie.prototype=se===null?Object.create(se):(le.prototype=se.prototype,new le)}),Te=this&&this.__decorate||function(ie,se,le,ye){var we,Ce=arguments.length,ke=Ce<3?se:ye===null?ye=Object.getOwnPropertyDescriptor(se,le):ye;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ke=Reflect.decorate(ie,se,le,ye);else for(var Ne=ie.length-1;Ne>=0;Ne--)(we=ie[Ne])&&(ke=(Ce<3?we(ke):Ce>3?we(se,le,ke):we(se,le))||ke);return Ce>3&&ke&&Object.defineProperty(se,le,ke),ke},be=this&&this.__param||function(ie,se){return function(le,ye){se(le,ye,ie)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.SelectionService=void 0;var Pe=Le(11),he=Le(52),Se=Le(4),xe=Le(0),ge=Le(5),ce=Le(1),ve=Le(30),de=Le(53),ue=Le(2),z="\xA0",ee=new RegExp(z,"g"),oe=function(ie){function se(le,ye,we,Ce,ke,Ne,je){var Ve=ie.call(this)||this;return Ve._element=le,Ve._screenElement=ye,Ve._bufferService=we,Ve._coreService=Ce,Ve._mouseService=ke,Ve._optionsService=Ne,Ve._renderService=je,Ve._dragScrollAmount=0,Ve._enabled=!0,Ve._workCell=new Se.CellData,Ve._mouseDownTimeStamp=0,Ve._onLinuxMouseSelection=Ve.register(new xe.EventEmitter),Ve._onRedrawRequest=Ve.register(new xe.EventEmitter),Ve._onSelectionChange=Ve.register(new xe.EventEmitter),Ve._onRequestScrollLines=Ve.register(new xe.EventEmitter),Ve._mouseMoveListener=function(Qe){return Ve._onMouseMove(Qe)},Ve._mouseUpListener=function(Qe){return Ve._onMouseUp(Qe)},Ve._coreService.onUserInput(function(){Ve.hasSelection&&Ve.clearSelection()}),Ve._trimListener=Ve._bufferService.buffer.lines.onTrim(function(Qe){return Ve._onTrim(Qe)}),Ve.register(Ve._bufferService.buffers.onBufferActivate(function(Qe){return Ve._onBufferActivate(Qe)})),Ve.enable(),Ve._model=new he.SelectionModel(Ve._bufferService),Ve._activeSelectionMode=0,Ve}return Ie(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 le=this._model.finalSelectionStart,ye=this._model.finalSelectionEnd;return!(!le||!ye)&&(le[0]!==ye[0]||le[1]!==ye[1])},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"selectionText",{get:function(){var le=this._model.finalSelectionStart,ye=this._model.finalSelectionEnd;if(!le||!ye)return"";var we=this._bufferService.buffer,Ce=[];if(this._activeSelectionMode===3){if(le[0]===ye[0])return"";for(var ke=le[1];ke<=ye[1];ke++){var Ne=we.translateBufferLineToString(ke,!0,le[0],ye[0]);Ce.push(Ne)}}else{var je=le[1]===ye[1]?ye[0]:void 0;for(Ce.push(we.translateBufferLineToString(le[1],!0,le[0],je)),ke=le[1]+1;ke<=ye[1]-1;ke++){var Ve=we.lines.get(ke);Ne=we.translateBufferLineToString(ke,!0),Ve&&Ve.isWrapped?Ce[Ce.length-1]+=Ne:Ce.push(Ne)}le[1]!==ye[1]&&(Ve=we.lines.get(ye[1]),Ne=we.translateBufferLineToString(ye[1],!0,0,ye[0]),Ve&&Ve.isWrapped?Ce[Ce.length-1]+=Ne:Ce.push(Ne))}return Ce.map(function(Qe){return Qe.replace(ee," ")}).join(Pe.isWindows?`\r
|
|
|
`:`
|
|
|
`)},enumerable:!1,configurable:!0}),se.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},se.prototype.refresh=function(le){var ye=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return ye._refresh()})),Pe.isLinux&&le&&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(le){var ye=this._getMouseBufferCoords(le),we=this._model.finalSelectionStart,Ce=this._model.finalSelectionEnd;return!!(we&&Ce&&ye)&&this._areCoordsInSelection(ye,we,Ce)},se.prototype._areCoordsInSelection=function(le,ye,we){return le[1]>ye[1]&&le[1]<we[1]||ye[1]===we[1]&&le[1]===ye[1]&&le[0]>=ye[0]&&le[0]<we[0]||ye[1]<we[1]&&le[1]===we[1]&&le[0]<we[0]||ye[1]<we[1]&&le[1]===ye[1]&&le[0]>=ye[0]},se.prototype.selectWordAtCursor=function(le){var ye=this._getMouseBufferCoords(le);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(le,ye){this._model.clearSelection(),le=Math.max(le,0),ye=Math.min(ye,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,le],this._model.selectionEnd=[this._bufferService.cols,ye],this.refresh(),this._onSelectionChange.fire()},se.prototype._onTrim=function(le){this._model.onTrim(le)&&this.refresh()},se.prototype._getMouseBufferCoords=function(le){var ye=this._mouseService.getCoords(le,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(le){var ye=ve.getCoordsRelativeToElement(le,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(le){return Pe.isMac?le.altKey&&this._optionsService.options.macOptionClickForcesSelection:le.shiftKey},se.prototype.onMouseDown=function(le){if(this._mouseDownTimeStamp=le.timeStamp,(le.button!==2||!this.hasSelection)&&le.button===0){if(!this._enabled){if(!this.shouldForceSelection(le))return;le.stopPropagation()}le.preventDefault(),this._dragScrollAmount=0,this._enabled&&le.shiftKey?this._onIncrementalClick(le):le.detail===1?this._onSingleClick(le):le.detail===2?this._onDoubleClick(le):le.detail===3&&this._onTripleClick(le),this._addMouseDownListeners(),this.refresh(!0)}},se.prototype._addMouseDownListeners=function(){var le=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return le._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(le){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(le))},se.prototype._onSingleClick=function(le){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(le)?3:0,this._model.selectionStart=this._getMouseBufferCoords(le),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(le){var ye=this._getMouseBufferCoords(le);ye&&(this._activeSelectionMode=1,this._selectWordAt(ye,!0))},se.prototype._onTripleClick=function(le){var ye=this._getMouseBufferCoords(le);ye&&(this._activeSelectionMode=2,this._selectLineAt(ye[1]))},se.prototype.shouldColumnSelect=function(le){return le.altKey&&!(Pe.isMac&&this._optionsService.options.macOptionClickForcesSelection)},se.prototype._onMouseMove=function(le){if(le.stopImmediatePropagation(),this._model.selectionStart){var ye=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(le),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(le),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 Ce=we.lines.get(this._model.selectionEnd[1]);Ce&&Ce.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 le=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(le.ydisp+this._bufferService.rows,le.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=le.ydisp),this.refresh()}},se.prototype._onMouseUp=function(le){var ye=le.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&ye<500&&le.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var we=this._mouseService.getCoords(le,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(we&&we[0]!==void 0&&we[1]!==void 0){var Ce=de.moveToCellSequence(we[0]-1,we[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(Ce,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},se.prototype._onBufferActivate=function(le){var ye=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=le.activeBuffer.lines.onTrim(function(we){return ye._onTrim(we)})},se.prototype._convertViewportColToCharacterIndex=function(le,ye){for(var we=ye[0],Ce=0;ye[0]>=Ce;Ce++){var ke=le.loadCell(Ce,this._workCell).getChars().length;this._workCell.getWidth()===0?we--:ke>1&&ye[0]!==Ce&&(we+=ke-1)}return we},se.prototype.setSelection=function(le,ye,we){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[le,ye],this._model.selectionStartLength=we,this.refresh()},se.prototype._getWordAt=function(le,ye,we,Ce){if(we===void 0&&(we=!0),Ce===void 0&&(Ce=!0),!(le[0]>=this._bufferService.cols)){var ke=this._bufferService.buffer,Ne=ke.lines.get(le[1]);if(Ne){var je=ke.translateBufferLineToString(le[1],!1),Ve=this._convertViewportColToCharacterIndex(Ne,le),Qe=Ve,Ge=le[0]-Ve,mt=0,ct=0,Ct=0,it=0;if(je.charAt(Ve)===" "){for(;Ve>0&&je.charAt(Ve-1)===" ";)Ve--;for(;Qe<je.length&&je.charAt(Qe+1)===" ";)Qe++}else{var St=le[0],ut=le[0];Ne.getWidth(St)===0&&(mt++,St--),Ne.getWidth(ut)===2&&(ct++,ut++);var Ft=Ne.getString(ut).length;for(Ft>1&&(it+=Ft-1,Qe+=Ft-1);St>0&&Ve>0&&!this._isCharWordSeparator(Ne.loadCell(St-1,this._workCell));){Ne.loadCell(St-1,this._workCell);var ht=this._workCell.getChars().length;this._workCell.getWidth()===0?(mt++,St--):ht>1&&(Ct+=ht-1,Ve-=ht-1),Ve--,St--}for(;ut<Ne.length&&Qe+1<je.length&&!this._isCharWordSeparator(Ne.loadCell(ut+1,this._workCell));){Ne.loadCell(ut+1,this._workCell);var rt=this._workCell.getChars().length;this._workCell.getWidth()===2?(ct++,ut++):rt>1&&(it+=rt-1,Qe+=rt-1),Qe++,ut++}}Qe++;var dt=Ve+Ge-mt+Ct,yt=Math.min(this._bufferService.cols,Qe-Ve+mt+ct-Ct-it);if(ye||je.slice(Ve,Qe).trim()!==""){if(we&&dt===0&&Ne.getCodePoint(0)!==32){var _t=ke.lines.get(le[1]-1);if(_t&&Ne.isWrapped&&_t.getCodePoint(this._bufferService.cols-1)!==32){var vt=this._getWordAt([this._bufferService.cols-1,le[1]-1],!1,!0,!1);if(vt){var Bt=this._bufferService.cols-vt.start;dt-=Bt,yt+=Bt}}}if(Ce&&dt+yt===this._bufferService.cols&&Ne.getCodePoint(this._bufferService.cols-1)!==32){var jt=ke.lines.get(le[1]+1);if(jt&&jt.isWrapped&&jt.getCodePoint(0)!==32){var un=this._getWordAt([0,le[1]+1],!1,!1,!0);un&&(yt+=un.length)}}return{start:dt,length:yt}}}}},se.prototype._selectWordAt=function(le,ye){var we=this._getWordAt(le,ye);if(we){for(;we.start<0;)we.start+=this._bufferService.cols,le[1]--;this._model.selectionStart=[we.start,le[1]],this._model.selectionStartLength=we.length}},se.prototype._selectToWordAt=function(le){var ye=this._getWordAt(le,!0);if(ye){for(var we=le[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(le){return le.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(le.getChars())>=0},se.prototype._selectLineAt=function(le){var ye=this._bufferService.buffer.getWrappedRangeForLine(le);this._model.selectionStart=[0,ye.first],this._model.selectionEnd=[this._bufferService.cols,ye.last],this._model.selectionStartLength=0},se=Te([be(2,ce.IBufferService),be(3,ce.ICoreService),be(4,ge.IMouseService),be(5,ce.IOptionsService),be(6,ge.IRenderService)],se)}(ue.Disposable);Ee.SelectionService=oe},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.SelectionModel=void 0;var me=function(){function Ie(Te){this._bufferService=Te,this.isSelectAllActive=!1,this.selectionStartLength=0}return Ie.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(Ie.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(Ie.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 Te=this.selectionStart[0]+this.selectionStartLength;return Te>this._bufferService.cols?[Te%this._bufferService.cols,this.selectionStart[1]+Math.floor(Te/this._bufferService.cols)]:[Te,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}),Ie.prototype.areSelectionValuesReversed=function(){var Te=this.selectionStart,be=this.selectionEnd;return!(!Te||!be)&&(Te[1]>be[1]||Te[1]===be[1]&&Te[0]>be[0])},Ie.prototype.onTrim=function(Te){return this.selectionStart&&(this.selectionStart[1]-=Te),this.selectionEnd&&(this.selectionEnd[1]-=Te),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},Ie}();Ee.SelectionModel=me},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.moveToCellSequence=void 0;var me=Le(12);function Ie(xe,ge,ce,ve){var de=xe-Te(ce,xe),ue=ge-Te(ce,ge);return Se(Math.abs(de-ue)-function(z,ee,oe){for(var ie=0,se=z-Te(oe,z),le=ee-Te(oe,ee),ye=0;ye<Math.abs(se-le);ye++){var we=be(z,ee)==="A"?-1:1,Ce=oe.buffer.lines.get(se+we*ye);Ce&&Ce.isWrapped&&ie++}return ie}(xe,ge,ce),he(be(xe,ge),ve))}function Te(xe,ge){for(var ce=0,ve=xe.buffer.lines.get(ge),de=ve&&ve.isWrapped;de&&ge>=0&&ge<xe.rows;)ce++,de=(ve=xe.buffer.lines.get(--ge))&&ve.isWrapped;return ce}function be(xe,ge){return xe>ge?"A":"B"}function Pe(xe,ge,ce,ve,de,ue){for(var z=xe,ee=ge,oe="";z!==ce||ee!==ve;)z+=de?1:-1,de&&z>ue.cols-1?(oe+=ue.buffer.translateBufferLineToString(ee,!1,xe,z),z=0,xe=0,ee++):!de&&z<0&&(oe+=ue.buffer.translateBufferLineToString(ee,!1,0,xe+1),xe=z=ue.cols-1,ee--);return oe+ue.buffer.translateBufferLineToString(ee,!1,xe,z)}function he(xe,ge){var ce=ge?"O":"[";return me.C0.ESC+ce+xe}function Se(xe,ge){xe=Math.floor(xe);for(var ce="",ve=0;ve<xe;ve++)ce+=ge;return ce}Ee.moveToCellSequence=function(xe,ge,ce,ve){var de,ue=ce.buffer.x,z=ce.buffer.y;if(!ce.buffer.hasScrollback)return function(oe,ie,se,le,ye,we){return Ie(ie,le,ye,we).length===0?"":Se(Pe(oe,ie,oe,ie-Te(ye,ie),!1,ye).length,he("D",we))}(ue,z,0,ge,ce,ve)+Ie(z,ge,ce,ve)+function(oe,ie,se,le,ye,we){var Ce;Ce=Ie(ie,le,ye,we).length>0?le-Te(ye,le):ie;var ke=le,Ne=function(je,Ve,Qe,Ge,mt,ct){var Ct;return Ct=Ie(Qe,Ge,mt,ct).length>0?Ge-Te(mt,Ge):Ve,je<Qe&&Ct<=Ge||je>=Qe&&Ct<Ge?"C":"D"}(oe,ie,se,le,ye,we);return Se(Pe(oe,Ce,se,ke,Ne==="C",ye).length,he(Ne,we))}(ue,z,xe,ge,ce,ve);if(z===ge)return de=ue>xe?"D":"C",Se(Math.abs(ue-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:ue,ce)+(ee-1)*ce.cols+1+((z>ge?ue:xe)-1),he(de,ve))}},function(Yt,Ee,Le){"use strict";var me=this&&this.__decorate||function(Pe,he,Se,xe){var ge,ce=arguments.length,ve=ce<3?he:xe===null?xe=Object.getOwnPropertyDescriptor(he,Se):xe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(Pe,he,Se,xe);else for(var de=Pe.length-1;de>=0;de--)(ge=Pe[de])&&(ve=(ce<3?ge(ve):ce>3?ge(he,Se,ve):ge(he,Se))||ve);return ce>3&&ve&&Object.defineProperty(he,Se,ve),ve},Ie=this&&this.__param||function(Pe,he){return function(Se,xe){he(Se,xe,Pe)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.SoundService=void 0;var Te=Le(1),be=function(){function Pe(he){this._optionsService=he}return Object.defineProperty(Pe,"audioContext",{get:function(){if(!Pe._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;Pe._audioContext=new he}return Pe._audioContext},enumerable:!1,configurable:!0}),Pe.prototype.playBellSound=function(){var he=Pe.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)})}},Pe.prototype._base64ToArrayBuffer=function(he){for(var Se=window.atob(he),xe=Se.length,ge=new Uint8Array(xe),ce=0;ce<xe;ce++)ge[ce]=Se.charCodeAt(ce);return ge.buffer},Pe.prototype._removeMimeType=function(he){return he.split(",")[1]},Pe=me([Ie(0,Te.IOptionsService)],Pe)}();Ee.SoundService=be},function(Yt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(ce,ve){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ue){de.__proto__=ue}||function(de,ue){for(var z in ue)ue.hasOwnProperty(z)&&(de[z]=ue[z])})(ce,ve)},function(ce,ve){function de(){this.constructor=ce}me(ce,ve),ce.prototype=ve===null?Object.create(ve):(de.prototype=ve.prototype,new de)}),Te=this&&this.__decorate||function(ce,ve,de,ue){var z,ee=arguments.length,oe=ee<3?ve:ue===null?ue=Object.getOwnPropertyDescriptor(ve,de):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(ce,ve,de,ue);else for(var ie=ce.length-1;ie>=0;ie--)(z=ce[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(ce,ve){return function(de,ue){ve(de,ue,ce)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.MouseZoneManager=void 0;var Pe=Le(2),he=Le(7),Se=Le(5),xe=Le(1),ge=function(ce){function ve(de,ue,z,ee,oe,ie){var se=ce.call(this)||this;return se._element=de,se._screenElement=ue,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(le){return se._onMouseDown(le)})),se._mouseMoveListener=function(le){return se._onMouseMove(le)},se._mouseLeaveListener=function(le){return se._onMouseLeave(le)},se._clickListener=function(le){return se._onClick(le)},se}return Ie(ve,ce),ve.prototype.dispose=function(){ce.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,ue){if(this._zones.length!==0){de&&ue||(de=0,ue=this._bufferService.rows-1);for(var z=0;z<this._zones.length;z++){var ee=this._zones[z];(ee.y1>de&&ee.y1<=ue+1||ee.y2>de&&ee.y2<=ue+1||ee.y1<de&&ee.y2>ue+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 ue=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 ue._onTooltip(de)},this._optionsService.options.linkTooltipHoverDuration)))},ve.prototype._onTooltip=function(de){this._tooltipTimeout=void 0;var ue=this._findZoneEventAt(de);ue&&ue.tooltipCallback&&ue.tooltipCallback(de)},ve.prototype._onMouseDown=function(de){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var ue=this._findZoneEventAt(de);ue!=null&&ue.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 ue=this._findZoneEventAt(de),z=this._getSelectionLength();ue&&z===this._initialSelectionLength&&(ue.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 ue=this._mouseService.getCoords(de,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(ue)for(var z=ue[0],ee=ue[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=Te([be(2,xe.IBufferService),be(3,Se.IMouseService),be(4,Se.ISelectionService),be(5,xe.IOptionsService)],ve)}(Pe.Disposable);Ee.MouseZoneManager=ge},function(Yt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(ve,de){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ue,z){ue.__proto__=z}||function(ue,z){for(var ee in z)z.hasOwnProperty(ee)&&(ue[ee]=z[ee])})(ve,de)},function(ve,de){function ue(){this.constructor=ve}me(ve,de),ve.prototype=de===null?Object.create(de):(ue.prototype=de.prototype,new ue)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.AccessibilityManager=void 0;var Te=Le(18),be=Le(11),Pe=Le(31),he=Le(7),Se=Le(2),xe=Le(32),ge=Le(17),ce=function(ve){function de(ue,z){var ee=ve.call(this)||this;ee._terminal=ue,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 Pe.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 Ie(de,ve),de.prototype.dispose=function(){ve.prototype.dispose.call(this),ge.removeElementFromParent(this._accessibilityTreeRoot),this._rowElements.length=0},de.prototype._onBoundaryFocus=function(ue,z){var ee=ue.target,oe=this._rowElements[z===0?1:this._rowElements.length-2];if(ee.getAttribute("aria-posinset")!==(z===0?"1":""+this._terminal.buffer.lines.length)&&ue.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 le=this._createAccessibilityTreeNode();this._rowElements.unshift(le),this._rowContainer.insertAdjacentElement("afterbegin",le)}else le=this._createAccessibilityTreeNode(),this._rowElements.push(le),this._rowContainer.appendChild(le);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(),ue.preventDefault(),ue.stopImmediatePropagation()}},de.prototype._onResize=function(ue){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>ue;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},de.prototype._createAccessibilityTreeNode=function(){var ue=document.createElement("div");return ue.setAttribute("role","listitem"),ue.tabIndex=-1,this._refreshRowDimensions(ue),ue},de.prototype._onTab=function(ue){for(var z=0;z<ue;z++)this._onChar(" ")},de.prototype._onChar=function(ue){var z=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==ue&&(this._charsToAnnounce+=ue):this._charsToAnnounce+=ue,ue===`
|
|
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=Te.tooMuchOutput)),be.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,be.isMac&&ge.removeElementFromParent(this._liveRegion)},de.prototype._onKey=function(ue){this._clearLiveRegion(),this._charsToConsume.push(ue)},de.prototype._refreshRows=function(ue,z){this._renderRowsDebouncer.refresh(ue,z,this._terminal.rows)},de.prototype._renderRows=function(ue,z){for(var ee=this._terminal.buffer,oe=ee.lines.length.toString(),ie=ue;ie<=z;ie++){var se=ee.translateBufferLineToString(ee.ydisp+ie,!0),le=(ee.ydisp+ie+1).toString(),ye=this._rowElements[ie];ye&&(se.length===0?ye.innerHTML=" ":ye.textContent=se,ye.setAttribute("aria-posinset",le),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 ue=0;ue<this._terminal.rows;ue++)this._refreshRowDimensions(this._rowElements[ue])}},de.prototype._refreshRowDimensions=function(ue){ue.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=ce},function(Yt,Ee,Le){"use strict";var me,Ie=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 le in se)se.hasOwnProperty(le)&&(ie[le]=se[le])})(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)}),Te=this&&this.__decorate||function(ee,oe,ie,se){var le,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 Ce=ee.length-1;Ce>=0;Ce--)(le=ee[Ce])&&(we=(ye<3?le(we):ye>3?le(oe,ie,we):le(oe,ie))||we);return ye>3&&we&&Object.defineProperty(oe,ie,we),we},be=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 Pe=Le(58),he=Le(9),Se=Le(2),xe=Le(5),ge=Le(1),ce=Le(0),ve=Le(10),de=Le(17),ue=1,z=function(ee){function oe(ie,se,le,ye,we,Ce,ke,Ne,je){var Ve=ee.call(this)||this;return Ve._colors=ie,Ve._element=se,Ve._screenElement=le,Ve._viewportElement=ye,Ve._linkifier=we,Ve._linkifier2=Ce,Ve._charSizeService=ke,Ve._optionsService=Ne,Ve._bufferService=je,Ve._terminalClass=ue++,Ve._rowElements=[],Ve._rowContainer=document.createElement("div"),Ve._rowContainer.classList.add("xterm-rows"),Ve._rowContainer.style.lineHeight="normal",Ve._rowContainer.setAttribute("aria-hidden","true"),Ve._refreshRowElements(Ve._bufferService.cols,Ve._bufferService.rows),Ve._selectionContainer=document.createElement("div"),Ve._selectionContainer.classList.add("xterm-selection"),Ve._selectionContainer.setAttribute("aria-hidden","true"),Ve.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},Ve._updateDimensions(),Ve._injectCss(),Ve._rowFactory=new Pe.DomRendererRowFactory(document,Ve._optionsService,Ve._colors),Ve._element.classList.add("xterm-dom-renderer-owner-"+Ve._terminalClass),Ve._screenElement.appendChild(Ve._rowContainer),Ve._screenElement.appendChild(Ve._selectionContainer),Ve._linkifier.onShowLinkUnderline(function(Qe){return Ve._onLinkHover(Qe)}),Ve._linkifier.onHideLinkUnderline(function(Qe){return Ve._onLinkLeave(Qe)}),Ve._linkifier2.onShowLinkUnderline(function(Qe){return Ve._onLinkHover(Qe)}),Ve._linkifier2.onHideLinkUnderline(function(Qe){return Ve._onLinkLeave(Qe)}),Ve}return Ie(oe,ee),Object.defineProperty(oe.prototype,"onRequestRedraw",{get:function(){return new ce.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 le=se[ie];le.style.width=this.dimensions.canvasWidth+"px",le.style.height=this.dimensions.actualCellHeight+"px",le.style.lineHeight=this.dimensions.actualCellHeight+"px",le.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(."+Pe.BOLD_CLASS+") { font-weight: "+this._optionsService.options.fontWeight+";}"+this._terminalSelector+" span."+Pe.BOLD_CLASS+" { font-weight: "+this._optionsService.options.fontWeightBold+";}"+this._terminalSelector+" span."+Pe.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) ."+Pe.CURSOR_CLASS+"."+Pe.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+Pe.CURSOR_CLASS+"."+Pe.CURSOR_BLINK_CLASS+":not(."+Pe.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+Pe.CURSOR_CLASS+"."+Pe.CURSOR_BLINK_CLASS+"."+Pe.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+Pe.CURSOR_CLASS+"."+Pe.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+Pe.CURSOR_CLASS+"."+Pe.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.options.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+Pe.CURSOR_CLASS+"."+Pe.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(le,ye){se+=ie._terminalSelector+" .xterm-fg-"+ye+" { color: "+le.css+"; }"+ie._terminalSelector+" .xterm-bg-"+ye+" { background-color: "+le.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 le=this._rowElements.length;le<=se;le++){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,le){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,Ce=Math.max(ye,0),ke=Math.min(we,this._bufferService.rows-1);if(!(Ce>=this._bufferService.rows||ke<0)){var Ne=document.createDocumentFragment();if(le)Ne.appendChild(this._createSelectionElement(Ce,ie[0],se[0],ke-Ce+1));else{var je=ye===Ce?ie[0]:0,Ve=Ce===ke?se[0]:this._bufferService.cols;Ne.appendChild(this._createSelectionElement(Ce,je,Ve));var Qe=ke-Ce-1;if(Ne.appendChild(this._createSelectionElement(Ce+1,0,this._bufferService.cols,Qe)),Ce!==ke){var Ge=we===ke?se[0]:this._bufferService.cols;Ne.appendChild(this._createSelectionElement(ke,0,Ge))}}this._selectionContainer.appendChild(Ne)}}},oe.prototype._createSelectionElement=function(ie,se,le,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*(le-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 le=this._bufferService.buffer.ybase+this._bufferService.buffer.y,ye=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),we=this._optionsService.options.cursorBlink,Ce=ie;Ce<=se;Ce++){var ke=this._rowElements[Ce];ke.innerHTML="";var Ne=Ce+this._bufferService.buffer.ydisp,je=this._bufferService.buffer.lines.get(Ne),Ve=this._optionsService.options.cursorStyle;ke.appendChild(this._rowFactory.createRow(je,Ne===le,Ve,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,le,ye,we,Ce){for(;ie!==se||le!==ye;){var ke=this._rowElements[le];if(!ke)return;var Ne=ke.children[ie];Ne&&(Ne.style.textDecoration=Ce?"underline":"none"),++ie>=we&&(ie=0,le++)}},oe=Te([be(6,xe.ICharSizeService),be(7,ge.IOptionsService),be(8,ge.IBufferService)],oe)}(Se.Disposable);Ee.DomRenderer=z},function(Yt,Ee,Le){"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=Le(9),Ie=Le(3),Te=Le(4),be=Le(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 Pe=function(){function Se(xe,ge,ce){this._document=xe,this._optionsService=ge,this._colors=ce,this._workCell=new Te.CellData}return Se.prototype.setColors=function(xe){this._colors=xe},Se.prototype.createRow=function(xe,ge,ce,ve,de,ue,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()!==Ie.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 le=this._document.createElement("span");if(se>1&&(le.style.width=ue*se+"px"),ge&&ie===ve)switch(le.classList.add(Ee.CURSOR_CLASS),de&&le.classList.add(Ee.CURSOR_BLINK_CLASS),ce){case"bar":le.classList.add(Ee.CURSOR_STYLE_BAR_CLASS);break;case"underline":le.classList.add(Ee.CURSOR_STYLE_UNDERLINE_CLASS);break;default:le.classList.add(Ee.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&le.classList.add(Ee.BOLD_CLASS),this._workCell.isItalic()&&le.classList.add(Ee.ITALIC_CLASS),this._workCell.isDim()&&le.classList.add(Ee.DIM_CLASS),this._workCell.isUnderline()&&le.classList.add(Ee.UNDERLINE_CLASS),this._workCell.isInvisible()?le.textContent=Ie.WHITESPACE_CELL_CHAR:le.textContent=this._workCell.getChars()||Ie.WHITESPACE_CELL_CHAR;var ye=this._workCell.getFgColor(),we=this._workCell.getFgColorMode(),Ce=this._workCell.getBgColor(),ke=this._workCell.getBgColorMode(),Ne=!!this._workCell.isInverse();if(Ne){var je=ye;ye=Ce,Ce=je;var Ve=we;we=ke,ke=Ve}switch(we){case 16777216:case 33554432:this._workCell.isBold()&&ye<8&&this._optionsService.options.drawBoldTextInBrightColors&&(ye+=8),this._applyMinimumContrast(le,this._colors.background,this._colors.ansi[ye])||le.classList.add("xterm-fg-"+ye);break;case 50331648:var Qe=be.rgba.toColor(ye>>16&255,ye>>8&255,255&ye);this._applyMinimumContrast(le,this._colors.background,Qe)||this._addStyle(le,"color:#"+he(ye.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(le,this._colors.background,this._colors.foreground)||Ne&&le.classList.add("xterm-fg-"+me.INVERTED_DEFAULT_COLOR)}switch(ke){case 16777216:case 33554432:le.classList.add("xterm-bg-"+Ce);break;case 50331648:this._addStyle(le,"background-color:#"+he(Ce.toString(16),"0",6));break;case 0:default:Ne&&le.classList.add("xterm-bg-"+me.INVERTED_DEFAULT_COLOR)}ee.appendChild(le)}}return ee},Se.prototype._applyMinimumContrast=function(xe,ge,ce){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=be.color.ensureContrastRatio(ge,ce,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=Pe},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.evaluateKeyboardEvent=void 0;var me=Le(12),Ie={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(Te,be,Pe,he){var Se={type:0,cancel:!1,key:void 0},xe=(Te.shiftKey?1:0)|(Te.altKey?2:0)|(Te.ctrlKey?4:0)|(Te.metaKey?8:0);switch(Te.keyCode){case 0:Te.key==="UIKeyInputUpArrow"?Se.key=be?me.C0.ESC+"OA":me.C0.ESC+"[A":Te.key==="UIKeyInputLeftArrow"?Se.key=be?me.C0.ESC+"OD":me.C0.ESC+"[D":Te.key==="UIKeyInputRightArrow"?Se.key=be?me.C0.ESC+"OC":me.C0.ESC+"[C":Te.key==="UIKeyInputDownArrow"&&(Se.key=be?me.C0.ESC+"OB":me.C0.ESC+"[B");break;case 8:if(Te.shiftKey){Se.key=me.C0.BS;break}if(Te.altKey){Se.key=me.C0.ESC+me.C0.DEL;break}Se.key=me.C0.DEL;break;case 9:if(Te.shiftKey){Se.key=me.C0.ESC+"[Z";break}Se.key=me.C0.HT,Se.cancel=!0;break;case 13:Se.key=Te.altKey?me.C0.ESC+me.C0.CR:me.C0.CR,Se.cancel=!0;break;case 27:Se.key=me.C0.ESC,Te.altKey&&(Se.key=me.C0.ESC+me.C0.ESC),Se.cancel=!0;break;case 37:if(Te.metaKey)break;xe?(Se.key=me.C0.ESC+"[1;"+(xe+1)+"D",Se.key===me.C0.ESC+"[1;3D"&&(Se.key=me.C0.ESC+(Pe?"b":"[1;5D"))):Se.key=be?me.C0.ESC+"OD":me.C0.ESC+"[D";break;case 39:if(Te.metaKey)break;xe?(Se.key=me.C0.ESC+"[1;"+(xe+1)+"C",Se.key===me.C0.ESC+"[1;3C"&&(Se.key=me.C0.ESC+(Pe?"f":"[1;5C"))):Se.key=be?me.C0.ESC+"OC":me.C0.ESC+"[C";break;case 38:if(Te.metaKey)break;xe?(Se.key=me.C0.ESC+"[1;"+(xe+1)+"A",Pe||Se.key!==me.C0.ESC+"[1;3A"||(Se.key=me.C0.ESC+"[1;5A")):Se.key=be?me.C0.ESC+"OA":me.C0.ESC+"[A";break;case 40:if(Te.metaKey)break;xe?(Se.key=me.C0.ESC+"[1;"+(xe+1)+"B",Pe||Se.key!==me.C0.ESC+"[1;3B"||(Se.key=me.C0.ESC+"[1;5B")):Se.key=be?me.C0.ESC+"OB":me.C0.ESC+"[B";break;case 45:Te.shiftKey||Te.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":be?me.C0.ESC+"OH":me.C0.ESC+"[H";break;case 35:Se.key=xe?me.C0.ESC+"[1;"+(xe+1)+"F":be?me.C0.ESC+"OF":me.C0.ESC+"[F";break;case 33:Te.shiftKey?Se.type=2:Se.key=me.C0.ESC+"[5~";break;case 34:Te.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(!Te.ctrlKey||Te.shiftKey||Te.altKey||Te.metaKey)if(Pe&&!he||!Te.altKey||Te.metaKey)Pe&&!Te.altKey&&!Te.ctrlKey&&Te.metaKey?Te.keyCode===65&&(Se.type=1):Te.key&&!Te.ctrlKey&&!Te.altKey&&!Te.metaKey&&Te.keyCode>=48&&Te.key.length===1?Se.key=Te.key:Te.key&&Te.ctrlKey&&Te.key==="_"&&(Se.key=me.C0.US);else{var ge=Ie[Te.keyCode],ce=ge&&ge[Te.shiftKey?1:0];if(ce)Se.key=me.C0.ESC+ce;else if(Te.keyCode>=65&&Te.keyCode<=90){var ve=Te.ctrlKey?Te.keyCode-64:Te.keyCode+32;Se.key=me.C0.ESC+String.fromCharCode(ve)}}else Te.keyCode>=65&&Te.keyCode<=90?Se.key=String.fromCharCode(Te.keyCode-64):Te.keyCode===32?Se.key=me.C0.NUL:Te.keyCode>=51&&Te.keyCode<=55?Se.key=String.fromCharCode(Te.keyCode-51+27):Te.keyCode===56?Se.key=me.C0.DEL:Te.keyCode===219?Se.key=me.C0.ESC:Te.keyCode===220?Se.key=me.C0.FS:Te.keyCode===221&&(Se.key=me.C0.GS)}return Se}},function(Yt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(ue,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])})(ue,z)},function(ue,z){function ee(){this.constructor=ue}me(ue,z),ue.prototype=z===null?Object.create(z):(ee.prototype=z.prototype,new ee)}),Te=this&&this.__decorate||function(ue,z,ee,oe){var ie,se=arguments.length,le=se<3?z:oe===null?oe=Object.getOwnPropertyDescriptor(z,ee):oe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")le=Reflect.decorate(ue,z,ee,oe);else for(var ye=ue.length-1;ye>=0;ye--)(ie=ue[ye])&&(le=(se<3?ie(le):se>3?ie(z,ee,le):ie(z,ee))||le);return se>3&&le&&Object.defineProperty(z,ee,le),le},be=this&&this.__param||function(ue,z){return function(ee,oe){z(ee,oe,ue)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.RenderService=void 0;var Pe=Le(31),he=Le(0),Se=Le(2),xe=Le(32),ge=Le(7),ce=Le(1),ve=Le(5),de=function(ue){function z(ee,oe,ie,se,le,ye){var we=ue.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 Pe.RenderDebouncer(function(ke,Ne){return we._renderRows(ke,Ne)}),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(ke){return we._fullRefresh()})),we.register(se.onOptionChange(function(){return we._renderer.onOptionsChanged()})),we.register(le.onCharSizeChange(function(){return we.onCharSizeChanged()})),we._renderer.onRequestRedraw(function(ke){return we.refreshRows(ke.start,ke.end,!0)}),we.register(ge.addDisposableDomListener(window,"resize",function(){return we.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var Ce=new IntersectionObserver(function(ke){return we._onIntersectionChange(ke[ke.length-1])},{threshold:0});Ce.observe(ie),we.register({dispose:function(){return Ce.disconnect()}})}return we}return Ie(z,ue),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(){ue.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=Te([be(3,ce.IOptionsService),be(4,ve.ICharSizeService),be(5,ce.IBufferService)],z)}(Se.Disposable);Ee.RenderService=de},function(Yt,Ee,Le){"use strict";var me=this&&this.__decorate||function(Se,xe,ge,ce){var ve,de=arguments.length,ue=de<3?xe:ce===null?ce=Object.getOwnPropertyDescriptor(xe,ge):ce;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ue=Reflect.decorate(Se,xe,ge,ce);else for(var z=Se.length-1;z>=0;z--)(ve=Se[z])&&(ue=(de<3?ve(ue):de>3?ve(xe,ge,ue):ve(xe,ge))||ue);return de>3&&ue&&Object.defineProperty(xe,ge,ue),ue},Ie=this&&this.__param||function(Se,xe){return function(ge,ce){xe(ge,ce,Se)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CharSizeService=void 0;var Te=Le(1),be=Le(0),Pe=function(){function Se(xe,ge,ce){this._optionsService=ce,this.width=0,this.height=0,this._onCharSizeChange=new be.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([Ie(2,Te.IOptionsService)],Se)}();Ee.CharSizeService=Pe;var he=function(){function Se(xe,ge,ce){this._document=xe,this._parentElement=ge,this._optionsService=ce,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(Yt,Ee,Le){"use strict";var me=this&&this.__decorate||function(he,Se,xe,ge){var ce,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 ue=he.length-1;ue>=0;ue--)(ce=he[ue])&&(de=(ve<3?ce(de):ve>3?ce(Se,xe,de):ce(Se,xe))||de);return ve>3&&de&&Object.defineProperty(Se,xe,de),de},Ie=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 Te=Le(5),be=Le(30),Pe=function(){function he(Se,xe){this._renderService=Se,this._charSizeService=xe}return he.prototype.getCoords=function(Se,xe,ge,ce,ve){return be.getCoords(Se,xe,ge,ce,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,ve)},he.prototype.getRawByteCoords=function(Se,xe,ge,ce){var ve=this.getCoords(Se,xe,ge,ce);return be.getRawByteCoords(ve)},he=me([Ie(0,Te.IRenderService),Ie(1,Te.ICharSizeService)],he)}();Ee.MouseService=Pe},function(Yt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(ce,ve){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ue){de.__proto__=ue}||function(de,ue){for(var z in ue)ue.hasOwnProperty(z)&&(de[z]=ue[z])})(ce,ve)},function(ce,ve){function de(){this.constructor=ce}me(ce,ve),ce.prototype=ve===null?Object.create(ve):(de.prototype=ve.prototype,new de)}),Te=this&&this.__decorate||function(ce,ve,de,ue){var z,ee=arguments.length,oe=ee<3?ve:ue===null?ue=Object.getOwnPropertyDescriptor(ve,de):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(ce,ve,de,ue);else for(var ie=ce.length-1;ie>=0;ie--)(z=ce[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(ce,ve){return function(de,ue){ve(de,ue,ce)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Linkifier2=void 0;var Pe=Le(1),he=Le(0),Se=Le(2),xe=Le(7),ge=function(ce){function ve(de){var ue=ce.call(this)||this;return ue._bufferService=de,ue._linkProviders=[],ue._linkCacheDisposables=[],ue._isMouseOut=!0,ue._activeLine=-1,ue._onShowLinkUnderline=ue.register(new he.EventEmitter),ue._onHideLinkUnderline=ue.register(new he.EventEmitter),ue.register(Se.getDisposeArrayDisposable(ue._linkCacheDisposables)),ue}return Ie(ve,ce),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 ue=this;return this._linkProviders.push(de),{dispose:function(){var z=ue._linkProviders.indexOf(de);z!==-1&&ue._linkProviders.splice(z,1)}}},ve.prototype.attachToDom=function(de,ue,z){var ee=this;this._element=de,this._mouseService=ue,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 ue=this._positionFromMouseEvent(de,this._element,this._mouseService);if(ue){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&&ue.x===this._lastBufferCell.x&&ue.y===this._lastBufferCell.y||(this._onHover(ue),this._lastBufferCell=ue)}}},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,ue){var z=this;this._activeProviderReplies&&ue||(this._activeProviderReplies=new Map,this._activeLine=de.y);var ee=!1;this._linkProviders.forEach(function(oe,ie){var se;ue?!((se=z._activeProviderReplies)===null||se===void 0)&&se.get(ie)&&(ee=z._checkLinkProviderResult(ie,de,ee)):oe.provideLinks(de.y,function(le){var ye,we;if(!z._isMouseOut){var Ce=le==null?void 0:le.map(function(ke){return{link:ke}});(ye=z._activeProviderReplies)===null||ye===void 0||ye.set(ie,Ce),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,ue){for(var z=new Set,ee=0;ee<ue.size;ee++){var oe=ue.get(ee);if(oe)for(var ie=0;ie<oe.length;ie++)for(var se=oe[ie],le=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=le;we<=ye;we++){if(z.has(we)){oe.splice(ie--,1);break}z.add(we)}}},ve.prototype._checkLinkProviderResult=function(de,ue,z){var ee,oe=this;if(!this._activeProviderReplies)return z;for(var ie=this._activeProviderReplies.get(de),se=!1,le=0;le<de;le++)this._activeProviderReplies.has(le)&&!this._activeProviderReplies.get(le)||(se=!0);if(!se&&ie){var ye=ie.find(function(Ce){return oe._linkAtPosition(Ce.link,ue)});ye&&(z=!0,this._handleNewLink(ye))}if(this._activeProviderReplies.size===this._linkProviders.length&&!z)for(le=0;le<this._activeProviderReplies.size;le++){var we=(ee=this._activeProviderReplies.get(le))===null||ee===void 0?void 0:ee.find(function(Ce){return oe._linkAtPosition(Ce.link,ue)});if(we){z=!0,this._handleNewLink(we);break}}return z},ve.prototype._onClick=function(de){if(this._element&&this._mouseService&&this._currentLink){var ue=this._positionFromMouseEvent(de,this._element,this._mouseService);ue&&this._linkAtPosition(this._currentLink.link,ue)&&this._currentLink.link.activate(de,this._currentLink.link.text)}},ve.prototype._clearCurrentLink=function(de,ue){this._element&&this._currentLink&&this._lastMouseEvent&&(!de||!ue||this._currentLink.link.range.start.y>=de&&this._currentLink.link.range.end.y<=ue)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,Se.disposeArray(this._linkCacheDisposables))},ve.prototype._handleNewLink=function(de){var ue=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=ue._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=ue._currentLink)===null||oe===void 0)&&oe.state&&ue._currentLink.state.decorations.pointerCursor!==ee&&(ue._currentLink.state.decorations.pointerCursor=ee,ue._currentLink.state.isHovered&&((ie=ue._element)===null||ie===void 0||ie.classList.toggle("xterm-cursor-pointer",ee)))}},underline:{get:function(){var ee,oe;return(oe=(ee=ue._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=ue._currentLink)===null||oe===void 0)&&oe.state&&((se=(ie=ue._currentLink)===null||ie===void 0?void 0:ie.state)===null||se===void 0?void 0:se.decorations.underline)!==ee&&(ue._currentLink.state.decorations.underline=ee,ue._currentLink.state.isHovered&&ue._fireUnderlineEvent(de.link,ee))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(ee){var oe=ee.start===0?0:ee.start+1+ue._bufferService.buffer.ydisp;ue._clearCurrentLink(oe,ee.end+1+ue._bufferService.buffer.ydisp)})))}},ve.prototype._linkHover=function(de,ue,z){var ee;!((ee=this._currentLink)===null||ee===void 0)&&ee.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(ue,!0),this._currentLink.state.decorations.pointerCursor&&de.classList.add("xterm-cursor-pointer")),ue.hover&&ue.hover(z,ue.text)},ve.prototype._fireUnderlineEvent=function(de,ue){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);(ue?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(oe)},ve.prototype._linkLeave=function(de,ue,z){var ee;!((ee=this._currentLink)===null||ee===void 0)&&ee.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(ue,!1),this._currentLink.state.decorations.pointerCursor&&de.classList.remove("xterm-cursor-pointer")),ue.leave&&ue.leave(z,ue.text)},ve.prototype._linkAtPosition=function(de,ue){var z=de.range.start.y===de.range.end.y,ee=de.range.start.y<ue.y,oe=de.range.end.y>ue.y;return(z&&de.range.start.x<=ue.x&&de.range.end.x>=ue.x||ee&&de.range.end.x>=ue.x||oe&&de.range.start.x<=ue.x||ee&&oe)&&de.range.start.y<=ue.y&&de.range.end.y>=ue.y},ve.prototype._positionFromMouseEvent=function(de,ue,z){var ee=z.getCoords(de,ue,this._bufferService.cols,this._bufferService.rows);if(ee)return{x:ee[0],y:ee[1]+this._bufferService.buffer.ydisp}},ve.prototype._createLinkUnderlineEvent=function(de,ue,z,ee,oe){return{x1:de,y1:ue,x2:z,y2:ee,cols:this._bufferService.cols,fg:oe}},ve=Te([be(0,Pe.IBufferService)],ve)}(Se.Disposable);Ee.Linkifier2=ge},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CoreBrowserService=void 0;var me=function(){function Ie(Te){this._textarea=Te}return Object.defineProperty(Ie.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),Ie}();Ee.CoreBrowserService=me},function(Yt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(le,ye){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(we,Ce){we.__proto__=Ce}||function(we,Ce){for(var ke in Ce)Ce.hasOwnProperty(ke)&&(we[ke]=Ce[ke])})(le,ye)},function(le,ye){function we(){this.constructor=le}me(le,ye),le.prototype=ye===null?Object.create(ye):(we.prototype=ye.prototype,new we)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CoreTerminal=void 0;var Te=Le(2),be=Le(1),Pe=Le(66),he=Le(67),Se=Le(68),xe=Le(74),ge=Le(75),ce=Le(0),ve=Le(76),de=Le(77),ue=Le(78),z=Le(80),ee=Le(81),oe=Le(19),ie=Le(82),se=function(le){function ye(we){var Ce=le.call(this)||this;return Ce._onBinary=new ce.EventEmitter,Ce._onData=new ce.EventEmitter,Ce._onLineFeed=new ce.EventEmitter,Ce._onResize=new ce.EventEmitter,Ce._onScroll=new ce.EventEmitter,Ce._instantiationService=new Pe.InstantiationService,Ce.optionsService=new xe.OptionsService(we),Ce._instantiationService.setService(be.IOptionsService,Ce.optionsService),Ce._bufferService=Ce.register(Ce._instantiationService.createInstance(Se.BufferService)),Ce._instantiationService.setService(be.IBufferService,Ce._bufferService),Ce._logService=Ce._instantiationService.createInstance(he.LogService),Ce._instantiationService.setService(be.ILogService,Ce._logService),Ce._coreService=Ce.register(Ce._instantiationService.createInstance(ge.CoreService,function(){return Ce.scrollToBottom()})),Ce._instantiationService.setService(be.ICoreService,Ce._coreService),Ce._coreMouseService=Ce._instantiationService.createInstance(ve.CoreMouseService),Ce._instantiationService.setService(be.ICoreMouseService,Ce._coreMouseService),Ce._dirtyRowService=Ce._instantiationService.createInstance(de.DirtyRowService),Ce._instantiationService.setService(be.IDirtyRowService,Ce._dirtyRowService),Ce.unicodeService=Ce._instantiationService.createInstance(ue.UnicodeService),Ce._instantiationService.setService(be.IUnicodeService,Ce.unicodeService),Ce._charsetService=Ce._instantiationService.createInstance(z.CharsetService),Ce._instantiationService.setService(be.ICharsetService,Ce._charsetService),Ce._inputHandler=new oe.InputHandler(Ce._bufferService,Ce._charsetService,Ce._coreService,Ce._dirtyRowService,Ce._logService,Ce.optionsService,Ce._coreMouseService,Ce.unicodeService),Ce.register(ce.forwardEvent(Ce._inputHandler.onLineFeed,Ce._onLineFeed)),Ce.register(Ce._inputHandler),Ce.register(ce.forwardEvent(Ce._bufferService.onResize,Ce._onResize)),Ce.register(ce.forwardEvent(Ce._coreService.onData,Ce._onData)),Ce.register(ce.forwardEvent(Ce._coreService.onBinary,Ce._onBinary)),Ce.register(Ce.optionsService.onOptionChange(function(ke){return Ce._updateOptions(ke)})),Ce._writeBuffer=new ie.WriteBuffer(function(ke){return Ce._inputHandler.parse(ke)}),Ce}return Ie(ye,le),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||(le.prototype.dispose.call(this),(we=this._windowsMode)===null||we===void 0||we.dispose(),this._windowsMode=void 0)},ye.prototype.write=function(we,Ce){this._writeBuffer.write(we,Ce)},ye.prototype.writeSync=function(we){this._writeBuffer.writeSync(we)},ye.prototype.resize=function(we,Ce){isNaN(we)||isNaN(Ce)||(we=Math.max(we,Se.MINIMUM_COLS),Ce=Math.max(Ce,Se.MINIMUM_ROWS),this._bufferService.resize(we,Ce))},ye.prototype.scroll=function(we,Ce){Ce===void 0&&(Ce=!1);var ke,Ne=this._bufferService.buffer;(ke=this._cachedBlankLine)&&ke.length===this.cols&&ke.getFg(0)===we.fg&&ke.getBg(0)===we.bg||(ke=Ne.getBlankLine(we,Ce),this._cachedBlankLine=ke),ke.isWrapped=Ce;var je=Ne.ybase+Ne.scrollTop,Ve=Ne.ybase+Ne.scrollBottom;if(Ne.scrollTop===0){var Qe=Ne.lines.isFull;Ve===Ne.lines.length-1?Qe?Ne.lines.recycle().copyFrom(ke):Ne.lines.push(ke.clone()):Ne.lines.splice(Ve+1,0,ke.clone()),Qe?this._bufferService.isUserScrolling&&(Ne.ydisp=Math.max(Ne.ydisp-1,0)):(Ne.ybase++,this._bufferService.isUserScrolling||Ne.ydisp++)}else{var Ge=Ve-je+1;Ne.lines.shiftElements(je+1,Ge-1,-1),Ne.lines.set(Ve,ke.clone())}this._bufferService.isUserScrolling||(Ne.ydisp=Ne.ybase),this._dirtyRowService.markRangeDirty(Ne.scrollTop,Ne.scrollBottom),this._onScroll.fire(Ne.ydisp)},ye.prototype.scrollLines=function(we,Ce){var ke=this._bufferService.buffer;if(we<0){if(ke.ydisp===0)return;this._bufferService.isUserScrolling=!0}else we+ke.ydisp>=ke.ybase&&(this._bufferService.isUserScrolling=!1);var Ne=ke.ydisp;ke.ydisp=Math.max(Math.min(ke.ydisp+we,ke.ybase),0),Ne!==ke.ydisp&&(Ce||this._onScroll.fire(ke.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 Ce=we-this._bufferService.buffer.ydisp;Ce!==0&&this.scrollLines(Ce)},ye.prototype.addEscHandler=function(we,Ce){return this._inputHandler.addEscHandler(we,Ce)},ye.prototype.addDcsHandler=function(we,Ce){return this._inputHandler.addDcsHandler(we,Ce)},ye.prototype.addCsiHandler=function(we,Ce){return this._inputHandler.addCsiHandler(we,Ce)},ye.prototype.addOscHandler=function(we,Ce){return this._inputHandler.addOscHandler(we,Ce)},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 Ce;switch(we){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((Ce=this._windowsMode)===null||Ce===void 0||Ce.dispose(),this._windowsMode=void 0)}},ye.prototype._enableWindowsMode=function(){var we=this;if(!this._windowsMode){var Ce=[];Ce.push(this.onLineFeed(ee.updateWindowsModeWrappedState.bind(null,this._bufferService))),Ce.push(this.addCsiHandler({final:"H"},function(){return ee.updateWindowsModeWrappedState(we._bufferService),!1})),this._windowsMode={dispose:function(){for(var ke=0,Ne=Ce;ke<Ne.length;ke++)Ne[ke].dispose()}}}},ye}(Te.Disposable);Ee.CoreTerminal=se},function(Yt,Ee,Le){"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),ce=0;for(Se=0;Se<xe;Se++)for(var ve=arguments[Se],de=0,ue=ve.length;de<ue;de++,ce++)ge[ce]=ve[de];return ge};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.InstantiationService=Ee.ServiceCollection=void 0;var Ie=Le(1),Te=Le(14),be=function(){function he(){for(var Se=[],xe=0;xe<arguments.length;xe++)Se[xe]=arguments[xe];this._entries=new Map;for(var ge=0,ce=Se;ge<ce.length;ge++){var ve=ce[ge],de=ve[0],ue=ve[1];this.set(de,ue)}}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=be;var Pe=function(){function he(){this._services=new be,this._services.set(Ie.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 ce=Te.getServiceDependencies(Se).sort(function(ie,se){return ie.index-se.index}),ve=[],de=0,ue=ce;de<ue.length;de++){var z=ue[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=ce.length>0?ce[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=Pe},function(Yt,Ee,Le){"use strict";var me=this&&this.__decorate||function(xe,ge,ce,ve){var de,ue=arguments.length,z=ue<3?ge:ve===null?ve=Object.getOwnPropertyDescriptor(ge,ce):ve;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(xe,ge,ce,ve);else for(var ee=xe.length-1;ee>=0;ee--)(de=xe[ee])&&(z=(ue<3?de(z):ue>3?de(ge,ce,z):de(ge,ce))||z);return ue>3&&z&&Object.defineProperty(ge,ce,z),z},Ie=this&&this.__param||function(xe,ge){return function(ce,ve){ge(ce,ve,xe)}},Te=this&&this.__spreadArrays||function(){for(var xe=0,ge=0,ce=arguments.length;ge<ce;ge++)xe+=arguments[ge].length;var ve=Array(xe),de=0;for(ge=0;ge<ce;ge++)for(var ue=arguments[ge],z=0,ee=ue.length;z<ee;z++,de++)ve[de]=ue[z];return ve};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.LogService=Ee.LogLevel=void 0;var be,Pe=Le(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"})(be=Ee.LogLevel||(Ee.LogLevel={}));var he={debug:be.DEBUG,info:be.INFO,warn:be.WARN,error:be.ERROR,off:be.OFF},Se=function(){function xe(ge){var ce=this;this._optionsService=ge,this._updateLogLevel(),this._optionsService.onOptionChange(function(ve){ve==="logLevel"&&ce._updateLogLevel()})}return xe.prototype._updateLogLevel=function(){this._logLevel=he[this._optionsService.options.logLevel]},xe.prototype._evalLazyOptionalParams=function(ge){for(var ce=0;ce<ge.length;ce++)typeof ge[ce]=="function"&&(ge[ce]=ge[ce]())},xe.prototype._log=function(ge,ce,ve){this._evalLazyOptionalParams(ve),ge.call.apply(ge,Te([console,"xterm.js: "+ce],ve))},xe.prototype.debug=function(ge){for(var ce=[],ve=1;ve<arguments.length;ve++)ce[ve-1]=arguments[ve];this._logLevel<=be.DEBUG&&this._log(console.log,ge,ce)},xe.prototype.info=function(ge){for(var ce=[],ve=1;ve<arguments.length;ve++)ce[ve-1]=arguments[ve];this._logLevel<=be.INFO&&this._log(console.info,ge,ce)},xe.prototype.warn=function(ge){for(var ce=[],ve=1;ve<arguments.length;ve++)ce[ve-1]=arguments[ve];this._logLevel<=be.WARN&&this._log(console.warn,ge,ce)},xe.prototype.error=function(ge){for(var ce=[],ve=1;ve<arguments.length;ve++)ce[ve-1]=arguments[ve];this._logLevel<=be.ERROR&&this._log(console.error,ge,ce)},xe=me([Ie(0,Pe.IOptionsService)],xe)}();Ee.LogService=Se},function(Yt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(ce,ve){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ue){de.__proto__=ue}||function(de,ue){for(var z in ue)ue.hasOwnProperty(z)&&(de[z]=ue[z])})(ce,ve)},function(ce,ve){function de(){this.constructor=ce}me(ce,ve),ce.prototype=ve===null?Object.create(ve):(de.prototype=ve.prototype,new de)}),Te=this&&this.__decorate||function(ce,ve,de,ue){var z,ee=arguments.length,oe=ee<3?ve:ue===null?ue=Object.getOwnPropertyDescriptor(ve,de):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(ce,ve,de,ue);else for(var ie=ce.length-1;ie>=0;ie--)(z=ce[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(ce,ve){return function(de,ue){ve(de,ue,ce)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BufferService=Ee.MINIMUM_ROWS=Ee.MINIMUM_COLS=void 0;var Pe=Le(1),he=Le(69),Se=Le(0),xe=Le(2);Ee.MINIMUM_COLS=2,Ee.MINIMUM_ROWS=1;var ge=function(ce){function ve(de){var ue=ce.call(this)||this;return ue._optionsService=de,ue.isUserScrolling=!1,ue._onResize=new Se.EventEmitter,ue.cols=Math.max(de.options.cols,Ee.MINIMUM_COLS),ue.rows=Math.max(de.options.rows,Ee.MINIMUM_ROWS),ue.buffers=new he.BufferSet(de,ue),ue}return Ie(ve,ce),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(){ce.prototype.dispose.call(this),this.buffers.dispose()},ve.prototype.resize=function(de,ue){this.cols=de,this.rows=ue,this.buffers.resize(de,ue),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:de,rows:ue})},ve.prototype.reset=function(){this.buffers.dispose(),this.buffers=new he.BufferSet(this._optionsService,this),this.isUserScrolling=!1},ve=Te([be(0,Pe.IOptionsService)],ve)}(xe.Disposable);Ee.BufferService=ge},function(Yt,Ee,Le){"use strict";var me,Ie=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 ce in ge)ge.hasOwnProperty(ce)&&(xe[ce]=ge[ce])})(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 Te=Le(70),be=Le(0),Pe=function(he){function Se(xe,ge){var ce=he.call(this)||this;return ce._onBufferActivate=ce.register(new be.EventEmitter),ce._normal=new Te.Buffer(!0,xe,ge),ce._normal.fillViewportRows(),ce._alt=new Te.Buffer(!1,xe,ge),ce._activeBuffer=ce._normal,ce.setupTabStops(),ce}return Ie(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}(Le(2).Disposable);Ee.BufferSet=Pe},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BufferStringIterator=Ee.Buffer=Ee.MAX_BUFFER_SIZE=void 0;var me=Le(71),Ie=Le(16),Te=Le(4),be=Le(3),Pe=Le(72),he=Le(73),Se=Le(20),xe=Le(6);Ee.MAX_BUFFER_SIZE=4294967295;var ge=function(){function ve(de,ue,z){this._hasScrollback=de,this._optionsService=ue,this._bufferService=z,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=Ie.DEFAULT_ATTR_DATA.clone(),this.savedCharset=Se.DEFAULT_CHARSET,this.markers=[],this._nullCell=Te.CellData.fromCharData([0,be.NULL_CELL_CHAR,be.NULL_CELL_WIDTH,be.NULL_CELL_CODE]),this._whitespaceCell=Te.CellData.fromCharData([0,be.WHITESPACE_CELL_CHAR,be.WHITESPACE_CELL_WIDTH,be.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,ue){return new Ie.BufferLine(this._bufferService.cols,this.getNullCell(de),ue)},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 ue=de+this._optionsService.options.scrollback;return ue>Ee.MAX_BUFFER_SIZE?Ee.MAX_BUFFER_SIZE:ue},ve.prototype.fillViewportRows=function(de){if(this.lines.length===0){de===void 0&&(de=Ie.DEFAULT_ATTR_DATA);for(var ue=this._rows;ue--;)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,ue){var z=this.getNullCell(Ie.DEFAULT_ATTR_DATA),ee=this._getCorrectBufferLength(ue);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<ue)for(var se=this._rows;se<ue;se++)this.lines.length<ue+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new Ie.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 Ie.BufferLine(de,z)));else for(se=this._rows;se>ue;se--)this.lines.length>ue+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(ee<this.lines.maxLength){var le=this.lines.length-ee;le>0&&(this.lines.trimStart(le),this.ybase=Math.max(this.ybase-le,0),this.ydisp=Math.max(this.ydisp-le,0),this.savedY=Math.max(this.savedY-le,0)),this.lines.maxLength=ee}this.x=Math.min(this.x,de-1),this.y=Math.min(this.y,ue-1),ie&&(this.y+=ie),this.savedX=Math.min(this.savedX,de-1),this.scrollTop=0}if(this.scrollBottom=ue-1,this._isReflowEnabled&&(this._reflow(de,ue),this._cols>de))for(oe=0;oe<this.lines.length;oe++)this.lines.get(oe).resize(de,z);this._cols=de,this._rows=ue},Object.defineProperty(ve.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),ve.prototype._reflow=function(de,ue){this._cols!==de&&(de>this._cols?this._reflowLarger(de,ue):this._reflowSmaller(de,ue))},ve.prototype._reflowLarger=function(de,ue){var z=Pe.reflowLargerGetLinesToRemove(this.lines,this._cols,de,this.ybase+this.y,this.getNullCell(Ie.DEFAULT_ATTR_DATA));if(z.length>0){var ee=Pe.reflowLargerCreateNewLayout(this.lines,z);Pe.reflowLargerApplyNewLayout(this.lines,ee.layout),this._reflowLargerAdjustViewport(de,ue,ee.countRemoved)}},ve.prototype._reflowLargerAdjustViewport=function(de,ue,z){for(var ee=this.getNullCell(Ie.DEFAULT_ATTR_DATA),oe=z;oe-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<ue&&this.lines.push(new Ie.BufferLine(de,ee))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-z,0)},ve.prototype._reflowSmaller=function(de,ue){for(var z=this.getNullCell(Ie.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 le=[se];se.isWrapped&&ie>0;)se=this.lines.get(--ie),le.unshift(se);var ye=this.ybase+this.y;if(!(ye>=ie&&ye<ie+le.length)){var we=le[le.length-1].getTrimmedLength(),Ce=Pe.reflowSmallerGetNewLineLengths(le,this._cols,de),ke=Ce.length-le.length,Ne=void 0;Ne=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+ke):Math.max(0,this.lines.length-this.lines.maxLength+ke);for(var je=[],Ve=0;Ve<ke;Ve++){var Qe=this.getBlankLine(Ie.DEFAULT_ATTR_DATA,!0);je.push(Qe)}je.length>0&&(ee.push({start:ie+le.length+oe,newLines:je}),oe+=je.length),le.push.apply(le,je);var Ge=Ce.length-1,mt=Ce[Ge];mt===0&&(mt=Ce[--Ge]);for(var ct=le.length-ke-1,Ct=we;ct>=0;){var it=Math.min(Ct,mt);if(le[Ge].copyCellsFrom(le[ct],Ct-it,mt-it,it,!0),(mt-=it)===0&&(mt=Ce[--Ge]),(Ct-=it)===0){ct--;var St=Math.max(ct,0);Ct=Pe.getWrappedLineTrimmedLength(le,St,this._cols)}}for(Ve=0;Ve<le.length;Ve++)Ce[Ve]<de&&le[Ve].setCell(Ce[Ve],z);for(var ut=ke-Ne;ut-- >0;)this.ybase===0?this.y<ue-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+oe)-ue&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+ke,this.ybase+ue-1)}}}if(ee.length>0){var Ft=[],ht=[];for(Ve=0;Ve<this.lines.length;Ve++)ht.push(this.lines.get(Ve));var rt=this.lines.length,dt=rt-1,yt=0,_t=ee[yt];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+oe);var vt=0;for(Ve=Math.min(this.lines.maxLength-1,rt+oe-1);Ve>=0;Ve--)if(_t&&_t.start>dt+vt){for(var Bt=_t.newLines.length-1;Bt>=0;Bt--)this.lines.set(Ve--,_t.newLines[Bt]);Ve++,Ft.push({index:dt+1,amount:_t.newLines.length}),vt+=_t.newLines.length,_t=ee[++yt]}else this.lines.set(Ve,ht[dt--]);var jt=0;for(Ve=Ft.length-1;Ve>=0;Ve--)Ft[Ve].index+=jt,this.lines.onInsertEmitter.fire(Ft[Ve]),jt+=Ft[Ve].amount;var un=Math.max(0,rt+oe-this.lines.maxLength);un>0&&this.lines.onTrimEmitter.fire(un)}},ve.prototype.stringIndexToBufferIndex=function(de,ue,z){for(z===void 0&&(z=!1);ue;){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)[be.CHAR_DATA_WIDTH_INDEX]&&(ue-=ee.get(ie)[be.CHAR_DATA_CHAR_INDEX].length||1),ue<0)return[de,ie];de++}return[de,0]},ve.prototype.translateBufferLineToString=function(de,ue,z,ee){z===void 0&&(z=0);var oe=this.lines.get(de);return oe?oe.translateToString(ue,z,ee):""},ve.prototype.getWrappedRangeForLine=function(de){for(var ue=de,z=de;ue>0&&this.lines.get(ue).isWrapped;)ue--;for(;z+1<this.lines.length&&this.lines.get(z+1).isWrapped;)z++;return{first:ue,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 ue=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 ue._removeMarker(z)})),z},ve.prototype._removeMarker=function(de){this.markers.splice(this.markers.indexOf(de),1)},ve.prototype.iterator=function(de,ue,z,ee,oe){return new ce(this,de,ue,z,ee,oe)},ve}();Ee.Buffer=ge;var ce=function(){function ve(de,ue,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=ue,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 ue="",z=de.first;z<=de.last;++z)ue+=this._buffer.translateBufferLineToString(z,this._trimRight);return this._current=de.last+1,{range:de,content:ue}},ve}();Ee.BufferStringIterator=ce},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CircularList=void 0;var me=Le(0),Ie=function(){function Te(be){this._maxLength=be,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(Te.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"maxLength",{get:function(){return this._maxLength},set:function(be){if(this._maxLength!==be){for(var Pe=new Array(be),he=0;he<Math.min(be,this.length);he++)Pe[he]=this._array[this._getCyclicIndex(he)];this._array=Pe,this._maxLength=be,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"length",{get:function(){return this._length},set:function(be){if(be>this._length)for(var Pe=this._length;Pe<be;Pe++)this._array[Pe]=void 0;this._length=be},enumerable:!1,configurable:!0}),Te.prototype.get=function(be){return this._array[this._getCyclicIndex(be)]},Te.prototype.set=function(be,Pe){this._array[this._getCyclicIndex(be)]=Pe},Te.prototype.push=function(be){this._array[this._getCyclicIndex(this._length)]=be,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},Te.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(Te.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),Te.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},Te.prototype.splice=function(be,Pe){for(var he=[],Se=2;Se<arguments.length;Se++)he[Se-2]=arguments[Se];if(Pe){for(var xe=be;xe<this._length-Pe;xe++)this._array[this._getCyclicIndex(xe)]=this._array[this._getCyclicIndex(xe+Pe)];this._length-=Pe}for(xe=this._length-1;xe>=be;xe--)this._array[this._getCyclicIndex(xe+he.length)]=this._array[this._getCyclicIndex(xe)];for(xe=0;xe<he.length;xe++)this._array[this._getCyclicIndex(be+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},Te.prototype.trimStart=function(be){be>this._length&&(be=this._length),this._startIndex+=be,this._length-=be,this.onTrimEmitter.fire(be)},Te.prototype.shiftElements=function(be,Pe,he){if(!(Pe<=0)){if(be<0||be>=this._length)throw new Error("start argument out of range");if(be+he<0)throw new Error("Cannot shift elements in list beyond index 0");if(he>0){for(var Se=Pe-1;Se>=0;Se--)this.set(be+Se+he,this.get(be+Se));var xe=be+Pe+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<Pe;Se++)this.set(be+Se+he,this.get(be+Se))}},Te.prototype._getCyclicIndex=function(be){return(this._startIndex+be)%this._maxLength},Te}();Ee.CircularList=Ie},function(Yt,Ee,Le){"use strict";function me(Ie,Te,be){if(Te===Ie.length-1)return Ie[Te].getTrimmedLength();var Pe=!Ie[Te].hasContent(be-1)&&Ie[Te].getWidth(be-1)===1,he=Ie[Te+1].getWidth(0)===2;return Pe&&he?be-1:be}Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.getWrappedLineTrimmedLength=Ee.reflowSmallerGetNewLineLengths=Ee.reflowLargerApplyNewLayout=Ee.reflowLargerCreateNewLayout=Ee.reflowLargerGetLinesToRemove=void 0,Ee.reflowLargerGetLinesToRemove=function(Ie,Te,be,Pe,he){for(var Se=[],xe=0;xe<Ie.length-1;xe++){var ge=xe,ce=Ie.get(++ge);if(ce.isWrapped){for(var ve=[Ie.get(xe)];ge<Ie.length&&ce.isWrapped;)ve.push(ce),ce=Ie.get(++ge);if(Pe>=xe&&Pe<ge)xe+=ve.length-1;else{for(var de=0,ue=me(ve,de,Te),z=1,ee=0;z<ve.length;){var oe=me(ve,z,Te),ie=oe-ee,se=be-ue,le=Math.min(ie,se);ve[de].copyCellsFrom(ve[z],ee,ue,le,!1),(ue+=le)===be&&(de++,ue=0),(ee+=le)===oe&&(z++,ee=0),ue===0&&de!==0&&ve[de-1].getWidth(be-1)===2&&(ve[de].copyCellsFrom(ve[de-1],be-1,ue++,1,!1),ve[de-1].setCell(be-1,he))}ve[de].replaceCells(ue,be,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(Ie,Te){for(var be=[],Pe=0,he=Te[Pe],Se=0,xe=0;xe<Ie.length;xe++)if(he===xe){var ge=Te[++Pe];Ie.onDeleteEmitter.fire({index:xe-Se,amount:ge}),xe+=ge-1,Se+=ge,he=Te[++Pe]}else be.push(xe);return{layout:be,countRemoved:Se}},Ee.reflowLargerApplyNewLayout=function(Ie,Te){for(var be=[],Pe=0;Pe<Te.length;Pe++)be.push(Ie.get(Te[Pe]));for(Pe=0;Pe<be.length;Pe++)Ie.set(Pe,be[Pe]);Ie.length=Te.length},Ee.reflowSmallerGetNewLineLengths=function(Ie,Te,be){for(var Pe=[],he=Ie.map(function(ue,z){return me(Ie,z,Te)}).reduce(function(ue,z){return ue+z}),Se=0,xe=0,ge=0;ge<he;){if(he-ge<be){Pe.push(he-ge);break}Se+=be;var ce=me(Ie,xe,Te);Se>ce&&(Se-=ce,xe++);var ve=Ie[xe].getWidth(Se-1)===2;ve&&Se--;var de=ve?be-1:be;Pe.push(de),ge+=de}return Pe},Ee.getWrappedLineTrimmedLength=me},function(Yt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(Pe,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])})(Pe,he)},function(Pe,he){function Se(){this.constructor=Pe}me(Pe,he),Pe.prototype=he===null?Object.create(he):(Se.prototype=he.prototype,new Se)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Marker=void 0;var Te=Le(0),be=function(Pe){function he(Se){var xe=Pe.call(this)||this;return xe.line=Se,xe._id=he._nextId++,xe.isDisposed=!1,xe._onDispose=new Te.EventEmitter,xe}return Ie(he,Pe),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}(Le(2).Disposable);Ee.Marker=be},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.OptionsService=Ee.DEFAULT_OPTIONS=Ee.DEFAULT_BELL_SOUND=void 0;var me=Le(0),Ie=Le(11),Te=Le(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:Ie.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",convertEol:!1,termName:"xterm",cancelEvents:!1});var be=["cols","rows"],Pe=function(){function he(Se){this._onOptionChange=new me.EventEmitter,this.options=Te.clone(Ee.DEFAULT_OPTIONS);for(var xe=0,ge=Object.keys(Se);xe<ge.length;xe++){var ce=ge[xe];if(ce in this.options){var ve=Se[ce];this.options[ce]=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(be.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=Pe},function(Yt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(de,ue){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,ue)},function(de,ue){function z(){this.constructor=de}me(de,ue),de.prototype=ue===null?Object.create(ue):(z.prototype=ue.prototype,new z)}),Te=this&&this.__decorate||function(de,ue,z,ee){var oe,ie=arguments.length,se=ie<3?ue:ee===null?ee=Object.getOwnPropertyDescriptor(ue,z):ee;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")se=Reflect.decorate(de,ue,z,ee);else for(var le=de.length-1;le>=0;le--)(oe=de[le])&&(se=(ie<3?oe(se):ie>3?oe(ue,z,se):oe(ue,z))||se);return ie>3&&se&&Object.defineProperty(ue,z,se),se},be=this&&this.__param||function(de,ue){return function(z,ee){ue(z,ee,de)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CoreService=void 0;var Pe=Le(1),he=Le(0),Se=Le(33),xe=Le(2),ge=Object.freeze({insertMode:!1}),ce=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),ve=function(de){function ue(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(ce),se}return Ie(ue,de),Object.defineProperty(ue.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),ue.prototype.reset=function(){this.modes=Se.clone(ge),this.decPrivateModes=Se.clone(ce)},ue.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)}},ue.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))},ue=Te([be(1,Pe.IBufferService),be(2,Pe.ILogService),be(3,Pe.IOptionsService)],ue)}(xe.Disposable);Ee.CoreService=ve},function(Yt,Ee,Le){"use strict";var me=this&&this.__decorate||function(ce,ve,de,ue){var z,ee=arguments.length,oe=ee<3?ve:ue===null?ue=Object.getOwnPropertyDescriptor(ve,de):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(ce,ve,de,ue);else for(var ie=ce.length-1;ie>=0;ie--)(z=ce[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},Ie=this&&this.__param||function(ce,ve){return function(de,ue){ve(de,ue,ce)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CoreMouseService=void 0;var Te=Le(1),be=Le(0),Pe={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(ce){return ce.button!==4&&ce.action===1&&(ce.ctrl=!1,ce.alt=!1,ce.shift=!1,!0)}},VT200:{events:19,restrict:function(ce){return ce.action!==32}},DRAG:{events:23,restrict:function(ce){return ce.action!==32||ce.button!==3}},ANY:{events:31,restrict:function(ce){return!0}}};function he(ce,ve){var de=(ce.ctrl?16:0)|(ce.shift?4:0)|(ce.alt?8:0);return ce.button===4?(de|=64,de|=ce.action):(de|=3&ce.button,4&ce.button&&(de|=64),8&ce.button&&(de|=128),ce.action===32?de|=32:ce.action!==0||ve||(de|=3)),de}var Se=String.fromCharCode,xe={DEFAULT:function(ce){var ve=[he(ce,!1)+32,ce.col+32,ce.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(ce){var ve=ce.action===0&&ce.button!==4?"m":"M";return"\x1B[<"+he(ce,!0)+";"+ce.col+";"+ce.row+ve}},ge=function(){function ce(ve,de){this._bufferService=ve,this._coreService=de,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new be.EventEmitter,this._lastEvent=null;for(var ue=0,z=Object.keys(Pe);ue<z.length;ue++){var ee=z[ue];this.addProtocol(ee,Pe[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 ce.prototype.addProtocol=function(ve,de){this._protocols[ve]=de},ce.prototype.addEncoding=function(ve,de){this._encodings[ve]=de},Object.defineProperty(ce.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(ce.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(ce.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}),ce.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(ce.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),ce.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},ce.prototype.explainEvents=function(ve){return{down:!!(1&ve),up:!!(2&ve),drag:!!(4&ve),move:!!(8&ve),wheel:!!(16&ve)}},ce.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},ce=me([Ie(0,Te.IBufferService),Ie(1,Te.ICoreService)],ce)}();Ee.CoreMouseService=ge},function(Yt,Ee,Le){"use strict";var me=this&&this.__decorate||function(Pe,he,Se,xe){var ge,ce=arguments.length,ve=ce<3?he:xe===null?xe=Object.getOwnPropertyDescriptor(he,Se):xe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(Pe,he,Se,xe);else for(var de=Pe.length-1;de>=0;de--)(ge=Pe[de])&&(ve=(ce<3?ge(ve):ce>3?ge(he,Se,ve):ge(he,Se))||ve);return ce>3&&ve&&Object.defineProperty(he,Se,ve),ve},Ie=this&&this.__param||function(Pe,he){return function(Se,xe){he(Se,xe,Pe)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.DirtyRowService=void 0;var Te=Le(1),be=function(){function Pe(he){this._bufferService=he,this.clearRange()}return Object.defineProperty(Pe.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),Pe.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},Pe.prototype.markDirty=function(he){he<this._start?this._start=he:he>this._end&&(this._end=he)},Pe.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)},Pe.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},Pe=me([Ie(0,Te.IBufferService)],Pe)}();Ee.DirtyRowService=be},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.UnicodeService=void 0;var me=Le(0),Ie=Le(79),Te=function(){function be(){this._providers=Object.create(null),this._active="",this._onChange=new me.EventEmitter;var Pe=new Ie.UnicodeV6;this.register(Pe),this._active=Pe.version,this._activeProvider=Pe}return Object.defineProperty(be.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"activeVersion",{get:function(){return this._active},set:function(Pe){if(!this._providers[Pe])throw new Error('unknown Unicode version "'+Pe+'"');this._active=Pe,this._activeProvider=this._providers[Pe],this._onChange.fire(Pe)},enumerable:!1,configurable:!0}),be.prototype.register=function(Pe){this._providers[Pe.version]=Pe},be.prototype.wcwidth=function(Pe){return this._activeProvider.wcwidth(Pe)},be.prototype.getStringCellWidth=function(Pe){for(var he=0,Se=Pe.length,xe=0;xe<Se;++xe){var ge=Pe.charCodeAt(xe);if(55296<=ge&&ge<=56319){if(++xe>=Se)return he+this.wcwidth(ge);var ce=Pe.charCodeAt(xe);56320<=ce&&ce<=57343?ge=1024*(ge-55296)+ce-56320+65536:he+=this.wcwidth(ce)}he+=this.wcwidth(ge)}return he},be}();Ee.UnicodeService=Te},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.UnicodeV6=void 0;var me,Ie=Le(15),Te=[[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]],be=[[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]],Pe=function(){function he(){if(this.version="6",!me){me=new Uint8Array(65536),Ie.fill(me,1),me[0]=0,Ie.fill(me,0,1,32),Ie.fill(me,0,127,160),Ie.fill(me,2,4352,4448),me[9001]=2,me[9002]=2,Ie.fill(me,2,11904,42192),me[12351]=1,Ie.fill(me,2,44032,55204),Ie.fill(me,2,63744,64256),Ie.fill(me,2,65040,65050),Ie.fill(me,2,65072,65136),Ie.fill(me,2,65280,65377),Ie.fill(me,2,65504,65511);for(var Se=0;Se<Te.length;++Se)Ie.fill(me,0,Te[Se][0],Te[Se][1]+1)}}return he.prototype.wcwidth=function(Se){return Se<32?0:Se<127?1:Se<65536?me[Se]:function(xe,ge){var ce,ve=0,de=ge.length-1;if(xe<ge[0][0]||xe>ge[de][1])return!1;for(;de>=ve;)if(xe>ge[ce=ve+de>>1][1])ve=ce+1;else{if(!(xe<ge[ce][0]))return!0;de=ce-1}return!1}(Se,be)?0:Se>=131072&&Se<=196605||Se>=196608&&Se<=262141?2:1},he}();Ee.UnicodeV6=Pe},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CharsetService=void 0;var me=function(){function Ie(){this.glevel=0,this._charsets=[]}return Ie.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},Ie.prototype.setgLevel=function(Te){this.glevel=Te,this.charset=this._charsets[Te]},Ie.prototype.setgCharset=function(Te,be){this._charsets[Te]=be,this.glevel===Te&&(this.charset=be)},Ie}();Ee.CharsetService=me},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.updateWindowsModeWrappedState=void 0;var me=Le(3);Ee.updateWindowsModeWrappedState=function(Ie){var Te=Ie.buffer.lines.get(Ie.buffer.ybase+Ie.buffer.y-1),be=Te==null?void 0:Te.get(Ie.cols-1),Pe=Ie.buffer.lines.get(Ie.buffer.ybase+Ie.buffer.y);Pe&&be&&(Pe.isWrapped=be[me.CHAR_DATA_CODE_INDEX]!==me.NULL_CELL_CODE&&be[me.CHAR_DATA_CODE_INDEX]!==me.WHITESPACE_CELL_CODE)}},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.WriteBuffer=void 0;var me=function(){function Ie(Te){this._action=Te,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return Ie.prototype.writeSync=function(Te){if(this._writeBuffer.length){for(var be=this._bufferOffset;be<this._writeBuffer.length;++be){var Pe=this._writeBuffer[be],he=this._callbacks[be];this._action(Pe),he&&he()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(Te)},Ie.prototype.write=function(Te,be){var Pe=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 Pe._innerWrite()})),this._pendingData+=Te.length,this._writeBuffer.push(Te),this._callbacks.push(be)},Ie.prototype._innerWrite=function(){for(var Te=this,be=Date.now();this._writeBuffer.length>this._bufferOffset;){var Pe=this._writeBuffer[this._bufferOffset],he=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(Pe),this._pendingData-=Pe.length,he&&he(),Date.now()-be>=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 Te._innerWrite()},0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},Ie}();Ee.WriteBuffer=me},function(Yt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.AddonManager=void 0;var me=function(){function Ie(){this._addons=[]}return Ie.prototype.dispose=function(){for(var Te=this._addons.length-1;Te>=0;Te--)this._addons[Te].instance.dispose()},Ie.prototype.loadAddon=function(Te,be){var Pe=this,he={instance:be,dispose:be.dispose,isDisposed:!1};this._addons.push(he),be.dispose=function(){return Pe._wrappedAddonDispose(he)},be.activate(Te)},Ie.prototype._wrappedAddonDispose=function(Te){if(!Te.isDisposed){for(var be=-1,Pe=0;Pe<this._addons.length;Pe++)if(this._addons[Pe]===Te){be=Pe;break}if(be===-1)throw new Error("Could not dispose an addon that has not been loaded");Te.isDisposed=!0,Te.dispose.apply(Te.instance),this._addons.splice(be,1)}},Ie}();Ee.AddonManager=me}])})},93314:function(Cn){"use strict";Cn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},62522:function(Cn){"use strict";Cn.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(Cn,Yt,Ee){"use strict";Ee.d(Yt,{Z:function(){return Se}});const Le=xe=>typeof xe=="object"&&xe!=null&&xe.nodeType===1,me=(xe,ge)=>(!ge||xe!=="hidden")&&xe!=="visible"&&xe!=="clip",Ie=(xe,ge)=>{if(xe.clientHeight<xe.scrollHeight||xe.clientWidth<xe.scrollWidth){const ce=getComputedStyle(xe,null);return me(ce.overflowY,ge)||me(ce.overflowX,ge)||(ve=>{const de=(ue=>{if(!ue.ownerDocument||!ue.ownerDocument.defaultView)return null;try{return ue.ownerDocument.defaultView.frameElement}catch(z){return null}})(ve);return!!de&&(de.clientHeight<ve.scrollHeight||de.clientWidth<ve.scrollWidth)})(xe)}return!1},Te=(xe,ge,ce,ve,de,ue,z,ee)=>ue<xe&&z>ge||ue>xe&&z<ge?0:ue<=xe&&ee<=ce||z>=ge&&ee>=ce?ue-xe-ve:z>ge&&ee<ce||ue<xe&&ee>ce?z-ge+de:0,be=xe=>{const ge=xe.parentElement;return ge==null?xe.getRootNode().host||null:ge},Pe=(xe,ge)=>{var ce,ve,de,ue;if(typeof document=="undefined")return[];const{scrollMode:z,block:ee,inline:oe,boundary:ie,skipOverflowHiddenElements:se}=ge,le=typeof ie=="function"?ie:_t=>_t!==ie;if(!Le(xe))throw new TypeError("Invalid target");const ye=document.scrollingElement||document.documentElement,we=[];let Ce=xe;for(;Le(Ce)&&le(Ce);){if(Ce=be(Ce),Ce===ye){we.push(Ce);break}Ce!=null&&Ce===document.body&&Ie(Ce)&&!Ie(document.documentElement)||Ce!=null&&Ie(Ce,se)&&we.push(Ce)}const ke=(ve=(ce=window.visualViewport)==null?void 0:ce.width)!=null?ve:innerWidth,Ne=(ue=(de=window.visualViewport)==null?void 0:de.height)!=null?ue:innerHeight,{scrollX:je,scrollY:Ve}=window,{height:Qe,width:Ge,top:mt,right:ct,bottom:Ct,left:it}=xe.getBoundingClientRect(),{top:St,right:ut,bottom:Ft,left:ht}=(_t=>{const vt=window.getComputedStyle(_t);return{top:parseFloat(vt.scrollMarginTop)||0,right:parseFloat(vt.scrollMarginRight)||0,bottom:parseFloat(vt.scrollMarginBottom)||0,left:parseFloat(vt.scrollMarginLeft)||0}})(xe);let rt=ee==="start"||ee==="nearest"?mt-St:ee==="end"?Ct+Ft:mt+Qe/2-St+Ft,dt=oe==="center"?it+Ge/2-ht+ut:oe==="end"?ct+ut:it-ht;const yt=[];for(let _t=0;_t<we.length;_t++){const vt=we[_t],{height:Bt,width:jt,top:un,right:Kt,bottom:xn,left:Ut}=vt.getBoundingClientRect();if(z==="if-needed"&&mt>=0&&it>=0&&Ct<=Ne&&ct<=ke&&(vt===ye&&!Ie(vt)||mt>=un&&Ct<=xn&&it>=Ut&&ct<=Kt))return yt;const Wt=getComputedStyle(vt),$t=parseInt(Wt.borderLeftWidth,10),ft=parseInt(Wt.borderTopWidth,10),We=parseInt(Wt.borderRightWidth,10),Be=parseInt(Wt.borderBottomWidth,10);let qe=0,et=0;const He="offsetWidth"in vt?vt.offsetWidth-vt.clientWidth-$t-We:0,Xe="offsetHeight"in vt?vt.offsetHeight-vt.clientHeight-ft-Be:0,Re="offsetWidth"in vt?vt.offsetWidth===0?0:jt/vt.offsetWidth:0,Ae="offsetHeight"in vt?vt.offsetHeight===0?0:Bt/vt.offsetHeight:0;if(ye===vt)qe=ee==="start"?rt:ee==="end"?rt-Ne:ee==="nearest"?Te(Ve,Ve+Ne,Ne,ft,Be,Ve+rt,Ve+rt+Qe,Qe):rt-Ne/2,et=oe==="start"?dt:oe==="center"?dt-ke/2:oe==="end"?dt-ke:Te(je,je+ke,ke,$t,We,je+dt,je+dt+Ge,Ge),qe=Math.max(0,qe+Ve),et=Math.max(0,et+je);else{qe=ee==="start"?rt-un-ft:ee==="end"?rt-xn+Be+Xe:ee==="nearest"?Te(un,xn,Bt,ft,Be+Xe,rt,rt+Qe,Qe):rt-(un+Bt/2)+Xe/2,et=oe==="start"?dt-Ut-$t:oe==="center"?dt-(Ut+jt/2)+He/2:oe==="end"?dt-Kt+We+He:Te(Ut,Kt,jt,$t,We+He,dt,dt+Ge,Ge);const{scrollLeft:Ue,scrollTop:Ke}=vt;qe=Ae===0?0:Math.max(0,Math.min(Ke+qe/Ae,vt.scrollHeight-Bt/Ae+Xe)),et=Re===0?0:Math.max(0,Math.min(Ue+et/Re,vt.scrollWidth-jt/Re+He)),rt+=Ke-qe,dt+=Ue-et}yt.push({el:vt,top:qe,left:et})}return yt},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 ue=de;for(;ue&&ue.parentNode;){if(ue.parentNode===document)return!0;ue=ue.parentNode instanceof ShadowRoot?ue.parentNode.host:ue.parentNode}return!1})(xe))return;const ce=(de=>{const ue=window.getComputedStyle(de);return{top:parseFloat(ue.scrollMarginTop)||0,right:parseFloat(ue.scrollMarginRight)||0,bottom:parseFloat(ue.scrollMarginBottom)||0,left:parseFloat(ue.scrollMarginLeft)||0}})(xe);if((de=>typeof de=="object"&&typeof de.behavior=="function")(ge))return ge.behavior(Pe(xe,ge));const ve=typeof ge=="boolean"||ge==null?void 0:ge.behavior;for(const{el:de,top:ue,left:z}of Pe(xe,he(ge))){const ee=ue-ce.top+ce.bottom,oe=z-ce.left+ce.right;de.scroll({top:ee,left:oe,behavior:ve})}}}}]);
|